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([[3779],{37036:function(){"use strict"},95625:function(){"use strict"},88010:function(mn,gn){"use strict";gn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(mn,gn){"use strict";gn.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"}},38476:function(){"use strict"},74413:function(){"use strict";function mn(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(mn.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(mn.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(mn.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(mn.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 mn))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 gn=[];function he(ft,z){var tt=gn.pop();return tt===void 0?new go.Point(ft,z):(tt.x=ft,tt.y=z,tt)}function ae(){var ft=gn.pop();return ft===void 0?new go.Point:ft}function Re(ft){gn.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 Ht=(z-at)/At,Yt=z-Ht*ft;Ft=it,jt=Ht*Ft+Yt}else{var Ht=(z-at)/At,Nt=(lt-dt)/Dt,Yt=z-Ht*ft,Gt=lt-Nt*it;Ft=(Gt-Yt)/(Ht-Nt),jt=Ht*Ft+Yt}return Pt.x=Ft,Pt.y=jt,Pt}function zt(ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt){var Gt=1-Pt,Ht=Pt,Yt=ft*Gt+tt*Ht,Ut=z*Gt+at*Ht,Vt=tt*Gt+it*Ht,oe=at*Gt+lt*Ht,se=it*Gt+ut*Ht,de=lt*Gt+dt*Ht,Se=Yt*Gt+Vt*Ht,Qt=Ut*Gt+oe*Ht,ne=Vt*Gt+se*Ht,ye=oe*Gt+de*Ht,we=Se*Gt+ne*Ht,be=Qt*Gt+ye*Ht;At.x=Yt,At.y=Ut,Dt.x=Se,Dt.y=Qt,Ft.x=we,Ft.y=be,jt.x=ne,jt.y=ye,Nt.x=se,Nt.y=de}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 mn("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 mn("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 mn("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 mn("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 mn("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 mn("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 Et=[];function Ct(){var ft=Et.pop();return ft===void 0?[]:ft}function St(ft){ft.length=0,Et.push(ft)}function Tt(ft){for(var z=Ct(),tt=.5,at=.5,it=Math.PI*1.5,lt=0,ut=0;ut<ft;ut++)lt=2*Math.PI/ft*ut+it,z[ut]=new go.Point(at+tt*Math.cos(lt),at+tt*Math.sin(lt));return z.push(z[0]),z}function mt(ft){var z=xt(ft),tt=Ct();tt[0]=z[0];for(var at=1,it=1;at<z.length;at+=2,it+=3)tt[it]=z[at],tt[it+1]=z[at],tt[it+2]=z[at+1];return St(z),tt}function xt(ft){for(var z=Tt(ft),tt=Ct(),at=Math.floor(z.length/2),it=z.length-1,lt=ft%2===0?2:1,ut=0;ut<it;ut++){var dt=z[ut],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 mn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new mn("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 mn("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 mn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new mn("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 mn("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 mn("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 mn("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 mn("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 mn("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 mn("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();zt(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(),Ht=ae();zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.58,jt,jt,Ht,Nt,Gt);var Yt=ae(),Ut=ae(),Vt=ae();zt(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.42,Yt,Ut,Vt,jt,jt);var oe=ae(),se=ae(),de=ae();return zt(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.58,jt,jt,de,oe,se),Pt.add(new go.PathSegment(go.PathSegment.Move,de.x*z,de.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,de.x*z,de.y*tt).close()),Pt.add(new go.PathSegment(go.PathSegment.Move,Vt.x*z,Vt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,Ht.x*z,Ht.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,Vt.x*z,Vt.y*tt,Yt.x*z,Yt.y*tt,Ut.x*z,Ut.y*tt).close()),Re(At),Re(Dt),Re(Ft),Re(jt),Re(Nt),Re(Gt),Re(Ht),Re(Yt),Re(Ut),Re(Vt),Re(oe),Re(se),Re(de),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 mn("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)),zt(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=he(At.x,At.y);zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.56,Pt,Pt,At,Dt,Ft);var Gt=he(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 Ht=new go.PathFigure(ut*z,(dt-lt)*tt,!1);at.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Ht.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 Yt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(Yt),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 mn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new mn("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 mn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new mn("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 mn("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 mn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new mn("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 mn("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 mn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new mn("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 mn("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 mn("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 mn("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 mn("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 mn("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 mn("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 Ht=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);at.add(Ht),Ht.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)),Ht.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)),Ht.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)),Ht.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 Yt=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);return at.add(Yt),Yt.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)),Yt.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)),Yt.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)),Yt.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();zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,Pt,Pt,At,Dt,Ft);var jt=he(At.x,At.y),Nt=new go.PathFigure(At.x*z,At.y*tt,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),zt(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,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,zt(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)),zt(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,Ht=Dt*Nt;lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt-jt)*z,Pt*tt,(dt-(Gt+jt)/2)*z,(Pt+(Nt+Ht)/2)*tt,(dt-jt)*z,(Pt+Ht)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,(Pt-Nt)*tt,(dt-jt)*z,(Pt-Ht)*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-Ht)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*tt,(dt+jt)*z,(Pt+Ht)*tt,(dt+(Gt+jt)/2)*z,(Pt+(Nt+Ht)/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 Yt=new go.PathFigure(.2*z,tt,!1);at.add(Yt),Yt.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 Ht=new go.PathFigure(0,tt,!1);return at.add(Ht),Ht.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")},80727: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 mn={},gn="5.0",he={},ae=null,Re=!1,ot=!1,zt=null,Bt=!1,vt=null,gt=null,Et=0;Et<arguments.length;Et++){var Ct=arguments[Et];if(Ct!==null)switch(typeof Ct){case"number":gn=Ct.toFixed(1);break;case"string":Ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?gn=Ct:zt=Ct;break;case"object":typeof Ct.is3D!="undefined"?ae=Ct:he=Ct;break;case"boolean":Re=Ct,ot=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},he.material_id!==void 0&&!ot&&(Re=!0)),zt!==null&&he.id===void 0&&(he.id=zt);var St="",Tt="",mt=!1,xt=null,ft=null,z=null,tt=!1,at=null,it=null,lt=null,ut=null,dt=null;he.height!==void 0&&(he.height=Math.round(he.height)),he.width!==void 0&&(he.width=Math.round(he.width));var Pt=function(fe){return parseFloat(fe)>4?parseFloat(fe):5};mn.setHTML5Codebase=function(fe,pe){gt=fe,ye(fe,pe)},mn.setJavaCodebase=mn.setJavaCodebaseVersion=mn.isCompiledInstalled=mn.setPreCompiledScriptPath=mn.setPreCompiledResourcePath=function(){},mn.setHTML5CodebaseVersion=function(fe,pe){var ce=parseFloat(fe);if(ce!==NaN&&ce<5){console.log("The GeoGebra HTML5 codebase version "+ce+" is deprecated. Using version latest instead.");return}vt=fe,ne(fe,pe)},mn.getHTML5CodebaseVersion=function(){return ft},mn.getParameters=function(){return he},mn.setFontsCSSURL=function(fe){ut=fe},mn.setGiacJSURL=function(fe){},mn.setJNLPFile=function(fe){St=fe},mn.setJNLPBaseDir=function(fe){},mn.inject=function(){function fe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pe="auto",ce=he.id,Ce,ve=!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:ce=arguments[Fe]):typeof ge=="boolean"?ve=ge:ge instanceof HTMLElement&&(Ce=ge)}xe();function xe(){if(!Bt){setTimeout(xe,200);return}pe=Se(pe);var ee=Ce||document.getElementById(ce);if(!ee){console.log("possibly bug on ajax loading? ");return}if(mn.removeExistingApplet(ee,!1),he.width===void 0&&ee.clientWidth&&(he.width=ee.clientWidth),he.height===void 0&&ee.clientHeight&&(he.height=ee.clientHeight),!(he.width&&he.height)&&pe==="html5"&&(delete he.width,delete he.height),xt=pe,pe==="screenshot")Ut(ee,he);else{var Kt=!1;he.hasOwnProperty("playButton")&&he.playButton||he.hasOwnProperty("clickToLoad")&&he.clickToLoad?Kt=!0:he.hasOwnProperty("playButtonAutoDecide")&&he.playButtonAutoDecide&&(Kt=(!At()||fe())&&Dt()),Kt?(xt="screenshot",oe(ee,he,ve,pe)):Yt(ee,he,ve)}}};function At(){try{return window.self!==window.top}catch(fe){return!0}}function Dt(){return he.hasOwnProperty("screenshotGenerator")&&he.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}mn.getViews=function(){return ae},mn.isJavaInstalled=function(){return!1};var Ft=function(fe){var pe=function(Fe){var ge=JSON.parse(Fe),xe=function(wt){return wt.type=="G"||wt.type=="E"},ee=ge.elements?ge.elements.filter(xe)[0]:ge;if(!ee||!ee.url){ce();return}he.fileName=ee.url,jt(ee.settings||{}),ae.is3D=!0;var Kt="https://www.geogebra.org/images/";mn.setPreviewImage(at||ee.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),fe()},ce=function(){he.onError&&he.onError(),we("Error: Fetching material (id "+he.material_id+") failed.",he)},Ce=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",ve="/materials/"+he.material_id+"?scope=basic";Nt("https://"+Ce+"/api/proxy.php?path="+encodeURIComponent(ve),pe,ce)};function jt(fe){var pe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ce){fe[ce]=!!fe[ce]}),pe.forEach(function(ce){he[ce]===void 0&&fe[ce]!==void 0&&(he[ce]=fe[ce])}),he.showToolBarHelp===void 0&&(he.showToolBarHelp=he.showToolBar)}function Nt(fe,pe,ce){var Ce=new XMLHttpRequest;Ce.open("GET",fe),Ce.onload=function(){pe(Ce.responseText)},Ce.onerror=ce,Ce.send()}mn.isHTML5Installed=function(){return!0},mn.getLoadedAppletType=function(){return xt},mn.setPreviewImage=function(fe,pe,ce){at=fe,it=pe,lt=ce},mn.removeExistingApplet=function(fe,pe){var ce;typeof fe=="string"&&(fe=document.getElementById(fe)),xt=null;var Ce=null;for(ce=0;ce<fe.childNodes.length;ce++){var ve=fe.childNodes[ce],Fe=ve.className;Fe==="applet_screenshot"?pe?(ve.style.display="block",xt="screenshot"):ve.style.display="none":Fe!=="applet_scaler prerender"&&(fe.removeChild(ve),Ce=Fe&&Fe.indexOf("appletParameters")!=-1?ve.id:null,ce--)}var ge=he.id!==void 0?he.id:Ce,xe=window[ge];xe&&typeof xe.getBase64=="function"&&(xe.remove(),window[ge]=null)},mn.refreshHitPoints=function(){if(Pt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var fe=mn.getAppletObject();return fe&&typeof fe.recalculateEnvironments=="function"?(fe.recalculateEnvironments(),!0):!1},mn.startAnimation=function(){var fe=mn.getAppletObject();return fe&&typeof fe.startAnimation=="function"?(fe.startAnimation(),!0):!1},mn.stopAnimation=function(){var fe=mn.getAppletObject();return fe&&typeof fe.stopAnimation=="function"?(fe.stopAnimation(),!0):!1},mn.getAppletObject=function(){var fe=he.id!==void 0?he.id:"ggbApplet";return window[fe]},mn.resize=function(){};var Gt=function(fe,pe,ce){var Ce=document.createElement("param");Ce.setAttribute("name",pe),Ce.setAttribute("value",ce),fe.appendChild(Ce)},Ht=function(fe){return fe&&fe!=="false"},Yt=function(fe,pe,ce){Pt(ft)<=4.2&&(ce=!0);var Ce=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ft||ggbHTML5LoadedCodebaseIsWebSimple&&!tt)&&(Ce=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var ve=document.createElement("div");ve.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)Ht(pe.showToolBar)&&(pe.height-=7),Ht(pe.showAlgebraInput)&&(pe.height-=37),pe.width<605&&Ht(pe.showToolBar)&&(pe.width=605,Fe=605);else{var xe=100;(Ht(pe.showToolBar)||Ht(pe.showMenuBar))&&(pe.hasOwnProperty("customToolBar")&&(pe.customToolbar=pe.customToolBar),xe=Ht(pe.showMenuBar)?245:155),Fe<xe&&(pe.width=xe,Fe=xe)}ve.style.border="none",ve.style.display="inline-block";for(var ee in pe)pe.hasOwnProperty(ee)&&ee!=="appletOnLoad"&&ve.setAttribute("data-param-"+ee,pe[ee]);ut&&ve.setAttribute("data-param-fontscssurl",ut),mn.resize=function(){GGBAppletUtils.responsiveResize(fe,pe)},window.addEventListener("resize",function(Le){mn.resize()});var Kt=typeof pe.appletOnLoad=="function"?pe.appletOnLoad:function(){};if(!ce&&pe.width!==void 0){pe.hasOwnProperty("showSplash")||ve.setAttribute("data-param-showSplash","false");var wt=fe.querySelector(".applet_scaler.prerender"),Lt=wt!==null;if(Lt)var Xt=wt.querySelector(".ggb_preview");else{var Xt=de(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(Le){var Be=fe.querySelector(".ggb_preview");Be&&Be.parentNode.removeChild(Be),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wt),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(Le)},Lt||wt.appendChild(Xt)):ve.appendChild(Xt),wt.appendChild(ve),Lt||fe.appendChild(wt),setTimeout(function(){mn.resize()},1)}else{var re=document.createElement("div");re.className="applet_scaler",re.style.position="relative",re.style.display="block",re.appendChild(ve),fe.appendChild(re),pe.appletOnLoad=function(Le){mn.resize(),Kt(Le)}}function It(Le,Be){Be&&typeof Be.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Le,Be.appletOnLoad):renderGGBElement(Le),we("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Be)}function Rt(Le,Be){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Le,params:Be}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(tn){It(tn.article,tn.params)}),html5AppletsToProcess=null)},Pt(ft)<5&&(Le.className+=" geogebraweb")):It(Le,Be)}if(Ce){scriptLoadStarted=!0;for(var Wt=0;Wt<ve.childNodes.length;Wt++){var te=ve.childNodes[Wt].tagName;te==="TABLE"&&(ve.removeChild(ve.childNodes[Wt]),Wt--)}if(ggbHTML5LoadedScript!==null){var ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ue!=null&&ue.parentNode.removeChild(ue)}var le=document.createElement("script"),Ae=function(){Rt(ve,pe)};le.src=Tt+z,ggbHTML5LoadedCodebaseIsWebSimple=tt,ggbHTML5LoadedCodebaseVersion=ft,ggbHTML5LoadedScript=le.src,we("GeoGebra HTML5 codebase loaded: '"+Tt+"'.",pe),!gt&&(!vt||vt=="5.0")?(tt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ae()):Tt.requirejs?__webpack_require__.e(4184).then(function(){var Le=[__webpack_require__(74620)];Ae.apply(null,Le)}.bind(this)).catch(__webpack_require__.oe):(le.onload=Ae,fe.appendChild(le))}else Rt(ve,pe);pe.height=ge,pe.width=Fe},Ut=function(fe,pe,ce){var Ce=de(pe.width,pe.height,pe.borderColor,ce),ve=document.createElement("div");ve.style.position="relative",ve.style.display="block",ve.style.width=pe.width+"px",ve.style.height=pe.height+"px",ve.className="applet_screenshot applet_scaler"+(ce?" applet_screenshot_play":""),ve.appendChild(Ce);var Fe=GGBAppletUtils.getScale(pe,fe,ce);ce?(fe.appendChild(se()),window.GGBT_wsf_view||(fe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ve,"66%"),fe.appendChild(ve),Fe!==1&&!isNaN(Fe)&&(GGBAppletUtils.scaleElement(ve,Fe),ve.style.width=pe.width+"px",ve.style.height=pe.height+"px",ve.parentNode.style.width=pe.width*Fe+"px",ve.parentNode.style.height=pe.height*Fe+"px"),mn.resize=function(){Vt(fe,Ce,ve,ce)},window.addEventListener("resize",function(ge){mn.resize()}),mn.resize()};function Vt(fe,pe,ce,Ce){if(fe.contains(pe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(fe)}var ve=GGBAppletUtils.getScale(he,fe,Ce);ce.parentNode!==null&&(!isNaN(ve)&&ve!==1?(GGBAppletUtils.scaleElement(ce,ve),ce.parentNode.style.width=he.width*ve+"px",ce.parentNode.style.height=he.height*ve+"px"):(GGBAppletUtils.scaleElement(ce,1),ce.parentNode.style.width=he.width+"px",ce.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(fe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}mn.onExitFullscreen=function(fe,pe){pe.appendChild(fe)};var oe=function(fe,pe,ce,Ce){Ut(fe,pe,!0);for(var ve=function(){var xe=[];for(ge=0;ge<fe.childNodes.length;ge++)xe.push(fe.childNodes[ge]);if(window.GGBT_wsf_view){var ee=window.GGBT_wsf_view.renderFullScreen(fe,pe.id),Kt=document.getElementById("fullscreencontainer"),wt=jQuery(fe).find(".fullscreencontent");wt.length>0?(ee.remove(),wt.attr("id","fullscreencontent").show(),jQuery(Kt).append(wt),window.dispatchEvent(new Event("resize"))):Yt(ee,pe,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else xt=Ce,Yt(fe,pe,!1);if(!window.GGBT_wsf_view)for(ge=0;ge<xe.length;ge++)fe.removeChild(xe[ge])},Fe=fe.getElementsByClassName("ggb_preview_play"),ge=0;ge<Fe.length;ge++)Fe[ge].addEventListener("click",ve,!1),Fe[ge].addEventListener("ontouchstart",ve,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(fe),Dt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},se=function(){var fe=document.createElement("div");if(fe.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");}',ce=document.createElement("style");ce.styleSheet?ce.styleSheet.cssText=pe:ce.appendChild(document.createTextNode(pe)),document.getElementsByTagName("head")[0].appendChild(ce)}return fe},de=function(fe,pe,ce,Ce){var ve=document.createElement("div");ve.className="ggb_preview",ve.style.position="absolute",ve.style.zIndex="90",ve.style.width=fe-2+"px",ve.style.height=pe-2+"px",ve.style.top="0px",ve.style.left="0px",ve.style.overflow="hidden",ve.style.backgroundColor="white";var Fe="lightgrey";ce!==void 0&&(ce==="none"?Fe="transparent":Fe=ce),ve.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 xe,ee,Kt;if(!Ce){xe=document.createElement("img"),xe.style.position="absolute",xe.style.zIndex="1001",xe.style.opacity=1,ge.style.opacity=.3,ee=360,ee>fe/4*3&&(ee=fe/4*3),Kt=ee/5.8,xe.setAttribute("src",it),xe.setAttribute("width",ee),xe.setAttribute("height",Kt);var wt=(fe-ee)/2,Lt=(pe-Kt)/2;xe.style.left=wt+"px",xe.style.top=Lt+"px",ve.appendChild(xe)}}return ve.appendChild(ge),ve},Se=function(fe){return fe=fe.toLowerCase(),fe==="html5"||fe==="screenshot"?fe:"html5"},Qt=["web","webSimple","web3d","tablet","tablet3d","phone"],ne=function(fe,pe){if(ft=fe,pe){ye(ft,!0);return}var ce=!Re;if(ce){var Ce=Pt(ft);!isNaN(Ce)&&Ce<4.4&&(ce=!1)}var ve,Fe;window.location.protocol.substr(0,4)==="http"?ve=window.location.protocol:ve="http:";var ge=ft.indexOf("//");ge>0?Fe=ft:ge===0?Fe=ve+ft:Fe="https://www.geogebra.org/apps/5.2.814.0/";for(var xe in Qt)if(ft.slice(Qt[xe].length*-1)===Qt[xe]||ft.slice((Qt[xe].length+1)*-1)===Qt[xe]+"/"){ye(Fe,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ce&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Ht(he.showToolBar)&&!Ht(he.showMenuBar)&&!Ht(he.showAlgebraInput)&&!Ht(he.enableRightClick)&&(!he.appName||he.appName=="classic")?Fe+="webSimple/":Fe+="web3d/",ye(Fe,!1)},ye=function(fe,pe){if(fe.requirejs){Tt=fe;return}fe.slice(-1)!=="/"&&(fe+="/"),Tt=fe,pe===null&&(pe=fe.indexOf("http")===-1),mt=pe,z="web.nocache.js",tt=!1;var ce=Tt.split("/");ce.length>1&&(!pe&&ce[ce.length-2]==="webSimple"?(z="webSimple.nocache.js",tt=!0):Qt.indexOf(ce[ce.length-2])>=0&&(z=ce[ce.length-2]+".nocache.js")),ce=fe.split("/"),ft=ce[ce.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&&fe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ce+" is deprecated. Using version latest instead."),ne("5.0",pe))},we=function(fe,pe){window.console&&window.console.log&&(!pe||typeof pe.showLogging=="undefined"||pe.showLogging&&pe.showLogging!=="false")&&console.log(fe)};he.material_id!==void 0?Ft(be):be();function be(){var fe=gn;vt!==null?fe=vt:parseFloat(fe)<5&&(fe="5.0"),ne(fe,!1),gt!==null&&ye(gt,mt),Bt=!0}return mn},GGBAppletUtils=function(){"use strict";function mn(){return window.GGBT_wsf_edit!==void 0}function gn(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 he(Bt,vt,gt,Et,Ct,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(Et?Tt.offsetWidth:0,Tt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xt=Math.min(window.innerWidth,document.documentElement.clientWidth),ft=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xt):(xt=window.innerWidth,ft=window.innerHeight,z=window.innerWidth),Bt){var ut=Bt.getBoundingClientRect();ut.left>0&&ut.left<=xt&&(Ct===void 0||!Ct)&&(document.dir==="rtl"?(at=xt-ut.width-ut.left,it=z<=480?10:30):(it=ut.left,at=z<=480?10:30),tt=it+at)}if(Bt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var dt=Bt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(tt=40,lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(tt=0,lt=40)}}return Bt&&((gt===void 0||!gt)&&vt>0&&vt+tt<xt?xt=vt:xt-=tt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(gt===void 0||!gt)&&(ft-=lt)),{width:xt,height:ft}}function ae(Bt,vt,gt,Et,Ct){if(Bt.isScreenshoGenerator)return 1;var St=Et!==void 0&&Et,Tt=Bt.noScaleMargin!=null&&Bt.noScaleMargin,mt=function(dt){return dt&&dt!=="false"},xt=mt(Bt.autoHeight),ft=he(vt,Bt.width,gt,xt,St&&window.GGBT_wsf_view||Tt,Ct),z=parseInt(ft.width),tt=Bt.width,at=Bt.height;if(tt===void 0){var it=vt.querySelector(".appletParameters");it&&(tt=it.offsetWidth,at=it.offsetHeight)}var lt=z/tt,ut=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 Et=1,Ct,St=!1;if(Bt.hasOwnProperty("allowUpscale")&&(St=Bt.allowUpscale),Bt.hasOwnProperty("scale")&&(Et=parseFloat(Bt.scale),(isNaN(Et)||Et===null||Et===0)&&(Et=1),Et>1&&(St=!0)),vt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(St=!0),!(Bt.hasOwnProperty("disableAutoScale")&&Bt.disableAutoScale))Ct=ae(Bt,vt,St,gt,Bt.scaleContainerClass);else return Et;return St&&(!Bt.hasOwnProperty("scale")||Et===1)?Ct:Math.min(Et,Ct)}function ot(Bt){var vt=Math.min(window.innerWidth,document.documentElement.clientWidth),gt=Math.min(window.innerHeight,document.documentElement.clientHeight),Et=Bt.getBoundingClientRect(),Ct=(vt-Et.width)/2,St=(gt-Et.height)/2;St<0&&(St=0),Bt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ct<40?Bt.style.left="40px":Bt.style.left=Ct+"px",Bt.style.top=St+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(St<40?Bt.style.top="40px":Bt.style.top=St+"px",Bt.style.left=Ct+"px")}function zt(Bt,vt){var gt=Bt.querySelector(".appletParameters");if(gt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!==gt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Bt)}if(gt.parentElement&&/fullscreen/.test(gt.parentElement.className))return;var Et=Re(vt,Bt);mn()&>.setAttribute("data-param-scale",Et);for(var Ct=null,St=0;St<Bt.childNodes.length;St++)if(Bt.childNodes[St].className!==void 0&&Bt.childNodes[St].className.match(/^applet_scaler/)){Ct=Bt.childNodes[St];break}if(Ct!==null&&Ct.querySelector(".noscale")!==null)return;var Tt=vt.id!==void 0?vt.id:"ggbApplet",mt=window[Tt];(mt==null||!mt.recalculateEnvironments)&&Ct!==null&&!Ct.className.match(/fullscreen/)&&(Ct.parentNode.style.transform="",!isNaN(Et)&&Et!==1?(Ct.parentNode.style.width=vt.width*Et+"px",Ct.parentNode.style.height=vt.height*Et+"px",gn(Ct,Et)):(gn(Ct,1),Ct.parentNode.style.width=vt.width+"px",Ct.parentNode.style.height=vt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ot(Bt),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(gt).parents(".content-added-content"))}}return{responsiveResize:zt,isFlexibleWorksheetEditor:mn,positionCenter:ot,getScale:Re,scaleElement:gn}}();__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 mn=n.location.search;return mn.indexOf(J)!=-1||mn.indexOf(K)!=-1}function q(mn,gn){}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(mn){var gn=s[L].bindings;s[L].bindings=function(){for(var he=gn?gn():{},ae=mn[webModule.__softPermutationId],Re=O;Re<ae.length;Re++){var ot=ae[Re];he[ot[O]]=ot[P]}return he}};var t;function u(){return v(),t}function v(){if(!t){var mn=o.createElement(Q);if(mn.id=L,mn.style.cssText=R+S,mn.tabIndex=-1,o.body.appendChild(mn),t=mn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var gn=document.compatMode==U?V:W;t.write(gn+X),t.close()}}}function w(mn){function gn(ae){function Re(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ot=Re();if(ot){ae();return}function zt(){if(!ot){if(!Re())return;ot=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,zt,!1),Bt&&clearInterval(Bt)}}o.addEventListener&&o.addEventListener(Z,zt,!1);var Bt=setInterval(function(){zt()},$)}function he(ae){var Re=u(),ot=Re.body,zt=Re.createElement(_);zt.language=ab,zt.crossOrigin=W,zt.src=ae,webModule.__errFn&&(zt.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),ot.appendChild(zt)}gn(function(){he(mn)})}webModule.__startLoadingFragment=function(mn){return C(mn)},webModule.__installRunAsyncCode=function(mn){var gn=u(),he=gn.body,ae=gn.createElement(_);ae.language=ab,ae.text=mn,he.appendChild(ae),he.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(mn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(mn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(mn){var gn=c[mn];return gn==null?null:gn},r=d,webModule.__errFn=e}function B(){function mn(Bt){var vt=Bt.lastIndexOf(rb);vt==-1&&(vt=Bt.length);var gt=Bt.indexOf(sb);gt==-1&&(gt=Bt.length);var Et=Bt.lastIndexOf(tb,Math.min(gt,vt));return Et>=O?Bt.substring(O,Et+P):W}function gn(Bt){if(!Bt.match(/^\w+:\/\//)){var vt=o.createElement(ub);vt.src=Bt+vb,Bt=mn(vt.src)}return Bt}function he(){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 mn(Bt[vt].src);return W}function Re(){var Bt=o.getElementsByTagName(yb);return Bt.length>O?Bt[Bt.length-P].href:W}function ot(){var Bt=o.location;return Bt.href==Bt.protocol+zb+Bt.host+Bt.pathname+Bt.search+Bt.hash}var zt=he();return zt==W&&(zt=ae()),zt==W&&(zt=Re()),zt==W&&ot()&&(zt=mn(o.location.href)),zt=gn(zt),zt}function C(mn){return mn.match(/^\//)||mn.match(/^[a-zA-Z]+:\/\//)?mn:webModule.__moduleBase+mn}function D(){var mn=[],gn=O,he=[],ae=[];function Re(Bt){var vt=ae[Bt](),gt=he[Bt];if(vt in gt)return vt;var Et=[];for(var Ct in gt)Et[gt[Ct]]=Ct;throw r&&r(Bt,Et,vt),null}if(__gwt_isKnownPropertyValue=function(Bt,vt){return vt in he[Bt]},webModule.__getPropMap=function(){var Bt={};for(var vt in he)he.hasOwnProperty(vt)&&(Bt[vt]=Re(vt));return Bt},webModule.__computePropValue=Re,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ot;try{ot=Cb;var zt=ot.indexOf(Db);zt!=-1&&(gn=parseInt(ot.substring(zt+P),$),ot=ot.substring(O,zt))}catch(Bt){}return webModule.__softPermutationId=gn,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})()},77903:function(mn,gn,he){"use strict";he.d(gn,{Ax:function(){return zt},Ds:function(){return Bt},KI:function(){return gt},SI:function(){return ot},f1:function(){return Re}});var ae=he(3294);function Re(Et){let Ct=!0;if(Et.length>0){for(let St=0;St<Et.length;St++)if(Et[St].compile_success==0||!Et[St].compile_success){Ct=!1;break}}else Ct=!1;return Ct}function ot(Et,Ct=""){let St=[];for(let Tt=0;Tt<Et.length;Tt++){let mt=Et[Tt],xt=Ct?`${Ct}/${mt.name}`:`${mt.name}`;St.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:xt})}return St}function zt(Et,Ct,St){for(let Tt=0;Tt<Et.length;Tt++){let mt=Et[Tt];if(mt.key===Ct){mt.children=St;break}mt.children&&zt(mt.children,Ct,St)}return Et}function Bt(Et,Ct,St){let Tt;return function(){let mt=this,xt=arguments,ft=function(){Tt=null,St||Et.apply(mt,xt)},z=St&&!Tt;clearTimeout(Tt),Tt=setTimeout(ft,Ct),z&&Et.apply(mt,xt)}}const vt=!0,gt=ae.Z.API_SERVER},73524:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return Tt}});var ae=he(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ot=he(92310),zt=he.n(ot),Bt=he(29787),vt=he(2859),gt=he(99064),Et=he(955),Ct=(mt,xt,ft)=>new Promise((z,tt)=>{var at=ut=>{try{lt(ft.next(ut))}catch(dt){tt(dt)}},it=ut=>{try{lt(ft.throw(ut))}catch(dt){tt(dt)}},lt=ut=>ut.done?z(ut.value):Promise.resolve(ut.value).then(at,it);lt((ft=ft.apply(mt,xt)).next())}),Tt=({data:mt,className:xt,fullWidth:ft,style:z={},onClose:tt,onOk:at,showFullTools:it,noAssociationId:lt})=>{const ut=(0,ae.useRef)(null),dt=(0,ae.useRef)(null),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=()=>Ct(void 0,null,function*(){Ft(!0),Nt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Vt=yield(0,Et.ZJ)(mt==null?void 0:mt.src);ut.current.src="",ut.current.src=Vt,ut.current.onload=function(){Ut()},Ft(!1),Nt("")}),Ht=Vt=>Ct(void 0,null,function*(){Ft(!0),Nt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const oe=yield(0,gt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:mt.title,file:Vt.dataUrl}});oe!=null&&oe.id&&!lt?(yield(0,gt.ZP)(`/api/attachments/${mt.id}/add_subitem.json`,{method:"post",body:{subitem_id:oe==null?void 0:oe.id,settings:JSON.stringify(Vt.state)}})).status===0&&at():oe!=null&&oe.id&&at(oe),Ft(!1),Nt("")}),Yt=()=>{const Vt=document.querySelector('a[href="https://markerjs.com/"]');Vt&&Vt.parentNode&&(Vt.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(se=>{const de=document.querySelector(se.name);de&&de.setAttribute("title",se.title)})},Ut=()=>{dt.current=new vt.hP(ut.current),dt.current.targetRoot=At.current,dt.current.addEventListener("render",Ht),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),Yt()},300)};return ae.createElement(ae.Fragment,null,(mt==null?void 0:mt.visible)&&ae.createElement(Bt.Z,{spinning:Dt,tip:jt,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:At,className:zt()(Re.imageDimensions,xt,ft?Re.fullWidth:""),style:z},ae.createElement("img",{className:Re.img,ref:ut}))))}},68664:function(mn,gn,he){"use strict";he.d(gn,{N:function(){return tt}});var ae=he(59301),Re=he(82326),ot=he(62957),zt=he(37568),Bt=he(6767),vt=he(77019),gt=he(5269),Et=he(99064),Ct={wrap:"wrap___F7E3F",selectWrapper:"selectWrapper____kESB",tips:"tips___aHjQY",linkBtn:"linkBtn___uggVr",mainText:"mainText____S1I0",public_tips:"public_tips___sZVWd",inputCss:"inputCss___t66EO",bt:"bt___lXptu",add_style:"add_style___knrMF"},St=he(92310),Tt=he.n(St),mt=he(87169),xt=he(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,Ht]=(0,ae.useState)([]);it=it||[];const Yt=(Vt,oe)=>{Vt?(Ht([...oe]),Dt([...oe])):(Ht([]),Dt([]))};(0,ae.useEffect)(()=>{(lt==null?void 0:lt.length)>0?(Ht([...lt]),Dt([...lt])):(Ht([]),Dt([]))},[dt]),(0,ae.useEffect)(()=>{(it==null?void 0:it.length)>0&&Dt([...it])},[dt]);const Ut=Vt=>{Vt.preventDefault(),Nt.current="",ot.default.confirm({centered:!0,width:585,zIndex:jt,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:xt.createElement("div",{className:"font14"},xt.createElement("div",{className:Ct.public_tips},xt.createElement(mt.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("div",{style:{width:"95px"}},xt.createElement("span",{className:Ct.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),xt.createElement(zt.default,{className:Ct.inputCss,style:{width:"calc(100% - 95px)"},maxLength:20,size:"middle",showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:Nt.current,onChange:oe=>{Nt.current=oe.target.value}}))),onOk:()=>new Promise((oe,se)=>ft(void 0,null,function*(){if(!Nt.current)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),se();if(Nt.current.length>20)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),se();const de=yield(0,Et.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Nt.current,sub_discipline_id:at}});if((de==null?void 0:de.status)===0){Ft({id:de.tag_discipline_id,name:Nt.current,type:"personal"});let Se=lt||[];Se.push(de.tag_discipline_id),Dt([...Se]),Ht([...Se]),Dt([...Se])}return oe()}))})};return xt.createElement(vt.Z,{wrap:!1,align:"middle",className:Tt()(Ct.wrap,Pt)},xt.createElement(gt.Z,null,xt.createElement(Re.default,{mode:"multiple",disabled:!at||ut,className:Ct.selectWrapper,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9\uFF0C\u652F\u6301\u9009\u62E9\u591A\u4E2A",onChange:Yt,style:{width:At||490},showSearch:!0,allowClear:!0,value:Gt,filterOption:(Vt,oe)=>oe.label.indexOf(Vt.toLowerCase())>=0},dt==null?void 0:dt.map(Vt=>xt.createElement(z,{key:Vt.id,value:Vt.id,label:Vt.name},xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Vt.name),(Vt==null?void 0:Vt.type)==="personal"&&xt.createElement("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"}},"\u81EA\u7528")))))),at&&xt.createElement(gt.Z,{className:`ml20 ${At&&Ct.add_style}`},xt.createElement("span",{className:Ct.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),xt.createElement("span",{className:Ct.linkBtn,onClick:Ut},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},41588:function(mn,gn,he){"use strict";var ae=he(59301),Re=he(77019),ot=he(5269),zt=he(20554),Bt=he(99571),vt=he(85149),gt=he(88010),Et=he(48136),Ct=he(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:Ct.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},tt.map((dt,Pt)=>Ct.createElement(ot.Z,{flex:"110px",className:gt.Z.item},Ct.createElement("div",null,Ct.createElement(vt.Z,{value:`$$${dt.value}$$`}),dt.name),Ct.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>Ct.createElement("div",{key:Dt},Ct.createElement("h1",null,At.name),Ct.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>Ct.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},Ct.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ct.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},at.map((dt,Pt)=>Ct.createElement(ot.Z,{flex:"110px",className:gt.Z.item},Ct.createElement("div",null,Ct.createElement(vt.Z,{value:"`$$"+dt.value+"$$`"}),dt.name),Ct.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>Ct.createElement("div",{key:Dt},At.name&&Ct.createElement("h1",null,At.name),Ct.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>Ct.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},Ct.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))}],ut=()=>{var dt=document.createElement("div");dt.innerHTML=z.current.getValue();var Pt=dt.innerText;return Tt&&Tt(Pt),Pt};return(0,ae.useImperativeHandle)(ft,()=>({getData:ut})),Ct.createElement("div",{className:gt.Z.mathWrap},Ct.createElement(zt.default,{defaultActiveKey:"1",items:lt}),Ct.createElement("math-field",{locale:"zh_cn",className:gt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},xt||""),mt&&Ct.createElement("div",{className:gt.Z.button},Ct.createElement(Bt.ZP,{size:"large",onClick:ut,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});gn.Z=St},8797:function(mn,gn,he){"use strict";var ae=he(59301),Re=he(93314),ot=he(99571),zt=Object.defineProperty,Bt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,St=(ft,z,tt)=>z in ft?zt(ft,z,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ft[z]=tt,Tt=(ft,z)=>{for(var tt in z||(z={}))Et.call(z,tt)&&St(ft,tt,z[tt]);if(gt)for(var tt of gt(z))Ct.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);gn.Z=xt},23210:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ut}});var ae=he(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ot=he(99571),zt=he(70557),Bt=he(23954),vt=he(25399),gt=he(955),Et=he(94941),Ct=he(8797),St=he(3294),Tt=he(19381),mt=he(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=Ht=>{try{Gt(At.next(Ht))}catch(Yt){Ft(Yt)}},Nt=Ht=>{try{Gt(At.throw(Ht))}catch(Yt){Ft(Yt)}},Gt=Ht=>Ht.done?Dt(Ht.value):Promise.resolve(Ht.value).then(jt,Nt);Gt((At=At.apply(dt,Pt)).next())}),ut=({editOffice:dt="view",data:Pt,theme:At,type:Dt,filename:Ft,monacoEditor:jt,className:Nt,style:Gt,close:Ht,onClose:Yt,hasMask:Ut,disabledDownload:Vt,onImgDimensions:oe,showNodata:se,recordInfo:de})=>{const[Se,Qt]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ne,ye]=(0,ae.useState)(""),[we,be]=(0,ae.useState)(),fe=window.ENV==="build"?"/react/build":"",pe=location.host.startsWith("localhost")?St.Z.PROXY_SERVER:St.Z.API_SERVER,Ce=10*(1024*1024),ve=(0,ae.useRef)();Pt!=null&&Pt.startsWith("/api")&&Dt!=="txt"&&(Pt=St.Z.API_SERVER+Pt);const Fe=Kt=>Kt.substring(Kt.lastIndexOf("/")+1).split(".").pop();Ft&&jt&&(jt.filename=Ft),(0,ae.useEffect)(()=>{var Kt,wt;const Lt=(wt=(Kt=document.cookie)==null?void 0:Kt.replace(/\s/g,""))==null?void 0:wt.split(";");Lt==null||Lt.map(Xt=>{let re=Xt.split("=");re[0]==="_educoder_session"&&ye(re[1])})},[]),(0,ae.useEffect)(()=>{Dt==="office"&&(Pt.indexOf("bigfilescdn.")>-1||Pt.indexOf("bigfiles1")>-1?be({url:Pt,fileType:Fe(Pt),model:Pt.indexOf("model=edit")?"edit":"view"}):ge())},[Dt,Pt]);const ge=()=>lt(void 0,null,function*(){console.log("data:",Pt);let Kt=Pt;Pt.startsWith("http")||(Kt=location.origin+Kt);let wt=new URL(Kt).pathname.split("/").pop();const Lt=yield(0,Et.gJ)({attachment_id:wt});Lt.url=pe+Lt.url,be(Lt)}),xe=()=>{if(Pt.startsWith("http")||Pt.startsWith("blob:")){ee();return}(0,gt.Sv)(Ft||"educoder",Pt,Ft)},ee=()=>{de&&(0,Tt.fc)({id:de==null?void 0:de.id,watch_type:1,course_id:de==null?void 0:de.course_id}),(0,gt.Nd)(Ft||"educoder",decodeURIComponent(Pt))};return mt.createElement("div",{style:it({},Gt||{}),className:`${Ut&&Re.bgBlack} ${Dt?Re.wrp:"hide"}`},Ht&&mt.createElement("div",{className:Re.close,ref:ve},!!oe&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},mt.createElement("span",{onClick:()=>{Yt(),oe()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!Vt&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},mt.createElement("span",{onClick:ee},mt.createElement("i",{className:"icon-quxiaozhiding"}))),mt.createElement(vt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},mt.createElement("span",{className:"",onClick:Yt},mt.createElement("i",{className:"icon-guanbi1"})))),mt.createElement("div",{className:`${Re[Nt]} ${Nt} ${Re.monaco} ${Dt==="txt"?"show":"hide"}`},Dt==="txt"&&mt.createElement(mt.Fragment,null,mt.createElement(Bt.ZP,it({},jt)))),Dt==="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}),Dt==="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})),Dt==="office"&&we&&mt.createElement("iframe",{src:`${fe}/office.html?key=${we.key}&url=${btoa(we.url)}&callbackUrl=${pe+(we.callbackUrl||"")}&fileType=${we.fileType}&title=${we.title||""}&model=${dt}&officeServer=${St.Z.ONLYOFFICE}&disabledDownload=${!!Vt}`}),Dt==="html"&&mt.createElement("iframe",{src:Pt+"&disposition=inline"}),Dt==="pdf"&&mt.createElement("iframe",{src:`${fe}/js/pdfview/index.html?filename=${Ft||"educoder.pdf"}&url=${encodeURIComponent(Pt)}&disabledDownload=${!!Vt}`}),Dt==="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}`}),(Dt==="other"||Dt==="download")&&mt.createElement(mt.Fragment,null,se?mt.createElement(Ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:mt.createElement(ot.ZP,{icon:mt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:xe,disabled:Vt},"\u4E0B\u8F7D")}):mt.createElement(ot.ZP,{type:"primary",size:"middle",onClick:xe,disabled:Vt},mt.createElement(zt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},41984:function(mn,gn,he){"use strict";he.d(gn,{h:function(){return z},x:function(){return tt}});var ae=he(12290),Re=he(43809),ot=he(85149),zt=he(59301),Bt=Object.defineProperty,vt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,Ct=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={}))Ct.call(it,lt)&&Tt(at,lt,it[lt]);if(Et)for(var lt of Et(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)Ct.call(at,ut)&&it.indexOf(ut)<0&&(lt[ut]=at[ut]);if(at!=null&&Et)for(var ut of Et(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 zt.createElement("div",{id:dt||""},zt.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?zt.createElement(ae.Z,{watch:At,isFocus:!0,height:ut||void 0,placeholder:lt,defaultValue:at,onChange:it,miniToolbar:Pt}):zt.createElement("div",{style:{cursor:"pointer"}},at?zt.createElement(ot.Z,{className:Re.Z.inputBorder,value:at}):zt.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},lt))},85149:function(mn,gn,he){"use strict";he.d(gn,{z:function(){return Dt},Z:function(){return Ft}});var ae=he(59301),Re=he(50304),ot=he(24768),zt=he(64018),Bt=he(79710),vt=he(3294),gt=he(955),Et=he(15342),Ct=he(1012),St=he(23210),Tt=he(59301),xt=({html:jt})=>{const Nt=(0,ae.useRef)(null),Gt=(0,ae.useRef)(null),Ht=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 36px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,ae.useEffect)(()=>{const Yt=Nt.current.attachShadow({mode:"open"});Gt.current=document.createElement("div"),Gt.current.className="markdown-body",Gt.current.innerHTML=jt,Yt.appendChild(Gt.current);const Ut=document.createElement("style");return Ut.textContent=Ht,Yt.appendChild(Ut),()=>{Yt.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Gt.current&&(Gt.current.innerHTML=jt)},[jt]),Tt.createElement("div",{ref:Nt})},ft=Object.defineProperty,z=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,it=(jt,Nt,Gt)=>Nt in jt?ft(jt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):jt[Nt]=Gt,lt=(jt,Nt)=>{for(var Gt in Nt||(Nt={}))tt.call(Nt,Gt)&&it(jt,Gt,Nt[Gt]);if(z)for(var Gt of z(Nt))at.call(Nt,Gt)&&it(jt,Gt,Nt[Gt]);return jt};const ut="@\u2581\u2581@",dt="@\u2581@",Pt=/<pre[^>]*>/g;function At(jt){let Nt=document.createElement("div");return Nt.innerHTML=jt,Nt.childNodes.length===0?"":Nt.childNodes[0].nodeValue}const Dt=(jt,Nt)=>{jt=jt||"";const Gt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ht=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Yt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ut=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Nt?jt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Gt,(Vt,oe,se,de,Se,Qt,ne)=>{const ye=oe||de||Qt,we=se||Se||ne||"?";return vt.Z.API_SERVER+"/api/attachments/"+ye+we+"&t="+(0,gt.Jn)(ye,Date.now())+(Vt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(jt=jt.replace(Ut,(Vt,oe,se,de,Se,Qt,ne)=>{const ye=oe||de||Qt,we=se||Se||ne||"?";return vt.Z.API_SERVER+"/attachments/download/"+ye+we+"&t="+(0,gt.Jn)(ye,Date.now())+(Vt.indexOf(")")>-1?")":"&")}).replace(Gt,(Vt,oe,se,de,Se,Qt,ne)=>{const ye=oe||de||Qt,we=se||Se||ne||"?";return vt.Z.API_SERVER+"/api/attachments/"+ye+we+"&t="+(0,gt.Jn)(ye,Date.now())+(Vt.indexOf(")")>-1?")":"&")}).replace(Ht,(Vt,oe,se,de,Se)=>{const Qt=oe||de,ne=se||Se||"";return'"'+vt.Z.API_SERVER+"/api/attachments/"+Qt+ne+Qt+ne+"&t="+(0,gt.Jn)(Qt,Date.now())}).replace(Yt,(Vt,oe,se,de,Se)=>{const Qt=oe||de,ne=se||Se||"";return"("+vt.Z.API_SERVER+"/files/uploads/"+Qt+ne+Qt+ne+"&t="+(0,gt.Jn)(Qt,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,`
|
|
`),jt)};var Ft=({value:jt="",className:Nt,showTextOnly:Gt,showLines:Ht,style:Yt={},stylesPrev:Ut={},highlightKeywords:Vt,showProgramFill:oe,isProgramFill:se,disabledFill:de=!1,programFillValue:Se,onFillChange:Qt=we=>{},onFillBlur:ne=()=>{},onFillFocus:ye=()=>{}})=>{let we=String(jt);const[be,fe]=(0,ae.useState)(""),[pe,ce]=(0,ae.useState)("office"),[Ce,ve]=(0,ae.useState)([]),Fe=(0,ae.useRef)("a"+(0,Ct.Z)()),ge={},xe=(le,Ae,Le)=>{const Be=document.createElement(le===dt?"input":"textarea");Be.style.width="100%",Be.style.height=le===dt?"40px":"151px",Be.rows=5,Be.spellcheck=!1,Be.name="edu-program-fill",Be.placeholder="\u8BF7\u8F93\u5165",Be.dataset.id=Ae;const tn=Object.keys(ge).length;return ge[tn]=Be,`<span class="edu-program-fill-wrap ${le===dt?"":"show"}" style="width:${le===dt?"400px":"100%"}" title=${Le||""}><span>${Be.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ee(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 Kt=le=>le.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ae,Le){let Be=Le.replace(/(\n|\r)/g,"").split("}"),tn=[];return Be.map($e=>{$e!=""&&tn.push(`.${Fe.current} ${$e}`)}),`<style>${tn.join("}")}</style>`}),wt=(0,ae.useMemo)(()=>{try{const Be=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,tn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Qe=/\(\/attachments\/download\//g;we=we.replace(Qe,"("+vt.Z.API_SERVER+"/attachments/download/").replace(Be,"("+vt.Z.API_SERVER+"/api/attachments/").replace(tn,'"'+vt.Z.API_SERVER+"/api/attachments/").replace($e,'"'+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(Be){}if(oe){let Be=-1;return we=we.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(tn,$e,Qe){var Ze;return++Be,xe(tn,Be,(Ze=Se==null?void 0:Se[Be])==null?void 0:Ze.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Kt(we||"")}</pre>`}let le=Kt(we);le=(0,ot.ZP)(le);const Ae=(0,ot.ez)();we.match(/\[TOC\]/)&&(le=le.replace("<p>[TOC]</p>",(0,ot.Qv)()),(0,ot.Iy)()),le=le.replace(/(__special_katext_id_\d+__)/g,(Be,tn)=>{const{type:$e,expression:Qe}=Ae[tn];return(0,Et.renderToString)(At(Qe)||"",{displayMode:$e==="block",throwOnError:!1,output:"html"})}),le=le.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ot.AL)();const Le=document.createElement("div");if(Le.innerHTML=le,Gt)return Le.innerText;if(Vt){const Be=Vt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return It(Le,Be),Le.innerHTML}return setTimeout(()=>te(),500),Le.innerHTML},[we,Vt]);(0,ae.useEffect)(()=>{Rt.current&&Rt.current.querySelectorAll(["input","textarea"]).forEach(Ae=>{Ae.oninput=Lt,Ae.onblur=Xt,Ae.onfocus=re})},[Ce]),(0,ae.useEffect)(()=>{var le,Ae,Le,Be,tn;if(Se!=null&&Se.length)try{const $e=Rt.current.querySelectorAll(".edu-program-fill-score"),Qe=Rt.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ze,Ge]of Qe.entries())Ge.value=((le=Se==null?void 0:Se[Ze])==null?void 0:le.value)||"",((Ae=Se==null?void 0:Se[Ze])==null?void 0:Ae.type)==="warning"?Ge.className="program-fill-warning":((Le=Se==null?void 0:Se[Ze])==null?void 0:Le.type)==="success"?Ge.className="program-fill-success":Ge.className="";for(const[Ze,Ge]of $e.entries())Ge.innerHTML=(Be=Se==null?void 0:Se[Ze])!=null&&Be.score?`${(tn=Se==null?void 0:Se[Ze])==null?void 0:tn.score}\u5206`:"";ve(Se)}catch($e){console.log($e,"error")}},[Se]);const Lt=le=>{Ce[le.target.dataset.id]=Ce[le.target.dataset.id]||{},Ce[le.target.dataset.id].value=le.target.value,ve([...Ce]),Qt(Ce,le.target.dataset.id)},Xt=le=>{Ce[le.target.dataset.id]=Ce[le.target.dataset.id]||{},Ce[le.target.dataset.id].value=le.target.value,ve([...Ce]),ne(Ce,le.target.dataset.id)},re=le=>{Ce[le.target.dataset.id]=Ce[le.target.dataset.id]||{},Ce[le.target.dataset.id].value=le.target.value,ve([...Ce]),ye(Ce,le.target.dataset.id)};function It(le,Ae){return le.childNodes.forEach(Le=>{var Be;if(Le.childNodes.length>0)It(Le,Ae);else if(Le.nodeName!=="IMG")if(Le.innerHTML)Le.innerHTML=(Be=Le.innerHTML)==null?void 0:Be.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const tn=document.createElement("span");tn.innerHTML=Le.textContent.replace(new RegExp(Ae,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Le.replaceWith(tn)}})}const Rt=(0,ae.useRef)();ot.jb.WebkitLineClamp=Ht,Ht&&(Yt=lt(lt({},Yt),ot.jb));function Wt(le){let Ae=le.target;if(Ae.tagName.toUpperCase()==="A"){let Le=Ae.getAttribute("href");if(Le.indexOf("office")>-1)le.preventDefault(),fe(Le),ce("office");else if(Le.indexOf("application/pdf")>-1)le.preventDefault(),fe(Le),ce("pdf");else if(Le.indexOf("text/html")>-1)le.preventDefault(),fe(Le),ce("html");else if(Le.startsWith("#")){le.preventDefault();let Be=document.getElementById(Le.replace("#",""));Be&&Be.scrollIntoView(!0)}}}const te=()=>{var le;const Ae=(le=Rt.current)==null?void 0:le.querySelectorAll("video");Ae==null||Ae.forEach(Le=>{if(Le.oncontextmenu=()=>!1,Le.src.indexOf(".m3u8")>-1&&!Le.canPlayType("application/vnd.apple.mpegurl")){if(Bt.ZP.isSupported()){var Be=new Bt.ZP;Be.loadSource(Le.src),Be.attachMedia(Le)}}})};(0,ae.useEffect)(()=>{if(Rt.current&&wt&&wt.match(Pt)&&window.PR.prettyPrint(),Rt.current)return Rt.current.addEventListener("click",Wt),()=>{var le;(le=Rt.current)==null||le.removeEventListener("click",Wt),(0,ot.AL)(),(0,ot.Iy)()}},[wt,Rt.current,Wt]),(0,ae.useEffect)(()=>{var le;const Ae=Le=>{Le.preventDefault(),Le.clipboardData.setData("text",window.getSelection().toString())};return(le=Rt.current)==null||le.addEventListener("copy",Ae),()=>{var Le;(Le=Rt.current)==null||Le.removeEventListener("copy",Ae)}},[Rt.current]);const ue=le=>/<style[\s\S]*?>/i.test(le||"");return ae.createElement(ae.Fragment,null,Gt&&ae.createElement("div",{ref:Rt},wt),!Gt&&!ue(wt)&&ae.createElement("div",{ref:Rt,style:lt({},Yt),className:`${Nt||""} ${de?"disabled-fill":""} markdown-body ${Fe.current}`,dangerouslySetInnerHTML:{__html:wt}}),!Gt&&ue(wt)&&ae.createElement(xt,{html:wt}),ae.createElement(St.Z,{close:!0,data:be,type:be!=null&&be.length?pe:"",style:lt({},Ut),onClose:()=>fe("")}))}},81939:function(mn,gn,he){"use strict";he.d(gn,{cT:function(){return jt},pe:function(){return At}});var ae=he(59301),Re=he(14566),ot=he(6767),zt=he(99064),Bt=he(28209),vt=he.n(Bt),gt=he(1012),Et=he(89070),Ct=he(47257),St=he.n(Ct),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(Gt,Ht,Yt)=>Ht in Gt?Tt(Gt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):Gt[Ht]=Yt,it=(Gt,Ht)=>{for(var Yt in Ht||(Ht={}))z.call(Ht,Yt)&&at(Gt,Yt,Ht[Yt]);if(ft)for(var Yt of ft(Ht))tt.call(Ht,Yt)&&at(Gt,Yt,Ht[Yt]);return Gt},lt=(Gt,Ht)=>mt(Gt,xt(Ht)),ut=(Gt,Ht)=>{var Yt={};for(var Ut in Gt)z.call(Gt,Ut)&&Ht.indexOf(Ut)<0&&(Yt[Ut]=Gt[Ut]);if(Gt!=null&&ft)for(var Ut of ft(Gt))Ht.indexOf(Ut)<0&&tt.call(Gt,Ut)&&(Yt[Ut]=Gt[Ut]);return Yt},dt=(Gt,Ht,Yt)=>new Promise((Ut,Vt)=>{var oe=Se=>{try{de(Yt.next(Se))}catch(Qt){Vt(Qt)}},se=Se=>{try{de(Yt.throw(Se))}catch(Qt){Vt(Qt)}},de=Se=>Se.done?Ut(Se.value):Promise.resolve(Se.value).then(oe,se);de((Yt=Yt.apply(Gt,Ht)).next())});const{Dragger:Pt}=Re.default,At=Gt=>{const Ht="bf3c199c2470cb477d907b1e0917c17b",Yt="5183666c72eec9e4";var Ut=vt().enc.Utf8.parse(Ht);let Vt=vt().enc.Utf8.parse(Yt);var oe=vt().AES.decrypt(Gt,Ut,{iv:Vt,mode:vt().mode.CBC});return oe.toString(vt().enc.Utf8)};let Dt;const Ft=Gt=>dt(void 0,[Gt],function*({identifier:Ht,oldFilename:Yt,newFilename:Ut}){var Vt,oe,se,de,Se,Qt;const ne=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});ne.data=JSON.parse(At(ne.data));const ye=new OSS({endpoint:(Vt=ne==null?void 0:ne.data)==null?void 0:Vt.end_point,region:(oe=ne==null?void 0:ne.data)==null?void 0:oe.region,accessKeyId:(se=ne==null?void 0:ne.data)==null?void 0:se.access_key_id,accessKeySecret:(de=ne==null?void 0:ne.data)==null?void 0:de.access_key_secret,bucket:(Se=ne==null?void 0:ne.data)==null?void 0:Se.bucket,stsToken:(Qt=ne==null?void 0:ne.data)==null?void 0:Qt.security_token});return new Promise((we,be)=>{console.log(11111,`${Ht}/${Yt}`,`${Ht}/${Ut}`,ne.data),ye.copy(`/${Ht}/${Yt}`,`/${Ht}/${Ut}`).then(fe=>{console.log("\u62F7\u8D1D\u6210\u529F",fe)}).catch(fe=>{console.log(fe)})})}),jt=(Gt,Ht,Yt)=>dt(void 0,null,function*(){var Ut,Vt,oe,se,de,Se;Ht.file_name=Gt.name;const Qt=yield(0,zt.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",At(Qt.data)),Qt.data=JSON.parse(At(Qt.data));const ne=Gt.name.split(".");ne.pop();const ye=Ht.realFileName?ne.join(""):(0,gt.Z)(),we=new(St())({endpoint:(Ut=Qt==null?void 0:Qt.data)==null?void 0:Ut.end_point,region:(Vt=Qt==null?void 0:Qt.data)==null?void 0:Vt.region,accessKeyId:(oe=Qt==null?void 0:Qt.data)==null?void 0:oe.access_key_id,accessKeySecret:(se=Qt==null?void 0:Qt.data)==null?void 0:se.access_key_secret,bucket:(de=Qt==null?void 0:Qt.data)==null?void 0:de.bucket,stsToken:(Se=Qt==null?void 0:Qt.data)==null?void 0:Se.security_token});return new Promise((be,fe)=>{var pe;we.multipartUpload(`${ye}`,new Blob([Gt],{type:Gt.type}),lt(it({timeout:200*1e3,partSize:102400},Yt),{callback:{url:(pe=Qt==null?void 0:Qt.data)==null?void 0:pe.callback_url,host:Qt==null?void 0:Qt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,zt.rz)(Ht)}})).then(function(ce){var Ce;Gt.response=(Ce=ce.data)==null?void 0:Ce.data,be(ce==null?void 0:ce.data)}).catch(function(ce){fe(ce),console.log("err:",ce)})})}),Nt=Gt=>{var Ht=Gt,{user:Yt,cancelUpload:Ut}=Ht,Vt=ut(Ht,["user","cancelUpload"]);const[oe,se]=(0,ae.useState)([]);let[de,Se]=(0,ae.useState)();const Qt={onRemove:ye=>{se([...oe.filter(we=>we.name!==ye.name)]),Vt.onChange(oe.filter(we=>we.name!==ye.name))},disabled:Vt.disabled,multiple:!0,fileList:oe==null?void 0:oe.map(ye=>ye.file),customRequest:()=>{},beforeUpload:ye=>dt(void 0,null,function*(){let we=Vt.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)>we?(ot.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${we/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(oe.push({name:ye.name,file:ye}),se([...oe]),Vt.onChange(oe),!1)})},ne=(ye,we)=>dt(void 0,null,function*(){var be,fe,pe,ce,Ce,ve;we.file_name=ye.name;const Fe=ye.name,ge=yield(0,zt.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",Vt.onChange(oe),ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}de=new(St())({endpoint:(be=ge==null?void 0:ge.data)==null?void 0:be.end_point,region:(fe=ge==null?void 0:ge.data)==null?void 0:fe.region,accessKeyId:(pe=ge==null?void 0:ge.data)==null?void 0:pe.access_key_id,accessKeySecret:(ce=ge==null?void 0:ge.data)==null?void 0:ce.access_key_secret,bucket:(Ce=ge==null?void 0:ge.data)==null?void 0:Ce.bucket,stsToken:(ve=ge==null?void 0:ge.data)==null?void 0:ve.security_token}),console.log(ye,"file"),Se(de);const xe=ye.name.split(".");xe.pop();const ee=Fe.indexOf(".")>-1?we.realFileName?xe.join("."):(0,gt.Z)():Fe;return new Promise((Kt,wt)=>{var Lt;try{de.multipartUpload(`${Vt.identifier}/${ee}${Fe.indexOf(".")>-1?"."+Fe.split(".").pop():""}`,new Blob([ye.file],{type:ye.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xt,re,It)=>{try{console.log("\u8FDB\u5EA6",Xt,re,It);const Rt=oe.findIndex(Wt=>Wt.name===Fe);oe[Rt].file.percent=Xt*100,oe[Rt].tempCheckpoint=re,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,zt.rz)(we)}}).then(function(Xt){var re,It,Rt;const Wt=oe.findIndex(ue=>ue.name===Fe);let te="done";if(((re=Xt.data)==null?void 0:re.status)===0){ye.response=(It=Xt.data)==null?void 0:It.data;const ue=oe.findIndex(le=>le.name===Fe);oe[ue].status="done",oe[ue].file.status="done"}else ot.ZP.warning((Rt=Xt.data)==null?void 0:Rt.message),te="error";oe[Wt].status=te,oe[Wt].file.status=te,Vt.onChange(oe),Kt(Xt==null?void 0:Xt.data)}).catch(function(Xt){oe[oe.findIndex(re=>re.name===Fe)].status="error",oe[oe.findIndex(re=>re.name===Fe)].file.status="error",ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),se([...oe]),Vt.onChange(oe),wt(Xt),console.log("err:",Xt)})}catch(Xt){}})});return(0,ae.useEffect)(()=>{oe.every(ye=>ye==="done"||ye==="error")&&Vt.onComplete(oe)},[oe]),(0,ae.useEffect)(()=>{Ut&&(de==null||de.cancel())},[Ut]),(0,ae.useEffect)(()=>{Vt.uploading&&oe.map(ye=>dt(void 0,null,function*(){var we;if((!ye.status||ye.status==="error")&&!Ut){ye.status="uploading",ye.file.status="uploading";const be=yield ne(ye,{login:(we=Yt==null?void 0:Yt.userInfo)==null?void 0:we.login,container_type:Vt.container_type,container_id:Vt.container_id,description:Vt.description,realFileName:Vt.realFileName})}}))},[Vt.uploading]),ae.createElement(Pt,lt(it({},Qt),{height:Vt.height,className:Vt.className}),ae.createElement("p",{className:"ant-upload-hint"},Vt.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};gn.ZP=(0,Et.connect)(({loading:Gt,globalSetting:Ht,user:Yt})=>({globalSetting:Ht,loading:Gt.models.competitions,user:Yt}))(Nt)},97692:function(mn,gn,he){"use strict";he.d(gn,{h:function(){return dt}});var ae=he(59301),Re=he(82326),ot=he(28284),zt=he(99571),Bt=he(89780),vt=he.n(Bt),gt=he(37036),Et=he(95625),Ct=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?Ct(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"]};gn.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(zt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(zt.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 Ht=function(Yt){const Ut=Yt.getValue();At&&At(Ut)};return Nt.on("change",Ht),()=>{Nt.off("change",Ht)}}},[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 Ht=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(Ht)}},[jt.current,Nt]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:jt}))}},12290:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return zn}});var ae=he(59301),Re=he(89780),ot=he.n(Re),zt=he(76374),Bt=he(37036),vt=he(6313),gt=he(25717),Et=he(99498),Ct=he(25419),St=he(67549),Tt=he(85149),mt=({value:Ye="",className:Ve,showTextOnly:He,showLines:Fn,style:On={}})=>{const Qn=(0,ae.useMemo)(()=>"",[Ye]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:Qn}}))},xt=he(59301),ft=Object.defineProperty,z=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ut=(Ye,Ve,He)=>Ve in Ye?ft(Ye,Ve,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ye[Ve]=He,dt=(Ye,Ve)=>{for(var He in Ve||(Ve={}))it.call(Ve,He)&&ut(Ye,He,Ve[He]);if(at)for(var He of at(Ve))lt.call(Ve,He)&&ut(Ye,He,Ve[He]);return Ye},Pt=(Ye,Ve)=>z(Ye,tt(Ve));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:Ve,icon:He,actionName:Fn,className:On="",children:Qn}){function yn(){Ye(Fn)}return xt.createElement("a",{title:Ve,className:On,onClick:yn},xt.createElement("i",{className:`${He}`}),Qn)}var Ft=({watch:Ye,showNullButton:Ve,showNullProgramButton:He,onActionCallback:Fn,fullScreen:On,insertTemp:Qn,hidetoolBar:yn,extraUse:Nn})=>{const en=[...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"},!yn&&en.map((Xe,Dn)=>xt.createElement("li",{key:Dn},Xe.actionName?xt.createElement(Dt,Pt(dt({},Xe),{onActionCallback:Fn})):xt.createElement("span",{className:"v-line"}))),Ve?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:Fn},xt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,He?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:Fn},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:Fn},xt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Qn&&xt.createElement("li",null,xt.createElement(Dt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Qn}`,onActionCallback:Fn},xt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Nn&&xt.createElement("li",null,Nn),xt.createElement("li",{className:"btn-full-screen"},xt.createElement(Dt,{icon:`${On?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:On?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Fn})))},jt=he(79346),Nt=he(28284),Gt=he(37568),Ht=he(99571),Yt=Object.defineProperty,Ut=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Se=(Ye,Ve,He)=>Ve in Ye?Yt(Ye,Ve,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ye[Ve]=He,Qt=(Ye,Ve)=>{for(var He in Ve||(Ve={}))se.call(Ve,He)&&Se(Ye,He,Ve[He]);if(oe)for(var He of oe(Ve))de.call(Ve,He)&&Se(Ye,He,Ve[He]);return Ye},ne=(Ye,Ve)=>Ut(Ye,Vt(Ve));const ye={labelCol:{span:4},wrapperCol:{span:20}};var we=({callback:Ye,onCancel:Ve})=>{function He(Fn){Ye(Fn)}return ae.createElement(Nt.default,ne(Qt({},ye),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:He,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(Ht.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Ht.ZP,{type:"ghost",onClick:Ve},"\u53D6\u6D88")))},be=he(97692),fe=he(28451),pe=he(62957),ce=he(77019),Ce=he(73524),ve=he(59301),Fe=({callback:Ye,onCancel:Ve})=>{const He=document.createElement("canvas"),Fn=He.getContext("2d");He.width=1e3,He.height=800,Fn.fillStyle="#ffffff",Fn.fillRect(0,0,He.width,He.height);const On=He.toDataURL("image/png");return ve.createElement(pe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},ve.createElement(ce.Z,{style:{height:"100vh"}},ve.createElement(Ce.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:On,visible:!0,title:String(Date.now())},onOk:Qn=>{Ye({src:Qn.url})},onClose:Ve})))},ge=he(12378);function xe(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(xe,go.CommandHandler),xe.prototype.canAlignSelection=function(){var Ye=this.diagram;return!(Ye===null||Ye.isReadOnly||Ye.isModelReadOnly||Ye.selection.count<2)},xe.prototype.alignLeft=function(){var Ye=this.diagram;Ye.startTransaction("aligning left");var Ve=1/0;Ye.selection.each(function(He){He instanceof go.Link||(Ve=Math.min(He.position.x,Ve))}),Ye.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(Ve,He.position.y))}),Ye.commitTransaction("aligning left")},xe.prototype.alignRight=function(){var Ye=this.diagram;Ye.startTransaction("aligning right");var Ve=-1/0;Ye.selection.each(function(He){if(!(He instanceof go.Link)){var Fn=He.actualBounds.x+He.actualBounds.width;Ve=Math.max(Fn,Ve)}}),Ye.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(Ve-He.actualBounds.width,He.position.y))}),Ye.commitTransaction("aligning right")},xe.prototype.alignTop=function(){var Ye=this.diagram;Ye.startTransaction("alignTop");var Ve=1/0;Ye.selection.each(function(He){He instanceof go.Link||(Ve=Math.min(He.position.y,Ve))}),Ye.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(He.position.x,Ve))}),Ye.commitTransaction("alignTop")},xe.prototype.alignBottom=function(){var Ye=this.diagram;Ye.startTransaction("aligning bottom");var Ve=-1/0;Ye.selection.each(function(He){if(!(He instanceof go.Link)){var Fn=He.actualBounds.y+He.actualBounds.height;Ve=Math.max(Fn,Ve)}}),Ye.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(He.actualBounds.x,Ve-He.actualBounds.height))}),Ye.commitTransaction("aligning bottom")},xe.prototype.alignCenterX=function(){var Ye=this.diagram,Ve=Ye.selection.first();if(Ve){Ye.startTransaction("aligning Center X");var He=Ve.actualBounds.x+Ve.actualBounds.width/2;Ye.selection.each(function(Fn){Fn instanceof go.Link||Fn.move(new go.Point(He-Fn.actualBounds.width/2,Fn.actualBounds.y))}),Ye.commitTransaction("aligning Center X")}},xe.prototype.alignCenterY=function(){var Ye=this.diagram,Ve=Ye.selection.first();if(Ve){Ye.startTransaction("aligning Center Y");var He=Ve.actualBounds.y+Ve.actualBounds.height/2;Ye.selection.each(function(Fn){Fn instanceof go.Link||Fn.move(new go.Point(Fn.actualBounds.x,He-Fn.actualBounds.height/2))}),Ye.commitTransaction("aligning Center Y")}},xe.prototype.alignColumn=function(Ye){var Ve=this.diagram;Ve.startTransaction("align Column"),Ye===void 0&&(Ye=0),Ye=parseFloat(Ye);var He=new Array;Ve.selection.each(function(Nn){Nn instanceof go.Link||He.push(Nn)});for(var Fn=0;Fn<He.length-1;Fn++){var On=He[Fn],Qn=On.actualBounds.y+On.actualBounds.height+Ye,yn=He[Fn+1];yn.move(new go.Point(On.actualBounds.x,Qn))}Ve.commitTransaction("align Column")},xe.prototype.alignRow=function(Ye){Ye===void 0&&(Ye=0),Ye=parseFloat(Ye);var Ve=this.diagram;Ve.startTransaction("align Row");var He=new Array;Ve.selection.each(function(Nn){Nn instanceof go.Link||He.push(Nn)});for(var Fn=0;Fn<He.length-1;Fn++){var On=He[Fn],Qn=On.actualBounds.x+On.actualBounds.width+Ye,yn=He[Fn+1];yn.move(new go.Point(Qn,On.actualBounds.y))}Ve.commitTransaction("align Row")},xe.prototype.canRotate=function(Ye){var Ve=this.diagram;return!(Ve===null||Ve.isReadOnly||Ve.isModelReadOnly||Ve.selection.count<1)},xe.prototype.rotate=function(Ye){Ye===void 0&&(Ye=90);var Ve=this.diagram;Ve.startTransaction("rotate "+Ye.toString());var Ve=this.diagram;Ve.selection.each(function(He){He instanceof go.Link||He instanceof go.Group||(He.angle+=Ye)}),Ve.commitTransaction("rotate "+Ye.toString())},xe.prototype.pullToFront=function(){var Ye=this.diagram;Ye.startTransaction("pullToFront");var Ve=new go.Map;Ye.selection.each(function(He){Ve.set(He.layer,0)}),Ve.iteratorKeys.each(function(He){var Fn=0;He.parts.each(function(On){if(!On.isSelected){var Qn=On.zOrder;isNaN(Qn)?On.zOrder=0:Fn=Math.max(Fn,Qn)}}),Ve.set(He,Fn)}),Ye.selection.each(function(He){xe._assignZOrder(He,Ve.get(He.layer)+1)}),Ye.commitTransaction("pullToFront")},xe.prototype.pushToBack=function(){var Ye=this.diagram;Ye.startTransaction("pushToBack");var Ve=new go.Map;Ye.selection.each(function(He){Ve.set(He.layer,0)}),Ve.iteratorKeys.each(function(He){var Fn=0;He.parts.each(function(On){if(!On.isSelected){var Qn=On.zOrder;isNaN(Qn)?On.zOrder=0:Fn=Math.min(Fn,Qn)}}),Ve.set(He,Fn)}),Ye.selection.each(function(He){xe._assignZOrder(He,Ve.get(He.layer)-1-xe._findGroupDepth(He))}),Ye.commitTransaction("pushToBack")},xe._assignZOrder=function(Ye,Ve,He){He===void 0&&(He=Ye),Ye.layer===He.layer&&(Ye.zOrder=Ve),Ye instanceof go.Group&&Ye.memberParts.each(function(Fn){xe._assignZOrder(Fn,Ve+1,He)})},xe._findGroupDepth=function(Ye){if(Ye instanceof go.Group){var Ve=0;return Ye.memberParts.each(function(He){Ve=Math.max(Ve,xe._findGroupDepth(He))}),Ve+1}else return 0},xe.prototype.doKeyDown=function(){var Ye=this.diagram;if(Ye!==null){var Ve=Ye.lastInput;if(Ve.key==="Up"||Ve.key==="Down"||Ve.key==="Left"||Ve.key==="Right"){var He=this.arrowKeyBehavior;if(He==="none")return;if(He==="select"){this._arrowKeySelect();return}else if(He==="move"){this._arrowKeyMove();return}else if(He==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},xe.prototype._getAllParts=function(){var Ye=new Array;return this.diagram.nodes.each(function(Ve){Ye.push(Ve)}),this.diagram.parts.each(function(Ve){Ye.push(Ve)}),Ye},xe.prototype._arrowKeyMove=function(){var Ye=this.diagram,Ve=Ye.lastInput,He=0,Fn=0;if(Ve.control||Ve.meta)He=1,Fn=1;else if(Ye.grid!==null){var On=Ye.grid.gridCellSize;Fn=On.width,He=On.height}Ye.startTransaction("arrowKeyMove"),Ye.selection.each(function(Qn){Ve.key==="Up"?Qn.move(new go.Point(Qn.actualBounds.x,Qn.actualBounds.y-He)):Ve.key==="Down"?Qn.move(new go.Point(Qn.actualBounds.x,Qn.actualBounds.y+He)):Ve.key==="Left"?Qn.move(new go.Point(Qn.actualBounds.x-Fn,Qn.actualBounds.y)):Ve.key==="Right"&&Qn.move(new go.Point(Qn.actualBounds.x+Fn,Qn.actualBounds.y))}),Ye.commitTransaction("arrowKeyMove")},xe.prototype._arrowKeySelect=function(){var Ye=this.diagram,Ve=Ye.lastInput,He=null;Ve.key==="Up"?He=this._findNearestPartTowards(270):Ve.key==="Down"?He=this._findNearestPartTowards(90):Ve.key==="Left"?He=this._findNearestPartTowards(180):Ve.key==="Right"&&(He=this._findNearestPartTowards(0)),He!==null&&(Ve.shift?He.isSelected=!0:Ve.control||Ve.meta?He.isSelected=!He.isSelected:Ye.select(He))},xe.prototype._findNearestPartTowards=function(Ye){var Ve=this.diagram.selection.first();if(Ve===null)return null;for(var He=Ve.actualBounds.center,Fn=this._getAllParts(),On=1/0,Qn=Ve,yn=0;yn<Fn.length;yn++){var Nn=Fn[yn];if(Nn!==Ve&&Nn.canSelect()){var en=Nn.actualBounds.center,Xe=He.directionPoint(en),Dn=this._angleCloseness(Xe,Ye);if(Dn<=45){var Oe=He.distanceSquaredPoint(en);Oe*=1+Math.sin(Dn*Math.PI/180),Oe<On&&(On=Oe,Qn=Nn)}}}return Qn},xe.prototype._angleCloseness=function(Ye,Ve){return Math.min(Math.abs(Ve-Ye),Math.min(Math.abs(Ve+360-Ye),Math.abs(Ve-360-Ye)))},xe.prototype._arrowKeyTree=function(){var Ye=this.diagram,Ve=Ye.selection.first();if(Ve instanceof go.Node){var He=Ye.lastInput;if(He.key==="Right"){if(!Ve.isTreeLeaf)if(!Ve.isTreeExpanded)Ye.commandHandler.canExpandTree(Ve)&&Ye.commandHandler.expandTree(Ve);else{var Fn=this._sortTreeChildrenByY(Ve).first();Fn!==null&&Ye.select(Fn)}}else if(He.key==="Left")if(!Ve.isTreeLeaf&&Ve.isTreeExpanded)Ye.commandHandler.canCollapseTree(Ve)&&Ye.commandHandler.collapseTree(Ve);else{var On=Ve.findTreeParentNode();On!==null&&Ye.select(On)}else if(He.key==="Up"){var On=Ve.findTreeParentNode();if(On!==null){var Qn=this._sortTreeChildrenByY(On),yn=Qn.indexOf(Ve);if(yn>0){for(var Nn=Qn.elt(yn-1);Nn!==null&&Nn.isTreeExpanded&&!Nn.isTreeLeaf;){var en=this._sortTreeChildrenByY(Nn);Nn=en.last()}Nn!==null&&Ye.select(Nn)}else Ye.select(On)}}else if(He.key==="Down")if(Ve.isTreeExpanded&&!Ve.isTreeLeaf){var Fn=this._sortTreeChildrenByY(Ve).first();Fn!==null&&Ye.select(Fn)}else for(;Ve!==null;){var On=Ve.findTreeParentNode();if(On===null)break;var Qn=this._sortTreeChildrenByY(On),yn=Qn.indexOf(Ve);if(yn<Qn.length-1){Ye.select(Qn.elt(yn+1));break}else Ve=On}var Xe=Ye.selection.first();Xe!==null&&Ye.scrollToRect(Xe.actualBounds)}},xe.prototype._sortTreeChildrenByY=function(Ye){var Ve=new go.List().addAll(Ye.findTreeChildrenNodes());return Ve.sort(function(He,Fn){var On=He.location,Qn=Fn.location;return On.y<Qn.y?-1:On.y>Qn.y?1:On.x<Qn.x?-1:On.x>Qn.x?1:0}),Ve},xe.prototype.copyToClipboard=function(Ye){go.CommandHandler.prototype.copyToClipboard.call(this,Ye),this._lastPasteOffset.set(this.pasteOffset)},xe.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(xe.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(xe.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 ee=xe,Kt=he(74413),wt=he(5269),Lt=he(99064),Xt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},re=he(24065),It=he(59301),Rt=(Ye,Ve,He)=>new Promise((Fn,On)=>{var Qn=en=>{try{Nn(He.next(en))}catch(Xe){On(Xe)}},yn=en=>{try{Nn(He.throw(en))}catch(Xe){On(Xe)}},Nn=en=>en.done?Fn(en.value):Promise.resolve(en.value).then(Qn,yn);Nn((He=He.apply(Ye,Ve)).next())});function Wt({onCancel:Ye,callback:Ve}){let He=(0,ae.useRef)(),Fn=(0,ae.useRef)(),On=(0,ae.useRef)(),Qn=(0,ae.useRef)(!1);const yn=(0,ae.useRef)(!1),[Nn,en]=(0,ae.useState)(0);function Xe(){const Oe=ge.bx.make,ln={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};He.current=new ge.S0(Fn.current,{padding:20,grid:Oe(ge.s_,"Grid",Oe(ge.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Oe(ge.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Rn=>{var nr=Rn.diagram.commandHandler.addTopLevelParts(Rn.diagram.selection,!0);nr||Rn.diagram.currentTool.doCancel()},commandHandler:Oe(ee),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Rn=>{var nr=Rn.subject;nr.location=nr.location.copy().snapToGridPoint(Rn.diagram.grid.gridOrigin,Rn.diagram.grid.gridCellSize),setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Rn=>{var nr=Rn.subject;setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Rn=>{var nr=Rn.parameter.part;nr.invalidateConnectedLinks();var fr=Rn.subject;Rn.diagram.toolManager.linkingTool.isForwards?fr.toNode.invalidateConnectedLinks():fr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),He.current.nodeTemplate=Oe(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),Oe(ge.bn,{name:"SHAPE",fill:ln.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")),Oe(ge.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Oe(ge.al,{margin:1,textAlign:"center",overflow:ge.al.OverflowEllipsis,editable:!0},new ge.KX("text").makeTwoWay(),new ge.KX("stroke","color"))),He.current.nodeTemplate.toolTip=Oe("ToolTip",Oe(ge.s_,"Vertical",{maxSize:new ge.$u(200,NaN)},Oe(ge.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ge.KX("text")),Oe(ge.al,{font:"10pt sans-serif",textAlign:"center"},new ge.KX("text","details"))));function En(Rn,nr){var fr=(lr,Pr)=>{lr.handled=!0,lr.diagram.model.commit(Xr=>{var zr=Pr.part.adornedPart,Kr=new ge.E9().setRectSpot(zr.actualBounds,Rn);Kr.subtract(zr.location),Kr.scale(2,2),Kr.x+=Math.sign(Kr.x)*130,Kr.y+=Math.sign(Kr.y)*130,Kr.add(zr.location),Kr.snapToGridPoint(lr.diagram.grid.gridOrigin,lr.diagram.grid.gridCellSize);var Yr=Xr.copyNodeData(zr.data);Xr.setGroupKeyForNodeData(Yr,Xr.getGroupKeyForNodeData(zr.data)),Xr.addNodeData(Yr);var wn={from:zr.key,to:Xr.getKeyForNodeData(Yr)};Xr.addLinkData(wn);var ci=lr.diagram.findNodeForData(Yr);ci.location=Kr,lr.diagram.select(ci),setTimeout(()=>{lr.diagram.commandHandler.editTextBlock()},20)})};return Oe(ge.bn,{figure:nr,alignment:Rn,alignmentFocus:Rn.opposite(),width:Rn.equals(ge.z6.Top)||Rn.equals(ge.z6.Bottom)?25:18,height:Rn.equals(ge.z6.Top)||Rn.equals(ge.z6.Bottom)?18:25,fill:"orange",stroke:ln.white,strokeWidth:4,mouseEnter:(lr,Pr)=>Pr.fill="dodgerblue",mouseLeave:(lr,Pr)=>Pr.fill="orange",isActionable:!0,click:fr,contextClick:fr})}function Gn(Rn){return Oe(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:(nr,fr)=>fr.fill="dodgerblue",mouseLeave:(nr,fr)=>fr.fill="orange",click:(nr,fr)=>{nr.diagram.commandHandler.showContextMenu(fr.part.adornedPart)}},Rn||{})}He.current.nodeTemplate.selectionAdornmentTemplate=Oe(ge.uz,"Spot",Oe(ge.Vm,{padding:10}),En(ge.z6.Top,"TriangleUp"),En(ge.z6.Left,"TriangleLeft"),En(ge.z6.Right,"TriangleRight"),En(ge.z6.Bottom,"TriangleDown"),Gn({alignment:new ge.z6(.75,0)}));function sn(Rn,nr){return(fr,lr)=>{fr.handled=!0,fr.diagram.model.commit(Pr=>{Pr.set(lr.part.adornedPart.data,Rn,nr)})}}function dn(Rn,nr){return nr||(nr="color"),Oe(ge.bn,{width:16,height:16,stroke:"lightgray",fill:Rn,margin:1,background:"transparent",mouseEnter:(fr,lr)=>lr.stroke="dodgerblue",mouseLeave:(fr,lr)=>lr.stroke="lightgray",click:sn(nr,Rn),contextClick:sn(nr,Rn)})}function An(){return[Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",dn(ln.white,"fill"),dn(ln.beige,"fill"),dn(ln.extralightblue,"fill"),dn(ln.extralightred,"fill"))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",dn(ln.lightgray,"fill"),dn(ln.lightgreen,"fill"),dn(ln.lightblue,"fill"),dn(ln.lightred,"fill")))]}function er(){return[Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",dn(ln.black),dn(ln.green),dn(ln.blue),dn(ln.red))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",dn(ln.white),dn(ln.magenta),dn(ln.purple),dn(ln.orange)))]}function ar(Rn,nr){return nr||(nr="thickness"),Oe(ge.bn,"LineH",{width:16,height:16,strokeWidth:Rn,margin:1,background:"transparent",mouseEnter:(fr,lr)=>lr.background="dodgerblue",mouseLeave:(fr,lr)=>lr.background="transparent",click:sn(nr,Rn),contextClick:sn(nr,Rn)})}function Xn(Rn,nr){return nr||(nr="dash"),Oe(ge.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Rn,margin:1,background:"transparent",mouseEnter:(fr,lr)=>lr.background="dodgerblue",mouseLeave:(fr,lr)=>lr.background="transparent",click:sn(nr,Rn),contextClick:sn(nr,Rn)})}function In(){return[Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",ar(1),ar(2),ar(3),ar(4))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",Xn(null),Xn([2,4]),Xn([4,4])))]}function Wn(Rn,nr){return nr||(nr="figure"),Oe(ge.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Rn,margin:1,background:"transparent",mouseEnter:(fr,lr)=>lr.fill="dodgerblue",mouseLeave:(fr,lr)=>lr.fill="lightgray",click:sn(nr,Rn),contextClick:sn(nr,Rn)})}He.current.nodeTemplate.contextMenu=Oe("ContextMenu",Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",Wn("Rectangle"),Wn("RoundedRectangle"),Wn("Ellipse"),Wn("Diamond"))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",Wn("Parallelogram2"),Wn("ManualOperation"),Wn("Procedure"),Wn("Cylinder1"))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",Wn("Terminator"),Wn("CreateRequest"),Wn("Document"),Wn("TriangleDown"))),An(),er(),In()),He.current.groupTemplate=Oe(ge.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ge.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Rn,nr)=>{var fr=nr.addMembers(nr.diagram.selection,!0);fr||nr.diagram.currentTool.doCancel()},avoidable:!1},new ge.KX("location","loc",ge.E9.parse).makeTwoWay(ge.E9.stringify),Oe(ge.s_,"Auto",{name:"BODY"},Oe(ge.bn,{parameter1:10,fill:ln.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")),Oe(ge.Vm,{background:"transparent",margin:20})),Oe(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"))),He.current.groupTemplate.selectionAdornmentTemplate=Oe(ge.uz,"Spot",Oe(ge.s_,"Auto",Oe(ge.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Oe(ge.Vm,{margin:1.5})),Gn({alignment:ge.z6.TopRight,alignmentFocus:ge.z6.BottomRight})),He.current.groupTemplate.contextMenu=Oe("ContextMenu",An(),er(),In()),He.current.linkTemplate=Oe(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",Rn=>Rn>=1?10:0),new ge.KX("toShortLength","dir",Rn=>Rn>=1?10:0),new ge.KX("points").makeTwoWay(),Oe(ge.bn,{strokeWidth:2},new ge.KX("stroke","color"),new ge.KX("strokeWidth","thickness"),new ge.KX("strokeDashArray","dash")),Oe(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",Rn=>Rn===1)),Oe(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",Rn=>Rn>=1),new ge.KX("width","thickness",Rn=>7+3*Rn),new ge.KX("height","thickness",Rn=>7+3*Rn),new ge.KX("segmentOffset","thickness",Rn=>new ge.E9(-15,4+1.5*Rn))),Oe(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",Rn=>Rn===2),new ge.KX("width","thickness",Rn=>7+3*Rn),new ge.KX("height","thickness",Rn=>7+3*Rn),new ge.KX("segmentOffset","thickness",Rn=>new ge.E9(-15,4+1.5*Rn))),Oe(ge.al,{alignmentFocus:new ge.z6(0,1,-4,0),editable:!0},new ge.KX("text").makeTwoWay(),new ge.KX("stroke","color"))),He.current.linkTemplate.selectionAdornmentTemplate=Oe(ge.uz,Oe(ge.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:rr(2)},new ge.KX("pathPattern","thickness",rr)),Gn({alignmentFocus:new ge.z6(0,0,-6,-4)}));function rr(Rn){return Oe(ge.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Rn+4).toString()+" H3"})}function sr(Rn){var nr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Rn===0?nr="M0 0 M16 16 M0 8 L16 8":Rn===2&&(nr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Oe(ge.bn,{geometryString:nr,margin:2,background:"transparent",mouseEnter:(fr,lr)=>lr.background="dodgerblue",mouseLeave:(fr,lr)=>lr.background="transparent",click:sn("dir",Rn),contextClick:sn("dir",Rn)})}function mr(Rn){var nr=(fr,lr)=>{fr.handled=!0,fr.diagram.model.commit(Pr=>{var Xr=lr.part.adornedPart;Pr.set(Xr.data,Rn?"toSpot":"fromSpot",ge.z6.stringify(ge.z6.AllSides)),(Rn?Xr.toNode:Xr.fromNode).invalidateConnectedLinks()})};return Oe(ge.bn,{width:12,height:12,fill:"transparent",mouseEnter:(fr,lr)=>lr.background="dodgerblue",mouseLeave:(fr,lr)=>lr.background="transparent",click:nr,contextClick:nr})}function cn(Rn,nr){var fr=0,lr=ge.z6.RightSide;Rn.equals(ge.z6.Top)?(fr=270,lr=ge.z6.TopSide):Rn.equals(ge.z6.Left)?(fr=180,lr=ge.z6.LeftSide):Rn.equals(ge.z6.Bottom)&&(fr=90,lr=ge.z6.BottomSide),nr||(fr-=180);var Pr=(Xr,zr)=>{Xr.handled=!0,Xr.diagram.model.commit(Kr=>{var Yr=zr.part.adornedPart;Kr.set(Yr.data,nr?"toSpot":"fromSpot",ge.z6.stringify(lr)),(nr?Yr.toNode:Yr.fromNode).invalidateConnectedLinks()})};return Oe(ge.bn,{alignment:Rn,alignmentFocus:Rn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:fr,background:"transparent",mouseEnter:(Xr,zr)=>zr.background="dodgerblue",mouseLeave:(Xr,zr)=>zr.background="transparent",click:Pr,contextClick:Pr})}He.current.linkTemplate.contextMenu=Oe("ContextMenu",er(),In(),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",sr(0),sr(1),sr(2))),Oe("ContextMenuButton",Oe(ge.s_,"Horizontal",Oe(ge.s_,"Spot",mr(!1),cn(ge.z6.Top,!1),cn(ge.z6.Left,!1),cn(ge.z6.Right,!1),cn(ge.z6.Bottom,!1)),Oe(ge.s_,"Spot",{margin:new ge.Zt(0,0,0,2)},mr(!0),cn(ge.z6.Top,!0),cn(ge.z6.Left,!0),cn(ge.z6.Right,!0),cn(ge.z6.Bottom,!0)))));const Si=`{ "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 Rr=["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 pi(Rn){return console.log("shapeName:",Rn),Rr.indexOf(Rn)>=0}var an=new ge.YI(On.current,{maxSelectionCount:1,linkTemplate:Oe(ge.rU,{locationSpot:ge.z6.Center,selectionAdornmentTemplate:Oe(ge.uz,"Link",{locationSpot:ge.z6.Center},Oe(ge.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Oe(ge.bn,{toArrow:"Standard",stroke:null}))},{routing:ge.rU.AvoidsNodes,curve:ge.rU.JumpOver,corner:5,toShortLength:4},new ge.KX("points"),Oe(ge.bn,{isPanelMain:!0,strokeWidth:2}),Oe(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(Rn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Rn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return He.current.addDiagramListener("TextEdited",function(Rn){var nr;const fr=Rn.subject.part;var lr=(nr=document.activeElement)==null?void 0:nr.value;typeof lr=="string"&&lr.trim()===""&&He.current.model.commit(function(Pr){Pr.set(fr.data,"text","\u672A\u547D\u540D"),He.current.commandHandler.stopCommand()},"increment")}),an.nodeTemplate=Oe(ge.NB,"Auto",{locationSpot:ge.z6.Center},new ge.KX("location","location",ge.E9.parse).makeTwoWay(ge.E9.stringify),Oe(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")),Oe(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(()=>{He.current.grid=Oe(ge.s_,"Grid",Oe(ge.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Oe(ge.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),He.current.grid.visible=!0,He.current.grid.gridCellStroke="darkgray",He.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=He.current,He.current}const Dn=()=>Rt(this,null,function*(){var Oe,ln=He.current.makeImage();const En=yield(0,Lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:ln.src,file_data:JSON.stringify({login:(Oe=(0,re.eY)())==null?void 0:Oe.login,data:JSON.parse(He.current.model.toJson())})}});Ve({src:En.url})});return(0,ae.useEffect)(()=>(setTimeout(()=>{Xe()},500),en(Nn+1),()=>{He.current=null}),[]),It.createElement("div",{ref:yn,className:Qn.current?`${Xt.maxH60} body-overflow-initial`:"body-overflow-initial"},It.createElement(pe.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Nn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:It.createElement(ce.Z,null,It.createElement(wt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),It.createElement(wt.Z,{onClick:()=>{var Oe,ln,En=He.current.selection.first();if(Qn.current=!Qn.current,document.activeElement&&En){let Gn=(ln=(Oe=document.activeElement)==null?void 0:Oe.value)==null?void 0:ln.trim();typeof Gn=="string"&&He.current.model.commit(function(sn){sn.set(En.data,"text",Gn||"\u672A\u547D\u540D"),He.current.commandHandler.stopCommand()},"increment")}en(Nn+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"},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:On})),It.createElement("div",{style:{flex:1,position:"relative"}},It.createElement("div",{ref:Fn,style:{height:"80vh"}}))),It.createElement("div",{className:"tr"},It.createElement(Ht.ZP,{size:"large",onClick:Dn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var te=Wt,ue=he(47889),le=he(71051);const Ae=ue.ZP.Group,Le={margin:"0 8px"};var Be=({callback:Ye,onCancel:Ve})=>{function He(Fn){Ye(Fn)}return ae.createElement(Nt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:He},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Le},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Le},"\u884C\u6570"),ae.createElement(Nt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(le.Z,null)),ae.createElement("span",{style:Le},"\u5217\u6570"),ae.createElement(Nt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(le.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(Nt.default.Item,{name:"align"},ae.createElement(Ae,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(Ht.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Ht.ZP,{type:"ghost",onClick:Ve},"\u53D6\u6D88")))},tn=he(71411),$e=he(80727),Qe=he.n($e),Ge=(0,ae.forwardRef)(({use3d:Ye,width:Ve,height:He,callback:Fn,showSaveButton:On},Qn)=>{const yn=(0,ae.useRef)(),Nn=(0,ae.useRef)(),[en,Xe]=(0,ae.useState)(!1),Dn=(0,ae.useRef)({id:yn,appName:"graphing",width:Ve||1e3,height:He||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)(()=>{Nn.current=new(Qe())(Dn.current,!0),window.onload=function(){Nn.current.inject("applet_container")}},[]);const Oe=()=>{var ln=window.ggbApplet.getPNGBase64(1,!0,72);return Fn&&Fn(ln),ln};return(0,ae.useEffect)(()=>{Dn.current.appName=en?"3D":"graphing",Nn.current.inject("applet_container")},[en]),(0,ae.useEffect)(()=>{Xe(Ye)},[Ye]),(0,ae.useImperativeHandle)(Qn,()=>({getImgData:Oe})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:yn}),ae.createElement(ce.Z,{align:"middle"},ae.createElement(wt.Z,{flex:1},ae.createElement(tn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:en,onChange:ln=>Xe(ln)})),ae.createElement(wt.Z,null,ae.createElement(Ht.ZP,{size:"large",onClick:Oe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),We=he(41588),Ke=he(6767);const nn="link",hn="upload-image",un="add-flowchart",bn="draw-image",Un="add-flowchart",Vn="code-block",Yn="add-table",vr="------------",pr={default:vr,left:`:${vr}`,center:`:${vr}:`,right:`${vr}:`};var gr=he(58856);function Nr(){}let Lr=0;const dr=1e4,cr="\u2581",jr="@\u2581\u2581@",$t="@\u2581@",$n=`
|
|
**\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`,Zn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Dr(Ye){return/^\d+$/.test(Ye)?`${Ye}px`:Ye}const Ur=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ai={[Ur+"-B"]:"bold",[Ur+"-I"]:"italic"},qn={[nn]:"\u6DFB\u52A0\u94FE\u63A5",[Vn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[hn]:"\u6DFB\u52A0\u56FE\u7247",[bn]:"\u6DFB\u52A0\u753B\u56FE",[un]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Yn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var zn=({defaultValue:Ye="",onChange:Ve,width:He="100%",height:Fn=400,miniToolbar:On=!1,isFocus:Qn=!1,watch:yn,insertTemp:Nn,mode:en="markdown",id:Xe="markdown-editor-id",showResizeBar:Dn=!1,noStorage:Oe=!1,showNullButton:ln=!1,showNullProgramButton:En=!1,hidetoolBar:Gn=!1,fullScreen:sn=!1,onBlur:dn,onCMBeforeChange:An,onFullScreen:er,className:ar="",disablePaste:Xn=!1,disabled:In=!1,disabledFill:Wn=!1,placeholder:rr="",values:sr="",extraUse:mr})=>{const[cn,Si]=(0,ae.useState)(null),[Rr,pi]=(0,ae.useState)(Ye),[an,Rn]=(0,ae.useState)(yn),[nr,fr]=(0,ae.useState)(sn),[lr,Pr]=(0,ae.useState)(""),[Xr,zr]=(0,ae.useState)(0),[Kr,Yr]=(0,ae.useState)(Fn),[wn,ci]=(0,ae.useState)(!1),[Sn,Jr]=(0,ae.useState)(0),[ni,oi]=(0,ae.useState)(0),Ui=(0,ae.useRef)(),ji=(0,ae.useRef)(),si=(0,ae.useRef)(),gi=(0,ae.useRef)();(0,ae.useEffect)(()=>{const Or=window.scrollY||window.pageYOffset;pi(sr),cn==null||cn.setValue(sr),window.scrollTo(0,Or)},[sr]),(0,ae.useEffect)(()=>{er==null||er(nr)},[nr]),(0,ae.useEffect)(()=>{if(Ui.current){let Or=function(Mn,xr){var yi;if(Xn){xr.preventDefault();return}const Qi=xr.clipboardData;if(Qi){const Zi=Qi.types.toString(),Bi=Qi.items;if(Zi==="Files"||Qi.types.indexOf("Files")>-1){if(xr.preventDefault(),en=="stex")return;try{let no=Bi[1];((yi=Bi[0])==null?void 0:yi.kind)==="file"&&(no=Bi[0]);const Wi=no.getAsFile(),qo=Wi.name.split(".").pop();(0,fe.I)(Wi,Xo=>{var Ja,on,xo;Xo.id?((Ja=Wi==null?void 0:Wi.type)==null?void 0:Ja.indexOf("image"))>-1?Er.replaceSelection(`<img width="100%" src="/api/attachments/${Xo.id}?type=${Xo.content_type})" alt="" />`):((on=Wi==null?void 0:Wi.type)==null?void 0:on.indexOf("video"))>-1?Er.replaceSelection(`<video width="100%" controls src="/api/attachments/${Xo.id}"></video>`):((xo=Wi==null?void 0:Wi.type)==null?void 0:xo.indexOf("pdf"))>-1?Er.replaceSelection(`<a href="/api/attachments/${Xo.id}?type=${Wi.type}&disposition=inline" target="_blank">${Wi.name}</a>`):Zn.includes(qo)?Er.replaceSelection(`<a href="/api/attachments/${Xo.id}?type=office&disposition=inline" target="_blank">${Wi.name}</a>`):Er.replaceSelection(`[${Wi.name}](/api/attachments/${Xo.id}?type=${Xo.content_type})`):(Xo==null?void 0:Xo.status)===401&&(document.location.href="/user/login")})}catch(no){Ke.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Er=ot().fromTextArea(Ui.current,{mode:en,lineNumbers:!On,lineWrapping:!0,value:Ye,autoCloseTags:!0,autoCloseBrackets:!0});return Er.on("keyup",function(Mn,xr){xr.keyCode===8&&(Mn.getValue()==""?Er.setOption("placeholder",rr):Er.setOption("placeholder",null))}),Er.on("keydown",function(Mn,xr){if(xr.keyCode===8){var yi=Ci(Mn);yi&&xr.preventDefault()}}),Qn&&Er.focus(),Er.on("paste",Or),In&&Er.on("beforeChange",function(Mn,xr){(xr.origin==="paste"||xr.origin==="+input")&&xr.cancel()}),Si(Er),()=>{Er.off("paste",Or)}}},[]);const Oo=(0,ae.useCallback)(()=>{if(ji.current)try{}catch(Or){console.log(Or,"---- to set md editor body height")}},[Kr,ji,nr]);(0,ae.useEffect)(()=>{function Or(){let Er=new zt.Z(Mn=>{for(let xr of Mn)(xr.target.offsetHeight>0||xr.target.offsetWidth>0)&&(Oo(),cn.setSize("100%","100%"),cn.refresh())});return Er.observe(Ui.current.parentElement),Er}if(cn){const Er=Or();return()=>{var Mn,xr;(Mn=Ui.current)!=null&&Mn.parentElement&&Er.unobserve((xr=Ui.current)==null?void 0:xr.parentElement)}}},[cn,Oo]),(0,ae.useEffect)(()=>{if(cn){let Or=[];for(const[Er,Mn]of Object.entries(ai)){let xr={[Er]:()=>{or(Mn)}};Or.push(xr),cn.addKeyMap(xr)}return()=>{for(let Er of Or)cn.removeKeyMap(Er)}}},[cn]),(0,ae.useEffect)(()=>{sn!==nr&&fr(sn)},[sn]),(0,gr.Z)(()=>{if(!Oe&&Xr>0){let Or=new Date().getTime(),Er=window.sessionStorage.getItem(Xe);Or>=Xr+dr&&(!Er||Er!==Rr)&&(window.sessionStorage.setItem(Xe,Rr),ci(!0))}},dr),(0,ae.useEffect)(()=>{Rn(yn)},[cn,yn]),(0,ae.useEffect)(()=>{cn&&Qn&&cn.focus()},[cn,Qn]),(0,ae.useEffect)(()=>{if(an&&cn){let Or=function(Mn){let xr=Mn.target;if(gi.current){let yi=xr.scrollTop/xr.scrollHeight;gi.current.scrollTop=gi.current.scrollHeight*yi}};const Er=cn.getScrollerElement();return Er.addEventListener("scroll",Or),()=>{Er.removeEventListener("scroll",Or)}}},[cn,an]),(0,ae.useEffect)(()=>{if(cn&&An){let Or=function(Er,Mn){An(Er,Mn)};return cn.on("beforeChange",Or),()=>{cn.off("beforeChange",Or)}}},[cn,An]),(0,ae.useEffect)(()=>{if(cn&&dn){let Or=function(){dn(cn.getValue())};return cn.on("blur",Or),()=>{cn.off("blur",Or)}}},[cn,dn]);function Ci(Or,Er){var Mn=Or.getDoc(),xr=Mn.getCursor(),yi=Mn.getLine(xr.line),Qi=yi.charAt(xr.ch-1),Zi=yi.lastIndexOf("@\u2581@",xr.ch),Bi=yi.lastIndexOf("@\u2581\u2581@",xr.ch),no=Zi>Bi?Zi:Bi,Wi=Zi>Bi?3:4;if(jr.indexOf(Qi)===-1)return null;if(console.log("change1:",Er,Or,yi,xr,no,Zi,Bi,Qi),no>=0&&xr.ch-no<5){var qo=no+Wi;return Mn.replaceRange("",{line:xr.line,ch:no},{line:xr.line,ch:qo}),{line:xr.line,ch:qo}}return null}(0,ae.useEffect)(()=>{if(cn){let Or=function(Er,Mn){const xr=Er.getValue();pi(xr),zr(new Date().getTime()),Er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ve&&(En?Ve(xr,br(xr)):Ve(xr))};return cn.on("change",Or),()=>{cn.off("change",Or)}}},[cn,Ve]),(0,ae.useEffect)(()=>{if(cn)if(Ye==null)cn.setValue(""),pi("");else{const Or=window.scrollY||window.pageYOffset;Ye!==cn.getValue()&&(cn.setValue(Ye),pi(Ye),cn.setCursor(In?1:cn.lineCount(),0),window.scrollTo(0,Or))}},[cn,Ye]);const or=(0,ae.useCallback)(Or=>{const Er=cn.getCursor(),Mn=cn.getSelection();let xr=Mn.split(`
|
|
`);switch(Or){case"bold":return cn.replaceSelection("**"+Mn+"**"),Mn===""&&cn.setCursor(Er.line,Er.ch+2),cn.focus();case"italic":return cn.replaceSelection("*"+Mn+"*"),Mn===""&&cn.setCursor(Er.line,Er.ch+1),cn.focus();case"code":return cn.replaceSelection("`"+Mn+"`"),Mn===""&&cn.setCursor(Er.line,Er.ch+1),cn.focus();case"inline-latex":return Pr("inline-latex"),cn.focus();case"latex":return cn.replaceSelection("```latex\n"+Mn+"\n```"),cn.setCursor(Er.line+1,Mn.length+1),cn.focus();case"line-break":return cn.replaceSelection(`<br/>
|
|
`),cn.focus();case"list-ul":return Mn===""?cn.replaceSelection("- "+Mn):cn.replaceSelection(xr.map(yi=>yi===""?"":`- ${yi}`).join(`
|
|
`)),cn.focus();case"list-ol":return Mn===""?cn.replaceSelection("1. "+Mn):cn.replaceSelection(xr.map((yi,Qi)=>yi===""?"":`${Qi+1}. ${yi}`).join(`
|
|
`)),cn.focus();case"add-null-ch":return Mn===""&&cn.setCursor(Er.line,Er.ch),cn.replaceSelection(cr),cn.focus();case"add-signal":return Mn===""&&cn.setCursor(Er.line,Er.ch),cn.replaceSelection($t),cn.focus();case"add-multiple":return Mn===""&&cn.setCursor(Er.line,Er.ch),cn.replaceSelection(jr),cn.focus();case"inster-template-1":return Mn===""&&cn.setCursor(Er.line,Er.ch),cn.replaceSelection($n),cn.focus();case"eraser":return cn.setValue(""),cn.focus();case"trigger-watch":return Rn(!an),cn.focus();case"trigger-full-screen":return fr(!nr),cn.focus();case nn:Pr(nn);return;case Vn:Pr(Vn);return;case hn:Pr(hn);return;case bn:Pr(bn);return;case"maths-latex":Pr("maths-latex");return;case un:Pr(un);return;case Yn:Pr(Yn);return;default:throw new Error}},[cn,an,nr]),Me=(0,ae.useCallback)((Or,Er)=>{var Mn,xr,yi,Qi,Zi,Bi;switch(Pr(""),lr){case nn:const{title:Ja,link:on}=Or;return cn.replaceSelection(`[${Ja}](${on})`),cn.focus();case Vn:const{language:xo,content:Rl}=Or;return cn.replaceSelection(["```"+xo,Rl,"```"].join(`
|
|
`)),cn.focus();case"maths-latex":for(var no=atob(Or),Wi=new Uint8Array(no.length),qo=0;qo<no.length;qo++)Wi[qo]=no.charCodeAt(qo);var Xo=new Blob([Wi],{type:"image/png"});(0,fe.I)(Xo,pa=>{pa.id?cn.replaceSelection(``):(pa==null?void 0:pa.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":cn.replaceSelection("`$$"+Or+"$$`");break;case hn:case bn:case Un:const{src:oa,alt:bl}=Or,Hi=Er,Mu=(yi=(xr=(Mn=Hi==null?void 0:Hi.name)==null?void 0:Mn.split("."))==null?void 0:xr.pop)==null?void 0:yi.call(xr);return((Qi=Hi==null?void 0:Hi.type)==null?void 0:Qi.indexOf("image"))>-1||!(Hi!=null&&Hi.type)?Hi!=null&&Hi.align||Hi!=null&&Hi.width?cn.replaceSelection(`<p style="text-align:${Hi.align||"initial"}"><img width="${Hi.width?Hi.width+"%":"initial"}" src="${oa}" alt="${bl||""}" /></p>`):cn.replaceSelection(`<img width="100%" src="${oa}" alt="${bl||""}" />`):((Zi=Hi==null?void 0:Hi.type)==null?void 0:Zi.indexOf("video"))>-1?cn.replaceSelection(`<video width="100%" controls src="${oa}"></video>`):((Bi=Hi==null?void 0:Hi.type)==null?void 0:Bi.indexOf("pdf"))>-1?cn.replaceSelection(`<a href="${oa}?type=${Hi.type}&disposition=inline" target="_blank">${Hi.name}</a>`):Zn.includes(Mu)?cn.replaceSelection(`<a href="${oa}?type=office&disposition=inline" target="_blank">${Hi.name}</a>`):cn.replaceSelection(`[${Hi.name}](${oa})`),cn.focus();case Yn:const{row:_l,col:Xi,align:Ro}=Or;let Pl=`
|
|
`;for(let pa=0;pa<_l;pa++){let Ys=[],us=[];for(let Ar=0;Ar<Xi;Ar++)pa===1&&us.push(pr[Ro]),Ys.push(" ");pa===1&&(Pl+=`| ${us.join(" | ")} |
|
|
`),Pl+=`| ${Ys.join(Xi===1?"":" | ")} |
|
|
`}return cn.replaceSelection(Pl+`
|
|
`),cn.focus();default:throw new Error}},[cn,lr]),Ji=(0,ae.useMemo)(()=>{switch(lr){case nn:return ae.createElement(we,{callback:Me,onCancel:qr});case Vn:return ae.createElement(be.Z,{callback:Me,onCancel:qr});case hn:return ae.createElement(fe.Z,{callback:Me,onCancel:qr});case un:return ae.createElement(te,{callback:Me,onCancel:qr});case Yn:return ae.createElement(Be,{callback:Me,onCancel:qr});case"maths-latex":return ae.createElement(Ge,{showSaveButton:!0,callback:Me});case"inline-latex":return ae.createElement(We.Z,{showSaveButton:!0,callback:Me});default:return null}},[lr]);function qr(){Pr("")}(0,ae.useEffect)(()=>{if(si.current){let Or=function(Zi){yi=!0,Qi=Zi.pageY},Er=function(){yi=!1},Mn=function(Zi){if(yi){let Bi=Zi.pageY-Qi;Bi<0&&(Bi=0),Bi>300&&(Bi=300);let no=Fn+Bi+"px";Yr(no)}},xr=si.current,yi=!1,Qi=0;return xr.addEventListener("mousedown",Or),document.addEventListener("mousemove",Mn),document.addEventListener("mouseup",Er),()=>{xr.removeEventListener("mousedown",Or),document.removeEventListener("mousemove",Mn),document.removeEventListener("mouseup",Er)}}},[cn,si]),(0,ae.useEffect)(()=>{Yr(Fn)},[Fn]);const _r=Dr(He),di=Dr(Kr),Oi={width:_r,height:di},ur=(0,ae.useMemo)(()=>{if(Xr){let Or=new Date(Xr),Er=Or.getHours(),Mn=Or.getMinutes(),xr=Or.getSeconds();return Er=Er<10?"0"+Er:Er,Mn=Mn<10?"0"+Mn:Mn,xr=xr<10?"0"+xr:xr,`${Er}:${Mn}:${xr}`}return 0},[Xr]),br=Or=>{const Er=[];if(En){let Mn=-1;Or=Or.replace(/(@▁▁@|@▁@)/g,function(xr,yi,Qi){Er.push({multiLine:xr!==$t})})}return Er};function Zr(){window.sessionStorage.removeItem(Xe),ci(!1),zr(0)}function Br(){ci(!1),zr(0),cn.setValue(window.sessionStorage.getItem(Xe))}(0,ae.useEffect)(()=>{qn[lr]&&lr!==bn&&lr!==un&&setTimeout(()=>{const Or=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth/2-Or.offsetWidth/2,Mn=window.innerHeight/2-Or.offsetHeight/2;Jr(Er),oi(Mn)},0)},[lr]);const ti=Or=>{Or.preventDefault();const Er=Or.clientX-Sn,Mn=Or.clientY-ni;document.body.onmousemove=xr=>{let yi=xr.clientX-Er,Qi=xr.clientY-Mn;const Zi=document.getElementsByClassName("markdown-popup-form")[0],Bi=window.innerWidth-Zi.offsetWidth,no=window.innerHeight-Zi.offsetHeight;yi=Math.max(0,Math.min(yi,Bi)),Qi=Math.max(0,Math.min(Qi,no)),eo(xr.clientX,xr.clientY,Er,Mn)&&(Jr(yi),oi(Qi))},document.body.onmouseup=function(){document.body.onmousemove=null}},eo=(Or,Er,Mn,xr)=>{const yi=document.body.clientHeight,Qi=document.body.clientWidth;return Or<20&&Mn>Or||Or>Qi-20&&Mn<Or||Er<20&&xr>Er||Er>yi-20&&xr<Er?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:ji},ae.createElement("div",{className:`markdown-editor-container ${ar} ${an?"on-preview":""} ${On?"mini":""} ${nr?"full-screen":""}`,style:Oi},ae.createElement(Ft,{insertTemp:Nn,watch:an,fullScreen:nr,showNullButton:ln,showNullProgramButton:En,onActionCallback:or,hidetoolBar:Gn,extraUse:mr}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:Ui,placeholder:rr})),an?ae.createElement("div",{ref:gi,className:"preview-container"},en==="stex"&&ae.createElement(mt,{value:Rr}),en!=="stex"&&ae.createElement(Tt.Z,{disabledFill:Wn,showProgramFill:En,value:Rr})):null))),Dn?ae.createElement("a",{ref:si,className:"editor-resize"}):null,lr===bn&&ae.createElement(Fe,{callback:Me,onCancel:qr}),lr===un&&ae.createElement(te,{callback:Me,onCancel:qr}),ae.createElement(jt.Z,null,qn[lr]&&lr!==bn&&lr!==un?ae.createElement(pe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Sn,top:ni},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:ti},qn[lr]),open:!0,onCancel:qr,footer:null,destroyOnClose:!0,width:lr===un?"1200px":null,height:lr===un?"80vh":null,className:"markdown-popup-form"},Ji):null))}},28451:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return At},I:function(){return Ft}});var ae=he(28284),Re=he(6767),ot=he(37568),zt=he(77736),Bt=he(71051),vt=he(47889),gt=he(99571),Et=he(77903),Ct=he(59301),St=he(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 Ht=(0,Ct.useRef)();function Yt(oe){Ht.current.width=Gt.getFieldValue("width"),Ht.current.align=Gt.getFieldValue("align"),jt(oe,Ht.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 Vt(oe){let se=oe.target.files[0];Ht.current=se,Ft(se,Ut)}return St.createElement(ae.default,lt(it({form:Gt},Pt),{className:"upload-image-panel",onFinish:Yt,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:Vt}))),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(zt.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 Ht=new window.XMLHttpRequest;Ht.withCredentials=!0,Ht.addEventListener("load",function(Yt){Nt(JSON.parse(Yt.target.responseText),jt)},!1),Ht.addEventListener("error",function(Yt){console.error(Yt)},!1),Ht.open("POST",`${Et.KI}/api/attachments.json`),Ht.send(Gt)}},79346:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ot}});var ae=he(59301),Re=he(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)}}},23954:function(mn,gn,he){"use strict";he.d(gn,{SV:function(){return Rt},ZP:function(){return It}});var ae=he(59301),Re=he(76374);const ot={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},zt={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Bt={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},vt={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},gt={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var Et=he(53184),Ct=he.n(Et),St=Object.defineProperty,Tt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,tt=(Wt,te,ue)=>te in Wt?St(Wt,te,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Wt[te]=ue,at=(Wt,te)=>{for(var ue in te||(te={}))ft.call(te,ue)&&tt(Wt,ue,te[ue]);if(xt)for(var ue of xt(te))z.call(te,ue)&&tt(Wt,ue,te[ue]);return Wt},it=(Wt,te)=>Tt(Wt,mt(te)),lt=(Wt,te,ue)=>new Promise((le,Ae)=>{var Le=$e=>{try{tn(ue.next($e))}catch(Qe){Ae(Qe)}},Be=$e=>{try{tn(ue.throw($e))}catch(Qe){Ae(Qe)}},tn=$e=>$e.done?le($e.value):Promise.resolve($e.value).then(Le,Be);tn((ue=ue.apply(Wt,te)).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=(Wt,te)=>te.map(ue=>({label:ue,kind:Wt.languages.CompletionItemKind.Keyword,insertText:ue})),Pt=Wt=>Object.keys(ut.tables).map(te=>({label:te,kind:Wt.languages.CompletionItemKind.Variable,insertText:te})),At=(Wt,te)=>{const ue=ut.tables[Wt];return ue?ue.map(le=>({label:le,kind:te.languages.CompletionItemKind.Field,insertText:le})):[]};function Dt(Wt,te,ue,le,Ae){let Le=te.getWordUntilPosition(ue),Be={startLineNumber:ue.lineNumber,endLineNumber:ue.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},tn=le.map($e=>({label:$e,kind:Wt.languages.CompletionItemKind.Keyword,insertText:$e,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}));return Ae.map($e=>{tn.push(it(at({},$e),{range:Be}))}),tn}var Ft=Wt=>{ut.languages.map(Ae=>(Wt.languages.registerDocumentFormattingEditProvider(Ae,{provideDocumentFormattingEdits(Le,Be,tn){return lt(this,null,function*(){const $e=Ct()(Le.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:Le.getFullModelRange(),text:$e}]})}}),Ae));const te=Bt.quickKey.map(Ae=>({label:Ae.label,kind:Wt.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ue=vt.quickKey.map(Ae=>({label:Ae.label,kind:Wt.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),le=zt.quickKey.map(Ae=>({label:Ae.label,kind:Wt.languages.CompletionItemKind.Method,insertText:Ae.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Wt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ae,Le){var Be=Ae.getWordUntilPosition(Le),tn={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},$e=Ae.getLineContent(Le.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...Bt.keywords.map(Qe=>({label:Qe,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...Bt.quickKey.map(Qe=>({label:Qe.label,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe.content,insertText:$e.startsWith("#")?Qe.content.replace(/#/,""):Qe.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Wt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ae,Le){var Be=Ae.getWordUntilPosition(Le),tn={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn};return{suggestions:[...ot.keywords.map($e=>({label:$e,kind:Wt.languages.CompletionItemKind.Function,documentation:$e,insertText:$e,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Wt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ae,Le){var Be=Ae.getWordUntilPosition(Le),tn={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},$e=Ae.getLineContent(Le.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...zt.keywords.map(Qe=>({label:Qe,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...zt.quickKey.map(Qe=>({label:Qe.label,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe.content,insertText:$e.startsWith("#")?Qe.content.replace(/#/,""):Qe.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Wt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ae,Le){var Be=Ae.getWordUntilPosition(Le),tn={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},$e=Ae.getLineContent(Le.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...gt.keywords.map(Qe=>({label:Qe,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...gt.quickKey.map(Qe=>({label:Qe.label,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe.content,insertText:$e.startsWith("#")?Qe.content.replace(/#/,""):Qe.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Wt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ae,Le){var Be=Ae.getWordUntilPosition(Le),tn={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},$e=Ae.getLineContent(Le.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...vt.keywords.map(Qe=>({label:Qe,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...vt.quickKey.map(Qe=>({label:Qe.label,kind:Wt.languages.CompletionItemKind.Function,documentation:Qe.content,insertText:$e.startsWith("#")?Qe.content.replace(/#/,""):Qe.content,insertTextRules:Wt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}})};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=(Wt,te,ue)=>te in Wt?Nt(Wt,te,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Wt[te]=ue,Ht=(Wt,te,ue)=>Gt(Wt,typeof te!="symbol"?te+"":te,ue);const Yt=class mx{constructor(te,ue,le){this.placeholder=te,this.editor=ue,this.monaco=le,ue.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)}};Ht(Yt,"ID","editor.widget.placeholderHint");var Vt=Yt,oe=he(96236),se=he(6767),de=he(25399),Se=he(89392),Qt=he(34604),ne=he(56102),ye=Object.defineProperty,we=Object.defineProperties,be=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Ce=(Wt,te,ue)=>te in Wt?ye(Wt,te,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Wt[te]=ue,ve=(Wt,te)=>{for(var ue in te||(te={}))pe.call(te,ue)&&Ce(Wt,ue,te[ue]);if(fe)for(var ue of fe(te))ce.call(te,ue)&&Ce(Wt,ue,te[ue]);return Wt},Fe=(Wt,te)=>we(Wt,be(te)),ge=(Wt,te)=>{var ue={};for(var le in Wt)pe.call(Wt,le)&&te.indexOf(le)<0&&(ue[le]=Wt[le]);if(Wt!=null&&fe)for(var le of fe(Wt))te.indexOf(le)<0&&ce.call(Wt,le)&&(ue[le]=Wt[le]);return ue},xe=(Wt,te,ue)=>new Promise((le,Ae)=>{var Le=$e=>{try{tn(ue.next($e))}catch(Qe){Ae(Qe)}},Be=$e=>{try{tn(ue.throw($e))}catch(Qe){Ae(Qe)}},tn=$e=>$e.done?le($e.value):Promise.resolve($e.value).then(Le,Be);tn((ue=ue.apply(Wt,te)).next())});function ee(Wt){return/^\d+$/.test(Wt)?`${Wt}px`:Wt}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(Wt=[]){let te=Wt;if(Array.isArray(Wt)){for(let ue=0;ue<Wt.length;ue++){let le=Lt[Wt[ue]];if(le)return le}return te[0]}return Lt[te]||te}let re=null;var It=Wt=>{var te=Wt,{width:ue="100%",height:le="100%",value:Ae,language:Le="javascript",style:Be={},options:tn={},overrideServices:$e={},theme:Qe="vs-dark",onEditBlur:Ze,isCopy:Ge=!1,onSave:We,autoHeight:Ke=!1,forbidCopy:nn=!1,onChange:hn=Kt,editorDidMount:un=Kt,onFocus:bn=Kt,onBreakPoint:Un=Kt,breakPointValue:Vn=[],filename:Yn="educoder.txt",errorLine:vr,errorContent:pr="",highlightLine:gr,openBreakPoint:Nr=!1,placeholder:Lr="",showMiniMap:dr=!0}=te,cr=ge(te,["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 jr=(0,ae.useRef)(),$t=(0,ae.useRef)({}),$n=(0,ae.useRef)(),Zn=(0,ae.useRef)(),Dr=(0,ae.useRef)([]),Vr=(0,ae.useRef)(!1),Ur=(0,ae.useRef)(),ai=(0,ae.useRef)(),qn=(0,ae.useRef)(!1),[zn,Ye]=(0,ae.useState)(!1);function Ve(){let dn;return jr.current&&(dn=new Re.Z(An=>{for(let er of An)(er.target.offsetHeight>0||er.target.offsetWidth>0)&&$t.current.instance.layout()}),dn.observe(jr.current)),dn}function He(){se.ZP.warning({content:decodeURIComponent(jt),key:"monaco-editor-tip"})}const Fn=()=>{let dn=$t.current.instance;if(Ae!=null&&dn&&zn){const An=dn.getModel();An&&Ae!==An.getValue()&&(wt=!0,An.setValue(Ae),dn.layout(),wt=!1)}};(0,ae.useEffect)(()=>{const dn=Qt.Z.subscribe("formatDocument",An=>{var er;let ar=$t.current.instance;(er=ar==null?void 0:ar.getAction)==null||er.call(ar,"editor.action.formatDocument").run()});return window.updateMonacoValue=An=>{hn(An)},dn},[]),(0,ae.useEffect)(()=>{var dn;let An=$t.current.instance;Zn.current&&clearTimeout(Zn.current),Zn.current=setTimeout(()=>{Fn()},500),Ae&&(Ae!=null&&Ae.length)&&((dn=An==null?void 0:An.updateOptions)==null||dn.call(An,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,zn,$t.current]),(0,ae.useEffect)(()=>{if(vr&&$t.current&&$t.current.instance){let An=$t.current.instance;An.changeViewZones(function(er){var ar=document.createElement("div");ar.style.padding="10px 20px",ar.style.width="calc(100% - 20px)",ar.className="my-error-line-wrp",ar.innerHTML=pr,er.addZone({afterLineNumber:vr||11,heightInLines:3,domNode:ar})});var dn={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}};An.addOverlayWidget(dn),An.revealPositionInCenter({lineNumber:20,column:1})}},[vr,$t.current,zn]);const On=(dn="",An)=>{if(!dn||dn.trim()==="")return!0;const ar=$t.current.instance.getModel().getLineTokens(An);let Xn=!1;for(let In=0;In<2;In++)ar.getStandardTokenType(In)===1&&(Xn=!0);return Xn};(0,ae.useEffect)(()=>{var dn;const An=(dn=$t.current)==null?void 0:dn.instance;if(An&&zn&&nn){const er=An.onDidBlurEditorWidget(()=>{qn.current=!1}),ar=An.onDidFocusEditorText(()=>{qn.current=!0});return()=>{er.dispose(),ar.dispose()}}},[$t.current,zn,nn]),(0,ae.useEffect)(()=>{var dn;if((dn=$t.current)!=null&&dn.instance&&zn&&Nr){let An=$t.current.instance,er=An.getModel();if(!er)return;(()=>{var an;let Rn=[],nr=[];const fr=er.getAllDecorations();for(let Pr of fr)Pr.options.className==="highlighted-line"&&(Rn.push((an=Pr==null?void 0:Pr.range)==null?void 0:an.startLineNumber),nr.push(Pr==null?void 0:Pr.id));if(gr===Rn[0])return;er.deltaDecorations(nr,[]);const lr=er.getLineCount();gr&&gr<=lr&&(An.deltaDecorations([],[{range:new re.Range(gr,1,gr,er.getLineMaxColumn(gr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),An.revealLineInCenter(gr))})();const Xn=(an=!1)=>{var Rn;let nr=[],fr=[];const lr=er.getAllDecorations();for(let Pr of lr)Pr.options.linesDecorationsClassName==="breakpoints-select"&&(nr.push((Rn=Pr==null?void 0:Pr.range)==null?void 0:Rn.startLineNumber),fr.push(Pr==null?void 0:Pr.id));if(an)return{lines:nr,ids:fr};Un(nr)},In=an=>xe(void 0,null,function*(){let Rn={range:new re.Range(an,1,an,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield er.deltaDecorations([],[Rn]),Xn()}),Wn=an=>xe(void 0,null,function*(){let Rn=[];const nr=An.getLineDecorations(an);for(let fr of nr)fr.options.linesDecorationsClassName==="breakpoints-select"&&Rn.push(fr.id);yield er.deltaDecorations(Rn,[]),Xn()}),rr=an=>{let Rn=An.getLineDecorations(an);for(let nr of Rn)if(nr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Se.isEqual)(Vn,Xn(!0).lines)){er.deltaDecorations(Xn(!0).ids,[]);const an=Vn.map(Rn=>({range:new re.Range(Rn,1,Rn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));er.deltaDecorations([],an)}const sr=An.onDidChangeModelContent(an=>{let Rn=An.getPosition();if(Rn){let nr=Rn.lineNumber;clearTimeout(ai.current),ai.current=setTimeout(()=>{On(er.getLineContent(nr),nr)?Wn(nr):rr(nr)?(Wn(nr),In(nr)):Xn()},100)}}),mr=An.onMouseDown(an=>{var Rn,nr,fr;if(an.target.detail&&((fr=(nr=(Rn=an.target)==null?void 0:Rn.element)==null?void 0:nr.className)!=null&&fr.includes("line-numbers"))){let lr=an.target.position.lineNumber;if(On(er.getLineContent(lr),lr))return;rr(lr)?Wn(lr):In(lr)}}),cn=an=>{let Rn={range:new re.Range(an,1,an,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Dr.current=An.deltaDecorations(Dr.current,[Rn])},Si=()=>{Dr.current=An.deltaDecorations(Dr.current,[])},Rr=An.onMouseMove(an=>{var Rn,nr,fr;if(Si(),an.target.detail&&((fr=(nr=(Rn=an.target)==null?void 0:Rn.element)==null?void 0:nr.className)!=null&&fr.includes("line-numbers"))){let lr=an.target.position.lineNumber;if(On(er.getLineContent(lr),lr))return;cn(lr)}}),pi=An.onMouseLeave(()=>{Si()});return()=>{sr.dispose(),mr.dispose(),Rr.dispose(),pi.dispose()}}},[$t.current,zn,Vn,gr,Nr,Le]),(0,ae.useEffect)(()=>{var dn;(dn=$t.current)!=null&&dn.instance&&Nr&&$t.current.instance.setPosition({lineNumber:0,column:0})},[gr]);function Qn(){let dn=$t.current.instance;if(dn){const An=dn.getSelection(),er=$t.current.pastePos||{},ar=new re.Range(er.startLineNumber||An.endLineNumber,er.startColumn||An.endColumn,er.endLineNumber||An.endLineNumber,er.endColumn||An.endColumn);setTimeout(()=>{dn.executeEdits("",[{range:ar,text:""}])},300)}}function yn(dn){(window.navigator.platform.match("Mac")?dn.metaKey:dn.ctrlKey)&&dn.keyCode==83&&(dn.preventDefault(),We())}const Nn=()=>{if(Ke&&$t.current.instance){const dn=$t.current.instance.getContentHeight();Gn(dn<le?le:dn)}else Gn(le)};function en(dn){var An=document.createEvent("MouseEvents");An.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),dn.dispatchEvent(An)}const Xe=dn=>{if(!qn.current)return;const{keyCode:An,ctrlKey:er,metaKey:ar,target:Xn,type:In}=dn;return(In==="paste"||(An===67||An===86)&&(ar||er))&&Xn.nodeName==="TEXTAREA"&&(He(),dn.preventDefault()),!1};function Dn(dn,An){var er=window.URL||window.webkitURL||window,ar=new Blob([An]),Xn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Xn.href=er.createObjectURL(ar),Xn.download=dn,en(Xn)}(0,ae.useEffect)(()=>{Nn()},[Nn]),(0,ae.useEffect)(()=>{jr.current&&!zn&&Promise.all([he.e(8909),he.e(3267)]).then(he.bind(he,71448)).then(dn=>{try{re=dn,$t.current.instance=re.editor.create(jr.current,{value:Ae,language:Xt(Le),theme:Qe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:dr||!1}},$e);const An=$t.current.instance;let Xn=[...oe.BH._menuItems].find(sr=>sr[0]._debugName=="EditorContext")[1],In=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Wn=(sr,mr)=>{var cn,Si;let Rr=sr._first;do mr.includes((Si=(cn=Rr.element)==null?void 0:cn.command)==null?void 0:Si.id)&&sr._remove(Rr);while(Rr=Rr.next)};if(un(An,re),setTimeout(()=>{Nn(),$t.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Dn(Yn||"educoder.txt",An.getValue())}})},500),$t.current.subscription=An.onDidChangeModelContent(sr=>{Vr.current?clearTimeout(Ur.current):(Nn(),hn(An.getValue(),sr)),Ur.current=setTimeout(()=>{Vr.current=!1},500)}),window.Monaco||Ft(re,Xt(Le)),nn&&(Wn(Xn,In),jr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Xe),window.removeEventListener("paste",Xe),window.addEventListener("keydown",Xe),window.addEventListener("paste",Xe)),window.Monaco=re,Ze&&An.onDidBlurEditorWidget(()=>{Ze(An.getValue())}),bn&&An.onDidFocusEditorText(()=>{bn(An.getValue())}),nn)try{An.onDidPaste(sr=>{const mr=An.getSelection(),cn=$t.current.pastePos||{},Si=new re.Range(cn.startLineNumber||mr.endLineNumber,cn.startColumn||mr.endColumn,cn.endLineNumber||mr.endLineNumber,cn.endColumn||mr.endColumn);An.executeEdits("",[{range:sr.range,text:""}])})}catch(sr){}let rr=Ve();return Lr&&typeof Lr=="string"&&new Vt(Lr,An,re),Ye(!0),()=>{const sr=$t.current.instance;sr.dispose();const mr=sr.getModel();mr&&mr.dispose(),$t.current.subscription&&$t.current.subscription.dispose(),rr.unobserve(jr.current)}}catch(An){}})},[]),(0,ae.useEffect)(()=>{if($t.current.instance&&zn)return document.addEventListener("keydown",yn,!1),()=>{document.removeEventListener("keydown",yn)}},[We,zn]),(0,ae.useEffect)(()=>{let dn=$t.current.instance;if(dn&&zn){let An=Xt(Le);re.editor.setModelLanguage(dn.getModel(),An)}},[Le,zn]),(0,ae.useEffect)(()=>{$t.current.instance&&zn&&re.editor.setTheme(Qe)},[Qe,zn]),(0,ae.useEffect)(()=>{let dn=$t.current.instance;$n.current=tn,dn&&zn&&(dn.updateOptions(ve({},tn)),setTimeout(()=>{dn.getModel().updateOptions(ve({},tn))},200))},[JSON.stringify(tn),zn]),(0,ae.useEffect)(()=>{let dn=$t.current.instance;dn&&zn&&dn.layout()},[ue,le,zn]);const[Oe,ln]=(0,ae.useState)(ee(ue)),[En,Gn]=(0,ae.useState)(ee(le)),sn=Fe(ve({},Be),{width:Oe,height:En,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:jr,style:sn},Ge&&ae.createElement(ne.CopyToClipboard,{text:Ae,onCopy:()=>se.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(de.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 Rt({width:Wt="100%",height:te="100%",original:ue,modified:le,language:Ae,options:Le={}}){const Be=(0,ae.useRef)(),[tn,$e]=(0,ae.useState)(null);function Qe(Ke){let nn;return Be.current&&(nn=new Re.Z(hn=>{for(let un of hn)(un.target.offsetHeight>0||un.target.offsetWidth>0)&&Ke.layout()}),nn.observe(Be.current)),nn}(0,ae.useEffect)(()=>(Be.current&&Promise.all([he.e(8909),he.e(9404)]).then(he.bind(he,2550)).then(Ke=>{re=Ke;const nn=re.editor.createDiffEditor(Be.current,Fe(ve({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},Le),{wordWrap:!0}));$e(nn);let hn=Qe(nn);return()=>{nn.dispose();const un=nn.getModel();un&&un.dispose(),hn.unobserve(Be.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{tn&&tn.setModel({original:re.editor.createModel(ue,Ae),modified:re.editor.createModel(le,Ae)})},[ue,le,Ae,tn]);const Ze=ee(Wt),Ge=ee(te),We={width:Ze,height:Ge};return ae.createElement("div",{className:"my-diff-editor",ref:Be,style:We})}},16869:function(mn,gn,he){"use strict";var ae=he(38476),Re=he(82326),ot=he(71411),zt=he(59301);const Bt=Re.default.Option;gn.Z=({isTheoretical:vt,onFontSizeChange:gt,cmFontSize:Et,cmCodeMode:Ct,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 zt.createElement("div",{className:`tpi-code-setting ${z}`},zt.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),zt.createElement("section",null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),zt.createElement(Re.default,{bordered:!1,size:"small",value:Ct,onChange:Tt},zt.createElement(Bt,{value:"vs"},"\u767D\u8272\u80CC\u666F"),zt.createElement(Bt,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),zt.createElement(Re.default,{bordered:!1,size:"small",value:Et,onChange:gt},zt.createElement(Bt,{value:12},"12px"),zt.createElement(Bt,{value:14},"14px"),zt.createElement(Bt,{value:16},"16px"),zt.createElement(Bt,{value:18},"18px"),zt.createElement(Bt,{value:20},"20px"),zt.createElement(Bt,{value:22},"22px"))),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"Tab\u8F6C\u6362"),zt.createElement(ot.Z,{checked:tt,onChange:mt})),zt.createElement("div",{className:"file-item",onClick:ft},zt.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("h3",null,"\u5FEB\u6377\u952E"),zt.createElement("section",null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),zt.createElement("span",null,"Ctrl + S")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),zt.createElement("span",null,"F1 / Alt + F1")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),zt.createElement("span",null,"Ctrl + ]/[")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),zt.createElement("span",null,"Ctrl + Shift + \\")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),zt.createElement("span",null,"Home")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),zt.createElement("span",null,"End"))),at),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("h3",null,"\u5FEB\u6377\u952E"),zt.createElement("section",null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),zt.createElement("span",null,ut[lt==null?void 0:lt.difficulty])),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),zt.createElement("span",null,it==null?void 0:it.name)),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),zt.createElement("span",null,it!=null&&it.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},85057:function(mn,gn,he){"use strict";he.d(gn,{jL:function(){return Bt},w9:function(){return pe},QD:function(){return hn},cQ:function(){return ne},op:function(){return Qe},O5:function(){return ai},_b:function(){return vr},t7:function(){return it},Gi:function(){return xe},YG:function(){return Fe},qp:function(){return Tt},vr:function(){return Un},qE:function(){return We},Je:function(){return dt},wb:function(){return oe},cq:function(){return re},tp:function(){return ft}});var ae=he(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:qn=[],img:zn,imgWidth:Ye=346,title:Ve,sunTitle:He,bannerExtraContent:Fn})=>ae.createElement("div",{className:Re.banner},ae.createElement("div",{className:Re.content},ae.createElement("aside",null,ae.createElement("p",null,ae.createElement("b",null,Ve),ae.createElement("span",null,He)),qn.length>0&&ae.createElement("div",{className:Re.btns},qn.map((On,Qn)=>ae.createElement("div",{key:Qn,onClick:On.click},On.name,On.sign?ae.createElement("img",{src:ot,width:39}):null))),Fn),zn&&ae.createElement("img",{style:{marginTop:33,marginRight:38},src:zn,width:Ye}))),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=he(92310),Et=he.n(gt),Ct=he(89392),Tt=({dataSource:qn=[],value:zn,onChange:Ye,onTitleChange:Ve,className:He,title:Fn,titleWidth:On=41,style:Qn={},fontColor:yn="#6A7283",showCount:Nn})=>{const[en,Xe]=(0,ae.useState)(0),[Dn,Oe]=(0,ae.useState)(!1),ln=(0,ae.useRef)(null),En=(0,ae.useRef)(null);return(0,ae.useEffect)(()=>{var Gn;qn.length!==0&&(((Gn=ln==null?void 0:ln.current)==null?void 0:Gn.clientHeight)>97?Xe(1):Xe(0)),qn.length===0&&Xe(0),Oe(!1)},[qn]),ae.createElement("div",{className:Et()(vt.row,He),style:Qn},ae.createElement("div",{onClick:(0,Ct.throttle)(()=>Ve==null?void 0:Ve(),2e3),style:{width:On,marginTop:Dn?12:4},className:`${vt.title} ${Ve?"current":""}`},Fn),ae.createElement("div",{className:Dn?`${vt.tagsWrap} ${vt.tagsBorderWrap}`:vt.tagsWrap},ae.createElement("div",{className:vt.bar,ref:En,style:en>0?{height:en===1?97:"auto",overflow:en===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ae.createElement("div",{className:vt.tag,ref:ln},qn==null?void 0:qn.map(Gn=>ae.createElement("span",{onClick:()=>Ye(Gn.id),key:Gn.id,style:{color:yn},className:zn===Gn.id?vt.active:""},ae.createElement("span",{title:Gn.name,className:vt.name},Gn.name),!!Nn&&ae.createElement("span",{className:vt.num},Gn.count))))),!!en&&ae.createElement(ae.Fragment,null,en===1?ae.createElement("div",{onClick:()=>{var Gn;Xe(2),((Gn=ln==null?void 0:ln.current)==null?void 0:Gn.clientHeight)>245?Oe(!0):Oe(!1)},className:vt.action},"\u5C55\u5F00",ae.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ae.createElement("div",{onClick:()=>{En.current.scrollTop=0,Xe(1),Oe(!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:qn=[],value:zn,onChange:Ye,className:Ve,style:He={}})=>ae.createElement("div",{style:He,className:Et()(mt.tabs,Ve)},qn.map(Fn=>ae.createElement("span",{onClick:()=>Ye(Fn.id),className:zn===Fn.id?mt.active:"",key:Fn.id},Fn.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=he(37568),it=({dataSource:qn=[],value:zn="",onChange:Ye,onInputChange:Ve=()=>{},className:He,style:Fn={},placeholder:On,allowClear:Qn=!1})=>{var yn;const[Nn,en]=(0,ae.useState)(""),[Xe,Dn]=(0,ae.useState)("");(0,ae.useEffect)(()=>{var En;let Gn=zn;(En=JSON.stringify(zn))!=null&&En.includes("{")&&(en(zn.id),Gn=zn.value||"");try{Dn(decodeURIComponent(Gn||""))}catch(sn){Dn(decodeURIComponent(Gn||""))}},[zn]);const Oe=()=>{Ye(encodeURIComponent(Xe),Nn||null)},ln=En=>{En!==Nn&&(en(En),Ye(encodeURIComponent(Xe),En))};return ae.createElement("div",{className:Et()(z.input,He),style:Fn},!!qn.length&&ae.createElement("div",{className:z.dropdown},ae.createElement("div",{className:z.text},(yn=qn.find(En=>En.id===Nn))==null?void 0:yn.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},qn.map((En,Gn)=>ae.createElement("div",{key:Gn,onClick:()=>ln(En.id)},En.name)))),ae.createElement(tt.default,{onPressEnter:Oe,value:Xe,onChange:En=>{Dn(En.target.value),Ve(encodeURIComponent(En.target.value),Nn||null)},bordered:!1,placeholder:On}),ae.createElement("i",{onClick:Oe,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:qn,onChange:zn,className:Ye,total:Ve,pageSize:He,style:Fn={}})=>{const On=qn<2,Qn=qn>=Math.ceil(Ve/He);return Ve<=He?ae.createElement(ae.Fragment,null):ae.createElement("div",{className:Et()(lt.quickPager,Ye),style:Fn},ae.createElement("div",{onClick:()=>{On||zn(qn-1,"prev")},className:On?lt.disabled:""},"\u4E0A\u4E00\u9875"),ae.createElement("div",{onClick:()=>{Qn||zn(qn+1,"next")},className:Qn?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=he(29787),Dt=he(25399),Ft=he(58018),jt=he(3294),Nt=he(955),Gt=he(96908),Ht=he(57177),Yt=he(81378),Ut=he(8797),oe=({className:qn,dataSource:zn=[],col:Ye=4,right:Ve,bottom:He=23,precision:Fn=0,wrapWidth:On=1200,trackEventItems:Qn,loading:yn})=>{const Nn=Math.floor((On-(Ye-1)*Ve)/Ye);return ae.createElement(At.Z,{spinning:yn},ae.createElement("div",{className:Et()(Pt.list,qn)},!!zn.length&&zn.map((en,Xe)=>{const{name:Dn,id:Oe,identifier:ln,power:En,cover_image_id:Gn,pic:sn}=en;return ae.createElement("div",{className:Pt.wrap,key:Oe,style:{width:Nn,marginRight:(1+Xe)%Ye===0?0:Ve+Fn,marginBottom:He}},ae.createElement("a",{target:"_blank",href:`/shixuns/${ln}/challenges`,className:Pt.li,onClick:dn=>{dn.preventDefault(),Qn&&(0,Nt.L9)([Qn]),En&&(0,Nt.xg)(`/shixuns/${ln}/challenges`)}},ae.createElement("div",{className:Pt.img},ae.createElement("img",{className:Pt.cover,src:`${sn}`}),en.is_jupyter&&ae.createElement("img",{className:Pt.sign,src:Gt}),en.is_jupyter_lab&&ae.createElement("img",{className:Pt.sign,src:Ht}),en.is_unity_3d&&ae.createElement("img",{className:Pt.sign,src:Yt})),ae.createElement("div",{className:Pt.name},ae.createElement(Dt.Z,{title:Dn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ae.createElement("span",{className:Pt.e},Dn||"\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,en.challenges_count))),!!en.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,en.myshixuns_count))),ae.createElement(Dt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ae.createElement("span",null,ae.createElement("span",null,en.level))),ae.createElement("div",{className:Pt.rate},ae.createElement(Ft.Z,{allowHalf:!0,disabled:!0,defaultValue:en.score_info}),ae.createElement("span",null,"\xA0",en.score_info?`${en.score_info}\u5206`:"5\u5206")))),!En&&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")))}),!zn.length&&ae.createElement(Ut.Z,null)))},se={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"},de=he(24065),Se=he(59301),ne=({className:qn,dataSource:zn=[],col:Ye=4,right:Ve,bottom:He=23,precision:Fn=0,wrapWidth:On=1200,trackEventItems:Qn,loading:yn,onRemove:Nn=()=>{},isCurrent:en=!0,showAlias:Xe=!1})=>{const Dn=Math.floor((On-(Ye-1)*Ve)/Ye),Oe=[{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 Se.createElement(At.Z,{spinning:yn},Se.createElement("div",{className:Et()(se.list,qn)},!!(zn!=null&&zn.length)&&(zn==null?void 0:zn.map((ln,En)=>{var Gn;const{name:sn,id:dn,identifier:An,featured:er,school_name:ar,image_url:Xn,excellent:In,is_plan:Wn}=ln;return Se.createElement("div",{key:dn,className:se.wrap,style:{width:Dn,marginRight:(1+En)%Ye===0?0:Ve+Fn,marginBottom:He}},Se.createElement("a",{className:se.li,onClick:rr=>{rr.preventDefault(),rr.stopPropagation(),Qn&&(0,Nt.L9)([Qn]),(0,Nt.xg)(`/paths/${An}`)}},Se.createElement("div",{className:se.img},Se.createElement("img",{className:se.cover,src:`${Xn}`}),en&&(0,de.bg)()&&(ln==null?void 0:ln.studying)&&Se.createElement("div",{className:`${se.movebq} user-path-items`,onClick:rr=>{rr.stopPropagation(),Nn(ln)}},Se.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Se.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Gn=ln==null?void 0:ln.subject_tags)==null?void 0:Gn.map((rr,sr)=>{var mr,cn;if(sr===0){const Rr=(mr=Oe.find(pi=>pi.name==rr))==null?void 0:mr.swimg;return Se.createElement("img",{className:se.sign,src:Rr,style:{left:"-4px"}})}const Si=(cn=Oe.find(Rr=>Rr.name==rr))==null?void 0:cn.ptimg;return Se.createElement("img",{className:se.sign,src:Si,style:{left:`${48+52*(sr-1)+2*sr}px`}})}),Se.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ln==null?void 0:ln.excellent)&&Se.createElement("div",{className:se.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Se.createElement("div",{className:se.name},Se.createElement(Dt.Z,{title:Xe&&(ln!=null&&ln.excellent_alias_name)?Se.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${sn}`,Se.createElement("br",null),Se.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ln==null?void 0:ln.excellent_alias_name}`)):sn},Se.createElement("span",{className:se.e},Xe&&(ln==null?void 0:ln.excellent_alias_name)||sn))),Se.createElement(Dt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ar}`},Se.createElement("div",{className:se.unit},Se.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ar)),Se.createElement("div",{className:se.tags},Se.createElement("div",null,Se.createElement(Dt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Se.createElement("span",null,Se.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Se.createElement("span",null,ln.stages_count))),Se.createElement(Dt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Se.createElement("span",null,Se.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Se.createElement("span",null,ln.members_count)))))))})),!zn.length&&Se.createElement(Ut.Z,null)))},ye={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"},we="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",be=he(59301),pe=({className:qn,dataSource:zn=[],col:Ye=4,right:Ve,bottom:He=23,precision:Fn=0,wrapWidth:On=1200,trackEventItems:Qn,loading:yn,handleVery:Nn=()=>!0})=>{const en=Math.floor((On-(Ye-1)*Ve)/Ye);return be.createElement(At.Z,{spinning:yn},be.createElement("div",{className:Et()(ye.list,qn)},!!zn.length&&zn.map((Xe,Dn)=>{const{subject_identifier:Oe,id:ln,identifier:En,power:Gn}=Xe,sn=Xe.is_public!=0&&Xe.is_public;return be.createElement("div",{className:ye.wrap,key:ln,style:{width:en,marginRight:(1+Dn)%Ye===0?0:Ve+Fn,marginBottom:He}},be.createElement("a",{className:ye.li,onClick:dn=>{dn.preventDefault(),Nn(Xe==null?void 0:Xe.first_category_url)&&(Qn&&(0,Nt.L9)([Qn]),(0,Nt.xg)(Xe.first_category_url))}},be.createElement("div",{className:ye.top},be.createElement(Dt.Z,{title:Xe.name},be.createElement("div",{className:ye.name},Xe.name)),be.createElement("img",{className:ye.img,src:jt.Z.IMG_SERVER+"/images/"+Xe.avatar_url}),be.createElement("div",{className:ye.text,title:Xe.creator},Xe.creator),Oe&&be.createElement("div",{className:ye.btns},be.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),be.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),sn&&be.createElement("div",{className:ye.sign},"\u516C\u5F00")),be.createElement("div",{className:ye.bottom},Xe.visits>0&&be.createElement(Dt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},be.createElement("span",null,be.createElement("i",{className:"iconfont icon-liulanyan"}),be.createElement("span",null,Xe.visits))),Xe.course_members_count>0&&be.createElement(Dt.Z,{title:"\u6210\u5458",placement:"bottom"},be.createElement("span",null,be.createElement("i",{className:"iconfont icon-chengyuan"}),Xe.course_members_count)),Xe.tasks_count>0&&be.createElement(Dt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},be.createElement("span",null,be.createElement("i",{className:"iconfont icon-zuoye"}),Xe.tasks_count)),Xe.is_end?be.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):be.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Xe.is_accessible&&be.createElement("div",{className:ye.lockWrap},be.createElement("img",{src:`${jt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),be.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!zn.length&&be.createElement(Ut.Z,null)))},ce={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"},Ce=he(89070),Fe=({dataSource:qn=[],value:zn,onChange:Ye,className:Ve,style:He={},tabBarExtraContent:Fn})=>ae.createElement("div",{className:Et()(ce.tabs,Ve),style:He},ae.createElement("div",{className:ce.tabsWrap},qn.map((On,Qn)=>!(On!=null&&On.hide)&&ae.createElement("aside",{className:ce.tab,onClick:()=>{Ye(On.id),On.link&&Ce.history.push(On.link)},key:Qn},ae.createElement("div",{className:zn===On.id?ce.active:""},On.name),(On==null?void 0:On.resetCount)==null&&(On==null?void 0:On.total)!==void 0&&ae.createElement("span",null,"\uFF08",On==null?void 0:On.total,"\uFF09"),(On==null?void 0:On.resetCount)!==void 0&&(On==null?void 0:On.total)!==void 0&&ae.createElement(Dt.Z,{title:(On==null?void 0:On.tip)!=null?On==null?void 0:On.tip:""},ae.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ae.createElement("span",{style:{color:"#000"}},On==null?void 0:On.resetCount),"/",ae.createElement("span",null,On==null?void 0:On.total),"\uFF09"))))),ae.createElement("div",{className:ce.tabBar},Fn)),xe=({className:qn,style:zn={},children:Ye})=>ae.createElement("div",{className:Et()(qn),style:zn},Ye),ee={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"},Kt=he(75727),wt=he(93041);const Lt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var re=({sortValue:qn,dropValue:zn,className:Ye,onSort:Ve,onDrop:He,dataSource:Fn=Lt})=>{var On;return ae.createElement("div",{className:Et()(ee.orderWrap,Ye)},ae.createElement(Kt.Z,{dropdownRender:()=>ae.createElement(wt.default,null,Fn.map((Qn,yn)=>ae.createElement(wt.default.Item,{key:yn,onClick:()=>He(Qn.id)},Qn.name)))},ae.createElement("span",{className:ee.orderTextWrap},(On=Fn.find(Qn=>zn===Qn.id))==null?void 0:On.name)),ae.createElement("span",{className:ee.orderIconWrap},ae.createElement("span",{className:ee.orderAsc},ae.createElement("i",{className:qn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ee.cursorPointer} ${ee.active}`:`iconfont icon-sanjiaoxing-up font12 ${ee.cursorPointer}`,onClick:()=>Ve(qn==="asc"?"desc":"asc")})),ae.createElement("span",{className:ee.orderDesc},ae.createElement("i",{className:qn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ee.cursorPointer} ${ee.active}`:`iconfont icon-sanjiaoxing-down font12 ${ee.cursorPointer}`,onClick:()=>Ve(qn==="asc"?"desc":"asc")}))))},It={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"},Rt=he(99571),Wt=Object.defineProperty,te=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,Ae=(qn,zn,Ye)=>zn in qn?Wt(qn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):qn[zn]=Ye,Le=(qn,zn)=>{for(var Ye in zn||(zn={}))ue.call(zn,Ye)&&Ae(qn,Ye,zn[Ye]);if(te)for(var Ye of te(zn))le.call(zn,Ye)&&Ae(qn,Ye,zn[Ye]);return qn},Be=(qn,zn)=>{var Ye={};for(var Ve in qn)ue.call(qn,Ve)&&zn.indexOf(Ve)<0&&(Ye[Ve]=qn[Ve]);if(qn!=null&&te)for(var Ve of te(qn))zn.indexOf(Ve)<0&&le.call(qn,Ve)&&(Ye[Ve]=qn[Ve]);return Ye},tn=(qn,zn,Ye)=>new Promise((Ve,He)=>{var Fn=yn=>{try{Qn(Ye.next(yn))}catch(Nn){He(Nn)}},On=yn=>{try{Qn(Ye.throw(yn))}catch(Nn){He(Nn)}},Qn=yn=>yn.done?Ve(yn.value):Promise.resolve(yn.value).then(Fn,On);Qn((Ye=Ye.apply(qn,zn)).next())}),Qe=qn=>{var zn=qn,{className:Ye,style:Ve,children:He,loading:Fn=!1,openLoading:On,onClick:Qn=()=>{},size:yn="middle",shape:Nn="round"}=zn,en=Be(zn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Xe,Dn]=(0,ae.useState)(!1);return ae.createElement(Rt.ZP,Le({onClick:(0,Ct.throttle)(Oe=>tn(void 0,null,function*(){On&&Dn(!0);try{yield Qn(Oe)}catch(ln){console.log("error",ln)}On&&Dn(!1)}),2e3,{leading:!0,trailing:!1}),className:Et()(It.btn,It[`${yn}-${Nn}`],Ye),style:Ve,size:yn,shape:Nn,loading:Xe||Fn},en),He)},Ze={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"},We=({className:qn,style:zn,children:Ye=null,onClick:Ve,title:He})=>ae.createElement("div",{className:Et()(Ze.head,qn),style:zn},ae.createElement("span",{className:"primary-hover",onClick:Ve},ae.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ae.createElement("b",{title:He},He),ae.createElement("div",{className:Ze.node},Ye)),Ke={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"},hn=({confirmShow:qn=!0,confirmTitle:zn,confirmClick:Ye,cancelShow:Ve=!0,cancelTitle:He,cancelClick:Fn,className:On,style:Qn,confirmLoading:yn=!1})=>ae.createElement("div",{className:Et()(Ke.btns,On),style:Qn},qn&&ae.createElement(Rt.ZP,{loading:yn,onClick:Ye,type:"primary",className:Ke.confirm},zn),Ve&&ae.createElement(Rt.ZP,{onClick:Fn,className:Ke.cancel},He)),un={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"},Un=({className:qn,style:zn={},LeftContent:Ye,children:Ve,RightContent:He})=>ae.createElement("div",{className:Et()(un.fixedBottom,qn),style:zn},ae.createElement("div",{className:un.wrap},ae.createElement("div",{className:un.left},Ye),ae.createElement("div",{className:un.center},Ve),ae.createElement("div",{className:un.right},He))),Vn={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"},vr=({className:qn,style:zn={},dataSource:Ye=[]})=>ae.createElement("div",{className:Et()(Vn.crumbs,qn),style:zn},Ye.map((Ve,He)=>He<Ye.length-1?ae.createElement(ae.Fragment,{key:He},Ve.path||Ve.onClick?ae.createElement("span",{className:Vn.hover,onClick:Ve!=null&&Ve.onClick?Ve.onClick:()=>Ce.history.push(Ve.path)},Ve.name):ae.createElement("span",null,Ve.name),ae.createElement("span",null,"\xA0",">","\xA0")):ae.createElement("span",{key:He,style:{color:"#5F6368"}},Ve.name))),pr=he(11938),gr=Object.defineProperty,Nr=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,dr=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,$t=(qn,zn,Ye)=>zn in qn?gr(qn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):qn[zn]=Ye,$n=(qn,zn)=>{for(var Ye in zn||(zn={}))cr.call(zn,Ye)&&$t(qn,Ye,zn[Ye]);if(dr)for(var Ye of dr(zn))jr.call(zn,Ye)&&$t(qn,Ye,zn[Ye]);return qn},Zn=(qn,zn)=>Nr(qn,Lr(zn)),Dr=(qn,zn)=>{var Ye={};for(var Ve in qn)cr.call(qn,Ve)&&zn.indexOf(Ve)<0&&(Ye[Ve]=qn[Ve]);if(qn!=null&&dr)for(var Ve of dr(qn))zn.indexOf(Ve)<0&&jr.call(qn,Ve)&&(Ye[Ve]=qn[Ve]);return Ye};const{Countdown:Vr}=pr.default;var ai=qn=>{var zn=qn,{onChange:Ye}=zn,Ve=Dr(zn,["onChange"]);const[He,Fn]=(0,ae.useState)(null);(0,ae.useEffect)(()=>{typeof He=="number"&&He>=0&&Ye(He)},[He]);const On=Qn=>{const yn=Math.floor(Qn/1e3);Fn(yn)};return ae.createElement(Vr,Zn($n({},Ve),{onChange:On}))}},58856:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return Re}});var ae=he(59301);function Re(ot,zt){const Bt=(0,ae.useRef)();(0,ae.useEffect)(()=>{Bt.current=ot}),(0,ae.useEffect)(()=>{function vt(){Bt.current()}if(zt!==null){let gt=setInterval(vt,zt);return()=>clearInterval(gt)}},[zt])}},85816:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return Gt}});var ae=he(59301),Re=he(28284),ot=he(30641),zt=he(62957),Bt=he(6767),vt=he(62673),gt=he(23954),Et=he(16869),Ct=he(79346),St=he(16479),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=he(89392),ft=he(85057),z=he(59301),tt=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Pt=(Yt,Ut,Vt)=>Ut in Yt?tt(Yt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Yt[Ut]=Vt,At=(Yt,Ut)=>{for(var Vt in Ut||(Ut={}))ut.call(Ut,Vt)&&Pt(Yt,Vt,Ut[Vt]);if(lt)for(var Vt of lt(Ut))dt.call(Ut,Vt)&&Pt(Yt,Vt,Ut[Vt]);return Yt},Dt=(Yt,Ut)=>at(Yt,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=(Yt=>(Yt[Yt.set_font_size=0]="set_font_size",Yt[Yt.set_theme=1]="set_theme",Yt[Yt.on_tab_to_space=2]="on_tab_to_space",Yt[Yt.set_show_editor_setting=3]="set_show_editor_setting",Yt))(jt||{});function Nt(Yt,Ut){switch(Ut.type){case 3:return Dt(At({},Yt),{showEditorSetting:Ut.payload});case 1:return Dt(At({},Yt),{theme:Ut.payload});case 0:return Dt(At({},Yt),{fontSize:Ut.payload});case 2:return Dt(At({},Yt),{tabToSpace:Ut.payload});default:throw new Error}}var Gt=({isLoading:Yt,value:Ut=[],onChange:Vt,form:oe})=>{var se;const[de,Se]=(0,ae.useReducer)(Nt,Ft),{theme:Qt,fontSize:ne,showEditorSetting:ye,tabToSpace:we}=de,[be,fe]=(0,ae.useState)("C"),[pe,ce]=(0,ae.useState)(!1),[Ce,ve]=(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&&ve(ge)},[pe]),(0,ae.useEffect)(()=>{fe(ge==null?void 0:ge[0])},[ge]);const xe={onFontSizeChange:re=>{Se({type:0,payload:re}),(0,St.t)("cmFontSize",re)},tabToSpace:we,cmFontSize:ne,className:"oj",cmCodeMode:Qt,onTabToSpace:re=>{Se({type:2,payload:re}),(0,St.t)("cmTabToSpace",re)},onCodeModeChange:re=>{Se({type:1,payload:re}),(0,St.t)("cmCodeMode",re)}};function ee(){Se({type:3,payload:!1})}function Kt(){Se({type:3,payload:!0})}function wt(re){var It;const Rt=(It=Fe.current)==null?void 0:It.map(Wt=>(Wt.language===be&&(Wt.code=re),Wt));Fe.current=(0,xt.cloneDeep)(Rt),Vt(Rt)}const Lt={key:be,value:(se=Ut==null?void 0:Ut.find(re=>re.language===be))==null?void 0:se.code,language:be,onChange:wt,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:ne,insertSpaces:we}};console.log(888,Ut,ge);const Xt=Ut.filter(re=>ge==null?void 0:ge.includes(re.language));return z.createElement(ae.Fragment,null,z.createElement("div",{className:Tt["code-panel-container"]},z.createElement(Ht,{setVisible:ce,languageItems:Xt,onLanguage:re=>fe(re),language:be,onShowCodeSetting:Kt}),!Yt&&z.createElement(gt.ZP,At({},Lt))),z.createElement(Ct.Z,null,z.createElement(ot.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ye,onClose:ee},z.createElement(Et.Z,At({},xe)))),z.createElement(zt.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),ce(!1)},onCancel:()=>ce(!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:re=>{ve(re)}}))))};function Ht({languageItems:Yt,language:Ut,onShowCodeSetting:Vt,onLanguage:oe,setVisible:se}){return z.createElement("div",{className:Tt["action-oj-bar"]},Yt==null?void 0:Yt.map(de=>z.createElement("aside",{className:Ut===(de==null?void 0:de.language)?Tt.active:"",onClick:()=>oe(de==null?void 0:de.language),key:de==null?void 0:de.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,de==null?void 0:de.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"))}},80525:function(mn,gn,he){"use strict";he.d(gn,{GM:function(){return Et},MK:function(){return gt},PR:function(){return Re},ZS:function(){return St},d1:function(){return ot},fu:function(){return zt},j2:function(){return Ct},l_:function(){return Bt},uE:function(){return Tt},zQ:function(){return vt}});var ae=he(99064);function Re(){return(0,ae.U2)("problems/new.json")}function ot(xt="question"){return(0,ae.U2)("disciplines.json",{source:xt})}function zt(xt){return(0,ae.U2)(`problems/${xt}/edit.json`)}function Bt(xt,ft){return(0,ae.gz)(`problems/${xt}.json`,ft)}function vt(xt){return(0,ae.v_)("problems.json",xt)}function gt(xt,ft){return(0,ae.v_)(`exercises/${xt}/exercise_questions.json`,ft)}function Et(xt,ft){return(0,ae.gz)(`exercise_questions/${xt}.json`,ft)}function Ct(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})}},83685:function(mn,gn,he){"use strict";he.d(gn,{D0:function(){return gt},R8:function(){return zt},jw:function(){return vt},y3:function(){return Et}});var ae=he(82326),Re=he(59301);const{Option:ot}=ae.default;var zt=(Ct=>(Ct[Ct.language=0]="language",Ct[Ct.difficult=1]="difficult",Ct[Ct.category=2]="category",Ct[Ct.openOrNot=3]="openOrNot",Ct))(zt||{});const Bt={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function vt(Ct){return Bt[Ct].map(St=>Re.createElement(ot,{key:St.title,value:St.key}," ",St.title," "))}function gt(Ct,St){Ct.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 Et(Ct,St){var Tt;let mt=[];for(let xt=0;xt<Ct.length;xt++){const ft=Ct[xt];if(((Tt=ft.sub_disciplines)==null?void 0:Tt.length)>0){mt[0]=ft.id;for(let z=0;z<ft.sub_disciplines.length;z++){const tt=ft.sub_disciplines[z];if(tt.id===St)return mt[1]=tt.id,[mt,tt.tag_disciplines||tt.sub_disciplines||[]]}}}return[mt,[]]}},72161:function(mn,gn,he){"use strict";he.d(gn,{Y2:function(){return se},ZP:function(){return de}});var ae=he(59301),Re=he(14566),ot=he(6767),zt=he(62957),Bt=he(77019),vt=he(47889),gt=he(99571),Et=he(62673),Ct=he(25399),St=he(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=he(47257),ft=he.n(xt),z=he(81939),tt=he(99064),at=he(1012),it=he(955),lt=he(23210),ut=he(59301),dt=Object.defineProperty,Pt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Nt=(Se,Qt,ne)=>Qt in Se?dt(Se,Qt,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Se[Qt]=ne,Gt=(Se,Qt)=>{for(var ne in Qt||(Qt={}))Ft.call(Qt,ne)&&Nt(Se,ne,Qt[ne]);if(Dt)for(var ne of Dt(Qt))jt.call(Qt,ne)&&Nt(Se,ne,Qt[ne]);return Se},Ht=(Se,Qt)=>Pt(Se,At(Qt)),Yt=(Se,Qt,ne)=>new Promise((ye,we)=>{var be=ce=>{try{pe(ne.next(ce))}catch(Ce){we(Ce)}},fe=ce=>{try{pe(ne.throw(ce))}catch(Ce){we(Ce)}},pe=ce=>ce.done?ye(ce.value):Promise.resolve(ce.value).then(be,fe);pe((ne=ne.apply(Se,Qt)).next())});const{Dragger:Ut}=Re.default,Vt=Se=>{const Qt=Ce=>Ce&&Ce.substring(0,Ce.lastIndexOf("."));for(var ne=[...Se],ye=0,we=[],be=0;be<ne.length;be++){for(var fe="",pe=0;pe<we.length;pe++)if(Qt(we[pe][0].name)==Qt(ne[be].name)){ye=1,fe=pe;break}if(ye==1)we[fe].push(ne[be]),ye=0;else if(ye==0){let Ce=new Array;Ce.push(ne[be]),we.push(Ce)}}return we.map(Ce=>{if(Ce.forEach(ve=>{let Fe=ve.name.split(/\.(?=[^\.]+$)/);ve.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:Se,onOK:Qt,visible:ne,wrapClassName:ye,rootIdentifier:we,multiple:be=!1,defaultMultipleValue:fe=!0})=>{const[pe,ce]=(0,ae.useState)([]),[Ce,ve]=(0,ae.useState)({}),[Fe,ge]=(0,ae.useState)(!1),[xe,ee]=(0,ae.useState)(!0),Kt=(0,ae.useRef)([]),wt=(0,ae.useRef)(0),Lt=()=>{Se()};(0,ae.useEffect)(()=>{Xt()},[]),(0,ae.useEffect)(()=>{ne&&(Kt.current=[],wt.current=0,ce([]),ee(fe))},[ne]);const Xt=()=>Yt(void 0,null,function*(){try{const Ae=yield(0,tt.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Le=JSON.parse((0,z.pe)(Ae.data));ve(Le)}catch(Ae){}}),re=Ae=>Ae&&Ae.substring(0,Ae.lastIndexOf(".")),It=Ae=>{var Le,Be;const tn=re((Le=Ae[0])==null?void 0:Le.name)||re((Be=Ae[1])==null?void 0:Be.name),$e=pe.filter(Qe=>re(Qe.name)!==tn);Kt.current=[...$e],ce([...$e])},Rt=Ae=>{if(!xe){const Ze=new FormData;Ze.append("file",Ae.file),(0,tt.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ze},!0).then(We=>{if(We.status===0){wt.current=wt.current+1;const Ke=Kt.current.map(nn=>{var hn;if(nn.name===Ae.name){const un=Gt({},nn);return(hn=Ae==null?void 0:Ae.name)!=null&&hn.includes(".in")?un.input=We==null?void 0:We.content:un.output=We==null?void 0:We.content,un}return nn});if(Kt.current=[...Ke],ce([...Ke]),wt.current>0&&wt.current===pe.length){ge(!1);let nn=Vt(Ke);nn=nn.filter(hn=>{var un,bn;return!!((un=hn[0])!=null&&un.name&&((bn=hn[1])!=null&&bn.name))}),nn=nn.map(hn=>Ht(Gt(Gt({},hn[0]),hn[1]),{is_file:!1})),Qt(nn),Se()}}else ge(!1),Se()});return}const Le=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=Ae.name,tn={container_type:"TestSet",file_name:Be},$e=(0,at.Z)();let Qe=`testsets/${we}/${$e}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`;we===null&&(Qe=`testsets/${$e}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`),Le.multipartUpload(Qe,new Blob([Ae.file],{type:Ae.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)(tn)}}).then(function(Ze){if(Ze.data.status===0){wt.current=wt.current+1;const Ge=Kt.current.map(We=>{var Ke,nn,hn,un,bn,Un,Vn,Yn,vr,pr,gr,Nr,Lr,dr,cr,jr,$t;if(We.name===((nn=(Ke=Ze.data)==null?void 0:Ke.data)==null?void 0:nn.file_name)){const $n=Gt({},We);return(bn=(un=(hn=Ze.data)==null?void 0:hn.data)==null?void 0:un.file_name)!=null&&bn.includes(".in")?($n.in_object_key=(Vn=(Un=Ze.data)==null?void 0:Un.data)==null?void 0:Vn.object,$n.in_object_size=(vr=(Yn=Ze.data)==null?void 0:Yn.data)==null?void 0:vr.size,$n.input=(gr=(pr=Ze.data)==null?void 0:pr.data)==null?void 0:gr.file_name,$n.in_file=Ae):($n.out_object_key=(Lr=(Nr=Ze.data)==null?void 0:Nr.data)==null?void 0:Lr.object,$n.out_object_size=(cr=(dr=Ze.data)==null?void 0:dr.data)==null?void 0:cr.size,$n.output=($t=(jr=Ze.data)==null?void 0:jr.data)==null?void 0:$t.file_name,$n.out_file=Ae),$n}return We});if(Kt.current=[...Ge],ce([...Ge]),wt.current>0&&wt.current===pe.length){ge(!1);let We=Vt(Ge);We=We.filter(Ke=>{var nn,hn;return!!((nn=Ke[0])!=null&&nn.name&&((hn=Ke[1])!=null&&hn.name))}),We=We.map(Ke=>Ht(Gt(Gt({},Ke[0]),Ke[1]),{is_file:!0})),Qt(We),Se()}}})},Wt=Ae=>new Promise((Le,Be)=>{let tn=0,$e=[];for(let Qe=0;Qe<Ae.length;Qe++)Ae[Qe].file.slice(0,1).arrayBuffer().then(()=>{tn++,tn===Ae.length&&($e.length?(ot.ZP.warning(`${$e.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Be()):Le(Ae))}).catch(Ze=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ze),tn++,$e.push(Ae[Qe].name),tn===Ae.length&&($e.length?(ot.ZP.warning(`${$e.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Be()):Le(Ae))})}),te=()=>Yt(void 0,null,function*(){if(pe.length===0){ot.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Wt(pe),ge(!0),Vt(pe).some(Le=>{var Be,tn;return!((Be=Le[0])!=null&&Be.name&&((tn=Le[1])!=null&&tn.name))})){zt.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Yt(void 0,null,function*(){pe.map(Le=>Yt(void 0,null,function*(){Rt(Le)}))}),onCancel:()=>{ge(!1)}});return}pe.map(Le=>Yt(void 0,null,function*(){Rt(Le)}))}),ue={name:"file",fileList:pe,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Ae=>{if(pe!=null&&pe.some(Be=>Be.name===Ae.name))return ot.ZP.info(`${Ae.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Ae.size/1024/1024>100)return ot.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ae.name))return ot.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Le={name:Ae.name,uid:Ae.uid,file:Ae,percent:0};return pe.push(Le),Kt.current=[...pe],ce([...pe]),!1}},le=Vt(pe);return console.log(pe,le,"fileList"),ut.createElement(zt.default,{open:ne,wrapClassName:ye,onOk:te,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:xe,onChange:Ae=>ee(Ae.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:le,onRemove:It})):ut.createElement("div",{className:`${Tt.noData} mb30`},ut.createElement(Re.default.Dragger,Ht(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:Se=[],onRemove:Qt,width:ne="auto",showScore:ye=!1,disabled:we=!1,inputChange:be,onEvaluatingChange:fe,onSelectAll:pe,checkAll1:ce,checkAll2:Ce,checkAll3:ve,checkAll4:Fe,checkAll5:ge,showEvaluatingSetting:xe=!1,className:ee="",isProgramHomework:Kt=!1})=>{const wt={value:"",filename:"",dataUrl:""},[Lt,Xt]=(0,ae.useState)(Gt({},wt)),re=Wt=>{let te=document.createElement("a");document.body.appendChild(te);let ue=URL.createObjectURL(Wt.file);te.href=ue,te.download=Wt.name,te.click(),URL.revokeObjectURL(ue),document.body.removeChild(te)},It=(Wt,te)=>{(0,it.LR)(Wt,te)},Rt=(Wt,te)=>{zt.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ut.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Qt(Wt,te)},onCancel:()=>{}})};return Se.length?ut.createElement("div",{className:ee,style:{width:ne}},ut.createElement("div",{className:`${Kt?Tt.headProgram:Tt.head}`},xe&&ut.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ut.createElement(Et.default,{checked:ce,onChange:Wt=>{pe(Wt.target.checked,"hidden")}}),ut.createElement(Ct.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{style:{width:Kt?"25%":"15%"}},"\u7528\u4F8B"),ut.createElement("div",{style:{width: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"),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(Et.default,{checked:Fe,onChange:Wt=>{pe(Wt.target.checked,"input_visible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(Et.default,{checked:Ce,onChange:Wt=>{pe(Wt.target.checked,"is_invisible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(Et.default,{checked:ge,onChange:Wt=>{pe(Wt.target.checked,"actual_output_visible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),xe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(Et.default,{checked:ve,onChange:Wt=>{pe(Wt.target.checked,"last_match_rule")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{className:Tt.operation,style:Kt?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ut.createElement("div",{className:Tt.listWrapper,style:{boxShadow:Kt?"0px 2px 4px 0px #EAEEF4":"unset"}},Se.map((Wt,te)=>{var ue,le,Ae,Le;return ut.createElement("div",{key:te,className:Tt.list,style:Kt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},xe&&ut.createElement("div",{style:{width:"15%"}},ut.createElement(Et.default,{checked:!!Wt.hidden,onChange:Be=>{fe(Be.target.checked,te,"hidden")}})),ut.createElement("div",{style:{width:Kt?"25%":"15%",paddingLeft:Kt?"5px":"0px",paddingRight:Kt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",te+1),ut.createElement("div",{className:Tt.info,style:{width:ye?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Wt.input||((ue=Wt[0])==null?void 0:ue.name),onClick:()=>Yt(void 0,null,function*(){let Be;Wt.input?Wt.input_file_url?Be=Wt.input_file_url:Be=Wt.in_file:Be=Wt[0];let tn;typeof Be=="string"?(tn=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield tn.text(),filename:"",dataUrl:Be})):(tn=yield(0,it.db)(Be.file),Xt({value:tn.text,filename:Be.name,dataUrl:tn.link}))})},Wt.input||((le=Wt[0])==null?void 0:le.name))),ut.createElement("div",{className:Tt.info,style:{width:ye?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Wt.output||((Ae=Wt[1])==null?void 0:Ae.name),onClick:()=>Yt(void 0,null,function*(){let Be;Wt.input?Wt.output_file_url?Be=Wt.output_file_url:Be=Wt.out_file:Be=Wt[1];let tn;typeof Be=="string"?(tn=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield tn.text(),filename:"",dataUrl:Be})):(tn=yield(0,it.db)(Be.file),Xt({value:tn.text,filename:Be.name,dataUrl:tn.link}))})},Wt.output||((Le=Wt[1])==null?void 0:Le.name))),ye&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(St.default,{size:"large",addonAfter:Kt?"%":null,disabled:we,style:{width:"80%"},onChange:Be=>be(Be,te),value:Wt.score}),!Kt&&ut.createElement("span",null,"\xA0%")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(Et.default,{checked:Wt.input_visible||!1,onChange:Be=>{fe(Be.target.checked,te,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(Et.default,{checked:Wt.is_invisible||!1,onChange:Be=>{fe(Be.target.checked,te,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(Et.default,{checked:Wt.actual_output_visible||!1,onChange:Be=>{fe(Be.target.checked,te,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(Et.default,{checked:Wt.last_match_rule||!1,onChange:Be=>{fe(Be.target.checked,te,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ut.createElement("div",{onClick:()=>Rt(Wt,te),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 de=oe},10977:function(mn,gn,he){"use strict";he.d(gn,{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||{})},24768:function(mn,gn,he){"use strict";he.d(gn,{AL:function(){return dt},Iy:function(){return Tt},Qv:function(){return ft},ez:function(){return ut},jb:function(){return mt}});var ae=he(32834),Re=he.n(ae),ot=he(11690),zt=he.n(ot);let Bt=1;function vt(jt,Nt){const Gt=jt.match(/^(\s+)(?:```)/);if(Gt===null)return Nt;const Ht=Gt[1];return Nt.split(`
|
|
`).map(Yt=>{const Ut=Yt.match(/^\s+/);if(Ut===null)return Yt;const[Vt]=Ut;return Vt.length>=Ht.length?Yt.slice(Ht.length):Yt}).join(`
|
|
`)}let gt=[],Et=["<ul>"];const Ct=new(Re()).Renderer,St=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Tt(){gt.length=0,Et=["<ul>"]}const mt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xt(jt,Nt,Gt,Ht){if(Nt>=jt.length||jt[Nt].level<=Gt)return Nt;var Yt=jt[Nt];Ht.push("<li><a href='#"+Bt+Yt.anchor+"'>"+Yt.text+"</a>"),Nt++;var Ut=[];return Nt=xt(jt,Nt,Yt.level,Ut),Ut.length>0&&(Ht.push("<ul>"),Ut.forEach(function(Vt){Ht.push(Vt)}),Ht.push("</ul>")),Ht.push("</li>"),Nt=xt(jt,Nt,Gt,Ht),Nt}function ft(){return xt(gt,0,0,Et),Et.push("</ul>"),Et.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 Ht=vt(Gt,Nt[3]||"");const Yt=Nt[2]?Nt[2].trim():Nt[2];if(["latex","katex","math"].indexOf(Yt)>=0){const Ut=it(),Vt=Ht;Ht=Ut,lt[Ut]={type:"block",expression:Vt}}return{type:"code",raw:Gt,lang:Yt,text:Ht}}}},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 Ht=it();return lt[Ht]={type:"inline",expression:Gt},Ht}),jt}const At=Ct.listitem;Ct.listitem=function(jt){return At(Pt(jt))};const Dt=Ct.paragraph;Ct.paragraph=function(jt){return Dt(Pt(jt))};const Ft=Ct.tablecell;Ct.tablecell=function(jt,Nt){return Ft(Pt(jt),Nt)},Ct.code=function(jt,Nt,Gt){const Ht=(Nt||"").match(/\S*/)[0];return Ht?["latex","katex","math"].indexOf(Ht)>=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>"},Ct.heading=function(jt,Nt,Gt){let Ht=this.options.headerPrefix+Gt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return gt.push({anchor:Ht,level:Nt,text:jt}),"<h"+Nt+' id="'+Bt+Ht+'">'+jt+"</h"+Nt+">"},Re().setOptions({silent:!0,gfm:!0,pedantic:!1}),Re().use({tokenizer:z,renderer:Ct}),gn.ZP=Re()},16479:function(mn,gn,he){"use strict";he.d(gn,{G:function(){return Bt},t:function(){return zt}});var ae=he(7062),Re=he.n(ae);const ot=null;function zt(vt,gt){let Et=Re().get("__ec");Et||(Et={}),Et[vt]=gt,Re().set("__ec",Et)}function Bt(vt,gt){let Et=Re().get("__ec");return Et?Et[vt]===void 0?gt:Et[vt]:gt}},47257:function(mn){(function(gn){(function(he){if(1)mn.exports=he();else var ae})(function(){var he,ae,Re;return function(){function ot(zt,Bt,vt){function gt(St,Tt){if(!Bt[St]){if(!zt[St]){var mt=void 0;if(!Tt&&mt)return require(St,!0);if(Et)return Et(St,!0);var xt=new Error("Cannot find module '"+St+"'");throw xt.code="MODULE_NOT_FOUND",xt}var ft=Bt[St]={exports:{}};zt[St][0].call(ft.exports,function(z){var tt=zt[St][1][z];return gt(tt||z)},ft,ft.exports,ot,zt,Bt,vt)}return Bt[St].exports}for(var Et=void 0,Ct=0;Ct<vt.length;Ct++)gt(vt[Ct]);return gt}return ot}()({1:[function(ot,zt,Bt){"use strict";var vt=ot("./browser/client");vt.Buffer=ot("buffer").Buffer,vt.urllib=ot("../shims/xhr"),vt.version=ot("./browser/version").version,zt.exports=vt},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.slice.js");var Ct=ot("assert"),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,Et.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,Et.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,Et.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,Et.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,Et.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,Et.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,Et.default)(gt.default.mark(function at(it,lt,ut){var dt,Pt,At,Dt,Ft,jt,Nt,Gt,Ht,Yt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:for(lt=lt||[],Ct(lt.length,"rules is required"),lt.forEach(function(oe){Ct(oe.allowedOrigin,"allowedOrigin is required"),Ct(oe.allowedMethod,"allowedMethod is required")}),dt=this._bucketRequestParams("PUT",it,"cors",ut),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++)Ht=lt[Nt],Pt+="<CORSRule>",ft(Ht.allowedOrigin).forEach(At),ft(Ht.allowedMethod).forEach(Dt),ft(Ht.allowedHeader).forEach(Ft),ft(Ht.exposeHeader).forEach(jt),Ht.maxAgeSeconds&&(Pt+="<MaxAgeSeconds>".concat(Ht.maxAgeSeconds,"</MaxAgeSeconds>")),Pt+="</CORSRule>";return Pt+="</CORSConfiguration>",dt.content=Pt,dt.mime="xml",dt.successStatuses=[200],Vt.next=16,this.request(dt);case 16:return Yt=Vt.sent,Vt.abrupt("return",{res:Yt.res});case 18:case"end":return Vt.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketCORS=function(){var z=(0,Et.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,Et.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,Et.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,Et.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,Et.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,zt,Bt){(function(vt,gt){(function(){"use strict";var Et=ot("@babel/runtime/helpers/interopRequireDefault"),Ct=Et(ot("@babel/runtime/regenerator")),St=Et(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"),Ht=Gt.setSTSToken,Yt=ot("../common/utils/retry"),Ut=Yt.retry,Vt=ot("../common/utils/isFunction"),oe=Vt.isFunction,se=new xt;function de(){var be=z.name,fe=z.version;be&&be.toLowerCase&&be.toLowerCase()==="ie"&&fe.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Se(){return location&&location.protocol==="https:"}function Qt(be,fe){if(de(),!(this instanceof Qt))return new Qt(be,fe);be&&be.inited?this.options=be:this.options=Qt.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=fe,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}zt.exports=Qt,Qt.initOptions=function(fe){fe.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:Se(),useFetch:!1},fe);return dt(pe)};var ne=Qt.prototype;ne.debug=Tt,ft(ne,ot("./object")),ft(ne,ot("./bucket")),ft(ne,ot("../common/bucket/getBucketWebsite")),ft(ne,ot("../common/bucket/putBucketWebsite")),ft(ne,ot("../common/bucket/deleteBucketWebsite")),ft(ne,ot("../common/bucket/getBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketLifecycle")),ft(ne,ot("../common/bucket/deleteBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketVersioning")),ft(ne,ot("../common/bucket/getBucketVersioning")),ft(ne,ot("../common/bucket/getBucketInventory")),ft(ne,ot("../common/bucket/deleteBucketInventory")),ft(ne,ot("../common/bucket/listBucketInventory")),ft(ne,ot("../common/bucket/putBucketInventory")),ft(ne,ot("../common/bucket/abortBucketWorm")),ft(ne,ot("../common/bucket/completeBucketWorm")),ft(ne,ot("../common/bucket/extendBucketWorm")),ft(ne,ot("../common/bucket/getBucketWorm")),ft(ne,ot("../common/bucket/initiateBucketWorm")),ft(ne,ot("./managed-upload")),ft(ne,ot("../common/multipart-copy")),ft(ne,ot("../common/multipart")),ft(ne,ot("../common/parallel")),ne.signature=function(fe){return this.debug("authorization stringToSign: %s",fe,"info"),ut.computeSignature(this.options.accessKeySecret,fe,this.options.headerEncoding)},ne._getReqUrl=Nt,ne.authorization=function(fe,pe,ce,Ce){var ve=ut.buildCanonicalString(fe.toUpperCase(),pe,{headers:Ce,parameters:ce});return ut.authorization(this.options.accessKeyId,this.options.accessKeySecret,ve,this.options.headerEncoding)},ne.request=function(){var be=(0,St.default)(Ct.default.mark(function fe(pe){var ce=this;return Ct.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(!this.options.retryMax){ve.next=6;break}return ve.next=3,Ut(ye.bind(this),this.options.retryMax,{errorHandler:function(ge){var xe=function(Kt){if(pe.stream)return!1;var wt=[-1,-2].includes(Kt.status),Lt=ce.options.requestErrorRetryHandle||function(){return!0};return wt&&Lt(Kt)};return!!xe(ge)}})(pe);case 3:return ve.abrupt("return",ve.sent);case 6:return ve.abrupt("return",ye.call(this,pe));case 7:case"end":return ve.stop()}},fe,this)}));return function(fe){return be.apply(this,arguments)}}();function ye(be){return we.apply(this,arguments)}function we(){return we=(0,St.default)(Ct.default.mark(function be(fe){var pe,ce,Ce,ve,Fe,ge;return Ct.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!(this.options.stsToken&&oe(this.options.refreshSTSToken))){ee.next=3;break}return ee.next=3,Ht.call(this);case 3:return pe=At.call(this,fe),this.options.useFetch||(pe.params.mode="disable-fetch"),ve=!!fe.stream,ee.prev=6,ee.next=9,this.urllib.request(pe.url,pe.params);case 9:ce=ee.sent,this.debug("response %s %s, got %s, headers: %j",fe.method,pe.url,ce.status,ce.headers,"info"),ee.next=16;break;case 13:ee.prev=13,ee.t0=ee.catch(6),Ce=ee.t0;case 16:if(!(ce&&fe.successStatuses&&fe.successStatuses.indexOf(ce.status)===-1)){ee.next=28;break}return ee.next=19,this.requestError(ce);case 19:if(Fe=ee.sent,!(Fe.code==="RequestTimeTooSkewed"&&!ve)){ee.next=25;break}return this.options.amendTimeSkewed=+new Date(Fe.serverTime)-new Date,ee.next=24,this.request(fe);case 24:return ee.abrupt("return",ee.sent);case 25:Fe.params=fe,ee.next=32;break;case 28:if(!Ce){ee.next=32;break}return ee.next=31,this.requestError(Ce);case 31:Fe=ee.sent;case 32:if(!Fe){ee.next=34;break}throw Fe;case 34:if(!fe.xmlResponse){ee.next=39;break}return ee.next=37,this.parseXML(ce.data);case 37:ge=ee.sent,ce.data=ge;case 39:return ee.abrupt("return",ce);case 40:case"end":return ee.stop()}},be,this,[[6,13]])})),we.apply(this,arguments)}ne._getResource=function(fe){var pe="/";return fe.bucket&&(pe+="".concat(fe.bucket,"/")),fe.object&&(pe+=Ft(fe.object,this.options.headerEncoding)),pe},ne._escape=function(fe){return tt.encodeURIComponent(fe).replace(/%2F/g,"/")},ne._getUserAgent=function(){var fe=gt&>.browser?"js":"nodejs",pe="aliyun-sdk-".concat(fe,"/").concat(it.version),ce=z.description;return!ce&>&&(ce="Node.js ".concat(gt.version.slice(1)," on ").concat(gt.platform," ").concat(gt.arch)),this._checkUserAgent("".concat(pe," ").concat(ce))},ne._checkUserAgent=function(fe){var pe=fe.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return pe},ne.checkBrowserAndVersion=function(fe,pe){return lt.name===fe&<.version.split(".")[0]===pe},ne.parseXML=function(fe){return new Promise(function(pe,ce){vt.isBuffer(fe)&&(fe=fe.toString()),mt.parseString(fe,{explicitRoot:!1,explicitArray:!1},function(Ce,ve){Ce?ce(Ce):pe(ve)})})},ne.requestError=function(){var be=(0,St.default)(Ct.default.mark(function pe(ce){var Ce,ve,Fe,ge;return Ct.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(Ce=null,!(!ce.data||!ce.data.length)){ee.next=5;break}ce.status===-1||ce.status===-2?(Ce=new Error(ce.message),Ce.name=ce.name,Ce.status=ce.status,Ce.code=ce.name):(ce.status===404?(Ce=new Error("Object not exists"),Ce.name="NoSuchKeyError",Ce.status=404,Ce.code="NoSuchKey"):ce.status===412?(Ce=new Error("Pre condition failed"),Ce.name="PreconditionFailedError",Ce.status=412,Ce.code="PreconditionFailed"):(Ce=new Error("Unknow error, status: ".concat(ce.status)),Ce.name="UnknownError",Ce.status=ce.status),Ce.requestId=ce.headers["x-oss-request-id"],Ce.host=""),ee.next=32;break;case 5:return ve=String(ce.data),this.debug("request response error data: %s",ve,"error"),ee.prev=7,ee.next=10,this.parseXML(ve);case 10:if(ee.t0=ee.sent,ee.t0){ee.next=13;break}ee.t0={};case 13:Fe=ee.t0,ee.next=23;break;case 16:return ee.prev=16,ee.t1=ee.catch(7),this.debug(ve,"error"),ee.t1.message+=`
|
|
raw xml: `.concat(ve),ee.t1.status=ce.status,ee.t1.requestId=ce.headers["x-oss-request-id"],ee.abrupt("return",ee.t1);case 23:ge=Fe.Message||"unknow request error, status: ".concat(ce.status),Fe.Condition&&(ge+=" (condition: ".concat(Fe.Condition,")")),Ce=new Error(ge),Ce.name=Fe.Code?"".concat(Fe.Code,"Error"):"UnknownError",Ce.status=ce.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"),ee.abrupt("return",Ce);case 34:case"end":return ee.stop()}},pe,this,[[7,16]])}));function fe(pe){return be.apply(this,arguments)}return fe}()}).call(this)}).call(this,{isBuffer:ot("../../node_modules/is-buffer/index.js")},ot("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),Et=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),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,Ct.default)(Et.default.mark(function Nt(Gt,Ht){var Yt,Ut,Vt,oe,se,de,Se,Qt,ne,ye=arguments;return Et.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Yt=ye.length>2&&ye[2]!==void 0?ye[2]:{},this.resetCancelFlag(),Yt.disabledMD5=Yt.disabledMD5===void 0?!0:!!Yt.disabledMD5,!(Yt.checkpoint&&Yt.checkpoint.uploadId)){be.next=8;break}return Ht&&at(Ht)&&(Yt.checkpoint.file=Ht),be.next=7,this._resumeMultipart(Yt.checkpoint,Yt);case 7:return be.abrupt("return",be.sent);case 8:return Ut=102400,Yt.mime||(at(Ht)?Yt.mime=mt.getType(Tt.extname(Ht.name)):z(Ht)?Yt.mime=Ht.type:lt(Ht)?Yt.mime="":Yt.mime=mt.getType(Tt.extname(Ht))),Yt.headers=Yt.headers||{},this._convertMetaToHeaders(Yt.meta,Yt.headers),be.next=14,this._getFileSize(Ht);case 14:if(Vt=be.sent,!(Vt<Ut)){be.next=26;break}return Yt.contentLength=Vt,be.next=19,this.put(Gt,Ht,Yt);case 19:if(oe=be.sent,!(Yt&&Yt.progress)){be.next=23;break}return be.next=23,Yt.progress(1);case 23:return se={res:oe.res,bucket:this.options.bucket,name:Gt,etag:oe.res.headers.etag},(Yt.headers&&Yt.headers["x-oss-callback"]||Yt.callback)&&(se.data=oe.data),be.abrupt("return",se);case 26:if(!(Yt.partSize&&parseInt(Yt.partSize,10)!==Yt.partSize)){be.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Yt.partSize&&Yt.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,Yt);case 32:if(de=be.sent,Se=de.uploadId,Qt=this._getPartSize(Vt,Yt.partSize),ne={file:Ht,name:Gt,fileSize:Vt,partSize:Qt,uploadId:Se,doneParts:[]},!(Yt&&Yt.progress)){be.next=39;break}return be.next=39,Yt.progress(0,ne,de.res);case 39:return be.next=41,this._resumeMultipart(ne,Yt);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,Ct.default)(Et.default.mark(function Nt(Gt,Ht){var Yt,Ut,Vt,oe,se,de,Se,Qt,ne,ye,we,be,fe,pe,ce,Ce,ve,Fe,ge;return Et.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(Yt=this,!this.isCancel()){ee.next=3;break}throw this._makeCancelEvent();case 3:return Ut=Gt.file,Vt=Gt.fileSize,oe=Gt.partSize,se=Gt.uploadId,de=Gt.doneParts,Se=Gt.name,Qt=[],de.length>0&&xt(de).to(Qt),ne=this._divideParts(Vt,oe),ye=ne.length,we=!1,be=function(wt,Lt){return new Promise(function(){var Xt=(0,Ct.default)(Et.default.mark(function re(It,Rt){var Wt,te,ue,le,Ae;return Et.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:if(Be.prev=0,wt.isCancel()){Be.next=29;break}return Wt=ne[Lt-1],Be.next=5,wt._createBuffer(Ut,Wt.start,Wt.end);case 5:return te=Be.sent,ue={content:te,size:Wt.end-Wt.start},Be.prev=7,Be.next=10,wt._uploadPart(Se,se,Lt,ue,Ht);case 10:le=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()&&!we)){Be.next=26;break}if(Gt.doneParts.push({number:Lt,etag:le.res.headers.etag}),!Ht.progress){Be.next=23;break}return Be.next=23,Ht.progress(de.length/(ye+1),Gt,le.res);case 23:It({number:Lt,etag:le.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),Ae=new Error,Ae.name=Be.t1.name,Ae.message=Be.t1.message,Ae.stack=Be.t1.stack,Ae.partNum=Lt,xt(Be.t1).to(Ae),Rt(Ae);case 41:case"end":return Be.stop()}},re,null,[[0,32],[7,13]])}));return function(re,It){return Xt.apply(this,arguments)}}())},fe=Array.from(new Array(ye),function(Kt,wt){return wt+1}),pe=Qt.map(function(Kt){return Kt.number}),ce=fe.filter(function(Kt){return pe.indexOf(Kt)<0}),Ce=5,ve=Ht.parallel||Ce,ee.next=17,this._parallel(ce,ve,function(Kt){return new Promise(function(wt,Lt){be(Yt,Kt).then(function(Xt){Xt&&Qt.push(Xt),wt()}).catch(function(Xt){Lt(Xt)})})});case 17:if(Fe=ee.sent,we=!0,ge=Fe.find(function(Kt){return Kt.name==="abort"}),!ge){ee.next=22;break}throw ge;case 22:if(!this.isCancel()){ee.next=25;break}throw be=null,this._makeCancelEvent();case 25:if(!(Fe&&Fe.length>0)){ee.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 ee.next=30,this.completeMultipartUpload(Se,se,Qt,Ht);case 30:return ee.abrupt("return",ee.sent);case 31:case"end":return ee.stop()}},Nt,this)}));function jt(Nt,Gt){return Ft.apply(this,arguments)}return jt}(),ut._getFileSize=function(){var Ft=(0,Ct.default)(Et.default.mark(function Nt(Gt){return Et.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(!lt(Gt)){Yt.next=4;break}return Yt.abrupt("return",Gt.length);case 4:if(!(z(Gt)||at(Gt))){Yt.next=6;break}return Yt.abrupt("return",Gt.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Yt.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,Ht=Gt+jt;Ht=Ht>this.fileBuffer.length?this.fileBuffer.length:Ht,this.start=Ht,Nt=this.push(this.fileBuffer.slice(Gt,Ht))}},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(Yt){Gt.fileBuffer=vt.from(new Uint8Array(Yt.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(Ht){jt(Ht.target.result)},Gt.onerror=function(Ht){Nt(Ht)},Gt.readAsArrayBuffer(Ft)})}ut._createBuffer=function(){var Ft=(0,Ct.default)(Et.default.mark(function Nt(Gt,Ht,Yt){var Ut,Vt;return Et.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(Ht,Yt),se.next=4,Dt(Ut);case 4:return Vt=se.sent,se.abrupt("return",vt.from(Vt));case 8:if(!lt(Gt)){se.next=12;break}return se.abrupt("return",Gt.subarray(Ht,Yt));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return se.stop()}},Nt)}));function jt(Nt,Gt,Ht){return Ft.apply(this,arguments)}return jt}(),ut._getPartSize=function(jt,Nt){var Gt=1e4,Ht=1*1024*1024;Nt||(Nt=Ht);var Yt=Math.ceil(jt/Gt);return Nt<Yt&&(Nt=Yt,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),Ht=[],Yt=0;Yt<Gt;Yt++){var Ut=Nt*Yt,Vt=Math.min(Ut+Nt,jt);Ht.push({start:Ut,end:Vt})}return Ht}}).call(this)}).call(this,ot("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.promise.js");var gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=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,Et.default)(gt.default.mark(function jt(Nt,Gt,Ht){var Yt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Ht=Ht||{},Ht.position===void 0&&(Ht.position="0"),Ht.subres={append:"",position:Ht.position},Ht.method="POST",Vt.next=6,this.put(Nt,Gt,Ht);case 6:return Yt=Vt.sent,Yt.nextAppendPosition=Yt.res.headers["x-oss-next-append-position"],Vt.abrupt("return",Yt);case 9:case"end":return Vt.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.put=function(){var Dt=(0,Et.default)(gt.default.mark(function jt(Nt,Gt,Ht){var Yt,Ut,Vt,oe,se;return gt.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(Ht=Ht||{},Ht.disabledMD5=Ht.disabledMD5===void 0?!0:!!Ht.disabledMD5,Ht.headers=Ht.headers||{},Nt=this._objectName(Nt),!ut(Gt)){Se.next=8;break}Yt=Gt,Se.next=19;break;case 8:if(!(tt(Gt)||it(Gt))){Se.next=18;break}return Ht.mime||(it(Gt)?Ht.mime=mt.getType(Tt.extname(Gt.name)):Ht.mime=Gt.type),Se.next=12,this._createBuffer(Gt,0,Gt.size);case 12:return Yt=Se.sent,Se.next=15,this._getFileSize(Gt);case 15:Ht.contentLength=Se.sent,Se.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Ht.meta,Ht.headers),Ut=Ht.method||"PUT",Vt=this._objectRequestParams(Ut,Nt,Ht),xt.encodeCallback(Vt,Ht),Vt.mime=Ht.mime,Vt.disabledMD5=Ht.disabledMD5,Vt.content=Yt,Vt.successStatuses=[200],Se.next=29,this.request(Vt);case 29:return oe=Se.sent,se={name:Nt,url:this._objectUrl(Nt),res:oe.res},Vt.headers&&Vt.headers["x-oss-callback"]&&(se.data=JSON.parse(oe.data.toString())),Se.abrupt("return",se);case 33:case"end":return Se.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.putStream=function(){var Dt=(0,Et.default)(gt.default.mark(function jt(Nt,Gt,Ht){var Yt,Ut,Vt,oe;return gt.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return Ht=Ht||{},Ht.headers=Ht.headers||{},Nt=this._objectName(Nt),Ht.contentLength?Ht.headers["Content-Length"]=Ht.contentLength:Ht.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ht.meta,Ht.headers),Yt=Ht.method||"PUT",Ut=this._objectRequestParams(Yt,Nt,Ht),xt.encodeCallback(Ut,Ht),Ut.mime=Ht.mime,Ut.stream=Gt,Ut.successStatuses=[200],de.next=13,this.request(Ut);case 13:return Vt=de.sent,oe={name:Nt,url:this._objectUrl(Nt),res:Vt.res},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Vt.data.toString())),de.abrupt("return",oe);case 17:case"end":return de.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,Et.default)(gt.default.mark(function jt(Nt,Gt,Ht){var Yt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,this.copy(Nt,Nt,{meta:Gt||{},timeout:Ht&&Ht.timeout,ctx:Ht&&Ht.ctx});case 2:return Yt=Vt.sent,Vt.abrupt("return",Yt);case 4:case"end":return Vt.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.list=function(){var Dt=(0,Et.default)(gt.default.mark(function jt(Nt,Gt){var Ht,Yt,Ut,Vt,oe;return gt.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return Ht=this._objectRequestParams("GET","",Gt),Ht.query=Nt,Ht.xmlResponse=!0,Ht.successStatuses=[200],de.next=6,this.request(Ht);case 6:return Yt=de.sent,Ut=Yt.data.Contents||[],Vt=this,Ut&&(Array.isArray(Ut)||(Ut=[Ut]),Ut=Ut.map(function(Se){return{name:Se.Key,url:Vt._objectUrl(Se.Key),lastModified:Se.LastModified,etag:Se.ETag,type:Se.Type,size:Number(Se.Size),storageClass:Se.StorageClass,owner:{id:Se.Owner.ID,displayName:Se.Owner.DisplayName}}})),oe=Yt.data.CommonPrefixes||null,oe&&(Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(Se){return Se.Prefix})),de.abrupt("return",{res:Yt.res,objects:Ut,prefixes:oe,nextMarker:Yt.data.NextMarker||null,isTruncated:Yt.data.IsTruncated==="true"});case 13:case"end":return de.stop()}},jt,this)}));function Ft(jt,Nt){return Dt.apply(this,arguments)}return Ft}(),At.listV2=function(){var Dt=(0,Et.default)(gt.default.mark(function jt(Nt){var Gt,Ht,Yt,Ut,Vt,oe,se,de=arguments;return gt.default.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Gt=de.length>1&&de[1]!==void 0?de[1]:{},Ht=Nt["continuation-token"]||Nt.continuationToken,Ht&&(Gt.subres=Object.assign({"continuation-token":Ht},Gt.subres)),Yt=this._objectRequestParams("GET","",Gt),Yt.query=Object.assign({"list-type":2},Nt),delete Yt.query["continuation-token"],delete Yt.query.continuationToken,Yt.xmlResponse=!0,Yt.successStatuses=[200],Qt.next=11,this.request(Yt);case 11:return Ut=Qt.sent,Vt=Ut.data.Contents||[],oe=this,Vt&&(Array.isArray(Vt)||(Vt=[Vt]),Vt=Vt.map(function(ne){var ye=null;return ne.Owner&&(ye={id:ne.Owner.ID,displayName:ne.Owner.DisplayName}),{name:ne.Key,url:oe._objectUrl(ne.Key),lastModified:ne.LastModified,etag:ne.ETag,type:ne.Type,size:Number(ne.Size),storageClass:ne.StorageClass,owner:ye}})),se=Ut.data.CommonPrefixes||null,se&&(Array.isArray(se)||(se=[se]),se=se.map(function(ne){return ne.Prefix})),Qt.abrupt("return",{res:Ut.res,objects:Vt,prefixes:se,isTruncated:Ut.data.IsTruncated==="true",keyCount:+Ut.data.KeyCount,continuationToken:Ut.data.ContinuationToken||null,nextContinuationToken:Ut.data.NextContinuationToken||null});case 18:case"end":return Qt.stop()}},jt,this)}));function Ft(jt){return Dt.apply(this,arguments)}return Ft}(),At.restore=function(){var Dt=(0,Et.default)(gt.default.mark(function jt(Nt){var Gt,Ht,Yt,Ut,Vt=arguments;return gt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return Gt=Vt.length>1&&Vt[1]!==void 0?Vt[1]:{type:"Archive"},Gt=Gt||{},Gt.subres=Object.assign({restore:""},Gt.subres),Gt.versionId&&(Gt.subres.versionId=Gt.versionId),Ht=this._objectRequestParams("POST",Nt,Gt),Gt.type==="ColdArchive"&&(Yt={RestoreRequest:{Days:Gt.Days?Gt.Days:2,JobParameters:{Tier:Gt.JobParameters?Gt.JobParameters:"Standard"}}},Ht.content=Pt(Yt,{headers:!0}),Ht.mime="xml"),Ht.successStatuses=[202],se.next=9,this.request(Ht);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){Ct.exists(Ft,function(Gt){Gt?Ct.unlink(Ft,function(Ht){Ht&&jt.debug("unlink %j error: %s",Ft,Ht,"error"),Nt()}):Nt()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(ot,zt,Bt){"use strict";Bt.version="6.18.1"},{}],7:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.abortBucketWorm=void 0;var Ct=ot("../utils/checkBucketName");function St(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,Et.default)(gt.default.mark(function mt(xt,ft){var z,tt;return gt.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Ct.checkBucketName(xt),z=this._bucketRequestParams("DELETE",xt,"worm",ft),it.next=4,this.request(z);case 4:return tt=it.sent,it.abrupt("return",{res:tt.res,status:tt.status});case 6:case"end":return it.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.abortBucketWorm=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.completeBucketWorm=void 0;var Ct=ot("../utils/checkBucketName");function St(mt,xt,ft){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,Et.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Ct.checkBucketName(xt),tt=this._bucketRequestParams("POST",xt,{wormId:ft},z),lt.next=4,this.request(tt);case 4:return at=lt.sent,lt.abrupt("return",{res:at.res,status:at.status});case 6:case"end":return lt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.completeBucketWorm=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deleteBucketInventory=void 0;var Ct=ot("../utils/checkBucketName");function St(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,Et.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),Ct.checkBucketName(xt),at=this._bucketRequestParams("DELETE",xt,tt,z),at.successStatuses=[204],dt.next=7,this.request(at);case 7:return it=dt.sent,dt.abrupt("return",{status:it.status,res:it.res});case 9:case"end":return dt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.deleteBucketInventory=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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=Bt;Tt.deleteBucketLifecycle=function(){var mt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=Bt;Tt.deleteBucketWebsite=function(){var mt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.extendBucketWorm=void 0;var Ct=ot("../utils/checkBucketName"),St=ot("../utils/obj2xml");function Tt(xt,ft,z,tt){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.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 Ct.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),St=ot("../utils/formatInventoryConfig");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.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),Ct.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/formatObjKey"),ft=xt.formatObjKey,z=Bt;z.getBucketLifecycle=function(){var tt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=Bt;Tt.getBucketVersioning=function(){var mt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("../utils/isObject"),mt=Tt.isObject,xt=Bt;xt.getBucketWebsite=function(){var ft=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketWorm=void 0;var Ct=ot("../utils/checkBucketName"),St=ot("../utils/dataFix");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.default)(gt.default.mark(function xt(ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Ct.checkBucketName(ft),tt=this._bucketRequestParams("GET",ft,"worm",z),tt.successStatuses=[200],tt.xmlResponse=!0,lt.next=6,this.request(tt);case 6:return at=lt.sent,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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.initiateBucketWorm=void 0;var Ct=ot("../utils/obj2xml"),St=ot("../utils/checkBucketName");function Tt(xt,ft,z){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.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=Ct.obj2xml(it,{headers:!0}),at.successStatuses=[200],dt.next=8,this.request(at);case 8:return lt=dt.sent,dt.abrupt("return",{res:lt.res,wormId:lt.res.headers["x-oss-worm-id"],status:lt.status});case 10:case"end":return dt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.initiateBucketWorm=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.listBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),St=ot("../utils/formatInventoryConfig");function Tt(xt){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.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),Ct.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,z),it.successStatuses=[200],it.xmlResponse=!0,Ft.next=9,this.request(it);case 9:return lt=Ft.sent,ut=lt.data,dt=lt.res,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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.putBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),St=ot("../utils/obj2xml");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,Et.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(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return tt=Nt.length>2&&Nt[2]!==void 0?Nt[2]:{},at=Object.assign({inventory:"",inventoryId:z.id},tt.subres),Ct.checkBucketName(ft),it=z.OSSBucketDestination,lt=z.optionalFields,ut=z.includedObjectVersions,dt="acs:oss:::",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,Ht.next=14,this.request(Ft);case 14:return jt=Ht.sent,Ht.abrupt("return",{status:jt.status,res:jt.res});case 16:case"end":return Ht.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.putBucketInventory=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.array.includes.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/deepCopy"),ft=xt.deepCopy,z=ot("../utils/isObject"),tt=z.isObject,at=ot("../utils/obj2xml"),it=at.obj2xml,lt=ot("../utils/checkObjectTag"),ut=lt.checkObjectTag,dt=ot("../utils/getStrBytesCount"),Pt=dt.getStrBytesCount,At=Bt;At.putBucketLifecycle=function(){var Gt=(0,Et.default)(gt.default.mark(function Yt(Ut,Vt,oe){var se,de,Se,Qt,ne;return gt.default.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(St(Ut),mt(Vt)){we.next=3;break}throw new Error("rules must be Array");case 3:return se=this._bucketRequestParams("PUT",Ut,"lifecycle",oe),de=[],Se={LifecycleConfiguration:{Rule:de}},Vt.forEach(function(be){Dt(be),Nt(be),be.id&&(be.ID=be.id,delete be.id),de.push(be)}),Qt=it(Se,{headers:!0,firstUpperCase:!0}),se.content=Qt,se.mime="xml",se.successStatuses=[200],we.next=13,this.request(se);case 13:return ne=we.sent,we.abrupt("return",{res:ne.res});case 15:case"end":return we.stop()}},Yt,this)}));function Ht(Yt,Ut,Vt){return Gt.apply(this,arguments)}return Ht}();function Dt(Gt){Gt.days&&(Gt.expiration={days:Gt.days}),Gt.date&&(Gt.expiration={createdBeforeDate:Gt.date})}function Ft(Gt,Ht){var Yt=Gt.days,Ut=Gt.createdBeforeDate;if(!Yt&&!Ut)throw new Error("".concat(Ht," must includes days or createdBeforeDate"));if(Yt&&!/^[1-9][0-9]*$/.test(Yt))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 Ht={},Yt=ft(Gt);Yt.forEach(function(Ut){Ht[Ut.key]=Ut.value}),ut(Ht)}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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.includes.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=Bt;xt.putBucketVersioning=function(){var ft=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=ot("../utils/isArray"),ft=xt.isArray,z=Bt;z.putBucketWebsite=function(){var tt=(0,Et.default)(gt.default.mark(function it(lt){var ut,dt,Pt,At,Dt,Ft,jt,Nt=arguments;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.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){Ht.next=14;break}if(ft(ut.routingRules)){Ht.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],Ht.next=20,this.request(Pt);case 20:return jt=Ht.sent,Ht.abrupt("return",{res:jt.res});case 22:case"end":return Ht.stop()}},it,this)}));function at(it){return tt.apply(this,arguments)}return at}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Bt.encodeCallback=function(Et,Ct){if(Et.headers=Et.headers||{},!Object.prototype.hasOwnProperty.call(Et.headers,"x-oss-callback")&&Ct.callback){var St={callbackUrl:encodeURI(Ct.callback.url),callbackBody:Ct.callback.body};Ct.callback.host&&(St.callbackHost=Ct.callback.host),Ct.callback.contentType&&(St.callbackBodyType=Ct.callback.contentType);var Tt=vt.from(JSON.stringify(St)).toString("base64");if(Et.headers["x-oss-callback"]=Tt,Ct.callback.customValue){var mt={};Object.keys(Ct.callback.customValue).forEach(function(xt){mt["x:".concat(xt)]=Ct.callback.customValue[xt].toString()}),Et.headers["x-oss-callback-var"]=vt.from(JSON.stringify(mt)).toString("base64")}}}}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var vt=function(ft){return ft&&ft.__esModule?ft:{default:ft}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getReqUrl=void 0;var gt=vt(ot("copy-to")),Et=vt(ot("url")),Ct=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&&Ct.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,Ct.default(it,lt)}return z.query=it,Et.default.format(z)}Bt.getReqUrl=xt},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.string.trim.js");var vt=ot("humanize-ms"),gt=ot("url"),Et=ot("../utils/checkBucketName"),Ct=Et.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}zt.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&Ct(z.bucket);var tt=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(tt.accessKeyId=tt.accessKeyId.trim(),tt.accessKeySecret=tt.accessKeySecret.trim(),tt.timeout&&(tt.timeout=vt(tt.timeout)),tt.endpoint)tt.endpoint=ft(tt.endpoint,tt.secure);else if(tt.region)tt.endpoint=Tt(tt.region,tt.internal,tt.secure);else throw new Error("require options.endpoint or options.region");return tt.inited=!0,tt}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(ot,zt,Bt){"use strict";var vt=ot("merge-descriptors"),gt=Bt;vt(gt,ot("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),St=Ct.checkBucketName,Tt=ot("querystring"),mt=ot("js-base64"),xt=mt.Base64.encode,ft=Bt;ft.processObjectSave=function(){var tt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.regexp.to-string.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("debug")("ali-oss:multipart-copy"),St=ot("copy-to"),Tt=Bt;Tt.uploadPartCopy=function(){var mt=(0,Et.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,Et.default)(gt.default.mark(function ft(z,tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Ht=arguments;return gt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return at=Ht.length>2&&Ht[2]!==void 0?Ht[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,Et.default)(gt.default.mark(function ft(z,tt,at){var it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Ht,Yt,Ut,Vt,oe,se,de,Se,Qt,ne;return gt.default.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(!this.isCancel()){we.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),Ht=function(fe,pe,ce){return new Promise(function(){var Ce=(0,Et.default)(gt.default.mark(function ve(Fe,ge){var xe,ee,Kt;return gt.default.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(Lt.prev=0,fe.isCancel()){Lt.next=22;break}return xe=jt[pe-1],ee="".concat(xe.start,"-").concat(xe.end-1),Lt.prev=4,Lt.next=7,fe.uploadPartCopy(Ft,At,pe,ee,ce,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 fe._makeAbortEvent();case 14:throw Lt.t0;case 15:if(fe.isCancel()){Lt.next=22;break}if(Ct("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()}},ve,null,[[0,25],[4,10]])}));return function(ve,Fe){return Ce.apply(this,arguments)}}())},Yt=Array.from(new Array(Nt),function(be,fe){return fe+1}),Ut=Dt.map(function(be){return be.number}),Vt=Yt.filter(function(be){return Ut.indexOf(be)<0}),oe=5,se=at.parallel||oe,!(this.checkBrowserAndVersion("Internet Explorer","10")||se===1)){we.next=28;break}de=0;case 18:if(!(de<Vt.length)){we.next=26;break}if(!this.isCancel()){we.next=21;break}throw this._makeCancelEvent();case 21:return we.next=23,Ht(this,Vt[de],tt);case 23:de++,we.next=18;break;case 26:we.next=40;break;case 28:return we.next=30,this._parallelNode(Vt,se,Ht,tt);case 30:if(Se=we.sent,Qt=Se.find(function(be){return be.name==="abort"}),!Qt){we.next=34;break}throw Qt;case 34:if(!this.isCancel()){we.next=36;break}throw this._makeCancelEvent();case 36:if(!(Se&&Se.length>0)){we.next=40;break}throw ne=Se[0],ne.message="Failed to copy some parts with error: ".concat(ne.toString()," part_num: ").concat(ne.partNum),ne;case 40:return we.next=42,this.completeMultipartUpload(Ft,At,Dt,at);case 42:return we.abrupt("return",we.sent);case 43:case"end":return we.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,Et.default)(gt.default.mark(function ft(z,tt,at){var it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return it=this.getBucket(),this.setBucket(z),dt.next=4,this.head(tt,at);case 4:return lt=dt.sent,this.setBucket(it),dt.abrupt("return",lt);case 7:case"end":return dt.stop()}},ft,this)}));function xt(ft,z,tt){return mt.apply(this,arguments)}return xt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),Et=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),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,Ct.default)(Et.default.mark(function dt(Pt,At){var Dt,Ft,jt,Nt;return Et.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.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],Ht.next=10,this.request(Ft);case 10:return jt=Ht.sent,Nt=jt.data.Upload||[],Array.isArray(Nt)||(Nt=[Nt]),Nt=Nt.map(function(Yt){return{name:Yt.Key,uploadId:Yt.UploadId,initiated:Yt.Initiated}}),Ht.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 Ht.stop()}},dt,this)}));function ut(dt,Pt){return lt.apply(this,arguments)}return ut}(),it.listParts=function(){var lt=(0,Ct.default)(Et.default.mark(function dt(Pt,At,Dt,Ft){var jt,Nt,Gt;return Et.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.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],Yt.next=10,this.request(Nt);case 10:return Gt=Yt.sent,Yt.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 Yt.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it.abortMultipartUpload=function(){var lt=(0,Ct.default)(Et.default.mark(function dt(Pt,At,Dt){var Ft,jt,Nt;return Et.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.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],Ht.next=9,this.request(jt);case 9:return Nt=Ht.sent,Ht.abrupt("return",{res:Nt.res});case 11:case"end":return Ht.stop()}},dt,this)}));function ut(dt,Pt,At){return lt.apply(this,arguments)}return ut}(),it.initMultipartUpload=function(){var lt=(0,Ct.default)(Et.default.mark(function dt(Pt,At){var Dt,Ft,jt;return Et.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,Ct.default)(Et.default.mark(function dt(Pt,At,Dt,Ft,jt,Nt,Gt){var Ht,Yt;return Et.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(Ht={size:Nt-jt},Yt=vt&&vt.browser,!Yt){Vt.next=8;break}return Vt.next=5,this._createBuffer(Ft,jt,Nt);case 5:Ht.content=Vt.sent,Vt.next=11;break;case 8:return Vt.next=10,this._createStream(Ft,jt,Nt);case 10:Ht.stream=Vt.sent;case 11:return Vt.next=13,this._uploadPart(Pt,At,Dt,Ht,Gt);case 13:return Vt.abrupt("return",Vt.sent);case 14:case"end":return Vt.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,Ct.default)(Et.default.mark(function dt(Pt,At,Dt,Ft){var jt,Nt,Gt,Ht,Yt,Ut,Vt,oe;return Et.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:for(jt=Dt.concat().sort(function(Se,Qt){return Se.number-Qt.number}).filter(function(Se,Qt,ne){return!Qt||Se.number!==ne[Qt-1].number}),Nt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Gt=0;Gt<jt.length;Gt++)Ht=jt[Gt],Nt+=`<Part>
|
|
`,Nt+="<PartNumber>".concat(Ht.number,`</PartNumber>
|
|
`),Nt+="<ETag>".concat(Ht.etag,`</ETag>
|
|
`),Nt+=`</Part>
|
|
`;return Nt+="</CompleteMultipartUpload>",Ft=Ft||{},Yt={},Yt=xt(Ft,function(Se){if(z(Se))return null}),Yt.subres={uploadId:At},Yt.headers=at(Yt.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ut=this._objectRequestParams("POST",Pt,Yt),Tt.encodeCallback(Ut,Yt),Ut.mime="xml",Ut.content=Nt,Ut.headers&&Ut.headers["x-oss-callback"]||(Ut.xmlResponse=!0),Ut.successStatuses=[200],de.next=17,this.request(Ut);case 17:if(Vt=de.sent,!Ft.progress){de.next=21;break}return de.next=21,Ft.progress(1,null,Vt.res);case 21:return oe={res:Vt.res,bucket:Ut.bucket,name:Pt,etag:Vt.res.headers.etag},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Vt.data.toString())),de.abrupt("return",oe);case 24:case"end":return de.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it._uploadPart=function(){var lt=(0,Ct.default)(Et.default.mark(function dt(Pt,At,Dt,Ft,jt){var Nt,Gt,Ht,Yt;return Et.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.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,Ht=vt&&vt.browser,Ht?Gt.content=Ft.content:Gt.stream=Ft.stream,Gt.successStatuses=[200],Gt.disabledMD5=jt.disabledMD5,Vt.next=15,this.request(Gt);case 15:if(Yt=Vt.sent,Yt.res.headers.etag){Vt.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
https://help.aliyun.com/document_detail/32069.html`);case 18:return Ft.stream&&(Ft.stream=null,Gt.stream=null),Vt.abrupt("return",{name:Pt,etag:Yt.res.headers.etag,res:Yt.res});case 20:case"end":return Vt.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=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,Et.default)(gt.default.mark(function Pt(At,Dt){var Ft,jt,Nt,Gt,Ht;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),Ht=Ct.parse(this._getReqUrl(jt)),Ht.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ft,Signature:Gt.Signature},Tt(Gt.subResource).to(Ht.query),Ut.abrupt("return",Ht.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var Et=vt(ot("@babel/runtime/helpers/typeof")),Ct=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,Ct.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,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.delete=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("utility"),St=ot("../utils/obj2xml"),Tt=St.obj2xml,mt=Bt;mt.deleteMulti=function(){var xt=(0,Et.default)(gt.default.mark(function z(tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Ht,Yt=arguments;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(at=Yt.length>1&&Yt[1]!==void 0?Yt[1]:{},it=[],!(!tt||!tt.length)){Vt.next=4;break}throw new Error("names is required");case 4:for(lt=0;lt<tt.length;lt++)ut={},typeof tt[lt]=="string"?ut.Key=Ct.escape(this._objectName(tt[lt])):(dt=tt[lt],Pt=dt.key,At=dt.versionId,ut.Key=Ct.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],Vt.next=16,this.request(jt);case 16:return Nt=Vt.sent,Gt=Nt.data,Ht=Gt&&Gt.Deleted||null,Ht&&(Array.isArray(Ht)||(Ht=[Ht])),Vt.abrupt("return",{res:Nt.res,deleted:Ht||[]});case 21:case"end":return Vt.stop()}},z,this)}));function ft(z){return xt.apply(this,arguments)}return ft}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.deleteObjectTagging=function(){var St=(0,Et.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,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js");var vt=ot("url"),gt=ot("../utils/isIP"),Et=gt.isIP,Ct=Bt;Ct.generateObjectUrl=function(Tt,mt){if(Et(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(mt)mt[mt.length-1]!=="/"&&(mt+="/");else{mt=this.options.endpoint.format();var xt=vt.parse(mt),ft=this.options.bucket;xt.hostname="".concat(ft,".").concat(xt.hostname),xt.host="".concat(ft,".").concat(xt.host),mt=xt.format()}return mt+this._escape(this._objectName(Tt))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),Et=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("fs"),Tt=ot("is-type-of"),mt=Bt;mt.get=function(){var xt=(0,Ct.default)(Et.default.mark(function z(tt,at){var it,lt,ut,dt,Pt,At,Dt,Ft,jt=arguments;return Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getACL=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt,St=ot("../utils/isObject"),Tt=St.isObject,mt=ot("../utils/isArray"),xt=mt.isArray;Ct.getBucketVersions=ft,Ct.listObjectVersions=ft;function ft(){return z.apply(this,arguments)}function z(){return z=(0,Et.default)(gt.default.mark(function it(){var lt,ut,dt,Pt,At,Dt,Ft,jt,Nt=arguments;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.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)){Ht.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),Ht.next=12,this.request(dt);case 12:return Pt=Ht.sent,At=Pt.data.Version||[],Dt=Pt.data.DeleteMarker||[],Ft=this,At&&(Array.isArray(At)||(At=[At]),At=At.map(function(Yt){return{name:Yt.Key,url:Ft._objectUrl(Yt.Key),lastModified:Yt.LastModified,isLatest:Yt.IsLatest==="true",versionId:Yt.VersionId,etag:Yt.ETag,type:Yt.Type,size:Number(Yt.Size),storageClass:Yt.StorageClass,owner:{id:Yt.Owner.ID,displayName:Yt.Owner.DisplayName}}})),Dt&&(xt(Dt)||(Dt=[Dt]),Dt=Dt.map(function(Yt){return{name:Yt.Key,lastModified:Yt.LastModified,versionId:Yt.VersionId,owner:{id:Yt.Owner.ID,displayName:Yt.Owner.DisplayName}}})),jt=Pt.data.CommonPrefixes||null,jt&&(xt(jt)||(jt=[jt]),jt=jt.map(function(Yt){return Yt.Prefix})),Ht.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 Ht.stop()}},it,this)})),z.apply(this,arguments)}function tt(it){return it.replace(/([A-Z])/g,"-$1").toLowerCase()}function at(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},lt={};return Tt(it)&&Object.keys(it).forEach(function(ut){lt[tt(ut)]=it[ut]}),lt}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getObjectMeta=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt,St=ot("../utils/isObject"),Tt=St.isObject;Ct.getObjectTagging=function(){var mt=(0,Et.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,zt,Bt){"use strict";var vt=ot("../utils/isIP"),gt=vt.isIP,Et=Bt;Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getSymlink=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkEnv"),St=Ct.checkEnv,Tt=Bt;Tt.head=function(){var mt=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.putACL=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.object.keys.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/obj2xml"),St=Ct.obj2xml,Tt=ot("../utils/checkObjectTag"),mt=Tt.checkObjectTag,xt=Bt;xt.putObjectTagging=function(){var ft=(0,Et.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,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.putSymlink=function(){var St=(0,Et.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,zt,Bt){"use strict";var vt=ot("url"),gt=ot("utility"),Et=ot("copy-to"),Ct=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=Ct._signatureForURL(this.options.accessKeySecret,z,it,tt),ut=vt.parse(this._getReqUrl(at));return ut.query={OSSAccessKeyId:this.options.accessKeyId,Expires:tt,Signature:lt.Signature},Et(lt.subResource).to(ut.query),ut.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.function.name.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("./utils/isArray"),St=Ct.isArray,Tt=Bt;Tt._parallelNode=function(){var mt=(0,Et.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 Ht=Gt;Gt=null;for(var Yt=arguments.length,Ut=new Array(Yt),Vt=0;Vt<Yt;Vt++)Ut[Vt]=arguments[Vt];Ht.apply(this,Ut)}}function ut(Gt){var Ht=-1,Yt=Gt.length;return function(){return++Ht<Yt&&!tt.isCancel()?{value:Gt[Ht],key:Ht}: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,Ht){z(Gt).then(function(Yt){Ht(null,Yt)}).catch(function(Yt){Ht(Yt)})}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,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var gt=ot("./../../shims/crypto/crypto.js"),Et=ot("is-type-of"),Ct=ot("./utils/lowercaseKeyHeader"),St=Ct.lowercaseKeyHeader;Bt.buildCanonicalizedResource=function(mt,xt){var ft="".concat(mt),z="?";if(Et.string(xt)&&xt.trim()!=="")ft+=z+xt;else if(Et.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,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkBucketName=void 0,Bt.checkBucketName=function(vt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=gt?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!Et.test(vt))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkConfigValid=void 0;var vt={endpoint:gt,region:/^[a-zA-Z0-9\-_]+$/};function gt(Et){return typeof Et=="string"?/^[a-zA-Z0-9._:/-]+$/.test(Et):Et.host?/^[a-zA-Z0-9._:/-]+$/.test(Et.host):!1}Bt.checkConfigValid=function(Et,Ct){if(vt[Ct]){var St=!0;if(vt[Ct]instanceof Function?St=vt[Ct](Et):St=vt[Ct].test(Et),!St)throw new Error("The ".concat(Ct," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkEnv=void 0;function gt(Et){vt.browser&&console.warn(Et)}Bt.checkEnv=gt}).call(this)}).call(this,ot("_process"))},{_process:467}],54:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkObjectTag=void 0;var vt=ot("./checkValid"),gt=vt.checkValid,Et=ot("./isObject"),Ct=Et.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(!Ct(xt))throw new Error("tag must be Object");var ft=Object.entries(xt);if(ft.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];ft.forEach(function(tt){tt.forEach(function(at,it){gt(at,Tt[z[it]])})})}Bt.checkObjectTag=mt},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkValid=void 0;function vt(gt,Et){Et.forEach(function(Ct){if(Ct.validator)Ct.validator(gt);else if(Ct.pattern&&!Ct.pattern.test(gt))throw new Error(Ct.msg)})}Bt.checkValid=vt},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.createRequest=void 0;var gt=ot("./../../../shims/crypto/crypto.js"),Et=ot("debug")("ali-oss"),Ct=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"]=Ct.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 Ht=Object.prototype.hasOwnProperty;for(var Yt in Gt)Gt[Yt]&&Ht.call(Gt,Yt)&&(Gt[Yt]=ft(String(Gt[Yt]),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 Vt=this.options,oe=Vt.region,se=Vt.internal,de=Vt.secure,Se=it(oe,se,de);Gt.host="".concat(jt.bucket,".").concat(Se.host)}var Qt=ut.bind(this)(jt);Et("request %s %s, with headers %j, !!stream: %s",jt.method,Qt,Gt,!!jt.stream);var ne=jt.timeout||this.options.timeout,ye={method:jt.method,content:jt.content,stream:jt.stream,headers:Gt,timeout:ne,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:Qt,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,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.dataFix=void 0;var vt=ot("./isObject"),gt=["true","TRUE","1",1],Et=["false","FALSE","0",0];function Ct(mt,xt,ft){if(vt.isObject(mt)){var z=xt.remove,tt=z===void 0?[]:z,at=xt.rename,it=at===void 0?{}:at,lt=xt.camel,ut=lt===void 0?[]:lt,dt=xt.bool,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),Ct}}Bt.dataFix=Ct;function St(mt){return mt?gt.includes(mt)?!0:Et.includes(mt)?!1:mt:!1}function Tt(mt,xt){xt&&Object.keys(mt).forEach(function(ft){var z=ft.replace(/^\w/,function(tt){return tt.toLowerCase()});typeof mt[z]=="undefined"&&(mt[z]=mt[ft],delete mt[ft])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deepCopyWith=Bt.deepCopy=void 0;var Et=ot("./isBuffer");Bt.deepCopy=function(Ct){if(Ct===null||(0,gt.default)(Ct)!=="object")return Ct;if(Et.isBuffer(Ct))return Ct.slice();var St=Array.isArray(Ct)?[]:{};return Object.keys(Ct).forEach(function(Tt){St[Tt]=Bt.deepCopy(Ct[Tt])}),St},Bt.deepCopyWith=function(Ct,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(Et.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(Ct,"",null):Bt.deepCopy(Ct)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.encoder=void 0;function gt(Et){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ct==="utf-8"?Et:vt.from(Et).toString("latin1")}Bt.encoder=gt}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatInventoryConfig=void 0;var vt=ot("../utils/dataFix"),gt=ot("../utils/isObject"),Et=ot("../utils/isArray"),Ct=ot("../utils/formatObjKey");function St(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xt&>.isObject(mt)&&(mt=[mt]),Et.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&&!Et.isArray((z=xt.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xt.OptionalFields.Field=[xt.OptionalFields.Field])}),mt=Ct.formatObjKey(mt,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),mt}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatObjKey=void 0;function Et(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(Et(St[ft],Tt,mt))}else xt={},Object.keys(St).forEach(function(z){xt[Ct(z,Tt,mt)]=Et(St[z],Tt,mt)});return xt}Bt.formatObjKey=Et;function Ct(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,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getStrBytesCount=void 0;function vt(gt){for(var Et=0,Ct=0;Ct<gt.length;Ct++){var St=gt.charAt(Ct);/^[\u00-\uff]$/.test(St)?Et+=1:Et+=2}return Et}Bt.getStrBytesCount=vt},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isArray=void 0,Bt.isArray=function(vt){return Object.prototype.toString.call(vt)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBlob=void 0;function vt(gt){return typeof Blob!="undefined"&> instanceof Blob}Bt.isBlob=vt},{}],65:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBuffer=void 0;function gt(Et){return vt.isBuffer(Et)}Bt.isBuffer=gt}).call(this)}).call(this,{isBuffer:ot("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isDingTalk=void 0;function gt(){return!!(vt.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Bt.isDingTalk=gt}).call(this)}).call(this,ot("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFile=void 0,Bt.isFile=function(vt){return typeof File!="undefined"&&vt instanceof File}},{}],68:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFunction=void 0,Bt.isFunction=function(vt){return typeof vt=="function"}},{}],69:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isIP=void 0,Bt.isIP=function(vt){var gt=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,Et=/^\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)||Et.test(vt)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isObject=void 0,Bt.isObject=function(vt){return Object.prototype.toString.call(vt)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.lowercaseKeyHeader=void 0;var vt=ot("./isObject");function gt(Et){var Ct={};return vt.isObject(Et)&&Object.keys(Et).forEach(function(St){Ct[St.toLowerCase()]=Et[St]}),Ct}Bt.lowercaseKeyHeader=gt},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.obj2xml=void 0;var vt=ot("./formatObjKey");function gt(Ct){return Object.prototype.toString.call(Ct).replace(/(.*? |])/g,"").toLowerCase()}function Et(Ct,St){var Tt="";return St&&St.headers&&(Tt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),St&&St.firstUpperCase&&(Ct=vt.formatObjKey(Ct,"firstUpperCase")),gt(Ct)==="object"?Object.keys(Ct).forEach(function(mt){gt(Ct[mt])!=="undefined"&>(Ct[mt])!=="null"&&(gt(Ct[mt])==="string"||gt(Ct[mt])==="number"?Tt+="<".concat(mt,">").concat(Ct[mt],"</").concat(mt,">"):gt(Ct[mt])==="object"?Tt+="<".concat(mt,">").concat(Et(Ct[mt]),"</").concat(mt,">"):gt(Ct[mt])==="array"?Tt+=Ct[mt].map(function(xt){return"<".concat(mt,">").concat(Et(xt),"</").concat(mt,">")}).join(""):Tt+="<".concat(mt,">").concat(Ct[mt].toString(),"</").concat(mt,">"))}):Tt+=Ct.toString(),Tt}Bt.obj2xml=Et},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.symbol.js"),ot("core-js/modules/es.symbol.description.js"),ot("core-js/modules/es.symbol.iterator.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/es.object.assign.js");function vt(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 Et(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 Et(St,Tt)}}function Et(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 Ct(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=Ct},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.retry=void 0;function vt(gt,Et){var Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},St=0,Tt=Ct.retryDelay,mt=Tt===void 0?500:Tt,xt=Ct.errorHandler,ft=xt===void 0?function(){return!0}:xt,z=function tt(){for(var at=arguments.length,it=new Array(at),lt=0;lt<at;lt++)it[lt]=arguments[lt];return new Promise(function(ut,dt){gt.apply(void 0,it).then(function(Pt){St=0,ut(Pt)}).catch(function(Pt){St<Et&&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,zt,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")),Et=ot("./checkConfigValid");function Ct(St){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Et.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=Ct},{"./checkConfigValid":52,url:472}],76:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.object.assign.js");var Et=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkCredentials=Bt.setSTSToken=void 0;var Ct=ot("./formatObjKey");function St(){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,Et.default)(gt.default.mark(function xt(){var ft,z;return gt.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(this.options||(this.options={}),ft=new Date,!this.stsTokenFreshTime){at.next=14;break}if(!(+ft-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){at.next=12;break}return this.stsTokenFreshTime=ft,at.next=7,this.options.refreshSTSToken();case 7:z=at.sent,z=Ct.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),mt(z),Object.assign(this.options,z);case 12:at.next=15;break;case 14:this.stsTokenFreshTime=ft;case 15:return at.abrupt("return",null);case 16:case"end":return at.stop()}},xt,this)})),Tt.apply(this,arguments)}Bt.setSTSToken=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,zt,Bt){function vt(Et,Ct,St,Tt,mt,xt,ft){try{var z=Et[xt](ft),tt=z.value}catch(at){St(at);return}z.done?Ct(tt):Promise.resolve(tt).then(Tt,mt)}function gt(Et){return function(){var Ct=this,St=arguments;return new Promise(function(Tt,mt){var xt=Et.apply(Ct,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)})}}zt.exports=gt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],78:[function(ot,zt,Bt){function vt(gt){return gt&>.__esModule?gt:{default:gt}}zt.exports=vt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],79:[function(ot,zt,Bt){function vt(gt){"@babel/helpers - typeof";return zt.exports=vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Et){return typeof Et}:function(Et){return Et&&typeof Symbol=="function"&&Et.constructor===Symbol&&Et!==Symbol.prototype?"symbol":typeof Et},zt.exports.__esModule=!0,zt.exports.default=zt.exports,vt(gt)}zt.exports=vt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],80:[function(ot,zt,Bt){zt.exports=ot("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ot,zt,Bt){zt.exports=vt,zt.exports.HttpsAgent=vt;function vt(){}},{}],82:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("object-assign");function Et(oe,se){if(oe===se)return 0;for(var de=oe.length,Se=se.length,Qt=0,ne=Math.min(de,Se);Qt<ne;++Qt)if(oe[Qt]!==se[Qt]){de=oe[Qt],Se=se[Qt];break}return de<Se?-1:Se<de?1:0}function Ct(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 Ct(oe)||typeof vt.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(oe):oe?!!(oe instanceof DataView||oe.buffer&&oe.buffer instanceof ArrayBuffer):!1}var tt=zt.exports=At,at=/\s*function\s+([^\(\s]*)\s*/;function it(oe){if(St.isFunction(oe)){if(xt)return oe.name;var se=oe.toString(),de=se.match(at);return de&&de[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 de=se.stackStartFunction||Pt;if(Error.captureStackTrace)Error.captureStackTrace(this,de);else{var Se=new Error;if(Se.stack){var Qt=Se.stack,ne=it(de),ye=Qt.indexOf(`
|
|
`+ne);if(ye>=0){var we=Qt.indexOf(`
|
|
`,ye+1);Qt=Qt.substring(we+1)}this.stack=Qt}}},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),de=se?": "+se:"";return"[Function"+de+"]"}function dt(oe){return lt(ut(oe.actual),128)+" "+oe.operator+" "+lt(ut(oe.expected),128)}function Pt(oe,se,de,Se,Qt){throw new tt.AssertionError({message:de,actual:oe,expected:se,operator:Se,stackStartFunction:Qt})}tt.fail=Pt;function At(oe,se){oe||Pt(oe,!0,se,"==",tt.ok)}tt.ok=At,tt.equal=function(se,de,Se){se!=de&&Pt(se,de,Se,"==",tt.equal)},tt.notEqual=function(se,de,Se){se==de&&Pt(se,de,Se,"!=",tt.notEqual)},tt.deepEqual=function(se,de,Se){Dt(se,de,!1)||Pt(se,de,Se,"deepEqual",tt.deepEqual)},tt.deepStrictEqual=function(se,de,Se){Dt(se,de,!0)||Pt(se,de,Se,"deepStrictEqual",tt.deepStrictEqual)};function Dt(oe,se,de,Se){if(oe===se)return!0;if(Ct(oe)&&Ct(se))return Et(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 de?oe===se:oe==se;if(z(oe)&&z(se)&&ft(oe)===ft(se)&&!(oe instanceof Float32Array||oe instanceof Float64Array))return Et(new Uint8Array(oe.buffer),new Uint8Array(se.buffer))===0;if(Ct(oe)!==Ct(se))return!1;Se=Se||{actual:[],expected:[]};var Qt=Se.actual.indexOf(oe);return Qt!==-1&&Qt===Se.expected.indexOf(se)?!0:(Se.actual.push(oe),Se.expected.push(se),jt(oe,se,de,Se))}function Ft(oe){return Object.prototype.toString.call(oe)=="[object Arguments]"}function jt(oe,se,de,Se){if(oe==null||se===null||se===void 0)return!1;if(St.isPrimitive(oe)||St.isPrimitive(se))return oe===se;if(de&&Object.getPrototypeOf(oe)!==Object.getPrototypeOf(se))return!1;var Qt=Ft(oe),ne=Ft(se);if(Qt&&!ne||!Qt&&ne)return!1;if(Qt)return oe=mt.call(oe),se=mt.call(se),Dt(oe,se,de);var ye=Vt(oe),we=Vt(se),be,fe;if(ye.length!==we.length)return!1;for(ye.sort(),we.sort(),fe=ye.length-1;fe>=0;fe--)if(ye[fe]!==we[fe])return!1;for(fe=ye.length-1;fe>=0;fe--)if(be=ye[fe],!Dt(oe[be],se[be],de,Se))return!1;return!0}tt.notDeepEqual=function(se,de,Se){Dt(se,de,!1)&&Pt(se,de,Se,"notDeepEqual",tt.notDeepEqual)},tt.notDeepStrictEqual=Nt;function Nt(oe,se,de){Dt(oe,se,!0)&&Pt(oe,se,de,"notDeepStrictEqual",Nt)}tt.strictEqual=function(se,de,Se){se!==de&&Pt(se,de,Se,"===",tt.strictEqual)},tt.notStrictEqual=function(se,de,Se){se===de&&Pt(se,de,Se,"!==",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(de){}return Error.isPrototypeOf(se)?!1:se.call({},oe)===!0}function Ht(oe){var se;try{oe()}catch(de){se=de}return se}function Yt(oe,se,de,Se){var Qt;if(typeof se!="function")throw new TypeError('"block" argument must be a function');typeof de=="string"&&(Se=de,de=null),Qt=Ht(se),Se=(de&&de.name?" ("+de.name+").":".")+(Se?" "+Se:"."),oe&&!Qt&&Pt(Qt,de,"Missing expected exception"+Se);var ne=typeof Se=="string",ye=!oe&&St.isError(Qt),we=!oe&&Qt&&!de;if((ye&&ne&&Gt(Qt,de)||we)&&Pt(Qt,de,"Got unwanted exception"+Se),oe&&Qt&&de&&!Gt(Qt,de)||!oe&&Qt)throw Qt}tt.throws=function(oe,se,de){Yt(!0,oe,se,de)},tt.doesNotThrow=function(oe,se,de){Yt(!1,oe,se,de)},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 Vt=Object.keys||function(oe){var se=[];for(var de in oe)Tt.call(oe,de)&&se.push(de);return se}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ot,zt,Bt){typeof Object.create=="function"?zt.exports=function(gt,Et){gt.super_=Et,gt.prototype=Object.create(Et.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}})}:zt.exports=function(gt,Et){gt.super_=Et;var Ct=function(){};Ct.prototype=Et.prototype,gt.prototype=new Ct,gt.prototype.constructor=gt}},{}],84:[function(ot,zt,Bt){zt.exports=function(gt){return gt&&typeof gt=="object"&&typeof gt.copy=="function"&&typeof gt.fill=="function"&&typeof gt.readUInt8=="function"}},{}],85:[function(ot,zt,Bt){(function(vt,gt){(function(){var Et=/%[sdj%]/g;Bt.format=function(we){if(!jt(we)){for(var be=[],fe=0;fe<arguments.length;fe++)be.push(Tt(arguments[fe]));return be.join(" ")}for(var fe=1,pe=arguments,ce=pe.length,Ce=String(we).replace(Et,function(Fe){if(Fe==="%%")return"%";if(fe>=ce)return Fe;switch(Fe){case"%s":return String(pe[fe++]);case"%d":return Number(pe[fe++]);case"%j":try{return JSON.stringify(pe[fe++])}catch(ge){return"[Circular]"}default:return Fe}}),ve=pe[fe];fe<ce;ve=pe[++fe])At(ve)||!Yt(ve)?Ce+=" "+ve:Ce+=" "+Tt(ve);return Ce},Bt.deprecate=function(we,be){if(Gt(gt.process))return function(){return Bt.deprecate(we,be).apply(this,arguments)};if(vt.noDeprecation===!0)return we;var fe=!1;function pe(){if(!fe){if(vt.throwDeprecation)throw new Error(be);vt.traceDeprecation?console.trace(be):console.error(be),fe=!0}return we.apply(this,arguments)}return pe};var Ct={},St;Bt.debuglog=function(we){if(Gt(St)&&(St=vt.env.NODE_DEBUG||""),we=we.toUpperCase(),!Ct[we])if(new RegExp("\\b"+we+"\\b","i").test(St)){var be=vt.pid;Ct[we]=function(){var fe=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",we,be,fe)}}else Ct[we]=function(){};return Ct[we]};function Tt(we,be){var fe={seen:[],stylize:xt};return arguments.length>=3&&(fe.depth=arguments[2]),arguments.length>=4&&(fe.colors=arguments[3]),Pt(be)?fe.showHidden=be:be&&Bt._extend(fe,be),Gt(fe.showHidden)&&(fe.showHidden=!1),Gt(fe.depth)&&(fe.depth=2),Gt(fe.colors)&&(fe.colors=!1),Gt(fe.customInspect)&&(fe.customInspect=!0),fe.colors&&(fe.stylize=mt),z(fe,we,fe.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(we,be){var fe=Tt.styles[be];return fe?"\x1B["+Tt.colors[fe][0]+"m"+we+"\x1B["+Tt.colors[fe][1]+"m":we}function xt(we,be){return we}function ft(we){var be={};return we.forEach(function(fe,pe){be[fe]=!0}),be}function z(we,be,fe){if(we.customInspect&&be&&oe(be.inspect)&&be.inspect!==Bt.inspect&&!(be.constructor&&be.constructor.prototype===be)){var pe=be.inspect(fe,we);return jt(pe)||(pe=z(we,pe,fe)),pe}var ce=tt(we,be);if(ce)return ce;var Ce=Object.keys(be),ve=ft(Ce);if(we.showHidden&&(Ce=Object.getOwnPropertyNames(be)),Vt(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 we.stylize("[Function"+Fe+"]","special")}if(Ht(be))return we.stylize(RegExp.prototype.toString.call(be),"regexp");if(Ut(be))return we.stylize(Date.prototype.toString.call(be),"date");if(Vt(be))return at(be)}var ge="",xe=!1,ee=["{","}"];if(dt(be)&&(xe=!0,ee=["[","]"]),oe(be)){var Kt=be.name?": "+be.name:"";ge=" [Function"+Kt+"]"}if(Ht(be)&&(ge=" "+RegExp.prototype.toString.call(be)),Ut(be)&&(ge=" "+Date.prototype.toUTCString.call(be)),Vt(be)&&(ge=" "+at(be)),Ce.length===0&&(!xe||be.length==0))return ee[0]+ge+ee[1];if(fe<0)return Ht(be)?we.stylize(RegExp.prototype.toString.call(be),"regexp"):we.stylize("[Object]","special");we.seen.push(be);var wt;return xe?wt=it(we,be,fe,ve,Ce):wt=Ce.map(function(Lt){return lt(we,be,fe,ve,Lt,xe)}),we.seen.pop(),ut(wt,ge,ee)}function tt(we,be){if(Gt(be))return we.stylize("undefined","undefined");if(jt(be)){var fe="'"+JSON.stringify(be).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return we.stylize(fe,"string")}if(Ft(be))return we.stylize(""+be,"number");if(Pt(be))return we.stylize(""+be,"boolean");if(At(be))return we.stylize("null","null")}function at(we){return"["+Error.prototype.toString.call(we)+"]"}function it(we,be,fe,pe,ce){for(var Ce=[],ve=0,Fe=be.length;ve<Fe;++ve)ye(be,String(ve))?Ce.push(lt(we,be,fe,pe,String(ve),!0)):Ce.push("");return ce.forEach(function(ge){ge.match(/^\d+$/)||Ce.push(lt(we,be,fe,pe,ge,!0))}),Ce}function lt(we,be,fe,pe,ce,Ce){var ve,Fe,ge;if(ge=Object.getOwnPropertyDescriptor(be,ce)||{value:be[ce]},ge.get?ge.set?Fe=we.stylize("[Getter/Setter]","special"):Fe=we.stylize("[Getter]","special"):ge.set&&(Fe=we.stylize("[Setter]","special")),ye(pe,ce)||(ve="["+ce+"]"),Fe||(we.seen.indexOf(ge.value)<0?(At(fe)?Fe=z(we,ge.value,null):Fe=z(we,ge.value,fe-1),Fe.indexOf(`
|
|
`)>-1&&(Ce?Fe=Fe.split(`
|
|
`).map(function(xe){return" "+xe}).join(`
|
|
`).substr(2):Fe=`
|
|
`+Fe.split(`
|
|
`).map(function(xe){return" "+xe}).join(`
|
|
`))):Fe=we.stylize("[Circular]","special")),Gt(ve)){if(Ce&&ce.match(/^\d+$/))return Fe;ve=JSON.stringify(""+ce),ve.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ve=ve.substr(1,ve.length-2),ve=we.stylize(ve,"name")):(ve=ve.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ve=we.stylize(ve,"string"))}return ve+": "+Fe}function ut(we,be,fe){var pe=0,ce=we.reduce(function(Ce,ve){return pe++,ve.indexOf(`
|
|
`)>=0&&pe++,Ce+ve.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?fe[0]+(be===""?"":be+`
|
|
`)+" "+we.join(`,
|
|
`)+" "+fe[1]:fe[0]+be+" "+we.join(", ")+" "+fe[1]}function dt(we){return Array.isArray(we)}Bt.isArray=dt;function Pt(we){return typeof we=="boolean"}Bt.isBoolean=Pt;function At(we){return we===null}Bt.isNull=At;function Dt(we){return we==null}Bt.isNullOrUndefined=Dt;function Ft(we){return typeof we=="number"}Bt.isNumber=Ft;function jt(we){return typeof we=="string"}Bt.isString=jt;function Nt(we){return typeof we=="symbol"}Bt.isSymbol=Nt;function Gt(we){return we===void 0}Bt.isUndefined=Gt;function Ht(we){return Yt(we)&&de(we)==="[object RegExp]"}Bt.isRegExp=Ht;function Yt(we){return typeof we=="object"&&we!==null}Bt.isObject=Yt;function Ut(we){return Yt(we)&&de(we)==="[object Date]"}Bt.isDate=Ut;function Vt(we){return Yt(we)&&(de(we)==="[object Error]"||we instanceof Error)}Bt.isError=Vt;function oe(we){return typeof we=="function"}Bt.isFunction=oe;function se(we){return we===null||typeof we=="boolean"||typeof we=="number"||typeof we=="string"||typeof we=="symbol"||typeof we=="undefined"}Bt.isPrimitive=se,Bt.isBuffer=ot("./support/isBuffer");function de(we){return Object.prototype.toString.call(we)}function Se(we){return we<10?"0"+we.toString(10):we.toString(10)}var Qt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ne(){var we=new Date,be=[Se(we.getHours()),Se(we.getMinutes()),Se(we.getSeconds())].join(":");return[we.getDate(),Qt[we.getMonth()],be].join(" ")}Bt.log=function(){console.log("%s - %s",ne(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(we,be){if(!be||!Yt(be))return we;for(var fe=Object.keys(be),pe=fe.length;pe--;)we[fe[pe]]=be[fe[pe]];return we};function ye(we,be){return Object.prototype.hasOwnProperty.call(we,be)}}).call(this)}).call(this,ot("_process"),typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Et=typeof globalThis=="undefined"?vt:globalThis;zt.exports=function(){for(var St=[],Tt=0;Tt<gt.length;Tt++)typeof Et[gt[Tt]]=="function"&&(St[St.length]=gt[Tt]);return St}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ot,zt,Bt){"use strict";Bt.byteLength=xt,Bt.toByteArray=z,Bt.fromByteArray=it;for(var vt=[],gt=[],Et=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St=0,Tt=Ct.length;St<Tt;++St)vt[St]=Ct[St],gt[Ct.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 Et(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,zt,Bt){(function(vt,gt,Et){typeof zt!="undefined"&&zt.exports?zt.exports=Et():typeof he=="function"&&he.amd?he(gt,Et):vt[gt]=Et()})(this,"bowser",function(){var vt=!0;function gt(ft){function z(be){var fe=ft.match(be);return fe&&fe.length>1&&fe[1]||""}function tt(be){var fe=ft.match(be);return fe&&fe.length>1&&fe[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),Ht=!Nt&&/windows/i.test(ft),Yt=!at&&!At&&/macintosh/i.test(ft),Ut=!lt&&!Dt&&!Ft&&!jt&&/linux/i.test(ft),Vt=tt(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),oe=z(/version\/(\d+(\.\d+)?)/i),se=/tablet/i.test(ft)&&!/tablet pc/i.test(ft),de=!se&&/[^-]mobi/i.test(ft),Se=/xbox/i.test(ft),Qt;/opera/i.test(ft)?Qt={name:"Opera",opera:vt,version:oe||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(ft)?Qt={name:"Opera",opera:vt,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||oe}:/SamsungBrowser/i.test(ft)?Qt={name:"Samsung Internet for Android",samsungBrowser:vt,version:oe||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(ft)?Qt={name:"NAVER Whale browser",whale:vt,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(ft)?Qt={name:"MZ Browser",mzbrowser:vt,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(ft)?Qt={name:"Opera Coast",coast:vt,version:oe||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(ft)?Qt={name:"Focus",focus:vt,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(ft)?Qt={name:"Yandex Browser",yandexbrowser:vt,version:oe||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(ft)?Qt={name:"UC Browser",ucbrowser:vt,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(ft)?Qt={name:"Maxthon",maxthon:vt,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(ft)?Qt={name:"Epiphany",epiphany:vt,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(ft)?Qt={name:"Puffin",puffin:vt,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(ft)?Qt={name:"Sleipnir",sleipnir:vt,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(ft)?Qt={name:"K-Meleon",kMeleon:vt,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Nt?(Qt={name:"Windows Phone",osname:"Windows Phone",windowsphone:vt},Vt?(Qt.msedge=vt,Qt.version=Vt):(Qt.msie=vt,Qt.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(ft)?Qt={name:"Internet Explorer",msie:vt,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Pt?Qt={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)?Qt={name:"Microsoft Edge",msedge:vt,version:Vt}:/vivaldi/i.test(ft)?Qt={name:"Vivaldi",vivaldi:vt,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||oe}:Dt?Qt={name:"Sailfish",osname:"Sailfish OS",sailfish:vt,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(ft)?Qt={name:"SeaMonkey",seamonkey:vt,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(ft)?(Qt={name:"Firefox",firefox:vt,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ft)&&(Qt.firefoxos=vt,Qt.osname="Firefox OS")):At?Qt={name:"Amazon Silk",silk:vt,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(ft)?Qt={name:"PhantomJS",phantom:vt,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(ft)?Qt={name:"SlimerJS",slimer:vt,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(ft)||/rim\stablet/i.test(ft)?Qt={name:"BlackBerry",osname:"BlackBerry OS",blackberry:vt,version:oe||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:jt?(Qt={name:"WebOS",osname:"WebOS",webos:vt,version:oe||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(ft)&&(Qt.touchpad=vt)):/bada/i.test(ft)?Qt={name:"Bada",osname:"Bada",bada:vt,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Ft?Qt={name:"Tizen",osname:"Tizen",tizen:vt,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||oe}:/qupzilla/i.test(ft)?Qt={name:"QupZilla",qupzilla:vt,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||oe}:/chromium/i.test(ft)?Qt={name:"Chromium",chromium:vt,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||oe}:/chrome|crios|crmo/i.test(ft)?Qt={name:"Chrome",chrome:vt,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:lt?Qt={name:"Android",version:oe}:/safari|applewebkit/i.test(ft)?(Qt={name:"Safari",safari:vt},oe&&(Qt.version=oe)):at?(Qt={name:at=="iphone"?"iPhone":at=="ipad"?"iPad":"iPod"},oe&&(Qt.version=oe)):/googlebot/i.test(ft)?Qt={name:"Googlebot",googlebot:vt,version:z(/googlebot\/(\d+(\.\d+))/i)||oe}:Qt={name:z(/^(.*)\/(.*) /),version:tt(/^(.*)\/(.*) /)},!Qt.msedge&&/(apple)?webkit/i.test(ft)?(/(apple)?webkit\/537\.36/i.test(ft)?(Qt.name=Qt.name||"Blink",Qt.blink=vt):(Qt.name=Qt.name||"Webkit",Qt.webkit=vt),!Qt.version&&oe&&(Qt.version=oe)):!Qt.opera&&/gecko\//i.test(ft)&&(Qt.name=Qt.name||"Gecko",Qt.gecko=vt,Qt.version=Qt.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Qt.windowsphone&&(lt||Qt.silk)?(Qt.android=vt,Qt.osname="Android"):!Qt.windowsphone&&at?(Qt[at]=vt,Qt.ios=vt,Qt.osname="iOS"):Yt?(Qt.mac=vt,Qt.osname="macOS"):Se?(Qt.xbox=vt,Qt.osname="Xbox"):Ht?(Qt.windows=vt,Qt.osname="Windows"):Ut&&(Qt.linux=vt,Qt.osname="Linux");function ne(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="";Qt.windows?ye=ne(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Qt.windowsphone?ye=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Qt.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):Qt.webos?ye=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Qt.blackberry?ye=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Qt.bada?ye=z(/bada\/(\d+(\.\d+)*)/i):Qt.tizen&&(ye=z(/tizen[\/\s](\d+(\.\d+)*)/i)),ye&&(Qt.osversion=ye);var we=!Qt.windows&&ye.split(".")[0];return se||dt||at=="ipad"||lt&&(we==3||we>=4&&!de)||Qt.silk?Qt.tablet=vt:(de||at=="iphone"||at=="ipod"||lt||ut||Qt.blackberry||Qt.webos||Qt.bada)&&(Qt.mobile=vt),Qt.msedge||Qt.msie&&Qt.version>=10||Qt.yandexbrowser&&Qt.version>=15||Qt.vivaldi&&Qt.version>=1||Qt.chrome&&Qt.version>=20||Qt.samsungBrowser&&Qt.version>=4||Qt.whale&&Tt([Qt.version,"1.0"])===1||Qt.mzbrowser&&Tt([Qt.version,"6.0"])===1||Qt.focus&&Tt([Qt.version,"1.0"])===1||Qt.firefox&&Qt.version>=20||Qt.safari&&Qt.version>=6||Qt.opera&&Qt.version>=10||Qt.ios&&Qt.osversion&&Qt.osversion.split(".")[0]>=6||Qt.blackberry&&Qt.version>=10.1||Qt.chromium&&Qt.version>=20?Qt.a=vt:Qt.msie&&Qt.version<10||Qt.chrome&&Qt.version<20||Qt.firefox&&Qt.version<20||Qt.safari&&Qt.version<6||Qt.opera&&Qt.version<10||Qt.ios&&Qt.osversion&&Qt.osversion.split(".")[0]<6||Qt.chromium&&Qt.version<20?Qt.c=vt:Qt.x=vt,Qt}var Et=gt(typeof navigator!="undefined"&&navigator.userAgent||"");Et.test=function(ft){for(var z=0;z<ft.length;++z){var tt=ft[z];if(typeof tt=="string"&&tt in Et)return!0}return!1};function Ct(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(Ct(ft[0]),Ct(ft[1])),tt=St(ft,function(at){var it=z-Ct(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=Et;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 Et.isUnsupportedBrowser=mt,Et.compareVersions=Tt,Et.check=xt,Et._detect=gt,Et.detect=gt,Et})},{}],89:[function(ot,zt,Bt){},{}],90:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("base64-js"),Et=ot("ieee754");Bt.Buffer=mt,Bt.SlowBuffer=Pt,Bt.INSPECT_MAX_BYTES=50;var Ct=2147483647;Bt.kMaxLength=Ct,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(Wt){return!1}}Object.defineProperty(mt.prototype,"parent",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.buffer}}),Object.defineProperty(mt.prototype,"offset",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.byteOffset}});function Tt(Rt){if(Rt>Ct)throw new RangeError('The value "'+Rt+'" is invalid for option "size"');var Wt=new Uint8Array(Rt);return Wt.__proto__=mt.prototype,Wt}function mt(Rt,Wt,te){if(typeof Rt=="number"){if(typeof Wt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tt(Rt)}return xt(Rt,Wt,te)}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,Wt,te){if(typeof Rt=="string")return at(Rt,Wt);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(re(Rt,ArrayBuffer)||Rt&&re(Rt.buffer,ArrayBuffer))return lt(Rt,Wt,te);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,Wt,te);var le=ut(Rt);if(le)return le;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Rt[Symbol.toPrimitive]=="function")return mt.from(Rt[Symbol.toPrimitive]("string"),Wt,te);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,Wt,te){return xt(Rt,Wt,te)},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,Wt,te){return ft(Rt),Rt<=0?Tt(Rt):Wt!==void 0?typeof te=="string"?Tt(Rt).fill(Wt,te):Tt(Rt).fill(Wt):Tt(Rt)}mt.alloc=function(Rt,Wt,te){return z(Rt,Wt,te)};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,Wt){if((typeof Wt!="string"||Wt==="")&&(Wt="utf8"),!mt.isEncoding(Wt))throw new TypeError("Unknown encoding: "+Wt);var te=At(Rt,Wt)|0,ue=Tt(te),le=ue.write(Rt,Wt);return le!==te&&(ue=ue.slice(0,le)),ue}function it(Rt){for(var Wt=Rt.length<0?0:dt(Rt.length)|0,te=Tt(Wt),ue=0;ue<Wt;ue+=1)te[ue]=Rt[ue]&255;return te}function lt(Rt,Wt,te){if(Wt<0||Rt.byteLength<Wt)throw new RangeError('"offset" is outside of buffer bounds');if(Rt.byteLength<Wt+(te||0))throw new RangeError('"length" is outside of buffer bounds');var ue;return Wt===void 0&&te===void 0?ue=new Uint8Array(Rt):te===void 0?ue=new Uint8Array(Rt,Wt):ue=new Uint8Array(Rt,Wt,te),ue.__proto__=mt.prototype,ue}function ut(Rt){if(mt.isBuffer(Rt)){var Wt=dt(Rt.length)|0,te=Tt(Wt);return te.length===0||Rt.copy(te,0,0,Wt),te}if(Rt.length!==void 0)return typeof Rt.length!="number"||It(Rt.length)?Tt(0):it(Rt);if(Rt.type==="Buffer"&&Array.isArray(Rt.data))return it(Rt.data)}function dt(Rt){if(Rt>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return Rt|0}function Pt(Rt){return+Rt!=Rt&&(Rt=0),mt.alloc(+Rt)}mt.isBuffer=function(Wt){return Wt!=null&&Wt._isBuffer===!0&&Wt!==mt.prototype},mt.compare=function(Wt,te){if(re(Wt,Uint8Array)&&(Wt=mt.from(Wt,Wt.offset,Wt.byteLength)),re(te,Uint8Array)&&(te=mt.from(te,te.offset,te.byteLength)),!mt.isBuffer(Wt)||!mt.isBuffer(te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Wt===te)return 0;for(var ue=Wt.length,le=te.length,Ae=0,Le=Math.min(ue,le);Ae<Le;++Ae)if(Wt[Ae]!==te[Ae]){ue=Wt[Ae],le=te[Ae];break}return ue<le?-1:le<ue?1:0},mt.isEncoding=function(Wt){switch(String(Wt).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(Wt,te){if(!Array.isArray(Wt))throw new TypeError('"list" argument must be an Array of Buffers');if(Wt.length===0)return mt.alloc(0);var ue;if(te===void 0)for(te=0,ue=0;ue<Wt.length;++ue)te+=Wt[ue].length;var le=mt.allocUnsafe(te),Ae=0;for(ue=0;ue<Wt.length;++ue){var Le=Wt[ue];if(re(Le,Uint8Array)&&(Le=mt.from(Le)),!mt.isBuffer(Le))throw new TypeError('"list" argument must be an Array of Buffers');Le.copy(le,Ae),Ae+=Le.length}return le};function At(Rt,Wt){if(mt.isBuffer(Rt))return Rt.length;if(ArrayBuffer.isView(Rt)||re(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 te=Rt.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&te===0)return 0;for(var le=!1;;)switch(Wt){case"ascii":case"latin1":case"binary":return te;case"utf8":case"utf-8":return ee(Rt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te*2;case"hex":return te>>>1;case"base64":return Lt(Rt).length;default:if(le)return ue?-1:ee(Rt).length;Wt=(""+Wt).toLowerCase(),le=!0}}mt.byteLength=At;function Dt(Rt,Wt,te){var ue=!1;if((Wt===void 0||Wt<0)&&(Wt=0),Wt>this.length||((te===void 0||te>this.length)&&(te=this.length),te<=0)||(te>>>=0,Wt>>>=0,te<=Wt))return"";for(Rt||(Rt="utf8");;)switch(Rt){case"hex":return we(this,Wt,te);case"utf8":case"utf-8":return de(this,Wt,te);case"ascii":return ne(this,Wt,te);case"latin1":case"binary":return ye(this,Wt,te);case"base64":return se(this,Wt,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,Wt,te);default:if(ue)throw new TypeError("Unknown encoding: "+Rt);Rt=(Rt+"").toLowerCase(),ue=!0}}mt.prototype._isBuffer=!0;function Ft(Rt,Wt,te){var ue=Rt[Wt];Rt[Wt]=Rt[te],Rt[te]=ue}mt.prototype.swap16=function(){var Wt=this.length;if(Wt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var te=0;te<Wt;te+=2)Ft(this,te,te+1);return this},mt.prototype.swap32=function(){var Wt=this.length;if(Wt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var te=0;te<Wt;te+=4)Ft(this,te,te+3),Ft(this,te+1,te+2);return this},mt.prototype.swap64=function(){var Wt=this.length;if(Wt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var te=0;te<Wt;te+=8)Ft(this,te,te+7),Ft(this,te+1,te+6),Ft(this,te+2,te+5),Ft(this,te+3,te+4);return this},mt.prototype.toString=function(){var Wt=this.length;return Wt===0?"":arguments.length===0?de(this,0,Wt):Dt.apply(this,arguments)},mt.prototype.toLocaleString=mt.prototype.toString,mt.prototype.equals=function(Wt){if(!mt.isBuffer(Wt))throw new TypeError("Argument must be a Buffer");return this===Wt?!0:mt.compare(this,Wt)===0},mt.prototype.inspect=function(){var Wt="",te=Bt.INSPECT_MAX_BYTES;return Wt=this.toString("hex",0,te).replace(/(.{2})/g,"$1 ").trim(),this.length>te&&(Wt+=" ... "),"<Buffer "+Wt+">"},mt.prototype.compare=function(Wt,te,ue,le,Ae){if(re(Wt,Uint8Array)&&(Wt=mt.from(Wt,Wt.offset,Wt.byteLength)),!mt.isBuffer(Wt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Wt);if(te===void 0&&(te=0),ue===void 0&&(ue=Wt?Wt.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),te<0||ue>Wt.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&te>=ue)return 0;if(le>=Ae)return-1;if(te>=ue)return 1;if(te>>>=0,ue>>>=0,le>>>=0,Ae>>>=0,this===Wt)return 0;for(var Le=Ae-le,Be=ue-te,tn=Math.min(Le,Be),$e=this.slice(le,Ae),Qe=Wt.slice(te,ue),Ze=0;Ze<tn;++Ze)if($e[Ze]!==Qe[Ze]){Le=$e[Ze],Be=Qe[Ze];break}return Le<Be?-1:Be<Le?1:0};function jt(Rt,Wt,te,ue,le){if(Rt.length===0)return-1;if(typeof te=="string"?(ue=te,te=0):te>2147483647?te=2147483647:te<-2147483648&&(te=-2147483648),te=+te,It(te)&&(te=le?0:Rt.length-1),te<0&&(te=Rt.length+te),te>=Rt.length){if(le)return-1;te=Rt.length-1}else if(te<0)if(le)te=0;else return-1;if(typeof Wt=="string"&&(Wt=mt.from(Wt,ue)),mt.isBuffer(Wt))return Wt.length===0?-1:Nt(Rt,Wt,te,ue,le);if(typeof Wt=="number")return Wt=Wt&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(Rt,Wt,te):Uint8Array.prototype.lastIndexOf.call(Rt,Wt,te):Nt(Rt,[Wt],te,ue,le);throw new TypeError("val must be string, number or Buffer")}function Nt(Rt,Wt,te,ue,le){var Ae=1,Le=Rt.length,Be=Wt.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(Rt.length<2||Wt.length<2)return-1;Ae=2,Le/=2,Be/=2,te/=2}function tn(We,Ke){return Ae===1?We[Ke]:We.readUInt16BE(Ke*Ae)}var $e;if(le){var Qe=-1;for($e=te;$e<Le;$e++)if(tn(Rt,$e)===tn(Wt,Qe===-1?0:$e-Qe)){if(Qe===-1&&(Qe=$e),$e-Qe+1===Be)return Qe*Ae}else Qe!==-1&&($e-=$e-Qe),Qe=-1}else for(te+Be>Le&&(te=Le-Be),$e=te;$e>=0;$e--){for(var Ze=!0,Ge=0;Ge<Be;Ge++)if(tn(Rt,$e+Ge)!==tn(Wt,Ge)){Ze=!1;break}if(Ze)return $e}return-1}mt.prototype.includes=function(Wt,te,ue){return this.indexOf(Wt,te,ue)!==-1},mt.prototype.indexOf=function(Wt,te,ue){return jt(this,Wt,te,ue,!0)},mt.prototype.lastIndexOf=function(Wt,te,ue){return jt(this,Wt,te,ue,!1)};function Gt(Rt,Wt,te,ue){te=Number(te)||0;var le=Rt.length-te;ue?(ue=Number(ue),ue>le&&(ue=le)):ue=le;var Ae=Wt.length;ue>Ae/2&&(ue=Ae/2);for(var Le=0;Le<ue;++Le){var Be=parseInt(Wt.substr(Le*2,2),16);if(It(Be))return Le;Rt[te+Le]=Be}return Le}function Ht(Rt,Wt,te,ue){return Xt(ee(Wt,Rt.length-te),Rt,te,ue)}function Yt(Rt,Wt,te,ue){return Xt(Kt(Wt),Rt,te,ue)}function Ut(Rt,Wt,te,ue){return Yt(Rt,Wt,te,ue)}function Vt(Rt,Wt,te,ue){return Xt(Lt(Wt),Rt,te,ue)}function oe(Rt,Wt,te,ue){return Xt(wt(Wt,Rt.length-te),Rt,te,ue)}mt.prototype.write=function(Wt,te,ue,le){if(te===void 0)le="utf8",ue=this.length,te=0;else if(ue===void 0&&typeof te=="string")le=te,ue=this.length,te=0;else if(isFinite(te))te=te>>>0,isFinite(ue)?(ue=ue>>>0,le===void 0&&(le="utf8")):(le=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-te;if((ue===void 0||ue>Ae)&&(ue=Ae),Wt.length>0&&(ue<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Le=!1;;)switch(le){case"hex":return Gt(this,Wt,te,ue);case"utf8":case"utf-8":return Ht(this,Wt,te,ue);case"ascii":return Yt(this,Wt,te,ue);case"latin1":case"binary":return Ut(this,Wt,te,ue);case"base64":return Vt(this,Wt,te,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,Wt,te,ue);default:if(Le)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Le=!0}},mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(Rt,Wt,te){return Wt===0&&te===Rt.length?gt.fromByteArray(Rt):gt.fromByteArray(Rt.slice(Wt,te))}function de(Rt,Wt,te){te=Math.min(Rt.length,te);for(var ue=[],le=Wt;le<te;){var Ae=Rt[le],Le=null,Be=Ae>239?4:Ae>223?3:Ae>191?2:1;if(le+Be<=te){var tn,$e,Qe,Ze;switch(Be){case 1:Ae<128&&(Le=Ae);break;case 2:tn=Rt[le+1],(tn&192)===128&&(Ze=(Ae&31)<<6|tn&63,Ze>127&&(Le=Ze));break;case 3:tn=Rt[le+1],$e=Rt[le+2],(tn&192)===128&&($e&192)===128&&(Ze=(Ae&15)<<12|(tn&63)<<6|$e&63,Ze>2047&&(Ze<55296||Ze>57343)&&(Le=Ze));break;case 4:tn=Rt[le+1],$e=Rt[le+2],Qe=Rt[le+3],(tn&192)===128&&($e&192)===128&&(Qe&192)===128&&(Ze=(Ae&15)<<18|(tn&63)<<12|($e&63)<<6|Qe&63,Ze>65535&&Ze<1114112&&(Le=Ze))}}Le===null?(Le=65533,Be=1):Le>65535&&(Le-=65536,ue.push(Le>>>10&1023|55296),Le=56320|Le&1023),ue.push(Le),le+=Be}return Qt(ue)}var Se=4096;function Qt(Rt){var Wt=Rt.length;if(Wt<=Se)return String.fromCharCode.apply(String,Rt);for(var te="",ue=0;ue<Wt;)te+=String.fromCharCode.apply(String,Rt.slice(ue,ue+=Se));return te}function ne(Rt,Wt,te){var ue="";te=Math.min(Rt.length,te);for(var le=Wt;le<te;++le)ue+=String.fromCharCode(Rt[le]&127);return ue}function ye(Rt,Wt,te){var ue="";te=Math.min(Rt.length,te);for(var le=Wt;le<te;++le)ue+=String.fromCharCode(Rt[le]);return ue}function we(Rt,Wt,te){var ue=Rt.length;(!Wt||Wt<0)&&(Wt=0),(!te||te<0||te>ue)&&(te=ue);for(var le="",Ae=Wt;Ae<te;++Ae)le+=xe(Rt[Ae]);return le}function be(Rt,Wt,te){for(var ue=Rt.slice(Wt,te),le="",Ae=0;Ae<ue.length;Ae+=2)le+=String.fromCharCode(ue[Ae]+ue[Ae+1]*256);return le}mt.prototype.slice=function(Wt,te){var ue=this.length;Wt=~~Wt,te=te===void 0?ue:~~te,Wt<0?(Wt+=ue,Wt<0&&(Wt=0)):Wt>ue&&(Wt=ue),te<0?(te+=ue,te<0&&(te=0)):te>ue&&(te=ue),te<Wt&&(te=Wt);var le=this.subarray(Wt,te);return le.__proto__=mt.prototype,le};function fe(Rt,Wt,te){if(Rt%1!==0||Rt<0)throw new RangeError("offset is not uint");if(Rt+Wt>te)throw new RangeError("Trying to access beyond buffer length")}mt.prototype.readUIntLE=function(Wt,te,ue){Wt=Wt>>>0,te=te>>>0,ue||fe(Wt,te,this.length);for(var le=this[Wt],Ae=1,Le=0;++Le<te&&(Ae*=256);)le+=this[Wt+Le]*Ae;return le},mt.prototype.readUIntBE=function(Wt,te,ue){Wt=Wt>>>0,te=te>>>0,ue||fe(Wt,te,this.length);for(var le=this[Wt+--te],Ae=1;te>0&&(Ae*=256);)le+=this[Wt+--te]*Ae;return le},mt.prototype.readUInt8=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,1,this.length),this[Wt]},mt.prototype.readUInt16LE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,2,this.length),this[Wt]|this[Wt+1]<<8},mt.prototype.readUInt16BE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,2,this.length),this[Wt]<<8|this[Wt+1]},mt.prototype.readUInt32LE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),(this[Wt]|this[Wt+1]<<8|this[Wt+2]<<16)+this[Wt+3]*16777216},mt.prototype.readUInt32BE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),this[Wt]*16777216+(this[Wt+1]<<16|this[Wt+2]<<8|this[Wt+3])},mt.prototype.readIntLE=function(Wt,te,ue){Wt=Wt>>>0,te=te>>>0,ue||fe(Wt,te,this.length);for(var le=this[Wt],Ae=1,Le=0;++Le<te&&(Ae*=256);)le+=this[Wt+Le]*Ae;return Ae*=128,le>=Ae&&(le-=Math.pow(2,8*te)),le},mt.prototype.readIntBE=function(Wt,te,ue){Wt=Wt>>>0,te=te>>>0,ue||fe(Wt,te,this.length);for(var le=te,Ae=1,Le=this[Wt+--le];le>0&&(Ae*=256);)Le+=this[Wt+--le]*Ae;return Ae*=128,Le>=Ae&&(Le-=Math.pow(2,8*te)),Le},mt.prototype.readInt8=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,1,this.length),this[Wt]&128?(255-this[Wt]+1)*-1:this[Wt]},mt.prototype.readInt16LE=function(Wt,te){Wt=Wt>>>0,te||fe(Wt,2,this.length);var ue=this[Wt]|this[Wt+1]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt16BE=function(Wt,te){Wt=Wt>>>0,te||fe(Wt,2,this.length);var ue=this[Wt+1]|this[Wt]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt32LE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),this[Wt]|this[Wt+1]<<8|this[Wt+2]<<16|this[Wt+3]<<24},mt.prototype.readInt32BE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),this[Wt]<<24|this[Wt+1]<<16|this[Wt+2]<<8|this[Wt+3]},mt.prototype.readFloatLE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),Et.read(this,Wt,!0,23,4)},mt.prototype.readFloatBE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,4,this.length),Et.read(this,Wt,!1,23,4)},mt.prototype.readDoubleLE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,8,this.length),Et.read(this,Wt,!0,52,8)},mt.prototype.readDoubleBE=function(Wt,te){return Wt=Wt>>>0,te||fe(Wt,8,this.length),Et.read(this,Wt,!1,52,8)};function pe(Rt,Wt,te,ue,le,Ae){if(!mt.isBuffer(Rt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Wt>le||Wt<Ae)throw new RangeError('"value" argument is out of bounds');if(te+ue>Rt.length)throw new RangeError("Index out of range")}mt.prototype.writeUIntLE=function(Wt,te,ue,le){if(Wt=+Wt,te=te>>>0,ue=ue>>>0,!le){var Ae=Math.pow(2,8*ue)-1;pe(this,Wt,te,ue,Ae,0)}var Le=1,Be=0;for(this[te]=Wt&255;++Be<ue&&(Le*=256);)this[te+Be]=Wt/Le&255;return te+ue},mt.prototype.writeUIntBE=function(Wt,te,ue,le){if(Wt=+Wt,te=te>>>0,ue=ue>>>0,!le){var Ae=Math.pow(2,8*ue)-1;pe(this,Wt,te,ue,Ae,0)}var Le=ue-1,Be=1;for(this[te+Le]=Wt&255;--Le>=0&&(Be*=256);)this[te+Le]=Wt/Be&255;return te+ue},mt.prototype.writeUInt8=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,1,255,0),this[te]=Wt&255,te+1},mt.prototype.writeUInt16LE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,2,65535,0),this[te]=Wt&255,this[te+1]=Wt>>>8,te+2},mt.prototype.writeUInt16BE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,2,65535,0),this[te]=Wt>>>8,this[te+1]=Wt&255,te+2},mt.prototype.writeUInt32LE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,4,4294967295,0),this[te+3]=Wt>>>24,this[te+2]=Wt>>>16,this[te+1]=Wt>>>8,this[te]=Wt&255,te+4},mt.prototype.writeUInt32BE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,4,4294967295,0),this[te]=Wt>>>24,this[te+1]=Wt>>>16,this[te+2]=Wt>>>8,this[te+3]=Wt&255,te+4},mt.prototype.writeIntLE=function(Wt,te,ue,le){if(Wt=+Wt,te=te>>>0,!le){var Ae=Math.pow(2,8*ue-1);pe(this,Wt,te,ue,Ae-1,-Ae)}var Le=0,Be=1,tn=0;for(this[te]=Wt&255;++Le<ue&&(Be*=256);)Wt<0&&tn===0&&this[te+Le-1]!==0&&(tn=1),this[te+Le]=(Wt/Be>>0)-tn&255;return te+ue},mt.prototype.writeIntBE=function(Wt,te,ue,le){if(Wt=+Wt,te=te>>>0,!le){var Ae=Math.pow(2,8*ue-1);pe(this,Wt,te,ue,Ae-1,-Ae)}var Le=ue-1,Be=1,tn=0;for(this[te+Le]=Wt&255;--Le>=0&&(Be*=256);)Wt<0&&tn===0&&this[te+Le+1]!==0&&(tn=1),this[te+Le]=(Wt/Be>>0)-tn&255;return te+ue},mt.prototype.writeInt8=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,1,127,-128),Wt<0&&(Wt=255+Wt+1),this[te]=Wt&255,te+1},mt.prototype.writeInt16LE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,2,32767,-32768),this[te]=Wt&255,this[te+1]=Wt>>>8,te+2},mt.prototype.writeInt16BE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,2,32767,-32768),this[te]=Wt>>>8,this[te+1]=Wt&255,te+2},mt.prototype.writeInt32LE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,4,2147483647,-2147483648),this[te]=Wt&255,this[te+1]=Wt>>>8,this[te+2]=Wt>>>16,this[te+3]=Wt>>>24,te+4},mt.prototype.writeInt32BE=function(Wt,te,ue){return Wt=+Wt,te=te>>>0,ue||pe(this,Wt,te,4,2147483647,-2147483648),Wt<0&&(Wt=4294967295+Wt+1),this[te]=Wt>>>24,this[te+1]=Wt>>>16,this[te+2]=Wt>>>8,this[te+3]=Wt&255,te+4};function ce(Rt,Wt,te,ue,le,Ae){if(te+ue>Rt.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("Index out of range")}function Ce(Rt,Wt,te,ue,le){return Wt=+Wt,te=te>>>0,le||ce(Rt,Wt,te,4,34028234663852886e22,-34028234663852886e22),Et.write(Rt,Wt,te,ue,23,4),te+4}mt.prototype.writeFloatLE=function(Wt,te,ue){return Ce(this,Wt,te,!0,ue)},mt.prototype.writeFloatBE=function(Wt,te,ue){return Ce(this,Wt,te,!1,ue)};function ve(Rt,Wt,te,ue,le){return Wt=+Wt,te=te>>>0,le||ce(Rt,Wt,te,8,17976931348623157e292,-17976931348623157e292),Et.write(Rt,Wt,te,ue,52,8),te+8}mt.prototype.writeDoubleLE=function(Wt,te,ue){return ve(this,Wt,te,!0,ue)},mt.prototype.writeDoubleBE=function(Wt,te,ue){return ve(this,Wt,te,!1,ue)},mt.prototype.copy=function(Wt,te,ue,le){if(!mt.isBuffer(Wt))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!le&&le!==0&&(le=this.length),te>=Wt.length&&(te=Wt.length),te||(te=0),le>0&&le<ue&&(le=ue),le===ue||Wt.length===0||this.length===0)return 0;if(te<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),Wt.length-te<le-ue&&(le=Wt.length-te+ue);var Ae=le-ue;if(this===Wt&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(te,ue,le);else if(this===Wt&&ue<te&&te<le)for(var Le=Ae-1;Le>=0;--Le)Wt[Le+te]=this[Le+ue];else Uint8Array.prototype.set.call(Wt,this.subarray(ue,le),te);return Ae},mt.prototype.fill=function(Wt,te,ue,le){if(typeof Wt=="string"){if(typeof te=="string"?(le=te,te=0,ue=this.length):typeof ue=="string"&&(le=ue,ue=this.length),le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!mt.isEncoding(le))throw new TypeError("Unknown encoding: "+le);if(Wt.length===1){var Ae=Wt.charCodeAt(0);(le==="utf8"&&Ae<128||le==="latin1")&&(Wt=Ae)}}else typeof Wt=="number"&&(Wt=Wt&255);if(te<0||this.length<te||this.length<ue)throw new RangeError("Out of range index");if(ue<=te)return this;te=te>>>0,ue=ue===void 0?this.length:ue>>>0,Wt||(Wt=0);var Le;if(typeof Wt=="number")for(Le=te;Le<ue;++Le)this[Le]=Wt;else{var Be=mt.isBuffer(Wt)?Wt:mt.from(Wt,le),tn=Be.length;if(tn===0)throw new TypeError('The value "'+Wt+'" is invalid for argument "value"');for(Le=0;Le<ue-te;++Le)this[Le+te]=Be[Le%tn]}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 xe(Rt){return Rt<16?"0"+Rt.toString(16):Rt.toString(16)}function ee(Rt,Wt){Wt=Wt||1/0;for(var te,ue=Rt.length,le=null,Ae=[],Le=0;Le<ue;++Le){if(te=Rt.charCodeAt(Le),te>55295&&te<57344){if(!le){if(te>56319){(Wt-=3)>-1&&Ae.push(239,191,189);continue}else if(Le+1===ue){(Wt-=3)>-1&&Ae.push(239,191,189);continue}le=te;continue}if(te<56320){(Wt-=3)>-1&&Ae.push(239,191,189),le=te;continue}te=(le-55296<<10|te-56320)+65536}else le&&(Wt-=3)>-1&&Ae.push(239,191,189);if(le=null,te<128){if((Wt-=1)<0)break;Ae.push(te)}else if(te<2048){if((Wt-=2)<0)break;Ae.push(te>>6|192,te&63|128)}else if(te<65536){if((Wt-=3)<0)break;Ae.push(te>>12|224,te>>6&63|128,te&63|128)}else if(te<1114112){if((Wt-=4)<0)break;Ae.push(te>>18|240,te>>12&63|128,te>>6&63|128,te&63|128)}else throw new Error("Invalid code point")}return Ae}function Kt(Rt){for(var Wt=[],te=0;te<Rt.length;++te)Wt.push(Rt.charCodeAt(te)&255);return Wt}function wt(Rt,Wt){for(var te,ue,le,Ae=[],Le=0;Le<Rt.length&&!((Wt-=2)<0);++Le)te=Rt.charCodeAt(Le),ue=te>>8,le=te%256,Ae.push(le),Ae.push(ue);return Ae}function Lt(Rt){return gt.toByteArray(ge(Rt))}function Xt(Rt,Wt,te,ue){for(var le=0;le<ue&&!(le+te>=Wt.length||le>=Rt.length);++le)Wt[le+te]=Rt[le];return le}function re(Rt,Wt){return Rt instanceof Wt||Rt!=null&&Rt.constructor!=null&&Rt.constructor.name!=null&&Rt.constructor.name===Wt.name}function It(Rt){return Rt!==Rt}}).call(this)}).call(this,ot("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ot,zt,Bt){zt.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(ot,zt,Bt){"use strict";var vt=ot("get-intrinsic"),gt=ot("./"),Et=gt(vt("String.prototype.indexOf"));zt.exports=function(St,Tt){var mt=vt(St,!!Tt);return typeof mt=="function"&&Et(St,".prototype.")>-1?gt(mt):mt}},{"./":93,"get-intrinsic":348}],93:[function(ot,zt,Bt){"use strict";var vt=ot("function-bind"),gt=ot("get-intrinsic"),Et=gt("%Function.prototype.apply%"),Ct=gt("%Function.prototype.call%"),St=gt("%Reflect.apply%",!0)||vt.call(Ct,Et),Tt=gt("%Object.getOwnPropertyDescriptor%",!0),mt=gt("%Object.defineProperty%",!0),xt=gt("%Math.max%");if(mt)try{mt({},"a",{value:1})}catch(z){mt=null}zt.exports=function(tt){var at=St(vt,Ct,arguments);if(Tt&&mt){var it=Tt(at,"length");it.configurable&&mt(at,"length",{value:1+xt(0,tt.length-(arguments.length-1))})}return at};var ft=function(){return St(vt,Et,arguments)};mt?mt(zt.exports,"apply",{value:ft}):zt.exports.apply=ft},{"function-bind":347,"get-intrinsic":348}],94:[function(ot,zt,Bt){"use strict";var vt=Array.prototype.slice;zt.exports=gt;function gt(Ct,St){if(!(this instanceof gt))return new gt(Ct,St);this.src=Ct,this._withAccess=St}gt.prototype.withAccess=function(Ct){return this._withAccess=Ct!==!1,this},gt.prototype.pick=function(Ct){return Array.isArray(Ct)||(Ct=vt.call(arguments)),Ct.length&&(this.keys=Ct),this},gt.prototype.to=function(Ct){if(Ct=Ct||{},!this.src)return Ct;var St=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Tt=0;Tt<St.length;Tt++)mt=St[Tt],Ct[mt]===void 0&&(Ct[mt]=this.src[mt]);return Ct}for(var Tt=0;Tt<St.length;Tt++){var mt=St[Tt];if(Et(Ct,mt)){var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&Ct.__defineGetter__(mt,xt),ft&&Ct.__defineSetter__(mt,ft),!xt&&!ft&&(Ct[mt]=this.src[mt])}}return Ct},gt.prototype.toCover=function(Ct){for(var St=this.keys||Object.keys(this.src),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];delete Ct[mt];var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&Ct.__defineGetter__(mt,xt),ft&&Ct.__defineSetter__(mt,ft),!xt&&!ft&&(Ct[mt]=this.src[mt])}},gt.prototype.override=gt.prototype.toCover,gt.prototype.and=function(Ct){var St={};return this.to(St),this.src=Ct,this.to(St),this.src=St,this};function Et(Ct,St){return Ct[St]===void 0&&Ct.__lookupGetter__(St)===void 0&&Ct.__lookupSetter__(St)===void 0}},{}],95:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),Et=ot("../internals/try-to-string"),Ct=vt.TypeError;zt.exports=function(St){if(gt(St))return St;throw Ct(Et(St)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-constructor"),Et=ot("../internals/try-to-string"),Ct=vt.TypeError;zt.exports=function(St){if(gt(St))return St;throw Ct(Et(St)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),Et=vt.String,Ct=vt.TypeError;zt.exports=function(St){if(typeof St=="object"||gt(St))return St;throw Ct("Can't set "+Et(St)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/object-create"),Et=ot("../internals/object-define-property"),Ct=vt("unscopables"),St=Array.prototype;St[Ct]==null&&Et.f(St,Ct,{configurable:!0,value:gt(null)}),zt.exports=function(Tt){St[Ct][Tt]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt;zt.exports=function(gt,Et,Ct){return Et+(Ct?vt(gt,Et).length:1)}},{"../internals/string-multibyte":239}],100:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-is-prototype-of"),Et=vt.TypeError;zt.exports=function(Ct,St){if(gt(St,Ct))return Ct;throw Et("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),Et=vt.String,Ct=vt.TypeError;zt.exports=function(St){if(gt(St))return St;throw Ct(Et(St)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ot,zt,Bt){zt.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-native"),gt=ot("../internals/descriptors"),Et=ot("../internals/global"),Ct=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=Et.Int8Array,At=Pt&&Pt.prototype,Dt=Et.Uint8ClampedArray,Ft=Dt&&Dt.prototype,jt=Pt&&it(Pt),Nt=At&&it(At),Gt=Object.prototype,Ht=Et.TypeError,Yt=ut("toStringTag"),Ut=dt("TYPED_ARRAY_TAG"),Vt=dt("TYPED_ARRAY_CONSTRUCTOR"),oe=vt&&!!lt&&mt(Et.opera)!=="Opera",se=!1,de,Se,Qt,ne={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ye={BigInt64Array:8,BigUint64Array:8},we=function(Fe){if(!St(Fe))return!1;var ge=mt(Fe);return ge==="DataView"||Tt(ne,ge)||Tt(ye,ge)},be=function(ve){if(!St(ve))return!1;var Fe=mt(ve);return Tt(ne,Fe)||Tt(ye,Fe)},fe=function(ve){if(be(ve))return ve;throw Ht("Target is not a typed array")},pe=function(ve){if(Ct(ve)&&(!lt||at(jt,ve)))return ve;throw Ht(xt(ve)+" is not a typed array constructor")},ce=function(ve,Fe,ge,xe){if(gt){if(ge)for(var ee in ne){var Kt=Et[ee];if(Kt&&Tt(Kt.prototype,ve))try{delete Kt.prototype[ve]}catch(wt){try{Kt.prototype[ve]=Fe}catch(Lt){}}}(!Nt[ve]||ge)&&z(Nt,ve,ge?Fe:oe&&At[ve]||Fe,xe)}},Ce=function(ve,Fe,ge){var xe,ee;if(gt){if(lt){if(ge){for(xe in ne)if(ee=Et[xe],ee&&Tt(ee,ve))try{delete ee[ve]}catch(Kt){}}if(!jt[ve]||ge)try{return z(jt,ve,ge?Fe:oe&&jt[ve]||Fe)}catch(Kt){}else return}for(xe in ne)ee=Et[xe],ee&&(!ee[ve]||ge)&&z(ee,ve,Fe)}};for(de in ne)Se=Et[de],Qt=Se&&Se.prototype,Qt?ft(Qt,Vt,Se):oe=!1;for(de in ye)Se=Et[de],Qt=Se&&Se.prototype,Qt&&ft(Qt,Vt,Se);if((!oe||!Ct(jt)||jt===Function.prototype)&&(jt=function(){throw Ht("Incorrect invocation")},oe))for(de in ne)Et[de]&<(Et[de],jt);if((!oe||!Nt||Nt===Gt)&&(Nt=jt.prototype,oe))for(de in ne)Et[de]&<(Et[de].prototype,Nt);if(oe&&it(Ft)!==Nt&<(Ft,Nt),gt&&!Tt(Nt,Yt)){se=!0,tt(Nt,Yt,{get:function(){return St(this)?this[Ut]:void 0}});for(de in ne)Et[de]&&ft(Et[de],Ut,de)}zt.exports={NATIVE_ARRAY_BUFFER_VIEWS:oe,TYPED_ARRAY_CONSTRUCTOR:Vt,TYPED_ARRAY_TAG:se&&Ut,aTypedArray:fe,aTypedArrayConstructor:pe,exportTypedArrayMethod:ce,exportTypedArrayStaticMethod:Ce,isView:we,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,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/descriptors"),Ct=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,Ht=jt.get,Yt=jt.set,Ut="ArrayBuffer",Vt="DataView",oe="prototype",se="Wrong length",de="Wrong index",Se=vt[Ut],Qt=Se,ne=Qt&&Qt[oe],ye=vt[Vt],we=ye&&ye[oe],be=Object.prototype,fe=vt.Array,pe=vt.RangeError,ce=gt(At),Ce=gt([].reverse),ve=it.pack,Fe=it.unpack,ge=function(Le){return[Le&255]},xe=function(Le){return[Le&255,Le>>8&255]},ee=function(Le){return[Le&255,Le>>8&255,Le>>16&255,Le>>24&255]},Kt=function(Le){return Le[3]<<24|Le[2]<<16|Le[1]<<8|Le[0]},wt=function(Le){return ve(Le,23,4)},Lt=function(Le){return ve(Le,52,8)},Xt=function(Le,Be){Pt(Le[oe],Be,{get:function(){return Ht(this)[Be]}})},re=function(Le,Be,tn,$e){var Qe=at(tn),Ze=Ht(Le);if(Qe+Be>Ze.byteLength)throw pe(de);var Ge=Ht(Ze.buffer).bytes,We=Qe+Ze.byteOffset,Ke=Dt(Ge,We,We+Be);return $e?Ke:Ce(Ke)},It=function(Le,Be,tn,$e,Qe,Ze){var Ge=at(tn),We=Ht(Le);if(Ge+Be>We.byteLength)throw pe(de);for(var Ke=Ht(We.buffer).bytes,nn=Ge+We.byteOffset,hn=$e(+Qe),un=0;un<Be;un++)Ke[nn+un]=hn[Ze?un:Be-un-1]};if(!Ct)Qt=function(Be){ft(this,ne);var tn=at(Be);Yt(this,{bytes:ce(fe(tn),0),byteLength:tn}),Et||(this.byteLength=tn)},ne=Qt[oe],ye=function(Be,tn,$e){ft(this,we),ft(Be,ne);var Qe=Ht(Be).byteLength,Ze=z(tn);if(Ze<0||Ze>Qe)throw pe("Wrong offset");if($e=$e===void 0?Qe-Ze:tt($e),Ze+$e>Qe)throw pe(se);Yt(this,{buffer:Be,byteLength:$e,byteOffset:Ze}),Et||(this.buffer=Be,this.byteLength=$e,this.byteOffset=Ze)},we=ye[oe],Et&&(Xt(Qt,"byteLength"),Xt(ye,"buffer"),Xt(ye,"byteLength"),Xt(ye,"byteOffset")),mt(we,{getInt8:function(Be){return re(this,1,Be)[0]<<24>>24},getUint8:function(Be){return re(this,1,Be)[0]},getInt16:function(Be){var tn=re(this,2,Be,arguments.length>1?arguments[1]:void 0);return(tn[1]<<8|tn[0])<<16>>16},getUint16:function(Be){var tn=re(this,2,Be,arguments.length>1?arguments[1]:void 0);return tn[1]<<8|tn[0]},getInt32:function(Be){return Kt(re(this,4,Be,arguments.length>1?arguments[1]:void 0))},getUint32:function(Be){return Kt(re(this,4,Be,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Be){return Fe(re(this,4,Be,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Be){return Fe(re(this,8,Be,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Be,tn){It(this,1,Be,ge,tn)},setUint8:function(Be,tn){It(this,1,Be,ge,tn)},setInt16:function(Be,tn){It(this,2,Be,xe,tn,arguments.length>2?arguments[2]:void 0)},setUint16:function(Be,tn){It(this,2,Be,xe,tn,arguments.length>2?arguments[2]:void 0)},setInt32:function(Be,tn){It(this,4,Be,ee,tn,arguments.length>2?arguments[2]:void 0)},setUint32:function(Be,tn){It(this,4,Be,ee,tn,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Be,tn){It(this,4,Be,wt,tn,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Be,tn){It(this,8,Be,Lt,tn,arguments.length>2?arguments[2]:void 0)}});else{var Rt=Nt&&Se.name!==Ut;if(!xt(function(){Se(1)})||!xt(function(){new Se(-1)})||xt(function(){return new Se,new Se(1.5),new Se(NaN),Rt&&!Gt})){Qt=function(Be){return ft(this,ne),new Se(at(Be))},Qt[oe]=ne;for(var Wt=dt(Se),te=0,ue;Wt.length>te;)(ue=Wt[te++])in Qt||Tt(Qt,ue,Se[ue]);ne.constructor=Qt}else Rt&&Gt&&Tt(Se,"name",Ut);ut&<(we)!==be&&ut(we,be);var le=new ye(new Qt(2)),Ae=gt(we.setInt8);le.setInt8(0,2147483648),le.setInt8(1,2147483649),(le.getInt8(0)||!le.getInt8(1))&&mt(we,{setInt8:function(Be,tn){Ae(this,Be,tn<<24>>24)},setUint8:function(Be,tn){Ae(this,Be,tn<<24>>24)}},{unsafe:!0})}Ft(Qt,Ut),Ft(ye,Vt),zt.exports={ArrayBuffer:Qt,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,zt,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),Et=ot("../internals/length-of-array-like"),Ct=Math.min;zt.exports=[].copyWithin||function(Tt,mt){var xt=vt(this),ft=Et(xt),z=gt(Tt,ft),tt=gt(mt,ft),at=arguments.length>2?arguments[2]:void 0,it=Ct((at===void 0?ft:gt(at,ft))-tt,ft-z),lt=1;for(tt<z&&z<tt+it&&(lt=-1,tt+=it-1,z+=it-1);it-- >0;)tt in xt?xt[z]=xt[tt]:delete xt[z],z+=lt,tt+=lt;return xt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),Et=ot("../internals/length-of-array-like");zt.exports=function(St){for(var Tt=vt(this),mt=Et(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,zt,Bt){"use strict";var vt=ot("../internals/array-iteration").forEach,gt=ot("../internals/array-method-is-strict"),Et=gt("forEach");zt.exports=Et?[].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,zt,Bt){var vt=ot("../internals/length-of-array-like");zt.exports=function(gt,Et){for(var Ct=0,St=vt(Et),Tt=new gt(St);St>Ct;)Tt[Ct]=Et[Ct++];return Tt}},{"../internals/length-of-array-like":188}],109:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),Et=ot("../internals/function-call"),Ct=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;zt.exports=function(lt){var ut=Ct(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,Ht,Yt,Ut,Vt;if(Ft&&!(this==at&&Tt(Ft)))for(Yt=z(ut,Ft),Ut=Yt.next,Gt=dt?new this:[];!(Ht=Et(Ut,Yt)).done;jt++)Vt=Dt?St(Yt,At,[Ht.value,jt],!0):Ht.value,ft(Gt,jt,Vt);else for(Nt=xt(ut),Gt=dt?new this(Nt):at(Nt);Nt>jt;jt++)Vt=Dt?At(ut[jt],jt):ut[jt],ft(Gt,jt,Vt);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,zt,Bt){var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/to-absolute-index"),Et=ot("../internals/length-of-array-like"),Ct=function(St){return function(Tt,mt,xt){var ft=vt(Tt),z=Et(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}};zt.exports={includes:Ct(!0),indexOf:Ct(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/indexed-object"),Ct=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=Ct(Pt),Nt=Et(jt),Gt=vt(At,Dt),Ht=St(Nt),Yt=0,Ut=Ft||Tt,Vt=z?Ut(Pt,Ht):tt||ut?Ut(Pt,0):void 0,oe,se;Ht>Yt;Yt++)if((dt||Yt in Nt)&&(oe=Nt[Yt],se=Gt(oe,Yt,jt),ft))if(z)Vt[Yt]=se;else if(se)switch(ft){case 3:return!0;case 5:return oe;case 6:return Yt;case 2:mt(Vt,oe)}else switch(ft){case 4:return!1;case 7:mt(Vt,oe)}return lt?-1:at||it?it:Vt}};zt.exports={forEach:xt(0),map:xt(1),filter:xt(2),some:xt(3),every:xt(4),find:xt(5),findIndex:xt(6),filterReject:xt(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/to-indexed-object"),Et=ot("../internals/to-integer-or-infinity"),Ct=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;zt.exports=z?function(at){if(xt)return vt(mt,this,arguments)||0;var it=gt(this),lt=Ct(it),ut=lt-1;for(arguments.length>1&&(ut=Tt(ut,Et(arguments[1]))),ut<0&&(ut=lt+ut);ut>=0;ut--)if(ut in it&&it[ut]===at)return ut||0;return-1}:mt},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/well-known-symbol"),Et=ot("../internals/engine-v8-version"),Ct=gt("species");zt.exports=function(St){return Et>=51||!vt(function(){var Tt=[],mt=Tt.constructor={};return mt[Ct]=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,zt,Bt){"use strict";var vt=ot("../internals/fails");zt.exports=function(gt,Et){var Ct=[][gt];return!!Ct&&vt(function(){Ct.call(null,Et||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/a-callable"),Et=ot("../internals/to-object"),Ct=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=Et(ft),lt=Ct(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}};zt.exports={left:mt(!1),right:mt(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-absolute-index"),Et=ot("../internals/length-of-array-like"),Ct=ot("../internals/create-property"),St=vt.Array,Tt=Math.max;zt.exports=function(mt,xt,ft){for(var z=Et(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++)Ct(it,lt,mt[tt]);return it.length=lt,it}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ot,zt,Bt){var vt=ot("../internals/array-slice-simple"),gt=Math.floor,Et=function(Tt,mt){var xt=Tt.length,ft=gt(xt/2);return xt<8?Ct(Tt,mt):St(Tt,Et(vt(Tt,0,ft),mt),Et(vt(Tt,ft),mt),mt)},Ct=function(Tt,mt){for(var xt=Tt.length,ft=1,z,tt;ft<xt;){for(tt=ft,z=Tt[ft];tt&&mt(Tt[tt-1],z)>0;)Tt[tt]=Tt[--tt];tt!==ft++&&(Tt[tt]=z)}return Tt},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};zt.exports=Et},{"../internals/array-slice-simple":116}],119:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-array"),Et=ot("../internals/is-constructor"),Ct=ot("../internals/is-object"),St=ot("../internals/well-known-symbol"),Tt=St("species"),mt=vt.Array;zt.exports=function(xt){var ft;return gt(xt)&&(ft=xt.constructor,Et(ft)&&(ft===mt||gt(ft.prototype))?ft=void 0:Ct(ft)&&(ft=ft[Tt],ft===null&&(ft=void 0))),ft===void 0?mt:ft}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(ot,zt,Bt){var vt=ot("../internals/array-species-constructor");zt.exports=function(gt,Et){return new(vt(gt))(Et===0?0:Et)}},{"../internals/array-species-constructor":119}],121:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/iterator-close");zt.exports=function(Et,Ct,St,Tt){try{return Tt?Ct(vt(St)[0],St[1]):Ct(St)}catch(mt){gt(Et,"throw",mt)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("iterator"),Et=!1;try{var Ct=0,St={next:function(){return{done:!!Ct++}},return:function(){Et=!0}};St[gt]=function(){return this},Array.from(St,function(){throw 2})}catch(Tt){}zt.exports=function(Tt,mt){if(!mt&&!Et)return!1;var xt=!1;try{var ft={};ft[gt]=function(){return{next:function(){return{done:xt=!0}}}},Tt(ft)}catch(z){}return xt}},{"../internals/well-known-symbol":268}],123:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=vt({}.toString),Et=vt("".slice);zt.exports=function(Ct){return Et(gt(Ct),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-string-tag-support"),Et=ot("../internals/is-callable"),Ct=ot("../internals/classof-raw"),St=ot("../internals/well-known-symbol"),Tt=St("toStringTag"),mt=vt.Object,xt=Ct(function(){return arguments}())=="Arguments",ft=function(z,tt){try{return z[tt]}catch(at){}};zt.exports=gt?Ct:function(z){var tt,at,it;return z===void 0?"Undefined":z===null?"Null":typeof(at=ft(tt=mt(z),Tt))=="string"?at:xt?Ct(tt):(it=Ct(tt))=="Object"&&Et(tt.callee)?"Arguments":it}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ot,zt,Bt){var vt=ot("../internals/has-own-property"),gt=ot("../internals/own-keys"),Et=ot("../internals/object-get-own-property-descriptor"),Ct=ot("../internals/object-define-property");zt.exports=function(St,Tt,mt){for(var xt=gt(Tt),ft=Ct.f,z=Et.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,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("match");zt.exports=function(Et){var Ct=/./;try{"/./"[Et](Ct)}catch(St){try{return Ct[gt]=!1,"/./"[Et](Ct)}catch(Tt){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ot,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){function gt(){}return gt.prototype.constructor=null,Object.getPrototypeOf(new gt)!==gt.prototype})},{"../internals/fails":150}],128:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/iterators-core").IteratorPrototype,gt=ot("../internals/object-create"),Et=ot("../internals/create-property-descriptor"),Ct=ot("../internals/set-to-string-tag"),St=ot("../internals/iterators"),Tt=function(){return this};zt.exports=function(mt,xt,ft,z){var tt=xt+" Iterator";return mt.prototype=gt(vt,{next:Et(+!z,ft)}),Ct(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,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/object-define-property"),Et=ot("../internals/create-property-descriptor");zt.exports=vt?function(Ct,St,Tt){return gt.f(Ct,St,Et(1,Tt))}:function(Ct,St,Tt){return Ct[St]=Tt,Ct}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ot,zt,Bt){zt.exports=function(vt,gt){return{enumerable:!(vt&1),configurable:!(vt&2),writable:!(vt&4),value:gt}}},{}],131:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-property-key"),gt=ot("../internals/object-define-property"),Et=ot("../internals/create-property-descriptor");zt.exports=function(Ct,St,Tt){var mt=vt(St);mt in Ct?gt.f(Ct,mt,Et(0,Tt)):Ct[mt]=Tt}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),Et=ot("../internals/is-pure"),Ct=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=Ct.PROPER,dt=Ct.CONFIGURABLE,Pt=lt.IteratorPrototype,At=lt.BUGGY_SAFARI_ITERATORS,Dt=at("iterator"),Ft="keys",jt="values",Nt="entries",Gt=function(){return this};zt.exports=function(Ht,Yt,Ut,Vt,oe,se,de){Tt(Ut,Yt,Vt);var Se=function(ve){if(ve===oe&&be)return be;if(!At&&ve in ye)return ye[ve];switch(ve){case Ft:return function(){return new Ut(this,ve)};case jt:return function(){return new Ut(this,ve)};case Nt:return function(){return new Ut(this,ve)}}return function(){return new Ut(this)}},Qt=Yt+" Iterator",ne=!1,ye=Ht.prototype,we=ye[Dt]||ye["@@iterator"]||oe&&ye[oe],be=!At&&we||Se(oe),fe=Yt=="Array"&&ye.entries||we,pe,ce,Ce;if(fe&&(pe=mt(fe.call(new Ht)),pe!==Object.prototype&&pe.next&&(!Et&&mt(pe)!==Pt&&(xt?xt(pe,Pt):St(pe[Dt])||tt(pe,Dt,Gt)),ft(pe,Qt,!0,!0),Et&&(it[Qt]=Gt))),ut&&oe==jt&&we&&we.name!==jt&&(!Et&&dt?z(ye,"name",jt):(ne=!0,be=function(){return gt(we,this)})),oe)if(ce={values:Se(jt),keys:se?be:Se(Ft),entries:Se(Nt)},de)for(Ce in ce)(At||ne||!(Ce in ye))&&tt(ye,Ce,ce[Ce]);else vt({target:Yt,proto:!0,forced:At||ne},ce);return(!Et||de)&&ye[Dt]!==be&&tt(ye,Dt,be,{name:oe}),it[Yt]=be,ce}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(ot,zt,Bt){var vt=ot("../internals/path"),gt=ot("../internals/has-own-property"),Et=ot("../internals/well-known-symbol-wrapped"),Ct=ot("../internals/object-define-property").f;zt.exports=function(St){var Tt=vt.Symbol||(vt.Symbol={});gt(Tt,St)||Ct(Tt,St,{value:Et.f(St)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ot,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),Et=vt.document,Ct=gt(Et)&>(Et.createElement);zt.exports=function(St){return Ct?Et.createElement(St):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ot,zt,Bt){zt.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(ot,zt,Bt){var vt=ot("../internals/document-create-element"),gt=vt("span").classList,Et=gt&>.constructor&>.constructor.prototype;zt.exports=Et===Object.prototype?void 0:Et},{"../internals/document-create-element":135}],138:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/firefox\/(\d+)/i);zt.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],139:[function(ot,zt,Bt){zt.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/MSIE|Trident/.test(vt)},{"../internals/engine-user-agent":145}],141:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=ot("../internals/global");zt.exports=/ipad|iphone|ipod/i.test(vt)&>.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(vt)},{"../internals/engine-user-agent":145}],143:[function(ot,zt,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/global");zt.exports=vt(gt.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/web0s(?!.*chrome)/i.test(vt)},{"../internals/engine-user-agent":145}],145:[function(ot,zt,Bt){var vt=ot("../internals/get-built-in");zt.exports=vt("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/engine-user-agent"),Et=vt.process,Ct=vt.Deno,St=Et&&Et.versions||Ct&&Ct.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]))),zt.exports=xt},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/AppleWebKit\/(\d+)\./);zt.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],148:[function(ot,zt,Bt){zt.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-get-own-property-descriptor").f,Et=ot("../internals/create-non-enumerable-property"),Ct=ot("../internals/redefine"),St=ot("../internals/set-global"),Tt=ot("../internals/copy-constructor-properties"),mt=ot("../internals/is-forced");zt.exports=function(xt,ft){var z=xt.target,tt=xt.global,at=xt.stat,it,lt,ut,dt,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)&&Et(Pt,"sham",!0),Ct(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,zt,Bt){zt.exports=function(vt){try{return!!vt()}catch(gt){return!0}}},{}],151:[function(ot,zt,Bt){"use strict";ot("../modules/es.regexp.exec");var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/redefine"),Et=ot("../internals/regexp-exec"),Ct=ot("../internals/fails"),St=ot("../internals/well-known-symbol"),Tt=ot("../internals/create-non-enumerable-property"),mt=St("species"),xt=RegExp.prototype;zt.exports=function(ft,z,tt,at){var it=St(ft),lt=!Ct(function(){var At={};return At[it]=function(){return 7},""[ft](At)!=7}),ut=lt&&!Ct(function(){var At=!1,Dt=/a/;return ft==="split"&&(Dt={},Dt.constructor={},Dt.constructor[mt]=function(){return Dt},Dt.flags="",Dt[it]=/./[it]),Dt.exec=function(){return At=!0,null},Dt[it](""),!At});if(!lt||!ut||tt){var dt=vt(/./[it]),Pt=z(it,""[ft],function(At,Dt,Ft,jt,Nt){var Gt=vt(At),Ht=Dt.exec;return Ht===Et||Ht===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,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,Et=gt.apply,Ct=gt.call;zt.exports=typeof Reflect=="object"&&Reflect.apply||(vt?Ct.bind(Et):function(){return Ct.apply(Et,arguments)})},{"../internals/function-bind-native":154}],153:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/a-callable"),Et=ot("../internals/function-bind-native"),Ct=vt(vt.bind);zt.exports=function(St,Tt){return gt(St),Tt===void 0?St:Et?Ct(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,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){var gt=function(){}.bind();return typeof gt!="function"||gt.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype.call;zt.exports=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)}},{"../internals/function-bind-native":154}],156:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/has-own-property"),Et=Function.prototype,Ct=vt&&Object.getOwnPropertyDescriptor,St=gt(Et,"name"),Tt=St&&function(){}.name==="something",mt=St&&(!vt||vt&&Ct(Et,"name").configurable);zt.exports={EXISTS:St,PROPER:Tt,CONFIGURABLE:mt}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,Et=gt.bind,Ct=gt.call,St=vt&&Et.bind(Ct,Ct);zt.exports=vt?function(Tt){return Tt&&St(Tt)}:function(Tt){return Tt&&function(){return Ct.apply(Tt,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),Et=function(Ct){return gt(Ct)?Ct:void 0};zt.exports=function(Ct,St){return arguments.length<2?Et(vt[Ct]):vt[Ct]&&vt[Ct][St]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ot,zt,Bt){var vt=ot("../internals/classof"),gt=ot("../internals/get-method"),Et=ot("../internals/iterators"),Ct=ot("../internals/well-known-symbol"),St=Ct("iterator");zt.exports=function(Tt){if(Tt!=null)return gt(Tt,St)||gt(Tt,"@@iterator")||Et[vt(Tt)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),Et=ot("../internals/a-callable"),Ct=ot("../internals/an-object"),St=ot("../internals/try-to-string"),Tt=ot("../internals/get-iterator-method"),mt=vt.TypeError;zt.exports=function(xt,ft){var z=arguments.length<2?Tt(xt):ft;if(Et(z))return Ct(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,zt,Bt){var vt=ot("../internals/a-callable");zt.exports=function(gt,Et){var Ct=gt[Et];return Ct==null?void 0:vt(Ct)}},{"../internals/a-callable":95}],162:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),Et=Math.floor,Ct=vt("".charAt),St=vt("".replace),Tt=vt("".slice),mt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xt=/\$([$&'`]|\d{1,2})/g;zt.exports=function(ft,z,tt,at,it,lt){var ut=tt+ft.length,dt=at.length,Pt=xt;return it!==void 0&&(it=gt(it),Pt=mt),St(lt,Pt,function(At,Dt){var Ft;switch(Ct(Dt,0)){case"$":return"$";case"&":return ft;case"`":return Tt(z,0,tt);case"'":return Tt(z,ut);case"<":Ft=it[Tt(Dt,1,-1)];break;default:var jt=+Dt;if(jt===0)return At;if(jt>dt){var Nt=Et(jt/10);return Nt===0?At:Nt<=dt?at[Nt-1]===void 0?Ct(Dt,1):at[Nt-1]+Ct(Dt,1):At}Ft=at[jt-1]}return Ft===void 0?"":Ft})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ot,zt,Bt){(function(vt){(function(){var gt=function(Et){return Et&&Et.Math==Math&&Et};zt.exports=gt(typeof globalThis=="object"&&globalThis)||gt(typeof window=="object"&&window)||gt(typeof self=="object"&&self)||gt(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),Et=vt({}.hasOwnProperty);zt.exports=Object.hasOwn||function(St,Tt){return Et(gt(St),Tt)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ot,zt,Bt){zt.exports={}},{}],166:[function(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=function(gt,Et){var Ct=vt.console;Ct&&Ct.error&&(arguments.length==1?Ct.error(gt):Ct.error(gt,Et))}},{"../internals/global":163}],167:[function(ot,zt,Bt){var vt=ot("../internals/get-built-in");zt.exports=vt("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails"),Et=ot("../internals/document-create-element");zt.exports=!vt&&!gt(function(){return Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.Array,Et=Math.abs,Ct=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?Ct(2,-24)-Ct(2,-77):0,At=z<0||z===0&&1/z<0?1:0,Dt=0,Ft,jt,Nt;for(z=Et(z),z!=z||z===1/0?(jt=z!=z?1:0,Ft=ut):(Ft=St(Tt(z)/mt),Nt=Ct(2,-Ft),z*Nt<1&&(Ft--,Nt*=2),Ft+dt>=1?z+=Pt/Nt:z+=Pt*Ct(2,1-dt),z*Nt>=2&&(Ft++,Nt/=2),Ft+dt>=ut?(jt=0,Ft=ut):Ft+dt>=1?(jt=(z*Nt-1)*Ct(2,tt),Ft=Ft+dt):(jt=z*Ct(2,dt-1)*Ct(2,tt),Ft=0));tt>=8;)it[Dt++]=jt&255,jt/=256,tt-=8;for(Ft=Ft<<tt|jt,lt+=tt;lt>0;)it[Dt++]=Ft&255,Ft/=256,lt-=8;return it[--Dt]|=At*128,it},ft=function(z,tt){var at=z.length,it=at*8-tt-1,lt=(1<<it)-1,ut=lt>>1,dt=it-7,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+Ct(2,tt),Dt=Dt-ut}return(At?-1:1)*Ft*Ct(2,Dt-tt)};zt.exports={pack:xt,unpack:ft}},{"../internals/global":163}],170:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/fails"),Ct=ot("../internals/classof-raw"),St=vt.Object,Tt=gt("".split);zt.exports=Et(function(){return!St("z").propertyIsEnumerable(0)})?function(mt){return Ct(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,zt,Bt){var vt=ot("../internals/is-callable"),gt=ot("../internals/is-object"),Et=ot("../internals/object-set-prototype-of");zt.exports=function(Ct,St,Tt){var mt,xt;return Et&&vt(mt=St.constructor)&&mt!==Tt&>(xt=mt.prototype)&&xt!==Tt.prototype&&Et(Ct,xt),Ct}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/is-callable"),Et=ot("../internals/shared-store"),Ct=vt(Function.toString);gt(Et.inspectSource)||(Et.inspectSource=function(St){return Ct(St)}),zt.exports=Et.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ot,zt,Bt){var vt=ot("../internals/native-weak-map"),gt=ot("../internals/global"),Et=ot("../internals/function-uncurry-this"),Ct=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(Ht){var Yt;if(!Ct(Ht)||(Yt=lt(Ht)).type!==Gt)throw tt("Incompatible receiver, "+Gt+" required");return Yt}};if(vt||mt.state){var At=mt.state||(mt.state=new at),Dt=Et(At.get),Ft=Et(At.has),jt=Et(At.set);it=function(Gt,Ht){if(Ft(At,Gt))throw new tt(z);return Ht.facade=Gt,jt(At,Gt,Ht),Ht},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,Ht){if(Tt(Gt,Nt))throw new tt(z);return Ht.facade=Gt,St(Gt,Nt,Ht),Ht},lt=function(Gt){return Tt(Gt,Nt)?Gt[Nt]:{}},ut=function(Gt){return Tt(Gt,Nt)}}zt.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,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/iterators"),Et=vt("iterator"),Ct=Array.prototype;zt.exports=function(St){return St!==void 0&&(gt.Array===St||Ct[Et]===St)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ot,zt,Bt){var vt=ot("../internals/classof-raw");zt.exports=Array.isArray||function(Et){return vt(Et)=="Array"}},{"../internals/classof-raw":123}],176:[function(ot,zt,Bt){zt.exports=function(vt){return typeof vt=="function"}},{}],177:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/fails"),Et=ot("../internals/is-callable"),Ct=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(!Et(dt))return!1;try{return ft(mt,xt,dt),!0}catch(Pt){return!1}},lt=function(dt){if(!Et(dt))return!1;switch(Ct(dt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return at||!!tt(z,Tt(dt))}catch(Pt){return!0}};lt.sham=!0,zt.exports=!ft||gt(function(){var ut;return it(it.call)||!it(Object)||!it(function(){ut=!0})||ut})?lt:it},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),Et=/#|\.prototype\./,Ct=function(ft,z){var tt=Tt[St(ft)];return tt==xt?!0:tt==mt?!1:gt(z)?vt(z):!!z},St=Ct.normalize=function(ft){return String(ft).replace(Et,".").toLowerCase()},Tt=Ct.data={},mt=Ct.NATIVE="N",xt=Ct.POLYFILL="P";zt.exports=Ct},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ot,zt,Bt){var vt=ot("../internals/is-object"),gt=Math.floor;zt.exports=Number.isInteger||function(Ct){return!vt(Ct)&&isFinite(Ct)&>(Ct)===Ct}},{"../internals/is-object":180}],180:[function(ot,zt,Bt){var vt=ot("../internals/is-callable");zt.exports=function(gt){return typeof gt=="object"?gt!==null:vt(gt)}},{"../internals/is-callable":176}],181:[function(ot,zt,Bt){zt.exports=!1},{}],182:[function(ot,zt,Bt){var vt=ot("../internals/is-object"),gt=ot("../internals/classof-raw"),Et=ot("../internals/well-known-symbol"),Ct=Et("match");zt.exports=function(St){var Tt;return vt(St)&&((Tt=St[Ct])!==void 0?!!Tt:gt(St)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/get-built-in"),Et=ot("../internals/is-callable"),Ct=ot("../internals/object-is-prototype-of"),St=ot("../internals/use-symbol-as-uid"),Tt=vt.Object;zt.exports=St?function(mt){return typeof mt=="symbol"}:function(mt){var xt=gt("Symbol");return Et(xt)&&Ct(xt.prototype,Tt(mt))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),Et=ot("../internals/function-call"),Ct=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;zt.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,Ht,Yt,Ut,Vt,oe,se,de=function(Qt){return Gt&&tt(Gt,"normal",Qt),new it(!0,Qt)},Se=function(Qt){return Dt?(Ct(Qt),jt?Nt(Qt[0],Qt[1],de):Nt(Qt[0],Qt[1])):jt?Nt(Qt,de):Nt(Qt)};if(Ft)Gt=ut;else{if(Ht=z(ut),!Ht)throw at(St(ut)+" is not iterable");if(Tt(Ht)){for(Yt=0,Ut=mt(ut);Ut>Yt;Yt++)if(Vt=Se(ut[Yt]),Vt&&xt(lt,Vt))return Vt;return new it(!1)}Gt=ft(ut,Ht)}for(oe=Gt.next;!(se=Et(oe,Gt)).done;){try{Vt=Se(se.value)}catch(Qt){tt(Gt,"throw",Qt)}if(typeof Vt=="object"&&Vt&&xt(lt,Vt))return Vt}return new it(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/an-object"),Et=ot("../internals/get-method");zt.exports=function(Ct,St,Tt){var mt,xt;gt(Ct);try{if(mt=Et(Ct,"return"),!mt){if(St==="throw")throw Tt;return Tt}mt=vt(mt,Ct)}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,zt,Bt){"use strict";var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),Et=ot("../internals/object-create"),Ct=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=Ct(Ct(at)),tt!==Object.prototype&&(z=tt)):ft=!0);var it=z==null||vt(function(){var lt={};return z[xt].call(lt)!==lt});it?z={}:mt&&(z=Et(z)),gt(z[xt])||St(z,xt,function(){return this}),zt.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:ft}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(ot,zt,Bt){arguments[4][165][0].apply(Bt,arguments)},{dup:165}],188:[function(ot,zt,Bt){var vt=ot("../internals/to-length");zt.exports=function(gt){return vt(gt.length)}},{"../internals/to-length":249}],189:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),Et=ot("../internals/object-get-own-property-descriptor").f,Ct=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=Et(vt,"queueMicrotask"),lt=it&&it.value,ut,dt,Pt,At,Dt,Ft,jt,Nt;lt||(ut=function(){var Gt,Ht;for(xt&&(Gt=tt.domain)&&Gt.exit();dt;){Ht=dt.fn,dt=dt.next;try{Ht()}catch(Yt){throw dt?At():Pt=void 0,Yt}}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)}:(Ct=gt(Ct,vt),At=function(){Ct(ut)})),zt.exports=lt||function(Gt){var Ht={fn:Gt,next:void 0};Pt&&(Pt.next=Ht),dt||(dt=Ht,At()),Pt=Ht}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(ot,zt,Bt){var vt=ot("../internals/native-symbol");zt.exports=vt&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ot,zt,Bt){var vt=ot("../internals/engine-v8-version"),gt=ot("../internals/fails");zt.exports=!!Object.getOwnPropertySymbols&&!gt(function(){var Et=Symbol();return!String(Et)||!(Object(Et)instanceof Symbol)||!Symbol.sham&&vt&&vt<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),Et=ot("../internals/inspect-source"),Ct=vt.WeakMap;zt.exports=gt(Ct)&&/native code/.test(Et(Ct))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/a-callable"),gt=function(Et){var Ct,St;this.promise=new Et(function(Tt,mt){if(Ct!==void 0||St!==void 0)throw TypeError("Bad Promise constructor");Ct=Tt,St=mt}),this.resolve=vt(Ct),this.reject=vt(St)};zt.exports.f=function(Et){return new gt(Et)}},{"../internals/a-callable":95}],194:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-regexp"),Et=vt.TypeError;zt.exports=function(Ct){if(gt(Ct))throw Et("The method doesn't accept regular expressions");return Ct}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/function-call"),Ct=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);zt.exports=!z||Ct(function(){if(vt&&z({b:1},z(tt({},"a",{enumerable:!0,get:function(){tt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var it={},lt={},ut=Symbol(),dt="abcdefghijklmnopqrst";return it[ut]=7,dt.split("").forEach(function(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,Ht=0,Yt;Gt>Ht;)Yt=Nt[Ht++],(!vt||Et(Ft,jt,Yt))&&(dt[Yt]=jt[Yt]);return dt}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/object-define-properties"),Et=ot("../internals/enum-bug-keys"),Ct=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=Et.length;Dt--;)delete At[z][Et[Dt]];return At()};Ct[at]=!0,zt.exports=Object.create||function(Ft,jt){var Nt;return Ft!==null?(it[z]=vt(Ft),Nt=new it,it[z]=null,Nt[at]=Ft):Nt=At(),jt===void 0?Nt:gt.f(Nt,jt)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/v8-prototype-define-bug"),Et=ot("../internals/object-define-property"),Ct=ot("../internals/an-object"),St=ot("../internals/to-indexed-object"),Tt=ot("../internals/object-keys");Bt.f=vt&&!gt?Object.defineProperties:function(xt,ft){Ct(xt);for(var z=St(ft),tt=Tt(ft),at=tt.length,it=0,lt;at>it;)Et.f(xt,lt=tt[it++],z[lt]);return xt}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/descriptors"),Et=ot("../internals/ie8-dom-define"),Ct=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?Ct?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),Et)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,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-call"),Et=ot("../internals/object-property-is-enumerable"),Ct=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 Ct(!gt(Et.f,tt,at),tt[at])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(ot,zt,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/to-indexed-object"),Et=ot("../internals/object-get-own-property-names").f,Ct=ot("../internals/array-slice-simple"),St=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tt=function(mt){try{return Et(mt)}catch(xt){return Ct(St)}};zt.exports.f=function(xt){return St&&vt(xt)=="Window"?Tt(xt):Et(gt(xt))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ot,zt,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys"),Et=gt.concat("length","prototype");Bt.f=Object.getOwnPropertyNames||function(St){return vt(St,Et)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ot,zt,Bt){Bt.f=Object.getOwnPropertySymbols},{}],203:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/has-own-property"),Et=ot("../internals/is-callable"),Ct=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;zt.exports=Tt?xt.getPrototypeOf:function(z){var tt=Ct(z);if(gt(tt,mt))return tt[mt];var at=tt.constructor;return Et(at)&&tt instanceof at?at.prototype:tt instanceof xt?ft:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/has-own-property"),Et=ot("../internals/to-indexed-object"),Ct=ot("../internals/array-includes").indexOf,St=ot("../internals/hidden-keys"),Tt=vt([].push);zt.exports=function(mt,xt){var ft=Et(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++])&&(~Ct(tt,at)||Tt(tt,at));return tt}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(ot,zt,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys");zt.exports=Object.keys||function(Ct){return vt(Ct,gt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ot,zt,Bt){"use strict";var vt={}.propertyIsEnumerable,gt=Object.getOwnPropertyDescriptor,Et=gt&&!vt.call({1:2},1);Bt.f=Et?function(St){var Tt=gt(this,St);return!!Tt&&Tt.enumerable}:vt},{}],208:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/an-object"),Et=ot("../internals/a-possible-prototype");zt.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ct=!1,St={},Tt;try{Tt=vt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Tt(St,[]),Ct=St instanceof Array}catch(mt){}return function(xt,ft){return gt(xt),Et(ft),Ct?Tt(xt,ft):xt.__proto__=ft,xt}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/object-keys"),Ct=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=Ct(z),at=Et(tt),it=at.length,lt=0,ut=[],dt;it>lt;)dt=at[lt++],(!vt||Tt(tt,dt))&&mt(ut,ft?[dt,tt[dt]]:tt[dt]);return ut}};zt.exports={entries:xt(!0),values:xt(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/classof");zt.exports=vt?{}.toString:function(){return"[object "+gt(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),Et=ot("../internals/is-callable"),Ct=ot("../internals/is-object"),St=vt.TypeError;zt.exports=function(Tt,mt){var xt,ft;if(mt==="string"&&Et(xt=Tt.toString)&&!Ct(ft=gt(xt,Tt))||Et(xt=Tt.valueOf)&&!Ct(ft=gt(xt,Tt))||mt!=="string"&&Et(xt=Tt.toString)&&!Ct(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,zt,Bt){var vt=ot("../internals/get-built-in"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/object-get-own-property-names"),Ct=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/an-object"),Tt=gt([].concat);zt.exports=vt("Reflect","ownKeys")||function(xt){var ft=Et.f(St(xt)),z=Ct.f;return z?Tt(ft,z(xt)):ft}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=vt},{"../internals/global":163}],214:[function(ot,zt,Bt){zt.exports=function(vt){try{return{error:!1,value:vt()}}catch(gt){return{error:!0,value:gt}}}},{}],215:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/promise-native-constructor"),Et=ot("../internals/is-callable"),Ct=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=Et(vt.PromiseRejectionEvent),lt=Ct("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});zt.exports={CONSTRUCTOR:lt,REJECTION_EVENT:it,SUBCLASSING:at}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=vt.Promise},{"../internals/global":163}],217:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/is-object"),Et=ot("../internals/new-promise-capability");zt.exports=function(Ct,St){if(vt(Ct),gt(St)&&St.constructor===Ct)return St;var Tt=Et.f(Ct),mt=Tt.resolve;return mt(St),Tt.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ot,zt,Bt){var vt=ot("../internals/promise-native-constructor"),gt=ot("../internals/check-correctness-of-iteration"),Et=ot("../internals/promise-constructor-detection").CONSTRUCTOR;zt.exports=Et||!gt(function(Ct){vt.all(Ct).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ot,zt,Bt){var vt=ot("../internals/object-define-property").f;zt.exports=function(gt,Et,Ct){Ct in gt||vt(gt,Ct,{configurable:!0,get:function(){return Et[Ct]},set:function(St){Et[Ct]=St}})}},{"../internals/object-define-property":198}],220:[function(ot,zt,Bt){var vt=function(){this.head=null,this.tail=null};vt.prototype={add:function(gt){var Et={item:gt,next:null};this.head?this.tail.next=Et:this.head=Et,this.tail=Et},get:function(){var gt=this.head;if(gt)return this.head=gt.next,this.tail===gt&&(this.tail=null),gt.item}},zt.exports=vt},{}],221:[function(ot,zt,Bt){var vt=ot("../internals/redefine");zt.exports=function(gt,Et,Ct){for(var St in Et)vt(gt,St,Et[St],Ct);return gt}},{"../internals/redefine":222}],222:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),Et=ot("../internals/has-own-property"),Ct=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");(zt.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")+"]"),(!Et(lt,"name")||xt&<.name!==Dt)&&Ct(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:Ct(at,it,lt)})(Function.prototype,"toString",function(){return gt(this)&&ft(this).source||Tt(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),Et=ot("../internals/an-object"),Ct=ot("../internals/is-callable"),St=ot("../internals/classof-raw"),Tt=ot("../internals/regexp-exec"),mt=vt.TypeError;zt.exports=function(xt,ft){var z=xt.exec;if(Ct(z)){var tt=gt(z,xt,ft);return tt!==null&&Et(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,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/to-string"),Ct=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 Ht=this,Yt=xt(Ht),Ut=Et(Gt),Vt=Yt.raw,oe,se,de,Se,Qt,ne,ye;if(Vt)return Vt.lastIndex=Ht.lastIndex,oe=vt(it,Vt,Ut),Ht.lastIndex=Vt.lastIndex,oe;var we=Yt.groups,be=Dt&&Ht.sticky,fe=vt(Ct,Ht),pe=Ht.source,ce=0,Ce=Ut;if(be&&(fe=dt(fe,"y",""),ut(fe,"g")===-1&&(fe+="g"),Ce=Pt(Ut,Ht.lastIndex),Ht.lastIndex>0&&(!Ht.multiline||Ht.multiline&<(Ut,Ht.lastIndex-1)!==`
|
|
`)&&(pe="(?: "+pe+")",Ce=" "+Ce,ce++),se=new RegExp("^(?:"+pe+")",fe)),Ft&&(se=new RegExp("^"+pe+"$(?!\\s)",fe)),At&&(de=Ht.lastIndex),Se=vt(at,be?se:Ht,Ce),be?Se?(Se.input=Pt(Se.input,ce),Se[0]=Pt(Se[0],ce),Se.index=Ht.lastIndex,Ht.lastIndex+=Se[0].length):Ht.lastIndex=0:At&&Se&&(Ht.lastIndex=Ht.global?Se.index+Se[0].length:de),Ft&&Se&&Se.length>1&&vt(tt,Se[0],se,function(){for(Qt=1;Qt<arguments.length-2;Qt++)arguments[Qt]===void 0&&(Se[Qt]=void 0)}),Se&&we)for(Se.groups=ne=mt(null),Qt=0;Qt<we.length;Qt++)ye=we[Qt],ne[ye[0]]=Se[ye[1]];return Se}),zt.exports=it},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/an-object");zt.exports=function(){var gt=vt(this),Et="";return gt.hasIndices&&(Et+="d"),gt.global&&(Et+="g"),gt.ignoreCase&&(Et+="i"),gt.multiline&&(Et+="m"),gt.dotAll&&(Et+="s"),gt.unicode&&(Et+="u"),gt.sticky&&(Et+="y"),Et}},{"../internals/an-object":101}],226:[function(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/has-own-property"),Et=ot("../internals/object-is-prototype-of"),Ct=ot("../internals/regexp-flags"),St=RegExp.prototype;zt.exports=function(Tt){var mt=Tt.flags;return mt===void 0&&!("flags"in St)&&!gt(Tt,"flags")&&Et(St,Tt)?vt(Ct,Tt):mt}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),Et=gt.RegExp,Ct=vt(function(){var mt=Et("a","y");return mt.lastIndex=2,mt.exec("abcd")!=null}),St=Ct||vt(function(){return!Et("a","y").sticky}),Tt=Ct||vt(function(){var mt=Et("^r","gy");return mt.lastIndex=2,mt.exec("str")!=null});zt.exports={BROKEN_CARET:Tt,MISSED_STICKY:St,UNSUPPORTED_Y:Ct}},{"../internals/fails":150,"../internals/global":163}],228:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),Et=gt.RegExp;zt.exports=vt(function(){var Ct=Et(".","s");return!(Ct.dotAll&&Ct.exec(`
|
|
`)&&Ct.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),Et=gt.RegExp;zt.exports=vt(function(){var Ct=Et("(?<a>b)","g");return Ct.exec("b").groups.a!=="b"||"b".replace(Ct,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;zt.exports=function(Et){if(Et==null)throw gt("Can't call method on "+Et);return Et}},{"../internals/global":163}],231:[function(ot,zt,Bt){zt.exports=Object.is||function(gt,Et){return gt===Et?gt!==0||1/gt===1/Et:gt!=gt&&Et!=Et}},{}],232:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=Object.defineProperty;zt.exports=function(Et,Ct){try{gt(vt,Et,{value:Ct,configurable:!0,writable:!0})}catch(St){vt[Et]=Ct}return Ct}},{"../internals/global":163}],233:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/get-built-in"),gt=ot("../internals/object-define-property"),Et=ot("../internals/well-known-symbol"),Ct=ot("../internals/descriptors"),St=Et("species");zt.exports=function(Tt){var mt=vt(Tt),xt=gt.f;Ct&&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,zt,Bt){var vt=ot("../internals/object-define-property").f,gt=ot("../internals/has-own-property"),Et=ot("../internals/well-known-symbol"),Ct=Et("toStringTag");zt.exports=function(St,Tt,mt){St&&!mt&&(St=St.prototype),St&&!gt(St,Ct)&&vt(St,Ct,{configurable:!0,value:Tt})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ot,zt,Bt){var vt=ot("../internals/shared"),gt=ot("../internals/uid"),Et=vt("keys");zt.exports=function(Ct){return Et[Ct]||(Et[Ct]=gt(Ct))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/set-global"),Et="__core-js_shared__",Ct=vt[Et]||gt(Et,{});zt.exports=Ct},{"../internals/global":163,"../internals/set-global":232}],237:[function(ot,zt,Bt){var vt=ot("../internals/is-pure"),gt=ot("../internals/shared-store");(zt.exports=function(Et,Ct){return gt[Et]||(gt[Et]=Ct!==void 0?Ct:{})})("versions",[]).push({version:"3.22.1",mode:vt?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/a-constructor"),Et=ot("../internals/well-known-symbol"),Ct=Et("species");zt.exports=function(St,Tt){var mt=vt(St).constructor,xt;return mt===void 0||(xt=vt(mt)[Ct])==null?Tt:gt(xt)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-integer-or-infinity"),Et=ot("../internals/to-string"),Ct=ot("../internals/require-object-coercible"),St=vt("".charAt),Tt=vt("".charCodeAt),mt=vt("".slice),xt=function(ft){return function(z,tt){var at=Et(Ct(z)),it=gt(tt),lt=at.length,ut,dt;return it<0||it>=lt?ft?"":void 0:(ut=Tt(at,it),ut<55296||ut>56319||it+1===lt||(dt=Tt(at,it+1))<56320||dt>57343?ft?St(at,it):ut:ft?mt(at,it,it+2):(ut-55296<<10)+(dt-56320)+65536)}};zt.exports={codeAt:xt(!1),charAt:xt(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ot,zt,Bt){var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/fails"),Et=ot("../internals/whitespaces"),Ct="\u200B\x85\u180E";zt.exports=function(St){return gt(function(){return!!Et[St]()||Ct[St]()!==Ct||vt&&Et[St].name!==St})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/require-object-coercible"),Et=ot("../internals/to-string"),Ct=ot("../internals/whitespaces"),St=vt("".replace),Tt="["+Ct+"]",mt=RegExp("^"+Tt+Tt+"*"),xt=RegExp(Tt+Tt+"*$"),ft=function(z){return function(tt){var at=Et(gt(tt));return z&1&&(at=St(at,mt,"")),z&2&&(at=St(at,xt,"")),at}};zt.exports={start:ft(1),end:ft(2),trim:ft(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/get-built-in"),Et=ot("../internals/well-known-symbol"),Ct=ot("../internals/redefine");zt.exports=function(){var St=gt("Symbol"),Tt=St&&St.prototype,mt=Tt&&Tt.valueOf,xt=Et("toPrimitive");Tt&&!Tt[xt]&&Ct(Tt,xt,function(ft){return vt(mt,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),Et=ot("../internals/function-bind-context"),Ct=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,Ht,Yt,Ut;try{Gt=vt.location}catch(Se){}var Vt=function(Se){if(St(jt,Se)){var Qt=jt[Se];delete jt[Se],Qt()}},oe=function(Se){return function(){Vt(Se)}},se=function(Se){Vt(Se.data)},de=function(Se){vt.postMessage(Dt(Se),Gt.protocol+"//"+Gt.host)};(!it||!lt)&&(it=function(Qt){z(arguments.length,1);var ne=Ct(Qt)?Qt:Pt(Qt),ye=xt(arguments,1);return jt[++Ft]=function(){gt(ne,void 0,ye)},Ht(Ft),Ft},lt=function(Qt){delete jt[Qt]},at?Ht=function(Se){ut.nextTick(oe(Se))}:dt&&dt.now?Ht=function(Se){dt.now(oe(Se))}:At&&!tt?(Yt=new At,Ut=Yt.port2,Yt.port1.onmessage=se,Ht=Et(Ut.postMessage,Ut)):vt.addEventListener&&Ct(vt.postMessage)&&!vt.importScripts&&Gt&&Gt.protocol!=="file:"&&!Tt(de)?(Ht=de,vt.addEventListener("message",se,!1)):Nt in ft("script")?Ht=function(Se){mt.appendChild(ft("script"))[Nt]=function(){mt.removeChild(this),Vt(Se)}}:Ht=function(Se){setTimeout(oe(Se),0)}),zt.exports={set:it,clear:lt}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ot,zt,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.max,Et=Math.min;zt.exports=function(Ct,St){var Tt=vt(Ct);return Tt<0?gt(Tt+St,0):Et(Tt,St)}},{"../internals/to-integer-or-infinity":248}],246:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),Et=ot("../internals/to-length"),Ct=vt.RangeError;zt.exports=function(St){if(St===void 0)return 0;var Tt=gt(St),mt=Et(Tt);if(Tt!==mt)throw Ct("Wrong length or index");return mt}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ot,zt,Bt){var vt=ot("../internals/indexed-object"),gt=ot("../internals/require-object-coercible");zt.exports=function(Et){return vt(gt(Et))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ot,zt,Bt){var vt=Math.ceil,gt=Math.floor;zt.exports=function(Et){var Ct=+Et;return Ct!==Ct||Ct===0?0:(Ct>0?gt:vt)(Ct)}},{}],249:[function(ot,zt,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.min;zt.exports=function(Et){return Et>0?gt(vt(Et),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/require-object-coercible"),Et=vt.Object;zt.exports=function(Ct){return Et(gt(Ct))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-positive-integer"),Et=vt.RangeError;zt.exports=function(Ct,St){var Tt=gt(Ct);if(Tt%St)throw Et("Wrong offset");return Tt}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),Et=vt.RangeError;zt.exports=function(Ct){var St=gt(Ct);if(St<0)throw Et("The argument can't be less than 0");return St}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),Et=ot("../internals/is-object"),Ct=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");zt.exports=function(z,tt){if(!Et(z)||Ct(z))return z;var at=St(z,ft),it;if(at){if(tt===void 0&&(tt="default"),it=gt(at,z,tt),!Et(it)||Ct(it))return it;throw xt("Can't convert object to primitive value")}return tt===void 0&&(tt="number"),Tt(z,tt)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(ot,zt,Bt){var vt=ot("../internals/to-primitive"),gt=ot("../internals/is-symbol");zt.exports=function(Et){var Ct=vt(Et,"string");return gt(Ct)?Ct:Ct+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("toStringTag"),Et={};Et[gt]="z",zt.exports=String(Et)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/classof"),Et=vt.String;zt.exports=function(Ct){if(gt(Ct)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Et(Ct)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.String;zt.exports=function(Et){try{return gt(Et)}catch(Ct){return"Object"}}},{"../internals/global":163}],258:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/function-call"),Ct=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,Ht=ot("../internals/typed-array-from"),Yt=ot("../internals/array-iteration").forEach,Ut=ot("../internals/set-species"),Vt=ot("../internals/object-define-property"),oe=ot("../internals/object-get-own-property-descriptor"),se=ot("../internals/internal-state"),de=ot("../internals/inherit-if-required"),Se=se.get,Qt=se.set,ne=Vt.f,ye=oe.f,we=Math.round,be=gt.RangeError,fe=mt.ArrayBuffer,pe=fe.prototype,ce=mt.DataView,Ce=Tt.NATIVE_ARRAY_BUFFER_VIEWS,ve=Tt.TYPED_ARRAY_CONSTRUCTOR,Fe=Tt.TYPED_ARRAY_TAG,ge=Tt.TypedArray,xe=Tt.TypedArrayPrototype,ee=Tt.aTypedArrayConstructor,Kt=Tt.isTypedArray,wt="BYTES_PER_ELEMENT",Lt="Wrong length",Xt=function(ue,le){ee(ue);for(var Ae=0,Le=le.length,Be=new ue(Le);Le>Ae;)Be[Ae]=le[Ae++];return Be},re=function(ue,le){ne(ue,le,{get:function(){return Se(this)[le]}})},It=function(ue){var le;return jt(pe,ue)||(le=Pt(ue))=="ArrayBuffer"||le=="SharedArrayBuffer"},Rt=function(ue,le){return Kt(ue)&&!Dt(le)&&le in ue&&tt(+le)&&le>=0},Wt=function(le,Ae){return Ae=ut(Ae),Rt(le,Ae)?ft(2,le[Ae]):ye(le,Ae)},te=function(le,Ae,Le){return Ae=ut(Ae),Rt(le,Ae)&&At(Le)&&dt(Le,"value")&&!dt(Le,"get")&&!dt(Le,"set")&&!Le.configurable&&(!dt(Le,"writable")||Le.writable)&&(!dt(Le,"enumerable")||Le.enumerable)?(le[Ae]=Le.value,le):ne(le,Ae,Le)};Ct?(Ce||(oe.f=Wt,Vt.f=te,re(xe,"buffer"),re(xe,"byteOffset"),re(xe,"byteLength"),re(xe,"length")),vt({target:"Object",stat:!0,forced:!Ce},{getOwnPropertyDescriptor:Wt,defineProperty:te}),zt.exports=function(ue,le,Ae){var Le=ue.match(/\d+$/)[0]/8,Be=ue+(Ae?"Clamped":"")+"Array",tn="get"+ue,$e="set"+ue,Qe=gt[Be],Ze=Qe,Ge=Ze&&Ze.prototype,We={},Ke=function(un,bn){var Un=Se(un);return Un.view[tn](bn*Le+Un.byteOffset,!0)},nn=function(un,bn,Un){var Vn=Se(un);Ae&&(Un=(Un=we(Un))<0?0:Un>255?255:Un&255),Vn.view[$e](bn*Le+Vn.byteOffset,Un,!0)},hn=function(un,bn){ne(un,bn,{get:function(){return Ke(this,bn)},set:function(Un){return nn(this,bn,Un)},enumerable:!0})};Ce?St&&(Ze=le(function(un,bn,Un,Vn){return xt(un,Ge),de(function(){return At(bn)?It(bn)?Vn!==void 0?new Qe(bn,lt(Un,Le),Vn):Un!==void 0?new Qe(bn,lt(Un,Le)):new Qe(bn):Kt(bn)?Xt(Ze,bn):Et(Ht,Ze,bn):new Qe(it(bn))}(),un,Ze)}),Nt&&Nt(Ze,ge),Yt(Gt(Qe),function(un){un in Ze||z(Ze,un,Qe[un])}),Ze.prototype=Ge):(Ze=le(function(un,bn,Un,Vn){xt(un,Ge);var Yn=0,vr=0,pr,gr,Nr;if(!At(bn))Nr=it(bn),gr=Nr*Le,pr=new fe(gr);else if(It(bn)){pr=bn,vr=lt(Un,Le);var Lr=bn.byteLength;if(Vn===void 0){if(Lr%Le||(gr=Lr-vr,gr<0))throw be(Lt)}else if(gr=at(Vn)*Le,gr+vr>Lr)throw be(Lt);Nr=gr/Le}else return Kt(bn)?Xt(Ze,bn):Et(Ht,Ze,bn);for(Qt(un,{buffer:pr,byteOffset:vr,byteLength:gr,length:Nr,view:new ce(pr)});Yn<Nr;)hn(un,Yn++)}),Nt&&Nt(Ze,ge),Ge=Ze.prototype=Ft(xe)),Ge.constructor!==Ze&&z(Ge,"constructor",Ze),z(Ge,ve,Ze),Fe&&z(Ge,Fe,Be),We[Be]=Ze,vt({global:!0,forced:Ze!=Qe,sham:!Ce},We),wt in Ze||z(Ze,wt,Le),wt in Ge||z(Ge,wt,Le),Ut(Be)}):zt.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/fails"),Et=ot("../internals/check-correctness-of-iteration"),Ct=ot("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,St=vt.ArrayBuffer,Tt=vt.Int8Array;zt.exports=!Ct||!gt(function(){Tt(1)})||!gt(function(){new Tt(-1)})||!Et(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,zt,Bt){var vt=ot("../internals/array-from-constructor-and-list"),gt=ot("../internals/typed-array-species-constructor");zt.exports=function(Et,Ct){return vt(gt(Et),Ct)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-call"),Et=ot("../internals/a-constructor"),Ct=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;zt.exports=function(tt){var at=Et(this),it=Ct(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,zt,Bt){var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/species-constructor"),Et=vt.TYPED_ARRAY_CONSTRUCTOR,Ct=vt.aTypedArrayConstructor;zt.exports=function(St){return Ct(gt(St,St[Et]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=0,Et=Math.random(),Ct=vt(1 .toString);zt.exports=function(St){return"Symbol("+(St===void 0?"":St)+")_"+Ct(++gt+Et,36)}},{"../internals/function-uncurry-this":157}],264:[function(ot,zt,Bt){var vt=ot("../internals/native-symbol");zt.exports=vt&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails");zt.exports=vt&>(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;zt.exports=function(Et,Ct){if(Et<Ct)throw gt("Not enough arguments");return Et}},{"../internals/global":163}],267:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol");Bt.f=vt},{"../internals/well-known-symbol":268}],268:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/shared"),Et=ot("../internals/has-own-property"),Ct=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||Ct;zt.exports=function(tt){if(!Et(mt,tt)||!(St||typeof mt[tt]=="string")){var at="Symbol."+tt;St&&Et(xt,tt)?mt[tt]=xt[tt]:Tt&&ft?mt[tt]=ft(at):mt[tt]=z(at)}return mt[tt]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(ot,zt,Bt){zt.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/array-buffer"),Ct=ot("../internals/set-species"),St="ArrayBuffer",Tt=Et[St],mt=gt[St];vt({global:!0,forced:mt!==Tt},{ArrayBuffer:Tt}),Ct(St)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/fails"),Ct=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=Ct.ArrayBuffer,z=Ct.DataView,tt=z.prototype,at=gt(ft.prototype.slice),it=gt(tt.getUint8),lt=gt(tt.setUint8),ut=Et(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),Ht=new z(Nt),Yt=0;Ft<jt;)lt(Ht,Yt++,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,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/fails"),Ct=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||!Et(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:Ct(jt)},Ft=!Pt||!At;vt({target:"Array",proto:!0,forced:Ft},{concat:function(Nt){var Gt=Tt(this),Ht=ft(Gt,0),Yt=0,Ut,Vt,oe,se,de;for(Ut=-1,oe=arguments.length;Ut<oe;Ut++)if(de=Ut===-1?Gt:arguments[Ut],Dt(de)){if(se=mt(de),Yt+se>lt)throw dt(ut);for(Vt=0;Vt<se;Vt++,Yt++)Vt in de&&xt(Ht,Yt,de[Vt])}else{if(Yt>=lt)throw dt(ut);xt(Ht,Yt++,de)}return Ht.length=Yt,Ht}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-fill"),Et=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{fill:gt}),Et("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").filter,Et=ot("../internals/array-method-has-species-support"),Ct=Et("filter");vt({target:"Array",proto:!0,forced:!Ct},{filter:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").find,Et=ot("../internals/add-to-unscopables"),Ct="find",St=!0;Ct in[]&&Array(1)[Ct](function(){St=!1}),vt({target:"Array",proto:!0,forced:St},{find:function(mt){return gt(this,mt,arguments.length>1?arguments[1]:void 0)}}),Et(Ct)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-from"),Et=ot("../internals/check-correctness-of-iteration"),Ct=!Et(function(St){Array.from(St)});vt({target:"Array",stat:!0,forced:Ct},{from:gt})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-includes").includes,Et=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{includes:function(St){return gt(this,St,arguments.length>1?arguments[1]:void 0)}}),Et("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/add-to-unscopables"),Et=ot("../internals/iterators"),Ct=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=Ct.set,tt=Ct.getterFor(ft);zt.exports=Tt(Array,"Array",function(it,lt){z(this,{type:ft,target:vt(it),index:0,kind:lt})},function(){var it=tt(this),lt=it.target,ut=it.kind,dt=it.index++;return!lt||dt>=lt.length?(it.target=void 0,{value:void 0,done:!0}):ut=="keys"?{value:dt,done:!1}:ut=="values"?{value:lt[dt],done:!1}:{value:[dt,lt[dt]],done:!1}},"values");var at=Et.Arguments=Et.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,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/indexed-object"),Ct=ot("../internals/to-indexed-object"),St=ot("../internals/array-method-is-strict"),Tt=gt([].join),mt=Et!=Object,xt=St("join",",");vt({target:"Array",proto:!0,forced:mt||!xt},{join:function(z){return Tt(Ct(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").map,Et=ot("../internals/array-method-has-species-support"),Ct=Et("map");vt({target:"Array",proto:!0,forced:!Ct},{map:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/is-array"),Ct=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),Ht,Yt,Ut;if(Et(Ft)&&(Ht=Ft.constructor,Ct(Ht)&&(Ht===ut||Et(Ht.prototype))?Ht=void 0:St(Ht)&&(Ht=Ht[lt],Ht===null&&(Ht=void 0)),Ht===ut||Ht===void 0))return at(Ft,Nt,Gt);for(Yt=new(Ht===void 0?ut:Ht)(dt(Gt-Nt,0)),Ut=0;Nt<Gt;Nt++,Ut++)Nt in Ft&&ft(Yt,Ut,Ft[Nt]);return Yt.length=Ut,Yt}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/a-callable"),Ct=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="",Ht,Yt,Ut,Vt;for(Ht=65;Ht<76;Ht++){switch(Yt=String.fromCharCode(Ht),Ht){case 66:case 69:case 70:case 72:Ut=3;break;case 68:case 71:Ut=4;break;default:Ut=2}for(Vt=0;Vt<47;Vt++)lt.push({k:Yt+Vt,v:Ut})}for(lt.sort(function(oe,se){return se.v-oe.v}),Vt=0;Vt<lt.length;Vt++)Yt=lt[Vt].k.charAt(0),Gt.charAt(Gt.length-1)!==Yt&&(Gt+=Yt);return Gt!=="DGBEFHACIJK"}}),jt=Pt||!At||!Dt||!Ft,Nt=function(Gt){return function(Ht,Yt){return Yt===void 0?-1:Ht===void 0?1:Gt!==void 0?+Gt(Ht,Yt)||0:Tt(Ht)>Tt(Yt)?1:-1}};vt({target:"Array",proto:!0,forced:jt},{sort:function(Ht){Ht!==void 0&&Et(Ht);var Yt=Ct(this);if(Ft)return Ht===void 0?ut(Yt):ut(Yt,Ht);var Ut=[],Vt=St(Yt),oe,se;for(se=0;se<Vt;se++)se in Yt&&dt(Ut,Yt[se]);for(xt(Ut,Nt(Ht)),oe=Ut.length,se=0;se<oe;)Yt[se]=Ut[se++];for(;se<Vt;)delete Yt[se++];return Yt}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/to-absolute-index"),Ct=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=Et(Pt,Ft),Nt=arguments.length,Gt,Ht,Yt,Ut,Vt,oe;if(Nt===0?Gt=Ht=0:Nt===1?(Gt=0,Ht=Ft-jt):(Gt=Nt-2,Ht=it(at(Ct(At),0),Ft-jt)),Ft+Gt-Ht>lt)throw tt(ut);for(Yt=mt(Dt,Ht),Ut=0;Ut<Ht;Ut++)Vt=jt+Ut,Vt in Dt&&xt(Yt,Ut,Dt[Vt]);if(Yt.length=Ht,Gt<Ht){for(Ut=jt;Ut<Ft-Ht;Ut++)Vt=Ut+Ht,oe=Ut+Gt,Vt in Dt?Dt[oe]=Dt[Vt]:delete Dt[oe];for(Ut=Ft;Ut>Ft-Ht+Gt;Ut--)delete Dt[Ut-1]}else if(Gt>Ht)for(Ut=Ft-Ht;Ut>jt;Ut--)Vt=Ut+Ht-1,oe=Ut+Gt-1,Vt in Dt?Dt[oe]=Dt[Vt]:delete Dt[oe];for(Ut=0;Ut<Gt;Ut++)Dt[Ut+jt]=arguments[Ut+2];return Dt.length=Ft-Ht+Gt,Yt}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-name").EXISTS,Et=ot("../internals/function-uncurry-this"),Ct=ot("../internals/object-define-property").f,St=Function.prototype,Tt=Et(St.toString),mt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xt=Et(mt.exec),ft="name";vt&&!gt&&Ct(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,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),Et=ot("../internals/function-apply"),Ct=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"'}),Ht=function(Ut,Vt){var oe=tt(arguments),se=Vt;if(!(!ft(Vt)&&Ut===void 0||z(Ut)))return mt(Vt)||(Vt=function(de,Se){if(xt(se)&&(Se=Ct(se,this,de,Se)),!z(Se))return Se}),oe[1]=Vt,Et(it,null,oe)},Yt=function(Ut,Vt,oe){var se=ut(oe,Vt-1),de=ut(oe,Vt+1);return lt(Ft,Ut)&&!lt(jt,de)||lt(jt,Ut)&&!lt(Ft,se)?"\\u"+At(dt(Ut,0),16):Ut};it&&vt({target:"JSON",stat:!0,forced:Nt||Gt},{stringify:function(Vt,oe,se){var de=tt(arguments),Se=Et(Nt?Ht:it,null,de);return Gt&&typeof Se=="string"?Pt(Se,Dt,Yt):Se}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),Et=ot("../internals/function-uncurry-this"),Ct=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=Et("".slice),Nt=Et("".charCodeAt),Gt=function(se){var de=z(se,"number");return typeof de=="bigint"?de:Ht(de)},Ht=function(se){var de=z(se,"number"),Se,Qt,ne,ye,we,be,fe,pe;if(ft(de))throw Ft("Cannot convert a Symbol value to a number");if(typeof de=="string"&&de.length>2){if(de=dt(de),Se=Nt(de,0),Se===43||Se===45){if(Qt=Nt(de,2),Qt===88||Qt===120)return NaN}else if(Se===48){switch(Nt(de,1)){case 66:case 98:ne=2,ye=49;break;case 79:case 111:ne=8,ye=55;break;default:return+de}for(we=jt(de,2),be=we.length,fe=0;fe<be;fe++)if(pe=Nt(we,fe),pe<48||pe>ye)return NaN;return parseInt(we,ne)}}return+de};if(Ct(Pt,!At(" 0o1")||!At("0b1")||At("+0x1"))){for(var Yt=function(de){var Se=arguments.length<1?0:At(Gt(de)),Qt=this;return xt(Dt,Qt)&&tt(function(){ut(Qt)})?mt(Object(Se),Qt,Yt):Se},Ut=vt?at(At):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Vt=0,oe;Ut.length>Vt;Vt++)Tt(At,oe=Ut[Vt])&&!Tt(Yt,oe)&<(Yt,oe,it(At,oe));Yt.prototype=Dt,Dt.constructor=Yt,St(gt,Pt,Yt)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-assign");vt({target:"Object",stat:!0,forced:Object.assign!==gt},{assign:gt})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-to-array").entries;vt({target:"Object",stat:!0},{entries:function(Ct){return gt(Ct)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/native-symbol"),Et=ot("../internals/fails"),Ct=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/to-object"),Tt=!gt||Et(function(){Ct.f(1)});vt({target:"Object",stat:!0,forced:Tt},{getOwnPropertySymbols:function(xt){var ft=Ct.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,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/to-object"),Et=ot("../internals/object-keys"),Ct=ot("../internals/fails"),St=Ct(function(){Et(1)});vt({target:"Object",stat:!0,forced:St},{keys:function(mt){return Et(gt(mt))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ot,zt,Bt){var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/redefine"),Et=ot("../internals/object-to-string");vt||gt(Object.prototype,"toString",Et,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),Et=ot("../internals/a-callable"),Ct=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=Ct.f(z),at=tt.resolve,it=tt.reject,lt=St(function(){var ut=Et(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,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),Et=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Ct=ot("../internals/promise-native-constructor"),St=ot("../internals/get-built-in"),Tt=ot("../internals/is-callable"),mt=ot("../internals/redefine"),xt=Ct&&Ct.prototype;if(vt({target:"Promise",proto:!0,forced:Et,real:!0},{catch:function(z){return this.then(void 0,z)}}),!gt&&Tt(Ct)){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,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),Et=ot("../internals/engine-is-node"),Ct=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"),Ht=ot("../internals/new-promise-capability"),Yt="Promise",Ut=Gt.CONSTRUCTOR,Vt=Gt.REJECTION_EVENT,oe=Gt.SUBCLASSING,se=jt.getterFor(Yt),de=jt.set,Se=Nt&&Nt.prototype,Qt=Nt,ne=Se,ye=Ct.TypeError,we=Ct.document,be=Ct.process,fe=Ht.f,pe=fe,ce=!!(we&&we.createEvent&&Ct.dispatchEvent),Ce="unhandledrejection",ve="rejectionhandled",Fe=0,ge=1,xe=2,ee=1,Kt=2,wt,Lt,Xt,re,It=function($e){var Qe;return it($e)&&at(Qe=$e.then)?Qe:!1},Rt=function($e,Qe){var Ze=Qe.value,Ge=Qe.state==ge,We=Ge?$e.ok:$e.fail,Ke=$e.resolve,nn=$e.reject,hn=$e.domain,un,bn,Un;try{We?(Ge||(Qe.rejection===Kt&&Ae(Qe),Qe.rejection=ee),We===!0?un=Ze:(hn&&hn.enter(),un=We(Ze),hn&&(hn.exit(),Un=!0)),un===$e.promise?nn(ye("Promise-chain cycle")):(bn=It(un))?St(bn,un,Ke,nn):Ke(un)):nn(Ze)}catch(Vn){hn&&!Un&&hn.exit(),nn(Vn)}},Wt=function($e,Qe){$e.notified||($e.notified=!0,Pt(function(){for(var Ze=$e.reactions,Ge;Ge=Ze.get();)Rt(Ge,$e);$e.notified=!1,Qe&&!$e.rejection&&ue($e)}))},te=function($e,Qe,Ze){var Ge,We;ce?(Ge=we.createEvent("Event"),Ge.promise=Qe,Ge.reason=Ze,Ge.initEvent($e,!1,!0),Ct.dispatchEvent(Ge)):Ge={promise:Qe,reason:Ze},!Vt&&(We=Ct["on"+$e])?We(Ge):$e===Ce&&At("Unhandled promise rejection",Ze)},ue=function($e){St(dt,Ct,function(){var Qe=$e.facade,Ze=$e.value,Ge=le($e),We;if(Ge&&(We=Dt(function(){Et?be.emit("unhandledRejection",Ze,Qe):te(Ce,Qe,Ze)}),$e.rejection=Et||le($e)?Kt:ee,We.error))throw We.value})},le=function($e){return $e.rejection!==ee&&!$e.parent},Ae=function($e){St(dt,Ct,function(){var Qe=$e.facade;Et?be.emit("rejectionHandled",Qe):te(ve,Qe,$e.value)})},Le=function($e,Qe,Ze){return function(Ge){$e(Qe,Ge,Ze)}},Be=function($e,Qe,Ze){$e.done||($e.done=!0,Ze&&($e=Ze),$e.value=Qe,$e.state=xe,Wt($e,!0))},tn=function($e,Qe,Ze){if(!$e.done){$e.done=!0,Ze&&($e=Ze);try{if($e.facade===Qe)throw ye("Promise can't be resolved itself");var Ge=It(Qe);Ge?Pt(function(){var We={done:!1};try{St(Ge,Qe,Le(tn,We,$e),Le(Be,We,$e))}catch(Ke){Be(We,Ke,$e)}}):($e.value=Qe,$e.state=ge,Wt($e,!1))}catch(We){Be({done:!1},We,$e)}}};if(Ut&&(Qt=function(Qe){lt(this,ne),tt(Qe),St(wt,this);var Ze=se(this);try{Qe(Le(tn,Ze),Le(Be,Ze))}catch(Ge){Be(Ze,Ge)}},ne=Qt.prototype,wt=function(Qe){de(this,{type:Yt,done:!1,notified:!1,parent:!1,reactions:new Ft,rejection:!1,state:Fe,value:void 0})},wt.prototype=mt(ne,{then:function(Qe,Ze){var Ge=se(this),We=fe(ut(this,Qt));return Ge.parent=!0,We.ok=at(Qe)?Qe:!0,We.fail=at(Ze)&&Ze,We.domain=Et?be.domain:void 0,Ge.state==Fe?Ge.reactions.add(We):Pt(function(){Rt(We,Ge)}),We.promise}}),Lt=function(){var $e=new wt,Qe=se($e);this.promise=$e,this.resolve=Le(tn,Qe),this.reject=Le(Be,Qe)},Ht.f=fe=function($e){return $e===Qt||$e===Xt?new Lt($e):pe($e)},!gt&&at(Nt)&&Se!==Object.prototype)){re=Se.then,oe||Tt(Se,"then",function(Qe,Ze){var Ge=this;return new Qt(function(We,Ke){St(re,Ge,We,Ke)}).then(Qe,Ze)},{unsafe:!0});try{delete Se.constructor}catch($e){}xt&&xt(Se,ne)}vt({global:!0,wrap:!0,forced:Ut},{Promise:Qt}),ft(Qt,Yt,!1,!0),z(Yt)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(ot,zt,Bt){ot("../modules/es.promise.constructor"),ot("../modules/es.promise.all"),ot("../modules/es.promise.catch"),ot("../modules/es.promise.race"),ot("../modules/es.promise.reject"),ot("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),Et=ot("../internals/a-callable"),Ct=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=Ct.f(z),at=tt.reject,it=St(function(){var lt=Et(z.resolve);Tt(ft,function(ut){gt(lt,z,ut).then(tt.resolve,at)})});return it.error&&at(it.value),tt.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),Et=ot("../internals/new-promise-capability"),Ct=ot("../internals/promise-constructor-detection").CONSTRUCTOR;vt({target:"Promise",stat:!0,forced:Ct},{reject:function(Tt){var mt=Et.f(this);return gt(mt.reject,void 0,Tt),mt.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),Et=ot("../internals/is-pure"),Ct=ot("../internals/promise-native-constructor"),St=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Tt=ot("../internals/promise-resolve"),mt=gt("Promise"),xt=Et&&!St;vt({target:"Promise",stat:!0,forced:Et||St},{resolve:function(z){return Tt(xt&&this===mt?Ct:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),Et=ot("../internals/function-uncurry-this"),Ct=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,Ht=Gt.prototype,Yt=gt.SyntaxError,Ut=Et(Ht.exec),Vt=Et("".charAt),oe=Et("".replace),se=Et("".indexOf),de=Et("".slice),Se=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Qt=/a/g,ne=/a/g,ye=new Gt(Qt)!==Qt,we=at.MISSED_STICKY,be=at.UNSUPPORTED_Y,fe=vt&&(!ye||we||Ft||jt||ut(function(){return ne[Nt]=!1,Gt(Qt)!=Qt||Gt(ne)==ne||Gt(Qt,"i")!="/a/i"})),pe=function(ge){for(var xe=ge.length,ee=0,Kt="",wt=!1,Lt;ee<=xe;ee++){if(Lt=Vt(ge,ee),Lt==="\\"){Kt+=Lt+Vt(ge,++ee);continue}!wt&&Lt==="."?Kt+="[\\s\\S]":(Lt==="["?wt=!0:Lt==="]"&&(wt=!1),Kt+=Lt)}return Kt},ce=function(ge){for(var xe=ge.length,ee=0,Kt="",wt=[],Lt={},Xt=!1,re=!1,It=0,Rt="",Wt;ee<=xe;ee++){if(Wt=Vt(ge,ee),Wt==="\\")Wt=Wt+Vt(ge,++ee);else if(Wt==="]")Xt=!1;else if(!Xt)switch(!0){case Wt==="[":Xt=!0;break;case Wt==="(":Ut(Se,de(ge,ee+1))&&(ee+=2,re=!0),Kt+=Wt,It++;continue;case(Wt===">"&&re):if(Rt===""||dt(Lt,Rt))throw new Yt("Invalid capture group name");Lt[Rt]=!0,wt[wt.length]=[Rt,It],re=!1,Rt="";continue}re?Rt+=Wt:Kt+=Wt}return[Kt,wt]};if(Ct("RegExp",fe)){for(var Ce=function(xe,ee){var Kt=xt(Ht,this),wt=ft(xe),Lt=ee===void 0,Xt=[],re=xe,It,Rt,Wt,te,ue,le;if(!Kt&&wt&&Lt&&xe.constructor===Ce)return xe;if((wt||xt(Ht,xe))&&(xe=xe.source,Lt&&(ee=tt(re))),xe=xe===void 0?"":z(xe),ee=ee===void 0?"":z(ee),re=xe,Ft&&"dotAll"in Qt&&(Rt=!!ee&&se(ee,"s")>-1,Rt&&(ee=oe(ee,/s/g,""))),It=ee,we&&"sticky"in Qt&&(Wt=!!ee&&se(ee,"y")>-1,Wt&&be&&(ee=oe(ee,/y/g,""))),jt&&(te=ce(xe),xe=te[0],Xt=te[1]),ue=St(Gt(xe,ee),Kt?this:Ht,Ce),(Rt||Wt||Xt.length)&&(le=Pt(ue),Rt&&(le.dotAll=!0,le.raw=Ce(pe(xe),It)),Wt&&(le.sticky=!0),Xt.length&&(le.groups=Xt)),xe!==re)try{Tt(ue,"source",re===""?"(?:)":re)}catch(Ae){}return ue},ve=mt(Gt),Fe=0;ve.length>Fe;)it(Ce,Gt,ve[Fe++]);Ht.constructor=Ce,Ce.prototype=Ht,lt(gt,"RegExp",Ce)}At("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/regexp-exec");vt({target:"RegExp",proto:!0,forced:/./.exec!==gt},{exec:gt})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/redefine"),Et=ot("../internals/an-object"),Ct=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=Et(this),lt=Ct(it.source),ut=Ct(Tt(it));return"/"+lt+"/"+ut},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/not-a-regexp"),Ct=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(Ct(this)),St(Et(ft)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt,gt=ot("../internals/to-string"),Et=ot("../internals/internal-state"),Ct=ot("../internals/define-iterator"),St="String Iterator",Tt=Et.set,mt=Et.getterFor(St);Ct(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,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),Et=ot("../internals/an-object"),Ct=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=Et(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,Ct(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,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),Et=ot("../internals/function-uncurry-this"),Ct=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=Et([].concat),jt=Et([].push),Nt=Et("".indexOf),Gt=Et("".slice),Ht=function(oe){return oe===void 0?oe:String(oe)},Yt=function(){return"a".replace(/./,"$0")==="$0"}(),Ut=function(){return/./[Pt]?/./[Pt]("a","$0")==="":!1}(),Vt=!St(function(){var oe=/./;return oe.exec=function(){var se=[];return se.groups={a:"7"},se},"".replace(oe,"$<a>")!=="7"});Ct("replace",function(oe,se,de){var Se=Ut?"$":"$0";return[function(ne,ye){var we=tt(this),be=ne==null?void 0:it(ne,Pt);return be?gt(be,ne,we,ye):gt(se,z(we),ne,ye)},function(Qt,ne){var ye=Tt(this),we=z(Qt);if(typeof ne=="string"&&Nt(ne,Se)===-1&&Nt(ne,"$<")===-1){var be=de(se,ye,we,ne);if(be.done)return be.value}var fe=mt(ne);fe||(ne=z(ne));var pe=ye.global;if(pe){var ce=ye.unicode;ye.lastIndex=0}for(var Ce=[];;){var ve=ut(ye,we);if(ve===null||(jt(Ce,ve),!pe))break;var Fe=z(ve[0]);Fe===""&&(ye.lastIndex=at(we,ft(ye.lastIndex),ce))}for(var ge="",xe=0,ee=0;ee<Ce.length;ee++){ve=Ce[ee];for(var Kt=z(ve[0]),wt=At(Dt(xt(ve.index),we.length),0),Lt=[],Xt=1;Xt<ve.length;Xt++)jt(Lt,Ht(ve[Xt]));var re=ve.groups;if(fe){var It=Ft([Kt],Lt,wt,we);re!==void 0&&jt(It,re);var Rt=z(vt(ne,void 0,It))}else Rt=lt(Kt,we,wt,Lt,re,ne);wt>=xe&&(ge+=Gt(we,xe,wt)+Rt,xe=wt+Kt.length)}return ge+Gt(we,xe)}]},!Vt||!Yt||Ut)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),Et=ot("../internals/an-object"),Ct=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=Ct(this),ut=it==null?void 0:mt(it,ft);return ut?vt(ut,it,lt):new RegExp(it)[ft](Tt(lt))},function(at){var it=Et(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,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),Et=ot("../internals/function-uncurry-this"),Ct=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=Et(/./.exec),Gt=Et(jt),Ht=Et("".slice),Yt=!Pt(function(){var Ut=/(?:)/,Vt=Ut.exec;Ut.exec=function(){return Vt.apply(this,arguments)};var oe="ab".split(Ut);return oe.length!==2||oe[0]!=="a"||oe[1]!=="b"});Ct("split",function(Ut,Vt,oe){var se;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?se=function(de,Se){var Qt=tt(mt(this)),ne=Se===void 0?Dt:Se>>>0;if(ne===0)return[];if(de===void 0)return[Qt];if(!St(de))return gt(Vt,Qt,de,ne);for(var ye=[],we=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(de.sticky?"y":""),be=0,fe=new RegExp(de.source,we+"g"),pe,ce,Ce;(pe=gt(ut,fe,Qt))&&(ce=fe.lastIndex,!(ce>be&&(Gt(ye,Ht(Qt,be,pe.index)),pe.length>1&&pe.index<Qt.length&&vt(jt,ye,it(pe,1)),Ce=pe[0].length,be=ce,ye.length>=ne)));)fe.lastIndex===pe.index&&fe.lastIndex++;return be===Qt.length?(Ce||!Nt(fe,""))&&Gt(ye,""):Gt(ye,Ht(Qt,be)),ye.length>ne?it(ye,0,ne):ye}:"0".split(void 0,0).length?se=function(de,Se){return de===void 0&&Se===0?[]:gt(Vt,this,de,Se)}:se=Vt,[function(Se,Qt){var ne=mt(this),ye=Se==null?void 0:at(Se,Ut);return ye?gt(ye,Se,ne,Qt):gt(se,tt(ne),Se,Qt)},function(de,Se){var Qt=Tt(this),ne=tt(de),ye=oe(se,Qt,ne,Se,se!==Vt);if(ye.done)return ye.value;var we=xt(Qt,RegExp),be=Qt.unicode,fe=(Qt.ignoreCase?"i":"")+(Qt.multiline?"m":"")+(Qt.unicode?"u":"")+(At?"g":"y"),pe=new we(At?"^(?:"+Qt.source+")":Qt,fe),ce=Se===void 0?Dt:Se>>>0;if(ce===0)return[];if(ne.length===0)return lt(pe,ne)===null?[ne]:[];for(var Ce=0,ve=0,Fe=[];ve<ne.length;){pe.lastIndex=At?0:ve;var ge=lt(pe,At?Ht(ne,ve):ne),xe;if(ge===null||(xe=Ft(z(pe.lastIndex+(At?ve:0)),ne.length))===Ce)ve=ft(ne,ve,be);else{if(Gt(Fe,Ht(ne,Ce,ve)),Fe.length===ce)return Fe;for(var ee=1;ee<=ge.length-1;ee++)if(Gt(Fe,ge[ee]),Fe.length===ce)return Fe;ve=Ce=xe}}return Gt(Fe,Ht(ne,Ce)),Fe}]},!Yt,At)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/string-trim").trim,Et=ot("../internals/string-trim-forced");vt({target:"String",proto:!0,forced:Et("trim")},{trim:function(){return gt(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),Et=ot("../internals/function-call"),Ct=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"),Ht=ot("../internals/object-property-is-enumerable"),Yt=ot("../internals/redefine"),Ut=ot("../internals/shared"),Vt=ot("../internals/shared-key"),oe=ot("../internals/hidden-keys"),se=ot("../internals/uid"),de=ot("../internals/well-known-symbol"),Se=ot("../internals/well-known-symbol-wrapped"),Qt=ot("../internals/define-well-known-symbol"),ne=ot("../internals/symbol-define-to-primitive"),ye=ot("../internals/set-to-string-tag"),we=ot("../internals/internal-state"),be=ot("../internals/array-iteration").forEach,fe=Vt("hidden"),pe="Symbol",ce="prototype",Ce=we.set,ve=we.getterFor(pe),Fe=Object[ce],ge=gt.Symbol,xe=ge&&ge[ce],ee=gt.TypeError,Kt=gt.QObject,wt=jt.f,Lt=Nt.f,Xt=Dt.f,re=Ht.f,It=Ct([].push),Rt=Ut("symbols"),Wt=Ut("op-symbols"),te=Ut("wks"),ue=!Kt||!Kt[ce]||!Kt[ce].findChild,le=Tt&&xt(function(){return dt(Lt({},"a",{get:function(){return Lt(this,"a",{value:7}).a}})).a!=7})?function(We,Ke,nn){var hn=wt(Fe,Ke);hn&&delete Fe[Ke],Lt(We,Ke,nn),hn&&We!==Fe&&Lt(Fe,Ke,hn)}:Lt,Ae=function(We,Ke){var nn=Rt[We]=dt(xe);return Ce(nn,{type:pe,tag:We,description:Ke}),Tt||(nn.description=Ke),nn},Le=function(Ke,nn,hn){Ke===Fe&&Le(Wt,nn,hn),tt(Ke);var un=it(nn);return tt(hn),ft(Rt,un)?(hn.enumerable?(ft(Ke,fe)&&Ke[fe][un]&&(Ke[fe][un]=!1),hn=dt(hn,{enumerable:ut(0,!1)})):(ft(Ke,fe)||Lt(Ke,fe,ut(1,{})),Ke[fe][un]=!0),le(Ke,un,hn)):Lt(Ke,un,hn)},Be=function(Ke,nn){tt(Ke);var hn=at(nn),un=Pt(hn).concat(Ge(hn));return be(un,function(bn){(!Tt||Et($e,hn,bn))&&Le(Ke,bn,hn[bn])}),Ke},tn=function(Ke,nn){return nn===void 0?dt(Ke):Be(dt(Ke),nn)},$e=function(Ke){var nn=it(Ke),hn=Et(re,this,nn);return this===Fe&&ft(Rt,nn)&&!ft(Wt,nn)?!1:hn||!ft(this,nn)||!ft(Rt,nn)||ft(this,fe)&&this[fe][nn]?hn:!0},Qe=function(Ke,nn){var hn=at(Ke),un=it(nn);if(!(hn===Fe&&ft(Rt,un)&&!ft(Wt,un))){var bn=wt(hn,un);return bn&&ft(Rt,un)&&!(ft(hn,fe)&&hn[fe][un])&&(bn.enumerable=!0),bn}},Ze=function(Ke){var nn=Xt(at(Ke)),hn=[];return be(nn,function(un){!ft(Rt,un)&&!ft(oe,un)&&It(hn,un)}),hn},Ge=function(We){var Ke=We===Fe,nn=Xt(Ke?Wt:at(We)),hn=[];return be(nn,function(un){ft(Rt,un)&&(!Ke||ft(Fe,un))&&It(hn,Rt[un])}),hn};mt||(ge=function(){if(z(xe,this))throw ee("Symbol is not a constructor");var Ke=!arguments.length||arguments[0]===void 0?void 0:lt(arguments[0]),nn=se(Ke),hn=function(un){this===Fe&&Et(hn,Wt,un),ft(this,fe)&&ft(this[fe],nn)&&(this[fe][nn]=!1),le(this,nn,ut(1,un))};return Tt&&ue&&le(Fe,nn,{configurable:!0,set:hn}),Ae(nn,Ke)},xe=ge[ce],Yt(xe,"toString",function(){return ve(this).tag}),Yt(ge,"withoutSetter",function(We){return Ae(se(We),We)}),Ht.f=$e,Nt.f=Le,Gt.f=Be,jt.f=Qe,At.f=Dt.f=Ze,Ft.f=Ge,Se.f=function(We){return Ae(de(We),We)},Tt&&(Lt(xe,"description",{configurable:!0,get:function(){return ve(this).description}}),St||Yt(Fe,"propertyIsEnumerable",$e,{unsafe:!0}))),vt({global:!0,wrap:!0,forced:!mt,sham:!mt},{Symbol:ge}),be(Pt(te),function(We){Qt(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:tn,defineProperty:Le,defineProperties:Be,getOwnPropertyDescriptor:Qe}),vt({target:"Object",stat:!0,forced:!mt},{getOwnPropertyNames:Ze}),ne(),ye(ge,pe),oe[fe]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/descriptors"),Et=ot("../internals/global"),Ct=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=Et.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=Ct(at.toString),Pt=Ct(at.valueOf),At=/^Symbol\((.*)\)[^)]+$/,Dt=Ct("".replace),Ft=Ct("".slice);ft(at,"description",{configurable:!0,get:function(){var Nt=Pt(this),Gt=dt(Nt);if(St(it,Nt))return"";var Ht=ut?Ft(Gt,7,-1):Dt(Gt,At,"$1");return Ht===""?void 0:Ht}}),vt({global:!0,forced:!0},{Symbol:lt})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),Et=ot("../internals/has-own-property"),Ct=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=Ct(ft);if(Et(mt,z))return mt[z];var tt=gt("Symbol")(z);return mt[z]=tt,xt[tt]=z,tt}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(ot,zt,Bt){var vt=ot("../internals/define-well-known-symbol");vt("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ot,zt,Bt){ot("../modules/es.symbol.constructor"),ot("../modules/es.symbol.for"),ot("../modules/es.symbol.key-for"),ot("../modules/es.json.stringify"),ot("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/has-own-property"),Et=ot("../internals/is-symbol"),Ct=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(!Et(ft))throw TypeError(Ct(ft)+" is not a symbol");if(gt(mt,ft))return mt[ft]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/array-buffer-view-core"),Et=ot("../internals/array-copy-within"),Ct=vt(Et),St=gt.aTypedArray,Tt=gt.exportTypedArrayMethod;Tt("copyWithin",function(xt,ft){return Ct(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,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").every,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("every",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-call"),Et=ot("../internals/array-fill"),Ct=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("fill",function(mt){var xt=arguments.length;return gt(Et,Ct(this),mt,xt>1?arguments[1]:void 0,xt>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").filter,Et=ot("../internals/typed-array-from-species-and-list"),Ct=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("filter",function(mt){var xt=gt(Ct(this),mt,arguments.length>1?arguments[1]:void 0);return Et(this,xt)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").findIndex,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("findIndex",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").find,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("find",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").forEach,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("forEach",function(Tt){gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").includes,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("includes",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").indexOf,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("indexOf",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/fails"),Et=ot("../internals/function-uncurry-this"),Ct=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=Et(St.values),z=Et(St.keys),tt=Et(St.entries),at=Ct.aTypedArray,it=Ct.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,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-uncurry-this"),Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod,St=gt([].join);Ct("join",function(mt){return St(Et(this),mt)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-apply"),Et=ot("../internals/array-last-index-of"),Ct=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("lastIndexOf",function(mt){var xt=arguments.length;return gt(Et,Ct(this),xt>1?[mt,arguments[1]]:[mt])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").map,Et=ot("../internals/typed-array-species-constructor"),Ct=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("map",function(mt){return gt(Ct(this),mt,arguments.length>1?arguments[1]:void 0,function(xt,ft){return new(Et(xt))(ft)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").right,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("reduceRight",function(Tt){var mt=arguments.length;return gt(Et(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").left,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("reduce",function(Tt){var mt=arguments.length;return gt(Et(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=vt.aTypedArray,Et=vt.exportTypedArrayMethod,Ct=Math.floor;Et("reverse",function(){for(var Tt=this,mt=gt(Tt).length,xt=Ct(mt/2),ft=0,z;ft<xt;)z=Tt[ft],Tt[ft++]=Tt[--mt],Tt[mt]=z;return Tt})},{"../internals/array-buffer-view-core":103}],331:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-call"),Et=ot("../internals/array-buffer-view-core"),Ct=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=Et.aTypedArray,it=Et.exportTypedArrayMethod,lt=!mt(function(){var dt=new Uint8ClampedArray(2);return gt(tt,dt,{length:1,0:3},1),dt[1]!==3}),ut=lt&&Et.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=Ct(Dt),Nt=0;if(jt+At>Ft)throw xt("Wrong length");for(;Nt<jt;)this[At+Nt]=Dt[Nt++]},!lt||ut)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/typed-array-species-constructor"),Et=ot("../internals/fails"),Ct=ot("../internals/array-slice"),St=vt.aTypedArray,Tt=vt.exportTypedArrayMethod,mt=Et(function(){new Int8Array(1).slice()});Tt("slice",function(ft,z){for(var tt=Ct(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,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").some,Et=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("some",function(Tt){return gt(Et(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),Et=ot("../internals/fails"),Ct=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&&!(Et(function(){lt(new it(2),null)})&&Et(function(){lt(new it(2),{})})),dt=!!lt&&!Et(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&&Ct(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,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/to-length"),Et=ot("../internals/to-absolute-index"),Ct=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=Et(xt,tt),it=Ct(z);return new it(z.buffer,z.byteOffset+at*z.BYTES_PER_ELEMENT,gt((ft===void 0?tt:Et(ft,tt))-at))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),Et=ot("../internals/array-buffer-view-core"),Ct=ot("../internals/fails"),St=ot("../internals/array-slice"),Tt=vt.Int8Array,mt=Et.aTypedArray,xt=Et.exportTypedArrayMethod,ft=[].toLocaleString,z=!!Tt&&Ct(function(){ft.call(new Tt(1))}),tt=Ct(function(){return[1,2].toLocaleString()!=new Tt([1,2]).toLocaleString()})||!Ct(function(){Tt.prototype.toLocaleString.call([1,2])});xt("toLocaleString",function(){return gt(ft,z?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,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core").exportTypedArrayMethod,gt=ot("../internals/fails"),Et=ot("../internals/global"),Ct=ot("../internals/function-uncurry-this"),St=Et.Uint8Array,Tt=St&&St.prototype||{},mt=[].toString,xt=Ct([].join);gt(function(){mt.call({})})&&(mt=function(){return xt(this)});var ft=Tt.toString!=mt;vt("toString",mt,ft)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(ot,zt,Bt){var vt=ot("../internals/typed-array-constructor");vt("Uint8",function(gt){return function(Ct,St,Tt){return gt(this,Ct,St,Tt)}})},{"../internals/typed-array-constructor":258}],339:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),Et=ot("../internals/dom-token-list-prototype"),Ct=ot("../internals/array-for-each"),St=ot("../internals/create-non-enumerable-property"),Tt=function(xt){if(xt&&xt.forEach!==Ct)try{St(xt,"forEach",Ct)}catch(ft){xt.forEach=Ct}};for(var mt in gt)gt[mt]&&Tt(vt[mt]&&vt[mt].prototype);Tt(Et)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),Et=ot("../internals/dom-token-list-prototype"),Ct=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=Ct.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 Ct)if(at[lt]!==Ct[lt])try{St(at,lt,Ct[lt])}catch(ut){at[lt]=Ct[lt]}}}};for(var tt in gt)z(vt[tt]&&vt[tt].prototype,tt);z(Et,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(ot,zt,Bt){function vt(dt){return Array.isArray?Array.isArray(dt):ut(dt)==="[object Array]"}Bt.isArray=vt;function gt(dt){return typeof dt=="boolean"}Bt.isBoolean=gt;function Et(dt){return dt===null}Bt.isNull=Et;function Ct(dt){return dt==null}Bt.isNullOrUndefined=Ct;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,zt,Bt){(function(vt){"use strict";var gt=function(){var mt=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,xt=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ft=/[^-+\dA-Z]/g;return function(z,tt,at,it){if(arguments.length===1&&Tt(z)==="string"&&!/\d/.test(z)&&(tt=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");tt=String(gt.masks[tt]||tt||gt.masks.default);var lt=tt.slice(0,4);(lt==="UTC:"||lt==="GMT:")&&(tt=tt.slice(4),at=!0,lt==="GMT:"&&(it=!0));var ut=at?"getUTC":"get",dt=z[ut+"Date"](),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"](),Ht=at?0:z.getTimezoneOffset(),Yt=Ct(z),Ut=St(z),Vt={d:dt,dd:Et(dt),ddd:gt.i18n.dayNames[Pt],dddd:gt.i18n.dayNames[Pt+7],m:At+1,mm:Et(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:Et(Ft%12||12),H:Ft,HH:Et(Ft),M:jt,MM:Et(jt),s:Nt,ss:Et(Nt),l:Et(Gt,3),L:Et(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:(Ht>0?"-":"+")+Et(Math.floor(Math.abs(Ht)/60)*100+Math.abs(Ht)%60,4),S:["th","st","nd","rd"][dt%10>3?0:(dt%100-dt%10!=10)*dt%10],W:Yt,N:Ut};return tt.replace(mt,function(oe){return oe in Vt?Vt[oe]:oe.slice(1,oe.length-1)})}}();gt.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},gt.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function Et(mt,xt){for(mt=String(mt),xt=xt||2;mt.length<xt;)mt="0"+mt;return mt}function Ct(mt){var xt=new Date(mt.getFullYear(),mt.getMonth(),mt.getDate());xt.setDate(xt.getDate()-(xt.getDay()+6)%7+3);var ft=new Date(xt.getFullYear(),0,4);ft.setDate(ft.getDate()-(ft.getDay()+6)%7+3);var z=xt.getTimezoneOffset()-ft.getTimezoneOffset();xt.setHours(xt.getHours()-z);var tt=(xt-ft)/(864e5*7);return 1+Math.floor(tt)}function 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 he=="function"&&he.amd?he(function(){return gt}):typeof Bt=="object"?zt.exports=gt:vt.dateFormat=gt})(this)},{}],343:[function(ot,zt,Bt){"use strict";var vt=/["'&<>]/;zt.exports=gt;function gt(Et){var Ct=""+Et,St=vt.exec(Ct);if(!St)return Ct;var Tt,mt="",xt=0,ft=0;for(xt=St.index;xt<Ct.length;xt++){switch(Ct.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+=Ct.substring(ft,xt)),ft=xt+1,mt+=Tt}return ft!==xt?mt+Ct.substring(ft,xt):mt}},{}],344:[function(ot,zt,Bt){"use strict";var vt=typeof Reflect=="object"?Reflect:null,gt=vt&&typeof vt.apply=="function"?vt.apply:function(Nt,Gt,Ht){return Function.prototype.apply.call(Nt,Gt,Ht)},Et;vt&&typeof vt.ownKeys=="function"?Et=vt.ownKeys:Object.getOwnPropertySymbols?Et=function(Nt){return Object.getOwnPropertyNames(Nt).concat(Object.getOwnPropertySymbols(Nt))}:Et=function(Nt){return Object.getOwnPropertyNames(Nt)};function Ct(jt){console&&console.warn&&console.warn(jt)}var St=Number.isNaN||function(Nt){return Nt!==Nt};function Tt(){Tt.init.call(this)}zt.exports=Tt,zt.exports.once=At,Tt.EventEmitter=Tt,Tt.prototype._events=void 0,Tt.prototype._eventsCount=0,Tt.prototype._maxListeners=void 0;var mt=10;function xt(jt){if(typeof jt!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof jt)}Object.defineProperty(Tt,"defaultMaxListeners",{enumerable:!0,get:function(){return mt},set:function(jt){if(typeof jt!="number"||jt<0||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=[],Ht=1;Ht<arguments.length;Ht++)Gt.push(arguments[Ht]);var Yt=Nt==="error",Ut=this._events;if(Ut!==void 0)Yt=Yt&&Ut.error===void 0;else if(!Yt)return!1;if(Yt){var Vt;if(Gt.length>0&&(Vt=Gt[0]),Vt instanceof Error)throw Vt;var oe=new Error("Unhandled error."+(Vt?" ("+Vt.message+")":""));throw oe.context=Vt,oe}var se=Ut[Nt];if(se===void 0)return!1;if(typeof se=="function")gt(se,this,Gt);else for(var de=se.length,Se=ut(se,de),Ht=0;Ht<de;++Ht)gt(Se[Ht],this,Gt);return!0};function z(jt,Nt,Gt,Ht){var Yt,Ut,Vt;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),Vt=Ut[Nt]),Vt===void 0)Vt=Ut[Nt]=Gt,++jt._eventsCount;else if(typeof Vt=="function"?Vt=Ut[Nt]=Ht?[Gt,Vt]:[Vt,Gt]:Ht?Vt.unshift(Gt):Vt.push(Gt),Yt=ft(jt),Yt>0&&Vt.length>Yt&&!Vt.warned){Vt.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Vt.length+" "+String(Nt)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=jt,oe.type=Nt,oe.count=Vt.length,Ct(oe)}return jt}Tt.prototype.addListener=function(Nt,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 Ht={fired:!1,wrapFn:void 0,target:jt,type:Nt,listener:Gt},Yt=tt.bind(Ht);return Yt.listener=Gt,Ht.wrapFn=Yt,Yt}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 Ht,Yt,Ut,Vt,oe;if(xt(Gt),Yt=this._events,Yt===void 0)return this;if(Ht=Yt[Nt],Ht===void 0)return this;if(Ht===Gt||Ht.listener===Gt)--this._eventsCount===0?this._events=Object.create(null):(delete Yt[Nt],Yt.removeListener&&this.emit("removeListener",Nt,Ht.listener||Gt));else if(typeof Ht!="function"){for(Ut=-1,Vt=Ht.length-1;Vt>=0;Vt--)if(Ht[Vt]===Gt||Ht[Vt].listener===Gt){oe=Ht[Vt].listener,Ut=Vt;break}if(Ut<0)return this;Ut===0?Ht.shift():dt(Ht,Ut),Ht.length===1&&(Yt[Nt]=Ht[0]),Yt.removeListener!==void 0&&this.emit("removeListener",Nt,oe||Gt)}return this},Tt.prototype.off=Tt.prototype.removeListener,Tt.prototype.removeAllListeners=function(Nt){var Gt,Ht,Yt;if(Ht=this._events,Ht===void 0)return this;if(Ht.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ht[Nt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ht[Nt]),this;if(arguments.length===0){var Ut=Object.keys(Ht),Vt;for(Yt=0;Yt<Ut.length;++Yt)Vt=Ut[Yt],Vt!=="removeListener"&&this.removeAllListeners(Vt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Gt=Ht[Nt],typeof Gt=="function")this.removeListener(Nt,Gt);else if(Gt!==void 0)for(Yt=Gt.length-1;Yt>=0;Yt--)this.removeListener(Nt,Gt[Yt]);return this};function it(jt,Nt,Gt){var Ht=jt._events;if(Ht===void 0)return[];var Yt=Ht[Nt];return Yt===void 0?[]:typeof Yt=="function"?Gt?[Yt.listener||Yt]:[Yt]:Gt?Pt(Yt):ut(Yt,Yt.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?Et(this._events):[]};function ut(jt,Nt){for(var Gt=new Array(Nt),Ht=0;Ht<Nt;++Ht)Gt[Ht]=jt[Ht];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,Ht){function Yt(Vt){jt.removeListener(Nt,Ut),Ht(Vt)}function Ut(){typeof jt.removeListener=="function"&&jt.removeListener("error",Yt),Gt([].slice.call(arguments))}Ft(jt,Nt,Ut,{once:!0}),Nt!=="error"&&Dt(jt,Yt,{once:!0})})}function Dt(jt,Nt,Gt){typeof jt.on=="function"&&Ft(jt,"error",Nt,Gt)}function Ft(jt,Nt,Gt,Ht){if(typeof jt.on=="function")Ht.once?jt.once(Nt,Gt):jt.on(Nt,Gt);else if(typeof jt.addEventListener=="function")jt.addEventListener(Nt,function Yt(Ut){Ht.once&&jt.removeEventListener(Nt,Yt),Gt(Ut)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof jt)}},{}],345:[function(ot,zt,Bt){"use strict";var vt=ot("is-callable"),gt=Object.prototype.toString,Et=Object.prototype.hasOwnProperty,Ct=function(ft,z,tt){for(var at=0,it=ft.length;at<it;at++)Et.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)Et.call(ft,at)&&(tt==null?z(ft[at],at,ft):z.call(tt,ft[at],at,ft))},mt=function(ft,z,tt){if(!vt(z))throw new TypeError("iterator must be a function");var at;arguments.length>=3&&(at=tt),gt.call(ft)==="[object Array]"?Ct(ft,z,at):typeof ft=="string"?St(ft,z,at):Tt(ft,z,at)};zt.exports=mt},{"is-callable":367}],346:[function(ot,zt,Bt){"use strict";var vt="Function.prototype.bind called on incompatible ",gt=Array.prototype.slice,Et=Object.prototype.toString,Ct="[object Function]";zt.exports=function(Tt){var mt=this;if(typeof mt!="function"||Et.call(mt)!==Ct)throw new TypeError(vt+mt);for(var xt=gt.call(arguments,1),ft,z=function(){if(this instanceof ft){var ut=mt.apply(this,xt.concat(gt.call(arguments)));return Object(ut)===ut?ut:this}else return mt.apply(Tt,xt.concat(gt.call(arguments)))},tt=Math.max(0,mt.length-xt.length),at=[],it=0;it<tt;it++)at.push("$"+it);if(ft=Function("binder","return function ("+at.join(",")+"){ return binder.apply(this,arguments); }")(z),mt.prototype){var lt=function(){};lt.prototype=mt.prototype,ft.prototype=new lt,lt.prototype=null}return ft}},{}],347:[function(ot,zt,Bt){"use strict";var vt=ot("./implementation");zt.exports=Function.prototype.bind||vt},{"./implementation":346}],348:[function(ot,zt,Bt){"use strict";var vt,gt=SyntaxError,Et=Function,Ct=TypeError,St=function(se){try{return Et('"use strict"; return ('+se+").constructor;")()}catch(de){}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch(se){Tt=null}var mt=function(){throw new Ct},xt=Tt?function(){try{return arguments.callee,mt}catch(se){try{return Tt(arguments,"callee").get}catch(de){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%":Et,"%GeneratorFunction%":at,"%Int8Array%":typeof Int8Array=="undefined"?vt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?vt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?vt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ft&&tt?tt(tt([][Symbol.iterator]())):vt,"%JSON%":typeof JSON=="object"?JSON:vt,"%Map%":typeof Map=="undefined"?vt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ft||!tt?vt:tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?vt:Promise,"%Proxy%":typeof Proxy=="undefined"?vt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?vt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?vt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ft||!tt?vt:tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?vt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ft&&tt?tt(""[Symbol.iterator]()):vt,"%Symbol%":ft?Symbol:vt,"%SyntaxError%":gt,"%ThrowTypeError%":xt,"%TypedArray%":it,"%TypeError%":Ct,"%Uint8Array%":typeof Uint8Array=="undefined"?vt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?vt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?vt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?vt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?vt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?vt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?vt:WeakSet};if(tt)try{null.error}catch(se){var ut=tt(tt(se));lt["%Error.prototype%"]=ut}var dt=function se(de){var Se;if(de==="%AsyncFunction%")Se=St("async function () {}");else if(de==="%GeneratorFunction%")Se=St("function* () {}");else if(de==="%AsyncGeneratorFunction%")Se=St("async function* () {}");else if(de==="%AsyncGenerator%"){var Qt=se("%AsyncGeneratorFunction%");Qt&&(Se=Qt.prototype)}else if(de==="%AsyncIteratorPrototype%"){var ne=se("%AsyncGenerator%");ne&&tt&&(Se=tt(ne.prototype))}return lt[de]=Se,Se},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),Ht=At.call(Function.call,RegExp.prototype.exec),Yt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ut=/\\(\\)?/g,Vt=function(de){var Se=Gt(de,0,1),Qt=Gt(de,-1);if(Se==="%"&&Qt!=="%")throw new gt("invalid intrinsic syntax, expected closing `%`");if(Qt==="%"&&Se!=="%")throw new gt("invalid intrinsic syntax, expected opening `%`");var ne=[];return Nt(de,Yt,function(ye,we,be,fe){ne[ne.length]=be?Nt(fe,Ut,"$1"):we||ye}),ne},oe=function(de,Se){var Qt=de,ne;if(Dt(Pt,Qt)&&(ne=Pt[Qt],Qt="%"+ne[0]+"%"),Dt(lt,Qt)){var ye=lt[Qt];if(ye===at&&(ye=dt(Qt)),typeof ye=="undefined"&&!Se)throw new Ct("intrinsic "+de+" exists, but is not available. Please file an issue!");return{alias:ne,name:Qt,value:ye}}throw new gt("intrinsic "+de+" does not exist!")};zt.exports=function(de,Se){if(typeof de!="string"||de.length===0)throw new Ct("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Se!="boolean")throw new Ct('"allowMissing" argument must be a boolean');if(Ht(/^%?[^%]*%?$/,de)===null)throw new gt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Qt=Vt(de),ne=Qt.length>0?Qt[0]:"",ye=oe("%"+ne+"%",Se),we=ye.name,be=ye.value,fe=!1,pe=ye.alias;pe&&(ne=pe[0],jt(Qt,Ft([0,1],pe)));for(var ce=1,Ce=!0;ce<Qt.length;ce+=1){var ve=Qt[ce],Fe=Gt(ve,0,1),ge=Gt(ve,-1);if((Fe==='"'||Fe==="'"||Fe==="`"||ge==='"'||ge==="'"||ge==="`")&&Fe!==ge)throw new gt("property names with quotes must have matching quotes");if((ve==="constructor"||!Ce)&&(fe=!0),ne+="."+ve,we="%"+ne+"%",Dt(lt,we))be=lt[we];else if(be!=null){if(!(ve in be)){if(!Se)throw new Ct("base intrinsic for "+de+" exists, but the property is not available.");return}if(Tt&&ce+1>=Qt.length){var xe=Tt(be,ve);Ce=!!xe,Ce&&"get"in xe&&!("originalValue"in xe.get)?be=xe.get:be=be[ve]}else Ce=Dt(be,ve),be=be[ve];Ce&&!fe&&(lt[we]=be)}}return be}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ot,zt,Bt){"use strict";var vt=ot("get-intrinsic"),gt=vt("%Object.getOwnPropertyDescriptor%",!0);if(gt)try{gt([],"length")}catch(Et){gt=null}zt.exports=gt},{"get-intrinsic":348}],350:[function(ot,zt,Bt){"use strict";var vt={foo:{}},gt=Object;zt.exports=function(){return{__proto__:vt}.foo===vt.foo&&!({__proto__:null}instanceof gt)}},{}],351:[function(ot,zt,Bt){"use strict";var vt=typeof Symbol!="undefined"&&Symbol,gt=ot("./shams");zt.exports=function(){return typeof vt!="function"||typeof Symbol!="function"||typeof vt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gt()}},{"./shams":352}],352:[function(ot,zt,Bt){"use strict";zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var gt={},Et=Symbol("test"),Ct=Object(Et);if(typeof Et=="string"||Object.prototype.toString.call(Et)!=="[object Symbol]"||Object.prototype.toString.call(Ct)!=="[object Symbol]")return!1;var St=42;gt[Et]=St;for(Et 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]!==Et||!Object.prototype.propertyIsEnumerable.call(gt,Et))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var mt=Object.getOwnPropertyDescriptor(gt,Et);if(mt.value!==St||mt.enumerable!==!0)return!1}return!0}},{}],353:[function(ot,zt,Bt){"use strict";var vt=ot("has-symbols/shams");zt.exports=function(){return vt()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ot,zt,Bt){"use strict";var vt=ot("function-bind");zt.exports=vt.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ot,zt,Bt){var vt=ot("http"),gt=ot("url"),Et=zt.exports;for(var Ct in vt)vt.hasOwnProperty(Ct)&&(Et[Ct]=vt[Ct]);Et.request=function(Tt,mt){return Tt=St(Tt),vt.request.call(this,Tt,mt)},Et.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,zt,Bt){"use strict";var vt=ot("util"),gt=ot("ms");zt.exports=function(Et){if(typeof Et=="number")return Et;var Ct=gt(Et);if(Ct===void 0){var St=new Error(vt.format("humanize-ms(%j) result undefined",Et));console.warn(St.stack)}return Ct}},{ms:376,util:419}],357:[function(ot,zt,Bt){Bt.read=function(vt,gt,Et,Ct,St){var Tt,mt,xt=St*8-Ct-1,ft=(1<<xt)-1,z=ft>>1,tt=-7,at=Et?St-1:0,it=Et?-1:1,lt=vt[gt+at];for(at+=it,Tt=lt&(1<<-tt)-1,lt>>=-tt,tt+=xt;tt>0;Tt=Tt*256+vt[gt+at],at+=it,tt-=8);for(mt=Tt&(1<<-tt)-1,Tt>>=-tt,tt+=Ct;tt>0;mt=mt*256+vt[gt+at],at+=it,tt-=8);if(Tt===0)Tt=1-z;else{if(Tt===ft)return mt?NaN:(lt?-1:1)*(1/0);mt=mt+Math.pow(2,Ct),Tt=Tt-z}return(lt?-1:1)*mt*Math.pow(2,Tt-Ct)},Bt.write=function(vt,gt,Et,Ct,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=Ct?0:Tt-1,ut=Ct?1:-1,dt=gt<0||gt===0&&1/gt<0?1:0;for(gt=Math.abs(gt),isNaN(gt)||gt===1/0?(xt=isNaN(gt)?1:0,mt=tt):(mt=Math.floor(Math.log(gt)/Math.LN2),gt*(ft=Math.pow(2,-mt))<1&&(mt--,ft*=2),mt+at>=1?gt+=it/ft:gt+=it*Math.pow(2,1-at),gt*ft>=2&&(mt++,ft/=2),mt+at>=tt?(xt=0,mt=tt):mt+at>=1?(xt=(gt*ft-1)*Math.pow(2,St),mt=mt+at):(xt=gt*Math.pow(2,at-1)*Math.pow(2,St),mt=0));St>=8;vt[Et+lt]=xt&255,lt+=ut,xt/=256,St-=8);for(mt=mt<<St|xt,z+=St;z>0;vt[Et+lt]=mt&255,lt+=ut,mt/=256,z-=8);vt[Et+lt-ut]|=dt*128}},{}],358:[function(ot,zt,Bt){"use strict";var vt=[ot("./nextTick"),ot("./queueMicrotask"),ot("./mutation.js"),ot("./messageChannel"),ot("./stateChange"),ot("./timeout")],gt,Et,Ct=-1,St=[],Tt=!1;function mt(){!gt||!Et||(gt=!1,Et.length?St=Et.concat(St):Ct=-1,St.length&&xt())}function xt(){if(!gt){Tt=!1,gt=!0;for(var lt=St.length,ut=setTimeout(mt);lt;){for(Et=St,St=[];Et&&++Ct<lt;)Et[Ct].run();Ct=-1,lt=St.length}Et=null,Ct=-1,gt=!1,clearTimeout(ut)}}for(var ft,z=-1,tt=vt.length;++z<tt;)if(vt[z]&&vt[z].test&&vt[z].test()){ft=vt[z].install(xt);break}function at(lt,ut){this.fun=lt,this.array=ut}at.prototype.run=function(){var lt=this.fun,ut=this.array;switch(ut.length){case 0:return lt();case 1:return lt(ut[0]);case 2:return lt(ut[0],ut[1]);case 3:return lt(ut[0],ut[1],ut[2]);default:return lt.apply(null,ut)}},zt.exports=it;function it(lt){var ut=new Array(arguments.length-1);if(arguments.length>1)for(var dt=1;dt<arguments.length;dt++)ut[dt-1]=arguments[dt];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,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return vt.setImmediate?!1:typeof vt.MessageChannel!="undefined"},Bt.install=function(gt){var Et=new vt.MessageChannel;return Et.port1.onmessage=gt,function(){Et.port2.postMessage(0)}}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=vt.MutationObserver||vt.WebKitMutationObserver;Bt.test=function(){return gt},Bt.install=function(Et){var Ct=0,St=new gt(Et),Tt=vt.document.createTextNode("");return St.observe(Tt,{characterData:!0}),function(){Tt.data=Ct=++Ct%2}}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return typeof vt.queueMicrotask=="function"},Bt.install=function(gt){return function(){vt.queueMicrotask(gt)}}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return"document"in vt&&"onreadystatechange"in vt.document.createElement("script")},Bt.install=function(gt){return function(){var Et=vt.document.createElement("script");return Et.onreadystatechange=function(){gt(),Et.onreadystatechange=null,Et.parentNode.removeChild(Et),Et=null},vt.document.documentElement.appendChild(Et),gt}}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ot,zt,Bt){"use strict";Bt.test=function(){return!0},Bt.install=function(vt){return function(){setTimeout(vt,0)}}},{}],364:[function(ot,zt,Bt){typeof Object.create=="function"?zt.exports=function(gt,Et){Et&&(gt.super_=Et,gt.prototype=Object.create(Et.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}))}:zt.exports=function(gt,Et){if(Et){gt.super_=Et;var Ct=function(){};Ct.prototype=Et.prototype,gt.prototype=new Ct,gt.prototype.constructor=gt}}},{}],365:[function(ot,zt,Bt){"use strict";var vt=ot("has-tostringtag/shams")(),gt=ot("call-bind/callBound"),Et=gt("Object.prototype.toString"),Ct=function(xt){return vt&&xt&&typeof xt=="object"&&Symbol.toStringTag in xt?!1:Et(xt)==="[object Arguments]"},St=function(xt){return Ct(xt)?!0:xt!==null&&typeof xt=="object"&&typeof xt.length=="number"&&xt.length>=0&&Et(xt)!=="[object Array]"&&Et(xt.callee)==="[object Function]"},Tt=function(){return Ct(arguments)}();Ct.isLegacyArguments=St,zt.exports=Tt?Ct:St},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ot,zt,Bt){zt.exports=function(Et){return Et!=null&&(vt(Et)||gt(Et)||!!Et._isBuffer)};function vt(Et){return!!Et.constructor&&typeof Et.constructor.isBuffer=="function"&&Et.constructor.isBuffer(Et)}function gt(Et){return typeof Et.readFloatLE=="function"&&typeof Et.slice=="function"&&vt(Et.slice(0,0))}},{}],367:[function(ot,zt,Bt){"use strict";var vt=Function.prototype.toString,gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Et,Ct;if(typeof gt=="function"&&typeof Object.defineProperty=="function")try{Et=Object.defineProperty({},"length",{get:function(){throw Ct}}),Ct={},gt(function(){throw 42},null,Et)}catch(Dt){Dt!==Ct&&(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})}zt.exports=gt?function(Ft){if(Pt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;try{gt(Ft,null,Et)}catch(jt){if(jt!==Ct)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,zt,Bt){"use strict";var vt=Object.prototype.toString,gt=Function.prototype.toString,Et=/^\s*(?:function)?\*/,Ct=ot("has-tostringtag/shams")(),St=Object.getPrototypeOf,Tt=function(){if(!Ct)return!1;try{return Function("return function*() {}")()}catch(xt){}},mt;zt.exports=function(ft){if(typeof ft!="function")return!1;if(Et.test(gt.call(ft)))return!0;if(!Ct){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,zt,Bt){"use strict";var vt=ot("which-typed-array");zt.exports=function(Et){return!!vt(Et)}},{"which-typed-array":420}],370:[function(ot,zt,Bt){var vt={}.toString;zt.exports=Array.isArray||function(gt){return vt.call(gt)=="[object Array]"}},{}],371:[function(ot,zt,Bt){(function(vt){(function(){(function(gt,Et){typeof Bt=="object"&&typeof zt!="undefined"?zt.exports=Et(gt):typeof he=="function"&&he.amd?he(Et):Et(gt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof vt!="undefined"?vt:this,function(gt){"use strict";gt=gt||{};var Et=gt.Base64,Ct="2.6.4",St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt=function(de){for(var Se={},Qt=0,ne=de.length;Qt<ne;Qt++)Se[de.charAt(Qt)]=Qt;return Se}(St),mt=String.fromCharCode,xt=function(de){if(de.length<2){var Se=de.charCodeAt(0);return Se<128?de:Se<2048?mt(192|Se>>>6)+mt(128|Se&63):mt(224|Se>>>12&15)+mt(128|Se>>>6&63)+mt(128|Se&63)}else{var Se=65536+(de.charCodeAt(0)-55296)*1024+(de.charCodeAt(1)-56320);return mt(240|Se>>>18&7)+mt(128|Se>>>12&63)+mt(128|Se>>>6&63)+mt(128|Se&63)}},ft=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(de){return de.replace(ft,xt)},tt=function(de){var Se=[0,2,1][de.length%3],Qt=de.charCodeAt(0)<<16|(de.length>1?de.charCodeAt(1):0)<<8|(de.length>2?de.charCodeAt(2):0),ne=[St.charAt(Qt>>>18),St.charAt(Qt>>>12&63),Se>=2?"=":St.charAt(Qt>>>6&63),Se>=1?"=":St.charAt(Qt&63)];return ne.join("")},at=gt.btoa&&typeof gt.btoa=="function"?function(de){return gt.btoa(de)}:function(de){if(de.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return de.replace(/[\s\S]{1,3}/g,tt)},it=function(de){return at(z(String(de)))},lt=function(de){return de.replace(/[+\/]/g,function(Se){return Se=="+"?"-":"_"}).replace(/=/g,"")},ut=function(de,Se){return Se?lt(it(de)):it(de)},dt=function(de){return ut(de,!0)},Pt;gt.Uint8Array&&(Pt=function(de,Se){for(var Qt="",ne=0,ye=de.length;ne<ye;ne+=3){var we=de[ne],be=de[ne+1],fe=de[ne+2],pe=we<<16|be<<8|fe;Qt+=St.charAt(pe>>>18)+St.charAt(pe>>>12&63)+(typeof be!="undefined"?St.charAt(pe>>>6&63):"=")+(typeof fe!="undefined"?St.charAt(pe&63):"=")}return Se?lt(Qt):Qt});var At=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Dt=function(de){switch(de.length){case 4:var Se=(7&de.charCodeAt(0))<<18|(63&de.charCodeAt(1))<<12|(63&de.charCodeAt(2))<<6|63&de.charCodeAt(3),Qt=Se-65536;return mt((Qt>>>10)+55296)+mt((Qt&1023)+56320);case 3:return mt((15&de.charCodeAt(0))<<12|(63&de.charCodeAt(1))<<6|63&de.charCodeAt(2));default:return mt((31&de.charCodeAt(0))<<6|63&de.charCodeAt(1))}},Ft=function(de){return de.replace(At,Dt)},jt=function(de){var Se=de.length,Qt=Se%4,ne=(Se>0?Tt[de.charAt(0)]<<18:0)|(Se>1?Tt[de.charAt(1)]<<12:0)|(Se>2?Tt[de.charAt(2)]<<6:0)|(Se>3?Tt[de.charAt(3)]:0),ye=[mt(ne>>>16),mt(ne>>>8&255),mt(ne&255)];return ye.length-=[0,0,2,1][Qt],ye.join("")},Nt=gt.atob&&typeof gt.atob=="function"?function(de){return gt.atob(de)}:function(de){return de.replace(/\S{1,4}/g,jt)},Gt=function(de){return Nt(String(de).replace(/[^A-Za-z0-9\+\/]/g,""))},Ht=function(de){return Ft(Nt(de))},Yt=function(de){return String(de).replace(/[-_]/g,function(Se){return Se=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ut=function(de){return Ht(Yt(de))},Vt;gt.Uint8Array&&(Vt=function(de){return Uint8Array.from(Gt(Yt(de)),function(Se){return Se.charCodeAt(0)})});var oe=function(){var de=gt.Base64;return gt.Base64=Et,de};if(gt.Base64={VERSION:Ct,atob:Gt,btoa:at,fromBase64:Ut,toBase64:ut,utob:z,encode:ut,encodeURI:dt,btou:Ft,decode:Ut,noConflict:oe,fromUint8Array:Pt,toUint8Array:Vt},typeof Object.defineProperty=="function"){var se=function(de){return{value:de,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(de){return ut(this,de)})),Object.defineProperty(String.prototype,"toBase64URI",se(function(){return ut(this,!0)}))}}return gt.Meteor&&(Base64=gt.Base64),typeof zt!="undefined"&&zt.exports?zt.exports.Base64=gt.Base64:typeof he=="function"&&he.amd&&he([],function(){return gt.Base64}),{Base64:gt.Base64}})}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ot,zt,Bt){"use strict";zt.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(Et,Ct,St){if(!Et)throw new TypeError("argument dest is required");if(!Ct)throw new TypeError("argument src is required");return St===void 0&&(St=!0),Object.getOwnPropertyNames(Ct).forEach(function(mt){if(!(!St&&vt.call(Et,mt))){var xt=Object.getOwnPropertyDescriptor(Ct,mt);Object.defineProperty(Et,mt,xt)}}),Et}},{}],373:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.regexp.constructor.js"),ot("core-js/modules/es.regexp.to-string.js");function vt(){this._types=Object.create(null),this._extensions=Object.create(null);for(var gt=0;gt<arguments.length;gt++)this.define(arguments[gt]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}vt.prototype.define=function(gt,Et){for(var Ct in gt){var St=gt[Ct].map(function(ft){return ft.toLowerCase()});Ct=Ct.toLowerCase();for(var Tt=0;Tt<St.length;Tt++){var mt=St[Tt];if(mt[0]!=="*"){if(!Et&&mt in this._types)throw new Error('Attempt to change mapping for "'+mt+'" extension from "'+this._types[mt]+'" to "'+Ct+'". Pass `force=true` to allow this, otherwise remove "'+mt+'" from the list of extensions for "'+Ct+'".');this._types[mt]=Ct}}if(Et||!this._extensions[Ct]){var xt=St[0];this._extensions[Ct]=xt[0]!=="*"?xt:xt.substr(1)}}},vt.prototype.getType=function(gt){gt=String(gt);var Et=gt.replace(/^.*[/\\]/,"").toLowerCase(),Ct=Et.replace(/^.*\./,"").toLowerCase(),St=Et.length<gt.length,Tt=Ct.length<Et.length-1;return(Tt||!St)&&this._types[Ct]||null},vt.prototype.getExtension=function(gt){return gt=/^\s*([^;\s]*)/.test(gt)&&RegExp.$1,gt&&this._extensions[gt.toLowerCase()]||null},zt.exports=vt},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(ot,zt,Bt){"use strict";var vt=ot("./Mime");zt.exports=new vt(ot("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ot,zt,Bt){"use strict";zt.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(ot,zt,Bt){var vt=1e3,gt=vt*60,Et=gt*60,Ct=Et*24,St=Ct*7,Tt=Ct*365.25;zt.exports=function(tt,at){at=at||{};var it=typeof tt;if(it==="string"&&tt.length>0)return mt(tt);if(it==="number"&&isFinite(tt))return at.long?ft(tt):xt(tt);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(tt))};function mt(tt){if(tt=String(tt),!(tt.length>100)){var at=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(tt);if(at){var it=parseFloat(at[1]),lt=(at[2]||"ms").toLowerCase();switch(lt){case"years":case"year":case"yrs":case"yr":case"y":return it*Tt;case"weeks":case"week":case"w":return it*St;case"days":case"day":case"d":return it*Ct;case"hours":case"hour":case"hrs":case"hr":case"h":return it*Et;case"minutes":case"minute":case"mins":case"min":case"m":return it*gt;case"seconds":case"second":case"secs":case"sec":case"s":return it*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return it;default:return}}}}function xt(tt){var at=Math.abs(tt);return at>=Ct?Math.round(tt/Ct)+"d":at>=Et?Math.round(tt/Et)+"h":at>=gt?Math.round(tt/gt)+"m":at>=vt?Math.round(tt/vt)+"s":tt+"ms"}function ft(tt){var at=Math.abs(tt);return at>=Ct?z(tt,at,Ct,"day"):at>=Et?z(tt,at,Et,"hour"):at>=gt?z(tt,at,gt,"minute"):at>=vt?z(tt,at,vt,"second"):tt+" ms"}function z(tt,at,it,lt){var ut=at>=it*1.5;return Math.round(tt/it)+" "+lt+(ut?"s":"")}},{}],377:[function(ot,zt,Bt){"use strict";var vt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;function Ct(Tt){if(Tt==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Tt)}function 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}}zt.exports=St()?Object.assign:function(Tt,mt){for(var xt,ft=Ct(Tt),z,tt=1;tt<arguments.length;tt++){xt=Object(arguments[tt]);for(var at in xt)gt.call(xt,at)&&(ft[at]=xt[at]);if(vt){z=vt(xt);for(var it=0;it<z.length;it++)Et.call(xt,z[it])&&(ft[z[it]]=xt[z[it]])}}return ft}},{}],378:[function(ot,zt,Bt){(function(vt){(function(){"use strict";function gt(Tt){if(typeof Tt!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Tt))}function Et(Tt,mt){for(var xt="",ft=0,z=-1,tt=0,at,it=0;it<=Tt.length;++it){if(it<Tt.length)at=Tt.charCodeAt(it);else{if(at===47)break;at=47}if(at===47){if(!(z===it-1||tt===1))if(z!==it-1&&tt===2){if(xt.length<2||ft!==2||xt.charCodeAt(xt.length-1)!==46||xt.charCodeAt(xt.length-2)!==46){if(xt.length>2){var lt=xt.lastIndexOf("/");if(lt!==xt.length-1){lt===-1?(xt="",ft=0):(xt=xt.slice(0,lt),ft=xt.length-1-xt.lastIndexOf("/")),z=it,tt=0;continue}}else if(xt.length===2||xt.length===1){xt="",ft=0,z=it,tt=0;continue}}mt&&(xt.length>0?xt+="/..":xt="..",ft=2)}else xt.length>0?xt+="/"+Tt.slice(z+1,it):xt=Tt.slice(z+1,it),ft=it-z-1;z=it,tt=0}else at===46&&tt!==-1?++tt:tt=-1}return xt}function Ct(Tt,mt){var xt=mt.dir||mt.root,ft=mt.base||(mt.name||"")+(mt.ext||"");return xt?xt===mt.root?xt+ft:xt+Tt+ft:ft}var 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=Et(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=Et(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 Ct("/",mt)},parse:function(mt){gt(mt);var xt={root:"",dir:"",base:"",ext:"",name:""};if(mt.length===0)return xt;var ft=mt.charCodeAt(0),z=ft===47,tt;z?(xt.root="/",tt=1):tt=0;for(var at=-1,it=0,lt=-1,ut=!0,dt=mt.length-1,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,zt.exports=St}).call(this)}).call(this,ot("_process"))},{_process:467}],379:[function(ot,zt,Bt){(function(vt){(function(){(function(){"use strict";var gt={function:!0,object:!0},Et=gt[typeof window]&&window||this,Ct=Et,St=gt[typeof Bt]&&Bt,Tt=gt[typeof zt]&&zt&&!zt.nodeType&&zt,mt=St&&Tt&&typeof vt=="object"&&vt;mt&&(mt.global===mt||mt.window===mt||mt.self===mt)&&(Et=mt);var xt=Math.pow(2,53)-1,ft=/\bOpera/,z=this,tt=Object.prototype,at=tt.hasOwnProperty,it=tt.toString;function lt(Ut){return Ut=String(Ut),Ut.charAt(0).toUpperCase()+Ut.slice(1)}function ut(Ut,Vt,oe){var se={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Vt&&oe&&/^Win/i.test(Ut)&&!/^Windows Phone /i.test(Ut)&&(se=se[/[\d.]+$/.exec(Ut)])&&(Ut="Windows "+se),Ut=String(Ut),Vt&&oe&&(Ut=Ut.replace(RegExp(Vt,"i"),oe)),Ut=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,Vt){var oe=-1,se=Ut?Ut.length:0;if(typeof se=="number"&&se>-1&&se<=xt)for(;++oe<se;)Vt(Ut[oe],oe,Ut);else At(Ut,Vt)}function Pt(Ut){return Ut=Gt(Ut),/^(?:webOS|i(?:OS|P))/.test(Ut)?Ut:lt(Ut)}function At(Ut,Vt){for(var oe in Ut)at.call(Ut,oe)&&Vt(Ut[oe],oe,Ut)}function Dt(Ut){return Ut==null?lt(Ut):it.call(Ut).slice(8,-1)}function Ft(Ut,Vt){var oe=Ut!=null?typeof Ut[Vt]:"number";return!/^(?:boolean|number|string|undefined)$/.test(oe)&&(oe=="object"?!!Ut[Vt]:!0)}function jt(Ut){return String(Ut).replace(/([ -])(?!$)/g,"$1?")}function Nt(Ut,Vt){var oe=null;return dt(Ut,function(se,de){oe=Vt(oe,se,de,Ut)}),oe}function Gt(Ut){return String(Ut).replace(/^ +| +$/g,"")}function Ht(Ut){var Vt=Et,oe=Ut&&typeof Ut=="object"&&Dt(Ut)!="String";oe&&(Vt=Ut,Ut=null);var se=Vt.navigator||{},de=se.userAgent||"";Ut||(Ut=de);var Se=oe||z==Ct,Qt=oe?!!se.likeChrome:/\bChrome\b/.test(Ut)&&!/internal|\n/i.test(it.toString()),ne="Object",ye=oe?ne:"ScriptBridgingProxyObject",we=oe?ne:"Environment",be=oe&&Vt.java?"JavaPackage":Dt(Vt.java),fe=oe?ne:"RuntimeObject",pe=/\bJava/.test(be)&&Vt.java,ce=pe&&Dt(Vt.environment)==we,Ce=pe?"a":"\u03B1",ve=pe?"b":"\u03B2",Fe=Vt.document||{},ge=Vt.operamini||Vt.opera,xe=ft.test(xe=oe&&ge?ge["[[Class]]"]:Dt(ge))?xe:ge=null,ee,Kt=Ut,wt=[],Lt=null,Xt=Ut==de,re=Xt&&ge&&typeof ge.version=="function"&&ge.version(),It,Rt=Ae([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Wt=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"]),te=$e([{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=Le({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}}),le=tn(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Ae(We){return Nt(We,function(Ke,nn){return Ke||RegExp("\\b"+(nn.pattern||jt(nn))+"\\b","i").exec(Ut)&&(nn.label||nn)})}function Le(We){return Nt(We,function(Ke,nn,hn){return Ke||(nn[te]||nn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(te)]||RegExp("\\b"+jt(hn)+"(?:\\b|\\w*\\d)","i").exec(Ut))&&hn})}function Be(We){return Nt(We,function(Ke,nn){return Ke||RegExp("\\b"+(nn.pattern||jt(nn))+"\\b","i").exec(Ut)&&(nn.label||nn)})}function tn(We){return Nt(We,function(Ke,nn){var hn=nn.pattern||jt(nn);return!Ke&&(Ke=RegExp("\\b"+hn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ut))&&(Ke=ut(Ke,hn,nn.label||nn)),Ke})}function $e(We){return Nt(We,function(Ke,nn){var hn=nn.pattern||jt(nn);return!Ke&&(Ke=RegExp("\\b"+hn+" *\\d+[.\\w_]*","i").exec(Ut)||RegExp("\\b"+hn+" *\\w+-[\\w]*","i").exec(Ut)||RegExp("\\b"+hn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ut))&&((Ke=String(nn.label&&!RegExp(hn,"i").test(nn.label)?nn.label:Ke).split("/"))[1]&&!/[\d.]+/.test(Ke[0])&&(Ke[0]+=" "+Ke[1]),nn=nn.label||nn,Ke=Pt(Ke[0].replace(RegExp(hn,"i"),nn).replace(RegExp("; *(?:"+nn+"[_-])?","i")," ").replace(RegExp("("+nn+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function Qe(We){return Nt(We,function(Ke,nn){return Ke||(RegExp(nn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ut)||0)[1]||null})}function Ze(){return this.description||""}if(Rt&&(Rt=[Rt]),/\bAndroid\b/.test(le)&&!te&&(ee=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ut))&&(te=Gt(ee[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ue&&!te?te=$e([ue]):ue&&te&&(te=te.replace(RegExp("^("+jt(ue)+")[-_.\\s]","i"),ue+" ").replace(RegExp("^("+jt(ue)+")[-_.]?(\\w)","i"),ue+" $2")),(ee=/\bGoogle TV\b/.exec(te))&&(te=ee[0]),/\bSimulator\b/i.test(Ut)&&(te=(te?te+" ":"")+"Simulator"),Wt=="Opera Mini"&&/\bOPiOS\b/.test(Ut)&&wt.push("running in Turbo/Uncompressed mode"),Wt=="IE"&&/\blike iPhone OS\b/.test(Ut)?(ee=Ht(Ut.replace(/like iPhone OS/,"")),ue=ee.manufacturer,te=ee.product):/^iP/.test(te)?(Wt||(Wt="Safari"),le="iOS"+((ee=/ OS ([\d_]+)/i.exec(Ut))?" "+ee[1].replace(/_/g,"."):"")):Wt=="Konqueror"&&/^Linux\b/i.test(le)?le="Kubuntu":ue&&ue!="Google"&&(/Chrome/.test(Wt)&&!/\bMobile Safari\b/i.test(Ut)||/\bVita\b/.test(te))||/\bAndroid\b/.test(le)&&/^Chrome/.test(Wt)&&/\bVersion\//i.test(Ut)?(Wt="Android Browser",le=/\bAndroid\b/.test(le)?le:"Android"):Wt=="Silk"?(/\bMobi/i.test(Ut)||(le="Android",wt.unshift("desktop mode")),/Accelerated *= *true/i.test(Ut)&&wt.unshift("accelerated")):Wt=="UC Browser"&&/\bUCWEB\b/.test(Ut)?wt.push("speed mode"):Wt=="PaleMoon"&&(ee=/\bFirefox\/([\d.]+)\b/.exec(Ut))?wt.push("identifying as Firefox "+ee[1]):Wt=="Firefox"&&(ee=/\b(Mobile|Tablet|TV)\b/i.exec(Ut))?(le||(le="Firefox OS"),te||(te=ee[1])):!Wt||(ee=!/\bMinefield\b/i.test(Ut)&&/\b(?:Firefox|Safari)\b/.exec(Wt))?(Wt&&!te&&/[\/,]|^[^(]+?\)/.test(Ut.slice(Ut.indexOf(ee+"/")+8))&&(Wt=null),(ee=te||ue||le)&&(te||ue||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(le))&&(Wt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(le)?le:ee)+" Browser")):Wt=="Electron"&&(ee=(/\bChrome\/([\d.]+)\b/.exec(Ut)||0)[1])&&wt.push("Chromium "+ee),re||(re=Qe(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",jt(Wt),"(?:Firefox|Minefield|NetFront)"])),(ee=Rt=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(Wt)&&(/\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)&&(le=="Mac OS"?"Tasman":"Trident")||Rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Wt)&&"NetFront")&&(Rt=[ee]),Wt=="IE"&&(ee=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ut)||0)[1])?(Wt+=" Mobile",le="Windows Phone "+(/\+$/.test(ee)?ee:ee+".x"),wt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ut)?(Wt="IE Mobile",le="Windows Phone 8.x",wt.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(Ut)||0)[1])):Wt!="IE"&&Rt=="Trident"&&(ee=/\brv:([\d.]+)/.exec(Ut))&&(Wt&&wt.push("identifying as "+Wt+(re?" "+re:"")),Wt="IE",re=ee[1]),Xt){if(Ft(Vt,"global"))if(pe&&(ee=pe.lang.System,Kt=ee.getProperty("os.arch"),le=le||ee.getProperty("os.name")+" "+ee.getProperty("os.version")),ce){try{re=Vt.require("ringo/engine").version.join("."),Wt="RingoJS"}catch(We){(ee=Vt.system)&&ee.global.system==Vt.system&&(Wt="Narwhal",le||(le=ee[0].os||null))}Wt||(Wt="Rhino")}else typeof Vt.process=="object"&&!Vt.process.browser&&(ee=Vt.process)&&(typeof ee.versions=="object"&&(typeof ee.versions.electron=="string"?(wt.push("Node "+ee.versions.node),Wt="Electron",re=ee.versions.electron):typeof ee.versions.nw=="string"&&(wt.push("Chromium "+re,"Node "+ee.versions.node),Wt="NW.js",re=ee.versions.nw)),Wt||(Wt="Node.js",Kt=ee.arch,le=ee.platform,re=/[\d.]+/.exec(ee.version),re=re?re[0]:null));else Dt(ee=Vt.runtime)==ye?(Wt="Adobe AIR",le=ee.flash.system.Capabilities.os):Dt(ee=Vt.phantom)==fe?(Wt="PhantomJS",re=(ee=ee.version||null)&&ee.major+"."+ee.minor+"."+ee.patch):typeof Fe.documentMode=="number"&&(ee=/\bTrident\/(\d+)/i.exec(Ut))?(re=[re,Fe.documentMode],(ee=+ee[1]+4)!=re[1]&&(wt.push("IE "+re[1]+" mode"),Rt&&(Rt[1]=""),re[1]=ee),re=Wt=="IE"?String(re[1].toFixed(1)):re[0]):typeof Fe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Wt)&&(wt.push("masking as "+Wt+" "+re),Wt="IE",re="11.0",Rt=["Trident"],le="Windows");le=le&&Pt(le)}if(re&&(ee=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ut+";"+(Xt&&se.appMinorVersion))||/\bMinefield\b/i.test(Ut)&&"a")&&(Lt=/b/i.test(ee)?"beta":"alpha",re=re.replace(RegExp(ee+"\\+?$"),"")+(Lt=="beta"?ve:Ce)+(/\d+\+?/.exec(ee)||"")),Wt=="Fennec"||Wt=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(le))Wt="Firefox Mobile";else if(Wt=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(te))te=="Xbox 360"&&(le=null),te=="Xbox 360"&&/\bIEMobile\b/.test(Ut)&&wt.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Wt)||Wt&&!te&&!/Browser|Mobi/.test(Wt))&&(le=="Windows CE"||/Mobi/i.test(Ut)))Wt+=" Mobile";else if(Wt=="IE"&&Xt)try{Vt.external===null&&wt.unshift("platform preview")}catch(We){wt.unshift("embedded")}else(/\bBlackBerry\b/.test(te)||/\bBB10\b/.test(Ut))&&(ee=(RegExp(te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ut)||0)[1]||re)?(ee=[ee,/BB10/.test(Ut)],le=(ee[1]?(te=null,ue="BlackBerry"):"Device Software")+" "+ee[0],re=null):this!=At&&te!="Wii"&&(Xt&&ge||/Opera/.test(Wt)&&/\b(?:MSIE|Firefox)\b/i.test(Ut)||Wt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(le)||Wt=="IE"&&(le&&!/^Win/.test(le)&&re>5.5||/\bWindows XP\b/.test(le)&&re>8||re==8&&!/\bTrident\b/.test(Ut)))&&!ft.test(ee=Ht.call(At,Ut.replace(ft,"")+";"))&&ee.name&&(ee="ing as "+ee.name+((ee=ee.version)?" "+ee:""),ft.test(Wt)?(/\bIE\b/.test(ee)&&le=="Mac OS"&&(le=null),ee="identify"+ee):(ee="mask"+ee,xe?Wt=Pt(xe.replace(/([a-z])([A-Z])/g,"$1 $2")):Wt="Opera",/\bIE\b/.test(ee)&&(le=null),Xt||(re=null)),Rt=["Presto"],wt.push(ee));(ee=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ut)||0)[1])&&(ee=[parseFloat(ee.replace(/\.(\d)$/,".0$1")),ee],Wt=="Safari"&&ee[1].slice(-1)=="+"?(Wt="WebKit Nightly",Lt="alpha",re=ee[1].slice(0,-1)):(re==ee[1]||re==(ee[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ut)||0)[1]))&&(re=null),ee[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ut)||0)[1],ee[0]==537.36&&ee[2]==537.36&&parseFloat(ee[1])>=28&&Rt=="WebKit"&&(Rt=["Blink"]),!Xt||!Qt&&!ee[1]?(Rt&&(Rt[1]="like Safari"),ee=(ee=ee[0],ee<400?1:ee<500?2:ee<526?3:ee<533?4:ee<534?"4+":ee<535?5:ee<537?6:ee<538?7:ee<601?8:ee<602?9:ee<604?10:ee<606?11:ee<608?12:"12")):(Rt&&(Rt[1]="like Chrome"),ee=ee[1]||(ee=ee[0],ee<530?1:ee<532?2:ee<532.05?3:ee<533?4:ee<534.03?5:ee<534.07?6:ee<534.1?7:ee<534.13?8:ee<534.16?9:ee<534.24?10:ee<534.3?11:ee<535.01?12:ee<535.02?"13+":ee<535.07?15:ee<535.11?16:ee<535.19?17:ee<536.05?18:ee<536.1?19:ee<537.01?20:ee<537.11?"21+":ee<537.13?23:ee<537.18?24:ee<537.24?25:ee<537.36?26:Rt!="Blink"?"27":"28")),Rt&&(Rt[1]+=" "+(ee+=typeof ee=="number"?".x":/[.+]/.test(ee)?"":"+")),Wt=="Safari"&&(!re||parseInt(re)>45)?re=ee:Wt=="Chrome"&&/\bHeadlessChrome/i.test(Ut)&&wt.unshift("headless")),Wt=="Opera"&&(ee=/\bzbov|zvav$/.exec(le))?(Wt+=" ",wt.unshift("desktop mode"),ee=="zvav"?(Wt+="Mini",re=null):Wt+="Mobile",le=le.replace(RegExp(" *"+ee+"$"),"")):Wt=="Safari"&&/\bChrome\b/.exec(Rt&&Rt[1])?(wt.unshift("desktop mode"),Wt="Chrome Mobile",re=null,/\bOS X\b/.test(le)?(ue="Apple",le="iOS 4.3+"):le=null):/\bSRWare Iron\b/.test(Wt)&&!re&&(re=Qe("Chrome")),re&&re.indexOf(ee=/[\d.]+$/.exec(le))==0&&Ut.indexOf("/"+ee+"-")>-1&&(le=Gt(le.replace(ee,""))),le&&le.indexOf(Wt)!=-1&&!RegExp(Wt+" OS").test(le)&&(le=le.replace(RegExp(" *"+jt(Wt)+" *"),"")),Rt&&!/\b(?:Avant|Nook)\b/.test(Wt)&&(/Browser|Lunascape|Maxthon/.test(Wt)||Wt!="Safari"&&/^iOS/.test(le)&&/\bSafari\b/.test(Rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Wt)&&Rt[1])&&(ee=Rt[Rt.length-1])&&wt.push(ee),wt.length&&(wt=["("+wt.join("; ")+")"]),ue&&te&&te.indexOf(ue)<0&&wt.push("on "+ue),te&&wt.push((/^on /.test(wt[wt.length-1])?"":"on ")+te),le&&(ee=/ ([\d.+]+)$/.exec(le),It=ee&&le.charAt(le.length-ee[0].length-1)=="/",le={architecture:32,family:ee&&!It?le.replace(ee[0],""):le,version:ee?ee[1]:null,toString:function(){var We=this.version;return this.family+(We&&!It?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(ee=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(le&&(le.architecture=64,le.family=le.family.replace(RegExp(" *"+ee),"")),Wt&&(/\bWOW64\b/i.test(Ut)||Xt&&/\w(?:86|32)$/.test(se.cpuClass||se.platform)&&!/\bWin64; x64\b/i.test(Ut))&&wt.unshift("32-bit")):le&&/^OS X/.test(le.family)&&Wt=="Chrome"&&parseFloat(re)>=39&&(le.architecture=64),Ut||(Ut=null);var Ge={};return Ge.description=Ut,Ge.layout=Rt&&Rt[0],Ge.manufacturer=ue,Ge.name=Wt,Ge.prerelease=Lt,Ge.product=te,Ge.ua=Ut,Ge.version=Wt&&re,Ge.os=le||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ge.parse=Ht,Ge.toString=Ze,Ge.version&&wt.unshift(re),Ge.name&&wt.unshift(Wt),le&&Wt&&!(le==String(le).split(" ")[0]&&(le==Wt.split(" ")[0]||te))&&wt.push(te?"("+le+")":"on "+le),wt.length&&(Ge.description=wt.join(" ")),Ge}var Yt=Ht();typeof he=="function"&&typeof he.amd=="object"&&he.amd?(Et.platform=Yt,he(function(){return Yt})):St&&Tt?At(Yt,function(Ut,Vt){St[Vt]=Ut}):Et.platform=Yt}).call(this)}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ot,zt,Bt){(function(vt){(function(){"use strict";typeof vt=="undefined"||!vt.version||vt.version.indexOf("v0.")===0||vt.version.indexOf("v1.")===0&&vt.version.indexOf("v1.8.")!==0?zt.exports={nextTick:gt}:zt.exports=vt;function gt(Et,Ct,St,Tt){if(typeof Et!="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(Et);case 2:return vt.nextTick(function(){Et.call(null,Ct)});case 3:return vt.nextTick(function(){Et.call(null,Ct,St)});case 4:return vt.nextTick(function(){Et.call(null,Ct,St,Tt)});default:for(xt=new Array(mt-1),ft=0;ft<xt.length;)xt[ft++]=arguments[ft];return vt.nextTick(function(){Et.apply(null,xt)})}}}).call(this)}).call(this,ot("_process"))},{_process:467}],381:[function(ot,zt,Bt){var vt=zt.exports={},gt,Et;function Ct(){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=Ct}catch(dt){gt=Ct}try{typeof clearTimeout=="function"?Et=clearTimeout:Et=St}catch(dt){Et=St}})();function Tt(dt){if(gt===setTimeout)return setTimeout(dt,0);if((gt===Ct||!gt)&&setTimeout)return gt=setTimeout,setTimeout(dt,0);try{return gt(dt,0)}catch(Pt){try{return gt.call(null,dt,0)}catch(At){return gt.call(this,dt,0)}}}function mt(dt){if(Et===clearTimeout)return clearTimeout(dt);if((Et===St||!Et)&&clearTimeout)return Et=clearTimeout,clearTimeout(dt);try{return Et(dt)}catch(Pt){try{return Et.call(null,dt)}catch(At){return Et.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,zt,Bt){(function(vt){(function(){(function(gt){var Et=typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,Ct=typeof zt=="object"&&zt&&!zt.nodeType&&zt,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 Ht(be){throw new RangeError(Dt[be])}function Yt(be,fe){for(var pe=be.length,ce=[];pe--;)ce[pe]=fe(be[pe]);return ce}function Ut(be,fe){var pe=be.split("@"),ce="";pe.length>1&&(ce=pe[0]+"@",be=pe[1]),be=be.replace(At,".");var Ce=be.split("."),ve=Yt(Ce,fe).join(".");return ce+ve}function Vt(be){for(var fe=[],pe=0,ce=be.length,Ce,ve;pe<ce;)Ce=be.charCodeAt(pe++),Ce>=55296&&Ce<=56319&&pe<ce?(ve=be.charCodeAt(pe++),(ve&64512)==56320?fe.push(((Ce&1023)<<10)+(ve&1023)+65536):(fe.push(Ce),pe--)):fe.push(Ce);return fe}function oe(be){return Yt(be,function(fe){var pe="";return fe>65535&&(fe-=65536,pe+=Nt(fe>>>10&1023|55296),fe=56320|fe&1023),pe+=Nt(fe),pe}).join("")}function se(be){return be-48<10?be-22:be-65<26?be-65:be-97<26?be-97:xt}function de(be,fe){return be+22+75*(be<26)-((fe!=0)<<5)}function Se(be,fe,pe){var ce=0;for(be=pe?jt(be/at):be>>1,be+=jt(be/fe);be>Ft*z>>1;ce+=xt)be=jt(be/Ft);return jt(ce+(Ft+1)*be/(be+tt))}function Qt(be){var fe=[],pe=be.length,ce,Ce=0,ve=lt,Fe=it,ge,xe,ee,Kt,wt,Lt,Xt,re,It;for(ge=be.lastIndexOf(ut),ge<0&&(ge=0),xe=0;xe<ge;++xe)be.charCodeAt(xe)>=128&&Ht("not-basic"),fe.push(be.charCodeAt(xe));for(ee=ge>0?ge+1:0;ee<pe;){for(Kt=Ce,wt=1,Lt=xt;ee>=pe&&Ht("invalid-input"),Xt=se(be.charCodeAt(ee++)),(Xt>=xt||Xt>jt((mt-Ce)/wt))&&Ht("overflow"),Ce+=Xt*wt,re=Lt<=Fe?ft:Lt>=Fe+z?z:Lt-Fe,!(Xt<re);Lt+=xt)It=xt-re,wt>jt(mt/It)&&Ht("overflow"),wt*=It;ce=fe.length+1,Fe=Se(Ce-Kt,ce,Kt==0),jt(Ce/ce)>mt-ve&&Ht("overflow"),ve+=jt(Ce/ce),Ce%=ce,fe.splice(Ce++,0,ve)}return oe(fe)}function ne(be){var fe,pe,ce,Ce,ve,Fe,ge,xe,ee,Kt,wt,Lt=[],Xt,re,It,Rt;for(be=Vt(be),Xt=be.length,fe=lt,pe=0,ve=it,Fe=0;Fe<Xt;++Fe)wt=be[Fe],wt<128&&Lt.push(Nt(wt));for(ce=Ce=Lt.length,Ce&&Lt.push(ut);ce<Xt;){for(ge=mt,Fe=0;Fe<Xt;++Fe)wt=be[Fe],wt>=fe&&wt<ge&&(ge=wt);for(re=ce+1,ge-fe>jt((mt-pe)/re)&&Ht("overflow"),pe+=(ge-fe)*re,fe=ge,Fe=0;Fe<Xt;++Fe)if(wt=be[Fe],wt<fe&&++pe>mt&&Ht("overflow"),wt==fe){for(xe=pe,ee=xt;Kt=ee<=ve?ft:ee>=ve+z?z:ee-ve,!(xe<Kt);ee+=xt)Rt=xe-Kt,It=xt-Kt,Lt.push(Nt(de(Kt+Rt%It,0))),xe=jt(Rt/It);Lt.push(Nt(de(xe,0))),ve=Se(pe,re,ce==Ce),pe=0,++ce}++pe,++fe}return Lt.join("")}function ye(be){return Ut(be,function(fe){return dt.test(fe)?Qt(fe.slice(4).toLowerCase()):fe})}function we(be){return Ut(be,function(fe){return Pt.test(fe)?"xn--"+ne(fe):fe})}if(Tt={version:"1.4.1",ucs2:{decode:Vt,encode:oe},decode:Qt,encode:ne,toASCII:we,toUnicode:ye},typeof he=="function"&&typeof he.amd=="object"&&he.amd)he("punycode",function(){return Tt});else if(Et&&Ct)if(zt.exports==Et)Ct.exports=Tt;else for(Gt in Tt)Tt.hasOwnProperty(Gt)&&(Et[Gt]=Tt[Gt]);else gt.punycode=Tt})(this)}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ot,zt,Bt){"use strict";function vt(Et,Ct){return Object.prototype.hasOwnProperty.call(Et,Ct)}zt.exports=function(Et,Ct,St,Tt){Ct=Ct||"&",St=St||"=";var mt={};if(typeof Et!="string"||Et.length===0)return mt;var xt=/\+/g;Et=Et.split(Ct);var ft=1e3;Tt&&typeof Tt.maxKeys=="number"&&(ft=Tt.maxKeys);var z=Et.length;ft>0&&z>ft&&(z=ft);for(var tt=0;tt<z;++tt){var at=Et[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(Et){return Object.prototype.toString.call(Et)==="[object Array]"}},{}],384:[function(ot,zt,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""}};zt.exports=function(St,Tt,mt,xt){return Tt=Tt||"&",mt=mt||"=",St===null&&(St=void 0),typeof St=="object"?Et(Ct(St),function(ft){var z=encodeURIComponent(vt(ft))+mt;return gt(St[ft])?Et(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 Et(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 Ct=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,zt,Bt){"use strict";Bt.decode=Bt.parse=ot("./decode"),Bt.encode=Bt.stringify=ot("./encode")},{"./decode":383,"./encode":384}],386:[function(ot,zt,Bt){"use strict";var vt=ot("process-nextick-args"),gt=Object.keys||function(at){var it=[];for(var lt in at)it.push(lt);return it};zt.exports=ft;var Et=Object.create(ot("core-util-is"));Et.inherits=ot("inherits");var Ct=ot("./_stream_readable"),St=ot("./_stream_writable");Et.inherits(ft,Ct);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);Ct.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,zt,Bt){"use strict";zt.exports=Et;var vt=ot("./_stream_transform"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(Et,vt);function Et(Ct){if(!(this instanceof Et))return new Et(Ct);vt.call(this,Ct)}Et.prototype._transform=function(Ct,St,Tt){Tt(null,Ct)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";var Et=ot("process-nextick-args");zt.exports=Nt;var Ct=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):Ct(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 re=wt.highWaterMark,It=wt.readableHighWaterMark,Rt=this.objectMode?16:16*1024;re||re===0?this.highWaterMark=re: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,re;return Xt.objectMode?re=!0:typeof wt=="string"&&(Lt=Lt||Xt.defaultEncoding,Lt!==Xt.encoding&&(wt=ft.from(wt,Lt),Lt=""),re=!0),Gt(this,wt,Lt,!1,re)},Nt.prototype.unshift=function(wt){return Gt(this,wt,null,!0,!1)};function Gt(wt,Lt,Xt,re,It){var Rt=wt._readableState;if(Lt===null)Rt.reading=!1,de(wt,Rt);else{var Wt;It||(Wt=Yt(Rt,Lt)),Wt?wt.emit("error",Wt):Rt.objectMode||Lt&&Lt.length>0?(typeof Lt!="string"&&!Rt.objectMode&&Object.getPrototypeOf(Lt)!==ft.prototype&&(Lt=tt(Lt)),re?Rt.endEmitted?wt.emit("error",new Error("stream.unshift() after end event")):Ht(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?Ht(wt,Rt,Lt,!1):ne(wt,Rt)):Ht(wt,Rt,Lt,!1))):re||(Rt.reading=!1)}return Ut(Rt)}function Ht(wt,Lt,Xt,re){Lt.flowing&&Lt.length===0&&!Lt.sync?(wt.emit("data",Xt),wt.read(0)):(Lt.length+=Lt.objectMode?1:Xt.length,re?Lt.buffer.unshift(Xt):Lt.buffer.push(Xt),Lt.needReadable&&Se(wt)),ne(wt,Lt)}function Yt(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 Vt=8388608;function oe(wt){return wt>=Vt?wt=Vt:(wt--,wt|=wt>>>1,wt|=wt>>>2,wt|=wt>>>4,wt|=wt>>>8,wt|=wt>>>16,wt++),wt}function se(wt,Lt){return wt<=0||Lt.length===0&&Lt.ended?0:Lt.objectMode?1:wt!==wt?Lt.flowing&&Lt.length?Lt.buffer.head.data.length:Lt.length:(wt>Lt.highWaterMark&&(Lt.highWaterMark=oe(wt)),wt<=Lt.length?wt:Lt.ended?Lt.length:(Lt.needReadable=!0,0))}Nt.prototype.read=function(wt){ut("read",wt),wt=parseInt(wt,10);var Lt=this._readableState,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?xe(this):Se(this),null;if(wt=se(wt,Lt),wt===0&&Lt.ended)return Lt.length===0&&xe(this),null;var re=Lt.needReadable;ut("need readable",re),(Lt.length===0||Lt.length-wt<Lt.highWaterMark)&&(re=!0,ut("length less than watermark",re)),Lt.ended||Lt.reading?(re=!1,ut("reading or ended",re)):re&&(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&&xe(this)),It!==null&&this.emit("data",It),It};function de(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,Se(wt)}}function Se(wt){var Lt=wt._readableState;Lt.needReadable=!1,Lt.emittedReadable||(ut("emitReadable",Lt.flowing),Lt.emittedReadable=!0,Lt.sync?Et.nextTick(Qt,wt):Qt(wt))}function Qt(wt){ut("emit readable"),wt.emit("readable"),ce(wt)}function ne(wt,Lt){Lt.readingMore||(Lt.readingMore=!0,Et.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,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=wt;break;case 1:re.pipes=[re.pipes,wt];break;default:re.pipes.push(wt);break}re.pipesCount+=1,ut("pipe count=%d opts=%j",re.pipesCount,Lt);var It=(!Lt||Lt.end!==!1)&&wt!==vt.stdout&&wt!==vt.stderr,Rt=It?te:Ze;re.endEmitted?Et.nextTick(Rt):Xt.once("end",Rt),wt.on("unpipe",Wt);function Wt(Ge,We){ut("onunpipe"),Ge===Xt&&We&&We.hasUnpiped===!1&&(We.hasUnpiped=!0,Ae())}function te(){ut("onend"),wt.end()}var ue=we(Xt);wt.on("drain",ue);var le=!1;function Ae(){ut("cleanup"),wt.removeListener("close",$e),wt.removeListener("finish",Qe),wt.removeListener("drain",ue),wt.removeListener("error",tn),wt.removeListener("unpipe",Wt),Xt.removeListener("end",te),Xt.removeListener("end",Ze),Xt.removeListener("data",Be),le=!0,re.awaitDrain&&(!wt._writableState||wt._writableState.needDrain)&&ue()}var Le=!1;Xt.on("data",Be);function Be(Ge){ut("ondata"),Le=!1;var We=wt.write(Ge);We===!1&&!Le&&((re.pipesCount===1&&re.pipes===wt||re.pipesCount>1&&Kt(re.pipes,wt)!==-1)&&!le&&(ut("false write response, pause",Xt._readableState.awaitDrain),Xt._readableState.awaitDrain++,Le=!0),Xt.pause())}function tn(Ge){ut("onerror",Ge),Ze(),wt.removeListener("error",tn),mt(wt,"error")===0&&wt.emit("error",Ge)}Ft(wt,"error",tn);function $e(){wt.removeListener("finish",Qe),Ze()}wt.once("close",$e);function Qe(){ut("onfinish"),wt.removeListener("close",$e),Ze()}wt.once("finish",Qe);function Ze(){ut("unpipe"),Xt.unpipe(wt)}return wt.emit("pipe",Xt),re.flowing||(ut("pipe resume"),Xt.resume()),wt};function we(wt){return function(){var Lt=wt._readableState;ut("pipeOnDrain",Lt.awaitDrain),Lt.awaitDrain&&Lt.awaitDrain--,Lt.awaitDrain===0&&mt(wt,"data")&&(Lt.flowing=!0,ce(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 re=Lt.pipes,It=Lt.pipesCount;Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1;for(var Rt=0;Rt<It;Rt++)re[Rt].emit("unpipe",this,Xt);return this}var Wt=Kt(Lt.pipes,wt);return Wt===-1?this:(Lt.pipes.splice(Wt,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 re=this._readableState;!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.emittedReadable=!1,re.reading?re.length&&Se(this):Et.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,fe(this,wt)),this};function fe(wt,Lt){Lt.resumeScheduled||(Lt.resumeScheduled=!0,Et.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"),ce(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 ce(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,re=!1;wt.on("end",function(){if(ut("wrapped end"),Xt.decoder&&!Xt.ended){var Wt=Xt.decoder.end();Wt&&Wt.length&&Lt.push(Wt)}Lt.push(null)}),wt.on("data",function(Wt){if(ut("wrapped data"),Xt.decoder&&(Wt=Xt.decoder.write(Wt)),!(Xt.objectMode&&Wt==null)&&!(!Xt.objectMode&&(!Wt||!Wt.length))){var te=Lt.push(Wt);te||(re=!0,wt.pause())}});for(var It in wt)this[It]===void 0&&typeof wt[It]=="function"&&(this[It]=function(Wt){return function(){return wt[Wt].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(Wt){ut("wrapped _read",Wt),re&&(re=!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=ve(wt,Lt.buffer,Lt.decoder),Xt}function ve(wt,Lt,Xt){var re;return wt<Lt.head.data.length?(re=Lt.head.data.slice(0,wt),Lt.head.data=Lt.head.data.slice(wt)):wt===Lt.head.data.length?re=Lt.shift():re=Xt?Fe(wt,Lt):ge(wt,Lt),re}function Fe(wt,Lt){var Xt=Lt.head,re=1,It=Xt.data;for(wt-=It.length;Xt=Xt.next;){var Rt=Xt.data,Wt=wt>Rt.length?Rt.length:wt;if(Wt===Rt.length?It+=Rt:It+=Rt.slice(0,wt),wt-=Wt,wt===0){Wt===Rt.length?(++re,Xt.next?Lt.head=Xt.next:Lt.head=Lt.tail=null):(Lt.head=Xt,Xt.data=Rt.slice(Wt));break}++re}return Lt.length-=re,It}function ge(wt,Lt){var Xt=ft.allocUnsafe(wt),re=Lt.head,It=1;for(re.data.copy(Xt),wt-=re.data.length;re=re.next;){var Rt=re.data,Wt=wt>Rt.length?Rt.length:wt;if(Rt.copy(Xt,Xt.length-wt,0,Wt),wt-=Wt,wt===0){Wt===Rt.length?(++It,re.next?Lt.head=re.next:Lt.head=Lt.tail=null):(Lt.head=re,re.data=Rt.slice(Wt));break}++It}return Lt.length-=It,Xt}function xe(wt){var Lt=wt._readableState;if(Lt.length>0)throw new Error('"endReadable()" called on non-empty stream');Lt.endEmitted||(Lt.ended=!0,Et.nextTick(ee,Lt,wt))}function ee(wt,Lt){!wt.endEmitted&&wt.length===0&&(wt.endEmitted=!0,Lt.readable=!1,Lt.emit("end"))}function Kt(wt,Lt){for(var Xt=0,re=wt.length;Xt<re;Xt++)if(wt[Xt]===Lt)return Xt;return-1}}).call(this)}).call(this,ot("_process"),typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(ot,zt,Bt){"use strict";zt.exports=Ct;var vt=ot("./_stream_duplex"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(Ct,vt);function Et(mt,xt){var ft=this._transformState;ft.transforming=!1;var z=ft.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));ft.writechunk=null,ft.writecb=null,xt!=null&&this.push(xt),z(mt);var tt=this._readableState;tt.reading=!1,(tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}function Ct(mt){if(!(this instanceof Ct))return new Ct(mt);vt.call(this,mt),this._transformState={afterTransform:Et.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)}Ct.prototype.push=function(mt,xt){return this._transformState.needTransform=!1,vt.prototype.push.call(this,mt,xt)},Ct.prototype._transform=function(mt,xt,ft){throw new Error("_transform() is not implemented")},Ct.prototype._write=function(mt,xt,ft){var z=this._transformState;if(z.writecb=ft,z.writechunk=mt,z.writeencoding=xt,!z.transforming){var tt=this._readableState;(z.needTransform||tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}},Ct.prototype._read=function(mt){var xt=this._transformState;xt.writechunk!==null&&xt.writecb&&!xt.transforming?(xt.transforming=!0,this._transform(xt.writechunk,xt.writeencoding,xt.afterTransform)):xt.needTransform=!0},Ct.prototype._destroy=function(mt,xt){var ft=this;vt.prototype._destroy.call(this,mt,function(z){xt(z),ft.emit("close")})};function Tt(mt,xt,ft){if(xt)return mt.emit("error",xt);if(ft!=null&&mt.push(ft),mt._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(mt._transformState.transforming)throw new Error("Calling transform done when still transforming");return mt.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(ot,zt,Bt){(function(vt,gt,Et){(function(){"use strict";var Ct=ot("process-nextick-args");zt.exports=Ft;function St(pe,ce,Ce){this.chunk=pe,this.encoding=ce,this.callback=Ce,this.next=null}function Tt(pe){var ce=this;this.next=null,this.entry=null,this.finish=function(){fe(ce,pe)}}var mt=!vt.browser&&["v0.10","v0.9."].indexOf(vt.version.slice(0,5))>-1?Et:Ct.nextTick,xt;Ft.WritableState=At;var ft=Object.create(ot("core-util-is"));ft.inherits=ot("inherits");var z={deprecate:ot("util-deprecate")},tt=ot("./internal/streams/stream"),at=ot("safe-buffer").Buffer,it=gt.Uint8Array||function(){};function lt(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,ce){xt=xt||ot("./_stream_duplex"),pe=pe||{};var Ce=ce instanceof xt;this.objectMode=!!pe.objectMode,Ce&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var ve=pe.highWaterMark,Fe=pe.writableHighWaterMark,ge=this.objectMode?16:16*1024;ve||ve===0?this.highWaterMark=ve: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 xe=pe.decodeStrings===!1;this.decodeStrings=!xe,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){oe(ce,ee)},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 ce=this.bufferedRequest,Ce=[];ce;)Ce.push(ce),ce=ce.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,ce){var Ce=new Error("write after end");pe.emit("error",Ce),Ct.nextTick(ce,Ce)}function Nt(pe,ce,Ce,ve){var Fe=!0,ge=!1;return Ce===null?ge=new TypeError("May not write null values to stream"):typeof Ce!="string"&&Ce!==void 0&&!ce.objectMode&&(ge=new TypeError("Invalid non-string/buffer chunk")),ge&&(pe.emit("error",ge),Ct.nextTick(ve,ge),Fe=!1),Fe}Ft.prototype.write=function(pe,ce,Ce){var ve=this._writableState,Fe=!1,ge=!ve.objectMode&&ut(pe);return ge&&!at.isBuffer(pe)&&(pe=lt(pe)),typeof ce=="function"&&(Ce=ce,ce=null),ge?ce="buffer":ce||(ce=ve.defaultEncoding),typeof Ce!="function"&&(Ce=Pt),ve.ended?jt(this,Ce):(ge||Nt(this,ve,pe,Ce))&&(ve.pendingcb++,Fe=Ht(this,ve,ge,pe,ce,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&&Se(this,pe))},Ft.prototype.setDefaultEncoding=function(ce){if(typeof ce=="string"&&(ce=ce.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ce+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ce);return this._writableState.defaultEncoding=ce,this};function Gt(pe,ce,Ce){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof ce=="string"&&(ce=at.from(ce,Ce)),ce}Object.defineProperty(Ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ht(pe,ce,Ce,ve,Fe,ge){if(!Ce){var xe=Gt(ce,ve,Fe);ve!==xe&&(Ce=!0,Fe="buffer",ve=xe)}var ee=ce.objectMode?1:ve.length;ce.length+=ee;var Kt=ce.length<ce.highWaterMark;if(Kt||(ce.needDrain=!0),ce.writing||ce.corked){var wt=ce.lastBufferedRequest;ce.lastBufferedRequest={chunk:ve,encoding:Fe,isBuf:Ce,callback:ge,next:null},wt?wt.next=ce.lastBufferedRequest:ce.bufferedRequest=ce.lastBufferedRequest,ce.bufferedRequestCount+=1}else Yt(pe,ce,!1,ee,ve,Fe,ge);return Kt}function Yt(pe,ce,Ce,ve,Fe,ge,xe){ce.writelen=ve,ce.writecb=xe,ce.writing=!0,ce.sync=!0,Ce?pe._writev(Fe,ce.onwrite):pe._write(Fe,ge,ce.onwrite),ce.sync=!1}function Ut(pe,ce,Ce,ve,Fe){--ce.pendingcb,Ce?(Ct.nextTick(Fe,ve),Ct.nextTick(we,pe,ce),pe._writableState.errorEmitted=!0,pe.emit("error",ve)):(Fe(ve),pe._writableState.errorEmitted=!0,pe.emit("error",ve),we(pe,ce))}function Vt(pe){pe.writing=!1,pe.writecb=null,pe.length-=pe.writelen,pe.writelen=0}function oe(pe,ce){var Ce=pe._writableState,ve=Ce.sync,Fe=Ce.writecb;if(Vt(Ce),ce)Ut(pe,Ce,ve,ce,Fe);else{var ge=Qt(Ce);!ge&&!Ce.corked&&!Ce.bufferProcessing&&Ce.bufferedRequest&&Se(pe,Ce),ve?mt(se,pe,Ce,ge,Fe):se(pe,Ce,ge,Fe)}}function se(pe,ce,Ce,ve){Ce||de(pe,ce),ce.pendingcb--,ve(),we(pe,ce)}function de(pe,ce){ce.length===0&&ce.needDrain&&(ce.needDrain=!1,pe.emit("drain"))}function Se(pe,ce){ce.bufferProcessing=!0;var Ce=ce.bufferedRequest;if(pe._writev&&Ce&&Ce.next){var ve=ce.bufferedRequestCount,Fe=new Array(ve),ge=ce.corkedRequestsFree;ge.entry=Ce;for(var xe=0,ee=!0;Ce;)Fe[xe]=Ce,Ce.isBuf||(ee=!1),Ce=Ce.next,xe+=1;Fe.allBuffers=ee,Yt(pe,ce,!0,ce.length,Fe,"",ge.finish),ce.pendingcb++,ce.lastBufferedRequest=null,ge.next?(ce.corkedRequestsFree=ge.next,ge.next=null):ce.corkedRequestsFree=new Tt(ce),ce.bufferedRequestCount=0}else{for(;Ce;){var Kt=Ce.chunk,wt=Ce.encoding,Lt=Ce.callback,Xt=ce.objectMode?1:Kt.length;if(Yt(pe,ce,!1,Xt,Kt,wt,Lt),Ce=Ce.next,ce.bufferedRequestCount--,ce.writing)break}Ce===null&&(ce.lastBufferedRequest=null)}ce.bufferedRequest=Ce,ce.bufferProcessing=!1}Ft.prototype._write=function(pe,ce,Ce){Ce(new Error("_write() is not implemented"))},Ft.prototype._writev=null,Ft.prototype.end=function(pe,ce,Ce){var ve=this._writableState;typeof pe=="function"?(Ce=pe,pe=null,ce=null):typeof ce=="function"&&(Ce=ce,ce=null),pe!=null&&this.write(pe,ce),ve.corked&&(ve.corked=1,this.uncork()),!ve.ending&&!ve.finished&&be(this,ve,Ce)};function Qt(pe){return pe.ending&&pe.length===0&&pe.bufferedRequest===null&&!pe.finished&&!pe.writing}function ne(pe,ce){pe._final(function(Ce){ce.pendingcb--,Ce&&pe.emit("error",Ce),ce.prefinished=!0,pe.emit("prefinish"),we(pe,ce)})}function ye(pe,ce){!ce.prefinished&&!ce.finalCalled&&(typeof pe._final=="function"?(ce.pendingcb++,ce.finalCalled=!0,Ct.nextTick(ne,pe,ce)):(ce.prefinished=!0,pe.emit("prefinish")))}function we(pe,ce){var Ce=Qt(ce);return Ce&&(ye(pe,ce),ce.pendingcb===0&&(ce.finished=!0,pe.emit("finish"))),Ce}function be(pe,ce,Ce){ce.ending=!0,we(pe,ce),Ce&&(ce.finished?Ct.nextTick(Ce):pe.once("finish",Ce)),ce.ended=!0,pe.writable=!1}function fe(pe,ce,Ce){var ve=pe.entry;for(pe.entry=null;ve;){var Fe=ve.callback;ce.pendingcb--,Fe(Ce),ve=ve.next}ce.corkedRequestsFree?ce.corkedRequestsFree.next=pe:ce.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,ce){this.end(),ce(pe)}}).call(this)}).call(this,ot("_process"),typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(ot,zt,Bt){"use strict";function vt(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}var gt=ot("safe-buffer").Buffer,Et=ot("util");function Ct(St,Tt,mt){St.copy(Tt,mt)}zt.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;)Ct(ft.data,xt,z),z+=ft.data.length,ft=ft.next;return xt},St}(),Et&&Et.inspect&&Et.inspect.custom&&(zt.exports.prototype[Et.inspect.custom]=function(){var St=Et.inspect({length:this.length});return this.constructor.name+" "+St})},{"safe-buffer":396,util:89}],392:[function(ot,zt,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(Ct,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(Ct,mt,z),mt._writableState&&(mt._writableState.errorEmitted=!0)):Tt&&Tt(z)}),this)}function Et(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ct(St,Tt){St.emit("error",Tt)}zt.exports={destroy:gt,undestroy:Et}},{"process-nextick-args":380}],393:[function(ot,zt,Bt){zt.exports=ot("events").EventEmitter},{events:344}],394:[function(ot,zt,Bt){Bt=zt.exports=ot("./lib/_stream_readable.js"),Bt.Stream=Bt,Bt.Readable=Bt,Bt.Writable=ot("./lib/_stream_writable.js"),Bt.Duplex=ot("./lib/_stream_duplex.js"),Bt.Transform=ot("./lib/_stream_transform.js"),Bt.PassThrough=ot("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(ot,zt,Bt){var vt=function(gt){"use strict";var Et=Object.prototype,Ct=Et.hasOwnProperty,St,Tt=typeof Symbol=="function"?Symbol:{},mt=Tt.iterator||"@@iterator",xt=Tt.asyncIterator||"@@asyncIterator",ft=Tt.toStringTag||"@@toStringTag";function z(ye,we,be){return Object.defineProperty(ye,we,{value:be,enumerable:!0,configurable:!0,writable:!0}),ye[we]}try{z({},"")}catch(ye){z=function(we,be,fe){return we[be]=fe}}function tt(ye,we,be,fe){var pe=we&&we.prototype instanceof At?we:At,ce=Object.create(pe.prototype),Ce=new Se(fe||[]);return ce._invoke=Vt(ye,be,Ce),ce}gt.wrap=tt;function at(ye,we,be){try{return{type:"normal",arg:ye.call(we,be)}}catch(fe){return{type:"throw",arg:fe}}}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(Qt([])));Gt&&Gt!==Et&&Ct.call(Gt,mt)&&(jt=Gt);var Ht=Ft.prototype=At.prototype=Object.create(jt);Dt.prototype=Ft,z(Ht,"constructor",Ft),z(Ft,"constructor",Dt),Dt.displayName=z(Ft,ft,"GeneratorFunction");function Yt(ye){["next","throw","return"].forEach(function(we){z(ye,we,function(be){return this._invoke(we,be)})})}gt.isGeneratorFunction=function(ye){var we=typeof ye=="function"&&ye.constructor;return we?we===Dt||(we.displayName||we.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(Ht),ye},gt.awrap=function(ye){return{__await:ye}};function Ut(ye,we){function be(ce,Ce,ve,Fe){var ge=at(ye[ce],ye,Ce);if(ge.type==="throw")Fe(ge.arg);else{var xe=ge.arg,ee=xe.value;return ee&&typeof ee=="object"&&Ct.call(ee,"__await")?we.resolve(ee.__await).then(function(Kt){be("next",Kt,ve,Fe)},function(Kt){be("throw",Kt,ve,Fe)}):we.resolve(ee).then(function(Kt){xe.value=Kt,ve(xe)},function(Kt){return be("throw",Kt,ve,Fe)})}}var fe;function pe(ce,Ce){function ve(){return new we(function(Fe,ge){be(ce,Ce,Fe,ge)})}return fe=fe?fe.then(ve,ve):ve()}this._invoke=pe}Yt(Ut.prototype),z(Ut.prototype,xt,function(){return this}),gt.AsyncIterator=Ut,gt.async=function(ye,we,be,fe,pe){pe===void 0&&(pe=Promise);var ce=new Ut(tt(ye,we,be,fe),pe);return gt.isGeneratorFunction(we)?ce:ce.next().then(function(Ce){return Ce.done?Ce.value:ce.next()})};function Vt(ye,we,be){var fe=it;return function(ce,Ce){if(fe===ut)throw new Error("Generator is already running");if(fe===dt){if(ce==="throw")throw Ce;return ne()}for(be.method=ce,be.arg=Ce;;){var ve=be.delegate;if(ve){var Fe=oe(ve,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(fe===it)throw fe=dt,be.arg;be.dispatchException(be.arg)}else be.method==="return"&&be.abrupt("return",be.arg);fe=ut;var ge=at(ye,we,be);if(ge.type==="normal"){if(fe=be.done?dt:lt,ge.arg===Pt)continue;return{value:ge.arg,done:be.done}}else ge.type==="throw"&&(fe=dt,be.method="throw",be.arg=ge.arg)}}}function oe(ye,we){var be=ye.iterator[we.method];if(be===St){if(we.delegate=null,we.method==="throw"){if(ye.iterator.return&&(we.method="return",we.arg=St,oe(ye,we),we.method==="throw"))return Pt;we.method="throw",we.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pt}var fe=at(be,ye.iterator,we.arg);if(fe.type==="throw")return we.method="throw",we.arg=fe.arg,we.delegate=null,Pt;var pe=fe.arg;if(!pe)return we.method="throw",we.arg=new TypeError("iterator result is not an object"),we.delegate=null,Pt;if(pe.done)we[ye.resultName]=pe.value,we.next=ye.nextLoc,we.method!=="return"&&(we.method="next",we.arg=St);else return pe;return we.delegate=null,Pt}Yt(Ht),z(Ht,ft,"Generator"),z(Ht,mt,function(){return this}),z(Ht,"toString",function(){return"[object Generator]"});function se(ye){var we={tryLoc:ye[0]};1 in ye&&(we.catchLoc=ye[1]),2 in ye&&(we.finallyLoc=ye[2],we.afterLoc=ye[3]),this.tryEntries.push(we)}function de(ye){var we=ye.completion||{};we.type="normal",delete we.arg,ye.completion=we}function Se(ye){this.tryEntries=[{tryLoc:"root"}],ye.forEach(se,this),this.reset(!0)}gt.keys=function(ye){var we=[];for(var be in ye)we.push(be);return we.reverse(),function fe(){for(;we.length;){var pe=we.pop();if(pe in ye)return fe.value=pe,fe.done=!1,fe}return fe.done=!0,fe}};function Qt(ye){if(ye){var we=ye[mt];if(we)return we.call(ye);if(typeof ye.next=="function")return ye;if(!isNaN(ye.length)){var be=-1,fe=function pe(){for(;++be<ye.length;)if(Ct.call(ye,be))return pe.value=ye[be],pe.done=!1,pe;return pe.value=St,pe.done=!0,pe};return fe.next=fe}}return{next:ne}}gt.values=Qt;function ne(){return{value:St,done:!0}}return Se.prototype={constructor:Se,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(de),!ye)for(var we in this)we.charAt(0)==="t"&&Ct.call(this,we)&&!isNaN(+we.slice(1))&&(this[we]=St)},stop:function(){this.done=!0;var ye=this.tryEntries[0],we=ye.completion;if(we.type==="throw")throw we.arg;return this.rval},dispatchException:function(ye){if(this.done)throw ye;var we=this;function be(Fe,ge){return ce.type="throw",ce.arg=ye,we.next=Fe,ge&&(we.method="next",we.arg=St),!!ge}for(var fe=this.tryEntries.length-1;fe>=0;--fe){var pe=this.tryEntries[fe],ce=pe.completion;if(pe.tryLoc==="root")return be("end");if(pe.tryLoc<=this.prev){var Ce=Ct.call(pe,"catchLoc"),ve=Ct.call(pe,"finallyLoc");if(Ce&&ve){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(ve){if(this.prev<pe.finallyLoc)return be(pe.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ye,we){for(var be=this.tryEntries.length-1;be>=0;--be){var fe=this.tryEntries[be];if(fe.tryLoc<=this.prev&&Ct.call(fe,"finallyLoc")&&this.prev<fe.finallyLoc){var pe=fe;break}}pe&&(ye==="break"||ye==="continue")&&pe.tryLoc<=we&&we<=pe.finallyLoc&&(pe=null);var ce=pe?pe.completion:{};return ce.type=ye,ce.arg=we,pe?(this.method="next",this.next=pe.finallyLoc,Pt):this.complete(ce)},complete:function(ye,we){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"&&we&&(this.next=we),Pt},finish:function(ye){for(var we=this.tryEntries.length-1;we>=0;--we){var be=this.tryEntries[we];if(be.finallyLoc===ye)return this.complete(be.completion,be.afterLoc),de(be),Pt}},catch:function(ye){for(var we=this.tryEntries.length-1;we>=0;--we){var be=this.tryEntries[we];if(be.tryLoc===ye){var fe=be.completion;if(fe.type==="throw"){var pe=fe.arg;de(be)}return pe}}throw new Error("illegal catch attempt")},delegateYield:function(ye,we,be){return this.delegate={iterator:Qt(ye),resultName:we,nextLoc:be},this.method==="next"&&(this.arg=St),Pt}},gt}(typeof zt=="object"?zt.exports:{});try{regeneratorRuntime=vt}catch(gt){typeof globalThis=="object"?globalThis.regeneratorRuntime=vt:Function("r","regeneratorRuntime = r")(vt)}},{}],396:[function(ot,zt,Bt){var vt=ot("buffer"),gt=vt.Buffer;function Et(St,Tt){for(var mt in St)Tt[mt]=St[mt]}gt.from&>.alloc&>.allocUnsafe&>.allocUnsafeSlow?zt.exports=vt:(Et(vt,Bt),Bt.Buffer=Ct);function Ct(St,Tt,mt){return gt(St,Tt,mt)}Et(gt,Ct),Ct.from=function(St,Tt,mt){if(typeof St=="number")throw new TypeError("Argument must not be a number");return gt(St,Tt,mt)},Ct.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},Ct.allocUnsafe=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return gt(St)},Ct.allocUnsafeSlow=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return vt.SlowBuffer(St)}},{buffer:90}],397:[function(ot,zt,Bt){(function(vt){(function(){(function(gt){gt.parser=function(xe,ee){return new Ct(xe,ee)},gt.SAXParser=Ct,gt.SAXStream=tt,gt.createStream=z,gt.MAX_BUFFER_LENGTH=64*1024;var Et=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];gt.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ct(xe,ee){if(!(this instanceof Ct))return new Ct(xe,ee);var Kt=this;Tt(Kt),Kt.q=Kt.c="",Kt.bufferCheckPosition=gt.MAX_BUFFER_LENGTH,Kt.opt=ee||{},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=!!xe,Kt.noscript=!!(xe||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(xe){function ee(){}ee.prototype=xe;var Kt=new ee;return Kt}),Object.keys||(Object.keys=function(xe){var ee=[];for(var Kt in xe)xe.hasOwnProperty(Kt)&&ee.push(Kt);return ee});function St(xe){for(var ee=Math.max(gt.MAX_BUFFER_LENGTH,10),Kt=0,wt=0,Lt=Et.length;wt<Lt;wt++){var Xt=xe[Et[wt]].length;if(Xt>ee)switch(Et[wt]){case"textNode":de(xe);break;case"cdata":se(xe,"oncdata",xe.cdata),xe.cdata="";break;case"script":se(xe,"onscript",xe.script),xe.script="";break;default:Qt(xe,"Max buffer length exceeded: "+Et[wt])}Kt=Math.max(Kt,Xt)}var re=gt.MAX_BUFFER_LENGTH-Kt;xe.bufferCheckPosition=re+xe.position}function Tt(xe){for(var ee=0,Kt=Et.length;ee<Kt;ee++)xe[Et[ee]]=""}function mt(xe){de(xe),xe.cdata!==""&&(se(xe,"oncdata",xe.cdata),xe.cdata=""),xe.script!==""&&(se(xe,"onscript",xe.script),xe.script="")}Ct.prototype={end:function(){ne(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(xe){xt=function(){}}var ft=gt.EVENTS.filter(function(xe){return xe!=="error"&&xe!=="end"});function z(xe,ee){return new tt(xe,ee)}function tt(xe,ee){if(!(this instanceof tt))return new tt(xe,ee);xt.apply(this),this._parser=new Ct(xe,ee),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(xe){if(typeof vt=="function"&&typeof vt.isBuffer=="function"&&vt.isBuffer(xe)){if(!this._decoder){var ee=ot("string_decoder").StringDecoder;this._decoder=new ee("utf8")}xe=this._decoder.write(xe)}return this._parser.write(xe.toString()),this.emit("data",xe),!0},tt.prototype.end=function(xe){return xe&&xe.length&&this.write(xe),this._parser.end(),!0},tt.prototype.on=function(xe,ee){var Kt=this;return!Kt._parser["on"+xe]&&ft.indexOf(xe)!==-1&&(Kt._parser["on"+xe]=function(){var wt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);wt.splice(0,0,xe),Kt.emit.apply(Kt,wt)}),xt.prototype.on.call(Kt,xe,ee)};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(xe){return xe===" "||xe===`
|
|
`||xe==="\r"||xe===" "}function Nt(xe){return xe==='"'||xe==="'"}function Gt(xe){return xe===">"||jt(xe)}function Ht(xe,ee){return xe.test(ee)}function Yt(xe,ee){return!Ht(xe,ee)}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(xe){var ee=gt.ENTITIES[xe],Kt=typeof ee=="number"?String.fromCharCode(ee):ee;gt.ENTITIES[xe]=Kt});for(var Vt in gt.STATE)gt.STATE[gt.STATE[Vt]]=Vt;Ut=gt.STATE;function oe(xe,ee,Kt){xe[ee]&&xe[ee](Kt)}function se(xe,ee,Kt){xe.textNode&&de(xe),oe(xe,ee,Kt)}function de(xe){xe.textNode=Se(xe.opt,xe.textNode),xe.textNode&&oe(xe,"ontext",xe.textNode),xe.textNode=""}function Se(xe,ee){return xe.trim&&(ee=ee.trim()),xe.normalize&&(ee=ee.replace(/\s+/g," ")),ee}function Qt(xe,ee){return de(xe),xe.trackPosition&&(ee+=`
|
|
Line: `+xe.line+`
|
|
Column: `+xe.column+`
|
|
Char: `+xe.c),ee=new Error(ee),xe.error=ee,oe(xe,"onerror",ee),xe}function ne(xe){return xe.sawRoot&&!xe.closedRoot&&ye(xe,"Unclosed root tag"),xe.state!==Ut.BEGIN&&xe.state!==Ut.BEGIN_WHITESPACE&&xe.state!==Ut.TEXT&&Qt(xe,"Unexpected end"),de(xe),xe.c="",xe.closed=!0,oe(xe,"onend"),Ct.call(xe,xe.strict,xe.opt),xe}function ye(xe,ee){if(typeof xe!="object"||!(xe instanceof Ct))throw new Error("bad call to strictFail");xe.strict&&Qt(xe,ee)}function we(xe){xe.strict||(xe.tagName=xe.tagName[xe.looseCase]());var ee=xe.tags[xe.tags.length-1]||xe,Kt=xe.tag={name:xe.tagName,attributes:{}};xe.opt.xmlns&&(Kt.ns=ee.ns),xe.attribList.length=0,se(xe,"onopentagstart",Kt)}function be(xe,ee){var Kt=xe.indexOf(":"),wt=Kt<0?["",xe]:xe.split(":"),Lt=wt[0],Xt=wt[1];return ee&&xe==="xmlns"&&(Lt="xmlns",Xt=""),{prefix:Lt,local:Xt}}function fe(xe){if(xe.strict||(xe.attribName=xe.attribName[xe.looseCase]()),xe.attribList.indexOf(xe.attribName)!==-1||xe.tag.attributes.hasOwnProperty(xe.attribName)){xe.attribName=xe.attribValue="";return}if(xe.opt.xmlns){var ee=be(xe.attribName,!0),Kt=ee.prefix,wt=ee.local;if(Kt==="xmlns")if(wt==="xml"&&xe.attribValue!==lt)ye(xe,"xml: prefix must be bound to "+lt+`
|
|
Actual: `+xe.attribValue);else if(wt==="xmlns"&&xe.attribValue!==ut)ye(xe,"xmlns: prefix must be bound to "+ut+`
|
|
Actual: `+xe.attribValue);else{var Lt=xe.tag,Xt=xe.tags[xe.tags.length-1]||xe;Lt.ns===Xt.ns&&(Lt.ns=Object.create(Xt.ns)),Lt.ns[wt]=xe.attribValue}xe.attribList.push([xe.attribName,xe.attribValue])}else xe.tag.attributes[xe.attribName]=xe.attribValue,se(xe,"onattribute",{name:xe.attribName,value:xe.attribValue});xe.attribName=xe.attribValue=""}function pe(xe,ee){if(xe.opt.xmlns){var Kt=xe.tag,wt=be(xe.tagName);Kt.prefix=wt.prefix,Kt.local=wt.local,Kt.uri=Kt.ns[wt.prefix]||"",Kt.prefix&&!Kt.uri&&(ye(xe,"Unbound namespace prefix: "+JSON.stringify(xe.tagName)),Kt.uri=wt.prefix);var Lt=xe.tags[xe.tags.length-1]||xe;Kt.ns&&Lt.ns!==Kt.ns&&Object.keys(Kt.ns).forEach(function(Be){se(xe,"onopennamespace",{prefix:Be,uri:Kt.ns[Be]})});for(var Xt=0,re=xe.attribList.length;Xt<re;Xt++){var It=xe.attribList[Xt],Rt=It[0],Wt=It[1],te=be(Rt,!0),ue=te.prefix,le=te.local,Ae=ue===""?"":Kt.ns[ue]||"",Le={name:Rt,value:Wt,prefix:ue,local:le,uri:Ae};ue&&ue!=="xmlns"&&!Ae&&(ye(xe,"Unbound namespace prefix: "+JSON.stringify(ue)),Le.uri=ue),xe.tag.attributes[Rt]=Le,se(xe,"onattribute",Le)}xe.attribList.length=0}xe.tag.isSelfClosing=!!ee,xe.sawRoot=!0,xe.tags.push(xe.tag),se(xe,"onopentag",xe.tag),ee||(!xe.noscript&&xe.tagName.toLowerCase()==="script"?xe.state=Ut.SCRIPT:xe.state=Ut.TEXT,xe.tag=null,xe.tagName=""),xe.attribName=xe.attribValue="",xe.attribList.length=0}function ce(xe){if(!xe.tagName){ye(xe,"Weird empty close tag."),xe.textNode+="</>",xe.state=Ut.TEXT;return}if(xe.script){if(xe.tagName!=="script"){xe.script+="</"+xe.tagName+">",xe.tagName="",xe.state=Ut.SCRIPT;return}se(xe,"onscript",xe.script),xe.script=""}var ee=xe.tags.length,Kt=xe.tagName;xe.strict||(Kt=Kt[xe.looseCase]());for(var wt=Kt;ee--;){var Lt=xe.tags[ee];if(Lt.name!==wt)ye(xe,"Unexpected close tag");else break}if(ee<0){ye(xe,"Unmatched closing tag: "+xe.tagName),xe.textNode+="</"+xe.tagName+">",xe.state=Ut.TEXT;return}xe.tagName=Kt;for(var Xt=xe.tags.length;Xt-- >ee;){var re=xe.tag=xe.tags.pop();xe.tagName=xe.tag.name,se(xe,"onclosetag",xe.tagName);var It={};for(var Rt in re.ns)It[Rt]=re.ns[Rt];var Wt=xe.tags[xe.tags.length-1]||xe;xe.opt.xmlns&&re.ns!==Wt.ns&&Object.keys(re.ns).forEach(function(te){var ue=re.ns[te];se(xe,"onclosenamespace",{prefix:te,uri:ue})})}ee===0&&(xe.closedRoot=!0),xe.tagName=xe.attribValue=xe.attribName="",xe.attribList.length=0,xe.state=Ut.TEXT}function Ce(xe){var ee=xe.entity,Kt=ee.toLowerCase(),wt,Lt="";return xe.ENTITIES[ee]?xe.ENTITIES[ee]:xe.ENTITIES[Kt]?xe.ENTITIES[Kt]:(ee=Kt,ee.charAt(0)==="#"&&(ee.charAt(1)==="x"?(ee=ee.slice(2),wt=parseInt(ee,16),Lt=wt.toString(16)):(ee=ee.slice(1),wt=parseInt(ee,10),Lt=wt.toString(10))),ee=ee.replace(/^0+/,""),isNaN(wt)||Lt.toLowerCase()!==ee?(ye(xe,"Invalid character entity"),"&"+xe.entity+";"):String.fromCodePoint(wt))}function ve(xe,ee){ee==="<"?(xe.state=Ut.OPEN_WAKA,xe.startTagPosition=xe.position):jt(ee)||(ye(xe,"Non-whitespace before first tag."),xe.textNode=ee,xe.state=Ut.TEXT)}function Fe(xe,ee){var Kt="";return ee<xe.length&&(Kt=xe.charAt(ee)),Kt}function ge(xe){var ee=this;if(this.error)throw this.error;if(ee.closed)return Qt(ee,"Cannot write after close. Assign an onready handler.");if(xe===null)return ne(ee);typeof xe=="object"&&(xe=xe.toString());for(var Kt=0,wt="";wt=Fe(xe,Kt++),ee.c=wt,!!wt;)switch(ee.trackPosition&&(ee.position++,wt===`
|
|
`?(ee.line++,ee.column=0):ee.column++),ee.state){case Ut.BEGIN:if(ee.state=Ut.BEGIN_WHITESPACE,wt==="\uFEFF")continue;ve(ee,wt);continue;case Ut.BEGIN_WHITESPACE:ve(ee,wt);continue;case Ut.TEXT:if(ee.sawRoot&&!ee.closedRoot){for(var Lt=Kt-1;wt&&wt!=="<"&&wt!=="&";)wt=Fe(xe,Kt++),wt&&ee.trackPosition&&(ee.position++,wt===`
|
|
`?(ee.line++,ee.column=0):ee.column++);ee.textNode+=xe.substring(Lt,Kt-1)}wt==="<"&&!(ee.sawRoot&&ee.closedRoot&&!ee.strict)?(ee.state=Ut.OPEN_WAKA,ee.startTagPosition=ee.position):(!jt(wt)&&(!ee.sawRoot||ee.closedRoot)&&ye(ee,"Text data outside of root node."),wt==="&"?ee.state=Ut.TEXT_ENTITY:ee.textNode+=wt);continue;case Ut.SCRIPT:wt==="<"?ee.state=Ut.SCRIPT_ENDING:ee.script+=wt;continue;case Ut.SCRIPT_ENDING:wt==="/"?ee.state=Ut.CLOSE_TAG:(ee.script+="<"+wt,ee.state=Ut.SCRIPT);continue;case Ut.OPEN_WAKA:if(wt==="!")ee.state=Ut.SGML_DECL,ee.sgmlDecl="";else if(!jt(wt))if(Ht(Pt,wt))ee.state=Ut.OPEN_TAG,ee.tagName=wt;else if(wt==="/")ee.state=Ut.CLOSE_TAG,ee.tagName="";else if(wt==="?")ee.state=Ut.PROC_INST,ee.procInstName=ee.procInstBody="";else{if(ye(ee,"Unencoded <"),ee.startTagPosition+1<ee.position){var Xt=ee.position-ee.startTagPosition;wt=new Array(Xt).join(" ")+wt}ee.textNode+="<"+wt,ee.state=Ut.TEXT}continue;case Ut.SGML_DECL:(ee.sgmlDecl+wt).toUpperCase()===at?(se(ee,"onopencdata"),ee.state=Ut.CDATA,ee.sgmlDecl="",ee.cdata=""):ee.sgmlDecl+wt==="--"?(ee.state=Ut.COMMENT,ee.comment="",ee.sgmlDecl=""):(ee.sgmlDecl+wt).toUpperCase()===it?(ee.state=Ut.DOCTYPE,(ee.doctype||ee.sawRoot)&&ye(ee,"Inappropriately located doctype declaration"),ee.doctype="",ee.sgmlDecl=""):wt===">"?(se(ee,"onsgmldeclaration",ee.sgmlDecl),ee.sgmlDecl="",ee.state=Ut.TEXT):(Nt(wt)&&(ee.state=Ut.SGML_DECL_QUOTED),ee.sgmlDecl+=wt);continue;case Ut.SGML_DECL_QUOTED:wt===ee.q&&(ee.state=Ut.SGML_DECL,ee.q=""),ee.sgmlDecl+=wt;continue;case Ut.DOCTYPE:wt===">"?(ee.state=Ut.TEXT,se(ee,"ondoctype",ee.doctype),ee.doctype=!0):(ee.doctype+=wt,wt==="["?ee.state=Ut.DOCTYPE_DTD:Nt(wt)&&(ee.state=Ut.DOCTYPE_QUOTED,ee.q=wt));continue;case Ut.DOCTYPE_QUOTED:ee.doctype+=wt,wt===ee.q&&(ee.q="",ee.state=Ut.DOCTYPE);continue;case Ut.DOCTYPE_DTD:ee.doctype+=wt,wt==="]"?ee.state=Ut.DOCTYPE:Nt(wt)&&(ee.state=Ut.DOCTYPE_DTD_QUOTED,ee.q=wt);continue;case Ut.DOCTYPE_DTD_QUOTED:ee.doctype+=wt,wt===ee.q&&(ee.state=Ut.DOCTYPE_DTD,ee.q="");continue;case Ut.COMMENT:wt==="-"?ee.state=Ut.COMMENT_ENDING:ee.comment+=wt;continue;case Ut.COMMENT_ENDING:wt==="-"?(ee.state=Ut.COMMENT_ENDED,ee.comment=Se(ee.opt,ee.comment),ee.comment&&se(ee,"oncomment",ee.comment),ee.comment=""):(ee.comment+="-"+wt,ee.state=Ut.COMMENT);continue;case Ut.COMMENT_ENDED:wt!==">"?(ye(ee,"Malformed comment"),ee.comment+="--"+wt,ee.state=Ut.COMMENT):ee.state=Ut.TEXT;continue;case Ut.CDATA:wt==="]"?ee.state=Ut.CDATA_ENDING:ee.cdata+=wt;continue;case Ut.CDATA_ENDING:wt==="]"?ee.state=Ut.CDATA_ENDING_2:(ee.cdata+="]"+wt,ee.state=Ut.CDATA);continue;case Ut.CDATA_ENDING_2:wt===">"?(ee.cdata&&se(ee,"oncdata",ee.cdata),se(ee,"onclosecdata"),ee.cdata="",ee.state=Ut.TEXT):wt==="]"?ee.cdata+="]":(ee.cdata+="]]"+wt,ee.state=Ut.CDATA);continue;case Ut.PROC_INST:wt==="?"?ee.state=Ut.PROC_INST_ENDING:jt(wt)?ee.state=Ut.PROC_INST_BODY:ee.procInstName+=wt;continue;case Ut.PROC_INST_BODY:if(!ee.procInstBody&&jt(wt))continue;wt==="?"?ee.state=Ut.PROC_INST_ENDING:ee.procInstBody+=wt;continue;case Ut.PROC_INST_ENDING:wt===">"?(se(ee,"onprocessinginstruction",{name:ee.procInstName,body:ee.procInstBody}),ee.procInstName=ee.procInstBody="",ee.state=Ut.TEXT):(ee.procInstBody+="?"+wt,ee.state=Ut.PROC_INST_BODY);continue;case Ut.OPEN_TAG:Ht(At,wt)?ee.tagName+=wt:(we(ee),wt===">"?pe(ee):wt==="/"?ee.state=Ut.OPEN_TAG_SLASH:(jt(wt)||ye(ee,"Invalid character in tag name"),ee.state=Ut.ATTRIB));continue;case Ut.OPEN_TAG_SLASH:wt===">"?(pe(ee,!0),ce(ee)):(ye(ee,"Forward-slash in opening tag not followed by >"),ee.state=Ut.ATTRIB);continue;case Ut.ATTRIB:if(jt(wt))continue;wt===">"?pe(ee):wt==="/"?ee.state=Ut.OPEN_TAG_SLASH:Ht(Pt,wt)?(ee.attribName=wt,ee.attribValue="",ee.state=Ut.ATTRIB_NAME):ye(ee,"Invalid attribute name");continue;case Ut.ATTRIB_NAME:wt==="="?ee.state=Ut.ATTRIB_VALUE:wt===">"?(ye(ee,"Attribute without value"),ee.attribValue=ee.attribName,fe(ee),pe(ee)):jt(wt)?ee.state=Ut.ATTRIB_NAME_SAW_WHITE:Ht(At,wt)?ee.attribName+=wt:ye(ee,"Invalid attribute name");continue;case Ut.ATTRIB_NAME_SAW_WHITE:if(wt==="=")ee.state=Ut.ATTRIB_VALUE;else{if(jt(wt))continue;ye(ee,"Attribute without value"),ee.tag.attributes[ee.attribName]="",ee.attribValue="",se(ee,"onattribute",{name:ee.attribName,value:""}),ee.attribName="",wt===">"?pe(ee):Ht(Pt,wt)?(ee.attribName=wt,ee.state=Ut.ATTRIB_NAME):(ye(ee,"Invalid attribute name"),ee.state=Ut.ATTRIB)}continue;case Ut.ATTRIB_VALUE:if(jt(wt))continue;Nt(wt)?(ee.q=wt,ee.state=Ut.ATTRIB_VALUE_QUOTED):(ye(ee,"Unquoted attribute value"),ee.state=Ut.ATTRIB_VALUE_UNQUOTED,ee.attribValue=wt);continue;case Ut.ATTRIB_VALUE_QUOTED:if(wt!==ee.q){wt==="&"?ee.state=Ut.ATTRIB_VALUE_ENTITY_Q:ee.attribValue+=wt;continue}fe(ee),ee.q="",ee.state=Ut.ATTRIB_VALUE_CLOSED;continue;case Ut.ATTRIB_VALUE_CLOSED:jt(wt)?ee.state=Ut.ATTRIB:wt===">"?pe(ee):wt==="/"?ee.state=Ut.OPEN_TAG_SLASH:Ht(Pt,wt)?(ye(ee,"No whitespace between attributes"),ee.attribName=wt,ee.attribValue="",ee.state=Ut.ATTRIB_NAME):ye(ee,"Invalid attribute name");continue;case Ut.ATTRIB_VALUE_UNQUOTED:if(!Gt(wt)){wt==="&"?ee.state=Ut.ATTRIB_VALUE_ENTITY_U:ee.attribValue+=wt;continue}fe(ee),wt===">"?pe(ee):ee.state=Ut.ATTRIB;continue;case Ut.CLOSE_TAG:if(ee.tagName)wt===">"?ce(ee):Ht(At,wt)?ee.tagName+=wt:ee.script?(ee.script+="</"+ee.tagName,ee.tagName="",ee.state=Ut.SCRIPT):(jt(wt)||ye(ee,"Invalid tagname in closing tag"),ee.state=Ut.CLOSE_TAG_SAW_WHITE);else{if(jt(wt))continue;Yt(Pt,wt)?ee.script?(ee.script+="</"+wt,ee.state=Ut.SCRIPT):ye(ee,"Invalid tagname in closing tag."):ee.tagName=wt}continue;case Ut.CLOSE_TAG_SAW_WHITE:if(jt(wt))continue;wt===">"?ce(ee):ye(ee,"Invalid characters in closing tag");continue;case Ut.TEXT_ENTITY:case Ut.ATTRIB_VALUE_ENTITY_Q:case Ut.ATTRIB_VALUE_ENTITY_U:var re,It;switch(ee.state){case Ut.TEXT_ENTITY:re=Ut.TEXT,It="textNode";break;case Ut.ATTRIB_VALUE_ENTITY_Q:re=Ut.ATTRIB_VALUE_QUOTED,It="attribValue";break;case Ut.ATTRIB_VALUE_ENTITY_U:re=Ut.ATTRIB_VALUE_UNQUOTED,It="attribValue";break}wt===";"?(ee[It]+=Ce(ee),ee.entity="",ee.state=re):Ht(ee.entity.length?Ft:Dt,wt)?ee.entity+=wt:(ye(ee,"Invalid character in entity name"),ee[It]+="&"+ee.entity+wt,ee.entity="",ee.state=re);continue;default:throw new Error(ee,"Unknown state: "+ee.state)}return ee.position>=ee.bufferCheckPosition&&St(ee),ee}String.fromCodePoint||function(){var xe=String.fromCharCode,ee=Math.floor,Kt=function(){var wt=16384,Lt=[],Xt,re,It=-1,Rt=arguments.length;if(!Rt)return"";for(var Wt="";++It<Rt;){var te=Number(arguments[It]);if(!isFinite(te)||te<0||te>1114111||ee(te)!==te)throw RangeError("Invalid code point: "+te);te<=65535?Lt.push(te):(te-=65536,Xt=(te>>10)+55296,re=te%1024+56320,Lt.push(Xt,re)),(It+1===Rt||Lt.length>wt)&&(Wt+=xe.apply(null,Lt),Lt.length=0)}return Wt};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Kt,configurable:!0,writable:!0}):String.fromCodePoint=Kt}()})(typeof Bt=="undefined"?this.sax={}:Bt)}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ot,zt,Bt){zt.exports=Et;var vt=ot("events").EventEmitter,gt=ot("inherits");gt(Et,vt),Et.Readable=ot("readable-stream/lib/_stream_readable.js"),Et.Writable=ot("readable-stream/lib/_stream_writable.js"),Et.Duplex=ot("readable-stream/lib/_stream_duplex.js"),Et.Transform=ot("readable-stream/lib/_stream_transform.js"),Et.PassThrough=ot("readable-stream/lib/_stream_passthrough.js"),Et.finished=ot("readable-stream/lib/internal/streams/end-of-stream.js"),Et.pipeline=ot("readable-stream/lib/internal/streams/pipeline.js"),Et.Stream=Et;function Et(){vt.call(this)}Et.prototype.pipe=function(Ct,St){var Tt=this;function mt(lt){Ct.writable&&Ct.write(lt)===!1&&Tt.pause&&Tt.pause()}Tt.on("data",mt);function xt(){Tt.readable&&Tt.resume&&Tt.resume()}Ct.on("drain",xt),!Ct._isStdio&&(!St||St.end!==!1)&&(Tt.on("end",z),Tt.on("close",tt));var ft=!1;function z(){ft||(ft=!0,Ct.end())}function tt(){ft||(ft=!0,typeof Ct.destroy=="function"&&Ct.destroy())}function at(lt){if(it(),vt.listenerCount(this,"error")===0)throw lt}Tt.on("error",at),Ct.on("error",at);function it(){Tt.removeListener("data",mt),Ct.removeListener("drain",xt),Tt.removeListener("end",z),Tt.removeListener("close",tt),Tt.removeListener("error",at),Ct.removeListener("error",at),Tt.removeListener("end",it),Tt.removeListener("close",it),Ct.removeListener("close",it)}return Tt.on("end",it),Tt.on("close",it),Ct.on("close",it),Ct.emit("pipe",Tt),Ct}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(ot,zt,Bt){"use strict";function vt(xt,ft){xt.prototype=Object.create(ft.prototype),xt.prototype.constructor=xt,xt.__proto__=ft}var gt={};function Et(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 Ct(xt,ft){if(Array.isArray(xt)){var z=xt.length;return xt=xt.map(function(tt){return String(tt)}),z>2?"one of ".concat(ft," ").concat(xt.slice(0,z-1).join(", "),", or ")+xt[z-1]:z===2?"one of ".concat(ft," ").concat(xt[0]," or ").concat(xt[1]):"of ".concat(ft," ").concat(xt[0])}else return"of ".concat(ft," ").concat(String(xt))}function 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}Et("ERR_INVALID_OPT_VALUE",function(xt,ft){return'The value "'+ft+'" is invalid for option "'+xt+'"'},TypeError),Et("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(Ct(ft,"type"));else{var it=mt(xt,".")?"property":"argument";at='The "'.concat(xt,'" ').concat(it," ").concat(tt," ").concat(Ct(ft,"type"))}return at+=". Received type ".concat(typeof z),at},TypeError),Et("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Et("ERR_METHOD_NOT_IMPLEMENTED",function(xt){return"The "+xt+" method is not implemented"}),Et("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Et("ERR_STREAM_DESTROYED",function(xt){return"Cannot call "+xt+" after a stream was destroyed"}),Et("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Et("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Et("ERR_STREAM_WRITE_AFTER_END","write after end"),Et("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Et("ERR_UNKNOWN_ENCODING",function(xt){return"Unknown encoding: "+xt},TypeError),Et("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),zt.exports.codes=gt},{}],400:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=Object.keys||function(tt){var at=[];for(var it in tt)at.push(it);return at};zt.exports=xt;var Et=ot("./_stream_readable"),Ct=ot("./_stream_writable");ot("inherits")(xt,Et);for(var St=gt(Ct.prototype),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];xt.prototype[mt]||(xt.prototype[mt]=Ct.prototype[mt])}function xt(tt){if(!(this instanceof xt))return new xt(tt);Et.call(this,tt),Ct.call(this,tt),this.allowHalfOpen=!0,tt&&(tt.readable===!1&&(this.readable=!1),tt.writable===!1&&(this.writable=!1),tt.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",ft)))}Object.defineProperty(xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ft(){this._writableState.ended||vt.nextTick(z,this)}function z(tt){tt.end()}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(at){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=at,this._writableState.destroyed=at)}})}).call(this)}).call(this,ot("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ot,zt,Bt){"use strict";zt.exports=gt;var vt=ot("./_stream_transform");ot("inherits")(gt,vt);function gt(Et){if(!(this instanceof gt))return new gt(Et);vt.call(this,Et)}gt.prototype._transform=function(Et,Ct,St){St(null,Et)}},{"./_stream_transform":403,inherits:364}],402:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";zt.exports=se;var Et;se.ReadableState=oe;var Ct=ot("events").EventEmitter,St=function(Rt,Wt){return Rt.listeners(Wt).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,Ht;ot("inherits")(se,Tt);var Yt=lt.errorOrDestroy,Ut=["error","close","destroy","pause","resume"];function Vt(It,Rt,Wt){if(typeof It.prependListener=="function")return It.prependListener(Rt,Wt);!It._events||!It._events[Rt]?It.on(Rt,Wt):Array.isArray(It._events[Rt])?It._events[Rt].unshift(Wt):It._events[Rt]=[Wt,It._events[Rt]]}function oe(It,Rt,Wt){Et=Et||ot("./_stream_duplex"),It=It||{},typeof Wt!="boolean"&&(Wt=Rt instanceof Et),this.objectMode=!!It.objectMode,Wt&&(this.objectMode=this.objectMode||!!It.readableObjectMode),this.highWaterMark=dt(this,It,"readableHighWaterMark",Wt),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(Et=Et||ot("./_stream_duplex"),!(this instanceof se))return new se(It);var Rt=this instanceof Et;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 Wt=this._readableState,te;return Wt.objectMode?te=!0:typeof It=="string"&&(Rt=Rt||Wt.defaultEncoding,Rt!==Wt.encoding&&(It=mt.from(It,Rt),Rt=""),te=!0),de(this,It,Rt,!1,te)},se.prototype.unshift=function(It){return de(this,It,null,!0,!1)};function de(It,Rt,Wt,te,ue){at("readableAddChunk",Rt);var le=It._readableState;if(Rt===null)le.reading=!1,be(It,le);else{var Ae;if(ue||(Ae=Qt(le,Rt)),Ae)Yt(It,Ae);else if(le.objectMode||Rt&&Rt.length>0)if(typeof Rt!="string"&&!le.objectMode&&Object.getPrototypeOf(Rt)!==mt.prototype&&(Rt=ft(Rt)),te)le.endEmitted?Yt(It,new jt):Se(It,le,Rt,!0);else if(le.ended)Yt(It,new Dt);else{if(le.destroyed)return!1;le.reading=!1,le.decoder&&!Wt?(Rt=le.decoder.write(Rt),le.objectMode||Rt.length!==0?Se(It,le,Rt,!1):ce(It,le)):Se(It,le,Rt,!1)}else te||(le.reading=!1,ce(It,le))}return!le.ended&&(le.length<le.highWaterMark||le.length===0)}function Se(It,Rt,Wt,te){Rt.flowing&&Rt.length===0&&!Rt.sync?(Rt.awaitDrain=0,It.emit("data",Wt)):(Rt.length+=Rt.objectMode?1:Wt.length,te?Rt.buffer.unshift(Wt):Rt.buffer.push(Wt),Rt.needReadable&&fe(It)),ce(It,Rt)}function Qt(It,Rt){var Wt;return!z(Rt)&&typeof Rt!="string"&&Rt!==void 0&&!It.objectMode&&(Wt=new At("chunk",["string","Buffer","Uint8Array"],Rt)),Wt}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 Wt=this._readableState.buffer.head,te="";Wt!==null;)te+=Rt.write(Wt.data),Wt=Wt.next;return this._readableState.buffer.clear(),te!==""&&this._readableState.buffer.push(te),this._readableState.length=te.length,this};var ne=1073741824;function ye(It){return It>=ne?It=ne:(It--,It|=It>>>1,It|=It>>>2,It|=It>>>4,It|=It>>>8,It|=It>>>16,It++),It}function we(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,Wt=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):fe(this),null;if(It=we(It,Rt),It===0&&Rt.ended)return Rt.length===0&&Lt(this),null;var te=Rt.needReadable;at("need readable",te),(Rt.length===0||Rt.length-It<Rt.highWaterMark)&&(te=!0,at("length less than watermark",te)),Rt.ended||Rt.reading?(te=!1,at("reading or ended",te)):te&&(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=we(Wt,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),Wt!==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 Wt=Rt.decoder.end();Wt&&Wt.length&&(Rt.buffer.push(Wt),Rt.length+=Rt.objectMode?1:Wt.length)}Rt.ended=!0,Rt.sync?fe(It):(Rt.needReadable=!1,Rt.emittedReadable||(Rt.emittedReadable=!0,pe(It)))}}function fe(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 ce(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 Wt=Rt.length;if(at("maybeReadMore read 0"),It.read(0),Wt===Rt.length)break}Rt.readingMore=!1}se.prototype._read=function(It){Yt(this,new Ft("_read()"))},se.prototype.pipe=function(It,Rt){var Wt=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=It;break;case 1:te.pipes=[te.pipes,It];break;default:te.pipes.push(It);break}te.pipesCount+=1,at("pipe count=%d opts=%j",te.pipesCount,Rt);var ue=(!Rt||Rt.end!==!1)&&It!==vt.stdout&&It!==vt.stderr,le=ue?Le:Ke;te.endEmitted?vt.nextTick(le):Wt.once("end",le),It.on("unpipe",Ae);function Ae(nn,hn){at("onunpipe"),nn===Wt&&hn&&hn.hasUnpiped===!1&&(hn.hasUnpiped=!0,$e())}function Le(){at("onend"),It.end()}var Be=ve(Wt);It.on("drain",Be);var tn=!1;function $e(){at("cleanup"),It.removeListener("close",Ge),It.removeListener("finish",We),It.removeListener("drain",Be),It.removeListener("error",Ze),It.removeListener("unpipe",Ae),Wt.removeListener("end",Le),Wt.removeListener("end",Ke),Wt.removeListener("data",Qe),tn=!0,te.awaitDrain&&(!It._writableState||It._writableState.needDrain)&&Be()}Wt.on("data",Qe);function Qe(nn){at("ondata");var hn=It.write(nn);at("dest.write",hn),hn===!1&&((te.pipesCount===1&&te.pipes===It||te.pipesCount>1&&re(te.pipes,It)!==-1)&&!tn&&(at("false write response, pause",te.awaitDrain),te.awaitDrain++),Wt.pause())}function Ze(nn){at("onerror",nn),Ke(),It.removeListener("error",Ze),St(It,"error")===0&&Yt(It,nn)}Vt(It,"error",Ze);function Ge(){It.removeListener("finish",We),Ke()}It.once("close",Ge);function We(){at("onfinish"),It.removeListener("close",Ge),Ke()}It.once("finish",We);function Ke(){at("unpipe"),Wt.unpipe(It)}return It.emit("pipe",Wt),te.flowing||(at("pipe resume"),Wt.resume()),It};function ve(It){return function(){var Wt=It._readableState;at("pipeOnDrain",Wt.awaitDrain),Wt.awaitDrain&&Wt.awaitDrain--,Wt.awaitDrain===0&&St(It,"data")&&(Wt.flowing=!0,Kt(It))}}se.prototype.unpipe=function(It){var Rt=this._readableState,Wt={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,Wt),this);if(!It){var te=Rt.pipes,ue=Rt.pipesCount;Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1;for(var le=0;le<ue;le++)te[le].emit("unpipe",this,{hasUnpiped:!1});return this}var Ae=re(Rt.pipes,It);return Ae===-1?this:(Rt.pipes.splice(Ae,1),Rt.pipesCount-=1,Rt.pipesCount===1&&(Rt.pipes=Rt.pipes[0]),It.emit("unpipe",this,Wt),this)},se.prototype.on=function(It,Rt){var Wt=Tt.prototype.on.call(this,It,Rt),te=this._readableState;return It==="data"?(te.readableListening=this.listenerCount("readable")>0,te.flowing!==!1&&this.resume()):It==="readable"&&!te.endEmitted&&!te.readableListening&&(te.readableListening=te.needReadable=!0,te.flowing=!1,te.emittedReadable=!1,at("on readable",te.length,te.reading),te.length?fe(this):te.reading||vt.nextTick(ge,this)),Wt},se.prototype.addListener=se.prototype.on,se.prototype.removeListener=function(It,Rt){var Wt=Tt.prototype.removeListener.call(this,It,Rt);return It==="readable"&&vt.nextTick(Fe,this),Wt},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,xe(this,It)),It.paused=!1,this};function xe(It,Rt){Rt.resumeScheduled||(Rt.resumeScheduled=!0,vt.nextTick(ee,It,Rt))}function ee(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,Wt=this._readableState,te=!1;It.on("end",function(){if(at("wrapped end"),Wt.decoder&&!Wt.ended){var Ae=Wt.decoder.end();Ae&&Ae.length&&Rt.push(Ae)}Rt.push(null)}),It.on("data",function(Ae){if(at("wrapped data"),Wt.decoder&&(Ae=Wt.decoder.write(Ae)),!(Wt.objectMode&&Ae==null)&&!(!Wt.objectMode&&(!Ae||!Ae.length))){var Le=Rt.push(Ae);Le||(te=!0,It.pause())}});for(var ue in It)this[ue]===void 0&&typeof It[ue]=="function"&&(this[ue]=function(Le){return function(){return It[Le].apply(It,arguments)}}(ue));for(var le=0;le<Ut.length;le++)It.on(Ut[le],this.emit.bind(this,Ut[le]));return this._read=function(Ae){at("wrapped _read",Ae),te&&(te=!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 Wt;return Rt.objectMode?Wt=Rt.buffer.shift():!It||It>=Rt.length?(Rt.decoder?Wt=Rt.buffer.join(""):Rt.buffer.length===1?Wt=Rt.buffer.first():Wt=Rt.buffer.concat(Rt.length),Rt.buffer.clear()):Wt=Rt.buffer.consume(It,Rt.decoder),Wt}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 Wt=Rt._writableState;(!Wt||Wt.autoDestroy&&Wt.finished)&&Rt.destroy()}}typeof Symbol=="function"&&(se.from=function(It,Rt){return Ht===void 0&&(Ht=ot("./internal/streams/from")),Ht(se,It,Rt)});function re(It,Rt){for(var Wt=0,te=It.length;Wt<te;Wt++)if(It[Wt]===Rt)return Wt;return-1}}).call(this)}).call(this,ot("_process"),typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(ot,zt,Bt){"use strict";zt.exports=xt;var vt=ot("../errors").codes,gt=vt.ERR_METHOD_NOT_IMPLEMENTED,Et=vt.ERR_MULTIPLE_CALLBACK,Ct=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 Et);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 Ct;return tt.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";zt.exports=oe;function Et(Kt,wt,Lt){this.chunk=Kt,this.encoding=wt,this.callback=Lt,this.next=null}function Ct(Kt){var wt=this;this.next=null,this.entry=null,this.finish=function(){ee(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,Ht=at.errorOrDestroy;ot("inherits")(oe,mt);function Yt(){}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(re){be(wt,re)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Kt.emitClose!==!1,this.autoDestroy=!!Kt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ct(this)}Ut.prototype.getBuffer=function(){for(var wt=this.bufferedRequest,Lt=[];wt;)Lt.push(wt),wt=wt.next;return Lt},function(){try{Object.defineProperty(Ut.prototype,"buffer",{get:Tt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Vt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Vt=Function.prototype[Symbol.hasInstance],Object.defineProperty(oe,Symbol.hasInstance,{value:function(wt){return Vt.call(this,wt)?!0:this!==oe?!1:wt&&wt._writableState instanceof Ut}})):Vt=function(wt){return wt instanceof this};function oe(Kt){St=St||ot("./_stream_duplex");var wt=this instanceof St;if(!wt&&!Vt.call(oe,this))return new oe(Kt);this._writableState=new Ut(Kt,this,wt),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),mt.call(this)}oe.prototype.pipe=function(){Ht(this,new Dt)};function se(Kt,wt){var Lt=new Nt;Ht(Kt,Lt),vt.nextTick(wt,Lt)}function de(Kt,wt,Lt,Xt){var re;return Lt===null?re=new jt:typeof Lt!="string"&&!wt.objectMode&&(re=new dt("chunk",["string","Buffer"],Lt)),re?(Ht(Kt,re),vt.nextTick(Xt,re),!1):!0}oe.prototype.write=function(Kt,wt,Lt){var Xt=this._writableState,re=!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=Yt),Xt.ending?se(this,Lt):(It||de(this,Xt,Kt,Lt))&&(Xt.pendingcb++,re=Qt(this,Xt,It,Kt,wt,Lt)),re},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&&ce(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 Se(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 Qt(Kt,wt,Lt,Xt,re,It){if(!Lt){var Rt=Se(wt,Xt,re);Xt!==Rt&&(Lt=!0,re="buffer",Xt=Rt)}var Wt=wt.objectMode?1:Xt.length;wt.length+=Wt;var te=wt.length<wt.highWaterMark;if(te||(wt.needDrain=!0),wt.writing||wt.corked){var ue=wt.lastBufferedRequest;wt.lastBufferedRequest={chunk:Xt,encoding:re,isBuf:Lt,callback:It,next:null},ue?ue.next=wt.lastBufferedRequest:wt.bufferedRequest=wt.lastBufferedRequest,wt.bufferedRequestCount+=1}else ne(Kt,wt,!1,Wt,Xt,re,It);return te}function ne(Kt,wt,Lt,Xt,re,It,Rt){wt.writelen=Xt,wt.writecb=Rt,wt.writing=!0,wt.sync=!0,wt.destroyed?wt.onwrite(new Ft("write")):Lt?Kt._writev(re,wt.onwrite):Kt._write(re,It,wt.onwrite),wt.sync=!1}function ye(Kt,wt,Lt,Xt,re){--wt.pendingcb,Lt?(vt.nextTick(re,Xt),vt.nextTick(ge,Kt,wt),Kt._writableState.errorEmitted=!0,Ht(Kt,Xt)):(re(Xt),Kt._writableState.errorEmitted=!0,Ht(Kt,Xt),ge(Kt,wt))}function we(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,re=Lt.writecb;if(typeof re!="function")throw new At;if(we(Lt),wt)ye(Kt,Lt,Xt,wt,re);else{var It=Ce(Lt)||Kt.destroyed;!It&&!Lt.corked&&!Lt.bufferProcessing&&Lt.bufferedRequest&&ce(Kt,Lt),Xt?vt.nextTick(fe,Kt,Lt,It,re):fe(Kt,Lt,It,re)}}function fe(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 ce(Kt,wt){wt.bufferProcessing=!0;var Lt=wt.bufferedRequest;if(Kt._writev&&Lt&&Lt.next){var Xt=wt.bufferedRequestCount,re=new Array(Xt),It=wt.corkedRequestsFree;It.entry=Lt;for(var Rt=0,Wt=!0;Lt;)re[Rt]=Lt,Lt.isBuf||(Wt=!1),Lt=Lt.next,Rt+=1;re.allBuffers=Wt,ne(Kt,wt,!0,wt.length,re,"",It.finish),wt.pendingcb++,wt.lastBufferedRequest=null,It.next?(wt.corkedRequestsFree=It.next,It.next=null):wt.corkedRequestsFree=new Ct(wt),wt.bufferedRequestCount=0}else{for(;Lt;){var te=Lt.chunk,ue=Lt.encoding,le=Lt.callback,Ae=wt.objectMode?1:te.length;if(ne(Kt,wt,!1,Ae,te,ue,le),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||xe(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 ve(Kt,wt){Kt._final(function(Lt){wt.pendingcb--,Lt&&Ht(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(ve,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 xe(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 ee(Kt,wt,Lt){var Xt=Kt.entry;for(Kt.entry=null;Xt;){var re=Xt.callback;wt.pendingcb--,re(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 gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt;function Et(jt,Nt,Gt){return Nt=Ct(Nt),Nt in jt?Object.defineProperty(jt,Nt,{value:Gt,enumerable:!0,configurable:!0,writable:!0}):jt[Nt]=Gt,jt}function Ct(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 Ht=Gt.call(jt,Nt||"default");if(typeof Ht!="object")return Ht;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,Ht){jt.then(function(){if(Nt[z]){Gt(lt(void 0,!0));return}Nt[at](Gt,Ht)},Ht)}}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(Vt,oe){vt.nextTick(function(){Nt[ft]?oe(Nt[ft]):Vt(lt(void 0,!0))})});var Ht=this[tt],Yt;if(Ht)Yt=new Promise(Pt(Ht,this));else{var Ut=this[it].read();if(Ut!==null)return Promise.resolve(lt(Ut,!1));Yt=new Promise(this[at])}return this[tt]=Yt,Yt}},Et(gt,Symbol.asyncIterator,function(){return this}),Et(gt,"return",function(){var Nt=this;return new Promise(function(Gt,Ht){Nt[it].destroy(null,function(Yt){if(Yt){Ht(Yt);return}Gt(lt(void 0,!0))})})}),gt),At),Ft=function(Nt){var Gt,Ht=Object.create(Dt,(Gt={},Et(Gt,it,{value:Nt,writable:!0}),Et(Gt,mt,{value:null,writable:!0}),Et(Gt,xt,{value:null,writable:!0}),Et(Gt,ft,{value:null,writable:!0}),Et(Gt,z,{value:Nt._readableState.endEmitted,writable:!0}),Et(Gt,at,{value:function(Ut,Vt){var oe=Ht[it].read();oe?(Ht[tt]=null,Ht[mt]=null,Ht[xt]=null,Ut(lt(oe,!1))):(Ht[mt]=Ut,Ht[xt]=Vt)},writable:!0}),Gt));return Ht[tt]=null,Tt(Nt,function(Yt){if(Yt&&Yt.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ut=Ht[xt];Ut!==null&&(Ht[tt]=null,Ht[mt]=null,Ht[xt]=null,Ut(Yt)),Ht[ft]=Yt;return}var Vt=Ht[mt];Vt!==null&&(Ht[tt]=null,Ht[mt]=null,Ht[xt]=null,Vt(lt(void 0,!0))),Ht[z]=!0}),Nt.on("readable",dt.bind(null,Ht)),Ht};zt.exports=Ft}).call(this)}).call(this,ot("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ot,zt,Bt){"use strict";function vt(ut,dt){var 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){Et(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 Et(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 Ct(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)}zt.exports=function(){function ut(){Ct(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,zt,Bt){(function(vt){(function(){"use strict";function gt(xt,ft){var z=this,tt=this._readableState&&this._readableState.destroyed,at=this._writableState&&this._writableState.destroyed;return tt||at?(ft?ft(xt):xt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(Tt,this,xt)):vt.nextTick(Tt,this,xt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xt||null,function(it){!ft&&it?z._writableState?z._writableState.errorEmitted?vt.nextTick(Ct,z):(z._writableState.errorEmitted=!0,vt.nextTick(Et,z,it)):vt.nextTick(Et,z,it):ft?(vt.nextTick(Ct,z),ft(it)):vt.nextTick(Ct,z)}),this)}function Et(xt,ft){Tt(xt,ft),Ct(xt)}function Ct(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)}zt.exports={destroy:gt,undestroy:St,errorOrDestroy:mt}}).call(this)}).call(this,ot("_process"))},{_process:467}],408:[function(ot,zt,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function gt(Tt){var mt=!1;return function(){if(!mt){mt=!0;for(var xt=arguments.length,ft=new Array(xt),z=0;z<xt;z++)ft[z]=arguments[z];Tt.apply(this,ft)}}}function Et(){}function Ct(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||Et);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 Ct(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)}}zt.exports=St},{"../../../errors":399}],409:[function(ot,zt,Bt){zt.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ot,zt,Bt){"use strict";var vt;function gt(it){var lt=!1;return function(){lt||(lt=!0,it.apply(void 0,arguments))}}var Et=ot("../../../errors").codes,Ct=Et.ERR_MISSING_ARGS,St=Et.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 Ct("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)}zt.exports=at},{"../../../errors":399,"./end-of-stream":408}],411:[function(ot,zt,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_INVALID_OPT_VALUE;function gt(Ct,St,Tt){return Ct.highWaterMark!=null?Ct.highWaterMark:St?Ct[Tt]:null}function Et(Ct,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 Ct.objectMode?16:16*1024}zt.exports={getHighWaterMark:Et}},{"../../../errors":399}],412:[function(ot,zt,Bt){arguments[4][393][0].apply(Bt,arguments)},{dup:393,events:344}],413:[function(ot,zt,Bt){"use strict";var vt=ot("safe-buffer").Buffer,gt=vt.isEncoding||function(At){switch(At=""+At,At&&At.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Et(At){if(!At)return"utf8";for(var Dt;;)switch(At){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return At;default:if(Dt)return;At=(""+At).toLowerCase(),Dt=!0}}function Ct(At){var Dt=Et(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=Ct(At);var Dt;switch(this.encoding){case"utf16le":this.text=at,this.end=it,Dt=4;break;case"utf8":this.fillLast=ft,Dt=4;break;case"base64":this.text=lt,this.end=ut,Dt=3;break;default:this.write=dt,this.end=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,zt,Bt){(function(vt,gt){(function(){var Et=ot("process/browser.js").nextTick,Ct=Function.prototype.apply,St=Array.prototype.slice,Tt={},mt=0;Bt.setTimeout=function(){return new xt(Ct.call(setTimeout,window,arguments),clearTimeout)},Bt.setInterval=function(){return new xt(Ct.call(setInterval,window,arguments),clearInterval)},Bt.clearTimeout=Bt.clearInterval=function(ft){ft.close()};function xt(ft,z){this._id=ft,this._clearFn=z}xt.prototype.unref=xt.prototype.ref=function(){},xt.prototype.close=function(){this._clearFn.call(window,this._id)},Bt.enroll=function(ft,z){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=z},Bt.unenroll=function(ft){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=-1},Bt._unrefActive=Bt.active=function(ft){clearTimeout(ft._idleTimeoutId);var z=ft._idleTimeout;z>=0&&(ft._idleTimeoutId=setTimeout(function(){ft._onTimeout&&ft._onTimeout()},z))},Bt.setImmediate=typeof vt=="function"?vt:function(ft){var z=mt++,tt=arguments.length<2?!1:St.call(arguments,1);return Tt[z]=!0,Et(function(){Tt[z]&&(tt?ft.apply(null,tt):ft.call(null),Bt.clearImmediate(z))}),z},Bt.clearImmediate=typeof gt=="function"?gt:function(ft){delete Tt[ft]}}).call(this)}).call(this,ot("timers").setImmediate,ot("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ot,zt,Bt){var vt=ot("buffer").Buffer;zt.exports=function(gt){if(gt instanceof Uint8Array){if(gt.byteOffset===0&>.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 Et=new Uint8Array(gt.length),Ct=gt.length,St=0;St<Ct;St++)Et[St]=gt[St];return Et.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ot,zt,Bt){(function(vt){(function(){zt.exports=gt;function gt(Ct,St){if(Et("noDeprecation"))return Ct;var Tt=!1;function mt(){if(!Tt){if(Et("throwDeprecation"))throw new Error(St);Et("traceDeprecation")?console.trace(St):console.warn(St),Tt=!0}return Ct.apply(this,arguments)}return mt}function Et(Ct){try{if(!vt.localStorage)return!1}catch(Tt){return!1}var St=vt.localStorage[Ct];return St==null?!1:String(St).toLowerCase()==="true"}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ot,zt,Bt){arguments[4][84][0].apply(Bt,arguments)},{dup:84}],418:[function(ot,zt,Bt){"use strict";var vt=ot("is-arguments"),gt=ot("is-generator-function"),Et=ot("which-typed-array"),Ct=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,le){if(typeof ue!="object")return!1;try{return le(ue),!0}catch(Ae){return!1}}Bt.isArgumentsObject=vt,Bt.isGeneratorFunction=gt,Bt.isTypedArray=Ct;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):Ct(ue)||ce(ue)}Bt.isArrayBufferView=dt;function Pt(ue){return Et(ue)==="Uint8Array"}Bt.isUint8Array=Pt;function At(ue){return Et(ue)==="Uint8ClampedArray"}Bt.isUint8ClampedArray=At;function Dt(ue){return Et(ue)==="Uint16Array"}Bt.isUint16Array=Dt;function Ft(ue){return Et(ue)==="Uint32Array"}Bt.isUint32Array=Ft;function jt(ue){return Et(ue)==="Int8Array"}Bt.isInt8Array=jt;function Nt(ue){return Et(ue)==="Int16Array"}Bt.isInt16Array=Nt;function Gt(ue){return Et(ue)==="Int32Array"}Bt.isInt32Array=Gt;function Ht(ue){return Et(ue)==="Float32Array"}Bt.isFloat32Array=Ht;function Yt(ue){return Et(ue)==="Float64Array"}Bt.isFloat64Array=Yt;function Ut(ue){return Et(ue)==="BigInt64Array"}Bt.isBigInt64Array=Ut;function Vt(ue){return Et(ue)==="BigUint64Array"}Bt.isBigUint64Array=Vt;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 de(ue){return xt(ue)==="[object Set]"}de.working=typeof Set!="undefined"&&de(new Set);function Se(ue){return typeof Set=="undefined"?!1:de.working?de(ue):ue instanceof Set}Bt.isSet=Se;function Qt(ue){return xt(ue)==="[object WeakMap]"}Qt.working=typeof WeakMap!="undefined"&&Qt(new WeakMap);function ne(ue){return typeof WeakMap=="undefined"?!1:Qt.working?Qt(ue):ue instanceof WeakMap}Bt.isWeakMap=ne;function ye(ue){return xt(ue)==="[object WeakSet]"}ye.working=typeof WeakSet!="undefined"&&ye(new WeakSet);function we(ue){return ye(ue)}Bt.isWeakSet=we;function be(ue){return xt(ue)==="[object ArrayBuffer]"}be.working=typeof ArrayBuffer!="undefined"&&be(new ArrayBuffer);function fe(ue){return typeof ArrayBuffer=="undefined"?!1:be.working?be(ue):ue instanceof ArrayBuffer}Bt.isArrayBuffer=fe;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 ce(ue){return typeof DataView=="undefined"?!1:pe.working?pe(ue):ue instanceof DataView}Bt.isDataView=ce;var Ce=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function ve(ue){return xt(ue)==="[object SharedArrayBuffer]"}function Fe(ue){return typeof Ce=="undefined"?!1:(typeof ve.working=="undefined"&&(ve.working=ve(new Ce)),ve.working?ve(ue):ue instanceof Ce)}Bt.isSharedArrayBuffer=Fe;function ge(ue){return xt(ue)==="[object AsyncFunction]"}Bt.isAsyncFunction=ge;function xe(ue){return xt(ue)==="[object Map Iterator]"}Bt.isMapIterator=xe;function ee(ue){return xt(ue)==="[object Set Iterator]"}Bt.isSetIterator=ee;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 re(ue){return lt(ue,tt)}Bt.isBooleanObject=re;function It(ue){return Tt&<(ue,at)}Bt.isBigIntObject=It;function Rt(ue){return mt&<(ue,it)}Bt.isSymbolObject=Rt;function Wt(ue){return Lt(ue)||Xt(ue)||re(ue)||It(ue)||Rt(ue)}Bt.isBoxedPrimitive=Wt;function te(ue){return typeof Uint8Array!="undefined"&&(fe(ue)||Fe(ue))}Bt.isAnyArrayBuffer=te,["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,zt,Bt){(function(vt){(function(){var gt=Object.getOwnPropertyDescriptors||function(Ce){for(var ve=Object.keys(Ce),Fe={},ge=0;ge<ve.length;ge++)Fe[ve[ge]]=Object.getOwnPropertyDescriptor(Ce,ve[ge]);return Fe},Et=/%[sdj%]/g;Bt.format=function(ce){if(!Nt(ce)){for(var Ce=[],ve=0;ve<arguments.length;ve++)Ce.push(mt(arguments[ve]));return Ce.join(" ")}for(var ve=1,Fe=arguments,ge=Fe.length,xe=String(ce).replace(Et,function(Kt){if(Kt==="%%")return"%";if(ve>=ge)return Kt;switch(Kt){case"%s":return String(Fe[ve++]);case"%d":return Number(Fe[ve++]);case"%j":try{return JSON.stringify(Fe[ve++])}catch(wt){return"[Circular]"}default:return Kt}}),ee=Fe[ve];ve<ge;ee=Fe[++ve])Dt(ee)||!Ut(ee)?xe+=" "+ee:xe+=" "+mt(ee);return xe},Bt.deprecate=function(ce,Ce){if(typeof vt!="undefined"&&vt.noDeprecation===!0)return ce;if(typeof vt=="undefined")return function(){return Bt.deprecate(ce,Ce).apply(this,arguments)};var ve=!1;function Fe(){if(!ve){if(vt.throwDeprecation)throw new Error(Ce);vt.traceDeprecation?console.trace(Ce):console.error(Ce),ve=!0}return ce.apply(this,arguments)}return Fe};var Ct={},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(ce){if(ce=ce.toUpperCase(),!Ct[ce])if(St.test(ce)){var Ce=vt.pid;Ct[ce]=function(){var ve=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",ce,Ce,ve)}}else Ct[ce]=function(){};return Ct[ce]};function mt(ce,Ce){var ve={seen:[],stylize:ft};return arguments.length>=3&&(ve.depth=arguments[2]),arguments.length>=4&&(ve.colors=arguments[3]),At(Ce)?ve.showHidden=Ce:Ce&&Bt._extend(ve,Ce),Ht(ve.showHidden)&&(ve.showHidden=!1),Ht(ve.depth)&&(ve.depth=2),Ht(ve.colors)&&(ve.colors=!1),Ht(ve.customInspect)&&(ve.customInspect=!0),ve.colors&&(ve.stylize=xt),tt(ve,ce,ve.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(ce,Ce){var ve=mt.styles[Ce];return ve?"\x1B["+mt.colors[ve][0]+"m"+ce+"\x1B["+mt.colors[ve][1]+"m":ce}function ft(ce,Ce){return ce}function z(ce){var Ce={};return ce.forEach(function(ve,Fe){Ce[ve]=!0}),Ce}function tt(ce,Ce,ve){if(ce.customInspect&&Ce&&se(Ce.inspect)&&Ce.inspect!==Bt.inspect&&!(Ce.constructor&&Ce.constructor.prototype===Ce)){var Fe=Ce.inspect(ve,ce);return Nt(Fe)||(Fe=tt(ce,Fe,ve)),Fe}var ge=at(ce,Ce);if(ge)return ge;var xe=Object.keys(Ce),ee=z(xe);if(ce.showHidden&&(xe=Object.getOwnPropertyNames(Ce)),oe(Ce)&&(xe.indexOf("message")>=0||xe.indexOf("description")>=0))return it(Ce);if(xe.length===0){if(se(Ce)){var Kt=Ce.name?": "+Ce.name:"";return ce.stylize("[Function"+Kt+"]","special")}if(Yt(Ce))return ce.stylize(RegExp.prototype.toString.call(Ce),"regexp");if(Vt(Ce))return ce.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 re=Ce.name?": "+Ce.name:"";wt=" [Function"+re+"]"}if(Yt(Ce)&&(wt=" "+RegExp.prototype.toString.call(Ce)),Vt(Ce)&&(wt=" "+Date.prototype.toUTCString.call(Ce)),oe(Ce)&&(wt=" "+it(Ce)),xe.length===0&&(!Lt||Ce.length==0))return Xt[0]+wt+Xt[1];if(ve<0)return Yt(Ce)?ce.stylize(RegExp.prototype.toString.call(Ce),"regexp"):ce.stylize("[Object]","special");ce.seen.push(Ce);var It;return Lt?It=lt(ce,Ce,ve,ee,xe):It=xe.map(function(Rt){return ut(ce,Ce,ve,ee,Rt,Lt)}),ce.seen.pop(),dt(It,wt,Xt)}function at(ce,Ce){if(Ht(Ce))return ce.stylize("undefined","undefined");if(Nt(Ce)){var ve="'"+JSON.stringify(Ce).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ce.stylize(ve,"string")}if(jt(Ce))return ce.stylize(""+Ce,"number");if(At(Ce))return ce.stylize(""+Ce,"boolean");if(Dt(Ce))return ce.stylize("null","null")}function it(ce){return"["+Error.prototype.toString.call(ce)+"]"}function lt(ce,Ce,ve,Fe,ge){for(var xe=[],ee=0,Kt=Ce.length;ee<Kt;++ee)we(Ce,String(ee))?xe.push(ut(ce,Ce,ve,Fe,String(ee),!0)):xe.push("");return ge.forEach(function(wt){wt.match(/^\d+$/)||xe.push(ut(ce,Ce,ve,Fe,wt,!0))}),xe}function ut(ce,Ce,ve,Fe,ge,xe){var ee,Kt,wt;if(wt=Object.getOwnPropertyDescriptor(Ce,ge)||{value:Ce[ge]},wt.get?wt.set?Kt=ce.stylize("[Getter/Setter]","special"):Kt=ce.stylize("[Getter]","special"):wt.set&&(Kt=ce.stylize("[Setter]","special")),we(Fe,ge)||(ee="["+ge+"]"),Kt||(ce.seen.indexOf(wt.value)<0?(Dt(ve)?Kt=tt(ce,wt.value,null):Kt=tt(ce,wt.value,ve-1),Kt.indexOf(`
|
|
`)>-1&&(xe?Kt=Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`).slice(2):Kt=`
|
|
`+Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`))):Kt=ce.stylize("[Circular]","special")),Ht(ee)){if(xe&&ge.match(/^\d+$/))return Kt;ee=JSON.stringify(""+ge),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.slice(1,-1),ee=ce.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=ce.stylize(ee,"string"))}return ee+": "+Kt}function dt(ce,Ce,ve){var Fe=0,ge=ce.reduce(function(xe,ee){return Fe++,ee.indexOf(`
|
|
`)>=0&&Fe++,xe+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?ve[0]+(Ce===""?"":Ce+`
|
|
`)+" "+ce.join(`,
|
|
`)+" "+ve[1]:ve[0]+Ce+" "+ce.join(", ")+" "+ve[1]}Bt.types=ot("./support/types");function Pt(ce){return Array.isArray(ce)}Bt.isArray=Pt;function At(ce){return typeof ce=="boolean"}Bt.isBoolean=At;function Dt(ce){return ce===null}Bt.isNull=Dt;function Ft(ce){return ce==null}Bt.isNullOrUndefined=Ft;function jt(ce){return typeof ce=="number"}Bt.isNumber=jt;function Nt(ce){return typeof ce=="string"}Bt.isString=Nt;function Gt(ce){return typeof ce=="symbol"}Bt.isSymbol=Gt;function Ht(ce){return ce===void 0}Bt.isUndefined=Ht;function Yt(ce){return Ut(ce)&&Se(ce)==="[object RegExp]"}Bt.isRegExp=Yt,Bt.types.isRegExp=Yt;function Ut(ce){return typeof ce=="object"&&ce!==null}Bt.isObject=Ut;function Vt(ce){return Ut(ce)&&Se(ce)==="[object Date]"}Bt.isDate=Vt,Bt.types.isDate=Vt;function oe(ce){return Ut(ce)&&(Se(ce)==="[object Error]"||ce instanceof Error)}Bt.isError=oe,Bt.types.isNativeError=oe;function se(ce){return typeof ce=="function"}Bt.isFunction=se;function de(ce){return ce===null||typeof ce=="boolean"||typeof ce=="number"||typeof ce=="string"||typeof ce=="symbol"||typeof ce=="undefined"}Bt.isPrimitive=de,Bt.isBuffer=ot("./support/isBuffer");function Se(ce){return Object.prototype.toString.call(ce)}function Qt(ce){return ce<10?"0"+ce.toString(10):ce.toString(10)}var ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ye(){var ce=new Date,Ce=[Qt(ce.getHours()),Qt(ce.getMinutes()),Qt(ce.getSeconds())].join(":");return[ce.getDate(),ne[ce.getMonth()],Ce].join(" ")}Bt.log=function(){console.log("%s - %s",ye(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(ce,Ce){if(!Ce||!Ut(Ce))return ce;for(var ve=Object.keys(Ce),Fe=ve.length;Fe--;)ce[ve[Fe]]=Ce[ve[Fe]];return ce};function we(ce,Ce){return Object.prototype.hasOwnProperty.call(ce,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 ve=Ce[be];if(typeof ve!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ve,be,{value:ve,enumerable:!1,writable:!1,configurable:!0}),ve}function ve(){for(var Fe,ge,xe=new Promise(function(wt,Lt){Fe=wt,ge=Lt}),ee=[],Kt=0;Kt<arguments.length;Kt++)ee.push(arguments[Kt]);ee.push(function(wt,Lt){wt?ge(wt):Fe(Lt)});try{Ce.apply(this,ee)}catch(wt){ge(wt)}return xe}return Object.setPrototypeOf(ve,Object.getPrototypeOf(Ce)),be&&Object.defineProperty(ve,be,{value:ve,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ve,gt(Ce))},Bt.promisify.custom=be;function fe(ce,Ce){if(!ce){var ve=new Error("Promise was rejected with a falsy value");ve.reason=ce,ce=ve}return Ce(ce)}function pe(ce){if(typeof ce!="function")throw new TypeError('The "original" argument must be of type Function');function Ce(){for(var ve=[],Fe=0;Fe<arguments.length;Fe++)ve.push(arguments[Fe]);var ge=ve.pop();if(typeof ge!="function")throw new TypeError("The last argument must be of type Function");var xe=this,ee=function(){return ge.apply(xe,arguments)};ce.apply(this,ve).then(function(Kt){vt.nextTick(ee.bind(null,null,Kt))},function(Kt){vt.nextTick(fe.bind(null,Kt,ee))})}return Object.setPrototypeOf(Ce,Object.getPrototypeOf(ce)),Object.defineProperties(Ce,gt(ce)),Ce}Bt.callbackify=pe}).call(this)}).call(this,ot("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("for-each"),Et=ot("available-typed-arrays"),Ct=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=Et(),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]=Ct(Ft.get)}}):gt(z,function(Pt){var At=new ft[Pt];lt["$"+Pt]=Ct(At.slice)});var ut=function(At){var Dt=!1;return gt(lt,function(Ft,jt){if(!Dt)try{"$"+Ft(At)===jt&&(Dt=tt(jt,1))}catch(Nt){}}),Dt},dt=function(At){var Dt=!1;return gt(lt,function(Ft,jt){if(!Dt)try{Ft(At),Dt=tt(jt,1)}catch(Nt){}}),Dt};zt.exports=function(At){if(!At||typeof At!="object")return!1;if(!xt){var Dt=tt(mt(At),8,-1);return it(z,Dt)>-1?Dt:Dt!=="Object"?!1:dt(At)}return Tt?ut(At):null}}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(ot,zt,Bt){(function(){"use strict";Bt.stripBOM=function(vt){return vt[0]==="\uFEFF"?vt.substring(1):vt}}).call(this)},{}],422:[function(ot,zt,Bt){(function(){"use strict";var vt,gt,Et,Ct,St,Tt={}.hasOwnProperty;vt=ot("xmlbuilder"),gt=ot("./defaults").defaults,Ct=function(mt){return typeof mt=="string"&&(mt.indexOf("&")>=0||mt.indexOf(">")>=0||mt.indexOf("<")>=0)},St=function(mt){return"<![CDATA["+Et(mt)+"]]>"},Et=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&&Ct(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&&Ct(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&&Ct(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&&Ct(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,zt,Bt){(function(){Bt.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(ot,zt,Bt){(function(){"use strict";var vt,gt,Et,Ct,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"),Ct=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},Et=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||Et(ut,dt,[ut[dt]]),ut[dt].push(Pt)):this.options.explicitArray?Et(ut,dt,[Pt]):Et(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,Ht,Yt;if(Gt={},Gt[dt]="",!Dt.options.ignoreAttrs){Yt=Ft.attributes;for(jt in Yt)at.call(Yt,jt)&&(!(ut in Gt)&&!Dt.options.mergeAttrs&&(Gt[ut]={}),Nt=Dt.options.attrValueProcessors?Tt(Dt.options.attrValueProcessors,Ft.attributes[jt],jt):Ft.attributes[jt],Ht=Dt.options.attrNameProcessors?Tt(Dt.options.attrNameProcessors,jt):jt,Dt.options.mergeAttrs?Dt.assignOrPush(Gt,Ht,Nt):Et(Gt[ut],Ht,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,Ht,Yt,Ut,Vt,oe,se;if(Yt=At.pop(),Ht=Yt["#name"],(!Dt.options.explicitChildren||!Dt.options.preserveChildrenOrder)&&delete Yt["#name"],Yt.cdata===!0&&(Ft=Yt.cdata,delete Yt.cdata),oe=At[At.length-1],Yt[dt].match(/^\s*$/)&&!Ft?(jt=Yt[dt],delete Yt[dt]):(Dt.options.trim&&(Yt[dt]=Yt[dt].trim()),Dt.options.normalize&&(Yt[dt]=Yt[dt].replace(/\s{2,}/g," ").trim()),Yt[dt]=Dt.options.valueProcessors?Tt(Dt.options.valueProcessors,Yt[dt],Ht):Yt[dt],Object.keys(Yt).length===1&&dt in Yt&&!Dt.EXPLICIT_CHARKEY&&(Yt=Yt[dt])),St(Yt)&&(typeof Dt.options.emptyTag=="function"?Yt=Dt.options.emptyTag():Yt=Dt.options.emptyTag!==""?Dt.options.emptyTag:jt),Dt.options.validator!=null&&(se="/"+function(){var de,Se,Qt;for(Qt=[],de=0,Se=At.length;de<Se;de++)Gt=At[de],Qt.push(Gt["#name"]);return Qt}().concat(Ht).join("/"),function(){var de;try{return Yt=Dt.options.validator(se,oe&&oe[Ht],Yt)}catch(Se){return de=Se,Dt.emit("error",de)}}()),Dt.options.explicitChildren&&!Dt.options.mergeAttrs&&typeof Yt=="object"){if(!Dt.options.preserveChildrenOrder)Gt={},Dt.options.attrkey in Yt&&(Gt[Dt.options.attrkey]=Yt[Dt.options.attrkey],delete Yt[Dt.options.attrkey]),!Dt.options.charsAsChildren&&Dt.options.charkey in Yt&&(Gt[Dt.options.charkey]=Yt[Dt.options.charkey],delete Yt[Dt.options.charkey]),Object.getOwnPropertyNames(Yt).length>0&&(Gt[Dt.options.childkey]=Yt),Yt=Gt;else if(oe){oe[Dt.options.childkey]=oe[Dt.options.childkey]||[],Ut={};for(Nt in Yt)at.call(Yt,Nt)&&Et(Ut,Nt,Yt[Nt]);oe[Dt.options.childkey].push(Ut),delete Yt["#name"],Object.keys(Yt).length===1&&dt in Yt&&!Dt.EXPLICIT_CHARKEY&&(Yt=Yt[dt])}}return At.length>0?Dt.assignOrPush(oe,Ht,Yt):(Dt.options.explicitRoot&&(Vt=Yt,Yt={},Et(Yt,Ht,Vt)),Dt.resultObject=Yt,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}(Ct),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,zt,Bt){(function(){"use strict";var vt;vt=new RegExp(/(?!xmlns)^.*:/),Bt.normalize=function(gt){return gt.toLowerCase()},Bt.firstCharLowerCase=function(gt){return gt.charAt(0).toLowerCase()+gt.slice(1)},Bt.stripPrefix=function(gt){return gt.replace(vt,"")},Bt.parseNumbers=function(gt){return isNaN(gt)||(gt=gt%1===0?parseInt(gt,10):parseFloat(gt)),gt},Bt.parseBooleans=function(gt){return/^(?:true|false)$/i.test(gt)&&(gt=gt.toLowerCase()==="true"),gt}}).call(this)},{}],426:[function(ot,zt,Bt){(function(){"use strict";var vt,gt,Et,Ct,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"),Et=ot("./parser"),Ct=ot("./processors"),Bt.defaults=gt.defaults,Bt.processors=Ct,Bt.ValidationError=function(mt){St(xt,mt);function xt(ft){this.message=ft}return xt}(Error),Bt.Builder=vt.Builder,Bt.Parser=Et.Parser,Bt.parseString=Et.parseString,Bt.parseStringPromise=Et.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ot,zt,Bt){(function(){zt.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ot,zt,Bt){(function(){zt.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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")},Et=function(z){return St(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ct=function(z){var tt;if(Et(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},zt.exports.assign=vt,zt.exports.isFunction=St,zt.exports.isObject=Tt,zt.exports.isArray=Et,zt.exports.isEmpty=Ct,zt.exports.isPlainObject=mt,zt.exports.getValue=gt}).call(this)},{}],430:[function(ot,zt,Bt){(function(){zt.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ot,zt,Bt){(function(){var vt,gt,Et;vt=ot("./NodeType"),Et=ot("./XMLNode"),zt.exports=gt=function(){function Ct(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(Ct.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ct.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ct.prototype,"textContent",{get:function(){return this.value},set:function(St){return this.value=St||""}}),Object.defineProperty(Ct.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ct.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ct.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ct.prototype,"specified",{get:function(){return!0}}),Ct.prototype.clone=function(){return Object.create(this)},Ct.prototype.toString=function(St){return this.options.writer.attribute(this,this.options.writer.filterOptions(St))},Ct.prototype.debugInfo=function(St){return St=St||this.name,St==null?"parent: <"+this.parent.name+">":"attribute: {"+St+"}, parent: <"+this.parent.name+">"},Ct.prototype.isEqualNode=function(St){return!(St.namespaceURI!==this.namespaceURI||St.prefix!==this.prefix||St.localName!==this.localName||St.value!==this.value)},Ct}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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"),Et=ot("./XMLCharacterData"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=vt.CData,this.value=this.stringify.cdata(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.cdata(this,this.options.writer.filterOptions(xt))},mt}(Et)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ot,zt,Bt){(function(){var vt,gt,Et=function(St,Tt){for(var mt in Tt)Ct.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},Ct={}.hasOwnProperty;gt=ot("./XMLNode"),zt.exports=vt=function(St){Et(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,zt,Bt){(function(){var vt,gt,Et,Ct=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"),zt.exports=Et=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=vt.Comment,this.value=this.stringify.comment(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.comment(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ot,zt,Bt){(function(){var vt,gt,Et;gt=ot("./XMLDOMErrorHandler"),Et=ot("./XMLDOMStringList"),zt.exports=vt=function(){function Ct(){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(Ct.prototype,"parameterNames",{get:function(){return new Et(Object.keys(this.defaultParams))}}),Ct.prototype.getParameter=function(St){return this.params.hasOwnProperty(St)?this.params[St]:null},Ct.prototype.canSetParameter=function(St,Tt){return!0},Ct.prototype.setParameter=function(St,Tt){return Tt!=null?this.params[St]=Tt:delete this.params[St]},Ct}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(){}return gt.prototype.handleError=function(Et){throw new Error(Et)},gt}()}).call(this)},{}],437:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(){}return gt.prototype.hasFeature=function(Et,Ct){return!0},gt.prototype.createDocumentType=function(Et,Ct,St){throw new Error("This DOM method is not implemented.")},gt.prototype.createDocument=function(Et,Ct,St){throw new Error("This DOM method is not implemented.")},gt.prototype.createHTMLDocument=function(Et){throw new Error("This DOM method is not implemented.")},gt.prototype.getFeature=function(Et,Ct){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],438:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(Et){this.arr=Et||[]}return Object.defineProperty(gt.prototype,"length",{get:function(){return this.arr.length}}),gt.prototype.item=function(Et){return this.arr[Et]||null},gt.prototype.contains=function(Et){return this.arr.indexOf(Et)!==-1},gt}()}).call(this)},{}],439:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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;Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z,tt,at,it){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(ft));if(!tt)throw new Error("Missing DTD attribute type. "+this.debugInfo(ft));if(!at)throw new Error("Missing DTD attribute default. "+this.debugInfo(ft));if(at.indexOf("#")!==0&&(at="#"+at),!at.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(ft));if(it&&!at.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(ft));this.elementName=this.stringify.name(ft),this.type=vt.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(tt),it&&(this.defaultValue=this.stringify.dtdAttDefault(it)),this.defaultValueType=at}return mt.prototype.toString=function(xt){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xt))},mt}(Et)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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;Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(ft),this.type=vt.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return mt.prototype.toString=function(xt){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xt))},mt}(Et)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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;Ct=ot("./Utility").isObject,Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.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,!Ct(at))this.value=this.stringify.dtdEntityValue(at),this.internal=!0;else{if(!at.pubID&&!at.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(tt));if(at.pubID&&!at.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(tt));if(this.internal=!1,at.pubID!=null&&(this.pubID=this.stringify.dtdPubID(at.pubID)),at.sysID!=null&&(this.sysID=this.stringify.dtdSysID(at.sysID)),at.nData!=null&&(this.nData=this.stringify.dtdNData(at.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(tt))}}return Object.defineProperty(xt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xt.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xt.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xt.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlVersion",{get:function(){return null}}),xt.prototype.toString=function(ft){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(ft))},xt}(Et)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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;Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD notation name. "+this.debugInfo(ft));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(ft));this.name=this.stringify.name(ft),this.type=vt.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(mt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(mt.prototype,"systemId",{get:function(){return this.sysID}}),mt.prototype.toString=function(xt){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xt))},mt}(Et)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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;Ct=ot("./Utility").isObject,Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(mt){St(xt,mt);function xt(ft,z,tt,at){var it;xt.__super__.constructor.call(this,ft),Ct(z)&&(it=z,z=it.version,tt=it.encoding,at=it.standalone),z||(z="1.0"),this.type=vt.Declaration,this.version=this.stringify.xmlVersion(z),tt!=null&&(this.encoding=this.stringify.xmlEncoding(tt)),at!=null&&(this.standalone=this.stringify.xmlStandalone(at))}return xt.prototype.toString=function(ft){return this.options.writer.declaration(this,this.options.writer.filterOptions(ft))},xt}(Et)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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"),Ct=ot("./XMLDTDEntity"),Et=ot("./XMLDTDElement"),St=ot("./XMLDTDNotation"),mt=ot("./XMLNamedNodeMap"),zt.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 Et(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 Ct(this,!1,lt,ut),this.children.push(dt),this},it.prototype.pEntity=function(lt,ut){var dt;return dt=new Ct(this,!0,lt,ut),this.children.push(dt),this},it.prototype.notation=function(lt,ut){var dt;return dt=new 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,zt,Bt){(function(){var vt,gt,Et,Ct,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,Et=ot("./XMLDOMImplementation"),gt=ot("./XMLDOMConfiguration"),St=ot("./XMLNode"),vt=ot("./NodeType"),mt=ot("./XMLStringifier"),Tt=ot("./XMLStringWriter"),zt.exports=Ct=function(tt){ft(at,tt);function at(it){at.__super__.constructor.call(this,null),this.name="#document",this.type=vt.Document,this.documentURI=null,this.domConfig=new gt,it||(it={}),it.writer||(it.writer=new Tt),this.options=it,this.stringify=new mt(it)}return Object.defineProperty(at.prototype,"implementation",{value:new Et}),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,zt,Bt){(function(){var vt,gt,Et,Ct,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Ht,Yt={}.hasOwnProperty;Ht=ot("./Utility"),Nt=Ht.isObject,jt=Ht.isFunction,Gt=Ht.isPlainObject,Ft=Ht.getValue,vt=ot("./NodeType"),at=ot("./XMLDocument"),lt=ot("./XMLElement"),Ct=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"),Et=ot("./XMLAttribute"),At=ot("./XMLStringifier"),Pt=ot("./XMLStringWriter"),gt=ot("./WriterState"),zt.exports=it=function(){function Ut(Vt,oe,se){var de;this.name="?xml",this.type=vt.Document,Vt||(Vt={}),de={},Vt.writer?Gt(Vt.writer)&&(de=Vt.writer,Vt.writer=new Pt):Vt.writer=new Pt,this.options=Vt,this.writer=Vt.writer,this.writerOptions=this.writer.filterOptions(de),this.stringify=new At(Vt),this.onDataCallback=oe||function(){},this.onEndCallback=se||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ut.prototype.createChildNode=function(Vt){var oe,se,de,Se,Qt,ne,ye,we;switch(Vt.type){case vt.CData:this.cdata(Vt.value);break;case vt.Comment:this.comment(Vt.value);break;case vt.Element:de={},ye=Vt.attribs;for(se in ye)Yt.call(ye,se)&&(oe=ye[se],de[se]=oe.value);this.node(Vt.name,de);break;case vt.Dummy:this.dummy();break;case vt.Raw:this.raw(Vt.value);break;case vt.Text:this.text(Vt.value);break;case vt.ProcessingInstruction:this.instruction(Vt.target,Vt.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Vt.constructor.name)}for(we=Vt.children,Qt=0,ne=we.length;Qt<ne;Qt++)Se=we[Qt],this.createChildNode(Se),Se.type===vt.Element&&this.up();return this},Ut.prototype.dummy=function(){return this},Ut.prototype.node=function(Vt,oe,se){var de;if(Vt==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Vt));return this.openCurrent(),Vt=Ft(Vt),oe==null&&(oe={}),oe=Ft(oe),Nt(oe)||(de=[oe,se],se=de[0],oe=de[1]),this.currentNode=new lt(this,Vt,oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,se!=null&&this.text(se),this},Ut.prototype.element=function(Vt,oe,se){var de,Se,Qt,ne,ye,we;if(this.currentNode&&this.currentNode.type===vt.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Vt)||Nt(Vt)||jt(Vt))for(ne=this.options.noValidation,this.options.noValidation=!0,we=new at(this.options).element("TEMP_ROOT"),we.element(Vt),this.options.noValidation=ne,ye=we.children,Se=0,Qt=ye.length;Se<Qt;Se++)de=ye[Se],this.createChildNode(de),de.type===vt.Element&&this.up();else this.node(Vt,oe,se);return this},Ut.prototype.attribute=function(Vt,oe){var se,de;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Vt));if(Vt!=null&&(Vt=Ft(Vt)),Nt(Vt))for(se in Vt)Yt.call(Vt,se)&&(de=Vt[se],this.attribute(se,de));else jt(oe)&&(oe=oe.apply()),this.options.keepNullAttributes&&oe==null?this.currentNode.attribs[Vt]=new Et(this,Vt,""):oe!=null&&(this.currentNode.attribs[Vt]=new Et(this,Vt,oe));return this},Ut.prototype.text=function(Vt){var oe;return this.openCurrent(),oe=new Dt(this,Vt),this.onData(this.writer.text(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.cdata=function(Vt){var oe;return this.openCurrent(),oe=new Ct(this,Vt),this.onData(this.writer.cdata(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.comment=function(Vt){var oe;return this.openCurrent(),oe=new St(this,Vt),this.onData(this.writer.comment(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.raw=function(Vt){var oe;return this.openCurrent(),oe=new dt(this,Vt),this.onData(this.writer.raw(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.instruction=function(Vt,oe){var se,de,Se,Qt,ne;if(this.openCurrent(),Vt!=null&&(Vt=Ft(Vt)),oe!=null&&(oe=Ft(oe)),Array.isArray(Vt))for(se=0,Qt=Vt.length;se<Qt;se++)de=Vt[se],this.instruction(de);else if(Nt(Vt))for(de in Vt)Yt.call(Vt,de)&&(Se=Vt[de],this.instruction(de,Se));else jt(oe)&&(oe=oe.apply()),ne=new ut(this,Vt,oe),this.onData(this.writer.processingInstruction(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ut.prototype.declaration=function(Vt,oe,se){var de;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return de=new z(this,Vt,oe,se),this.onData(this.writer.declaration(de,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.doctype=function(Vt,oe,se){if(this.openCurrent(),Vt==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new tt(this,oe,se),this.currentNode.rootNodeName=Vt,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ut.prototype.dtdElement=function(Vt,oe){var se;return this.openCurrent(),se=new mt(this,Vt,oe),this.onData(this.writer.dtdElement(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.attList=function(Vt,oe,se,de,Se){var Qt;return this.openCurrent(),Qt=new Tt(this,Vt,oe,se,de,Se),this.onData(this.writer.dtdAttList(Qt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.entity=function(Vt,oe){var se;return this.openCurrent(),se=new xt(this,!1,Vt,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.pEntity=function(Vt,oe){var se;return this.openCurrent(),se=new xt(this,!0,Vt,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.notation=function(Vt,oe){var se;return this.openCurrent(),se=new ft(this,Vt,oe),this.onData(this.writer.dtdNotation(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},Ut.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ut.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ut.prototype.openNode=function(Vt){var oe,se,de,Se;if(!Vt.isOpen){if(!this.root&&this.currentLevel===0&&Vt.type===vt.Element&&(this.root=Vt),se="",Vt.type===vt.Element){this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"<"+Vt.name,Se=Vt.attribs;for(de in Se)Yt.call(Se,de)&&(oe=Se[de],se+=this.writer.attribute(oe,this.writerOptions,this.currentLevel));se+=(Vt.children?">":"/>")+this.writer.endline(Vt,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.InsideTag}else this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Vt.rootNodeName,Vt.pubID&&Vt.sysID?se+=' PUBLIC "'+Vt.pubID+'" "'+Vt.sysID+'"':Vt.sysID&&(se+=' SYSTEM "'+Vt.sysID+'"'),Vt.children?(se+=" [",this.writerOptions.state=gt.InsideTag):(this.writerOptions.state=gt.CloseTag,se+=">"),se+=this.writer.endline(Vt,this.writerOptions,this.currentLevel);return this.onData(se,this.currentLevel),Vt.isOpen=!0}},Ut.prototype.closeNode=function(Vt){var oe;if(!Vt.isClosed)return oe="",this.writerOptions.state=gt.CloseTag,Vt.type===vt.Element?oe=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"</"+Vt.name+">"+this.writer.endline(Vt,this.writerOptions,this.currentLevel):oe=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Vt,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.None,this.onData(oe,this.currentLevel),Vt.isClosed=!0},Ut.prototype.onData=function(Vt,oe){return this.documentStarted=!0,this.onDataCallback(Vt,oe+1)},Ut.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ut.prototype.debugInfo=function(Vt){return Vt==null?"":"node: <"+Vt+">"},Ut.prototype.ele=function(){return this.element.apply(this,arguments)},Ut.prototype.nod=function(Vt,oe,se){return this.node(Vt,oe,se)},Ut.prototype.txt=function(Vt){return this.text(Vt)},Ut.prototype.dat=function(Vt){return this.cdata(Vt)},Ut.prototype.com=function(Vt){return this.comment(Vt)},Ut.prototype.ins=function(Vt,oe){return this.instruction(Vt,oe)},Ut.prototype.dec=function(Vt,oe,se){return this.declaration(Vt,oe,se)},Ut.prototype.dtd=function(Vt,oe,se){return this.doctype(Vt,oe,se)},Ut.prototype.e=function(Vt,oe,se){return this.element(Vt,oe,se)},Ut.prototype.n=function(Vt,oe,se){return this.node(Vt,oe,se)},Ut.prototype.t=function(Vt){return this.text(Vt)},Ut.prototype.d=function(Vt){return this.cdata(Vt)},Ut.prototype.c=function(Vt){return this.comment(Vt)},Ut.prototype.r=function(Vt){return this.raw(Vt)},Ut.prototype.i=function(Vt,oe){return this.instruction(Vt,oe)},Ut.prototype.att=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.a=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.ent=function(Vt,oe){return this.entity(Vt,oe)},Ut.prototype.pent=function(Vt,oe){return this.pEntity(Vt,oe)},Ut.prototype.not=function(Vt,oe){return this.notation(Vt,oe)},Ut}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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;Et=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt){mt.__super__.constructor.call(this,xt),this.type=vt.Dummy}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return""},mt}(Et)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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"),Ct=ot("./XMLNamedNodeMap"),zt.exports=Et=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 Ct(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,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(Et){this.nodes=Et}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(Et){return this.nodes[Et]},gt.prototype.setNamedItem=function(Et){var Ct;return Ct=this.nodes[Et.nodeName],this.nodes[Et.nodeName]=Et,Ct||null},gt.prototype.removeNamedItem=function(Et){var Ct;return Ct=this.nodes[Et],delete this.nodes[Et],Ct||null},gt.prototype.item=function(Et){return this.nodes[Object.keys(this.nodes)[Et]]||null},gt.prototype.getNamedItemNS=function(Et,Ct){throw new Error("This DOM method is not implemented.")},gt.prototype.setNamedItemNS=function(Et){throw new Error("This DOM method is not implemented.")},gt.prototype.removeNamedItemNS=function(Et,Ct){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],450:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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,Et=null,Ct=null,St=null,Tt=null,it=null,lt=null,at=null,mt=null,gt=null,tt=null,ft=null,vt=null,zt.exports=z=function(){function jt(Nt){this.parent=Nt,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,xt||(xt=ot("./XMLElement"),Et=ot("./XMLCData"),Ct=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,Ht,Yt,Ut;if(this.nodeType===gt.Element||this.nodeType===gt.DocumentFragment){for(Ut="",Yt=this.children,Gt=0,Ht=Yt.length;Gt<Ht;Gt++)Nt=Yt[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,Ht,Yt,Ut,Vt;for(this.parent=Nt,Nt&&(this.options=Nt.options,this.stringify=Nt.stringify),Ut=this.children,Vt=[],Ht=0,Yt=Ut.length;Ht<Yt;Ht++)Gt=Ut[Ht],Vt.push(Gt.setParent(this));return Vt},jt.prototype.element=function(Nt,Gt,Ht){var Yt,Ut,Vt,oe,se,de,Se,Qt,ne,ye,we;if(de=null,Gt===null&&Ht==null&&(ne=[{},null],Gt=ne[0],Ht=ne[1]),Gt==null&&(Gt={}),Gt=ut(Gt),At(Gt)||(ye=[Gt,Ht],Ht=ye[0],Gt=ye[1]),Nt!=null&&(Nt=ut(Nt)),Array.isArray(Nt))for(Vt=0,Se=Nt.length;Vt<Se;Vt++)Ut=Nt[Vt],de=this.element(Ut);else if(Pt(Nt))de=this.element(Nt.apply());else if(At(Nt)){for(se in Nt)if(Ft.call(Nt,se))if(we=Nt[se],Pt(we)&&(we=we.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&se.indexOf(this.stringify.convertAttKey)===0)de=this.attribute(se.substr(this.stringify.convertAttKey.length),we);else if(!this.options.separateArrayItems&&Array.isArray(we)&&dt(we))de=this.dummy();else if(At(we)&&dt(we))de=this.element(se);else if(!this.options.keepNullNodes&&we==null)de=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(we))for(oe=0,Qt=we.length;oe<Qt;oe++)Ut=we[oe],Yt={},Yt[se]=Ut,de=this.element(Yt);else At(we)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?de=this.element(we):(de=this.element(se),de.element(we)):de=this.element(se,we)}else!this.options.keepNullNodes&&Ht===null?de=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Nt.indexOf(this.stringify.convertTextKey)===0?de=this.text(Ht):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Nt.indexOf(this.stringify.convertCDataKey)===0?de=this.cdata(Ht):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Nt.indexOf(this.stringify.convertCommentKey)===0?de=this.comment(Ht):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Nt.indexOf(this.stringify.convertRawKey)===0?de=this.raw(Ht):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Nt.indexOf(this.stringify.convertPIKey)===0?de=this.instruction(Nt.substr(this.stringify.convertPIKey.length),Ht):de=this.node(Nt,Gt,Ht);if(de==null)throw new Error("Could not create any elements with: "+Nt+". "+this.debugInfo());return de},jt.prototype.insertBefore=function(Nt,Gt,Ht){var Yt,Ut,Vt,oe,se;if(Nt!=null&&Nt.type)return Vt=Nt,oe=Gt,Vt.setParent(this),oe?(Ut=children.indexOf(oe),se=children.splice(Ut),children.push(Vt),Array.prototype.push.apply(children,se)):children.push(Vt),Vt;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Nt));return Ut=this.parent.children.indexOf(this),se=this.parent.children.splice(Ut),Yt=this.parent.element(Nt,Gt,Ht),Array.prototype.push.apply(this.parent.children,se),Yt},jt.prototype.insertAfter=function(Nt,Gt,Ht){var Yt,Ut,Vt;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Nt));return Ut=this.parent.children.indexOf(this),Vt=this.parent.children.splice(Ut+1),Yt=this.parent.element(Nt,Gt,Ht),Array.prototype.push.apply(this.parent.children,Vt),Yt},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,Ht){var Yt,Ut;return Nt!=null&&(Nt=ut(Nt)),Gt||(Gt={}),Gt=ut(Gt),At(Gt)||(Ut=[Gt,Ht],Ht=Ut[0],Gt=Ut[1]),Yt=new xt(this,Nt,Gt),Ht!=null&&Yt.text(Ht),this.children.push(Yt),Yt},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 Et(this,Nt),this.children.push(Gt),this},jt.prototype.comment=function(Nt){var Gt;return Gt=new Ct(this,Nt),this.children.push(Gt),this},jt.prototype.commentBefore=function(Nt){var Gt,Ht,Yt;return Ht=this.parent.children.indexOf(this),Yt=this.parent.children.splice(Ht),Gt=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Yt),this},jt.prototype.commentAfter=function(Nt){var Gt,Ht,Yt;return Ht=this.parent.children.indexOf(this),Yt=this.parent.children.splice(Ht+1),Gt=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Yt),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 Ht,Yt,Ut,Vt,oe;if(Nt!=null&&(Nt=ut(Nt)),Gt!=null&&(Gt=ut(Gt)),Array.isArray(Nt))for(Vt=0,oe=Nt.length;Vt<oe;Vt++)Ht=Nt[Vt],this.instruction(Ht);else if(At(Nt))for(Ht in Nt)Ft.call(Nt,Ht)&&(Yt=Nt[Ht],this.instruction(Ht,Yt));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 Ht,Yt,Ut;return Yt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Yt),Ht=this.parent.instruction(Nt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.instructionAfter=function(Nt,Gt){var Ht,Yt,Ut;return Yt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Yt+1),Ht=this.parent.instruction(Nt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.declaration=function(Nt,Gt,Ht){var Yt,Ut;return Yt=this.document(),Ut=new St(Yt,Nt,Gt,Ht),Yt.children.length===0?Yt.children.unshift(Ut):Yt.children[0].type===gt.Declaration?Yt.children[0]=Ut:Yt.children.unshift(Ut),Yt.root()||Yt},jt.prototype.dtd=function(Nt,Gt){var Ht,Yt,Ut,Vt,oe,se,de,Se,Qt,ne;for(Yt=this.document(),Ut=new Tt(Yt,Nt,Gt),Qt=Yt.children,Vt=oe=0,de=Qt.length;oe<de;Vt=++oe)if(Ht=Qt[Vt],Ht.type===gt.DocType)return Yt.children[Vt]=Ut,Ut;for(ne=Yt.children,Vt=se=0,Se=ne.length;se<Se;Vt=++se)if(Ht=ne[Vt],Ht.isRoot)return Yt.children.splice(Vt,0,Ut),Ut;return Yt.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,Ht;return Nt=Nt||this.name,Nt==null&&!((Gt=this.parent)!=null&&Gt.name)?"":Nt==null?"parent: <"+this.parent.name+">":(Ht=this.parent)!=null&&Ht.name?"node: <"+Nt+">, parent: <"+this.parent.name+">":"node: <"+Nt+">"},jt.prototype.ele=function(Nt,Gt,Ht){return this.element(Nt,Gt,Ht)},jt.prototype.nod=function(Nt,Gt,Ht){return this.node(Nt,Gt,Ht)},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,Ht){return this.declaration(Nt,Gt,Ht)},jt.prototype.e=function(Nt,Gt,Ht){return this.element(Nt,Gt,Ht)},jt.prototype.n=function(Nt,Gt,Ht){return this.node(Nt,Gt,Ht)},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,Ht;return Gt=this,Gt===Nt?0:this.document()!==Nt.document()?(Ht=vt.Disconnected|vt.ImplementationSpecific,Math.random()<.5?Ht|=vt.Preceding:Ht|=vt.Following,Ht):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,Ht,Yt;if(Nt.nodeType!==this.nodeType||Nt.children.length!==this.children.length)return!1;for(Gt=Ht=0,Yt=this.children.length-1;0<=Yt?Ht<=Yt:Ht>=Yt;Gt=0<=Yt?++Ht:--Ht)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,Ht){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,Ht,Yt,Ut,Vt;for(Vt=this.children,Yt=0,Ut=Vt.length;Yt<Ut;Yt++)if(Gt=Vt[Yt],Nt===Gt||(Ht=Gt.isDescendant(Nt),Ht))return!0;return!1},jt.prototype.isAncestor=function(Nt){return Nt.isDescendant(this)},jt.prototype.isPreceding=function(Nt){var Gt,Ht;return Gt=this.treePosition(Nt),Ht=this.treePosition(this),Gt===-1||Ht===-1?!1:Gt<Ht},jt.prototype.isFollowing=function(Nt){var Gt,Ht;return Gt=this.treePosition(Nt),Ht=this.treePosition(this),Gt===-1||Ht===-1?!1:Gt>Ht},jt.prototype.treePosition=function(Nt){var Gt,Ht;return Ht=0,Gt=!1,this.foreachTreeNode(this.document(),function(Yt){if(Ht++,!Gt&&Yt===Nt)return Gt=!0}),Gt?Ht:-1},jt.prototype.foreachTreeNode=function(Nt,Gt){var Ht,Yt,Ut,Vt,oe;for(Nt||(Nt=this.document()),Vt=Nt.children,Yt=0,Ut=Vt.length;Yt<Ut;Yt++){if(Ht=Vt[Yt],oe=Gt(Ht))return oe;if(oe=this.foreachTreeNode(Ht,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,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(Et){this.nodes=Et}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(Et){return this.nodes[Et]||null},gt}()}).call(this)},{}],452:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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"),zt.exports=Et=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=vt.ProcessingInstruction,this.target=this.stringify.insTarget(ft),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xt))},mt.prototype.isEqualNode=function(xt){return!(!mt.__super__.isEqualNode.apply(this,arguments).isEqualNode(xt)||xt.target!==this.target)},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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"),zt.exports=Et=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=vt.Raw,this.value=this.stringify.raw(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.raw(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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"),Ct=ot("./XMLWriterBase"),gt=ot("./WriterState"),zt.exports=Et=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}(Ct)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ot,zt,Bt){(function(){var vt,gt,Et=function(St,Tt){for(var mt in Tt)Ct.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},Ct={}.hasOwnProperty;gt=ot("./XMLWriterBase"),zt.exports=vt=function(St){Et(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,zt,Bt){(function(){var vt,gt=function(Ct,St){return function(){return Ct.apply(St,arguments)}},Et={}.hasOwnProperty;zt.exports=vt=function(){function Ct(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)Et.call(mt,Tt)&&(xt=mt[Tt],this[Tt]=xt)}return Ct.prototype.name=function(St){return this.options.noValidation?St:this.assertLegalName(""+St||"")},Ct.prototype.text=function(St){return this.options.noValidation?St:this.assertLegalChar(this.textEscape(""+St||""))},Ct.prototype.cdata=function(St){return this.options.noValidation?St:(St=""+St||"",St=St.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(St))},Ct.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)},Ct.prototype.raw=function(St){return this.options.noValidation?St:""+St||""},Ct.prototype.attValue=function(St){return this.options.noValidation?St:this.assertLegalChar(this.attEscape(St=""+St||""))},Ct.prototype.insTarget=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.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)},Ct.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},Ct.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)},Ct.prototype.xmlStandalone=function(St){return this.options.noValidation?St:St?"yes":"no"},Ct.prototype.dtdPubID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdSysID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdElementValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdAttType=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdAttDefault=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdEntityValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.dtdNData=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},Ct.prototype.convertAttKey="@",Ct.prototype.convertPIKey="?",Ct.prototype.convertTextKey="#text",Ct.prototype.convertCDataKey="#cdata",Ct.prototype.convertCommentKey="#comment",Ct.prototype.convertRawKey="#raw",Ct.prototype.assertLegalChar=function(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},Ct.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},Ct.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,"
"))},Ct.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,"
"))},Ct}()}).call(this)},{}],457:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct=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"),zt.exports=Et=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=vt.Text,this.value=this.stringify.text(ft)}return Object.defineProperty(mt.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(mt.prototype,"wholeText",{get:function(){var xt,ft,z;for(z="",ft=this.previousSibling;ft;)z=ft.data+z,ft=ft.previousSibling;for(z+=this.data,xt=this.nextSibling;xt;)z=z+xt.data,xt=xt.nextSibling;return z}}),mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.text(this,this.options.writer.filterOptions(xt))},mt.prototype.splitText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt.prototype.replaceWholeText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ot,zt,Bt){(function(){var vt,gt,Et,Ct,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"),Et=ot("./XMLCData"),Ct=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"),zt.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,Ht,Yt,Ut,Vt,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=(Ht=Ft.offset)!=null?Ht:0,jt.dontPrettyTextNodes=(Yt=(Ut=Ft.dontPrettyTextNodes)!=null?Ut:Ft.dontprettytextnodes)!=null?Yt:0,jt.spaceBeforeSlash=(Vt=(oe=Ft.spaceBeforeSlash)!=null?oe:Ft.spacebeforeslash)!=null?Vt:"",jt.spaceBeforeSlash===!0&&(jt.spaceBeforeSlash=" "),jt.suppressPrettyCount=0,jt.user={},jt.state=gt.None,jt},Dt.prototype.indent=function(Ft,jt,Nt){var 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,Ht,Yt,Ut,Vt;if(Nt||(Nt=0),this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Ut=this.indent(Ft,jt,Nt),Ut+="<!DOCTYPE "+Ft.root().name,Ft.pubID&&Ft.sysID?Ut+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(Ut+=' SYSTEM "'+Ft.sysID+'"'),Ft.children.length>0){for(Ut+=" [",Ut+=this.endline(Ft,jt,Nt),jt.state=gt.InsideTag,Vt=Ft.children,Ht=0,Yt=Vt.length;Ht<Yt;Ht++)Gt=Vt[Ht],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,Ht,Yt,Ut,Vt,oe,se,de,Se,Qt,ne,ye,we,be;Nt||(Nt=0),Qt=!1,ne="",this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,ne+=this.indent(Ft,jt,Nt)+"<"+Ft.name,ye=Ft.attribs;for(Se in ye)At.call(ye,Se)&&(Gt=ye[Se],ne+=this.attribute(Gt,jt,Nt));if(Yt=Ft.children.length,Ut=Yt===0?null:Ft.children[0],Yt===0||Ft.children.every(function(fe){return(fe.type===vt.Text||fe.type===vt.Raw)&&fe.value===""}))jt.allowEmpty?(ne+=">",jt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,jt,Nt)):(jt.state=gt.CloseTag,ne+=jt.spaceBeforeSlash+"/>"+this.endline(Ft,jt,Nt));else if(jt.pretty&&Yt===1&&(Ut.type===vt.Text||Ut.type===vt.Raw)&&Ut.value!=null)ne+=">",jt.state=gt.InsideTag,jt.suppressPrettyCount++,Qt=!0,ne+=this.writeChildNode(Ut,jt,Nt+1),jt.suppressPrettyCount--,Qt=!1,jt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,jt,Nt);else{if(jt.dontPrettyTextNodes){for(we=Ft.children,Vt=0,se=we.length;Vt<se;Vt++)if(Ht=we[Vt],(Ht.type===vt.Text||Ht.type===vt.Raw)&&Ht.value!=null){jt.suppressPrettyCount++,Qt=!0;break}}for(ne+=">"+this.endline(Ft,jt,Nt),jt.state=gt.InsideTag,be=Ft.children,oe=0,de=be.length;oe<de;oe++)Ht=be[oe],ne+=this.writeChildNode(Ht,jt,Nt+1);jt.state=gt.CloseTag,ne+=this.indent(Ft,jt,Nt)+"</"+Ft.name+">",Qt&&jt.suppressPrettyCount--,ne+=this.endline(Ft,jt,Nt),jt.state=gt.None}return this.closeNode(Ft,jt,Nt),ne},Dt.prototype.writeChildNode=function(Ft,jt,Nt){switch(Ft.type){case vt.CData:return this.cdata(Ft,jt,Nt);case vt.Comment:return this.comment(Ft,jt,Nt);case vt.Element:return this.element(Ft,jt,Nt);case vt.Raw:return this.raw(Ft,jt,Nt);case vt.Text:return this.text(Ft,jt,Nt);case vt.ProcessingInstruction:return this.processingInstruction(Ft,jt,Nt);case vt.Dummy:return"";case vt.Declaration:return this.declaration(Ft,jt,Nt);case vt.DocType:return this.docType(Ft,jt,Nt);case vt.AttributeDeclaration:return this.dtdAttList(Ft,jt,Nt);case vt.ElementDeclaration:return this.dtdElement(Ft,jt,Nt);case vt.EntityDeclaration:return this.dtdEntity(Ft,jt,Nt);case vt.NotationDeclaration:return this.dtdNotation(Ft,jt,Nt);default:throw new Error("Unknown XML node type: "+Ft.constructor.name)}},Dt.prototype.processingInstruction=function(Ft,jt,Nt){var 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,zt,Bt){(function(){var vt,gt,Et,Ct,St,Tt,mt,xt,ft,z;z=ot("./Utility"),xt=z.assign,ft=z.isFunction,Et=ot("./XMLDOMImplementation"),Ct=ot("./XMLDocument"),St=ot("./XMLDocumentCB"),mt=ot("./XMLStringWriter"),Tt=ot("./XMLStreamWriter"),vt=ot("./NodeType"),gt=ot("./WriterState"),zt.exports.create=function(tt,at,it,lt){var ut,dt;if(tt==null)throw new Error("Root element needs a name.");return lt=xt({},at,it,lt),ut=new Ct(lt),dt=ut.element(tt),lt.headless||(ut.declaration(lt),(lt.pubID!=null||lt.sysID!=null)&&ut.dtd(lt)),dt},zt.exports.begin=function(tt,at,it){var lt;return ft(tt)&&(lt=[tt,at],at=lt[0],it=lt[1],tt={}),at?new St(tt,at,it):new Ct(tt)},zt.exports.stringWriter=function(tt){return new mt(tt)},zt.exports.streamWriter=function(tt,at){return new Tt(tt,at)},zt.exports.implementation=new Et,zt.exports.nodeType=vt,zt.exports.writerState=gt}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ot,zt,Bt){zt.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(){for(var Et={},Ct=0;Ct<arguments.length;Ct++){var St=arguments[Ct];for(var Tt in St)vt.call(St,Tt)&&(Et[Tt]=St[Tt])}return Et}},{}],461:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.slice.js");var vt=ot("buffer").Buffer,gt=ot("./sha"),Et=ot("./md5"),Ct={sha1:gt,md5:Et},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=Ct[z],it=[],lt=0;return at||ft("algorithm:",z,"is not yet supported"),{update:function(dt){return vt.isBuffer(dt)||(dt=vt.from(dt)),it.push(dt),lt+=dt.length,this},digest:function(dt){var 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,zt,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js");var vt=ot("buffer").Buffer,gt=4,Et=vt.alloc(gt);Et.fill(0);var Ct=8;function St(xt,ft){if(xt.length%gt!==0){var z=xt.length+(gt-xt.length%gt);xt=vt.concat([xt,Et],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*Ct);return Tt(at,z,tt)}zt.exports={hash:mt}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ot,zt,Bt){"use strict";var vt=ot("./helpers");function gt(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function Et(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 Ct(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 Ct(at&it|~at<,tt,at,ut,dt,Pt)}function Tt(tt,at,it,lt,ut,dt,Pt){return Ct(at<|it&~lt,tt,at,ut,dt,Pt)}function mt(tt,at,it,lt,ut,dt,Pt){return Ct(at^it^lt,tt,at,ut,dt,Pt)}function xt(tt,at,it,lt,ut,dt,Pt){return Ct(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}zt.exports=function(at){return vt.hash(at,Et,16)}},{"./helpers":462}],464:[function(ot,zt,Bt){"use strict";var vt=ot("./helpers");function gt(mt,xt){mt[xt>>5]|=128<<24-xt%32,mt[(xt+64>>9<<4)+15]=xt;for(var ft=Array(80),z=1732584193,tt=-271733879,at=-1732584194,it=271733878,lt=-1009589776,ut=0;ut<mt.length;ut+=16){for(var dt=z,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),Et(jt,tt,at,it)),St(St(lt,ft[jt]),Ct(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 Et(mt,xt,ft,z){return mt<20?xt&ft|~xt&z:mt<40?xt^ft^z:mt<60?xt&ft|xt&z|ft&z:xt^ft^z}function Ct(mt){return mt<20?1518500249:mt<40?1859775393:mt<60?-1894007588:-899497514}function 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}zt.exports=function(xt){return vt.hash(xt,gt,20,!0)}},{"./helpers":462}],465:[function(ot,zt,Bt){"use strict";zt.exports=function(){return function(){}}},{}],466:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),Et=gt(ot("@babel/runtime/helpers/typeof")),Ct=ot("stream"),St=Ct.Stream,Tt=ot("../lib/common/utils/isArray"),mt=Tt.isArray;zt.exports.string=function(z){return typeof z=="string"},zt.exports.array=mt,zt.exports.buffer=vt.isBuffer;function xt(ft){return ft instanceof St}zt.exports.writableStream=function(z){return xt(z)&&typeof z._write=="function"&&(0,Et.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ot("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(ot,zt,Bt){"use strict";var vt=ot("immediate"),gt=zt.exports={};gt.nextTick=vt,gt.title="browser",gt.browser=!0,gt.env={},gt.argv=[],gt.version="",gt.versions={};function Et(){}gt.on=Et,gt.addListener=Et,gt.once=Et,gt.off=Et,gt.removeListener=Et,gt.removeAllListeners=Et,gt.emit=Et,gt.prependListener=Et,gt.prependOnceListener=Et,gt.listeners=function(Ct){return[]},gt.binding=function(Ct){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(Ct){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},{immediate:358}],468:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js");var gt=ot("./lib/request"),Et=ot("./lib/response"),Ct=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=Ct(xt);var z=vt.location.protocol.search(/^https?:$/)===-1?"http:":"",tt=xt.protocol||z,at=xt.hostname||xt.host,it=xt.port,lt=xt.path||"/";at&&at.indexOf(":")!==-1&&(at="["+at+"]"),xt.url=(at?tt+"//"+at:"")+(it?":"+it:"")+lt,xt.method=(xt.method||"GET").toUpperCase(),xt.headers=xt.headers||{};var ut=new gt(xt);return ft&&ut.on("response",ft),ut},mt.get=function(ft,z){var tt=mt.request(ft,z);return tt.end(),tt},mt.ClientRequest=gt,mt.IncomingMessage=Et.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 gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array-buffer.constructor.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.array.slice.js"),Bt.fetch=mt(vt.fetch)&&mt(vt.ReadableStream),Bt.writableStream=mt(vt.WritableStream),Bt.abortController=mt(vt.AbortController),Bt.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Bt.blobConstructor=!0}catch(xt){}var gt;function Et(){if(gt!==void 0)return gt;if(vt.XMLHttpRequest){gt=new vt.XMLHttpRequest;try{gt.open("GET",vt.XDomainRequest?"/":"https://example.com")}catch(xt){gt=null}}else gt=null;return gt}function Ct(xt){var ft=Et();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&&Ct("arraybuffer"),Bt.msstream=!Bt.fetch&&Tt&&Ct("ms-stream"),Bt.mozchunkedarraybuffer=!Bt.fetch&&St&&Ct("moz-chunked-arraybuffer"),Bt.overrideMimeType=Bt.fetch||(Et()?mt(Et().overrideMimeType):!1),Bt.vbArray=mt(vt.VBArray);function mt(xt){return typeof xt=="function"}gt=null}).call(this)}).call(this,typeof gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(ot,zt,Bt){(function(vt,gt,Et){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js");var Ct=ot("./capability"),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 Ct.fetch&&dt?"fetch":Ct.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ct.msstream?"ms-stream":Ct.arraybuffer&&ut?"arraybuffer":Ct.vbArray&&ut?"text:vbarray":"text"}var at=zt.exports=function(ut){var dt=this;mt.Writable.call(dt),dt._opts=ut,dt._body=[],dt._headers={},ut.auth&&dt.setHeader("Authorization","Basic "+new Et(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&&!Ct.abortController)At=!1,Pt=!0;else if(ut.mode==="prefer-streaming")Pt=!1;else if(ut.mode==="allow-wrong-content-type")Pt=!Ct.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"&&(Ct.arraybuffer?At=xt(Et.concat(ut._body)):Ct.blobConstructor?At=new gt.Blob(ut._body.map(function(Ht){return xt(Ht)}),{type:(Pt["content-type"]||{}).value||""}):At=Et.concat(ut._body).toString());var Dt=[];if(Object.keys(Pt).forEach(function(Ht){var Yt=Pt[Ht].name,Ut=Pt[Ht].value;Array.isArray(Ut)?Ut.forEach(function(Vt){Dt.push([Yt,Vt])}):Dt.push([Yt,Ut])}),ut._mode==="fetch"){var Ft=null,jt=null;if(Ct.abortController){var Nt=new AbortController;Ft=Nt.signal,ut._fetchAbortController=Nt,"requestTimeout"in dt&&dt.requestTimeout!==0&&(ut._fetchTimer=gt.setTimeout(function(){ut.emit("requestTimeout"),ut._fetchAbortController&&ut._fetchAbortController.abort()},dt.requestTimeout))}gt.fetch(ut._opts.url,{method:ut._opts.method,headers:Dt,body:At||void 0,mode:"cors",credentials:dt.withCredentials?"include":"same-origin",signal:Ft}).then(function(Ht){ut._fetchResponse=Ht,ut._connect()},function(Ht){gt.clearTimeout(ut._fetchTimer),ut._destroyed||ut.emit("error",Ht)})}else{var Gt=ut._xhr=new gt.XMLHttpRequest;try{Gt.open(ut._opts.method,ut._opts.url,!0)}catch(Ht){vt.nextTick(function(){ut.emit("error",Ht)});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(Ht){Gt.setRequestHeader(Ht[0],Ht[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(Ht){vt.nextTick(function(){ut.emit("error",Ht)});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 gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(ot,zt,Bt){(function(vt,gt,Et){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js"),ot("core-js/modules/es.array.slice.js");var Ct=ot("./capability"),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 Et(jt.value)),Ft()}}).catch(function(jt){gt.clearTimeout(at),it._destroyed||it.emit("error",jt)})};if(it._fetchResponse=z,it.url=z.url,it.statusCode=z.status,it.statusMessage=z.statusText,z.headers.forEach(function(Ft,jt){it.headers[jt.toLowerCase()]=Ft,it.rawHeaders.push(jt,Ft)}),Ct.writableStream){var ut=new WritableStream({write:function(jt){return new Promise(function(Nt,Gt){it._destroyed?Gt():it.push(new Et(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",!Ct.overrideMimeType){var At=it.rawHeaders["mime-type"];if(At){var Dt=At.match(/;\s*charset=([^;])(;|$)/);Dt&&(it._charset=Dt[1].toLowerCase())}it._charset||(it._charset="utf-8")}}};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 Et(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 Et(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 Et(new Uint8Array(tt)));break;case"moz-chunked-arraybuffer":if(tt=z.response,z.readyState!==mt.LOADING||!tt)break;ft.push(new Et(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 Et(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 gn!="undefined"?gn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.splice.js");var Et=ot("punycode"),Ct=ot("./util");Bt.parse=jt,Bt.resolve=Gt,Bt.resolveObject=Ht,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(Yt,Ut,Vt){if(Yt&&Ct.isObject(Yt)&&Yt instanceof St)return Yt;var oe=new St;return oe.parse(Yt,Ut,Vt),oe}St.prototype.parse=function(Yt,Ut,Vt){if(!Ct.isString(Yt))throw new TypeError("Parameter 'url' must be a string, not "+(0,gt.default)(Yt));var oe=Yt.indexOf("?"),se=oe!==-1&&oe<Yt.indexOf("#")?"?":"#",de=Yt.split(se),Se=/\\/g;de[0]=de[0].replace(Se,"/"),Yt=de.join(se);var Qt=Yt;if(Qt=Qt.trim(),!Vt&&Yt.split("#").length===1){var ne=xt.exec(Qt);if(ne)return this.path=Qt,this.href=Qt,this.pathname=ne[1],ne[2]?(this.search=ne[2],Ut?this.query=Ft.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ut&&(this.search="",this.query={}),this}var ye=Tt.exec(Qt);if(ye){ye=ye[0];var we=ye.toLowerCase();this.protocol=we,Qt=Qt.substr(ye.length)}if(Vt||ye||Qt.match(/^\/\/[^@\/]+@[^@\/]+/)){var be=Qt.substr(0,2)==="//";be&&!(ye&&At[ye])&&(Qt=Qt.substr(2),this.slashes=!0)}if(!At[ye]&&(be||ye&&!Dt[ye])){for(var fe=-1,pe=0;pe<it.length;pe++){var ce=Qt.indexOf(it[pe]);ce!==-1&&(fe===-1||ce<fe)&&(fe=ce)}var Ce,ve;fe===-1?ve=Qt.lastIndexOf("@"):ve=Qt.lastIndexOf("@",fe),ve!==-1&&(Ce=Qt.slice(0,ve),Qt=Qt.slice(ve+1),this.auth=decodeURIComponent(Ce)),fe=-1;for(var pe=0;pe<at.length;pe++){var ce=Qt.indexOf(at[pe]);ce!==-1&&(fe===-1||ce<fe)&&(fe=ce)}fe===-1&&(fe=Qt.length),this.host=Qt.slice(0,fe),Qt=Qt.slice(fe),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,xe=ge.length;pe<xe;pe++){var ee=ge[pe];if(ee&&!ee.match(ut)){for(var Kt="",wt=0,Lt=ee.length;wt<Lt;wt++)ee.charCodeAt(wt)>127?Kt+="x":Kt+=ee[wt];if(!Kt.match(ut)){var Xt=ge.slice(0,pe),re=ge.slice(pe+1),It=ee.match(dt);It&&(Xt.push(It[1]),re.unshift(It[2])),re.length&&(Qt="/"+re.join(".")+Qt),this.hostname=Xt.join(".");break}}}this.hostname.length>lt?this.hostname="":this.hostname=this.hostname.toLowerCase(),Fe||(this.hostname=Et.toASCII(this.hostname));var Rt=this.port?":"+this.port:"",Wt=this.hostname||"";this.host=Wt+Rt,this.href+=this.host,Fe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Qt[0]!=="/"&&(Qt="/"+Qt))}if(!Pt[we])for(var pe=0,xe=tt.length;pe<xe;pe++){var te=tt[pe];if(Qt.indexOf(te)!==-1){var ue=encodeURIComponent(te);ue===te&&(ue=escape(te)),Qt=Qt.split(te).join(ue)}}var le=Qt.indexOf("#");le!==-1&&(this.hash=Qt.substr(le),Qt=Qt.slice(0,le));var Ae=Qt.indexOf("?");if(Ae!==-1?(this.search=Qt.substr(Ae),this.query=Qt.substr(Ae+1),Ut&&(this.query=Ft.parse(this.query)),Qt=Qt.slice(0,Ae)):Ut&&(this.search="",this.query={}),Qt&&(this.pathname=Qt),Dt[we]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Rt=this.pathname||"",Le=this.search||"";this.path=Rt+Le}return this.href=this.format(),this};function Nt(Yt){return Ct.isString(Yt)&&(Yt=jt(Yt)),Yt instanceof St?Yt.format():St.prototype.format.call(Yt)}St.prototype.format=function(){var Yt=this.auth||"";Yt&&(Yt=encodeURIComponent(Yt),Yt=Yt.replace(/%3A/i,":"),Yt+="@");var Ut=this.protocol||"",Vt=this.pathname||"",oe=this.hash||"",se=!1,de="";this.host?se=Yt+this.host:this.hostname&&(se=Yt+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(se+=":"+this.port)),this.query&&Ct.isObject(this.query)&&Object.keys(this.query).length&&(de=Ft.stringify(this.query));var Se=this.search||de&&"?"+de||"";return Ut&&Ut.substr(-1)!==":"&&(Ut+=":"),this.slashes||(!Ut||Dt[Ut])&&se!==!1?(se="//"+(se||""),Vt&&Vt.charAt(0)!=="/"&&(Vt="/"+Vt)):se||(se=""),oe&&oe.charAt(0)!=="#"&&(oe="#"+oe),Se&&Se.charAt(0)!=="?"&&(Se="?"+Se),Vt=Vt.replace(/[?#]/g,function(Qt){return encodeURIComponent(Qt)}),Se=Se.replace("#","%23"),Ut+se+Vt+Se+oe};function Gt(Yt,Ut){return jt(Yt,!1,!0).resolve(Ut)}St.prototype.resolve=function(Yt){return this.resolveObject(jt(Yt,!1,!0)).format()};function Ht(Yt,Ut){return Yt?jt(Yt,!1,!0).resolveObject(Ut):Ut}St.prototype.resolveObject=function(Yt){if(Ct.isString(Yt)){var Ut=new St;Ut.parse(Yt,!1,!0),Yt=Ut}for(var Vt=new St,oe=Object.keys(this),se=0;se<oe.length;se++){var de=oe[se];Vt[de]=this[de]}if(Vt.hash=Yt.hash,Yt.href==="")return Vt.href=Vt.format(),Vt;if(Yt.slashes&&!Yt.protocol){for(var Se=Object.keys(Yt),Qt=0;Qt<Se.length;Qt++){var ne=Se[Qt];ne!=="protocol"&&(Vt[ne]=Yt[ne])}return Dt[Vt.protocol]&&Vt.hostname&&!Vt.pathname&&(Vt.path=Vt.pathname="/"),Vt.href=Vt.format(),Vt}if(Yt.protocol&&Yt.protocol!==Vt.protocol){if(!Dt[Yt.protocol]){for(var ye=Object.keys(Yt),we=0;we<ye.length;we++){var be=ye[we];Vt[be]=Yt[be]}return Vt.href=Vt.format(),Vt}if(Vt.protocol=Yt.protocol,!Yt.host&&!At[Yt.protocol]){for(var xe=(Yt.pathname||"").split("/");xe.length&&!(Yt.host=xe.shift()););Yt.host||(Yt.host=""),Yt.hostname||(Yt.hostname=""),xe[0]!==""&&xe.unshift(""),xe.length<2&&xe.unshift(""),Vt.pathname=xe.join("/")}else Vt.pathname=Yt.pathname;if(Vt.search=Yt.search,Vt.query=Yt.query,Vt.host=Yt.host||"",Vt.auth=Yt.auth,Vt.hostname=Yt.hostname||Yt.host,Vt.port=Yt.port,Vt.pathname||Vt.search){var fe=Vt.pathname||"",pe=Vt.search||"";Vt.path=fe+pe}return Vt.slashes=Vt.slashes||Yt.slashes,Vt.href=Vt.format(),Vt}var ce=Vt.pathname&&Vt.pathname.charAt(0)==="/",Ce=Yt.host||Yt.pathname&&Yt.pathname.charAt(0)==="/",ve=Ce||ce||Vt.host&&Yt.pathname,Fe=ve,ge=Vt.pathname&&Vt.pathname.split("/")||[],xe=Yt.pathname&&Yt.pathname.split("/")||[],ee=Vt.protocol&&!Dt[Vt.protocol];if(ee&&(Vt.hostname="",Vt.port=null,Vt.host&&(ge[0]===""?ge[0]=Vt.host:ge.unshift(Vt.host)),Vt.host="",Yt.protocol&&(Yt.hostname=null,Yt.port=null,Yt.host&&(xe[0]===""?xe[0]=Yt.host:xe.unshift(Yt.host)),Yt.host=null),ve=ve&&(xe[0]===""||ge[0]==="")),Ce)Vt.host=Yt.host||Yt.host===""?Yt.host:Vt.host,Vt.hostname=Yt.hostname||Yt.hostname===""?Yt.hostname:Vt.hostname,Vt.search=Yt.search,Vt.query=Yt.query,ge=xe;else if(xe.length)ge||(ge=[]),ge.pop(),ge=ge.concat(xe),Vt.search=Yt.search,Vt.query=Yt.query;else if(!Ct.isNullOrUndefined(Yt.search)){if(ee){Vt.hostname=Vt.host=ge.shift();var Kt=Vt.host&&Vt.host.indexOf("@")>0?Vt.host.split("@"):!1;Kt&&(Vt.auth=Kt.shift(),Vt.host=Vt.hostname=Kt.shift())}return Vt.search=Yt.search,Vt.query=Yt.query,(!Ct.isNull(Vt.pathname)||!Ct.isNull(Vt.search))&&(Vt.path=(Vt.pathname?Vt.pathname:"")+(Vt.search?Vt.search:"")),Vt.href=Vt.format(),Vt}if(!ge.length)return Vt.pathname=null,Vt.search?Vt.path="/"+Vt.search:Vt.path=null,Vt.href=Vt.format(),Vt;for(var wt=ge.slice(-1)[0],Lt=(Vt.host||Yt.host||ge.length>1)&&(wt==="."||wt==="..")||wt==="",Xt=0,re=ge.length;re>=0;re--)wt=ge[re],wt==="."?ge.splice(re,1):wt===".."?(ge.splice(re,1),Xt++):Xt&&(ge.splice(re,1),Xt--);if(!ve&&!Fe)for(;Xt--;Xt)ge.unshift("..");ve&&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(ee){Vt.hostname=Vt.host=It?"":ge.length?ge.shift():"";var Kt=Vt.host&&Vt.host.indexOf("@")>0?Vt.host.split("@"):!1;Kt&&(Vt.auth=Kt.shift(),Vt.host=Vt.hostname=Kt.shift())}return ve=ve||Vt.host&&ge.length,ve&&!It&&ge.unshift(""),ge.length?Vt.pathname=ge.join("/"):(Vt.pathname=null,Vt.path=null),(!Ct.isNull(Vt.pathname)||!Ct.isNull(Vt.search))&&(Vt.path=(Vt.pathname?Vt.pathname:"")+(Vt.search?Vt.search:"")),Vt.auth=Yt.auth||Vt.auth,Vt.slashes=Vt.slashes||Yt.slashes,Vt.href=Vt.format(),Vt},St.prototype.parseHost=function(){var Yt=this.host,Ut=mt.exec(Yt);Ut&&(Ut=Ut[0],Ut!==":"&&(this.port=Ut.substr(1)),Yt=Yt.substr(0,Yt.length-Ut.length)),Yt&&(this.hostname=Yt)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));zt.exports={isString:function(Ct){return typeof Ct=="string"},isObject:function(Ct){return(0,gt.default)(Ct)==="object"&&Ct!==null},isNull:function(Ct){return Ct===null},isNullOrUndefined:function(Ct){return Ct==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.number.constructor.js"),Bt.encodeURIComponent=function(vt){try{return encodeURIComponent(vt)}catch(gt){return vt}},Bt.escape=ot("escape-html"),Bt.timestamp=function(gt){if(gt){var Et=gt;return typeof Et=="string"&&(Et=Number(Et)),String(gt).length===10&&(Et*=1e3),new Date(Et)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";var Et=ot("@babel/runtime/helpers/interopRequireDefault"),Ct=Et(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,Ct.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 Ht={requestId:Gt,url:Dt,args:Ft,ctx:Ft.ctx};Ft.emitter&&Ft.emitter.emit("request",Ht),Ft.timeout=Ft.timeout||Bt.TIMEOUTS,Ft.maxRedirects=Ft.maxRedirects||10,Ft.streaming=Ft.streaming||Ft.customResponse;var Yt=Date.now(),Ut;typeof Dt=="string"?(it.test(Dt)||(Dt="https://"+Dt),Ut=Tt.parse(Dt)):Ut=Dt;var Vt=(Ft.type||Ft.method||Ut.method||"GET").toUpperCase(),oe=Ut.port||80,se=mt,de=lt(Ft.agent,Bt.agent),Se=Ft.fixJSONCtlChars;Ut.protocol==="https:"&&(se=xt,de=lt(Ft.httpsAgent,Bt.httpsAgent),Ut.port||(oe=443));var Qt={host:Ut.hostname||Ut.host||"localhost",path:Ut.path||"/",method:Vt,port:oe,agent:de,headers:Ft.headers||{},lookup:Ft.lookup};Array.isArray(Ft.timeout)?Qt.requestTimeout=Ft.timeout[Ft.timeout.length-1]:typeof Ft.timeout!="undefined"&&(Qt.requestTimeout=Ft.timeout);var ne=Ft.auth||Ut.auth;ne&&(Qt.auth=ne);var ye=Ft.content||Ft.data,we=Vt==="GET"||Vt==="HEAD"||Ft.dataAsQueryString;if(!Ft.content&&ye&&!(typeof ye=="string"||gt.isBuffer(ye)))if(we)ye=Ft.nestedQuerystring?qs.stringify(ye):querystring.stringify(ye);else{var be=Qt.headers["Content-Type"]||Qt.headers["content-type"];be||(Ft.contentType==="json"?be="application/json":be="application/x-www-form-urlencoded",Qt.headers["Content-Type"]=be),ut(be)==="application/json"?ye=JSON.stringify(ye):ye=Ft.nestedQuerystring?qs.stringify(ye):querystring.stringify(ye)}we&&ye&&(Qt.path+=(Ut.query?"&":"?")+ye,ye=null);var fe=0;if(ye){var pe=ye.length;gt.isBuffer(ye)||(pe=gt.byteLength(ye)),fe=Qt.headers["Content-Length"]=pe}Ft.dataType==="json"&&(Qt.headers.Accept="application/json"),typeof Ft.beforeRequest=="function"&&Ft.beforeRequest(Qt);var ce=null,Ce=null,ve=null,Fe=!1,ge=!1,xe=0,ee=-1,Kt=!1,wt="",Lt="",Xt=null;Ft.timing&&(Xt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function re(){ce&&(clearTimeout(ce),ce=null)}function It(){Ce&&(clearTimeout(Ce),Ce=null)}function Rt(Ze,Ge,We){if(It(),!jt){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Gt,vt.pid,Qt.method,Dt),Ze&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Gt,vt.pid,Ze.name,Ze.message,Ze.stack);return}var Ke=jt;jt=null;var nn={};We&&(ee=We.statusCode,nn=We.headers);var hn=Date.now()-Yt;Xt&&(Xt.contentDownload=hn),ft("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",hn,xe,ee,Qt.method,Qt.host,Qt.path,ge,Xt);var un={status:ee,statusCode:ee,headers:nn,size:xe,aborted:Kt,rt:hn,keepAliveSocket:ge,data:Ge,requestUrls:Ft.requestUrls,timing:Xt,remoteAddress:wt,remotePort:Lt};if(Ze){var bn="";de&&typeof de.getCurrentStatus=="function"&&(bn=", agent status: "+JSON.stringify(de.getCurrentStatus())),Ze.message+=", "+Qt.method+" "+Dt+" "+ee+" (connected: "+Fe+", keepalive socket: "+ge+bn+`)
|
|
headers: `+JSON.stringify(nn),Ze.data=Ge,Ze.path=Qt.path,Ze.status=ee,Ze.headers=nn,Ze.res=un}Ke(Ze,Ge,Ft.streaming?We:un),Ft.emitter&&(Ht.url=Dt,Ht.socket=$e&&$e.connection,Ht.options=Qt,Ht.size=fe,Ft.emitter.emit("response",{requestId:Gt,error:Ze,ctx:Ft.ctx,req:Ht,res:un}))}function Wt(Ze){var Ge=null;if(Ft.followRedirect&&statuses.redirect[Ze.statusCode]){Ft._followRedirectCount=(Ft._followRedirectCount||0)+1;var We=Ze.headers.location;if(!We)Ge=new Error("Got statusCode "+Ze.statusCode+" but cannot resolve next location from headers"),Ge.name="FollowRedirectError";else if(Ft._followRedirectCount>Ft.maxRedirects)Ge=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Dt),Ge.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,Qt.path,Dt,Ke),It(),Ft.headers&&Ft.headers.Host&&it.test(We)&&(Ft.headers.Host=null);var nn=jt;return jt=null,Bt.requestWithCallback(Ke,Ft,nn),{redirect:!0,error:null}}}return{redirect:!1,error:Ge}}Ft.gzip&&!Qt.headers["Accept-Encoding"]&&!Qt.headers["accept-encoding"]&&(Qt.headers["Accept-Encoding"]="gzip");function te(Ze,Ge,We){var Ke=Ze.headers["content-encoding"];return We(null,Ge,Ke)}var ue=Ft.writeStream;ft("Request#%d %s %s with headers %j, options.path: %s",Gt,Vt,Dt,Qt.headers,Qt.path),Ft.requestUrls.push(Dt);function le(Ze){if(Xt&&(Xt.waiting=Date.now()-Yt),ft("Request#%d %s `req response` event emit: status %d, headers: %j",Gt,Dt,Ze.statusCode,Ze.headers),Ft.streaming){var Ge=Wt(Ze);if(Ge.redirect){Ze.resume();return}return Ge.error?(Ze.resume(),Rt(Ge.error,null,Ze)):Rt(null,null,Ze)}if(Ze.on("close",function(){ft("Request#%d %s: `res close` event emit, total size %d",Gt,Dt,xe)}),Ze.on("error",function(){ft("Request#%d %s: `res error` event emit, total size %d",Gt,Dt,xe)}),Ze.on("aborted",function(){Kt=!0,ft("Request#%d %s: `res aborted` event emit, total size %d",Gt,Dt,xe)}),ue){var We=Wt(Ze);if(We.redirect){Ze.resume();return}return We.error?(Ze.resume(),ue.end(),Rt(We.error,null,Ze)):(Ft.consumeWriteStream===!1?Ze.on("end",Rt.bind(null,null,null,Ze)):ue.on("close",function(){ft("Request#%d %s: writeStream close event emitted",Gt,Dt),Rt(ve||null,null,Ze)}),Ze.pipe(ue))}var Ke=[];Ze.on("data",function(nn){ft("Request#%d %s: `res data` event emit, size %d",Gt,Dt,nn.length),xe+=nn.length,Ke.push(nn)}),Ze.on("end",function(){var nn=gt.concat(Ke,xe);if(ft("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Gt,Dt,xe,Ze._dumped),ve)return Rt(ve,nn,Ze);var hn=Wt(Ze);if(hn.error)return Rt(hn.error,nn,Ze);hn.redirect||te(Ze,nn,function(un,bn,Un){if(un)return Rt(un,nn,Ze);if(!Un&&Pt.indexOf(Ft.dataType)>=0){try{bn=decodeBodyByCharset(bn,Ze)}catch(Yn){return ft("decodeBodyByCharset error: %s",Yn),Rt(null,bn,Ze)}if(Ft.dataType==="json")if(xe===0)bn=null;else{var Vn=parseJSON(bn,Se);Vn.error?un=Vn.error:bn=Vn.data}}Kt&&ft("Request#%d %s: Remote socket was terminated before `response.end()` was called",Gt,Dt),Rt(un,bn,Ze)})})}var Ae,Le;Array.isArray(Ft.timeout)?(Ae=z(Ft.timeout[0]),Le=z(Ft.timeout[1])):Ae=Le=z(Ft.timeout),ft("ConnectTimeout: %d, ResponseTimeout: %d",Ae,Le);function Be(){ft("Connect timer ticking, timeout: %d",Ae),ce=setTimeout(function(){ce=null,ee===-1&&(ee=-2);var Ze="Connect timeout for "+Ae+"ms",Ge="ConnectionTimeoutError";$e.socket||(Ge="SocketAssignTimeoutError",Ze+=", working sockets is full"),ve=new Error(Ze),ve.name=Ge,ve.requestId=Gt,ft("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,ve.name,Ze,Fe),Qe()},Ae)}function tn(){ft("Response timer ticking, timeout: %d",Le),Ce=setTimeout(function(){Ce=null;var Ze="Response timeout for "+Le+"ms",Ge="ResponseTimeoutError";ve=new Error(Ze),ve.name=Ge,ve.requestId=Gt,ft("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,ve.name,Ze,Fe),Qe()},Le)}var $e;Qt.mode=Ft.mode?Ft.mode:"";try{$e=se.request(Qt,le)}catch(Ze){return Rt(Ze)}typeof window=="undefined"?Be():$e.on("requestTimeout",function(){ee===-1&&(ee=-2);var Ze="Connect timeout for "+Ae+"ms",Ge="ConnectionTimeoutError";ve=new Error(Ze),ve.name=Ge,ve.requestId=Gt,Qe()});function Qe(){ft("Request#%d %s abort, connected: %s",Gt,Dt,Fe),$e.socket||(ve.noSocket=!0,Rt(ve)),$e.abort()}return Xt&&$e.on("finish",function(){Xt.requestSent=Date.now()-Yt}),$e.once("socket",function(Ze){Xt&&(Xt.queuing=Date.now()-Yt);var Ge=Ze.readyState;if(Ge==="opening"){Ze.once("lookup",function(We,Ke,nn){ft("Request#%d %s lookup: %s, %s, %s",Gt,Dt,We,Ke,nn),Xt&&(Xt.dnslookup=Date.now()-Yt),Ke&&(wt=Ke)}),Ze.once("connect",function(){Xt&&(Xt.connected=Date.now()-Yt),re(),tn(),ft("Request#%d %s new socket connected",Gt,Dt),Fe=!0,wt||(wt=Ze.remoteAddress),Lt=Ze.remotePort});return}ft("Request#%d %s reuse socket connected, readyState: %s",Gt,Dt,Ge),Fe=!0,ge=!0,wt||(wt=Ze.remoteAddress),Lt=Ze.remotePort,re(),tn()}),$e.on("error",function(Ze){(Ze.name==="Error"||Ze.name==="TypeError")&&(Ze.name=Fe?"ResponseError":"RequestError"),Ze.message+=' (req "error")',ft("Request#%d %s `req error` event emit, %s: %s",Gt,Dt,Ze.name,Ze.message),Rt(ve||Ze)}),ue&&ue.once("error",function(Ze){Ze.message+=' (writeStream "error")',ve=Ze,ft("Request#%d %s `writeStream error` event emit, %s: %s",Gt,Dt,Ze.name,Ze.message),Qe()}),Ft.stream?(Ft.stream.pipe($e),Ft.stream.once("error",function(Ze){Ze.message+=' (stream "error")',ve=Ze,ft("Request#%d %s `readStream error` event emit, %s: %s",Gt,Dt,Ze.name,Ze.message),Qe()})):$e.end(ye),$e.requestId=Gt,$e}}).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(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){ae.defineOption("placeholder","",function(Et,Ct,St){var Tt=St&&St!=ae.Init;if(Ct&&!Tt)Et.on("blur",Bt),Et.on("change",vt),Et.on("swapDoc",vt),ae.on(Et.getInputField(),"compositionupdate",Et.state.placeholderCompose=function(){zt(Et)}),vt(Et);else if(!Ct&&Tt){Et.off("blur",Bt),Et.off("change",vt),Et.off("swapDoc",vt),ae.off(Et.getInputField(),"compositionupdate",Et.state.placeholderCompose),Re(Et);var mt=Et.getWrapperElement();mt.className=mt.className.replace(" CodeMirror-empty","")}Ct&&!Et.hasFocus()&&Bt(Et)});function Re(Et){Et.state.placeholder&&(Et.state.placeholder.parentNode.removeChild(Et.state.placeholder),Et.state.placeholder=null)}function ot(Et){Re(Et);var Ct=Et.state.placeholder=document.createElement("pre");Ct.style.cssText="height: 0; overflow: visible",Ct.style.direction=Et.getOption("direction"),Ct.className="CodeMirror-placeholder CodeMirror-line-like";var St=Et.getOption("placeholder");typeof St=="string"&&(St=document.createTextNode(St)),Ct.appendChild(St),Et.display.lineSpace.insertBefore(Ct,Et.display.lineSpace.firstChild)}function zt(Et){setTimeout(function(){var Ct=!1,St=Et.getInputField();St.nodeName=="TEXTAREA"?Ct=!St.value:Et.lineCount()==1&&(Ct=!/[^\u200b]/.test(St.querySelector(".CodeMirror-line").textContent)),Ct?ot(Et):Re(Et)},20)}function Bt(Et){gt(Et)&&ot(Et)}function vt(Et){var Ct=Et.getWrapperElement(),St=gt(Et);Ct.className=Ct.className.replace(" CodeMirror-empty","")+(St?" CodeMirror-empty":""),St?ot(Et):Re(Et)}function gt(Et){return Et.lineCount()===1&&Et.getLine(0)===""}})},25717:function(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){var Re={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ot=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(z,tt,at){at&&at!=ae.Init&&(z.removeKeyMap(Bt),z.state.closeBrackets=null),tt&&(vt(zt(tt,"pairs")),z.state.closeBrackets=tt,z.addKeyMap(Bt))});function zt(z,tt){return tt=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[tt]!=null?z[tt]:Re[tt]}var Bt={Backspace:Ct,Enter: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 Et(z){var tt=z.state.closeBrackets;if(!tt||tt.override)return tt;var at=z.getModeAt(z.getCursor());return at.closeBrackets||tt}function Ct(z){var tt=Et(z);if(!tt||z.getOption("disableInput"))return ae.Pass;for(var at=zt(tt,"pairs"),it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}for(var lt=it.length-1;lt>=0;lt--){var dt=it[lt].head;z.replaceRange("",ot(dt.line,dt.ch-1),ot(dt.line,dt.ch+1),"+delete")}}function St(z){var tt=Et(z),at=tt&&zt(tt,"explode");if(!at||z.getOption("disableInput"))return ae.Pass;for(var it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}z.operation(function(){var dt=z.lineSeparator()||`
|
|
`;z.replaceSelection(dt+dt,null),z.execCommand("goCharLeft"),it=z.listSelections();for(var 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=Et(z);if(!at||z.getOption("disableInput"))return ae.Pass;var it=zt(at,"pairs"),lt=it.indexOf(tt);if(lt==-1)return ae.Pass;for(var ut=zt(at,"closeBefore"),dt=zt(at,"triples"),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,Ht,Yt=z.getRange(Gt,ot(Gt.line,Gt.ch+1));if(Dt&&!Nt.empty())Ht="surround";else if((Pt||!Dt)&&Yt==tt)Pt&&ft(z,Gt)?Ht="both":dt.indexOf(tt)>=0&&z.getRange(Gt,ot(Gt.line,Gt.ch+3))==tt+tt+tt?Ht="skipThree":Ht="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;Ht="addFour"}else if(Pt){var Ut=Gt.ch==0?" ":z.getRange(ot(Gt.line,Gt.ch-1),Gt);if(!ae.isWordChar(Yt)&&Ut!=tt&&!ae.isWordChar(Ut))Ht="both";else return ae.Pass}else if(Dt&&(Yt.length===0||/\s/.test(Yt)||ut.indexOf(Yt)>-1))Ht="both";else return ae.Pass;if(!Ft)Ft=Ht;else if(Ft!=Ht)return ae.Pass}var Vt=lt%2?it.charAt(lt-1):tt,oe=lt%2?tt:it.charAt(lt+1);z.operation(function(){if(Ft=="skip")z.execCommand("goCharRight");else if(Ft=="skipThree")for(var se=0;se<3;se++)z.execCommand("goCharRight");else if(Ft=="surround"){for(var de=z.getSelections(),se=0;se<de.length;se++)de[se]=Vt+de[se]+oe;z.replaceSelections(de,"around"),de=z.listSelections().slice();for(var se=0;se<de.length;se++)de[se]=Tt(de[se]);z.setSelections(de)}else Ft=="both"?(z.replaceSelection(Vt+oe,null),z.triggerElectric(Vt+oe),z.execCommand("goCharLeft")):Ft=="addFour"&&(z.replaceSelection(Vt+Vt+Vt+Vt,"before"),z.execCommand("goCharRight"))})}function xt(z,tt){var at=z.getRange(ot(tt.line,tt.ch-1),ot(tt.line,tt.ch+1));return at.length==2?at:null}function ft(z,tt){var at=z.getTokenAt(ot(tt.line,tt.ch+1));return/\bstring/.test(at.type)&&at.start==tt.ch&&(tt.ch==0||!/\bstring/.test(z.getTokenTypeAt(tt)))}})},6313:function(mn,gn,he){(function(ae){ae(he(89780),he(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(Ct,St,Tt){if(Tt!=ae.Init&&Tt&&Ct.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 zt(xt)}),Ct.addKeyMap(mt)}});var Re=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ot=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function zt(Ct){if(Ct.getOption("disableInput"))return ae.Pass;for(var St=Ct.listSelections(),Tt=[],mt=Ct.getOption("autoCloseTags"),xt=0;xt<St.length;xt++){if(!St[xt].empty())return ae.Pass;var ft=St[xt].head,z=Ct.getTokenAt(ft),tt=ae.innerMode(Ct.getMode(),z.state),at=tt.state,it=tt.mode.xmlCurrentTag&&tt.mode.xmlCurrentTag(at),lt=it&&it.name;if(!lt)return ae.Pass;var ut=tt.mode.configuration=="html",dt=typeof mt=="object"&&mt.dontCloseTags||ut&&Re,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||Et(Ct,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];Ct.replaceRange(Nt.text,St[xt].head,St[xt].anchor,"+insert");var Gt=Ct.listSelections().slice(0);Gt[xt]={head:Nt.newPos,anchor:Nt.newPos},Ct.setSelections(Gt),!jt&&Nt.indent&&(Ct.indentLine(Nt.newPos.line,null,!0),Ct.indentLine(Nt.newPos.line+1,null,!0))}}function Bt(Ct,St){for(var Tt=Ct.listSelections(),mt=[],xt=St?"/":"</",ft=Ct.getOption("autoCloseTags"),z=typeof ft=="object"&&ft.dontIndentOnSlash,tt=0;tt<Tt.length;tt++){if(!Tt[tt].empty())return ae.Pass;var at=Tt[tt].head,it=Ct.getTokenAt(at),lt=ae.innerMode(Ct.getMode(),it.state),ut=lt.state;if(St&&(it.type=="string"||it.string.charAt(0)!="<"||it.start!=at.ch-1))return ae.Pass;var dt,Pt=lt.mode.name!="xml"&&Ct.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&&Et(Ct,At,At[At.length-1],at))return ae.Pass;dt=xt+At[At.length-1]}Ct.getLine(at.line).charAt(it.end)!=">"&&(dt+=">"),mt[tt]=dt}if(Ct.replaceSelections(mt),Tt=Ct.listSelections(),!z)for(var tt=0;tt<Tt.length;tt++)(tt==Tt.length-1||Tt[tt].head.line<Tt[tt+1].head.line)&&Ct.indentLine(Tt[tt].head.line)}function vt(Ct){return Ct.getOption("disableInput")?ae.Pass:Bt(Ct,!0)}ae.commands.closeTag=function(Ct){return Bt(Ct)};function gt(Ct,St){if(Ct.indexOf)return Ct.indexOf(St);for(var Tt=0,mt=Ct.length;Tt<mt;++Tt)if(Ct[Tt]==St)return Tt;return-1}function Et(Ct,St,Tt,mt,xt){if(!ae.scanForClosingTag)return!1;var ft=Math.min(Ct.lastLine()+1,mt.line+500),z=ae.scanForClosingTag(Ct,mt,null,ft);if(!z||z.tag!=Tt)return!1;for(var tt=xt?1:0,at=St.length-1;at>=0&&St[at]==Tt;at--)++tt;mt=z.to;for(var at=1;at<tt;at++){var it=ae.scanForClosingTag(Ct,mt,null,ft);if(!it||it.tag!=Tt)return!1;mt=it.to}return!0}})},32855:function(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){"use strict";var Re=ae.Pos;function ot(at,it){return at.line-it.line||at.ch-it.ch}var zt="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Bt=zt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",vt=new RegExp("<(/?)(["+zt+"]["+Bt+"]*)","g");function gt(at,it,lt,ut){this.line=it,this.ch=lt,this.cm=at,this.text=at.getLine(it),this.min=ut?Math.max(ut.from,at.firstLine()):at.firstLine(),this.max=ut?Math.min(ut.to-1,at.lastLine()):at.lastLine()}function Et(at,it){var lt=at.cm.getTokenTypeAt(Re(at.line,it));return lt&&/\btag\b/.test(lt)}function Ct(at){if(!(at.line>=at.max))return at.ch=0,at.text=at.cm.getLine(++at.line),!0}function 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(Ct(at))continue;return}if(!Et(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(!Et(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(Ct(at))continue;return}if(!Et(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(!Et(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(mn){(function(gn,he){mn.exports=he()})(this,function(){"use strict";var gn=navigator.userAgent,he=navigator.platform,ae=/gecko\/\d/i.test(gn),Re=/MSIE \d/.test(gn),ot=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gn),zt=/Edge\/(\d+)/.exec(gn),Bt=Re||ot||zt,vt=Bt&&(Re?document.documentMode||6:+(zt||ot)[1]),gt=!zt&&/WebKit\//.test(gn),Et=gt&&/Qt\/\d+\.\d+/.test(gn),Ct=!zt&&/Chrome\//.test(gn),St=/Opera\//.test(gn),Tt=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(gn),xt=/PhantomJS/.test(gn),ft=!zt&&/AppleWebKit/.test(gn)&&/Mobile\/\w+/.test(gn),z=/Android/.test(gn),tt=ft||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(gn),at=ft||/Mac/.test(he),it=/\bCrOS\b/.test(gn),lt=/win/i.test(he),ut=St&&gn.match(/Version\/(\d*\.\d*)/);ut&&(ut=Number(ut[1])),ut&&ut>=15&&(St=!1,gt=!0);var dt=at&&(Et||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 kt=rt.className,bt=At(ct).exec(kt);if(bt){var Ot=kt.slice(bt.index+bt[0].length);rt.className=kt.slice(0,bt.index)+(Ot?bt[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,kt,bt){var Ot=document.createElement(rt);if(kt&&(Ot.className=kt),bt&&(Ot.style.cssText=bt),typeof ct=="string")Ot.appendChild(document.createTextNode(ct));else if(ct)for(var qt=0;qt<ct.length;++qt)Ot.appendChild(ct[qt]);return Ot}function Gt(rt,ct,kt,bt){var Ot=Nt(rt,ct,kt,bt);return Ot.setAttribute("role","presentation"),Ot}var Ht;document.createRange?Ht=function(rt,ct,kt,bt){var Ot=document.createRange();return Ot.setEnd(bt||rt,kt),Ot.setStart(rt,ct),Ot}:Ht=function(rt,ct,kt){var bt=document.body.createTextRange();try{bt.moveToElementText(rt.parentNode)}catch(Ot){return bt}return bt.collapse(!0),bt.moveEnd("character",kt),bt.moveStart("character",ct),bt};function Yt(rt,ct){if(ct.nodeType==3&&(ct=ct.parentNode),rt.contains)return rt.contains(ct);do if(ct.nodeType==11&&(ct=ct.host),ct==rt)return!0;while(ct=ct.parentNode)}function Ut(){var rt;try{rt=document.activeElement}catch(ct){rt=document.body||null}for(;rt&&rt.shadowRoot&&rt.shadowRoot.activeElement;)rt=rt.shadowRoot.activeElement;return rt}function Vt(rt,ct){var kt=rt.className;At(ct).test(kt)||(rt.className+=(kt?" ":"")+ct)}function oe(rt,ct){for(var kt=rt.split(" "),bt=0;bt<kt.length;bt++)kt[bt]&&!At(kt[bt]).test(ct)&&(ct+=" "+kt[bt]);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 de(rt){var ct=Array.prototype.slice.call(arguments,1);return function(){return rt.apply(null,ct)}}function Se(rt,ct,kt){ct||(ct={});for(var bt in rt)rt.hasOwnProperty(bt)&&(kt!==!1||!ct.hasOwnProperty(bt))&&(ct[bt]=rt[bt]);return ct}function Qt(rt,ct,kt,bt,Ot){ct==null&&(ct=rt.search(/[^\s\u00a0]/),ct==-1&&(ct=rt.length));for(var qt=bt||0,me=Ot||0;;){var Te=rt.indexOf(" ",qt);if(Te<0||Te>=ct)return me+(ct-qt);me+=Te-qt,me+=kt-me%kt,qt=Te+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=de(this.onTimeout,this)};ne.prototype.onTimeout=function(rt){rt.id=0,rt.time<=+new Date?rt.f():setTimeout(rt.handler,rt.time-+new Date)},ne.prototype.set=function(rt,ct){this.f=ct;var kt=+new Date+rt;(!this.id||kt<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,rt),this.time=kt)};function ye(rt,ct){for(var kt=0;kt<rt.length;++kt)if(rt[kt]==ct)return kt;return-1}var we=50,be={toString:function(){return"CodeMirror.Pass"}},fe={scroll:!1},pe={origin:"*mouse"},ce={origin:"+move"};function Ce(rt,ct,kt){for(var bt=0,Ot=0;;){var qt=rt.indexOf(" ",bt);qt==-1&&(qt=rt.length);var me=qt-bt;if(qt==rt.length||Ot+me>=ct)return bt+Math.min(me,ct-Ot);if(Ot+=qt-bt,Ot+=kt-Ot%kt,bt=qt+1,Ot>=ct)return bt}}var ve=[""];function Fe(rt){for(;ve.length<=rt;)ve.push(ge(ve)+" ");return ve[rt]}function ge(rt){return rt[rt.length-1]}function xe(rt,ct){for(var kt=[],bt=0;bt<rt.length;bt++)kt[bt]=ct(rt[bt],bt);return kt}function ee(rt,ct,kt){for(var bt=0,Ot=kt(ct);bt<rt.length&&kt(rt[bt])<=Ot;)bt++;rt.splice(bt,0,ct)}function Kt(){}function wt(rt,ct){var kt;return Object.create?kt=Object.create(rt):(Kt.prototype=rt,kt=new Kt),ct&&Se(ct,kt),kt}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 re(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 Wt(rt){return rt.charCodeAt(0)>=768&&Rt.test(rt)}function te(rt,ct,kt){for(;(kt<0?ct>0:ct<rt.length)&&Wt(rt.charAt(ct));)ct+=kt;return ct}function ue(rt,ct,kt){for(var bt=ct>kt?-1:1;;){if(ct==kt)return ct;var Ot=(ct+kt)/2,qt=bt<0?Math.ceil(Ot):Math.floor(Ot);if(qt==ct)return rt(qt)?ct:kt;rt(qt)?kt=qt:ct=qt+bt}}function le(rt,ct,kt,bt){if(!rt)return bt(ct,kt,"ltr",0);for(var Ot=!1,qt=0;qt<rt.length;++qt){var me=rt[qt];(me.from<kt&&me.to>ct||ct==kt&&me.to==ct)&&(bt(Math.max(me.from,ct),Math.min(me.to,kt),me.level==1?"rtl":"ltr",qt),Ot=!0)}Ot||bt(ct,kt,"ltr")}var Ae=null;function Le(rt,ct,kt){var bt;Ae=null;for(var Ot=0;Ot<rt.length;++Ot){var qt=rt[Ot];if(qt.from<ct&&qt.to>ct)return Ot;qt.to==ct&&(qt.from!=qt.to&&kt=="before"?bt=Ot:Ae=Ot),qt.from==ct&&(qt.from!=qt.to&&kt!="before"?bt=Ot:Ae=Ot)}return bt!=null?bt:Ae}var Be=function(){var rt="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ct="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function kt(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 bt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ot=/[stwN]/,qt=/[LRr]/,me=/[Lb1n]/,Te=/[1n]/;function ke(Ie,rn,ze){this.level=Ie,this.from=rn,this.to=ze}return function(Ie,rn){var ze=rn=="ltr"?"L":"R";if(Ie.length==0||rn=="ltr"&&!bt.test(Ie))return!1;for(var vn=Ie.length,pn=[],Hn=0;Hn<vn;++Hn)pn.push(kt(Ie.charCodeAt(Hn)));for(var Jn=0,ir=ze;Jn<vn;++Jn){var wr=pn[Jn];wr=="m"?pn[Jn]=ir:ir=wr}for(var Ir=0,Tr=ze;Ir<vn;++Ir){var Hr=pn[Ir];Hr=="1"&&Tr=="r"?pn[Ir]="n":qt.test(Hr)&&(Tr=Hr,Hr=="r"&&(pn[Ir]="R"))}for(var fi=1,Mr=pn[0];fi<vn-1;++fi){var Mi=pn[fi];Mi=="+"&&Mr=="1"&&pn[fi+1]=="1"?pn[fi]="1":Mi==","&&Mr==pn[fi+1]&&(Mr=="1"||Mr=="n")&&(pn[fi]=Mr),Mr=Mi}for(var Po=0;Po<vn;++Po){var ha=pn[Po];if(ha==",")pn[Po]="N";else if(ha=="%"){var No=void 0;for(No=Po+1;No<vn&&pn[No]=="%";++No);for(var gs=Po&&pn[Po-1]=="!"||No<vn&&pn[No]=="1"?"1":"N",Ha=Po;Ha<No;++Ha)pn[Ha]=gs;Po=No-1}}for(var na=0,ks=ze;na<vn;++na){var Ia=pn[na];ks=="L"&&Ia=="1"?pn[na]="L":qt.test(Ia)&&(ks=Ia)}for(var ra=0;ra<vn;++ra)if(Ot.test(pn[ra])){var Yi=void 0;for(Yi=ra+1;Yi<vn&&Ot.test(pn[Yi]);++Yi);for(var Do=(ra?pn[ra-1]:ze)=="L",xa=(Yi<vn?pn[Yi]:ze)=="L",Ra=Do==xa?Do?"L":"R":ze,fl=ra;fl<Yi;++fl)pn[fl]=Ra;ra=Yi-1}for(var jo=[],nl,zo=0;zo<vn;)if(me.test(pn[zo])){var Sf=zo;for(++zo;zo<vn&&me.test(pn[zo]);++zo);jo.push(new ke(0,Sf,zo))}else{var Gs=zo,Es=jo.length,ms=rn=="rtl"?1:0;for(++zo;zo<vn&&pn[zo]!="L";++zo);for(var fo=Gs;fo<zo;)if(Te.test(pn[fo])){Gs<fo&&(jo.splice(Es,0,new ke(1,Gs,fo)),Es+=ms);var wa=fo;for(++fo;fo<zo&&Te.test(pn[fo]);++fo);jo.splice(Es,0,new ke(2,wa,fo)),Es+=ms,Gs=fo}else++fo;Gs<zo&&jo.splice(Es,0,new ke(1,Gs,zo))}return rn=="ltr"&&(jo[0].level==1&&(nl=Ie.match(/^\s+/))&&(jo[0].from=nl[0].length,jo.unshift(new ke(0,0,nl[0].length))),ge(jo).level==1&&(nl=Ie.match(/\s+$/))&&(ge(jo).to-=nl[0].length,jo.push(new ke(0,vn-nl[0].length,vn)))),rn=="rtl"?jo.reverse():jo}}();function tn(rt,ct){var kt=rt.order;return kt==null&&(kt=rt.order=Be(rt.text,ct)),kt}var $e=[],Qe=function(rt,ct,kt){if(rt.addEventListener)rt.addEventListener(ct,kt,!1);else if(rt.attachEvent)rt.attachEvent("on"+ct,kt);else{var bt=rt._handlers||(rt._handlers={});bt[ct]=(bt[ct]||$e).concat(kt)}};function Ze(rt,ct){return rt._handlers&&rt._handlers[ct]||$e}function Ge(rt,ct,kt){if(rt.removeEventListener)rt.removeEventListener(ct,kt,!1);else if(rt.detachEvent)rt.detachEvent("on"+ct,kt);else{var bt=rt._handlers,Ot=bt&&bt[ct];if(Ot){var qt=ye(Ot,kt);qt>-1&&(bt[ct]=Ot.slice(0,qt).concat(Ot.slice(qt+1)))}}}function We(rt,ct){var kt=Ze(rt,ct);if(kt.length)for(var bt=Array.prototype.slice.call(arguments,2),Ot=0;Ot<kt.length;++Ot)kt[Ot].apply(null,bt)}function Ke(rt,ct,kt){return typeof ct=="string"&&(ct={type:ct,preventDefault:function(){this.defaultPrevented=!0}}),We(rt,kt||ct.type,rt,ct),Vn(ct)||ct.codemirrorIgnore}function nn(rt){var ct=rt._handlers&&rt._handlers.cursorActivity;if(ct)for(var kt=rt.curOp.cursorActivityHandlers||(rt.curOp.cursorActivityHandlers=[]),bt=0;bt<ct.length;++bt)ye(kt,ct[bt])==-1&&kt.push(ct[bt])}function hn(rt,ct){return Ze(rt,ct).length>0}function un(rt){rt.prototype.on=function(ct,kt){Qe(this,ct,kt)},rt.prototype.off=function(ct,kt){Ge(this,ct,kt)}}function bn(rt){rt.preventDefault?rt.preventDefault():rt.returnValue=!1}function Un(rt){rt.stopPropagation?rt.stopPropagation():rt.cancelBubble=!0}function Vn(rt){return rt.defaultPrevented!=null?rt.defaultPrevented:rt.returnValue==!1}function Yn(rt){bn(rt),Un(rt)}function vr(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 gr=function(){if(Bt&&vt<9)return!1;var rt=Nt("div");return"draggable"in rt||"dragDrop"in rt}(),Nr;function Lr(rt){if(Nr==null){var ct=Nt("span","\u200B");jt(rt,Nt("span",[ct,document.createTextNode("x")])),rt.firstChild.offsetHeight!=0&&(Nr=ct.offsetWidth<=1&&ct.offsetHeight>2&&!(Bt&&vt<8))}var kt=Nr?Nt("span","\u200B"):Nt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return kt.setAttribute("cm-text",""),kt}var dr;function cr(rt){if(dr!=null)return dr;var ct=jt(rt,document.createTextNode("A\u062EA")),kt=Ht(ct,0,1).getBoundingClientRect(),bt=Ht(ct,1,2).getBoundingClientRect();return Ft(rt),!kt||kt.left==kt.right?!1:dr=bt.right-kt.right<3}var jr=`
|
|
|
|
b`.split(/\n/).length!=3?function(rt){for(var ct=0,kt=[],bt=rt.length;ct<=bt;){var Ot=rt.indexOf(`
|
|
`,ct);Ot==-1&&(Ot=rt.length);var qt=rt.slice(ct,rt.charAt(Ot-1)=="\r"?Ot-1:Ot),me=qt.indexOf("\r");me!=-1?(kt.push(qt.slice(0,me)),ct+=me+1):(kt.push(qt),ct=Ot+1)}return kt}:function(rt){return rt.split(/\r\n?|\n/)},$t=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(kt){}return!ct||ct.parentElement()!=rt?!1:ct.compareEndPoints("StartToEnd",ct)!=0},$n=function(){var rt=Nt("div");return"oncopy"in rt?!0:(rt.setAttribute("oncopy","return;"),typeof rt.oncopy=="function")}(),Zn=null;function Dr(rt){if(Zn!=null)return Zn;var ct=jt(rt,Nt("span","x")),kt=ct.getBoundingClientRect(),bt=Ht(ct,0,1).getBoundingClientRect();return Zn=Math.abs(kt.left-bt.left)>1}var Vr={},Ur={};function ai(rt,ct){arguments.length>2&&(ct.dependencies=Array.prototype.slice.call(arguments,2)),Vr[rt]=ct}function qn(rt,ct){Ur[rt]=ct}function zn(rt){if(typeof rt=="string"&&Ur.hasOwnProperty(rt))rt=Ur[rt];else if(rt&&typeof rt.name=="string"&&Ur.hasOwnProperty(rt.name)){var ct=Ur[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 zn("application/xml");if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(rt))return zn("application/json")}return typeof rt=="string"?{name:rt}:rt||{name:"null"}}function Ye(rt,ct){ct=zn(ct);var kt=Vr[ct.name];if(!kt)return Ye(rt,"text/plain");var bt=kt(rt,ct);if(Ve.hasOwnProperty(ct.name)){var Ot=Ve[ct.name];for(var qt in Ot)Ot.hasOwnProperty(qt)&&(bt.hasOwnProperty(qt)&&(bt["_"+qt]=bt[qt]),bt[qt]=Ot[qt])}if(bt.name=ct.name,ct.helperType&&(bt.helperType=ct.helperType),ct.modeProps)for(var me in ct.modeProps)bt[me]=ct.modeProps[me];return bt}var Ve={};function He(rt,ct){var kt=Ve.hasOwnProperty(rt)?Ve[rt]:Ve[rt]={};Se(ct,kt)}function Fn(rt,ct){if(ct===!0)return ct;if(rt.copyState)return rt.copyState(ct);var kt={};for(var bt in ct){var Ot=ct[bt];Ot instanceof Array&&(Ot=Ot.concat([])),kt[bt]=Ot}return kt}function On(rt,ct){for(var kt;rt.innerMode&&(kt=rt.innerMode(ct),!(!kt||kt.mode==rt));)ct=kt.state,rt=kt.mode;return kt||{mode:rt,state:ct}}function Qn(rt,ct,kt){return rt.startState?rt.startState(ct,kt):!0}var yn=function(rt,ct,kt){this.pos=this.start=0,this.string=rt,this.tabSize=ct||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=kt};yn.prototype.eol=function(){return this.pos>=this.string.length},yn.prototype.sol=function(){return this.pos==this.lineStart},yn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},yn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},yn.prototype.eat=function(rt){var ct=this.string.charAt(this.pos),kt;if(typeof rt=="string"?kt=ct==rt:kt=ct&&(rt.test?rt.test(ct):rt(ct)),kt)return++this.pos,ct},yn.prototype.eatWhile=function(rt){for(var ct=this.pos;this.eat(rt););return this.pos>ct},yn.prototype.eatSpace=function(){for(var rt=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>rt},yn.prototype.skipToEnd=function(){this.pos=this.string.length},yn.prototype.skipTo=function(rt){var ct=this.string.indexOf(rt,this.pos);if(ct>-1)return this.pos=ct,!0},yn.prototype.backUp=function(rt){this.pos-=rt},yn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qt(this.string,this.lineStart,this.tabSize):0)},yn.prototype.indentation=function(){return Qt(this.string,null,this.tabSize)-(this.lineStart?Qt(this.string,this.lineStart,this.tabSize):0)},yn.prototype.match=function(rt,ct,kt){if(typeof rt=="string"){var bt=function(me){return kt?me.toLowerCase():me},Ot=this.string.substr(this.pos,rt.length);if(bt(Ot)==bt(rt))return ct!==!1&&(this.pos+=rt.length),!0}else{var qt=this.string.slice(this.pos).match(rt);return qt&&qt.index>0?null:(qt&&ct!==!1&&(this.pos+=qt[0].length),qt)}},yn.prototype.current=function(){return this.string.slice(this.start,this.pos)},yn.prototype.hideFirstChars=function(rt,ct){this.lineStart+=rt;try{return ct()}finally{this.lineStart-=rt}},yn.prototype.lookAhead=function(rt){var ct=this.lineOracle;return ct&&ct.lookAhead(rt)},yn.prototype.baseToken=function(){var rt=this.lineOracle;return rt&&rt.baseToken(this.pos)};function Nn(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 kt=rt;!kt.lines;)for(var bt=0;;++bt){var Ot=kt.children[bt],qt=Ot.chunkSize();if(ct<qt){kt=Ot;break}ct-=qt}return kt.lines[ct]}function en(rt,ct,kt){var bt=[],Ot=ct.line;return rt.iter(ct.line,kt.line+1,function(qt){var me=qt.text;Ot==kt.line&&(me=me.slice(0,kt.ch)),Ot==ct.line&&(me=me.slice(ct.ch)),bt.push(me),++Ot}),bt}function Xe(rt,ct,kt){var bt=[];return rt.iter(ct,kt,function(Ot){bt.push(Ot.text)}),bt}function Dn(rt,ct){var kt=ct-rt.height;if(kt)for(var bt=rt;bt;bt=bt.parent)bt.height+=kt}function Oe(rt){if(rt.parent==null)return null;for(var ct=rt.parent,kt=ye(ct.lines,rt),bt=ct.parent;bt;ct=bt,bt=bt.parent)for(var Ot=0;bt.children[Ot]!=ct;++Ot)kt+=bt.children[Ot].chunkSize();return kt+ct.first}function ln(rt,ct){var kt=rt.first;t:do{for(var bt=0;bt<rt.children.length;++bt){var Ot=rt.children[bt],qt=Ot.height;if(ct<qt){rt=Ot;continue t}ct-=qt,kt+=Ot.chunkSize()}return kt}while(!rt.lines);for(var me=0;me<rt.lines.length;++me){var Te=rt.lines[me],ke=Te.height;if(ct<ke)break;ct-=ke}return kt+me}function En(rt,ct){return ct>=rt.first&&ct<rt.first+rt.size}function Gn(rt,ct){return String(rt.lineNumberFormatter(ct+rt.firstLineNumber))}function sn(rt,ct,kt){if(kt===void 0&&(kt=null),!(this instanceof sn))return new sn(rt,ct,kt);this.line=rt,this.ch=ct,this.sticky=kt}function dn(rt,ct){return rt.line-ct.line||rt.ch-ct.ch}function An(rt,ct){return rt.sticky==ct.sticky&&dn(rt,ct)==0}function er(rt){return sn(rt.line,rt.ch)}function ar(rt,ct){return dn(rt,ct)<0?ct:rt}function Xn(rt,ct){return dn(rt,ct)<0?rt:ct}function In(rt,ct){return Math.max(rt.first,Math.min(ct,rt.first+rt.size-1))}function Wn(rt,ct){if(ct.line<rt.first)return sn(rt.first,0);var kt=rt.first+rt.size-1;return ct.line>kt?sn(kt,Nn(rt,kt).text.length):rr(ct,Nn(rt,ct.line).text.length)}function rr(rt,ct){var kt=rt.ch;return kt==null||kt>ct?sn(rt.line,ct):kt<0?sn(rt.line,0):rt}function sr(rt,ct){for(var kt=[],bt=0;bt<ct.length;bt++)kt[bt]=Wn(rt,ct[bt]);return kt}var mr=function(rt,ct){this.state=rt,this.lookAhead=ct},cn=function(rt,ct,kt,bt){this.state=ct,this.doc=rt,this.line=kt,this.maxLookAhead=bt||0,this.baseTokens=null,this.baseTokenPos=1};cn.prototype.lookAhead=function(rt){var ct=this.doc.getLine(this.line+rt);return ct!=null&&rt>this.maxLookAhead&&(this.maxLookAhead=rt),ct},cn.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}},cn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},cn.fromSaved=function(rt,ct,kt){return ct instanceof mr?new cn(rt,Fn(rt.mode,ct.state),kt,ct.lookAhead):new cn(rt,Fn(rt.mode,ct),kt)},cn.prototype.save=function(rt){var ct=rt!==!1?Fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mr(ct,this.maxLookAhead):ct};function Si(rt,ct,kt,bt){var Ot=[rt.state.modeGen],qt={};Xr(rt,ct.text,rt.doc.mode,kt,function(Ie,rn){return Ot.push(Ie,rn)},qt,bt);for(var me=kt.state,Te=function(Ie){kt.baseTokens=Ot;var rn=rt.state.overlays[Ie],ze=1,vn=0;kt.state=!0,Xr(rt,ct.text,rn.mode,kt,function(pn,Hn){for(var Jn=ze;vn<pn;){var ir=Ot[ze];ir>pn&&Ot.splice(ze,1,pn,Ot[ze+1],ir),ze+=2,vn=Math.min(pn,ir)}if(Hn)if(rn.opaque)Ot.splice(Jn,ze-Jn,pn,"overlay "+Hn),ze=Jn+2;else for(;Jn<ze;Jn+=2){var wr=Ot[Jn+1];Ot[Jn+1]=(wr?wr+" ":"")+"overlay "+Hn}},qt),kt.state=me,kt.baseTokens=null,kt.baseTokenPos=1},ke=0;ke<rt.state.overlays.length;++ke)Te(ke);return{styles:Ot,classes:qt.bgClass||qt.textClass?qt:null}}function Rr(rt,ct,kt){if(!ct.styles||ct.styles[0]!=rt.state.modeGen){var bt=pi(rt,Oe(ct)),Ot=ct.text.length>rt.options.maxHighlightLength&&Fn(rt.doc.mode,bt.state),qt=Si(rt,ct,bt);Ot&&(bt.state=Ot),ct.stateAfter=bt.save(!Ot),ct.styles=qt.styles,qt.classes?ct.styleClasses=qt.classes:ct.styleClasses&&(ct.styleClasses=null),kt===rt.doc.highlightFrontier&&(rt.doc.modeFrontier=Math.max(rt.doc.modeFrontier,++rt.doc.highlightFrontier))}return ct.styles}function pi(rt,ct,kt){var bt=rt.doc,Ot=rt.display;if(!bt.mode.startState)return new cn(bt,!0,ct);var qt=zr(rt,ct,kt),me=qt>bt.first&&Nn(bt,qt-1).stateAfter,Te=me?cn.fromSaved(bt,me,qt):new cn(bt,Qn(bt.mode),qt);return bt.iter(qt,ct,function(ke){an(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()}),kt&&(bt.modeFrontier=Te.line),Te}function an(rt,ct,kt,bt){var Ot=rt.doc.mode,qt=new yn(ct,rt.options.tabSize,kt);for(qt.start=qt.pos=bt||0,ct==""&&Rn(Ot,kt.state);!qt.eol();)nr(Ot,qt,kt.state),qt.start=qt.pos}function Rn(rt,ct){if(rt.blankLine)return rt.blankLine(ct);if(rt.innerMode){var kt=On(rt,ct);if(kt.mode.blankLine)return kt.mode.blankLine(kt.state)}}function nr(rt,ct,kt,bt){for(var Ot=0;Ot<10;Ot++){bt&&(bt[0]=On(rt,kt).mode);var qt=rt.token(ct,kt);if(ct.pos>ct.start)return qt}throw new Error("Mode "+rt.name+" failed to advance stream.")}var fr=function(rt,ct,kt){this.start=rt.start,this.end=rt.pos,this.string=rt.current(),this.type=ct||null,this.state=kt};function lr(rt,ct,kt,bt){var Ot=rt.doc,qt=Ot.mode,me;ct=Wn(Ot,ct);var Te=Nn(Ot,ct.line),ke=pi(rt,ct.line,kt),Ie=new yn(Te.text,rt.options.tabSize,ke),rn;for(bt&&(rn=[]);(bt||Ie.pos<ct.ch)&&!Ie.eol();)Ie.start=Ie.pos,me=nr(qt,Ie,ke.state),bt&&rn.push(new fr(Ie,me,Fn(Ot.mode,ke.state)));return bt?rn:new fr(Ie,me,ke.state)}function Pr(rt,ct){if(rt)for(;;){var kt=rt.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!kt)break;rt=rt.slice(0,kt.index)+rt.slice(kt.index+kt[0].length);var bt=kt[1]?"bgClass":"textClass";ct[bt]==null?ct[bt]=kt[2]:new RegExp("(?:^|\\s)"+kt[2]+"(?:$|\\s)").test(ct[bt])||(ct[bt]+=" "+kt[2])}return rt}function Xr(rt,ct,kt,bt,Ot,qt,me){var Te=kt.flattenSpans;Te==null&&(Te=rt.options.flattenSpans);var ke=0,Ie=null,rn=new yn(ct,rt.options.tabSize,bt),ze,vn=rt.options.addModeClass&&[null];for(ct==""&&Pr(Rn(kt,bt.state),qt);!rn.eol();){if(rn.pos>rt.options.maxHighlightLength?(Te=!1,me&&an(rt,ct,bt,rn.pos),rn.pos=ct.length,ze=null):ze=Pr(nr(kt,rn,bt.state,vn),qt),vn){var pn=vn[0].name;pn&&(ze="m-"+(ze?pn+" "+ze:pn))}if(!Te||Ie!=ze){for(;ke<rn.start;)ke=Math.min(rn.start,ke+5e3),Ot(ke,Ie);Ie=ze}rn.start=rn.pos}for(;ke<rn.pos;){var Hn=Math.min(rn.pos,ke+5e3);Ot(Hn,Ie),ke=Hn}}function zr(rt,ct,kt){for(var bt,Ot,qt=rt.doc,me=kt?-1:ct-(rt.doc.mode.innerMode?1e3:100),Te=ct;Te>me;--Te){if(Te<=qt.first)return qt.first;var ke=Nn(qt,Te-1),Ie=ke.stateAfter;if(Ie&&(!kt||Te+(Ie instanceof mr?Ie.lookAhead:0)<=qt.modeFrontier))return Te;var rn=Qt(ke.text,null,rt.options.tabSize);(Ot==null||bt>rn)&&(Ot=Te-1,bt=rn)}return Ot}function Kr(rt,ct){if(rt.modeFrontier=Math.min(rt.modeFrontier,ct),!(rt.highlightFrontier<ct-10)){for(var kt=rt.first,bt=ct-1;bt>kt;bt--){var Ot=Nn(rt,bt).stateAfter;if(Ot&&(!(Ot instanceof mr)||bt+Ot.lookAhead<ct)){kt=bt+1;break}}rt.highlightFrontier=Math.min(rt.highlightFrontier,kt)}}var Yr=!1,wn=!1;function ci(){Yr=!0}function Sn(){wn=!0}function Jr(rt,ct,kt){this.marker=rt,this.from=ct,this.to=kt}function ni(rt,ct){if(rt)for(var kt=0;kt<rt.length;++kt){var bt=rt[kt];if(bt.marker==ct)return bt}}function oi(rt,ct){for(var kt,bt=0;bt<rt.length;++bt)rt[bt]!=ct&&(kt||(kt=[])).push(rt[bt]);return kt}function Ui(rt,ct){rt.markedSpans=rt.markedSpans?rt.markedSpans.concat([ct]):[ct],ct.marker.attachLine(rt)}function ji(rt,ct,kt){var bt;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var qt=rt[Ot],me=qt.marker,Te=qt.from==null||(me.inclusiveLeft?qt.from<=ct:qt.from<ct);if(Te||qt.from==ct&&me.type=="bookmark"&&(!kt||!qt.marker.insertLeft)){var ke=qt.to==null||(me.inclusiveRight?qt.to>=ct:qt.to>ct);(bt||(bt=[])).push(new Jr(me,qt.from,ke?null:qt.to))}}return bt}function si(rt,ct,kt){var bt;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var qt=rt[Ot],me=qt.marker,Te=qt.to==null||(me.inclusiveRight?qt.to>=ct:qt.to>ct);if(Te||qt.from==ct&&me.type=="bookmark"&&(!kt||qt.marker.insertLeft)){var ke=qt.from==null||(me.inclusiveLeft?qt.from<=ct:qt.from<ct);(bt||(bt=[])).push(new Jr(me,ke?null:qt.from-ct,qt.to==null?null:qt.to-ct))}}return bt}function gi(rt,ct){if(ct.full)return null;var kt=En(rt,ct.from.line)&&Nn(rt,ct.from.line).markedSpans,bt=En(rt,ct.to.line)&&Nn(rt,ct.to.line).markedSpans;if(!kt&&!bt)return null;var Ot=ct.from.ch,qt=ct.to.ch,me=dn(ct.from,ct.to)==0,Te=ji(kt,Ot,me),ke=si(bt,qt,me),Ie=ct.text.length==1,rn=ge(ct.text).length+(Ie?Ot:0);if(Te)for(var ze=0;ze<Te.length;++ze){var vn=Te[ze];if(vn.to==null){var pn=ni(ke,vn.marker);pn?Ie&&(vn.to=pn.to==null?null:pn.to+rn):vn.to=Ot}}if(ke)for(var Hn=0;Hn<ke.length;++Hn){var Jn=ke[Hn];if(Jn.to!=null&&(Jn.to+=rn),Jn.from==null){var ir=ni(Te,Jn.marker);ir||(Jn.from=rn,Ie&&(Te||(Te=[])).push(Jn))}else Jn.from+=rn,Ie&&(Te||(Te=[])).push(Jn)}Te&&(Te=Oo(Te)),ke&&ke!=Te&&(ke=Oo(ke));var wr=[Te];if(!Ie){var Ir=ct.text.length-2,Tr;if(Ir>0&&Te)for(var Hr=0;Hr<Te.length;++Hr)Te[Hr].to==null&&(Tr||(Tr=[])).push(new Jr(Te[Hr].marker,null,null));for(var fi=0;fi<Ir;++fi)wr.push(Tr);wr.push(ke)}return wr}function Oo(rt){for(var ct=0;ct<rt.length;++ct){var kt=rt[ct];kt.from!=null&&kt.from==kt.to&&kt.marker.clearWhenEmpty!==!1&&rt.splice(ct--,1)}return rt.length?rt:null}function Ci(rt,ct,kt){var bt=null;if(rt.iter(ct.line,kt.line+1,function(pn){if(pn.markedSpans)for(var Hn=0;Hn<pn.markedSpans.length;++Hn){var Jn=pn.markedSpans[Hn].marker;Jn.readOnly&&(!bt||ye(bt,Jn)==-1)&&(bt||(bt=[])).push(Jn)}}),!bt)return null;for(var Ot=[{from:ct,to:kt}],qt=0;qt<bt.length;++qt)for(var me=bt[qt],Te=me.find(0),ke=0;ke<Ot.length;++ke){var Ie=Ot[ke];if(!(dn(Ie.to,Te.from)<0||dn(Ie.from,Te.to)>0)){var rn=[ke,1],ze=dn(Ie.from,Te.from),vn=dn(Ie.to,Te.to);(ze<0||!me.inclusiveLeft&&!ze)&&rn.push({from:Ie.from,to:Te.from}),(vn>0||!me.inclusiveRight&&!vn)&&rn.push({from:Te.to,to:Ie.to}),Ot.splice.apply(Ot,rn),ke+=rn.length-3}}return Ot}function or(rt){var ct=rt.markedSpans;if(ct){for(var kt=0;kt<ct.length;++kt)ct[kt].marker.detachLine(rt);rt.markedSpans=null}}function Me(rt,ct){if(ct){for(var kt=0;kt<ct.length;++kt)ct[kt].marker.attachLine(rt);rt.markedSpans=ct}}function Ji(rt){return rt.inclusiveLeft?-1:0}function qr(rt){return rt.inclusiveRight?1:0}function _r(rt,ct){var kt=rt.lines.length-ct.lines.length;if(kt!=0)return kt;var bt=rt.find(),Ot=ct.find(),qt=dn(bt.from,Ot.from)||Ji(rt)-Ji(ct);if(qt)return-qt;var me=dn(bt.to,Ot.to)||qr(rt)-qr(ct);return me||ct.id-rt.id}function di(rt,ct){var kt=wn&&rt.markedSpans,bt;if(kt)for(var Ot=void 0,qt=0;qt<kt.length;++qt)Ot=kt[qt],Ot.marker.collapsed&&(ct?Ot.from:Ot.to)==null&&(!bt||_r(bt,Ot.marker)<0)&&(bt=Ot.marker);return bt}function Oi(rt){return di(rt,!0)}function ur(rt){return di(rt,!1)}function br(rt,ct){var kt=wn&&rt.markedSpans,bt;if(kt)for(var Ot=0;Ot<kt.length;++Ot){var qt=kt[Ot];qt.marker.collapsed&&(qt.from==null||qt.from<ct)&&(qt.to==null||qt.to>ct)&&(!bt||_r(bt,qt.marker)<0)&&(bt=qt.marker)}return bt}function Zr(rt,ct,kt,bt,Ot){var qt=Nn(rt,ct),me=wn&&qt.markedSpans;if(me)for(var Te=0;Te<me.length;++Te){var ke=me[Te];if(ke.marker.collapsed){var Ie=ke.marker.find(0),rn=dn(Ie.from,kt)||Ji(ke.marker)-Ji(Ot),ze=dn(Ie.to,bt)||qr(ke.marker)-qr(Ot);if(!(rn>=0&&ze<=0||rn<=0&&ze>=0)&&(rn<=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?dn(Ie.to,kt)>=0:dn(Ie.to,kt)>0)||rn>=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?dn(Ie.from,bt)<=0:dn(Ie.from,bt)<0)))return!0}}}function Br(rt){for(var ct;ct=Oi(rt);)rt=ct.find(-1,!0).line;return rt}function ti(rt){for(var ct;ct=ur(rt);)rt=ct.find(1,!0).line;return rt}function eo(rt){for(var ct,kt;ct=ur(rt);)rt=ct.find(1,!0).line,(kt||(kt=[])).push(rt);return kt}function Or(rt,ct){var kt=Nn(rt,ct),bt=Br(kt);return kt==bt?ct:Oe(bt)}function Er(rt,ct){if(ct>rt.lastLine())return ct;var kt=Nn(rt,ct),bt;if(!Mn(rt,kt))return ct;for(;bt=ur(kt);)kt=bt.find(1,!0).line;return Oe(kt)+1}function Mn(rt,ct){var kt=wn&&ct.markedSpans;if(kt){for(var bt=void 0,Ot=0;Ot<kt.length;++Ot)if(bt=kt[Ot],!!bt.marker.collapsed){if(bt.from==null)return!0;if(!bt.marker.widgetNode&&bt.from==0&&bt.marker.inclusiveLeft&&xr(rt,ct,bt))return!0}}}function xr(rt,ct,kt){if(kt.to==null){var bt=kt.marker.find(1,!0);return xr(rt,bt.line,ni(bt.line.markedSpans,kt.marker))}if(kt.marker.inclusiveRight&&kt.to==ct.text.length)return!0;for(var Ot=void 0,qt=0;qt<ct.markedSpans.length;++qt)if(Ot=ct.markedSpans[qt],Ot.marker.collapsed&&!Ot.marker.widgetNode&&Ot.from==kt.to&&(Ot.to==null||Ot.to!=kt.from)&&(Ot.marker.inclusiveLeft||kt.marker.inclusiveRight)&&xr(rt,ct,Ot))return!0}function yi(rt){rt=Br(rt);for(var ct=0,kt=rt.parent,bt=0;bt<kt.lines.length;++bt){var Ot=kt.lines[bt];if(Ot==rt)break;ct+=Ot.height}for(var qt=kt.parent;qt;kt=qt,qt=kt.parent)for(var me=0;me<qt.children.length;++me){var Te=qt.children[me];if(Te==kt)break;ct+=Te.height}return ct}function Qi(rt){if(rt.height==0)return 0;for(var ct=rt.text.length,kt,bt=rt;kt=Oi(bt);){var Ot=kt.find(0,!0);bt=Ot.from.line,ct+=Ot.from.ch-Ot.to.ch}for(bt=rt;kt=ur(bt);){var qt=kt.find(0,!0);ct-=bt.text.length-qt.from.ch,bt=qt.to.line,ct+=bt.text.length-qt.to.ch}return ct}function Zi(rt){var ct=rt.display,kt=rt.doc;ct.maxLine=Nn(kt,kt.first),ct.maxLineLength=Qi(ct.maxLine),ct.maxLineChanged=!0,kt.iter(function(bt){var Ot=Qi(bt);Ot>ct.maxLineLength&&(ct.maxLineLength=Ot,ct.maxLine=bt)})}var Bi=function(rt,ct,kt){this.text=rt,Me(this,ct),this.height=kt?kt(this):1};Bi.prototype.lineNo=function(){return Oe(this)},un(Bi);function no(rt,ct,kt,bt){rt.text=ct,rt.stateAfter&&(rt.stateAfter=null),rt.styles&&(rt.styles=null),rt.order!=null&&(rt.order=null),or(rt),Me(rt,kt);var Ot=bt?bt(rt):1;Ot!=rt.height&&Dn(rt,Ot)}function Wi(rt){rt.parent=null,or(rt)}var qo={},Xo={};function Ja(rt,ct){if(!rt||/^\s*$/.test(rt))return null;var kt=ct.addModeClass?Xo:qo;return kt[rt]||(kt[rt]=rt.replace(/\S+/g,"cm-$&"))}function on(rt,ct){var kt=Gt("span",null,null,gt?"padding-right: .1px":null),bt={pre:Gt("pre",[kt],"CodeMirror-line"),content:kt,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 qt=Ot?ct.rest[Ot-1]:ct.line,me=void 0;bt.pos=0,bt.addToken=Rl,cr(rt.display.measure)&&(me=tn(qt,rt.doc.direction))&&(bt.addToken=bl(bt.addToken,me)),bt.map=[];var Te=ct!=rt.display.externalMeasured&&Oe(qt);Mu(qt,bt,Rr(rt,qt,Te)),qt.styleClasses&&(qt.styleClasses.bgClass&&(bt.bgClass=oe(qt.styleClasses.bgClass,bt.bgClass||"")),qt.styleClasses.textClass&&(bt.textClass=oe(qt.styleClasses.textClass,bt.textClass||""))),bt.map.length==0&&bt.map.push(0,0,bt.content.appendChild(Lr(rt.display.measure))),Ot==0?(ct.measure.map=bt.map,ct.measure.cache={}):((ct.measure.maps||(ct.measure.maps=[])).push(bt.map),(ct.measure.caches||(ct.measure.caches=[])).push({}))}if(gt){var ke=bt.content.lastChild;(/\bcm-tab\b/.test(ke.className)||ke.querySelector&&ke.querySelector(".cm-tab"))&&(bt.content.className="cm-tab-wrap-hack")}return We(rt,"renderLine",rt,ct.line,bt.pre),bt.pre.className&&(bt.textClass=oe(bt.pre.className,bt.textClass||"")),bt}function xo(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 Rl(rt,ct,kt,bt,Ot,qt,me){if(ct){var Te=rt.splitSpaces?oa(ct,rt.trailingSpace):ct,ke=rt.cm.state.specialChars,Ie=!1,rn;if(!ke.test(ct))rt.col+=ct.length,rn=document.createTextNode(Te),rt.map.push(rt.pos,rt.pos+ct.length,rn),Bt&&vt<9&&(Ie=!0),rt.pos+=ct.length;else{rn=document.createDocumentFragment();for(var ze=0;;){ke.lastIndex=ze;var vn=ke.exec(ct),pn=vn?vn.index-ze:ct.length-ze;if(pn){var Hn=document.createTextNode(Te.slice(ze,ze+pn));Bt&&vt<9?rn.appendChild(Nt("span",[Hn])):rn.appendChild(Hn),rt.map.push(rt.pos,rt.pos+pn,Hn),rt.col+=pn,rt.pos+=pn}if(!vn)break;ze+=pn+1;var Jn=void 0;if(vn[0]==" "){var ir=rt.cm.options.tabSize,wr=ir-rt.col%ir;Jn=rn.appendChild(Nt("span",Fe(wr),"cm-tab")),Jn.setAttribute("role","presentation"),Jn.setAttribute("cm-text"," "),rt.col+=wr}else vn[0]=="\r"||vn[0]==`
|
|
`?(Jn=rn.appendChild(Nt("span",vn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Jn.setAttribute("cm-text",vn[0]),rt.col+=1):(Jn=rt.cm.options.specialCharPlaceholder(vn[0]),Jn.setAttribute("cm-text",vn[0]),Bt&&vt<9?rn.appendChild(Nt("span",[Jn])):rn.appendChild(Jn),rt.col+=1);rt.map.push(rt.pos,rt.pos+1,Jn),rt.pos++}}if(rt.trailingSpace=Te.charCodeAt(ct.length-1)==32,kt||bt||Ot||Ie||qt||me){var Ir=kt||"";bt&&(Ir+=bt),Ot&&(Ir+=Ot);var Tr=Nt("span",[rn],Ir,qt);if(me)for(var Hr in me)me.hasOwnProperty(Hr)&&Hr!="style"&&Hr!="class"&&Tr.setAttribute(Hr,me[Hr]);return rt.content.appendChild(Tr)}rt.content.appendChild(rn)}}function oa(rt,ct){if(rt.length>1&&!/ /.test(rt))return rt;for(var kt=ct,bt="",Ot=0;Ot<rt.length;Ot++){var qt=rt.charAt(Ot);qt==" "&&kt&&(Ot==rt.length-1||rt.charCodeAt(Ot+1)==32)&&(qt="\xA0"),bt+=qt,kt=qt==" "}return bt}function bl(rt,ct){return function(kt,bt,Ot,qt,me,Te,ke){Ot=Ot?Ot+" cm-force-border":"cm-force-border";for(var Ie=kt.pos,rn=Ie+bt.length;;){for(var ze=void 0,vn=0;vn<ct.length&&(ze=ct[vn],!(ze.to>Ie&&ze.from<=Ie));vn++);if(ze.to>=rn)return rt(kt,bt,Ot,qt,me,Te,ke);rt(kt,bt.slice(0,ze.to-Ie),Ot,qt,null,Te,ke),qt=null,bt=bt.slice(ze.to-Ie),Ie=ze.to}}}function Hi(rt,ct,kt,bt){var Ot=!bt&&kt.widgetNode;Ot&&rt.map.push(rt.pos,rt.pos+ct,Ot),!bt&&rt.cm.display.input.needsContentAttribute&&(Ot||(Ot=rt.content.appendChild(document.createElement("span"))),Ot.setAttribute("cm-marker",kt.id)),Ot&&(rt.cm.display.input.setUneditable(Ot),rt.content.appendChild(Ot)),rt.pos+=ct,rt.trailingSpace=!1}function Mu(rt,ct,kt){var bt=rt.markedSpans,Ot=rt.text,qt=0;if(!bt){for(var me=1;me<kt.length;me+=2)ct.addToken(ct,Ot.slice(qt,qt=kt[me]),Ja(kt[me+1],ct.cm.options));return}for(var Te=Ot.length,ke=0,Ie=1,rn="",ze,vn,pn=0,Hn,Jn,ir,wr,Ir;;){if(pn==ke){Hn=Jn=ir=vn="",Ir=null,wr=null,pn=1/0;for(var Tr=[],Hr=void 0,fi=0;fi<bt.length;++fi){var Mr=bt[fi],Mi=Mr.marker;if(Mi.type=="bookmark"&&Mr.from==ke&&Mi.widgetNode)Tr.push(Mi);else if(Mr.from<=ke&&(Mr.to==null||Mr.to>ke||Mi.collapsed&&Mr.to==ke&&Mr.from==ke)){if(Mr.to!=null&&Mr.to!=ke&&pn>Mr.to&&(pn=Mr.to,Jn=""),Mi.className&&(Hn+=" "+Mi.className),Mi.css&&(vn=(vn?vn+";":"")+Mi.css),Mi.startStyle&&Mr.from==ke&&(ir+=" "+Mi.startStyle),Mi.endStyle&&Mr.to==pn&&(Hr||(Hr=[])).push(Mi.endStyle,Mr.to),Mi.title&&((Ir||(Ir={})).title=Mi.title),Mi.attributes)for(var Po in Mi.attributes)(Ir||(Ir={}))[Po]=Mi.attributes[Po];Mi.collapsed&&(!wr||_r(wr.marker,Mi)<0)&&(wr=Mr)}else Mr.from>ke&&pn>Mr.from&&(pn=Mr.from)}if(Hr)for(var ha=0;ha<Hr.length;ha+=2)Hr[ha+1]==pn&&(Jn+=" "+Hr[ha]);if(!wr||wr.from==ke)for(var No=0;No<Tr.length;++No)Hi(ct,0,Tr[No]);if(wr&&(wr.from||0)==ke){if(Hi(ct,(wr.to==null?Te+1:wr.to)-ke,wr.marker,wr.from==null),wr.to==null)return;wr.to==ke&&(wr=!1)}}if(ke>=Te)break;for(var gs=Math.min(Te,pn);;){if(rn){var Ha=ke+rn.length;if(!wr){var na=Ha>gs?rn.slice(0,gs-ke):rn;ct.addToken(ct,na,ze?ze+Hn:Hn,ir,ke+na.length==pn?Jn:"",vn,Ir)}if(Ha>=gs){rn=rn.slice(gs-ke),ke=gs;break}ke=Ha,ir=""}rn=Ot.slice(qt,qt=kt[Ie++]),ze=Ja(kt[Ie++],ct.cm.options)}}}function _l(rt,ct,kt){this.line=ct,this.rest=eo(ct),this.size=this.rest?Oe(ge(this.rest))-kt+1:1,this.node=this.text=null,this.hidden=Mn(rt,ct)}function Xi(rt,ct,kt){for(var bt=[],Ot,qt=ct;qt<kt;qt=Ot){var me=new _l(rt.doc,Nn(rt.doc,qt),qt);Ot=qt+me.size,bt.push(me)}return bt}var Ro=null;function Pl(rt){Ro?Ro.ops.push(rt):rt.ownsGroup=Ro={ops:[rt],delayedCallbacks:[]}}function pa(rt){var ct=rt.delayedCallbacks,kt=0;do{for(;kt<ct.length;kt++)ct[kt].call(null);for(var bt=0;bt<rt.ops.length;bt++){var Ot=rt.ops[bt];if(Ot.cursorActivityHandlers)for(;Ot.cursorActivityCalled<Ot.cursorActivityHandlers.length;)Ot.cursorActivityHandlers[Ot.cursorActivityCalled++].call(null,Ot.cm)}}while(kt<ct.length)}function Ys(rt,ct){var kt=rt.ownsGroup;if(kt)try{pa(kt)}finally{Ro=null,ct(kt)}}var us=null;function Ar(rt,ct){var kt=Ze(rt,ct);if(kt.length){var bt=Array.prototype.slice.call(arguments,2),Ot;Ro?Ot=Ro.delayedCallbacks:us?Ot=us:(Ot=us=[],setTimeout(ta,0));for(var qt=function(Te){Ot.push(function(){return kt[Te].apply(null,bt)})},me=0;me<kt.length;++me)qt(me)}}function ta(){var rt=us;us=null;for(var ct=0;ct<rt.length;++ct)rt[ct]()}function Tu(rt,ct,kt,bt){for(var Ot=0;Ot<ct.changes.length;Ot++){var qt=ct.changes[Ot];qt=="text"?jn(rt,ct):qt=="gutter"?vi(rt,ct,kt,bt):qt=="class"?Wr(rt,ct):qt=="widget"&&$i(rt,ct,bt)}ct.changes=null}function Qa(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 mi(rt,ct){var kt=ct.bgClass?ct.bgClass+" "+(ct.line.bgClass||""):ct.line.bgClass;if(kt&&(kt+=" CodeMirror-linebackground"),ct.background)kt?ct.background.className=kt:(ct.background.parentNode.removeChild(ct.background),ct.background=null);else if(kt){var bt=Qa(ct);ct.background=bt.insertBefore(Nt("div",null,kt),bt.firstChild),rt.display.input.setUneditable(ct.background)}}function Ti(rt,ct){var kt=rt.display.externalMeasured;return kt&&kt.line==ct.line?(rt.display.externalMeasured=null,ct.measure=kt.measure,kt.built):on(rt,ct)}function jn(rt,ct){var kt=ct.text.className,bt=Ti(rt,ct);ct.text==ct.node&&(ct.node=bt.pre),ct.text.parentNode.replaceChild(bt.pre,ct.text),ct.text=bt.pre,bt.bgClass!=ct.bgClass||bt.textClass!=ct.textClass?(ct.bgClass=bt.bgClass,ct.textClass=bt.textClass,Wr(rt,ct)):kt&&(ct.text.className=kt)}function Wr(rt,ct){mi(rt,ct),ct.line.wrapClass?Qa(ct).className=ct.line.wrapClass:ct.node!=ct.text&&(ct.node.className="");var kt=ct.textClass?ct.textClass+" "+(ct.line.textClass||""):ct.line.textClass;ct.text.className=kt||""}function vi(rt,ct,kt,bt){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=Qa(ct);ct.gutterBackground=Nt("div",null,"CodeMirror-gutter-background "+ct.line.gutterClass,"left: "+(rt.options.fixedGutter?bt.fixedPos:-bt.gutterTotalWidth)+"px; width: "+bt.gutterTotalWidth+"px"),rt.display.input.setUneditable(ct.gutterBackground),Ot.insertBefore(ct.gutterBackground,ct.text)}var qt=ct.line.gutterMarkers;if(rt.options.lineNumbers||qt){var me=Qa(ct),Te=ct.gutter=Nt("div",null,"CodeMirror-gutter-wrapper","left: "+(rt.options.fixedGutter?bt.fixedPos:-bt.gutterTotalWidth)+"px");if(rt.display.input.setUneditable(Te),me.insertBefore(Te,ct.text),ct.line.gutterClass&&(Te.className+=" "+ct.line.gutterClass),rt.options.lineNumbers&&(!qt||!qt["CodeMirror-linenumbers"])&&(ct.lineNumber=Te.appendChild(Nt("div",Gn(rt.options,kt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+bt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+rt.display.lineNumInnerWidth+"px"))),qt)for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=rt.display.gutterSpecs[ke].className,rn=qt.hasOwnProperty(Ie)&&qt[Ie];rn&&Te.appendChild(Nt("div",[rn],"CodeMirror-gutter-elt","left: "+bt.gutterLeft[Ie]+"px; width: "+bt.gutterWidth[Ie]+"px"))}}}function $i(rt,ct,kt){ct.alignable&&(ct.alignable=null);for(var bt=At("CodeMirror-linewidget"),Ot=ct.node.firstChild,qt=void 0;Ot;Ot=qt)qt=Ot.nextSibling,bt.test(Ot.className)&&ct.node.removeChild(Ot);$a(rt,ct,kt)}function hs(rt,ct,kt,bt){var Ot=Ti(rt,ct);return ct.text=ct.node=Ot.pre,Ot.bgClass&&(ct.bgClass=Ot.bgClass),Ot.textClass&&(ct.textClass=Ot.textClass),Wr(rt,ct),vi(rt,ct,kt,bt),$a(rt,ct,bt),ct.node}function $a(rt,ct,kt){if(ei(rt,ct.line,ct,kt,!0),ct.rest)for(var bt=0;bt<ct.rest.length;bt++)ei(rt,ct.rest[bt],ct,kt,!1)}function ei(rt,ct,kt,bt,Ot){if(ct.widgets)for(var qt=Qa(kt),me=0,Te=ct.widgets;me<Te.length;++me){var ke=Te[me],Ie=Nt("div",[ke.node],"CodeMirror-linewidget"+(ke.className?" "+ke.className:""));ke.handleMouseEvents||Ie.setAttribute("cm-ignore-events","true"),Yo(ke,Ie,kt,bt),rt.display.input.setUneditable(Ie),Ot&&ke.above?qt.insertBefore(Ie,kt.gutter||kt.text):qt.appendChild(Ie),Ar(ke,"redraw")}}function Yo(rt,ct,kt,bt){if(rt.noHScroll){(kt.alignable||(kt.alignable=[])).push(ct);var Ot=bt.wrapperWidth;ct.style.left=bt.fixedPos+"px",rt.coverGutter||(Ot-=bt.gutterTotalWidth,ct.style.paddingLeft=bt.gutterTotalWidth+"px"),ct.style.width=Ot+"px"}rt.coverGutter&&(ct.style.zIndex=5,ct.style.position="relative",rt.noHScroll||(ct.style.marginLeft=-bt.gutterTotalWidth+"px"))}function Na(rt){if(rt.height!=null)return rt.height;var ct=rt.doc.cm;if(!ct)return 0;if(!Yt(document.body,rt.node)){var kt="position: relative;";rt.coverGutter&&(kt+="margin-left: -"+ct.display.gutters.offsetWidth+"px;"),rt.noHScroll&&(kt+="width: "+ct.display.wrapper.clientWidth+"px;"),jt(ct.display.measure,Nt("div",[rt.node],null,kt))}return rt.height=rt.node.parentNode.offsetHeight}function Jo(rt,ct){for(var kt=vr(ct);kt!=rt.wrapper;kt=kt.parentNode)if(!kt||kt.nodeType==1&&kt.getAttribute("cm-ignore-events")=="true"||kt.parentNode==rt.sizer&&kt!=rt.mover)return!0}function ja(rt){return rt.lineSpace.offsetTop}function Cl(rt){return rt.mover.offsetHeight-rt.lineSpace.offsetHeight}function Js(rt){if(rt.cachedPaddingH)return rt.cachedPaddingH;var ct=jt(rt.measure,Nt("pre","x","CodeMirror-line-like")),kt=window.getComputedStyle?window.getComputedStyle(ct):ct.currentStyle,bt={left:parseInt(kt.paddingLeft),right:parseInt(kt.paddingRight)};return!isNaN(bt.left)&&!isNaN(bt.right)&&(rt.cachedPaddingH=bt),bt}function _o(rt){return we-rt.display.nativeBarWidth}function cs(rt){return rt.display.scroller.clientWidth-_o(rt)-rt.display.barWidth}function gh(rt){return rt.display.scroller.clientHeight-_o(rt)-rt.display.barHeight}function Zc(rt,ct,kt){var bt=rt.options.lineWrapping,Ot=bt&&cs(rt);if(!ct.measure.heights||bt&&ct.measure.width!=Ot){var qt=ct.measure.heights=[];if(bt){ct.measure.width=Ot;for(var me=ct.text.firstChild.getClientRects(),Te=0;Te<me.length-1;Te++){var ke=me[Te],Ie=me[Te+1];Math.abs(ke.bottom-Ie.bottom)>2&&qt.push((ke.bottom+Ie.top)/2-kt.top)}}qt.push(kt.bottom-kt.top)}}function kl(rt,ct,kt){if(rt.line==ct)return{map:rt.measure.map,cache:rt.measure.cache};for(var bt=0;bt<rt.rest.length;bt++)if(rt.rest[bt]==ct)return{map:rt.measure.maps[bt],cache:rt.measure.caches[bt]};for(var Ot=0;Ot<rt.rest.length;Ot++)if(Oe(rt.rest[Ot])>kt)return{map:rt.measure.maps[Ot],cache:rt.measure.caches[Ot],before:!0}}function Xc(rt,ct){ct=Br(ct);var kt=Oe(ct),bt=rt.display.externalMeasured=new _l(rt.doc,ct,kt);bt.lineN=kt;var Ot=bt.built=on(rt,bt);return bt.text=Ot.pre,jt(rt.display.lineMeasure,Ot.pre),bt}function sc(rt,ct,kt,bt){return Fs(rt,zl(rt,ct),kt,bt)}function mh(rt,ct){if(ct>=rt.display.viewFrom&&ct<rt.display.viewTo)return rt.display.view[Is(rt,ct)];var kt=rt.display.externalMeasured;if(kt&&ct>=kt.lineN&&ct<kt.lineN+kt.size)return kt}function zl(rt,ct){var kt=Oe(ct),bt=mh(rt,kt);bt&&!bt.text?bt=null:bt&&bt.changes&&(Tu(rt,bt,kt,Wf(rt)),rt.curOp.forceUpdate=!0),bt||(bt=Xc(rt,ct));var Ot=kl(bt,ct,kt);return{line:ct,view:bt,rect:null,map:Ot.map,cache:Ot.cache,before:Ot.before,hasHeights:!1}}function Fs(rt,ct,kt,bt,Ot){ct.before&&(kt=-1);var qt=kt+(bt||""),me;return ct.cache.hasOwnProperty(qt)?me=ct.cache[qt]:(ct.rect||(ct.rect=ct.view.text.getBoundingClientRect()),ct.hasHeights||(Zc(rt,ct.view,ct.rect),ct.hasHeights=!0),me=Lo(rt,ct,kt,bt),me.bogus||(ct.cache[qt]=me)),{left:me.left,right:me.right,top:Ot?me.rtop:me.top,bottom:Ot?me.rbottom:me.bottom}}var vh={left:0,right:0,top:0,bottom:0};function lc(rt,ct,kt){for(var bt,Ot,qt,me,Te,ke,Ie=0;Ie<rt.length;Ie+=3)if(Te=rt[Ie],ke=rt[Ie+1],ct<Te?(Ot=0,qt=1,me="left"):ct<ke?(Ot=ct-Te,qt=Ot+1):(Ie==rt.length-3||ct==ke&&rt[Ie+3]>ct)&&(qt=ke-Te,Ot=qt-1,ct>=ke&&(me="right")),Ot!=null){if(bt=rt[Ie+2],Te==ke&&kt==(bt.insertLeft?"left":"right")&&(me=kt),kt=="left"&&Ot==0)for(;Ie&&rt[Ie-2]==rt[Ie-3]&&rt[Ie-1].insertLeft;)bt=rt[(Ie-=3)+2],me="left";if(kt=="right"&&Ot==ke-Te)for(;Ie<rt.length-3&&rt[Ie+3]==rt[Ie+4]&&!rt[Ie+5].insertLeft;)bt=rt[(Ie+=3)+2],me="right";break}return{node:bt,start:Ot,end:qt,collapse:me,coverStart:Te,coverEnd:ke}}function uc(rt,ct){var kt=vh;if(ct=="left")for(var bt=0;bt<rt.length&&(kt=rt[bt]).left==kt.right;bt++);else for(var Ot=rt.length-1;Ot>=0&&(kt=rt[Ot]).left==kt.right;Ot--);return kt}function Lo(rt,ct,kt,bt){var Ot=lc(ct.map,kt,bt),qt=Ot.node,me=Ot.start,Te=Ot.end,ke=Ot.collapse,Ie;if(qt.nodeType==3){for(var rn=0;rn<4;rn++){for(;me&&Wt(ct.line.text.charAt(Ot.coverStart+me));)--me;for(;Ot.coverStart+Te<Ot.coverEnd&&Wt(ct.line.text.charAt(Ot.coverStart+Te));)++Te;if(Bt&&vt<9&&me==0&&Te==Ot.coverEnd-Ot.coverStart?Ie=qt.parentNode.getBoundingClientRect():Ie=uc(Ht(qt,me,Te).getClientRects(),bt),Ie.left||Ie.right||me==0)break;Te=me,me=me-1,ke="right"}Bt&&vt<11&&(Ie=Uf(rt.display.measure,Ie))}else{me>0&&(ke=bt="right");var ze;rt.options.lineWrapping&&(ze=qt.getClientRects()).length>1?Ie=ze[bt=="right"?ze.length-1:0]:Ie=qt.getBoundingClientRect()}if(Bt&&vt<9&&!me&&(!Ie||!Ie.left&&!Ie.right)){var vn=qt.parentNode.getClientRects()[0];vn?Ie={left:vn.left,right:vn.left+xh(rt.display),top:vn.top,bottom:vn.bottom}:Ie=vh}for(var pn=Ie.top-ct.rect.top,Hn=Ie.bottom-ct.rect.top,Jn=(pn+Hn)/2,ir=ct.view.measure.heights,wr=0;wr<ir.length-1&&!(Jn<ir[wr]);wr++);var Ir=wr?ir[wr-1]:0,Tr=ir[wr],Hr={left:(ke=="right"?Ie.right:Ie.left)-ct.rect.left,right:(ke=="left"?Ie.left:Ie.right)-ct.rect.left,top:Ir,bottom:Tr};return!Ie.left&&!Ie.right&&(Hr.bogus=!0),rt.options.singleCursorHeightPerLine||(Hr.rtop=pn,Hr.rbottom=Hn),Hr}function Uf(rt,ct){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Dr(rt))return ct;var kt=screen.logicalXDPI/screen.deviceXDPI,bt=screen.logicalYDPI/screen.deviceYDPI;return{left:ct.left*kt,right:ct.right*kt,top:ct.top*bt,bottom:ct.bottom*bt}}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 yh(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 Lu(rt){yh(rt),rt.display.cachedCharWidth=rt.display.cachedTextHeight=rt.display.cachedPaddingH=null,rt.options.lineWrapping||(rt.display.maxLineChanged=!0),rt.display.lineNumChars=null}function Oa(){return Ct&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Fa(){return Ct&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Go(rt){var ct=0;if(rt.widgets)for(var kt=0;kt<rt.widgets.length;++kt)rt.widgets[kt].above&&(ct+=Na(rt.widgets[kt]));return ct}function Qo(rt,ct,kt,bt,Ot){if(!Ot){var qt=Go(ct);kt.top+=qt,kt.bottom+=qt}if(bt=="line")return kt;bt||(bt="local");var me=yi(ct);if(bt=="local"?me+=ja(rt.display):me-=rt.display.viewOffset,bt=="page"||bt=="window"){var Te=rt.display.lineSpace.getBoundingClientRect();me+=Te.top+(bt=="window"?0:Fa());var ke=Te.left+(bt=="window"?0:Oa());kt.left+=ke,kt.right+=ke}return kt.top+=me,kt.bottom+=me,kt}function Vi(rt,ct,kt){if(kt=="div")return ct;var bt=ct.left,Ot=ct.top;if(kt=="page")bt-=Oa(),Ot-=Fa();else if(kt=="local"||!kt){var qt=rt.display.sizer.getBoundingClientRect();bt+=qt.left,Ot+=qt.top}var me=rt.display.lineSpace.getBoundingClientRect();return{left:bt-me.left,top:Ot-me.top}}function Li(rt,ct,kt,bt,Ot){return bt||(bt=Nn(rt.doc,ct.line)),Qo(rt,bt,sc(rt,bt,ct.ch,Ot),kt)}function Ri(rt,ct,kt,bt,Ot,qt){bt=bt||Nn(rt.doc,ct.line),Ot||(Ot=zl(rt,bt));function me(Hn,Jn){var ir=Fs(rt,Ot,Hn,Jn?"right":"left",qt);return Jn?ir.left=ir.right:ir.right=ir.left,Qo(rt,bt,ir,kt)}var Te=tn(bt,rt.doc.direction),ke=ct.ch,Ie=ct.sticky;if(ke>=bt.text.length?(ke=bt.text.length,Ie="before"):ke<=0&&(ke=0,Ie="after"),!Te)return me(Ie=="before"?ke-1:ke,Ie=="before");function rn(Hn,Jn,ir){var wr=Te[Jn],Ir=wr.level==1;return me(ir?Hn-1:Hn,Ir!=ir)}var ze=Le(Te,ke,Ie),vn=Ae,pn=rn(ke,ze,Ie=="before");return vn!=null&&(pn.other=rn(ke,vn,Ie!="before")),pn}function Da(rt,ct){var kt=0;ct=Wn(rt.doc,ct),rt.options.lineWrapping||(kt=xh(rt.display)*ct.ch);var bt=Nn(rt.doc,ct.line),Ot=yi(bt)+ja(rt.display);return{left:kt,right:kt,top:Ot,bottom:Ot+bt.height}}function Uo(rt,ct,kt,bt,Ot){var qt=sn(rt,ct,kt);return qt.xRel=Ot,bt&&(qt.outside=bt),qt}function aa(rt,ct,kt){var bt=rt.doc;if(kt+=rt.display.viewOffset,kt<0)return Uo(bt.first,0,null,-1,-1);var Ot=ln(bt,kt),qt=bt.first+bt.size-1;if(Ot>qt)return Uo(bt.first+bt.size-1,Nn(bt,qt).text.length,null,1,1);ct<0&&(ct=0);for(var me=Nn(bt,Ot);;){var Te=kn(rt,me,Ot,ct,kt),ke=br(me,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;me=Nn(bt,Ot=Ie.line)}}function Cr(rt,ct,kt,bt){bt-=Go(ct);var Ot=ct.text.length,qt=ue(function(me){return Fs(rt,kt,me-1).bottom<=bt},Ot,0);return Ot=ue(function(me){return Fs(rt,kt,me).top>bt},qt,Ot),{begin:qt,end:Ot}}function Ds(rt,ct,kt,bt){kt||(kt=zl(rt,ct));var Ot=Qo(rt,ct,Fs(rt,kt,bt),"line").top;return Cr(rt,ct,kt,Ot)}function Ue(rt,ct,kt,bt){return rt.bottom<=kt?!1:rt.top>kt?!0:(bt?rt.left:rt.right)>ct}function kn(rt,ct,kt,bt,Ot){Ot-=yi(ct);var qt=zl(rt,ct),me=Go(ct),Te=0,ke=ct.text.length,Ie=!0,rn=tn(ct,rt.doc.direction);if(rn){var ze=(rt.options.lineWrapping?Sh:Gl)(rt,ct,kt,qt,rn,bt,Ot);Ie=ze.level!=1,Te=Ie?ze.from:ze.to-1,ke=Ie?ze.to:ze.from-1}var vn=null,pn=null,Hn=ue(function(fi){var Mr=Fs(rt,qt,fi);return Mr.top+=me,Mr.bottom+=me,Ue(Mr,bt,Ot,!1)?(Mr.top<=Ot&&Mr.left<=bt&&(vn=fi,pn=Mr),!0):!1},Te,ke),Jn,ir,wr=!1;if(pn){var Ir=bt-pn.left<pn.right-bt,Tr=Ir==Ie;Hn=vn+(Tr?0:1),ir=Tr?"after":"before",Jn=Ir?pn.left:pn.right}else{!Ie&&(Hn==ke||Hn==Te)&&Hn++,ir=Hn==0?"after":Hn==ct.text.length?"before":Fs(rt,qt,Hn-(Ie?1:0)).bottom+me<=Ot==Ie?"after":"before";var Hr=Ri(rt,sn(kt,Hn,ir),"line",ct,qt);Jn=Hr.left,wr=Ot<Hr.top?-1:Ot>=Hr.bottom?1:0}return Hn=te(ct.text,Hn,1),Uo(kt,Hn,ir,wr,bt-Jn)}function Gl(rt,ct,kt,bt,Ot,qt,me){var Te=ue(function(ze){var vn=Ot[ze],pn=vn.level!=1;return Ue(Ri(rt,sn(kt,pn?vn.to:vn.from,pn?"before":"after"),"line",ct,bt),qt,me,!0)},0,Ot.length-1),ke=Ot[Te];if(Te>0){var Ie=ke.level!=1,rn=Ri(rt,sn(kt,Ie?ke.from:ke.to,Ie?"after":"before"),"line",ct,bt);Ue(rn,qt,me,!0)&&rn.top>me&&(ke=Ot[Te-1])}return ke}function Sh(rt,ct,kt,bt,Ot,qt,me){var Te=Cr(rt,ct,bt,me),ke=Te.begin,Ie=Te.end;/\s/.test(ct.text.charAt(Ie-1))&&Ie--;for(var rn=null,ze=null,vn=0;vn<Ot.length;vn++){var pn=Ot[vn];if(!(pn.from>=Ie||pn.to<=ke)){var Hn=pn.level!=1,Jn=Fs(rt,bt,Hn?Math.min(Ie,pn.to)-1:Math.max(ke,pn.from)).right,ir=Jn<qt?qt-Jn+1e9:Jn-qt;(!rn||ze>ir)&&(rn=pn,ze=ir)}}return rn||(rn=Ot[Ot.length-1]),rn.from<ke&&(rn={from:ke,to:rn.to,level:rn.level}),rn.to>Ie&&(rn={from:rn.from,to:Ie,level:rn.level}),rn}var Bs;function su(rt){if(rt.cachedTextHeight!=null)return rt.cachedTextHeight;if(Bs==null){Bs=Nt("pre",null,"CodeMirror-line-like");for(var ct=0;ct<49;++ct)Bs.appendChild(document.createTextNode("x")),Bs.appendChild(Nt("br"));Bs.appendChild(document.createTextNode("x"))}jt(rt.measure,Bs);var kt=Bs.offsetHeight/50;return kt>3&&(rt.cachedTextHeight=kt),Ft(rt.measure),kt||1}function xh(rt){if(rt.cachedCharWidth!=null)return rt.cachedCharWidth;var ct=Nt("span","xxxxxxxxxx"),kt=Nt("pre",[ct],"CodeMirror-line-like");jt(rt.measure,kt);var bt=ct.getBoundingClientRect(),Ot=(bt.right-bt.left)/10;return Ot>2&&(rt.cachedCharWidth=Ot),Ot||10}function Wf(rt){for(var ct=rt.display,kt={},bt={},Ot=ct.gutters.clientLeft,qt=ct.gutters.firstChild,me=0;qt;qt=qt.nextSibling,++me){var Te=rt.display.gutterSpecs[me].className;kt[Te]=qt.offsetLeft+qt.clientLeft+Ot,bt[Te]=qt.clientWidth}return{fixedPos:Yc(ct),gutterTotalWidth:ct.gutters.offsetWidth,gutterLeft:kt,gutterWidth:bt,wrapperWidth:ct.wrapper.clientWidth}}function Yc(rt){return rt.scroller.getBoundingClientRect().left-rt.sizer.getBoundingClientRect().left}function wo(rt){var ct=su(rt.display),kt=rt.options.lineWrapping,bt=kt&&Math.max(5,rt.display.scroller.clientWidth/xh(rt.display)-3);return function(Ot){if(Mn(rt.doc,Ot))return 0;var qt=0;if(Ot.widgets)for(var me=0;me<Ot.widgets.length;me++)Ot.widgets[me].height&&(qt+=Ot.widgets[me].height);return kt?qt+(Math.ceil(Ot.text.length/bt)||1)*ct:qt+ct}}function ri(rt){var ct=rt.doc,kt=wo(rt);ct.iter(function(bt){var Ot=kt(bt);Ot!=bt.height&&Dn(bt,Ot)})}function qa(rt,ct,kt,bt){var Ot=rt.display;if(!kt&&vr(ct).getAttribute("cm-not-content")=="true")return null;var qt,me,Te=Ot.lineSpace.getBoundingClientRect();try{qt=ct.clientX-Te.left,me=ct.clientY-Te.top}catch(ze){return null}var ke=aa(rt,qt,me),Ie;if(bt&&ke.xRel>0&&(Ie=Nn(rt.doc,ke.line).text).length==ke.ch){var rn=Qt(Ie,Ie.length,rt.options.tabSize)-Ie.length;ke=sn(ke.line,Math.max(0,Math.round((qt-Js(rt.display).left)/xh(rt.display))-rn))}return ke}function Is(rt,ct){if(ct>=rt.display.viewTo||(ct-=rt.display.viewFrom,ct<0))return null;for(var kt=rt.display.view,bt=0;bt<kt.length;bt++)if(ct-=kt[bt].size,ct<0)return bt}function bo(rt,ct,kt,bt){ct==null&&(ct=rt.doc.first),kt==null&&(kt=rt.doc.first+rt.doc.size),bt||(bt=0);var Ot=rt.display;if(bt&&kt<Ot.viewTo&&(Ot.updateLineNumbers==null||Ot.updateLineNumbers>ct)&&(Ot.updateLineNumbers=ct),rt.curOp.viewChanged=!0,ct>=Ot.viewTo)wn&&Or(rt.doc,ct)<Ot.viewTo&&Wo(rt);else if(kt<=Ot.viewFrom)wn&&Er(rt.doc,kt+bt)>Ot.viewFrom?Wo(rt):(Ot.viewFrom+=bt,Ot.viewTo+=bt);else if(ct<=Ot.viewFrom&&kt>=Ot.viewTo)Wo(rt);else if(ct<=Ot.viewFrom){var qt=fs(rt,kt,kt+bt,1);qt?(Ot.view=Ot.view.slice(qt.index),Ot.viewFrom=qt.lineN,Ot.viewTo+=bt):Wo(rt)}else if(kt>=Ot.viewTo){var me=fs(rt,ct,ct,-1);me?(Ot.view=Ot.view.slice(0,me.index),Ot.viewTo=me.lineN):Wo(rt)}else{var Te=fs(rt,ct,ct,-1),ke=fs(rt,kt,kt+bt,1);Te&&ke?(Ot.view=Ot.view.slice(0,Te.index).concat(Xi(rt,Te.lineN,ke.lineN)).concat(Ot.view.slice(ke.index)),Ot.viewTo+=bt):Wo(rt)}var Ie=Ot.externalMeasured;Ie&&(kt<Ie.lineN?Ie.lineN+=bt:ct<Ie.lineN+Ie.size&&(Ot.externalMeasured=null))}function ki(rt,ct,kt){rt.curOp.viewChanged=!0;var bt=rt.display,Ot=rt.display.externalMeasured;if(Ot&&ct>=Ot.lineN&&ct<Ot.lineN+Ot.size&&(bt.externalMeasured=null),!(ct<bt.viewFrom||ct>=bt.viewTo)){var qt=bt.view[Is(rt,ct)];if(qt.node!=null){var me=qt.changes||(qt.changes=[]);ye(me,kt)==-1&&me.push(kt)}}}function Wo(rt){rt.display.viewFrom=rt.display.viewTo=rt.doc.first,rt.display.view=[],rt.display.viewOffset=0}function fs(rt,ct,kt,bt){var Ot=Is(rt,ct),qt,me=rt.display.view;if(!wn||kt==rt.doc.first+rt.doc.size)return{index:Ot,lineN:kt};for(var Te=rt.display.viewFrom,ke=0;ke<Ot;ke++)Te+=me[ke].size;if(Te!=ct){if(bt>0){if(Ot==me.length-1)return null;qt=Te+me[Ot].size-ct,Ot++}else qt=Te-ct;ct+=qt,kt+=qt}for(;Or(rt.doc,kt)!=kt;){if(Ot==(bt<0?0:me.length-1))return null;kt+=bt*me[Ot-(bt<0?1:0)].size,Ot+=bt}return{index:Ot,lineN:kt}}function ho(rt,ct,kt){var bt=rt.display,Ot=bt.view;Ot.length==0||ct>=bt.viewTo||kt<=bt.viewFrom?(bt.view=Xi(rt,ct,kt),bt.viewFrom=ct):(bt.viewFrom>ct?bt.view=Xi(rt,ct,bt.viewFrom).concat(bt.view):bt.viewFrom<ct&&(bt.view=bt.view.slice(Is(rt,ct))),bt.viewFrom=ct,bt.viewTo<kt?bt.view=bt.view.concat(Xi(rt,bt.viewTo,kt)):bt.viewTo>kt&&(bt.view=bt.view.slice(0,Is(rt,kt)))),bt.viewTo=kt}function ws(rt){for(var ct=rt.display.view,kt=0,bt=0;bt<ct.length;bt++){var Ot=ct[bt];!Ot.hidden&&(!Ot.node||Ot.changes)&&++kt}return kt}function sa(rt){rt.display.input.showSelection(rt.display.input.prepareSelection())}function Au(rt,ct){ct===void 0&&(ct=!0);for(var kt=rt.doc,bt={},Ot=bt.cursors=document.createDocumentFragment(),qt=bt.selection=document.createDocumentFragment(),me=0;me<kt.sel.ranges.length;me++)if(!(!ct&&me==kt.sel.primIndex)){var Te=kt.sel.ranges[me];if(!(Te.from().line>=rt.display.viewTo||Te.to().line<rt.display.viewFrom)){var ke=Te.empty();(ke||rt.options.showCursorWhenSelecting)&&Ii(rt,Te.head,Ot),ke||Di(rt,Te,qt)}}return bt}function Ii(rt,ct,kt){var bt=Ri(rt,ct,"div",null,null,!rt.options.singleCursorHeightPerLine),Ot=kt.appendChild(Nt("div","\xA0","CodeMirror-cursor"));if(Ot.style.left=bt.left+"px",Ot.style.top=bt.top+"px",Ot.style.height=Math.max(0,bt.bottom-bt.top)*rt.options.cursorHeight+"px",bt.other){var qt=kt.appendChild(Nt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));qt.style.display="",qt.style.left=bt.other.left+"px",qt.style.top=bt.other.top+"px",qt.style.height=(bt.other.bottom-bt.other.top)*.85+"px"}}function ts(rt,ct){return rt.top-ct.top||rt.left-ct.left}function Di(rt,ct,kt){var bt=rt.display,Ot=rt.doc,qt=document.createDocumentFragment(),me=Js(rt.display),Te=me.left,ke=Math.max(bt.sizerWidth,cs(rt)-bt.sizer.offsetLeft)-me.right,Ie=Ot.direction=="ltr";function rn(Tr,Hr,fi,Mr){Hr<0&&(Hr=0),Hr=Math.round(Hr),Mr=Math.round(Mr),qt.appendChild(Nt("div",null,"CodeMirror-selected","position: absolute; left: "+Tr+`px;
|
|
top: `+Hr+"px; width: "+(fi==null?ke-Tr:fi)+`px;
|
|
height: `+(Mr-Hr)+"px"))}function ze(Tr,Hr,fi){var Mr=Nn(Ot,Tr),Mi=Mr.text.length,Po,ha;function No(na,ks){return Li(rt,sn(Tr,na),"div",Mr,ks)}function gs(na,ks,Ia){var ra=Ds(rt,Mr,null,na),Yi=ks=="ltr"==(Ia=="after")?"left":"right",Do=Ia=="after"?ra.begin:ra.end-(/\s/.test(Mr.text.charAt(ra.end-1))?2:1);return No(Do,Yi)[Yi]}var Ha=tn(Mr,Ot.direction);return le(Ha,Hr||0,fi==null?Mi:fi,function(na,ks,Ia,ra){var Yi=Ia=="ltr",Do=No(na,Yi?"left":"right"),xa=No(ks-1,Yi?"right":"left"),Ra=Hr==null&&na==0,fl=fi==null&&ks==Mi,jo=ra==0,nl=!Ha||ra==Ha.length-1;if(xa.top-Do.top<=3){var zo=(Ie?Ra:fl)&&jo,Sf=(Ie?fl:Ra)&&nl,Gs=zo?Te:(Yi?Do:xa).left,Es=Sf?ke:(Yi?xa:Do).right;rn(Gs,Do.top,Es-Gs,Do.bottom)}else{var ms,fo,wa,Zl;Yi?(ms=Ie&&Ra&&jo?Te:Do.left,fo=Ie?ke:gs(na,Ia,"before"),wa=Ie?Te:gs(ks,Ia,"after"),Zl=Ie&&fl&&nl?ke:xa.right):(ms=Ie?gs(na,Ia,"before"):Te,fo=!Ie&&Ra&&jo?ke:Do.right,wa=!Ie&&fl&&nl?Te:xa.left,Zl=Ie?gs(ks,Ia,"after"):ke),rn(ms,Do.top,fo-ms,Do.bottom),Do.bottom<xa.top&&rn(Te,Do.bottom,null,xa.top),rn(wa,xa.top,Zl-wa,xa.bottom)}(!Po||ts(Do,Po)<0)&&(Po=Do),ts(xa,Po)<0&&(Po=xa),(!ha||ts(Do,ha)<0)&&(ha=Do),ts(xa,ha)<0&&(ha=xa)}),{start:Po,end:ha}}var vn=ct.from(),pn=ct.to();if(vn.line==pn.line)ze(vn.line,vn.ch,pn.ch);else{var Hn=Nn(Ot,vn.line),Jn=Nn(Ot,pn.line),ir=Br(Hn)==Br(Jn),wr=ze(vn.line,vn.ch,ir?Hn.text.length+1:null).end,Ir=ze(pn.line,ir?0:null,pn.ch).start;ir&&(wr.top<Ir.top-2?(rn(wr.right,wr.top,null,wr.bottom),rn(Te,Ir.top,Ir.left,Ir.bottom)):rn(wr.right,wr.top,Ir.left-wr.right,wr.bottom)),wr.bottom<Ir.top&&rn(Te,wr.bottom,null,Ir.top)}kt.appendChild(qt)}function io(rt){if(rt.state.focused){var ct=rt.display;clearInterval(ct.blinker);var kt=!0;ct.cursorDiv.style.visibility="",rt.options.cursorBlinkRate>0?ct.blinker=setInterval(function(){rt.hasFocus()||wh(rt),ct.cursorDiv.style.visibility=(kt=!kt)?"":"hidden"},rt.options.cursorBlinkRate):rt.options.cursorBlinkRate<0&&(ct.cursorDiv.style.visibility="hidden")}}function vo(rt){rt.state.focused||(rt.display.input.focus(),_i(rt))}function Eo(rt){rt.state.delayingBlurEvent=!0,setTimeout(function(){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1,wh(rt))},100)}function _i(rt,ct){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1),rt.options.readOnly!="nocursor"&&(rt.state.focused||(We(rt,"focus",rt,ct),rt.state.focused=!0,Vt(rt.display.wrapper,"CodeMirror-focused"),!rt.curOp&&rt.display.selForContextMenu!=rt.doc.sel&&(rt.display.input.reset(),gt&&setTimeout(function(){return rt.display.input.reset(!0)},20)),rt.display.input.receivedFocus()),io(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,kt=ct.lineDiv.offsetTop,bt=0;bt<ct.view.length;bt++){var Ot=ct.view[bt],qt=rt.options.lineWrapping,me=void 0,Te=0;if(!Ot.hidden){if(Bt&&vt<8){var ke=Ot.node.offsetTop+Ot.node.offsetHeight;me=ke-kt,kt=ke}else{var Ie=Ot.node.getBoundingClientRect();me=Ie.bottom-Ie.top,!qt&&Ot.text.firstChild&&(Te=Ot.text.firstChild.getBoundingClientRect().right-Ie.left-1)}var rn=Ot.line.height-me;if((rn>.005||rn<-.005)&&(Dn(Ot.line,me),Dg(Ot.line),Ot.rest))for(var ze=0;ze<Ot.rest.length;ze++)Dg(Ot.rest[ze]);if(Te>rt.display.sizerWidth){var vn=Math.ceil(Te/xh(rt.display));vn>rt.display.maxLineLength&&(rt.display.maxLineLength=vn,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 kt=rt.widgets[ct],bt=kt.node.parentNode;bt&&(kt.height=bt.offsetHeight)}}function Fi(rt,ct,kt){var bt=kt&&kt.top!=null?Math.max(0,kt.top):rt.scroller.scrollTop;bt=Math.floor(bt-ja(rt));var Ot=kt&&kt.bottom!=null?kt.bottom:bt+rt.wrapper.clientHeight,qt=ln(ct,bt),me=ln(ct,Ot);if(kt&&kt.ensure){var Te=kt.ensure.from.line,ke=kt.ensure.to.line;Te<qt?(qt=Te,me=ln(ct,yi(Nn(ct,Te))+rt.wrapper.clientHeight)):Math.min(ke,ct.lastLine())>=me&&(qt=ln(ct,yi(Nn(ct,ke))-rt.wrapper.clientHeight),me=ke)}return{from:qt,to:Math.max(me,qt+1)}}function Bg(rt,ct){if(!Ke(rt,"scrollCursorIntoView")){var kt=rt.display,bt=kt.sizer.getBoundingClientRect(),Ot=null;if(ct.top+bt.top<0?Ot=!0:ct.bottom+bt.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ot=!1),Ot!=null&&!xt){var qt=Nt("div","\u200B",null,`position: absolute;
|
|
top: `+(ct.top-kt.viewOffset-ja(rt.display))+`px;
|
|
height: `+(ct.bottom-ct.top+_o(rt)+kt.barHeight)+`px;
|
|
left: `+ct.left+"px; width: "+Math.max(2,ct.right-ct.left)+"px;");rt.display.lineSpace.appendChild(qt),qt.scrollIntoView(Ot),rt.display.lineSpace.removeChild(qt)}}}function cc(rt,ct,kt,bt){bt==null&&(bt=0);var Ot;!rt.options.lineWrapping&&ct==kt&&(ct=ct.ch?sn(ct.line,ct.sticky=="before"?ct.ch-1:ct.ch,"after"):ct,kt=ct.sticky=="before"?sn(ct.line,ct.ch+1,"before"):ct);for(var qt=0;qt<5;qt++){var me=!1,Te=Ri(rt,ct),ke=!kt||kt==ct?Te:Ri(rt,kt);Ot={left:Math.min(Te.left,ke.left),top:Math.min(Te.top,ke.top)-bt,right:Math.max(Te.left,ke.left),bottom:Math.max(Te.bottom,ke.bottom)+bt};var Ie=ep(rt,Ot),rn=rt.doc.scrollTop,ze=rt.doc.scrollLeft;if(Ie.scrollTop!=null&&(Ph(rt,Ie.scrollTop),Math.abs(rt.doc.scrollTop-rn)>1&&(me=!0)),Ie.scrollLeft!=null&&(uu(rt,Ie.scrollLeft),Math.abs(rt.doc.scrollLeft-ze)>1&&(me=!0)),!me)break}return Ot}function Jc(rt,ct){var kt=ep(rt,ct);kt.scrollTop!=null&&Ph(rt,kt.scrollTop),kt.scrollLeft!=null&&uu(rt,kt.scrollLeft)}function ep(rt,ct){var kt=rt.display,bt=su(rt.display);ct.top<0&&(ct.top=0);var Ot=rt.curOp&&rt.curOp.scrollTop!=null?rt.curOp.scrollTop:kt.scroller.scrollTop,qt=gh(rt),me={};ct.bottom-ct.top>qt&&(ct.bottom=ct.top+qt);var Te=rt.doc.height+Cl(kt),ke=ct.top<bt,Ie=ct.bottom>Te-bt;if(ct.top<Ot)me.scrollTop=ke?0:ct.top;else if(ct.bottom>Ot+qt){var rn=Math.min(ct.top,(Ie?Te:ct.bottom)-qt);rn!=Ot&&(me.scrollTop=rn)}var ze=rt.options.fixedGutter?0:kt.gutters.offsetWidth,vn=rt.curOp&&rt.curOp.scrollLeft!=null?rt.curOp.scrollLeft:kt.scroller.scrollLeft-ze,pn=cs(rt)-kt.gutters.offsetWidth,Hn=ct.right-ct.left>pn;return Hn&&(ct.right=ct.left+pn),ct.left<10?me.scrollLeft=0:ct.left<vn?me.scrollLeft=Math.max(0,ct.left+ze-(Hn?0:10)):ct.right>pn+vn-3&&(me.scrollLeft=ct.right+(Hn?0:10)-pn),me}function Hf(rt,ct){ct!=null&&(Ul(rt),rt.curOp.scrollTop=(rt.curOp.scrollTop==null?rt.doc.scrollTop:rt.curOp.scrollTop)+ct)}function lu(rt){Ul(rt);var ct=rt.getCursor();rt.curOp.scrollToPos={from:ct,to:ct,margin:rt.options.cursorScrollMargin}}function bh(rt,ct,kt){(ct!=null||kt!=null)&&Ul(rt),ct!=null&&(rt.curOp.scrollLeft=ct),kt!=null&&(rt.curOp.scrollTop=kt)}function zi(rt,ct){Ul(rt),rt.curOp.scrollToPos=ct}function Ul(rt){var ct=rt.curOp.scrollToPos;if(ct){rt.curOp.scrollToPos=null;var kt=Da(rt,ct.from),bt=Da(rt,ct.to);Vf(rt,kt,bt,ct.margin)}}function Vf(rt,ct,kt,bt){var Ot=ep(rt,{left:Math.min(ct.left,kt.left),top:Math.min(ct.top,kt.top)-bt,right:Math.max(ct.right,kt.right),bottom:Math.max(ct.bottom,kt.bottom)+bt});bh(rt,Ot.scrollLeft,Ot.scrollTop)}function Ph(rt,ct){Math.abs(rt.doc.scrollTop-ct)<2||(ae||Bu(rt,{top:ct}),np(rt,ct,!0),ae&&Bu(rt),fc(rt,100))}function np(rt,ct,kt){ct=Math.max(0,Math.min(rt.display.scroller.scrollHeight-rt.display.scroller.clientHeight,ct)),!(rt.display.scroller.scrollTop==ct&&!kt)&&(rt.doc.scrollTop=ct,rt.display.scrollbars.setScrollTop(ct),rt.display.scroller.scrollTop!=ct&&(rt.display.scroller.scrollTop=ct))}function uu(rt,ct,kt,bt){ct=Math.max(0,Math.min(ct,rt.display.scroller.scrollWidth-rt.display.scroller.clientWidth)),!((kt?ct==rt.doc.scrollLeft:Math.abs(rt.doc.scrollLeft-ct)<2)&&!bt)&&(rt.doc.scrollLeft=ct,Xf(rt),rt.display.scroller.scrollLeft!=ct&&(rt.display.scroller.scrollLeft=ct),rt.display.scrollbars.setScrollLeft(ct))}function Qs(rt){var ct=rt.display,kt=ct.gutters.offsetWidth,bt=Math.round(rt.doc.height+Cl(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?kt:0,docHeight:bt,scrollHeight:bt+_o(rt)+ct.barHeight,nativeBarWidth:ct.nativeBarWidth,gutterWidth:kt}}var Nu=function(rt,ct,kt){this.cm=kt;var bt=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");bt.tabIndex=Ot.tabIndex=-1,rt(bt),rt(Ot),Qe(bt,"scroll",function(){bt.clientHeight&&ct(bt.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")};Nu.prototype.update=function(rt){var ct=rt.scrollWidth>rt.clientWidth+1,kt=rt.scrollHeight>rt.clientHeight+1,bt=rt.nativeBarWidth;if(kt){this.vert.style.display="block",this.vert.style.bottom=ct?bt+"px":"0";var Ot=rt.viewHeight-(ct?bt: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=kt?bt+"px":"0",this.horiz.style.left=rt.barLeft+"px";var qt=rt.viewWidth-rt.barLeft-(kt?bt:0);this.horiz.firstChild.style.width=Math.max(0,rt.scrollWidth-rt.clientWidth+qt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&rt.clientHeight>0&&(bt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:kt?bt:0,bottom:ct?bt:0}},Nu.prototype.setScrollLeft=function(rt){this.horiz.scrollLeft!=rt&&(this.horiz.scrollLeft=rt),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Nu.prototype.setScrollTop=function(rt){this.vert.scrollTop!=rt&&(this.vert.scrollTop=rt),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Nu.prototype.zeroWidthHack=function(){var rt=at&&!mt?"12px":"18px";this.horiz.style.height=this.vert.style.width=rt,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Nu.prototype.enableZeroWidthBar=function(rt,ct,kt){rt.style.pointerEvents="auto";function bt(){var Ot=rt.getBoundingClientRect(),qt=kt=="vert"?document.elementFromPoint(Ot.right-1,(Ot.top+Ot.bottom)/2):document.elementFromPoint((Ot.right+Ot.left)/2,Ot.bottom-1);qt!=rt?rt.style.pointerEvents="none":ct.set(1e3,bt)}ct.set(1e3,bt)},Nu.prototype.clear=function(){var rt=this.horiz.parentNode;rt.removeChild(this.horiz),rt.removeChild(this.vert)};var El=function(){};El.prototype.update=function(){return{bottom:0,right:0}},El.prototype.setScrollLeft=function(){},El.prototype.setScrollTop=function(){},El.prototype.clear=function(){};function ju(rt,ct){ct||(ct=Qs(rt));var kt=rt.display.barWidth,bt=rt.display.barHeight;Kf(rt,ct);for(var Ot=0;Ot<4&&kt!=rt.display.barWidth||bt!=rt.display.barHeight;Ot++)kt!=rt.display.barWidth&&rt.options.lineWrapping&&Qr(rt),Kf(rt,Qs(rt)),kt=rt.display.barWidth,bt=rt.display.barHeight}function Kf(rt,ct){var kt=rt.display,bt=kt.scrollbars.update(ct);kt.sizer.style.paddingRight=(kt.barWidth=bt.right)+"px",kt.sizer.style.paddingBottom=(kt.barHeight=bt.bottom)+"px",kt.heightForcer.style.borderBottom=bt.bottom+"px solid transparent",bt.right&&bt.bottom?(kt.scrollbarFiller.style.display="block",kt.scrollbarFiller.style.height=bt.bottom+"px",kt.scrollbarFiller.style.width=bt.right+"px"):kt.scrollbarFiller.style.display="",bt.bottom&&rt.options.coverGutterNextToScrollbar&&rt.options.fixedGutter?(kt.gutterFiller.style.display="block",kt.gutterFiller.style.height=bt.bottom+"px",kt.gutterFiller.style.width=ct.gutterWidth+"px"):kt.gutterFiller.style.display=""}var rp={native:Nu,null:El};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,kt){kt=="horizontal"?uu(rt,ct):Ph(rt,ct)},rt),rt.display.scrollbars.addClass&&Vt(rt.display.wrapper,rt.display.scrollbars.addClass)}var Ig=0;function Ou(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},Pl(rt.curOp)}function Fu(rt){var ct=rt.curOp;ct&&Ys(ct,function(kt){for(var bt=0;bt<kt.ops.length;bt++)kt.ops[bt].cm.curOp=null;Qv(kt)})}function Qv(rt){for(var ct=rt.ops,kt=0;kt<ct.length;kt++)$v(ct[kt]);for(var bt=0;bt<ct.length;bt++)qv(ct[bt]);for(var Ot=0;Ot<ct.length;Ot++)Rg(ct[Ot]);for(var qt=0;qt<ct.length;qt++)Fo(ct[qt]);for(var me=0;me<ct.length;me++)Du(ct[me])}function $v(rt){var ct=rt.cm,kt=ct.display;_g(ct),rt.updateMaxLine&&Zi(ct),rt.mustUpdate=rt.viewChanged||rt.forceUpdate||rt.scrollTop!=null||rt.scrollToPos&&(rt.scrollToPos.from.line<kt.viewFrom||rt.scrollToPos.to.line>=kt.viewTo)||kt.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,kt=ct.display;rt.updatedDisplay&&Qr(ct),rt.barMeasure=Qs(ct),kt.maxLineChanged&&!ct.options.lineWrapping&&(rt.adjustWidthTo=sc(ct,kt.maxLine,kt.maxLine.text.length).left+3,ct.display.sizerWidth=rt.adjustWidthTo,rt.barMeasure.scrollWidth=Math.max(kt.scroller.clientWidth,kt.sizer.offsetLeft+rt.adjustWidthTo+_o(ct)+ct.display.barWidth),rt.maxScrollLeft=Math.max(0,kt.sizer.offsetLeft+rt.adjustWidthTo-cs(ct))),(rt.updatedDisplay||rt.selectionChanged)&&(rt.preparedSelection=kt.input.prepareSelection())}function Fo(rt){var ct=rt.cm;rt.adjustWidthTo!=null&&(ct.display.sizer.style.minWidth=rt.adjustWidthTo+"px",rt.maxScrollLeft<ct.doc.scrollLeft&&uu(ct,Math.min(ct.display.scroller.scrollLeft,rt.maxScrollLeft),!0),ct.display.maxLineChanged=!1);var kt=rt.focus&&rt.focus==Ut();rt.preparedSelection&&ct.display.input.showSelection(rt.preparedSelection,kt),(rt.updatedDisplay||rt.startHeight!=ct.doc.height)&&ju(ct,rt.barMeasure),rt.updatedDisplay&&Ru(ct,rt.barMeasure),rt.selectionChanged&&io(ct),ct.state.focused&&rt.updateInput&&ct.display.input.reset(rt.typing),kt&&vo(rt.cm)}function Du(rt){var ct=rt.cm,kt=ct.display,bt=ct.doc;if(rt.updatedDisplay&&oo(ct,rt.update),kt.wheelStartX!=null&&(rt.scrollTop!=null||rt.scrollLeft!=null||rt.scrollToPos)&&(kt.wheelStartX=kt.wheelStartY=null),rt.scrollTop!=null&&np(ct,rt.scrollTop,rt.forceScroll),rt.scrollLeft!=null&&uu(ct,rt.scrollLeft,!0,!0),rt.scrollToPos){var Ot=cc(ct,Wn(bt,rt.scrollToPos.from),Wn(bt,rt.scrollToPos.to),rt.scrollToPos.margin);Bg(ct,Ot)}var qt=rt.maybeHiddenMarkers,me=rt.maybeUnhiddenMarkers;if(qt)for(var Te=0;Te<qt.length;++Te)qt[Te].lines.length||We(qt[Te],"hide");if(me)for(var ke=0;ke<me.length;++ke)me[ke].lines.length&&We(me[ke],"unhide");kt.wrapper.offsetHeight&&(bt.scrollTop=ct.display.scroller.scrollTop),rt.changeObjs&&We(ct,"changes",ct,rt.changeObjs),rt.update&&rt.update.finish()}function qi(rt,ct){if(rt.curOp)return ct();Ou(rt);try{return ct()}finally{Fu(rt)}}function la(rt,ct){return function(){if(rt.curOp)return ct.apply(rt,arguments);Ou(rt);try{return ct.apply(rt,arguments)}finally{Fu(rt)}}}function ga(rt){return function(){if(this.curOp)return rt.apply(this,arguments);Ou(this);try{return rt.apply(this,arguments)}finally{Fu(this)}}}function ma(rt){return function(){var ct=this.cm;if(!ct||ct.curOp)return rt.apply(this,arguments);Ou(ct);try{return rt.apply(this,arguments)}finally{Fu(ct)}}}function fc(rt,ct){rt.doc.highlightFrontier<rt.display.viewTo&&rt.state.highlight.set(ct,de(va,rt))}function va(rt){var ct=rt.doc;if(!(ct.highlightFrontier>=rt.display.viewTo)){var kt=+new Date+rt.options.workTime,bt=pi(rt,ct.highlightFrontier),Ot=[];ct.iter(bt.line,Math.min(ct.first+ct.size,rt.display.viewTo+500),function(qt){if(bt.line>=rt.display.viewFrom){var me=qt.styles,Te=qt.text.length>rt.options.maxHighlightLength?Fn(ct.mode,bt.state):null,ke=Si(rt,qt,bt,!0);Te&&(bt.state=Te),qt.styles=ke.styles;var Ie=qt.styleClasses,rn=ke.classes;rn?qt.styleClasses=rn:Ie&&(qt.styleClasses=null);for(var ze=!me||me.length!=qt.styles.length||Ie!=rn&&(!Ie||!rn||Ie.bgClass!=rn.bgClass||Ie.textClass!=rn.textClass),vn=0;!ze&&vn<me.length;++vn)ze=me[vn]!=qt.styles[vn];ze&&Ot.push(bt.line),qt.stateAfter=bt.save(),bt.nextLine()}else qt.text.length<=rt.options.maxHighlightLength&&an(rt,qt.text,bt),qt.stateAfter=bt.line%5==0?bt.save():null,bt.nextLine();if(+new Date>kt)return fc(rt,rt.options.workDelay),!0}),ct.highlightFrontier=bt.line,ct.modeFrontier=Math.max(ct.modeFrontier,bt.line),Ot.length&&qi(rt,function(){for(var qt=0;qt<Ot.length;qt++)ki(rt,Ot[qt],"text")})}}var Ch=function(rt,ct,kt){var bt=rt.display;this.viewport=ct,this.visible=Fi(bt,rt.doc,ct),this.editorIsHidden=!bt.wrapper.offsetWidth,this.wrapperHeight=bt.wrapper.clientHeight,this.wrapperWidth=bt.wrapper.clientWidth,this.oldDisplayWidth=cs(rt),this.force=kt,this.dims=Wf(rt),this.events=[]};Ch.prototype.signal=function(rt,ct){hn(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=_o(rt)+"px",ct.sizer.style.marginBottom=-ct.nativeBarWidth+"px",ct.sizer.style.borderRightWidth=_o(rt)+"px",ct.scrollbarsClipped=!0)}function zg(rt){if(rt.hasFocus())return null;var ct=Ut();if(!ct||!Yt(rt.display.lineDiv,ct))return null;var kt={activeElt:ct};if(window.getSelection){var bt=window.getSelection();bt.anchorNode&&bt.extend&&Yt(rt.display.lineDiv,bt.anchorNode)&&(kt.anchorNode=bt.anchorNode,kt.anchorOffset=bt.anchorOffset,kt.focusNode=bt.focusNode,kt.focusOffset=bt.focusOffset)}return kt}function ds(rt){if(!(!rt||!rt.activeElt||rt.activeElt==Ut())&&(rt.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(rt.activeElt.nodeName)&&rt.anchorNode&&Yt(document.body,rt.anchorNode)&&Yt(document.body,rt.focusNode))){var ct=window.getSelection(),kt=document.createRange();kt.setEnd(rt.anchorNode,rt.anchorOffset),kt.collapse(!1),ct.removeAllRanges(),ct.addRange(kt),ct.extend(rt.focusNode,rt.focusOffset)}}function Zf(rt,ct){var kt=rt.display,bt=rt.doc;if(ct.editorIsHidden)return Wo(rt),!1;if(!ct.force&&ct.visible.from>=kt.viewFrom&&ct.visible.to<=kt.viewTo&&(kt.updateLineNumbers==null||kt.updateLineNumbers>=kt.viewTo)&&kt.renderedView==kt.view&&ws(rt)==0)return!1;$o(rt)&&(Wo(rt),ct.dims=Wf(rt));var Ot=bt.first+bt.size,qt=Math.max(ct.visible.from-rt.options.viewportMargin,bt.first),me=Math.min(Ot,ct.visible.to+rt.options.viewportMargin);kt.viewFrom<qt&&qt-kt.viewFrom<20&&(qt=Math.max(bt.first,kt.viewFrom)),kt.viewTo>me&&kt.viewTo-me<20&&(me=Math.min(Ot,kt.viewTo)),wn&&(qt=Or(rt.doc,qt),me=Er(rt.doc,me));var Te=qt!=kt.viewFrom||me!=kt.viewTo||kt.lastWrapHeight!=ct.wrapperHeight||kt.lastWrapWidth!=ct.wrapperWidth;ho(rt,qt,me),kt.viewOffset=yi(Nn(rt.doc,kt.viewFrom)),rt.display.mover.style.top=kt.viewOffset+"px";var ke=ws(rt);if(!Te&&ke==0&&!ct.force&&kt.renderedView==kt.view&&(kt.updateLineNumbers==null||kt.updateLineNumbers>=kt.viewTo))return!1;var Ie=zg(rt);return ke>4&&(kt.lineDiv.style.display="none"),op(rt,kt.updateLineNumbers,ct.dims),ke>4&&(kt.lineDiv.style.display=""),kt.renderedView=kt.view,ds(Ie),Ft(kt.cursorDiv),Ft(kt.selectionDiv),kt.gutters.style.height=kt.sizer.style.minHeight=0,Te&&(kt.lastWrapHeight=ct.wrapperHeight,kt.lastWrapWidth=ct.wrapperWidth,fc(rt,400)),kt.updateLineNumbers=null,!0}function oo(rt,ct){for(var kt=ct.viewport,bt=!0;;bt=!1){if(!bt||!rt.options.lineWrapping||ct.oldDisplayWidth==cs(rt)){if(kt&&kt.top!=null&&(kt={top:Math.min(rt.doc.height+Cl(rt.display)-gh(rt),kt.top)}),ct.visible=Fi(rt.display,rt.doc,kt),ct.visible.from>=rt.display.viewFrom&&ct.visible.to<=rt.display.viewTo)break}else bt&&(ct.visible=Fi(rt.display,rt.doc,kt));if(!Zf(rt,ct))break;Qr(rt);var Ot=Qs(rt);sa(rt),ju(rt,Ot),Ru(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 Bu(rt,ct){var kt=new Ch(rt,ct);if(Zf(rt,kt)){Qr(rt),oo(rt,kt);var bt=Qs(rt);sa(rt),ju(rt,bt),Ru(rt,bt),kt.finish()}}function op(rt,ct,kt){var bt=rt.display,Ot=rt.options.lineNumbers,qt=bt.lineDiv,me=qt.firstChild;function Te(Hn){var Jn=Hn.nextSibling;return gt&&at&&rt.display.currentWheelTarget==Hn?Hn.style.display="none":Hn.parentNode.removeChild(Hn),Jn}for(var ke=bt.view,Ie=bt.viewFrom,rn=0;rn<ke.length;rn++){var ze=ke[rn];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=qt){var vn=hs(rt,ze,Ie,kt);qt.insertBefore(vn,me)}else{for(;me!=ze.node;)me=Te(me);var pn=Ot&&ct!=null&&ct<=Ie&&ze.lineNumber;ze.changes&&(ye(ze.changes,"gutter")>-1&&(pn=!1),Tu(rt,ze,Ie,kt)),pn&&(Ft(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(Gn(rt.options,Ie)))),me=ze.node.nextSibling}Ie+=ze.size}for(;me;)me=Te(me)}function Iu(rt){var ct=rt.gutters.offsetWidth;rt.sizer.style.marginLeft=ct+"px"}function Ru(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+_o(rt)+"px"}function Xf(rt){var ct=rt.display,kt=ct.view;if(!(!ct.alignWidgets&&(!ct.gutters.firstChild||!rt.options.fixedGutter))){for(var bt=Yc(ct)-ct.scroller.scrollLeft+rt.doc.scrollLeft,Ot=ct.gutters.offsetWidth,qt=bt+"px",me=0;me<kt.length;me++)if(!kt[me].hidden){rt.options.fixedGutter&&(kt[me].gutter&&(kt[me].gutter.style.left=qt),kt[me].gutterBackground&&(kt[me].gutterBackground.style.left=qt));var Te=kt[me].alignable;if(Te)for(var ke=0;ke<Te.length;ke++)Te[ke].style.left=qt}rt.options.fixedGutter&&(ct.gutters.style.left=bt+Ot+"px")}}function $o(rt){if(!rt.options.lineNumbers)return!1;var ct=rt.doc,kt=Gn(rt.options,ct.first+ct.size-1),bt=rt.display;if(kt.length!=bt.lineNumChars){var Ot=bt.measure.appendChild(Nt("div",[Nt("div",kt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),qt=Ot.firstChild.offsetWidth,me=Ot.offsetWidth-qt;return bt.lineGutter.style.width="",bt.lineNumInnerWidth=Math.max(qt,bt.lineGutter.offsetWidth-me)+1,bt.lineNumWidth=bt.lineNumInnerWidth+me,bt.lineNumChars=bt.lineNumInnerWidth?kt.length:-1,bt.lineGutter.style.width=bt.lineNumWidth+"px",Iu(rt.display),!0}return!1}function ya(rt,ct){for(var kt=[],bt=!1,Ot=0;Ot<rt.length;Ot++){var qt=rt[Ot],me=null;if(typeof qt!="string"&&(me=qt.style,qt=qt.className),qt=="CodeMirror-linenumbers")if(ct)bt=!0;else continue;kt.push({className:qt,style:me})}return ct&&!bt&&kt.push({className:"CodeMirror-linenumbers",style:null}),kt}function kh(rt){var ct=rt.gutters,kt=rt.gutterSpecs;Ft(ct),rt.lineGutter=null;for(var bt=0;bt<kt.length;++bt){var Ot=kt[bt],qt=Ot.className,me=Ot.style,Te=ct.appendChild(Nt("div",null,"CodeMirror-gutter "+qt));me&&(Te.style.cssText=me),qt=="CodeMirror-linenumbers"&&(rt.lineGutter=Te,Te.style.width=(rt.lineNumWidth||1)+"px")}ct.style.display=kt.length?"":"none",Iu(rt)}function Rs(rt){kh(rt.display),bo(rt),Xf(rt)}function _u(rt,ct,kt,bt){var Ot=this;this.input=kt,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 qt=Gt("div",[Ot.lineSpace],"CodeMirror-lines");Ot.mover=Nt("div",[qt],null,"position: relative"),Ot.sizer=Nt("div",[Ot.mover],"CodeMirror-sizer"),Ot.sizerWidth=null,Ot.heightForcer=Nt("div",null,null,"position: absolute; height: "+we+"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=ya(bt.gutters,bt.lineNumbers),kh(Ot),kt.init(Ot)}var bs=0,Ho=null;Bt?Ho=-.53:ae?Ho=15:Ct?Ho=-.7:Tt&&(Ho=-1/3);function Ml(rt){var ct=rt.wheelDeltaX,kt=rt.wheelDeltaY;return ct==null&&rt.detail&&rt.axis==rt.HORIZONTAL_AXIS&&(ct=rt.detail),kt==null&&rt.detail&&rt.axis==rt.VERTICAL_AXIS?kt=rt.detail:kt==null&&(kt=rt.wheelDelta),{x:ct,y:kt}}function _s(rt){var ct=Ml(rt);return ct.x*=Ho,ct.y*=Ho,ct}function Sa(rt,ct){var kt=Ml(ct),bt=kt.x,Ot=kt.y,qt=rt.display,me=qt.scroller,Te=me.scrollWidth>me.clientWidth,ke=me.scrollHeight>me.clientHeight;if(bt&&Te||Ot&&ke){if(Ot&&at&>){t:for(var Ie=ct.target,rn=qt.view;Ie!=me;Ie=Ie.parentNode)for(var ze=0;ze<rn.length;ze++)if(rn[ze].node==Ie){rt.display.currentWheelTarget=Ie;break t}}if(bt&&!ae&&!St&&Ho!=null){Ot&&ke&&Ph(rt,Math.max(0,me.scrollTop+Ot*Ho)),uu(rt,Math.max(0,me.scrollLeft+bt*Ho)),(!Ot||Ot&&ke)&&bn(ct),qt.wheelStartX=null;return}if(Ot&&Ho!=null){var vn=Ot*Ho,pn=rt.doc.scrollTop,Hn=pn+qt.wrapper.clientHeight;vn<0?pn=Math.max(0,pn+vn-50):Hn=Math.min(rt.doc.height,Hn+vn+50),Bu(rt,{top:pn,bottom:Hn})}bs<20&&(qt.wheelStartX==null?(qt.wheelStartX=me.scrollLeft,qt.wheelStartY=me.scrollTop,qt.wheelDX=bt,qt.wheelDY=Ot,setTimeout(function(){if(qt.wheelStartX!=null){var Jn=me.scrollLeft-qt.wheelStartX,ir=me.scrollTop-qt.wheelStartY,wr=ir&&qt.wheelDY&&ir/qt.wheelDY||Jn&&qt.wheelDX&&Jn/qt.wheelDX;qt.wheelStartX=qt.wheelStartY=null,wr&&(Ho=(Ho*bs+wr)/(bs+1),++bs)}},200)):(qt.wheelDX+=bt,qt.wheelDY+=Ot))}}var $s=function(rt,ct){this.ranges=rt,this.primIndex=ct};$s.prototype.primary=function(){return this.ranges[this.primIndex]},$s.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 kt=this.ranges[ct],bt=rt.ranges[ct];if(!An(kt.anchor,bt.anchor)||!An(kt.head,bt.head))return!1}return!0},$s.prototype.deepCopy=function(){for(var rt=[],ct=0;ct<this.ranges.length;ct++)rt[ct]=new ao(er(this.ranges[ct].anchor),er(this.ranges[ct].head));return new $s(rt,this.primIndex)},$s.prototype.somethingSelected=function(){for(var rt=0;rt<this.ranges.length;rt++)if(!this.ranges[rt].empty())return!0;return!1},$s.prototype.contains=function(rt,ct){ct||(ct=rt);for(var kt=0;kt<this.ranges.length;kt++){var bt=this.ranges[kt];if(dn(ct,bt.from())>=0&&dn(rt,bt.to())<=0)return kt}return-1};var ao=function(rt,ct){this.anchor=rt,this.head=ct};ao.prototype.from=function(){return Xn(this.anchor,this.head)},ao.prototype.to=function(){return ar(this.anchor,this.head)},ao.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cl(rt,ct,kt){var bt=rt&&rt.options.selectionsMayTouch,Ot=ct[kt];ct.sort(function(vn,pn){return dn(vn.from(),pn.from())}),kt=ye(ct,Ot);for(var qt=1;qt<ct.length;qt++){var me=ct[qt],Te=ct[qt-1],ke=dn(Te.to(),me.from());if(bt&&!me.empty()?ke>0:ke>=0){var Ie=Xn(Te.from(),me.from()),rn=ar(Te.to(),me.to()),ze=Te.empty()?me.from()==me.head:Te.from()==Te.head;qt<=kt&&--kt,ct.splice(--qt,2,new ao(ze?rn:Ie,ze?Ie:rn))}}return new $s(ct,kt)}function hu(rt,ct){return new $s([new ao(rt,ct||rt)],0)}function zu(rt){return rt.text?sn(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(dn(rt,ct.from)<0)return rt;if(dn(rt,ct.to)<=0)return zu(ct);var kt=rt.line+ct.text.length-(ct.to.line-ct.from.line)-1,bt=rt.ch;return rt.line==ct.to.line&&(bt+=zu(ct).ch-ct.to.ch),sn(kt,bt)}function Qc(rt,ct){for(var kt=[],bt=0;bt<rt.sel.ranges.length;bt++){var Ot=rt.sel.ranges[bt];kt.push(new ao(Eh(Ot.anchor,ct),Eh(Ot.head,ct)))}return cl(rt.cm,kt,rt.sel.primIndex)}function dc(rt,ct,kt){return rt.line==ct.line?sn(kt.line,rt.ch-ct.ch+kt.ch):sn(kt.line+(rt.line-ct.line),rt.ch)}function $c(rt,ct,kt){for(var bt=[],Ot=sn(rt.first,0),qt=Ot,me=0;me<ct.length;me++){var Te=ct[me],ke=dc(Te.from,Ot,qt),Ie=dc(zu(Te),Ot,qt);if(Ot=Te.to,qt=Ie,kt=="around"){var rn=rt.sel.ranges[me],ze=dn(rn.head,rn.anchor)<0;bt[me]=new ao(ze?Ie:ke,ze?ke:Ie)}else bt[me]=new ao(ke,ke)}return new $s(bt,rt.sel.primIndex)}function Ei(rt){rt.doc.mode=Ye(rt.options,rt.doc.modeOption),qc(rt)}function qc(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,fc(rt,100),rt.state.modeGen++,rt.curOp&&bo(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,kt,bt){function Ot(Ir){return kt?kt[Ir]:null}function qt(Ir,Tr,Hr){no(Ir,Tr,Hr,bt),Ar(Ir,"change",Ir,ct)}function me(Ir,Tr){for(var Hr=[],fi=Ir;fi<Tr;++fi)Hr.push(new Bi(Ie[fi],Ot(fi),bt));return Hr}var Te=ct.from,ke=ct.to,Ie=ct.text,rn=Nn(rt,Te.line),ze=Nn(rt,ke.line),vn=ge(Ie),pn=Ot(Ie.length-1),Hn=ke.line-Te.line;if(ct.full)rt.insert(0,me(0,Ie.length)),rt.remove(Ie.length,rt.size-Ie.length);else if(ap(rt,ct)){var Jn=me(0,Ie.length-1);qt(ze,ze.text,pn),Hn&&rt.remove(Te.line,Hn),Jn.length&&rt.insert(Te.line,Jn)}else if(rn==ze)if(Ie.length==1)qt(rn,rn.text.slice(0,Te.ch)+vn+rn.text.slice(ke.ch),pn);else{var ir=me(1,Ie.length-1);ir.push(new Bi(vn+rn.text.slice(ke.ch),pn,bt)),qt(rn,rn.text.slice(0,Te.ch)+Ie[0],Ot(0)),rt.insert(Te.line+1,ir)}else if(Ie.length==1)qt(rn,rn.text.slice(0,Te.ch)+Ie[0]+ze.text.slice(ke.ch),Ot(0)),rt.remove(Te.line+1,Hn);else{qt(rn,rn.text.slice(0,Te.ch)+Ie[0],Ot(0)),qt(ze,vn+ze.text.slice(ke.ch),pn);var wr=me(1,Ie.length-1);Hn>1&&rt.remove(Te.line+1,Hn-1),rt.insert(Te.line+1,wr)}Ar(rt,"change",rt,ct)}function Tl(rt,ct,kt){function bt(Ot,qt,me){if(Ot.linked)for(var Te=0;Te<Ot.linked.length;++Te){var ke=Ot.linked[Te];if(ke.doc!=qt){var Ie=me&&ke.sharedHist;kt&&!Ie||(ct(ke.doc,Ie),bt(ke.doc,Ot,Ie))}}}bt(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,ri(rt),Ei(rt),tf(rt),rt.options.lineWrapping||Zi(rt),rt.options.mode=ct.modeOption,bo(rt)}function tf(rt){(rt.doc.direction=="rtl"?Vt:Dt)(rt.display.lineDiv,"CodeMirror-rtl")}function t0(rt){qi(rt,function(){tf(rt),bo(rt)})}function pc(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 kt={from:er(ct.from),to:zu(ct),text:en(rt,ct.from,ct.to)};return Gu(rt,kt,ct.from.line,ct.to.line+1),Tl(rt,function(bt){return Gu(bt,kt,ct.from.line,ct.to.line+1)},!0),kt}function gc(rt){for(;rt.length;){var ct=ge(rt);if(ct.ranges)rt.pop();else break}}function ef(rt,ct){if(ct)return gc(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 nf(rt,ct,kt,bt){var Ot=rt.history;Ot.undone.length=0;var qt=+new Date,me,Te;if((Ot.lastOp==bt||Ot.lastOrigin==ct.origin&&ct.origin&&(ct.origin.charAt(0)=="+"&&Ot.lastModTime>qt-(rt.cm?rt.cm.options.historyEventDelay:500)||ct.origin.charAt(0)=="*"))&&(me=ef(Ot,Ot.lastOp==bt)))Te=ge(me.changes),dn(ct.from,ct.to)==0&&dn(ct.from,Te.to)==0?Te.to=zu(ct):me.changes.push(Qf(rt,ct));else{var ke=ge(Ot.done);for((!ke||!ke.ranges)&&mc(rt.sel,Ot.done),me={changes:[Qf(rt,ct)],generation:Ot.generation},Ot.done.push(me);Ot.done.length>Ot.undoDepth;)Ot.done.shift(),Ot.done[0].ranges||Ot.done.shift()}Ot.done.push(kt),Ot.generation=++Ot.maxGeneration,Ot.lastModTime=Ot.lastSelTime=qt,Ot.lastOp=Ot.lastSelOp=bt,Ot.lastOrigin=Ot.lastSelOrigin=ct.origin,Te||We(rt,"historyAdded")}function sp(rt,ct,kt,bt){var Ot=ct.charAt(0);return Ot=="*"||Ot=="+"&&kt.ranges.length==bt.ranges.length&&kt.somethingSelected()==bt.somethingSelected()&&new Date-rt.history.lastSelTime<=(rt.cm?rt.cm.options.historyEventDelay:500)}function rf(rt,ct,kt,bt){var Ot=rt.history,qt=bt&&bt.origin;kt==Ot.lastSelOp||qt&&Ot.lastSelOrigin==qt&&(Ot.lastModTime==Ot.lastSelTime&&Ot.lastOrigin==qt||sp(rt,qt,ge(Ot.done),ct))?Ot.done[Ot.done.length-1]=ct:mc(ct,Ot.done),Ot.lastSelTime=+new Date,Ot.lastSelOrigin=qt,Ot.lastSelOp=kt,bt&&bt.clearRedo!==!1&&gc(Ot.undone)}function mc(rt,ct){var kt=ge(ct);kt&&kt.ranges&&kt.equals(rt)||ct.push(rt)}function Gu(rt,ct,kt,bt){var Ot=ct["spans_"+rt.id],qt=0;rt.iter(Math.max(rt.first,kt),Math.min(rt.first+rt.size,bt),function(me){me.markedSpans&&((Ot||(Ot=ct["spans_"+rt.id]={}))[qt]=me.markedSpans),++qt})}function es(rt){if(!rt)return null;for(var ct,kt=0;kt<rt.length;++kt)rt[kt].marker.explicitlyCleared?ct||(ct=rt.slice(0,kt)):ct&&ct.push(rt[kt]);return ct?ct.length?ct:null:rt}function Wl(rt,ct){var kt=ct["spans_"+rt.id];if(!kt)return null;for(var bt=[],Ot=0;Ot<ct.text.length;++Ot)bt.push(es(kt[Ot]));return bt}function $f(rt,ct){var kt=Wl(rt,ct),bt=gi(rt,ct);if(!kt)return bt;if(!bt)return kt;for(var Ot=0;Ot<kt.length;++Ot){var qt=kt[Ot],me=bt[Ot];if(qt&&me)t:for(var Te=0;Te<me.length;++Te){for(var ke=me[Te],Ie=0;Ie<qt.length;++Ie)if(qt[Ie].marker==ke.marker)continue t;qt.push(ke)}else me&&(kt[Ot]=me)}return kt}function cu(rt,ct,kt){for(var bt=[],Ot=0;Ot<rt.length;++Ot){var qt=rt[Ot];if(qt.ranges){bt.push(kt?$s.prototype.deepCopy.call(qt):qt);continue}var me=qt.changes,Te=[];bt.push({changes:Te});for(var ke=0;ke<me.length;++ke){var Ie=me[ke],rn=void 0;if(Te.push({from:Ie.from,to:Ie.to,text:Ie.text}),ct)for(var ze in Ie)(rn=ze.match(/^spans_(\d+)$/))&&ye(ct,Number(rn[1]))>-1&&(ge(Te)[ze]=Ie[ze],delete Ie[ze])}}return bt}function qf(rt,ct,kt,bt){if(bt){var Ot=rt.anchor;if(kt){var qt=dn(ct,Ot)<0;qt!=dn(kt,Ot)<0?(Ot=ct,ct=kt):qt!=dn(ct,kt)<0&&(ct=kt)}return new ao(Ot,ct)}else return new ao(kt||ct,ct)}function td(rt,ct,kt,bt,Ot){Ot==null&&(Ot=rt.cm&&(rt.cm.display.shift||rt.extend)),Wa(rt,new $s([qf(rt.sel.primary(),ct,kt,Ot)],0),bt)}function Gg(rt,ct,kt){for(var bt=[],Ot=rt.cm&&(rt.cm.display.shift||rt.extend),qt=0;qt<rt.sel.ranges.length;qt++)bt[qt]=qf(rt.sel.ranges[qt],ct[qt],null,Ot);var me=cl(rt.cm,bt,rt.sel.primIndex);Wa(rt,me,kt)}function Uu(rt,ct,kt,bt){var Ot=rt.sel.ranges.slice(0);Ot[ct]=kt,Wa(rt,cl(rt.cm,Ot,rt.sel.primIndex),bt)}function Mh(rt,ct,kt,bt){Wa(rt,hu(ct,kt),bt)}function Ug(rt,ct,kt){var bt={ranges:ct.ranges,update:function(Ot){this.ranges=[];for(var qt=0;qt<Ot.length;qt++)this.ranges[qt]=new ao(Wn(rt,Ot[qt].anchor),Wn(rt,Ot[qt].head))},origin:kt&&kt.origin};return We(rt,"beforeSelectionChange",rt,bt),rt.cm&&We(rt.cm,"beforeSelectionChange",rt.cm,bt),bt.ranges!=ct.ranges?cl(rt.cm,bt.ranges,bt.ranges.length-1):ct}function ed(rt,ct,kt){var bt=rt.history.done,Ot=ge(bt);Ot&&Ot.ranges?(bt[bt.length-1]=ct,Th(rt,ct,kt)):Wa(rt,ct,kt)}function Wa(rt,ct,kt){Th(rt,ct,kt),rf(rt,rt.sel,rt.cm?rt.cm.curOp.id:NaN,kt)}function Th(rt,ct,kt){(hn(rt,"beforeSelectionChange")||rt.cm&&hn(rt.cm,"beforeSelectionChange"))&&(ct=Ug(rt,ct,kt));var bt=kt&&kt.bias||(dn(ct.primary().head,rt.sel.primary().head)<0?-1:1);lp(rt,af(rt,ct,bt,!0)),!(kt&&kt.scroll===!1)&&rt.cm&&lu(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,nn(rt.cm)),Ar(rt,"cursorActivity",rt))}function of(rt){lp(rt,af(rt,rt.sel,null,!1))}function af(rt,ct,kt,bt){for(var Ot,qt=0;qt<ct.ranges.length;qt++){var me=ct.ranges[qt],Te=ct.ranges.length==rt.sel.ranges.length&&rt.sel.ranges[qt],ke=sf(rt,me.anchor,Te&&Te.anchor,kt,bt),Ie=sf(rt,me.head,Te&&Te.head,kt,bt);(Ot||ke!=me.anchor||Ie!=me.head)&&(Ot||(Ot=ct.ranges.slice(0,qt)),Ot[qt]=new ao(ke,Ie))}return Ot?cl(rt.cm,Ot,ct.primIndex):ct}function fu(rt,ct,kt,bt,Ot){var qt=Nn(rt,ct.line);if(qt.markedSpans)for(var me=0;me<qt.markedSpans.length;++me){var Te=qt.markedSpans[me],ke=Te.marker,Ie="selectLeft"in ke?!ke.selectLeft:ke.inclusiveLeft,rn="selectRight"in ke?!ke.selectRight:ke.inclusiveRight;if((Te.from==null||(Ie?Te.from<=ct.ch:Te.from<ct.ch))&&(Te.to==null||(rn?Te.to>=ct.ch:Te.to>ct.ch))){if(Ot&&(We(ke,"beforeCursorEnter"),ke.explicitlyCleared))if(qt.markedSpans){--me;continue}else break;if(!ke.atomic)continue;if(kt){var ze=ke.find(bt<0?1:-1),vn=void 0;if((bt<0?rn:Ie)&&(ze=up(rt,ze,-bt,ze&&ze.line==ct.line?qt:null)),ze&&ze.line==ct.line&&(vn=dn(ze,kt))&&(bt<0?vn<0:vn>0))return fu(rt,ze,ct,bt,Ot)}var pn=ke.find(bt<0?-1:1);return(bt<0?Ie:rn)&&(pn=up(rt,pn,bt,pn.line==ct.line?qt:null)),pn?fu(rt,pn,ct,bt,Ot):null}}return ct}function sf(rt,ct,kt,bt,Ot){var qt=bt||1,me=fu(rt,ct,kt,qt,Ot)||!Ot&&fu(rt,ct,kt,qt,!0)||fu(rt,ct,kt,-qt,Ot)||!Ot&&fu(rt,ct,kt,-qt,!0);return me||(rt.cantEdit=!0,sn(rt.first,0))}function up(rt,ct,kt,bt){return kt<0&&ct.ch==0?ct.line>rt.first?Wn(rt,sn(ct.line-1)):null:kt>0&&ct.ch==(bt||Nn(rt,ct.line)).text.length?ct.line<rt.first+rt.size-1?sn(ct.line+1,0):null:new sn(ct.line,ct.ch+kt)}function Vo(rt){rt.setSelection(sn(rt.firstLine(),0),sn(rt.lastLine()),fe)}function lf(rt,ct,kt){var bt={canceled:!1,from:ct.from,to:ct.to,text:ct.text,origin:ct.origin,cancel:function(){return bt.canceled=!0}};return kt&&(bt.update=function(Ot,qt,me,Te){Ot&&(bt.from=Wn(rt,Ot)),qt&&(bt.to=Wn(rt,qt)),me&&(bt.text=me),Te!==void 0&&(bt.origin=Te)}),We(rt,"beforeChange",rt,bt),rt.cm&&We(rt.cm,"beforeChange",rt.cm,bt),bt.canceled?(rt.cm&&(rt.cm.curOp.updateInput=2),null):{from:bt.from,to:bt.to,text:bt.text,origin:bt.origin}}function Wu(rt,ct,kt){if(rt.cm){if(!rt.cm.curOp)return la(rt.cm,Wu)(rt,ct,kt);if(rt.cm.state.suppressEdits)return}if(!((hn(rt,"beforeChange")||rt.cm&&hn(rt.cm,"beforeChange"))&&(ct=lf(rt,ct,!0),!ct))){var bt=Yr&&!kt&&Ci(rt,ct.from,ct.to);if(bt)for(var Ot=bt.length-1;Ot>=0;--Ot)Lh(rt,{from:bt[Ot].from,to:bt[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]==""&&dn(ct.from,ct.to)==0)){var kt=Qc(rt,ct);nf(rt,ct,kt,rt.cm?rt.cm.curOp.id:NaN),vc(rt,ct,kt,gi(rt,ct));var bt=[];Tl(rt,function(Ot,qt){!qt&&ye(bt,Ot.history)==-1&&(cp(Ot.history,ct),bt.push(Ot.history)),vc(Ot,ct,null,gi(Ot,ct))})}}function uf(rt,ct,kt){var bt=rt.cm&&rt.cm.state.suppressEdits;if(!(bt&&!kt)){for(var Ot=rt.history,qt,me=rt.sel,Te=ct=="undo"?Ot.done:Ot.undone,ke=ct=="undo"?Ot.undone:Ot.done,Ie=0;Ie<Te.length&&(qt=Te[Ie],!(kt?qt.ranges&&!qt.equals(rt.sel):!qt.ranges));Ie++);if(Ie!=Te.length){for(Ot.lastOrigin=Ot.lastSelOrigin=null;;)if(qt=Te.pop(),qt.ranges){if(mc(qt,ke),kt&&!qt.equals(rt.sel)){Wa(rt,qt,{clearRedo:!1});return}me=qt}else if(bt){Te.push(qt);return}else break;var rn=[];mc(me,ke),ke.push({changes:rn,generation:Ot.generation}),Ot.generation=qt.generation||++Ot.maxGeneration;for(var ze=hn(rt,"beforeChange")||rt.cm&&hn(rt.cm,"beforeChange"),vn=function(Jn){var ir=qt.changes[Jn];if(ir.origin=ct,ze&&!lf(rt,ir,!1))return Te.length=0,{};rn.push(Qf(rt,ir));var wr=Jn?Qc(rt,ir):ge(Te);vc(rt,ir,wr,$f(rt,ir)),!Jn&&rt.cm&&rt.cm.scrollIntoView({from:ir.from,to:zu(ir)});var Ir=[];Tl(rt,function(Tr,Hr){!Hr&&ye(Ir,Tr.history)==-1&&(cp(Tr.history,ir),Ir.push(Tr.history)),vc(Tr,ir,null,$f(Tr,ir))})},pn=qt.changes.length-1;pn>=0;--pn){var Hn=vn(pn);if(Hn)return Hn.v}}}}function hp(rt,ct){if(ct!=0&&(rt.first+=ct,rt.sel=new $s(xe(rt.sel.ranges,function(Ot){return new ao(sn(Ot.anchor.line+ct,Ot.anchor.ch),sn(Ot.head.line+ct,Ot.head.ch))}),rt.sel.primIndex),rt.cm)){bo(rt.cm,rt.first,rt.first-ct,ct);for(var kt=rt.cm.display,bt=kt.viewFrom;bt<kt.viewTo;bt++)ki(rt.cm,bt,"gutter")}}function vc(rt,ct,kt,bt){if(rt.cm&&!rt.cm.curOp)return la(rt.cm,vc)(rt,ct,kt,bt);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:sn(rt.first,0),to:sn(ct.to.line+Ot,ct.to.ch),text:[ge(ct.text)],origin:ct.origin}}var qt=rt.lastLine();ct.to.line>qt&&(ct={from:ct.from,to:sn(qt,Nn(rt,qt).text.length),text:[ct.text[0]],origin:ct.origin}),ct.removed=en(rt,ct.from,ct.to),kt||(kt=Qc(rt,ct)),rt.cm?Wg(rt.cm,ct,bt):Yf(rt,ct,bt),Th(rt,kt,fe),rt.cantEdit&&sf(rt,sn(rt.firstLine(),0))&&(rt.cantEdit=!1)}}function Wg(rt,ct,kt){var bt=rt.doc,Ot=rt.display,qt=ct.from,me=ct.to,Te=!1,ke=qt.line;rt.options.lineWrapping||(ke=Oe(Br(Nn(bt,qt.line))),bt.iter(ke,me.line+1,function(pn){if(pn==Ot.maxLine)return Te=!0,!0})),bt.sel.contains(ct.from,ct.to)>-1&&nn(rt),Yf(bt,ct,kt,wo(rt)),rt.options.lineWrapping||(bt.iter(ke,qt.line+ct.text.length,function(pn){var Hn=Qi(pn);Hn>Ot.maxLineLength&&(Ot.maxLine=pn,Ot.maxLineLength=Hn,Ot.maxLineChanged=!0,Te=!1)}),Te&&(rt.curOp.updateMaxLine=!0)),Kr(bt,qt.line),fc(rt,400);var Ie=ct.text.length-(me.line-qt.line)-1;ct.full?bo(rt):qt.line==me.line&&ct.text.length==1&&!ap(rt.doc,ct)?ki(rt,qt.line,"text"):bo(rt,qt.line,me.line+1,Ie);var rn=hn(rt,"changes"),ze=hn(rt,"change");if(ze||rn){var vn={from:qt,to:me,text:ct.text,removed:ct.removed,origin:ct.origin};ze&&Ar(rt,"change",rt,vn),rn&&(rt.curOp.changeObjs||(rt.curOp.changeObjs=[])).push(vn)}rt.display.selForContextMenu=null}function Ah(rt,ct,kt,bt,Ot){var qt;bt||(bt=kt),dn(bt,kt)<0&&(qt=[bt,kt],kt=qt[0],bt=qt[1]),typeof ct=="string"&&(ct=rt.splitLines(ct)),Wu(rt,{from:kt,to:bt,text:ct,origin:Ot})}function tl(rt,ct,kt,bt){kt<rt.line?rt.line+=bt:ct<rt.line&&(rt.line=ct,rt.ch=0)}function Hg(rt,ct,kt,bt){for(var Ot=0;Ot<rt.length;++Ot){var qt=rt[Ot],me=!0;if(qt.ranges){qt.copied||(qt=rt[Ot]=qt.deepCopy(),qt.copied=!0);for(var Te=0;Te<qt.ranges.length;Te++)tl(qt.ranges[Te].anchor,ct,kt,bt),tl(qt.ranges[Te].head,ct,kt,bt);continue}for(var ke=0;ke<qt.changes.length;++ke){var Ie=qt.changes[ke];if(kt<Ie.from.line)Ie.from=sn(Ie.from.line+bt,Ie.from.ch),Ie.to=sn(Ie.to.line+bt,Ie.to.ch);else if(ct<=Ie.to.line){me=!1;break}}me||(rt.splice(0,Ot+1),Ot=0)}}function cp(rt,ct){var kt=ct.from.line,bt=ct.to.line,Ot=ct.text.length-(bt-kt)-1;Hg(rt.done,kt,bt,Ot),Hg(rt.undone,kt,bt,Ot)}function Nh(rt,ct,kt,bt){var Ot=ct,qt=ct;return typeof ct=="number"?qt=Nn(rt,In(rt,ct)):Ot=Oe(ct),Ot==null?null:(bt(qt,Ot)&&rt.cm&&ki(rt.cm,Ot,kt),qt)}function yc(rt){this.lines=rt,this.parent=null;for(var ct=0,kt=0;kt<rt.length;++kt)rt[kt].parent=this,ct+=rt[kt].height;this.height=ct}yc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(rt,ct){for(var kt=rt,bt=rt+ct;kt<bt;++kt){var Ot=this.lines[kt];this.height-=Ot.height,Wi(Ot),Ar(Ot,"delete")}this.lines.splice(rt,ct)},collapse:function(rt){rt.push.apply(rt,this.lines)},insertInner:function(rt,ct,kt){this.height+=kt,this.lines=this.lines.slice(0,rt).concat(ct).concat(this.lines.slice(rt));for(var bt=0;bt<ct.length;++bt)ct[bt].parent=this},iterN:function(rt,ct,kt){for(var bt=rt+ct;rt<bt;++rt)if(kt(this.lines[rt]))return!0}};function Ao(rt){this.children=rt;for(var ct=0,kt=0,bt=0;bt<rt.length;++bt){var Ot=rt[bt];ct+=Ot.chunkSize(),kt+=Ot.height,Ot.parent=this}this.size=ct,this.height=kt,this.parent=null}Ao.prototype={chunkSize:function(){return this.size},removeInner:function(rt,ct){this.size-=ct;for(var kt=0;kt<this.children.length;++kt){var bt=this.children[kt],Ot=bt.chunkSize();if(rt<Ot){var qt=Math.min(ct,Ot-rt),me=bt.height;if(bt.removeInner(rt,qt),this.height-=me-bt.height,Ot==qt&&(this.children.splice(kt--,1),bt.parent=null),(ct-=qt)==0)break;rt=0}else rt-=Ot}if(this.size-ct<25&&(this.children.length>1||!(this.children[0]instanceof yc))){var Te=[];this.collapse(Te),this.children=[new yc(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,kt){this.size+=ct.length,this.height+=kt;for(var bt=0;bt<this.children.length;++bt){var Ot=this.children[bt],qt=Ot.chunkSize();if(rt<=qt){if(Ot.insertInner(rt,ct,kt),Ot.lines&&Ot.lines.length>50){for(var me=Ot.lines.length%25+25,Te=me;Te<Ot.lines.length;){var ke=new yc(Ot.lines.slice(Te,Te+=25));Ot.height-=ke.height,this.children.splice(++bt,0,ke),ke.parent=this}Ot.lines=Ot.lines.slice(0,me),this.maybeSpill()}break}rt-=qt}},maybeSpill:function(){if(!(this.children.length<=10)){var rt=this;do{var ct=rt.children.splice(rt.children.length-5,5),kt=new Ao(ct);if(rt.parent){rt.size-=kt.size,rt.height-=kt.height;var Ot=ye(rt.parent.children,rt);rt.parent.children.splice(Ot+1,0,kt)}else{var bt=new Ao(rt.children);bt.parent=rt,rt.children=[bt,kt],rt=bt}kt.parent=rt.parent}while(rt.children.length>10);rt.parent.maybeSpill()}},iterN:function(rt,ct,kt){for(var bt=0;bt<this.children.length;++bt){var Ot=this.children[bt],qt=Ot.chunkSize();if(rt<qt){var me=Math.min(ct,qt-rt);if(Ot.iterN(rt,me,kt))return!0;if((ct-=me)==0)break;rt=0}else rt-=qt}}};var du=function(rt,ct,kt){if(kt)for(var bt in kt)kt.hasOwnProperty(bt)&&(this[bt]=kt[bt]);this.doc=rt,this.node=ct};du.prototype.clear=function(){var rt=this.doc.cm,ct=this.line.widgets,kt=this.line,bt=Oe(kt);if(!(bt==null||!ct)){for(var Ot=0;Ot<ct.length;++Ot)ct[Ot]==this&&ct.splice(Ot--,1);ct.length||(kt.widgets=null);var qt=Na(this);Dn(kt,Math.max(0,kt.height-qt)),rt&&(qi(rt,function(){Vg(rt,kt,-qt),ki(rt,bt,"widget")}),Ar(rt,"lineWidgetCleared",rt,this,bt))}},du.prototype.changed=function(){var rt=this,ct=this.height,kt=this.doc.cm,bt=this.line;this.height=null;var Ot=Na(this)-ct;Ot&&(Mn(this.doc,bt)||Dn(bt,bt.height+Ot),kt&&qi(kt,function(){kt.curOp.forceUpdate=!0,Vg(kt,bt,Ot),Ar(kt,"lineWidgetChanged",kt,rt,Oe(bt))}))},un(du);function Vg(rt,ct,kt){yi(ct)<(rt.curOp&&rt.curOp.scrollTop||rt.doc.scrollTop)&&Hf(rt,kt)}function nd(rt,ct,kt,bt){var Ot=new du(rt,kt,bt),qt=rt.cm;return qt&&Ot.noHScroll&&(qt.display.alignWidgets=!0),Nh(rt,ct,"widget",function(me){var Te=me.widgets||(me.widgets=[]);if(Ot.insertAt==null?Te.push(Ot):Te.splice(Math.min(Te.length-1,Math.max(0,Ot.insertAt)),0,Ot),Ot.line=me,qt&&!Mn(rt,me)){var ke=yi(me)<rt.scrollTop;Dn(me,me.height+Na(Ot)),ke&&Hf(qt,Ot.height),qt.curOp.forceUpdate=!0}return!0}),qt&&Ar(qt,"lineWidgetAdded",qt,Ot,typeof ct=="number"?ct:Oe(ct)),Ot}var Kg=0,qe=function(rt,ct){this.lines=[],this.type=ct,this.doc=rt,this.id=++Kg};qe.prototype.clear=function(){if(!this.explicitlyCleared){var rt=this.doc.cm,ct=rt&&!rt.curOp;if(ct&&Ou(rt),hn(this,"clear")){var kt=this.find();kt&&Ar(this,"clear",kt.from,kt.to)}for(var bt=null,Ot=null,qt=0;qt<this.lines.length;++qt){var me=this.lines[qt],Te=ni(me.markedSpans,this);rt&&!this.collapsed?ki(rt,Oe(me),"text"):rt&&(Te.to!=null&&(Ot=Oe(me)),Te.from!=null&&(bt=Oe(me))),me.markedSpans=oi(me.markedSpans,Te),Te.from==null&&this.collapsed&&!Mn(this.doc,me)&&rt&&Dn(me,su(rt.display))}if(rt&&this.collapsed&&!rt.options.lineWrapping)for(var ke=0;ke<this.lines.length;++ke){var Ie=Br(this.lines[ke]),rn=Qi(Ie);rn>rt.display.maxLineLength&&(rt.display.maxLine=Ie,rt.display.maxLineLength=rn,rt.display.maxLineChanged=!0)}bt!=null&&rt&&this.collapsed&&bo(rt,bt,Ot+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,rt&&of(rt.doc)),rt&&Ar(rt,"markerCleared",rt,this,bt,Ot),ct&&Fu(rt),this.parent&&this.parent.clear()}},qe.prototype.find=function(rt,ct){rt==null&&this.type=="bookmark"&&(rt=1);for(var kt,bt,Ot=0;Ot<this.lines.length;++Ot){var qt=this.lines[Ot],me=ni(qt.markedSpans,this);if(me.from!=null&&(kt=sn(ct?qt:Oe(qt),me.from),rt==-1))return kt;if(me.to!=null&&(bt=sn(ct?qt:Oe(qt),me.to),rt==1))return bt}return kt&&{from:kt,to:bt}},qe.prototype.changed=function(){var rt=this,ct=this.find(-1,!0),kt=this,bt=this.doc.cm;!ct||!bt||qi(bt,function(){var Ot=ct.line,qt=Oe(ct.line),me=mh(bt,qt);if(me&&(hc(me),bt.curOp.selectionChanged=bt.curOp.forceUpdate=!0),bt.curOp.updateMaxLine=!0,!Mn(kt.doc,Ot)&&kt.height!=null){var Te=kt.height;kt.height=null;var ke=Na(kt)-Te;ke&&Dn(Ot,Ot.height+ke)}Ar(bt,"markerChanged",bt,rt)})},qe.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)},qe.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)}},un(qe);function jh(rt,ct,kt,bt,Ot){if(bt&&bt.shared)return Zg(rt,ct,kt,bt,Ot);if(rt.cm&&!rt.cm.curOp)return la(rt.cm,jh)(rt,ct,kt,bt,Ot);var qt=new qe(rt,Ot),me=dn(ct,kt);if(bt&&Se(bt,qt,!1),me>0||me==0&&qt.clearWhenEmpty!==!1)return qt;if(qt.replacedWith&&(qt.collapsed=!0,qt.widgetNode=Gt("span",[qt.replacedWith],"CodeMirror-widget"),bt.handleMouseEvents||qt.widgetNode.setAttribute("cm-ignore-events","true"),bt.insertLeft&&(qt.widgetNode.insertLeft=!0)),qt.collapsed){if(Zr(rt,ct.line,ct,kt,qt)||ct.line!=kt.line&&Zr(rt,kt.line,ct,kt,qt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sn()}qt.addToHistory&&nf(rt,{from:ct,to:kt,origin:"markText"},rt.sel,NaN);var Te=ct.line,ke=rt.cm,Ie;if(rt.iter(Te,kt.line+1,function(ze){ke&&qt.collapsed&&!ke.options.lineWrapping&&Br(ze)==ke.display.maxLine&&(Ie=!0),qt.collapsed&&Te!=ct.line&&Dn(ze,0),Ui(ze,new Jr(qt,Te==ct.line?ct.ch:null,Te==kt.line?kt.ch:null)),++Te}),qt.collapsed&&rt.iter(ct.line,kt.line+1,function(ze){Mn(rt,ze)&&Dn(ze,0)}),qt.clearOnEnter&&Qe(qt,"beforeCursorEnter",function(){return qt.clear()}),qt.readOnly&&(ci(),(rt.history.done.length||rt.history.undone.length)&&rt.clearHistory()),qt.collapsed&&(qt.id=++Kg,qt.atomic=!0),ke){if(Ie&&(ke.curOp.updateMaxLine=!0),qt.collapsed)bo(ke,ct.line,kt.line+1);else if(qt.className||qt.startStyle||qt.endStyle||qt.css||qt.attributes||qt.title)for(var rn=ct.line;rn<=kt.line;rn++)ki(ke,rn,"text");qt.atomic&&of(ke.doc),Ar(ke,"markerAdded",ke,qt)}return qt}var Hl=function(rt,ct){this.markers=rt,this.primary=ct;for(var kt=0;kt<rt.length;++kt)rt[kt].parent=this};Hl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var rt=0;rt<this.markers.length;++rt)this.markers[rt].clear();Ar(this,"clear")}},Hl.prototype.find=function(rt,ct){return this.primary.find(rt,ct)},un(Hl);function Zg(rt,ct,kt,bt,Ot){bt=Se(bt),bt.shared=!1;var qt=[jh(rt,ct,kt,bt,Ot)],me=qt[0],Te=bt.widgetNode;return Tl(rt,function(ke){Te&&(bt.widgetNode=Te.cloneNode(!0)),qt.push(jh(ke,Wn(ke,ct),Wn(ke,kt),bt,Ot));for(var Ie=0;Ie<ke.linked.length;++Ie)if(ke.linked[Ie].isParent)return;me=ge(qt)}),new Hl(qt,me)}function fp(rt){return rt.findMarks(sn(rt.first,0),rt.clipPos(sn(rt.lastLine())),function(ct){return ct.parent})}function Xg(rt,ct){for(var kt=0;kt<ct.length;kt++){var bt=ct[kt],Ot=bt.find(),qt=rt.clipPos(Ot.from),me=rt.clipPos(Ot.to);if(dn(qt,me)){var Te=jh(rt,qt,me,bt.primary,bt.primary.type);bt.markers.push(Te),Te.parent=bt}}}function dp(rt){for(var ct=function(bt){var Ot=rt[bt],qt=[Ot.primary.doc];Tl(Ot.primary.doc,function(ke){return qt.push(ke)});for(var me=0;me<Ot.markers.length;me++){var Te=Ot.markers[me];ye(qt,Te.doc)==-1&&(Te.parent=null,Ot.markers.splice(me--,1))}},kt=0;kt<rt.length;kt++)ct(kt)}var e0=0,Ba=function(rt,ct,kt,bt,Ot){if(!(this instanceof Ba))return new Ba(rt,ct,kt,bt,Ot);kt==null&&(kt=0),Ao.call(this,[new yc([new Bi("",null)])]),this.first=kt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=kt;var qt=sn(kt,0);this.sel=hu(qt),this.history=new pc(null),this.id=++e0,this.modeOption=ct,this.lineSep=bt,this.direction=Ot=="rtl"?"rtl":"ltr",this.extend=!1,typeof rt=="string"&&(rt=this.splitLines(rt)),Yf(this,{from:qt,to:qt,text:rt}),Wa(this,hu(qt),fe)};Ba.prototype=wt(Ao.prototype,{constructor:Ba,iter:function(rt,ct,kt){kt?this.iterN(rt-this.first,ct-rt,kt):this.iterN(this.first,this.first+this.size,rt)},insert:function(rt,ct){for(var kt=0,bt=0;bt<ct.length;++bt)kt+=ct[bt].height;this.insertInner(rt-this.first,ct,kt)},remove:function(rt,ct){this.removeInner(rt-this.first,ct)},getValue:function(rt){var ct=Xe(this,this.first,this.first+this.size);return rt===!1?ct:ct.join(rt||this.lineSeparator())},setValue:ma(function(rt){var ct=sn(this.first,0),kt=this.first+this.size-1;Wu(this,{from:ct,to:sn(kt,Nn(this,kt).text.length),text:this.splitLines(rt),origin:"setValue",full:!0},!0),this.cm&&bh(this.cm,0,0),Wa(this,hu(ct),fe)}),replaceRange:function(rt,ct,kt,bt){ct=Wn(this,ct),kt=kt?Wn(this,kt):ct,Ah(this,rt,ct,kt,bt)},getRange:function(rt,ct,kt){var bt=en(this,Wn(this,rt),Wn(this,ct));return kt===!1?bt:bt.join(kt||this.lineSeparator())},getLine:function(rt){var ct=this.getLineHandle(rt);return ct&&ct.text},getLineHandle:function(rt){if(En(this,rt))return Nn(this,rt)},getLineNumber:function(rt){return Oe(rt)},getLineHandleVisualStart:function(rt){return typeof rt=="number"&&(rt=Nn(this,rt)),Br(rt)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(rt){return Wn(this,rt)},getCursor:function(rt){var ct=this.sel.primary(),kt;return rt==null||rt=="head"?kt=ct.head:rt=="anchor"?kt=ct.anchor:rt=="end"||rt=="to"||rt===!1?kt=ct.to():kt=ct.from(),kt},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ma(function(rt,ct,kt){Mh(this,Wn(this,typeof rt=="number"?sn(rt,ct||0):rt),null,kt)}),setSelection:ma(function(rt,ct,kt){Mh(this,Wn(this,rt),Wn(this,ct||rt),kt)}),extendSelection:ma(function(rt,ct,kt){td(this,Wn(this,rt),ct&&Wn(this,ct),kt)}),extendSelections:ma(function(rt,ct){Gg(this,sr(this,rt),ct)}),extendSelectionsBy:ma(function(rt,ct){var kt=xe(this.sel.ranges,rt);Gg(this,sr(this,kt),ct)}),setSelections:ma(function(rt,ct,kt){if(rt.length){for(var bt=[],Ot=0;Ot<rt.length;Ot++)bt[Ot]=new ao(Wn(this,rt[Ot].anchor),Wn(this,rt[Ot].head));ct==null&&(ct=Math.min(rt.length-1,this.sel.primIndex)),Wa(this,cl(this.cm,bt,ct),kt)}}),addSelection:ma(function(rt,ct,kt){var bt=this.sel.ranges.slice(0);bt.push(new ao(Wn(this,rt),Wn(this,ct||rt))),Wa(this,cl(this.cm,bt,bt.length-1),kt)}),getSelection:function(rt){for(var ct=this.sel.ranges,kt,bt=0;bt<ct.length;bt++){var Ot=en(this,ct[bt].from(),ct[bt].to());kt=kt?kt.concat(Ot):Ot}return rt===!1?kt:kt.join(rt||this.lineSeparator())},getSelections:function(rt){for(var ct=[],kt=this.sel.ranges,bt=0;bt<kt.length;bt++){var Ot=en(this,kt[bt].from(),kt[bt].to());rt!==!1&&(Ot=Ot.join(rt||this.lineSeparator())),ct[bt]=Ot}return ct},replaceSelection:function(rt,ct,kt){for(var bt=[],Ot=0;Ot<this.sel.ranges.length;Ot++)bt[Ot]=rt;this.replaceSelections(bt,ct,kt||"+input")},replaceSelections:ma(function(rt,ct,kt){for(var bt=[],Ot=this.sel,qt=0;qt<Ot.ranges.length;qt++){var me=Ot.ranges[qt];bt[qt]={from:me.from(),to:me.to(),text:this.splitLines(rt[qt]),origin:kt}}for(var Te=ct&&ct!="end"&&$c(this,bt,ct),ke=bt.length-1;ke>=0;ke--)Wu(this,bt[ke]);Te?ed(this,Te):this.cm&&lu(this.cm)}),undo:ma(function(){uf(this,"undo")}),redo:ma(function(){uf(this,"redo")}),undoSelection:ma(function(){uf(this,"undo",!0)}),redoSelection:ma(function(){uf(this,"redo",!0)}),setExtending:function(rt){this.extend=rt},getExtending:function(){return this.extend},historySize:function(){for(var rt=this.history,ct=0,kt=0,bt=0;bt<rt.done.length;bt++)rt.done[bt].ranges||++ct;for(var Ot=0;Ot<rt.undone.length;Ot++)rt.undone[Ot].ranges||++kt;return{undo:ct,redo:kt}},clearHistory:function(){var rt=this;this.history=new pc(this.history.maxGeneration),Tl(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:cu(this.history.done),undone:cu(this.history.undone)}},setHistory:function(rt){var ct=this.history=new pc(this.history.maxGeneration);ct.done=cu(rt.done.slice(0),null,!0),ct.undone=cu(rt.undone.slice(0),null,!0)},setGutterMarker:ma(function(rt,ct,kt){return Nh(this,rt,"gutter",function(bt){var Ot=bt.gutterMarkers||(bt.gutterMarkers={});return Ot[ct]=kt,!kt&&It(Ot)&&(bt.gutterMarkers=null),!0})}),clearGutter:ma(function(rt){var ct=this;this.iter(function(kt){kt.gutterMarkers&&kt.gutterMarkers[rt]&&Nh(ct,kt,"gutter",function(){return kt.gutterMarkers[rt]=null,It(kt.gutterMarkers)&&(kt.gutterMarkers=null),!0})})}),lineInfo:function(rt){var ct;if(typeof rt=="number"){if(!En(this,rt)||(ct=rt,rt=Nn(this,rt),!rt))return null}else if(ct=Oe(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:ma(function(rt,ct,kt){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(bt){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass";if(!bt[Ot])bt[Ot]=kt;else{if(At(kt).test(bt[Ot]))return!1;bt[Ot]+=" "+kt}return!0})}),removeLineClass:ma(function(rt,ct,kt){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(bt){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass",qt=bt[Ot];if(qt)if(kt==null)bt[Ot]=null;else{var me=qt.match(At(kt));if(!me)return!1;var Te=me.index+me[0].length;bt[Ot]=qt.slice(0,me.index)+(!me.index||Te==qt.length?"":" ")+qt.slice(Te)||null}else return!1;return!0})}),addLineWidget:ma(function(rt,ct,kt){return nd(this,rt,ct,kt)}),removeLineWidget:function(rt){rt.clear()},markText:function(rt,ct,kt){return jh(this,Wn(this,rt),Wn(this,ct),kt,kt&&kt.type||"range")},setBookmark:function(rt,ct){var kt={replacedWith:ct&&(ct.nodeType==null?ct.widget:ct),insertLeft:ct&&ct.insertLeft,clearWhenEmpty:!1,shared:ct&&ct.shared,handleMouseEvents:ct&&ct.handleMouseEvents};return rt=Wn(this,rt),jh(this,rt,rt,kt,"bookmark")},findMarksAt:function(rt){rt=Wn(this,rt);var ct=[],kt=Nn(this,rt.line).markedSpans;if(kt)for(var bt=0;bt<kt.length;++bt){var Ot=kt[bt];(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,kt){rt=Wn(this,rt),ct=Wn(this,ct);var bt=[],Ot=rt.line;return this.iter(rt.line,ct.line+1,function(qt){var me=qt.markedSpans;if(me)for(var Te=0;Te<me.length;Te++){var ke=me[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)&&(!kt||kt(ke.marker))&&bt.push(ke.marker.parent||ke.marker)}++Ot}),bt},getAllMarks:function(){var rt=[];return this.iter(function(ct){var kt=ct.markedSpans;if(kt)for(var bt=0;bt<kt.length;++bt)kt[bt].from!=null&&rt.push(kt[bt].marker)}),rt},posFromIndex:function(rt){var ct,kt=this.first,bt=this.lineSeparator().length;return this.iter(function(Ot){var qt=Ot.text.length+bt;if(qt>rt)return ct=rt,!0;rt-=qt,++kt}),Wn(this,sn(kt,ct))},indexFromPos:function(rt){rt=Wn(this,rt);var ct=rt.ch;if(rt.line<this.first||rt.ch<0)return 0;var kt=this.lineSeparator().length;return this.iter(this.first,rt.line,function(bt){ct+=bt.text.length+kt}),ct},copy:function(rt){var ct=new Ba(Xe(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,kt=this.first+this.size;rt.from!=null&&rt.from>ct&&(ct=rt.from),rt.to!=null&&rt.to<kt&&(kt=rt.to);var bt=new Ba(Xe(this,ct,kt),rt.mode||this.modeOption,ct,this.lineSep,this.direction);return rt.sharedHist&&(bt.history=this.history),(this.linked||(this.linked=[])).push({doc:bt,sharedHist:rt.sharedHist}),bt.linked=[{doc:this,isParent:!0,sharedHist:rt.sharedHist}],Xg(bt,fp(this)),bt},unlinkDoc:function(rt){if(rt instanceof Ki&&(rt=rt.doc),this.linked)for(var ct=0;ct<this.linked.length;++ct){var kt=this.linked[ct];if(kt.doc==rt){this.linked.splice(ct,1),rt.unlinkDoc(this),dp(fp(this));break}}if(rt.history==this.history){var bt=[rt.id];Tl(rt,function(Ot){return bt.push(Ot.id)},!0),rt.history=new pc(null),rt.history.done=cu(this.history.done,bt),rt.history.undone=cu(this.history.undone,bt)}},iterLinkedDocs:function(rt){Tl(this,rt)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(rt){return this.lineSep?rt.split(this.lineSep):jr(rt)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ma(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 hf=0;function pp(rt){var ct=this;if(Qg(ct),!(Ke(ct,rt)||Jo(ct.display,rt))){bn(rt),Bt&&(hf=+new Date);var kt=qa(ct,rt,!0),bt=rt.dataTransfer.files;if(!(!kt||ct.isReadOnly()))if(bt&&bt.length&&window.FileReader&&window.File)for(var Ot=bt.length,qt=Array(Ot),me=0,Te=function(){++me==Ot&&la(ct,function(){kt=Wn(ct.doc,kt);var pn={from:kt,to:kt,text:ct.doc.splitLines(qt.filter(function(Hn){return Hn!=null}).join(ct.doc.lineSeparator())),origin:"paste"};Wu(ct.doc,pn),ed(ct.doc,hu(Wn(ct.doc,kt),Wn(ct.doc,zu(pn))))})()},ke=function(pn,Hn){if(ct.options.allowDropFileTypes&&ye(ct.options.allowDropFileTypes,pn.type)==-1){Te();return}var Jn=new FileReader;Jn.onerror=function(){return Te()},Jn.onload=function(){var ir=Jn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ir)){Te();return}qt[Hn]=ir,Te()},Jn.readAsText(pn)},Ie=0;Ie<bt.length;Ie++)ke(bt[Ie],Ie);else{if(ct.state.draggingText&&ct.doc.sel.contains(kt)>-1){ct.state.draggingText(rt),setTimeout(function(){return ct.display.input.focus()},20);return}try{var rn=rt.dataTransfer.getData("Text");if(rn){var ze;if(ct.state.draggingText&&!ct.state.draggingText.copy&&(ze=ct.listSelections()),Th(ct.doc,hu(kt,kt)),ze)for(var vn=0;vn<ze.length;++vn)Ah(ct.doc,"",ze[vn].anchor,ze[vn].head,"drag");ct.replaceSelection(rn,"around","paste"),ct.display.input.focus()}}catch(pn){}}}}function Yg(rt,ct){if(Bt&&(!rt.state.draggingText||+new Date-hf<100)){Yn(ct);return}if(!(Ke(rt,ct)||Jo(rt.display,ct))&&(ct.dataTransfer.setData("Text",rt.getSelection()),ct.dataTransfer.effectAllowed="copyMove",ct.dataTransfer.setDragImage&&!Tt)){var kt=Nt("img",null,null,"position: fixed; left: 0; top: 0;");kt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",St&&(kt.width=kt.height=1,rt.display.wrapper.appendChild(kt),kt._top=kt.offsetTop),ct.dataTransfer.setDragImage(kt,0,0),St&&kt.parentNode.removeChild(kt)}}function Jg(rt,ct){var kt=qa(rt,ct);if(kt){var bt=document.createDocumentFragment();Ii(rt,kt,bt),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,bt)}}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"),kt=[],bt=0;bt<ct.length;bt++){var Ot=ct[bt].CodeMirror;Ot&&kt.push(Ot)}kt.length&&kt[0].operation(function(){for(var qt=0;qt<kt.length;qt++)rt(kt[qt])})}}var gp=!1;function zs(){gp||(Sc(),gp=!0)}function Sc(){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 Vl={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"},cf=0;cf<10;cf++)Vl[cf+48]=Vl[cf+96]=String(cf);for(var rd=65;rd<=90;rd++)Vl[rd]=String.fromCharCode(rd);for(var ff=1;ff<=12;ff++)Vl[ff+111]=Vl[ff+63235]="F"+ff;var Ps={};Ps.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"},Ps.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"},Ps.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"},Ps.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"]},Ps.default=at?Ps.macDefault:Ps.pcDefault;function vp(rt){var ct=rt.split(/-(?!$)/);rt=ct[ct.length-1];for(var kt,bt,Ot,qt,me=0;me<ct.length-1;me++){var Te=ct[me];if(/^(cmd|meta|m)$/i.test(Te))qt=!0;else if(/^a(lt)?$/i.test(Te))kt=!0;else if(/^(c|ctrl|control)$/i.test(Te))bt=!0;else if(/^s(hift)?$/i.test(Te))Ot=!0;else throw new Error("Unrecognized modifier name: "+Te)}return kt&&(rt="Alt-"+rt),bt&&(rt="Ctrl-"+rt),qt&&(rt="Cmd-"+rt),Ot&&(rt="Shift-"+rt),rt}function yp(rt){var ct={};for(var kt in rt)if(rt.hasOwnProperty(kt)){var bt=rt[kt];if(/^(name|fallthrough|(de|at)tach)$/.test(kt))continue;if(bt=="..."){delete rt[kt];continue}for(var Ot=xe(kt.split(" "),vp),qt=0;qt<Ot.length;qt++){var me=void 0,Te=void 0;qt==Ot.length-1?(Te=Ot.join(" "),me=bt):(Te=Ot.slice(0,qt+1).join(" "),me="...");var ke=ct[Te];if(!ke)ct[Te]=me;else if(ke!=me)throw new Error("Inconsistent bindings for "+Te)}delete rt[kt]}for(var Ie in ct)rt[Ie]=ct[Ie];return rt}function el(rt,ct,kt,bt){ct=Oh(ct);var Ot=ct.call?ct.call(rt,bt):ct[rt];if(Ot===!1)return"nothing";if(Ot==="...")return"multi";if(Ot!=null&&kt(Ot))return"handled";if(ct.fallthrough){if(Object.prototype.toString.call(ct.fallthrough)!="[object Array]")return el(rt,ct.fallthrough,kt,bt);for(var qt=0;qt<ct.fallthrough.length;qt++){var me=el(rt,ct.fallthrough[qt],kt,bt);if(me)return me}}}function xc(rt){var ct=typeof rt=="string"?rt:Vl[rt.keyCode];return ct=="Ctrl"||ct=="Alt"||ct=="Shift"||ct=="Mod"}function Sp(rt,ct,kt){var bt=rt;return ct.altKey&&bt!="Alt"&&(rt="Alt-"+rt),(dt?ct.metaKey:ct.ctrlKey)&&bt!="Ctrl"&&(rt="Ctrl-"+rt),(dt?ct.ctrlKey:ct.metaKey)&&bt!="Mod"&&(rt="Cmd-"+rt),!kt&&ct.shiftKey&&bt!="Shift"&&(rt="Shift-"+rt),rt}function qg(rt,ct){if(St&&rt.keyCode==34&&rt.char)return!1;var kt=Vl[rt.keyCode];return kt==null||rt.altGraphKey?!1:(rt.keyCode==3&&rt.code&&(kt=rt.code),Sp(kt,rt,ct))}function Oh(rt){return typeof rt=="string"?Ps[rt]:rt}function Cs(rt,ct){for(var kt=rt.doc.sel.ranges,bt=[],Ot=0;Ot<kt.length;Ot++){for(var qt=ct(kt[Ot]);bt.length&&dn(qt.from,ge(bt).to)<=0;){var me=bt.pop();if(dn(me.from,qt.from)<0){qt.from=me.from;break}}bt.push(qt)}qi(rt,function(){for(var Te=bt.length-1;Te>=0;Te--)Ah(rt.doc,"",bt[Te].from,bt[Te].to,"+delete");lu(rt)})}function xp(rt,ct,kt){var bt=te(rt.text,ct+kt,kt);return bt<0||bt>rt.text.length?null:bt}function Ko(rt,ct,kt){var bt=xp(rt,ct.ch,kt);return bt==null?null:new sn(ct.line,bt,kt<0?"after":"before")}function df(rt,ct,kt,bt,Ot){if(rt){ct.doc.direction=="rtl"&&(Ot=-Ot);var qt=tn(kt,ct.doc.direction);if(qt){var me=Ot<0?ge(qt):qt[0],Te=Ot<0==(me.level==1),ke=Te?"after":"before",Ie;if(me.level>0||ct.doc.direction=="rtl"){var rn=zl(ct,kt);Ie=Ot<0?kt.text.length-1:0;var ze=Fs(ct,rn,Ie).top;Ie=ue(function(vn){return Fs(ct,rn,vn).top==ze},Ot<0==(me.level==1)?me.from:me.to-1,Ie),ke=="before"&&(Ie=xp(kt,Ie,1))}else Ie=Ot<0?me.to:me.from;return new sn(bt,Ie,ke)}}return new sn(bt,Ot<0?kt.text.length:0,Ot<0?"before":"after")}function id(rt,ct,kt,bt){var Ot=tn(ct,rt.doc.direction);if(!Ot)return Ko(ct,kt,bt);kt.ch>=ct.text.length?(kt.ch=ct.text.length,kt.sticky="before"):kt.ch<=0&&(kt.ch=0,kt.sticky="after");var qt=Le(Ot,kt.ch,kt.sticky),me=Ot[qt];if(rt.doc.direction=="ltr"&&me.level%2==0&&(bt>0?me.to>kt.ch:me.from<kt.ch))return Ko(ct,kt,bt);var Te=function(wr,Ir){return xp(ct,wr instanceof sn?wr.ch:wr,Ir)},ke,Ie=function(wr){return rt.options.lineWrapping?(ke=ke||zl(rt,ct),Ds(rt,ct,ke,wr)):{begin:0,end:ct.text.length}},rn=Ie(kt.sticky=="before"?Te(kt,-1):kt.ch);if(rt.doc.direction=="rtl"||me.level==1){var ze=me.level==1==bt<0,vn=Te(kt,ze?1:-1);if(vn!=null&&(ze?vn<=me.to&&vn<=rn.end:vn>=me.from&&vn>=rn.begin)){var pn=ze?"before":"after";return new sn(kt.line,vn,pn)}}var Hn=function(wr,Ir,Tr){for(var Hr=function(Po,ha){return ha?new sn(kt.line,Te(Po,1),"before"):new sn(kt.line,Po,"after")};wr>=0&&wr<Ot.length;wr+=Ir){var fi=Ot[wr],Mr=Ir>0==(fi.level!=1),Mi=Mr?Tr.begin:Te(Tr.end,-1);if(fi.from<=Mi&&Mi<fi.to||(Mi=Mr?fi.from:Te(fi.to,-1),Tr.begin<=Mi&&Mi<Tr.end))return Hr(Mi,Mr)}},Jn=Hn(qt+bt,bt,rn);if(Jn)return Jn;var ir=bt>0?rn.end:Te(rn.begin,-1);return ir!=null&&!(bt>0&&ir==ct.text.length)&&(Jn=Hn(bt>0?0:Ot.length-1,bt,Ie(ir)),Jn)?Jn:null}var Hu={selectAll:Vo,singleSelection:function(rt){return rt.setSelection(rt.getCursor("anchor"),rt.getCursor("head"),fe)},killLine:function(rt){return Cs(rt,function(ct){if(ct.empty()){var kt=Nn(rt.doc,ct.head.line).text.length;return ct.head.ch==kt&&ct.head.line<rt.lastLine()?{from:ct.head,to:sn(ct.head.line+1,0)}:{from:ct.head,to:sn(ct.head.line,kt)}}else return{from:ct.from(),to:ct.to()}})},deleteLine:function(rt){return Cs(rt,function(ct){return{from:sn(ct.from().line,0),to:Wn(rt.doc,sn(ct.to().line+1,0))}})},delLineLeft:function(rt){return Cs(rt,function(ct){return{from:sn(ct.from().line,0),to:ct.from()}})},delWrappedLineLeft:function(rt){return Cs(rt,function(ct){var kt=rt.charCoords(ct.head,"div").top+5,bt=rt.coordsChar({left:0,top:kt},"div");return{from:bt,to:ct.from()}})},delWrappedLineRight:function(rt){return Cs(rt,function(ct){var kt=rt.charCoords(ct.head,"div").top+5,bt=rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:kt},"div");return{from:ct.from(),to:bt}})},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(sn(rt.firstLine(),0))},goDocEnd:function(rt){return rt.extendSelection(sn(rt.lastLine()))},goLineStart:function(rt){return rt.extendSelectionsBy(function(ct){return wc(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 bc(rt,ct.head.line)},{origin:"+move",bias:-1})},goLineRight:function(rt){return rt.extendSelectionsBy(function(ct){var kt=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:kt},"div")},ce)},goLineLeft:function(rt){return rt.extendSelectionsBy(function(ct){var kt=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:0,top:kt},"div")},ce)},goLineLeftSmart:function(rt){return rt.extendSelectionsBy(function(ct){var kt=rt.cursorCoords(ct.head,"div").top+5,bt=rt.coordsChar({left:0,top:kt},"div");return bt.ch<rt.getLine(bt.line).search(/\S/)?wp(rt,ct.head):bt},ce)},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=[],kt=rt.listSelections(),bt=rt.options.tabSize,Ot=0;Ot<kt.length;Ot++){var qt=kt[Ot].from(),me=Qt(rt.getLine(qt.line),qt.ch,bt);ct.push(Fe(bt-me%bt))}rt.replaceSelections(ct)},defaultTab:function(rt){rt.somethingSelected()?rt.indentSelection("add"):rt.execCommand("insertTab")},transposeChars:function(rt){return qi(rt,function(){for(var ct=rt.listSelections(),kt=[],bt=0;bt<ct.length;bt++)if(ct[bt].empty()){var Ot=ct[bt].head,qt=Nn(rt.doc,Ot.line).text;if(qt){if(Ot.ch==qt.length&&(Ot=new sn(Ot.line,Ot.ch-1)),Ot.ch>0)Ot=new sn(Ot.line,Ot.ch+1),rt.replaceRange(qt.charAt(Ot.ch-1)+qt.charAt(Ot.ch-2),sn(Ot.line,Ot.ch-2),Ot,"+transpose");else if(Ot.line>rt.doc.first){var me=Nn(rt.doc,Ot.line-1).text;me&&(Ot=new sn(Ot.line,1),rt.replaceRange(qt.charAt(0)+rt.doc.lineSeparator()+me.charAt(me.length-1),sn(Ot.line-1,me.length-1),Ot,"+transpose"))}}kt.push(new ao(Ot,Ot))}rt.setSelections(kt)})},newlineAndIndent:function(rt){return qi(rt,function(){for(var ct=rt.listSelections(),kt=ct.length-1;kt>=0;kt--)rt.replaceRange(rt.doc.lineSeparator(),ct[kt].anchor,ct[kt].head,"+input");ct=rt.listSelections();for(var bt=0;bt<ct.length;bt++)rt.indentLine(ct[bt].from().line,null,!0);lu(rt)})},openLine:function(rt){return rt.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(rt){return rt.toggleOverwrite()}};function wc(rt,ct){var kt=Nn(rt.doc,ct),bt=Br(kt);return bt!=kt&&(ct=Oe(bt)),df(!0,rt,bt,ct,1)}function bc(rt,ct){var kt=Nn(rt.doc,ct),bt=ti(kt);return bt!=kt&&(ct=Oe(bt)),df(!0,rt,kt,ct,-1)}function wp(rt,ct){var kt=wc(rt,ct.line),bt=Nn(rt.doc,kt.line),Ot=tn(bt,rt.doc.direction);if(!Ot||Ot[0].level==0){var qt=Math.max(kt.ch,bt.text.search(/\S/)),me=ct.line==kt.line&&ct.ch<=qt&&ct.ch;return sn(kt.line,me?0:qt,kt.sticky)}return kt}function Pc(rt,ct,kt){if(typeof ct=="string"&&(ct=Hu[ct],!ct))return!1;rt.display.input.ensurePolled();var bt=rt.display.shift,Ot=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),kt&&(rt.display.shift=!1),Ot=ct(rt)!=be}finally{rt.display.shift=bt,rt.state.suppressEdits=!1}return Ot}function bp(rt,ct,kt){for(var bt=0;bt<rt.state.keyMaps.length;bt++){var Ot=el(ct,rt.state.keyMaps[bt],kt,rt);if(Ot)return Ot}return rt.options.extraKeys&&el(ct,rt.options.extraKeys,kt,rt)||el(ct,rt.options.keyMap,kt,rt)}var Kl=new ne;function Fh(rt,ct,kt,bt){var Ot=rt.state.keySeq;if(Ot){if(xc(ct))return"handled";if(/\'$/.test(ct)?rt.state.keySeq=null:Kl.set(50,function(){rt.state.keySeq==Ot&&(rt.state.keySeq=null,rt.display.input.reset())}),od(rt,Ot+" "+ct,kt,bt))return!0}return od(rt,ct,kt,bt)}function od(rt,ct,kt,bt){var Ot=bp(rt,ct,bt);return Ot=="multi"&&(rt.state.keySeq=ct),Ot=="handled"&&Ar(rt,"keyHandled",rt,ct,kt),(Ot=="handled"||Ot=="multi")&&(bn(kt),io(rt)),!!Ot}function ad(rt,ct){var kt=qg(ct,!0);return kt?ct.shiftKey&&!rt.state.keySeq?Fh(rt,"Shift-"+kt,ct,function(bt){return Pc(rt,bt,!0)})||Fh(rt,kt,ct,function(bt){if(typeof bt=="string"?/^go[A-Z]/.test(bt):bt.motion)return Pc(rt,bt)}):Fh(rt,kt,ct,function(bt){return Pc(rt,bt)}):!1}function sd(rt,ct,kt){return Fh(rt,"'"+kt+"'",ct,function(bt){return Pc(rt,bt,!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 kt=rt.keyCode;ct.display.shift=kt==16||rt.shiftKey;var bt=ad(ct,rt);St&&(Dh=bt?kt:null,!bt&&kt==88&&!$n&&(at?rt.metaKey:rt.ctrlKey)&&ct.replaceSelection("",null,"cut")),ae&&!at&&!bt&&kt==46&&rt.shiftKey&&!rt.ctrlKey&&document.execCommand&&document.execCommand("cut"),kt==18&&!/\bCodeMirror-crosshair\b/.test(ct.display.lineDiv.className)&&Cp(ct)}}function Cp(rt){var ct=rt.display.lineDiv;Vt(ct,"CodeMirror-crosshair");function kt(bt){(bt.keyCode==18||!bt.altKey)&&(Dt(ct,"CodeMirror-crosshair"),Ge(document,"keyup",kt),Ge(document,"mouseover",kt))}Qe(document,"keyup",kt),Qe(document,"mouseover",kt)}function kp(rt){rt.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,rt)}function Ll(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&!(Jo(ct.display,rt)||Ke(ct,rt)||rt.ctrlKey&&!rt.altKey||at&&rt.metaKey)){var kt=rt.keyCode,bt=rt.charCode;if(St&&kt==Dh){Dh=null,bn(rt);return}if(!(St&&(!rt.which||rt.which<10)&&ad(ct,rt))){var Ot=String.fromCharCode(bt==null?kt:bt);Ot!="\b"&&(sd(ct,rt,Ot)||ct.display.input.onKeyPress(rt))}}}var tm=400,Ep=function(rt,ct,kt){this.time=rt,this.pos=ct,this.button=kt};Ep.prototype.compare=function(rt,ct,kt){return this.time+tm>rt&&dn(ct,this.pos)==0&&kt==this.button};var Cc,Bh;function Mp(rt,ct){var kt=+new Date;return Bh&&Bh.compare(kt,rt,ct)?(Cc=Bh=null,"triple"):Cc&&Cc.compare(kt,rt,ct)?(Bh=new Ep(kt,rt,ct),Cc=null,"double"):(Cc=new Ep(kt,rt,ct),Bh=null,"single")}function Al(rt){var ct=this,kt=ct.display;if(!(Ke(ct,rt)||kt.activeTouch&&kt.input.supportsTouch())){if(kt.input.ensurePolled(),kt.shift=rt.shiftKey,Jo(kt,rt)){gt||(kt.scroller.draggable=!1,setTimeout(function(){return kt.scroller.draggable=!0},100));return}if(!hd(ct,rt)){var bt=qa(ct,rt),Ot=pr(rt),qt=bt?Mp(bt,Ot):"single";window.focus(),Ot==1&&ct.state.selectingText&&ct.state.selectingText(rt),!(bt&&Tp(ct,Ot,bt,qt,rt))&&(Ot==1?bt?em(ct,bt,qt,rt):vr(rt)==kt.scroller&&bn(rt):Ot==2?(bt&&td(ct.doc,bt),setTimeout(function(){return kt.input.focus()},20)):Ot==3&&(Pt?ct.display.input.onContextMenu(rt):Eo(ct)))}}}function Tp(rt,ct,kt,bt,Ot){var qt="Click";return bt=="double"?qt="Double"+qt:bt=="triple"&&(qt="Triple"+qt),qt=(ct==1?"Left":ct==2?"Middle":"Right")+qt,Fh(rt,Sp(qt,Ot),Ot,function(me){if(typeof me=="string"&&(me=Hu[me]),!me)return!1;var Te=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Te=me(rt,kt)!=be}finally{rt.state.suppressEdits=!1}return Te})}function ld(rt,ct,kt){var bt=rt.getOption("configureMouse"),Ot=bt?bt(rt,ct,kt):{};if(Ot.unit==null){var qt=it?kt.shiftKey&&kt.metaKey:kt.altKey;Ot.unit=qt?"rectangle":ct=="single"?"char":ct=="double"?"word":"line"}return(Ot.extend==null||rt.doc.extend)&&(Ot.extend=rt.doc.extend||kt.shiftKey),Ot.addNew==null&&(Ot.addNew=at?kt.metaKey:kt.ctrlKey),Ot.moveOnDrag==null&&(Ot.moveOnDrag=!(at?kt.altKey:kt.ctrlKey)),Ot}function em(rt,ct,kt,bt){Bt?setTimeout(de(vo,rt),0):rt.curOp.focus=Ut();var Ot=ld(rt,kt,bt),qt=rt.doc.sel,me;rt.options.dragDrop&&gr&&!rt.isReadOnly()&&kt=="single"&&(me=qt.contains(ct))>-1&&(dn((me=qt.ranges[me]).from(),ct)<0||ct.xRel>0)&&(dn(me.to(),ct)>0||ct.xRel<0)?Lp(rt,bt,ct,Ot):n0(rt,bt,ct,Ot)}function Lp(rt,ct,kt,bt){var Ot=rt.display,qt=!1,me=la(rt,function(Ie){gt&&(Ot.scroller.draggable=!1),rt.state.draggingText=!1,Ge(Ot.wrapper.ownerDocument,"mouseup",me),Ge(Ot.wrapper.ownerDocument,"mousemove",Te),Ge(Ot.scroller,"dragstart",ke),Ge(Ot.scroller,"drop",me),qt||(bn(Ie),bt.addNew||td(rt.doc,kt,null,null,bt.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){qt=qt||Math.abs(ct.clientX-Ie.clientX)+Math.abs(ct.clientY-Ie.clientY)>=10},ke=function(){return qt=!0};gt&&(Ot.scroller.draggable=!0),rt.state.draggingText=me,me.copy=!bt.moveOnDrag,Ot.scroller.dragDrop&&Ot.scroller.dragDrop(),Qe(Ot.wrapper.ownerDocument,"mouseup",me),Qe(Ot.wrapper.ownerDocument,"mousemove",Te),Qe(Ot.scroller,"dragstart",ke),Qe(Ot.scroller,"drop",me),Eo(rt),setTimeout(function(){return Ot.input.focus()},20)}function Ap(rt,ct,kt){if(kt=="char")return new ao(ct,ct);if(kt=="word")return rt.findWordAt(ct);if(kt=="line")return new ao(sn(ct.line,0),Wn(rt.doc,sn(ct.line+1,0)));var bt=kt(rt,ct);return new ao(bt.from,bt.to)}function n0(rt,ct,kt,bt){var Ot=rt.display,qt=rt.doc;bn(ct);var me,Te,ke=qt.sel,Ie=ke.ranges;if(bt.addNew&&!bt.extend?(Te=qt.sel.contains(kt),Te>-1?me=Ie[Te]:me=new ao(kt,kt)):(me=qt.sel.primary(),Te=qt.sel.primIndex),bt.unit=="rectangle")bt.addNew||(me=new ao(kt,kt)),kt=qa(rt,ct,!0,!0),Te=-1;else{var rn=Ap(rt,kt,bt.unit);bt.extend?me=qf(me,rn.anchor,rn.head,bt.extend):me=rn}bt.addNew?Te==-1?(Te=Ie.length,Wa(qt,cl(rt,Ie.concat([me]),Te),{scroll:!1,origin:"*mouse"})):Ie.length>1&&Ie[Te].empty()&&bt.unit=="char"&&!bt.extend?(Wa(qt,cl(rt,Ie.slice(0,Te).concat(Ie.slice(Te+1)),0),{scroll:!1,origin:"*mouse"}),ke=qt.sel):Uu(qt,Te,me,pe):(Te=0,Wa(qt,new $s([me],0),pe),ke=qt.sel);var ze=kt;function vn(Tr){if(dn(ze,Tr)!=0)if(ze=Tr,bt.unit=="rectangle"){for(var Hr=[],fi=rt.options.tabSize,Mr=Qt(Nn(qt,kt.line).text,kt.ch,fi),Mi=Qt(Nn(qt,Tr.line).text,Tr.ch,fi),Po=Math.min(Mr,Mi),ha=Math.max(Mr,Mi),No=Math.min(kt.line,Tr.line),gs=Math.min(rt.lastLine(),Math.max(kt.line,Tr.line));No<=gs;No++){var Ha=Nn(qt,No).text,na=Ce(Ha,Po,fi);Po==ha?Hr.push(new ao(sn(No,na),sn(No,na))):Ha.length>na&&Hr.push(new ao(sn(No,na),sn(No,Ce(Ha,ha,fi))))}Hr.length||Hr.push(new ao(kt,kt)),Wa(qt,cl(rt,ke.ranges.slice(0,Te).concat(Hr),Te),{origin:"*mouse",scroll:!1}),rt.scrollIntoView(Tr)}else{var ks=me,Ia=Ap(rt,Tr,bt.unit),ra=ks.anchor,Yi;dn(Ia.anchor,ra)>0?(Yi=Ia.head,ra=Xn(ks.from(),Ia.anchor)):(Yi=Ia.anchor,ra=ar(ks.to(),Ia.head));var Do=ke.ranges.slice(0);Do[Te]=nm(rt,new ao(Wn(qt,ra),Yi)),Wa(qt,cl(rt,Do,Te),pe)}}var pn=Ot.wrapper.getBoundingClientRect(),Hn=0;function Jn(Tr){var Hr=++Hn,fi=qa(rt,Tr,!0,bt.unit=="rectangle");if(fi)if(dn(fi,ze)!=0){rt.curOp.focus=Ut(),vn(fi);var Mr=Fi(Ot,qt);(fi.line>=Mr.to||fi.line<Mr.from)&&setTimeout(la(rt,function(){Hn==Hr&&Jn(Tr)}),150)}else{var Mi=Tr.clientY<pn.top?-20:Tr.clientY>pn.bottom?20:0;Mi&&setTimeout(la(rt,function(){Hn==Hr&&(Ot.scroller.scrollTop+=Mi,Jn(Tr))}),50)}}function ir(Tr){rt.state.selectingText=!1,Hn=1/0,Tr&&(bn(Tr),Ot.input.focus()),Ge(Ot.wrapper.ownerDocument,"mousemove",wr),Ge(Ot.wrapper.ownerDocument,"mouseup",Ir),qt.history.lastSelOrigin=null}var wr=la(rt,function(Tr){Tr.buttons===0||!pr(Tr)?ir(Tr):Jn(Tr)}),Ir=la(rt,ir);rt.state.selectingText=Ir,Qe(Ot.wrapper.ownerDocument,"mousemove",wr),Qe(Ot.wrapper.ownerDocument,"mouseup",Ir)}function nm(rt,ct){var kt=ct.anchor,bt=ct.head,Ot=Nn(rt.doc,kt.line);if(dn(kt,bt)==0&&kt.sticky==bt.sticky)return ct;var qt=tn(Ot);if(!qt)return ct;var me=Le(qt,kt.ch,kt.sticky),Te=qt[me];if(Te.from!=kt.ch&&Te.to!=kt.ch)return ct;var ke=me+(Te.from==kt.ch==(Te.level!=1)?0:1);if(ke==0||ke==qt.length)return ct;var Ie;if(bt.line!=kt.line)Ie=(bt.line-kt.line)*(rt.doc.direction=="ltr"?1:-1)>0;else{var rn=Le(qt,bt.ch,bt.sticky),ze=rn-me||(bt.ch-kt.ch)*(Te.level==1?-1:1);rn==ke-1||rn==ke?Ie=ze<0:Ie=ze>0}var vn=qt[ke+(Ie?-1:0)],pn=Ie==(vn.level==1),Hn=pn?vn.from:vn.to,Jn=pn?"after":"before";return kt.ch==Hn&&kt.sticky==Jn?ct:new ao(new sn(kt.line,Hn,Jn),bt)}function ud(rt,ct,kt,bt){var Ot,qt;if(ct.touches)Ot=ct.touches[0].clientX,qt=ct.touches[0].clientY;else try{Ot=ct.clientX,qt=ct.clientY}catch(vn){return!1}if(Ot>=Math.floor(rt.display.gutters.getBoundingClientRect().right))return!1;bt&&bn(ct);var me=rt.display,Te=me.lineDiv.getBoundingClientRect();if(qt>Te.bottom||!hn(rt,kt))return Vn(ct);qt-=Te.top-me.viewOffset;for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=me.gutters.childNodes[ke];if(Ie&&Ie.getBoundingClientRect().right>=Ot){var rn=ln(rt.doc,qt),ze=rt.display.gutterSpecs[ke];return We(rt,kt,rt,rn,ze.className,ct),Vn(ct)}}}function hd(rt,ct){return ud(rt,ct,"gutterClick",!0)}function cd(rt,ct){Jo(rt.display,ct)||rm(rt,ct)||Ke(rt,ct,"contextmenu")||Pt||rt.display.input.onContextMenu(ct)}function rm(rt,ct){return hn(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-"),Lu(rt)}var Vu={toString:function(){return"CodeMirror.Init"}},Np={},pf={};function im(rt){var ct=rt.optionHandlers;function kt(bt,Ot,qt,me){rt.defaults[bt]=Ot,qt&&(ct[bt]=me?function(Te,ke,Ie){Ie!=Vu&&qt(Te,ke,Ie)}:qt)}rt.defineOption=kt,rt.Init=Vu,kt("value","",function(bt,Ot){return bt.setValue(Ot)},!0),kt("mode",null,function(bt,Ot){bt.doc.modeOption=Ot,Ei(bt)},!0),kt("indentUnit",2,Ei,!0),kt("indentWithTabs",!1),kt("smartIndent",!0),kt("tabSize",4,function(bt){qc(bt),Lu(bt),bo(bt)},!0),kt("lineSeparator",null,function(bt,Ot){if(bt.doc.lineSep=Ot,!!Ot){var qt=[],me=bt.doc.first;bt.doc.iter(function(ke){for(var Ie=0;;){var rn=ke.text.indexOf(Ot,Ie);if(rn==-1)break;Ie=rn+Ot.length,qt.push(sn(me,rn))}me++});for(var Te=qt.length-1;Te>=0;Te--)Ah(bt.doc,Ot,qt[Te],sn(qt[Te].line,qt[Te].ch+Ot.length))}}),kt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(bt,Ot,qt){bt.state.specialChars=new RegExp(Ot.source+(Ot.test(" ")?"":"| "),"g"),qt!=Vu&&bt.refresh()}),kt("specialCharPlaceholder",xo,function(bt){return bt.refresh()},!0),kt("electricChars",!0),kt("inputStyle",tt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),kt("spellcheck",!1,function(bt,Ot){return bt.getInputField().spellcheck=Ot},!0),kt("autocorrect",!1,function(bt,Ot){return bt.getInputField().autocorrect=Ot},!0),kt("autocapitalize",!1,function(bt,Ot){return bt.getInputField().autocapitalize=Ot},!0),kt("rtlMoveVisually",!lt),kt("wholeLineUpdateBefore",!0),kt("theme","default",function(bt){fd(bt),Rs(bt)},!0),kt("keyMap","default",function(bt,Ot,qt){var me=Oh(Ot),Te=qt!=Vu&&Oh(qt);Te&&Te.detach&&Te.detach(bt,me),me.attach&&me.attach(bt,Te||null)}),kt("extraKeys",null),kt("configureMouse",null),kt("lineWrapping",!1,om,!0),kt("gutters",[],function(bt,Ot){bt.display.gutterSpecs=ya(Ot,bt.options.lineNumbers),Rs(bt)},!0),kt("fixedGutter",!0,function(bt,Ot){bt.display.gutters.style.left=Ot?Yc(bt.display)+"px":"0",bt.refresh()},!0),kt("coverGutterNextToScrollbar",!1,function(bt){return ju(bt)},!0),kt("scrollbarStyle","native",function(bt){ip(bt),ju(bt),bt.display.scrollbars.setScrollTop(bt.doc.scrollTop),bt.display.scrollbars.setScrollLeft(bt.doc.scrollLeft)},!0),kt("lineNumbers",!1,function(bt,Ot){bt.display.gutterSpecs=ya(bt.options.gutters,Ot),Rs(bt)},!0),kt("firstLineNumber",1,Rs,!0),kt("lineNumberFormatter",function(bt){return bt},Rs,!0),kt("showCursorWhenSelecting",!1,sa,!0),kt("resetSelectionOnContextMenu",!0),kt("lineWiseCopyCut",!0),kt("pasteLinesPerSelection",!0),kt("selectionsMayTouch",!1),kt("readOnly",!1,function(bt,Ot){Ot=="nocursor"&&(wh(bt),bt.display.input.blur()),bt.display.input.readOnlyChanged(Ot)}),kt("screenReaderLabel",null,function(bt,Ot){Ot=Ot===""?null:Ot,bt.display.input.screenReaderLabelChanged(Ot)}),kt("disableInput",!1,function(bt,Ot){Ot||bt.display.input.reset()},!0),kt("dragDrop",!0,dd),kt("allowDropFileTypes",null),kt("cursorBlinkRate",530),kt("cursorScrollMargin",0),kt("cursorHeight",1,sa,!0),kt("singleCursorHeightPerLine",!0,sa,!0),kt("workTime",100),kt("workDelay",100),kt("flattenSpans",!0,qc,!0),kt("addModeClass",!1,qc,!0),kt("pollInterval",100),kt("undoDepth",200,function(bt,Ot){return bt.doc.history.undoDepth=Ot}),kt("historyEventDelay",1250),kt("viewportMargin",10,function(bt){return bt.refresh()},!0),kt("maxHighlightLength",1e4,qc,!0),kt("moveInputWithCursor",!0,function(bt,Ot){Ot||bt.display.input.resetPosition()}),kt("tabindex",null,function(bt,Ot){return bt.display.input.getField().tabIndex=Ot||""}),kt("autofocus",null),kt("direction","ltr",function(bt,Ot){return bt.doc.setDirection(Ot)},!0),kt("phrases",null)}function dd(rt,ct,kt){var bt=kt&&kt!=Vu;if(!ct!=!bt){var Ot=rt.display.dragFunctions,qt=ct?Qe:Ge;qt(rt.display.scroller,"dragstart",Ot.start),qt(rt.display.scroller,"dragenter",Ot.enter),qt(rt.display.scroller,"dragover",Ot.over),qt(rt.display.scroller,"dragleave",Ot.leave),qt(rt.display.scroller,"drop",Ot.drop)}}function om(rt){rt.options.lineWrapping?(Vt(rt.display.wrapper,"CodeMirror-wrap"),rt.display.sizer.style.minWidth="",rt.display.sizerWidth=null):(Dt(rt.display.wrapper,"CodeMirror-wrap"),Zi(rt)),ri(rt),bo(rt),Lu(rt),setTimeout(function(){return ju(rt)},100)}function Ki(rt,ct){var kt=this;if(!(this instanceof Ki))return new Ki(rt,ct);this.options=ct=ct?Se(ct):{},Se(Np,ct,!1);var bt=ct.value;typeof bt=="string"?bt=new Ba(bt,ct.mode,null,ct.lineSeparator,ct.direction):ct.mode&&(bt.modeOption=ct.mode),this.doc=bt;var Ot=new Ki.inputStyles[ct.inputStyle](this),qt=this.display=new _u(rt,bt,Ot,ct);qt.wrapper.CodeMirror=this,fd(this),ct.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ip(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ne,keySeq:null,specialChars:null},ct.autofocus&&!tt&&qt.input.focus(),Bt&&vt<11&&setTimeout(function(){return kt.display.input.reset(!0)},20),kc(this),zs(),Ou(this),this.curOp.forceUpdate=!0,Jf(this,bt),ct.autofocus&&!tt||this.hasFocus()?setTimeout(function(){kt.hasFocus()&&!kt.state.focused&&_i(kt)},20):wh(this);for(var me in pf)pf.hasOwnProperty(me)&&pf[me](this,ct[me],Vu);$o(this),ct.finishInit&&ct.finishInit(this);for(var Te=0;Te<Ih.length;++Te)Ih[Te](this);Fu(this),gt&&ct.lineWrapping&&getComputedStyle(qt.lineDiv).textRendering=="optimizelegibility"&&(qt.lineDiv.style.textRendering="auto")}Ki.defaults=Np,Ki.optionHandlers=pf;function kc(rt){var ct=rt.display;Qe(ct.scroller,"mousedown",la(rt,Al)),Bt&&vt<11?Qe(ct.scroller,"dblclick",la(rt,function(ke){if(!Ke(rt,ke)){var Ie=qa(rt,ke);if(!(!Ie||hd(rt,ke)||Jo(rt.display,ke))){bn(ke);var rn=rt.findWordAt(Ie);td(rt.doc,rn.anchor,rn.head)}}})):Qe(ct.scroller,"dblclick",function(ke){return Ke(rt,ke)||bn(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 kt,bt={end:0};function Ot(){ct.activeTouch&&(kt=setTimeout(function(){return ct.activeTouch=null},1e3),bt=ct.activeTouch,bt.end=+new Date)}function qt(ke){if(ke.touches.length!=1)return!1;var Ie=ke.touches[0];return Ie.radiusX<=1&&Ie.radiusY<=1}function me(ke,Ie){if(Ie.left==null)return!0;var rn=Ie.left-ke.left,ze=Ie.top-ke.top;return rn*rn+ze*ze>20*20}Qe(ct.scroller,"touchstart",function(ke){if(!Ke(rt,ke)&&!qt(ke)&&!hd(rt,ke)){ct.input.ensurePolled(),clearTimeout(kt);var Ie=+new Date;ct.activeTouch={start:Ie,moved:!1,prev:Ie-bt.end<=300?bt: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&&!Jo(ct,ke)&&Ie.left!=null&&!Ie.moved&&new Date-Ie.start<300){var rn=rt.coordsChar(ct.activeTouch,"page"),ze;!Ie.prev||me(Ie,Ie.prev)?ze=new ao(rn,rn):!Ie.prev.prev||me(Ie,Ie.prev.prev)?ze=rt.findWordAt(rn):ze=new ao(sn(rn.line,0),Wn(rt.doc,sn(rn.line+1,0))),rt.setSelection(ze.anchor,ze.head),rt.focus(),bn(ke)}Ot()}),Qe(ct.scroller,"touchcancel",Ot),Qe(ct.scroller,"scroll",function(){ct.scroller.clientHeight&&(Ph(rt,ct.scroller.scrollTop),uu(rt,ct.scroller.scrollLeft,!0),We(rt,"scroll",rt))}),Qe(ct.scroller,"mousewheel",function(ke){return Sa(rt,ke)}),Qe(ct.scroller,"DOMMouseScroll",function(ke){return Sa(rt,ke)}),Qe(ct.wrapper,"scroll",function(){return ct.wrapper.scrollTop=ct.wrapper.scrollLeft=0}),ct.dragFunctions={enter:function(ke){Ke(rt,ke)||Yn(ke)},over:function(ke){Ke(rt,ke)||(Jg(rt,ke),Yn(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,Ll)),Qe(Te,"focus",function(ke){return _i(rt,ke)}),Qe(Te,"blur",function(ke){return wh(rt,ke)})}var Ih=[];Ki.defineInitHook=function(rt){return Ih.push(rt)};function ua(rt,ct,kt,bt){var Ot=rt.doc,qt;kt==null&&(kt="add"),kt=="smart"&&(Ot.mode.indent?qt=pi(rt,ct).state:kt="prev");var me=rt.options.tabSize,Te=Nn(Ot,ct),ke=Qt(Te.text,null,me);Te.stateAfter&&(Te.stateAfter=null);var Ie=Te.text.match(/^\s*/)[0],rn;if(!bt&&!/\S/.test(Te.text))rn=0,kt="not";else if(kt=="smart"&&(rn=Ot.mode.indent(qt,Te.text.slice(Ie.length),Te.text),rn==be||rn>150)){if(!bt)return;kt="prev"}kt=="prev"?ct>Ot.first?rn=Qt(Nn(Ot,ct-1).text,null,me):rn=0:kt=="add"?rn=ke+rt.options.indentUnit:kt=="subtract"?rn=ke-rt.options.indentUnit:typeof kt=="number"&&(rn=ke+kt),rn=Math.max(0,rn);var ze="",vn=0;if(rt.options.indentWithTabs)for(var pn=Math.floor(rn/me);pn;--pn)vn+=me,ze+=" ";if(vn<rn&&(ze+=Fe(rn-vn)),ze!=Ie)return Ah(Ot,ze,sn(ct,0),sn(ct,Ie.length),"+input"),Te.stateAfter=null,!0;for(var Hn=0;Hn<Ot.sel.ranges.length;Hn++){var Jn=Ot.sel.ranges[Hn];if(Jn.head.line==ct&&Jn.head.ch<Ie.length){var ir=sn(ct,Ie.length);Uu(Ot,Hn,new ao(ir,ir));break}}}var ps=null;function Rh(rt){ps=rt}function gf(rt,ct,kt,bt,Ot){var qt=rt.doc;rt.display.shift=!1,bt||(bt=qt.sel);var me=+new Date-200,Te=Ot=="paste"||rt.state.pasteIncoming>me,ke=jr(ct),Ie=null;if(Te&&bt.ranges.length>1)if(ps&&ps.text.join(`
|
|
`)==ct){if(bt.ranges.length%ps.text.length==0){Ie=[];for(var rn=0;rn<ps.text.length;rn++)Ie.push(qt.splitLines(ps.text[rn]))}}else ke.length==bt.ranges.length&&rt.options.pasteLinesPerSelection&&(Ie=xe(ke,function(wr){return[wr]}));for(var ze=rt.curOp.updateInput,vn=bt.ranges.length-1;vn>=0;vn--){var pn=bt.ranges[vn],Hn=pn.from(),Jn=pn.to();pn.empty()&&(kt&&kt>0?Hn=sn(Hn.line,Hn.ch-kt):rt.state.overwrite&&!Te?Jn=sn(Jn.line,Math.min(Nn(qt,Jn.line).text.length,Jn.ch+ge(ke).length)):Te&&ps&&ps.lineWise&&ps.text.join(`
|
|
`)==ke.join(`
|
|
`)&&(Hn=Jn=sn(Hn.line,0)));var ir={from:Hn,to:Jn,text:Ie?Ie[vn%Ie.length]:ke,origin:Ot||(Te?"paste":rt.state.cutIncoming>me?"cut":"+input")};Wu(rt.doc,ir),Ar(rt,"inputRead",rt,ir)}ct&&!Te&&Op(rt,ct),lu(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 kt=rt.clipboardData&&rt.clipboardData.getData("Text");if(kt)return rt.preventDefault(),!ct.isReadOnly()&&!ct.options.disableInput&&qi(ct,function(){return gf(ct,kt,0,null,"paste")}),!0}function Op(rt,ct){if(!(!rt.options.electricChars||!rt.options.smartIndent))for(var kt=rt.doc.sel,bt=kt.ranges.length-1;bt>=0;bt--){var Ot=kt.ranges[bt];if(!(Ot.head.ch>100||bt&&kt.ranges[bt-1].head.line==Ot.head.line)){var qt=rt.getModeAt(Ot.head),me=!1;if(qt.electricChars){for(var Te=0;Te<qt.electricChars.length;Te++)if(ct.indexOf(qt.electricChars.charAt(Te))>-1){me=ua(rt,Ot.head.line,"smart");break}}else qt.electricInput&&qt.electricInput.test(Nn(rt.doc,Ot.head.line).text.slice(0,Ot.head.ch))&&(me=ua(rt,Ot.head.line,"smart"));me&&Ar(rt,"electricInput",rt,Ot.head.line)}}}function Fp(rt){for(var ct=[],kt=[],bt=0;bt<rt.doc.sel.ranges.length;bt++){var Ot=rt.doc.sel.ranges[bt].head.line,qt={anchor:sn(Ot,0),head:sn(Ot+1,0)};kt.push(qt),ct.push(rt.getRange(qt.anchor,qt.head))}return{text:ct,ranges:kt}}function Dp(rt,ct,kt,bt){rt.setAttribute("autocorrect",kt?"":"off"),rt.setAttribute("autocapitalize",bt?"":"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 Ku(rt){var ct=rt.optionHandlers,kt=rt.helpers={};rt.prototype={constructor:rt,focus:function(){window.focus(),this.display.input.focus()},setOption:function(bt,Ot){var qt=this.options,me=qt[bt];qt[bt]==Ot&&bt!="mode"||(qt[bt]=Ot,ct.hasOwnProperty(bt)&&la(this,ct[bt])(this,Ot,me),We(this,"optionChange",this,bt))},getOption:function(bt){return this.options[bt]},getDoc:function(){return this.doc},addKeyMap:function(bt,Ot){this.state.keyMaps[Ot?"push":"unshift"](Oh(bt))},removeKeyMap:function(bt){for(var Ot=this.state.keyMaps,qt=0;qt<Ot.length;++qt)if(Ot[qt]==bt||Ot[qt].name==bt)return Ot.splice(qt,1),!0},addOverlay:ga(function(bt,Ot){var qt=bt.token?bt:rt.getMode(this.options,bt);if(qt.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:qt,modeSpec:bt,opaque:Ot&&Ot.opaque,priority:Ot&&Ot.priority||0},function(me){return me.priority}),this.state.modeGen++,bo(this)}),removeOverlay:ga(function(bt){for(var Ot=this.state.overlays,qt=0;qt<Ot.length;++qt){var me=Ot[qt].modeSpec;if(me==bt||typeof bt=="string"&&me.name==bt){Ot.splice(qt,1),this.state.modeGen++,bo(this);return}}}),indentLine:ga(function(bt,Ot,qt){typeof Ot!="string"&&typeof Ot!="number"&&(Ot==null?Ot=this.options.smartIndent?"smart":"prev":Ot=Ot?"add":"subtract"),En(this.doc,bt)&&ua(this,bt,Ot,qt)}),indentSelection:ga(function(bt){for(var Ot=this.doc.sel.ranges,qt=-1,me=0;me<Ot.length;me++){var Te=Ot[me];if(Te.empty())Te.head.line>qt&&(ua(this,Te.head.line,bt,!0),qt=Te.head.line,me==this.doc.sel.primIndex&&lu(this));else{var ke=Te.from(),Ie=Te.to(),rn=Math.max(qt,ke.line);qt=Math.min(this.lastLine(),Ie.line-(Ie.ch?0:1))+1;for(var ze=rn;ze<qt;++ze)ua(this,ze,bt);var vn=this.doc.sel.ranges;ke.ch==0&&Ot.length==vn.length&&vn[me].from().ch>0&&Uu(this.doc,me,new ao(ke,vn[me].to()),fe)}}}),getTokenAt:function(bt,Ot){return lr(this,bt,Ot)},getLineTokens:function(bt,Ot){return lr(this,sn(bt),Ot,!0)},getTokenTypeAt:function(bt){bt=Wn(this.doc,bt);var Ot=Rr(this,Nn(this.doc,bt.line)),qt=0,me=(Ot.length-1)/2,Te=bt.ch,ke;if(Te==0)ke=Ot[2];else for(;;){var Ie=qt+me>>1;if((Ie?Ot[Ie*2-1]:0)>=Te)me=Ie;else if(Ot[Ie*2+1]<Te)qt=Ie+1;else{ke=Ot[Ie*2+2];break}}var rn=ke?ke.indexOf("overlay "):-1;return rn<0?ke:rn==0?null:ke.slice(0,rn-1)},getModeAt:function(bt){var Ot=this.doc.mode;return Ot.innerMode?rt.innerMode(Ot,this.getTokenAt(bt).state).mode:Ot},getHelper:function(bt,Ot){return this.getHelpers(bt,Ot)[0]},getHelpers:function(bt,Ot){var qt=[];if(!kt.hasOwnProperty(Ot))return qt;var me=kt[Ot],Te=this.getModeAt(bt);if(typeof Te[Ot]=="string")me[Te[Ot]]&&qt.push(me[Te[Ot]]);else if(Te[Ot])for(var ke=0;ke<Te[Ot].length;ke++){var Ie=me[Te[Ot][ke]];Ie&&qt.push(Ie)}else Te.helperType&&me[Te.helperType]?qt.push(me[Te.helperType]):me[Te.name]&&qt.push(me[Te.name]);for(var rn=0;rn<me._global.length;rn++){var ze=me._global[rn];ze.pred(Te,this)&&ye(qt,ze.val)==-1&&qt.push(ze.val)}return qt},getStateAfter:function(bt,Ot){var qt=this.doc;return bt=In(qt,bt==null?qt.first+qt.size-1:bt),pi(this,bt+1,Ot).state},cursorCoords:function(bt,Ot){var qt,me=this.doc.sel.primary();return bt==null?qt=me.head:typeof bt=="object"?qt=Wn(this.doc,bt):qt=bt?me.from():me.to(),Ri(this,qt,Ot||"page")},charCoords:function(bt,Ot){return Li(this,Wn(this.doc,bt),Ot||"page")},coordsChar:function(bt,Ot){return bt=Vi(this,bt,Ot||"page"),aa(this,bt.left,bt.top)},lineAtHeight:function(bt,Ot){return bt=Vi(this,{top:bt,left:0},Ot||"page").top,ln(this.doc,bt+this.display.viewOffset)},heightAtLine:function(bt,Ot,qt){var me=!1,Te;if(typeof bt=="number"){var ke=this.doc.first+this.doc.size-1;bt<this.doc.first?bt=this.doc.first:bt>ke&&(bt=ke,me=!0),Te=Nn(this.doc,bt)}else Te=bt;return Qo(this,Te,{top:0,left:0},Ot||"page",qt||me).top+(me?this.doc.height-yi(Te):0)},defaultTextHeight:function(){return su(this.display)},defaultCharWidth:function(){return xh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(bt,Ot,qt,me,Te){var ke=this.display;bt=Ri(this,Wn(this.doc,bt));var Ie=bt.bottom,rn=bt.left;if(Ot.style.position="absolute",Ot.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ot),ke.sizer.appendChild(Ot),me=="over")Ie=bt.top;else if(me=="above"||me=="near"){var ze=Math.max(ke.wrapper.clientHeight,this.doc.height),vn=Math.max(ke.sizer.clientWidth,ke.lineSpace.clientWidth);(me=="above"||bt.bottom+Ot.offsetHeight>ze)&&bt.top>Ot.offsetHeight?Ie=bt.top-Ot.offsetHeight:bt.bottom+Ot.offsetHeight<=ze&&(Ie=bt.bottom),rn+Ot.offsetWidth>vn&&(rn=vn-Ot.offsetWidth)}Ot.style.top=Ie+"px",Ot.style.left=Ot.style.right="",Te=="right"?(rn=ke.sizer.clientWidth-Ot.offsetWidth,Ot.style.right="0px"):(Te=="left"?rn=0:Te=="middle"&&(rn=(ke.sizer.clientWidth-Ot.offsetWidth)/2),Ot.style.left=rn+"px"),qt&&Jc(this,{left:rn,top:Ie,right:rn+Ot.offsetWidth,bottom:Ie+Ot.offsetHeight})},triggerOnKeyDown:ga(Pp),triggerOnKeyPress:ga(Ll),triggerOnKeyUp:kp,triggerOnMouseDown:ga(Al),execCommand:function(bt){if(Hu.hasOwnProperty(bt))return Hu[bt].call(null,this)},triggerElectric:ga(function(bt){Op(this,bt)}),findPosH:function(bt,Ot,qt,me){var Te=1;Ot<0&&(Te=-1,Ot=-Ot);for(var ke=Wn(this.doc,bt),Ie=0;Ie<Ot&&(ke=mf(this.doc,ke,Te,qt,me),!ke.hitSide);++Ie);return ke},moveH:ga(function(bt,Ot){var qt=this;this.extendSelectionsBy(function(me){return qt.display.shift||qt.doc.extend||me.empty()?mf(qt.doc,me.head,bt,Ot,qt.options.rtlMoveVisually):bt<0?me.from():me.to()},ce)}),deleteH:ga(function(bt,Ot){var qt=this.doc.sel,me=this.doc;qt.somethingSelected()?me.replaceSelection("",null,"+delete"):Cs(this,function(Te){var ke=mf(me,Te.head,bt,Ot,!1);return bt<0?{from:ke,to:Te.head}:{from:Te.head,to:ke}})}),findPosV:function(bt,Ot,qt,me){var Te=1,ke=me;Ot<0&&(Te=-1,Ot=-Ot);for(var Ie=Wn(this.doc,bt),rn=0;rn<Ot;++rn){var ze=Ri(this,Ie,"div");if(ke==null?ke=ze.left:ze.left=ke,Ie=Zu(this,ze,Te,qt),Ie.hitSide)break}return Ie},moveV:ga(function(bt,Ot){var qt=this,me=this.doc,Te=[],ke=!this.display.shift&&!me.extend&&me.sel.somethingSelected();if(me.extendSelectionsBy(function(rn){if(ke)return bt<0?rn.from():rn.to();var ze=Ri(qt,rn.head,"div");rn.goalColumn!=null&&(ze.left=rn.goalColumn),Te.push(ze.left);var vn=Zu(qt,ze,bt,Ot);return Ot=="page"&&rn==me.sel.primary()&&Hf(qt,Li(qt,vn,"div").top-ze.top),vn},ce),Te.length)for(var Ie=0;Ie<me.sel.ranges.length;Ie++)me.sel.ranges[Ie].goalColumn=Te[Ie]}),findWordAt:function(bt){var Ot=this.doc,qt=Nn(Ot,bt.line).text,me=bt.ch,Te=bt.ch;if(qt){var ke=this.getHelper(bt,"wordChars");(bt.sticky=="before"||Te==qt.length)&&me?--me:++Te;for(var Ie=qt.charAt(me),rn=re(Ie,ke)?function(ze){return re(ze,ke)}:/\s/.test(Ie)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!re(ze)};me>0&&rn(qt.charAt(me-1));)--me;for(;Te<qt.length&&rn(qt.charAt(Te));)++Te}return new ao(sn(bt.line,me),sn(bt.line,Te))},toggleOverwrite:function(bt){bt!=null&&bt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Vt(this.display.cursorDiv,"CodeMirror-overwrite"):Dt(this.display.cursorDiv,"CodeMirror-overwrite"),We(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ut()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ga(function(bt,Ot){bh(this,bt,Ot)}),getScrollInfo:function(){var bt=this.display.scroller;return{left:bt.scrollLeft,top:bt.scrollTop,height:bt.scrollHeight-_o(this)-this.display.barHeight,width:bt.scrollWidth-_o(this)-this.display.barWidth,clientHeight:gh(this),clientWidth:cs(this)}},scrollIntoView:ga(function(bt,Ot){bt==null?(bt={from:this.doc.sel.primary().head,to:null},Ot==null&&(Ot=this.options.cursorScrollMargin)):typeof bt=="number"?bt={from:sn(bt,0),to:null}:bt.from==null&&(bt={from:bt,to:null}),bt.to||(bt.to=bt.from),bt.margin=Ot||0,bt.from.line!=null?zi(this,bt):Vf(this,bt.from,bt.to,bt.margin)}),setSize:ga(function(bt,Ot){var qt=this,me=function(ke){return typeof ke=="number"||/^\d+$/.test(String(ke))?ke+"px":ke};bt!=null&&(this.display.wrapper.style.width=me(bt)),Ot!=null&&(this.display.wrapper.style.height=me(Ot)),this.options.lineWrapping&&yh(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){ki(qt,Te,"widget");break}}++Te}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(bt){return qi(this,bt)},startOperation:function(){return Ou(this)},endOperation:function(){return Fu(this)},refresh:ga(function(){var bt=this.display.cachedTextHeight;bo(this),this.curOp.forceUpdate=!0,Lu(this),bh(this,this.doc.scrollLeft,this.doc.scrollTop),Iu(this.display),(bt==null||Math.abs(bt-su(this.display))>.5||this.options.lineWrapping)&&ri(this),We(this,"refresh",this)}),swapDoc:ga(function(bt){var Ot=this.doc;return Ot.cm=null,this.state.selectingText&&this.state.selectingText(),Jf(this,bt),Lu(this),this.display.input.reset(),bh(this,bt.scrollLeft,bt.scrollTop),this.curOp.forceScroll=!0,Ar(this,"swapDoc",this,Ot),Ot}),phrase:function(bt){var Ot=this.options.phrases;return Ot&&Object.prototype.hasOwnProperty.call(Ot,bt)?Ot[bt]:bt},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},un(rt),rt.registerHelper=function(bt,Ot,qt){kt.hasOwnProperty(bt)||(kt[bt]=rt[bt]={_global:[]}),kt[bt][Ot]=qt},rt.registerGlobalHelper=function(bt,Ot,qt,me){rt.registerHelper(bt,Ot,me),kt[bt]._global.push({pred:qt,val:me})}}function mf(rt,ct,kt,bt,Ot){var qt=ct,me=kt,Te=Nn(rt,ct.line),ke=Ot&&rt.direction=="rtl"?-kt:kt;function Ie(){var Ir=ct.line+ke;return Ir<rt.first||Ir>=rt.first+rt.size?!1:(ct=new sn(Ir,ct.ch,ct.sticky),Te=Nn(rt,Ir))}function rn(Ir){var Tr;if(bt=="codepoint"){var Hr=Te.text.charCodeAt(ct.ch+(bt>0?0:-1));isNaN(Hr)?Tr=null:Tr=new sn(ct.line,Math.max(0,Math.min(Te.text.length,ct.ch+kt*(Hr>=55296&&Hr<56320?2:1))),-kt)}else Ot?Tr=id(rt.cm,Te,ct,kt):Tr=Ko(Te,ct,kt);if(Tr==null)if(!Ir&&Ie())ct=df(Ot,rt.cm,Te,ct.line,ke);else return!1;else ct=Tr;return!0}if(bt=="char"||bt=="codepoint")rn();else if(bt=="column")rn(!0);else if(bt=="word"||bt=="group")for(var ze=null,vn=bt=="group",pn=rt.cm&&rt.cm.getHelper(ct,"wordChars"),Hn=!0;!(kt<0&&!rn(!Hn));Hn=!1){var Jn=Te.text.charAt(ct.ch)||`
|
|
`,ir=re(Jn,pn)?"w":vn&&Jn==`
|
|
`?"n":!vn||/\s/.test(Jn)?null:"p";if(vn&&!Hn&&!ir&&(ir="s"),ze&&ze!=ir){kt<0&&(kt=1,rn(),ct.sticky="after");break}if(ir&&(ze=ir),kt>0&&!rn(!Hn))break}var wr=sf(rt,ct,qt,me,!0);return An(qt,wr)&&(wr.hitSide=!0),wr}function Zu(rt,ct,kt,bt){var Ot=rt.doc,qt=ct.left,me;if(bt=="page"){var Te=Math.min(rt.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ke=Math.max(Te-.5*su(rt.display),3);me=(kt>0?ct.bottom:ct.top)+kt*ke}else bt=="line"&&(me=kt>0?ct.bottom+3:ct.top-3);for(var Ie;Ie=aa(rt,qt,me),!!Ie.outside;){if(kt<0?me<=0:me>=Ot.height){Ie.hitSide=!0;break}me+=kt*5}return Ie}var co=function(rt){this.cm=rt,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};co.prototype.init=function(rt){var ct=this,kt=this,bt=kt.cm,Ot=kt.div=rt.lineDiv;Dp(Ot,bt.options.spellcheck,bt.options.autocorrect,bt.options.autocapitalize);function qt(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){!qt(Te)||Ke(bt,Te)||jp(Te,bt)||vt<=11&&setTimeout(la(bt,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 kt.forceCompositionEnd()}),Qe(Ot,"input",function(){ct.composing||ct.readFromDOMSoon()});function me(Te){if(!(!qt(Te)||Ke(bt,Te))){if(bt.somethingSelected())Rh({lineWise:!1,text:bt.getSelections()}),Te.type=="cut"&&bt.replaceSelection("",null,"cut");else if(bt.options.lineWiseCopyCut){var ke=Fp(bt);Rh({lineWise:!0,text:ke.text}),Te.type=="cut"&&bt.operation(function(){bt.setSelections(ke.ranges,0,fe),bt.replaceSelection("",null,"cut")})}else return;if(Te.clipboardData){Te.clipboardData.clearData();var Ie=ps.text.join(`
|
|
`);if(Te.clipboardData.setData("Text",Ie),Te.clipboardData.getData("Text")==Ie){Te.preventDefault();return}}var rn=Bp(),ze=rn.firstChild;bt.display.lineSpace.insertBefore(rn,bt.display.lineSpace.firstChild),ze.value=ps.text.join(`
|
|
`);var vn=document.activeElement;se(ze),setTimeout(function(){bt.display.lineSpace.removeChild(rn),vn.focus(),vn==Ot&&kt.showPrimarySelection()},50)}}Qe(Ot,"copy",me),Qe(Ot,"cut",me)},co.prototype.screenReaderLabelChanged=function(rt){rt?this.div.setAttribute("aria-label",rt):this.div.removeAttribute("aria-label")},co.prototype.prepareSelection=function(){var rt=Au(this.cm,!1);return rt.focus=document.activeElement==this.div,rt},co.prototype.showSelection=function(rt,ct){!rt||!this.cm.display.view.length||((rt.focus||ct)&&this.showPrimarySelection(),this.showMultipleSelections(rt))},co.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},co.prototype.showPrimarySelection=function(){var rt=this.getSelection(),ct=this.cm,kt=ct.doc.sel.primary(),bt=kt.from(),Ot=kt.to();if(ct.display.viewTo==ct.display.viewFrom||bt.line>=ct.display.viewTo||Ot.line<ct.display.viewFrom){rt.removeAllRanges();return}var qt=vf(ct,rt.anchorNode,rt.anchorOffset),me=vf(ct,rt.focusNode,rt.focusOffset);if(!(qt&&!qt.bad&&me&&!me.bad&&dn(Xn(qt,me),bt)==0&&dn(ar(qt,me),Ot)==0)){var Te=ct.display.view,ke=bt.line>=ct.display.viewFrom&&pd(ct,bt)||{node:Te[0].measure.map[2],offset:0},Ie=Ot.line<ct.display.viewTo&&pd(ct,Ot);if(!Ie){var rn=Te[Te.length-1].measure,ze=rn.maps?rn.maps[rn.maps.length-1]:rn.map;Ie={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ke||!Ie){rt.removeAllRanges();return}var vn=rt.rangeCount&&rt.getRangeAt(0),pn;try{pn=Ht(ke.node,ke.offset,Ie.offset,Ie.node)}catch(Hn){}pn&&(!ae&&ct.state.focused?(rt.collapse(ke.node,ke.offset),pn.collapsed||(rt.removeAllRanges(),rt.addRange(pn))):(rt.removeAllRanges(),rt.addRange(pn)),vn&&rt.anchorNode==null?rt.addRange(vn):ae&&this.startGracePeriod()),this.rememberSelection()}},co.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)},co.prototype.showMultipleSelections=function(rt){jt(this.cm.display.cursorDiv,rt.cursors),jt(this.cm.display.selectionDiv,rt.selection)},co.prototype.rememberSelection=function(){var rt=this.getSelection();this.lastAnchorNode=rt.anchorNode,this.lastAnchorOffset=rt.anchorOffset,this.lastFocusNode=rt.focusNode,this.lastFocusOffset=rt.focusOffset},co.prototype.selectionInEditor=function(){var rt=this.getSelection();if(!rt.rangeCount)return!1;var ct=rt.getRangeAt(0).commonAncestorContainer;return Yt(this.div,ct)},co.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},co.prototype.blur=function(){this.div.blur()},co.prototype.getField=function(){return this.div},co.prototype.supportsTouch=function(){return!0},co.prototype.receivedFocus=function(){var rt=this;this.selectionInEditor()?this.pollSelection():qi(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)},co.prototype.selectionChanged=function(){var rt=this.getSelection();return rt.anchorNode!=this.lastAnchorNode||rt.anchorOffset!=this.lastAnchorOffset||rt.focusNode!=this.lastFocusNode||rt.focusOffset!=this.lastFocusOffset},co.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var rt=this.getSelection(),ct=this.cm;if(z&&Ct&&this.cm.display.gutterSpecs.length&&Ip(rt.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var kt=vf(ct,rt.anchorNode,rt.anchorOffset),bt=vf(ct,rt.focusNode,rt.focusOffset);kt&&bt&&qi(ct,function(){Wa(ct.doc,hu(kt,bt),fe),(kt.bad||bt.bad)&&(ct.curOp.selectionChanged=!0)})}}},co.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var rt=this.cm,ct=rt.display,kt=rt.doc.sel.primary(),bt=kt.from(),Ot=kt.to();if(bt.ch==0&&bt.line>rt.firstLine()&&(bt=sn(bt.line-1,Nn(rt.doc,bt.line-1).length)),Ot.ch==Nn(rt.doc,Ot.line).text.length&&Ot.line<rt.lastLine()&&(Ot=sn(Ot.line+1,0)),bt.line<ct.viewFrom||Ot.line>ct.viewTo-1)return!1;var qt,me,Te;bt.line==ct.viewFrom||(qt=Is(rt,bt.line))==0?(me=Oe(ct.view[0].line),Te=ct.view[0].node):(me=Oe(ct.view[qt].line),Te=ct.view[qt-1].node.nextSibling);var ke=Is(rt,Ot.line),Ie,rn;if(ke==ct.view.length-1?(Ie=ct.viewTo-1,rn=ct.lineDiv.lastChild):(Ie=Oe(ct.view[ke+1].line)-1,rn=ct.view[ke+1].node.previousSibling),!Te)return!1;for(var ze=rt.doc.splitLines(Mc(rt,Te,rn,me,Ie)),vn=en(rt.doc,sn(me,0),sn(Ie,Nn(rt.doc,Ie).text.length));ze.length>1&&vn.length>1;)if(ge(ze)==ge(vn))ze.pop(),vn.pop(),Ie--;else if(ze[0]==vn[0])ze.shift(),vn.shift(),me++;else break;for(var pn=0,Hn=0,Jn=ze[0],ir=vn[0],wr=Math.min(Jn.length,ir.length);pn<wr&&Jn.charCodeAt(pn)==ir.charCodeAt(pn);)++pn;for(var Ir=ge(ze),Tr=ge(vn),Hr=Math.min(Ir.length-(ze.length==1?pn:0),Tr.length-(vn.length==1?pn:0));Hn<Hr&&Ir.charCodeAt(Ir.length-Hn-1)==Tr.charCodeAt(Tr.length-Hn-1);)++Hn;if(ze.length==1&&vn.length==1&&me==bt.line)for(;pn&&pn>bt.ch&&Ir.charCodeAt(Ir.length-Hn-1)==Tr.charCodeAt(Tr.length-Hn-1);)pn--,Hn++;ze[ze.length-1]=Ir.slice(0,Ir.length-Hn).replace(/^\u200b+/,""),ze[0]=ze[0].slice(pn).replace(/\u200b+$/,"");var fi=sn(me,pn),Mr=sn(Ie,vn.length?ge(vn).length-Hn:0);if(ze.length>1||ze[0]||dn(fi,Mr))return Ah(rt.doc,ze,fi,Mr,"+input"),!0},co.prototype.ensurePolled=function(){this.forceCompositionEnd()},co.prototype.reset=function(){this.forceCompositionEnd()},co.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},co.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))},co.prototype.updateFromDOM=function(){var rt=this;(this.cm.isReadOnly()||!this.pollContent())&&qi(this.cm,function(){return bo(rt.cm)})},co.prototype.setUneditable=function(rt){rt.contentEditable="false"},co.prototype.onKeyPress=function(rt){rt.charCode==0||this.composing||(rt.preventDefault(),this.cm.isReadOnly()||la(this.cm,gf)(this.cm,String.fromCharCode(rt.charCode==null?rt.keyCode:rt.charCode),0))},co.prototype.readOnlyChanged=function(rt){this.div.contentEditable=String(rt!="nocursor")},co.prototype.onContextMenu=function(){},co.prototype.resetPosition=function(){},co.prototype.needsContentAttribute=!0;function pd(rt,ct){var kt=mh(rt,ct.line);if(!kt||kt.hidden)return null;var bt=Nn(rt.doc,ct.line),Ot=kl(kt,bt,ct.line),qt=tn(bt,rt.doc.direction),me="left";if(qt){var Te=Le(qt,ct.ch);me=Te%2?"right":"left"}var ke=lc(Ot.map,ct.ch,me);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 Ec(rt,ct){return ct&&(rt.bad=!0),rt}function Mc(rt,ct,kt,bt,Ot){var qt="",me=!1,Te=rt.doc.lineSeparator(),ke=!1;function Ie(pn){return function(Hn){return Hn.id==pn}}function rn(){me&&(qt+=Te,ke&&(qt+=Te),me=ke=!1)}function ze(pn){pn&&(rn(),qt+=pn)}function vn(pn){if(pn.nodeType==1){var Hn=pn.getAttribute("cm-text");if(Hn){ze(Hn);return}var Jn=pn.getAttribute("cm-marker"),ir;if(Jn){var wr=rt.findMarks(sn(bt,0),sn(Ot+1,0),Ie(+Jn));wr.length&&(ir=wr[0].find(0))&&ze(en(rt.doc,ir.from,ir.to).join(Te));return}if(pn.getAttribute("contenteditable")=="false")return;var Ir=/^(pre|div|p|li|table|br)$/i.test(pn.nodeName);if(!/^br$/i.test(pn.nodeName)&&pn.textContent.length==0)return;Ir&&rn();for(var Tr=0;Tr<pn.childNodes.length;Tr++)vn(pn.childNodes[Tr]);/^(pre|p)$/i.test(pn.nodeName)&&(ke=!0),Ir&&(me=!0)}else pn.nodeType==3&&ze(pn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;vn(ct),ct!=kt;)ct=ct.nextSibling,ke=!1;return qt}function vf(rt,ct,kt){var bt;if(ct==rt.display.lineDiv){if(bt=rt.display.lineDiv.childNodes[kt],!bt)return Ec(rt.clipPos(sn(rt.display.viewTo-1)),!0);ct=null,kt=0}else for(bt=ct;;bt=bt.parentNode){if(!bt||bt==rt.display.lineDiv)return null;if(bt.parentNode&&bt.parentNode==rt.display.lineDiv)break}for(var Ot=0;Ot<rt.display.view.length;Ot++){var qt=rt.display.view[Ot];if(qt.node==bt)return am(qt,ct,kt)}}function am(rt,ct,kt){var bt=rt.text.firstChild,Ot=!1;if(!ct||!Yt(bt,ct))return Ec(sn(Oe(rt.line),0),!0);if(ct==bt&&(Ot=!0,ct=bt.childNodes[kt],kt=0,!ct)){var qt=rt.rest?ge(rt.rest):rt.line;return Ec(sn(Oe(qt),qt.text.length),Ot)}var me=ct.nodeType==3?ct:null,Te=ct;for(!me&&ct.childNodes.length==1&&ct.firstChild.nodeType==3&&(me=ct.firstChild,kt&&(kt=me.nodeValue.length));Te.parentNode!=bt;)Te=Te.parentNode;var ke=rt.measure,Ie=ke.maps;function rn(ir,wr,Ir){for(var Tr=-1;Tr<(Ie?Ie.length:0);Tr++)for(var Hr=Tr<0?ke.map:Ie[Tr],fi=0;fi<Hr.length;fi+=3){var Mr=Hr[fi+2];if(Mr==ir||Mr==wr){var Mi=Oe(Tr<0?rt.line:rt.rest[Tr]),Po=Hr[fi]+Ir;return(Ir<0||Mr!=ir)&&(Po=Hr[fi+(Ir?1:0)]),sn(Mi,Po)}}}var ze=rn(me,Te,kt);if(ze)return Ec(ze,Ot);for(var vn=Te.nextSibling,pn=me?me.nodeValue.length-kt:0;vn;vn=vn.nextSibling){if(ze=rn(vn,vn.firstChild,0),ze)return Ec(sn(ze.line,ze.ch-pn),Ot);pn+=vn.textContent.length}for(var Hn=Te.previousSibling,Jn=kt;Hn;Hn=Hn.previousSibling){if(ze=rn(Hn,Hn.firstChild,-1),ze)return Ec(sn(ze.line,ze.ch+Jn),Ot);Jn+=Hn.textContent.length}}var ea=function(rt){this.cm=rt,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};ea.prototype.init=function(rt){var ct=this,kt=this,bt=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),kt.poll()}),Qe(Ot,"paste",function(me){Ke(bt,me)||jp(me,bt)||(bt.state.pasteIncoming=+new Date,kt.fastPoll())});function qt(me){if(!Ke(bt,me)){if(bt.somethingSelected())Rh({lineWise:!1,text:bt.getSelections()});else if(bt.options.lineWiseCopyCut){var Te=Fp(bt);Rh({lineWise:!0,text:Te.text}),me.type=="cut"?bt.setSelections(Te.ranges,null,fe):(kt.prevInput="",Ot.value=Te.text.join(`
|
|
`),se(Ot))}else return;me.type=="cut"&&(bt.state.cutIncoming=+new Date)}}Qe(Ot,"cut",qt),Qe(Ot,"copy",qt),Qe(rt.scroller,"paste",function(me){if(!(Jo(rt,me)||Ke(bt,me))){if(!Ot.dispatchEvent){bt.state.pasteIncoming=+new Date,kt.focus();return}var Te=new Event("paste");Te.clipboardData=me.clipboardData,Ot.dispatchEvent(Te)}}),Qe(rt.lineSpace,"selectstart",function(me){Jo(rt,me)||bn(me)}),Qe(Ot,"compositionstart",function(){var me=bt.getCursor("from");kt.composing&&kt.composing.range.clear(),kt.composing={start:me,range:bt.markText(me,bt.getCursor("to"),{className:"CodeMirror-composing"})}}),Qe(Ot,"compositionend",function(){kt.composing&&(kt.poll(),kt.composing.range.clear(),kt.composing=null)})},ea.prototype.createField=function(rt){this.wrapper=Bp(),this.textarea=this.wrapper.firstChild},ea.prototype.screenReaderLabelChanged=function(rt){rt?this.textarea.setAttribute("aria-label",rt):this.textarea.removeAttribute("aria-label")},ea.prototype.prepareSelection=function(){var rt=this.cm,ct=rt.display,kt=rt.doc,bt=Au(rt);if(rt.options.moveInputWithCursor){var Ot=Ri(rt,kt.sel.primary().head,"div"),qt=ct.wrapper.getBoundingClientRect(),me=ct.lineDiv.getBoundingClientRect();bt.teTop=Math.max(0,Math.min(ct.wrapper.clientHeight-10,Ot.top+me.top-qt.top)),bt.teLeft=Math.max(0,Math.min(ct.wrapper.clientWidth-10,Ot.left+me.left-qt.left))}return bt},ea.prototype.showSelection=function(rt){var ct=this.cm,kt=ct.display;jt(kt.cursorDiv,rt.cursors),jt(kt.selectionDiv,rt.selection),rt.teTop!=null&&(this.wrapper.style.top=rt.teTop+"px",this.wrapper.style.left=rt.teLeft+"px")},ea.prototype.reset=function(rt){if(!(this.contextMenuPending||this.composing)){var ct=this.cm;if(ct.somethingSelected()){this.prevInput="";var kt=ct.getSelection();this.textarea.value=kt,ct.state.focused&&se(this.textarea),Bt&&vt>=9&&(this.hasSelection=kt)}else rt||(this.prevInput=this.textarea.value="",Bt&&vt>=9&&(this.hasSelection=null))}},ea.prototype.getField=function(){return this.textarea},ea.prototype.supportsTouch=function(){return!1},ea.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!tt||Ut()!=this.textarea))try{this.textarea.focus()}catch(rt){}},ea.prototype.blur=function(){this.textarea.blur()},ea.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ea.prototype.receivedFocus=function(){this.slowPoll()},ea.prototype.slowPoll=function(){var rt=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){rt.poll(),rt.cm.state.focused&&rt.slowPoll()})},ea.prototype.fastPoll=function(){var rt=!1,ct=this;ct.pollingFast=!0;function kt(){var bt=ct.poll();!bt&&!rt?(rt=!0,ct.polling.set(60,kt)):(ct.pollingFast=!1,ct.slowPoll())}ct.polling.set(20,kt)},ea.prototype.poll=function(){var rt=this,ct=this.cm,kt=this.textarea,bt=this.prevInput;if(this.contextMenuPending||!ct.state.focused||$t(kt)&&!bt&&!this.composing||ct.isReadOnly()||ct.options.disableInput||ct.state.keySeq)return!1;var Ot=kt.value;if(Ot==bt&&!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 qt=Ot.charCodeAt(0);if(qt==8203&&!bt&&(bt="\u200B"),qt==8666)return this.reset(),this.cm.execCommand("undo")}for(var me=0,Te=Math.min(bt.length,Ot.length);me<Te&&bt.charCodeAt(me)==Ot.charCodeAt(me);)++me;return qi(ct,function(){gf(ct,Ot.slice(me),bt.length-me,null,rt.composing?"*compose":null),Ot.length>1e3||Ot.indexOf(`
|
|
`)>-1?kt.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},ea.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ea.prototype.onKeyPress=function(){Bt&&vt>=9&&(this.hasSelection=null),this.fastPoll()},ea.prototype.onContextMenu=function(rt){var ct=this,kt=ct.cm,bt=kt.display,Ot=ct.textarea;ct.contextMenuPending&&ct.contextMenuPending();var qt=qa(kt,rt),me=bt.scroller.scrollTop;if(!qt||St)return;var Te=kt.options.resetSelectionOnContextMenu;Te&&kt.doc.sel.contains(qt)==-1&&la(kt,Wa)(kt.doc,hu(qt),fe);var ke=Ot.style.cssText,Ie=ct.wrapper.style.cssText,rn=ct.wrapper.offsetParent.getBoundingClientRect();ct.wrapper.style.cssText="position: static",Ot.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(rt.clientY-rn.top-5)+"px; left: "+(rt.clientX-rn.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),bt.input.focus(),gt&&window.scrollTo(null,ze),bt.input.reset(),kt.somethingSelected()||(Ot.value=ct.prevInput=" "),ct.contextMenuPending=pn,bt.selForContextMenu=kt.doc.sel,clearTimeout(bt.detectingSelectAll);function vn(){if(Ot.selectionStart!=null){var Jn=kt.somethingSelected(),ir="\u200B"+(Jn?Ot.value:"");Ot.value="\u21DA",Ot.value=ir,ct.prevInput=Jn?"":"\u200B",Ot.selectionStart=1,Ot.selectionEnd=ir.length,bt.selForContextMenu=kt.doc.sel}}function pn(){if(ct.contextMenuPending==pn&&(ct.contextMenuPending=!1,ct.wrapper.style.cssText=Ie,Ot.style.cssText=ke,Bt&&vt<9&&bt.scrollbars.setScrollTop(bt.scroller.scrollTop=me),Ot.selectionStart!=null)){(!Bt||Bt&&vt<9)&&vn();var Jn=0,ir=function(){bt.selForContextMenu==kt.doc.sel&&Ot.selectionStart==0&&Ot.selectionEnd>0&&ct.prevInput=="\u200B"?la(kt,Vo)(kt):Jn++<10?bt.detectingSelectAll=setTimeout(ir,500):(bt.selForContextMenu=null,bt.input.reset())};bt.detectingSelectAll=setTimeout(ir,200)}}if(Bt&&vt>=9&&vn(),Pt){Yn(rt);var Hn=function(){Ge(window,"mouseup",Hn),setTimeout(pn,20)};Qe(window,"mouseup",Hn)}else setTimeout(pn,50)},ea.prototype.readOnlyChanged=function(rt){rt||this.reset(),this.textarea.disabled=rt=="nocursor",this.textarea.readOnly=!!rt},ea.prototype.setUneditable=function(){},ea.prototype.needsContentAttribute=!1;function sm(rt,ct){if(ct=ct?Se(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 kt=Ut();ct.autofocus=kt==rt||rt.getAttribute("autofocus")!=null&&kt==document.body}function bt(){rt.value=Te.getValue()}var Ot;if(rt.form&&(Qe(rt.form,"submit",bt),!ct.leaveSubmitMethodAlone)){var qt=rt.form;Ot=qt.submit;try{var me=qt.submit=function(){bt(),qt.submit=Ot,qt.submit(),qt.submit=me}}catch(ke){}}ct.finishInit=function(ke){ke.save=bt,ke.getTextArea=function(){return rt},ke.toTextArea=function(){ke.toTextArea=isNaN,bt(),rt.parentNode.removeChild(ke.getWrapperElement()),rt.style.display="",rt.form&&(Ge(rt.form,"submit",bt),!ct.leaveSubmitMethodAlone&&typeof rt.form.submit=="function"&&(rt.form.submit=Ot))}},rt.style.display="none";var Te=Ki(function(ke){return rt.parentNode.insertBefore(ke,rt.nextSibling)},ct);return Te}function Tc(rt){rt.off=Ge,rt.on=Qe,rt.wheelEventPixels=_s,rt.Doc=Ba,rt.splitLines=jr,rt.countColumn=Qt,rt.findColumn=Ce,rt.isWordChar=Xt,rt.Pass=be,rt.signal=We,rt.Line=Bi,rt.changeEnd=zu,rt.scrollbarModel=rp,rt.Pos=sn,rt.cmpPos=dn,rt.modes=Vr,rt.mimeModes=Ur,rt.resolveMode=zn,rt.getMode=Ye,rt.modeExtensions=Ve,rt.extendMode=He,rt.copyState=Fn,rt.startState=Qn,rt.innerMode=On,rt.commands=Hu,rt.keyMap=Ps,rt.keyName=qg,rt.isModifierKey=xc,rt.lookupKey=el,rt.normalizeKeyMap=yp,rt.StringStream=yn,rt.SharedTextMarker=Hl,rt.TextMarker=qe,rt.LineWidget=du,rt.e_preventDefault=bn,rt.e_stopPropagation=Un,rt.e_stop=Yn,rt.addClass=Vt,rt.contains=Yt,rt.rmClass=Dt,rt.keyNames=Vl}im(Ki),Ku(Ki);var pu="iter insert remove copy getEditor constructor".split(" ");for(var yf in Ba.prototype)Ba.prototype.hasOwnProperty(yf)&&ye(pu,yf)<0&&(Ki.prototype[yf]=function(rt){return function(){return rt.apply(this.doc,arguments)}}(Ba.prototype[yf]));return un(Ba),Ki.inputStyles={textarea:ea,contenteditable:co},Ki.defineMode=function(rt){!Ki.defaults.mode&&rt!="null"&&(Ki.defaults.mode=rt),ai.apply(this,arguments)},Ki.defineMIME=qn,Ki.defineMode("null",function(){return{token:function(rt){return rt.skipToEnd()}}}),Ki.defineMIME("text/plain","null"),Ki.defineExtension=function(rt,ct){Ki.prototype[rt]=ct},Ki.defineDocExtension=function(rt,ct){Ba.prototype[rt]=ct},Ki.fromTextArea=sm,Tc(Ki),Ki.version="5.58.2",Ki})},25419:function(mn,gn,he){(function(ae){ae(he(89780),he(15525),he(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(Re,ot){var zt=ae.getMode(Re,"text/html"),Bt=zt.name=="null";function vt(Qt){if(ae.findModeByName){var ne=ae.findModeByName(Qt);ne&&(Qt=ne.mime||ne.mimes[0])}var ye=ae.getMode(Re,Qt);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 Et in gt)gt.hasOwnProperty(Et)&&ot.tokenTypeOverrides[Et]&&(gt[Et]=ot.tokenTypeOverrides[Et]);var Ct=/^([*\-_])(?:\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(Qt,ne,ye){return ne.f=ne.inline=ye,ye(Qt,ne)}function ut(Qt,ne,ye){return ne.f=ne.block=ye,ye(Qt,ne)}function dt(Qt){return!Qt||!/\S/.test(Qt.string)}function Pt(Qt){if(Qt.linkTitle=!1,Qt.linkHref=!1,Qt.linkText=!1,Qt.em=!1,Qt.strong=!1,Qt.strikethrough=!1,Qt.quote=0,Qt.indentedCode=!1,Qt.f==Dt){var ne=Bt;if(!ne){var ye=ae.innerMode(zt,Qt.htmlState);ne=ye.mode.name=="xml"&&ye.state.tagStart===null&&!ye.state.context&&ye.state.tokenize.isInText}ne&&(Qt.f=Gt,Qt.block=At,Qt.htmlState=null)}return Qt.trailingSpace=0,Qt.trailingSpaceNewLine=!1,Qt.prevLine=Qt.thisLine,Qt.thisLine={stream:null},null}function At(Qt,ne){var ye=Qt.column()===ne.indentation,we=dt(ne.prevLine.stream),be=ne.indentedCode,fe=ne.prevLine.hr,pe=ne.list!==!1,ce=(ne.listStack[ne.listStack.length-1]||0)+3;ne.indentedCode=!1;var Ce=ne.indentation;if(ne.indentationDiff===null&&(ne.indentationDiff=ne.indentation,pe)){for(ne.list=null;Ce<ne.listStack[ne.listStack.length-1];)ne.listStack.pop(),ne.listStack.length?ne.indentation=ne.listStack[ne.listStack.length-1]:ne.list=!1;ne.list!==!1&&(ne.indentationDiff=Ce-ne.listStack[ne.listStack.length-1])}var ve=!we&&!fe&&!ne.prevLine.header&&(!pe||!be)&&!ne.prevLine.fencedCodeEnd,Fe=(ne.list===!1||fe||we)&&ne.indentation<=ce&&Qt.match(Ct),ge=null;if(ne.indentationDiff>=4&&(be||ne.prevLine.fencedCodeEnd||ne.prevLine.header||we))return Qt.skipToEnd(),ne.indentedCode=!0,gt.code;if(Qt.eatSpace())return null;if(ye&&ne.indentation<=ce&&(ge=Qt.match(mt))&&ge[1].length<=6)return ne.quote=0,ne.header=ge[1].length,ne.thisLine.header=!0,ot.highlightFormatting&&(ne.formatting="header"),ne.f=ne.inline,jt(ne);if(ne.indentation<=ce&&Qt.eat(">"))return ne.quote=ye?1:ne.quote+1,ot.highlightFormatting&&(ne.formatting="quote"),Qt.eatSpace(),jt(ne);if(!Fe&&!ne.setext&&ye&&ne.indentation<=ce&&(ge=Qt.match(St))){var xe=ge[1]?"ol":"ul";return ne.indentation=Ce+Qt.current().length,ne.list=!0,ne.quote=0,ne.listStack.push(ne.indentation),ne.em=!1,ne.strong=!1,ne.code=!1,ne.strikethrough=!1,ot.taskLists&&Qt.match(Tt,!1)&&(ne.taskList=!0),ne.f=ne.inline,ot.highlightFormatting&&(ne.formatting=["list","list-"+xe]),jt(ne)}else{if(ye&&ne.indentation<=ce&&(ge=Qt.match(z,!0)))return ne.quote=0,ne.fencedEndRE=new RegExp(ge[1]+"+ *$"),ne.localMode=ot.fencedCodeBlockHighlighting&&vt(ge[2]||ot.fencedCodeBlockDefaultMode),ne.localMode&&(ne.localState=ae.startState(ne.localMode)),ne.f=ne.block=Ft,ot.highlightFormatting&&(ne.formatting="code-block"),ne.code=-1,jt(ne);if(ne.setext||(!ve||!pe)&&!ne.quote&&ne.list===!1&&!ne.code&&!Fe&&!tt.test(Qt.string)&&(ge=Qt.lookAhead(1))&&(ge=ge.match(xt)))return ne.setext?(ne.header=ne.setext,ne.setext=0,Qt.skipToEnd(),ot.highlightFormatting&&(ne.formatting="header")):(ne.header=ge[0].charAt(0)=="="?1:2,ne.setext=ne.header),ne.thisLine.header=!0,ne.f=ne.inline,jt(ne);if(Fe)return Qt.skipToEnd(),ne.hr=!0,ne.thisLine.hr=!0,gt.hr;if(Qt.peek()==="[")return lt(Qt,ne,oe)}return lt(Qt,ne,ne.inline)}function Dt(Qt,ne){var ye=zt.token(Qt,ne.htmlState);if(!Bt){var we=ae.innerMode(zt,ne.htmlState);(we.mode.name=="xml"&&we.state.tagStart===null&&!we.state.context&&we.state.tokenize.isInText||ne.md_inside&&Qt.current().indexOf(">")>-1)&&(ne.f=Gt,ne.block=At,ne.htmlState=null)}return ye}function Ft(Qt,ne){var ye=ne.listStack[ne.listStack.length-1]||0,we=ne.indentation<ye,be=ye+3;if(ne.fencedEndRE&&ne.indentation<=be&&(we||Qt.match(ne.fencedEndRE))){ot.highlightFormatting&&(ne.formatting="code-block");var fe;return we||(fe=jt(ne)),ne.localMode=ne.localState=null,ne.block=At,ne.f=Gt,ne.fencedEndRE=null,ne.code=0,ne.thisLine.fencedCodeEnd=!0,we?ut(Qt,ne,ne.block):fe}else return ne.localMode?ne.localMode.token(Qt,ne.localState):(Qt.skipToEnd(),gt.code)}function jt(Qt){var ne=[];if(Qt.formatting){ne.push(gt.formatting),typeof Qt.formatting=="string"&&(Qt.formatting=[Qt.formatting]);for(var ye=0;ye<Qt.formatting.length;ye++)ne.push(gt.formatting+"-"+Qt.formatting[ye]),Qt.formatting[ye]==="header"&&ne.push(gt.formatting+"-"+Qt.formatting[ye]+"-"+Qt.header),Qt.formatting[ye]==="quote"&&(!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Qt.quote?ne.push(gt.formatting+"-"+Qt.formatting[ye]+"-"+Qt.quote):ne.push("error"))}if(Qt.taskOpen)return ne.push("meta"),ne.length?ne.join(" "):null;if(Qt.taskClosed)return ne.push("property"),ne.length?ne.join(" "):null;if(Qt.linkHref?ne.push(gt.linkHref,"url"):(Qt.strong&&ne.push(gt.strong),Qt.em&&ne.push(gt.em),Qt.strikethrough&&ne.push(gt.strikethrough),Qt.emoji&&ne.push(gt.emoji),Qt.linkText&&ne.push(gt.linkText),Qt.code&&ne.push(gt.code),Qt.image&&ne.push(gt.image),Qt.imageAltText&&ne.push(gt.imageAltText,"link"),Qt.imageMarker&&ne.push(gt.imageMarker)),Qt.header&&ne.push(gt.header,gt.header+"-"+Qt.header),Qt.quote&&(ne.push(gt.quote),!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Qt.quote?ne.push(gt.quote+"-"+Qt.quote):ne.push(gt.quote+"-"+ot.maxBlockquoteDepth)),Qt.list!==!1){var we=(Qt.listStack.length-1)%3;we?we===1?ne.push(gt.list2):ne.push(gt.list3):ne.push(gt.list1)}return Qt.trailingSpaceNewLine?ne.push("trailing-space-new-line"):Qt.trailingSpace&&ne.push("trailing-space-"+(Qt.trailingSpace%2?"a":"b")),ne.length?ne.join(" "):null}function Nt(Qt,ne){if(Qt.match(ft,!0))return jt(ne)}function Gt(Qt,ne){var ye=ne.text(Qt,ne);if(typeof ye!="undefined")return ye;if(ne.list)return ne.list=null,jt(ne);if(ne.taskList){var we=Qt.match(Tt,!0)[1]===" ";return we?ne.taskOpen=!0:ne.taskClosed=!0,ot.highlightFormatting&&(ne.formatting="task"),ne.taskList=!1,jt(ne)}if(ne.taskOpen=!1,ne.taskClosed=!1,ne.header&&Qt.match(/^#+$/,!0))return ot.highlightFormatting&&(ne.formatting="header"),jt(ne);var be=Qt.next();if(ne.linkTitle){ne.linkTitle=!1;var fe=be;be==="("&&(fe=")"),fe=(fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pe="^\\s*(?:[^"+fe+"\\\\]+|\\\\\\\\|\\\\.)"+fe;if(Qt.match(new RegExp(pe),!0))return gt.linkHref}if(be==="`"){var ce=ne.formatting;ot.highlightFormatting&&(ne.formatting="code"),Qt.eatWhile("`");var Ce=Qt.current().length;if(ne.code==0&&(!ne.quote||Ce==1))return ne.code=Ce,jt(ne);if(Ce==ne.code){var ve=jt(ne);return ne.code=0,ve}else return ne.formatting=ce,jt(ne)}else if(ne.code)return jt(ne);if(be==="\\"&&(Qt.next(),ot.highlightFormatting)){var Fe=jt(ne),ge=gt.formatting+"-escape";return Fe?Fe+" "+ge:ge}if(be==="!"&&Qt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ne.imageMarker=!0,ne.image=!0,ot.highlightFormatting&&(ne.formatting="image"),jt(ne);if(be==="["&&ne.imageMarker&&Qt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ne.imageMarker=!1,ne.imageAltText=!0,ot.highlightFormatting&&(ne.formatting="image"),jt(ne);if(be==="]"&&ne.imageAltText){ot.highlightFormatting&&(ne.formatting="image");var Fe=jt(ne);return ne.imageAltText=!1,ne.image=!1,ne.inline=ne.f=Yt,Fe}if(be==="["&&!ne.image)return ne.linkText&&Qt.match(/^.*?\]/)||(ne.linkText=!0,ot.highlightFormatting&&(ne.formatting="link")),jt(ne);if(be==="]"&&ne.linkText){ot.highlightFormatting&&(ne.formatting="link");var Fe=jt(ne);return ne.linkText=!1,ne.inline=ne.f=Qt.match(/\(.*?\)| ?\[.*?\]/,!1)?Yt:Gt,Fe}if(be==="<"&&Qt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Ht,ot.highlightFormatting&&(ne.formatting="link");var Fe=jt(ne);return Fe?Fe+=" ":Fe="",Fe+gt.linkInline}if(be==="<"&&Qt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Ht,ot.highlightFormatting&&(ne.formatting="link");var Fe=jt(ne);return Fe?Fe+=" ":Fe="",Fe+gt.linkEmail}if(ot.xml&&be==="<"&&Qt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xe=Qt.string.indexOf(">",Qt.pos);if(xe!=-1){var ee=Qt.string.substring(Qt.start,xe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ee)&&(ne.md_inside=!0)}return Qt.backUp(1),ne.htmlState=ae.startState(zt),ut(Qt,ne,Dt)}if(ot.xml&&be==="<"&&Qt.match(/^\/\w*?>/))return ne.md_inside=!1,"tag";if(be==="*"||be==="_"){for(var Kt=1,wt=Qt.pos==1?" ":Qt.string.charAt(Qt.pos-2);Kt<3&&Qt.eat(be);)Kt++;var Lt=Qt.peek()||" ",Xt=!/\s/.test(Lt)&&(!at.test(Lt)||/\s/.test(wt)||at.test(wt)),re=!/\s/.test(wt)&&(!at.test(wt)||/\s/.test(Lt)||at.test(Lt)),It=null,Rt=null;if(Kt%2&&(!ne.em&&Xt&&(be==="*"||!re||at.test(wt))?It=!0:ne.em==be&&re&&(be==="*"||!Xt||at.test(Lt))&&(It=!1)),Kt>1&&(!ne.strong&&Xt&&(be==="*"||!re||at.test(wt))?Rt=!0:ne.strong==be&&re&&(be==="*"||!Xt||at.test(Lt))&&(Rt=!1)),Rt!=null||It!=null){ot.highlightFormatting&&(ne.formatting=It==null?"strong":Rt==null?"em":"strong em"),It===!0&&(ne.em=be),Rt===!0&&(ne.strong=be);var ve=jt(ne);return It===!1&&(ne.em=!1),Rt===!1&&(ne.strong=!1),ve}}else if(be===" "&&(Qt.eat("*")||Qt.eat("_"))){if(Qt.peek()===" ")return jt(ne);Qt.backUp(1)}if(ot.strikethrough){if(be==="~"&&Qt.eatWhile(be)){if(ne.strikethrough){ot.highlightFormatting&&(ne.formatting="strikethrough");var ve=jt(ne);return ne.strikethrough=!1,ve}else if(Qt.match(/^[^\s]/,!1))return ne.strikethrough=!0,ot.highlightFormatting&&(ne.formatting="strikethrough"),jt(ne)}else if(be===" "&&Qt.match(/^~~/,!0)){if(Qt.peek()===" ")return jt(ne);Qt.backUp(2)}}if(ot.emoji&&be===":"&&Qt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ne.emoji=!0,ot.highlightFormatting&&(ne.formatting="emoji");var Wt=jt(ne);return ne.emoji=!1,Wt}return be===" "&&(Qt.match(/^ +$/,!1)?ne.trailingSpace++:ne.trailingSpace&&(ne.trailingSpaceNewLine=!0)),jt(ne)}function Ht(Qt,ne){var ye=Qt.next();if(ye===">"){ne.f=ne.inline=Gt,ot.highlightFormatting&&(ne.formatting="link");var we=jt(ne);return we?we+=" ":we="",we+gt.linkInline}return Qt.match(/^[^>]+/,!0),gt.linkInline}function Yt(Qt,ne){if(Qt.eatSpace())return null;var ye=Qt.next();return ye==="("||ye==="["?(ne.f=ne.inline=Vt(ye==="("?")":"]"),ot.highlightFormatting&&(ne.formatting="link-string"),ne.linkHref=!0,jt(ne)):"error"}var Ut={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Vt(Qt){return function(ne,ye){var we=ne.next();if(we===Qt){ye.f=ye.inline=Gt,ot.highlightFormatting&&(ye.formatting="link-string");var be=jt(ye);return ye.linkHref=!1,be}return ne.match(Ut[Qt]),ye.linkHref=!0,jt(ye)}}function oe(Qt,ne){return Qt.match(/^([^\]\\]|\\.)*\]:/,!1)?(ne.f=se,Qt.next(),ot.highlightFormatting&&(ne.formatting="link"),ne.linkText=!0,jt(ne)):lt(Qt,ne,Gt)}function se(Qt,ne){if(Qt.match(/^\]:/,!0)){ne.f=ne.inline=de,ot.highlightFormatting&&(ne.formatting="link");var ye=jt(ne);return ne.linkText=!1,ye}return Qt.match(/^([^\]\\]|\\.)+/,!0),gt.linkText}function de(Qt,ne){return Qt.eatSpace()?null:(Qt.match(/^[^\s]+/,!0),Qt.peek()===void 0?ne.linkTitle=!0:Qt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ne.f=ne.inline=Gt,gt.linkHref+" url")}var Se={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(Qt){return{f:Qt.f,prevLine:Qt.prevLine,thisLine:Qt.thisLine,block:Qt.block,htmlState:Qt.htmlState&&ae.copyState(zt,Qt.htmlState),indentation:Qt.indentation,localMode:Qt.localMode,localState:Qt.localMode?ae.copyState(Qt.localMode,Qt.localState):null,inline:Qt.inline,text:Qt.text,formatting:!1,linkText:Qt.linkText,linkTitle:Qt.linkTitle,linkHref:Qt.linkHref,code:Qt.code,em:Qt.em,strong:Qt.strong,strikethrough:Qt.strikethrough,emoji:Qt.emoji,header:Qt.header,setext:Qt.setext,hr:Qt.hr,taskList:Qt.taskList,list:Qt.list,listStack:Qt.listStack.slice(0),quote:Qt.quote,indentedCode:Qt.indentedCode,trailingSpace:Qt.trailingSpace,trailingSpaceNewLine:Qt.trailingSpaceNewLine,md_inside:Qt.md_inside,fencedEndRE:Qt.fencedEndRE}},token:function(Qt,ne){if(ne.formatting=!1,Qt!=ne.thisLine.stream){if(ne.header=0,ne.hr=!1,Qt.match(/^\s*$/,!0))return Pt(ne),null;if(ne.prevLine=ne.thisLine,ne.thisLine={stream:Qt},ne.taskList=!1,ne.trailingSpace=0,ne.trailingSpaceNewLine=!1,!ne.localState&&(ne.f=ne.block,ne.f!=Dt)){var ye=Qt.match(/^\s*/,!0)[0].replace(/\t/g,it).length;if(ne.indentation=ye,ne.indentationDiff=null,ye>0)return null}}return ne.f(Qt,ne)},innerMode:function(Qt){return Qt.block==Dt?{state:Qt.htmlState,mode:zt}:Qt.localState?{state:Qt.localState,mode:Qt.localMode}:{state:Qt,mode:Se}},indent:function(Qt,ne,ye){return Qt.block==Dt&&zt.indent?zt.indent(Qt.htmlState,ne,ye):Qt.localState&&Qt.localMode.indent?Qt.localMode.indent(Qt.localState,ne,ye):ae.Pass},blankLine:Pt,getType:jt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Se},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){"use strict";ae.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Re=0;Re<ae.modeInfo.length;Re++){var ot=ae.modeInfo[Re];ot.mimes&&(ot.mime=ot.mimes[0])}ae.findModeByMIME=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.mime==zt)return vt;if(vt.mimes){for(var gt=0;gt<vt.mimes.length;gt++)if(vt.mimes[gt]==zt)return vt}}if(/\+xml$/.test(zt))return ae.findModeByMIME("application/xml");if(/\+json$/.test(zt))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.ext){for(var gt=0;gt<vt.ext.length;gt++)if(vt.ext[gt]==zt)return vt}}},ae.findModeByFileName=function(zt){for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.file&&vt.file.test(zt))return vt}var gt=zt.lastIndexOf("."),Et=gt>-1&&zt.substring(gt+1,zt.length);if(Et)return ae.findModeByExtension(Et)},ae.findModeByName=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.name.toLowerCase()==zt)return vt;if(vt.alias){for(var gt=0;gt<vt.alias.length;gt++)if(vt.alias[gt].toLowerCase()==zt)return vt}}}})},67549:function(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){"use strict";ae.defineMode("stex",function(Re,ot){"use strict";function zt(ft,z){ft.cmdState.push(z)}function Bt(ft){return ft.cmdState.length>0?ft.cmdState[ft.cmdState.length-1]:null}function vt(ft){var z=ft.cmdState.pop();z&&z.closeBracket()}function gt(ft){for(var z=ft.cmdState,tt=z.length-1;tt>=0;tt--){var at=z[tt];if(at.name!="DEFAULT")return at}return{styleIdentifier:function(){return null}}}function Et(ft,z,tt){return function(){this.name=ft,this.bracketNo=0,this.style=z,this.styles=tt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ct={};Ct.importmodule=Et("importmodule","tag",["string","builtin"]),Ct.documentclass=Et("documentclass","tag",["","atom"]),Ct.usepackage=Et("usepackage","tag",["atom"]),Ct.begin=Et("begin","tag",["atom"]),Ct.end=Et("end","tag",["atom"]),Ct.label=Et("label","tag",["atom"]),Ct.ref=Et("ref","tag",["atom"]),Ct.eqref=Et("eqref","tag",["atom"]),Ct.cite=Et("cite","tag",["atom"]),Ct.bibitem=Et("bibitem","tag",["atom"]),Ct.Bibitem=Et("Bibitem","tag",["atom"]),Ct.RBibitem=Et("RBibitem","tag",["atom"]),Ct.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=Ct.hasOwnProperty(at)?Ct[at]:Ct.DEFAULT,tt=new tt,zt(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=Ct.DEFAULT,tt=new tt,zt(z,tt),"bracket"):/\d/.test(it)?(ft.eatWhile(/[\w.%]/),"atom"):(ft.eatWhile(/[\w\-_]/),tt=gt(z),tt.name=="begin"&&(tt.argument=ft.current()),tt.styleIdentifier())}function mt(ft,z,tt){if(ft.eatSpace())return null;if(tt&&ft.match(tt))return 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(mn,gn,he){(function(ae){ae(he(89780))})(function(ae){"use strict";var Re={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},ot={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(zt,Bt){var vt=zt.indentUnit,gt={},Et=Bt.htmlMode?Re:ot;for(var Ct in Et)gt[Ct]=Et[Ct];for(var Ct in Bt)gt[Ct]=Bt[Ct];var St,Tt;function mt(Ht,Yt){function Ut(se){return Yt.tokenize=se,se(Ht,Yt)}var Vt=Ht.next();if(Vt=="<")return Ht.eat("!")?Ht.eat("[")?Ht.match("CDATA[")?Ut(z("atom","]]>")):null:Ht.match("--")?Ut(z("comment","-->")):Ht.match("DOCTYPE",!0,!0)?(Ht.eatWhile(/[\w\._\-]/),Ut(tt(1))):null:Ht.eat("?")?(Ht.eatWhile(/[\w\._\-]/),Yt.tokenize=z("meta","?>"),"meta"):(St=Ht.eat("/")?"closeTag":"openTag",Yt.tokenize=xt,"tag bracket");if(Vt=="&"){var oe;return Ht.eat("#")?Ht.eat("x")?oe=Ht.eatWhile(/[a-fA-F\d]/)&&Ht.eat(";"):oe=Ht.eatWhile(/[\d]/)&&Ht.eat(";"):oe=Ht.eatWhile(/[\w\.\-:]/)&&Ht.eat(";"),oe?"atom":"error"}else return Ht.eatWhile(/[^&<]/),null}mt.isInText=!0;function xt(Ht,Yt){var Ut=Ht.next();if(Ut==">"||Ut=="/"&&Ht.eat(">"))return Yt.tokenize=mt,St=Ut==">"?"endTag":"selfcloseTag","tag bracket";if(Ut=="=")return St="equals",null;if(Ut=="<"){Yt.tokenize=mt,Yt.state=ut,Yt.tagName=Yt.tagStart=null;var Vt=Yt.tokenize(Ht,Yt);return Vt?Vt+" tag error":"tag error"}else return/[\'\"]/.test(Ut)?(Yt.tokenize=ft(Ut),Yt.stringStartCol=Ht.column(),Yt.tokenize(Ht,Yt)):(Ht.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ft(Ht){var Yt=function(Ut,Vt){for(;!Ut.eol();)if(Ut.next()==Ht){Vt.tokenize=xt;break}return"string"};return Yt.isInAttribute=!0,Yt}function z(Ht,Yt){return function(Ut,Vt){for(;!Ut.eol();){if(Ut.match(Yt)){Vt.tokenize=mt;break}Ut.next()}return Ht}}function tt(Ht){return function(Yt,Ut){for(var Vt;(Vt=Yt.next())!=null;){if(Vt=="<")return Ut.tokenize=tt(Ht+1),Ut.tokenize(Yt,Ut);if(Vt==">")if(Ht==1){Ut.tokenize=mt;break}else return Ut.tokenize=tt(Ht-1),Ut.tokenize(Yt,Ut)}return"meta"}}function at(Ht,Yt,Ut){this.prev=Ht.context,this.tagName=Yt,this.indent=Ht.indented,this.startOfLine=Ut,(gt.doNotIndent.hasOwnProperty(Yt)||Ht.context&&Ht.context.noIndent)&&(this.noIndent=!0)}function it(Ht){Ht.context&&(Ht.context=Ht.context.prev)}function lt(Ht,Yt){for(var Ut;;){if(!Ht.context||(Ut=Ht.context.tagName,!gt.contextGrabbers.hasOwnProperty(Ut)||!gt.contextGrabbers[Ut].hasOwnProperty(Yt)))return;it(Ht)}}function ut(Ht,Yt,Ut){return Ht=="openTag"?(Ut.tagStart=Yt.column(),dt):Ht=="closeTag"?Pt:ut}function dt(Ht,Yt,Ut){return Ht=="word"?(Ut.tagName=Yt.current(),Tt="tag",Ft):gt.allowMissingTagName&&Ht=="endTag"?(Tt="tag bracket",Ft(Ht,Yt,Ut)):(Tt="error",dt)}function Pt(Ht,Yt,Ut){if(Ht=="word"){var Vt=Yt.current();return Ut.context&&Ut.context.tagName!=Vt&>.implicitlyClosed.hasOwnProperty(Ut.context.tagName)&&it(Ut),Ut.context&&Ut.context.tagName==Vt||gt.matchClosing===!1?(Tt="tag",At):(Tt="tag error",Dt)}else return gt.allowMissingTagName&&Ht=="endTag"?(Tt="tag bracket",At(Ht,Yt,Ut)):(Tt="error",Dt)}function At(Ht,Yt,Ut){return Ht!="endTag"?(Tt="error",At):(it(Ut),ut)}function Dt(Ht,Yt,Ut){return Tt="error",At(Ht,Yt,Ut)}function Ft(Ht,Yt,Ut){if(Ht=="word")return Tt="attribute",jt;if(Ht=="endTag"||Ht=="selfcloseTag"){var Vt=Ut.tagName,oe=Ut.tagStart;return Ut.tagName=Ut.tagStart=null,Ht=="selfcloseTag"||gt.autoSelfClosers.hasOwnProperty(Vt)?lt(Ut,Vt):(lt(Ut,Vt),Ut.context=new at(Ut,Vt,oe==Ut.indented)),ut}return Tt="error",Ft}function jt(Ht,Yt,Ut){return Ht=="equals"?Nt:(gt.allowMissing||(Tt="error"),Ft(Ht,Yt,Ut))}function Nt(Ht,Yt,Ut){return Ht=="string"?Gt:Ht=="word"&>.allowUnquoted?(Tt="string",Ft):(Tt="error",Ft(Ht,Yt,Ut))}function Gt(Ht,Yt,Ut){return Ht=="string"?Gt:Ft(Ht,Yt,Ut)}return{startState:function(Ht){var Yt={tokenize:mt,state:ut,indented:Ht||0,tagName:null,tagStart:null,context:null};return Ht!=null&&(Yt.baseIndent=Ht),Yt},token:function(Ht,Yt){if(!Yt.tagName&&Ht.sol()&&(Yt.indented=Ht.indentation()),Ht.eatSpace())return null;St=null;var Ut=Yt.tokenize(Ht,Yt);return(Ut||St)&&Ut!="comment"&&(Tt=null,Yt.state=Yt.state(St||Ut,Ht,Yt),Tt&&(Ut=Tt=="error"?Ut+" error":Tt)),Ut},indent:function(Ht,Yt,Ut){var Vt=Ht.context;if(Ht.tokenize.isInAttribute)return Ht.tagStart==Ht.indented?Ht.stringStartCol+1:Ht.indented+vt;if(Vt&&Vt.noIndent)return ae.Pass;if(Ht.tokenize!=xt&&Ht.tokenize!=mt)return Ut?Ut.match(/^(\s*)/)[0].length:0;if(Ht.tagName)return gt.multilineTagIndentPastTag!==!1?Ht.tagStart+Ht.tagName.length+2:Ht.tagStart+vt*(gt.multilineTagIndentFactor||1);if(gt.alignCDATA&&/<!\[CDATA\[/.test(Yt))return 0;var oe=Yt&&/^<(\/)?([\w_:\.-]*)/.exec(Yt);if(oe&&oe[1])for(;Vt;)if(Vt.tagName==oe[2]){Vt=Vt.prev;break}else if(gt.implicitlyClosed.hasOwnProperty(Vt.tagName))Vt=Vt.prev;else break;else if(oe)for(;Vt;){var se=gt.contextGrabbers[Vt.tagName];if(se&&se.hasOwnProperty(oe[2]))Vt=Vt.prev;else break}for(;Vt&&Vt.prev&&!Vt.startOfLine;)Vt=Vt.prev;return Vt?Vt.indent+vt:Ht.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:gt.htmlMode?"html":"xml",helperType:gt.htmlMode?"html":"xml",skipAttribute:function(Ht){Ht.state==Nt&&(Ht.state=Ft)},xmlCurrentTag:function(Ht){return Ht.tagName?{name:Ht.tagName,close:Ht.type=="closeTag"}:null},xmlCurrentContext:function(Ht){for(var Yt=[],Ut=Ht.context;Ut;Ut=Ut.prev)Ut.tagName&&Yt.push(Ut.tagName);return Yt.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(mn,gn,he){"use strict";he.d(gn,{$u:function(){return Ct},BD:function(){return Kt},E9:function(){return Et},FF:function(){return Nr},FJ:function(){return ut},Hn:function(){return lt},KX:function(){return Pt},NB:function(){return le},S0:function(){return ge},UL:function(){return St},Vk:function(){return it},Vm:function(){return Le},YI:function(){return xe},ZA:function(){return ot},Zt:function(){return Tt},al:function(){return It},bn:function(){return re},bx:function(){return wt},g2:function(){return ee},h1:function(){return Nt},hD:function(){return un},l4:function(){return vt},rU:function(){return Ae},s_:function(){return Lt},uz:function(){return ue},z6:function(){return mt}}),mn=he.hmd(mn),function(){var $t;function $n(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Zn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:$n(a)}}function Dr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Vr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ur;if(typeof Object.setPrototypeOf=="function")Ur=Object.setPrototypeOf;else{var ai;t:{var qn={a:!0},zn={};try{zn.__proto__=qn,ai=zn.a;break t}catch(a){}ai=!1}Ur=ai?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ye=Ur;function Ve(a,y){if(a.prototype=Vr(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 He=typeof he.g!="undefined"&&he.g!=null?he.g:self,Fn=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},On=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Qn(a,y){if(y){var x=He;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&&On(x,a,{writable:!0,value:y})}}Qn("Object.assign",function(a){return a||Fn}),Qn("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 yn=typeof globalThis=="object"&&globalThis||typeof he.g=="object"&&he.g.global===he.g&&he.g||typeof self=="object"&&self.self===self&&self||{};yn.requestAnimationFrame===void 0&&(yn.setImmediate===void 0?yn.requestAnimationFrame=function(a){yn.setTimeout(a,0)}:yn.requestAnimationFrame=yn.setImmediate);function Nn(){}function en(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&yn.clearTimeout(x),x=Xe(function(){x=-1,a.apply(b,E)},y)}}function Xe(a,y){return yn.setTimeout(a,y)}function Dn(a){return yn.document.createElement(a)}function Oe(a){throw Error(a)}function ln(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Oe(a)}function En(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),Oe(x+" is not in the range "+y+": "+a)}function Gn(a){yn.console&&yn.console.log(a)}function sn(a){return typeof a=="object"&&a!==null}function dn(a){return Array.isArray(a)||yn.NodeList&&a instanceof yn.NodeList||yn.HTMLCollection&&a instanceof yn.HTMLCollection}function An(a){return Array.prototype.slice.call(a)}function er(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Oe("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ar(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Oe("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Xn(){var a=pi.pop();return a===void 0?[]:a}function In(a){a.length=0,pi.push(a)}function Wn(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(sn(a)&&a.constructor)return Wn(a.constructor);return typeof a}function rr(a){var y=a;return sn(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function sr(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 mr(a,y,x){Object.defineProperty(Fi.prototype,a,{get:y,set:x})}function cn(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 Si=yn.navigator!==void 0&&0<yn.navigator.userAgent.indexOf("Trident/7"),Rr=yn.navigator!==void 0&&yn.navigator.platform!==void 0&&yn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,pi=[];Object.freeze([]),Nn.className="Util",Nn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Nn.adym="gojs.net",Nn.vfo="28e645fdb266",Nn.className="Util";function an(a,y,x){Jr(this),this.j=a,this.xa=y,this.o=x}an.prototype.toString=function(){return"EnumValue."+this.xa};function Rn(a,y){return y==null||y===""?null:a[y]}He.Object.defineProperties(an.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),an.className="EnumValue";function nr(){this.ew=[]}nr.prototype.toString=function(){return this.ew.join("")},nr.prototype.add=function(a){a!==""&&this.ew.push(a)},nr.className="StringBuilder";function fr(){}fr.className="PropertyCollection";var lr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){yn.console&&yn.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 Pr(){}Pr.prototype.reset=function(){},Pr.prototype.next=function(){return!1},Pr.prototype.Ad=function(){return!1},Pr.prototype.first=function(){return null},Pr.prototype.any=function(){return!1},Pr.prototype.all=function(){return!0},Pr.prototype.each=function(){return this},Pr.prototype.map=function(){return this},Pr.prototype.filter=function(){return this},Pr.prototype.de=function(){},Pr.prototype.toString=function(){return"EmptyIterator"},He.Object.defineProperties(Pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Pr.prototype.first=Pr.prototype.first,Pr.prototype.hasNext=Pr.prototype.Ad,Pr.prototype.next=Pr.prototype.next,Pr.prototype.reset=Pr.prototype.reset;var Xr=null;Pr.className="EmptyIterator",Xr=new Pr;function zr(a){this.key=-1,this.value=a}zr.prototype.reset=function(){this.key=-1},zr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},zr.prototype.Ad=function(){return this.next()},zr.prototype.first=function(){return this.key=0,this.value},zr.prototype.any=function(a){return this.key=-1,a(this.value)},zr.prototype.all=function(a){return this.key=-1,a(this.value)},zr.prototype.each=function(a){return this.key=-1,a(this.value),this},zr.prototype.map=function(a){return new zr(a(this.value))},zr.prototype.filter=function(a){return a(this.value)?new zr(this.value):Xr},zr.prototype.de=function(){this.value=null},zr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},He.Object.defineProperties(zr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),zr.prototype.first=zr.prototype.first,zr.prototype.hasNext=zr.prototype.Ad,zr.prototype.next=zr.prototype.next,zr.prototype.reset=zr.prototype.reset,zr.className="SingletonIterator";function Kr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Kr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Kr.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},Kr.prototype.Ad=function(){return this.next()},Kr.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},Kr.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},Kr.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},Kr.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},Kr.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 wn,a.s=x,a.xb(),a.iterator},Kr.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 wn,a.s=x,a.xb(),a.iterator},Kr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Kr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},He.Object.defineProperties(Kr.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}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="ListIterator";function Yr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Yr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Yr.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)},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.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 wn,a.s=x,a.xb(),a.iterator},Yr.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 wn,a.s=x,a.xb(),a.iterator},Yr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Yr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},He.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Yr.prototype.first=Yr.prototype.first,Yr.prototype.hasNext=Yr.prototype.Ad,Yr.prototype.next=Yr.prototype.next,Yr.prototype.reset=Yr.prototype.reset,Yr.className="ListIteratorBackwards";function wn(a){Jr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$t=wn.prototype,$t.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return this._isFrozen=!1,this},$t.toString=function(){return"List()#"+oi(this)},$t.add=function(a){return a===null?this:(this._isFrozen&&ln(this,a),this.s.push(a),this.xb(),this)},$t.push=function(a){this.add(a)},$t.addAll=function(a){if(a===null)return this;this._isFrozen&&ln(this);var y=this.s;if(dn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},$t.clear=function(){this._isFrozen&&ln(this),this.s.length=0,this.xb()},$t.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},$t.has=function(a){return this.contains(a)},$t.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},$t.M=function(a){var y=this.s;return(0>a||a>=y.length)&&En(a,"0 <= i < length",wn,"elt:i"),y[a]},$t.get=function(a){return this.M(a)},$t.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&En(a,"0 <= i < length",wn,"setElt:i"),this._isFrozen&&ln(this,a),x[a]=y},$t.set=function(a,y){this.cd(a,y)},$t.first=function(){var a=this.s;return a.length===0?null:a[0]},$t.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},$t.pop=function(){this._isFrozen&&ln(this);var a=this.s;return 0<a.length?a.pop():null},wn.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},wn.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},wn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},wn.prototype.map=function(a){for(var y=new wn,x=[],b=this.s,E=b.length,et=0;et<E;et++)x.push(a(b[et]));return y.s=x,y.xb(),y},wn.prototype.filter=function(a){for(var y=new wn,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},$t=wn.prototype,$t.Gb=function(a,y){0>a&&En(a,">= 0",wn,"insertAt:i"),this._isFrozen&&ln(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},$t.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},$t.delete=function(a){return this.remove(a)},$t.mb=function(a){var y=this.s;(0>a||a>=y.length)&&En(a,"0 <= i < length",wn,"removeAt:i"),this._isFrozen&&ln(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},$t.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&ln(this);for(var E=a,et=y+1;et<b;)x[E++]=x[et++];return x.length=b-(y-a+1),this.xb(),this},wn.prototype.copy=function(){var a=new wn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},$t=wn.prototype,$t.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},$t.Iv=function(){for(var a=new Sn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},$t.sort=function(a){return this._isFrozen&&ln(this),this.s.sort(a),this.xb(),this},$t.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&ln(this);var et=x-y;if(1>=et)return this;if((0>y||y>=E-1)&&En(y,"0 <= from < length",wn,"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},$t.reverse=function(){return this._isFrozen&&ln(this),this.s.reverse(),this.xb(),this},He.Object.defineProperties(wn.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 Xr;var a=this.Sa;return a!==null?(a.reset(),a):new Kr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Xr;var a=this.Hg;return a!==null?(a.reset(),a):new Yr(this)}}}),wn.prototype.reverse=wn.prototype.reverse,wn.prototype.sortRange=wn.prototype.zi,wn.prototype.sort=wn.prototype.sort,wn.prototype.toSet=wn.prototype.Iv,wn.prototype.toArray=wn.prototype.Fa,wn.prototype.removeRange=wn.prototype.removeRange,wn.prototype.removeAt=wn.prototype.mb,wn.prototype.delete=wn.prototype.delete,wn.prototype.remove=wn.prototype.remove,wn.prototype.insertAt=wn.prototype.Gb,wn.prototype.pop=wn.prototype.pop,wn.prototype.last=wn.prototype.jc,wn.prototype.first=wn.prototype.first,wn.prototype.set=wn.prototype.set,wn.prototype.setElt=wn.prototype.cd,wn.prototype.get=wn.prototype.get,wn.prototype.elt=wn.prototype.M,wn.prototype.indexOf=wn.prototype.indexOf,wn.prototype.has=wn.prototype.has,wn.prototype.contains=wn.prototype.contains,wn.prototype.clear=wn.prototype.clear,wn.prototype.addAll=wn.prototype.addAll,wn.prototype.push=wn.prototype.push,wn.prototype.add=wn.prototype.add,wn.prototype.thaw=wn.prototype.ka,wn.prototype.freeze=wn.prototype.freeze,wn.className="List";function ci(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ci.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},ci.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)},ci.prototype.Ad=function(){return this.next()},ci.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},ci.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},ci.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},ci.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},ci.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new wn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ci.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new wn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ci.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},ci.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},He.Object.defineProperties(ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),ci.prototype.first=ci.prototype.first,ci.prototype.hasNext=ci.prototype.Ad,ci.prototype.next=ci.prototype.next,ci.prototype.reset=ci.prototype.reset,ci.className="SetIterator";function Sn(a){Jr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$t=Sn.prototype,$t.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return this._isFrozen=!1,this},$t.toString=function(){return"Set()#"+oi(this)},$t.add=function(a){if(a===null)return this;this._isFrozen&&ln(this,a);var y=a;return sn(a)&&(y=ni(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Oo(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},$t.addAll=function(a){if(a===null)return this;if(this._isFrozen&&ln(this),dn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},$t.contains=function(a){if(a===null)return!1;var y=a;return sn(a)&&(y=oi(a),y===void 0)?!1:this.Tb[y]!==void 0},$t.has=function(a){return this.contains(a)},$t.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},$t.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},$t.first=function(){var a=this.ea;return a===null?null:a.value},Sn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Sn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Sn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Sn.prototype.map=function(a){for(var y=new Sn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Sn.prototype.filter=function(a){for(var y=new Sn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},$t=Sn.prototype,$t.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=a;if(sn(a)&&(y=oi(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},$t.delete=function(a){return this.remove(a)},$t.hp=function(a){if(a===null)return this;if(this._isFrozen&&ln(this),dn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},$t.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&ln(this);var y=new Sn;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},$t.clear=function(){this._isFrozen&&ln(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Sn.prototype.copy=function(){var a=new Sn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Sn.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},Sn.prototype.Hv=function(){var a=new wn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Jr(a){a.__gohashid=Ui++}function ni(a){var y=a.__gohashid;return y===void 0&&(y=Ui++,a.__gohashid=y),y}function oi(a){return a.__gohashid}He.Object.defineProperties(Sn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Xr;var a=this.Sa;return a!==null?(a.reset(),a):new ci(this)}}}),Sn.prototype.toList=Sn.prototype.Hv,Sn.prototype.toArray=Sn.prototype.Fa,Sn.prototype.clear=Sn.prototype.clear,Sn.prototype.retainAll=Sn.prototype.pA,Sn.prototype.removeAll=Sn.prototype.hp,Sn.prototype.delete=Sn.prototype.delete,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.first=Sn.prototype.first,Sn.prototype.containsAny=Sn.prototype.Ty,Sn.prototype.containsAll=Sn.prototype.Sy,Sn.prototype.has=Sn.prototype.has,Sn.prototype.contains=Sn.prototype.contains,Sn.prototype.addAll=Sn.prototype.addAll,Sn.prototype.add=Sn.prototype.add,Sn.prototype.thaw=Sn.prototype.ka,Sn.prototype.freeze=Sn.prototype.freeze;var Ui=1;Sn.className="Set",Sn.uniqueHash=Jr,Sn.hashIdUnique=ni,Sn.hashId=oi;function ji(a){this.ma=a,this.qa=a.Ja,this.sa=null}ji.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ji.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)},ji.prototype.Ad=function(){return this.next()},ji.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},ji.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},ji.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},ji.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},ji.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new wn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ji.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new wn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ji.prototype.de=function(){this.value=this.key=null,this.qa=-1},ji.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},He.Object.defineProperties(ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ji.prototype.first=ji.prototype.first,ji.prototype.hasNext=ji.prototype.Ad,ji.prototype.next=ji.prototype.next,ji.prototype.reset=ji.prototype.reset,ji.className="MapKeySetIterator";function si(a){Sn.call(this),Jr(this),this._isFrozen=!0,this.ma=a}Ve(si,Sn),$t=si.prototype,$t.freeze=function(){return this},$t.ka=function(){return this},$t.toString=function(){return"MapKeySet("+this.ma.toString()+")"},$t.add=function(){Oe("This Set is read-only: "+this.toString())},$t.contains=function(a){return this.ma.contains(a)},$t.has=function(a){return this.contains(a)},$t.remove=function(){Oe("This Set is read-only: "+this.toString())},$t.delete=function(a){return this.remove(a)},$t.clear=function(){Oe("This Set is read-only: "+this.toString())},$t.first=function(){var a=this.ma.ea;return a!==null?a.key:null},si.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},si.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},si.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},si.prototype.map=function(a){for(var y=new Sn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},si.prototype.filter=function(a){for(var y=new Sn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},si.prototype.copy=function(){return new si(this.ma)},si.prototype.Iv=function(){var a=new Sn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},si.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},si.prototype.Hv=function(){var a=new wn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},He.Object.defineProperties(si.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Xr:new ji(this.ma)}}}),si.prototype.toList=si.prototype.Hv,si.prototype.toArray=si.prototype.Fa,si.prototype.toSet=si.prototype.Iv,si.prototype.first=si.prototype.first,si.prototype.clear=si.prototype.clear,si.prototype.delete=si.prototype.delete,si.prototype.remove=si.prototype.remove,si.prototype.has=si.prototype.has,si.prototype.contains=si.prototype.contains,si.prototype.add=si.prototype.add,si.prototype.thaw=si.prototype.ka,si.prototype.freeze=si.prototype.freeze,si.className="MapKeySet";function gi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}gi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},gi.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)},gi.prototype.Ad=function(){return this.next()},gi.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},gi.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},gi.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},gi.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},gi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new wn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},gi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new wn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},gi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},gi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},He.Object.defineProperties(gi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),gi.prototype.first=gi.prototype.first,gi.prototype.hasNext=gi.prototype.Ad,gi.prototype.next=gi.prototype.next,gi.prototype.reset=gi.prototype.reset,gi.className="MapValueSetIterator";function Oo(a,y){this.key=a,this.value=y,this.ll=this.va=null}Oo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Oo.className="KeyValuePair";function Ci(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ci.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Ci.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)},Ci.prototype.Ad=function(){return this.next()},Ci.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},Ci.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},Ci.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},Ci.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},Ci.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new wn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Ci.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new wn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Ci.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Ci.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},He.Object.defineProperties(Ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ci.prototype.first=Ci.prototype.first,Ci.prototype.hasNext=Ci.prototype.Ad,Ci.prototype.next=Ci.prototype.next,Ci.prototype.reset=Ci.prototype.reset,Ci.className="MapIterator";function or(a){Jr(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"&&Oe("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}$t=or.prototype,$t.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return this._isFrozen=!1,this},$t.toString=function(){return"Map()#"+oi(this)},$t.add=function(a,y){this._isFrozen&&ln(this,a);var x=a;sn(a)&&(x=ni(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Oo(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},$t.set=function(a,y){return this.add(a,y)},$t.addAll=function(a){if(a===null)return this;if(dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof or)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},$t.first=function(){return this.ea},or.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},or.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},or.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},or.prototype.map=function(a){for(var y=new or,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},or.prototype.filter=function(a){for(var y=new or,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},$t=or.prototype,$t.contains=function(a){var y=a;return sn(a)&&(y=oi(a),y===void 0)?!1:this.Tb[y]!==void 0},$t.has=function(a){return this.contains(a)},$t.I=function(a){var y=a;return sn(a)&&(y=oi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},$t.get=function(a){return this.I(a)},$t.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=a;if(sn(a)&&(y=oi(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},$t.delete=function(a){return this.remove(a)},$t.clear=function(){this._isFrozen&&ln(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},or.prototype.copy=function(){var a=new or,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},or.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 Oo(E.key,E.value),x++}return y},or.prototype.Lf=function(){return new si(this)},He.Object.defineProperties(or.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Xr;var a=this.Sa;return a!==null?(a.reset(),a):new Ci(this)}},iteratorKeys:{get:function(){return 0>=this.count?Xr:new ji(this)}},iteratorValues:{get:function(){if(0>=this.count)return Xr;var a=this.jf;return a!==null?(a.reset(),a):new gi(this)}}}),or.prototype.toKeySet=or.prototype.Lf,or.prototype.toArray=or.prototype.Fa,or.prototype.clear=or.prototype.clear,or.prototype.delete=or.prototype.delete,or.prototype.remove=or.prototype.remove,or.prototype.get=or.prototype.get,or.prototype.getValue=or.prototype.I,or.prototype.has=or.prototype.has,or.prototype.contains=or.prototype.contains,or.prototype.first=or.prototype.first,or.prototype.addAll=or.prototype.addAll,or.prototype.set=or.prototype.set,or.prototype.add=or.prototype.add,or.prototype.thaw=or.prototype.ka,or.prototype.freeze=or.prototype.freeze,or.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):Oe("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ji,qr,_r,di,Oi;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},$t=Me.prototype,$t.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function ur(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 br(a){return a.x.toString()+" "+a.y.toString()}$t.toString=function(){return"Point("+this.x+","+this.y+")"},$t.D=function(a){return a instanceof Me?this.x===a.x&&this.y===a.y:!1},$t.hi=function(a,y){return this.x===a&&this.y===y},$t.Xa=function(a){return Ue.B(this.x,a.x)&&Ue.B(this.y,a.y)},$t.add=function(a){return this.x+=a.x,this.y+=a.y,this},$t.re=function(a){return this.x-=a.x,this.y-=a.y,this},$t.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},$t=Me.prototype,$t.scale=function(a,y){return this.x*=a,this.y*=y,this},$t.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},$t.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},$t.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},$t.ab=function(a){return Zr(a.x-this.x,a.y-this.y)},$t.direction=function(a,y){return Zr(a-this.x,y-this.y)};function Zr(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}$t.Ry=function(a,y){return Ue.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},$t.fA=function(a,y,x,b){return Ue.qh(a,y,x,b,this.x,this.y,this),this},$t.gA=function(a,y){return Ue.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},$t.uA=function(a,y,x,b){return Ue.No(this.x,this.y,a,y,x,b,this),this},$t.vA=function(a,y){return Ue.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},$t.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},$t.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},$t.transform=function(a){return a.Ga(this),this};function Br(a,y){return y.Cd(a),a}function ti(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 eo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Or(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)}$t.w=function(){return isFinite(this.x)&&isFinite(this.y)},Me.alloc=function(){var a=Er.pop();return a===void 0?new Me:a},Me.allocAt=function(a,y){var x=Er.pop();return x===void 0?new Me(a,y):(x.x=a,x.y=y,x)},Me.free=function(a){Er.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 Ue.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 Ue.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 Er=[];Me.className="Point",Me.parse=ur,Me.stringify=br,Me.distanceLineSegmentSquared=ti,Me.distanceSquared=eo,Me.direction=Or,Me.Origin=Ji=new Me(0,0).ja(),Me.InfiniteTopLeft=qr=new Me(-1/0,-1/0).ja(),Me.InfiniteBottomRight=_r=new Me(1/0,1/0).ja(),Me.SixPoint=di=new Me(6,6).ja(),Me.NoPoint=Oi=new Me(NaN,NaN).ja(),Me.parse=ur,Me.stringify=br,Me.distanceLineSegmentSquared=ti,Me.distanceSquared=eo,Me.direction=Or;function Mn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Oe("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var xr,yi,Qi,Zi,Bi,no,Wi;Mn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Mn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Mn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Mn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Mn.prototype.copy=function(){var a=new Mn;return a.width=this.width,a.height=this.height,a},$t=Mn.prototype,$t.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function qo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Mn(x,E)}return new Mn}function Xo(a){return a.width.toString()+" "+a.height.toString()}$t.toString=function(){return"Size("+this.width+","+this.height+")"},$t.D=function(a){return a instanceof Mn?this.width===a.width&&this.height===a.height:!1},$t.hi=function(a,y){return this.width===a&&this.height===y},$t.Xa=function(a){return Ue.B(this.width,a.width)&&Ue.B(this.height,a.height)},$t.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},$t.w=function(){return isFinite(this.width)&&isFinite(this.height)},Mn.alloc=function(){var a=Ja.pop();return a===void 0?new Mn:a},Mn.free=function(a){Ja.push(a)},Mn.prototype.isReal=Mn.prototype.w,Mn.prototype.inflate=Mn.prototype.Bc,Mn.prototype.equalsApprox=Mn.prototype.Xa,Mn.prototype.equalTo=Mn.prototype.hi,Mn.prototype.equals=Mn.prototype.D,Mn.prototype.set=Mn.prototype.set,Mn.prototype.setTo=Mn.prototype.sg;var Ja=[];Mn.className="Size",Mn.parse=qo,Mn.stringify=Xo,Mn.ZeroSize=xr=new Mn(0,0).ja(),Mn.OneSize=yi=new Mn(1,1).ja(),Mn.SixSize=Qi=new Mn(6,6).ja(),Mn.EightSize=Zi=new Mn(8,8).ja(),Mn.TenSize=Bi=new Mn(10,10).ja(),Mn.InfiniteSize=no=new Mn(1/0,1/0).ja(),Mn.NoSize=Wi=new Mn(NaN,NaN).ja(),Mn.parse=qo,Mn.stringify=Xo;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 Mn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Oe("Incorrect second argument supplied to Rect constructor "+y)):Oe("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}$t=on.prototype,$t.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},$t.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function xo(a,y,x){a.width=y,a.height=x}$t.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},$t.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},$t.dd=function(a){return this.x=a.x,this.y=a.y,this},$t.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},$t=on.prototype,$t.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rl(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 oa(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}$t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},$t.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},$t.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},$t.Xa=function(a){return Ue.B(this.x,a.x)&&Ue.B(this.y,a.y)&&Ue.B(this.width,a.width)&&Ue.B(this.height,a.height)};function bl(a,y){return Ue.$(a.x,y.x)&&Ue.$(a.y,y.y)&&Ue.$(a.width,y.width)&&Ue.$(a.height,y.height)}$t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},$t.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},$t.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},$t.offset=function(a,y){return this.x+=a,this.y+=y,this},$t.Bc=function(a,y){return Hi(this,y,a,y,a)},$t.Co=function(a){return Hi(this,a.top,a.right,a.bottom,a.left)},$t.Fv=function(a){return Hi(this,-a.top,-a.right,-a.bottom,-a.left)},$t.Hz=function(a,y,x,b){return Hi(this,a,y,x,b)};function Hi(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}$t.Ex=function(a){return Mu(this,a.x,a.y,a.width,a.height)},$t.Uu=function(a,y,x,b){return Mu(this,a,y,x,b)};function Mu(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}$t.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},$t.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 _l(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))}$t.Ye=function(a){return Xi(this,a.x,a.y,0,0)},$t.ed=function(a){return Xi(this,a.x,a.y,a.width,a.height)},$t.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Xi(this,a,y,x,b)};function Xi(a,y,x,b,E){var 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}$t.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Ro(a,y,x,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 Pl(a,y,x,b,E,et,nt,st){return a>nt+E||E>x+a?!1:!(y>st+et||et>b+y)}$t.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},$t.Mz=function(){return this.width===0&&this.height===0},on.alloc=function(){var a=us.pop();return a===void 0?new on:a},on.allocAt=function(a,y,x,b){var E=us.pop();return E===void 0?new on(a,y,x,b):E.h(a,y,x,b)},on.free=function(a){us.push(a)},He.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 Mn(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 Ue.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,Ys=null,us=[];on.className="Rect",on.parse=Rl,on.stringify=oa,on.contains=Ro,on.intersects=Pl,on.ZeroRect=pa=new on(0,0,0,0).ja(),on.NoRect=Ys=new on(NaN,NaN,NaN,NaN).ja(),on.parse=Rl,on.stringify=oa,on.contains=Ro,on.intersects=Pl;function Ar(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):Oe("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ar.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ar.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ar.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ar.prototype.copy=function(){var a=new Ar;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},$t=Ar.prototype,$t.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function ta(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 Ar;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ar(x);for(var et=NaN;a[y]==="";)y++;if((b=a[y++])&&(et=parseFloat(b)),isNaN(et))return new Ar(x,E);for(var nt=NaN;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),isNaN(nt)?new Ar(x,E):new Ar(x,E,et,nt)}return new Ar}function Tu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}$t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},$t.D=function(a){return a instanceof Ar?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},$t.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},$t.Xa=function(a){return Ue.B(this.top,a.top)&&Ue.B(this.right,a.right)&&Ue.B(this.bottom,a.bottom)&&Ue.B(this.left,a.left)},$t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ar.alloc=function(){var a=Ti.pop();return a===void 0?new Ar:a},Ar.free=function(a){Ti.push(a)},Ar.prototype.isReal=Ar.prototype.w,Ar.prototype.equalsApprox=Ar.prototype.Xa,Ar.prototype.equalTo=Ar.prototype.hi,Ar.prototype.equals=Ar.prototype.D,Ar.prototype.set=Ar.prototype.set,Ar.prototype.setTo=Ar.prototype.sg;var Qa=null,mi=null,Ti=[];Ar.className="Margin",Ar.parse=ta,Ar.stringify=Tu,Ar.ZeroMargin=Qa=new Ar(0,0,0,0).ja(),Ar.TwoMargin=mi=new Ar(2,2,2,2).ja(),Ar.parse=ta,Ar.stringify=Tu;function jn(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,vi,$i,hs,$a,ei,Yo,Na,Jo,ja,Cl,Js,_o,cs,gh,Zc,kl,Xc,sc,mh,zl,Fs,vh,lc,uc,Lo,Uf,hc,yh,Lu,Oa,Fa,Go,Qo,Vi,Li;jn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},jn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},jn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},jn.prototype.copy=function(){var a=new jn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},$t=jn.prototype,$t.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},$t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ri(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Da(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Wr;if(a==="TopLeft")return vi;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return $i;if(a==="TopRight")return hs;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return $a;if(a==="Center")return ei;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Yo;if(a==="BottomLeft")return Na;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Jo;if(a==="BottomRight")return ja;if(a==="TopSide")return Cl;if(a==="LeftSide")return Js;if(a==="RightSide")return _o;if(a==="BottomSide")return cs;if(a==="TopBottomSides")return gh;if(a==="LeftRightSides")return Zc;if(a==="TopLeftSides")return kl;if(a==="TopRightSides")return Xc;if(a==="BottomLeftSides")return sc;if(a==="BottomRightSides")return mh;if(a==="NotTopSide")return zl;if(a==="NotLeftSide")return Fs;if(a==="NotRightSide")return vh;if(a==="NotBottomSide")return lc;if(a==="AllSides")return uc;if(a==="Default")return Lo;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 jn(x,E,et,nt)}return new jn}function Uo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}$t.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(vi)?"TopLeft":this.D($i)?"Top":this.D(hs)?"TopRight":this.D($a)?"Left":this.D(ei)?"Center":this.D(Yo)?"Right":this.D(Na)?"BottomLeft":this.D(Jo)?"Bottom":this.D(ja)?"BottomRight":this.D(Cl)?"TopSide":this.D(Js)?"LeftSide":this.D(_o)?"RightSide":this.D(cs)?"BottomSide":this.D(gh)?"TopBottomSides":this.D(Zc)?"LeftRightSides":this.D(kl)?"TopLeftSides":this.D(Xc)?"TopRightSides":this.D(sc)?"BottomLeftSides":this.D(mh)?"BottomRightSides":this.D(zl)?"NotTopSide":this.D(Fs)?"NotLeftSide":this.D(vh)?"NotRightSide":this.D(lc)?"NotBottomSide":this.D(uc)?"AllSides":this.D(Lo)?"Default":"None"},$t.D=function(a){return a instanceof jn?(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},$t.gv=function(){return new jn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},$t.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uf))a=Js;else if(a.D(hc))a=_o;else if(a.D(yh))a=Cl;else if(a.D(Lu))a=cs;else return!1;return a=a.offsetY,(this.offsetY&a)===a},$t.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},$t.Mc=function(){return isNaN(this.x)||isNaN(this.y)},$t.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},$t.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},$t.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},jn.alloc=function(){var a=aa.pop();return a===void 0?new jn:a},jn.free=function(a){aa.push(a)},jn.prototype.isDefault=jn.prototype.Xb,jn.prototype.isNone=jn.prototype.ys,jn.prototype.isSide=jn.prototype.$c,jn.prototype.isNoSpot=jn.prototype.Mc,jn.prototype.isSpot=jn.prototype.sb,jn.prototype.includesSide=jn.prototype.Hf,jn.prototype.opposite=jn.prototype.gv,jn.prototype.equals=jn.prototype.D,jn.prototype.set=jn.prototype.set,jn.prototype.setTo=jn.prototype.sg;var aa=[];jn.className="Spot",jn.parse=Da,jn.stringify=Uo,jn.None=Wr=Ri(new jn(0,0,0,0),0).ja(),jn.Default=Lo=Ri(new jn(0,0,-1,0),-1).ja(),jn.TopLeft=vi=new jn(0,0,0,0).ja(),jn.TopCenter=$i=new jn(.5,0,0,0).ja(),jn.TopRight=hs=new jn(1,0,0,0).ja(),jn.LeftCenter=$a=new jn(0,.5,0,0).ja(),jn.Center=ei=new jn(.5,.5,0,0).ja(),jn.RightCenter=Yo=new jn(1,.5,0,0).ja(),jn.BottomLeft=Na=new jn(0,1,0,0).ja(),jn.BottomCenter=Jo=new jn(.5,1,0,0).ja(),jn.BottomRight=ja=new jn(1,1,0,0).ja(),jn.MiddleTop=Oa=$i,jn.MiddleLeft=Fa=$a,jn.MiddleRight=Go=Yo,jn.MiddleBottom=Qo=Jo,jn.Top=yh=$i,jn.Left=Uf=$a,jn.Right=hc=Yo,jn.Bottom=Lu=Jo,jn.TopSide=Cl=Ri(new jn(0,0,1,1),1).ja(),jn.LeftSide=Js=Ri(new jn(0,0,1,2),1).ja(),jn.RightSide=_o=Ri(new jn(0,0,1,4),1).ja(),jn.BottomSide=cs=Ri(new jn(0,0,1,8),1).ja(),jn.TopBottomSides=gh=Ri(new jn(0,0,1,9),1).ja(),jn.LeftRightSides=Zc=Ri(new jn(0,0,1,6),1).ja(),jn.TopLeftSides=kl=Ri(new jn(0,0,1,3),1).ja(),jn.TopRightSides=Xc=Ri(new jn(0,0,1,5),1).ja(),jn.BottomLeftSides=sc=Ri(new jn(0,0,1,10),1).ja(),jn.BottomRightSides=mh=Ri(new jn(0,0,1,12),1).ja(),jn.NotTopSide=zl=Ri(new jn(0,0,1,14),1).ja(),jn.NotLeftSide=Fs=Ri(new jn(0,0,1,13),1).ja(),jn.NotRightSide=vh=Ri(new jn(0,0,1,11),1).ja(),jn.NotBottomSide=lc=Ri(new jn(0,0,1,7),1).ja(),jn.AllSides=uc=Ri(new jn(0,0,1,15),1).ja(),Vi=new jn(.156,.156).ja(),Li=new jn(.844,.844).ja(),jn.parse=Da,jn.stringify=Uo;function Cr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Cr.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},Cr.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},Cr.prototype.copy=function(){var a=new Cr;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},Cr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Cr.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},Cr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Cr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Cr.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},Cr.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},Cr.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},Cr.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},$t=Cr.prototype,$t.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},$t.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},$t.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)},$t.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))},$t.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))},$t.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,_t=y*nt+x*ht+yt,Zt=b*et+x*st+pt,Jt=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(_t,Jt),_t=Math.max(_t,Jt),E=Math.min(E,x),Mt=Math.max(Mt,x),Zt=Math.min(Zt,y),_t=Math.max(_t,y),E=Math.min(E,et),Mt=Math.max(Mt,et),Zt=Math.min(Zt,b),_t=Math.max(_t,b),a.h(E,Zt,Mt-E,_t-Zt),a},Cr.alloc=function(){var a=Ds.pop();return a===void 0?new Cr:a},Cr.free=function(a){Ds.push(a)},Cr.prototype.transformRect=Cr.prototype.pp,Cr.prototype.transformPoint=Cr.prototype.Ga,Cr.prototype.scale=Cr.prototype.scale,Cr.prototype.translate=Cr.prototype.translate,Cr.prototype.rotate=Cr.prototype.rotate,Cr.prototype.invert=Cr.prototype.Vj,Cr.prototype.multiplyInverted=Cr.prototype.bv,Cr.prototype.multiply=Cr.prototype.multiply,Cr.prototype.reset=Cr.prototype.reset,Cr.prototype.isIdentity=Cr.prototype.ws,Cr.prototype.equals=Cr.prototype.D,Cr.prototype.setTransform=Cr.prototype.setTransform,Cr.prototype.set=Cr.prototype.set;var Ds=[];Cr.className="Transform",Cr.xF="54a702f3e53909c447824c6706603faf4c";var Ue={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ue.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ue.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(Ue.Yb(a,y,nt,st,Mt,x,b)&&Ue.Yb(a,y,nt,st,Mt,E,et))return Ue.Yb(a,y,nt,st,Mt,pt,yt);var _t=(a+x)/2,Zt=(y+b)/2,Jt=(x+E)/2,ie=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(_t+Jt)/2,x=(Zt+ie)/2,Jt=(Jt+E)/2,ie=(ie+et)/2;var Ee=(b+Jt)/2,Pe=(x+ie)/2;return Ue.cs(a,y,_t,Zt,b,x,Ee,Pe,ht,pt,yt,Mt)||Ue.cs(Ee,Pe,Jt,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 Or(((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(Ue.Yb(a,y,nt,st,ht,x,b)&&Ue.Yb(a,y,nt,st,ht,E,et))Xi(pt,a,y,0,0),Xi(pt,nt,st,0,0);else{var yt=(a+x)/2,Mt=(y+b)/2,_t=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+_t)/2,x=(Mt+Zt)/2,_t=(_t+E)/2,Zt=(Zt+et)/2;var Jt=(b+_t)/2,ie=(x+Zt)/2;Ue.Dl(a,y,yt,Mt,b,x,Jt,ie,ht,pt),Ue.Dl(Jt,ie,_t,Zt,E,et,nt,st,ht,pt)}return pt},Qe:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ue.Yb(a,y,nt,st,ht,x,b)&&Ue.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,_t=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+_t)/2,x=(Mt+Zt)/2,_t=(_t+E)/2,Zt=(Zt+et)/2;var Jt=(b+_t)/2,ie=(x+Zt)/2;Ue.Qe(a,y,yt,Mt,b,x,Jt,ie,ht,pt),Ue.Qe(Jt,ie,_t,Zt,E,et,nt,st,ht,pt)}return pt},jv:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ue.Yb(a,y,E,et,pt,x,b))return Ue.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 _t=(yt+x)/2,Zt=(Mt+b)/2;return Ue.jv(a,y,yt,Mt,_t,Zt,nt,st,ht,pt)||Ue.jv(_t,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(Ue.Yb(a,y,E,et,nt,x,b))Xi(st,a,y,0,0),Xi(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;Ue.iv(a,y,ht,pt,yt,Mt,nt,st),Ue.iv(yt,Mt,x,b,E,et,nt,st)}return st},ep:function(a,y,x,b,E,et,nt,st){if(Ue.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;Ue.ep(a,y,ht,pt,yt,Mt,nt,st),Ue.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,_t,Zt){if(Ue.Yb(a,y,nt,st,_t,x,b)&&Ue.Yb(a,y,nt,st,_t,E,et))return!Ue.Rl(a,y,nt,st,ht,pt,yt,Mt)||(_t=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),_t===0)?!1:(Zt.h(((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/_t,((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/_t),!0);var Jt=(a+x)/2,ie=(y+b)/2,Ee=(x+E)/2,Pe=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Jt+Ee)/2,x=(ie+Pe)/2,Ee=(Ee+E)/2,Pe=(Pe+et)/2;var Ne=(b+Ee)/2,je=(x+Pe)/2,De=1/0,_e=!1,Je=0,Tn=0;return Ue.Eo(a,y,Jt,ie,b,x,Ne,je,ht,pt,yt,Mt,_t,Zt)&&(a=(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt),a<De&&(De=a,_e=!0,Je=Zt.x,Tn=Zt.y)),Ue.Eo(Ne,je,Ee,Pe,E,et,nt,st,ht,pt,yt,Mt,_t,Zt)&&(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt)<De&&(_e=!0,Je=Zt.x,Tn=Zt.y),_e&&(Zt.x=Je,Zt.y=Tn),_e},Fo:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt,_t){var Zt=0;if(Ue.Yb(a,y,nt,st,_t,x,b)&&Ue.Yb(a,y,nt,st,_t,E,et)){if(_t=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),_t===0)return Zt;var Jt=((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/_t,ie=((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/_t;if(Jt>=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,Jt<ht||Jt>a)return Zt;0<_t?Zt++:0>_t&&Zt--}else{Jt=(a+x)/2,ie=(y+b)/2;var Ee=(x+E)/2,Pe=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Jt+Ee)/2,x=(ie+Pe)/2,Ee=(Ee+E)/2,Pe=(Pe+et)/2;var Ne=(b+Ee)/2,je=(x+Pe)/2;Zt+=Ue.Fo(a,y,Jt,ie,b,x,Ne,je,ht,pt,yt,Mt,_t),Zt+=Ue.Fo(Ne,je,Ee,Pe,E,et,nt,st,ht,pt,yt,Mt,_t)}return Zt},qh:function(a,y,x,b,E,et,nt){return Ue.$(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)):Ue.$(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 Ue.B(a,x)&&Ue.B(y,b)?(ht.h(a,y),!1):Ue.$(E,nt)?Ue.$(a,x)?(Ue.qh(a,y,x,b,E,et,ht),!1):Ue.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ht):(st=(st-et)/(nt-E),Ue.$(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),Ue.$(st,nt)?(Ue.qh(a,y,x,b,E,et,ht),!1):(E=(nt*a-st*E+et-y)/(nt-st),Ue.$(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)):Ue.qh(a,y,x,b,E,nt*(E-a)+y,ht))))},MA:function(a,y,x,b,E){return Ue.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,Pe){var Ne=(Ee-a)*(Ee-a)+(Pe-y)*(Pe-y);Ne<Mt&&(Mt=Ne,ht.h(Ee,Pe))}var Mt=1/0;yt(ht.x,ht.y);var _t=0,Zt=0,Jt=0,ie=0;if(E<nt?(_t=E,Zt=nt):(_t=nt,Zt=E),et<st?(Jt=E,ie=nt):(Jt=nt,ie=E),_t=(Zt-_t)/2+pt,pt=(ie-Jt)/2+pt,E=(E+nt)/2,et=(et+st)/2,_t===0||pt===0)return ht;if(.5>(x>a?x-a:a-x)){if(_t=1-(x-E)*(x-E)/(_t*_t),0>_t)return ht;_t=Math.sqrt(_t),b=-pt*_t+et,yt(x,pt*_t+et),yt(x,b)}else{if(x=(b-y)/(x-a),b=1/(_t*_t)+x*x/(pt*pt),st=2*x*(y-x*a)/(pt*pt)-2*x*et/(pt*pt)-2*E/(_t*_t),_t=st*st-4*b*(2*x*a*et/(pt*pt)-2*y*et/(pt*pt)+et*et/(pt*pt)+E*E/(_t*_t)-1+(y-x*a)*(y-x*a)/(pt*pt)),0>_t)return ht;_t=Math.sqrt(_t),pt=(-st+_t)/(2*b),yt(pt,x*pt-x*a+y),_t=(-st-_t)/(2*b),yt(_t,x*_t-x*a+y)}return ht},Ff:function(a,y,x,b,E,et,nt,st,ht){var pt=1e21,yt=a,Mt=y;if(Ue.Ve(a,y,a,b,E,et,nt,st,ht)){var _t=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et);_t<pt&&(pt=_t,yt=ht.x,Mt=ht.y)}return Ue.Ve(x,y,x,b,E,et,nt,st,ht)&&(_t=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),_t<pt&&(pt=_t,yt=ht.x,Mt=ht.y)),Ue.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)),Ue.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 Ue.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):!!(Ro(a,y,x,b,E,et)||Ro(a,y,x,b,nt,st)||Ue.Rl(a,y,ht,y,E,et,nt,st)||Ue.Rl(ht,y,ht,pt,E,et,nt,st)||Ue.Rl(ht,pt,a,pt,E,et,nt,st)||Ue.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>=Ue.Fl(a,y,x,b,E,et)*Ue.Fl(a,y,x,b,nt,st)&&0>=Ue.Fl(E,et,nt,st,a,y)*Ue.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(Ue.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),Ue.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 fr,um:new fr,Mf:new fr,Nf:0,vm:100};Ue.za=Ue.AA;function kn(a){Jr(this),this.l=2,a===void 0&&(a=kn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===kn.o?this.ee=new wn:(kn.V===null&&(kn.V=new wn().freeze()),this.ee=kn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=vi,this.gg=ja,this.Rk=this.Sk=NaN,this.Uf=vn}kn.prototype.copy=function(){var a=new kn;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===kn.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},kn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},kn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==kn.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},kn.prototype.ka=function(){if(Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==kn.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},kn.prototype.Xa=function(a){if(!(a instanceof kn))return!1;if(this.type!==a.type)return this.type===kn.j&&a.type===kn.o?Gl(this,a):a.type===kn.j&&this.type===kn.o?Gl(a,this):!1;if(this.type===kn.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 Ue.B(this.startX,a.startX)&&Ue.B(this.startY,a.startY)&&Ue.B(this.endX,a.endX)&&Ue.B(this.endY,a.endY)};function Gl(a,y){return a.type!==kn.j||y.type!==kn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Ue.B(a.startX,y.startX)&&Ue.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ki&&Ue.B(a.endX,y.endX)&&Ue.B(a.endY,y.endY))))}kn.ia=function(a){return a.toString()},kn.prototype.qb=function(a){a.classType===kn&&(this.type=a)},kn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case kn.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 kn.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 kn.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 kn.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()}},kn.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},kn.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(yr){var hr=parseFloat(b()),ii=parseFloat(b());Ee===Ee.toLowerCase()&&(hr=je.x+hr,ii=je.y+ii),yr.h(hr,ii)}function et(){return E(je),je}function nt(){return E(Ne),Ne}function st(){var yr=Pe.toLowerCase();return yr!=="c"&&yr!=="s"&&yr!=="q"&&yr!=="t"?je:new Me(2*je.x-Ne.x,2*je.y-Ne.y)}y===void 0&&(y=!1);var ht=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ht,"$1 $2"),a=a.replace(ht,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var pt=a.split(" ");for(a=0;a<pt.length;a++){var yt=pt[a];if(yt.match(/(\.[0-9]*)(\.)/gm)!==null){ht=Xn();for(var Mt="",_t=!1,Zt=0;Zt<yt.length;Zt++){var Jt=yt[Zt];Jt!=="."||_t?Jt==="."?(ht.push(Mt),Mt="."):Mt+=Jt:(_t=!0,Mt+=Jt)}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,In(ht)}}var ie=-1,Ee="",Pe="";ht=new Me(0,0);var Ne=new Me(0,0),je=new Me(0,0),De=pt.length;a=N1(null),_t=Mt=yt=!1,Zt=!0,Jt=null;for(var _e=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ie>=De-1);)if(Pe=Ee,Ee=b(),Ee!=="")switch(Ee.toUpperCase()){case"X":Zt=!0,Mt=yt=!1;break;case"M":for(Jt=et(),a.mc===null||Zt===!0?(Td(a,Jt.x,Jt.y,yt,!Mt,_t),Zt=!1):a.moveTo(Jt.x,Jt.y),ht.assign(je);!x();)Jt=et(),a.lineTo(Jt.x,Jt.y);break;case"L":for(;!x();)Jt=et(),a.lineTo(Jt.x,Jt.y);break;case"H":for(;!x();)je=new Me((Ee===Ee.toLowerCase()?je.x:0)+parseFloat(b()),je.y),a.lineTo(je.x,je.y);break;case"V":for(;!x();)je=new Me(je.x,(Ee===Ee.toLowerCase()?je.y:0)+parseFloat(b())),a.lineTo(je.x,je.y);break;case"C":for(;!x();){Jt=new Me,E(Jt);var Je=nt(),Tn=et();Qu(a,Jt.x,Jt.y,Je.x,Je.y,Tn.x,Tn.y)}break;case"S":for(;!x();)Jt=st(),Je=nt(),Tn=et(),Qu(a,Jt.x,Jt.y,Je.x,Je.y,Tn.x,Tn.y);break;case"Q":for(;!x();)Jt=nt(),Je=et(),Im(a,Jt.x,Jt.y,Je.x,Je.y);break;case"T":for(;!x();)Ne=Jt=st(),Je=et(),Im(a,Jt.x,Jt.y,Je.x,Je.y);break;case"B":for(;!x();){Jt=parseFloat(b()),Je=parseFloat(b()),Tn=parseFloat(b());var _n=parseFloat(b()),Bn=parseFloat(b()),Pn=Bn,fn=!1;x()||(Pn=parseFloat(b()),x()||(fn=parseFloat(b())!==0)),Ee===Ee.toLowerCase()&&(Tn+=je.x,_n+=je.y),a.arcTo(Jt,Je,Tn,_n,Bn,Pn,fn)}break;case"A":for(;!x();)Jt=Math.abs(parseFloat(b())),Je=Math.abs(parseFloat(b())),Tn=parseFloat(b()),Bn=_n=!1,fn=Pn=0,Pn=b(),Pn.length===1?(_n=!!parseFloat(Pn),Bn=!!parseFloat(b()),Pn=parseFloat(b())):Pn.length===2?(_n=!!parseFloat(Pn[0]),Bn=!!parseFloat(Pn[1]),Pn=parseFloat(b())):(_n=!!parseFloat(Pn[0]),Bn=!!parseFloat(Pn[1]),Pn=parseFloat(Pn.slice(2))),fn=parseFloat(b()),Ee===Ee.toLowerCase()&&(Pn=je.x+Pn,fn=je.y+fn),je.h(Pn,fn),Px(a,Jt,Je,Tn,_n,Bn,Pn,fn);break;case"Z":bx(a),je.assign(ht);break;case"F":for(Jt="",Je=1;pt[ie+Je];)if(pt[ie+Je]==="0")_t=!0,Je++;else if(pt[ie+Je].match(/[Uu]/)!==null)Je++;else if(pt[ie+Je].match(_e)===null)Je++;else{Jt=pt[ie+Je];break}Jt.match(/[Mm]/)?yt=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Jt="",Je=1;pt[ie+Je];)if(pt[ie+Je].match(/[Ff]/)!==null)Je++;else if(pt[ie+Je].match(_e)===null)Je++;else{Jt=pt[ie+Je];break}Jt.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},kn.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)},kn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===kn.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},kn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===kn.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),Sh(this,a,!1),Xi(a,0,0,0,0),a.freeze()},kn.prototype.ix=function(){var a=new on;return Sh(this,a,!0),a};function Sh(a,y,x){switch(a.type){case kn.j:case kn.u:case kn.F:x?y.h(a.od,a.pd,0,0):Xi(y,a.od,a.pd,0,0),Xi(y,a.Dc,a.Ec,0,0);break;case kn.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):Xi(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 ki:case bo:ht=Mt.endX,pt=Mt.endY,Xi(y,ht,pt,0,0);break;case Wo:Ue.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 fs:Ue.iv(ht,pt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.5,y),ht=Mt.endX,pt=Mt.endY;break;case ho:case ws:var _t=Mt.type===ho?qa(Mt,et):Is(Mt,et,ht,pt),Zt=_t.length;if(Zt===0){ht=Mt.type===ho?Mt.centerX:Mt.endX,pt=Mt.type===ho?Mt.centerY:Mt.endY,Xi(y,ht,pt,0,0);break}Mt=null;for(var Jt=0;Jt<Zt;Jt++)Mt=_t[Jt],Ue.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:Oe("Unknown Segment type: "+Mt.type)}}}break;default:Oe("Unknown Geometry type: "+a.type)}}kn.prototype.normalize=function(){this._isFrozen&&ln(this);var a=this.ix();return this.offset(-a.x,-a.y),new Me(-a.x,-a.y)},kn.prototype.offset=function(a,y){return this._isFrozen&&ln(this),this.transform(1,0,0,1,a,y),this},kn.prototype.scale=function(a,y){return this._isFrozen&&ln(this),this.transform(a,0,0,y,0,0),this},kn.prototype.rotate=function(a,y,x){this._isFrozen&&ln(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Cr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Cr.free(b),this},$t=kn.prototype,$t.transform=function(a,y,x,b,E,et){switch(this.type){case kn.j:case kn.u:case kn.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 kn.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 _t=Mt.length,Zt=0;Zt<_t;Zt++){var Jt=Mt[Zt];switch(Jt.type){case ki:case bo:nt=Jt.endX,st=Jt.endY,Jt.endX=nt*a+st*x+E,Jt.endY=nt*y+st*b+et;break;case Wo:nt=Jt.point1X,st=Jt.point1Y,Jt.point1X=nt*a+st*x+E,Jt.point1Y=nt*y+st*b+et,nt=Jt.point2X,st=Jt.point2Y,Jt.point2X=nt*a+st*x+E,Jt.point2Y=nt*y+st*b+et,nt=Jt.endX,st=Jt.endY,Jt.endX=nt*a+st*x+E,Jt.endY=nt*y+st*b+et;break;case fs:nt=Jt.point1X,st=Jt.point1Y,Jt.point1X=nt*a+st*x+E,Jt.point1Y=nt*y+st*b+et,nt=Jt.endX,st=Jt.endY,Jt.endX=nt*a+st*x+E,Jt.endY=nt*y+st*b+et;break;case ho:nt=Jt.centerX,st=Jt.centerY,Jt.centerX=nt*a+st*x+E,Jt.centerY=nt*y+st*b+et,y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Jt.startAngle+=nt),0>a&&(Jt.startAngle=180-Jt.startAngle,Jt.sweepAngle=-Jt.sweepAngle),0>b&&(Jt.startAngle=-Jt.startAngle,Jt.sweepAngle=-Jt.sweepAngle),Jt.radiusX*=Math.sqrt(a*a+x*x),Jt.radiusY!==void 0&&(Jt.radiusY*=Math.sqrt(y*y+b*b));break;case ws:if(nt=Jt.endX,st=Jt.endY,Jt.endX=nt*a+st*x+E,Jt.endY=nt*y+st*b+et,Jt.radiusX===0||Jt.radiusY===0)break;y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Jt.xAxisRotation+=nt),0>a&&(Jt.xAxisRotation=180-Jt.xAxisRotation,Jt.isClockwiseArc=!Jt.isClockwiseArc),0>b&&(Jt.xAxisRotation=-Jt.xAxisRotation,Jt.isClockwiseArc=!Jt.isClockwiseArc),Jt.radiusX*=Math.sqrt(a*a+x*x),Jt.radiusY*=Math.sqrt(y*y+b*b);break;default:Oe("Unknown Segment type: "+Jt.type)}}}}return this._isInvalidBounds=!0,this},$t.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 kn.j:return Ue.Yb(x,b,E,et,y,a.x,a.y);case kn.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 kn.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 kn.o:return Bs(this,a,y,!0,!1);default:return!1}};function Bs(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,_t=a.figures.s,Zt=_t.length,Jt=0;Jt<Zt;Jt++){var ie=_t[Jt],Ee=!ie.isEvenOdd;if(ie.isFilled){if(b&&ie.ca(et,y,x))return!0;var Pe=ie.segments;ht=ie.startX,pt=ie.startY;for(var Ne=ht,je=pt,De=Pe.s,_e=0;_e<=Pe.length;_e++){var Je=void 0;if(_e!==Pe.length){Je=De[_e];var Tn=Je.type;a=Je.endX,Mt=Je.endY}else Tn=ki,a=Ne,Mt=je;switch(Tn){case bo:if(Ne=su(et,y,nt,y,ht,pt,Ne,je),isNaN(Ne))return!0;st+=Ne,Ne=a,je=Mt;break;case ki:if(ht=su(et,y,nt,y,ht,pt,a,Mt),isNaN(ht))return!0;st+=ht;break;case Wo:yt=Ue.Fo(ht,pt,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,a,Mt,nt,y,et,y,.5),st+=yt;break;case fs:yt=Ue.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 ho:case ws:Tn=Je.type===ho?qa(Je,ie):Is(Je,ie,ht,pt);var _n=Tn.length;if(_n===0){if(ht=su(et,y,nt,y,ht,pt,Je.type===ho?Je.centerX:Je.endX,Je.type===ho?Je.centerY:Je.endY),isNaN(ht))return!0;st+=ht;break}Je=null;for(var Bn=0;Bn<_n;Bn++){if(Je=Tn[Bn],Bn===0){if(yt=su(et,y,nt,y,ht,pt,Je[0],Je[1]),isNaN(yt))return!0;st+=yt}yt=Ue.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:Oe("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 su(a,y,x,b,E,et,nt,st){if(Ue.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 xh(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}$t.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Me),this.type===kn.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},$t.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===kn.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},$t.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===kn.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},$t.xx=function(a){if(this.type===kn.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 Ue.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===kn.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 _t=y[Mt],Zt=x[Mt],Jt=_t.length,ie=0;ie<Jt;ie+=2){var Ee=_t[ie],Pe=_t[ie+1];if(ie!==0){Ue.qh(pt,yt,Ee,Pe,a.x,a.y,b);var Ne=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ne<E&&(E=Ne,nt=st,nt+=Math.sqrt((b.x-pt)*(b.x-pt)+(b.y-yt)*(b.y-yt))),st+=Zt[(ie-2)/2]}pt=Ee,yt=Pe}return Me.free(b),a=nt/et,0>a?0:1<a?1:a}return 0};function Wf(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===kn.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===kn.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===kn.F){var et=new wo;et.startX=a.endX,et.startY=(a.startY+a.endY)/2;var nt=new ri(ho);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=qa(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];Ue.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(Yc(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 _t=pt[Mt];switch(_t.type){case bo:4<=b.length&&(y.push(b),x.push(Yc(b))),b=[],b.push(_t.endX),b.push(_t.endY),nt=_t.endX,et=_t.endY,st=nt,ht=et;break;case ki:b.push(_t.endX),b.push(_t.endY),nt=_t.endX,et=_t.endY;break;case Wo:Ue.Qe(nt,et,_t.point1X,_t.point1Y,_t.point2X,_t.point2Y,_t.endX,_t.endY,.5,b),nt=_t.endX,et=_t.endY;break;case fs:Ue.ep(nt,et,_t.point1X,_t.point1Y,_t.endX,_t.endY,.5,b),nt=_t.endX,et=_t.endY;break;case ho:var Zt=qa(_t,E),Jt=Zt.length;if(Jt===0){b.push(_t.centerX),b.push(_t.centerY),nt=_t.centerX,et=_t.centerY;break}for(var ie=0;ie<Jt;ie++){var Ee=Zt[ie];Ue.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 ws:if(Zt=Is(_t,E,nt,et),Jt=Zt.length,ie=_t.endX,Ee=_t.endY,Jt===0){b.push(ie),b.push(Ee),nt=ie,et=Ee;break}for(ie=0;ie<Jt;ie++)Ee=Zt[ie],Ue.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:Oe("Segment not of valid type: "+_t.type)}_t.isClosed&&(b.push(st),b.push(ht))}4<=b.length&&(y.push(b),x.push(Yc(b)))}}}function Yc(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(eo(x,b,nt,st))),x=nt,b=st}return y}$t.add=function(a){return this.ee.add(a),this},$t.pm=function(a,y,x,b,E,et,nt,st){return this._isFrozen&&ln(this),this.fg=new jn(a,y,E,et).freeze(),this.gg=new jn(x,b,nt,st).freeze(),this},He.Object.defineProperties(kn.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 Wf(this),this.tk}},flattenedLengths:{get:function(){return Wf(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===kn.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===kn.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&&ln(this,a),this.na=a,a===kn.o?this.ee=new wn:(kn.V===null&&(kn.V=new wn().freeze()),this.ee=kn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&ln(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&ln(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&ln(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&ln(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),kn.prototype.setSpots=kn.prototype.pm,kn.prototype.add=kn.prototype.add,kn.prototype.getFractionForPoint=kn.prototype.xx,kn.prototype.getPointAndAngleAlongPath=kn.prototype.Qu,kn.prototype.getAngleAlongPath=kn.prototype.wx,kn.prototype.getPointAlongPath=kn.prototype.Pu,kn.prototype.containsPoint=kn.prototype.ca,kn.prototype.transform=kn.prototype.transform,kn.prototype.rotate=kn.prototype.rotate,kn.prototype.scale=kn.prototype.scale,kn.prototype.offset=kn.prototype.offset,kn.prototype.normalize=kn.prototype.normalize,kn.prototype.computeBoundsWithoutOrigin=kn.prototype.ix,kn.prototype.equalsApprox=kn.prototype.Xa,kn.className="Geometry",kn.j=new an(kn,"Line",0),kn.u=new an(kn,"Rectangle",1),kn.F=new an(kn,"Ellipse",2),kn.o=new an(kn,"Path",3),kn.V=null,kn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",kn.className="Geometry",kn.stringify=kn.ia,kn.fillPath=kn.nb,kn.parse=kn.parse,kn.Line=kn.j,kn.Rectangle=kn.u,kn.Ellipse=kn.F,kn.Path=kn.o;function wo(a,y,x,b,E){Jr(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 wn,this.sr=this.pl.Ja,this.fw=null}wo.prototype.copy=function(){var a=new wo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var et=y[E].copy();b.add(et)}return a.sr=this.sr,a.fw=this.fw,a},$t=wo.prototype,$t.Xa=function(a){if(!(a instanceof wo&&Ue.B(this.startX,a.startX)&&Ue.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},$t.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},$t.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},$t.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},$t.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},$t.add=function(a){return this.pl.add(a),this},$t.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 bo:et=yt.endX,nt=yt.endY,b=yt.endX,E=yt.endY;break;case ki:if(Ue.Yb(b,E,yt.endX,yt.endY,x,a,y))return!0;b=yt.endX,E=yt.endY;break;case Wo:if(Ue.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 fs:if(Ue.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 ho:case ws:var Mt=yt.type===ho?qa(yt,this):Is(yt,this,b,E),_t=Mt.length,Zt=yt.type===ho?yt.centerX:yt.endX,Jt=yt.type===ho?yt.centerY:yt.endY;if(_t===0){if(Ue.Yb(b,E,Zt,Jt,x,a,y))return!0;b=Zt,E=Jt;break}for(Zt=null,Jt=0;Jt<_t;Jt++)if(Zt=Mt[Jt],Jt===0&&Ue.Yb(b,E,Zt[0],Zt[1],x,a,y)||Ue.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:Oe("Unknown Segment type: "+yt.type)}if(yt.isClosed&&(b!==et||E!==nt)&&Ue.Yb(b,E,et,nt,x,a,y))return!0}return!1},He.Object.defineProperties(wo.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&ln(this,a),this.pl=a,this._isInvalidBounds=!0}}}),wo.prototype.add=wo.prototype.add,wo.prototype.equalsApprox=wo.prototype.Xa,wo.className="PathFigure";function ri(a,y,x,b,E,et,nt,st){Jr(this),a===void 0&&(a=ki),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),et===void 0&&(et=0),nt===void 0&&(nt=0),a===ws?(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===ho&&(et=Math.max(et,0)),this.Wh=et,typeof nt=="number"?(a===ho&&(nt=Math.max(nt,0)),this.Pg=nt):this.Pg=0),this.ae=null}ri.prototype.copy=function(){var a=new ri;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},$t=ri.prototype,$t.Xa=function(a){if(!(a instanceof ri)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case bo:case ki:return Ue.B(this.endX,a.endX)&&Ue.B(this.endY,a.endY);case Wo:return Ue.B(this.endX,a.endX)&&Ue.B(this.endY,a.endY)&&Ue.B(this.point1X,a.point1X)&&Ue.B(this.point1Y,a.point1Y)&&Ue.B(this.point2X,a.point2X)&&Ue.B(this.point2Y,a.point2Y);case fs:return Ue.B(this.endX,a.endX)&&Ue.B(this.endY,a.endY)&&Ue.B(this.point1X,a.point1X)&&Ue.B(this.point1Y,a.point1Y);case ho:return Ue.B(this.startAngle,a.startAngle)&&Ue.B(this.sweepAngle,a.sweepAngle)&&Ue.B(this.centerX,a.centerX)&&Ue.B(this.centerY,a.centerY)&&Ue.B(this.radiusX,a.radiusX)&&Ue.B(this.radiusY,a.radiusY);case ws:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ue.B(this.xAxisRotation,a.xAxisRotation)&&Ue.B(this.endX,a.endX)&&Ue.B(this.endY,a.endY)&&Ue.B(this.radiusX,a.radiusX)&&Ue.B(this.radiusY,a.radiusY);default:return!1}},$t.qb=function(a){a.classType===ri&&(this.type=a)},$t.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ki:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wo:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case fs:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ho:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case ws:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return this._isFrozen=!1,this},$t.close=function(){return this.isClosed=!0,this};function qa(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=Ue.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var nt=Cr.alloc();nt.reset(),x<b?nt.scale(1,b/x):nt.scale(x/b,1),kn.Ha(et,nt),Cr.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 Is(a,y,x,b){function E(ie,Ee,Pe,Ne){return(ie*Ne<Ee*Pe?-1:1)*Math.acos((ie*Pe+Ee*Ne)/(Math.sqrt(ie*ie+Ee*Ee)*Math.sqrt(Pe*Pe+Ne*Ne)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var et=a.Pg;y===0&&(y=1e-4),et===0&&(et=1e-4);var nt=Math.PI/180*a.Ne,st=a.isLargeArc,ht=a.isClockwiseArc,pt=a.Dc,yt=a.Ec,Mt=Math.cos(nt),_t=Math.sin(nt),Zt=Mt*(x-pt)/2+_t*(b-yt)/2;nt=-_t*(x-pt)/2+Mt*(b-yt)/2;var Jt=Zt*Zt/(y*y)+nt*nt/(et*et);return 1<Jt&&(y*=Math.sqrt(Jt),et*=Math.sqrt(Jt)),Jt=(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(Jt)&&(Jt=0),st=Jt*y*nt/et,Jt=Jt*-et*Zt/y,isNaN(st)&&(st=0),isNaN(Jt)&&(Jt=0),x=(x+pt)/2+Mt*st-_t*Jt,b=(b+yt)/2+_t*st+Mt*Jt,yt=E(1,0,(Zt-st)/y,(nt-Jt)/et),Mt=(Zt-st)/y,pt=(nt-Jt)/et,Zt=(-Zt-st)/y,st=(-nt-Jt)/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=Ue.jx(0,0,y>et?y:et,yt,yt+nt,!0),et=Cr.alloc(),et.reset(),et.translate(x,b),et.rotate(a.Ne,0,0),et.scale(ht,Zt),kn.Ha(y,et),Cr.free(et),a.ae=y,a.ae}He.Object.defineProperties(ri.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&ln(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&En(a,">= zero",ri,"radiusX"),this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&En(a,">= zero",ri,"radiusY"),this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ln(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),ri.prototype.equalsApprox=ri.prototype.Xa;var bo=new an(ri,"Move",0),ki=new an(ri,"Line",1),Wo=new an(ri,"Bezier",2),fs=new an(ri,"QuadraticBezier",3),ho=new an(ri,"Arc",4),ws=new an(ri,"SvgArc",4);ri.className="PathSegment",ri.Move=bo,ri.Line=ki,ri.Bezier=Wo,ri.QuadraticBezier=fs,ri.Arc=ho,ri.SvgArc=ws;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},He.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 Au(){this.H=null,this.xa="",this.ar=this.Lr=null}Au.prototype.copy=function(){var a=new Au;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Au.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},He.Object.defineProperties(Au.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),Au.className="DiagramEvent";function Ii(){this.Fm=Di,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ii.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ii.prototype.copy=function(){var a=new Ii;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=sn(y)&&typeof y.J=="function"?y.J():y,a},Ii.prototype.qb=function(a){a.classType===Ii&&(this.change=a)},Ii.prototype.toString=function(){var a="";return a=this.change===ts?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===ts?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=rr(this.object)),this.oldValue!==null&&(a+=" old: "+rr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+rr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ii.prototype.I=function(a){return a?this.oldValue:this.newValue},Ii.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ii.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ii.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},He.Object.defineProperties(Ii.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===ts&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Ii.prototype.redo=Ii.prototype.redo,Ii.prototype.canRedo=Ii.prototype.canRedo,Ii.prototype.undo=Ii.prototype.undo,Ii.prototype.canUndo=Ii.prototype.canUndo,Ii.prototype.getParam=Ii.prototype.Dz,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.clear=Ii.prototype.clear;var ts=new an(Ii,"Transaction",-1),Di=new an(Ii,"Property",0),io=new an(Ii,"Insert",1),vo=new an(Ii,"Remove",2);Ii.className="ChangedEvent",Ii.Transaction=ts,Ii.Property=Di,Ii.Insert=io,Ii.Remove=vo;function Eo(){this.o=new wn().freeze(),this.xa="",this.j=!1}Eo.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},Eo.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()},Eo.prototype.canUndo=function(){return this.isComplete},Eo.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()}},Eo.prototype.canRedo=function(){return this.isComplete},Eo.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()}},Eo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new or,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 or,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()}},He.Object.defineProperties(Eo.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}}}),Eo.prototype.optimize=Eo.prototype.ak,Eo.prototype.redo=Eo.prototype.redo,Eo.prototype.canRedo=Eo.prototype.canRedo,Eo.prototype.undo=Eo.prototype.undo,Eo.prototype.canUndo=Eo.prototype.canUndo,Eo.prototype.clear=Eo.prototype.clear,Eo.className="Transaction";function _i(){this.Pt=new Sn,this.Jd=!1,this.u=new wn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new wn().freeze(),this.hl=new wn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}_i.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},_i.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},_i.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},$t=_i.prototype,$t.Xw=function(a){this.Pt.add(a)},$t.Rx=function(a){this.Pt.remove(a)},$t.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},$t.eb=function(a){return a===void 0&&(a=""),wh(this,!0,a)},$t.Kf=function(){return wh(this,!1,"")};function wh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Gn("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}$t.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()}},_i.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},_i.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){Gn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},_i.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},_i.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){Gn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},_i.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Ii;for(b.change=ts,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},_i.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Eo);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||Gn("Change not within a transaction: "+x.toString()))}},_i.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},He.Object.defineProperties(_i.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}}}),_i.prototype.handleChanged=_i.prototype.Tu,_i.prototype.redo=_i.prototype.redo,_i.prototype.undo=_i.prototype.undo,_i.prototype.canUndo=_i.prototype.canUndo,_i.prototype.discardHistoryAfterIndex=_i.prototype.lx,_i.prototype.rollbackTransaction=_i.prototype.Kf,_i.prototype.commitTransaction=_i.prototype.eb,_i.prototype.startTransaction=_i.prototype.Ea,_i.prototype.removeModel=_i.prototype.Rx,_i.prototype.addModel=_i.prototype.Xw,_i.prototype.clear=_i.prototype.clear,_i.className="UndoManager";function Qr(){Jr(this),this.H=Hl,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":Wn(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(Rr?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||(Rr?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===Jc&&!y.shift||E===cc&&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===Jc&&y.shift||E===cc&&!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=Xe(function(){x.doWaitAfter(b)},a)},Qr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&yn.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 $r);)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},He.Object.defineProperties(Qr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof qe&&(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 Fi(){Qr.call(this),this.name="ToolManager",this.hb=new wn,this.ob=new wn,this.Hb=new wn,this.F=this.V=850,this.o=new Mn(2,2).ja(),this.Ha=5e3,this.ia=cc,this.u=Hf,this.Mp=this.j=null,this.zj=-1}Ve(Fi,Qr),Fi.prototype.initializeStandardTools=function(){},Fi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof $r&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Fi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===lu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===lu)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===cc?this.mouseWheelBehavior=Jc:this.mouseWheelBehavior===Jc&&(this.mouseWheelBehavior=cc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Fi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===lu)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Bg(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Bg(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Fi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof $r&&(y===a||y.rg(a))||this.hideToolTip()},Fi.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},Fi.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},Fi.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof $r)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Fi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof $r){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 Ml&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(yn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Xe(function(){E.hideToolTip()},a)}},Fi.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Fi.prototype.hideToolTip=function(){this.zj!==-1&&(yn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof $r?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ml&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Fi.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Fi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Fi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Fi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Fi.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Fi.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Fi.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},He.Object.defineProperties(Fi.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof $r?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),Fi.prototype.replaceStandardTool=Fi.prototype.gb;var cc=new an(Fi,"WheelScroll",0),Jc=new an(Fi,"WheelZoom",1),ep=new an(Fi,"WheelNone",2),Hf=new an(Fi,"GestureZoom",3),lu=new an(Fi,"GestureCancel",4),bh=new an(Fi,"GestureNone",5);Fi.className="ToolManager",Fi.WheelScroll=cc,Fi.WheelZoom=Jc,Fi.WheelNone=ep,Fi.GestureZoom=Hf,Fi.GestureCancel=lu,Fi.GestureNone=bh;function zi(){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 Sn().freeze(),this.ia=new ct,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ul;Ve(zi,Qr),zi.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},zi.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},zi.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,(Rr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},zi.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),Fo=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,Fo=this,Du=this.diagram,this.doSimulatedDragOut()))};function Vf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Cn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new ds,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}zi.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},zi.prototype.Pd=function(a){return a===void 0?new pu(Ji):this.isGridSnapEnabled?new pu(new Me(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new pu(a.copy())},zi.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<Ul.count){for(var y=Ul,x=y.length,b=0;b<x;b++){var E=y.M(b);Nu(E),Qs(E),Ph(E),E.diagram.ug()}y.clear()}Nu(this),this.tl.h(NaN,NaN),Du!==null&&(Du.currentCursor=""),Fo=Du=null,Qs(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),hf(a,!0)},zi.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=Fo;Qs(a),ju(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}zi.prototype.doCancel=function(){Qs(this),ju(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},zi.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},zi.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function uu(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")):ju(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 or,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var et=y.I(E);et!==null&&(et.location=E.location,et.Va(),x.add(et,a.Pd(et.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Cn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Vf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,th(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Qs(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof Cn&&(x.value.point=new Me(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Nu(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 El(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())}zi.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 ju(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Cn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),th(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),Ou(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&&Fo===null)return;var st=b!==null?b.part:null;if(st===null||x.handlesDragDropForTopLevelParts&&st.isTopLevel&&!(st instanceof Sr)){var ht=x.mouseDragOver;ht!==null&&(ht(E),nt=!0)}if(!a.isActive&&Fo===null||(a.doDragOver(y,b),!a.isActive&&Fo===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)}zi.prototype.findDragOverObject=function(a){var y=this;return Vl(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof $r||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},zi.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&&Fo===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 Sr)&&(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(ei,a);ht=y.Bf(ht),ht<et&&(nt=st,et=ht)}}return Me.free(a),nt}function Ou(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)}}}}zi.prototype.doDragOver=function(){};function Fu(a,y){var x=a.diagram;a.dragsLink&&Ou(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||Fo!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)et=E.key,et instanceof Ln&&et.linksConnected.each(function(st){st.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Fo!==null){for(a=on.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Ln&&$v(x,b,a);on.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Sr||(x=a.mouseDrop,x!==null&&x(y))}function $v(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof Cn},!0,function(E){return E instanceof Cn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}zi.prototype.doDropOnto=function(){},zi.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()?(uu(this,!1),sd(a,this.copiedParts),El(this,this.copiedParts,!1),Dh(a,this.copiedParts)):this.mayMove()?(Qs(this),El(this,this.draggedParts,!0)):this.mayDragOut()?(uu(this,!1),El(this,this.copiedParts,!1)):Qs(this),Kf(this,a.lastInput.documentPoint))}},zi.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?(Qs(this),uu(this,!0),sd(a,this.copiedParts),El(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,Qs(this),this.mayMove()&&(El(this,this.draggedParts,!0),Kf(this,a.lastInput.documentPoint))),this.Ym=!0,Fu(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)}}},zi.prototype.simulatedMouseMove=function(a,y,x){if(Fo===null)return!1;var b=Fo.diagram;x instanceof qe||(x=null);var E=Du;return x!==E&&(E!==null&&E!==b&&(E.ug(),Fo.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Du=x,x!==null&&x!==b&&(np(),E=x.toolManager.findTool("Dragging"),E!==null&&(Ul.contains(E)||Ul.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)},zi.prototype.simulatedMouseUp=function(a,y,x){if(Fo===null)return!1;var b=Du,E=Fo.diagram;if(x===null)return Fo.doCancel(),!0;if(x!==b){var et=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&et!==null)return b.ug(),Fo.isDragOutStarted=!1,et.doSimulatedDragLeave(),!1;Du=x,b=x.toolManager.findTool("Dragging"),b!==null&&(np(),Ul.contains(b)||Ul.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=Fo,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 Ln&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}zi.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Rr?!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())},zi.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())},zi.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())},zi.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},zi.prototype.Az=function(){return Fo},zi.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Fo;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},zi.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Cs(a),a.animationManager.Cc(),a=Fo,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},zi.prototype.doSimulatedDragLeave=function(){var a=Fo;a!==null&&a.doSimulatedDragOut(),this.doCancel()},zi.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Fo;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),El(this,this.copiedParts,!1),Kf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},zi.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Fo;if(y!==null){var x=y.diagram;if(y.Ym=!0,Qs(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),El(this,this.copiedParts,!1);var b=new Sn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Fu(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 or,st=Me.alloc(),ht=y.iterator;ht.next();)pt=ht.value,pt instanceof Cn&&pt.canCopy()&&(yt=x.I(pt),yt!==null&&(yt.points=pt.points,th(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,th(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}zi.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},zi.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Me},He.Object.defineProperties(zi.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}}}),zi.prototype.getDraggingSource=zi.prototype.Az;var Fo=null,Du=null;zi.className="DraggingTool",Ul=new wn,mr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Fi.prototype.doCancel=function(){Fo!==null&&Fo.doCancel(),Qr.prototype.doCancel.call(this)};function qi(){Qr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Cn,y=new kr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new kr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Ln,y=new kr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=yi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Ln,y=new kr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=yi,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 or,this.Of=this.gj=this.Pf=null}Ve(qi,Qr),qi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},qi.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var et=y.Df(),nt=Mn.alloc();nt.width=y.naturalBounds.width*et,nt.height=y.naturalBounds.height*et,b.desiredSize=nt,Mn.free(nt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=ei,et=Me.alloc(),x.location=y.ga(ei,et),Me.free(et),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},qi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=yi,y.fromSpot=Wr,y.toSpot=Wr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},qi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},qi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Ln){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)}},qi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Ln))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Ln)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},qi.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 Ln){var ht=nt.ga(ei,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 Ln&&(x.layer===null||x.layer.allowLink))?y:null},qi.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},qi.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},qi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},qi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Ln))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Ln))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},qi.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)},qi.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 Sn;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))))}qi.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!==gf){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!ga(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!ga(this,a,y,x,!0)}if(b===jp)return a===y?a=!0:(b=new Sn,b.add(y),a=ma(this,b,a,y,x)),!a;if(b===Op)return!ga(this,a,y,x,!1);if(b===Fp)return a===y?a=!0:(b=new Sn,b.add(y),a=fc(this,b,a,y,x)),!a}return!0};function ga(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&&ga(a,nt,x,b,E)))return!0}return!1}function ma(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&&ma(a,y,nt,b,E)))return!0}return!1}function fc(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&&fc(a,y,st,b,E))return!0}}return!1}He.Object.defineProperties(qi.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}}}),qi.className="LinkingBaseTool";function va(){qi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ch,this.Xd=null}Ve(va,qi),va.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},va.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 Ln)))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},va.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 Ln&&(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 Ln&&(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)},va.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()},va.prototype.doStop=function(){qi.prototype.doStop.call(this),this.startObject=null},va.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 Ln&&(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)}}},va.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Cn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},va.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},va.prototype.doNoLink=function(){},He.Object.defineProperties(va.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 an(va,"Either",0),_g=new an(va,"ForwardsOnly",0),zg=new an(va,"BackwardsOnly",0);va.className="LinkingTool",va.Either=Ch,va.ForwardsOnly=_g,va.BackwardsOnly=zg;function ds(){qi.call(this),this.name="Relinking";var a=new kr;a.figure="Diamond",a.desiredSize=Zi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new kr,a.figure="Diamond",a.desiredSize=Zi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}Ve(ds,qi),ds.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},ds.prototype.makeAdornment=function(a,y){var x=new $r;return x.type=xn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ds.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},ds.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 $r&&x.adornedPart instanceof Cn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=xr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=xr),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},ds.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===eh)&&(x=Ca),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}},ds.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()},ds.prototype.doStop=function(){qi.prototype.doStop.call(this),this.handle=null},ds.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 Ln&&(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()}}},ds.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},ds.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)}He.Object.defineProperties(ds.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 $r))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ds.className="RelinkingTool",mr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),mr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function oo(){Qr.call(this),this.name="LinkReshaping";var a=new kr;a.figure="Rectangle",a.desiredSize=Qi,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new kr,a.figure="Diamond",a.desiredSize=Zi,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 wn}Ve(oo,Qr),oo.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:op},oo.prototype.om=function(a,y){a.reshapingBehavior=y},oo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},oo.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new $r,E.type=xn.Link,x=y.firstPickIndex;var et=y.lastPickIndex,nt=b?1:0;if(y.resegmentable&&y.computeCurve()!==ys)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);Ue.B(ht.x,pt.x)&&Ue.B(ht.y,pt.y)&&(pt=y.i(x-1)),Ue.B(ht.x,pt.x)?(this.om(st,Ru),st.cursor="n-resize"):Ue.B(ht.y,pt.y)&&(this.om(st,Iu),st.cursor="w-resize")}else nt===et-1&&b?(ht=y.i(et-1),pt=y.i(et),Ue.B(ht.x,pt.x)&&Ue.B(ht.y,pt.y)&&(ht=y.i(et+1)),Ue.B(ht.x,pt.x)?(this.om(st,Ru),st.cursor="n-resize"):Ue.B(ht.y,pt.y)&&(this.om(st,Iu),st.cursor="w-resize")):nt!==et&&(this.om(st,Xf),st.cursor="move");E.add(st)}E.adornedObject=a}return E},oo.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},oo.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},oo.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},oo.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Cn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},oo.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},oo.prototype.stopTransaction=function(){var a=this.diagram,y=Qr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},oo.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},oo.prototype.getResegmentingPoint=function(){return this.handle.ga(ei)},oo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},oo.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&&(Bu(this,nt,b,E,et,!0)||Bu(this,nt,b,E,et,!1))){var st=y.points.copy();Bu(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&&(Bu(this,b,E,et,nt,!0)||Bu(this,b,E,et,nt,!1))&&(st=y.points.copy(),Bu(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(),Ue.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 Bu(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}oo.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===Ru?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Iu&&(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===Ru?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Iu&&(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);Ue.B(et.x,E.x)&&Ue.B(E.y,nt.y)?(Ue.B(et.x,y.i(b-2).x)&&!Ue.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),Ue.B(nt.y,y.i(b+2).y)&&!Ue.B(nt.x,y.i(b+2).x)?y.m(b+1,nt.x,a.y):y.L(b+1,nt.x,a.y)):Ue.B(et.y,E.y)&&Ue.B(E.x,nt.x)?(Ue.B(et.y,y.i(b-2).y)&&!Ue.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),Ue.B(nt.x,y.i(b+2).x)&&!Ue.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ue.B(et.x,E.x)&&Ue.B(E.x,nt.x)?(Ue.B(et.x,y.i(b-2).x)&&!Ue.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),Ue.B(nt.x,y.i(b+2).x)&&!Ue.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ue.B(et.y,E.y)&&Ue.B(E.y,nt.y)&&(Ue.B(et.y,y.i(b-2).y)&&!Ue.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),Ue.B(nt.y,y.i(b+2).y)&&!Ue.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(ei,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(ei,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()},oo.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Xf:return a;case Ru:return new Me(y.i(x).x,a.y);case Iu:return new Me(a.x,y.i(x).y);default:case op:return y.i(x)}},He.Object.defineProperties(oo.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 $r))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}}}),oo.prototype.setReshapingBehavior=oo.prototype.om,oo.prototype.getReshapingBehavior=oo.prototype.Ru;var op=new an(oo,"None",0),Iu=new an(oo,"Horizontal",1),Ru=new an(oo,"Vertical",2),Xf=new an(oo,"All",3);oo.className="LinkReshapingTool",oo.None=op,oo.Horizontal=Iu,oo.Vertical=Ru,oo.All=Xf,mr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function $o(){Qr.call(this),this.name="Resizing",this.o=new Mn(1,1).freeze(),this.j=new Mn(9999,9999).freeze(),this.yg=new Mn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new kr;a.alignmentFocus=ei,a.figure="Rectangle",a.desiredSize=Qi,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 Mn,this.Tn=new Me,this.rt=new Mn(0,0),this.qt=new Mn(1/0,1/0),this.pt=new Mn(1,1)}Ve($o,Qr),$o.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Cn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),Gh(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},$o.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new $r,y.type=xn.Spot,y.locationSpot=ei;var x=new Pa;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,vi)),y.add(this.makeHandle(a,hs)),y.add(this.makeHandle(a,ja)),y.add(this.makeHandle(a,Na)),y.add(this.makeHandle(a,Oa)),y.add(this.makeHandle(a,Go)),y.add(this.makeHandle(a,Qo)),y.add(this.makeHandle(a,Fa))}else if(Ws(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},$o.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},$o.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=ei),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 xn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},$o.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},$o.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))},$o.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},$o.prototype.stopTransaction=function(){var a=this.diagram,y=Qr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},$o.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},$o.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)}},$o.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()},$o.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 Sr){var b=new wn;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()}},$o.prototype.computeResize=function(a,y,x,b,E,et){y.Mc()&&(y=ei);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 _t=nt.height;0>=Mt&&(Mt=1),0>=_t&&(_t=1),Mt=_t/Mt}return _t=Me.alloc(),Ue.No(a.x,a.y,st,ht,E.width,E.height,_t),a=nt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(_t.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(_t.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(_t.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(_t.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(_t.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(_t.x-st,b.width),x.width),a.y=Math.max(_t.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(_t.x-st,b.width),x.width),a.height=Math.max(Math.min(_t.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(_t.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(_t.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(_t.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(_t),a},$o.prototype.computeReshape=function(){var a=pn;return this.adornedObject instanceof kr&&(a=k0(this.adornedObject)),!(a===Hn||this.diagram.lastInput.shift)},$o.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},$o.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},$o.prototype.computeCellSize=function(){var a=new Mn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},He.Object.defineProperties($o.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 $r))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 $r)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}}}),$o.className="ResizingTool",mr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function ya(){Qr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Me,this.ue=null;var a=new kr;a.figure="Ellipse",a.desiredSize=Zi,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}Ve(ya,Qr),ya.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)}},ya.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new $r,y.type=xn.Position,y.locationSpot=ei;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ws(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ya.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},ya.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)},ya.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(ei)},ya.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)},ya.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},ya.prototype.stopTransaction=function(){var a=this.diagram,y=Qr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ya.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},ya.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},ya.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()},ya.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()}},ya.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},He.Object.defineProperties(ya.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 $r))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 $r)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}}}),ya.className="RotatingTool",mr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function kh(){Qr.call(this),this.name="ClickSelecting"}Ve(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 Rs(){Qr.call(this),this.name="Action",this.pk=null}Ve(Rs,Qr),Rs.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},Rs.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()},Rs.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))}},Rs.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()},Rs.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())},Rs.prototype.doStop=function(){this.pk=null},Rs.className="ActionTool";function _u(){Qr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Me(0,0)}Ve(_u,Qr),_u.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)},_u.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},_u.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()&&(Ws(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);sn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var 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},He.Object.defineProperties(_u.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}}}),_u.className="ClickCreatingTool";function bs(){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 kr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ve(bs,Qr),bs.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))},bs.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},bs.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},bs.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=Mn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Mn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},bs.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()},bs.prototype.computeBoxBounds=function(){var a=this.diagram;return new on(a.firstInput.documentPoint,a.lastInput.documentPoint)},bs.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Rr?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 wn,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)}},He.Object.defineProperties(bs.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}}}),bs.className="DragSelectingTool";function Ho(){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(yn.document,"scroll",a.Kw,!1),a.stopTool()}}Ve(Ho,Qr),Ho.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},Ho.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(yn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ho.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ho.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ho.prototype.doMouseMove=function(){this.move()},Ho.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ho.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},He.Object.defineProperties(Ho.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ho.className="PanningTool",mr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),mr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),mr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),mr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),mr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ml(){this.F=this.u=this.j=this.o=null}He.Object.defineProperties(Ml.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}}}),Ml.className="HTMLInfo";function _s(a,y,x){this.text=a,this.hx=y,this.visible=x}_s.className="ContextMenuButtonInfo";function Sa(){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()}}Ve(Sa,Qr);function $s(a){var y=new Ml;y.show=function(E,et,nt){nt.showDefaultContextMenu()},y.hide=function(E,et){et.hideDefaultContextMenu()},Eh=y,a.tu=function(){a.stopTool()},y=Dn("div");var x=Dn("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=Dn("style");yn.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",ao,!1),b.addEventListener(y,"selectstart",ao,!1),b.addEventListener(x,"contextmenu",ao,!1)),y.className="goCXforeground",x.className="goCXbackground",yn.document.body&&(yn.document.body.appendChild(y),yn.document.body.appendChild(x)),$c=y,dc=x,Qc=!0}function ao(a){return a.preventDefault(),!1}Sa.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)},Sa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Sa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Sa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof qe||(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},Sa.prototype.doActivate=function(){},Sa.prototype.doMouseDown=function(){if(Qr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof $r){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&cl(this)},Sa.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof $r){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}cl(this)};function cl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ml||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(hu(a,!0),a.isActive||a.stopTool())}Sa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function hu(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 $r&&!a.currentContextMenu.visible&&a.stopTool()}}Sa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Sa.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof $r){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 Ml&&a.show(y,x,this);this.currentContextMenu=a},Sa.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}},Sa.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof $r?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ml&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function zu(a){var y=new wn;return y.add(new _s("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new _s("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new _s("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new _s("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new _s("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new _s("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new _s("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new _s("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new _s("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new _s("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new _s("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new _s("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new _s("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Sa.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=zu(this)),$c.innerHTML="",dc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Dn("ul");x.className="goCXul",$c.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=Dn("li"),et.className="goCXli";var nt=Dn("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)}}$c.style.display="block",dc.style.display="block"},Sa.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Eh){$c.style.display="none",dc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(dc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},He.Object.defineProperties(Sa.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof $r?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&Eh===null&&Ki&&$s(this),Eh},set:function(a){a===null&&(Qc=!0),Eh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Eh=null,Qc=!1,dc=null,$c=null;Sa.className="ContextMenuTool",mr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ei(){Qr.call(this),this.name="TextEditing",this.Zh=new wi,this.ia=null,this.V=pc,this.vj=null,this.qa=gc,this.u=1,this.F=!0,this.o=null,this.j=new Ml,this.kt=null,qc(this,this.j)}Ve(Ei,Qr);function qc(a,y){if(Ki){var x=Dn("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(tf)):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!==gc){var b=a.kt;a.qa===ef&&(a.qa=nf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==gc){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 wi&&et instanceof Ei)if(et.state===rf)x.style.border="3px solid red",x.focus();else{var nt=b.ga(ei),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,_t=(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=(_t-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)}}}Ei.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Gu&&Gu!==this&&(Gu.acceptText(Tl),Gu&&Gu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof wi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===pc&&!y.isSelected||this.starting===Qf&&2>a.lastInput.clickCount)):!1},Ei.prototype.doStart=function(){Gu=this,this.textBlock!==null&&this.doActivate()},Ei.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof wi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ef;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new on(this.textBlock.ga(vi),this.textBlock.ga(ja));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ei.prototype.doCancel=function(){this.stopTool()},Ei.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ei.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Tl)},Ei.prototype.acceptText=function(a){switch(a){case Tl:this.qa===mc?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ef||this.qa===rf||this.qa===nf)&&(this.qa=sp,ap(this));break;case Yf:case tf:case Jf:(tf!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ef||this.qa===rf||this.qa===nf)&&(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=mc,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=rf,a.doError(E,et))}}Ei.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},Ei.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ei.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=gc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ei.prototype.doStop=function(){Gu=null},Ei.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Ei.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},He.Object.defineProperties(Ei.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),Ei.prototype.measureTemporaryTextBlock=Ei.prototype.Lx;var Yf=new an(Ei,"LostFocus",0),Tl=new an(Ei,"MouseDown",1),Jf=new an(Ei,"Tab",2),tf=new an(Ei,"Enter",3),t0=new an(Ei,"SingleClick",0),pc=new an(Ei,"SingleClickSelected",1),Qf=new an(Ei,"DoubleClick",2),gc=new an(Ei,"StateNone",0),ef=new an(Ei,"StateActive",1),nf=new an(Ei,"StateEditing",2),sp=new an(Ei,"StateValidating",3),rf=new an(Ei,"StateInvalid",4),mc=new an(Ei,"StateValidated",5),Gu=null;Ei.className="TextEditingTool",Ei.LostFocus=Yf,Ei.MouseDown=Tl,Ei.Tab=Jf,Ei.Enter=tf,Ei.SingleClick=t0,Ei.SingleClickSelected=pc,Ei.DoubleClick=Qf,Ei.StateNone=gc,Ei.StateActive=ef,Ei.StateEditing=nf,Ei.StateValidating=sp,Ei.StateInvalid=rf,Ei.StateValidated=mc,mr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function es(a){af||(lp(),af=!0),this.H=Hl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=fu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Sn,this.ce=new Vo,this.ce.Yd=this,this.Ei=new Sn,this.pu=new Sn,this.Sr=new Sn,this.pr=new Sn,a&&Object.assign(this,a)}es.prototype.Xe=function(a){this.H=a},es.prototype.canStart=function(){return!0};function Wl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ko(a.H),a.zb=!0)}function $f(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===fu?(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===sf&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),lf(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),yn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(x),pp(x),a.zb=!1,y.start(),y.bc&&(Uu(a),x.Ya(),hp(y,0),Cs(x,!0),Mh(a),x.R("AnimationStarting",a)))}))}}function cu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function qf(a,y,x,b){a.isTicking||cu(a)||y instanceof Cn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}$t=es.prototype,$t.fv=function(a){return this.ce.fv(a)},$t.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 qe){st=!0;break t}}st=!1}st?uf(nt,!1):nt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Uu(E),Cs(E.H),Mh(E)),yn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),yn.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Uu(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}$t.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(),lf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),lf(y,this.H)},$t.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))},$t.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Wa(this,a))},$t.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Wu(this.ce,y,"position",y.position,y.position),Wa(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||cu(a)||(a.H.pi||(y=x.copy()),Wu(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 or;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)}),of=y}He.Object.defineProperties(es.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&&En(a,">= 1",es,"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}}}),es.prototype.stopAnimation=es.prototype.Cc;var of=null,af=!1,fu=new an(es,"Default",1),sf=new an(es,"AnimateLocations",2),up=new an(es,"None",3);es.className="AnimationManager",es.defineAnimationEffect=function(a,y){af||(lp(),af=!0),of.add(a,y)},es.Default=fu,es.AnimateLocations=sf,es.None=up;function Vo(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=vc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ji,this.vc=new or,this.Tt=new or,this.yl=new Sn,this.Ut=new Sn,this.dw=Ku,a&&Object.assign(this,a)}Vo.prototype.suspend=function(){this.Xk=!0},Vo.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,uf(this,!0),Uu(this.Yd),Cs(this.H),Mh(this.Yd),this.H.redraw()};function lf(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}$t=Vo.prototype,$t.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 qe?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===fu&&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=mf),Uu(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)},$t.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},$t.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof qe?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 Wu(this,a,y,x,b,E),this};function Wu(a,y,x,b,E,et){var nt=a.vc;if(y instanceof qe&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(mu(b),s0(),b=[vs.j,vs.u,vs.o,vs.F],mu(E),s0(),E=[vs.j,vs.u,vs.o,vs.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 Mn?a.copy():a}$t.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},$t.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function uf(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),Uu(x),hp(a,E),Cs(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=of,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)}}}$t.stop=function(){return this.bc?(this.Ml(!0),this):this},$t.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,Uu(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=of;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 _t=Mt;!st.Hu||_t!=="position:nodeCollapse"&&_t!=="position:placeholder"||(_t="position"),et.get(_t)(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(),hf(y,!1),y.Ya(),y.N(),Cs(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()}Cs(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),lf(this,null),x.Ml(this),y.$b())}},$t.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Sr&&(b=y.placeholder),b!==null?(x=b.ga(vi),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 Sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Ln&&this.Cj(b,y)},$t.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Sr&&(x=y.placeholder),x!==null){var b=x.ga(vi);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 Sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Ln&&this.Aj(b,y)}},$t.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},He.Object.defineProperties(Vo.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&En(a,">= 1",Vo,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:Oe("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),Vo.prototype.getTemporaryState=Vo.prototype.Ez,Vo.prototype.stop=Vo.prototype.stop,Vo.prototype.add=Vo.prototype.add,Vo.prototype.addTemporaryPart=Vo.prototype.Iy;function vc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Vo.className="Animation",Vo.EaseLinear=function(a,y,x,b){return x*a/b+y},Vo.EaseInOutQuad=vc,Vo.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Vo.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Vo.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Vo.EaseOutExpo=Wg;function Ah(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ah.className="AnimationState";function tl(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))}tl.prototype.copy=function(){var a=new tl(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))}He.Object.defineProperties(tl.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 an(tl,"Default",1),Nh=new an(tl,"Immediate",2),yc=new an(tl,"Bundled",3);tl.className="AnimationTrigger",tl.Default=cp,tl.Immediate=Nh,tl.Bundled=yc;function Ao(a){Jr(this),this.H=null,this.Pa=new wn,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)}$t=Ao.prototype,$t.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ra(x)}a.clear(),this.Zq.length=0},$t.Xe=function(a){this.H=a},$t.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 Sr?E++:ht instanceof Ln?b++:ht instanceof Cn?et++:ht instanceof $r?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&&oi(b)&&(st+=" #"+oi(b)),x instanceof Ln?st+=" "+rr(b):x instanceof Cn&&(st+=" "+rr(x.fromNode)+" "+rr(x.toNode));return y+" "+this.Pa.count+": "+st},$t.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),Br(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},$t.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof wn||b instanceof Sn||(b=new Sn),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),Br(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},$t.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 wn||E instanceof Sn||(E=new Sn),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},$t.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},$t.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 wn||E instanceof Sn)&&(et=E),E=!0),et instanceof wn||et instanceof Sn||(et=new Sn),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),Br(st,Mt.oe),ht.h(a.x+y,a.y),Br(ht,Mt.oe);var _t=Mt;Mt.og(st,ht,x,b,E,et)&&(x!==null&&(_t=x(_t)),_t===null||b!==null&&!b(_t)||et.add(_t))}}return Me.free(st),Me.free(ht),et},$t.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Xn();for(var E=Xn(),et=0;et<b;et++){var nt=x[et];if(nt.vw=et,nt instanceof Cn){if(nt.fd===!1)continue}else if(nt instanceof $r&&nt.adornedPart!==null)continue;var st=nt.actualBounds;nt.isVisible()&&_l(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]);In(a),In(E)}}};function du(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}$t.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=du(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=du(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}}}$t.Oj=function(a,y,x,b,E,et,nt){if(nt&&!Gh(y))a.Hs(y);else{if(b!==null&&y instanceof Cn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(nt=!1,b=y.containingGroup;b!==null;)nt?b.tb!==null&&et.Ex(b.tb):b.tb!==null&&(nt=!0,et.assign(b.tb)),b=b.containingGroup;var st=y.actualBounds;if(b=!1,nt&&y.isVisible()){if(!et.Yc(st)){a.Hs(y);return}b=!et.Re(st)}b&&(a.save(),a instanceof ns?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&&(Yi(y,a,y.areaBackground,!0,!0,et,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Yi(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),Yi(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))}},$t.g=function(a,y,x,b,E){var et=this.diagram;et!==null&&et.cb(Di,a,this,y,x,b,E)},$t.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ra(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},$t.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,ra(y),a};function nd(a,y,x){if(y=Kg(a,y,x),x instanceof Sr&&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}He.Object.defineProperties(Ao.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===""&&Oe("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Oe("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)&&En(a,"0 <= value <= 1",Ao,"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))}}}),Ao.prototype.findObjectsNear=Ao.prototype.og,Ao.prototype.findObjectsIn=Ao.prototype.Cf,Ao.prototype.findObjectsAt=Ao.prototype.ji,Ao.prototype.findObjectAt=Ao.prototype.ic,Ao.className="Layer";function qe(a,y){if(am||(ea(),am=!0),Jr(this),Hl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ki){var x=this,b=function(){x.removeEventListener(yn.document,"DOMContentLoaded",b,!1),x.setRTL()};yn.document.body!==null?this.setRTL():x.addEventListener(yn.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 Ni,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"||yn.Element&&a instanceof Element?dp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var jh,Hl;function Zg(a){a.Yd=new es,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new wn,a.pj=new or,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 Cr,a.zu=new Me(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ar(0,0,0,0).freeze(),a.sj=Ku,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ua,a.zk=Lo,a.Fg=ua,a.pq=Lo,a.yt=vi,a.Bt=vi,a.Fc=!0,a.pn=!1,a.De=new Sn,a.Eh=new or,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ar(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 Sn,a.Ht=!0,a.uu=Zu,a.pw=!1,a.wu=gf,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 or,a.Xn=new wn,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 Ar(5).freeze(),a.Hw=new Sn().freeze(),a.Nt=999999999,a.nw=new Sn().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 Sn,a.ow=new Sn,a.Xh=null,a.aw=new Mn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Me,bounds:new on,Py:new Mn,bA:new Mn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new on(NaN,NaN,NaN,NaN).freeze(),a.wo=new Mn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new or;var y=new Ln,x=new wi;x.bind(new so("text","",rr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Ln,x=new wi,x.stroke="brown",x.bind(new so("text","",rr)),y.add(x),a.Lg.add("Comment",y),y=new Ln,y.selectable=!1,y.avoidable=!1,x=new kr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Mn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new or,y=new Sr,y.selectionObjectName="GROUPPANEL",y.type=xn.Vertical,x=new wi,x.font="bold 12pt sans-serif",x.bind(new so("text","",rr)),y.add(x),x=new xn(xn.Auto),x.name="GROUPPANEL";var b=new kr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Pa,b.padding=new Ar(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new or,y=new Cn,x=new kr,x.isPanelMain=!0,y.add(x),x=new kr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Cn,x=new kr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new $r,y.type=xn.Auto,x=new kr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Pa,x.margin=new Ar(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new $r,y.type=xn.Link,x=new kr,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 Fi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ct,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=Oi,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}qe.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),kc=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 Sn().freeze(),a.nw=new Sn().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(),pi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),et}function Xg(){return null}qe.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),Al(this),this.Wg=!0,Yg(this),this.layout=new Ni,this.Wg=!1,this.model=cy(),this.model.undoManager=new _i,this.vb=this.rn=!1,this.N()},qe.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=yn.document.body);var y=Dn("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},qe.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=yn.document.body);var y=0;if(Ki){var x=om;y=jh,x===null&&(x=om=Dn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=jh=Dn("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||Rr||(y=11)}this.Db=y,this.Gw=!0},qe.prototype.qb=function(a){a.classType===qe&&(this.autoScale=a)},qe.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(Ki){if(y!=null||Oe("Diagram setup requires an argument DIV."),a.Ka!==null&&Oe("Diagram has already completed setup."),typeof y=="string"?a.Ka=yn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Oe("No DIV or DIV id supplied: "+y),a.Ka===null&&Oe("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Oe("Invalid div id; div already has a Diagram associated with it."),!a.ol&&yn.ResizeObserver){var x=en(function(){a.$b()},250);a.ol=new yn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}yn.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=yn.go;var E=new Us(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",yn.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 Us(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ki){E=Dn("div");var et=Dn("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=en(function(){a.Yh=null,a.N()},300),a.Ov=en(function(){pp(a)},250),a.preventDefault=function(nt){return nt.preventDefault(),!1},a.$j=function(nt){if(a.isEnabled){var st=Ps(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(),el(st,nt)}},a.aA=function(nt){a.isEnabled&&(a.Vk=!1,Ps(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),xc(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():el(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=yn.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,xc(a,yt,st),st.targetObject=null,a.doMouseMove(),el(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=yn.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 qe&&pt.H!==a&&xc(pt.H,nt,ht),pt===null&&(pt=nt.target),xc(a,nt,ht),ht.clickCount=a.yq,ht.targetDiagram=vp(nt,pt),ht.targetObject=null,a.doMouseUp(),el(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"+yf[1]+yf[2]+"wI"+Mc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,vf,y,y),b.Vc(!0),e0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}qe.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},qe.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(yn,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function hf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),lr&&lr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}qe.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:yn.devicePixelRatio||1},qe.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},qe.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},qe.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},qe.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},qe.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},qe.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},qe.prototype.doFocus=function(){this.focus()},qe.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=yn.scrollX||yn.pageXOffset,y=yn.scrollY||yn.pageYOffset;this.ta.focus(),yn.scrollTo(a,y)}},qe.prototype.Oy=function(){this.H.R("GainedFocus")},qe.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 Ao;y.name="Background",a.Al(y),y=new Ao,y.name="",a.Al(y),y=new Ao,y.name="Foreground",a.Al(y),y=new Ao,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ao,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ao,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 xn(xn.Grid);y.name="GRID";var x=new kr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new kr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new kr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new kr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new kr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new kr,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):Pc(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Pc(this.H)}qe.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 _t=E.width,Zt=E.height,Jt=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 Pe=Ee;_t<ht||Zt<pt?(Ee=Me.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Pe&&(Ee.x=Pe/E+nt,this.ju=Pe),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(Pe+nt,this.position.y)),yt>Jt&&(this.position=Ee.h(-(y.scrollWidth-this.Aa)+Pe-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,Jt=E.right,et=b.bottom,ie=E.bottom,nt=b.x,Mt=E.x,st=b.y,b=E.y,_t>=ht&&nt>=Mt&&yt<=Jt&&(x.style.width="1px"),Zt>=pt&&st>=b&&et<=ie&&(x.style.height="1px"))}},qe.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Ko(this),gp(this,a)};function gp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,et=0;et<E;et++){var nt=b[et];if(nt.visible&&nt.isInDocumentBounds){nt=nt.Pa.s;for(var st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];pt.isInDocumentBounds&&pt.isVisible()&&(pt=pt.actualBounds,pt.w()&&(x?(x=!1,y.assign(pt)):y.ed(pt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}qe.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(dn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Cn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof Cn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new on(NaN,NaN,0,0):x};function zs(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?Sc(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()?ei:ht),mp(a,a.documentBounds,E,nt,st,y),y=a.scale,a.scale=et,a.vb=!1,et=a.viewportBounds,Ue.B(et.x,x)&&Ue.B(et.y,b)&&Ue.B(et.width,E)&&Ue.B(et.height,nt)||a.onViewportBoundsChanged(new on(x,b,E,nt),et,y,!1)}}function Sc(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===ps?(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}qe.prototype.zoomToFit=function(){var a=this.sj;this.sj=Ku,this.scale=Sc(this,ps),a!==Ku&&(zs(this,!1),mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},$t=qe.prototype,$t.BA=function(a,y){y===void 0&&(y=ps);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ps||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)}},$t.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))},$t.zz=function(a){if(a instanceof ze){this.eq=a;var y=Me.alloc();this.fq=this.op(a.ga(vi,y)),Me.free(y)}else this.eq=null,this.fq=Oi};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(vi,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===Ku)&&(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),Al(a),Me.free(nt)}$t.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Vl(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof tr)return a}else if(a=Vl(this,a,function(x){return x.part}),a instanceof tr)return a;return null},$t.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ko(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Vl(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}$t.lz=function(a,y,x){return y===void 0&&(y=!0),cf(this,a,function(b){return b.part},y?function(b){return b instanceof tr&&b.canSelect()}:null,x)};function cf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof wn||E instanceof Sn||(E=new Sn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var et=a.value;et.visible&&!et.isTemporary&&et.ji(y,x,b,E)}return E}$t.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof wn||b instanceof Sn||(b=new Sn),Ko(this);for(var E=this.Wa.iteratorBackwards;E.next();){var et=E.value;et.visible&&et.ji(a,y,x,b)}return b},$t.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)},$t.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof wn||E instanceof Sn||(E=new Sn),Ko(this);for(var et=this.Wa.iteratorBackwards;et.next();){var nt=et.value;nt.visible&&nt.Cf(a,y,x,b,E)}return E},$t.Nu=function(a,y,x,b,E,et){var nt=new Sn;Ko(this);for(var st=this.Wa.iteratorBackwards;st.next();){var ht=st.value;ht.visible&&ht.Nu(a,y,x,b,nt,E,et)}return nt};function rd(a,y,x,b,E){var et=null;for(et===void 0&&(et=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof wn||E instanceof Sn||(E=new Sn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var nt=a.value;nt.visible&&!nt.isTemporary&&nt.Cf(y,et,x,b,E)}return E}$t.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),ff(this,a,y,function(et){return et instanceof tr&&(!b||et.canSelect())},x,E)},$t.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 wn||E instanceof Sn)&&(et=E),E=!0),et instanceof wn||et instanceof Sn||(et=new Sn),Ko(this);for(var nt=this.Wa.iteratorBackwards;nt.next();){var st=nt.value;st.visible&&st.og(a,y,x,b,E,et)}return et};function ff(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 wn||E instanceof Sn)&&(et=E),E=!0),et instanceof wn||et instanceof Sn||(et=new Sn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var st=a.value;st.visible&&!st.isTemporary&&st.og(y,x,nt,b,E,et)}return et}qe.prototype.acceptEvent=function(a){return Ps(this,a,a instanceof MouseEvent)};function Ps(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?xc(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),Rr&&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,Rr&&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 el(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}qe.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ps(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(),el(x,a)},qe.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ps(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(),el(x,a)},qe.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ps(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),el(x,a)},qe.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ps(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),el(x,a)},qe.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?Br(new Me(y,a),this.Ab):new Me(y,a)};function xc(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))}}qe.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Ko(a),a.Va()}qe.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},$t=qe.prototype,$t.Pz=function(){return this.kg},$t.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Cs(this),this.hf=!1,this.du=new Me(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Xe(function(){b.ld=!1,Wl(y,"Model"),a(b)},1)},$t.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;yn.requestAnimationFrame(function(){y.kg&&y.bd()})}},$t.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Cs(this))};function Oh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Pc(a)||(y&&Ko(a),x&&zs(a,!1))}function Cs(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];fo(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&&(Ll(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ko(a),et=!1,(!a.hf||a.xh)&&(a.hf?Lp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Lp(a,!1)),et=!0),a.Jk=!1,Ko(a),a.ou||qg(a),Oh(a,!0,!1),nt=!1,et?(x=on.alloc(),x.assign(a.viewportBounds),a.hf||(nt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,xp(a)),a.R("LayoutCompleted"),Oh(a,!0,!1),on.free(x)):x.Ok&&x.Qw&&(a.Fg!==ua?a.scale=Sc(a,a.Fg):a.yh!==ua?a.scale=Sc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),zs(a,!0)),et&&nt&&a.eb("Initial Layout"),Ko(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function xp(a){if(a.Fg!==ua)a.scale=Sc(a,a.Fg);else if(a.yh!==ua)a.scale=Sc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}zs(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Ll(a)}function Ko(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Sn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Sr&&b.U&65536&&(b.U=b.U^65536)})}}$t.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Sr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Sr&&x.isVisible()&&df(this,x);for(a.reset();a.next();)x=a.value,x instanceof Cn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof $r&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function df(a,y){for(var x=Xn(),b=Xn(),E=y.memberParts;E.next();){var et=E.value;et.isVisible()&&(et instanceof Sr?(ms(et)||wa(et)||zh(et))&&df(a,et):et instanceof Cn?et.fromNode===y||et.toNode===y?b.push(et):x.push(et):(et.measure(1/0,1/0),et.arrange()))}for(a=x.length,E=0;E<a;E++)et=x[E],et.measure(1/0,1/0),et.arrange();for(In(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();In(b)}$t.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},$t.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Oe("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){bc(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),Hu(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?Tc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Cr.prototype.Cd=Cr.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(et=this.animationManager,!et.zb&&(!et.isAnimating||et.isTicking)&&(x=new Date,bc(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),Hu(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?Tc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Cr.prototype.Cd=Cr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=lr&&lr.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&&Oe("No canvas specified"),nt===void 0&&(nt=null),st===void 0&&(st=null),ht===void 0&&(ht=!1),pt===void 0&&(pt=!1),bc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var yt=a.Ca;a.Ca=E;var Mt=a.Wa.s,_t=Mt.length;try{var Zt=new on(et.x,et.y,b.width/E,b.height/E),Jt=Zt.copy();Jt.Co(x),Ll(a,Jt),Ko(a),a.Fd(Mt,_t,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=Cr.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 ns&&Yy(y,Ee.m11,Ee.m12,Ee.m21,Ee.m22,Ee.dx,Ee.dy),Cr.free(Ee),Hu(a,y),y.globalAlpha=a.pb;var Pe=a.Qj("Grid");if(nt){var Ne=new Sn,je=nt.iterator;for(je.reset();je.next();){var De=je.value;De instanceof tr&&(pt||De.layer!==Pe)&&(De.Gj(),Ne.add(De))}for(pt=0;pt<_t;pt++)Vg(Mt[pt],y,a,Ne,ht);Ne.each(function(Je){return Je.Gj()})}else for(Ne=0;Ne<_t;Ne++){var _e=Mt[Ne];_e===Pe?pt&&_e.gc(y,a,!0):_e.gc(y,a,ht)}a.$i=!1,a.Yf&&Tc(a.Yf,a)&&a.Vp()}finally{a.Ca=yt,a.ib.Vc(!0),a.vd=!0,a.Fd(Mt,_t,a,a.viewportBounds),Ll(a),a.ib instanceof ns&&(a.ib.Nj.PA(),a.redraw())}}}$t.Gf=function(a){return this.Rg[a]},$t.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},$t.Tx=function(){this.Rg=new fr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Rr||Si),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Hu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}$t.Ql=function(a){return this.on[a]},$t.sA=function(a,y){this.on[a]=y},$t.Sx=function(){this.on=new fr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},$t.set=function(a){return Object.assign(this,a),this},$t.Du=function(a){return this.nm(a)},$t.nm=function(a){return wc(this,a),this};function wc(a,y){var x=a instanceof xn,b=a instanceof qe,E;for(E in y){E===""&&Oe("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])),sn(et)?nt=E.substr(st+1):Oe("Unable to find object named: "+ht+" in "+a.toString()+" when trying to set property: "+E)}}if(nt[0]!=="_"&&!sr(et,nt))if(b&&nt==="ModelChanged"){a.Yw(y[nt]);continue}else if(b&&nt==="Changed"){a.Pe(y[nt]);continue}else if(b&&sr(a.toolManager,nt))et=a.toolManager;else if(b&&nm(a,nt)){a.Bj(nt,y[nt]);continue}else if(a instanceof Kn&&nt==="Changed"){a.Pe(y[nt]);continue}else Oe('Trying to set undefined property "'+nt+'" on object: '+et.toString());et[nt]=y[E],nt[0]==="_"&&et instanceof ze&&et.Vw(nt)}}$t.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new or,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},$t.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")},qe.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!==mf&&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 Nl)))){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),_t=Math.floor(E-yt),Zt=Math.floor(st-Mt);a.drawImage(b.Oa,yt,Mt,_t,Zt,0,0,_t,Zt),Tc(this.Yf,this)&&a.clearRect(0,0,ht,pt),b=Xn(),a=Xn(),Zt=Math.abs(et),_t=Math.abs(y);var Jt=yt===0?0:E-Zt;yt=Me.allocAt(Jt,0),Zt=Me.allocAt(Zt+Jt,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),Br(yt,ie),Br(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))),Jt=Mt===0?0:st-_t,yt.h(0,Jt),Zt.h(E,_t+Jt),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))),Br(yt,ie),Br(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))),Tc(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))),Br(yt,ie),Br(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&&Oe("No div specified"),this.ta===null&&Oe("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(bc(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),Hu(this,E),E.globalAlpha=this.pb,st=0;st<et;st++)if(nt=y[st],ht=b,nt.visible&&nt.pb!==0){pt=du(nt,E),Mt=nt.Zq,Mt.length=0,yt=this.scale,_t=on.alloc(),Zt=nt.Pa.s,ie=Zt.length,Jt=ht.length;for(var Ee=0;Ee<ie;Ee++){var Pe=Zt[Ee],Ne=Dc(Pe,Pe.actualBounds);t:{for(var je=2/yt,De=4/yt,_e=0;_e<Jt;_e++){var Je=ht[_e];if(Je.width!==0&&Je.height!==0&&Ne.Vu(Je.x-je,Je.y-je,Je.width+De,Je.height+De)){Ne=!0;break t}}Ne=!1}Ne&&nt.Oj(E,Pe,this,Mt,yt,_t,!0)}on.free(_t),E.globalAlpha=pt}E.restore(),E.Vc(!0),this.Yf&&Tc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}In(b),In(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),hf(this,!0))}else x?(Ba(this),this.bd(),hf(this,!0)):this.bd()}};function bc(a){a.pn!==!1&&(a.pn=!1,wp(a,a.Aa,a.ya))}function wp(a,y,x){Al(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Pc(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,_t=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,Al(a)),!a.hf||!a.viewportBounds.w())return!0;var Jt=a.ku,ie=a.hu;if(a.Ee=!1,!(et||a.gf||a.Be||a.mn||a.nn))return!0;var Ee=a.documentBounds,Pe=0,Ne=0,je=0,De=0,_e=yt.width,Je=yt.height,Tn=a.rj;a.contentAlignment.sb()?(Ee.width>_e&&(Pe=Tn.left,Ne=Tn.right),Ee.height>Je&&(je=Tn.top,De=Tn.bottom)):(Pe=Tn.left,Ne=Tn.right,je=Tn.top,De=Tn.bottom);var _n=Ee.width+Pe+Ne,Bn=Ee.height+je+De;Tn=a.scale;var Pn=_n>ht/Tn,fn=Bn>pt/Tn;if(!(et||a.gf||a.Be||Pn||fn))return!0;Pe=Ee.x-Pe,ht=yt.x,Ne=Ee.right+Ne,pt=yt.right+nt,je=Ee.y-je;var yr=yt.y;Ee=Ee.bottom+De,yt=yt.bottom+st;var hr="1px";if(De="1px",a.scrollMode===Ku&&(Pn||fn)&&(Pn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Pn=1,Pe+1<ht&&(Pn=Math.max((ht-Pe)*Tn+a.Aa,Pn)),Ne>pt+1&&(Pn=Math.max((Ne-pt)*Tn+a.Aa,Pn)),_e+nt+1<_n&&(Pn=Math.max((_n-_e)*Tn+a.Aa,Pn)),hr=Pn.toString()+"px"),fn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Pn=1,je+1<yr&&(Pn=Math.max((yr-je)*Tn+a.ya,Pn)),Ee>yt+1&&(Pn=Math.max((Ee-yt)*Tn+a.ya,Pn)),Je+st+1<Bn&&(Pn=Math.max((Bn-Je)*Tn+a.ya,Pn)),De=Pn.toString()+"px")),Pn=hr!=="1px",fn=De!=="1px",Pn&&fn||!Pn&&!fn||(fn&&(pt-=a.Db),Pn&&(yt-=a.Db),_n<_e+nt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(nt=1,Pe+1<ht&&(nt=Math.max((ht-Pe)*Tn+a.Aa,nt)),Ne>pt+1&&(nt=Math.max((Ne-pt)*Tn+a.Aa,nt)),_e+1<_n&&(nt=Math.max((_n-_e)*Tn+a.Aa,nt)),hr=nt.toString()+"px"),Pn=hr!=="1px",nt=a.ya,Pn!==a.Be&&(nt=Pn?a.ya-a.Db:a.ya+a.Db),Bn<Je+st||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(st=1,je+1<yr&&(st=Math.max((yr-je)*Tn+nt,st)),Ee>yt+1&&(st=Math.max((Ee-yt)*Tn+nt,st)),Je+1<Bn&&(st=Math.max((Bn-Je)*Tn+nt,st)),De=st.toString()+"px"),fn=De!=="1px"),a.qr&&Pn===a.Be&&fn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Pn!==a.Be&&(hr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),et=!0),a.Be=Pn,ie.style.width=hr,fn!==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(),fn?(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&&Al(a),a.gf=fn,ie.style.height=De,a.gu=!0,et&&(a.pn=!0),y=Jt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_e+1<_n?y=(a.position.x-Pe)*Tn:Pe+1<ht?y=Jt.scrollWidth-Jt.clientWidth:Ne>pt+1&&(y=a.position.x*Tn)),a.tn)switch(a.bu){case"negative":y=-(Jt.scrollWidth-y-Jt.clientWidth);break;case"reverse":y=Jt.scrollWidth-y-Jt.clientWidth}return Jt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Je+1<Bn?Jt.scrollTop=(a.position.y-je)*Tn:je+1<yr?Jt.scrollTop=Jt.scrollHeight-Jt.clientHeight:Ee>yt+1&&(Jt.scrollTop=a.position.y*Tn)),ht=a.Aa,pt=a.ya,Jt.style.width=ht+(a.gf?a.Db:0)+"px",Jt.style.height=pt+(a.Be?a.Db:0)+"px",x!==ht||b!==pt||a.animationManager.zb?(x=on.allocAt(E,Mt,_t,Zt),a.onViewportBoundsChanged(x,a.viewportBounds,Tn,et),on.free(x),!1):!0}$t=qe.prototype,$t.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Oe("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&&Oe('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(io,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},$t.oi=function(a){this.partManager.oi(a);var y=this;jc(a,function(x){Cc(y,x)}),(a instanceof $r||a instanceof Sr&&a.placeholder!==null)&&a.v(),a.data!==null&&jc(a,function(x){ly(y.partManager,x)}),wa(a)!==!0&&zh(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Dc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Dc(a,a.actualBounds)),this.$b()},$t.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&jc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Dc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Dc(a,a.actualBounds)),this.$b()},$t.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))}$t.Is=function(a,y){if(y===void 0&&(y=!1),dn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new Sn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},$t.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},qe.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 or;if(a!==null)if(dn(a))for(var et=0;et<a.length;et++)Kl(this,E,a[et],x,b);else for(a=a.iterator;a.next();)Kl(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Kl(this,E,a.value,x,b);for(a=this.nodes;a.next();)Kl(this,E,a.value,x,b);for(a=this.links;a.next();)Kl(this,E,a.value,x,b)}Fh(this,E,y,b,x)}};function Kl(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 Ln){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Sr&&(x.placeholder!==null||E.dragsMembers))for(et=x.memberParts;et.next();)Kl(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)&&Kl(a,y,nt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Kl(a,y,x.value,b,E)}else if(x instanceof Cn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Kl(a,y,x.value,b,E);else x instanceof $r||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=Xn(),ht=Xn(),pt=y.iterator,yt=Me.alloc();pt.next();){var Mt=pt.key,_t=pt.value;if(Mt.Zc()){var Zt=Pp(a,Mt,y);Zt!==null?st.push(new rt(Mt,_t,Zt)):(!E||Mt.canMove())&&(Zt=_t.point,et.assign(Zt),a.computeMove(Mt,et.add(nt),b,yt),Mt.location=yt,_t.shifted===void 0&&(_t.shifted=new Me),_t.shifted.assign(yt.re(Zt)))}else pt.key instanceof Cn&&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,_t=0;_t<Mt;_t++){var Jt=ht[_t];if(Zt=Jt.key,Zt instanceof Cn)if(Zt.suspendsRouting){Zt.Tg=null,yt=Zt.fromNode;var ie=Zt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ie=Jt.value.point,Zt.dragComputation===null)y.add(Zt,a.Pd(b,Zt,nt)),th(Zt,nt.x-ie.x,nt.y-ie.y);else{Jt=Me.allocAt(0,0),(yt=Zt.i(0))&&yt.w()&&Jt.assign(yt);var Ee=yt=Me.alloc().assign(Jt).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(Jt),y.add(Zt,a.Pd(b,Zt,yt)),th(Zt,yt.x-ie.x,yt.y-ie.y),Me.free(Jt),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=Jt.value.point,ie=et,ie.assign(E),ie.re(yt),y.add(Zt,a.Pd(b,Zt,E)),th(Zt,ie.x,ie.y)):(Zt.suspendsRouting=!1,Zt.bb()):(Jt=Jt.value.point,yt=yt!==null?E:ie!==null?pt:nt,y.add(Zt,a.Pd(b,Zt,yt)),th(Zt,yt.x-Jt.x,yt.y-Jt.y))}else(Zt.fromNode===null||Zt.toNode===null)&&(yt=Jt.value.point,y.add(Zt,a.Pd(b,Zt,nt)),th(Zt,nt.x-yt.x,nt.y-yt.y))}Me.free(et),Me.free(nt),Me.free(E),Me.free(pt),In(st),In(ht),x||(Ko(a),Dh(a,y))}}qe.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),Ue.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 Cn&&(y.suspendsRouting=!0)}function Dh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Cn&&(x.suspendsRouting=!1,X0(x)&&x.bb())}a.Mr=!1}}function Pp(a,y,x){return y=y.containingGroup,y!==null&&(a=Pp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}$t=qe.prototype,$t.Pd=function(a,y,x){if(x===void 0)return new pu(Ji);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new pu(new Me(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new pu(x.copy())};function Cp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Oe("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Oe("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Oe("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Oe("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&&Oe("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}$t.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(io,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},$t.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(io,"layers",this,null,a,null,et),this.N(),0>b&&this.Ya(),this},$t.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(io,"layers",this,null,a,null,et+1),this.N(),0>b&&this.Ya(),this},$t.kA=function(a){if(a.diagram!==this&&Oe("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()}}},$t.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},$t.Yw=function(a){return this.pf===null&&(this.pf=new wn),this.pf.add(a),this.model.Pe(a),this},$t.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},$t.Pe=function(a){return this.zg===null&&(this.zg=new wn),this.zg.add(a),this},$t.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},$t.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ts&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},$t.cb=function(a,y,x,b,E,et,nt){et===void 0&&(et=null),nt===void 0&&(nt=null);var st=new Ii;st.diagram=this,st.change=a,st.propertyName=y,st.object=x,st.oldValue=b,st.oldParam=et,st.newValue=E,st.newParam=nt,this.ds(st)},$t.g=function(a,y,x,b,E){this.cb(Di,a,this,y,x,b,E)},qe.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(Ai(E,a.propertyName,a.I(y)),E instanceof ze){var et=E.part;et!==null&&et.Wb()}this.isModified=!0}else if(b===io){var nt=a.object,st=a.newParam,ht=a.newValue;if(nt instanceof xn)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 po&&(ht.isRow?c1(nt,st,y?void 0:ht):f1(nt,st,y?void 0:ht));else if(nt instanceof Ao){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 qe?typeof st=="number"&&ht instanceof Ao&&(y?this.Wa.mb(st):(ht.Xe(this),this.Wa.Gb(st,ht))):Oe("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===vo){var Mt=a.object,_t=a.oldParam,Zt=a.oldValue;if(Mt instanceof xn)typeof _t=="number"&&Zt instanceof ze?y?Mt.Gb(_t,Zt):Mt.pc(_t):typeof _t=="number"&&Zt instanceof po&&(Zt.isRow?c1(Mt,_t,y?Zt:void 0):f1(Mt,_t,y?Zt:void 0));else if(Mt instanceof Ao){var Jt=a.newParam===!0;typeof _t=="number"&&Zt instanceof tr&&(y?0>Mt.Pa.indexOf(Zt)&&Mt.oi(_t,Zt,Jt):(Zt.isSelected=!1,Zt.isHighlighted=!1,Zt.Wb(),Mt.pc(Jt?_t:-1,Zt,Jt)))}else Mt instanceof qe?typeof _t=="number"&&Zt instanceof Ao&&(y?(Zt.Xe(this),this.Wa.Gb(_t,Zt)):this.Wa.mb(_t)):Oe("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ts&&Oe("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},qe.prototype.Ea=function(a){return this.undoManager.Ea(a)},qe.prototype.eb=function(a){return this.undoManager.eb(a)},qe.prototype.Kf=function(){return this.undoManager.Kf()},qe.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},qe.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},qe.prototype.rp=function(){this.partManager.rp()};function kp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Al(a),a.N(),a.Ee=!0,b.zb&&(cu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Al(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(Js)?st=0:pt.Hf(_o)&&(st=et-1):st=pt.sb()?pt.x*(et-1):et/2),isNaN(ht)&&(pt.$c()?pt.Hf(Cl)?ht=0:pt.Hf(cs)&&(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,Al(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),zs(a,!1),b.zb&&(cu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}qe.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 Fi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Bg(E,this)),this.vb||this.invalidateViewport(a,y),Ll(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 Ll(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Mn.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/Ue.vx(et,yt):E=E*yt/Ue.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(),Ue.No(a,nt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Mn.free(b),x.part.location=y,Me.free(y)}}qe.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)}},qe.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))},qe.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof tr||Oe("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||Oe("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},qe.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()}},$t=qe.prototype,$t.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},$t.Jz=function(a){a=new Sn().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||Oe("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},$t.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}Oe("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):Oe("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Me.free(et)},$t.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)},$t.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},$t.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)},$t.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,_t=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(_t,Zt),_t=Math.max(_t,Zt),Zt=Math.min(y,a),y=Math.max(y,a),et=Math.min(et,b),_t=Math.max(_t,b),Zt=Math.min(Zt,x),y=Math.max(y,x),et=Math.min(et,nt),_t=Math.max(_t,nt),Zt=Math.min(Zt,E),y=Math.max(y,E),new on(et,Zt,_t-et,y-Zt)},$t.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),Br(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}qe.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ts&&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===ts){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ko(this));var et=this.animationManager;b==="RolledBackTransaction"&&et.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||$f(et),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var nt=a.isTransactionFinished;if(nt&&(tm(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&nt&&this.lastInput.targetDiagram){this.Rt=!0;var st=this;Xe(function(){st.currentTool.standardMouseOver(),st.Rt=!1},10)}}}finally{this.aa=!0}}}};function Cc(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 Sn&&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 Sn&&x.Bg.remove(a),Ed(b));break}}}}}qe.prototype.Wd=function(){this.partManager.Wd()},qe.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},qe.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},qe.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},qe.prototype.Vb=function(a){return this.partManager.Vb(a)},qe.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},$t=qe.prototype,$t.Lc=function(a){return this.partManager.Lc(a)},$t.ii=function(a){return this.partManager.ii(a)},$t.Kc=function(a){return this.partManager.Kc(a)},$t.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Dr(Zn(y)))},$t.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Dr(Zn(y)))};function Al(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),zs(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}$t.Va=function(){if(this.Zi){var a=on.alloc();Tp(this,this.computeBounds(a)),on.free(a)}},$t.rz=function(){for(var a=new Sn,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},$t.qz=function(){return this.ai.iterator},$t.Uz=function(a){Ko(this),a&&ld(this,!0),this.ld?Lp(this,!1):(this.Jk=!0,Cs(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||Wl(et,"Layout")),a.xh=!1;for(var nt=a.ai.iterator;nt.next();)Ap(a,nt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Ko(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||$f(et),a.aa=x}}}function Ap(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Ap(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),df(a,y),E.isValidLayout=!0):a.xh=!0)}}$t.yz=function(){for(var a=new wn,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 wn;x.add(E,nt),x.add(et,nt),b.add(E,E),b.add(et,E)}var x=new or,b=new or;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;Oe("Unknown DiagramEvent name: "+y)}$t.Bj=function(a,y){return a=ud(this,a),a!==null&&a.add(y),this},$t.am=function(a,y){a=ud(this,a),a!==null&&a.remove(y)},$t.R=function(a,y,x){var b=ud(this,a),E=new Au;if(E.diagram=this,a=nm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function hd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}$t.Yj=function(a,y){return cd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},qe.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 Ln&&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(nh,x,y+1);else for(var nt=x;nt<=y;nt++)et[nt]=nh}else if(y instanceof Sr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Ln&&fd(a,E,x,b)}}function Vu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}qe.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=Xe(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))}qe.prototype.ug=function(){this.vk!==-1&&(yn.clearTimeout(this.vk),this.vk=-1)},qe.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(Ji)||(y=new Me(y.x+et.x/E,y.y+et.y/E)),on.free(b),Me.free(et),y},$t=qe.prototype,$t.Cs=function(){return null},$t.av=function(){return null},$t.bs=function(a,y){this.pj.add(a,y)},$t.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Sr&&(y.$p=null)})};function pf(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):yn.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 yn.requestAnimationFrame(function(){b()}),null}$t.Wz=function(a){return Ki?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},$t.Jx=function(a){return a===void 0&&(a={}),pf(this,this.Xz,a)},$t.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 Mc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Mc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Oe('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"&&Oe("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 Mn(1/0,1/0):new Mn(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 _t=y.document||document,Zt=y.elementFinished||null,Jt=y.showTemporary;Jt===void 0&&(Jt=!Mt),y=y.showGrid,y===void 0&&(y=Jt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pt=="number"?pt=new Ar(pt):pt instanceof Ar||Oe("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 Us(null,_t,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=_t,b.hs=Zt,id(a,b.context,pt,new Mn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Jt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Mn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Jt,y),a.Xm=!0,Mt.context);var Ee=a.Pp,Pe=a.documentBounds.copy();if(Pe.Fv(a.yb),Jt)for(var Ne=a.Wa.s,je=Ne.length,De=0;De<je;De++){var _e=Ne[De];if(_e.visible&&_e.isTemporary){_e=_e.Pa.s;for(var Je=_e.length,Tn=0;Tn<Je;Tn++){var _n=_e[Tn];_n.isInDocumentBounds&&_n.isVisible()&&(_n=_n.actualBounds,_n.w()&&Pe.ed(_n))}}}if(Ne=new Me(Pe.x,Pe.y),ht!==null){for(je=new on(0,0,0,0),De=!0,_e=ht.iterator,_e.reset();_e.next();)Je=_e.value,Je instanceof tr&&(Tn=Je.layer,Tn!==null&&!Tn.visible||Tn!==null&&!Jt&&Tn.isTemporary||!Je.isVisible()||(Je=Je.actualBounds,Je.w()&&(De?(De=!1,je.assign(Je)):je.ed(Je))));Pe.width=je.width,Pe.height=je.height,Ne.x=je.x,Ne.y=je.y}return st!==null&&st.w()&&(Ne=st,et||(et=Ee)),je=st=0,pt!==null&&(st=pt.left+pt.right,je=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-je))),E!==null&&et!==null?(et==="NaN"&&(et=Ee),E.w()?(E=_e,Pe=De):isNaN(De)?(E=_e,Pe=Pe.height*et):(E=Pe.width*et,Pe=De)):E!==null?E.w()?(et=Math.min(_e/Pe.width,De/Pe.height),E=_e,Pe=De):isNaN(De)?(et=_e/Pe.width,E=_e,Pe=Pe.height*et):(et=De/Pe.height,E=Pe.width*et,Pe=De):et!==null?et==="NaN"&&nt.w()?(et=Math.min((nt.width-st)/Pe.width,(nt.height-je)/Pe.height),et>Ee?(et=Ee,E=Pe.width,Pe=Pe.height):(E=nt.width,Pe=nt.height)):(E=Pe.width*et,Pe=Pe.height*et):(et=Ee,E=Pe.width,Pe=Pe.height),pt!==null?(E+=st,Pe+=je):pt=new Ar(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)&&(Pe=Math.min(Pe,nt))),Mt.width=Math.ceil(E),Mt.height=Math.ceil(Pe),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=_t,b.hs=Zt,id(a,b.context,pt,new Mn(Math.ceil(E),Math.ceil(Pe)),et,Ne,ht,yt,Jt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Mn(Math.ceil(E),Math.ceil(Pe)),et,Ne,ht,yt,Jt,y),a.Xm=!0,Mt.context)}He.Object.defineProperties(qe.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 Nl(this,yn.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 Nl(this,yn.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(yn,"resize",this.Ov,!1),this.removeEventListener(yn,"wheel",this.$j,!0),Hl===this&&(Hl=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)&&En(a,"0 <= value <= 1",qe,"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),zs(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),zs(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),zs(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),zs(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&En(a,">= 0",qe,"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&&En(a,">= 0",qe,"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 En(a,">= 0",qe,"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&&Oe("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,Wl(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(yn,"pointermove",this.dk,!0),this.addEventListener(yn,"pointerdown",this.ui,!0),this.addEventListener(yn,"pointerup",this.fk,!0),this.addEventListener(yn,"pointerout",this.ek,!0),this.addEventListener(yn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(yn,"wheel",this.$j,!0),this.addEventListener(yn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(yn,"pointermove",this.dk,!0),this.removeEventListener(yn,"pointerdown",this.ui,!0),this.removeEventListener(yn,"pointerup",this.fk,!0),this.removeEventListener(yn,"pointerout",this.ek,!0),this.removeEventListener(yn,"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(yn,"wheel",this.$j,!0),this.removeEventListener(yn,"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()?Al(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!==xn.Grid&&Oe("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),Ll(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),Al(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||Oe("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 Ar(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===Ku&&zs(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,zs(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&&zs(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()||Oe("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()||Oe("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)):En(a,"> 0",qe,"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)):En(a,"> 0",qe,"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),zs(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 Ar(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&&Oe("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!==Zu&&a!==co&&a!==pd&&Oe("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Mn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Ar(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),He.Object.defineProperties(qe,{licenseKey:{get:function(){return Ip.jc()},set:function(a){Ip.add(a.replace(/\s/g,""))}},version:{get:function(){return Ec}}}),qe.prototype.makeImageData=qe.prototype.Jx,qe.prototype.makeImage=qe.prototype.Wz,qe.prototype.cacheGroupExternalLinks=qe.prototype.Fu,qe.prototype.addRenderer=qe.prototype.bs,qe.prototype.makeSVG=qe.prototype.av,qe.prototype.makeSvg=qe.prototype.Cs,qe.prototype.stopAutoScroll=qe.prototype.ug,qe.prototype.doAutoScroll=qe.prototype.gs,qe.prototype.isUnoccupied=qe.prototype.Yj,qe.prototype.raiseDiagramEvent=qe.prototype.R,qe.prototype.removeDiagramListener=qe.prototype.am,qe.prototype.addDiagramListener=qe.prototype.Bj,qe.prototype.findTreeRoots=qe.prototype.yz,qe.prototype.layoutDiagram=qe.prototype.Uz,qe.prototype.findTopLevelGroups=qe.prototype.qz,qe.prototype.findTopLevelNodesAndLinks=qe.prototype.rz,qe.prototype.ensureBounds=qe.prototype.Va,qe.prototype.findLinksByExample=qe.prototype.ls,qe.prototype.findNodesByExample=qe.prototype.ms,qe.prototype.findLinkForData=qe.prototype.Kc,qe.prototype.findNodeForData=qe.prototype.ii,qe.prototype.findPartForData=qe.prototype.Lc,qe.prototype.findLinkForKey=qe.prototype.findLinkForKey,qe.prototype.findNodeForKey=qe.prototype.Vb,qe.prototype.findPartForKey=qe.prototype.findPartForKey,qe.prototype.rebuildParts=qe.prototype.Wd,qe.prototype.transformViewToDoc=qe.prototype.Ps,qe.prototype.transformRectDocToView=qe.prototype.zA,qe.prototype.transformDocToView=qe.prototype.op,qe.prototype.centerRect=qe.prototype.es,qe.prototype.scrollToRect=qe.prototype.tv,qe.prototype.scroll=qe.prototype.scroll,qe.prototype.highlightCollection=qe.prototype.Jz,qe.prototype.highlight=qe.prototype.Iz,qe.prototype.selectCollection=qe.prototype.rA,qe.prototype.select=qe.prototype.select,qe.prototype.updateAllRelationshipsFromData=qe.prototype.rp,qe.prototype.updateAllTargetBindings=qe.prototype.updateAllTargetBindings,qe.prototype.commit=qe.prototype.commit,qe.prototype.rollbackTransaction=qe.prototype.Kf,qe.prototype.commitTransaction=qe.prototype.eb,qe.prototype.startTransaction=qe.prototype.Ea,qe.prototype.raiseChanged=qe.prototype.g,qe.prototype.raiseChangedEvent=qe.prototype.cb,qe.prototype.removeChangedListener=qe.prototype.ik,qe.prototype.addChangedListener=qe.prototype.Pe,qe.prototype.removeModelChangedListener=qe.prototype.mA,qe.prototype.addModelChangedListener=qe.prototype.Yw,qe.prototype.findLayer=qe.prototype.Qj,qe.prototype.removeLayer=qe.prototype.kA,qe.prototype.addLayerAfter=qe.prototype.Cy,qe.prototype.addLayerBefore=qe.prototype.Ww,qe.prototype.addLayer=qe.prototype.Al,qe.prototype.moveParts=qe.prototype.moveParts,qe.prototype.copyParts=qe.prototype.Kj,qe.prototype.removeParts=qe.prototype.Is,qe.prototype.remove=qe.prototype.remove,qe.prototype.add=qe.prototype.add,qe.prototype.clearDelayedGeometries=qe.prototype.bx,qe.prototype.setProperties=qe.prototype.nm,qe.prototype.attach=qe.prototype.Du,qe.prototype.set=qe.prototype.set,qe.prototype.resetInputOptions=qe.prototype.Sx,qe.prototype.setInputOption=qe.prototype.sA,qe.prototype.getInputOption=qe.prototype.Ql,qe.prototype.resetRenderingHints=qe.prototype.Tx,qe.prototype.setRenderingHint=qe.prototype.Xx,qe.prototype.getRenderingHint=qe.prototype.Gf,qe.prototype.maybeUpdate=qe.prototype.bd,qe.prototype.requestUpdate=qe.prototype.$b,qe.prototype.delayInitialization=qe.prototype.Xy,qe.prototype.isUpdateRequested=qe.prototype.Pz,qe.prototype.invalidateDocumentBounds=qe.prototype.Ya,qe.prototype.findObjectsNear=qe.prototype.og,qe.prototype.findPartsNear=qe.prototype.mz,qe.prototype.findObjectsIn=qe.prototype.Cf,qe.prototype.findPartsIn=qe.prototype.ux,qe.prototype.findObjectsAt=qe.prototype.ji,qe.prototype.findPartsAt=qe.prototype.lz,qe.prototype.findObjectAt=qe.prototype.ic,qe.prototype.findPartAt=qe.prototype.Ol,qe.prototype.focusObject=qe.prototype.zz,qe.prototype.alignDocument=qe.prototype.Jy,qe.prototype.zoomToRect=qe.prototype.BA,qe.prototype.zoomToFit=qe.prototype.zoomToFit,qe.prototype.diagramScroll=qe.prototype.kx,qe.prototype.focus=qe.prototype.focus;var dd=new or,om=null,Ki=yn.document!==void 0,kc=null,Ih="",ua=new an(qe,"None",0),ps=new an(qe,"Uniform",1),Rh=new an(qe,"UniformToFill",2),gf=new an(qe,"CycleAll",10),jp=new an(qe,"CycleNotDirected",11),Op=new an(qe,"CycleNotDirectedFast",12),Fp=new an(qe,"CycleNotUndirected",13),Dp=new an(qe,"CycleDestinationTree",14),Bp=new an(qe,"CycleSourceTree",15),Ku=new an(qe,"DocumentScroll",1),mf=new an(qe,"InfiniteScroll",2),Zu=new an(qe,"TreeParentCollapsed",21),co=new an(qe,"AllParentsCollapsed",22),pd=new an(qe,"AnyParentsCollapsed",23),Ip=new wn,Ec="2.3.10",Mc="image",vf=null,am=!1;function ea(){if(Ki){var a=yn.document.createElement("canvas"),y=a.getContext("2d"),x=cn("7ca11abfd022028846");y[x]=cn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Nn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Cr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ue.za],E=1;5>E;E++)y[cn("7ca11abfd7330390")](cn(b[E-1]),10,15*E);for(y[x]=cn("39f046ebb36e4b"),x=1;5>x;x++)y[cn("7ca11abfd7330390")](cn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Cr.prototype.Cd=Cr.prototype.Eu),vf=a}}qe.className="Diagram",qe.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=yn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof qe?y.H:null},qe.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},qe.useDOM=function(a){Ki=a?yn.document!==void 0:!1},qe.isUsingDOM=function(){return Ki},qe.None=ua,qe.Uniform=ps,qe.UniformToFill=Rh,qe.CycleAll=gf,qe.CycleNotDirected=jp,qe.CycleNotDirectedFast=Op,qe.CycleNotUndirected=Fp,qe.CycleDestinationTree=Dp,qe.CycleSourceTree=Bp,qe.DocumentScroll=Ku,qe.InfiniteScroll=mf,qe.TreeParentCollapsed=Zu,qe.AllParentsCollapsed=co,qe.AnyParentsCollapsed=pd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Tc(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=yn[cn("76a715b2f73f148a")][cn("72ba13b5")]||"";if(a.Rc=!0,Ki){var b=qe[cn("76a115b6ed251eaf4692")];if(b)for(var E=Ip.iterator;E.next()&&(b=E.value,b=cn(b).split(cn("39e9")),!(6>b.length));){var et=cn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var nt=cn(Nn[cn("6cae19")]).split(".");if(et[0]>nt[0]||et[0]===nt[0]&&et[1]>=nt[1]){var st=yn[cn("74a900bae4370f8b51")][cn("6fbb13a1c2311e8a57")].toLowerCase();if(nt=st[cn("73a612b6fb191d")](cn("3aad1ab6e022098b4dc4")),et=cn(b[2]),-1<nt&&(st=st[cn("73a612b6fb191d")](et.toLowerCase()+"/"),a.Rc=!(-1<st&&st<nt),!a.Rc))break;for(nt=x[cn("76ad18b4f73e")],st=x[cn("73a612b6fb191d")](cn("35e7"))+2;st<nt;st++)y+=x[st];if(nt=y[cn("73a612b6fb191d")](et),0>nt&&et!==cn("7da71ca0ad381e90")&&(nt=y[cn("73a612b6fb191d")](cn("76a715b2ef3e149757"))),0>nt&&(nt=y[cn("73a612b6fb191d")](cn("76a715b2ef3e149757"))),0>nt&&(nt=y[cn("73a612b6fb191d")](cn("2bfa41fdb3784bca12"))),0>nt&&(nt=x[cn("73a612b6fb191d")](cn("7baa19a6f76c1988428554"))),a.Rc=!(0<=nt&&nt<y[cn("73a612b6fb191d")](cn("35"))||y[cn("73a612b6fb191d")](cn("35"))===-1),!a.Rc||x[cn("73a612b6fb191d")](cn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[cn("73a612b6fb191d")](et)),!a.Rc)||(nt=yn[cn("76a715b2f73f148a")][cn("69ad17a1e03e")],st=nt[cn("73a612b6fb191d")](cn("7fb002b6ed25128b4da25b2e")),-1<st&&(a.Rc=!(nt[cn("73a612b6fb191d")](et)>st),!a.Rc)))break;if(et[0]==="#"){nt=yn.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[cn("79a417a0f0181a8946")]=b,yn.document[cn("78a712aa")]){yn.document[cn("78a712aa")][cn("7bb806b6ed32388c4a875b")](nt),ht=yn.getComputedStyle(nt).getPropertyValue(cn("78a704b7e62456904c9b12701b6532a8"));var pt=yn.getComputedStyle(nt).getPropertyValue(cn("75b817b0ea2202"));if(yn.document[cn("78a712aa")][cn("68ad1bbcf533388c4a875b")](nt),ht){if(nt=yn[cn("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(cn("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[cn("76ad18b4f73e")],E=x[cn("73a612b6fb191d")](cn("35e7"))+2;E<yt;E++)y+=x[E];x=y[cn("73a612b6fb191d")](cn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[cn("73a612b6fb191d")](cn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function pu(a){this.j=a===void 0?new Me:a,this.o=new Me}He.Object.defineProperties(pu.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 yf="DraggingInfo";pu.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 Mn(NaN,NaN).freeze(),this.gridSnapCellSpot=vi,this.gridSnapOrigin=new Me(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ct.className="DraggingOptions";function kt(a,y){if(typeof a=="string"||yn.Element&&a instanceof Element)var x=qe.call(this,a)||this;else x=qe.call(this)||this,y=a;return bt(x),y&&x.nm(y),x}Ve(kt,qe);function bt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=$i,a.layout=new Bo}kt.prototype.reset=function(){qe.prototype.reset.call(this),bt(this)},kt.className="Palette";function Ot(a,y){if(typeof a=="string"||yn.Element&&a instanceof Element)var x=qe.call(this,a)||this;else x=qe.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 kr;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 Ar(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(),me(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&&me(b)},x.autoScale=ps,x.vb=!1,y&&Object.assign(x,y),x}Ve(Ot,qe),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(bc(this),this.ql===null){var x=new Us(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),qt(this)}finally{this.ta=a,this.ib=y}}}qe.prototype.redraw.call(this)},Ot.prototype.gc=function(){if(this.Ka===null&&Oe("No div specified"),this.ta===null&&Oe("No canvas specified"),!(this.ta instanceof Nl)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){bc(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?qt(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 qt(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),Ll(y,E),on.free(E),Ko(y));var et=a.Ab;et.reset(),a.scale!==1&&et.scale(a.scale),a.position.x===0&&a.position.y===0||et.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),E.yc(),y=y.Wa.s,et=y.length;for(var nt=0;nt<et;nt++){var st=y[nt],ht=a;if(st.visible&&st.opacity!==0){var pt=st.diagram.grid.part;if(!x&&st.isTemporary)b&&pt.layer===st&&(st=du(st,E),pt.gc(E,ht),E.globalAlpha=st);else{for(var yt=du(st,E),Mt=ht.scale,_t=on.alloc(),Zt=st.Pa.s,Jt=Zt.length,ie=0;ie<Jt;ie++){var Ee=Zt[ie];(b||Ee!==pt)&&st.Oj(E,Ee,ht,null,Mt,_t,!1)}on.free(_t),E.globalAlpha=yt}}}}}function me(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Mn.alloc();E.h(x.width,x.height),b.desiredSize=E,Mn.free(E),a=2/a.scale,b instanceof kr&&(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(),me(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))},He.Object.defineProperties(Ot.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ot&&Oe("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),me(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),me(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(){zi.call(this),this.j=null}Ve(Te,zi),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,zi.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(){Jr(this),this.H=Hl,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=Rr?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 Fi&&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 Sn,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 Sn;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)kc=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 wn,x.addAll(et),kc=x,Ih=y.model.dataFormat}}y.R("ClipboardChanged",x)},ke.prototype.pasteFromClipboard=function(){var a=new Sn,y=kc;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||kc===null||kc.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;Wl(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;Wl(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 Ln&&ht.isTreeExpanded&&(!(ht instanceof Sr)||ht.isSubGraphExpanded);)ht=E.pop();0<E.length?(ht instanceof tr&&y.tv(ht.actualBounds),ht instanceof Ln&&!ht.isTreeExpanded&&(ht.isTreeExpanded=!0),ht instanceof Sr&&!ht.isSubGraphExpanded&&(ht.isSubGraphExpanded=!0)):(ht instanceof tr&&y.es(ht.actualBounds),y.am("LayoutCompleted",nt)),y.eb("Scroll To Part")},nt=function(){Xe(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 $r)Ie(a,y.adornedPart,x);else if(y instanceof Cn){var b=y.fromNode;b!==null&&Ie(a,b,x),y=y.toNode,y!==null&&Ie(a,y,x)}else y instanceof Ln&&(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"),Wl(y.animationManager,"Collapse Tree");var x=new wn;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 Ln&&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 Ln&&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 Ln&&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"),Wl(y.animationManager,"Expand Tree");var x=new wn;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 Ln&&!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 Ln)||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 Ln&&!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 wn,et=a.selection.iterator;et.next();){var nt=et.value;nt.Zc()&&nt.canGroup()&&E.add(nt)}for(var st=new wn,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 _t=st.iterator;_t.next();)if(!_t.value.Td(Mt)){E=!0;break}if(E)Mt=Mt.containingGroup;else break}if(x instanceof Sr)Ws(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Zt=y.copyNodeData(x);sn(Zt)&&(y.xf(Zt),b=a.ii(Zt))}if(b!==null){Mt!==null&&this.isValidMember(Mt,b)&&(b.containingGroup=Mt);for(var Jt=st.iterator;Jt.next();){var ie=Jt.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 rn(a){var y=Xn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Cn||y.push(x)}a=new Sn,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 In(y),a}ke.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Cn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},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 wn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var et=E.value;et instanceof Sr&&et.canUngroup()&&b.add(et)}var nt=new wn;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 _t=Mt.value;if(_t.isSelected=!0,!(_t instanceof Cn)){var Zt=_t.data;Zt!==null?x.mp(Zt,yt):_t.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 Sr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Sr&&y.canUngroup())return!0;return!1},ke.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=rn(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"),Wl(y.animationManager,"Collapse SubGraph");var x=new wn;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 Sr&&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 Sr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Sr&&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"),Wl(y.animationManager,"Expand SubGraph");var x=new wn;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 Sr&&!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 Sr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Sr&&!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 wi&&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 wi))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 wi&&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(ei):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,hu(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 or,a===null)return b;for(var et=a.iterator;et.next();)Kl(x,b,et.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(et=a.iterator;et.next();)a=et.value,a instanceof Cn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},He.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||Oe("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(){Jr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Me(NaN,NaN).freeze(),this.jd=Wi,this.Ab=new Cr,this.wh=new Cr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Qa,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=Lo,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 vn,pn,Hn,Jn,ir,wr,Ir,Tr,Hr,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=An(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ze.prototype.Vw=function(a){var y=this.Dh;if(dn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},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()},$t=ze.prototype,$t.qb=function(a){a.classType===Cn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Oe("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ze&&(this.stretch=a)},$t.toString=function(){return Wn(this.constructor)+"#"+oi(this)},$t.th=function(){this.A!==null&&(this.A.nc=!0)};function Mr(a){a.A===null?a.A=new xf:a.A.nc&&(a.A=a.A.copy())}$t.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}},$t.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&&zo(this)&&Mi(this,st,y),et=this.diagram,this.animationTriggers===null||et===null||!et.pi||et.undoManager.isUndoingRedoing||et.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&et.animationManager.isEnabled&&!et.animationManager.isTicking&&(this.jo===null&&(this.jo=new or),nt=et.undoManager.transactionLevel===0,a.startCondition===Nh?nt=!0:a.startCondition===yc&&(nt=!1),nt?(et=new Vo,Hg(a,et),nt=this.jo.get(a),nt!==null&&nt.stop(),this.jo.add(a,et),et.vu=this,et.Nw=a,et.add(this,y,b,E),et.start()):(Wl(et.animationManager,"Trigger"),et.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof xn&&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 xn&&jc(st,function(ht){ht.data!==null&&ht.l&16777216&&ht.La(y)})};function Mi(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var et=E.value,nt=null;if(et.sourceName!==null){if(nt=MS(et,b,a),nt===null)continue;et.sp(a,nt,x,null)}else if(et.isToModel){var st=y.diagram;st===null||st.skipsModelSourceBindings||et.sp(a,st.model.modelData,x,b)}else{if(st=b.data,st===null)continue;var ht=y.diagram;ht===null||ht.skipsModelSourceBindings||et.sp(a,st,x,b)}nt===a&&(st=b.ks(et.Ai),st!==null&&et.Mv(st,nt,x))}}$t.ks=function(a){return this.bindingId===a?this:null},$t.g=function(a,y,x){this.cb(Di,a,this,y,x)},$t.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 Cr);var et=this.Lb;et.reset(),this.no(et,a,y,x,b),et.pp(E)}};function Po(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}$t.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?ti(a.x,a.y,0,0,0,b.height)<=y||ti(a.x,a.y,0,b.height,b.width,b.height)<=y||ti(a.x,a.y,b.width,b.height,b.width,0)<=y||ti(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},$t.se=function(){return!0},$t.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=Ro(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 $r||this instanceof kr?Ro(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?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},$t.gh=function(a){var y=this.naturalBounds;return Ro(0,0,y.width,y.height,a.x,a.y)},$t.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},$t.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},$t.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&&(Ue.us(a,b,E)||Ue.us(a,E,et)||Ue.us(a,et,nt)||Ue.us(a,nt,b))&&(st=!0)}return Me.free(b),Me.free(E),Me.free(et),Me.free(nt),st},$t.ga=function(a,y){if(y===void 0&&(y=new Me),a instanceof jn){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},$t.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),Xi(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Xi(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Xi(a,b.x,b.y,0,0),Me.free(b),a},$t.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},$t.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},$t.qs=function(a,y){return y===void 0&&(y=new Me),y.assign(a),this.oe.Cd(y),y},$t.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},$t.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),_t=nt*(et.m12*et.dx-et.m11*et.dy);return this.areaBackground!==null?(et=this.actualBounds,Ue.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+_t,y=x*st+b*pt+Mt,x=x*ht+b*yt+_t,E.h(0,0),b=this.naturalBounds,x=Ue.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(ms(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 xn;switch(Ra(this,!0)){case pn:nt=E=0,st&&(y=a=1/0);break;case vn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(nt=y);break;case Jn:isFinite(a)&&a>x&&(E=a),nt=0,st&&(y=1/0);break;case ir: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()||Oe("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),fo(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(),wa(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&&Ju(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 wi&&(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()||Oe("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(et,this.Ib),Zl(this,!1),on.free(et)},$t=ze.prototype,$t.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=pn),y){case pn:(x>b||et>E)&&(fo(a,!0),a.measure(x>b?b:x,et>E?E:et,0,0));break;case vn:fo(a,!0),a.measure(b,E,0,0);break;case Jn:fo(a,!0),a.measure(b,et,0,0);break;case ir:fo(a,!0),a.measure(x,E,0,0)}}}$t.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(),bl(a,y)||(x.oh(),this.Pn(x)))},$t.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Ln&&H1(a,this))},$t.gc=function(a,y){if(!ks(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 xn&&Ju(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&&(Yi(this,a,pt,!0,!0,ht,st),pt instanceof li&&pt.type===Ts?(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&&(Yi(this,a,yt,!0,!1,ht,st),yt instanceof li&&yt.type===Ts?(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&&Do(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 _t;if(!(_t=y.$i||!yt)){var Zt=this.naturalBounds;_t=this.wh;var Jt=_t.m11,ie=_t.m21,Ee=_t.dx,Pe=_t.m12,Ne=_t.m22,je=_t.dy,De,_e=De=0;_t=De*Jt+_e*ie+Ee;var Je=De*Pe+_e*Ne+je;De=Zt.width+Mt,_e=0;var Tn=De*Jt+_e*ie+Ee;De=De*Pe+_e*Ne+je,_e=Math.min(_t,Tn);var _n=Math.min(Je,De),Bn=Math.max(_t+0,Tn)-_e,Pn=Math.max(Je+0,De)-_n;_t=_e,Je=_n,De=Zt.width+Mt,_e=Zt.height+Mt,Tn=De*Jt+_e*ie+Ee,De=De*Pe+_e*Ne+je,_e=Math.min(_t,Tn),_n=Math.min(Je,De),Bn=Math.max(_t+Bn,Tn)-_e,Pn=Math.max(Je+Pn,De)-_n,_t=_e,Je=_n,De=0,_e=Zt.height+Mt,Tn=De*Jt+_e*ie+Ee,De=De*Pe+_e*Ne+je,_e=Math.min(_t,Tn),_n=Math.min(Je,De),Bn=Math.max(_t+Bn,Tn)-_e,Pn=Math.max(Je+Pn,De)-_n,_t=_e,Je=_n,Mt=y.viewportBounds,Zt=Mt.x,Jt=Mt.y,_t=!(_t>Mt.width+Zt||Zt>Bn+_t||Je>Mt.height+Jt||Jt>Pn+Je)}if(_t){if(_t=(this.l&256)!==0,a.clipInsteadOfFill&&(_t=!1),this instanceof wi&&(a.font=this.font),_t){if(Je=st.se()?st.naturalBounds:st.actualBounds,Bn=Math.max(nt.x,Je.x),Pn=Math.max(nt.y,Je.y),Mt=Math.min(nt.right,Je.right)-Bn,Zt=Math.min(nt.bottom,Je.bottom)-Pn,Jt=this.tb,Jt!==null&&(Bn=Jt.x,Pn=Jt.y,Mt=Jt.width,Zt=Jt.height),Bn>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(Bn,Pn,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),gu(a),a.shadowColor=pt.shadowColor)}ht&&this.shadowVisible===!0?gu(a):ht&&this.shadowVisible===!1&&Xl(a),pt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),gs(this,a,pt,nt)),a.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),ht&&No(this,st)&&this.shadowVisible===null&&Xl(a),this.Ma!==null&&(a.yc(),Ha(this,a,pt,nt)),ht&&(this.Ma!==null||this.areaBackground!==null||No(this,st))?(nl(this,!0),this.shadowVisible===null&&Xl(a)):nl(this,!1),this.hh(a,y),ht&&this.l&512&&gu(a),yt&&ht&&Xl(a),_t&&(a.restore(),a.Vc(this instanceof xn)),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 No(a,y){return y===null?!1:(Ju(y)&&(y=y.panel),(y.l&512)!==0||(y.type===xn.Auto||y.type===xn.Spot)&&y.Pb()!==a)}$t.Dv=function(){};function gs(a,y,x,b){Yi(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof li&&a.areaBackground.type===Ts?(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;Yi(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof li&&a.Ma.type===Ts?(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 na(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===xn.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 ks(a,y,x){if(!(y instanceof ns))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&&na(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),gu(y),y.shadowColor=a.shadowColor}a instanceof wi&&(y.font=a.font),y.yd=null;var nt=a.transform;et=a instanceof xn;var st=a instanceof xn?Ju(a):!1;a.l&4096&&Do(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],gs(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&&gu(y),st&&a.shadowVisible===!0?gu(y):st&&a.shadowVisible===!1&&Xl(y),E=a.panel,st&&No(a,E)&&a.shadowVisible===null&&Xl(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||No(a,E))?(nl(a,!0),a.shadowVisible===null&&Xl(y)):nl(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&&gu(y),a.Dd()&&Xl(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&&na(a,b,st),nt!==null&&nt(a,st)),!0)}$t.$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"+Ui++,st=a.Ud("clipPath",{id:et}),y=a.Ud("rect",{x:y,y:E,width:nt,height:x}),this instanceof xn&&(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 ra(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Zn(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()}}$t.hh=function(){},$t.lv=function(){this.Uc=!0},$t.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 xn?Ju(this):!1;if(!(this instanceof xn&&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 xn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof kr){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],gs(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 xn))&&(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},$t.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 Yi(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===Yu)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 Nc)&&x.xe&&(x.type===wd||x.yk===st&&x.ft===ht))var yt=x.xe;else{var Mt=0,_t=0,Zt=0,Jt=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,_t=x.start.y*ht+x.start.offsetY,Zt=x.end.x*st+x.end.offsetX,Jt=x.end.y*ht+x.end.offsetY,Mt+=ie,Zt+=ie,_t+=Ee,Jt+=Ee,x.type===vu)yt=y.createLinearGradient(Mt,_t,Zt,Jt);else if(x.type===Ts)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,_t,ie,Zt,Jt,Ee);else if(x.type===wd)try{yt=y.createPattern(x.pattern,"repeat")}catch(Ne){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 Pe=a.diagram;Pe!==null&&x.yk===-1&&Xe(function(){Pe.redraw()},600)}}b?y.fillStyle=yt:y.strokeStyle=yt}}}$t.rg=function(a){if(a instanceof xn)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},$t.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},$t.If=function(){for(var a=this instanceof xn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Do(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Gs(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)}Gs(a,!1),Es(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Es(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,Es(a,!1)))}$t.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,ei),a.rotate(this.Kb,et.x,et.y),Me.free(et)}},$t.v=function(a){if(!ms(this)){a===void 0&&(a=!1),fo(this,!0),Zl(this,!0);var y=this.panel;y===null||a||y.v()}},$t.Uj=function(){ms(this)||(fo(this,!0),Zl(this,!0))};function xa(a){if(!wa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Ln&&a.Bd(),y.$b())),Zl(a,!0)}}$t.Uk=function(){!(this.l&2048)&&(Gs(this,!0),Es(this,!0))},$t.Wu=function(){Es(this,!0)},$t.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===xn.Table?fl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===xn.Auto&&b.Pb()===a?jo(a,vn,y):x===wr?b!==null?b.type===xn.Spot&&b.Pb()===a?jo(a,vn,y):(x=b.defaultStretch,x===wr?jo(a,pn,y):jo(a,x,y)):jo(a,pn,y):jo(a,x,y)}function fl(a,y,x,b){var E=a.stretch;if(E!==wr)return jo(a,E,b);var et=E=null;switch(y.stretch){case ir:et=!0;break;case vn:et=!0}switch(x.stretch){case Jn:E=!0;break;case vn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Jn||y===vn),et===null&&(et=y===ir||y===vn),E===!0&&et===!0?jo(a,vn,b):E===!0?jo(a,Jn,b):et===!0?jo(a,ir,b):jo(a,pn,b)}function jo(a,y,x){if(x)return y;if(y===pn||(x=a.desiredSize,x.w()))return pn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Jn)return pn;if(y===vn)return ir}else{if(y===ir)return pn;if(y===vn)return Jn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ir)return pn;if(y===vn)return Jn}else{if(y===Jn)return pn;if(y===vn)return ir}return y}function nl(a,y){a.l=y?a.l|512:a.l&-513}function zo(a){return(a.l&1024)!==0}function Sf(a,y){a.l=y?a.l|1024:a.l&-1025}function Gs(a,y){a.l=y?a.l|2048:a.l&-2049}function Es(a,y){a.l=y?a.l|4096:a.l&-4097}function ms(a){return(a.l&8192)!==0}function fo(a,y){a.l=y?a.l|8192:a.l&-8193}function wa(a){return(a.l&16384)!==0}function Zl(a,y){a.l=y?a.l|16384:a.l&-16385}$t.Gj=function(){this.svg=null},$t.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},$t.Av=function(){},$t.zv=function(a){return this.pa=a,xa(this),!0},$t.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},$t.kq=function(){return 0};function Lc(a){var y=a.part;if(y instanceof Ln&&(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 xn?a instanceof Ln?a.Bd():a.qm(a,function(x){Lc(x)}):Lc(a))}$t.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new so(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Oe("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new wn),this.localBindings.add(E),this},$t.set=function(a){return Object.assign(this,a),this},$t.Du=function(a){return r0(this,a),this},$t.apply=function(a){return a(this),this},$t.nm=function(a){return wc(this,a),this},$t.pz=function(){return this.ih()},$t.ih=function(){for(var a=this instanceof xn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},$t.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new or),this.animationTriggers.add(a.propertyName,a),this};function Ms(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=An(arguments),b=et(x),sn(b)||Oe('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=yn.go[a]}if(b===null&&(E!=null&&E.constructor||Oe("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 qe&&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?Oe("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 wi)a.text=y;else if(a instanceof kr)a.figure=y;else if(a instanceof za)a.source=y;else if(a instanceof xn)y=rl.I(y),y!==null&&(a.type=y);else if(a instanceof li){var x=Rn(li,y);x!==null?a.type=x:Oe("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof kn?(y=Rn(kn,y),y!==null&&(a.type=y)):a instanceof ri&&(y=Rn(ri,y),y!==null&&(a.type=y));else if(y instanceof ze)a instanceof xn||Oe("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof po){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 po?Em(b,y):Oe("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof an)typeof a.qb=="function"&&a.qb(y);else if(y instanceof yo)a.type=y;else if(y instanceof so)a instanceof ze||a instanceof po?a.bind(y):Oe("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof tl)a instanceof ze?a.Jv(y):Oe("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof wo)a instanceof kn&&a.type===kn.o?a.figures.add(y):Oe("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof ri)a instanceof wo?a.segments.add(y):Oe("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ni)a instanceof qe||a instanceof Sr?a.layout=y:Oe("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 fr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);wc(a,x)}else if(a instanceof po){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Oe("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)&&Oe("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new fr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);wc(a,E)}else wc(a,y);else Oe('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Xu(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}He.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 xf),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 xf),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 xf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Mr(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&&(Mr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ca},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===Ca&&(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:Ji},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:wr},set:function(a){var y=this.stretch;y!==a&&(Mr(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&&(Mr(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)&&En(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(Dc(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(Dc(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&&bf(a,"GraphObject.areaBackground"),a instanceof li&&a.freeze(),Mr(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&&bf(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&&Oe("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 kr&&this.qc(),this.g("desiredSize",b,a),zo(this)&&(a=this.part,a!==null&&(Mi(this,a,"width"),Mi(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Mn(a,this.jd.height).freeze(),this.v(),this instanceof kr&&this.qc(),this.g("desiredSize",y,a),zo(this)&&(a=this.part,a!==null&&Mi(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Mn(this.jd.width,a).freeze(),this.v(),this instanceof kr&&this.qc(),this.g("desiredSize",y,a),zo(this)&&(a=this.part,a!==null&&Mi(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:xr},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(),Mr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:no},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(),Mr(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 Ar(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&&Do(this),this.Ab}},oe:{get:function(){return this.l&4096&&Do(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Mr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:pn},set:function(a){this.reshapingBehavior!==a&&(Mr(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()&&Oe("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),xa(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&&En(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&&En(a,">= 1",ze,"columnSpan"),Mr(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&&En(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&&En(a,">= 1",ze,"rowSpan"),Mr(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&&(Mr(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 Ln||Oe("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),Lc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",ze,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Lc(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),Lc(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&&En(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),Lc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&En(a,">= 0",ze,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Lc(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),Lc(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&&En(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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&&(Mr(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 or,Xu("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=Ms(xn,xn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof xn){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"},Ms(kr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new jn(0,0,2.76142374915397,2.761423749153969),spot2:new jn(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 xn&&(x=b.fb("ButtonBorder"),x instanceof kr)){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 xn&&(x=b.fb("ButtonBorder"),x instanceof kr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof xn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof kr){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 xn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof kr){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 xn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof kr){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 xn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof kr))){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}),Xu("TreeExpanderButton",function(){var a=Ms("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ms(kr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Zi},new so("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new so("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof $r&&(x=x.adornedPart),x instanceof Ln){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}),Xu("SubGraphExpanderButton",function(){var a=Ms("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ms(kr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Zi},new so("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 $r&&(x=x.adornedPart),x instanceof Sr){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}),Xu("ToolTip",function(){return Ms($r,xn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Me(0,3),shadowBlur:5},Ms(kr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new jn(0,0,4,6),spot2:new jn(1,1,-4,-4)}))}),Xu("ContextMenu",function(){return Ms($r,xn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Me(0,3),shadowBlur:5},new so("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Xu("ContextMenuButton",function(){var a=Ms("Button");a.stretch=Jn;var y=a.fb("ButtonBorder");return y instanceof kr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new jn(0,0,2,3),y.spot2=new jn(1,1,-2,-2)),a}),Xu("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Ms("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},Ms(kr,{name:"ButtonIcon",strokeWidth:2},new so("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof kr&&(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}),Xu("CheckBoxButton",function(a){var y=lm(a);return a=Ms("Button",{desiredSize:new Mn(14,14)},Ms(kr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:vn,geometryStretch:Hn,visible:!1},y!==""?new so("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof xn){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}),Xu("CheckBox",function(a){a=lm(a),a=Ms("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ar(0,1,0,0)});var y=Ms(xn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ar(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=pn=new an(ze,"None",0),ze.Default=wr=new an(ze,"Default",0),ze.Vertical=ir=new an(ze,"Vertical",4),ze.Horizontal=Jn=new an(ze,"Horizontal",5),ze.Fill=vn=new an(ze,"Fill",3),ze.Uniform=Hn=new an(ze,"Uniform",1),ze.UniformToFill=Ir=new an(ze,"UniformToFill",2),ze.FlipVertical=Tr=new an(ze,"FlipVertical",1),ze.FlipHorizontal=Hr=new an(ze,"FlipHorizontal",2),ze.FlipBoth=fi=new an(ze,"FlipBoth",3),ze.make=Ms,ze.getBuilders=function(){var a=new or,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=Xu,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;Oe('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ze.takeBuilderArgument=lm;function xf(){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=xr,this.o=no,this.hg=wr,this.ob=this.Bi=1,this.Pf=pn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}xf.prototype.copy=function(){var a=new xf;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=Ji,this.rr=Ca,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=Lo,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 Ac(){this.ha=[1,0,0,1,0,0]}Ac.prototype.copy=function(){var a=new Ac;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},Ac.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},Ac.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Ac.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)}},Ac.className="STransform";function wf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}wf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},wf.className="SGradient";function Nl(a,y,x){this.ownerDocument=a=y===void 0?yn.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 ns(this,x)}Nl.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},Nl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),sn(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Nl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Nl.prototype.focus=function(){this.Oa.focus()},Nl.prototype.mx=function(){this.ownerDocument=null},He.Object.defineProperties(Nl.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}}}),Nl.className="SVGSurface";function ns(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 Ac,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ui++,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+")")}$t=ns.prototype,$t.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),_t=a+yt,Zt=y+Mt,Jt=et?0:1;b=et?b-E:E-b,(1e-6<Math.abs(nt-_t)||1e-6<Math.abs(st-Zt))&&this.path.push(["L",_t,+Zt]),0>b&&(b=b%ht+ht),b>pt?(this.path.push(["A",x,x,0,1,Jt,a-yt,y-Mt]),this.path.push(["A",x,x,0,1,Jt,_t,Zt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Jt,a+x*Math.cos(E),y+x*Math.sin(E)])},$t.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},$t.Se=function(a){this.addPath(this.path,this.rb,a||0)},$t.bezierCurveTo=function(a,y,x,b,E,et){this.path.push(["C",a,y,x,b,E,et])},$t.clearRect=function(){},$t.clip=function(){this.Yl.clipPath=!0},$t.closePath=function(){this.path.push(["z"])},$t.createLinearGradient=function(a,y,x,b){var E=new wf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},$t.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"+Ui++,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(Mc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},$t.createRadialGradient=function(a,y,x,b,E,et){var nt=new wf("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)}$t.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},Ue.$(b,st)&&Ue.$(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,Mc,et,this.rb),this.addElement(Mc,et)},$t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},$t.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},$t.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)},$t.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))},$t.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])},$t.lineTo=function(a,y){this.path.push(["L",a,y])},$t.moveTo=function(a,y){this.path.push(["M",a,y])},$t.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},$t.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"])},$t.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},$t.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())},$t.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]+")"}$t.scale=function(a,y){this.rb.scale(a,y)},$t.translate=function(a,y){this.rb.translate(a,y)},$t.transform=function(){},$t.yc=function(){},$t.stroke=function(){qy(this,this.Yl)},$t.jk=function(){this.clipInsteadOfFill||this.stroke()},$t.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},$t.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 wf?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 wf?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 wf)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"+Ui++,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+")"}$t.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var et=An(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 Ac;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}$t.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Xl(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function gu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}$t.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},$t.fs=function(){this.Ct=!1},$t.Vc=function(){},$t.Wx=function(){},ns.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ns.prototype.getImageData=function(){return null},ns.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()))}ns.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ns.className="SVGContext",qe.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Nl(this,yn.document));var y=new Nl(this,yn.document,!0);a===void 0&&(a=new fr);var x=this;return pf(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)},qe.prototype.makeSvg=qe.prototype.Cs,qe.prototype.av=function(a){return this.Cs(a)},qe.prototype.makeSVG=qe.prototype.av;function Us(a,y,x,b){this.ownerDocument=y=y===void 0?yn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Nc(y,x,b),y.H=a}Us.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},Us.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Us.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Us.prototype.focus=function(){this.Oa.focus()},Us.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},He.Object.defineProperties(Us.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}}}),Us.className="CanvasSurface";function Nc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Oe("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 Cr,this.isTemporary=!!x}$t=Nc.prototype,$t.Wx=function(a){this.Z.imageSmoothingEnabled=a},$t.arc=function(a,y,x,b,E,et){this.Z.arc(a,y,x,b,E,et)},$t.beginPath=function(){this.Z.beginPath()},$t.Se=function(){},$t.bezierCurveTo=function(a,y,x,b,E,et){this.Z.bezierCurveTo(a,y,x,b,E,et)},$t.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},$t.clip=function(){this.Z.clip()},$t.closePath=function(){this.Z.closePath()},$t.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},$t.createPattern=function(a,y){return this.Z.createPattern(a,y)},$t.createRadialGradient=function(a,y,x,b,E,et){return this.Z.createRadialGradient(a,y,x,b,E,et)},$t.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)},$t.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},$t.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},$t.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},$t.fillText=function(a,y,x){this.Z.fillText(a,y,x)},$t.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},$t.lineTo=function(a,y){this.Z.lineTo(a,y)},$t.measureText=function(a){return this.Z.measureText(a)},$t.moveTo=function(a,y){this.Z.moveTo(a,y)},$t.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},$t.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},$t.restore=function(){this.Z.restore()},$t.save=function(){this.yc(),this.Z.save()},Nc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},$t=Nc.prototype,$t.setTransform=function(a,y,x,b,E,et){this.El.setTransform(a,y,x,b,E,et)},$t.scale=function(a,y){this.El.scale(a,y)},$t.translate=function(a,y){this.El.translate(a,y)},$t.stroke=function(){this.Z.stroke()},$t.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}},$t.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},$t.ng=function(a,y){if(a instanceof li&&a.type===Ts){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)},$t.jk=function(){this.Hm||this.stroke()},$t.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},$t.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},$t.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},$t.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},$t.Hs=function(){},He.Object.defineProperties(Nc.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([]);Nc.className="CanvasSurfaceContext";function zp(){this.F=this.o=this.u=this.j=0}zp.className="ColorNumbers";function li(a,y){xd||(c0(),xd=!0),Jr(this),this._isFrozen=!1,a===void 0?(this.na=Yu,this.xk="black"):typeof a=="string"?(this.na=Yu,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===vu?(this.Qd=$i,this.Lk=Jo):this.Lk=a===Ts?this.Qd=ei: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},$t=li.prototype,$t.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},$t.ka=function(){return Object.isFrozen(this)&&Oe("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},$t.qb=function(a){a.classType===li&&(this.type=a)},$t.toString=function(){var a="Brush(";if(this.type===Yu)a+=this.color;else if(a=this.type===vu?a+"Linear ":this.type===Ts?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+")"},$t.addColorStop=function(a,y){return this._isFrozen&&ln(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&En(a,"0 <= loc <= 1",li,"addColorStop:loc"),this.we===null&&(this.we=new or),this.we.add(a,y),this.na===Yu&&(this.type=vu),this.xe=null,this},$t.Vz=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===Yu)mu(this.color),this.color=yd(a,y);else if((this.type===vu||this.type===Ts)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)mu(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,mu(a),yd(y,x)}$t.Wy=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===Yu)mu(this.color),this.color=yd(-a,y);else if((this.type===vu||this.type===Ts)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)mu(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,mu(a),yd(-y,x)}function a0(a,y,x){mu(a),a=Pi.j;var b=Pi.u,E=Pi.o,et=Pi.F;return mu(y),x===void 0&&(x=.5),"rgba("+Math.round((Pi.j-a)*x+a)+", "+Math.round((Pi.u-b)*x+b)+", "+Math.round((Pi.o-E)*x+E)+", "+Math.round((Pi.F-et)*x+et)+")"}$t.Gx=function(){if(this.type===Yu)return vd(this.color);if((this.type===vu||this.type===Ts)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ts)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():(mu(a),128>(299*Pi.j+587*Pi.u+114*Pi.o)/1e3):!1}function yd(a,y){switch(y){case bd:y=100*l0(Pi.j);var x=100*l0(Pi.u),b=100*l0(Pi.o);return ba.j=.4124564*y+.3575761*x+.1804375*b,ba.u=.2126729*y+.7151522*x+.072175*b,ba.o=.0193339*y+.119192*x+.9503041*b,ba.F=Pi.F,y=h0(ba.j/Sd[0]),x=h0(ba.u/Sd[1]),b=h0(ba.o/Sd[2]),Yl.j=116*x-16,Yl.u=500*(y-x),Yl.o=200*(x-b),Yl.F=ba.F,Yl.j=Math.min(100,Math.max(0,Yl.j+100*a)),a=(Yl.j+16)/116,y=a-Yl.o/200,ba.j=Sd[0]*n1(Yl.u/500+a),ba.u=Sd[1]*(Yl.j>cm*f0?Math.pow(a,3):Yl.j/cm),ba.o=Sd[2]*n1(y),ba.F=Yl.F,a=-.969266*ba.j+1.8760108*ba.u+.041556*ba.o,y=.0556434*ba.j+-.2040259*ba.u+1.0572252*ba.o,Pi.j=255*u0((3.2404542*ba.j+-1.5371385*ba.u+-.4985314*ba.o)/100),Pi.u=255*u0(a/100),Pi.o=255*u0(y/100),Pi.F=ba.F,Pi.j=Math.round(Pi.j),255<Pi.j?Pi.j=255:0>Pi.j&&(Pi.j=0),Pi.u=Math.round(Pi.u),255<Pi.u?Pi.u=255:0>Pi.u&&(Pi.u=0),Pi.o=Math.round(Pi.o),255<Pi.o?Pi.o=255:0>Pi.o&&(Pi.o=0),"rgba("+Pi.j+", "+Pi.u+", "+Pi.o+", "+Pi.F+")";case r1:return s0(),vs.o=Math.min(100,Math.max(0,vs.o+100*a)),"hsla("+vs.j+", "+vs.u+"%, "+vs.o+"%, "+vs.F+")";default:Oe("Unknown color space: "+y)}}function mu(a){xd||(c0(),xd=!0);var y=d0;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Pi.j=a[0],Pi.u=a[1],Pi.o=a[2],Pi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Pi.j=0,Pi.u=0,Pi.o=0,Pi.F=1)}}function s0(){var a=Pi.j/255,y=Pi.u/255,x=Pi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),et=b-E;if(E=(b+E)/2,et===0)var nt=a=0;else{switch(b){case a:nt=(y-x)/et%6;break;case y:nt=(x-a)/et+2;break;case x:nt=(a-y)/et+4}nt*=60,0>nt&&(nt+=360),a=et/(1-Math.abs(2*E-1))}vs.j=Math.round(nt),vs.u=Math.round(100*a),vs.o=Math.round(100*E),vs.F=Pi.F}function l0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>f0?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>f0?y:(116*a-16)/cm}function bf(a,y){typeof a!="string"&&(a instanceof li||Oe("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Ki?new Us(null,void 0,{willReadFrequently:!0}).context:null}He.Object.defineProperties(li.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ln(this,a),this.na=a,this.start.Mc()&&(a===vu?this.start=$i:a===Ts&&(this.start=ei)),this.end.Mc()&&(a===vu?this.end=Jo:a===Ts&&(this.end=ei)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ln(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ln(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ln(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ln(this,a),0>a&&En(a,">= zero",li,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ln(this,a),0>a&&En(a,">= zero",li,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ln(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ln(this,a),this.cr=a,this.xe=null}}}),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,Pi=new zp,vs=new zp,ba=new zp,Yl=new zp,xd=!1;li.className="Brush";var Yu;li.Solid=Yu=new an(li,"Solid",0);var vu;li.Linear=vu=new an(li,"Linear",1);var Ts;li.Radial=Ts=new an(li,"Radial",2);var wd;li.Pattern=wd=new an(li,"Pattern",4);var bd;li.Lab=bd=new an(li,"Lab",5);var r1;li.HSL=r1=new an(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(){},He.Object.defineProperties(yo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return xn}}}),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"}Ve(fm,yo),fm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;a=yu(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 _t=pt.measuredBounds;Mt=Math.max(_t.width+Mt,0),yt=Math.max(_t.height+yt,0),_t=pt.position.x;var Zt=pt.position.y;isFinite(_t)||(_t=0),isFinite(Zt)||(Zt=0),pt instanceof kr&&pt.isGeometryPositioned&&(pt=pt.strokeWidth/2,_t-=pt,Zt-=pt),Xi(E,_t,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 kr&&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"}Ve(dm,yo),dm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;y=Xn(),et=yu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===et){var yt=Ra(pt,!1);if(yt!==pn&&yt!==Jn)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));In(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,_t=yt.margin,Zt=_t.top+_t.bottom,Jt=et+E.bottom,ie=Mt.height,Ee=Ra(yt,!1);(isNaN(yt.desiredSize.height)&&Ee===vn||Ee===ir)&&(ie=Math.max(x.height-Zt-Jt,0)),Zt=ie+Zt+Jt,Jt=yt.alignment,Jt.Xb()&&(Jt=a.defaultAlignment),Jt.sb()||(Jt=ei),nt&&(st-=Mt.width+_t.left+_t.right),yt.arrange(st+Jt.offsetX+_t.left,pt+Jt.offsetY+_t.top+(x.height*Jt.y-Zt*Jt.y),Mt.width,ie),nt||(st+=Mt.width+_t.left+_t.right)}}};function pm(){this.xa="Base"}Ve(pm,yo),pm.prototype.measure=function(a,y,x,b,E,et){var nt=b.length;x=Xn();for(var st=yu(a),ht=0;ht<nt;ht++){var pt=b[ht];if(pt.visible||pt===st){var yt=Ra(pt,!1);if(yt!==pn&&yt!==ir)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,xo(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);In(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,_t=yt.margin,Zt=_t.left+_t.right,Jt=et+E.right,ie=Mt.width,Ee=Ra(yt,!1);(isNaN(yt.desiredSize.width)&&Ee===vn||Ee===Jn)&&(ie=Math.max(x.width-Zt-Jt,0)),Zt=ie+Zt+Jt,Jt=yt.alignment,Jt.Xb()&&(Jt=a.defaultAlignment),Jt.sb()||(Jt=ei),nt&&(st-=Mt.height+_t.bottom+_t.top),yt.arrange(pt+Jt.offsetX+_t.left+(x.width*Jt.x-Zt*Jt.x),st+Jt.offsetY+_t.top,ie,Mt.height),nt||(st+=Mt.height+_t.bottom+_t.top)}}};function gm(){this.xa="Base"}Ve(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 _t=ht.measuredBounds;et=_t.width,nt=_t.height;var Zt=Math.max(et+yt,0),Jt=Math.max(nt+Mt,0),ie=a.isClipping,Ee=on.allocAt(-pt.left,-pt.top,Zt,Jt),Pe=on.allocAt(0,0,et,nt);p0(ht,Pe,!0),et=Pe.width,nt=Pe.height;for(var Ne=!0,je=yu(a),De=0;De<st;De++){var _e=b[De];_t=y;var Je=x;if(_e!==ht&&(_e.visible||_e===je)){pt=_e.margin;var Tn=pt.left,_n=pt.top;switch(Zt=pt.right+pt.left,Jt=pt.top+pt.bottom,pt=Ra(_e,!1),pt){case vn:_t=et,Je=nt,_n=Tn=Jt=Zt=0;break;case Jn:_t=et,Tn=Zt=0;break;case ir:Je=nt,_n=Jt=0}_e.measure(_t,Je,0,0),_t=_e.measuredBounds,Zt=Math.max(_t.width+Zt,0),Jt=Math.max(_t.height+Jt,0),pt=_e.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=ei);var Bn=_e.alignmentFocus;if(Bn.Xb()&&(Bn=ei),Je=null,_e instanceof xn&&_e.$e!==""&&(Je=_e.fb(_e.$e),Je===_e&&(Je=null)),Tn=Pe.x-Tn,_n=Pe.y-_n,Je!==null){for(_e.arrange(0,0,_t.width,_t.height),_t=Je.actualBounds,_t=Me.allocAt(_t.x+(Bn.x*_t.width-Bn.offsetX),_t.y+(Bn.y*_t.height-Bn.offsetY)),Je=Je.panel;Je!==_e;)Je.transform.Ga(_t),Je=Je.panel;Tn+=pt.x*et+pt.offsetX-_t.x,_n+=pt.y*nt+pt.offsetY-_t.y,Me.free(_t)}else Tn+=pt.x*et+pt.offsetX-(Bn.x*_t.width+Bn.offsetX),_n+=pt.y*nt+pt.offsetY-(Bn.y*_t.height+Bn.offsetY);Ne?(Ne=!1,E.h(Tn,_n,Zt,Jt)):Xi(E,Tn,_n,Zt,Jt)}}switch(Ne?E.assign(Ee):ie?E.Uu(Pe.x,Pe.y,Pe.width,Pe.height):Xi(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(Ee),on.free(Pe),pt=ht.stretch,pt===wr&&(pt=Ra(ht,!1)),pt){case pn:return;case vn:if(!isFinite(y)&&!isFinite(x))return;break;case Jn:if(!isFinite(y))return;break;case ir:if(!isFinite(x))return}for(_t=ht.measuredBounds,et=_t.width,nt=_t.height,Zt=Math.max(et+yt,0),Jt=Math.max(nt+Mt,0),pt=ht.margin,Pe=on.allocAt(-pt.left,-pt.top,Zt,Jt),p0(ht,Pe,!0),et=Pe.width,nt=Pe.height,y=0;y<st;y++)x=b[y],x===ht||!x.visible&&x!==je||(pt=x.margin,Zt=pt.right+pt.left,Jt=pt.top+pt.bottom,_t=x.measuredBounds,Zt=Math.max(_t.width+Zt,0),Jt=Math.max(_t.height+Jt,0),yt=x.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=ei),x=x.alignmentFocus,x.Xb()&&(x=ei),Ne?(Ne=!1,E.h(yt.x*et+yt.offsetX-(x.x*_t.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*_t.height+x.offsetY)-pt.top,Zt,Jt)):Xi(E,yt.x*et+yt.offsetX-(x.x*_t.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*_t.height+x.offsetY)-pt.top,Zt,Jt));Ne?E.assign(Ee):ie?E.Uu(Pe.x,Pe.y,Pe.width,Pe.height):Xi(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(Pe)},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 _t=pt.width,Zt=pt.height;yt=Mt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=ei);var Jt=Mt.alignmentFocus;if(Jt.Xb()&&(Jt=ei),pt=null,Mt instanceof xn&&Mt.$e!==""&&(pt=Mt.fb(Mt.$e),pt===Mt&&(pt=null)),pt!==null){var ie=pt.actualBounds;for(Jt=Me.allocAt(ie.x+(Jt.x*ie.width-Jt.offsetX),ie.y+(Jt.y*ie.height-Jt.offsetY)),pt=pt.panel;pt!==Mt;)pt.transform.Ga(Jt),pt=pt.panel;pt=yt.x*nt.width+yt.offsetX-Jt.x,yt=yt.y*nt.height+yt.offsetY-Jt.y,Me.free(Jt)}else pt=yt.x*nt.width+yt.offsetX-(Jt.x*_t+Jt.offsetX),yt=yt.y*nt.height+yt.offsetY-(Jt.y*Zt+Jt.offsetY);pt+=nt.x-x.x,yt+=nt.y-x.y,Mt.visible&&Mt.arrange(et+pt,ht+yt,_t,Zt)}}on.free(nt)};function p0(a,y,x){var b=null;if(a instanceof xn&&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"}Ve(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,_t=pt.right+pt.left,Zt=pt.top+pt.bottom;ht.measure(y,x,et,nt),pt=ht.measuredBounds;var Jt=0,ie=null;ht instanceof kr&&(ie=ht,Jt=ie.strokeWidth*ie.scale);var Ee=Math.max(pt.width+_t,0);pt=Math.max(pt.height+Zt,0);var Pe=y0(ht),Ne=Pe.x*Ee+Pe.offsetX;Pe=Pe.y*pt+Pe.offsetY;var je=S0(ht),De=je.x*Ee+je.offsetX;for(je=je.y*pt+je.offsetY,isFinite(y)&&(yt=Math.max(Math.abs(Ne-De)-Jt,0)),isFinite(x)&&(Mt=Math.max(Math.abs(Pe-je)-Jt,0)),Jt=Mn.alloc(),Jt.h(0,0),a=yu(a),je=0;je<st;je++)Pe=b[je],Pe===ht||!Pe.visible&&Pe!==a||(pt=Pe.margin,Ee=pt.right+pt.left,Ne=pt.top+pt.bottom,Pe.measure(yt,Mt,0,0),pt=Pe.measuredBounds,Ee=Math.max(pt.width+Ee,0),pt=Math.max(pt.height+Ne,0),Jt.h(Math.max(Ee,Jt.width),Math.max(pt,Jt.height)));if(st===1)E.width=Ee,E.height=pt,Mn.free(Jt);else{switch(Pe=y0(ht),je=S0(ht),st=b=0,je.x!==Pe.x&&je.y!==Pe.y&&(b=Jt.width/Math.abs(je.x-Pe.x),st=Jt.height/Math.abs(je.y-Pe.y)),Mn.free(Jt),Jt=0,ie!==null&&(Jt=ie.strokeWidth*ie.scale,k0(ie)===Hn&&(b=st=Math.max(b,st))),b+=Math.abs(Pe.offsetX)+Math.abs(je.offsetX)+Jt,st+=Math.abs(Pe.offsetY)+Math.abs(je.offsetY)+Jt,ie=ht.stretch,ie===wr&&(ie=Ra(ht,!1)),ie){case pn:nt=et=0;break;case vn:isFinite(y)&&(b=y),isFinite(x)&&(st=x);break;case Jn:isFinite(y)&&(b=y),nt=0;break;case ir:et=0,isFinite(x)&&(st=x)}ht.Uj(),ht.measure(b,st,et,nt),E.width=ht.measuredBounds.width+_t,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),_t=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=_t,Xi(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),_t=st.alignment,_t.Xb()&&(_t=a.defaultAlignment),_t.sb()||(_t=ei),ht=et.width*_t.x+_t.offsetX-ht*_t.x+nt.left+et.x,nt=et.height*_t.y+_t.offsetY-yt*_t.y+nt.top+et.y,st.visible&&(Ro(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"}Ve(vm,yo),vm.prototype.measure=function(a,y,x,b,E){for(var et=b.length,nt=Xn(),st=Xn(),ht=0;ht<et;ht++){var pt=b[ht],yt=pt instanceof xn?pt:null;if(yt!==null&&Ju(yt)&&pt.visible){st.push(yt);for(var Mt=yt.O.s,_t=Mt.length,Zt=0;Zt<_t;Zt++){var Jt=Mt[Zt];yt.type===xn.TableRow?Jt.row=pt.row:yt.type===xn.TableColumn&&(Jt.column=pt.column),nt.push(Jt)}}else nt.push(pt)}et=nt.length,et===0&&(a.Fb(0),a.Eb(0));for(var ie=[],Ee=0;Ee<et;Ee++){var Pe=nt[Ee];Pe.visible&&(fo(Pe,!0),Zl(Pe,!0),ie[Pe.row]||(ie[Pe.row]=[]),ie[Pe.row][Pe.column]||(ie[Pe.row][Pe.column]=[]),ie[Pe.row][Pe.column].push(Pe))}In(nt);var Ne=Xn(),je=Xn(),De=Xn(),_e={count:0},Je={count:0},Tn=y,_n=x,Bn=a.rowDefs,Pn=a.colDefs,fn=null;et=Bn.length;for(var yr=0;yr<et;yr++)fn=Bn[yr],fn!==void 0&&(fn.actual=0);et=Pn.length;for(var hr=0;hr<et;hr++)fn=Pn[hr],fn!==void 0&&(fn.actual=0);for(var ii=ie.length,xi=0,Co=0;Co<ii;Co++)ie[Co]&&(xi=Math.max(xi,ie[Co].length));var To=Math.min(a.topIndex,ii-1),ca=Math.min(a.leftIndex,xi-1),ko=0;ii=ie.length;for(var ah=yu(a),lo=0;lo<ii;lo++)if(ie[lo]){xi=ie[lo].length;var vl=a.Fb(lo);vl.actual=0;for(var fa=vl.oc=0;fa<xi;fa++)if(ie[lo][fa]){var sh=a.Eb(fa);Ne[fa]===void 0&&(sh.actual=0,sh.oc=0,Ne[fa]=!0);for(var xs=ie[lo][fa],Ks=xs.length,os=0;os<Ks;os++){var Ka=xs[os];if(Ka.visible||Ka===ah){var qh=1<Ka.rowSpan||1<Ka.columnSpan;qh&&(lo<To||fa<ca||je.push(Ka));var yl=Ka.margin,Vd=yl.right+yl.left,as=yl.top+yl.bottom,da=fl(Ka,vl,sh,!1),Mg=Ka.desiredSize,Ff=!isNaN(Mg.height),Fl=!isNaN(Mg.width)&&Ff;if(qh||da===pn||Fl||lo<To||fa<ca||(_e[fa]!==void 0||da!==vn&&da!==Jn||(_e[fa]=-1,_e.count++),Je[lo]!==void 0||da!==vn&&da!==ir||(Je[lo]=-1,Je.count++),De.push(Ka)),Ka.measure(1/0,1/0,0,0),!(lo<To||fa<ca)){var Za=Ka.measuredBounds,zc=Math.max(Za.width+Vd,0),ss=Math.max(Za.height+as,0);if(Ka.rowSpan===1&&(da===pn||da===Jn)){fn=a.Fb(lo);var tc=fn.Wc();ko=Math.max(ss-fn.actual,0),ko+tc>_n&&(ko=Math.max(_n-tc,0));var zv=fn.oa===0;fn.oc=fn.oc+ko,fn.actual=fn.oa+ko,_n=Math.max(_n-(ko+(zv?tc:0)),0)}if(Ka.columnSpan===1&&(da===pn||da===ir)){fn=a.Eb(fa);var Tg=fn.Wc();ko=Math.max(zc-fn.actual,0),ko+Tg>Tn&&(ko=Math.max(Tn-Tg,0));var Gy=fn.oa===0;fn.oc=fn.oc+ko,fn.actual=fn.oa+ko,Tn=Math.max(Tn-(ko+(Gy?Tg:0)),0)}qh&&Ka.Uj()}}}}}In(Ne);var iu=0,wu=0;et=a.columnCount;for(var Df=0;Df<et;Df++){var ec=Pn[Df];ec!==void 0&&(iu+=isNaN(ec.Hc)?ec.oc:ec.Hc,ec.oc!==0&&(iu+=ec.Wc()))}et=a.rowCount;for(var Kd=0;Kd<et;Kd++){var nc=Bn[Kd];nc!==void 0&&(wu+=isNaN(nc.Hc)?nc.oc:nc.Hc,nc.oc!==0&&(wu+=nc.Wc()))}Tn=Math.max(y-iu,0);var ou=_n=Math.max(x-wu,0),lh=Tn;et=De.length;for(var Xa=0;Xa<et;Xa++){var Dl=De[Xa],Gv=a.Fb(Dl.row),bu=a.Eb(Dl.column),Zd=Dl.measuredBounds,Sl=Dl.margin,Gc=Sl.right+Sl.left,Bl=Sl.top+Sl.bottom;_e[Dl.column]=bu.oc===0&&_e[Dl.column]!==void 0?Math.max(Zd.width+Gc,_e[Dl.column]):null,Je[Dl.row]=Gv.oc===0&&Je[Dl.row]!==void 0?Math.max(Zd.height+Bl,Je[Dl.row]):null}var Bf=0,Xd=0,ul;for(ul in Je)ul!=="count"&&(Bf+=Je[ul]);for(ul in _e)ul!=="count"&&(Xd+=_e[ul]);for(var Io=Mn.alloc(),Lg=0;Lg<et;Lg++){var La=De[Lg];if(La.visible||La===ah){var uo=a.Fb(La.row),Aa=a.Eb(La.column),Pu=0;isFinite(Aa.width)?Pu=Aa.width:(isFinite(Tn)&&_e[La.column]!==null?Xd===0?Pu=Aa.actual+Tn:Pu=_e[La.column]/Xd*lh:_e[La.column]!==null?Pu=Tn:Pu=Aa.actual||Tn,Pu=Math.max(0,Pu-Aa.Wc()));var uh=0;switch(isFinite(uo.height)?uh=uo.height:(isFinite(_n)&&Je[La.row]!==null?Bf===0?uh=uo.actual+_n:uh=Je[La.row]/Bf*ou:Je[La.row]!==null?uh=_n:uh=uo.actual||_n,uh=Math.max(0,uh-uo.Wc())),Io.h(Math.max(Aa.minimum,Math.min(Pu,Aa.maximum)),Math.max(uo.minimum,Math.min(uh,uo.maximum))),da=fl(La,uo,Aa,!1),da){case Jn:Io.height=Math.max(Io.height,uo.actual+_n);break;case ir:Io.width=Math.max(Io.width,Aa.actual+Tn)}var Uc=La.margin,Uy=Uc.right+Uc.left,Uv=Uc.top+Uc.bottom;La.Uj(),La.measure(Io.width,Io.height,Aa.minimum,uo.minimum);var Yd=La.measuredBounds,Wc=Math.max(Yd.width+Uy,0),If=Math.max(Yd.height+Uv,0);isFinite(Tn)&&(Wc=Math.min(Wc,Io.width)),isFinite(_n)&&(If=Math.min(If,Io.height));var Ya=0;Ya=uo.actual,uo.actual=Math.max(uo.actual,If),uo.oc=Math.max(uo.oc,If),ko=uo.actual-Ya,_n=Math.max(_n-ko,0),Je[La.row]===null&&(ou=Math.max(ou-ko,0)),Ya=Aa.actual,Aa.actual=Math.max(Aa.actual,Wc),Aa.oc=Math.max(Aa.oc,Wc),ko=Aa.actual-Ya,Tn=Math.max(Tn-ko,0),_e[La.column]===null&&(lh=Math.max(lh-ko,0))}}In(De);var Cu=Mn.alloc(),xl=Xn(),Os=Xn();if(et=je.length,et!==0){for(var rc=0;rc<ii;rc++)if(ie[rc]){xi=ie[rc].length;var Jd=a.Fb(rc);xl[rc]=Jd.actual;for(var ic=0;ic<xi;ic++)if(ie[rc][ic]){var Wv=a.Eb(ic);Os[ic]=Wv.actual}}}for(var Qd=0;Qd<et;Qd++){var to=je[Qd];if(to.visible||to===ah){var hl=a.Fb(to.row),Zs=a.Eb(to.column);switch(Io.h(Math.max(Zs.minimum,Math.min(y,Zs.maximum)),Math.max(hl.minimum,Math.min(x,hl.maximum))),da=fl(to,hl,Zs,!1),da){case vn:Os[Zs.index]!==0&&(Io.width=Math.min(Io.width,Os[Zs.index])),xl[hl.index]!==0&&(Io.height=Math.min(Io.height,xl[hl.index]));break;case Jn:Os[Zs.index]!==0&&(Io.width=Math.min(Io.width,Os[Zs.index]));break;case ir:xl[hl.index]!==0&&(Io.height=Math.min(Io.height,xl[hl.index]))}isFinite(Zs.width)&&(Io.width=Zs.width),isFinite(hl.height)&&(Io.height=hl.height),Cu.h(0,0);for(var Hv=Zs.minimum,ls=hl.minimum,hh=1;hh<to.rowSpan&&!(to.row+hh>=a.rowCount);hh++)fn=a.Fb(to.row+hh),ko=0,ko=da===vn||da===ir?Math.max(fn.minimum,xl[to.row+hh]===0?fn.maximum:Math.min(xl[to.row+hh],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),Cu.height+=ko,ls+=fn.minimum;for(var Xs=1;Xs<to.columnSpan&&!(to.column+Xs>=a.columnCount);Xs++)fn=a.Eb(to.column+Xs),ko=0,ko=da===vn||da===Jn?Math.max(fn.minimum,Os[to.column+Xs]===0?fn.maximum:Math.min(Os[to.column+Xs],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),Cu.width+=ko,Hv+=fn.minimum;Io.width+=Cu.width,Io.height+=Cu.height;var $d=to.margin,oc=$d.right+$d.left,Ag=$d.top+$d.bottom;to.measure(Io.width,Io.height,Hv,ls);for(var qd=to.measuredBounds,Il=Math.max(qd.width+oc,0),Hc=Math.max(qd.height+Ag,0),ac=0,tp=0;tp<to.rowSpan&&!(to.row+tp>=a.rowCount);tp++)fn=a.Fb(to.row+tp),ac+=fn.total||0;if(ac<Hc){var ch=Hc-ac,au=Hc-ac;if(to.spanAllocation!==null)for(var fh=to.spanAllocation,ku=0;ku<to.rowSpan&&!(0>=ch)&&!(to.row+ku>=a.rowCount);ku++){fn=a.Fb(to.row+ku);var dh=fn.oa||0,Vc=fh(to,fn,au);fn.actual=Math.min(fn.maximum,dh+Vc),fn.oa!==dh&&(ch-=fn.oa-dh)}for(;0<ch;){var wl=fn.oa||0;if(isNaN(fn.height)&&fn.maximum>wl&&(fn.actual=Math.min(fn.maximum,wl+ch),fn.oa!==wl&&(ch-=fn.oa-wl)),fn.index===0)break;fn=a.Fb(fn.index-1)}}for(var Rf=0,ph=0;ph<to.columnSpan&&!(to.column+ph>=a.columnCount);ph++)fn=a.Eb(to.column+ph),Rf+=fn.total||0;if(Rf<Il){var _f=Il-Rf,Wy=Il-Rf;if(to.spanAllocation!==null)for(var Eu=to.spanAllocation,Kc=0;Kc<to.columnSpan&&!(0>=_f)&&!(to.column+Kc>=a.columnCount);Kc++){fn=a.Eb(to.column+Kc);var Ng=fn.oa||0,Hy=Eu(to,fn,Wy);fn.actual=Math.min(fn.maximum,Ng+Hy),fn.oa!==Ng&&(_f-=fn.oa-Ng)}for(;0<_f;){var Vv=fn.oa||0;if(isNaN(fn.width)&&fn.maximum>Vv&&(fn.actual=Math.min(fn.maximum,Vv+_f),fn.oa!==Vv&&(_f-=fn.oa-Vv)),fn.index===0)break;fn=a.Eb(fn.index-1)}}}}In(je),Mn.free(Cu),Mn.free(Io),xl!==void 0&&In(xl),Os!==void 0&&In(Os);var zf=0,Gf=0,Kv=a.desiredSize,gx=a.maxSize;da=Ra(a,!0);var jg=wu=iu=0,Og=0;et=a.columnCount;for(var Zv=0;Zv<et;Zv++)Pn[Zv]!==void 0&&(fn=a.Eb(Zv),isFinite(fn.width)?(jg+=fn.width,jg+=fn.Wc()):Mm(fn)===Hp?(jg+=fn.oa,jg+=fn.Wc()):fn.oa!==0&&(iu+=fn.oa,iu+=fn.Wc()));isFinite(Kv.width)?zf=Math.min(Kv.width,gx.width):zf=da!==pn&&isFinite(y)?y:iu,zf=Math.max(zf,a.minSize.width),zf=Math.max(zf-jg,0);for(var $x=iu===0?1:Math.max(zf/iu,1),Xv=0;Xv<et;Xv++)Pn[Xv]!==void 0&&(fn=a.Eb(Xv),isFinite(fn.width)||Mm(fn)===Hp||(fn.actual=fn.oa*$x),fn.position=E.width,fn.oa!==0&&(E.width+=fn.oa,E.width+=fn.Wc()));et=a.rowCount;for(var Yv=0;Yv<et;Yv++)Bn[Yv]!==void 0&&(fn=a.Fb(Yv),isFinite(fn.height)?(Og+=fn.height,Og+=fn.Wc()):Mm(fn)===Hp?(Og+=fn.oa,Og+=fn.Wc()):fn.oa!==0&&(wu+=fn.oa,wu+=fn.Wc()));isFinite(Kv.height)?Gf=Math.min(Kv.height,gx.height):Gf=da!==pn&&isFinite(x)?x:wu,Gf=Math.max(Gf,a.minSize.height),Gf=Math.max(Gf-Og,0);for(var qx=wu===0?1:Math.max(Gf/wu,1),Jv=0;Jv<et;Jv++)Bn[Jv]!==void 0&&(fn=a.Fb(Jv),isFinite(fn.height)||Mm(fn)===Hp||(fn.actual=fn.oa*qx),fn.position=E.height,fn.oa!==0&&(E.height+=fn.oa,E.height+=fn.Wc()));et=st.length;for(var Vy=0;Vy<et;Vy++){var Fg=st[Vy],Ky=0,Zy=0;Fg.type===xn.TableRow?(Ky=E.width,fn=a.Fb(Fg.row),Zy=fn.actual):(fn=a.Eb(Fg.column),Ky=fn.actual,Zy=E.height),Fg.measuredBounds.h(0,0,Ky,Zy),fo(Fg,!1)}In(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 _t=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 Jt=Math.min(a.leftIndex,yt-1);if(0<st.length){for(;Jt!==yt&&(st[Jt]===void 0||st[Jt].oa===0);)Jt++;Jt=Math.max(Math.min(Jt,yt-1),0),_t=-st[Jt].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 Pe=0;Pe<y.length;Pe++){var Ne=y[Pe];if(Ne instanceof xn&&Ne.visible&&Ju(Ne)){if(Ne.type===xn.TableRow){st=a.Fb(Ne.row);var je=a.Eb(Ee)}else st=a.Fb(ie),je=a.Eb(Ne.column);ht=st.position+Mt+E,st.oa!==0&&(ht+=st.Io(Math.max(ie,Zt))),st=je.position+_t+et,je.oa!==0&&(st+=je.Io(Math.max(Ee,Jt))),je=Ne.measuredBounds,Ne.Uk(),Ne.actualBounds.ka();var De=Ne.actualBounds,_e=on.allocAt(De.x,De.y,De.width,De.height);De.x=Ne.type===xn.TableRow?et:st,De.y=Ne.type===xn.TableColumn?E:ht,De.width=je.width,De.height=je.height,Ne.actualBounds.freeze(),Zl(Ne,!1),bl(_e,De)||yt===null||(yt.oh(),Ne.Pn(yt)),on.free(_e)}}for(Pe=Mn.alloc(),Ne=0;Ne<pt;Ne++)if(nt[Ne]){for(yt=nt[Ne].length,je=a.Fb(Ne),ht=je.position+Mt+E,je.oa!==0&&(ht+=je.Io(Math.max(ie,Zt))),De=0;De<yt;De++)if(nt[Ne][De]){_e=a.Eb(De),st=_e.position+_t+et,_e.oa!==0&&(st+=_e.Io(Math.max(Ee,Jt)));for(var Je=nt[Ne][De],Tn=Je.length,_n=0;_n<Tn;_n++){var Bn=Je[_n],Pn=Bn.measuredBounds;Pe.h(0,0);for(var fn=1;fn<Bn.rowSpan&&!(Ne+fn>=a.rowCount);fn++){var yr=a.Fb(Ne+fn);yr.oa!==0&&(Pe.height+=yr.total)}for(fn=1;fn<Bn.columnSpan&&!(De+fn>=a.columnCount);fn++)yr=a.Eb(De+fn),yr.oa!==0&&(Pe.width+=yr.total);var hr=_e.oa+Pe.width,ii=je.oa+Pe.height;fn=st,yr=ht;var xi=hr,Co=ii,To=st,ca=ht,ko=hr,ah=ii;st+hr>x.width&&(ko=Math.max(x.width-st,0)),ht+ii>x.height&&(ah=Math.max(x.height-ht,0));var lo=Bn.alignment;if(lo.Xb()){lo=a.defaultAlignment,lo.sb()||(lo=ei);var vl=lo.x,fa=lo.y,sh=lo.offsetX;lo=lo.offsetY;var xs=_e.alignment,Ks=je.alignment;xs.sb()&&(vl=xs.x,sh=xs.offsetX),Ks.sb()&&(fa=Ks.y,lo=Ks.offsetY)}else vl=lo.x,fa=lo.y,sh=lo.offsetX,lo=lo.offsetY;(isNaN(vl)||isNaN(fa))&&(fa=vl=.5,lo=sh=0),xs=Pn.width,Ks=Pn.height;var os=Bn.margin,Ka=os.left+os.right,qh=os.top+os.bottom,yl=fl(Bn,je,_e,!1);!isNaN(Bn.desiredSize.width)||yl!==vn&&yl!==Jn||(xs=Math.max(hr-Ka,0)),!isNaN(Bn.desiredSize.height)||yl!==vn&&yl!==ir||(Ks=Math.max(ii-qh,0)),hr=Bn.maxSize,ii=Bn.minSize,xs=Math.min(hr.width,xs),Ks=Math.min(hr.height,Ks),xs=Math.max(ii.width,xs),Ks=Math.max(ii.height,Ks),hr=Ks+qh,fn+=xi*vl-(xs+Ka)*vl+sh+os.left,yr+=Co*fa-hr*fa+lo+os.top,Bn.visible&&(Ro(To,ca,ko,ah,fn,yr,Pn.width,Pn.height)?Bn.arrange(fn,yr,xs,Ks):Bn.arrange(fn,yr,xs,Ks,new on(To,ca,ko,ah)))}}}for(Mn.free(Pe),a=0;a<b;a++)x=y[a],et=x instanceof xn?x:null,et!==null&&Ju(et)&&(et=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,et.width,et.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}Ve(ym,yo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Ve(Sm,yo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Ve(xm,yo),xm.prototype.measure=function(a,y,x,b,E,et,nt){1<b.length&&Oe("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 _t=Math.max(y-pt,0),Zt=Math.max(x-ht,0),Jt=1;a.viewboxStretch===Hn?Mt!==0&&st!==0&&(Jt=Math.min(_t/Mt,Zt/st)):Mt!==0&&st!==0&&(Jt=Math.max(_t/Mt,Zt/st)),Jt===0&&(Jt=1e-4),b.Ca*=Jt,yt!==b.scale&&(fo(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=ei),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"}Ve(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,_t=Mt.x;Mt=Mt.y,y.save(),y.beginPath(),y.rect(0,0,st,ht),y.clip(),y.Se();for(var Zt=[],Jt=a.O.s,ie=Jt.length,Ee=0;Ee<ie;Ee++){var Pe=Jt[Ee],Ne=[];if(Zt.push(Ne),Pe.visible){var je=Pe.interval;if(!(0>je)){Pe=m0(Pe.figure);for(var De=0;De<ie;De++)if(De!==Ee){var _e=Jt[De];_e.visible&&m0(_e.figure)===Pe&&(_e=_e.interval,_e>je&&Ne.push(_e))}}}}for(Jt=a.O.s,ie=Jt.length,Ee=0;Ee<ie;Ee++){var Je=Jt[Ee];if(Je.visible&&(Ne=Je.interval||1,Pe=Math.abs(Ne),!(2>E*Pe*x))){if(je=Je.segmentIndex,(!isFinite(je)||isNaN(je))&&(je=0),0>je&&(je=Pe-Math.min(-je,Pe)),je=Math.round(je%Pe),Pe=Je.opacity,De=1,Pe!==1){if(Pe===0)continue;De=y.globalAlpha,y.globalAlpha=De*Pe}_e=Zt[Ee];var Tn=!1,_n=Je.strokeDashArray;if(_n!==null&&(Tn=!0,y.js(_n,Je.strokeDashOffset)),Je.figure==="LineV"&&Je.stroke!==null&&0<Je.strokeWidth){for(y.lineWidth=Je.strokeWidth,Yi(a,y,Je.stroke,!1,!1,et,nt),y.beginPath(),_n=Je=Math.floor((_t-E)/E);_n<=Je+pt;_n++){var Bn=_n*E+_t;0<=Bn&&Bn<=st&&wm(_n,Ne,je,_e)&&(y.moveTo(Bn,0),y.lineTo(Bn,ht))}y.stroke(),y.Se()}else if(Je.figure==="LineH"&&Je.stroke!==null&&0<Je.strokeWidth){for(y.lineWidth=Je.strokeWidth,Yi(a,y,Je.stroke,!1,!1,et,nt),y.beginPath(),_n=Je=Math.floor((Mt-b)/b);_n<=Je+yt;_n++)Bn=_n*b+Mt,0<=Bn&&Bn<=ht&&wm(_n,Ne,je,_e)&&(y.moveTo(0,Bn),y.lineTo(st,Bn));y.stroke(),y.Se()}else if(Je.figure==="BarV"&&Je.fill!==null)for(Yi(a,y,Je.fill,!0,!1,et,nt),Je=Je.width,isNaN(Je)&&(Je=E),Bn=_n=Math.floor((_t-E)/E);Bn<=_n+pt;Bn++){var Pn=Bn*E+_t;0<=Pn+Je&&Pn<=st&&wm(Bn,Ne,je,_e)&&y.fillRect(Pn,0,Je,ht)}else if(Je.figure==="BarH"&&Je.fill!==null)for(Yi(a,y,Je.fill,!0,!1,et,nt),Je=Je.height,isNaN(Je)&&(Je=b),Bn=_n=Math.floor((Mt-b)/b);Bn<=_n+yt;Bn++)Pn=Bn*b+Mt,0<=Pn+Je&&Pn<=ht&&wm(Bn,Ne,je,_e)&&y.fillRect(0,Pn,st,Je);Tn&&y.fs(),Pe!==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"}Ve(bm,yo),bm.prototype.measure=function(a,y,x,b,E){var et=b.length;if(a instanceof $r||a instanceof Cn){var nt=null,st=null;if(a instanceof Cn&&(nt=a),a instanceof $r&&(st=a,nt=st.adornedPart,a.j===null&&(a.j=[])),nt instanceof Cn){var ht=nt;if(et===0)xo(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pt=a instanceof $r?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 _t=y.height,Zt=a.j;if(Zt.length=0,pt!==null){i1(a,st,_t,pt);var Jt=pt.measuredBounds;x.ed(Jt),Zt.push(Jt)}Jt=Cr.alloc();for(var ie=Me.alloc(),Ee=Me.alloc(),Pe=0;Pe<et;Pe++){var Ne=b[Pe];if(Ne!==pt)if(Ne.isPanelMain&&Ne instanceof kr){i1(a,st,_t,Ne);var je=Ne.measuredBounds;x.ed(je),Zt.push(je)}else if(2>Mt)Ne.measure(1/0,1/0,0,0),je=Ne.measuredBounds,x.ed(je),Zt.push(je);else{var De=Ne.segmentIndex,_e=Ne.segmentFraction,Je=Ne.alignmentFocus;Je.Mc()&&(Je=ei);var Tn=Ne.segmentOrientation,_n=Ne.segmentOffset;if(isNaN(De)){var Bn=ht.ua;je=Xn(),Bn.Qu(_e,je);var Pn=Me.allocAt(je[0],je[1]);if(Pn.add(ht.i(0)),Bn.type===kn.j?Pn.offset(-Bn.startX,-Bn.startY):(Bn=Bn.figures.first(),Bn!==null&&Pn.offset(-Bn.startX,-Bn.startY)),Bn=je[2],Tn!==Ca){var fn=ht.computeAngle(Ne,Tn,Bn);Ne.Kb=fn}fn=Pn.x-y.x;var yr=Pn.y-y.y;Me.free(Pn),In(je)}else if(De<-Mt||De>=Mt)je=Me.alloc(),ht.vg(),ht.computeMidPoint(je),Bn=ht.midAngle,Tn!==Ca&&(fn=ht.computeAngle(Ne,Tn,Bn),Ne.Kb=fn),fn=je.x-y.x,yr=je.y-y.y,Me.free(je);else{if(fn=0,0<=De?(yr=yt.M(De),je=De<Mt-1?yt.M(De+1):yr):(fn=Mt+De,yr=yt.M(fn),je=0<fn?yt.M(fn-1):yr),yr.Xa(je)){0<=De?(Bn=0<De?yt.M(De-1):yr,fn=De<Mt-2?yt.M(De+2):je):(Bn=fn<Mt-1?yt.M(fn+1):yr,fn=1<fn?yt.M(fn-2):je),Pn=Bn.Bf(yr);var hr=je.Bf(fn);Bn=Pn>hr+10?0<=De?Bn.ab(yr):yr.ab(Bn):hr>Pn+10?0<=De?je.ab(fn):fn.ab(je):0<=De?Bn.ab(fn):fn.ab(Bn)}else Bn=0<=De?yr.ab(je):je.ab(yr);Tn!==Ca&&(fn=ht.computeAngle(Ne,Tn,Bn),Ne.Kb=fn),fn=yr.x+(je.x-yr.x)*_e-y.x,yr=yr.y+(je.y-yr.y)*_e-y.y}Ne.measure(1/0,1/0,0,0),je=Ne.measuredBounds,Pn=Ne.naturalBounds;var ii=0;Ne instanceof kr&&(ii=Ne.strokeWidth),hr=Pn.width+ii;var xi=Pn.height+ii;Jt.reset(),Jt.translate(-je.x,-je.y),Jt.scale(Ne.scale,Ne.scale),Jt.rotate(Tn===Ca?Ne.angle:Bn,hr/2,xi/2),Tn!==tg&&Tn!==ng||Jt.rotate(90,hr/2,xi/2),Tn!==eg&&Tn!==rg||Jt.rotate(-90,hr/2,xi/2),Tn===$m&&(45<Bn&&135>Bn||225<Bn&&315>Bn)&&Jt.rotate(-Bn,hr/2,xi/2),Pn=new on(0,0,hr,xi),ie.xi(Pn,Je),Jt.Ga(ie),Je=-ie.x+ii/2*Ne.scale,Ne=-ie.y+ii/2*Ne.scale,Ee.assign(_n),ii=isNaN(_n.x);var Co=isNaN(_n.y);if(ii||Co){hr=hr/2+3,xi=xi/2+3;var To=45<=Bn&&135>=Bn,ca=225<=Bn&&315>=Bn;Tn===Ca&&(To||ca)?(Ee.x=Co?hr:_n.y,Ee.y=ii?xi:_n.x,To?0<=De||isNaN(De)&&.5>_e||!ii||(Ee.y=-xi):ca&&((0<=De||isNaN(De)&&.5>_e)&&ii&&(Ee.y=-xi),Co&&(Ee.x=-hr))):(ii&&(Ee.x=0<=De||isNaN(De)&&.5>_e?hr:-hr),Co&&(Ee.y=-xi),Ee.rotate(Bn))}else Ee.rotate(Bn);fn+=Ee.x,yr+=Ee.y,Pn.set(je),Pn.h(fn+Je,yr+Ne,je.width,je.height),Zt.push(Pn),x.ed(Pn)}}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),xo(E,x.width||0,x.height||0),Cr.free(Jt),Me.free(ie),Me.free(Ee)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof $r||a instanceof Cn){var b=a,E=null;a instanceof $r&&(E=a,b=E.adornedPart);var et=a instanceof $r?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 Cn)for(et=a.labelNodes;et.next();){var Mt=a;nt=et.value,st=nt.segmentIndex,ht=nt.segmentFraction;var _t=nt.alignmentFocus;if(pt=nt.segmentOrientation,yt=nt.segmentOffset,isNaN(st)){var Zt=Mt.ua,Jt=Xn();Zt.Qu(ht,Jt);var ie=Me.allocAt(Jt[0],Jt[1]);ie.add(Mt.i(0)),Zt.type===kn.j||(Zt=Zt.figures.first()),ie.offset(-Zt.startX,-Zt.startY),Zt=Jt[2],pt!==Ca&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=ie.x;var Ee=ie.y;Me.free(ie),In(Jt)}else if(st<-x||st>=x)Jt=Me.alloc(),Zt=Mt,Ee=Jt,Zt.vg(),Zt.computeMidPoint(Ee),Zt=Mt.midAngle,pt!==Ca&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Jt.x,Ee=Jt.y,Me.free(Jt);else{if(ie=0,0<=st?(Jt=y.s[st],Ee=st<x-1?y.s[st+1]:Jt):(ie=x+st,Jt=y.s[ie],Ee=0<ie?y.s[ie-1]:Jt),Jt.Xa(Ee)){0<=st?(Zt=0<st?y.s[st-1]:Jt,ie=st<x-2?y.s[st+2]:Ee):(Zt=ie<x-1?y.s[ie+1]:Jt,ie=1<ie?y.s[ie-2]:Ee);var Pe=Zt.Bf(Jt),Ne=Ee.Bf(ie);Zt=Pe>Ne+10?0<=st?Zt.ab(Jt):Jt.ab(Zt):Ne>Pe+10?0<=st?Ee.ab(ie):ie.ab(Ee):0<=st?Zt.ab(ie):ie.ab(Zt)}else Zt=0<=st?Jt.ab(Ee):Ee.ab(Jt);pt!==Ca&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Jt.x+(Ee.x-Jt.x)*ht,Ee=Jt.y+(Ee.y-Jt.y)*ht}if(_t.ys())nt.location=new Me(Mt,Ee);else{_t.Mc()&&(_t=ei),Jt=Cr.alloc(),Jt.reset(),Jt.scale(nt.scale,nt.scale),Jt.rotate(nt.angle,0,0);var je=nt.naturalBounds;ie=on.allocAt(0,0,je.width,je.height),Pe=Me.alloc(),Pe.xi(ie,_t),Jt.Ga(Pe),_t=-Pe.x,Ne=-Pe.y;var De=je.width,_e=je.height;je=Me.alloc(),je.assign(yt);var Je=isNaN(yt.x),Tn=isNaN(yt.y);if(Je||Tn){De=De/2+3,_e=_e/2+3;var _n=45<=Zt&&135>=Zt,Bn=225<=Zt&&315>=Zt;pt===Ca&&(_n||Bn)?(je.x=Tn?De:yt.y,je.y=Je?_e:yt.x,_n?0<=st||isNaN(st)&&.5>ht||!Je||(je.y=-_e):Bn&&((0<=st||isNaN(st)&&.5>ht)&&Je&&(je.y=-_e),Tn&&(je.x=-De))):(Je&&(je.x=0<=st||isNaN(st)&&.5>ht?De:-De),Tn&&(je.y=-_e),je.rotate(Zt))}else je.rotate(Zt);Mt+=je.x,Ee+=je.y,Jt.pp(ie),_t+=ie.x,Ne+=ie.y,st=Me.allocAt(Mt+_t,Ee+Ne),nt.move(st),Me.free(st),Me.free(je),Me.free(Pe),on.free(ie),Cr.free(Jt)}}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(ms(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof $r&&a.type===xn.Link&&a.adornedObject instanceof kr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Cn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof $r&&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),fo(b,!1)}}function Up(){this.xa="Base"}Ve(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,_t=new on(-ht.left,-ht.top,Math.max(Mt.width+pt,0),Math.max(Mt.height+yt,0));a.graduatedBounds.push(_t),E.assign(_t);for(var Zt=st.geometry,Jt=st.strokeWidth,ie=Zt.flattenedSegments,Ee=Zt.flattenedLengths,Pe=Zt.flattenedTotalLength,Ne=ie.length,je=0,De=0,_e=Xn(),Je=0;Je<Ne;Je++){var Tn=ie[Je],_n=[];De=je=0;for(var Bn=Tn.length,Pn=0;Pn<Bn;Pn+=2){var fn=Tn[Pn],yr=Tn[Pn+1];if(Pn!==0){var hr=180*Math.atan2(yr-De,fn-je)/Math.PI;0>hr&&(hr+=360),_n.push(hr)}je=fn,De=yr}_e.push(_n)}if(a.graduatedIntervals===null){for(var ii=[],xi=a.O.s,Co=xi.length,To=0;To<Co;To++){var ca=xi[To],ko=[];if(ii.push(ko),ca.visible){var ah=ca.interval;if(!(0>ah)){for(var lo=0;lo<Co;lo++)if(lo!==To){var vl=xi[lo];if(vl.visible&&ca.constructor===vl.constructor){var fa=vl.interval;fa>ah&&ko.push(fa)}}}}}a.graduatedIntervals=ii}var sh=a.graduatedIntervals,xs=a.O.s,Ks=xs.length,os=0,Ka=0,qh=Pe;a.graduatedMarks=[];for(var yl,Vd=0;Vd<Ks;Vd++){var as=xs[Vd];if(yl=[],as.visible&&as!==st){var da=Math.abs(as.interval),Mg=a.graduatedTickUnit;if(!(2>Mg*da*Pe/a.graduatedRange&&as.graduatedSkip===null)){var Ff=Ee[0][0],Fl=0,Za=0;Ka=Pe*as.graduatedStart-1e-4,qh=Pe*as.graduatedEnd+1e-4;var zc=Mg*da,ss=a.graduatedTickBase;if(ss<a.graduatedMin){var tc=(a.graduatedMin-ss)/zc;tc=tc%1===0?tc:Math.floor(tc+1),ss+=tc*zc}else ss>a.graduatedMin+zc&&(ss-=Math.floor((ss-a.graduatedMin)/zc)*zc);for(var zv=sh[Vd],Tg=ss,Gy=1e-6*a.graduatedMax,iu=1;ss<=a.graduatedMax+Gy;iu++){t:{for(var wu=zv.length,Df=0;Df<wu;Df++){var ec=(ss-a.graduatedTickBase)%(zv[Df]*a.graduatedTickUnit),Kd=1e-6*a.graduatedTickUnit;if(ec<Kd&&ec>-Kd){var nc=!1;break t}}nc=!0}if(nc&&(ss>a.graduatedMax&&(ss=a.graduatedMax),as.graduatedSkip===null||as instanceof wi&&!as.graduatedSkip(ss,as)||as instanceof kr&&!as.graduatedSkip(ss,as))&&(os=(ss-a.graduatedMin)*Pe/a.graduatedRange,os>Pe&&(os=Pe),Ka<=os&&os<=qh)){for(var ou=_e[Fl][Za],lh=Ee[Fl][Za];Fl<Ee.length;){for(;os>Ff&&Za<Ee[Fl].length-1;)Za++,ou=_e[Fl][Za],lh=Ee[Fl][Za],Ff+=lh;if(os<=Ff)break;Fl++,Za=0,ou=_e[Fl][Za],lh=Ee[Fl][Za],Ff+=lh}var Xa=ie[Fl],Dl=Xa[2*Za],Gv=Xa[2*Za+1],bu=(os-(Ff-lh))/lh,Zd=new Me(Dl+(Xa[2*Za+2]-Dl)*bu+Jt/2-Zt.bounds.x,Gv+(Xa[2*Za+3]-Gv)*bu+Jt/2-Zt.bounds.y);Zd.scale(st.scale,st.scale);t:{var Sl=ou,Gc=_e[Fl];if(!(.5005>bu&&.4995<bu)){var Bl=Sl;if(.5>bu?0<Za?Bl=Gc[Za-1]:Ue.$(Xa[0],Xa[Xa.length-2])&&Ue.$(Xa[1],Xa[Xa.length-1])&&(Bl=Gc[Gc.length-1]):.5<bu&&(Za+1<Gc.length?Bl=Gc[Za+1]:Ue.$(Xa[0],Xa[Xa.length-2])&&Ue.$(Xa[1],Xa[Xa.length-1])&&(Bl=Gc[0])),Sl!==Bl){var Bf=Math.abs(Sl-Bl);if(180<Bf&&(Sl<Bl?Sl+=360:Bl+=360,Bf=Math.abs(Sl-Bl)),5e-4>bu||.9995<bu){ou=(Sl+Bl)/2%360;break t}if(10>Bf){var Xd=1-Math.abs(.5-bu);ou=(Sl*Xd+Bl*(1-Xd))%360;break t}}}ou=Sl}if(as instanceof wi){var ul="";as.graduatedFunction!==null?(ul=as.graduatedFunction(ss,as),ul=ul!=null?ul.toString():""):ul=(+ss.toFixed(2)).toString(),ul!==""&&yl.push({$l:Zd,angle:ou,text:ul})}else yl.push({$l:Zd,angle:ou})}ss=Tg+iu*zc}}}a.graduatedMarks.push(yl)}In(_e);var Io=a.graduatedMarks;if(Io!==null)for(var Lg=b.length,La=0;La<Lg;La++){var uo=b[La],Aa=Io[La];if(uo.visible&&uo!==st&&Aa.length!==0){if(uo instanceof kr){var Pu=a,uh=E,Uc=uo.alignmentFocus;Uc.Mc()&&(Uc=$i);var Uy=uo.angle;uo.Kb=0,uo.measure(1/0,1/0,0,0),uo.Kb=Uy;var Uv=uo.measuredBounds,Yd=Uv.width,Wc=Uv.height,If=on.allocAt(0,0,Yd,Wc),Ya=Me.alloc();Ya.xi(If,Uc),on.free(If);for(var Cu=-Ya.x,xl=-Ya.y,Os=new on,rc=Aa.length,Jd=0;Jd<rc;Jd++)for(var ic=Aa[Jd],Wv=ic.$l.x,Qd=ic.$l.y,to=ic.angle,hl=0;4>hl;hl++){switch(hl){case 0:Ya.h(Cu,xl);break;case 1:Ya.h(Cu+Yd,xl);break;case 2:Ya.h(Cu,xl+Wc);break;case 3:Ya.h(Cu+Yd,xl+Wc)}Ya.rotate(to+uo.angle),Ya.offset(Wv,Qd),Jd===0&&hl===0?Os.h(Ya.x,Ya.y,0,0):Os.Ye(Ya),Ya.offset(-Wv,-Qd),Ya.rotate(-to-uo.angle)}Me.free(Ya),Pu.graduatedBounds!==null&&Pu.graduatedBounds.push(Os),Xi(uh,Os.x,Os.y,Os.width,Os.height)}else if(uo instanceof wi){var Zs=a,Hv=E;Zs.temporaryTextBlock===null&&(Zs.temporaryTextBlock=new wi);var ls=Zs.temporaryTextBlock;S1(ls,uo);var hh=uo.alignmentFocus;hh.Mc()&&(hh=$i);for(var Xs=uo.segmentOrientation,$d=uo.segmentOffset,oc=new on,Ag=0,qd=0,Il=0,Hc=0,ac=0,tp=Aa.length,ch=0;ch<tp;ch++){var au=Aa[ch];Ag=au.$l.x,qd=au.$l.y,Il=au.angle,ac=Hc=uo.angle,Xs!==Ca&&(ac=Xs===qp||Xs===Qm?Il+uo.angle:Il,Hc=Cn.computeAngle(Xs,ac)),ls.Kb=Hc,ls.text=au.text||"",ls.measure(1/0,1/0,0,0);var fh=ls.measuredBounds,ku=ls.naturalBounds,dh=ku.width,Vc=ku.height,wl=Cr.alloc();wl.reset(),wl.translate(-fh.x,-fh.y),wl.scale(ls.scale,ls.scale),wl.rotate(ac,dh/2,Vc/2),Xs!==tg&&Xs!==ng||wl.rotate(90,dh/2,Vc/2),Xs!==eg&&Xs!==rg||wl.rotate(-90,dh/2,Vc/2),Xs===$m&&(45<Il&&135>Il||225<Il&&315>Il)&&wl.rotate(-Il,dh/2,Vc/2);var Rf=on.allocAt(0,0,dh,Vc),ph=Me.alloc();ph.xi(Rf,hh),wl.Ga(ph);var _f=-ph.x,Wy=-ph.y,Eu=Me.alloc();Eu.assign($d),isNaN(Eu.x)&&(Eu.x=dh/2+3),isNaN(Eu.y)&&(Eu.y=-(Vc/2+3)),Eu.rotate(Il),Ag+=Eu.x+_f,qd+=Eu.y+Wy;var Kc=new on(Ag,qd,fh.width,fh.height),Ng=new on(fh.x,fh.y,fh.width,fh.height),Hy=new on(ku.x,ku.y,ku.width,ku.height);au.Sz=Hc,au.lineCount=ls.lineCount,au.lines=[ls.Cb,ls.Ih,ls.df,ls.Le,ls.Qc,ls.Qb,ls.ze],au.actualBounds=Kc,au.measuredBounds=Ng,au.naturalBounds=Hy,ch===0?oc.assign(Kc):oc.ed(Kc),Me.free(Eu),Me.free(ph),on.free(Rf),Cr.free(wl)}Zs.graduatedBounds!==null&&Zs.graduatedBounds.push(oc),Xi(Hv,oc.x,oc.y,oc.width,oc.height)}fo(uo,!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 ns,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 _t=ht[Mt],Zt=pt[Mt],Jt=Zt.length;if(_t.visible&&_t!==et&&Zt.length!==0){if(_t instanceof kr){if(!(2>a.graduatedTickUnit*_t.interval*et.geometry.flattenedTotalLength/a.graduatedRange*nt&&_t.graduatedSkip===null)){var ie=_t.measuredBounds,Ee=_t.strokeWidth*_t.scale,Pe=_t.alignmentFocus;Pe.Mc()&&(Pe=$i);for(var Ne=0;Ne<Jt;Ne++){var je=Zt[Ne].$l,De=Zt[Ne].angle,_e=Pe,Je=_t.Ab;Je.reset(),Je.translate(je.x+st.x,je.y+st.y),Je.rotate(De+_t.angle,0,0),Je.translate(-ie.width*_e.x+_e.offsetX+Ee/2,-ie.height*_e.y+_e.offsetY+Ee/2),Je.scale(_t.scale,_t.scale),Gs(_t,!1),_t.wh.set(_t.Ab),_t.Kk=_t.scale,Es(_t,!1),_t.gc(y,x),E&&(a.svg.appendChild(_t.svg),_t.svg=null),_t.Ab.reset()}}}else if(_t instanceof wi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new wi),ie=a.temporaryTextBlock,S1(ie,_t),Ee=0;Ee<Jt;Ee++)Pe=Zt[Ee],Pe.actualBounds&&Pe.measuredBounds&&Pe.naturalBounds&&(ie.ec=Pe.text||"",ie.Kb=Pe.Sz||0,ie.Gc=Pe.lineCount||0,Ne=Pe.lines,Ne!==void 0&&(ie.Cb=Ne[0],ie.Ih=Ne[1],ie.df=Ne[2],ie.Le=Ne[3],ie.Qc=Ne[4],ie.Qb=Ne[5],ie.ze=Ne[6]),Pe.naturalBounds&&(ie.dc=Pe.naturalBounds),Pe.actualBounds&&(Ne=Pe.actualBounds,ie.arrange(Ne.x,Ne.y,Ne.width,Ne.height)),Ne=Pe.actualBounds,ie.arrange(Ne.x,Ne.y,Ne.width,Ne.height),je=Pe.measuredBounds,Pe=Pe.naturalBounds,De=ie.Ab,De.reset(),De.translate(Ne.x+st.x,Ne.y+st.y),De.translate(-je.x,-je.y),ie.no(De,Pe.x,Pe.y,Pe.width,Pe.height),Gs(ie,!1),ie.wh.set(ie.Ab),ie.Kk=ie.scale,Es(ie,!1),ie.Ng=_t.part,ie.Me=_t.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 xn(a,y){if(ze.call(this),this.na=null,a===void 0)this.na=xn.Position;else if(typeof a=="string"){var x=rl.I(a);x!==null&&(this.na=x)}else a instanceof yo?this.na=a:a&&(this.na=xn.Position,y=a);this.na===null&&Oe("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===xn.Grid?1048576:0),this.O=new wn,this.yb=Qa,this.Tm=Lo,this.Uf=wr,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Hn,this.jn=Bi,this.kn=Ji,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ve(xn,ze),xn.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},xn.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},xn.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 Ln&&(et.Te=!0);var st=a.diagram;st!==null&&st.undoManager.isUndoingRedoing||et.cb(io,"elements",a,null,E,null,nt)}}return a}return null},$t=xn.prototype,$t.toString=function(){return"Panel("+this.type.name+")#"+oi(this)},$t.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)},$t.hh=function(a,y){if(this.na===xn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===xn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===xn.Table)if(a.yc(),a instanceof ns){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===xn.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){Yi(a,y,Mt,!1,!1,nt,et),Mt=!1;var _t=pt.separatorDashArray;_t===null&&(_t=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),_t!==null&&(Mt=!0,y.js(_t,0)),y.beginPath(),_t=pt.position+yt,x?_t>nt.height&&(yt-=_t-nt.height):_t>nt.width&&(yt-=_t-nt.width),pt=pt.position+yt/2,y.lineWidth=yt,yt=a.yb,x?(pt+=yt.top,_t=nt.width-yt.right,y.moveTo(yt.left,pt),y.lineTo(_t,pt)):(pt+=yt.left,_t=nt.height-yt.bottom,y.moveTo(pt,yt.top),y.lineTo(pt,_t)),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 _t=x?nt.height:nt.width;if(!(Mt.position>_t)){var Zt=Mt.Wc(),Jt=Mt.separatorStrokeWidth;isNaN(Jt)&&(Jt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ie=Mt.separatorStroke;ie===null&&(ie=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ie===null||Mt.index===(x?ht:pt))&&(Jt=0),Zt-=Jt,Jt=Mt.position+Jt,Zt+=Mt.actual,Jt+Zt>_t&&(Zt=_t-Jt),0>=Zt||(_t=a.yb,Yi(a,y,Mt.background,!0,!1,st,nt),x?y.fillRect(_t.left,Jt+_t.top,nt.width-(_t.left+_t.right),Zt):y.fillRect(Jt+_t.left,_t.top,Zt,nt.height-(_t.top+_t.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"}$t.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},$t.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(this.type===xn.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===xn.Grid||this.na===xn.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},$t.nk=function(){return!0},$t.$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)},$t.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,_t=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,Ue.Ff(nt.left,nt.top,nt.right,nt.bottom,a,y,x,b,E);if(this.background!==null)return et=a*ht+y*yt+_t,st=a*pt+y*Mt+Zt,a=x*ht+b*yt+_t,ht=x*pt+b*Mt+Zt,E.h(0,0),x=this.naturalBounds,et=Ue.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=_t=0),st=a*ht+y*yt+_t,a=a*pt+y*Mt+Zt,ht=x*ht+b*yt+_t,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(),_t=null,y=1/0;var Jt=null,ie=this.isClipping&&this.na===xn.Spot;ie&&(Jt=Me.alloc(),_t=this.Pb(),(pt=_t.Sj(st,a,ht,x,Jt))&&(y=(st-Jt.x)*(st-Jt.x)+(a-Jt.y)*(a-Jt.y)));for(var Ee=0;Ee<Zt;Ee++){var Pe=Mt[Ee];Pe.visible&&Pe!==_t&&Pe.Sj(st,a,ht,x,yt)&&(pt=!0,Pe=(st-yt.x)*(st-yt.x)+(a-yt.y)*(a-yt.y),Pe<b&&(b=Pe,E.set(yt)))}return ie&&(y>b&&E.set(Jt),Me.free(Jt)),Me.free(yt),et&&E.transform(nt),pt},$t.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ze.prototype.Gj.call(this)},$t.v=function(a){if(!ms(this)){ze.prototype.v.call(this,a),a=null,(this.na===xn.Auto||this.na===xn.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 Pa||E instanceof xn||E instanceof wi||et!==pn)&&E.v(!0)}}}},$t.Uj=function(){if(!ms(this)){fo(this,!0),Zl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},$t.Uk=function(){if(!(this.l&2048)){Gs(this,!0),Es(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},$t.Wu=function(){Es(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},$t.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),xo(E,a,ht),xo(this.naturalBounds,a,ht),this.Ge(0,0,a,ht)},$t.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 yu(a){return a.part!==null?a.part.locationObject:null}$t.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=pn),a){case pn:(y>x||et>b)&&(this.v(),this.measure(y>x?x:y,et>b?b:et,0,0));break;case vn:this.v(!0),this.measure(x+st,b+nt,0,0);break;case Jn:this.v(!0),this.measure(x+st,et+nt,0,0);break;case ir:this.v(!0),this.measure(y+st,b+nt,0,0)}}this.na.arrange(this,E,this.jg)}},$t.gh=function(a){var y=this.naturalBounds,x=yu(this);if(Ro(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)&&(Br(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},$t.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},$t.qm=function(a,y){if(y(this,a),a instanceof xn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function jc(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 xn&&s1(a,et,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof xn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}$t.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof xn){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}$t.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 xn){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 xn?x=Math.max(x,h1(E)):E instanceof kr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}$t.se=function(){return!(this.type===xn.TableRow||this.type===xn.TableColumn)};function Ju(a){return a.type===xn.TableRow||a.type===xn.TableColumn}$t.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),wa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),et=this.se(),nt=et?a:Br(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),Ro(-(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===xn.Spot)?this.Pb():null,ht&&(pt.se()?Br(st.set(a),pt.transform):st.set(a),!pt.ca(st)))return Me.free(st),et||Me.free(nt),null;for(var Mt=yu(this);yt--;){var _t=E[yt];if((_t.visible||_t===Mt)&&(_t.se()?Br(st.set(a),_t.transform):st.set(a),!ht||_t!==pt)){var Zt=null;if(_t instanceof xn?Zt=_t.ic(st,y,x):_t.pickable===!0&&_t.ca(st)&&(Zt=_t),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=Ro(0,0,b.width,b.height,nt.x,nt.y)?this:null,et||Me.free(nt),a)}return et||Me.free(nt),null},$t.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:Br(Me.allocAt(a.x,a.y),this.transform);if(E=Ro(0,0,E.width,E.height,nt.x,nt.y),Ju(this)||E){if(!this.isAtomic){for(var st=this.O.s,ht=st.length,pt=Me.alloc(),yt=yu(this);ht--;){var Mt=st[ht];if(Mt.visible||Mt===yt){Mt.se()?Br(pt.set(a),Mt.transform):pt.set(a);var _t=Mt;Mt=Mt instanceof xn?Mt:null,(Mt!==null?Mt.ji(pt,y,x,b):_t.ca(pt))&&_t.pickable!==!1&&(y!==null&&(_t=y(_t)),_t===null||x!==null&&!x(_t)||b.add(_t))}}Me.free(pt)}return et||Me.free(nt),E&&(this.background!==null||this.areaBackground!==null)}return et||Me.free(nt),!1},$t.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=Cr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&Cr.free(nt),!0;if(this.Yc(a,nt)){if(!this.isAtomic)for(var st=yu(this),ht=this.O.s,pt=ht.length;pt--;){var yt=ht[pt];if(yt.visible||yt===st){var Mt=yt.actualBounds,_t=this.naturalBounds;Mt.x>_t.width||Mt.y>_t.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height||(Mt=yt,yt=yt instanceof xn?yt:null,_t=Cr.alloc(),_t.set(nt),(yt!==null?yt.Cf(a,y,x,b,E,_t):Po(Mt,a,b,_t))&&(y!==null&&(Mt=y(Mt)),Mt===null||x!==null&&!x(Mt)||E.add(Mt)),Cr.free(_t))}}return et===void 0&&Cr.free(nt),b}return et===void 0&&Cr.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 xn&&v0(nt,y,x,b),y!==null&&(nt=y(nt)),nt===null||x!==null&&!x(nt)||b.add(nt))}}}$t.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:Br(Me.allocAt(a.x,a.y),this.transform),pt=st?y:Br(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||ti(ht.x,ht.y,0,0,0,nt.height)<=yt||ti(ht.x,ht.y,0,nt.height,nt.width,nt.height)<=yt||ti(ht.x,ht.y,nt.width,nt.height,nt.width,0)<=yt||ti(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=yu(this);for(var _t=this.O.s,Zt=_t.length;Zt--;){var Jt=_t[Zt];if(Jt.visible||Jt===yt){var ie=Jt.actualBounds,Ee=this.naturalBounds;(!st||!(ie.x>Ee.width||ie.y>Ee.height||0>ie.x+ie.width||0>ie.y+ie.height))&&(Jt.se()?(ie=Jt.transform,Br(ht.set(a),ie),Br(pt.set(y),ie)):(ht.set(a),pt.set(y)),ie=Jt,Jt=Jt instanceof xn?Jt:null,(Jt!==null?Jt.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 kr&&(y=a.spot1,y===Lo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=vi),y}function S0(a){var y=null;return a instanceof kr&&(y=a.spot2,y===Lo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ja),y}$t.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},$t.M=function(a){return this.O.M(a)},$t.Gb=function(a,y){y instanceof tr&&Oe("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Oe("Cannot make a Panel contain itself: "+this.toString()),Oe("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Oe("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!==xn.Grid||y instanceof kr||Oe("Can only add Shapes to a Grid Panel, not: "+y),this.na!==xn.Graduated||y instanceof kr||y instanceof wi||Oe("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 or),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 Oe("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),ms(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof xn&&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 Ln&&(x.Te=!0),x.Te&&x instanceof Ln&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(vo,"elements",this,y,null,b,null),x.cb(io,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}$t.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)},$t.mb=function(a){0<=a&&this.pc(a,!0)},$t.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),fo(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 Ln&&(b instanceof xn?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))},$t.Fb=function(a){0>a&&En(a,">= 0",xn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new po;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(io,"rowdefs",this,null,x,null,a)}return y[a]},$t.oA=function(a){if(0>a&&En(a,">= 0",xn,"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 po?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}$t.Eb=function(a){0>a&&En(a,">= 0",xn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new po;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(io,"coldefs",this,null,x,null,a)}return y[a]},$t.jA=function(a){if(0>a&&En(a,">= 0",xn,"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 po?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}$t.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},$t.Hy=function(a,y){return(a=this.Fb(a))&&Em(a,new po(y)),this},$t.By=function(a,y){return(a=this.Eb(a))&&Em(a,new po(y)),this},$t.nz=function(a){if(0>a||this.type!==xn.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},$t.fz=function(a){if(0>a||this.type!==xn.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},$t.Fz=function(a,y){if(y===void 0&&(y=new Me(NaN,NaN)),this.type!==xn.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)},$t.Gz=function(a){if(this.type!==xn.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 Ws(a){var y=a.allBindings;if(y===null)a.data!==null&&Oe("Template cannot have .data be non-null: "+a),a.allBindings=y=new wn;else if(y._isFrozen)return;var x=new wn;x0(a,!1),a.qm(a,function(pt,yt){yt.th();var Mt=yt.localBindings;if(Mt!==null)for(Sf(yt,!1),Mt=Mt.iterator;Mt.next();){var _t=Mt.value;_t.mode===cg&&Sf(yt,!0);var Zt=_t.sourceName;Zt!==null&&(Zt==="/"&&x0(pt,!0),Zt=MS(_t,pt,yt),Zt!==null&&(x.add(Zt),Zt.srcBindings===null&&(Zt.srcBindings=new wn),Zt.srcBindings.add(_t))),y.add(_t)}if(yt instanceof xn&&yt.type===xn.Table){if(0<yt.rowCount){for(pt=yt.rowDefs,Mt=pt.length,_t=0;_t<Mt;_t++)if(Zt=pt[_t],Zt!==void 0&&Zt.be!==null)for(var Jt=Zt.be.iterator;Jt.next();){var ie=Jt.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(_t=yt[Mt],_t!==void 0&&_t.be!==null)for(Zt=_t.be.iterator;Zt.next();)Jt=Zt.value,Jt.xd=_t,Jt.to=1,Jt.wl=_t.index,y.add(Jt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Sf(E,!0);for(var et=E.srcBindings.iterator;et.next();){var nt=et.value;E.localBindings===null&&(E.localBindings=new wn),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 xn&&(nt=st.substring(0,ht),st=st.substr(ht+1),ht=et.fb(nt),ht!==null?(et=ht,E.targetProperty=st):Gn('Warning: unable to find GraphObject named "'+nt+'" for Binding: '+E.toString())),et instanceof po?(nt=oi(et.panel),E.Ai=nt===void 0?-1:nt,et.panel.bindingId=E.Ai):et instanceof ze?(nt=oi(et),E.Ai=nt===void 0?-1:nt,et.bindingId=E.Ai):Oe("Unknown type of binding target: "+et)}y.freeze(),a instanceof tr&&a.Zc()&&a.Va()}$t.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof xn&&(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&&Ws(y),y},$t.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 xn))continue;E===1?et=et.Eb(x.wl):E===2&&(et=et.Fb(x.wl))}et!==void 0&&x.Mv(et,b)}}},$t.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 xn&&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 xn)||et.data!==y[nt])return!0;E++,nt++}return!1}function Wp(a){if(a.type===xn.Spot||a.type===xn.Auto)return Math.min(a.O.length,1);if(a.type===xn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof kr&&b.isPanelMain))break}return x}return a.type===xn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof xn&&Ju(a))?1:0}$t.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 xn){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),ms(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 Ln&&(y.Te=!0),y.Te&&y instanceof Ln&&(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(Ws(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 or),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 xn){var E=y,et=x;b.type===xn.TableRow?b.row=E:b.type===xn.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=ro(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Oe("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,Gn('No item template Panel found for category "'+y+'" on '+a),Gn(" Using default item template."),a=new xn,y=new wi,y.bind(new so("text","",rr)),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 xn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var et=y[E];x&&et instanceof xn&&!et.isEnabled||km(a,et,x)}}}function jl(a,y){y.name=a,rl.add(a,y)}He.Object.defineProperties(xn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===xn.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&&En(a,">= 0",xn,"padding"),a=new Ar(a)):(0>a.left&&En(a.left,">= 0",xn,"padding:value.left"),0>a.right&&En(a.right,">= 0",xn,"padding:value.right"),0>a.top&&En(a.top,">= 0",xn,"padding:value.top"),0>a.bottom&&En(a.bottom,">= 0",xn,"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:Qa},set:function(a){typeof a=="number"&&(a=new Ar(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Ls),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 Ls),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 Ls),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)||Oe("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 Ls),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 Ls),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 Ls),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)||Oe("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 Ls),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 Ls),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||Oe("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Ll(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()||Oe("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Ll(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 Su),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),zo(this)&&(a=this.part,a!==null&&Mi(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new Su),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),zo(this)&&(a=this.part,a!==null&&Mi(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new Su),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 Su),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 Su,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 Su,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 Su,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 Su,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 Ls),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Ls),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 Ls),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 Ls),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)&&Oe("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ls),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)&&Oe("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ls),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 $r);Ws(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Cn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof 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 xf),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 or}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof tr||a.isPanelMain)&&Oe("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(););Mr(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&&(Mr(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 Sr&&(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))}}}),He.Object.defineProperties(xn,{Position:{get:function(){return rl.I("Position")}},Horizontal:{get:function(){return rl.I("Horizontal")}},Vertical:{get:function(){return rl.I("Vertical")}},Spot:{get:function(){return rl.I("Spot")}},Auto:{get:function(){return rl.I("Auto")}},Table:{get:function(){return rl.I("Table")}},Viewbox:{get:function(){return rl.I("Viewbox")}},TableRow:{get:function(){return rl.I("TableRow")}},TableColumn:{get:function(){return rl.I("TableColumn")}},Link:{get:function(){return rl.I("Link")}},Grid:{get:function(){return rl.I("Grid")}},Graduated:{get:function(){return rl.I("Graduated")}}}),xn.prototype.rebuildItemElements=xn.prototype.mv,xn.prototype.findItemPanelForData=xn.prototype.sx,xn.prototype.updateTargetBindings=xn.prototype.La,xn.prototype.copyTemplate=xn.prototype.Uy,xn.prototype.graduatedValueForPoint=xn.prototype.Gz,xn.prototype.graduatedPointForValue=xn.prototype.Fz,xn.prototype.findColumnForLocalX=xn.prototype.fz,xn.prototype.findRowForLocalY=xn.prototype.nz,xn.prototype.addColumnDefinition=xn.prototype.By,xn.prototype.addRowDefinition=xn.prototype.Hy,xn.prototype.addRowColumnDefinition=xn.prototype.Gy,xn.prototype.removeColumnDefinition=xn.prototype.jA,xn.prototype.getColumnDefinition=xn.prototype.Eb,xn.prototype.removeRowDefinition=xn.prototype.oA,xn.prototype.getRowDefinition=xn.prototype.Fb,xn.prototype.removeAt=xn.prototype.mb,xn.prototype.remove=xn.prototype.remove,xn.prototype.insertAt=xn.prototype.Gb,xn.prototype.elt=xn.prototype.M,xn.prototype.add=xn.prototype.add,xn.prototype.findObject=xn.prototype.fb,xn.prototype.findInVisualTree=xn.prototype.Nl,xn.prototype.walkVisualTreeFrom=xn.prototype.qm,xn.prototype.findMainElement=xn.prototype.Pb;var g1=!1,m1=null,rl=new or;xn.className="Panel",xn.definePanelLayout=jl,jl("Position",new fm),jl("Vertical",new pm),jl("Auto",new mm),jl("Link",new bm);function Su(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Su.prototype.copy=function(){var a=new Su;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},Su.className="GradPanelSettings";function Ls(){this.Pc=[],this.Oc=[],this.j=this.ob=Tm,this.hb=this.Hb=0,this.Qp=Qa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Ls.prototype.copy=function(a){for(var y=new Ls,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},Ls.className="TablePanelSettings";function po(a){Jr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Lo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=wr,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))}po.prototype.copy=function(){var a=new po;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=An(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=An(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}$t=po.prototype,$t.qb=function(a){a.classType===po&&(this.sizing=a)},$t.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+oi(this)},$t.wi=function(a){this.Me=a},$t.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)},$t.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===xn.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)},$t.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}$t.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new so(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Oe("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new wn),this.be.add(E),this},He.Object.defineProperties(po.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&&En(a,">= 0",po,"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&&En(a,">= 0",po,"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))&&En(a,">= 0",po,"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&&En(a,">= 0",po,"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 Ar(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&&bf(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)||Oe("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&&bf(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}}}),po.prototype.computeEffectiveSpacing=po.prototype.Wc,po.prototype.computeEffectiveSpacingTop=po.prototype.Io;var C0=new an(po,"Default",0),Hp=new an(po,"None",1),Tm=new an(po,"ProportionalExtra",2);po.className="RowColumnDefinition",po.Default=C0,po.None=Hp,po.ProportionalExtra=Tm;function kr(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)}Ve(kr,ze),kr.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=An(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 Oc(a){a.Na===null?a.Na=new M0:a.Na.nc&&(a.Na=a.Na.copy())}$t=kr.prototype,$t.th=function(){ze.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},$t.qb=function(a){a===pn||a===Hn||a===Ir||a===wr?this.geometryStretch=a:ze.prototype.qb.call(this,a)},$t.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+oi(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,_t,Zt,Jt,ie=0,Ee=Xn(),Pe=2;Pe<E;Pe+=2)pt=x[Pe],yt=x[Pe+1],Mt=pt-st,st=yt-ht,Mt===0&&(Mt=.001),_t=st/Mt,Zt=Math.atan2(st,Mt),Jt=Math.sqrt(Mt*Mt+st*st),Ee.push([Mt,Zt,_t,Jt]),ie+=Jt,st=pt,ht=yt;st=x[0],ht=x[1],Mt=b.measuredBounds.width,b instanceof kr&&(Mt-=b.strokeWidth),1>Mt&&(Mt=1),E=x=Mt,pt=nt/2,yt=pt!==0,Pe=0,Jt=Ee[Pe],Mt=Jt[0],Zt=Jt[1],_t=Jt[2],Jt=Jt[3];for(var Ne=0;.1<=ie;){if(Ne===0&&(yt?(E=x,E-=pt,ie-=pt,yt=!1):E=x,E===0&&(E=1)),E>ie){In(Ee);return}E>Jt?(Ne=E-Jt,E=Jt):Ne=0;var je=Math.sqrt(E*E/(1+_t*_t));if(0>Mt&&(je=-je),st+=je,ht+=_t*je,a.translate(st,ht),a.rotate(Zt),a.translate(-(nt/2),-(et/2)),Ne===0&&b.hh(a,y),a.translate(nt/2,et/2),a.rotate(-Zt),a.translate(-st,-ht),ie-=E,Jt-=E,Ne!==0){if(Pe++,Pe===Ee.length){In(Ee);return}Jt=Ee[Pe],Mt=Jt[0],Zt=Jt[1],_t=Jt[2],Jt=Jt[3],E=Ne}}In(Ee)}}$t.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&&Yi(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===xn.Link&&st instanceof $r&&st.category==="Selection"&&st.adornedObject instanceof kr&&st.adornedPart.Pb()===st.adornedObject?st.adornedObject.strokeWidth:0),ht===0&&(x=null),x!==null&&ht!==0&&(Yi(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===kn.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===kn.u){var pt=E.startX;ht=E.startY;var yt=E.endX,Mt=E.endY;E=Math.min(pt,yt);var _t=Math.min(ht,Mt);pt=Math.abs(yt-pt),ht=Math.abs(Mt-ht),a.beginPath(),a.rect(E,_t,pt,ht),b!==null&&a.ng(b),x!==null&&(st&&et&&Xl(a),a.jk(),st&&et&&gu(a)),a.Se()}else if(E.type===kn.F)pt=E.startX,ht=E.startY,yt=E.endX,Mt=E.endY,E=Math.abs(yt-pt)/2,_t=Math.abs(Mt-ht)/2,pt=Math.min(pt,yt)+E,ht=Math.min(ht,Mt)+_t,a.beginPath(),a.moveTo(pt,ht-_t),a.bezierCurveTo(pt+Ue.wg*E,ht-_t,pt+E,ht-Ue.wg*_t,pt+E,ht),a.bezierCurveTo(pt+E,ht+Ue.wg*_t,pt+Ue.wg*E,ht+_t,pt,ht+_t),a.bezierCurveTo(pt-Ue.wg*E,ht+_t,pt-E,ht+Ue.wg*_t,pt-E,ht),a.bezierCurveTo(pt-E,ht-Ue.wg*_t,pt-Ue.wg*E,ht-_t,pt,ht-_t),a.closePath(),b!==null&&a.ng(b),x!==null&&(st&&et&&Xl(a),a.jk(),st&&et&&gu(a)),a.Se();else if(E.type===kn.o)for(E=E.figures,ht=E.length,_t=0;_t<ht;_t++){pt=E.s[_t],a.beginPath(),a.moveTo(pt.startX,pt.startY),yt=pt.segments.s,Mt=yt.length;for(var Zt=null,Jt=0;Jt<Mt;Jt++){var ie=yt[Jt];switch(ie.type){case bo:a.moveTo(ie.endX,ie.endY);break;case ki:a.lineTo(ie.endX,ie.endY);break;case Wo:a.bezierCurveTo(ie.point1X,ie.point1Y,ie.point2X,ie.point2Y,ie.endX,ie.endY);break;case fs:a.quadraticCurveTo(ie.point1X,ie.point1Y,ie.endX,ie.endY);break;case ho: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=qa(ie,pt),Ee=Zt.length,Ee===0)a.lineTo(ie.centerX,ie.centerY);else for(var Pe=0;Pe<Ee;Pe++){var Ne=Zt[Pe];Pe===0&&a.lineTo(Ne[0],Ne[1]),a.bezierCurveTo(Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7])}break;case ws:if(Pe=Ee=0,Zt!==null&&Zt.type===ho){if(Zt=qa(Zt,pt),Ne=Zt.length,Ne===0){a.lineTo(ie.endX,ie.endY);break}Zt=Zt[Ne-1]||null,Zt!==null&&(Ee=Zt[6],Pe=Zt[7])}else Ee=Zt!==null?Zt.endX:pt.startX,Pe=Zt!==null?Zt.endY:pt.startY;if(Zt=Is(ie,pt,Ee,Pe),Ee=Zt.length,Ee===0){a.lineTo(ie.endX,ie.endY);break}for(Pe=0;Pe<Ee;Pe++)Ne=Zt[Pe],a.bezierCurveTo(Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7]);break;default:Oe("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&&Xl(a),a.jk(),yt&&st&&gu(a))):(Xl(a),yt&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk(),gu(a)):(yt&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk()),a.Se(_t)}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=Xn(),et.type===kn.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===kn.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,_t=E,pt=st.segments.s,yt=pt.length,Mt=0;Mt<yt;Mt++){switch(Jt=pt[Mt],Jt.type){case bo:Pd(a,y,b,x),b.length=0,b.push(Jt.endX),b.push(Jt.endY),nt=Jt.endX,E=Jt.endY,ht=nt,_t=E;break;case ki:b.push(Jt.endX),b.push(Jt.endY),nt=Jt.endX,E=Jt.endY;break;case Wo:Ue.Qe(nt,E,Jt.point1X,Jt.point1Y,Jt.point2X,Jt.point2Y,Jt.endX,Jt.endY,.5,b),nt=Jt.endX,E=Jt.endY;break;case fs:Ue.ep(nt,E,Jt.point1X,Jt.point1Y,Jt.endX,Jt.endY,.5,b),nt=Jt.endX,E=Jt.endY;break;case ho:if(ie=qa(Jt,st),Zt=ie.length,Zt===0){b.push(Jt.centerX),b.push(Jt.centerY),nt=Jt.centerX,E=Jt.centerY;break}for(Ee=0;Ee<Zt;Ee++)Pe=ie[Ee],Ue.Qe(nt,E,Pe[2],Pe[3],Pe[4],Pe[5],Pe[6],Pe[7],.5,b),nt=Pe[6],E=Pe[7];break;case ws:if(ie=Is(Jt,st,nt,E),Zt=ie.length,Zt===0){b.push(Jt.endX),b.push(Jt.endY),nt=Jt.endX,E=Jt.endY;break}for(Ee=0;Ee<Zt;Ee++)Pe=ie[Ee],Ue.Qe(nt,E,Pe[2],Pe[3],Pe[4],Pe[5],Pe[6],Pe[7],.5,b),nt=Pe[6],E=Pe[7];break;default:Oe("Segment not of valid type: "+Jt.type)}Jt.isClosed&&(b.push(ht),b.push(_t),Pd(a,y,b,x))}Pd(a,y,b,x)}else if(et.type===kn.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===kn.F){if(E=new wo,E.startX=et.endX,E.startY=(et.startY+et.endY)/2,nt=new ri(ho),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=qa(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++)_t=et[ht],Ue.Qe(nt,E,_t[2],_t[3],_t[4],_t[5],_t[6],_t[7],.5,b),nt=_t[6],E=_t[7];Pd(a,y,b,x)}In(b),a.restore(),a.Vc(!1)}}}},$t.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)},$t.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ze.prototype.nk.call(this,a)},$t.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)}},$t.ga=function(a,y){if(y===void 0&&(y=new Me),a instanceof jn){a.Mc()&&Oe("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},$t.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),Xi(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Xi(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Xi(a,b.x,b.y,0,0),on.free(y),Me.free(b),a},$t.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!==kn.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===kn.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),Ue.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===kn.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===kn.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===kn.o)return on.free(et),this.fill===null?xh(x,a.x,a.y,E):Bs(x,a,E,1<this.strokeWidth,y);Oe("Unknown Geometry type: "+x.type)},$t.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=Ue.Ze[st];typeof pt=="string"&&(pt=Ue.Ze[pt]),typeof pt=="function"?(ht=pt(null,100,100),E0[st]=ht):Oe("Unsupported Figure: "+st)}nt=ht.bounds}st=nt.width,ht=nt.height,pt=nt.width;var yt=nt.height;switch(Ra(this,!0)){case pn:b=x=0;break;case vn:pt=Math.max(a-et,0),yt=Math.max(y-et,0);break;case Jn:pt=Math.max(a-et,0),b=0;break;case ir:x=0,yt=Math.max(y-et,0)}isFinite(E.width)&&(pt=E.width),isFinite(E.height)&&(yt=E.height);var Mt=this.maxSize,_t=this.minSize;switch(x=Math.max(x-et,_t.width),b=Math.max(b-et,_t.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 pn:break;case vn:st=pt,ht=yt;break;case Hn:x=Math.min(pt/st,yt/ht),isFinite(x)||(x=1),st*=x,ht*=x;break;default:Oe(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&&Ue.$(this.ua.Sk,a-et)&&Ue.$(this.ua.Rk,y-et)||(this.ua=kr.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(_t.width,pt),yt=Math.max(_t.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===wr?vn:y:y===wr?E0[a.figure].defaultStretch:y}$t.eh=function(a,y,x,b){ha(this,a,y,x,b)},$t.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},$t.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),_t=nt*(et.m12*et.dx-et.m11*et.dy);et=a*st+y*pt+Mt,nt=a*ht+y*yt+_t,st=x*st+b*pt+Mt,ht=x*ht+b*yt+_t,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===kn.j)if(1.5>=this.strokeWidth)yt=Ue.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=Xn(),a=new Me,Ue.Ve(pt.startX+b,pt.startY+yt,pt.endX+b,pt.endY+yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ue.Ve(pt.startX-b,pt.startY-yt,pt.endX-b,pt.endY-yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ue.Ve(pt.startX+b,pt.startY+yt,pt.startX-b,pt.startY-yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ue.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 In(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);In(y)}else if(pt.type===kn.u)yt=Ue.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===kn.F){y=on.allocAt(Zt.x,Zt.y,Zt.width,Zt.height).Bc(Mt,Mt);t:if(y.width===0)yt=Ue.Ve(y.x,y.y,y.x,y.y+y.height,et,nt,st,ht,E);else if(y.height===0)yt=Ue.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===kn.o){_t=Me.alloc();var Jt=st-et,ie=ht-nt,Ee=Jt*Jt+ie*ie,Pe=et,Ne=nt;if(0<Ee&&Zt.contains(Pe,Ne)&&(_t.x=Pe,_t.y=Ne,this.ca(_t)))for(Jt!==0&&.5>Math.abs(Jt)?(ie*=.5/Jt,Jt=.5):ie!==0&&.5>Math.abs(ie)&&(Jt*=.5/ie,ie=.5),Pe-=Jt,Ne-=ie;Zt.contains(Pe,Ne);)Pe-=Jt,Ne-=ie;for(E.x=st,E.y=ht,ie=0;ie<pt.figures.count;ie++){var je=pt.figures.s[ie],De=je.isFilled?Pe:et,_e=je.isFilled?Ne:nt,Je=je.segments;Zt=je.startX,Jt=je.startY;for(var Tn=Zt,_n=Jt,Bn=0;Bn<Je.count;Bn++){var Pn=Je.s[Bn],fn=Pn.type,yr=Pn.endX,hr=Pn.endY,ii=!1;switch(fn){case bo:Tn=yr,_n=hr;break;case ki:ii=Am(Zt,Jt,yr,hr,De,_e,st,ht,_t);break;case Wo:ii=Ue.Eo(Zt,Jt,Pn.point1X,Pn.point1Y,Pn.point2X,Pn.point2Y,yr,hr,De,_e,st,ht,.6,_t);break;case fs:ii=Ue.Eo(Zt,Jt,Zt+2/3*(Pn.point1X-Zt),Jt+2/3*(Pn.point1Y-Jt),yr+2/3*(Pn.point1X-yr),hr+2/3*(Pn.point1Y-hr),yr,hr,De,_e,st,ht,.6,_t);break;case ho:case ws:fn=Pn.type===ho?qa(Pn,je):Is(Pn,je,Zt,Jt);var xi=fn.length;if(xi===0){ii=Am(Zt,Jt,Pn.type===ho?Pn.centerX:Pn.endX,Pn.type===ho?Pn.centerY:Pn.endY,De,_e,st,ht,_t);break}for(hr=null,yr=0;yr<xi;yr++){if(hr=fn[yr],yr===0&&Am(Zt,Jt,hr[0],hr[1],De,_e,st,ht,_t)){var Co=Lm(De,_e,_t,Ee,E);Co<Ee&&(Ee=Co,yt=!0)}Ue.Eo(hr[0],hr[1],hr[2],hr[3],hr[4],hr[5],hr[6],hr[7],De,_e,st,ht,.6,_t)&&(Co=Lm(De,_e,_t,Ee,E),Co<Ee&&(Ee=Co,yt=!0))}yr=hr[6],hr=hr[7];break;default:Oe("Unknown Segment type: "+fn)}Zt=yr,Jt=hr,ii&&(ii=Lm(De,_e,_t,Ee,E),ii<Ee&&(Ee=ii,yt=!0)),Pn.isClosed&&(yr=Tn,hr=_n,Am(Zt,Jt,yr,hr,De,_e,st,ht,_t)&&(Pn=Lm(De,_e,_t,Ee,E),Pn<Ee&&(Ee=Pn,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(_t)}else Oe("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(Ue.$(a,x)&&Ue.$(y,b)||Ue.$(E,nt)&&Ue.$(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||Ue.$(ht.y,a))&&(ht.y<y||Ue.$(ht.y,y))&&(pt=!0)):(y=a<x?a:x,a=a<x?x:a,(ht.x>y||Ue.$(ht.x,y))&&(ht.x<a||Ue.$(ht.x,a))&&(pt=!0)),pt)}$t.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},$t.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Cr.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,Fc(this,nt,st,ht)?y=!0:(nt.x=E,nt.y=a,nt.transform(x),Fc(this,nt,st,ht)?y=!0:(st.x=b,st.y=a,st.transform(x),Fc(this,nt,st,ht)?y=!0:(nt.x=b,nt.y=et,nt.transform(x),Fc(this,nt,st,ht)&&(y=!0)))),Me.free(nt),Cr.free(x),Me.free(st),Me.free(ht),y};function Fc(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)}$t.tx=function(a,y,x){function b(Ee,Pe){for(var Ne=Ee.length,je=0;je<Ne;je+=2)if(Pe.zd(Ee[je],Ee[je+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,eo(a.x,a.y,st,ht)<=E&&eo(a.x,a.y,pt,ht)<=E&&eo(a.x,a.y,st,nt)<=E&&eo(a.x,a.y,pt,nt)<=E)return!0}if(st=y.startX,ht=y.startY,pt=y.endX,nt=y.endY,y.type===kn.j){if(x=(st-pt)*(a.x-pt)+(ht-nt)*(a.y-nt),ti(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===kn.u)return y=!1,x&&(y=ti(a.x,a.y,st,ht,st,nt)<=E||ti(a.x,a.y,st,ht,pt,ht)<=E||ti(a.x,a.y,pt,ht,pt,nt)<=E||ti(a.x,a.y,st,nt,pt,nt)<=E),y;if(y.type===kn.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 ti(a.x,a.y,st,ht,pt,nt)<=E;if(x){if(a=Ue.$y(yt,Mt,y,et),a*a<=E)return!0}else return!(eo(y,et,-yt,0)>=E||eo(y,et,0,-Mt)>=E||eo(y,et,0,Mt)>=E||eo(y,et,yt,0)>=E)}else if(y.type===kn.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&&ti(a.x,a.y,et,st,et,pt)>E&&ti(a.x,a.y,et,st,ht,st)>E&&ti(a.x,a.y,ht,pt,et,pt)>E&&ti(a.x,a.y,ht,pt,ht,st)>E)return!1;if(et=Math.sqrt(E),x){if(this.fill===null?xh(y,a.x,a.y,et):Bs(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 bo:case ki:if(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E)return!1;break;case Wo:var _t=Xn();if(Ue.Qe(nt,yt,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.8,_t),nt=b(_t,a),In(_t),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case fs:if(_t=Xn(),Ue.ep(nt,yt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.8,_t),nt=b(_t,a),In(_t),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case ho:case ws:_t=Mt.type===ho?qa(Mt,et):Is(Mt,et,nt,yt);var Zt=_t.length;if(Zt===0){if(nt=Mt.type===ho?Mt.centerX:Mt.endX,yt=Mt.type===ho?Mt.centerY:Mt.endY,a.zd(nt,yt)>E)return!1;break}Mt=null;for(var Jt=Xn(),ie=0;ie<Zt;ie++)if(Mt=_t[ie],Jt.length=0,Ue.Qe(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.8,Jt),b(Jt,a))return In(Jt),!1;In(Jt),Mt!==null&&(nt=Mt[6],yt=Mt[7]);break;default:Oe("Unknown Segment type: "+Mt.type)}}return!0}}}return!1},$t.qc=function(){this.ua=null},$t.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=Go):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new jn(1-Go.x,Go.y)))}kr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Jl[a.toArrow];else a.fromArrow!=="None"?b=Jl[a.fromArrow]:(b=Ue.Ze[a.figure],typeof b=="string"&&(b=Ue.Ze[b]),b===void 0&&Oe("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Ue.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Jl[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Jl[x],y===void 0){var b=null,E;for(E in Ue.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=kn.parse(Ue.um[b],!1),Jl[b]=a,x!==b&&(Jl[x]=b),b}}return typeof y=="string"?y:y instanceof kn?a:null}He.Object.defineProperties(kr.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),zo(this)&&(a=this.part,a!==null&&Mi(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=kn.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&&bf(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&&bf(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 En(a,"value >= 0",kr,"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"?En(a,'"butt", "round", or "square"',kr,"strokeCap"):(Oc(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"?En(a,'"miter", "bevel", or "round"',kr,"strokeJoin"):(Oc(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){Oc(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)||Oe("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&&(Oc(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=Ue.Ze[a];typeof x=="function"?x=a:(x=Ue.Ze[a.toLowerCase()])||Oe("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?Oe("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?Oe("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:Lo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Oc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Lo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Oc(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&&(Oc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:wr},set:function(a){var y=this.geometryStretch;y!==a&&(Oc(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&&Ll(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))}}}),kr.prototype.intersectsRect=kr.prototype.Yc,kr.prototype.containedInRect=kr.prototype.fh,kr.prototype.getNearestIntersectionPoint=kr.prototype.rs,kr.prototype.getDocumentBounds=kr.prototype.mi,kr.prototype.getDocumentPoint=kr.prototype.ga;var Jl=new fr,E0=new fr;kr.className="Shape",kr.getFigureGenerators=function(){var a=new or,y;for(y in Ue.Ze)y!==y.toLowerCase()&&a.add(y,Ue.Ze[y]);return a.freeze(),a},kr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Ue.Ze;b[a]=y,b[x]=a},kr.getArrowheadGeometries=function(){var a=new or;for(b in Ue.um)if(Jl[b]===void 0){var y=kn.parse(Ue.um[b],!1);Jl[b]=y,y=b.toLowerCase(),y!==b&&(Jl[y]=b)}for(var x in Jl)if(x!==x.toLowerCase()){var b=Jl[x];b instanceof kn&&a.add(x,b)}return a.freeze(),a},kr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=kn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Oe("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Jl;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=wr,this.gg=this.fg=Lo}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 wi(a,y){return ze.call(this),Dm||(_a=Ki?new Us(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}Ve(wi,ze),wi.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 Ol(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}$t=wi.prototype,$t.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}$t.qb=function(a){a.classType===wi?this.wrap=a:ze.prototype.qb.call(this,a)},$t.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},$t.v=function(){ze.prototype.v.call(this)},$t.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;Yi(this,a,this.xc,!0,!1,x,b),(ht||pt)&&Yi(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 _t=y.scale;switch(8>(Mt*Mt+yt*yt)*_t*_t&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ns&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Mt=this.spacingBelow,this.flip){case Hr:a.translate(E,0),a.scale(-1,1);break;case Tr: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,_t=(y+nt+Mt)*yt,et>_t&&(b=this.verticalAlignment,b=b.y*et-b.y*_t+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(_t=0;_t<yt;_t++){var Zt=this.Qc[_t];Zt>E&&(Zt=E),b+=y,this.Oj(this.Qb[_t],a,0,b,E,nt,Zt,x,st,ht,pt),b+=nt+Mt}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-E,0);break;case Tr:a.scale(1,-1),a.translate(0,-et);break;case fi:a.scale(-1,-1),a.translate(-E,-et)}}},$t.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 _t=a;y.beginPath(),y.lineWidth=_t,y.moveTo(ht,pt),y.lineTo(E,st),y.stroke(),y.Se(),y instanceof ns&&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 ns&&y.ad.classList.add("gojs-td"))}},$t.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(Yi(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},$t.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ze.prototype.nk.call(this,a)},$t.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)}},$t.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,il(st)),st=pt+1}et=nt}else nt=et.indexOf(`
|
|
`,0),0<=nt&&(et=et.substr(0,nt)),et=il(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);il(pt)>y&&1<pt.length;)pt=pt.substr(0,pt.length-1);pt+=Xp,y=il(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),xo(this.dc,et,nt),this.Ge(0,0,et,nt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},$t.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=il(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=il(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=il(pt);for(E&&(y=y.trim()),et+=y,x=Math.max(1,x-ht);il(et)>x&&1<et.length;)et=et.substr(0,et.length-1);a.l|=16777216,et+=Xp;var yt=il(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);il(y)>x;){var Mt=1;for(pt=il(y.substr(0,Mt)),yt=0;pt<=x;)Mt++,yt=pt,pt=il(y.substr(0,Mt));if(Mt===1){var _t=pt;et=Math.max(et,pt)}else _t=yt,et=Math.max(et,yt);if(Mt--,1>Mt&&(Mt=1),Vp(a,y.substr(0,Mt),_t),ht++,y=y.substr(Mt),a.Gc+ht>a.maxLines)break}for(yt=Cd(a,nt),pt=il(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=il(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=il(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 il(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=Mn.alloc();T0(a,et,y,ht),E+=ht.height,Mn.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}He.Object.defineProperties(wi.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"||(Ol(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:pn},set:function(a){var y=this.flip;y!==a&&(Ol(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:yh},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ol(this),this.da.Yr=a,xa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Mn.alloc();T0(this,this.ec,999999,a);var y=a.width;Mn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),xo(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&&(Ol(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&&(Ol(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&&bf(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&&(Ol(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&&(Ol(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&&(Ol(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&&(Ol(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&&(Ol(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&&(Ol(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&&(Ol(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&&En(a,"> 0",wi,"maxLines"),Ol(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 an(wi,"None",0),b1=new an(wi,"WrapFit",1),A0=new an(wi,"WrapDesiredSize",2),P1=new an(wi,"WrapBreakAll",3),N0=new an(wi,"OverflowClip",0),Om=new an(wi,"OverflowEllipsis",1),Zp=new an(wi,"FormatTrim",0),C1=new an(wi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new fr,k1=0,Fm=new fr,O0=0,Xp="...",E1="",_a=null,Dm=!1;wi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=pn,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=yh,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},wi.getEllipsis=function(){return Xp},wi.setEllipsis=function(a){Xp=a,Fm=new fr,O0=0},wi.getBaseline=function(){return Nm},wi.setBaseline=function(a){Nm=a},wi.getUnderline=function(){return jm},wi.setUnderline=function(a){jm=a},wi.isValidFont=function(a){if(Dm||(_a=Ki?new Us(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},wi.FormatNone=C1,wi.FormatTrim=Zp,wi.None=L0,wi.OverflowClip=N0,wi.OverflowEllipsis=Om,wi.WrapBreakAll=P1,wi.WrapDesiredSize=A0,wi.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=Ys,this.Nk=vn,this.Zg=this.Hd=null,this.Mk=ei,this.Xf=pn,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;Ve(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===pn||a===Hn||a===Ir?this.imageStretch=a:ze.prototype.qb.call(this,a)},za.prototype.toString=function(){return"Picture("+this.source+")#"+oi(this)};function Ed(a){a===void 0&&(a=""),a!==""?kd[a]&&(delete kd[a],Bm--):(kd=new fr,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()||(fo(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=Xn();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);In(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 Nc)){var E=a instanceof ns;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,_t=st,Zt=this.Nk,Jt=this.Mk;switch(Zt){case pn:if(this.sourceRect.w())break;Mt>=b.width&&(et=et+Jt.offsetX+(Mt*Jt.x-b.width*Jt.x)),_t>=b.height&&(nt=nt+Jt.offsetY+(_t*Jt.y-b.height*Jt.y)),ht=Math.min(b.width,Mt),st=Math.min(b.height,_t);break;case vn:Mt=b.width,_t=b.height;break;case Hn:case Ir:Zt===Hn?(Zt=Math.min(b.height/_t,b.width/Mt),Mt*=Zt,_t*=Zt):Zt===Ir&&(Zt=Math.max(b.height/_t,b.width/Mt),Mt*=Zt,_t*=Zt,Mt>=b.width&&(et=(et+Jt.offsetX+(Mt*Jt.x-b.width*Jt.x)/Mt)*ht),_t>=b.height&&(nt=(nt+Jt.offsetY+(_t*Jt.y-b.height*Jt.y)/_t)*st),ht*=1/(Mt/b.width),st*=1/(_t/b.height),Mt=b.width,_t=b.height)}Zt=this.Df()*y.scale;var ie=Mt*Zt*_t*Zt,Ee=ht*st/ie,Pe=x.__goCache;Zt=null;var Ne=wx;if(!E){if(x.sq&&Pe!==void 0&&4<ie&&Ee>Ne*Ne)for(Pe.gi===null&&(L1(Pe,4,pt,yt,x),L1(Pe,16,pt,yt,x)),E=Pe.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 Us(null).context;try{E.drawImage(this.Eg,0,0)}catch(je){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(je){this.vl=!0}}if(this.vl)return}}switch(E=Mt<b.width?Jt.offsetX+(b.width*Jt.x-Mt*Jt.x):0,Jt=_t<b.height?Jt.offsetY+(b.height*Jt.y-_t*Jt.y):0,this.flip){case Hr:a.translate(Math.min(b.width,Mt),0),a.scale(-1,1);break;case Tr:a.translate(0,Math.min(b.height,_t)),a.scale(1,-1);break;case fi:a.translate(Math.min(b.width,Mt),Math.min(b.height,_t)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Pe!==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,Jt,Math.min(b.width,Mt),Math.min(b.height,_t)),a instanceof ns&&(this.bt=[et/y,nt/y,Math.min(Zt.source.width,ht/y),Math.min(Zt.source.height,st/y),E,Jt,Math.min(b.width,Mt),Math.min(b.height,_t)])}catch(je){this.en=!1}a.restore()}else try{a.drawImage(x,et,nt,ht,st,E,Jt,Math.min(b.width,Mt),Math.min(b.height,_t)),a instanceof ns&&(this.bt=[et,nt,ht,st,E,Jt,Math.min(b.width,Mt),Math.min(b.height,_t)])}catch(je){this.en=!1}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-Math.min(b.width,Mt),0);break;case Tr:a.scale(1,-1),a.translate(0,-Math.min(b.height,_t));break;case fi:a.scale(-1,-1),a.translate(-Math.min(b.width,Mt),-Math.min(b.height,_t))}}}}},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===vn||et===Jn?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:nt!==null&&(a=ht)),x=0):nt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ht),isFinite(E.height)||et===vn||et===ir?(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)),xo(this.dc,a,y),this.Ge(0,0,a,y)},za.prototype.eh=function(a,y,x,b){ha(this,a,y,x,b)},He.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||Oe("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 Sn),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()||(fo(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(Ki){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Ed(),x=kd),b=Dn("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 fr,za.clearCache=Ed;function T1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var et=new Us(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 kn,this.mc=null}Md.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new kn,this.mc=null};function Td(a,y,x,b,E,et){a.mc=new wo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=et||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Md.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new ri(bo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Md.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new ri(ki);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Qu(a,y,x,b,E,et,nt){var st;st===void 0&&(st=!1);var ht=new ri(Wo);ht.point1X=y,ht.point1Y=x,ht.point2X=b,ht.point2Y=E,ht.endX=et,ht.endY=nt,st&&ht.close(),a.mc.segments.add(ht)}function Im(a,y,x,b,E){var et;et===void 0&&(et=!1);var nt=new ri(fs);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 ri(ho);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 ri(ws,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 ia(a,y){var x=a.toLowerCase(),b=Ue.Ze;b[a]=y,b[x]=a}ia("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Ue.Mf[a];return b!==void 0||(b=new kn(kn.u),b.endX=y,b.endY=x,Ue.Nf<Ue.vm&&(Ue.Mf[a]=b,Ue.Nf++)),b}),ia("Square",function(a,y,x){a="s"+y+","+x;var b=Ue.Mf[a];return b!==void 0||(b=new kn(kn.u),b.endX=y,b.endY=x,b.defaultStretch=Hn,Ue.Nf<Ue.vm&&(Ue.Mf[a]=b,Ue.Nf++)),b}),ia("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=Ue.Mf[b];if(E!==void 0)return E;var et=a*Ue.wg;return E=new kn().add(new wo(a,0,!0).add(new ri(ki,y-a,0)).add(new ri(Wo,y,a,y-et,0,y,et)).add(new ri(ki,y,x-a)).add(new ri(Wo,y-a,x,y,x-et,y-et,x)).add(new ri(ki,a,x)).add(new ri(Wo,0,x-a,et,x,0,x-et)).add(new ri(ki,0,a)).add(new ri(Wo,a,0,0,et,et,0).close())),1<et&&(E.spot1=new jn(0,0,et,et),E.spot2=new jn(1,1,-et,-et)),Ue.Nf<Ue.vm&&(Ue.Mf[b]=E,Ue.Nf++),E}),ia("Border","RoundedRectangle"),ia("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Ue.Mf[a];return b!==void 0||(b=new kn(kn.F),b.endX=y,b.endY=x,b.spot1=Vi,b.spot2=Li,Ue.Nf<Ue.vm&&(Ue.Mf[a]=b,Ue.Nf++)),b}),ia("Circle",function(a,y,x){a="c"+y+","+x;var b=Ue.Mf[a];return b!==void 0||(b=new kn(kn.F),b.endX=y,b.endY=x,b.spot1=Vi,b.spot2=Li,b.defaultStretch=Hn,Ue.Nf<Ue.vm&&(Ue.Mf[a]=b,Ue.Nf++)),b}),ia("TriangleRight",function(a,y,x){return new kn().add(new wo(0,0).add(new ri(ki,y,.5*x)).add(new ri(ki,0,x).close())).pm(0,.25,.5,.75)}),ia("TriangleDown",function(a,y,x){return new kn().add(new wo(0,0).add(new ri(ki,y,0)).add(new ri(ki,.5*y,x).close())).pm(.25,0,.75,.5)}),ia("TriangleLeft",function(a,y,x){return new kn().add(new wo(y,x).add(new ri(ki,0,.5*x)).add(new ri(ki,y,0).close())).pm(.5,.25,1,.75)}),ia("TriangleUp",function(a,y,x){return new kn().add(new wo(y,x).add(new ri(ki,0,x)).add(new ri(ki,.5*y,0).close())).pm(.25,.5,.75,1)}),ia("Triangle","TriangleUp"),ia("Diamond",function(a,y,x){return new kn().add(new wo(.5*y,0).add(new ri(ki,0,.5*x)).add(new ri(ki,.5*y,x)).add(new ri(ki,y,.5*x).close())).pm(.25,.25,.75,.75)}),ia("LineH",function(a,y,x){return a=new kn(kn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ia("LineV",function(a,y,x){return a=new kn(kn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ia("None","Rectangle"),ia("BarH","Rectangle"),ia("BarV","Rectangle"),ia("MinusLine","LineH"),ia("PlusLine",function(a,y,x){return new kn().add(new wo(0,x/2,!1).add(new ri(ki,y,x/2)).add(new ri(bo,y/2,0)).add(new ri(ki,y/2,x)))}),ia("XLine",function(a,y,x){return new kn().add(new wo(0,x,!1).add(new ri(ki,y,0)).add(new ri(bo,0,0)).add(new ri(ki,y,x)))}),ia("LineRight",function(a,y,x){return new kn().add(new wo(.25*y,0,!1).add(new ri(ki,.75*y,.5*x)).add(new ri(ki,.25*y,x)))}),ia("LineDown",function(a,y,x){return new kn().add(new wo(0,.25*x,!1).add(new ri(ki,.5*y,.75*x)).add(new ri(ki,y,.25*x)))}),ia("LineLeft",function(a,y,x){return new kn().add(new wo(.75*y,0,!1).add(new ri(ki,.25*y,.5*x)).add(new ri(ki,.75*y,x)))}),ia("LineUp",function(a,y,x){return new kn().add(new wo(0,.75*x,!1).add(new ri(ki,.5*y,.25*x)).add(new ri(ki,y,.75*x)))}),Ue.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=Wi,this.ir=null,this.jr="",this.lr=Lo,this.Gq="",this.Hq=vi,this.Pq=qr,this.Kq=_r,this.Up=null,this.Cq=127,this.zr=di,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"?xn.call(this,a):(xn.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)}Ve(tr,xn),tr.prototype.cloneProtected=function(a){xn.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},$t=tr.prototype,$t.Af=function(a){xn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},$t.toString=function(){var a=Wn(this.constructor)+"#"+oi(this);return this.data!==null&&(a+="("+rr(this.data)+")"),a};function Ga(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}$t.th=function(){xn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},$t.gk=function(a,y,x,b,E,et,nt){var st=this.diagram;st!==null&&(a===io&&y==="elements"?E instanceof xn?jc(E,function(ht){ly(st.partManager,ht),Cc(st,ht)}):Bh(st,E):a===vo&&y==="elements"&&(E instanceof xn?jc(E,function(ht){uy(st.partManager,ht,st)}):Mp(st,E)),st.cb(a,y,x,b,E,et,nt))},$t.La=function(a){if(xn.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 xn&&jc(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 or),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=Xn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);In(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 Sr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof $r))break t;Ws(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=xn.Link),x.adornedObject=y)}if(x!==null){x.type===xn.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 Cr);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=ei;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 or),y.I(a)!==null)return y.I(a);var x=xn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function $u(a,y,x,b){b===void 0&&(b=new Me),x=x.Mc()?ei: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 kr?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 Dc(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(wa(this)===!1)j1(this);else{Zl(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()||Ue.B(y.width,a.width)&&Ue.B(y.height,a.height)||0<=this.vw&&this.C(16),on.free(y),R0(this,!1)}},$t=tr.prototype,$t.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()||bl(a,y)||(this instanceof Ln&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},$t.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&&wa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof $r||(y=y.animationManager,y.zb&&qf(y,a,new Me(b,E),x))}$t.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;zh(this)||wa(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)},$t.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 $r||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 Ln&&Vu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Gh(a)?(_l(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}$t.si=function(){return!0},$t.Zc=function(){return!0},$t.ph=function(){return!1},$t.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Gn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Gn(" Old class: "+Wn(a.constructor)+", new class: "+Wn(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 Ln&&(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 Ln&&(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}$t=tr.prototype,$t.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}$t.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},$t.N=function(){var a=this.diagram;a!==null&&!wa(this)&&!zh(this)&&this.isVisible()&&this.Ib.w()&&a.N(Dc(this,this.Ib))},$t.v=function(){xn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Ln&&this.labeledLink!==null&&xa(this.labeledLink),a.$b(!0))},$t.Vo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},$t.Wo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},$t.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},$t.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Ln&&(y=y.labeledLink,y!==null)?z0(a,y):0}$t.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Ln&&(x=y.labeledLink,x!==null)?_1(a,x):y}$t.Td=function(a){return a instanceof Sr?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 Ln&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}$t.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Sr&&zm(y,!0),y instanceof Ln){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 Ln&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Sr&&zm(y,!1),y instanceof Ln&&(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 Ln&&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 Ln&&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 $r)){if(a.add(y),y instanceof Ln){if(x&&y instanceof Sr)for(var nt=y.memberParts;nt.next();)Uh(a,nt.value,x,b,E,et);if(E!==!1)for(nt=y.linksConnected;nt.next();){var st=nt.value;if(!a.contains(st)){var ht=st.fromNode,pt=st.toNode;ht=ht===null||a.contains(ht),pt=pt===null||a.contains(pt),(E?ht&&pt:ht||pt)&&Uh(a,st,x,b,E,et)}}if(1<b)for(y=y.Ou();y.next();)Uh(a,y.value,x,b-1,E,et)}else if(y instanceof Cn)for(y=y.labelNodes;y.next();)Uh(a,y.value,x,b,E,et)}}He.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?Xr: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(io,"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 $r?this.type!==xn.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:qr},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:_r},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:vi},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,wa(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 $r)){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 $r?this instanceof $r&&(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&&(Ws(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&&(Ws(x),x=x.copy(),x===null||x instanceof Cn||(b=this.location.copy(),I0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){I0(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(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 Cn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(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:Wi},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:Lo},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&&Oe("Cannot make a Group a member of itself: "+this.toString()),Oe("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 Sr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof Sr&&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 Sr){for(x=new Sn,Uh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Ln)for(b=b.linksConnected;b.next();)Ld(b.value)}if(this instanceof Ln){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 Oe("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 Ln&&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:di},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 $r(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)}Ve($r,tr),$r.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},$r.prototype.updateRelationshipsFromData=function(){},$r.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Cn&&y instanceof kr){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 kr&&(E.ua=a)}}},$r.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!wa(a))},$r.prototype.Zc=function(){return!1},$r.prototype.gk=function(a,y,x,b,E,et,nt){if(a===io&&y==="elements"){if(E instanceof Pa)this.$a===null&&(this.$a=E);else if(E instanceof xn){var st=E.Nl(function(ht){return ht instanceof Pa});st instanceof Pa&&this.$a===null&&(this.$a=st)}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof xn&&this.$a.rg(b)&&(this.$a=null));tr.prototype.gk.call(this,a,y,x,b,E,et,nt)},$r.prototype.updateAdornments=function(){},$r.prototype.Lj=function(){},He.Object.defineProperties($r.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}}}),$r.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=mi,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 Ln(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 wn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ve(Ln,tr),Ln.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())},$t=Ln.prototype,$t.Af=function(a){tr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function qu(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}$t.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 Sn),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}$t.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},$t.gk=function(a,y,x,b,E,et,nt){a===io&&y==="elements"?this.wc=null:a===vo&&y==="elements"&&(this.wc=null),tr.prototype.gk.call(this,a,y,x,b,E,et,nt)},$t.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(rs(x.fromPort),rs(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(rs(x.fromPort),rs(x.toPort),x.bb())}}function rs(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||rs(y.port)}}$t.si=function(){return!0},Ln.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Ln.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Ln.prototype.isVisible=function(){if(!tr.prototype.isVisible.call(this))return!1;var a=!0,y=Zu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Zu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===co){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},Ln.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)}},Ln.prototype.qx=function(){var a=new Sn,y=new Sn;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)})}}Ln.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Kr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},$t=Ln.prototype,$t.Mo=function(a){a===void 0&&(a=null);var y=new Kr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},$t.Sd=function(a){a===void 0&&(a=null);var y=new Kr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},$t.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 Sn,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 Sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new zr(x):Xr},$t.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 Sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new zr(x):Xr},$t.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 Sn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new zr(x):Xr},$t.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Kr(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},$t.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Kr(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){rs(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){rs(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}}}Ln.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},$t=Ln.prototype,$t.Vo=function(a){tr.prototype.Vo.call(this,a),a||(Yp(this),a=this.Yk,a!==null&&tS(a,this))},$t.Wo=function(a){tr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},$t.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)},$t.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 or: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=Xn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);In(x)}}}$t.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},$t.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}},$t.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},$t.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},$t.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Ln)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},$t.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 Sn;return a(this,y),y},$t.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}$t.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Kr(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},$t.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 wn,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 wn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new zr(x):Xr},$t.wz=function(a){a===void 0&&(a=1/0);var y=new Sn;return Uh(y,this,!1,a,!0),y},Ln.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 Sn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Zu),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(_t){return function(Zt){return Zt===_t.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}Ln.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 Sn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Zu),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(_t){return function(Zt){return Zt===_t.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}He.Object.defineProperties(Ln.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(qu(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&&Vu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:mi},set:function(a){typeof a=="number"&&(a=new Ar(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),qu(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Vu(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&&(qu(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&&(qu(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&&(qu(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),xa(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&&(qu(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))}}}),Ln.prototype.expandTree=Ln.prototype.expandTree,Ln.prototype.collapseTree=Ln.prototype.collapseTree,Ln.prototype.findTreeParts=Ln.prototype.wz,Ln.prototype.findTreeChildrenNodes=Ln.prototype.Ou,Ln.prototype.findTreeChildrenLinks=Ln.prototype.Qo,Ln.prototype.findTreeLevel=Ln.prototype.uz,Ln.prototype.findTreeParentChain=Ln.prototype.vz,Ln.prototype.findTreeParentNode=Ln.prototype.pg,Ln.prototype.findTreeParentLink=Ln.prototype.kh,Ln.prototype.findCommonTreeParent=Ln.prototype.gz,Ln.prototype.findTreeRoot=Ln.prototype.xz,Ln.prototype.isInTreeOf=Ln.prototype.Nz,Ln.prototype.findPort=Ln.prototype.ns,Ln.prototype.findLinksTo=Ln.prototype.kz,Ln.prototype.findLinksBetween=Ln.prototype.jz,Ln.prototype.findNodesInto=Ln.prototype.Oo,Ln.prototype.findNodesOutOf=Ln.prototype.Po,Ln.prototype.findNodesConnected=Ln.prototype.Mu,Ln.prototype.findLinksInto=Ln.prototype.Sd,Ln.prototype.findLinksOutOf=Ln.prototype.Mo,Ln.prototype.findExternalTreeLinksConnected=Ln.prototype.qx,Ln.prototype.invalidateConnectedLinks=Ln.prototype.Bd,Ln.prototype.invalidateLinkBundle=Ln.prototype.Lz;var kx=new an(Ln,"SpreadingNone",10),Wm=new an(Ln,"SpreadingEvenly",11),H0=new an(Ln,"SpreadingPacked",12);Ln.className="Node",Ln.SpreadingNone=kx,Ln.SpreadingEvenly=Wm,Ln.SpreadingPacked=H0;function Sr(a,y){a===void 0||a instanceof yo||typeof a=="string"?Ln.call(this,a):(Ln.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Sn,this.$a=null,this.Sc=new Ni,this.Sc.group=this,this.gl=new Sn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ve(Sr,Ln),Sr.prototype.cloneProtected=function(a){Ln.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Pa});y instanceof Pa?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())},$t=Sr.prototype,$t.Af=function(a){Ln.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 Ln)x.Bd(y);else if(x instanceof Cn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},$t.gk=function(a,y,x,b,E,et,nt){if(a===io&&y==="elements"){if(E instanceof Pa)this.$a===null?this.$a=E:this.$a!==E&&Oe("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof xn){var st=E.Nl(function(ht){return ht instanceof Pa});st instanceof Pa&&(this.$a===null?this.$a=st:this.$a!==st&&Oe("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 xn&&this.$a.rg(b)&&(this.$a=null));Ln.prototype.gk.call(this,a,y,x,b,E,et,nt)},$t.Xl=function(a,y){Ln.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==xn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof xn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof kr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},$t.eh=function(a,y,x,b){this.nf=this.$a,Ln.prototype.eh.call(this,a,y,x,b)},$t.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Cn||y.Va()}),Ln.prototype.Va.call(this)},$t.si=function(){if(!Ln.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Ln){if(y.isVisible()&&wa(y))return!1}else if(y instanceof Cn&&y.isVisible()&&wa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function V0(a,y){if(a.Gn.add(y)){y instanceof Sr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function K0(a,y){if(a.Gn.remove(y)){y instanceof Sr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}$t.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)}Ln.prototype.Lj.call(this)},Sr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=rn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Sr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=rn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Sr.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))},$t=Sr.prototype,$t.Bd=function(a){var y=(this.U&65536)!==0;if(Ln.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()?(rs(x.fromPort),rs(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(rs(x.fromPort),rs(x.toPort),x.bb()))}}},$t.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 Sn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Ln)for(E=E.linksConnected;E.next();){var et=E.value;y.contains(et)||x.add(et)}}return a&&(this.$p=x),x.iterator},$t.iz=function(){var a=this.Rj();a.add(this);for(var y=new Sn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Ln)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},$t.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Sn;return a(this,y),y},$t.Rj=function(){var a=new Sn;return Uh(a,this,!0,0,!0),a.remove(this),a},$t.Zb=function(a){Ln.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Sr.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 Sr&&et.isSubGraphExpanded&&(et.wasSubGraphExpanded=et.isSubGraphExpanded,$1(et,y,x,b)),et instanceof Ln)et.Bd(y),x.Aj(et,b);else if(et instanceof Cn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!1}Sr.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 Sr&&et.wasSubGraphExpanded&&(et.wasSubGraphExpanded=!1,q1(et,y,x,b)),et instanceof Ln)et.Bd(y),x.Cj(et,b);else if(et instanceof Cn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!0}Sr.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(),Ln.prototype.move.call(this,a,y),a=new Sn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Cn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof Ln&&E.isLinkLabel)){var nt=E.position,st=E.location;nt.w()?(et.x=nt.x+b,et.y=nt.y+x,E.position=et):st.w()&&(et.x=st.x+b,et.y=st.y+x,E.location=et)}for(y.reset();y.next();)E=y.value,E instanceof Cn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(nt=E.position,et.x=nt.x+b,et.y=nt.y+x,et.w()?E.move(et):E.bb(),X0(E)&&E.bb());Me.free(et)}},He.Object.defineProperties(Sr.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&&Oe("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&&(qu(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&&(qu(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&&(qu(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&&(qu(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)}}}),Sr.prototype.expandSubGraph=Sr.prototype.expandSubGraph,Sr.prototype.collapseSubGraph=Sr.prototype.collapseSubGraph,Sr.prototype.findSubGraphParts=Sr.prototype.Rj,Sr.prototype.findContainingGroupChain=Sr.prototype.hz,Sr.prototype.findExternalNodesConnected=Sr.prototype.iz,Sr.prototype.findExternalLinksConnected=Sr.prototype.Lu,Sr.prototype.ensureBounds=Sr.prototype.Va,Sr.className="Group";function Pa(a){ze.call(this),this.yb=Qa,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ve(Pa,ze),Pa.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Pa.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ro(0,0,y.width,y.height,a.x,a.y)},Pa.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Sr||a instanceof $r)||Oe("Placeholder is not inside a Group or Adornment."),a instanceof Sr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(xo(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 kr&&(nt=et.strokeWidth);var st=et.Df(),ht=et.naturalBounds,pt=(ht.width+nt)*st;nt=(ht.height+nt)*st,a.type!==xn.Link&&(st=et.ga(a.category==="Selection"?vi:a.locationSpot,Me.alloc()),a.location=st,Me.free(st)),isNaN(pt)||isNaN(nt)?(a=et.ga(vi,Me.alloc()),pt=on.allocAt(a.x,a.y,0,0),pt.Ye(et.ga(ja,a)),pt.Ye(et.ga(hs,a)),pt.Ye(et.ga(Na,a)),xo(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)):(xo(y,pt+b||0,nt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Pa.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Pa.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Sr&&!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 Sr&&!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 Sr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Pa.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Sr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,et=-1/0,nt=y.memberParts;nt.next();){var st=nt.value;if(st.isVisible()){if(st instanceof Cn&&(!y.computesBoundsIncludingLinks||ms(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},He.Object.defineProperties(Pa.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ar(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Pa.className="Placeholder";function Cn(a){tr.call(this,xn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ca,this.Om=0,this.Qm=Ca,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new wn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new kn,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)}Ve(Cn,tr),Cn.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())},$t=Cn.prototype,$t.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&&rs(y),a=a.toPort,a!==null&&rs(a)},$t.qb=function(a){a.classType===Cn?(a.value&2)===2?this.routing=a:a===ys||a===eh||a===Nd?this.curve=a:a===$p||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==Ca&&Oe("Unknown Link enum value for a Link property: "+a):tr.prototype.qb.call(this,a)},$t.Xc=function(){this.ba===null&&(this.ba=new Rp)},$t.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),wa(a)||zh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),wa(a)||zh(a)))},$t.zv=function(){return!1},$t.Av=function(){},$t.Zc=function(){return!1},Cn.prototype.computeAngle=function(a,y,x){return Cn.computeAngle(y,x)},Cn.computeAngle=function(a,y){switch(a){default:case Ca: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=Ue.bp(y),90<a&&270>a&&(a-=180);break;case ng:a=Ue.bp(y+90),90<a&&270>a&&(a-=180);break;case rg:a=Ue.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=Ue.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ue.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}$t=Cn.prototype,$t.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&tr.prototype.oh.call(this)},$t.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},$t.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tS(a,y){a.wd===null&&(a.wd=new Sn),a.wd.add(y),a.v()}$t.Vo=function(a){if(tr.prototype.Vo.call(this,a),Bc(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)}},$t.Wo=function(a){if(tr.prototype.Wo.call(this,a),Bc(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)}},$t.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Cn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Cn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?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)),th(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Cn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Cn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Cn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Oi),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()===ys))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()===ys){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Ue.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),Ue.ax(b.x,b.y,E.x,E.y,et.x,et.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var nt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=et=b=0;b<x/2&&et<y&&(E=nt[et],!(b+E>x/2));)b+=E,et++;return y=this.i(et),et=this.i(et+1),1>Math.abs(y.x-et.x)?y.y>et.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-et.y)?y.x>et.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(et.x-y.x),y.y+x*(et.y-y.y))),a},Cn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ys))return this.ua.wx(.5);if(this.computeCurve()===ys&&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),Ue.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)},$t=Cn.prototype,$t.i=function(a){return this.Nb.s[a]},$t.dd=function(a,y){this.Nb.cd(a,y)},$t.L=function(a,y,x){this.Nb.cd(a,new Me(y,x))},$t.Kz=function(a,y){this.Nb.Gb(a,y)},$t.m=function(a,y,x){this.Nb.Gb(a,new Me(y,x))},$t.ne=function(a){this.Nb.add(a)},$t.yf=function(a,y){this.Nb.add(new Me(a,y))},$t.pv=function(a){this.Nb.mb(a)},$t.Fj=function(){this.Nb.clear()};function th(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 wn,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),xa(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)}}$t.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},$t.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)}},$t.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))}$t.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())}},$t.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Cn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kf||(kf=new Ln,kf.desiredSize=xr,kf.Va()),this.defaultFromPoint&&(kf.location=this.defaultFromPoint,kf.Va(),y=a=kf)):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?(Ef||(Ef=new Ln,Ef.desiredSize=xr,Ef.Va()),this.defaultToPoint&&(Ef.location=this.defaultToPoint,Ef.Va(),E=b=Ef)):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===ys;this.Wf=pt&&!yt?Mt=!0:!1;var _t=this.computeAdjusting()===Ca||pt;if(!yt&&!pt&&st&&ht){if(st=!1,!_t&&3<=et&&(_t=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),st=this.adjustPoints(0,_t,et-1,ht))&&(_t=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,_t,et-1,ht)),!st)if(this.Fj(),Mt){et=this.getLinkPoint(a,y,nt,!0,!1,b,E),_t=this.getLinkPoint(b,E,x,!1,!1,a,y),st=_t.x-et.x,ht=_t.y-et.y,pt=this.computeCurviness(),Mt=yt=0;var Zt=et.x+st/3,Jt=et.y+ht/3,ie=Zt,Ee=Jt;Ue.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)+Jt),Zt=et.x+2*st/3,Jt=et.y+2*ht/3;var Pe=Zt,Ne=Jt;Ue.B(ht,0)?Ne=0<st?Ne-pt:Ne+pt:(Pe=(0>ht?-1:1)*Mt+Zt,Ne=yt*(Pe-Zt)+Jt),this.Fj(),this.ne(et),this.yf(ie,Ee),this.yf(Pe,Ne),this.ne(_t),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,_t=E,b=this.getLinkPoint(a,y,nt,!0,!1,et,_t),E=this.getLinkPoint(et,_t,x,!1,!1,a,y),this.hasCurviness()?(_t=E.x-b.x,x=E.y-b.y,nt=this.computeCurviness(),a=b.x+_t/2,y=b.y+x/2,et=a,st=y,Ue.B(x,0)?st=0<_t?st-nt:st+nt:(_t=-_t/x,et=Math.sqrt(nt*nt/(_t*_t+1)),0>nt&&(et=-et),et=(0>x?-1:1)*et+a,st=_t*(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),_t.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=_t.ga(Km(x),new Me),this.dd(1,this.getLinkPointFromPoint(et,_t,x,b,!1,x))),on.free(st))}else{Mt=this.isAvoiding,_t&&(yt&&Mt||pt)&&this.Fj();var je=pt?this.computeCurviness():0;Mt=this.getLinkPoint(a,y,nt,!0,yt,b,E),Zt=ie=Jt=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>je&&(Zt-=180)),0>Zt?Zt+=360:360<=Zt&&(Zt-=360),pt&&(Ee+=Math.abs(je)*(yt?1:2)),Zt===0?Jt=Ee:Zt===90?ie=Ee:Zt===180?Jt=-Ee:Zt===270?ie=-Ee:(Jt=Ee*Math.cos(Zt*Math.PI/180),ie=Ee*Math.sin(Zt*Math.PI/180)),nt.Mc()&&pt&&(Ee=y.ga(ei,Me.alloc()),Pe=Me.allocAt(Ee.x+1e3*Jt,Ee.y+1e3*ie),this.getLinkPointFromPoint(a,y,Ee,Pe,!0,Mt),Me.free(Ee),Me.free(Pe))),Ee=this.getLinkPoint(b,E,x,!1,yt,a,y);var De=Ne=Pe=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>je&&(De+=180)),0>De?De+=360:360<=De&&(De-=360),pt&&(_e+=Math.abs(je)*(yt?1:2)),De===0?Pe=_e:De===90?Ne=_e:De===180?Pe=-_e:De===270?Ne=-_e:(Pe=_e*Math.cos(De*Math.PI/180),Ne=_e*Math.sin(De*Math.PI/180)),x.Mc()&&pt&&(x=E.ga(ei,Me.alloc()),nt=Me.allocAt(x.x+1e3*Pe,x.y+1e3*Ne),this.getLinkPointFromPoint(b,E,x,nt,!1,Ee),Me.free(x),Me.free(nt))}x=Mt,(yt||!st||pt)&&(x=new Me(Mt.x+Jt,Mt.y+ie)),nt=Ee,(yt||!ht||pt)&&(nt=new Me(Ee.x+Pe,Ee.y+Ne)),!_t&&!yt&&st&&3<et&&this.adjustPoints(0,Mt,et-2,nt)?this.dd(et-1,Ee):!_t&&!yt&&ht&&3<et&&this.adjustPoints(1,x,et-1,Ee)?this.dd(0,Mt):!_t&&(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}Cn.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 Mf,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Cn.prototype.getLinkPoint=function(a,y,x,b,E,et,nt,st){if(st===void 0&&(st=new 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(vi,ht),y.ga(ja,pt)),Mt=this.computeSpot(!b,nt);a=this.getLinkPoint(et,nt,Mt,!b,E,a,y,pt),(x.Hf(Js)||x.Hf(_o))&&a.y>=yt.y&&a.y<=yt.y+yt.height?st.y=a.y:(x.Hf(Cl)||x.Hf(cs))&&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},Cn.prototype.getLinkDirection=function(a,y,x,b,E,et,nt,st){t:if(b.sb())var ht=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(ht=Vm(this,y),ht!==null))switch(ht.Nc){case 1:ht=270;break t;case 2:ht=180;break t;default:case 4:ht=0;break t;case 8:ht=90;break t}ht=y.ga(ei,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(ei,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},Cn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Vm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Cn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=ei:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Lo?Wr:y)):(a=y||this.toPort,a===null?a=ei:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Lo?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:ei}Cn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ca&&4<this.pointsCount?this.computeMidPoint(new Me):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(ei))},Cn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Cn.prototype.Cf=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var nt=et;if(et===void 0&&(nt=Cr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&Cr.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,_t=this.naturalBounds;if(!(Mt.x>_t.width||Mt.y>_t.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height)){if(Mt=Cr.alloc(),Mt.set(nt),yt instanceof xn)st=yt.Cf(a,y,x,b,E,Mt);else if(this.path===yt){if(yt instanceof kr)if(st=a,_t=b,yt.pickable===!1)st=!1;else if(Mt.multiply(yt.transform),_t)t:{var Zt=st,Jt=Mt;if(yt.fh(Zt,Jt))st=!0;else{if(Jt===void 0&&(Jt=yt.transform,Zt.Re(yt.actualBounds))){st=!0;break t}st=Zt.left,_t=Zt.right;var ie=Zt.top;Zt=Zt.bottom;var Ee=Me.alloc(),Pe=Me.alloc(),Ne=Me.alloc(),je=Cr.alloc();je.set(Jt),je.bv(yt.transform),je.Vj(),Pe.x=_t,Pe.y=ie,Pe.transform(je),Ee.x=st,Ee.y=ie,Ee.transform(je),Jt=!1,Fc(yt,Ee,Pe,Ne)?Jt=!0:(Ee.x=_t,Ee.y=Zt,Ee.transform(je),Fc(yt,Ee,Pe,Ne)?Jt=!0:(Pe.x=st,Pe.y=Zt,Pe.transform(je),Fc(yt,Ee,Pe,Ne)?Jt=!0:(Ee.x=st,Ee.y=ie,Ee.transform(je),Fc(yt,Ee,Pe,Ne)&&(Jt=!0)))),Cr.free(je),Me.free(Ee),Me.free(Pe),Me.free(Ne),st=Jt}}else st=yt.fh(st,Mt)}else st=Po(yt,a,b,Mt);st&&(_t=yt,y!==null&&(_t=y(yt)),_t&&(x===null||x(_t))&&E.add(_t)),Cr.free(Mt)}}}return et===void 0&&Cr.free(nt),st||this.background!==null||this.areaBackground!==null}return et===void 0&&Cr.free(nt),!1},Cn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?ys:this.curve},Cn.prototype.computeCorner=function(){if(this.curve===ys)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Cn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Cn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,et=b.margin,nt=isNaN(E.width)?30:E.width*b.scale+et.left+et.right;E=isNaN(E.height)?14:E.height*b.scale+et.top+et.bottom,b=b.segmentOrientation,b===qp||b===Qm||b===$0?a=Math.max(a,E):b===eg||b===rg||b===tg||b===ng?a=Math.max(a,nt):(y=y.ga(ei).ab(x.ga(ei))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*nt)+Math.abs(Math.cos(y)*E)+1)),this.curve===ys&&(a*=1.333)}}return a},Cn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ca&&x.bb()}},Cn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=Xn(),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),In(x)}}return a},Cn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Cn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Cn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===Jm&&(E=$p)}switch(E){case Ym:var et=this.i(a),nt=this.i(x);if(!et.Xa(y)||!nt.Xa(b)){E=et.x,et=et.y;var st=nt.x-E,ht=nt.y-et,pt=Math.sqrt(st*st+ht*ht);if(!Ue.$(pt,0)){if(Ue.$(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 _t=b.y-Mt;for(ht=Math.sqrt(st*st+_t*_t),Ue.$(st,0)?_t=0>_t?-Math.PI/2:Math.PI/2:(_t=Math.atan(_t/Math.abs(st)),0>st&&(_t=Math.PI-_t)),pt=ht/pt,yt=_t-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),Ue.$(y,0)||(Ue.$(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,_t=b.y;var Zt=1;if(ht-st!==0){var Jt=(_t-yt)/(ht-st);Zt=Math.sqrt(1+1/(Jt*Jt))}else Jt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ie=y.x,Ee=y.y,Pe=.5;pt!==0&&(Pe=((E-ie)*(E-nt)+(et-Ee)*(et-Mt))/pt);var Ne=E+Pe*(nt-E),je=et+Pe*(Mt-et);y=Math.sqrt((ie-Ne)*(ie-Ne)+(Ee-je)*(Ee-je)),Ee<Jt*(ie-Ne)+je&&(y=-y),0<Jt&&(y=-y),ie=st+Pe*(ht-st),Pe=yt+Pe*(_t-yt),Jt!==0?(y=ie+y/Zt,this.L(a,y,Pe-(y-ie)/Jt)):this.L(a,ie,Pe+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,Ue.B(E.y,et.y)?Ue.B(et.x,nt.x)?yt=y.y:Ue.B(et.y,nt.y)&&(st=y.x):Ue.B(E.x,et.x)&&(Ue.B(et.y,nt.y)?st=y.x:Ue.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,_t=yt,Ue.B(E.y,et.y)?Ue.B(et.x,nt.x)?yt=b.y:Ue.B(et.y,nt.y)&&(st=b.x):Ue.B(E.x,et.x)&&(Ue.B(et.y,nt.y)?st=b.x:Ue.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,_t),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Cn.prototype.addOrthoPoints=function(a,y,x,b,E,et){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var nt=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var st=E.actualBounds.copy(),ht=et.actualBounds.copy();if(st.w()&&ht.w()){st.Bc(ig,ig),ht.Bc(ig,ig),st.Ye(a),ht.Ye(x);var pt=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 _t=this.diagram;if(_t===null||E===et||this.layer.isTemporary||!hd(_t)||st.ca(Mt)&&!et.Td(E)||ht.ca(a)&&!E.Td(et))y=!1;else{var Zt=cd(_t,!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 Jt=x=null;if(_t.isVirtualized){_t=Zt.bounds.copy(),_t.Bc(-Zt.Ho,-Zt.Go);var ie=Me.alloc();jd(Zt,a.x,a.y)||(Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,a.x,a.y,pt.x,pt.y,ie)?(x=a=ie.copy(),y=ie.ab(pt)):Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,pt.x,pt.y,yt.x,yt.y,ie)?(x=a=ie.copy(),y=ie.ab(yt)):Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,yt.x,yt.y,Mt.x,Mt.y,ie)&&(x=a=ie.copy(),y=ie.ab(Mt))),jd(Zt,Mt.x,Mt.y)||(Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,Mt.x,Mt.y,yt.x,yt.y,ie)?(Jt=Mt=ie.copy(),b=yt.ab(ie)):Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,yt.x,yt.y,pt.x,pt.y,ie)?(Jt=Mt=ie.copy(),b=pt.ab(ie)):Ue.Ff(_t.x,_t.y,_t.x+_t.width,_t.y+_t.height,pt.x,pt.y,a.x,a.y,ie)&&(Jt=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=$l(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=$l(Zt,Mt.x,Mt.y)),!Zt.abort&&ht<Od&&$l(Zt,Mt.x,Mt.y)!==nh?(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?Ue.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)):Ue.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)&&(Ue.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)):Ue.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)),Jt!==null&&(b===0||b===180?this.yf(et.x,Jt.y):this.yf(Jt.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)}},Cn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var et=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(et=this.computeCurviness()),E?(y+b)/2+et:(a+x)/2+et};function X0(a){if(a.diagram===null||!a.isAvoiding||!hd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=cd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],et=y[b+1];if(!a.Yj(Math.min(E.x,et.x),Math.min(E.y,et.y),Math.abs(E.x-et.x),Math.abs(E.y-et.y)))return!0}return!1}function Y0(a,y,x,b,E,et,nt){var st=y.Ho,ht=y.Go,pt=$l(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>Ic&&$l(y,yt,Mt)!==pt-1&&($l(y,x-st,b)===pt-1?(E=180,yt=x-st,Mt=b):$l(y,x+st,b)===pt-1?(E=0,yt=x+st,Mt=b):$l(y,x,b-ht)===pt-1?(E=270,yt=x,Mt=b-ht):$l(y,x,b+ht)===pt-1&&(E=90,yt=x,Mt=b+ht));pt>Ic&&$l(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>Ic&&(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>Ic&&(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),$l(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),$l(y,nt,yt)===pt-1&&Y0(a,y,nt,yt,et,!1,et))),a.yf(x,b)}Cn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=ti(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=ti(y,a,b.x,b.y,x.x,x.y);b=x,st<E&&(et=nt,E=st)}return et},Cn.prototype.qc=function(){this.lk=!1,this.v()},Cn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof kr&&(E.ua=this.ua)}}},Cn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Bc(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===ys&&3<=y&&!Ue.$(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||Bc(this)){if(a.type=kn.o,st=N1(a),this.computeShortLength(!0)!==0&&(E=Pf(this,E,!0,et)),Td(st,E.x,E.y,!1),nt===ys&&3<=y&&!Ue.$(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=Pf(this,E,!1,et)),Qu(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 _t=nt,Zt=pt,Jt=this.i(J0(this,pt,Mt,!1));if((!Ue.$(_t.x,Zt.x)||!Ue.$(Zt.x,Jt.x))&&(!Ue.$(_t.y,Zt.y)||!Ue.$(Zt.y,Jt.y))){var ie=yt;isNaN(ie)&&(ie=this.smoothness/3);var Ee=_t.x;_t=_t.y;var Pe=Zt.x;Zt=Zt.y;var Ne=Jt.x;Jt=Jt.y;var je=ie*Zm(Ee,_t,Pe,Zt);ie*=Zm(Pe,Zt,Ne,Jt),Ue.$(_t,Zt)&&Ue.$(Pe,Ne)&&(Pe>Ee?Jt>Zt?(et.x=Pe-je,et.y=Zt-je,E.x=Pe+ie,E.y=Zt+ie):(et.x=Pe-je,et.y=Zt+je,E.x=Pe+ie,E.y=Zt-ie):Jt>Zt?(et.x=Pe+je,et.y=Zt-je,E.x=Pe-ie,E.y=Zt+ie):(et.x=Pe+je,et.y=Zt+je,E.x=Pe-ie,E.y=Zt-ie)),Ue.$(Ee,Pe)&&Ue.$(Zt,Jt)&&(Zt>_t?(Ne>Pe?(et.x=Pe-je,et.y=Zt-je,E.x=Pe+ie):(et.x=Pe+je,et.y=Zt-je,E.x=Pe-ie),E.y=Zt+ie):(Ne>Pe?(et.x=Pe-je,et.y=Zt+je,E.x=Pe+ie):(et.x=Pe+je,et.y=Zt+je,E.x=Pe-ie),E.y=Zt-ie)),(Ue.$(Ee,Pe)&&Ue.$(Pe,Ne)||Ue.$(_t,Zt)&&Ue.$(Zt,Jt))&&(Ee=.5*(Ee+Ne),_t=.5*(_t+Jt),et.x=Ee,et.y=_t,E.x=Ee,E.y=_t),(Mt===1||Mt===2&&Ue.$(nt.x,this.i(0).x)&&Ue.$(nt.y,this.i(0).y))&&(x.x=.5*(nt.x+pt.x),x.y=.5*(nt.y+pt.y)),Qu(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=Pf(this,yt.copy(),!1,Ji)),pt=.5*(pt+yt.x),nt=.5*(nt+yt.y),Qu(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=Pf(this,nt.copy(),!1,Ji)),Qu(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=Pf(this,yt.copy(),!1,Ji)),Cf(this,st,-b,-ht,et,yt,x);else if(pt===0)for(Mt=1;Mt<y;)E.assign(et),yt=this.i(Mt++),Cf(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,_t=yt,Pe=this.i(pt),ie=x,Ue.B(et.y,_t.y)&&Ue.B(_t.x,Pe.x))if(Jt=Math.min(nt,Math.abs(_t.x-E.x)/2),Jt=je=Math.min(Jt,Math.abs(Pe.y-_t.y)/2),Ue.B(Jt,0))Cf(this,st,Mt,Ee,et,_t,ie),et.assign(_t);else{var De=_t.x,_e=_t.y;Zt=De,Ne=_e,_t.x>et.x?De=_t.x-Jt:De=_t.x+Jt,Pe.y>_t.y?Ne=_t.y+je:Ne=_t.y-je,Pe=Me.allocAt(De,_e),Cf(this,st,Mt,Ee,et,Pe,ie),Me.free(Pe),Im(st,_t.x+Mt,_t.y+Ee,Zt+Mt,Ne+Ee),et.h(Zt,Ne)}else Ue.B(et.x,_t.x)&&Ue.B(_t.y,Pe.y)?(Jt=Math.min(nt,Math.abs(_t.y-E.y)/2),Jt=je=Math.min(Jt,Math.abs(Pe.x-_t.x)/2),Ue.B(je,0)?(Cf(this,st,Mt,Ee,et,_t,ie),et.assign(_t)):(De=_t.x,_e=_t.y,Zt=De,Ne=_e,_t.y>et.y?_e=_t.y-Jt:_e=_t.y+Jt,Pe.x>_t.x?Zt=_t.x+je:Zt=_t.x-je,Pe=Me.allocAt(De,_e),Cf(this,st,Mt,Ee,et,Pe,ie),Me.free(Pe),Im(st,_t.x+Mt,_t.y+Ee,Zt+Mt,Ne+Ee),et.h(Zt,Ne))):(Cf(this,st,Mt,Ee,et,_t,ie),et.assign(_t));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=Pf(this,E,!0,et)),this.computeShortLength(!1)!==0&&(st=Pf(this,st,!1,et)),a.type=kn.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),Ue.$(a,0)?y:Ue.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Pf(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;Ue.$(y.x,et.x)&&Ue.$(y.y,et.y);){if(x>=E)return E-1;et=a.i(x++)}if(!Ue.$(y.x,et.x)&&!Ue.$(y.y,et.y))return x-1;for(var nt=et;Ue.$(y.x,et.x)&&Ue.$(et.x,nt.x)&&(!b||(y.y>=et.y?et.y>=nt.y:et.y<=nt.y))||Ue.$(y.y,et.y)&&Ue.$(et.y,nt.y)&&(!b||(y.x>=et.x?et.x>=nt.x:et.x<=nt.x));){if(x>=E)return E-1;nt=a.i(x++)}return x-2}Cn.prototype.computeJumpLength=function(){return 10};function Cf(a,y,x,b,E,et,nt){if(!nt&&Bc(a)){nt=a.computeJumpLength();var st=nt/2,ht=[],pt=0;if(a.isVisible()&&(pt=Ex(a,E,et,ht)),0<pt){if(Ue.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 _t=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 Jt=et.y+b;a.curve===eh?Td(y,Zt,Jt,!1):Qu(y,_t,Mt,Zt,Mt,Zt,Jt)}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),_t=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===eh?Td(y,Mt,Zt,!1):Qu(y,_t,yt,Mt,yt,Mt,Zt)}else if(Ue.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),_t=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,Jt=et.x+x,Mt+=b,a.curve===eh?Td(y,Jt,Mt,!1):Qu(y,Zt,_t,Zt,Mt,Jt,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),_t=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===eh?Td(y,Zt,yt,!1):Qu(y,Mt,_t,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 Cn){if(ht===a)return 0<b.length&&b.sort(function(yt,Mt){return yt-Mt}),b.length;if(ht.isVisible()&&Bc(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=Ue.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,_t=y.x,Zt=y.y,Jt=nt.x;nt=nt.y;var ie=pt.x,Ee=pt.y;if(Ue.B(yt,_t)){if(!Ue.B(Mt,Zt)&&Ue.B(nt,Ee)&&Math.min(Mt,Zt)<nt&&Math.max(Mt,Zt)>nt&&Math.min(Jt,ie)<yt&&Math.max(Jt,ie)>yt&&!Ue.B(Jt,ie)){st.x=yt,st.y=nt,yt=!0;break t}}else if(Ue.B(Mt,Zt)&&Ue.B(Jt,ie)&&Math.min(yt,_t)<Jt&&Math.max(yt,_t)>Jt&&Math.min(nt,Ee)<Mt&&Math.max(nt,Ee)>Mt&&!Ue.B(nt,Ee)){st.x=Jt,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 Bc(a){return a=a.curve,a===Nd||a===eh}function Xm(a,y){(y||Bc(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Cn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var et=!1;E=E.Pa.s;for(var nt=E.length,st=0;st<nt;st++){var ht=E[st];ht instanceof Cn&&(ht===this?et=!0:et&&eS(this,ht,a))}}else if(b)for(et=E.Pa.s,E=et.length,nt=0;nt<E;nt++)st=et[nt],st instanceof Cn&&eS(this,st,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&Bc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Cn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Cn.prototype.isVisible=function(){if(!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},Cn.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)},Cn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?$p:this.qk};function Jp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,et=a=null,nt=y.jb.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];(pt.ef===y&&pt.ff===b&&pt.uf===x&&pt.vf===E||pt.ef===x&&pt.ff===E&&pt.uf===y&&pt.vf===b)&&(et===null?et=pt:(a===null&&(a=[],a.push(et)),a.push(pt)))}if(a!==null){for(et=W1(y,x,b,E),et===null&&(et=new qm(y,b,x,E),U1(y,et),U1(x,et)),et.links=a,y=0;y<a.length;y++)a[y].Sf=et;et.Sl()}}}}function Qp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ar(y.links,a),y.Sl()))}Cn.prototype.ph=function(){return!0},He.Object.defineProperties(Cn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Um(y,this,x),Qp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,et=this.fromPortChanged;if(et!==null){var nt=!0;b!==null&&(nt=b.aa,b.aa=!0),et(this,x,E),b!==null&&(b.aa=nt)}a!==null&&(this.uf!==a&&Gm(a,this,E),Jp(this),this.C(1)),this.g("fromNode",y,a),Ld(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&rs(x),Qp(this),this.ff=a;var b=this.fromPort;b!==null&&rs(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&&rs(x),Qp(this),this.vf=a;var b=this.toPort;b!==null&&rs(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:Lo},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&&rs(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&&En(a,">= 0",Cn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Lo},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&&rs(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&&En(a,">= 0",Cn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Xr: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 kr?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()===ys&&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),Ue.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);Ue.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);Ue.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Ue.$(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 wn,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(!sn(et)||typeof et.x!="number"||isNaN(et.x)||typeof et.y!="number"||isNaN(et.y)){b=!1;break}}if(b)for(x=new wn,b=0;b<a.length;b++)E=a[b],x.add(new Me(E.x,E.y).freeze())}}else if(a instanceof wn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Oe("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===eh||y===Nd||a===eh||a===Nd),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Xm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Cn.prototype.invalidateOtherJumpOvers=Cn.prototype.Xo,Cn.prototype.findClosestSegment=Cn.prototype.ez,Cn.prototype.updateRoute=Cn.prototype.vg,Cn.prototype.invalidateRoute=Cn.prototype.bb,Cn.prototype.rollbackRoute=Cn.prototype.rv,Cn.prototype.commitRoute=Cn.prototype.zf,Cn.prototype.startRoute=Cn.prototype.uh,Cn.prototype.clearPoints=Cn.prototype.Fj,Cn.prototype.removePoint=Cn.prototype.pv,Cn.prototype.addPointAt=Cn.prototype.yf,Cn.prototype.addPoint=Cn.prototype.ne,Cn.prototype.insertPointAt=Cn.prototype.m,Cn.prototype.insertPoint=Cn.prototype.Kz,Cn.prototype.setPointAt=Cn.prototype.L,Cn.prototype.setPoint=Cn.prototype.dd,Cn.prototype.getPoint=Cn.prototype.i,Cn.prototype.getOtherPort=Cn.prototype.Cz,Cn.prototype.getOtherNode=Cn.prototype.To;var kf=null,Ef=null,Q0=new an(Cn,"Normal",1),Tx=new an(Cn,"Orthogonal",2),Lx=new an(Cn,"AvoidsNodes",6),nS=new an(Cn,"AvoidsNodesStraight",7),Ca=new an(Cn,"None",0),ys=new an(Cn,"Bezier",9),eh=new an(Cn,"JumpGap",10),Nd=new an(Cn,"JumpOver",11),$p=new an(Cn,"End",17),Ym=new an(Cn,"Scale",18),Jm=new an(Cn,"Stretch",19),qp=new an(Cn,"OrientAlong",21),tg=new an(Cn,"OrientPlus90",22),eg=new an(Cn,"OrientMinus90",23),$0=new an(Cn,"OrientOpposite",24),Qm=new an(Cn,"OrientUpright",25),ng=new an(Cn,"OrientPlus90Upright",26),rg=new an(Cn,"OrientMinus90Upright",27),$m=new an(Cn,"OrientUpright45",28),rS=16,iS=14,ig=8;Cn.className="Link",Cn.Normal=Q0,Cn.Orthogonal=Tx,Cn.AvoidsNodes=Lx,Cn.AvoidsNodesStraight=nS,Cn.None=Ca,Cn.Bezier=ys,Cn.JumpGap=eh,Cn.JumpOver=Nd,Cn.End=$p,Cn.Scale=Ym,Cn.Stretch=Jm,Cn.OrientAlong=qp,Cn.OrientPlus90=tg,Cn.OrientMinus90=eg,Cn.OrientOpposite=$0,Cn.OrientUpright=Qm,Cn.OrientPlus90Upright=ng,Cn.OrientMinus90Upright=rg,Cn.OrientUpright45=$m,Cn.EndSegmentStep=8,Cn.CurvinessStart=rS,Cn.SpacingMin=iS,Cn.OrthoShortCut=ig;function qm(a,y,x,b){Jr(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){Jr(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 $l(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]>=Ic&&(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]===nh)return!1}return!0};function ql(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>=Ic&&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)ql(a,y,x,1,!E,et,nt,st,ht),ql(a,y,x,-1,!E,et,nt,st,ht);else for(x+=b;x>pt;x+=b)ql(a,y,x,1,!E,et,nt,st,ht),ql(a,y,x,-1,!E,et,nt,st,ht);else if(0<b)for(y+=b;y<pt;y+=b)ql(a,y,x,1,!E,et,nt,st,ht),ql(a,y,x,-1,!E,et,nt,st,ht);else for(y+=b;y>pt;y+=b)ql(a,y,x,1,!E,et,nt,st,ht),ql(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=nh,yt=Ic;for(a.ac[y][x]=yt;pt===nh&&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=nh,yt=Od;for(a.ac[y][x]=yt;pt===nh&&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 _t=et.y+et.height;Mt-=a.Nd,Mt/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,_t-=a.Od,_t/=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)),_t=Math.min(a.ei,Math.max(0,_t|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]===nh?(tv(a,st,ht,Zt,x,et,y,Mt,_t),tv(a,st,ht,1,!x,et,y,Mt,_t),tv(a,st,ht,-1,!x,et,y,Mt,_t)):tv(a,st,ht,Zt,x,st,ht,st,ht),b[pt][yt]===nh?(ev(a,pt,yt,E===0||E===90?1:-1,E===90||E===270,et,y,Mt,_t),ev(a,pt,yt,1,!(E===90||E===270),et,y,Mt,_t),ev(a,pt,yt,-1,!(E===90||E===270),et,y,Mt,_t)):ev(a,pt,yt,Zt,x,pt,yt,pt,yt),x=Xn(),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=Ic,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 ql(a,st,ht,1,!1,et,y,Mt,_t),ql(a,st,ht,-1,!1,et,y,Mt,_t),ql(a,st,ht,1,!0,et,y,Mt,_t),ql(a,st,ht,-1,!0,et,y,Mt,_t);In(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 _t=st[yt][Mt];if(_t===0||_t===ty)break;ht=yt,pt=Mt}for(;;){if(yt=b,Mt=ht,_t=pt,b===0?_t<et?(yt=90,_t++):_t>et&&(yt=270,_t--):b===90?Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--):b===180?_t<et?(yt=90,_t++):_t>et&&(yt=270,_t--):Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--),Mt=st[Mt][_t],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++}}}He.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 nh=0,Ic=1,Od=999999,q0=Od+1,ty=Od+2;og.className="PositionArray";function Mf(){Jr(this),this.port=this.node=null,this.pe=[],this.ap=!1}Mf.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}Mf.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 Sr?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(vi,Me.alloc()),ht=a.port.ga(ja,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 _t=yt.part;if(_t!==null){var Zt=_t.findVisibleNode();Zt!==null&&Zt!==_t&&(_t=Zt,yt=_t.port),yt=pt.computeOtherPoint(_t,yt),_t=st.ab(yt),_t-=ht,0>_t?_t+=360:360<=_t&&(_t-=360),Mt=Ax(E,Mt,_t,pt.isOrthogonal),Mt===0?(Mt=4,180<_t&&(_t-=360)):Mt===90?(Mt=8,270<_t&&(_t-=360)):Mt===180?Mt=2:(Mt=1,90>_t&&(_t+=360)),Zt=a.pe[et],Zt===void 0?(Zt=new ey(pt,_t,Mt),a.pe[et]=Zt):(Zt.link=pt,Zt.angle=_t,Zt.Nc=Mt),Zt.hv.set(yt),et++}}}}for(Me.free(st),a.pe.sort(Mf.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(vi,st),Mt.ga(hs,ht),Mt.ga(ja,nt),Mt.ga(Na,pt),Zt=_t=yt=Mt=0,b===H0)for(var Jt=0;Jt<et.length;Jt++){var ie=et[Jt];if(ie!==null){var Ee=ie.link.computeThickness();switch(ie.Nc){case 8:_t+=Ee;break;case 2:Zt+=Ee;break;case 1:Mt+=Ee;break;default:case 4:yt+=Ee}}}var Pe=Jt=0,Ne=1,je=ie=0;for(Ee=0;Ee<et.length;Ee++){var De=et[Ee];if(De!==null){if(Jt!==De.Nc){switch(Jt=De.Nc,Jt){case 8:var _e=nt;Pe=pt;break;case 2:_e=pt,Pe=st;break;case 1:_e=st,Pe=ht;break;default:case 4:_e=ht,Pe=nt}switch(ie=Pe.x-_e.x,je=Pe.y-_e.y,Jt){case 8:_t>Math.abs(ie)?(Ne=Math.abs(ie)/_t,_t=Math.abs(ie)):Ne=1;break;case 2:Zt>Math.abs(je)?(Ne=Math.abs(je)/Zt,Zt=Math.abs(je)):Ne=1;break;case 1:Mt>Math.abs(ie)?(Ne=Math.abs(ie)/Mt,Mt=Math.abs(ie)):Ne=1;break;default:case 4:yt>Math.abs(je)?(Ne=Math.abs(je)/yt,yt=Math.abs(je)):Ne=1}Pe=0}var Je=De.Zo;if(b===H0){switch(De=De.link.computeThickness(),De*=Ne,Je.set(_e),Jt){case 8:Je.x=_e.x+ie/2+_t/2-Pe-De/2;break;case 2:Je.y=_e.y+je/2+Zt/2-Pe-De/2;break;case 1:Je.x=_e.x+ie/2-Mt/2+Pe+De/2;break;default:case 4:Je.y=_e.y+je/2-yt/2+Pe+De/2}Pe+=De}else{var Tn=.5;b===Wm&&(Tn=(De.Uo+1)/(De.Gl+1)),Je.x=_e.x+ie*Tn,Je.y=_e.y+je*Tn}}}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}Mf.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},Mf.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)},Mf.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 Ni(a){Jr(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)}Ni.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},Ni.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ni.prototype.qb=function(){},Ni.prototype.toString=function(){var a=Wn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Ni.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())}}},Ni.prototype.createNetwork=function(){return new bi(this)},Ni.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof qe?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Sr?y.lg(a.memberParts):y.lg(a.iterator),y},Ni.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")}},Ni.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()}},Ni.prototype.doLayout=function(a){var y=new Sn;a instanceof qe?(Wh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Wh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Sr?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},Ni.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 Sr&&(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++}},Ni.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,et=0,nt=this.network.vertexes.iterator;nt.next();){var st=nt.value.node;if(!(st===null||st instanceof Cn)&&(ag(st),this.rh(st))){var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(x,b),st instanceof Sr&&(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++}}},Ni.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Sr&&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 Ln?ht.isLinkLabel||(ht instanceof Sr&&ht.layout===null?Wh(a,y,ht.memberParts,!1,E,et,nt,st):(ag(ht),y.add(ht))):nt&&ht instanceof Cn?y.add(ht):!st||!ht.Zc()||ht instanceof Ln||(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()}Ni.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},Ni.prototype.ex=function(a){var y=new Sn;return a instanceof qe?(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 Sr?Wh(this,y,a.memberParts,!1,null,!0,!0,!0):Wh(this,y,a.iterator,!1,null,!0,!0,!0),y},Ni.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(vi),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},He.Object.defineProperties(Ni.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())}}}),Ni.prototype.collectParts=Ni.prototype.ex,Ni.prototype.getLayoutBounds=Ni.prototype.ni,Ni.prototype.invalidateLayout=Ni.prototype.C,Ni.className="Layout";function bi(a){Jr(this),this.Sc=a,this.wf=new Sn,this.ye=new Sn,this.Es=new or,this.zs=new or}bi.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 Sn,this.ye=new Sn,this.Es=new or,this.zs=new or},bi.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},bi.prototype.createVertex=function(){return new So(this)},bi.prototype.createEdge=function(){return new is(this)},bi.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 Ln)return!nt.isLinkLabel;if(nt instanceof Cn){var st=nt.fromNode;return st===null||st.isLinkLabel?!1:(nt=nt.toNode,!(nt===null||nt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Ln&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Sr&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof Cn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var et=b.fromNode;E=b.toNode,et!==null&&E!==null&&et!==E&&(et=this.findGroupVertex(et),E=this.findGroupVertex(E),et!==null&&E!==null&&this.Zj(et,E,b))}}},bi.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},$t=bi.prototype,$t.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},$t.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},$t.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}$t.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},$t.ki=function(a){return a===null?null:this.Es.I(a)},$t.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}}$t.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},$t.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))}$t.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},$t.Lo=function(a){return a===null?null:this.zs.I(a)},$t.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},$t.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))}},$t.Ko=function(){for(var a=Xn(),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]);In(a)},bi.prototype.deleteArtificialVertexes=function(){for(var a=Xn(),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=Xn(),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]);In(a),In(y)};function Nx(a){for(var y=Xn(),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]);In(y)}bi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new wn;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))}}bi.prototype.dz=function(){for(var a=new Sn,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},He.Object.defineProperties(bi.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}}}),bi.prototype.findAllParts=bi.prototype.dz,bi.prototype.splitIntoSubNetworks=bi.prototype.Zx,bi.prototype.deleteSelfEdges=bi.prototype.Ko,bi.prototype.reverseEdge=bi.prototype.gm,bi.prototype.linkVertexes=bi.prototype.Zj,bi.prototype.findEdge=bi.prototype.Lo,bi.prototype.deleteLink=bi.prototype.Yy,bi.prototype.deleteEdge=bi.prototype.Mj,bi.prototype.addLink=bi.prototype.Dy,bi.prototype.addEdge=bi.prototype.Bo,bi.prototype.findVertex=bi.prototype.ki,bi.prototype.deleteNode=bi.prototype.Zy,bi.prototype.deleteVertex=bi.prototype.Iu,bi.prototype.addNode=bi.prototype.Bl,bi.prototype.addVertex=bi.prototype.dh,bi.prototype.addParts=bi.prototype.lg,bi.className="LayoutNetwork";function So(a){Jr(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 wn,this.mg=new wn}So.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new wn,this.mg=new wn},So.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+oi(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;sn(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof Sr)){x=on.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(ei);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}He.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 Sr)&&(a=a.locationObject.ga(ei),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 Sn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Sn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Sn,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 wn,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 is(a){Jr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}is.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},is.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+oi(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},is.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},is.prototype.commit=function(){},is.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},He.Object.defineProperties(is.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)}}}),is.prototype.getOtherVertex=is.prototype.Ax,is.className="LayoutEdge";function Bo(a){Ni.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Mn(NaN,NaN).freeze(),this.tf=new Mn(10,10).freeze(),this.Jb=sg,this.Rb=rv,this.nd=lg,this.hd=hS,a&&Object.assign(this,a)}Ve(Bo,Ni),Bo.prototype.cloneProtected=function(a){Ni.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},Bo.prototype.qb=function(a){a.classType===Bo?a===lg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===dl?this.arrangement=a:a===sg||a===nv?this.alignment=a:Oe("Unknown enum value: "+a):Ni.prototype.qb.call(this,a)},Bo.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 Sr)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 _t=this.ni(E[Mt],pt);yt=Math.max(yt,_t.width)}if(yt=Math.max(yt+st,1),Mt=Math.max(this.cellSize.height,1),!isFinite(Mt))for(_t=Mt=0;_t<E.length;_t++){var Zt=this.ni(E[_t],pt);Mt=Math.max(Mt,Zt.height)}Mt=Math.max(Mt+ht,1),_t=this.arrangement;for(var Jt=Zt=this.arrangementOrigin.x,ie=this.arrangementOrigin.y,Ee=0,Pe=0,Ne=0;Ne<E.length;Ne++){var je=E[Ne],De=this.ni(je,pt),_e=Math.ceil((De.width+st)/yt)*yt,Je=Math.ceil((De.height+ht)/Mt)*Mt;switch(_t){case dl:var Tn=Math.abs(Jt-De.width);break;default:Tn=Jt+De.width}switch((0<et&&Ee>et-1||0<nt&&0<Ee&&Tn-Zt>nt)&&(b.push(new on(0,ie,nt+st,Pe)),Ee=0,Jt=Zt,ie+=Pe,Pe=0),Pe=Math.max(Pe,Je),_t){case dl:De=-De.width;break;default:De=0}switch(je.moveTo(Jt+De,ie),_t){case dl:Jt-=_e;break;default:Jt+=_e}Ee++}b.push(new on(0,ie,nt+st,Pe)),on.free(pt);break;case sg:for(ht=nt,yt=et,Mt=y,_t=x,nt=on.alloc(),Zt=Math.max(this.cellSize.width,1),et=ie=pt=0,st=Me.alloc(),Jt=0;Jt<E.length;Jt++)Pe=E[Jt],Ee=this.ni(Pe,nt),Pe=$u(Pe,Pe.locationObject,Pe.locationSpot,st),pt=Math.max(pt,Pe.x),ie=Math.max(ie,Ee.width-Pe.x),et=Math.max(et,Pe.y);switch(Jt=this.arrangement,Jt){case dl:pt+=Mt;break;default:ie+=Mt}Zt=isFinite(Zt)?Math.max(Zt+Mt,1):Math.max(pt+ie,1);var _n=Pe=this.arrangementOrigin.x;for(Ne=this.arrangementOrigin.y,ie=0,ht>=pt&&(ht-=pt),pt=je=0,_e=Math.max(this.cellSize.height,1),De=et=0,Je=!0,Ee=Me.alloc(),Tn=0;Tn<E.length;Tn++){var Bn=E[Tn],Pn=this.ni(Bn,nt),fn=$u(Bn,Bn.locationObject,Bn.locationSpot,st);if(0<ie)switch(Jt){case dl:_n=(_n-Pe-(Pn.width-fn.x))/Zt,_n=Ue.$(Math.round(_n),_n)?Math.round(_n):Math.floor(_n),_n=_n*Zt+Pe;break;default:_n=(_n-Pe+fn.x)/Zt,_n=Ue.$(Math.round(_n),_n)?Math.round(_n):Math.ceil(_n),_n=_n*Zt+Pe}else switch(Jt){case dl:je=_n+fn.x+Pn.width;break;default:je=_n-fn.x}switch(Jt){case dl:var yr=-(_n+fn.x)+je;break;default:yr=_n+Pn.width-fn.x-je}if(0<yt&&ie>yt-1||0<ht&&0<ie&&yr>ht){for(b.push(new on(0,Je?Ne-et:Ne,ht+Mt,De+et+_t)),_n=0;_n<ie&&Tn!==ie;_n++){yr=E[Tn-ie+_n];var hr=$u(yr,yr.locationObject,yr.locationSpot,Ee);yr.moveTo(yr.position.x,yr.position.y+et-hr.y)}De+=_t,Ne=Je?Ne+De:Ne+(De+et),ie=De=et=0,_n=Pe,Je=!1}switch(_n===Pe&&(pt=Jt===dl?Math.max(pt,Pn.width-fn.x):Math.min(pt,-fn.x)),et=Math.max(et,fn.y),De=Math.max(De,Pn.height-fn.y),isFinite(_e)&&(De=Math.max(De,Math.max(Pn.height,_e)-fn.y)),Je?Bn.moveTo(_n-fn.x,Ne-fn.y):Bn.moveTo(_n-fn.x,Ne),Jt){case dl:_n-=fn.x+Mt;break;default:_n+=Pn.width-fn.x+Mt}ie++}if(b.push(new on(0,Ne,ht+Mt,(Je?De:De+et)+_t)),E.length!==ie)for(ht=0;ht<ie;ht++)yt=E[E.length-ie+ht],Mt=$u(yt,yt.locationObject,yt.locationSpot,st),yt.moveTo(yt.position.x,yt.position.y+et-Mt.y);if(Me.free(st),Me.free(Ee),Jt===dl)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===dl?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}},Bo.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}He.Object.defineProperties(Bo.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!==dl||(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 an(Bo,"Position",0),sg=new an(Bo,"Location",1),rv=new an(Bo,"LeftToRight",2),dl=new an(Bo,"RightToLeft",3),ay=new an(Bo,"Forward",4),iv=new an(Bo,"Reverse",5),lg=new an(Bo,"Ascending",6),ov=new an(Bo,"Descending",7);Bo.className="GridLayout",Bo.standardComparer=hS,Bo.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},Bo.Position=nv,Bo.Location=sg,Bo.LeftToRight=rv,Bo.RightToLeft=dl,Bo.Forward=ay,Bo.Reverse=iv,Bo.Ascending=lg,Bo.Descending=ov;function ui(){this.On=new Sn,this.Dn=new Sn,this.Pa=new Sn,this.cf=new or,this.bf=new or,this.aj=new or,this.H=null,this.tp=!1}$t=ui.prototype,$t.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},$t.Xe=function(a){this.H=a},$t.oi=function(a){if(a instanceof Ln){if(this.On.add(a),a instanceof Sr){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Cn?this.Dn.add(a):a instanceof $r||this.Pa.add(a);y=a.data,y===null||a instanceof $r||(a instanceof Cn?this.bf.add(y,a):this.cf.add(y,a))},$t.pc=function(a){if(a.Ej(),a instanceof Ln){if(this.On.remove(a),a instanceof Sr){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Cn?this.Dn.remove(a):a instanceof $r||this.Pa.remove(a);y=a.data,y===null||a instanceof $r||(a instanceof Cn?this.bf.remove(y):this.cf.remove(y))},$t.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 Sr)&&Oe('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 Sr||Oe('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Cn||Oe('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Xn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Xn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Xn(),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]);In(y),In(x),In(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&&(Ws(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,Gn('No Group template found for category "'+x+'"'),Gn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Gn('No Node template found for category "'+x+'"'),Gn(" 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,Gn('No Link template found for category "'+a+'"'),Gn(" 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 Ln?a:null)},ui.prototype.findLinkForKey=function(){return null},$t=ui.prototype,$t.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},$t.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Ln?a:null)},$t.Kc=function(a){return a===null?null:this.bf.I(a)},$t.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Sn;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(sn(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator},$t.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Sn;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(sn(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(dn(et)){if(!dn(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(sn(y)&&sn(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===io){var nt=a.newValue;b==="nodeDataArray"&&sn(nt)&&cS(this,nt),y.isModified=!0}else if(x===vo){var st=a.oldValue;b==="nodeDataArray"&&sn(st)&&this.ip(st),y.isModified=!0}else x===ts&&(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===io||x===vo){var yt=a.change===io,Mt=yt?a.newParam:a.oldParam,_t=yt?a.newValue:a.oldValue,Zt=this.aj.I(a.object);if(Array.isArray(Zt))for(a=0;a<Zt.length;a++){var Jt=Zt[a];if(yt)Cm(Jt,_t,Mt,!0);else if(!(0>Mt)){var ie=Mt+Wp(Jt);Jt.pc(ie,!0),w0(Jt,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 Sn,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=Xn()),x.push(nt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);In(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(dn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){jc(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(dn(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 or;if(dn(a))for(var E=0;E<a.length;E++)av(this,a[E],y,b,x);else for(a=a.iterator;a.next();)av(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new Sn;for(var et=new or,nt=b.iterator;nt.next();){var st=nt.value;if(st instanceof Cn)a||st.fromNode!==null&&st.toNode!==null||E.add(st);else if(st instanceof Ln&&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 or;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 Ln){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 Sr&&et instanceof Sr)for(y=y.memberParts;y.next();)nt=av(a,y.value,x,b,E),nt instanceof Cn||nt===null||(nt.containingGroup=et)}else if(y instanceof Cn&&et instanceof Cn)for(nt=y.fromNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.fromNode=nt)),nt=y.toNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.toNode=nt)),y=y.labelNodes;y.next();)nt=av(a,y.value,x,b,E),nt!==null&&nt instanceof Ln&&(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 Cn||(b=E.copyNodeData(b),sn(b)&&(E.xf(b),x=y.Lc(b)))}else Ws(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof Cn||(E=y.copyNodeData(b)),sn(E)&&(x.data=E)));return x},He.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 Mo(a){ui.apply(this,arguments)}Ve(Mo,ui),Mo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},Mo.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){Ws(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=Ss(x,y,!0),et!==void 0&&(et=a.Vb(et),et instanceof Ln&&(E.fromNode=et)),et=hv(x,y,!1),et!==""&&(E.toPortId=et),et=Ss(x,y,!1),et!==void 0&&(et=a.Vb(et),et instanceof Ln&&(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}}}}Mo.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)})}Mo.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Mo.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Mo.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Mo.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Mo.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Mo.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},Mo.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Mo.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 _t=a.newValue;typeof _t=="string"&&(Mt.toPortId=_t)}}else if(E==="nodeGroupKey"){var Zt=this.Lc(a.object);if(Zt!==null){var Jt=a.newValue;if(Jt!==void 0){var ie=this.Vb(Jt);ie instanceof Sr?Zt.containingGroup=ie:Zt.containingGroup=null}else Zt.containingGroup=null}}else if(E==="linkLabelKeys"){var Ee=this.Kc(a.object);if(Ee!==null){var Pe=a.oldValue,Ne=a.newValue;Array.isArray(Pe)&&Pe.forEach(function(fn){0<=Ne.indexOf(fn)||(fn=y.Vb(fn),fn!==null&&(fn.labeledLink=null))}),Array.isArray(Ne)&&Ne.forEach(function(fn){fn=y.Vb(fn),fn!==null&&(fn.labeledLink=Ee)})}}else if(E==="linkCategory"){var je=this.Kc(a.object),De=a.newValue;je!==null&&typeof De=="string"&&(je.category=De)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===io){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),Tn=this.Vb(_e);Je!==null&&Tn!==null&&(Tn.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 Bn=this.Vb(_n);Bn!==null&&(Bn.labeledLink=null)}x.isModified=!0}}else if(b===Di){var Pn=a.propertyName;a.object!==x.model||Pn!=="linkFromKeyProperty"&&Pn!=="linkToKeyProperty"&&Pn!=="linkFromPortIdProperty"&&Pn!=="linkToPortIdProperty"&&Pn!=="linkLabelKeysProperty"&&Pn!=="nodeIsGroupProperty"&&Pn!=="nodeGroupKeyProperty"&&Pn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Mo.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Sn,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)})},Mo.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof Cn){var E=Ss(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Ss(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 Sn().addAll(y);var nt=new Sn;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 $r)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Sr)&&(a.containingGroup=y)}}},Mo.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 Sr&&y.lh(nt)===x&&(nt=this.Lc(nt),nt!==null&&(nt.containingGroup=E)):(et.link=this.Kc(nt),et.link!==null&&E instanceof Ln&&(Ss(y,nt,!0)===x&&(et.link.fromNode=E),Ss(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}}gl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Sr&&(E.containingGroup=a))}},Mo.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ln){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)pl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&pl(y,x,b.data)),a instanceof Sr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&pl(y,x,b)}}},Mo.prototype.copyPartData=function(a,y){var x=ui.prototype.copyPartData.call(this,a,y);if(a instanceof Cn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Mo.prototype.insertLink=function(a,y,x,b){var E=this.diagram,et=E.model,nt=E.toolManager.findTool("Linking"),st="";if(a!==null&&(y===null&&(y=a),st=y.portId,st===null&&(st="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=nt.archetypeLinkData,b instanceof Cn){if(Ws(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 Ln&&(Ws(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 Ln||(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},Mo.prototype.findLinkForKey=Mo.prototype.findLinkForKey,Mo.prototype.findPartForKey=Mo.prototype.findPartForKey,Mo.prototype.removeAllModeledParts=Mo.prototype.removeAllModeledParts,Mo.prototype.addModeledParts=Mo.prototype.addModeledParts,Mo.prototype.addAllModeledParts=Mo.prototype.addAllModeledParts,Mo.className="GraphLinksPartManager";function As(){ui.apply(this,arguments),this.Sg=null}Ve(As,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||!ga(b,E,et,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Ws(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}}}As.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},As.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},As.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}},As.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))},As.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},As.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},As.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}}}}},As.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Ln&&(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)))}}},As.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))},As.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 Ln&&y.mh(et)===x&&sv(this,E,this.ii(et))}gl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Ln&&(a=this.Vb(a),sv(this,a,E))}},As.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ln){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)&&pl(y,x,E)}},As.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},As.prototype.findLinkForKey=As.prototype.findLinkForKey,As.className="TreePartManager";function Kn(a,y){this.kl=new Sn,this.il=new Sn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,Jr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new or,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 or,this.Lt=new wn,this.Wg=!1,this.o=null,this.undoManager=new _i,a!==void 0&&(dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Kn.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},Kn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Kn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Kn.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)+":"+rr(E)}}return y},Kn.prototype.xA=function(a){a.change!==ts&&Oe("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Eo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Kn.prototype.Qv=function(a,y){var x=this,b=!1,E=new Sn,et=new Sn,nt=new Sn,st=this.vh;a.changes.each(function(Mt){Mt.model===x&&(Mt.modelChange==="nodeDataArray"?Mt.change===io?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(_t){x.lb(_t)&&et.add(_t)}):Mt.object instanceof Kn||x.ri()&&x.Jc(Mt.object)||bS(x,Mt.object).each(function(_t){et.add(_t)})):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},Kn.prototype.cloneDeep=function(a){return Fd(this,a,!0)};function Fd(a,y,x,b,E,et){function nt(Mt,_t){st?(Mt.__gohashid===void 0&&et.push(Mt),b.set(Mt,_t)):(Mt=Ui++,b.set(Mt,_t),E.set(Mt,y))}if(!sn(y))return y;et||(et=[]);var st=Object.isExtensible(y);if(b||(b=new or),st){var ht=b.get(y);if(ht)return ht}else for(E||(E=new or),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 Mn||y instanceof on||y instanceof Ar||y instanceof jn)ht=y.copy(),nt(y,ht);else{if(y instanceof li||y instanceof kn||y instanceof an)return y;if(y instanceof wn)ht=new wn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof Sn)ht=new Sn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof or)ht=new or().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}$t=Kn.prototype,$t.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},$t.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},$t.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,sn(y)&&(a.dm(y),a.modelData=y)}$t.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)},$t.kv=function(a){xS(this,a),a=a.nodeDataArray,dn(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 Sn,nt.add(et),b.add(E,nt)):nt.add(et)}}var b=a.vh;b===null&&(b=new or,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===io||et===vo)&&(E=E.object,(et=E.itemArray)&&x(et,E))}}),a.vh=b)}function bS(a,y){for(var x=new Sn,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(sn(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}$t.Pv=function(a,y){var x=this,b=!1,E=new Sn,et=new Sn,nt=new Sn,st=this.vh;a.changes.each(function(yt){yt.model===x&&(yt.modelChange==="nodeDataArray"?yt.change===io?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 Kn||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},$t.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)&&Oe("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new or;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)},$t.$x=function(a,y){a.change!==ts&&Oe("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Eo?(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 }'},$t.yA=function(a,y){return this.$x(a,y)},$t.np=function(a){return a===void 0&&(a=hg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},$t.toJSON=function(a){return this.np(a)},$t.Zw=function(a){var y=null;if(typeof a=="string")try{y=yn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Oe("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Oe("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},$t.Ky=function(a){return this.Zw(a)},Kn.constructGraphLinksModel=function(){return new Kn},$t=Kn.prototype,$t.dm=function(a){if(dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(sn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Oe("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(sn(a)){for(y in a)if(x=a[y],sn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new wn,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},$t.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):dn(a)?Hh(this,a):sn(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 nr;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 ka(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:ka(x.x),y:ka(x.y)};else if(x instanceof Mn)y={class:"go.Size",width:ka(x.width),height:ka(x.height)};else if(x instanceof on)y={class:"go.Rect",x:ka(x.x),y:ka(x.y),width:ka(x.width),height:ka(x.height)};else if(x instanceof Ar)y={class:"go.Margin",top:ka(x.top),right:ka(x.right),bottom:ka(x.bottom),left:ka(x.left)};else if(x instanceof jn)x.sb()?y={class:"go.Spot",x:ka(x.x),y:ka(x.y),offsetX:ka(x.offsetX),offsetY:ka(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof li){if(y={class:"go.Brush",type:x.type.name},x.type===Yu?y.color=x.color:(x.type===vu||x.type===Ts)&&(y.start=x.start,y.end=x.end,x.type===Ts&&(x.startRadius!==0&&(y.startRadius=ka(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ka(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 kn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ka(x.startX)),x.startY!==0&&(y.startY=ka(x.startY)),x.endX!==0&&(y.endX=ka(x.endX)),x.endY!==0&&(y.endY=ka(x.endY)),x.spot1.D(vi)||(y.spot1=x.spot1),x.spot2.D(ja)||(y.spot2=x.spot2),x.type===kn.o&&(y.path=kn.ia(x))):x instanceof an&&(y={class:"go.EnumValue",classType:hg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var et=ro(y,E);if(!PS(E,et))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&et instanceof wn){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 Ea(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(Ea(a.x),Ea(a.y));else if(y==="Size")x=new Mn(Ea(a.width),Ea(a.height));else if(y==="Rect")x=new on(Ea(a.x),Ea(a.y),Ea(a.width),Ea(a.height));else if(y==="Margin")x=new Ar(Ea(a.top),Ea(a.right),Ea(a.bottom),Ea(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Da(a.enum):x=new jn(Ea(a.x),Ea(a.y),Ea(a.offsetX),Ea(a.offsetY));else if(y==="Brush"){if(x=new li,x.type=Rn(li,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof jn&&(x.start=a.start),a.end instanceof jn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ea(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ea(a.endRadius)),a=a.colorStops,sn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=kn.parse(a.path):x=new kn,x.type=Rn(kn,a.type),typeof a.startX=="number"&&(x.startX=Ea(a.startX)),typeof a.startY=="number"&&(x.startY=Ea(a.startY)),typeof a.endX=="number"&&(x.endX=Ea(a.endX)),typeof a.endY=="number"&&(x.endY=Ea(a.endY)),a.spot1 instanceof jn&&(x.spot1=a.spot1),a.spot2 instanceof jn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Rn(b,a.name)));return x}$t.Pe=function(a){return this.Lt.add(a),this},$t.ik=function(a){this.Lt.remove(a)},$t.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)},$t.cb=function(a,y,x,b,E,et,nt){mo(this,"",a,y,x,b,E,et,nt)},$t.g=function(a,y,x,b,E){mo(this,"",Di,a,this,y,x,b,E)},$t.Fs=function(a,y,x,b,E,et){mo(this,"",Di,y,a,x,b,E,et)};function mo(a,y,x,b,E,et,nt,st,ht){st===void 0&&(st=null),ht===void 0&&(ht=null);var pt=new Ii;pt.model=a,pt.change=x,pt.modelChange=y,pt.propertyName=b,pt.object=E,pt.oldValue=et,pt.oldParam=st,pt.newValue=nt,pt.newParam=ht,a.ds(pt)}Kn.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)),Ai(x,b,E)}else a.change===io?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,sn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&ar(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&er(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!dn(b)&&a.propertyName&&(b=ro(a.object,a.propertyName)),dn(b)&&typeof x=="number"&&(a=a.newValue,y?ar(b,x):er(b,x,a))):Oe("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===vo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,sn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&er(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&ar(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!dn(b)&&a.propertyName&&(b=ro(a.object,a.propertyName)),dn(b)&&typeof x=="number"&&(a=a.oldValue,y?er(b,x,a):ar(b,x))):Oe("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ts&&Oe("unknown ChangedEvent: "+a.toString())},Kn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Kn.prototype.eb=function(a){return this.undoManager.eb(a)},Kn.prototype.Kf=function(){return this.undoManager.Kf()},Kn.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}},$t=Kn.prototype,$t.La=function(a,y){y===void 0&&(y=""),mo(this,"SourceChanged",ts,y,a,null,null)},$t.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ro(a,y),y!==void 0)){if(Vh(y))return y;Oe("Key value for node data "+a+" is not a number or a string: "+y)}}},$t.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=ro(a,x);b!==y&&this.hc(y)===null&&(Ai(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),mo(this,"nodeKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Ai(a,x,y)}};function Vh(a){return typeof a=="number"||typeof a=="string"}$t.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},$t.hc=function(a){return a===null&&Oe("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.kb.I(a):null},$t.$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))){Ai(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Ai(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ai(a,y,x)}}}}},$t.xf=function(a){a!==null&&(ni(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&&Oe("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,er(a.Tc,b,y)),mo(a,"nodeDataArray",io,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}$t.Fy=function(a){if(dn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},$t.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;ar(a.Tc,b)}mo(a,"nodeDataArray",vo,"nodeDataArray",a,y,null,b,null),a.qp(y)}$t.nA=function(a){if(dn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},$t.$z=function(a){if(a!==this.nodeDataArray&&dn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var 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()}},$t.jp=function(a,y){y!==void 0&&(a=ug(this,a),a instanceof Sn&&this.Vf.add(y,a))},$t.Lv=function(){},$t.fm=function(){},$t.em=function(){},$t.qp=function(){};function pl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Sn,a.Vf.add(y,b)),b.add(x)}}function gl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Sn&&(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 Sn?a:null)}$t.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Kn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),sn(a)&&Jr(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 Jr(b),b}if(x&&sn(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var et=ro(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 Kn||et instanceof _i||et instanceof Eo||et instanceof Ii||(et=uv(a,et,!1)),Ai(x,b,et)}return Jr(x),x}return y instanceof Me||y instanceof Mn||y instanceof on||y instanceof jn||y instanceof Ar?y.copy():y}Kn.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,Gn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Gn(" Is that really your intent?"));var b=ro(a,y);b!==x&&(Ai(a,y,x),this.Fs(a,y,b,x))},$t=Kn.prototype,$t.set=function(a,y,x){this.setDataProperty(a,y,x)},$t.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])}},$t.Ay=function(a,y){this.ts(a,-1,y)},$t.ts=function(a,y,x){0>y&&(y=a.length),er(a,y,x),mo(this,"",io,"",a,null,x,null,y)},$t.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Oe("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ar(a,y),mo(this,"",vo,"",a,x,null,y,null)},$t.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ro(a,y),y===void 0))return"";if(typeof y=="string")return y;Oe("getCategoryForNodeData found a non-string category for "+a+": "+y)},$t.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=ro(a,x);b===void 0&&(b=""),b!==y&&(Ai(a,x,y),mo(this,"nodeCategory",Di,x,a,b,y))}else Ai(a,x,y)}},$t.lm=function(a,y){this.jm(y,this.Ro(a))},$t.Tl=function(){return!1},$t.Wj=function(){return!1},$t.ri=function(){return!1},$t.xs=function(){return!1},$t.Xj=function(){return!1};function cy(){return new Kn}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 ol[a]?ol[a]:yn.go!==void 0&&yn.go[a]?yn.go[a]:null}function ro(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 Ai(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){}}He.Object.defineProperties(Kn.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===""&&Oe("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Oe("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];sn(E)||Oe("Model.nodeDataArray must only contain Objects, not: "+E),ni(E)}for(this.Tc=a,b=new wn,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(mo(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"}}}),Kn.prototype.setCategoryForNodeData=Kn.prototype.jm,Kn.prototype.getCategoryForNodeData=Kn.prototype.Ro,Kn.prototype.removeArrayItem=Kn.prototype.ov,Kn.prototype.insertArrayItem=Kn.prototype.ts,Kn.prototype.addArrayItem=Kn.prototype.Ay,Kn.prototype.assignAllDataProperties=Kn.prototype.Do,Kn.prototype.set=Kn.prototype.set,Kn.prototype.clearUnresolvedReferences=Kn.prototype.Qy,Kn.prototype.mergeNodeDataArray=Kn.prototype.$z,Kn.prototype.removeNodeDataCollection=Kn.prototype.nA,Kn.prototype.removeNodeData=Kn.prototype.cm,Kn.prototype.addNodeDataCollection=Kn.prototype.Fy,Kn.prototype.addNodeData=Kn.prototype.xf,Kn.prototype.makeNodeDataKeyUnique=Kn.prototype.$u,Kn.prototype.findNodeDataForKey=Kn.prototype.hc,Kn.prototype.containsNodeData=Kn.prototype.lb,Kn.prototype.setKeyForNodeData=Kn.prototype.km,Kn.prototype.getKeyForNodeData=Kn.prototype.wa,Kn.prototype.updateTargetBindings=Kn.prototype.La,Kn.prototype.commit=Kn.prototype.commit,Kn.prototype.rollbackTransaction=Kn.prototype.Kf,Kn.prototype.commitTransaction=Kn.prototype.eb,Kn.prototype.startTransaction=Kn.prototype.Ea,Kn.prototype.raiseDataChanged=Kn.prototype.Fs,Kn.prototype.raiseChanged=Kn.prototype.g,Kn.prototype.raiseChangedEvent=Kn.prototype.cb,Kn.prototype.removeChangedListener=Kn.prototype.ik,Kn.prototype.addChangedListener=Kn.prototype.Pe,Kn.prototype.writeJsonValue=Kn.prototype.sm,Kn.prototype.replaceJsonObjects=Kn.prototype.dm,Kn.prototype.applyIncrementalJSON=Kn.prototype.Ky,Kn.prototype.applyIncrementalJson=Kn.prototype.Zw,Kn.prototype.toJSON=Kn.prototype.toJSON,Kn.prototype.toJson=Kn.prototype.np,Kn.prototype.toIncrementalJSON=Kn.prototype.yA,Kn.prototype.toIncrementalJson=Kn.prototype.$x,Kn.prototype.toIncrementalData=Kn.prototype.xA,Kn.prototype.clear=Kn.prototype.clear;var ES=!1,ol={};Kn.className="Model",Kn.fromJSON=Kn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=yn.JSON.parse(a)}catch(et){}else typeof a=="object"?x=a:Oe("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=yn[b])),typeof E=="function"&&(a=new E)}catch(et){}a===null||a instanceof Kn?y=a:Oe("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Kn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Kn.safePropertyValue=ro,Kn.safePropertySet=Ai,ol.Brush=li,ol.ChangedEvent=Ii,ol.Geometry=kn,ol.Margin=Ar,ol.Panel=xn,ol.Point=Me,ol.Rect=on,ol.Size=Mn,ol.Spot=jn,ol.Transaction=Eo,ol.UndoManager=_i;function so(a,y,x,b){Jr(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 Sn}so.prototype.copy=function(){var a=new so;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},$t=so.prototype,$t.qb=function(a){a.classType===so&&(this.mode=a)},$t.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},$t.freeze=function(){return this._isFrozen=!0,this},$t.ka=function(){return this._isFrozen=!1,this},$t.Kx=function(a){return a===void 0&&(a=null),this.mode=cg,this.backConverter=a,this},$t.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},$t.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)}$t.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==="")Gn("Binding error: target property is the empty string: "+this.toString());else{var et=y;if(b!==""&&(et=ro(y,b)),et!==void 0)if(E===null)x!==""&&Ai(a,x,et);else try{if(x!==""){var nt=E(et,a);Ai(a,x,nt)}else E(et,a)}catch(st){}}}},$t.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=ro(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):Ai(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):Ai(y,x,Mt)}else{var _t=et(nt,y,ht);if(_t!==void 0&&ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Zt=b.itemIndex,Jt=b.panel.itemArray;ht.ov(Jt,Zt),ht.ts(Jt,Zt,_t)}}}catch(ie){}}finally{this.st.remove(a)}}}},He.Object.defineProperties(so.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&ln(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&ln(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&ln(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&ln(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&ln(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&ln(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&ln(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&ln(this),this.el=a}}}),so.prototype.updateSource=so.prototype.sp,so.prototype.updateTarget=so.prototype.Mv,so.prototype.ofModel=so.prototype.dA,so.prototype.ofObject=so.prototype.cp,so.prototype.makeTwoWay=so.prototype.Kx;var Ox="Binding",TS=new an(so,"OneWay",1),cg=new an(so,"TwoWay",2);so.className="Binding",so.parseEnum=function(a,y){return function(x){return x=Rn(a,x),x===null?y:x}},so.toString=rr,so.OneWay=TS,so.TwoWay=cg;function Gr(a,y,x){Kn.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Sn,this.wb=new or,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(dn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ve(Gr,Kn),Gr.constructGraphLinksModel=Kn.constructGraphLinksModel,Gr.prototype.cloneProtected=function(a){Kn.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},$t=Gr.prototype,$t.clear=function(){Kn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},$t.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)+":"+rr(E)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Ss(this,E,!0)+"-->"+Ss(this,E,!1)}return y},$t.Qv=function(a,y){this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Kn.prototype.Qv.call(this,a,y),b=this,E=new Sn,et=new Sn,nt=new Sn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===io?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 Kn||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},$t.rm=function(){var a=Kn.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},$t.gp=function(a){Kn.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)},$t.Rv=function(){var a=Kn.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+Hh(this,this.linkDataArray,!0);return a+y},$t.kv=function(a){Kn.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 Sn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}$t.Pv=function(a,y){this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Kn.prototype.Pv.call(this,a,y),b=this,E=new Sn,et=new Sn,nt=new Sn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===io?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 Kn||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},$t.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)&&Oe("applyIncrementalJson cannot change Model properties"),Kn.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)},Gr.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),Ai(x,b,E);return}}else if(a.change===io){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,sn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===vo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,sn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}Kn.prototype.changeState.call(this,a,y)}},$t=Gr.prototype,$t.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),Ai(x,this.nodeKeyProperty,a),this.xf(x))}return a}},$t.yx=function(a){return Ss(this,a,!0)},$t.wv=function(a,y){Dd(this,a,y,!0)},$t.Bx=function(a){return Ss(this,a,!1)},$t.Bv=function(a,y){Dd(this,a,y,!1)};function Ss(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ro(y,a),a!==void 0))){if(Vh(a))return a;Oe((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=ro(y,E);et!==x&&(gl(a,et,y),Ai(y,E,x),a.hc(x)===null&&pl(a,x,y),mo(a,b?"linkFromKey":"linkToKey",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Ai(y,E,x)}}$t.zx=function(a){return hv(this,a,!0)},$t.xv=function(a,y){Bd(this,a,y,!0)},$t.Cx=function(a){return hv(this,a,!1)},$t.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=ro(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=ro(y,E);et===void 0&&(et=""),et!==x&&(Ai(y,E,x),mo(a,b?"linkFromPortId":"linkToPortId",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Ai(y,E,x)}}$t.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=ro(a,y),a===void 0?cv:a)},$t.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=ro(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)gl(this,b[et],a);for(Ai(a,x,y),E=y.length,et=0;et<E;et++){var nt=y[et];this.hc(nt)===null&&pl(this,nt,a)}mo(this,"linkLabelKeys",Di,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Ai(a,x,y)}},$t.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ro(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&&pl(this,y,a),mo(this,"linkLabelKeys",io,x,a,null,y,null,E)))}else Oe(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},$t.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ro(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(gl(this,y,a),mo(this,"linkLabelKeys",vo,x,a,y,null,E,null)))}else b!==void 0&&Oe(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},$t.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ro(a,y),y!==void 0)){if(Vh(y))return y;Oe("Key value for link data "+a+" is not a number or a string: "+y)}}},$t.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=ro(a,x);b!==y&&this.jh(y)===null&&(Ai(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),mo(this,"linkKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ai(a,x,y)}},$t.jh=function(a){return a===null&&Oe("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.wb.I(a):null},$t.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))){Ai(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Ai(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ai(a,y,x)}}}}},$t.Jc=function(a){return a===null?!1:this.$f.contains(a)},$t.fi=function(a){a!==null&&(ni(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&&Oe("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)),mo(a,"linkDataArray",io,"linkDataArray",a,null,y,null,b),dy(a,y)}$t.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)},$t.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(mo(a,"linkDataArray",vo,"linkDataArray",a,y,null,b,null),x=Ss(a,y,!0),gl(a,x,y),x=Ss(a,y,!1),gl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],gl(a,x,y)}$t.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)},$t.Zz=function(a){if(this.linkKeyProperty===""&&Oe("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&dn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var 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=Ss(a,y,!0);x=a.Vl(x),a.hc(x)===null&&pl(a,x,y),x=Ss(a,y,!1),x=a.Vl(x),a.hc(x)===null&&pl(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&&pl(a,x,y)}$t.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),sn(a)&&(Jr(a),this.lf!==""&&Ai(a,this.lf,void 0),this.mf!==""&&Ai(a,this.mf,void 0),this.je!==""&&Ai(a,this.je,[])),a},$t.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ro(a,y)},$t.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ro(a,y),y!==void 0)){if(Vh(y))return y;Oe("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},$t.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=ro(a,x);b!==y&&(gl(this,b,a),Ai(a,x,y),this.hc(y)===null&&pl(this,y,a),mo(this,"nodeGroupKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ai(a,x,y)}},Gr.prototype.copyNodeData=function(a){return a===null?null:(a=Kn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ro(a,this.Je)===void 0||Ai(a,this.Je,void 0),a)},Gr.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=ro(a,y);b!==x&&(Ai(a,y,x),this.Fs(a,y,b,x))},$t=Gr.prototype,$t.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&&ro(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},$t.jp=function(a,y){Kn.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(Ss(this,b,!0)===E){var nt=this.lf;Ai(b,nt,et),mo(this,"linkFromKey",Di,nt,b,E,et),typeof nt=="string"&&this.La(b,nt)}if(Ss(this,b,!1)===E&&(nt=this.mf,Ai(b,nt,et),mo(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,mo(this,"linkLabelKeys",io,ht,b,E,et,pt,pt))}},$t.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Ai(a,b,x),mo(this,"nodeGroupKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},$t.Lv=function(){Kn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},$t.fm=function(a){Kn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Xn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;mo(this,"nodeGroupKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Ss(this,b,!0)===a&&(E=this.lf,mo(this,"linkFromKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Ss(this,b,!1)===a&&(E=this.mf,mo(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&&(mo(this,"linkLabelKeys",io,nt,b,a,a,st,st),x.push(b))}for(y=0;y<x.length;y++)gl(this,a,x[y]);In(x)}},$t.em=function(a){Kn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&pl(this,y,a)},$t.qp=function(a){Kn.prototype.qp.call(this,a);var y=this.lh(a);gl(this,y,a)},$t.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ro(a,y),y===void 0))return"";if(typeof y=="string")return y;Oe("getCategoryForLinkData found a non-string category for "+a+": "+y)},Gr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Gr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=ro(a,x);b===void 0&&(b=""),b!==y&&(Ai(a,x,y),mo(this,"linkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ai(a,x,y)}},Gr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},$t=Gr.prototype,$t.lm=function(a,y){Kn.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))}$t.Wj=function(){return!0},$t.ri=function(){return!0},$t.xs=function(){return!0},$t.Xj=function(){return!0},He.Object.defineProperties(Gr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];sn(E)||Oe("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),ni(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new wn,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 Sn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,mo(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"}}}),Gr.prototype.setCategoryForLinkData=Gr.prototype.lp,Gr.prototype.getCategoryForLinkData=Gr.prototype.ps,Gr.prototype.assignAllDataProperties=Gr.prototype.Do,Gr.prototype.setGroupKeyForNodeData=Gr.prototype.mp,Gr.prototype.getGroupKeyForNodeData=Gr.prototype.lh,Gr.prototype.isGroupForNodeData=Gr.prototype.Yu,Gr.prototype.copyLinkData=Gr.prototype.Jo,Gr.prototype.mergeLinkDataArray=Gr.prototype.Zz,Gr.prototype.removeLinkDataCollection=Gr.prototype.lA,Gr.prototype.removeLinkData=Gr.prototype.bm,Gr.prototype.addLinkDataCollection=Gr.prototype.Ey,Gr.prototype.addLinkData=Gr.prototype.fi,Gr.prototype.containsLinkData=Gr.prototype.Jc,Gr.prototype.makeLinkDataKeyUnique=Gr.prototype.Bs,Gr.prototype.findLinkDataForKey=Gr.prototype.jh,Gr.prototype.setKeyForLinkData=Gr.prototype.Ks,Gr.prototype.getKeyForLinkData=Gr.prototype.Ac,Gr.prototype.removeLabelKeyForLinkData=Gr.prototype.Qx,Gr.prototype.addLabelKeyForLinkData=Gr.prototype.Bu,Gr.prototype.setLabelKeysForLinkData=Gr.prototype.Ls,Gr.prototype.getLabelKeysForLinkData=Gr.prototype.Ef,Gr.prototype.setToPortIdForLinkData=Gr.prototype.Cv,Gr.prototype.getToPortIdForLinkData=Gr.prototype.Cx,Gr.prototype.setFromPortIdForLinkData=Gr.prototype.xv,Gr.prototype.getFromPortIdForLinkData=Gr.prototype.zx,Gr.prototype.setToKeyForLinkData=Gr.prototype.Bv,Gr.prototype.getToKeyForLinkData=Gr.prototype.Bx,Gr.prototype.setFromKeyForLinkData=Gr.prototype.wv,Gr.prototype.getFromKeyForLinkData=Gr.prototype.yx,Gr.prototype.clear=Gr.prototype.clear;var cv=Object.freeze([]);Gr.className="GraphLinksModel",ol.GraphLinksModel=Gr,Kn.constructGraphLinksModel=Kn.constructGraphLinksModel=function(){return new Gr},Kn.initDiagramModel=cy=function(){return new Gr};function Ma(a,y){Kn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ve(Ma,Kn),Ma.constructGraphLinksModel=Kn.constructGraphLinksModel,Ma.prototype.cloneProtected=function(a){Kn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},$t=Ma.prototype,$t.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)+":"+rr(E)}}return y},$t.rm=function(){var a=Kn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},$t.gp=function(a){Kn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},$t.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Oe("applyIncrementalJson cannot change Model properties"),Kn.prototype.fp.call(this,a)},$t.Vl=function(a){return a},$t.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ro(a,y),y!==void 0)){if(Vh(y))return y;Oe("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},$t.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=ro(a,x);b!==y&&(gl(this,b,a),Ai(a,x,y),this.hc(y)===null&&pl(this,y,a),mo(this,"nodeParentKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ai(a,x,y)}},$t.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ro(a,y),y===void 0)?"":typeof y=="string"?y:(Oe("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ma.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ma.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=ro(a,x);b===void 0&&(b=""),b!==y&&(Ai(a,x,y),mo(this,"parentLinkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ai(a,x,y)}},Ma.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ma.prototype.copyNodeData=function(a){return a===null?null:(a=Kn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ro(a,this.Ke)===void 0||Ai(a,this.Ke,void 0),a)},Ma.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=ro(a,y);b!==x&&(Ai(a,y,x),this.Fs(a,y,b,x))},$t=Ma.prototype,$t.jp=function(a,y){Kn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},$t.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Ai(a,b,x),mo(this,"nodeParentKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},$t.fm=function(a){Kn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Xn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;mo(this,"nodeParentKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)gl(this,a,x[y]);In(x)}},$t.em=function(a){Kn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&pl(this,y,a)},$t.qp=function(a){Kn.prototype.qp.call(this,a);var y=this.mh(a);gl(this,y,a)},$t.lm=function(a,y){Kn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},$t.Tl=function(){return!0},$t.xs=function(){return!0},He.Object.defineProperties(Ma.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"}}}),Ma.prototype.setParentLinkCategoryForNodeData=Ma.prototype.Ms,Ma.prototype.getParentLinkCategoryForNodeData=Ma.prototype.ss,Ma.prototype.setParentKeyForNodeData=Ma.prototype.qe,Ma.prototype.getParentKeyForNodeData=Ma.prototype.mh,Ma.className="TreeModel",ol.TreeModel=Ma;function Gi(a){Ni.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=al,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=al,this.K=Ta,this.nd=Rd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Ve(Gi,Ni),Gi.prototype.cloneProtected=function(a){Ni.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},Gi.prototype.qb=function(a){a.classType===Gi?a===mv||a===vv||a===pv||a===gv||a===Rd?this.sorting=a:a===Rc||a===Id||a===Ta||a===Zh?this.direction=a:a===rh||a===Kh||a===al||a===sl?this.arrangement=a:(a===Tf||a===yv)&&(this.nodeDiameterFormula=a):Ni.prototype.qb.call(this,a)},Gi.prototype.createNetwork=function(){return new _d(this)},Gi.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 wn;y.addAll(a.iterator),a=new wn;var x=new wn,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 _t=this.sweepAngle;if((!isFinite(_t)||360<_t||1>_t)&&(_t=360),y=this.spacing,isFinite(y)||(y=NaN),st===sl&&ht===Tf?st=al:st===sl&&ht!==Tf&&(st=this.arrangement),(this.direction===Rc||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===Rc?(this.arrangement===sl&&a.reverse(),b=new wn,b.addAll(a),b.addAll(x)):(this.arrangement===sl&&x.reverse(),b=new wn,b.addAll(x),b.addAll(a))}ht=b.length;for(var Zt=et=E=0;Zt<b.length;Zt++){var Jt=Mt+_t*et*(this.direction===Ta?1:-1)/ht,ie=b.M(Zt).diameter;isNaN(ie)&&(ie=Xh(b.M(Zt),Jt)),360>_t&&(Zt===0||Zt===b.length-1)&&(ie/=2),E+=ie,et++}if(isNaN(pt)||st===sl){if(isNaN(y)&&(y=6),st!==al&&st!==sl){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===rh?pt=(et+y)/(2*Math.PI/ht):pt=fv(this,nt*(360<=_t?ht:ht-1),yt,Mt*Math.PI/180,_t*Math.PI/180)}else pt=fv(this,E+(360<=_t?ht:ht-1)*(st!==sl?y:1.6*y),yt,Mt*Math.PI/180,_t*Math.PI/180);et=pt*yt}else if(et=pt*yt,Zt=py(this,pt,et,Mt*Math.PI/180,_t*Math.PI/180),isNaN(y))(st===al||st===sl)&&(y=(Zt-E)/(360<=_t?ht:ht-1));else if(st===al||st===sl)Zt=(Zt-E)/(360<=_t?ht:ht-1),Zt<y?(pt=fv(this,E+y*(360<=_t?ht:ht-1),yt,Mt*Math.PI/180,_t*Math.PI/180),et=pt*yt):y=Zt;else{for(nt=-1/0,E=0;E<ht;E++)Jt=b.M(E),ie=b.M(E===ht-1?0:E+1),isNaN(Jt.diameter)&&Xh(Jt,0),isNaN(ie.diameter)&&Xh(ie,0),nt=Math.max(nt,(Jt.diameter+ie.diameter)/2);nt+=y,E=fv(this,nt*(360<=_t?ht:ht-1),yt,Mt*Math.PI/180,_t*Math.PI/180),E>pt?(pt=E,et=pt*yt):nt=Zt/(360<=_t?ht:ht-1)}if(this.kw=st,this.lc=pt,this.Zm=yt,this.lw=Mt,this.Wp=_t,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,_t=this.me,ht=this.Jp,this.direction!==Rc&&this.direction!==Id||b!==sl)if(this.direction===Rc||this.direction===Id){switch(nt=0,b){case Kh:nt=180*dv(this,st,_t,pt,ht)/Math.PI;break;case al: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,_t,pt,Mt+(y+ht)/2)/Math.PI;break;case rh:nt=yt/y.length}if(this.direction===Rc){switch(b){case Kh:pg(this,a,pt,Zh);break;case al:dg(this,a,pt,Zh);break;case rh:fg(this,a,yt/2,pt,Zh)}switch(b){case Kh:pg(this,x,pt+nt,Ta);break;case al:dg(this,x,pt+nt,Ta);break;case rh:fg(this,x,yt/2,pt+nt,Ta)}}else{switch(b){case Kh:pg(this,x,pt,Zh);break;case al:dg(this,x,pt,Zh);break;case rh:fg(this,x,yt/2,pt,Zh)}switch(b){case Kh:pg(this,a,pt+nt,Ta);break;case al:dg(this,a,pt+nt,Ta);break;case rh:fg(this,a,yt/2,pt+nt,Ta)}}}else switch(b){case Kh:pg(this,y,pt,this.direction);break;case al:dg(this,y,pt,this.direction);break;case rh:fg(this,y,yt,pt,this.direction);break;case sl:OS(this,y,yt,pt,this.direction)}else OS(this,y,yt,pt-yt/2,Ta)}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===Ta?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===Ta?x:-x,(pt.diameter+yt.diameter)/2+nt),x+=b===Ta?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===Ta?x:-x,nt),x+=b===Ta?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===Ta?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 _t=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(_t)?0:_t,ht=Math.abs(et)>Math.abs(Mt)?0<et!=pt>Mt:0<Mt!=ht<et,(ht=E===Ta?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(),_t=0;_t<Mt.length&&(Mt[_t].centerX=ht,Mt[_t].centerY=pt,!(_t>=Mt.length-1));_t++)BS(a,ht,pt,Mt,_t,E,yt)||IS(a,ht,pt,Mt,_t,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===Ta?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===Ta)){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===Ta)){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}Gi.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Gi.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))},Gi.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}}Gi.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:Oe("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new wn;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}Gi.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 wn;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,_t=-1,Zt=[],Jt=0;Jt<x.length;Jt++)0>y[x[Jt]].indexOf(x[Jt===x.length-1?0:Jt+1])&&Zt.push(Jt===x.length-1?0:Jt+1);if(Zt.length===0)for(Jt=0;Jt<x.length;Jt++)Zt.push(Jt);for(Jt=0;Jt<Zt.length;Jt++){for(var ie=Zt[Jt],Ee=y[pt],Pe=0,Ne=0;Ne<nt.length;Ne++){var je=et[nt[Ne]],De=et[st[Ne]];if(je<De){var _e=je;je=De}else _e=De;if(_e<ie&&ie<=je)for(De=0;De<Ee.length;De++){var Je=Ee[De];0>x.indexOf(Je)||_e<et[Je]&&et[Je]<je||_e===et[Je]||je===et[Je]||Pe++}else for(De=0;De<Ee.length;De++)Je=Ee[De],0>x.indexOf(Je)||_e<et[Je]&&et[Je]<je&&_e!==et[Je]&&je!==et[Je]&&Pe++}for(Ee=Pe,Ne=Pe=0;Ne<y[pt].length;Ne++)_e=x.indexOf(y[pt][Ne]),0<=_e&&(_e=Math.abs(ie-(_e>=ie?_e+1:_e)),Pe+=_e<x.length+1-_e?_e:x.length+1-_e);for(Ne=0;Ne<nt.length;Ne++)_e=et[nt[Ne]],je=et[st[Ne]],_e>=ie&&_e++,je>=ie&&je++,_e>je&&(De=je,je=_e,_e=De),je-_e<(x.length+2)/2==(_e<ie&&ie<=je)&&Pe++;(Ee<yt||Ee===yt&&Pe<Mt)&&(yt=Ee,Mt=Pe,_t=ie)}for(x.splice(_t,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(_t=Mt=0;_t<y[pt].length;_t++)Zt=x.indexOf(y[pt][_t]),0>Zt||Zt===yt||(Jt=Zt>yt?Zt-yt:yt-Zt,Mt+=Zt<yt!=Jt>nt-Jt?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},He.Object.defineProperties(Gi.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!==sl&&a!==al&&a!==Kh&&a!==rh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ta&&a!==Zh&&a!==Rc&&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!==Tf||(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 al=new an(Gi,"ConstantSpacing",0),Kh=new an(Gi,"ConstantDistance",1),rh=new an(Gi,"ConstantAngle",2),sl=new an(Gi,"Packed",3),Ta=new an(Gi,"Clockwise",4),Zh=new an(Gi,"Counterclockwise",5),Rc=new an(Gi,"BidirectionalLeft",6),Id=new an(Gi,"BidirectionalRight",7),pv=new an(Gi,"Forwards",8),gv=new an(Gi,"Reverse",9),mv=new an(Gi,"Ascending",10),vv=new an(Gi,"Descending",11),Rd=new an(Gi,"Optimized",12),yv=new an(Gi,"Pythagorean",13),Tf=new an(Gi,"Circular",14);Gi.className="CircularLayout",Gi.ConstantSpacing=al,Gi.ConstantDistance=Kh,Gi.ConstantAngle=rh,Gi.Packed=sl,Gi.Clockwise=Ta,Gi.Counterclockwise=Zh,Gi.BidirectionalLeft=Rc,Gi.BidirectionalRight=Id,Gi.Forwards=pv,Gi.Reverse=gv,Gi.Ascending=mv,Gi.Descending=vv,Gi.Optimized=Rd,Gi.Pythagorean=yv,Gi.Circular=Tf;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){bi.call(this,a)}Ve(_d,bi),_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}Ve(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===sl)if(x.nodeDiameterFormula===Tf)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===Tf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}He.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){is.call(this,a)}Ve(Sv,is),Sv.className="CircularEdge";function Zo(a){Ni.call(this),this.ah=null,this.An=0,this.$d=new Mn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Ve(Zo,Ni),Zo.prototype.cloneProtected=function(a){Ni.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},Zo.prototype.createNetwork=function(){return new Lf(this)},Zo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var et=E.value;et.Vd=et.vertexes.count,et.sh=1,et.Hj=null,et.We=null}RS(this,0,a)}this.network=y;var nt=b=x.iterator;b=this.arrangementSpacing;var st=nt.count,ht=!0;et=E=0;for(var pt=Xn(),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 _t=_S(pt,st,E,et,Mt.width,Mt.height,b),Zt=pt[_t],Jt=new Me(Zt.x+Mt.width+b.width,Zt.y),ie=new Me(Zt.x,Zt.y+Mt.height+b.height);for(_t+1<st&&pt.splice(_t+1,0,null),pt[_t]=Jt,pt[_t+1]=ie,st++,_t=Zt.x-Mt.x,Zt=Zt.y-Mt.y,yt=yt.vertexes.iterator;yt.next();)Jt=yt.value,Jt.centerX+=_t,Jt.centerY+=Zt}for(on.free(Mt),yt=y.vertexes.iterator;yt.next();)nt=yt.value,_t=nt.bounds,2>st?(E=_t.x+_t.width/2,et=_t.y+_t.height/2,pt[0]=new Me(_t.x+_t.width+b.width,_t.y),pt[1]=new Me(_t.x,_t.y+_t.height+b.height),st=2):(ht=_S(pt,st,E,et,_t.width,_t.height,b),Mt=pt[ht],Zt=new Me(Mt.x+_t.width+b.width,Mt.y),_t=new Me(Mt.x,Mt.y+_t.height+b.height),ht+1<st&&pt.splice(ht+1,0,null),pt[ht]=Zt,pt[ht+1]=_t,st++,nt.centerX=Mt.x+nt.width/2,nt.centerY=Mt.y+nt.height/2);for(In(pt),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Zo.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Zo.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Bx(a,y),et=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=et,RS(a,y+1,x),GS(a,et),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(nt,st){return nt===null||st===null||nt===st?0:st.Vd-nt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Lf(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 wn),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 wn,E.Hj=st),st.add(nt),E.Vd--,E.sh+=nt.sh):nt.network===b&&(st=nt.Hj,st===null&&(st=new wn,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,Ue.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),_t=null;for(et=Mt.edges.iterator;et.next();){var Zt=et.value;if(Zt.Ax(Mt)===E){_t=Zt;break}}_t!==null&&(pt+=_t.length,st+=Mt.width*Mt.height)}et=E.centerX,ht=E.centerY,yt=E.width,Mt=E.height,_t=E.focus,Zt=yt*Mt,1>Zt&&(Zt=1),st=Ue.sqrt((st+Zt+pt*pt*4/(nt*nt))/Zt),nt=(st-1)*yt/2,st=(st-1)*Mt/2,E.bounds=new on(et-_t.x-nt,ht-_t.y-st,yt+2*nt,Mt+2*st),E.focus=new Me(_t.x+nt,_t.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=Ue.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,Jt){return Zt===null||Jt===null||Zt===Jt?0:Jt.width*Jt.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 _t=ht.height;Mt=Ue.sqrt(Mt*Mt+_t*_t)/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,_t=yt.y-b;if(Mt=Mt*Mt+_t*_t,Mt<st){for(_t=pt-1;0<=_t;_t--)if(a[_t].y>yt.y&&a[_t].x-yt.x<E+nt.width)continue t;for(_t=pt+1;_t<y;_t++)if(a[_t].x>yt.x&&a[_t].y-yt.y<et+nt.height)continue t;ht=pt,st=Mt}}return ht}Zo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Zo.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var et=E.value;if(et.toVertex===a){x=et;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(et=E.value,et.fromVertex===a){x=et;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var et=y.bounds,nt=et.x;y=et.y;var st=et.width;return et=et.height,b+E<nt?a>y+et?(x=b+E-nt,a=a-y-et,Ue.sqrt(x*x+a*a)):a+x<y?(b=b+E-nt,a=a+x-y,Ue.sqrt(b*b+a*a)):nt-(b+E):b>nt+st?a>y+et?(x=b-nt-st,a=a-y-et,Ue.sqrt(x*x+a*a)):a+x<y?(b=b-nt-st,a=a+x-y,Ue.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 _t=y[Mt];if(_t!==nt){b=_t.bounds,st=_t.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 Jt=zS(nt,_t);1>Jt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Jt=b.random(),st=b.random(),ht>pt?(b=Math.abs(_t.bounds.right-nt.bounds.x),b=(1+b)*Jt):ht<pt?(b=Math.abs(_t.bounds.x-nt.bounds.right),b=-(1+b)*Jt):(b=Math.max(_t.width,nt.width),b=(1+b)*Jt-b/2),yt>Zt?(pt=Math.abs(_t.bounds.bottom-nt.bounds.y),pt=(1+pt)*st):ht<pt?(pt=Math.abs(_t.bounds.y-nt.bounds.bottom),pt=-(1+pt)*st):(pt=Math.max(_t.height,nt.height),pt=(1+pt)*st-pt/2)):(st=-(nt.charge*_t.charge)/(Jt*Jt),b=(pt-ht)/Jt*st,pt=(Zt-yt)/Jt*st),nt.forceX+=b,nt.forceY+=pt,_t.forceX-=b,_t.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}Zo.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Zo.prototype.moveFixedVertex=function(){},Zo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Zo.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Lo,y.toSpot=Lo)}},Zo.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=on.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,on.free(x)}x=on.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}on.free(x)},Zo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Zo.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Zo.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Zo.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Zo.prototype.electricalFieldX=function(){return 0},Zo.prototype.electricalFieldY=function(){return 0},Zo.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Zo.prototype.gravitationalFieldX=function(){return 0},Zo.prototype.gravitationalFieldY=function(){return 0},Zo.prototype.isFixed=function(a){return a.isFixed},He.Object.defineProperties(Zo.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Oe('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Zo.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Lf(a){bi.call(this,a)}Ve(Lf,bi),Lf.prototype.createVertex=function(){return new vg(this)},Lf.prototype.createEdge=function(){return new yg(this)},Lf.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}Ve(vg,So),He.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){is.call(this,a),this.j=this.o=NaN}Ve(yg,is),He.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){Ni.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)}Ve(hi,Ni),hi.prototype.cloneProtected=function(a){Ni.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:Oe("Unknown enum value: "+a):Ni.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 _t=st.fromPort;_t!==null&&!_t.Ed();)_t=_t.panel;for(st=st.toPort;st!==null&&!st.Ed();)st=st.panel;if(b.rev){pt=Mt;var Zt=_t;Mt=ht,_t=st,ht=pt,st=Zt}var Jt=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()?($u(Mt,_t,ei,Zt),Zt.x+=Mt.actualBounds.x-ie.x,Zt.y+=Mt.actualBounds.y-ie.y):($u(Mt,_t,ei,Zt),Zt.w()||Zt.assign(Jt)):Zt.assign(Jt):ie.w()?($u(Mt,_t,ei,Zt),Zt.w()||Zt.assign(Jt)):Zt.assign(Jt),Mt=b.rev?E.bounds:et.bounds,yt=Me.alloc(),nt!==ht?Mt.w()&&ht.isVisible()?ht.actualBounds.w()?($u(ht,st,ei,yt),yt.x+=ht.actualBounds.x-Mt.x,yt.y+=ht.actualBounds.y-Mt.y):($u(ht,st,ei,yt),yt.w()||yt.assign(pt)):yt.assign(pt):Mt.w()?($u(ht,st,ei,yt),yt.w()||yt.assign(pt)):yt.assign(pt),this.K===90||this.K===270?(nt=Math.round((Zt.x-Jt.x)/this.kc),ht=Zt.x,st=Math.round((yt.x-pt.x)/this.kc),pt=yt.x):(nt=Math.round((Zt.y-Jt.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,Pe=ie.toPort;if(Ee!==null&&Pe!==null){var Ne=ie.fromNode;if(_t=ie.toNode,Ne!==null&&_t!==null){var je=Cv(this,!0),De=Cv(this,!1),_e=this.setsPortSpots?je:ie.computeSpot(!0,Ee);Jt=this.setsPortSpots?De:ie.computeSpot(!1,Pe);var Je=ie.isOrthogonal;_e.$c()&&_e.Hf(De)&&Jt.$c()&&Jt.Hf(je)?Mt=0:(je=ie.getLinkPoint(Ne,Ee,_e,!0,Je,_t,Pe,Me.alloc()),De=ie.getLinkDirection(Ne,Ee,je,_e,!0,Je,_t,Pe),Me.free(je),_e.ys()||De!==QS(this,b,!0)?this.setsPortSpots&&Ne!==null&&Ne.ports.count===1&&b.rev&&(Mt+=1):Mt+=1,_e=ie.getLinkPoint(_t,Pe,Jt,!1,Je,Ne,Ee,Me.alloc()),ie=ie.getLinkDirection(_t,Pe,_e,Jt,!1,Je,Ne,Ee),Me.free(_e),Jt.ys()||ie!==QS(this,b,!1)?this.setsPortSpots&&_t!==null&&_t.ports.count===1&&b.rev&&(Mt+=2):Mt+=2)}}}if(_t=Mt,Mt=_t===1||_t===3,(_t=_t===2||_t===3)&&(Jt=a.createVertex(),Jt.node=null,Jt.Dj=1,Jt.layer=Zt,Jt.near=E,a.dh(Jt),E=a.Zj(E,Jt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=nt,E.portToColOffset=0,E.portFromPos=ht,E.portToPos=0,E=Jt),ie=1,Mt&&ie--,Zt-yt>ie&&0<Zt){for(b.valid=!1,Jt=a.createVertex(),Jt.node=null,Jt.Dj=2,Jt.layer=Zt-1,a.dh(Jt),E=a.Zj(E,Jt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=_t?0:nt,E.portToColOffset=0,E.portFromPos=_t?0:ht,E.portToPos=0,E=Jt,Zt--;Zt-yt>ie&&0<Zt;)Jt=a.createVertex(),Jt.node=null,Jt.Dj=3,Jt.layer=Zt-1,a.dh(Jt),E=a.Zj(E,Jt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Jt,Zt--;E=a.Zj(Jt,et,b.link),E.valid=!Mt,Mt&&(Jt.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 Ns(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 _t;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,_t=pt+1;_t<ht.length;_t++){var Jt=ht[_t];if(Jt.valid&&Jt.fromVertex.layer!==y){var ie=Jt.fromVertex.index,Ee=Jt.portToPos;Jt=Jt.portFromPos,yt<Ee&&(Mt>ie||Mt===ie&&Zt>Jt)&&st++,Ee<yt&&(ie>Mt||ie===Mt&&Jt>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,_t=pt+1;_t<ht.length;_t++)Jt=ht[_t],Jt.valid&&Jt.toVertex.layer!==y&&(ie=Jt.toVertex.index,Ee=Jt.portToPos,Jt=Jt.portFromPos,Zt<Jt&&(Mt>ie||Mt===ie&&yt>Ee)&&st++,Jt<Zt&&(ie>Mt||ie===Mt&&Ee>yt)&&st++)}for(et[nt*E+nt]=st,ht=nt+1;ht<E;ht++){var Pe=0,Ne=0;if(0<=x){st=b[nt].sourceEdgesArrayAccess;var je=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,_t=0;_t<je.length;_t++)Jt=je[_t],Jt.valid&&Jt.fromVertex.layer!==y&&(ie=Jt.fromVertex.index,Jt=Jt.portFromPos,(Mt<ie||Mt===ie&&Zt<Jt)&&Ne++,(ie<Mt||ie===Mt&&Jt<Zt)&&Pe++)}if(0>=x){for(st=b[nt].destinationEdgesArrayAccess,je=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,_t=0;_t<je.length;_t++)Jt=je[_t],Jt.valid&&Jt.toVertex.layer!==y&&(ie=Jt.toVertex.index,Ee=Jt.portToPos,(Mt<ie||Mt===ie&&yt<Ee)&&Ne++,(ie<Mt||ie===Mt&&Ee<yt)&&Pe++)}et[nt*E+ht]=Pe,et[ht*E+nt]=Ne}}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 _t=Mt.fromVertex.column+Mt.portFromColOffset,Zt=Mt.toVertex.column+Mt.portToColOffset;st+=(Math.abs(_t-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,_t=st.near;if(_t!==null&&_t.layer===st.layer&&(yt+=_t.column-1,Mt++),ht!==null)for(_t=0;_t<ht.length;_t++){st=ht[_t];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],_t=st.toVertex,st.valid&&!st.rev&&_t.layer!==y&&(yt+=_t.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=[],_t=st.near;if(_t!==null&&_t.layer===st.layer&&(Mt[yt]=_t.column-1,yt++),st=void 0,ht!==null)for(_t=0;_t<ht.length;_t++){st=ht[_t];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],_t=st.toVertex,st.valid&&!st.rev&&_t.layer!==y&&(Mt[yt]=_t.column+st.portToColOffset,yt++);yt===0?et[nt]=-1:(Mt.sort(function(Jt,ie){return Jt-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,_t=pt.sourceEdgesArrayAccess;E=_t.length;for(var Zt=0;Zt<E;Zt++){var Jt=_t[Zt],ie=Jt.fromVertex;yt+=1,ie.component!==1&&(et+=1,ie=ie.layer-pt.layer,Jt=a.linkMinLength(Jt),b=Math.min(b,ie-Jt))}for(_t=pt.destinationEdgesArrayAccess,E=_t.length,Zt=0;Zt<E;Zt++)Jt=_t[Zt].toVertex,--yt,Jt.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,_t=nt.sourceEdgesArrayAccess,Mt=_t.length,Zt=0;Zt<Mt;Zt++)Jt=_t[Zt].fromVertex,pt+=1,Jt.component!==1?b+=1:yt=!0;for(_t=nt.destinationEdgesArrayAccess,Mt=_t.length,Zt=0;Zt<Mt;Zt++)Jt=_t[Zt],ie=Jt.toVertex,--pt,ie.component!==1&&(--b,ie=nt.layer-ie.layer,Jt=a.linkMinLength(Jt),E=Math.min(E,ie-Jt));(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),Hs(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),Hs(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Ua(this))}for(Ns(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),Hs(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Ua(this)),b=this.Ia;0<=b;b--)bv(this,b,0),Hs(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Ua(this))}Ns(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=Hs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Hs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,1)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,-1)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Hs(this,b,0)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,0)||et;E>=a?Ns(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=Hs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Hs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,1)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,-1)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Hs(this,b,0)||et;for(E>=a?Ns(this,y):(a=E,y=Ua(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Hs(this,b,0)||et;E>=a?Ns(this,y):(a=E,y=Ua(this))}}Ns(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 Hs(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],_t=0,Zt=0,Jt=b[et].column,ie=b[et+1].column,Ee=a.nodeMinColumnSpace(b[et],!0),Pe=a.nodeMinColumnSpace(b[et],!1),Ne=a.nodeMinColumnSpace(b[et+1],!0),je=a.nodeMinColumnSpace(b[et+1],!1);Ee=Jt-Ee+Ne,Pe=ie-Pe+je;var De=b[et].sourceEdges.iterator;for(De.reset();De.next();)if(Ne=De.value,je=Ne.fromVertex,Ne.valid&&je.layer===y){for(Ne=0;b[Ne]!==je;)Ne++;Ne<et&&(_t+=2*(et-Ne),Zt+=2*(et+1-Ne)),Ne===et+1&&(_t+=1),Ne>et+1&&(_t+=4*(Ne-et),Zt+=4*(Ne-(et+1)))}for(De=b[et].destinationEdges.iterator,De.reset();De.next();)if(Ne=De.value,je=Ne.toVertex,Ne.valid&&je.layer===y){for(Ne=0;b[Ne]!==je;)Ne++;Ne===et+1&&(Zt+=1)}for(De=b[et+1].sourceEdges.iterator,De.reset();De.next();)if(Ne=De.value,je=Ne.fromVertex,Ne.valid&&je.layer===y){for(Ne=0;b[Ne]!==je;)Ne++;Ne<et&&(_t+=2*(et+1-Ne),Zt+=2*(et-Ne)),Ne===et&&(Zt+=1),Ne>et+1&&(_t+=4*(Ne-(et+1)),Zt+=4*(Ne-et))}for(De=b[et+1].destinationEdges.iterator,De.reset();De.next();)if(Ne=De.value,je=Ne.toVertex,Ne.valid&&je.layer===y){for(Ne=0;b[Ne]!==je;)Ne++;Ne===et&&(_t+=1)}Ne=je=0,De=nt[b[et].index];var _e=st[b[et].index],Je=nt[b[et+1].index],Tn=st[b[et+1].index];De!==-1&&(je+=Math.abs(De-Jt),Ne+=Math.abs(De-Pe)),_e!==-1&&(je+=Math.abs(_e-Jt),Ne+=Math.abs(_e-Pe)),Je!==-1&&(je+=Math.abs(Je-ie),Ne+=Math.abs(Je-Ee)),Tn!==-1&&(je+=Math.abs(Tn-ie),Ne+=Math.abs(Tn-Ee)),(Zt<_t-.5||Zt===_t&&Mt<yt-.5||Zt===_t&&Mt===yt&&Ne<je-.5)&&(pt=ht=!0,b[et].column=Pe,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),_t=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>_t+a.nodeMinColumnSpace(E[b+1],!0)?yt+1:yt;var Jt=_t=0,ie=0;if(0>=x)for(var Ee=E[b].sourceEdges.iterator;Ee.next();){var Pe=Ee.value,Ne=Pe.fromVertex;if(Pe.valid&&Ne.layer!==y){var je=gy(Pe),De=Pe.portFromColOffset;Pe=Pe.portToColOffset,Ne=Ne.column,_t+=(Math.abs(yt+Pe-(Ne+De))+1)*je,Jt+=(Math.abs(Zt+Pe-(Ne+De))+1)*je,ie+=(Math.abs(Mt+Pe-(Ne+De))+1)*je}}if(0<=x)for(Ee=E[b].destinationEdges.iterator;Ee.next();)Pe=Ee.value,Ne=Pe.toVertex,Pe.valid&&Ne.layer!==y&&(je=gy(Pe),De=Pe.portFromColOffset,Pe=Pe.portToColOffset,Ne=Ne.column,_t+=(Math.abs(yt+De-(Ne+Pe))+1)*je,Jt+=(Math.abs(Zt+De-(Ne+Pe))+1)*je,ie+=(Math.abs(Mt+De-(Ne+Pe))+1)*je);Pe=De=je=0,Ee=nt[E[b].index],Ne=st[E[b].index],Ee!==-1&&(je+=Math.abs(Ee-yt),De+=Math.abs(Ee-Zt),Pe+=Math.abs(Ee-Mt)),Ne!==-1&&(je+=Math.abs(Ne-yt),De+=Math.abs(Ne-Zt),Pe+=Math.abs(Ne-Mt)),Jt<_t||Jt===_t&&De<je?(pt=ht=!0,E[b].column=Zt):(ie<_t||ie===_t&&Pe<je)&&(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?Ns(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?Ns(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=Xn(),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 Sn,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,_t=(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=Zn(y),E=b.next();!E.done;E=b.next())E.value.reverse();_t&&(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)),In(y),a.u(et,nt,st,ht),a.network.vertexes.each(function(Zt){var Jt=Xn();pt&&Jt.push(et.get(Zt)),yt&&Jt.push(nt.get(Zt)),Mt&&Jt.push(st.get(Zt)),_t&&Jt.push(ht.get(Zt)),Jt.sort(function(Ee,Pe){return Ee-Pe});var ie=Jt.length;ie=(Jt[Math.floor((ie-1)/2)]+Jt[Math.ceil((ie-1)/2)])/2,In(Jt),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 _t=Zn(pt.sourceEdgesArrayAccess),Zt=_t.next();!Zt.done;Zt=_t.next())Zt=Zt.value,Zt.valid&&Mt.push(Zt);pt.bo=Mt}for(pt=Zn(pt.bo),Mt=pt.next();!Mt.done;Mt=pt.next())Mt=Mt.value,_t=Mt.fromVertex.index,(_t<E||_t>yt)&&y.add(Mt);et++}E=yt}}}hi.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Zn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Zn(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,_t){return Mt.vi-_t.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=Zn(y),nt=et.next();!nt.done;nt=et.next()){var st=Zn(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=Zn(y),st=et.next();!st.done;st=et.next()){st=Zn(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,_t=nt?yt.width:yt.height,Zt=nt?Mt.width:Mt.height;if(x){var Jt=Lv(yt,Mt),ie=Jt.portFromPos,Ee=Jt.portToPos;Jt.link!==null&&(yt.node&&yt.node!==Jt.link.fromNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Jt.link.toNode&&(Ee=nt?Mt.focusX:Mt.focusY))}else Jt=Lv(Mt,yt),ie=Jt.portToPos,Ee=Jt.portFromPos,Jt.link!==null&&(yt.node&&yt.node!==Jt.link.toNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Jt.link.fromNode&&(Ee=nt?Mt.focusX:Mt.focusY));_t=b?yt.qg+(_t-ie)-(Zt-Ee):yt.qg+ie-Ee,Mt.qg=_t,pt=Math.min(pt,_t),yt=yt.align}yt=ht;do yt.qg=yt.qg-pt,yt=yt.align;while(yt!==ht)}}for(x=Zn(y),nt=x.next();!nt.done;nt=x.next())for(et=Zn(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 or,y=Zn(y),nt=y.next();!nt.done;nt=y.next())for(x=Zn(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&&Oe("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=Xn(),E=Xn(),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)));In(b),In(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?Oa:Qo:a.K===90?y?Qo:Oa:a.K===180?y?Fa:Go:y?Go: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===ys&&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(ei),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(ei),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 _t=!1,Zt=!1,Jt=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===ys)_t=!0,Ee=y.pointsCount,4<Ee&&y.points.removeRange(2,Ee-3),Ee===4&&(ie=2);else{Ee=y.pointsCount;var Pe=pt===Wr,Ne=ht===Wr;2<Ee&&Pe&&Ne?y.points.removeRange(1,Ee-2):3<Ee&&Pe&&!Ne?y.points.removeRange(1,Ee-3):3<Ee&&!Pe&&Ne?y.points.removeRange(2,Ee-2):4<Ee&&!Pe&&!Ne&&y.points.removeRange(2,Ee-3)}if(x.rev){for(;Mt!==null&&yt!==Mt;){var je=Ee=null;for(Pe=Mt.sourceEdges.iterator;Pe.next()&&(Ne=Pe.value,Ne.link!==x.link||(Ee=Ne.fromVertex,je=Ne.toVertex,Ee.node!==null)););if(Ee===null)break;if(Ee!==yt){Pe=y.i(ie-1).x,Ne=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++,Pe,Ne),y.m(ie++,Pe,_e)):(je!==null?je.centerY:Ne)!==_e&&(je=this.Ta[Ee.layer-1]+this.Rf.x,y.m(ie++,je,Ne),y.m(ie++,je,_e)):ie===y.firstPickIndex+1?(y.m(ie++,Pe,Ne),y.m(ie++,De,Ne)):(je!==null?je.centerX:Pe)!==De&&(je=this.Ta[Ee.layer-1]+this.Rf.y,y.m(ie++,Pe,je),y.m(ie++,De,je));else if(ie===y.firstPickIndex+1){je=Math.max(10,this.he[Mt.layer]);var Je=Math.max(10,this.Ld[Mt.layer]);if(_t)this.K===180?De<=Mt.bounds.x?(Mt=Mt.bounds.x,y.m(ie++,Mt-je,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt+Je,_e)):(y.m(ie++,De-je,_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-je)):(y.m(ie++,De,_e+Je),y.m(ie++,De,_e),y.m(ie++,De,_e-je)):this.K===270?_e<=Mt.bounds.y?(Mt=Mt.bounds.y,y.m(ie++,De,Mt-je),y.m(ie++,De,Mt),y.m(ie++,De,Mt+Je)):(y.m(ie++,De,_e-je),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-je,_e)):(y.m(ie++,De+Je,_e),y.m(ie++,De,_e),y.m(ie++,De-je,_e)));else{y.m(ie++,Pe,Ne);var Tn=0;this.K===180||this.K===0?((this.K===180?De>=Mt.bounds.right:De<=Mt.bounds.x)&&(Tn=(this.K===0?-je:Je)/2),y.m(ie++,Pe+Tn,_e)):((this.K===270?_e>=Mt.bounds.bottom:_e<=Mt.bounds.y)&&(Tn=(this.K===90?-je:Je)/2),y.m(ie++,De,Ne+Tn)),y.m(ie++,De,_e)}}else je=Math.max(10,this.he[Ee.layer]),Je=Math.max(10,this.Ld[Ee.layer]),_t?this.K===180?(y.m(ie++,De-je-Jt,_e),y.m(ie++,Math.min(De-je+Jt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Je-Jt/2,De),_e),y.m(ie++,De+Je+Jt,_e)):this.K===90?(y.m(ie++,De,_e+Je+Jt),y.m(ie++,De,Math.max(_e+Je-Jt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-je+Jt/2,_e)),y.m(ie++,De,_e-je-Jt)):this.K===270?(y.m(ie++,De,_e-je-Jt),y.m(ie++,De,Math.min(_e-je+Jt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Je-Jt/2,_e)),y.m(ie++,De,_e+Je+Jt)):(y.m(ie++,De+Je+Jt,_e),y.m(ie++,Math.max(De+Je-Jt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-je+Jt/2,De),_e),y.m(ie++,De-je-Jt,_e)):y.m(ie++,De,_e)}Mt=Ee}(st===null||pt!==Wr||Zt)&&(Pe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,Zt?(Jt=this.Ld[yt.layer],this.K===180||this.K===0?(Zt=Ne,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?-Jt:Jt),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,Ne),y.m(ie++,Mt,Zt)),y.m(ie++,De,Zt)):(Zt=Pe,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?-Jt:Jt),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++,Pe,Mt),y.m(ie++,Zt,Mt)),y.m(ie++,Zt,_e)),y.m(ie++,De,_e)):_t?(je=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,Ne),y.L(ie-1,Mt+Je,Ne)):this.K===90&&_e<=yt.bounds.bottom?(Mt=yt.bounds.y,y.L(ie-2,Pe,Mt),y.L(ie-1,Pe,Mt-je)):this.K===270&&_e>=yt.bounds.y?(Mt=yt.bounds.y+yt.bounds.height,y.L(ie-2,Pe,Mt),y.L(ie-1,Pe,Mt+Je)):this.K===0&&De<=yt.bounds.right&&(Mt=yt.bounds.x,y.L(ie-2,Mt,Ne),y.L(ie-1,Mt-je,Ne))):(je=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:-je)/2),y.m(ie++,De+Zt,Ne)):((this.K===270?_e<=yt.bounds.y:_e>=yt.bounds.bottom)&&(Zt=(this.K===90?Je:-je)/2),y.m(ie++,Pe,_e+Zt)),y.m(ie++,De,_e)))}else{for(;yt!==null&&yt!==Mt;){for(je=Ee=null,yt=yt.destinationEdges.iterator;yt.next()&&(Pe=yt.value,Pe.link!==x.link||(Ee=Pe.toVertex,je=Pe.fromVertex,je.node!==null&&(je=null),Ee.node!==null)););if(Ee===null)break;Ee!==Mt&&(Pe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=Ee.centerX,_e=Ee.centerY,Zt?this.K===180||this.K===0?(je!==null?je.centerY:Ne)!==_e&&(je=this.Ta[Ee.layer]+this.Rf.x,ie===y.firstPickIndex+1&&(je=this.K===0?Math.max(je,Pe):Math.min(je,Pe)),y.m(ie++,je,Ne),y.m(ie++,je,_e)):(je!==null?je.centerX:Pe)!==De&&(je=this.Ta[Ee.layer]+this.Rf.y,ie===y.firstPickIndex+1&&(je=this.K===90?Math.max(je,Ne):Math.min(je,Ne)),y.m(ie++,Pe,je),y.m(ie++,De,je)):(je=Math.max(10,this.he[Ee.layer]),Je=Math.max(10,this.Ld[Ee.layer]),_t?this.K===180?(y.m(ie++,De+Je+Jt,_e),y.m(ie++,Math.max(De+Je-Jt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-je+Jt/2,De),_e),y.m(ie++,De-je-Jt,_e)):this.K===90?(y.m(ie++,De,_e-je-Jt),y.m(ie++,De,Math.min(_e-je+Jt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Je-Jt/2,_e)),y.m(ie++,De,_e+Je+Jt)):this.K===270?(y.m(ie++,De,_e+Je+Jt),y.m(ie++,De,Math.max(_e+Je-Jt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-je+Jt/2,_e)),y.m(ie++,De,_e-je-Jt)):(y.m(ie++,De-je-Jt,_e),y.m(ie++,Math.min(De-je+Jt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Je-Jt/2,De),_e),y.m(ie++,De+Je+Jt,_e)):this.K===180?(y.m(ie++,De+Je,_e),y.m(ie++,De-je,_e)):this.K===90?(y.m(ie++,De,_e-je),y.m(ie++,De,_e+Je)):this.K===270?(y.m(ie++,De,_e+Je),y.m(ie++,De,_e-je)):(y.m(ie++,De-je,_e),y.m(ie++,De+Je,_e)))),yt=Ee}Zt&&(Pe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,this.K===180||this.K===0?Ne!==_e&&(je=this.K===0?Math.min(Math.max((De+Pe)/2,this.Ta[Mt.layer]+this.Rf.x),De):Math.max(Math.min((De+Pe)/2,this.Ta[Mt.layer]+this.Rf.x),De),y.m(ie++,je,Ne),y.m(ie++,je,_e)):Pe!==De&&(je=this.K===90?Math.min(Math.max((_e+Ne)/2,this.Ta[Mt.layer]+this.Rf.y),_e):Math.max(Math.min((_e+Ne)/2,this.Ta[Mt.layer]+this.Rf.y),_e),y.m(ie++,Pe,je),y.m(ie++,De,je)))}b!==null&&_t&&4<=y.pointsCount&&(nt!==null&&(nt=pt===Wr?y.getLinkPointFromPoint(E,nt,nt.ga(ei),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(ei),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 wn,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 _t=x[Mt];(ht?_t.first:_t.jc)!==st&&(yt++,st=ht?_t.first:_t.jc);var Zt=_t.link;et=Zt.i(_t.index),nt=Zt.i(_t.index+1);var Jt=this.linkSpacing*(yt-(pt-1)/2);y++,Zt.uh(),Zt.L(_t.index,et.x,et.y+Jt),Zt.L(_t.index+1,nt.x,nt.y+Jt),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++)_t=x[Mt],(ht?_t.first:_t.jc)!==st&&(yt++,st=ht?_t.first:_t.jc),Zt=_t.link,et=Zt.i(_t.index),nt=Zt.i(_t.index+1),Jt=this.linkSpacing*(yt-(pt-1)/2),y++,Zt.uh(),Zt.L(_t.index,et.x+Jt,et.y),Zt.L(_t.index+1,nt.x+Jt,nt.y),Zt.zf()}et=E}a=b}}}},$t=hi.prototype,$t.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},$t.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},$t.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},$t.B=function(a,y){return a-=y,-1<a&&1>a},$t.zi=function(a,y,x,b){var E=a.length,et=b-x;if(!(1>=et))if((0>x||x>=E-1)&&Oe("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}He.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()):Oe("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 an(hi,"CycleDepthFirst",0),xy=new an(hi,"CycleGreedy",1),xg=new an(hi,"CycleFromLayers",2),Ev=new an(hi,"LayerOptimalLinkLength",0),wy=new an(hi,"LayerLongestPathSink",1),by=new an(hi,"LayerLongestPathSource",2),Mv=new an(hi,"InitDepthFirstOut",0),Py=new an(hi,"InitDepthFirstIn",1),Cy=new an(hi,"InitNaive",2),ky=new an(hi,"AggressiveNone",0),Tv=new an(hi,"AggressiveLess",1),Ey=new an(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){bi.call(this,a)}Ve(Gd,bi),Gd.prototype.createVertex=function(){return new js(this)},Gd.prototype.createEdge=function(){return new wg(this)},Gd.className="LayeredDigraphNetwork";function js(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}Ve(js,So);function ix(a,y){return a.index-y.index}function Lv(a,y){if(!a.$n){for(var x=[],b=Zn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Zn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Oe("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Zn(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=Zn(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}js.prototype.Cl=function(a){So.prototype.Cl.call(this,a),this.bo=this.co=null},js.prototype.Kl=function(a){So.prototype.Kl.call(this,a),this.bo=this.co=null},js.prototype.zl=function(a){So.prototype.zl.call(this,a),this.$n=this.ao=null},js.prototype.Jl=function(a){So.prototype.Jl.call(this,a),this.$n=this.ao=null},He.Object.defineProperties(js.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)}}}),js.prototype.deleteDestinationEdge=js.prototype.Jl,js.prototype.addDestinationEdge=js.prototype.zl,js.prototype.deleteSourceEdge=js.prototype.Kl,js.prototype.addSourceEdge=js.prototype.Cl,js.className="LayeredDigraphVertex";function wg(a){is.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ve(wg,is),He.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 Fr(a){Ni.call(this),this.Ub=new Sn,this.Wn=Ov,this.ud=tu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new Mn(10,10).freeze();var y=new Of(this);this.W=new Vs(y),this.Y=new Vs(y),this.ru=[],a&&Object.assign(this,a)}Ve(Fr,Ni),Fr.prototype.cloneProtected=function(a){Ni.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)},Fr.prototype.qb=function(a){a.classType===Fr?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:Oe("Unknown enum value: "+a):Ni.prototype.qb.call(this,a)},Fr.prototype.createNetwork=function(){return new Of(this)},Fr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Ln)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Cn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof qe?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Sr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Fr.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 qe&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?tu:Nf:this.ud=this.path===Ov?tu: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 Sn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Ln?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Vs&&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 Vs&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vs&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vs&&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 Vs&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Sn,this.isValidLayout=!0};function Jx(a){var y=new Sn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Fr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case tu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Nf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Oe("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 tu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Nf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Oe("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case tu:if(0<y.destinationEdges.count){for(var x=new wn,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 Nf:if(0<y.sourceEdges.count){for(x=new wn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Oe("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}Fr.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===ru&&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}}Fr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===ru){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])}}Fr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==ru&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Fr.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:Oe("Unhandled sorting value "+a.sorting.toString())}},Fr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Fr.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===ih||a===ru||a===oh||a===xu}function bg(a){return a===ih||a===ru}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===oh)return!0}}return!1}Fr.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(),_t=0;_t<yt;_t++){var Zt=pt[_t],Jt=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-Jt.width,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();){var ie=Zt.value;ie.fromSpot=Fa,ie.toSpot=Go}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=Go,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=Go,ie.toSpot=Fa;else for(Mt.h(a.bounds.x+a.commentMargin-Jt.width,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Fa,ie.toSpot=Go;ht=0<=a.commentSpacing?ht+(Jt.height+a.commentSpacing):ht+(a.commentSpacing-Jt.height)}else{if(135<E&&!et||!x&&st)if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y-a.commentMargin-Jt.height),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Oa,ie.toSpot=Qo;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=Qo,ie.toSpot=Oa;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=Qo,ie.toSpot=Oa;else for(Mt.h(a.bounds.x+ht,a.bounds.y+a.commentMargin-Jt.height),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Oa,ie.toSpot=Qo;ht=0<=a.commentSpacing?ht+(Jt.width+a.commentSpacing):ht+(a.commentSpacing-Jt.width)}}if(Me.free(Mt),y=ht-a.commentSpacing-(b?y.height:y.width),this.ud===tu)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)}},Fr.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===ru)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=ll(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===eu;var pt=ht===nu,yt=$h(ht),Mt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var _t=a.nodeSpacing,Zt=this.computeNodeIndent(a),Jt=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,Pe=0,Ne=0,je=0,De=null,_e=null,Je=0,Tn=0,_n=0,Bn=0,Pn=0,fn=0,yr=0,hr=0;if(yt&&!bg(ht)&&135<E&&nt.reverse(),bg(ht))if(1<st)for(var ii=0;ii<st;ii++)ii%2===0&&ii!==st-1&&(hr=Math.max(hr,y?nt[ii].Da.width:nt[ii].Da.height));else st===1&&(hr=y?nt[0].Da.width:nt[0].Da.height);if(yt){switch(ht){case ih:Ne=135>E?cx(this,a,nt,hr,Pe,Ne):fx(this,a,nt,hr,Pe,Ne),hr=Ne.x,Pe=Ne.width,Ne=Ne.height;break;case oh:for(De=0;De<st;De++)_e=nt[De],Mt=_e.Da,je=fn===0?0:Jt,y?(_e.S.h(et-Mt.width,Bn+je),Pe=Math.max(Pe,Mt.width),Ne=Math.max(Ne,Bn+je+Mt.height),Bn+=je+Mt.height):(_e.S.h(_n+je,et-Mt.height),Pe=Math.max(Pe,_n+je+Mt.width),Ne=Math.max(Ne,Mt.height),_n+=je+Mt.width),fn++;break;case xu:for(De=0;De<st;De++)_e=nt[De],et=_e.Da,Mt=fn===0?0:Jt,y?(_e.S.h(_t/2+a.focus.x,Bn+Mt),Pe=Math.max(Pe,et.width),Ne=Math.max(Ne,Bn+Mt+et.height),Bn+=Mt+et.height):(_e.S.h(_n+Mt,_t/2+a.focus.y),Pe=Math.max(Pe,_n+Mt+et.width),Ne=Math.max(Ne,et.height),_n+=Mt+et.width),fn++}De=Va(this,2),_e=Va(this,2),y?(De[0].h(0,0),De[1].h(0,Ne),_e[0].h(Pe,0)):(De[0].h(0,0),De[1].h(Pe,0),_e[0].h(0,Ne)),_e[1].h(Pe,Ne)}else for(ii=0;ii<st;ii++){var xi=nt[ii],Co=xi.Da;if(y){0<Mt&&0<fn&&_n+_t+Co.width>Mt&&(_n<et&&_c(a,ht,et-_n,0,yr,ii-1),Pn++,fn=0,yr=ii,je=Ne,_n=0,Bn=135<E?-Ne-Jt:Ne+Jt),Nv(this,xi,0,Bn);var To=0;if(fn===0)De=xi.Yo,_e=xi.kp,Je=Co.width,Tn=Co.height,(De===null||_e===null||E!==ll(xi))&&(De=Va(this,2),_e=Va(this,2),De[0].h(0,0),De[1].h(0,Tn),_e[0].h(Je,0),_e[1].h(Je,Tn));else{var ca=Xn();Tn=dx(this,a,xi,De,_e,Je,Tn,ca),To=Tn.x,De=ca[0],_e=ca[1],Je=Tn.width,Tn=Tn.height,In(ca),_n<Co.width&&0>To&&(Af(a,-To,0,yr,ii-1),jv(De,-To,0),jv(_e,-To,0),To=0)}xi.S.h(To,Bn),Pe=Math.max(Pe,Je),Ne=Math.max(Ne,je+(Pn===0?0:Jt)+Co.height),_n=Je}else 0<Mt&&0<fn&&Bn+_t+Co.height>Mt&&(Bn<et&&_c(a,ht,0,et-Bn,yr,ii-1),Pn++,fn=0,yr=ii,je=Pe,Bn=0,_n=135<E?-Pe-Jt:Pe+Jt),Nv(this,xi,_n,0),To=0,fn===0?(De=xi.Yo,_e=xi.kp,Je=Co.width,Tn=Co.height,(De===null||_e===null||E!==ll(xi))&&(De=Va(this,2),_e=Va(this,2),De[0].h(0,0),De[1].h(Je,0),_e[0].h(0,Tn),_e[1].h(Je,Tn))):(ca=Xn(),Tn=dx(this,a,xi,De,_e,Je,Tn,ca),To=Tn.x,De=ca[0],_e=ca[1],Je=Tn.width,Tn=Tn.height,In(ca),Bn<Co.height&&0>To&&(Af(a,0,-To,yr,ii-1),jv(De,0,-To),jv(_e,0,-To),To=0)),xi.S.h(_n,To),Ne=Math.max(Ne,Tn),Pe=Math.max(Pe,je+(Pn===0?0:Jt)+Co.width),Bn=Tn;fn++}switch(0<Pn&&(y?(Ne+=Math.max(0,x),_n<Pe&&_c(a,ht,Pe-_n,0,yr,st-1),0<ie&&(pt||Af(a,ie,0,0,st-1),Pe+=ie)):(Pe+=Math.max(0,x),Bn<Ne&&_c(a,ht,0,Ne-Bn,yr,st-1),0<ie&&(pt||Af(a,0,ie,0,st-1),Ne+=ie))),ie=pt=0,ht){case Wd:y?pt+=Pe/2-a.focus.x-Zt/2:ie+=Ne/2-a.focus.y-Zt/2;break;case jf:0<Pn?y?pt+=Pe/2-a.focus.x-Zt/2:ie+=Ne/2-a.focus.y-Zt/2:y?(hr=nt[0].S.x+nt[0].la.x,pt+=hr+(nt[st-1].S.x+nt[st-1].la.x+2*nt[st-1].focus.x-hr)/2-a.focus.x-Zt/2):(hr=nt[0].S.y+nt[0].la.y,ie+=hr+(nt[st-1].S.y+nt[st-1].la.y+2*nt[st-1].focus.y-hr)/2-a.focus.y-Zt/2);break;case eu:y?(pt-=Zt,Pe+=Zt):(ie-=Zt,Ne+=Zt);break;case nu:y?(pt+=Pe-a.width+Zt,Pe+=Zt):(ie+=Ne-a.height+Zt,Ne+=Zt);break;case ih:y?1<st?pt+=hr+_t/2-a.focus.x:pt+=nt[0].focus.x-a.focus.x+nt[0].la.x:1<st?ie+=hr+_t/2-a.focus.y:ie+=nt[0].focus.y-a.focus.y+nt[0].la.y;break;case oh:y?pt+=Pe+_t/2-a.focus.x:ie+=Ne+_t/2-a.focus.y;break;case xu:break;default:Ne=this.customAlignment(a,pt,ie,Pe,Ne),pt=Ne[0],ie=Ne[1],Pe=Ne[2],Ne=Ne[3]}for(Zt=0;Zt<st;Zt++)hr=nt[Zt],y?hr.S.h(hr.S.x+hr.la.x-pt,hr.S.y+(135<E?(yt?-Ne:-hr.Da.height)+hr.la.y-x:Ee+x+hr.la.y)):hr.S.h(hr.S.x+(135<E?(yt?-Pe:-hr.Da.width)+hr.la.x-x:b+x+hr.la.x),hr.S.y+hr.la.y-ie);if(st=nt=0,yt?y?(Pe=Ay(a,Pe,pt),0>pt&&(pt=0),135<E&&(ie+=Ne+x),Ne+=Ee+x,ht===xu&&(nt+=_t/2+a.focus.x),st+=Ee+x):(135<E&&(pt+=Pe+x),Pe+=b+x,Ne=Ny(a,Ne,ie),0>ie&&(ie=0),ht===xu&&(st+=_t/2+a.focus.y),nt+=b+x):y?(a.comments===null?b>Pe&&(Pe=jy(ht,b-Pe,0),nt=Pe.x,st=Pe.y,Pe=b,pt=0):Pe=Ay(a,Pe,pt),0>pt&&(nt-=pt,pt=0),135<E&&(ie+=Ne+x),Ne=Math.max(Math.max(Ne,Ee),Ne+Ee+x),st+=Ee+x):(135<E&&(pt+=Pe+x),Pe=Math.max(Math.max(Pe,b),Pe+b+x),a.comments===null?Ee>Ne&&(Ne=jy(ht,0,Ee-Ne),nt=Ne.x,st=Ne.y,Ne=Ee,ie=0):Ne=Ny(a,Ne,ie),0>ie&&(st-=ie,ie=0),nt+=b+x),0<Pn)E=Va(this,4),Pn=Va(this,4),y?(E[2].h(0,Ee+x),E[3].h(E[2].x,Ne),Pn[2].h(Pe,E[2].y),Pn[3].h(Pn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Pe,E[2].y),Pn[2].h(E[2].x,Ne),Pn[3].h(E[3].x,Pn[2].y));else{for(E=Va(this,De.length+2),Pn=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],Pn[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])),Pn[0].h(pt+b,0),Pn[1].h(Pn[0].x,Ee),Pn[2].y<Pn[1].y&&(Pn[2].x<Pn[0].x?Pn[2].assign(Pn[1]):Pn[1].assign(Pn[2])),Pn[3].y<Pn[2].y&&(Pn[3].x<Pn[0].x?Pn[3].assign(Pn[2]):Pn[2].assign(Pn[3])),E[2].y-=x/2,Pn[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])),Pn[0].h(0,ie+Ee),Pn[1].h(b,Pn[0].y),Pn[2].x<Pn[1].x&&(Pn[2].y<Pn[0].y?Pn[2].assign(Pn[1]):Pn[1].assign(Pn[2])),Pn[3].x<Pn[2].x&&(Pn[3].y<Pn[0].y?Pn[3].assign(Pn[2]):Pn[2].assign(Pn[3])),E[2].x-=x/2,Pn[2].x-=x/2),ml(this,De),ml(this,_e),a.Yo=E,a.kp=Pn,a.la.h(pt,ie),a.Da.h(Pe,Ne)}break;default:Oe("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=ll(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===eu,Mt=pt===nu;st=$h(pt);var _t=Math.max(0,y.breadthLimit);ht=a.computeLayerSpacing(y);var Zt=y.nodeSpacing,Jt=a.computeNodeIndent(y),ie=yt||Mt?0:Jt/2,Ee=y.rowSpacing,Pe=0;(yt||Mt||y.hm||y.im&&y.maxGenerationCount===1)&&(Pe=Math.max(0,y.rowIndent)),yt=y.width;var Ne=y.height,je=0,De=0,_e=0,Je=0,Tn=0,_n=0,Bn=0,Pn=0,fn=0,yr=0;if(st&&!bg(pt)&&135<b&&E.reverse(),bg(pt))if(1<nt)for(var hr=0;hr<nt;hr++){var ii=E[hr],xi=ii.Da;hr%2===0&&hr!==nt-1?fn=Math.max(fn,(x?xi.width:xi.height)+a.computeBusNodeSpacing(ii)-Zt):hr%2!==0&&(yr=Math.max(yr,(x?xi.width:xi.height)+a.computeBusNodeSpacing(ii)-Zt))}else nt===1&&(fn=x?E[0].Da.width:E[0].Da.height);if(st)switch(pt){case ih:case ru:De=135>b?cx(a,y,E,fn,je,De):fx(a,y,E,fn,je,De),fn=De.x,je=De.width,De=De.height;break;case oh:for(_t=0;_t<nt;_t++)ie=E[_t],_e=ie.Da,yr=Bn===0?0:Ee,x?(ie.S.h(et-_e.width,Tn+yr),je=Math.max(je,_e.width),De=Math.max(De,Tn+yr+_e.height),Tn+=yr+_e.height):(ie.S.h(Je+yr,et-_e.height),je=Math.max(je,Je+yr+_e.width),De=Math.max(De,_e.height),Je+=yr+_e.width),Bn++;break;case xu:for(et=0;et<nt;et++)_t=E[et],ie=_t.Da,_e=Bn===0?0:Ee,x?(_t.S.h(Zt/2+y.focus.x,Tn+_e),je=Math.max(je,ie.width),De=Math.max(De,Tn+_e+ie.height),Tn+=_e+ie.height):(_t.S.h(Je+_e,Zt/2+y.focus.y),je=Math.max(je,Je+_e+ie.width),De=Math.max(De,ie.height),Je+=_e+ie.width),Bn++}else for(yr=0;yr<nt;yr++)hr=E[yr],ii=hr.Da,x?(0<_t&&0<Bn&&Je+Zt+ii.width>_t&&(Je<et&&_c(y,pt,et-Je,0,Pn,yr-1),_n++,Bn=0,Pn=yr,_e=De,Je=0,Tn=135<b?-De-Ee:De+Ee),xi=Bn===0?ie:Zt,Nv(a,hr,0,Tn),hr.S.h(Je+xi,Tn),je=Math.max(je,Je+xi+ii.width),De=Math.max(De,_e+(_n===0?0:Ee)+ii.height),Je+=xi+ii.width):(0<_t&&0<Bn&&Tn+Zt+ii.height>_t&&(Tn<et&&_c(y,pt,0,et-Tn,Pn,yr-1),_n++,Bn=0,Pn=yr,_e=je,Tn=0,Je=135<b?-je-Ee:je+Ee),xi=Bn===0?ie:Zt,Nv(a,hr,Je,0),hr.S.h(Je,Tn+xi),De=Math.max(De,Tn+xi+ii.height),je=Math.max(je,_e+(_n===0?0:Ee)+ii.width),Tn+=xi+ii.height),Bn++;switch(0<_n&&(x?(De+=Math.max(0,ht),Je<je&&_c(y,pt,je-Je,0,Pn,nt-1),0<Pe&&(Mt||Af(y,Pe,0,0,nt-1),je+=Pe)):(je+=Math.max(0,ht),Tn<De&&_c(y,pt,0,De-Tn,Pn,nt-1),0<Pe&&(Mt||Af(y,0,Pe,0,nt-1),De+=Pe))),Pe=Mt=0,pt){case Wd:x?Mt+=je/2-y.focus.x-Jt/2:Pe+=De/2-y.focus.y-Jt/2;break;case jf:0<_n?x?Mt+=je/2-y.focus.x-Jt/2:Pe+=De/2-y.focus.y-Jt/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-Jt/2):(a=E[0].S.y+E[0].la.y,Pe+=a+(E[nt-1].S.y+E[nt-1].la.y+2*E[nt-1].focus.y-a)/2-y.focus.y-Jt/2);break;case eu:x?(Mt-=Jt,je+=Jt):(Pe-=Jt,De+=Jt);break;case nu:x?(Mt+=je-y.width+Jt,je+=Jt):(Pe+=De-y.height+Jt,De+=Jt);break;case ih:case ru:x?1<nt?Mt+=fn+Zt/2-y.focus.x:Mt+=E[0].focus.x-y.focus.x+E[0].la.x:1<nt?Pe+=fn+Zt/2-y.focus.y:Pe+=E[0].focus.y-y.focus.y+E[0].la.y;break;case oh:x?Mt+=je+Zt/2-y.focus.x:Pe+=De+Zt/2-y.focus.y;break;case xu:break;default:a=a.customAlignment(y,Mt,Pe,je,De),Mt=a[0],Pe=a[1],je=a[2],De=a[3]}for(a=0;a<nt;a++)Jt=E[a],x?Jt.S.h(Jt.S.x+Jt.la.x-Mt,Jt.S.y+(135<b?(st?-De:-Jt.Da.height)+Jt.la.y-ht:Ne+ht+Jt.la.y)):Jt.S.h(Jt.S.x+(135<b?(st?-je:-Jt.Da.width)+Jt.la.x-ht:yt+ht+Jt.la.x),Jt.S.y+Jt.la.y-Pe);x?(je=Ay(y,je,Mt),0>Mt&&(Mt=0),135<b&&(Pe+=De+ht),De=Math.max(Math.max(De,Ne),De+Ne+ht)):(135<b&&(Mt+=je+ht),je=Math.max(Math.max(je,yt),je+yt+ht),De=Ny(y,De,Pe),0>Pe&&(Pe=0)),y.la.h(Mt,Pe),y.Da.h(je,De)}}Fr.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=ll(y)===90,yt=0,Mt=0,_t=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Jt=x[Zt],ie=Jt.Da,Ee=yt===0?0:ht;if(pt){var Pe=a.computeBusNodeSpacing(Jt)-st;Jt.S.h(b-(ie.width+Pe),_t+Ee),E=Math.max(E,ie.width+Pe),et=Math.max(et,_t+Ee+ie.height),_t+=Ee+ie.height}else Pe=a.computeBusNodeSpacing(Jt)-st,Jt.S.h(Mt+Ee,b-(ie.height+Pe)),et=Math.max(et,ie.height+Pe),E=Math.max(E,Mt+Ee+ie.width),Mt+=Ee+ie.width;yt++}for(yt=0,Jt=Mt,Zt=_t,pt?(Mt=b+st,_t=0):(Mt=0,_t=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],Pe=Ee.Da;var Ne=yt===0?0:ht;if(pt){var je=a.computeBusNodeSpacing(Ee)-st;Ee.S.h(Mt+je,_t+Ne),E=Math.max(E,Mt+Pe.width+je),et=Math.max(et,_t+Ne+Pe.height),_t+=Ne+Pe.height}else je=a.computeBusNodeSpacing(Ee)-st,Ee.S.h(Mt+Ne,_t+je),E=Math.max(E,Mt+Ne+Pe.width),et=Math.max(et,_t+Pe.height+je),Mt+=Ne+Pe.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(_t)):Math.max(Math.abs(Jt),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,_t)+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(Jt,Mt)+a+nt.width),_t=b+st/2-x.focus.y-x.la.y,et=Math.max(et,_t+nt.height),0>_t&&(et-=_t),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=ll(y)===270,yt=0,Mt=0,_t=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Jt=x[Zt],ie=Jt.Da,Ee=yt===0?0:ht;if(pt){var Pe=a.computeBusNodeSpacing(Jt)-st;_t-=Ee+ie.height,Jt.S.h(b-(ie.width+Pe),_t),E=Math.max(E,ie.width+Pe),et=Math.max(et,Math.abs(_t))}else Pe=a.computeBusNodeSpacing(Jt)-st,Mt-=Ee+ie.width,Jt.S.h(Mt,b-(ie.height+Pe)),et=Math.max(et,ie.height+Pe),E=Math.max(E,Math.abs(Mt));yt++}for(yt=0,Jt=Mt,Zt=_t,pt?(Mt=b+st,_t=0):(Mt=0,_t=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],Pe=Ee.Da;var Ne=yt===0?0:ht;if(pt){var je=a.computeBusNodeSpacing(Ee)-st;_t-=Ne+Pe.height,Ee.S.h(Mt+je,_t),E=Math.max(E,Mt+Pe.width+je),et=Math.max(et,Math.abs(_t))}else je=a.computeBusNodeSpacing(Ee)-st,Mt-=Ne+Pe.width,Ee.S.h(Mt,_t+je),et=Math.max(et,_t+Pe.height+je),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(_t)):Math.max(Math.abs(Jt),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,_t))+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(Jt,Mt))+a+yt.width),_t=b+st/2-ht.focus.y-ht.la.y,et=Math.max(et,_t+yt.height),0>_t&&(et-=_t),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)}Fr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Fr.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 jf:case Wd:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case eu:return a.width>y?a.width:y;case nu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case ih:case ru:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case oh:return a.width-a.focus.x+a.nodeSpacing/2+y;case xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case jf:case Wd:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case eu:return a.height>y?a.height:y;case nu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case ih:case ru:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case oh:return a.height-a.focus.y+a.nodeSpacing/2+y;case xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Wd:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case eu:x=y=0;break;case nu:break;default:Oe("Unhandled alignment value "+a.toString())}return new Me(y,x)}function _c(a,y,x,b,E,et){y=jy(y,x,b),Af(a,y.x,y.y,E,et)}function Af(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 tu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Nf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Oe("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=ll(y),pt=ht===90||ht===270,yt=y.nodeSpacing;y=b;var Mt=E;b=et;var _t=nt,Zt=x.Yo,Jt=x.kp;nt=x.Da;var ie=pt?Math.max(_t,nt.height):Math.max(b,nt.width);if((Zt===null||ht!==ll(x))&&(Zt=Va(a,2),Jt=Va(a,2),pt?(Zt[0].h(0,0),Zt[1].h(0,nt.height),Jt[0].h(nt.width,0),Jt[1].h(Jt[0].x,Zt[1].y)):(Zt[0].h(0,0),Zt[1].h(nt.width,0),Jt[0].h(0,nt.height),Jt[1].h(Zt[1].x,Jt[0].y))),pt){if(_t=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 Pe=et;x+1<Mt.length&&(Pe=Mt[x+1]);var Ne=Ee;Ee=Ne.x,Ne=Ne.y,E+1<Zt.length&&(Ne=Zt[E+1],Ee=Ne.x,Ne=Ne.y,Ee+=b);var je=_t;et.y===pt?je=ht-et.x:et.y>pt&&et.y<Ne?je=ht+(et.y-pt)/(Ne-pt)*(Ee-ht)-et.x:pt>et.y&&pt<Pe.y&&(je=ht-(et.x+(pt-et.y)/(Pe.y-et.y)*(Pe.x-et.x))),je<_t&&(_t=je),Pe.y<=et.y?x++:Ne<=pt?E++:(Pe.y<=Ne&&x++,Ne<=Pe.y&&E++)}if(_t=b-_t,_t+=yt,x=Zt,E=_t,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]);ml(a,yt),b=x}if(et=Jt,ht=_t,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;)Pe=Mt[x++],yt[E++].h(Pe.x,Pe.y);for(;pt<et.length;)Pe=et[pt++],yt[E++].h(Pe.x+ht,Pe.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]);ml(a,yt),E=et}return et=Math.max(0,_t)+nt.width,nt=ie,ml(a,y),ml(a,Zt),ml(a,Mt),ml(a,Jt),st[0]=b,st[1]=E,new on(_t,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+=_t,Pe=et,x+1<Mt.length&&(Pe=Mt[x+1]),Ne=Ee,Ee=Ne.x,Ne=Ne.y,E+1<Zt.length&&(Ne=Zt[E+1],Ee=Ne.x,Ne=Ne.y,Ne+=_t),je=b,et.x===ht?je=pt-et.y:et.x>ht&&et.x<Ee?je=pt+(et.x-ht)/(Ee-ht)*(Ne-pt)-et.y:ht>et.x&&ht<Pe.x&&(je=pt-(et.y+(ht-et.x)/(Pe.x-et.x)*(Pe.y-et.y))),je<b&&(b=je),Pe.x<=et.x?x++:Ee<=ht?E++:(Pe.x<=Ee&&x++,Ee<=Pe.x&&E++);if(_t-=b,_t+=yt,x=Zt,E=_t,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]);ml(a,yt),b=x}if(et=Jt,ht=_t,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;)Pe=Mt[x++],yt[E++].h(Pe.x,Pe.y);for(;pt<et.length;)Pe=et[pt++],yt[E++].h(Pe.x,Pe.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]);ml(a,yt),E=et}return et=ie,nt=Math.max(0,_t)+nt.height,ml(a,y),ml(a,Zt),ml(a,Mt),ml(a,Jt),st[0]=b,st[1]=E,new on(_t,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 ml(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Fr.prototype.arrangeTrees=function(){if(this.Rb===Iv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Vs){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 Vs&&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:Oe("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:Oe("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)}}}Fr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Fr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Fr.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)}},Fr.prototype.commitLayers=function(){},Fr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Fr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Vs&&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])}}Fr.prototype.setPortSpots=function(a){var y=a.alignment;if($h(y)){var x=this.ud===tu,b=ll(a);switch(b){case 0:var E=Go;break;case 90:E=Qo;break;case 180:E=Fa;break;default:E=Oa}var et=a.children,nt=et.length;switch(y){case ih:case ru: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:Oa;if(nt===1||y===nt-1&&nt%2===1)switch(b){case 0:ht=Fa;break;case 90:ht=Oa;break;case 180:ht=Go;break;default:ht=Qo}else y%2===0&&(ht=b===90||b===270?Go:Qo);x?(a.setsPortSpot&&(st.fromSpot=E),a.setsChildPortSpot&&(st.toSpot=ht)):(a.setsPortSpot&&(st.fromSpot=ht),a.setsChildPortSpot&&(st.toSpot=E))}}break;case oh:for(b=b===90||b===270?Go:Qo,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 xu:for(b=b===90||b===270?Fa:Oa,et=x?a.destinationEdges:a.sourceEdges;et.next();)nt=et.value.link,nt!==null&&(x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=b)):(a.setsPortSpot&&(nt.fromSpot=b),a.setsChildPortSpot&&(nt.toSpot=E)))}}else if(x=ll(a),this.ud===tu){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=Go;break;case 90:b.fromSpot=Qo;break;case 180:b.fromSpot=Fa;break;default:b.fromSpot=Oa}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Fa;break;case 90:b.toSpot=Oa;break;case 180:b.toSpot=Go;break;default:b.toSpot=Qo}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=Go;break;case 90:b.toSpot=Qo;break;case 180:b.toSpot=Fa;break;default:b.toSpot=Oa}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Fa;break;case 90:b.fromSpot=Oa;break;case 180:b.fromSpot=Go;break;default:b.fromSpot=Qo}else b.fromSpot=a.childPortSpot}};function ll(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Fr.prototype.computeLayerSpacing=function(a){var y=ll(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},Fr.prototype.computeNodeIndent=function(a){var y=ll(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)},He.Object.defineProperties(Fr.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()):Oe("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 an(Fr,"PathDefault",-1),tu=new an(Fr,"PathDestination",0),Nf=new an(Fr,"PathSource",1),Ud=new an(Fr,"SortingForwards",10),Pg=new an(Fr,"SortingReverse",11),Cg=new an(Fr,"SortingAscending",12),kg=new an(Fr,"SortingDescending",13),Wd=new an(Fr,"AlignmentCenterSubtrees",20),jf=new an(Fr,"AlignmentCenterChildren",21),eu=new an(Fr,"AlignmentStart",22),nu=new an(Fr,"AlignmentEnd",23),ih=new an(Fr,"AlignmentBus",24),ru=new an(Fr,"AlignmentBusBranching",25),oh=new an(Fr,"AlignmentTopLeftBus",26),xu=new an(Fr,"AlignmentBottomRightBus",27),Fv=new an(Fr,"CompactionNone",30),Eg=new an(Fr,"CompactionBlock",31),Dv=new an(Fr,"StyleLayered",40),Fy=new an(Fr,"StyleLastParents",41),Dy=new an(Fr,"StyleAlternating",42),By=new an(Fr,"StyleRootOnly",43),Bv=new an(Fr,"ArrangementVertical",50),Iy=new an(Fr,"ArrangementHorizontal",51),Iv=new an(Fr,"ArrangementFixedRoots",52),Ry=new an(Fr,"LayerIndividual",60),_y=new an(Fr,"LayerSiblings",61),Rv=new an(Fr,"LayerUniform",62);Fr.className="TreeLayout",Fr.PathDefault=Ov,Fr.PathDestination=tu,Fr.PathSource=Nf,Fr.SortingForwards=Ud,Fr.SortingReverse=Pg,Fr.SortingAscending=Cg,Fr.SortingDescending=kg,Fr.AlignmentCenterSubtrees=Wd,Fr.AlignmentCenterChildren=jf,Fr.AlignmentStart=eu,Fr.AlignmentEnd=nu,Fr.AlignmentBus=ih,Fr.AlignmentBusBranching=ru,Fr.AlignmentTopLeftBus=oh,Fr.AlignmentBottomRightBus=xu,Fr.CompactionNone=Fv,Fr.CompactionBlock=Eg,Fr.StyleLayered=Dv,Fr.StyleLastParents=Fy,Fr.StyleAlternating=Dy,Fr.StyleRootOnly=By,Fr.ArrangementVertical=Bv,Fr.ArrangementHorizontal=Iy,Fr.ArrangementFixedRoots=Iv,Fr.LayerIndividual=Ry,Fr.LayerSiblings=_y,Fr.LayerUniform=Rv;function Of(a){bi.call(this,a)}Ve(Of,bi),Of.prototype.createVertex=function(){return new Vs(this)},Of.prototype.createEdge=function(){return new Hd(this)},Of.className="TreeNetwork";function Vs(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 Mn(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=jf,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=Lo,this.wr=!0,this.Dp=Lo}Ve(Vs,So),Vs.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)},He.Object.defineProperties(Vs.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)}}}),Vs.className="TreeVertex";function Hd(a){is.call(this,a),this.$t=new Me(0,0)}Ve(Hd,is),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 tu:x=this.fromVertex,b=this.toVertex;break;case Nf:x=this.toVertex,b=this.fromVertex;break;default:Oe("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=ll(x),nt=y.computeLayerSpacing(x),st=x.rowSpacing;a.vg();var ht=a.curve===ys,pt=a.isOrthogonal,yt;if(a.uh(),pt||ht){for(yt=2;4<a.pointsCount;)a.pv(2);var Mt=a.i(1),_t=a.i(2)}else{for(yt=1;3<a.pointsCount;)a.pv(1);Mt=a.i(0),_t=a.i(a.pointsCount-1)}var Zt=a.i(a.pointsCount-1);et===0?(x.alignment===nu?(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===eu?(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,_t.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,_t.y))):et===90?(x.alignment===nu?(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===eu?(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,_t.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,_t.x,a.i(yt-1).y))):et===180?(x.alignment===nu?(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===eu?(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,_t.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,_t.y))):et===270?(x.alignment===nu?(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===eu?(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,_t.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,_t.x,a.i(yt-1).y))):Oe("Invalid angle "+et),a.zf()}else E=b,a=this.link,b=this.network.layout,y=ll(x),y!==ll(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===ys,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()))}}},He.Object.defineProperties(Hd.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Hd.className="TreeEdge",Fi.prototype.initializeStandardTools=function(){this.gb("Action",new Rs,this.mouseDownTools),this.gb("Relinking",new ds,this.mouseDownTools),this.gb("LinkReshaping",new oo,this.mouseDownTools),this.gb("Rotating",new ya,this.mouseDownTools),this.gb("Resizing",new $o,this.mouseDownTools),this.gb("Linking",new va,this.mouseMoveTools),this.gb("Dragging",new zi,this.mouseMoveTools),this.gb("DragSelecting",new bs,this.mouseMoveTools),this.gb("Panning",new Ho,this.mouseMoveTools),this.gb("ContextMenu",new Sa,this.mouseUpTools),this.gb("TextEditing",new Ei,this.mouseUpTools),this.gb("ClickCreating",new _u,this.mouseUpTools),this.gb("ClickSelecting",new kh,this.mouseUpTools)},jl("Horizontal",new dm),jl("Spot",new gm),jl("Table",new vm),jl("Viewbox",new xm),jl("TableRow",new ym),jl("TableColumn",new Sm),jl("Graduated",new Up),jl("Grid",new Gp),dd.add("GraphLinksModel",Mo),dd.add("TreeModel",As);var _v=yn.go,zy={get licenseKey(){return qe.licenseKey},set licenseKey(a){qe.licenseKey=a},get version(){return qe.version},Group:Sr,EnumValue:an,List:wn,Set:Sn,Map:or,Point:Me,Size:Mn,Rect:on,Margin:Ar,Spot:jn,Geometry:kn,PathFigure:wo,PathSegment:ri,InputEvent:sa,DiagramEvent:Au,ChangedEvent:Ii,Model:Kn,GraphLinksModel:Gr,TreeModel:Ma,Binding:so,Transaction:Eo,UndoManager:_i,CommandHandler:ke,Tool:Qr,DraggingTool:zi,DraggingInfo:pu,DraggingOptions:ct,LinkingBaseTool:qi,LinkingTool:va,RelinkingTool:ds,LinkReshapingTool:oo,ResizingTool:$o,RotatingTool:ya,ClickSelectingTool:kh,ActionTool:Rs,ClickCreatingTool:_u,HTMLInfo:Ml,ContextMenuTool:Sa,DragSelectingTool:bs,PanningTool:Ho,TextEditingTool:Ei,ToolManager:Fi,Animation:Vo,AnimationManager:es,AnimationTrigger:tl,Layer:Ao,Diagram:qe,Palette:kt,Overview:Ot,Brush:li,GraphObject:ze,Panel:xn,RowColumnDefinition:po,Shape:kr,TextBlock:wi,Picture:za,Part:tr,Adornment:$r,Node:Ln,Link:Cn,Placeholder:Pa,Layout:Ni,LayoutNetwork:bi,LayoutVertex:So,LayoutEdge:is,GridLayout:Bo,PanelLayout:yo,CircularLayout:Gi,CircularNetwork:_d,CircularVertex:mg,CircularEdge:Sv,ForceDirectedLayout:Zo,ForceDirectedNetwork:Lf,ForceDirectedVertex:vg,ForceDirectedEdge:yg,LayeredDigraphLayout:hi,LayeredDigraphNetwork:Gd,LayeredDigraphVertex:js,LayeredDigraphEdge:wg,TreeLayout:Fr,TreeNetwork:Of,TreeVertex:Vs,TreeEdge:Hd};typeof _v=="object"&&_v.version&&Gn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),qe.prototype.go=zy,yn.go=zy,typeof mn.exports=="object"&&(mn.exports=typeof he.g!="undefined"?he.g.go:self.go)}();var ae=typeof he.g!="undefined"?he.g.go:self.go;const Re=typeof he.g!="undefined"?he.g.go:self.go,ot=Re.Group,zt=Re.EnumValue,Bt=Re.List,vt=Re.Set,gt=Re.Map,Et=Re.Point,Ct=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,Ht=Re.LinkingBaseTool,Yt=Re.LinkingTool,Ut=Re.RelinkingTool,Vt=Re.LinkReshapingTool,oe=Re.ResizingTool,se=Re.RotatingTool,de=Re.ClickSelectingTool,Se=Re.ActionTool,Qt=Re.ClickCreatingTool,ne=Re.HTMLInfo,ye=Re.ContextMenuTool,we=Re.DragSelectingTool,be=Re.PanningTool,fe=Re.TextEditingTool,pe=Re.ToolManager,ce=Re.Animation,Ce=Re.AnimationManager,ve=Re.AnimationTrigger,Fe=Re.Layer,ge=Re.Diagram,xe=Re.Palette,ee=Re.Overview,Kt=Re.Brush,wt=Re.GraphObject,Lt=Re.Panel,Xt=Re.RowColumnDefinition,re=Re.Shape,It=Re.TextBlock,Rt=Re.TextBlockMetrics,Wt=Re.Picture,te=Re.Part,ue=Re.Adornment,le=Re.Node,Ae=Re.Link,Le=Re.Placeholder,Be=Re.Layout,tn=Re.LayoutNetwork,$e=Re.LayoutVertex,Qe=Re.LayoutEdge,Ze=Re.GridLayout,Ge=Re.PanelLayout,We=Re.CircularLayout,Ke=Re.CircularNetwork,nn=Re.CircularVertex,hn=Re.CircularEdge,un=Re.ForceDirectedLayout,bn=Re.ForceDirectedNetwork,Un=Re.ForceDirectedVertex,Vn=Re.ForceDirectedEdge,Yn=Re.LayeredDigraphLayout,vr=Re.LayeredDigraphNetwork,pr=Re.LayeredDigraphVertex,gr=Re.LayeredDigraphEdge,Nr=Re.TreeLayout,Lr=Re.TreeNetwork,dr=Re.TreeVertex,cr=Re.TreeEdge,jr=Re.version},24334:function(mn,gn,he){var ae,Re;(function(ot,zt){mn.exports=zt(ot)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof he.g!="undefined"?he.g:this,function(ot){"use strict";ot=ot||{};var zt=ot.Base64,Bt="2.6.4",vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=function(Ut){for(var Vt={},oe=0,se=Ut.length;oe<se;oe++)Vt[Ut.charAt(oe)]=oe;return Vt}(vt),Et=String.fromCharCode,Ct=function(Ut){if(Ut.length<2){var Vt=Ut.charCodeAt(0);return Vt<128?Ut:Vt<2048?Et(192|Vt>>>6)+Et(128|Vt&63):Et(224|Vt>>>12&15)+Et(128|Vt>>>6&63)+Et(128|Vt&63)}else{var Vt=65536+(Ut.charCodeAt(0)-55296)*1024+(Ut.charCodeAt(1)-56320);return Et(240|Vt>>>18&7)+Et(128|Vt>>>12&63)+Et(128|Vt>>>6&63)+Et(128|Vt&63)}},St=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tt=function(Ut){return Ut.replace(St,Ct)},mt=function(Ut){var Vt=[0,2,1][Ut.length%3],oe=Ut.charCodeAt(0)<<16|(Ut.length>1?Ut.charCodeAt(1):0)<<8|(Ut.length>2?Ut.charCodeAt(2):0),se=[vt.charAt(oe>>>18),vt.charAt(oe>>>12&63),Vt>=2?"=":vt.charAt(oe>>>6&63),Vt>=1?"=":vt.charAt(oe&63)];return se.join("")},xt=ot.btoa&&typeof ot.btoa=="function"?function(Ut){return ot.btoa(Ut)}:function(Ut){if(Ut.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ut.replace(/[\s\S]{1,3}/g,mt)},ft=function(Ut){return xt(Tt(String(Ut)))},z=function(Ut){return Ut.replace(/[+\/]/g,function(Vt){return Vt=="+"?"-":"_"}).replace(/=/g,"")},tt=function(Ut,Vt){return Vt?z(ft(Ut)):ft(Ut)},at=function(Ut){return tt(Ut,!0)},it;ot.Uint8Array&&(it=function(Ut,Vt){for(var oe="",se=0,de=Ut.length;se<de;se+=3){var Se=Ut[se],Qt=Ut[se+1],ne=Ut[se+2],ye=Se<<16|Qt<<8|ne;oe+=vt.charAt(ye>>>18)+vt.charAt(ye>>>12&63)+(typeof Qt!="undefined"?vt.charAt(ye>>>6&63):"=")+(typeof ne!="undefined"?vt.charAt(ye&63):"=")}return Vt?z(oe):oe});var lt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ut=function(Ut){switch(Ut.length){case 4:var Vt=(7&Ut.charCodeAt(0))<<18|(63&Ut.charCodeAt(1))<<12|(63&Ut.charCodeAt(2))<<6|63&Ut.charCodeAt(3),oe=Vt-65536;return Et((oe>>>10)+55296)+Et((oe&1023)+56320);case 3:return Et((15&Ut.charCodeAt(0))<<12|(63&Ut.charCodeAt(1))<<6|63&Ut.charCodeAt(2));default:return Et((31&Ut.charCodeAt(0))<<6|63&Ut.charCodeAt(1))}},dt=function(Ut){return Ut.replace(lt,ut)},Pt=function(Ut){var Vt=Ut.length,oe=Vt%4,se=(Vt>0?gt[Ut.charAt(0)]<<18:0)|(Vt>1?gt[Ut.charAt(1)]<<12:0)|(Vt>2?gt[Ut.charAt(2)]<<6:0)|(Vt>3?gt[Ut.charAt(3)]:0),de=[Et(se>>>16),Et(se>>>8&255),Et(se&255)];return de.length-=[0,0,2,1][oe],de.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(Vt){return Vt=="-"?"+":"/"}).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(Vt){return Vt.charCodeAt(0)})});var Ht=function(){var Ut=ot.Base64;return ot.Base64=zt,Ut};if(ot.Base64={VERSION:Bt,atob:Dt,btoa:xt,fromBase64:Nt,toBase64:tt,utob:Tt,encode:tt,encodeURI:at,btou:dt,decode:Nt,noConflict:Ht,fromUint8Array:it,toUint8Array:Gt},typeof Object.defineProperty=="function"){var Yt=function(Ut){return{value:Ut,enumerable:!1,writable:!0,configurable:!0}};ot.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Yt(function(){return Nt(this)})),Object.defineProperty(String.prototype,"toBase64",Yt(function(Ut){return tt(this,Ut)})),Object.defineProperty(String.prototype,"toBase64URI",Yt(function(){return tt(this,!0)}))}}return ot.Meteor&&(Base64=ot.Base64),mn.exports?mn.exports.Base64=ot.Base64:(ae=[],Re=function(){return ot.Base64}.apply(gn,ae),Re!==void 0&&(mn.exports=Re)),{Base64:ot.Base64}})},2859:function(mn,gn,he){"use strict";he.d(gn,{hP:function(){return ee}});var ae=function(Kt,wt){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Lt,Xt){Lt.__proto__=Xt}||function(Lt,Xt){for(var re in Xt)Object.prototype.hasOwnProperty.call(Xt,re)&&(Lt[re]=Xt[re])})(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(re,It){function Rt(ue){try{te(Xt.next(ue))}catch(le){It(le)}}function Wt(ue){try{te(Xt.throw(ue))}catch(le){It(le)}}function te(ue){var le;ue.done?re(ue.value):(le=ue.value,le instanceof Lt?le:new Lt(function(Ae){Ae(le)})).then(Rt,Wt)}te((Xt=Xt.apply(Kt,wt||[])).next())})}function zt(Kt,wt){var Lt,Xt,re,It,Rt={label:0,sent:function(){if(1&re[0])throw re[1];return re[1]},trys:[],ops:[]};return It={next:Wt(0),throw:Wt(1),return:Wt(2)},typeof Symbol=="function"&&(It[Symbol.iterator]=function(){return this}),It;function Wt(te){return function(ue){return function(le){if(Lt)throw new TypeError("Generator is already executing.");for(;Rt;)try{if(Lt=1,Xt&&(re=2&le[0]?Xt.return:le[0]?Xt.throw||((re=Xt.return)&&re.call(Xt),0):Xt.next)&&!(re=re.call(Xt,le[1])).done)return re;switch(Xt=0,re&&(le=[2&le[0],re.value]),le[0]){case 0:case 1:re=le;break;case 4:return Rt.label++,{value:le[1],done:!1};case 5:Rt.label++,Xt=le[1],le=[0];continue;case 7:le=Rt.ops.pop(),Rt.trys.pop();continue;default:if(re=Rt.trys,!((re=re.length>0&&re[re.length-1])||le[0]!==6&&le[0]!==2)){Rt=0;continue}if(le[0]===3&&(!re||le[1]>re[0]&&le[1]<re[3])){Rt.label=le[1];break}if(le[0]===6&&Rt.label<re[1]){Rt.label=re[1],re=le;break}if(re&&Rt.label<re[2]){Rt.label=re[2],Rt.ops.push(le);break}re[2]&&Rt.ops.pop(),Rt.trys.pop();continue}le=wt.call(Kt,Rt)}catch(Ae){le=[6,Ae],Xt=0}finally{Lt=re=0}if(5&le[0])throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}([te,ue])}}}function Bt(){for(var Kt=0,wt=0,Lt=arguments.length;wt<Lt;wt++)Kt+=arguments[wt].length;var Xt=Array(Kt),re=0;for(wt=0;wt<Lt;wt++)for(var It=arguments[wt],Rt=0,Wt=It.length;Rt<Wt;Rt++,re++)Xt[re]=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,re=Lt;Xt<re.length;Xt++){var It=re[Xt],Rt=It[0],Wt=It[1];wt.setAttribute(Rt,Wt)}},Kt.createRect=function(wt,Lt,Xt){var re=document.createElementNS("http://www.w3.org/2000/svg","rect");return re.setAttribute("width",wt.toString()),re.setAttribute("height",Lt.toString()),Xt&&Kt.setAttributes(re,Xt),re},Kt.createLine=function(wt,Lt,Xt,re,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",re.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 re=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return re.setAttribute("cx",(wt/2).toString()),re.setAttribute("cy",(Lt/2).toString()),re.setAttribute("rx",(wt/2).toString()),re.setAttribute("ry",(Lt/2).toString()),Xt&&Kt.setAttributes(re,Xt),re},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,re,It,Rt,Wt){var te=document.createElementNS("http://www.w3.org/2000/svg","marker");return Kt.setAttributes(te,[["id",wt],["orient",Lt],["markerWidth",Xt.toString()],["markerHeight",re.toString()],["refX",It.toString()],["refY",Rt.toString()]]),te.appendChild(Wt),te},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}(),Et=function(){function Kt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Kt.prototype.rasterize=function(wt,Lt,Xt){var re=this;return new Promise(function(It){var Rt=Xt!==void 0?Xt:document.createElement("canvas");wt===null&&(re.markersOnly=!0,re.naturalSize=!1);var Wt=document.createElementNS("http://www.w3.org/2000/svg","svg");Wt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Wt.setAttribute("width",Lt.width.baseVal.valueAsString),Wt.setAttribute("height",Lt.height.baseVal.valueAsString),Wt.setAttribute("viewBox","0 0 "+Lt.viewBox.baseVal.width.toString()+" "+Lt.viewBox.baseVal.height.toString()),Wt.innerHTML=Lt.innerHTML,re.naturalSize===!0?(Wt.width.baseVal.value=wt.naturalWidth,Wt.height.baseVal.value=wt.naturalHeight):re.width!==void 0&&re.height!==void 0&&(Wt.width.baseVal.value=re.width,Wt.height.baseVal.value=re.height),Rt.width=Wt.width.baseVal.value,Rt.height=Wt.height.baseVal.value;var te=Wt.outerHTML,ue=Rt.getContext("2d");re.markersOnly!==!0&&ue.drawImage(wt,0,0,Rt.width,Rt.height);var le=window.URL,Ae=new Image(Rt.width,Rt.height);Ae.setAttribute("crossOrigin","anonymous");var Le=new Blob([te],{type:"image/svg+xml"}),Be=le.createObjectURL(Le);Ae.onload=function(){ue.drawImage(Ae,0,0),le.revokeObjectURL(Be);var tn=Rt.toDataURL(re.imageType,re.imageQuality);It(tn)},Ae.src=Be})},Kt}(),Ct=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,re,It){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=wt,this.displayMode=Lt,this.markerItems=Xt,this.uiStyleSettings=re,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 re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",re.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(re),this.addActionButton(re,'<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(re,'<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 re=this,It=document.createElement("div");switch(It.className=""+this.toolbarButtonStyleClass.name,It.innerHTML=Lt,It.setAttribute("data-action",Xt),It.addEventListener("click",function(){re.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,re){this.panels=[],this.panelButtons=[],this.markerjsContainer=wt,this.displayMode=Lt,this.uiStyleSettings=Xt,this.styles=re,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,re=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=re.uiStyleSettings;var Wt=document.createElement("div");Wt.className=re.toolboxButtonStyleClass.name+" "+((Rt=re.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:re.toolboxButtonStyleColorsClass.name),Wt.innerHTML=It.icon,Wt.title=It.title,Wt.addEventListener("click",function(){re.panelButtonClick(It)}),re.panelButtons.push(Wt),re.buttonRow.appendChild(Wt)}),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 re=wt.getUi();re.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(re),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 Wt,te;It.className=Lt.toolboxButtonStyleClass.name+" "+(Rt===Xt?""+((Wt=Lt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Wt!==void 0?Wt:Lt.toolboxActiveButtonStyleColorsClass.name):""+((te=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&te!==void 0?te:Lt.toolboxButtonStyleColorsClass.name))})},Kt}(),z=function(Kt,wt){this.title=Kt,this.icon=wt},tt=function(Kt){function wt(Lt,Xt,re,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=re,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(re){var It=Lt.getColorBox(re);Xt.appendChild(It),Lt.colorBoxes.push(It)}),Xt},wt.prototype.getColorBox=function(Lt){var Xt=this,re=this.uiStyleSettings.toolbarHeight/4,It=this.uiStyleSettings.toolbarHeight-re,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 Wt=document.createElement("div");return Wt.style.display="inline-block",Wt.style.width=It-2+"px",Wt.style.height=It-2+"px",Wt.style.backgroundColor=Lt,Wt.style.borderRadius=It/2+"px",Lt==="transparent"&&(Wt.style.fill=this.uiStyleSettings.toolboxAccentColor,Wt.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(Wt),Rt},wt.prototype.setCurrentColor=function(Lt,Xt){var re=this;this.currentColor=Lt,this.colorBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.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,re){var It=Kt.call(this,Lt,Xt,re)||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 re=this.unrotatePoint(Lt);if(this.manipulationStartX=re.x,this.manipulationStartY=re.y,this.offsetX=re.x-this.left,this.offsetY=re.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,re=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,re=this.manipulationStartWidth+this.manipulationStartLeft-Xt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:re=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}re>=0?(this.left=Xt,this.width=re):(this.left=Xt+re,this.width=-re),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(),re=vt.createPoint(Lt.x,Lt.y);return{x:(re=re.matrixTransform(Xt)).x,y:re.y}},wt.prototype.unrotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Xt=this.container.getCTM();Xt=Xt.inverse();var re=vt.createPoint(Lt.x,Lt.y);return{x:(re=re.matrixTransform(Xt)).x,y:re.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,re=Xt,It=(this.width+this.CB_DISTANCE)/2-Lt/2,Rt=(this.height+this.CB_DISTANCE)/2-Lt/2,Wt=this.height+this.CB_DISTANCE-Lt/2,te=this.width+this.CB_DISTANCE-Lt/2;this.positionGrip(this.controlGrips.topLeft.visual,Xt,re),this.positionGrip(this.controlGrips.topCenter.visual,It,re),this.positionGrip(this.controlGrips.topRight.visual,te,re),this.positionGrip(this.controlGrips.centerLeft.visual,Xt,Rt),this.positionGrip(this.controlGrips.centerRight.visual,te,Rt),this.positionGrip(this.controlGrips.bottomLeft.visual,Xt,Wt),this.positionGrip(this.controlGrips.bottomCenter.visual,It,Wt),this.positionGrip(this.controlGrips.bottomRight.visual,te,Wt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,It,re-3*this.CB_DISTANCE)},wt.prototype.positionGrip=function(Lt,Xt,re){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,re),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 re=this.rotatePoint({x:this.left,y:this.top}),It=this.unrotatePoint({x:re.x*Lt,y:re.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,re){var It=Kt.call(this,Lt,Xt,re)||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,re,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=re,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(re){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=re===Lt.currentWidth?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentWidth(re,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=re.toString(),Rt.style.marginRight="5px",It.appendChild(Rt);var Wt=document.createElement("div");Wt.style.minHeight="20px",Wt.style.flexGrow="2",Wt.style.display="flex",Wt.style.alignItems="center";var te=document.createElement("hr");te.style.minWidth="20px",te.style.border="0px",te.style.borderTop=re+"px solid "+Lt.uiStyleSettings.toolboxColor,te.style.flexGrow="2",Wt.appendChild(te),It.appendChild(Wt),Lt.widthBoxes.push(It)}),Xt},wt.prototype.setCurrentWidth=function(Lt,Xt){var re=this;this.currentWidth=Lt,this.widthBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},wt}(z),Dt=function(Kt){function wt(Lt,Xt,re,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=re,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(re){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=re===Lt.currentStyle?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentStyle(re,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.overflow="hidden";var Wt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Lt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(re!==""?'stroke-dasharray="'+re+'"':"")+` />
|
|
</svg>`;Rt.innerHTML=Wt,It.appendChild(Rt),Lt.styleBoxes.push(It)}),Xt},wt.prototype.setCurrentStyle=function(Lt,Xt){var re=this;this.currentStyle=Lt,this.styleBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},wt}(z),Ft=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.strokeColor=re.defaultColor,It.strokeWidth=re.defaultStrokeWidth,It.strokeDasharray=re.defaultStrokeDasharray,It.strokePanel=new tt("Line color",re.defaultColorSet,re.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",re.defaultStrokeDasharrays,re.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,re){var It=Kt.call(this,Lt,Xt,re)||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,re){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,re),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,re){var It=Kt.call(this,Lt,Xt,re)||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=re.defaultColor,It.strokeWidth=re.defaultStrokeWidth,It.strokeDasharray=re.defaultStrokeDasharray,It.strokePanel=new tt("Line color",re.defaultColorSet,re.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",re.defaultStrokeDasharrays,re.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),Ht=function(Kt){function wt(Lt,Xt,re,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=re,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(re){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=re===Lt.currentFont?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentFont(re,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.fontFamily=re,Rt.style.overflow="hidden";var Wt=document.createElement("div");Wt.style.whiteSpace="nowrap",Wt.style.overflow="hidden",Wt.style.textOverflow="ellipsis",Wt.innerHTML="The quick brown fox jumps over the lazy dog",Rt.appendChild(Wt),It.appendChild(Rt),Lt.fontBoxes.push(It)}),Xt},wt.prototype.setCurrentFont=function(Lt,Xt){var re=this;this.currentFont=Lt,this.fontBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},wt}(z),Yt=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||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=re.defaultColor,It.fontFamily=re.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",re.defaultColorSet,re.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.fontFamilyPanel=new Ht("Font",re.defaultFontFamilies,re.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(re){re===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 re=(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(re,It)}return Xt},wt.prototype.getTextPosition=function(Lt){var Xt=this.textElement.getBBox(),re=0,It=0;return Xt.width>0&&Xt.height>0&&(re=(this.width-Xt.width*Lt)/2,It=this.height/2-Xt.height*Lt/2),{x:re,y:It}},wt.prototype.sizeText=function(){var Lt=this.textElement.getBBox(),Xt=this.getTextScale(),re=this.getTextPosition(Xt);re.y-=Lt.y*Xt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+re.x+"px, "+re.y+"px) scale("+Xt+", "+Xt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(re.x,re.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 re=Xt.clipboardData.getData("text"),It=window.getSelection();if(!It.rangeCount)return!1;It.deleteFromDocument(),It.getRangeAt(0).insertNode(document.createTextNode(re)),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}),re=this.textElement.getBBox(),It={x:re.width*Lt,y:re.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,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.color="transparent",It.lineWidth=3,It.drawing=!1,It.pixelRatio=1,It.color=re.defaultColor,It.lineWidth=re.defaultStrokeWidth,It.pixelRatio=re.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",re.defaultColorSet,re.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.lineWidthPanel=new At("Line width",re.defaultStrokeWidths,re.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],re=Xt[0],It=Xt[1],Rt=Xt[2],Wt=Xt[3],te=!1,ue=0;ue<this.canvasElement.height;ue++)for(var le=0;le<this.canvasElement.width;le++)Lt.data[ue*this.canvasElement.width*4+4*le+3]>0&&(te=!0,ue<It&&(It=ue),le<re&&(re=le),ue>Wt&&(Wt=ue),le>Rt&&(Rt=le));if(te){this.left=re/this.pixelRatio,this.top=It/this.pixelRatio,this.width=(Rt-re)/this.pixelRatio,this.height=(Wt-It)/this.pixelRatio;var Ae=document.createElement("canvas");Ae.width=Rt-re,Ae.height=Wt-It,Ae.getContext("2d").putImageData(this.canvasContext.getImageData(re,It,Rt-re,Wt-It),0,0),this.drawingImgUrl=Ae.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},wt.prototype.setDrawingImage=function(){vt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},wt.prototype.setColor=function(Lt){this.color=Lt,this.colorChanged(Lt)},wt.prototype.setLineWidth=function(Lt){this.lineWidth=Lt},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({drawingImgUrl:this.drawingImgUrl},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.drawingImgUrl=Lt.drawingImgUrl,this.setDrawingImage()},wt.prototype.scale=function(Lt,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),Vt=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,re||'<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 re=function(Wt){var te="both";switch(Wt){case 0:te="both";break;case 1:te="start";break;case 2:te="end";break;case 3:te="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=te===It.currentType?It.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){Lt.setCurrentType(te,ue)}),Xt.appendChild(ue),te==="both"||te==="start"){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.minHeight="20px",le.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>`,le.style.marginLeft="5px",ue.appendChild(le)}var Ae=document.createElement("div");Ae.style.display="flex",Ae.style.alignItems="center",Ae.style.minHeight="20px",Ae.style.flexGrow="2";var Le=document.createElement("hr");if(Le.style.minWidth="20px",Le.style.border="0px",Le.style.borderTop="3px solid "+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee"),Le.style.flexGrow="2",Ae.appendChild(Le),ue.appendChild(Ae),te==="both"||te==="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++)re(Rt);return Xt},wt.prototype.setCurrentType=function(Lt,Xt){var re=this;this.currentType=Lt,this.typeBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},wt}(z),oe=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.arrowType="end",It.arrowBaseHeight=10,It.arrowBaseWidth=10,It.getArrowPoints=It.getArrowPoints.bind(It),It.setArrowType=It.setArrowType.bind(It),It.arrowTypePanel=new Vt("Arrow type","end"),It.arrowTypePanel.onArrowTypeChanged=It.setArrowType,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.arrow1&&Lt!==this.arrow2)},wt.prototype.getArrowPoints=function(Lt,Xt){var re=this.arrowBaseWidth+2*this.strokeWidth,It=this.arrowBaseHeight+2*this.strokeWidth;return Lt-re/2+","+(Xt+It/2)+" "+Lt+","+(Xt-It/2)+" "+(Lt+re/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 re=this.arrow2.transform.baseVal.getItem(0);re.setRotate(Lt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(re,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,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.fillColor=re.defaultFillColor,It.strokeWidth=0,It.fillPanel=new tt("Color",re.defaultColorSet,re.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),de=function(Kt){function wt(Lt,Xt,re,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=re,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(re){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=re===Lt.currentOpacity?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentOpacity(re,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=100*re+"%",It.appendChild(Rt),Lt.opacityBoxes.push(It)}),Xt},wt.prototype.setCurrentOpacity=function(Lt,Xt){var re=this;this.currentOpacity=Lt,this.opacityBoxes.forEach(function(It){It.style.borderColor=It===Xt?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},wt}(z),Se=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.setOpacity=It.setOpacity.bind(It),It.fillColor=re.defaultHighlightColor,It.strokeWidth=0,It.opacity=re.defaultHighlightOpacity,It.fillPanel=new tt("Color",re.defaultColorSet,It.fillColor),It.fillPanel.onColorChanged=It.setFillColor,It.opacityPanel=new de("Opacity",re.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),Qt='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',ne='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ye=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||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=re.defaultStrokeColor,It.bgColor=re.defaultFillColor,It.fontFamily=re.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",re.defaultColorSet,It.color,Qt),It.colorPanel.onColorChanged=It.setColor,It.bgColorPanel=new tt("Fill color",re.defaultColorSet,It.bgColor,ne),It.bgColorPanel.onColorChanged=It.setBgColor,It.fontFamilyPanel=new Ht("Font",re.defaultFontFamilies,re.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),re=this.height/5;Lt&&(this.tipPosition={x:Xt+re/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))?(re=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:0},this.tipBase2Position={x:Xt+re,y:0}):(this.tipBase1Position={x:0,y:Xt},this.tipBase2Position={x:0,y:Xt+re}):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))?(re=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-re,y:0},this.tipBase2Position={x:this.width-Xt,y:0}):(this.tipBase1Position={x:this.width,y:Xt},this.tipBase2Position={x:this.width,y:Xt+re}):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))?(re=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-re,y:this.height},this.tipBase2Position={x:this.width-Xt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xt-re},this.tipBase2Position={x:this.width,y:this.height-Xt}):It<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(re=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:this.height},this.tipBase2Position={x:Xt+re,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xt},this.tipBase2Position={x:0,y:this.height-Xt-re})},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}(Yt),we=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.strokeColor=re.defaultColor,It.strokeWidth=re.defaultStrokeWidth,It.strokeDasharray=re.defaultStrokeDasharray,It.fillColor=re.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(re.defaultColorSet,["transparent"]),re.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(re.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.opacityPanel=new de("Opacity",re.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,re){return Kt.call(this,Lt,Xt,re)||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 re=this.tip2.transform.baseVal.getItem(0);re.setRotate(Lt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(re,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),fe=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||this;return It.strokePanel.colors=re.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}(we),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}(),ce=function(Kt){function wt(Lt,Xt,re){var It=Kt.call(this,Lt,Xt,re)||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=re.defaultColor,It.strokeWidth=re.defaultStrokeWidth,It.strokeDasharray=re.defaultStrokeDasharray,It.strokePanel=new tt("Line color",re.defaultColorSet,re.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",re.defaultStrokeDasharrays,re.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,re){var It=Kt.call(this,Lt,Xt,re)||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=re.defaultColor,It.strokeWidth=re.defaultStrokeWidth,It.strokeDasharray=re.defaultStrokeDasharray,It.fillColor=re.defaultFillColor,It.textColor=re.defaultStrokeColor,It.fontFamily=re.defaultFontFamily,It.fontSize=re.defaultCaptionFontSize,It.captionText=re.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(re.defaultColorSet,["transparent"]),It.strokeColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(re.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.fontFamilyPanel=new Ht("Font",re.defaultFontFamilies,re.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.textColorPanel=new tt("Text color",re.defaultColorSet,It.textColor,Qt),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),ve=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,re){var It=Kt.call(this,Lt,!1)||this;return It.dataUrl=Xt,It.state=re,It}return Re(wt,Kt),wt}(ve),ge=function(Kt){function wt(Lt,Xt,re){re===void 0&&(re=!1);var It=Kt.call(this,Lt,re)||this;return It.marker=Xt,It}return Re(wt,Kt),wt}(ve),xe=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}(),ee=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 xe,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,Yt,fe,we,Se,ye,be,se,Gt,ce,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Yt,we,Se,ye]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Yt,Se]},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 re=Lt.ALL_MARKER_TYPES.find(function(It){return It.typeName===Xt});re!==void 0&&Lt._availableMarkerTypes.push(re)}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&&Ct.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ct.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Lt){return Lt(new ve(wt))})},Kt.prototype.render=function(){return ot(this,void 0,void 0,function(){var wt;return zt(this,function(Lt){switch(Lt.label){case 0:return this.setCurrentMarker(),(wt=new Et).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(re){var It=new ve(Lt,!0);re(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(re){return re(new ve(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,re=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,re),this._isResizing=!1},Kt.prototype.scaleMarkers=function(wt,Lt){var Xt,re=this;this._currentMarker&&this._currentMarker instanceof Yt?this._currentMarker.scale(wt,Lt):(Xt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(It){It!==re._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(re){var It=new ge(wt,wt._currentMarker,!0);re(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(re){return re(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 Wt=new ge(wt,void 0,!0);Rt(Wt),Wt.defaultPrevented&&(Lt=!0)}),!Lt)){this.setCurrentMarker();for(var Xt=function(Rt){var Wt=re.markers[Rt];re.setCurrentMarker(re.markers[Rt]),re._currentMarker.dispose(),re.markerImage.removeChild(re._currentMarker.container),re.markers.splice(re.markers.indexOf(re._currentMarker),1),re.eventListeners.markerdelete.forEach(function(te){return te(new ge(wt,Wt))})},re=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 re=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Lt),re<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(It){return It(new ve(wt))})}else this.undoRedoManager.replaceLastUndoStep(Lt),this.eventListeners.statechange.forEach(function(It){return It(new ve(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 ve(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 ve(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 zt(this,function(re){switch(re.label){case 0:return[4,this.render()];case 1:return wt=re.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 re=Lt._availableMarkerTypes.find(function(Rt){return Rt.typeName===Xt.typeName});if(re!==void 0){var It=Lt.addNewMarker(re);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 ve(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(re){return re.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(re){return re(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 ve(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 ve(wt))}))},Kt.instanceCounter=0,Kt}()},63727:function(mn,gn,he){"use strict";he.d(gn,{s:function(){return le},default:function(){return Ze}});var ae=he(72308),Re=he(77321),ot=he(80702),zt=he(52487),Bt=he(74416),vt=he(45560),gt=he(69582),Et=he(6089),Ct=he(18929),St=he(59301),Tt=St.createContext({}),mt=Tt,xt=he(62853),ft=he(49618),z="__rc_cascader_search_mark__",tt=function(We,Ke,nn){var hn=nn.label,un=hn===void 0?"":hn;return Ke.some(function(bn){return String(bn[un]).toLowerCase().includes(We.toLowerCase())})},at=function(We,Ke,nn,hn){return Ke.map(function(un){return un[hn.label]}).join(" / ")},it=function(We,Ke,nn,hn,un,bn){var Un=un.filter,Vn=Un===void 0?tt:Un,Yn=un.render,vr=Yn===void 0?at:Yn,pr=un.limit,gr=pr===void 0?50:pr,Nr=un.sort;return St.useMemo(function(){var Lr=[];if(!We)return[];function dr(cr,jr){var $t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;cr.forEach(function($n){if(!(!Nr&&gr!==!1&&gr>0&&Lr.length>=gr)){var Zn=[].concat((0,ot.Z)(jr),[$n]),Dr=$n[nn.children],Vr=$t||$n.disabled;if((!Dr||Dr.length===0||bn)&&Vn(We,Zn,{label:nn.label})){var Ur;Lr.push((0,Re.Z)((0,Re.Z)({},$n),{},(Ur={disabled:Vr},(0,ft.Z)(Ur,nn.label,vr(We,Zn,hn,nn)),(0,ft.Z)(Ur,z,Zn),(0,ft.Z)(Ur,nn.children,void 0),Ur)))}Dr&&dr($n[nn.children],Zn,Vr)}})}return dr(Ke,[]),Nr&&Lr.sort(function(cr,jr){return Nr(cr[z],jr[z],We,nn)}),gr!==!1&&gr>0?Lr.slice(0,gr):Lr},[We,Ke,nn,hn,vr,bn,Vn,Nr,gr])},lt=it,ut="__RC_CASCADER_SPLIT__",dt="SHOW_PARENT",Pt="SHOW_CHILD";function At(Ge){return Ge.join(ut)}function Dt(Ge){return Ge.map(At)}function Ft(Ge){return Ge.split(ut)}function jt(Ge){var We=Ge||{},Ke=We.label,nn=We.value,hn=We.children,un=nn||"value";return{label:Ke||"label",value:un,key:un,children:hn||"children"}}function Nt(Ge,We){var Ke,nn;return(Ke=Ge.isLeaf)!==null&&Ke!==void 0?Ke:!((nn=Ge[We.children])!==null&&nn!==void 0&&nn.length)}function Gt(Ge){var We=Ge.parentElement;if(We){var Ke=Ge.offsetTop-We.offsetTop;Ke-We.scrollTop<0?We.scrollTo({top:Ke}):Ke+Ge.offsetHeight-We.scrollTop>We.offsetHeight&&We.scrollTo({top:Ke+Ge.offsetHeight-We.offsetHeight})}}function Ht(Ge,We){return Ge.map(function(Ke){var nn;return(nn=Ke[z])===null||nn===void 0?void 0:nn.map(function(hn){return hn[We.value]})})}function Yt(Ge){return Array.isArray(Ge)&&Array.isArray(Ge[0])}function Ut(Ge){return Ge?Yt(Ge)?Ge:(Ge.length===0?[]:[Ge]).map(function(We){return Array.isArray(We)?We:[We]}):[]}function Vt(Ge,We,Ke){var nn=new Set(Ge),hn=We();return Ge.filter(function(un){var bn=hn[un],Un=bn?bn.parent:null,Vn=bn?bn.children:null;return bn&&bn.node.disabled?!0:Ke===Pt?!(Vn&&Vn.some(function(Yn){return Yn.key&&nn.has(Yn.key)})):!(Un&&!Un.node.disabled&&nn.has(Un.key))})}function oe(Ge,We,Ke){for(var nn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,hn=We,un=[],bn=function(){var Yn,vr,pr,gr=Ge[Un],Nr=(Yn=hn)===null||Yn===void 0?void 0:Yn.findIndex(function(dr){var cr=dr[Ke.value];return nn?String(cr)===String(gr):cr===gr}),Lr=Nr!==-1?(vr=hn)===null||vr===void 0?void 0:vr[Nr]:null;un.push({value:(pr=Lr==null?void 0:Lr[Ke.value])!==null&&pr!==void 0?pr:gr,index:Nr,option:Lr}),hn=Lr==null?void 0:Lr[Ke.children]},Un=0;Un<Ge.length;Un+=1)bn();return un}var se=function(Ge,We,Ke,nn,hn){return St.useMemo(function(){var un=hn||function(bn){var Un=nn?bn.slice(-1):bn,Vn=" / ";return Un.every(function(Yn){return["string","number"].includes((0,xt.Z)(Yn))})?Un.join(Vn):Un.reduce(function(Yn,vr,pr){var gr=St.isValidElement(vr)?St.cloneElement(vr,{key:pr}):vr;return pr===0?[gr]:[].concat((0,ot.Z)(Yn),[Vn,gr])},[])};return Ge.map(function(bn){var Un,Vn=oe(bn,We,Ke),Yn=un(Vn.map(function(pr){var gr,Nr=pr.option,Lr=pr.value;return(gr=Nr==null?void 0:Nr[Ke.label])!==null&&gr!==void 0?gr:Lr}),Vn.map(function(pr){var gr=pr.option;return gr})),vr=At(bn);return{label:Yn,value:vr,key:vr,valueCells:bn,disabled:(Un=Vn[Vn.length-1])===null||Un===void 0||(Un=Un.option)===null||Un===void 0?void 0:Un.disabled}})},[Ge,We,Ke,hn,nn])};function de(Ge,We){return St.useCallback(function(Ke){var nn=[],hn=[];return Ke.forEach(function(un){var bn=oe(un,Ge,We);bn.every(function(Un){return Un.option})?hn.push(un):nn.push(un)}),[hn,nn]},[Ge,We])}var Se=he(34061),Qt=function(Ge,We){var Ke=St.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),nn=St.useCallback(function(){return Ke.current.options!==Ge&&(Ke.current.options=Ge,Ke.current.info=(0,Se.I8)(Ge,{fieldNames:We,initWrapper:function(un){return(0,Re.Z)((0,Re.Z)({},un),{},{pathKeyEntities:{}})},processEntity:function(un,bn){var Un=un.nodes.map(function(Vn){return Vn[We.value]}).join(ut);bn.pathKeyEntities[Un]=un,un.key=Un}})),Ke.current.info.pathKeyEntities},[We,Ge]);return nn};function ne(Ge,We){var Ke=St.useMemo(function(){return We||[]},[We]),nn=Qt(Ke,Ge),hn=St.useCallback(function(un){var bn=nn();return un.map(function(Un){var Vn=bn[Un].nodes;return Vn.map(function(Yn){return Yn[Ge.value]})})},[nn,Ge]);return[Ke,nn,hn]}var ye=he(48736);function we(Ge){return St.useMemo(function(){if(!Ge)return[!1,{}];var We={matchInputWidth:!0,limit:50};return Ge&&(0,xt.Z)(Ge)==="object"&&(We=(0,Re.Z)((0,Re.Z)({},We),Ge)),We.limit<=0&&(We.limit=!1),[!0,We]},[Ge])}var be=he(34643);function fe(Ge,We,Ke,nn,hn,un,bn,Un){return function(Vn){if(!Ge)We(Vn);else{var Yn=At(Vn),vr=Dt(Ke),pr=Dt(nn),gr=vr.includes(Yn),Nr=hn.some(function(Vr){return At(Vr)===Yn}),Lr=Ke,dr=hn;if(Nr&&!gr)dr=hn.filter(function(Vr){return At(Vr)!==Yn});else{var cr=gr?vr.filter(function(Vr){return Vr!==Yn}):[].concat((0,ot.Z)(vr),[Yn]),jr=un(),$t;if(gr){var $n=(0,be.S)(cr,{checked:!1,halfCheckedKeys:pr},jr);$t=$n.checkedKeys}else{var Zn=(0,be.S)(cr,!0,jr);$t=Zn.checkedKeys}var Dr=Vt($t,un,Un);Lr=bn(Dr)}We([].concat((0,ot.Z)(dr),(0,ot.Z)(Lr)))}}}function pe(Ge,We,Ke,nn,hn){return St.useMemo(function(){var un=hn(We),bn=(0,zt.Z)(un,2),Un=bn[0],Vn=bn[1];if(!Ge||!We.length)return[Un,[],Vn];var Yn=Dt(Un),vr=Ke(),pr=(0,be.S)(Yn,!0,vr),gr=pr.checkedKeys,Nr=pr.halfCheckedKeys;return[nn(gr),nn(Nr),Vn]},[Ge,We,Ke,nn,hn])}var ce=he(92310),Ce=he.n(ce),ve=St.memo(function(Ge){var We=Ge.children;return We},function(Ge,We){return!We.open}),Fe=ve;function ge(Ge){var We,Ke=Ge.prefixCls,nn=Ge.checked,hn=Ge.halfChecked,un=Ge.disabled,bn=Ge.onClick,Un=Ge.disableCheckbox,Vn=St.useContext(mt),Yn=Vn.checkable,vr=typeof Yn!="boolean"?Yn:null;return St.createElement("span",{className:Ce()("".concat(Ke),(We={},(0,ft.Z)(We,"".concat(Ke,"-checked"),nn),(0,ft.Z)(We,"".concat(Ke,"-indeterminate"),!nn&&hn),(0,ft.Z)(We,"".concat(Ke,"-disabled"),un||Un),We)),onClick:bn},vr)}var xe="__cascader_fix_label__";function ee(Ge){var We=Ge.prefixCls,Ke=Ge.multiple,nn=Ge.options,hn=Ge.activeValue,un=Ge.prevValuePath,bn=Ge.onToggleOpen,Un=Ge.onSelect,Vn=Ge.onActive,Yn=Ge.checkedSet,vr=Ge.halfCheckedSet,pr=Ge.loadingKeys,gr=Ge.isSelectable,Nr=Ge.disabled,Lr="".concat(We,"-menu"),dr="".concat(We,"-menu-item"),cr=St.useContext(mt),jr=cr.fieldNames,$t=cr.changeOnSelect,$n=cr.expandTrigger,Zn=cr.expandIcon,Dr=cr.loadingIcon,Vr=cr.dropdownMenuColumnStyle,Ur=cr.optionRender,ai=$n==="hover",qn=function(Ve){return Nr||Ve},zn=St.useMemo(function(){return nn.map(function(Ye){var Ve,He=Ye.disabled,Fn=Ye.disableCheckbox,On=Ye[z],Qn=(Ve=Ye[xe])!==null&&Ve!==void 0?Ve:Ye[jr.label],yn=Ye[jr.value],Nn=Nt(Ye,jr),en=On?On.map(function(En){return En[jr.value]}):[].concat((0,ot.Z)(un),[yn]),Xe=At(en),Dn=pr.includes(Xe),Oe=Yn.has(Xe),ln=vr.has(Xe);return{disabled:He,label:Qn,value:yn,isLeaf:Nn,isLoading:Dn,checked:Oe,halfChecked:ln,option:Ye,disableCheckbox:Fn,fullPath:en,fullPathKey:Xe}})},[nn,Yn,jr,vr,pr,un]);return St.createElement("ul",{className:Lr,role:"menu"},zn.map(function(Ye){var Ve,He=Ye.disabled,Fn=Ye.label,On=Ye.value,Qn=Ye.isLeaf,yn=Ye.isLoading,Nn=Ye.checked,en=Ye.halfChecked,Xe=Ye.option,Dn=Ye.fullPath,Oe=Ye.fullPathKey,ln=Ye.disableCheckbox,En=function(){if(!qn(He)){var An=(0,ot.Z)(Dn);ai&&Qn&&An.pop(),Vn(An)}},Gn=function(){gr(Xe)&&!qn(He)&&Un(Dn,Qn)},sn;return typeof Xe.title=="string"?sn=Xe.title:typeof Fn=="string"&&(sn=Fn),St.createElement("li",{key:Oe,className:Ce()(dr,(Ve={},(0,ft.Z)(Ve,"".concat(dr,"-expand"),!Qn),(0,ft.Z)(Ve,"".concat(dr,"-active"),hn===On||hn===Oe),(0,ft.Z)(Ve,"".concat(dr,"-disabled"),qn(He)),(0,ft.Z)(Ve,"".concat(dr,"-loading"),yn),Ve)),style:Vr,role:"menuitemcheckbox",title:sn,"aria-checked":Nn,"data-path-key":Oe,onClick:function(){En(),!ln&&(!Ke||Qn)&&Gn()},onDoubleClick:function(){$t&&bn(!1)},onMouseEnter:function(){ai&&En()},onMouseDown:function(An){An.preventDefault()}},Ke&&St.createElement(ge,{prefixCls:"".concat(We,"-checkbox"),checked:Nn,halfChecked:en,disabled:qn(He)||ln,disableCheckbox:ln,onClick:function(An){ln||(An.stopPropagation(),Gn())}}),St.createElement("div",{className:"".concat(dr,"-content")},Ur?Ur(Xe):Fn),!yn&&Zn&&!Qn&&St.createElement("div",{className:"".concat(dr,"-expand-icon")},Zn),yn&&Dr&&St.createElement("div",{className:"".concat(dr,"-loading-icon")},Dr))}))}var Kt=function(We,Ke){var nn=St.useContext(mt),hn=nn.values,un=hn[0],bn=St.useState([]),Un=(0,zt.Z)(bn,2),Vn=Un[0],Yn=Un[1];return St.useEffect(function(){We||Yn(un||[])},[Ke,un]),[Vn,Yn]},wt=Kt,Lt=he(10228),Xt=function(Ge,We,Ke,nn,hn,un,bn){var Un=bn.direction,Vn=bn.searchValue,Yn=bn.toggleOpen,vr=bn.open,pr=Un==="rtl",gr=St.useMemo(function(){for(var Vr=-1,Ur=We,ai=[],qn=[],zn=nn.length,Ye=Ht(We,Ke),Ve=function(yn){var Nn=Ur.findIndex(function(en,Xe){return(Ye[Xe]?At(Ye[Xe]):en[Ke.value])===nn[yn]});if(Nn===-1)return 1;Vr=Nn,ai.push(Vr),qn.push(nn[yn]),Ur=Ur[Vr][Ke.children]},He=0;He<zn&&Ur&&!Ve(He);He+=1);for(var Fn=We,On=0;On<ai.length-1;On+=1)Fn=Fn[ai[On]][Ke.children];return[qn,Vr,Fn,Ye]},[nn,Ke,We]),Nr=(0,zt.Z)(gr,4),Lr=Nr[0],dr=Nr[1],cr=Nr[2],jr=Nr[3],$t=function(Ur){hn(Ur)},$n=function(Ur){var ai=cr.length,qn=dr;qn===-1&&Ur<0&&(qn=ai);for(var zn=0;zn<ai;zn+=1){qn=(qn+Ur+ai)%ai;var Ye=cr[qn];if(Ye&&!Ye.disabled){var Ve=Lr.slice(0,-1).concat(jr[qn]?At(jr[qn]):Ye[Ke.value]);$t(Ve);return}}},Zn=function(){if(Lr.length>1){var Ur=Lr.slice(0,-1);$t(Ur)}else Yn(!1)},Dr=function(){var Ur,ai=((Ur=cr[dr])===null||Ur===void 0?void 0:Ur[Ke.children])||[],qn=ai.find(function(Ye){return!Ye.disabled});if(qn){var zn=[].concat((0,ot.Z)(Lr),[qn[Ke.value]]);$t(zn)}};St.useImperativeHandle(Ge,function(){return{onKeyDown:function(Ur){var ai=Ur.which;switch(ai){case Lt.Z.UP:case Lt.Z.DOWN:{var qn=0;ai===Lt.Z.UP?qn=-1:ai===Lt.Z.DOWN&&(qn=1),qn!==0&&$n(qn);break}case Lt.Z.LEFT:{if(Vn)break;pr?Dr():Zn();break}case Lt.Z.RIGHT:{if(Vn)break;pr?Zn():Dr();break}case Lt.Z.BACKSPACE:{Vn||Zn();break}case Lt.Z.ENTER:{if(Lr.length){var zn=cr[dr],Ye=(zn==null?void 0:zn[z])||[];Ye.length?un(Ye.map(function(Ve){return Ve[Ke.value]}),Ye[Ye.length-1]):un(Lr,cr[dr])}break}case Lt.Z.ESC:Yn(!1),vr&&Ur.stopPropagation()}},onKeyUp:function(){}}})},re=St.forwardRef(function(Ge,We){var Ke,nn,hn,un=Ge.prefixCls,bn=Ge.multiple,Un=Ge.searchValue,Vn=Ge.toggleOpen,Yn=Ge.notFoundContent,vr=Ge.direction,pr=Ge.open,gr=Ge.disabled,Nr=St.useRef(null),Lr=vr==="rtl",dr=St.useContext(mt),cr=dr.options,jr=dr.values,$t=dr.halfValues,$n=dr.fieldNames,Zn=dr.changeOnSelect,Dr=dr.onSelect,Vr=dr.searchOptions,Ur=dr.dropdownPrefixCls,ai=dr.loadData,qn=dr.expandTrigger,zn=Ur||un,Ye=St.useState([]),Ve=(0,zt.Z)(Ye,2),He=Ve[0],Fn=Ve[1],On=function(rr){if(!(!ai||Un)){var sr=oe(rr,cr,$n),mr=sr.map(function(Rr){var pi=Rr.option;return pi}),cn=mr[mr.length-1];if(cn&&!Nt(cn,$n)){var Si=At(rr);Fn(function(Rr){return[].concat((0,ot.Z)(Rr),[Si])}),ai(mr)}}};St.useEffect(function(){He.length&&He.forEach(function(Wn){var rr=Ft(Wn),sr=oe(rr,cr,$n,!0).map(function(cn){var Si=cn.option;return Si}),mr=sr[sr.length-1];(!mr||mr[$n.children]||Nt(mr,$n))&&Fn(function(cn){return cn.filter(function(Si){return Si!==Wn})})})},[cr,He,$n]);var Qn=St.useMemo(function(){return new Set(Dt(jr))},[jr]),yn=St.useMemo(function(){return new Set(Dt($t))},[$t]),Nn=wt(bn,pr),en=(0,zt.Z)(Nn,2),Xe=en[0],Dn=en[1],Oe=function(rr){Dn(rr),On(rr)},ln=function(rr){if(gr)return!1;var sr=rr.disabled,mr=Nt(rr,$n);return!sr&&(mr||Zn||bn)},En=function(rr,sr){var mr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Dr(rr),!bn&&(sr||Zn&&(qn==="hover"||mr))&&Vn(!1)},Gn=St.useMemo(function(){return Un?Vr:cr},[Un,Vr,cr]),sn=St.useMemo(function(){for(var Wn=[{options:Gn}],rr=Gn,sr=Ht(rr,$n),mr=function(){var Rr=Xe[cn],pi=rr.find(function(Rn,nr){return(sr[nr]?At(sr[nr]):Rn[$n.value])===Rr}),an=pi==null?void 0:pi[$n.children];if(!(an!=null&&an.length))return 1;rr=an,Wn.push({options:an})},cn=0;cn<Xe.length&&!mr();cn+=1);return Wn},[Gn,Xe,$n]),dn=function(rr,sr){ln(sr)&&En(rr,Nt(sr,$n),!0)};Xt(We,Gn,$n,Xe,Oe,dn,{direction:vr,searchValue:Un,toggleOpen:Vn,open:pr}),St.useEffect(function(){if(!Un)for(var Wn=0;Wn<Xe.length;Wn+=1){var rr,sr=Xe.slice(0,Wn+1),mr=At(sr),cn=(rr=Nr.current)===null||rr===void 0?void 0:rr.querySelector('li[data-path-key="'.concat(mr.replace(/\\{0,2}"/g,'\\"'),'"]'));cn&&Gt(cn)}},[Xe,Un]);var An=!((Ke=sn[0])!==null&&Ke!==void 0&&(Ke=Ke.options)!==null&&Ke!==void 0&&Ke.length),er=[(nn={},(0,ft.Z)(nn,$n.value,"__EMPTY__"),(0,ft.Z)(nn,xe,Yn),(0,ft.Z)(nn,"disabled",!0),nn)],ar=(0,Re.Z)((0,Re.Z)({},Ge),{},{multiple:!An&&bn,onSelect:En,onActive:Oe,onToggleOpen:Vn,checkedSet:Qn,halfCheckedSet:yn,loadingKeys:He,isSelectable:ln}),Xn=An?[{options:er}]:sn,In=Xn.map(function(Wn,rr){var sr=Xe.slice(0,rr),mr=Xe[rr];return St.createElement(ee,(0,ae.Z)({key:rr},ar,{prefixCls:zn,options:Wn.options,prevValuePath:sr,activeValue:mr}))});return St.createElement(Fe,{open:pr},St.createElement("div",{className:Ce()("".concat(zn,"-menus"),(hn={},(0,ft.Z)(hn,"".concat(zn,"-menu-empty"),An),(0,ft.Z)(hn,"".concat(zn,"-rtl"),Lr),hn)),ref:Nr},In))}),It=re,Rt=St.forwardRef(function(Ge,We){var Ke=(0,vt.lk)();return St.createElement(It,(0,ae.Z)({},Ge,Ke,{ref:We}))}),Wt=Rt,te=he(70425);function ue(){}function le(Ge){var We,Ke=Ge,nn=Ke.prefixCls,hn=nn===void 0?"rc-cascader":nn,un=Ke.style,bn=Ke.className,Un=Ke.options,Vn=Ke.checkable,Yn=Ke.defaultValue,vr=Ke.value,pr=Ke.fieldNames,gr=Ke.changeOnSelect,Nr=Ke.onChange,Lr=Ke.showCheckedStrategy,dr=Ke.loadData,cr=Ke.expandTrigger,jr=Ke.expandIcon,$t=jr===void 0?">":jr,$n=Ke.loadingIcon,Zn=Ke.direction,Dr=Ke.notFoundContent,Vr=Dr===void 0?"Not Found":Dr,Ur=Ke.disabled,ai=!!Vn,qn=(0,te.C8)(Yn,{value:vr,postState:Ut}),zn=(0,zt.Z)(qn,2),Ye=zn[0],Ve=zn[1],He=St.useMemo(function(){return jt(pr)},[JSON.stringify(pr)]),Fn=ne(He,Un),On=(0,zt.Z)(Fn,3),Qn=On[0],yn=On[1],Nn=On[2],en=de(Qn,He),Xe=pe(ai,Ye,yn,Nn,en),Dn=(0,zt.Z)(Xe,3),Oe=Dn[0],ln=Dn[1],En=Dn[2],Gn=(0,te.zX)(function(Xn){if(Ve(Xn),Nr){var In=Ut(Xn),Wn=In.map(function(mr){return oe(mr,Qn,He).map(function(cn){return cn.option})}),rr=ai?In:In[0],sr=ai?Wn:Wn[0];Nr(rr,sr)}}),sn=fe(ai,Gn,Oe,ln,En,yn,Nn,Lr),dn=(0,te.zX)(function(Xn){sn(Xn)}),An=St.useMemo(function(){return{options:Qn,fieldNames:He,values:Oe,halfValues:ln,changeOnSelect:gr,onSelect:dn,checkable:Vn,searchOptions:[],dropdownPrefixCls:void 0,loadData:dr,expandTrigger:cr,expandIcon:$t,loadingIcon:$n,dropdownMenuColumnStyle:void 0}},[Qn,He,Oe,ln,gr,dn,Vn,dr,cr,$t,$n]),er="".concat(hn,"-panel"),ar=!Qn.length;return St.createElement(mt.Provider,{value:An},St.createElement("div",{className:Ce()(er,(We={},(0,ft.Z)(We,"".concat(er,"-rtl"),Zn==="rtl"),(0,ft.Z)(We,"".concat(er,"-empty"),ar),We),bn),style:un},ar?Vr:St.createElement(It,{prefixCls:hn,searchValue:"",multiple:ai,toggleOpen:ue,open:!0,direction:Zn,disabled:Ur})))}function Ae(Ge){var We=Ge.onPopupVisibleChange,Ke=Ge.popupVisible,nn=Ge.popupClassName,hn=Ge.popupPlacement;warning(!We,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Ke===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(nn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(hn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Le(Ge,We){if(Ge){var Ke=function nn(hn){for(var un=0;un<hn.length;un++){var bn=hn[un];if(bn[We==null?void 0:We.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(bn[We==null?void 0:We.children])&&nn(bn[We==null?void 0:We.children]))return!0}};Ke(Ge)}}var Be=null,tn=["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"],$e=St.forwardRef(function(Ge,We){var Ke=Ge.id,nn=Ge.prefixCls,hn=nn===void 0?"rc-cascader":nn,un=Ge.fieldNames,bn=Ge.defaultValue,Un=Ge.value,Vn=Ge.changeOnSelect,Yn=Ge.onChange,vr=Ge.displayRender,pr=Ge.checkable,gr=Ge.autoClearSearchValue,Nr=gr===void 0?!0:gr,Lr=Ge.searchValue,dr=Ge.onSearch,cr=Ge.showSearch,jr=Ge.expandTrigger,$t=Ge.options,$n=Ge.dropdownPrefixCls,Zn=Ge.loadData,Dr=Ge.popupVisible,Vr=Ge.open,Ur=Ge.popupClassName,ai=Ge.dropdownClassName,qn=Ge.dropdownMenuColumnStyle,zn=Ge.dropdownStyle,Ye=Ge.popupPlacement,Ve=Ge.placement,He=Ge.onDropdownVisibleChange,Fn=Ge.onPopupVisibleChange,On=Ge.expandIcon,Qn=On===void 0?">":On,yn=Ge.loadingIcon,Nn=Ge.children,en=Ge.dropdownMatchSelectWidth,Xe=en===void 0?!1:en,Dn=Ge.showCheckedStrategy,Oe=Dn===void 0?dt:Dn,ln=Ge.optionRender,En=(0,Bt.Z)(Ge,tn),Gn=(0,gt.ZP)(Ke),sn=!!pr,dn=(0,Ct.Z)(bn,{value:Un,postState:Ut}),An=(0,zt.Z)(dn,2),er=An[0],ar=An[1],Xn=St.useMemo(function(){return jt(un)},[JSON.stringify(un)]),In=ne(Xn,$t),Wn=(0,zt.Z)(In,3),rr=Wn[0],sr=Wn[1],mr=Wn[2],cn=(0,Ct.Z)("",{value:Lr,postState:function(_r){return _r||""}}),Si=(0,zt.Z)(cn,2),Rr=Si[0],pi=Si[1],an=function(_r,di){pi(_r),di.source!=="blur"&&dr&&dr(_r)},Rn=we(cr),nr=(0,zt.Z)(Rn,2),fr=nr[0],lr=nr[1],Pr=lt(Rr,rr,Xn,$n||hn,lr,Vn||sn),Xr=de(rr,Xn),zr=pe(sn,er,sr,mr,Xr),Kr=(0,zt.Z)(zr,3),Yr=Kr[0],wn=Kr[1],ci=Kr[2],Sn=St.useMemo(function(){var qr=Dt(Yr),_r=Vt(qr,sr,Oe);return[].concat((0,ot.Z)(ci),(0,ot.Z)(mr(_r)))},[Yr,sr,mr,ci,Oe]),Jr=se(Sn,rr,Xn,sn,vr),ni=(0,Et.Z)(function(qr){if(ar(qr),Yn){var _r=Ut(qr),di=_r.map(function(br){return oe(br,rr,Xn).map(function(Zr){return Zr.option})}),Oi=sn?_r:_r[0],ur=sn?di:di[0];Yn(Oi,ur)}}),oi=fe(sn,ni,Yr,wn,ci,sr,mr,Oe),Ui=(0,Et.Z)(function(qr){(!sn||Nr)&&pi(""),oi(qr)}),ji=function(_r,di){if(di.type==="clear"){ni([]);return}var Oi=di.values[0],ur=Oi.valueCells;Ui(ur)},si=Vr!==void 0?Vr:Dr,gi=ai||Ur,Oo=Ve||Ye,Ci=function(_r){He==null||He(_r),Fn==null||Fn(_r)},or=St.useMemo(function(){return{options:rr,fieldNames:Xn,values:Yr,halfValues:wn,changeOnSelect:Vn,onSelect:Ui,checkable:pr,searchOptions:Pr,dropdownPrefixCls:$n,loadData:Zn,expandTrigger:jr,expandIcon:Qn,loadingIcon:yn,dropdownMenuColumnStyle:qn,optionRender:ln}},[rr,Xn,Yr,wn,Vn,Ui,pr,Pr,$n,Zn,jr,Qn,yn,qn,ln]),Me=!(Rr?Pr:rr).length,Ji=Rr&&lr.matchInputWidth||Me?{}:{minWidth:"auto"};return St.createElement(mt.Provider,{value:or},St.createElement(vt.Ac,(0,ae.Z)({},En,{ref:We,id:Gn,prefixCls:hn,autoClearSearchValue:Nr,dropdownMatchSelectWidth:Xe,dropdownStyle:(0,Re.Z)((0,Re.Z)({},Ji),zn),displayValues:Jr,onDisplayValuesChange:ji,mode:sn?"multiple":void 0,searchValue:Rr,onSearch:an,showSearch:fr,OptionList:Wt,emptyOptions:Me,open:si,dropdownClassName:gi,placement:Oo,onDropdownVisibleChange:Ci,getRawInputElement:function(){return Nn}})))});$e.SHOW_PARENT=dt,$e.SHOW_CHILD=Pt,$e.Panel=le;var Qe=$e,Ze=Qe},98535:function(mn,gn,he){"use strict";he.r(gn),he.d(gn,{Panel:function(){return Ut},default:function(){return Yt}});var ae=he(72308),Re=he(80702),ot=he(52487),zt=he(62853),Bt=he(92310),vt=he.n(Bt),gt=he(18929),Et=he(48736),Ct=he(59301),St=he(74416),Tt=he(11592),mt=he(77321),xt=he(49618),ft=he(77900),z=he(10228),tt=Ct.forwardRef(function(Vt,oe){var se=Vt.prefixCls,de=Vt.forceRender,Se=Vt.className,Qt=Vt.style,ne=Vt.children,ye=Vt.isActive,we=Vt.role,be=Vt.classNames,fe=Vt.styles,pe=Ct.useState(ye||de),ce=(0,ot.Z)(pe,2),Ce=ce[0],ve=ce[1];return Ct.useEffect(function(){(de||ye)&&ve(!0)},[de,ye]),Ce?Ct.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),Se),style:Qt,role:we},Ct.createElement("div",{className:vt()("".concat(se,"-content-box"),be==null?void 0:be.body),style:fe==null?void 0:fe.body},ne)):null});tt.displayName="PanelContent";var at=tt,it=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lt=Ct.forwardRef(function(Vt,oe){var se=Vt.showArrow,de=se===void 0?!0:se,Se=Vt.headerClass,Qt=Vt.isActive,ne=Vt.onItemClick,ye=Vt.forceRender,we=Vt.className,be=Vt.classNames,fe=be===void 0?{}:be,pe=Vt.styles,ce=pe===void 0?{}:pe,Ce=Vt.prefixCls,ve=Vt.collapsible,Fe=Vt.accordion,ge=Vt.panelKey,xe=Vt.extra,ee=Vt.header,Kt=Vt.expandIcon,wt=Vt.openMotion,Lt=Vt.destroyInactivePanel,Xt=Vt.children,re=(0,St.Z)(Vt,it),It=ve==="disabled",Rt=xe!=null&&typeof xe!="boolean",Wt=(0,xt.Z)((0,xt.Z)((0,xt.Z)({onClick:function(){ne==null||ne(ge)},onKeyDown:function(tn){(tn.key==="Enter"||tn.keyCode===z.Z.ENTER||tn.which===z.Z.ENTER)&&(ne==null||ne(ge))},role:Fe?"tab":"button"},"aria-expanded",Qt),"aria-disabled",It),"tabIndex",It?-1:0),te=typeof Kt=="function"?Kt(Vt):Ct.createElement("i",{className:"arrow"}),ue=te&&Ct.createElement("div",(0,ae.Z)({className:"".concat(Ce,"-expand-icon")},["header","icon"].includes(ve)?Wt:{}),te),le=vt()("".concat(Ce,"-item"),(0,xt.Z)((0,xt.Z)({},"".concat(Ce,"-item-active"),Qt),"".concat(Ce,"-item-disabled"),It),we),Ae=vt()(Se,"".concat(Ce,"-header"),(0,xt.Z)({},"".concat(Ce,"-collapsible-").concat(ve),!!ve),fe.header),Le=(0,mt.Z)({className:Ae,style:ce.header},["header","icon"].includes(ve)?{}:Wt);return Ct.createElement("div",(0,ae.Z)({},re,{ref:oe,className:le}),Ct.createElement("div",Le,de&&ue,Ct.createElement("span",(0,ae.Z)({className:"".concat(Ce,"-header-text")},ve==="header"?Wt:{}),ee),Rt&&Ct.createElement("div",{className:"".concat(Ce,"-extra")},xe)),Ct.createElement(ft.default,(0,ae.Z)({visible:Qt,leavedClassName:"".concat(Ce,"-content-hidden")},wt,{forceRender:ye,removeOnLeave:Lt}),function(Be,tn){var $e=Be.className,Qe=Be.style;return Ct.createElement(at,{ref:tn,prefixCls:Ce,className:$e,classNames:fe,style:Qe,styles:ce,isActive:Qt,forceRender:ye,role:Fe?"tabpanel":void 0},Xt)}))}),ut=lt,dt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pt=function(oe,se){var de=se.prefixCls,Se=se.accordion,Qt=se.collapsible,ne=se.destroyInactivePanel,ye=se.onItemClick,we=se.activeKey,be=se.openMotion,fe=se.expandIcon;return oe.map(function(pe,ce){var Ce=pe.children,ve=pe.label,Fe=pe.key,ge=pe.collapsible,xe=pe.onItemClick,ee=pe.destroyInactivePanel,Kt=(0,St.Z)(pe,dt),wt=String(Fe!=null?Fe:ce),Lt=ge!=null?ge:Qt,Xt=ee!=null?ee:ne,re=function(Wt){Lt!=="disabled"&&(ye(Wt),xe==null||xe(Wt))},It=!1;return Se?It=we[0]===wt:It=we.indexOf(wt)>-1,Ct.createElement(ut,(0,ae.Z)({},Kt,{prefixCls:de,key:wt,panelKey:wt,isActive:It,accordion:Se,openMotion:be,expandIcon:fe,header:ve,collapsible:Lt,onItemClick:re,destroyInactivePanel:Xt}),Ce)})},At=function(oe,se,de){if(!oe)return null;var Se=de.prefixCls,Qt=de.accordion,ne=de.collapsible,ye=de.destroyInactivePanel,we=de.onItemClick,be=de.activeKey,fe=de.openMotion,pe=de.expandIcon,ce=oe.key||String(se),Ce=oe.props,ve=Ce.header,Fe=Ce.headerClass,ge=Ce.destroyInactivePanel,xe=Ce.collapsible,ee=Ce.onItemClick,Kt=!1;Qt?Kt=be[0]===ce:Kt=be.indexOf(ce)>-1;var wt=xe!=null?xe:ne,Lt=function(It){wt!=="disabled"&&(we(It),ee==null||ee(It))},Xt={key:ce,panelKey:ce,header:ve,headerClass:Fe,isActive:Kt,prefixCls:Se,destroyInactivePanel:ge!=null?ge:ye,openMotion:fe,accordion:Qt,children:oe.props.children,onItemClick:Lt,expandIcon:pe,collapsible:wt};return typeof oe.type=="string"?oe:(Object.keys(Xt).forEach(function(re){typeof Xt[re]=="undefined"&&delete Xt[re]}),Ct.cloneElement(oe,Xt))};function Dt(Vt,oe,se){return Array.isArray(Vt)?Pt(Vt,se):(0,Tt.Z)(oe).map(function(de,Se){return At(de,Se,se)})}var Ft=Dt,jt=he(26112);function Nt(Vt){var oe=Vt;if(!Array.isArray(oe)){var se=(0,zt.Z)(oe);oe=se==="number"||se==="string"?[oe]:[]}return oe.map(function(de){return String(de)})}var Gt=Ct.forwardRef(function(Vt,oe){var se=Vt.prefixCls,de=se===void 0?"rc-collapse":se,Se=Vt.destroyInactivePanel,Qt=Se===void 0?!1:Se,ne=Vt.style,ye=Vt.accordion,we=Vt.className,be=Vt.children,fe=Vt.collapsible,pe=Vt.openMotion,ce=Vt.expandIcon,Ce=Vt.activeKey,ve=Vt.defaultActiveKey,Fe=Vt.onChange,ge=Vt.items,xe=vt()(de,we),ee=(0,gt.Z)([],{value:Ce,onChange:function(Rt){return Fe==null?void 0:Fe(Rt)},defaultValue:ve,postState:Nt}),Kt=(0,ot.Z)(ee,2),wt=Kt[0],Lt=Kt[1],Xt=function(Rt){return Lt(function(){if(ye)return wt[0]===Rt?[]:[Rt];var Wt=wt.indexOf(Rt),te=Wt>-1;return te?wt.filter(function(ue){return ue!==Rt}):[].concat((0,Re.Z)(wt),[Rt])})};(0,Et.ZP)(!be,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var re=Ft(ge,be,{prefixCls:de,accordion:ye,openMotion:pe,expandIcon:ce,collapsible:fe,destroyInactivePanel:Qt,onItemClick:Xt,activeKey:wt});return Ct.createElement("div",(0,ae.Z)({ref:oe,className:xe,style:ne,role:ye?"tablist":void 0},(0,jt.Z)(Vt,{aria:!0,data:!0})),re)}),Ht=Object.assign(Gt,{Panel:ut}),Yt=Ht,Ut=Ht.Panel},66042:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return Yt}});var ae=he(77321),Re=he(52487),ot=he(43403),zt=he(34280),Bt=he(59301),vt=Bt.createContext(null),gt=Bt.createContext({}),Et=vt,Ct=he(49618),St=he(72308),Tt=he(92310),mt=he.n(Tt),xt=he(77900),ft=he(10228),z=he(26112),tt=he(74416),at=he(8654),it=["prefixCls","className","containerRef"],lt=function(Vt){var oe=Vt.prefixCls,se=Vt.className,de=Vt.containerRef,Se=(0,tt.Z)(Vt,it),Qt=Bt.useContext(gt),ne=Qt.panel,ye=(0,at.x1)(ne,de);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(oe,"-content"),se),role:"dialog",ref:ye},(0,z.Z)(Vt,{aria:!0}),{"aria-modal":"true"},Se))},ut=lt,dt=he(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,Vt){var oe,se,de,Se=Ut.prefixCls,Qt=Ut.open,ne=Ut.placement,ye=Ut.inline,we=Ut.push,be=Ut.forceRender,fe=Ut.autoFocus,pe=Ut.keyboard,ce=Ut.classNames,Ce=Ut.rootClassName,ve=Ut.rootStyle,Fe=Ut.zIndex,ge=Ut.className,xe=Ut.id,ee=Ut.style,Kt=Ut.motion,wt=Ut.width,Lt=Ut.height,Xt=Ut.children,re=Ut.mask,It=Ut.maskClosable,Rt=Ut.maskMotion,Wt=Ut.maskClassName,te=Ut.maskStyle,ue=Ut.afterOpenChange,le=Ut.onClose,Ae=Ut.onMouseEnter,Le=Ut.onMouseOver,Be=Ut.onMouseLeave,tn=Ut.onClick,$e=Ut.onKeyDown,Qe=Ut.onKeyUp,Ze=Ut.styles,Ge=Ut.drawerRender,We=Bt.useRef(),Ke=Bt.useRef(),nn=Bt.useRef();Bt.useImperativeHandle(Vt,function(){return We.current});var hn=function(Zn){var Dr=Zn.keyCode,Vr=Zn.shiftKey;switch(Dr){case ft.Z.TAB:{if(Dr===ft.Z.TAB){if(!Vr&&document.activeElement===nn.current){var Ur;(Ur=Ke.current)===null||Ur===void 0||Ur.focus({preventScroll:!0})}else if(Vr&&document.activeElement===Ke.current){var ai;(ai=nn.current)===null||ai===void 0||ai.focus({preventScroll:!0})}}break}case ft.Z.ESC:{le&&pe&&(Zn.stopPropagation(),le(Zn));break}}};Bt.useEffect(function(){if(Qt&&fe){var $n;($n=We.current)===null||$n===void 0||$n.focus({preventScroll:!0})}},[Qt]);var un=Bt.useState(!1),bn=(0,Re.Z)(un,2),Un=bn[0],Vn=bn[1],Yn=Bt.useContext(Et),vr;typeof we=="boolean"?vr=we?{}:{distance:0}:vr=we||{};var pr=(oe=(se=(de=vr)===null||de===void 0?void 0:de.distance)!==null&&se!==void 0?se:Yn==null?void 0:Yn.pushDistance)!==null&&oe!==void 0?oe:180,gr=Bt.useMemo(function(){return{pushDistance:pr,push:function(){Vn(!0)},pull:function(){Vn(!1)}}},[pr]);Bt.useEffect(function(){if(Qt){var $n;Yn==null||($n=Yn.push)===null||$n===void 0||$n.call(Yn)}else{var Zn;Yn==null||(Zn=Yn.pull)===null||Zn===void 0||Zn.call(Yn)}},[Qt]),Bt.useEffect(function(){return function(){var $n;Yn==null||($n=Yn.pull)===null||$n===void 0||$n.call(Yn)}},[]);var Nr=re&&Bt.createElement(xt.default,(0,St.Z)({key:"mask"},Rt,{visible:Qt}),function($n,Zn){var Dr=$n.className,Vr=$n.style;return Bt.createElement("div",{className:mt()("".concat(Se,"-mask"),Dr,ce==null?void 0:ce.mask,Wt),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Vr),te),Ze==null?void 0:Ze.mask),onClick:It&&Qt?le:void 0,ref:Zn})}),Lr=typeof Kt=="function"?Kt(ne):Kt,dr={};if(Un&&pr)switch(ne){case"top":dr.transform="translateY(".concat(pr,"px)");break;case"bottom":dr.transform="translateY(".concat(-pr,"px)");break;case"left":dr.transform="translateX(".concat(pr,"px)");break;default:dr.transform="translateX(".concat(-pr,"px)");break}ne==="left"||ne==="right"?dr.width=Pt(wt):dr.height=Pt(Lt);var cr={onMouseEnter:Ae,onMouseOver:Le,onMouseLeave:Be,onClick:tn,onKeyDown:$e,onKeyUp:Qe},jr=Bt.createElement(xt.default,(0,St.Z)({key:"panel"},Lr,{visible:Qt,forceRender:be,onVisibleChanged:function(Zn){ue==null||ue(Zn)},removeOnLeave:!1,leavedClassName:"".concat(Se,"-content-wrapper-hidden")}),function($n,Zn){var Dr=$n.className,Vr=$n.style,Ur=Bt.createElement(ut,(0,St.Z)({id:xe,containerRef:Zn,prefixCls:Se,className:mt()(ge,ce==null?void 0:ce.content),style:(0,ae.Z)((0,ae.Z)({},ee),Ze==null?void 0:Ze.content)},(0,z.Z)(Ut,{aria:!0}),cr),Xt);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(Se,"-content-wrapper"),ce==null?void 0:ce.wrapper,Dr),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},dr),Vr),Ze==null?void 0:Ze.wrapper)},(0,z.Z)(Ut,{data:!0})),Ge?Ge(Ur):Ur)}),$t=(0,ae.Z)({},ve);return Fe&&($t.zIndex=Fe),Bt.createElement(Et.Provider,{value:gr},Bt.createElement("div",{className:mt()(Se,"".concat(Se,"-").concat(ne),Ce,(0,Ct.Z)((0,Ct.Z)({},"".concat(Se,"-open"),Qt),"".concat(Se,"-inline"),ye)),style:$t,tabIndex:-1,ref:We,onKeyDown:hn},Nr,Bt.createElement("div",{tabIndex:0,ref:Ke,style:Dt,"aria-hidden":"true","data-sentinel":"start"}),jr,Bt.createElement("div",{tabIndex:0,ref:nn,style:Dt,"aria-hidden":"true","data-sentinel":"end"})))}var jt=Bt.forwardRef(Ft),Nt=jt,Gt=function(Vt){var oe=Vt.open,se=oe===void 0?!1:oe,de=Vt.prefixCls,Se=de===void 0?"rc-drawer":de,Qt=Vt.placement,ne=Qt===void 0?"right":Qt,ye=Vt.autoFocus,we=ye===void 0?!0:ye,be=Vt.keyboard,fe=be===void 0?!0:be,pe=Vt.width,ce=pe===void 0?378:pe,Ce=Vt.mask,ve=Ce===void 0?!0:Ce,Fe=Vt.maskClosable,ge=Fe===void 0?!0:Fe,xe=Vt.getContainer,ee=Vt.forceRender,Kt=Vt.afterOpenChange,wt=Vt.destroyOnClose,Lt=Vt.onMouseEnter,Xt=Vt.onMouseOver,re=Vt.onMouseLeave,It=Vt.onClick,Rt=Vt.onKeyDown,Wt=Vt.onKeyUp,te=Vt.panelRef,ue=Bt.useState(!1),le=(0,Re.Z)(ue,2),Ae=le[0],Le=le[1],Be=Bt.useState(!1),tn=(0,Re.Z)(Be,2),$e=tn[0],Qe=tn[1];(0,zt.Z)(function(){Qe(!0)},[]);var Ze=$e?se:!1,Ge=Bt.useRef(),We=Bt.useRef();(0,zt.Z)(function(){Ze&&(We.current=document.activeElement)},[Ze]);var Ke=function(Un){var Vn;if(Le(Un),Kt==null||Kt(Un),!Un&&We.current&&!((Vn=Ge.current)!==null&&Vn!==void 0&&Vn.contains(We.current))){var Yn;(Yn=We.current)===null||Yn===void 0||Yn.focus({preventScroll:!0})}},nn=Bt.useMemo(function(){return{panel:te}},[te]);if(!ee&&!Ae&&!Ze&&wt)return null;var hn={onMouseEnter:Lt,onMouseOver:Xt,onMouseLeave:re,onClick:It,onKeyDown:Rt,onKeyUp:Wt},un=(0,ae.Z)((0,ae.Z)({},Vt),{},{open:Ze,prefixCls:Se,placement:ne,autoFocus:we,keyboard:fe,width:ce,mask:ve,maskClosable:ge,inline:xe===!1,afterOpenChange:Ke,ref:Ge},hn);return Bt.createElement(gt.Provider,{value:nn},Bt.createElement(ot.Z,{open:Ze||ee||Ae,autoDestroy:!1,getContainer:xe,autoLock:ve&&(Ze||Ae)},Bt.createElement(Nt,un)))},Ht=Gt,Yt=Ht},25930:function(mn,gn,he){"use strict";he.d(gn,{Cd:function(){return Gt}});var ae=he(72308),Re=he(77321),ot=he(74416),zt=he(59301),Bt=he(92310),vt=he.n(Bt),gt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Et=function(){var Ut=(0,zt.useRef)([]),Vt=(0,zt.useRef)(null);return(0,zt.useEffect)(function(){var oe=Date.now(),se=!1;Ut.current.forEach(function(de){if(de){se=!0;var Se=de.style;Se.transitionDuration=".3s, .3s, .3s, .06s",Vt.current&&oe-Vt.current<100&&(Se.transitionDuration="0s, 0s")}}),se&&(Vt.current=Date.now())}),Ut.current},Ct=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],St=function(Ut){var Vt=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Vt.className,se=Vt.percent,de=Vt.prefixCls,Se=Vt.strokeColor,Qt=Vt.strokeLinecap,ne=Vt.strokeWidth,ye=Vt.style,we=Vt.trailColor,be=Vt.trailWidth,fe=Vt.transition,pe=(0,ot.Z)(Vt,Ct);delete pe.gapPosition;var ce=Array.isArray(se)?se:[se],Ce=Array.isArray(Se)?Se:[Se],ve=Et(),Fe=ne/2,ge=100-ne/2,xe="M ".concat(Qt==="round"?Fe:0,",").concat(Fe,`
|
|
L `).concat(Qt==="round"?ge:100,",").concat(Fe),ee="0 0 100 ".concat(ne),Kt=0;return zt.createElement("svg",(0,ae.Z)({className:vt()("".concat(de,"-line"),oe),viewBox:ee,preserveAspectRatio:"none",style:ye},pe),zt.createElement("path",{className:"".concat(de,"-line-trail"),d:xe,strokeLinecap:Qt,stroke:we,strokeWidth:be||ne,fillOpacity:"0"}),ce.map(function(wt,Lt){var Xt=1;switch(Qt){case"round":Xt=1-ne/100;break;case"square":Xt=1-ne/2/100;break;default:Xt=1;break}var re={strokeDasharray:"".concat(wt*Xt,"px, 100px"),strokeDashoffset:"-".concat(Kt,"px"),transition:fe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},It=Ce[Lt]||Ce[Ce.length-1];return Kt+=wt,zt.createElement("path",{key:Lt,className:"".concat(de,"-line-path"),d:xe,strokeLinecap:Qt,stroke:It,strokeWidth:ne,fillOpacity:"0",ref:function(Wt){ve[Lt]=Wt},style:re})}))},Tt=St,mt=he(62853),xt=he(52487),ft=he(47273),z=0,tt=(0,ft.Z)();function at(){var Yt;return tt?(Yt=z,z+=1):Yt="TEST_OR_SSR",Yt}var it=function(Yt){var Ut=zt.useState(),Vt=(0,xt.Z)(Ut,2),oe=Vt[0],se=Vt[1];return zt.useEffect(function(){se("rc_progress_".concat(at()))},[]),Yt||oe},lt=function(Ut){var Vt=Ut.bg,oe=Ut.children;return zt.createElement("div",{style:{width:"100%",height:"100%",background:Vt}},oe)};function ut(Yt,Ut){return Object.keys(Yt).map(function(Vt){var oe=parseFloat(Vt),se="".concat(Math.floor(oe*Ut),"%");return"".concat(Yt[Vt]," ").concat(se)})}var dt=zt.forwardRef(function(Yt,Ut){var Vt=Yt.prefixCls,oe=Yt.color,se=Yt.gradientId,de=Yt.radius,Se=Yt.style,Qt=Yt.ptg,ne=Yt.strokeLinecap,ye=Yt.strokeWidth,we=Yt.size,be=Yt.gapDegree,fe=oe&&(0,mt.Z)(oe)==="object",pe=fe?"#FFF":void 0,ce=we/2,Ce=zt.createElement("circle",{className:"".concat(Vt,"-circle-path"),r:de,cx:ce,cy:ce,stroke:pe,strokeLinecap:ne,strokeWidth:ye,opacity:Qt===0?0:1,style:Se,ref:Ut});if(!fe)return Ce;var ve="".concat(se,"-conic"),Fe=be?"".concat(180+be/2,"deg"):"0deg",ge=ut(oe,(360-be)/360),xe=ut(oe,1),ee="conic-gradient(from ".concat(Fe,", ").concat(ge.join(", "),")"),Kt="linear-gradient(to ".concat(be?"bottom":"top",", ").concat(xe.join(", "),")");return zt.createElement(zt.Fragment,null,zt.createElement("mask",{id:ve},Ce),zt.createElement("foreignObject",{x:0,y:0,width:we,height:we,mask:"url(#".concat(ve,")")},zt.createElement(lt,{bg:Kt},zt.createElement(lt,{bg:ee}))))}),Pt=dt,At=100,Dt=function(Ut,Vt,oe,se,de,Se,Qt,ne,ye,we){var be=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,fe=oe/100*360*((360-Se)/360),pe=Se===0?0:{bottom:0,top:180,left:90,right:-90}[Qt],ce=(100-se)/100*Vt;ye==="round"&&se!==100&&(ce+=we/2,ce>=Vt&&(ce=Vt-.01));var Ce=At/2;return{stroke:typeof ne=="string"?ne:void 0,strokeDasharray:"".concat(Vt,"px ").concat(Ut),strokeDashoffset:ce+be,transform:"rotate(".concat(de+fe+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(Yt){var Ut=Yt!=null?Yt:[];return Array.isArray(Ut)?Ut:[Ut]}var Nt=function(Ut){var Vt=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Vt.id,se=Vt.prefixCls,de=Vt.steps,Se=Vt.strokeWidth,Qt=Vt.trailWidth,ne=Vt.gapDegree,ye=ne===void 0?0:ne,we=Vt.gapPosition,be=Vt.trailColor,fe=Vt.strokeLinecap,pe=Vt.style,ce=Vt.className,Ce=Vt.strokeColor,ve=Vt.percent,Fe=(0,ot.Z)(Vt,Ft),ge=At/2,xe=it(oe),ee="".concat(xe,"-gradient"),Kt=ge-Se/2,wt=Math.PI*2*Kt,Lt=ye>0?90+ye/2:-90,Xt=wt*((360-ye)/360),re=(0,mt.Z)(de)==="object"?de:{count:de,gap:2},It=re.count,Rt=re.gap,Wt=jt(ve),te=jt(Ce),ue=te.find(function(Qe){return Qe&&(0,mt.Z)(Qe)==="object"}),le=ue&&(0,mt.Z)(ue)==="object",Ae=le?"butt":fe,Le=Dt(wt,Xt,0,100,Lt,ye,we,be,Ae,Se),Be=Et(),tn=function(){var Ze=0;return Wt.map(function(Ge,We){var Ke=te[We]||te[te.length-1],nn=Dt(wt,Xt,Ze,Ge,Lt,ye,we,Ke,Ae,Se);return Ze+=Ge,zt.createElement(Pt,{key:We,color:Ke,ptg:Ge,radius:Kt,prefixCls:se,gradientId:ee,style:nn,strokeLinecap:Ae,strokeWidth:Se,gapDegree:ye,ref:function(un){Be[We]=un},size:At})}).reverse()},$e=function(){var Ze=Math.round(It*(Wt[0]/100)),Ge=100/It,We=0;return new Array(It).fill(null).map(function(Ke,nn){var hn=nn<=Ze-1?te[0]:be,un=hn&&(0,mt.Z)(hn)==="object"?"url(#".concat(ee,")"):void 0,bn=Dt(wt,Xt,We,Ge,Lt,ye,we,hn,"butt",Se,Rt);return We+=(Xt-bn.strokeDashoffset+Rt)*100/Xt,zt.createElement("circle",{key:nn,className:"".concat(se,"-circle-path"),r:Kt,cx:ge,cy:ge,stroke:un,strokeWidth:Se,opacity:1,style:bn,ref:function(Vn){Be[nn]=Vn}})})};return zt.createElement("svg",(0,ae.Z)({className:vt()("".concat(se,"-circle"),ce),viewBox:"0 0 ".concat(At," ").concat(At),style:pe,id:oe,role:"presentation"},Fe),!It&&zt.createElement("circle",{className:"".concat(se,"-circle-trail"),r:Kt,cx:ge,cy:ge,stroke:be,strokeLinecap:Ae,strokeWidth:Qt||Se,style:Le}),It?$e():tn())},Gt=Nt,Ht={Line:Tt,Circle:Gt}},738:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ut}});var ae=he(72308),Re=he(49618),ot=he(52487),zt=he(74416),Bt=he(92310),vt=he.n(Bt),gt=he(18929),Et=he(10228),Ct=he(26112),St=he(59301);function Tt(dt,Pt){var At=dt.disabled,Dt=dt.prefixCls,Ft=dt.character,jt=dt.characterRender,Nt=dt.index,Gt=dt.count,Ht=dt.value,Yt=dt.allowHalf,Ut=dt.focused,Vt=dt.onHover,oe=dt.onClick,se=function(fe){Vt(fe,Nt)},de=function(fe){oe(fe,Nt)},Se=function(fe){fe.keyCode===Et.Z.ENTER&&oe(fe,Nt)},Qt=Nt+1,ne=new Set([Dt]);Ht===0&&Nt===0&&Ut?ne.add("".concat(Dt,"-focused")):Yt&&Ht+.5>=Qt&&Ht<Qt?(ne.add("".concat(Dt,"-half")),ne.add("".concat(Dt,"-active")),Ut&&ne.add("".concat(Dt,"-focused"))):(Qt<=Ht?ne.add("".concat(Dt,"-full")):ne.add("".concat(Dt,"-zero")),Qt===Ht&&Ut&&ne.add("".concat(Dt,"-focused")));var ye=typeof Ft=="function"?Ft(dt):Ft,we=St.createElement("li",{className:vt()(Array.from(ne)),ref:Pt},St.createElement("div",{onClick:At?null:de,onKeyDown:At?null:Se,onMouseMove:At?null:se,role:"radio","aria-checked":Ht>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&&(we=jt(we,dt)),we}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,Ht=Gt===void 0?5:Gt,Yt=dt.allowHalf,Ut=Yt===void 0?!1:Yt,Vt=dt.allowClear,oe=Vt===void 0?!0:Vt,se=dt.keyboard,de=se===void 0?!0:se,Se=dt.character,Qt=Se===void 0?"\u2605":Se,ne=dt.characterRender,ye=dt.disabled,we=dt.direction,be=we===void 0?"ltr":we,fe=dt.tabIndex,pe=fe===void 0?0:fe,ce=dt.autoFocus,Ce=dt.onHoverChange,ve=dt.onChange,Fe=dt.onFocus,ge=dt.onBlur,xe=dt.onKeyDown,ee=dt.onMouseLeave,Kt=(0,zt.Z)(dt,at),wt=xt(),Lt=(0,ot.Z)(wt,2),Xt=Lt[0],re=Lt[1],It=St.useRef(null),Rt=function(){if(!ye){var cr;(cr=It.current)===null||cr===void 0||cr.focus()}};St.useImperativeHandle(Pt,function(){return{focus:Rt,blur:function(){if(!ye){var cr;(cr=It.current)===null||cr===void 0||cr.blur()}}}});var Wt=(0,gt.Z)(jt||0,{value:Nt}),te=(0,ot.Z)(Wt,2),ue=te[0],le=te[1],Ae=(0,gt.Z)(null),Le=(0,ot.Z)(Ae,2),Be=Le[0],tn=Le[1],$e=function(cr,jr){var $t=be==="rtl",$n=cr+1;if(Ut){var Zn=Xt(cr),Dr=tt(Zn),Vr=Zn.clientWidth;($t&&jr-Dr>Vr/2||!$t&&jr-Dr<Vr/2)&&($n-=.5)}return $n},Qe=function(cr){le(cr),ve==null||ve(cr)},Ze=St.useState(!1),Ge=(0,ot.Z)(Ze,2),We=Ge[0],Ke=Ge[1],nn=function(){Ke(!0),Fe==null||Fe()},hn=function(){Ke(!1),ge==null||ge()},un=St.useState(null),bn=(0,ot.Z)(un,2),Un=bn[0],Vn=bn[1],Yn=function(cr,jr){var $t=$e(jr,cr.pageX);$t!==Be&&(Vn($t),tn(null)),Ce==null||Ce($t)},vr=function(cr){ye||(Vn(null),tn(null),Ce==null||Ce(void 0)),cr&&(ee==null||ee(cr))},pr=function(cr,jr){var $t=$e(jr,cr.pageX),$n=!1;oe&&($n=$t===ue),vr(),Qe($n?0:$t),tn($n?$t:null)},gr=function(cr){var jr=cr.keyCode,$t=be==="rtl",$n=Ut?.5:1;de&&(jr===Et.Z.RIGHT&&ue<Ht&&!$t?(Qe(ue+$n),cr.preventDefault()):jr===Et.Z.LEFT&&ue>0&&!$t||jr===Et.Z.RIGHT&&ue>0&&$t?(Qe(ue-$n),cr.preventDefault()):jr===Et.Z.LEFT&&ue<Ht&&$t&&(Qe(ue+$n),cr.preventDefault())),xe==null||xe(cr)};St.useEffect(function(){ce&&!ye&&Rt()},[]);var Nr=new Array(Ht).fill(0).map(function(dr,cr){return St.createElement(mt,{ref:re(cr),index:cr,count:Ht,disabled:ye,prefixCls:"".concat(Dt,"-star"),allowHalf:Ut,value:Un===null?ue:Un,onClick:pr,onHover:Yn,key:dr||cr,character:Qt,characterRender:ne,focused:We})}),Lr=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:Lr,onMouseLeave:vr,tabIndex:ye?-1:pe,onFocus:ye?null:nn,onBlur:ye?null:hn,onKeyDown:ye?null:gr,ref:It},(0,Ct.Z)(Kt,{aria:!0,data:!0,attr:!0})),Nr)}var lt=St.forwardRef(it),ut=lt},69582:function(mn,gn,he){"use strict";he.d(gn,{ZP:function(){return gt}});var ae=he(52487),Re=he(59301),ot=he(47273),zt=0,Bt=(0,ot.Z)();function vt(){var Et;return Bt?(Et=zt,zt+=1):Et="TEST_OR_SSR",Et}function gt(Et){var Ct=Re.useState(),St=(0,ae.Z)(Ct,2),Tt=St[0],mt=St[1];return Re.useEffect(function(){mt("rc_select_".concat(vt()))},[]),Et||Tt}},45560:function(mn,gn,he){"use strict";he.d(gn,{Ac:function(){return Ze},Xo:function(){return We},Wx:function(){return nn},ZP:function(){return Nn},lk:function(){return ut}});var ae=he(72308),Re=he(80702),ot=he(49618),zt=he(77321),Bt=he(52487),vt=he(74416),gt=he(62853),Et=he(18929),Ct=he(48736),St=he(59301),Tt=he(92310),mt=he.n(Tt),xt=he(34280),ft=he(49658),z=he(8654),tt=function(Xe){var Dn=Xe.className,Oe=Xe.customizeIcon,ln=Xe.customizeIconProps,En=Xe.children,Gn=Xe.onMouseDown,sn=Xe.onClick,dn=typeof Oe=="function"?Oe(ln):Oe;return St.createElement("span",{className:Dn,onMouseDown:function(er){er.preventDefault(),Gn==null||Gn(er)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:sn,"aria-hidden":!0},dn!==void 0?dn:St.createElement("span",{className:mt()(Dn.split(/\s+/).map(function(An){return"".concat(An,"-icon")}))},En))},at=tt,it=function(Xe,Dn,Oe,ln,En){var Gn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,sn=arguments.length>6?arguments[6]:void 0,dn=arguments.length>7?arguments[7]:void 0,An=St.useMemo(function(){if((0,gt.Z)(ln)==="object")return ln.clearIcon;if(En)return En},[ln,En]),er=St.useMemo(function(){return!!(!Gn&&ln&&(Oe.length||sn)&&!(dn==="combobox"&&sn===""))},[ln,Gn,Oe.length,sn,dn]);return{allowClear:er,clearIcon:St.createElement(at,{className:"".concat(Xe,"-clear"),onMouseDown:Dn,customizeIcon:An},"\xD7")}},lt=St.createContext(null);function ut(){return St.useContext(lt)}function dt(){var en=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Xe=St.useState(!1),Dn=(0,Bt.Z)(Xe,2),Oe=Dn[0],ln=Dn[1],En=St.useRef(null),Gn=function(){window.clearTimeout(En.current)};St.useEffect(function(){return Gn},[]);var sn=function(An,er){Gn(),En.current=window.setTimeout(function(){ln(An),er&&er()},en)};return[Oe,sn,Gn]}function Pt(){var en=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Xe=St.useRef(null),Dn=St.useRef(null);St.useEffect(function(){return function(){window.clearTimeout(Dn.current)}},[]);function Oe(ln){(ln||Xe.current===null)&&(Xe.current=ln),window.clearTimeout(Dn.current),Dn.current=window.setTimeout(function(){Xe.current=null},en)}return[function(){return Xe.current},Oe]}function At(en,Xe,Dn,Oe){var ln=St.useRef(null);ln.current={open:Xe,triggerOpen:Dn,customizedTrigger:Oe},St.useEffect(function(){function En(Gn){var sn;if(!((sn=ln.current)!==null&&sn!==void 0&&sn.customizedTrigger)){var dn=Gn.target;dn.shadowRoot&&Gn.composed&&(dn=Gn.composedPath()[0]||dn),ln.current.open&&en().filter(function(An){return An}).every(function(An){return!An.contains(dn)&&An!==dn})&&ln.current.triggerOpen(!1)}}return window.addEventListener("mousedown",En),function(){return window.removeEventListener("mousedown",En)}},[])}var Dt=he(10228);function Ft(en){return en&&![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(en)}var jt=he(26112),Nt=he(11780),Gt=function(Xe,Dn){var Oe,ln=Xe.prefixCls,En=Xe.id,Gn=Xe.inputElement,sn=Xe.disabled,dn=Xe.tabIndex,An=Xe.autoFocus,er=Xe.autoComplete,ar=Xe.editable,Xn=Xe.activeDescendantId,In=Xe.value,Wn=Xe.maxLength,rr=Xe.onKeyDown,sr=Xe.onMouseDown,mr=Xe.onChange,cn=Xe.onPaste,Si=Xe.onCompositionStart,Rr=Xe.onCompositionEnd,pi=Xe.onBlur,an=Xe.open,Rn=Xe.attrs,nr=Gn||St.createElement("input",null),fr=nr,lr=fr.ref,Pr=fr.props,Xr=Pr.onKeyDown,zr=Pr.onChange,Kr=Pr.onMouseDown,Yr=Pr.onCompositionStart,wn=Pr.onCompositionEnd,ci=Pr.onBlur,Sn=Pr.style;return(0,Ct.Kp)(!("maxLength"in nr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),nr=St.cloneElement(nr,(0,zt.Z)((0,zt.Z)((0,zt.Z)({type:"search"},Pr),{},{id:En,ref:(0,z.sQ)(Dn,lr),disabled:sn,tabIndex:dn,autoComplete:er||"off",autoFocus:An,className:mt()("".concat(ln,"-selection-search-input"),(Oe=nr)===null||Oe===void 0||(Oe=Oe.props)===null||Oe===void 0?void 0:Oe.className),role:"combobox","aria-expanded":an||!1,"aria-haspopup":"listbox","aria-owns":"".concat(En,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(En,"_list"),"aria-activedescendant":an?Xn:void 0},Rn),{},{value:ar?In:"",maxLength:Wn,readOnly:!ar,unselectable:ar?null:"on",style:(0,zt.Z)((0,zt.Z)({},Sn),{},{opacity:ar?null:0}),onKeyDown:function(ni){rr(ni),Xr&&Xr(ni)},onMouseDown:function(ni){sr(ni),Kr&&Kr(ni)},onChange:function(ni){mr(ni),zr&&zr(ni)},onCompositionStart:function(ni){Si(ni),Yr&&Yr(ni)},onCompositionEnd:function(ni){Rr(ni),wn&&wn(ni)},onPaste:cn,onBlur:function(ni){pi(ni),ci&&ci(ni)}})),nr},Ht=St.forwardRef(Gt),Yt=Ht;function Ut(en){return Array.isArray(en)?en:en!==void 0?[en]:[]}var Vt=typeof window!="undefined"&&window.document&&window.document.documentElement,oe=Vt;function se(en){return en!=null}function de(en){return!en&&en!==0}function Se(en){return["string","number"].includes((0,gt.Z)(en))}function Qt(en){var Xe=void 0;return en&&(Se(en.title)?Xe=en.title.toString():Se(en.label)&&(Xe=en.label.toString())),Xe}function ne(en,Xe){oe?St.useLayoutEffect(en,Xe):St.useEffect(en,Xe)}function ye(en){var Xe;return(Xe=en.key)!==null&&Xe!==void 0?Xe:en.value}var we=function(Xe){Xe.preventDefault(),Xe.stopPropagation()},be=function(Xe){var Dn=Xe.id,Oe=Xe.prefixCls,ln=Xe.values,En=Xe.open,Gn=Xe.searchValue,sn=Xe.autoClearSearchValue,dn=Xe.inputRef,An=Xe.placeholder,er=Xe.disabled,ar=Xe.mode,Xn=Xe.showSearch,In=Xe.autoFocus,Wn=Xe.autoComplete,rr=Xe.activeDescendantId,sr=Xe.tabIndex,mr=Xe.removeIcon,cn=Xe.maxTagCount,Si=Xe.maxTagTextLength,Rr=Xe.maxTagPlaceholder,pi=Rr===void 0?function(Oi){return"+ ".concat(Oi.length," ...")}:Rr,an=Xe.tagRender,Rn=Xe.onToggleOpen,nr=Xe.onRemove,fr=Xe.onInputChange,lr=Xe.onInputPaste,Pr=Xe.onInputKeyDown,Xr=Xe.onInputMouseDown,zr=Xe.onInputCompositionStart,Kr=Xe.onInputCompositionEnd,Yr=Xe.onInputBlur,wn=St.useRef(null),ci=(0,St.useState)(0),Sn=(0,Bt.Z)(ci,2),Jr=Sn[0],ni=Sn[1],oi=(0,St.useState)(!1),Ui=(0,Bt.Z)(oi,2),ji=Ui[0],si=Ui[1],gi="".concat(Oe,"-selection"),Oo=En||ar==="multiple"&&sn===!1||ar==="tags"?Gn:"",Ci=ar==="tags"||ar==="multiple"&&sn===!1||Xn&&(En||ji);ne(function(){ni(wn.current.scrollWidth)},[Oo]);var or=function(ur,br,Zr,Br,ti){return St.createElement("span",{title:Qt(ur),className:mt()("".concat(gi,"-item"),(0,ot.Z)({},"".concat(gi,"-item-disabled"),Zr))},St.createElement("span",{className:"".concat(gi,"-item-content")},br),Br&&St.createElement(at,{className:"".concat(gi,"-item-remove"),onMouseDown:we,onClick:ti,customizeIcon:mr},"\xD7"))},Me=function(ur,br,Zr,Br,ti,eo){var Or=function(Mn){we(Mn),Rn(!En)};return St.createElement("span",{onMouseDown:Or},an({label:br,value:ur,disabled:Zr,closable:Br,onClose:ti,isMaxTag:!!eo}))},Ji=function(ur){var br=ur.disabled,Zr=ur.label,Br=ur.value,ti=!er&&!br,eo=Zr;if(typeof Si=="number"&&(typeof Zr=="string"||typeof Zr=="number")){var Or=String(eo);Or.length>Si&&(eo="".concat(Or.slice(0,Si),"..."))}var Er=function(xr){xr&&xr.stopPropagation(),nr(ur)};return typeof an=="function"?Me(Br,eo,br,ti,Er):or(ur,eo,br,ti,Er)},qr=function(ur){if(!ln.length)return null;var br=typeof pi=="function"?pi(ur):pi;return typeof an=="function"?Me(void 0,br,!1,!1,void 0,!0):or({title:br},br,!1)},_r=St.createElement("div",{className:"".concat(gi,"-search"),style:{width:Jr},onFocus:function(){si(!0)},onBlur:function(){si(!1)}},St.createElement(Yt,{ref:dn,open:En,prefixCls:Oe,id:Dn,inputElement:null,disabled:er,autoFocus:In,autoComplete:Wn,editable:Ci,activeDescendantId:rr,value:Oo,onKeyDown:Pr,onMouseDown:Xr,onChange:fr,onPaste:lr,onCompositionStart:zr,onCompositionEnd:Kr,onBlur:Yr,tabIndex:sr,attrs:(0,jt.Z)(Xe,!0)}),St.createElement("span",{ref:wn,className:"".concat(gi,"-search-mirror"),"aria-hidden":!0},Oo,"\xA0")),di=St.createElement(Nt.Z,{prefixCls:"".concat(gi,"-overflow"),data:ln,renderItem:Ji,renderRest:qr,suffix:_r,itemKey:ye,maxCount:cn});return St.createElement("span",{className:"".concat(gi,"-wrap")},di,!ln.length&&!Oo&&St.createElement("span",{className:"".concat(gi,"-placeholder")},An))},fe=be,pe=function(Xe){var Dn=Xe.inputElement,Oe=Xe.prefixCls,ln=Xe.id,En=Xe.inputRef,Gn=Xe.disabled,sn=Xe.autoFocus,dn=Xe.autoComplete,An=Xe.activeDescendantId,er=Xe.mode,ar=Xe.open,Xn=Xe.values,In=Xe.placeholder,Wn=Xe.tabIndex,rr=Xe.showSearch,sr=Xe.searchValue,mr=Xe.activeValue,cn=Xe.maxLength,Si=Xe.onInputKeyDown,Rr=Xe.onInputMouseDown,pi=Xe.onInputChange,an=Xe.onInputPaste,Rn=Xe.onInputCompositionStart,nr=Xe.onInputCompositionEnd,fr=Xe.onInputBlur,lr=Xe.title,Pr=St.useState(!1),Xr=(0,Bt.Z)(Pr,2),zr=Xr[0],Kr=Xr[1],Yr=er==="combobox",wn=Yr||rr,ci=Xn[0],Sn=sr||"";Yr&&mr&&!zr&&(Sn=mr),St.useEffect(function(){Yr&&Kr(!1)},[Yr,mr]);var Jr=er!=="combobox"&&!ar&&!rr?!1:!!Sn,ni=lr===void 0?Qt(ci):lr,oi=St.useMemo(function(){return ci?null:St.createElement("span",{className:"".concat(Oe,"-selection-placeholder"),style:Jr?{visibility:"hidden"}:void 0},In)},[ci,Jr,In,Oe]);return St.createElement("span",{className:"".concat(Oe,"-selection-wrap")},St.createElement("span",{className:"".concat(Oe,"-selection-search")},St.createElement(Yt,{ref:En,prefixCls:Oe,id:ln,open:ar,inputElement:Dn,disabled:Gn,autoFocus:sn,autoComplete:dn,editable:wn,activeDescendantId:An,value:Sn,onKeyDown:Si,onMouseDown:Rr,onChange:function(ji){Kr(!0),pi(ji)},onPaste:an,onCompositionStart:Rn,onCompositionEnd:nr,onBlur:fr,tabIndex:Wn,attrs:(0,jt.Z)(Xe,!0),maxLength:Yr?cn:void 0})),!Yr&&ci?St.createElement("span",{className:"".concat(Oe,"-selection-item"),title:ni,style:Jr?{visibility:"hidden"}:void 0},ci.label):null,oi)},ce=pe,Ce=function(Xe,Dn){var Oe=(0,St.useRef)(null),ln=(0,St.useRef)(!1),En=Xe.prefixCls,Gn=Xe.open,sn=Xe.mode,dn=Xe.showSearch,An=Xe.tokenWithEnter,er=Xe.disabled,ar=Xe.prefix,Xn=Xe.autoClearSearchValue,In=Xe.onSearch,Wn=Xe.onSearchSubmit,rr=Xe.onToggleOpen,sr=Xe.onInputKeyDown,mr=Xe.onInputBlur,cn=Xe.domRef;St.useImperativeHandle(Dn,function(){return{focus:function(ni){Oe.current.focus(ni)},blur:function(){Oe.current.blur()}}});var Si=Pt(0),Rr=(0,Bt.Z)(Si,2),pi=Rr[0],an=Rr[1],Rn=function(ni){var oi=ni.which,Ui=Oe.current instanceof HTMLTextAreaElement;!Ui&&Gn&&(oi===Dt.Z.UP||oi===Dt.Z.DOWN)&&ni.preventDefault(),sr&&sr(ni),oi===Dt.Z.ENTER&&sn==="tags"&&!ln.current&&!Gn&&(Wn==null||Wn(ni.target.value)),!(Ui&&!Gn&&~[Dt.Z.UP,Dt.Z.DOWN,Dt.Z.LEFT,Dt.Z.RIGHT].indexOf(oi))&&Ft(oi)&&rr(!0)},nr=function(){an(!0)},fr=(0,St.useRef)(null),lr=function(ni){In(ni,!0,ln.current)!==!1&&rr(!0)},Pr=function(){ln.current=!0},Xr=function(ni){ln.current=!1,sn!=="combobox"&&lr(ni.target.value)},zr=function(ni){var oi=ni.target.value;if(An&&fr.current&&/[\r\n]/.test(fr.current)){var Ui=fr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oi=oi.replace(Ui,fr.current)}fr.current=null,lr(oi)},Kr=function(ni){var oi=ni.clipboardData,Ui=oi==null?void 0:oi.getData("text");fr.current=Ui||""},Yr=function(ni){var oi=ni.target;if(oi!==Oe.current){var Ui=document.body.style.msTouchAction!==void 0;Ui?setTimeout(function(){Oe.current.focus()}):Oe.current.focus()}},wn=function(ni){var oi=pi();ni.target!==Oe.current&&!oi&&!(sn==="combobox"&&er)&&ni.preventDefault(),(sn!=="combobox"&&(!dn||!oi)||!Gn)&&(Gn&&Xn!==!1&&In("",!0,!1),rr())},ci={inputRef:Oe,onInputKeyDown:Rn,onInputMouseDown:nr,onInputChange:zr,onInputPaste:Kr,onInputCompositionStart:Pr,onInputCompositionEnd:Xr,onInputBlur:mr},Sn=sn==="multiple"||sn==="tags"?St.createElement(fe,(0,ae.Z)({},Xe,ci)):St.createElement(ce,(0,ae.Z)({},Xe,ci));return St.createElement("div",{ref:cn,className:"".concat(En,"-selector"),onClick:Yr,onMouseDown:wn},ar&&St.createElement("div",{className:"".concat(En,"-prefix")},ar),Sn)},ve=St.forwardRef(Ce),Fe=ve,ge=he(65352),xe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ee=function(Xe){var Dn=Xe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"}}},Kt=function(Xe,Dn){var Oe=Xe.prefixCls,ln=Xe.disabled,En=Xe.visible,Gn=Xe.children,sn=Xe.popupElement,dn=Xe.animation,An=Xe.transitionName,er=Xe.dropdownStyle,ar=Xe.dropdownClassName,Xn=Xe.direction,In=Xn===void 0?"ltr":Xn,Wn=Xe.placement,rr=Xe.builtinPlacements,sr=Xe.dropdownMatchSelectWidth,mr=Xe.dropdownRender,cn=Xe.dropdownAlign,Si=Xe.getPopupContainer,Rr=Xe.empty,pi=Xe.getTriggerDOMNode,an=Xe.onPopupVisibleChange,Rn=Xe.onPopupMouseEnter,nr=(0,vt.Z)(Xe,xe),fr="".concat(Oe,"-dropdown"),lr=sn;mr&&(lr=mr(sn));var Pr=St.useMemo(function(){return rr||ee(sr)},[rr,sr]),Xr=dn?"".concat(fr,"-").concat(dn):An,zr=typeof sr=="number",Kr=St.useMemo(function(){return zr?null:sr===!1?"minWidth":"width"},[sr,zr]),Yr=er;zr&&(Yr=(0,zt.Z)((0,zt.Z)({},Yr),{},{width:sr}));var wn=St.useRef(null);return St.useImperativeHandle(Dn,function(){return{getPopupElement:function(){var Sn;return(Sn=wn.current)===null||Sn===void 0?void 0:Sn.popupElement}}}),St.createElement(ge.Z,(0,ae.Z)({},nr,{showAction:an?["click"]:[],hideAction:an?["click"]:[],popupPlacement:Wn||(In==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Pr,prefixCls:fr,popupTransitionName:Xr,popup:St.createElement("div",{onMouseEnter:Rn},lr),ref:wn,stretch:Kr,popupAlign:cn,popupVisible:En,getPopupContainer:Si,popupClassName:mt()(ar,(0,ot.Z)({},"".concat(fr,"-empty"),Rr)),popupStyle:Yr,getTriggerDOMNode:pi,onPopupVisibleChange:an}),Gn)},wt=St.forwardRef(Kt),Lt=wt,Xt=he(68413);function re(en,Xe){var Dn=en.key,Oe;return"value"in en&&(Oe=en.value),Dn!=null?Dn:Oe!==void 0?Oe:"rc-index-key-".concat(Xe)}function It(en){return typeof en!="undefined"&&!Number.isNaN(en)}function Rt(en,Xe){var Dn=en||{},Oe=Dn.label,ln=Dn.value,En=Dn.options,Gn=Dn.groupLabel,sn=Oe||(Xe?"children":"label");return{label:sn,value:ln||"value",options:En||"options",groupLabel:Gn||sn}}function Wt(en){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dn=Xe.fieldNames,Oe=Xe.childrenAsData,ln=[],En=Rt(Dn,!1),Gn=En.label,sn=En.value,dn=En.options,An=En.groupLabel;function er(ar,Xn){Array.isArray(ar)&&ar.forEach(function(In){if(Xn||!(dn in In)){var Wn=In[sn];ln.push({key:re(In,ln.length),groupOption:Xn,data:In,label:In[Gn],value:Wn})}else{var rr=In[An];rr===void 0&&Oe&&(rr=In.label),ln.push({key:re(In,ln.length),group:!0,data:In,label:rr}),er(In[dn],!0)}})}return er(en,!1),ln}function te(en){var Xe=(0,zt.Z)({},en);return"props"in Xe||Object.defineProperty(Xe,"props",{get:function(){return(0,Ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Xe}}),Xe}var ue=function(Xe,Dn,Oe){if(!Dn||!Dn.length)return null;var ln=!1,En=function sn(dn,An){var er=(0,Xt.Z)(An),ar=er[0],Xn=er.slice(1);if(!ar)return[dn];var In=dn.split(ar);return ln=ln||In.length>1,In.reduce(function(Wn,rr){return[].concat((0,Re.Z)(Wn),(0,Re.Z)(sn(rr,Xn)))},[]).filter(Boolean)},Gn=En(Xe,Dn);return ln?typeof Oe!="undefined"?Gn.slice(0,Oe):Gn:null},le=St.createContext(null),Ae=le;function Le(en){var Xe=en.visible,Dn=en.values;if(!Xe)return null;var Oe=50;return St.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Dn.slice(0,Oe).map(function(ln){var En=ln.label,Gn=ln.value;return["number","string"].includes((0,gt.Z)(En))?En:Gn}).join(", ")),Dn.length>Oe?", ...":null)}var Be=["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"],tn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],$e=function(Xe){return Xe==="tags"||Xe==="multiple"},Qe=St.forwardRef(function(en,Xe){var Dn,Oe=en.id,ln=en.prefixCls,En=en.className,Gn=en.showSearch,sn=en.tagRender,dn=en.direction,An=en.omitDomProps,er=en.displayValues,ar=en.onDisplayValuesChange,Xn=en.emptyOptions,In=en.notFoundContent,Wn=In===void 0?"Not Found":In,rr=en.onClear,sr=en.mode,mr=en.disabled,cn=en.loading,Si=en.getInputElement,Rr=en.getRawInputElement,pi=en.open,an=en.defaultOpen,Rn=en.onDropdownVisibleChange,nr=en.activeValue,fr=en.onActiveValueChange,lr=en.activeDescendantId,Pr=en.searchValue,Xr=en.autoClearSearchValue,zr=en.onSearch,Kr=en.onSearchSplit,Yr=en.tokenSeparators,wn=en.allowClear,ci=en.prefix,Sn=en.suffixIcon,Jr=en.clearIcon,ni=en.OptionList,oi=en.animation,Ui=en.transitionName,ji=en.dropdownStyle,si=en.dropdownClassName,gi=en.dropdownMatchSelectWidth,Oo=en.dropdownRender,Ci=en.dropdownAlign,or=en.placement,Me=en.builtinPlacements,Ji=en.getPopupContainer,qr=en.showAction,_r=qr===void 0?[]:qr,di=en.onFocus,Oi=en.onBlur,ur=en.onKeyUp,br=en.onKeyDown,Zr=en.onMouseDown,Br=(0,vt.Z)(en,Be),ti=$e(sr),eo=(Gn!==void 0?Gn:ti)||sr==="combobox",Or=(0,zt.Z)({},Br);tn.forEach(function(Vi){delete Or[Vi]}),An==null||An.forEach(function(Vi){delete Or[Vi]});var Er=St.useState(!1),Mn=(0,Bt.Z)(Er,2),xr=Mn[0],yi=Mn[1];St.useEffect(function(){yi((0,ft.Z)())},[]);var Qi=St.useRef(null),Zi=St.useRef(null),Bi=St.useRef(null),no=St.useRef(null),Wi=St.useRef(null),qo=St.useRef(!1),Xo=dt(),Ja=(0,Bt.Z)(Xo,3),on=Ja[0],xo=Ja[1],Rl=Ja[2];St.useImperativeHandle(Xe,function(){var Vi,Li;return{focus:(Vi=no.current)===null||Vi===void 0?void 0:Vi.focus,blur:(Li=no.current)===null||Li===void 0?void 0:Li.blur,scrollTo:function(Da){var Uo;return(Uo=Wi.current)===null||Uo===void 0?void 0:Uo.scrollTo(Da)},nativeElement:Qi.current||Zi.current}});var oa=St.useMemo(function(){var Vi;if(sr!=="combobox")return Pr;var Li=(Vi=er[0])===null||Vi===void 0?void 0:Vi.value;return typeof Li=="string"||typeof Li=="number"?String(Li):""},[Pr,sr,er]),bl=sr==="combobox"&&typeof Si=="function"&&Si()||null,Hi=typeof Rr=="function"&&Rr(),Mu=(0,z.x1)(Zi,Hi==null||(Dn=Hi.props)===null||Dn===void 0?void 0:Dn.ref),_l=St.useState(!1),Xi=(0,Bt.Z)(_l,2),Ro=Xi[0],Pl=Xi[1];(0,xt.Z)(function(){Pl(!0)},[]);var pa=(0,Et.Z)(!1,{defaultValue:an,value:pi}),Ys=(0,Bt.Z)(pa,2),us=Ys[0],Ar=Ys[1],ta=Ro?us:!1,Tu=!Wn&&Xn;(mr||Tu&&ta&&sr==="combobox")&&(ta=!1);var Qa=Tu?!1:ta,mi=St.useCallback(function(Vi){var Li=Vi!==void 0?Vi:!ta;mr||(Ar(Li),ta!==Li&&(Rn==null||Rn(Li)))},[mr,ta,Ar,Rn]),Ti=St.useMemo(function(){return(Yr||[]).some(function(Vi){return[`
|
|
`,`\r
|
|
`].includes(Vi)})},[Yr]),jn=St.useContext(Ae)||{},Wr=jn.maxCount,vi=jn.rawValues,$i=function(Li,Ri,Da){if(!(ti&&It(Wr)&&(vi==null?void 0:vi.size)>=Wr)){var Uo=!0,aa=Li;fr==null||fr(null);var Cr=ue(Li,Yr,It(Wr)?Wr-vi.size:void 0),Ds=Da?null:Cr;return sr!=="combobox"&&Ds&&(aa="",Kr==null||Kr(Ds),mi(!1),Uo=!1),zr&&oa!==aa&&zr(aa,{source:Ri?"typing":"effect"}),Uo}},hs=function(Li){!Li||!Li.trim()||zr(Li,{source:"submit"})};St.useEffect(function(){!ta&&!ti&&sr!=="combobox"&&$i("",!1,!1)},[ta]),St.useEffect(function(){us&&mr&&Ar(!1),mr&&!qo.current&&xo(!1)},[mr]);var $a=Pt(),ei=(0,Bt.Z)($a,2),Yo=ei[0],Na=ei[1],Jo=St.useRef(!1),ja=function(Li){var Ri=Yo(),Da=Li.key,Uo=Da==="Enter";if(Uo&&(sr!=="combobox"&&Li.preventDefault(),ta||mi(!0)),Na(!!oa),Da==="Backspace"&&!Ri&&ti&&!oa&&er.length){for(var aa=(0,Re.Z)(er),Cr=null,Ds=aa.length-1;Ds>=0;Ds-=1){var Ue=aa[Ds];if(!Ue.disabled){aa.splice(Ds,1),Cr=Ue;break}}Cr&&ar(aa,{type:"remove",values:[Cr]})}for(var kn=arguments.length,Gl=new Array(kn>1?kn-1:0),Sh=1;Sh<kn;Sh++)Gl[Sh-1]=arguments[Sh];if(ta&&(!Uo||!Jo.current)){var Bs;Uo&&(Jo.current=!0),(Bs=Wi.current)===null||Bs===void 0||Bs.onKeyDown.apply(Bs,[Li].concat(Gl))}br==null||br.apply(void 0,[Li].concat(Gl))},Cl=function(Li){for(var Ri=arguments.length,Da=new Array(Ri>1?Ri-1:0),Uo=1;Uo<Ri;Uo++)Da[Uo-1]=arguments[Uo];if(ta){var aa;(aa=Wi.current)===null||aa===void 0||aa.onKeyUp.apply(aa,[Li].concat(Da))}Li.key==="Enter"&&(Jo.current=!1),ur==null||ur.apply(void 0,[Li].concat(Da))},Js=function(Li){var Ri=er.filter(function(Da){return Da!==Li});ar(Ri,{type:"remove",values:[Li]})},_o=function(){Jo.current=!1},cs=St.useRef(!1),gh=function(){xo(!0),mr||(di&&!cs.current&&di.apply(void 0,arguments),_r.includes("focus")&&mi(!0)),cs.current=!0},Zc=function(){qo.current=!0,xo(!1,function(){cs.current=!1,qo.current=!1,mi(!1)}),!mr&&(oa&&(sr==="tags"?zr(oa,{source:"submit"}):sr==="multiple"&&zr("",{source:"blur"})),Oi&&Oi.apply(void 0,arguments))},kl=[];St.useEffect(function(){return function(){kl.forEach(function(Vi){return clearTimeout(Vi)}),kl.splice(0,kl.length)}},[]);var Xc=function(Li){var Ri,Da=Li.target,Uo=(Ri=Bi.current)===null||Ri===void 0?void 0:Ri.getPopupElement();if(Uo&&Uo.contains(Da)){var aa=setTimeout(function(){var kn=kl.indexOf(aa);if(kn!==-1&&kl.splice(kn,1),Rl(),!xr&&!Uo.contains(document.activeElement)){var Gl;(Gl=no.current)===null||Gl===void 0||Gl.focus()}});kl.push(aa)}for(var Cr=arguments.length,Ds=new Array(Cr>1?Cr-1:0),Ue=1;Ue<Cr;Ue++)Ds[Ue-1]=arguments[Ue];Zr==null||Zr.apply(void 0,[Li].concat(Ds))},sc=St.useState({}),mh=(0,Bt.Z)(sc,2),zl=mh[1];function Fs(){zl({})}var vh;Hi&&(vh=function(Li){mi(Li)}),At(function(){var Vi;return[Qi.current,(Vi=Bi.current)===null||Vi===void 0?void 0:Vi.getPopupElement()]},Qa,mi,!!Hi);var lc=St.useMemo(function(){return(0,zt.Z)((0,zt.Z)({},en),{},{notFoundContent:Wn,open:ta,triggerOpen:Qa,id:Oe,showSearch:eo,multiple:ti,toggleOpen:mi})},[en,Wn,Qa,ta,Oe,eo,ti,mi]),uc=!!Sn||cn,Lo;uc&&(Lo=St.createElement(at,{className:mt()("".concat(ln,"-arrow"),(0,ot.Z)({},"".concat(ln,"-arrow-loading"),cn)),customizeIcon:Sn,customizeIconProps:{loading:cn,searchValue:oa,open:ta,focused:on,showSearch:eo}}));var Uf=function(){var Li;rr==null||rr(),(Li=no.current)===null||Li===void 0||Li.focus(),ar([],{type:"clear",values:er}),$i("",!1,!1)},hc=it(ln,Uf,er,wn,Jr,mr,oa,sr),yh=hc.allowClear,Lu=hc.clearIcon,Oa=St.createElement(ni,{ref:Wi}),Fa=mt()(ln,En,(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(ln,"-focused"),on),"".concat(ln,"-multiple"),ti),"".concat(ln,"-single"),!ti),"".concat(ln,"-allow-clear"),wn),"".concat(ln,"-show-arrow"),uc),"".concat(ln,"-disabled"),mr),"".concat(ln,"-loading"),cn),"".concat(ln,"-open"),ta),"".concat(ln,"-customize-input"),bl),"".concat(ln,"-show-search"),eo)),Go=St.createElement(Lt,{ref:Bi,disabled:mr,prefixCls:ln,visible:Qa,popupElement:Oa,animation:oi,transitionName:Ui,dropdownStyle:ji,dropdownClassName:si,direction:dn,dropdownMatchSelectWidth:gi,dropdownRender:Oo,dropdownAlign:Ci,placement:or,builtinPlacements:Me,getPopupContainer:Ji,empty:Xn,getTriggerDOMNode:function(Li){return Zi.current||Li},onPopupVisibleChange:vh,onPopupMouseEnter:Fs},Hi?St.cloneElement(Hi,{ref:Mu}):St.createElement(Fe,(0,ae.Z)({},en,{domRef:Zi,prefixCls:ln,inputElement:bl,ref:no,id:Oe,prefix:ci,showSearch:eo,autoClearSearchValue:Xr,mode:sr,activeDescendantId:lr,tagRender:sn,values:er,open:ta,onToggleOpen:mi,activeValue:nr,searchValue:oa,onSearch:$i,onSearchSubmit:hs,onRemove:Js,tokenWithEnter:Ti,onInputBlur:_o}))),Qo;return Hi?Qo=Go:Qo=St.createElement("div",(0,ae.Z)({className:Fa},Or,{ref:Qi,onMouseDown:Xc,onKeyDown:ja,onKeyUp:Cl,onFocus:gh,onBlur:Zc}),St.createElement(Le,{visible:on&&!ta,values:er}),Go,Lo,yh&&Lu),St.createElement(lt.Provider,{value:lc},Qo)}),Ze=Qe,Ge=function(){return null};Ge.isSelectOptGroup=!0;var We=Ge,Ke=function(){return null};Ke.isSelectOption=!0;var nn=Ke,hn=he(80547),un=he(2738),bn=he(45680);function Un(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Vn=["disabled","title","children","style","className"];function Yn(en){return typeof en=="string"||typeof en=="number"}var vr=function(Xe,Dn){var Oe=ut(),ln=Oe.prefixCls,En=Oe.id,Gn=Oe.open,sn=Oe.multiple,dn=Oe.mode,An=Oe.searchValue,er=Oe.toggleOpen,ar=Oe.notFoundContent,Xn=Oe.onPopupScroll,In=St.useContext(Ae),Wn=In.maxCount,rr=In.flattenOptions,sr=In.onActiveValue,mr=In.defaultActiveFirstOption,cn=In.onSelect,Si=In.menuItemSelectedIcon,Rr=In.rawValues,pi=In.fieldNames,an=In.virtual,Rn=In.direction,nr=In.listHeight,fr=In.listItemHeight,lr=In.optionRender,Pr="".concat(ln,"-item"),Xr=(0,hn.Z)(function(){return rr},[Gn,rr],function(qr,_r){return _r[0]&&qr[1]!==_r[1]}),zr=St.useRef(null),Kr=St.useMemo(function(){return sn&&It(Wn)&&(Rr==null?void 0:Rr.size)>=Wn},[sn,Wn,Rr==null?void 0:Rr.size]),Yr=function(_r){_r.preventDefault()},wn=function(_r){var di;(di=zr.current)===null||di===void 0||di.scrollTo(typeof _r=="number"?{index:_r}:_r)},ci=St.useCallback(function(qr){return dn==="combobox"?!1:Rr.has(qr)},[dn,(0,Re.Z)(Rr).toString(),Rr.size]),Sn=function(_r){for(var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oi=Xr.length,ur=0;ur<Oi;ur+=1){var br=(_r+ur*di+Oi)%Oi,Zr=Xr[br]||{},Br=Zr.group,ti=Zr.data;if(!Br&&!(ti!=null&&ti.disabled)&&(ci(ti.value)||!Kr))return br}return-1},Jr=St.useState(function(){return Sn(0)}),ni=(0,Bt.Z)(Jr,2),oi=ni[0],Ui=ni[1],ji=function(_r){var di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ui(_r);var Oi={source:di?"keyboard":"mouse"},ur=Xr[_r];if(!ur){sr(null,-1,Oi);return}sr(ur.value,_r,Oi)};(0,St.useEffect)(function(){ji(mr!==!1?Sn(0):-1)},[Xr.length,An]);var si=St.useCallback(function(qr){return dn==="combobox"?String(qr).toLowerCase()===An.toLowerCase():Rr.has(qr)},[dn,An,(0,Re.Z)(Rr).toString(),Rr.size]);(0,St.useEffect)(function(){var qr=setTimeout(function(){if(!sn&&Gn&&Rr.size===1){var di=Array.from(Rr)[0],Oi=Xr.findIndex(function(ur){var br=ur.data;return br.value===di});Oi!==-1&&(ji(Oi),wn(Oi))}});if(Gn){var _r;(_r=zr.current)===null||_r===void 0||_r.scrollTo(void 0)}return function(){return clearTimeout(qr)}},[Gn,An]);var gi=function(_r){_r!==void 0&&cn(_r,{selected:!Rr.has(_r)}),sn||er(!1)};if(St.useImperativeHandle(Dn,function(){return{onKeyDown:function(_r){var di=_r.which,Oi=_r.ctrlKey;switch(di){case Dt.Z.N:case Dt.Z.P:case Dt.Z.UP:case Dt.Z.DOWN:{var ur=0;if(di===Dt.Z.UP?ur=-1:di===Dt.Z.DOWN?ur=1:Un()&&Oi&&(di===Dt.Z.N?ur=1:di===Dt.Z.P&&(ur=-1)),ur!==0){var br=Sn(oi+ur,ur);wn(br),ji(br,!0)}break}case Dt.Z.TAB:case Dt.Z.ENTER:{var Zr,Br=Xr[oi];Br&&!(Br!=null&&(Zr=Br.data)!==null&&Zr!==void 0&&Zr.disabled)&&!Kr?gi(Br.value):gi(void 0),Gn&&_r.preventDefault();break}case Dt.Z.ESC:er(!1),Gn&&_r.stopPropagation()}},onKeyUp:function(){},scrollTo:function(_r){wn(_r)}}}),Xr.length===0)return St.createElement("div",{role:"listbox",id:"".concat(En,"_list"),className:"".concat(Pr,"-empty"),onMouseDown:Yr},ar);var Oo=Object.keys(pi).map(function(qr){return pi[qr]}),Ci=function(_r){return _r.label};function or(qr,_r){var di=qr.group;return{role:di?"presentation":"option",id:"".concat(En,"_list_").concat(_r)}}var Me=function(_r){var di=Xr[_r];if(!di)return null;var Oi=di.data||{},ur=Oi.value,br=di.group,Zr=(0,jt.Z)(Oi,!0),Br=Ci(di);return di?St.createElement("div",(0,ae.Z)({"aria-label":typeof Br=="string"&&!br?Br:null},Zr,{key:_r},or(di,_r),{"aria-selected":si(ur)}),ur):null},Ji={role:"listbox",id:"".concat(En,"_list")};return St.createElement(St.Fragment,null,an&&St.createElement("div",(0,ae.Z)({},Ji,{style:{height:0,width:0,overflow:"hidden"}}),Me(oi-1),Me(oi),Me(oi+1)),St.createElement(bn.Z,{itemKey:"key",ref:zr,data:Xr,height:nr,itemHeight:fr,fullHeight:!1,onMouseDown:Yr,onScroll:Xn,virtual:an,direction:Rn,innerProps:an?null:Ji},function(qr,_r){var di=qr.group,Oi=qr.groupOption,ur=qr.data,br=qr.label,Zr=qr.value,Br=ur.key;if(di){var ti,eo=(ti=ur.title)!==null&&ti!==void 0?ti:Yn(br)?br.toString():void 0;return St.createElement("div",{className:mt()(Pr,"".concat(Pr,"-group"),ur.className),title:eo},br!==void 0?br:Br)}var Or=ur.disabled,Er=ur.title,Mn=ur.children,xr=ur.style,yi=ur.className,Qi=(0,vt.Z)(ur,Vn),Zi=(0,un.Z)(Qi,Oo),Bi=ci(Zr),no=Or||!Bi&&Kr,Wi="".concat(Pr,"-option"),qo=mt()(Pr,Wi,yi,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(Wi,"-grouped"),Oi),"".concat(Wi,"-active"),oi===_r&&!no),"".concat(Wi,"-disabled"),no),"".concat(Wi,"-selected"),Bi)),Xo=Ci(qr),Ja=!Si||typeof Si=="function"||Bi,on=typeof Xo=="number"?Xo:Xo||Zr,xo=Yn(on)?on.toString():void 0;return Er!==void 0&&(xo=Er),St.createElement("div",(0,ae.Z)({},(0,jt.Z)(Zi),an?{}:or(qr,_r),{"aria-selected":si(Zr),className:qo,title:xo,onMouseMove:function(){oi===_r||no||ji(_r)},onClick:function(){no||gi(Zr)},style:xr}),St.createElement("div",{className:"".concat(Wi,"-content")},typeof lr=="function"?lr(qr,{index:_r}):on),St.isValidElement(Si)||Bi,Ja&&St.createElement(at,{className:"".concat(Pr,"-option-state"),customizeIcon:Si,customizeIconProps:{value:Zr,disabled:no,isSelected:Bi}},Bi?"\u2713":null))}))},pr=St.forwardRef(vr),gr=pr,Nr=function(en,Xe){var Dn=St.useRef({values:new Map,options:new Map}),Oe=St.useMemo(function(){var En=Dn.current,Gn=En.values,sn=En.options,dn=en.map(function(ar){if(ar.label===void 0){var Xn;return(0,zt.Z)((0,zt.Z)({},ar),{},{label:(Xn=Gn.get(ar.value))===null||Xn===void 0?void 0:Xn.label})}return ar}),An=new Map,er=new Map;return dn.forEach(function(ar){An.set(ar.value,ar),er.set(ar.value,Xe.get(ar.value)||sn.get(ar.value))}),Dn.current.values=An,Dn.current.options=er,dn},[en,Xe]),ln=St.useCallback(function(En){return Xe.get(En)||Dn.current.options.get(En)},[Xe]);return[Oe,ln]};function Lr(en,Xe){return Ut(en).join("").toUpperCase().includes(Xe)}var dr=function(en,Xe,Dn,Oe,ln){return St.useMemo(function(){if(!Dn||Oe===!1)return en;var En=Xe.options,Gn=Xe.label,sn=Xe.value,dn=[],An=typeof Oe=="function",er=Dn.toUpperCase(),ar=An?Oe:function(In,Wn){return ln?Lr(Wn[ln],er):Wn[En]?Lr(Wn[Gn!=="children"?Gn:"label"],er):Lr(Wn[sn],er)},Xn=An?function(In){return te(In)}:function(In){return In};return en.forEach(function(In){if(In[En]){var Wn=ar(Dn,Xn(In));if(Wn)dn.push(In);else{var rr=In[En].filter(function(sr){return ar(Dn,Xn(sr))});rr.length&&dn.push((0,zt.Z)((0,zt.Z)({},In),{},(0,ot.Z)({},En,rr)))}return}ar(Dn,Xn(In))&&dn.push(In)}),dn},[en,Oe,ln,Dn,Xe])},cr=he(69582),jr=he(11592),$t=["children","value"],$n=["children"];function Zn(en){var Xe=en,Dn=Xe.key,Oe=Xe.props,ln=Oe.children,En=Oe.value,Gn=(0,vt.Z)(Oe,$t);return(0,zt.Z)({key:Dn,value:En!==void 0?En:Dn,children:ln},Gn)}function Dr(en){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,jr.Z)(en).map(function(Dn,Oe){if(!St.isValidElement(Dn)||!Dn.type)return null;var ln=Dn,En=ln.type.isSelectOptGroup,Gn=ln.key,sn=ln.props,dn=sn.children,An=(0,vt.Z)(sn,$n);return Xe||!En?Zn(Dn):(0,zt.Z)((0,zt.Z)({key:"__RC_SELECT_GRP__".concat(Gn===null?Oe:Gn,"__"),label:Gn},An),{},{options:Dr(dn)})}).filter(function(Dn){return Dn})}var Vr=function(Xe,Dn,Oe,ln,En){return St.useMemo(function(){var Gn=Xe,sn=!Xe;sn&&(Gn=Dr(Dn));var dn=new Map,An=new Map,er=function(In,Wn,rr){rr&&typeof rr=="string"&&In.set(Wn[rr],Wn)},ar=function Xn(In){for(var Wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rr=0;rr<In.length;rr+=1){var sr=In[rr];!sr[Oe.options]||Wn?(dn.set(sr[Oe.value],sr),er(An,sr,Oe.label),er(An,sr,ln),er(An,sr,En)):Xn(sr[Oe.options],!0)}};return ar(Gn),{options:Gn,valueOptions:dn,labelOptions:An}},[Xe,Dn,Oe,ln,En])},Ur=Vr;function ai(en){var Xe=St.useRef();Xe.current=en;var Dn=St.useCallback(function(){return Xe.current.apply(Xe,arguments)},[]);return Dn}function qn(en){var Xe=en.mode,Dn=en.options,Oe=en.children,ln=en.backfill,En=en.allowClear,Gn=en.placeholder,sn=en.getInputElement,dn=en.showSearch,An=en.onSearch,er=en.defaultOpen,ar=en.autoFocus,Xn=en.labelInValue,In=en.value,Wn=en.inputValue,rr=en.optionLabelProp,sr=isMultiple(Xe),mr=dn!==void 0?dn:sr||Xe==="combobox",cn=Dn||convertChildrenToData(Oe);if(warning(Xe!=="tags"||cn.every(function(an){return!an.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Xe==="tags"||Xe==="combobox"){var Si=cn.some(function(an){return an.options?an.options.some(function(Rn){return typeof("value"in Rn?Rn.value:Rn.key)=="number"}):typeof("value"in an?an.value:an.key)=="number"});warning(!Si,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Xe!=="combobox"||!rr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Xe==="combobox"||!ln,"`backfill` only works with `combobox` mode."),warning(Xe==="combobox"||!sn,"`getInputElement` only work with `combobox` mode."),noteOnce(Xe!=="combobox"||!sn||!En||!Gn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),An&&!mr&&Xe!=="combobox"&&Xe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!er||ar,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),In!=null){var Rr=toArray(In);warning(!Xn||Rr.every(function(an){return _typeof(an)==="object"&&("key"in an||"value"in an)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!sr||Array.isArray(In),"`value` should be array when `mode` is `multiple` or `tags`")}if(Oe){var pi=null;toNodeArray(Oe).some(function(an){if(!React.isValidElement(an)||!an.type)return!1;var Rn=an,nr=Rn.type;if(nr.isSelectOption)return!1;if(nr.isSelectOptGroup){var fr=toNodeArray(an.props.children).every(function(lr){return!React.isValidElement(lr)||!an.type||lr.type.isSelectOption?!0:(pi=lr.type,!1)});return!fr}return pi=nr,!0}),pi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pi.displayName||pi.name||pi,"`.")),warning(Wn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function zn(en,Xe){if(en){var Dn=function Oe(ln){for(var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gn=0;Gn<ln.length;Gn++){var sn=ln[Gn];if(sn[Xe==null?void 0:Xe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!En&&Array.isArray(sn[Xe==null?void 0:Xe.options])&&Oe(sn[Xe==null?void 0:Xe.options],!0))break}};Dn(en)}}var Ye=null,Ve=["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"],He=["inputValue"];function Fn(en){return!en||(0,gt.Z)(en)!=="object"}var On=St.forwardRef(function(en,Xe){var Dn=en.id,Oe=en.mode,ln=en.prefixCls,En=ln===void 0?"rc-select":ln,Gn=en.backfill,sn=en.fieldNames,dn=en.inputValue,An=en.searchValue,er=en.onSearch,ar=en.autoClearSearchValue,Xn=ar===void 0?!0:ar,In=en.onSelect,Wn=en.onDeselect,rr=en.dropdownMatchSelectWidth,sr=rr===void 0?!0:rr,mr=en.filterOption,cn=en.filterSort,Si=en.optionFilterProp,Rr=en.optionLabelProp,pi=en.options,an=en.optionRender,Rn=en.children,nr=en.defaultActiveFirstOption,fr=en.menuItemSelectedIcon,lr=en.virtual,Pr=en.direction,Xr=en.listHeight,zr=Xr===void 0?200:Xr,Kr=en.listItemHeight,Yr=Kr===void 0?20:Kr,wn=en.labelRender,ci=en.value,Sn=en.defaultValue,Jr=en.labelInValue,ni=en.onChange,oi=en.maxCount,Ui=(0,vt.Z)(en,Ve),ji=(0,cr.ZP)(Dn),si=$e(Oe),gi=!!(!pi&&Rn),Oo=St.useMemo(function(){return mr===void 0&&Oe==="combobox"?!1:mr},[mr,Oe]),Ci=St.useMemo(function(){return Rt(sn,gi)},[JSON.stringify(sn),gi]),or=(0,Et.Z)("",{value:An!==void 0?An:dn,postState:function(Ti){return Ti||""}}),Me=(0,Bt.Z)(or,2),Ji=Me[0],qr=Me[1],_r=Ur(pi,Rn,Ci,Si,Rr),di=_r.valueOptions,Oi=_r.labelOptions,ur=_r.options,br=St.useCallback(function(mi){var Ti=Ut(mi);return Ti.map(function(jn){var Wr,vi,$i,hs,$a;if(Fn(jn))Wr=jn;else{var ei;$i=jn.key,vi=jn.label,Wr=(ei=jn.value)!==null&&ei!==void 0?ei:$i}var Yo=di.get(Wr);if(Yo){var Na;if(vi===void 0&&(vi=Yo==null?void 0:Yo[Rr||Ci.label]),$i===void 0&&($i=(Na=Yo==null?void 0:Yo.key)!==null&&Na!==void 0?Na:Wr),hs=Yo==null?void 0:Yo.disabled,$a=Yo==null?void 0:Yo.title,0)var Jo}return{label:vi,value:Wr,key:$i,disabled:hs,title:$a}})},[Ci,Rr,di]),Zr=(0,Et.Z)(Sn,{value:ci}),Br=(0,Bt.Z)(Zr,2),ti=Br[0],eo=Br[1],Or=St.useMemo(function(){var mi,Ti=si&&ti===null?[]:ti,jn=br(Ti);return Oe==="combobox"&&de((mi=jn[0])===null||mi===void 0?void 0:mi.value)?[]:jn},[ti,br,Oe,si]),Er=Nr(Or,di),Mn=(0,Bt.Z)(Er,2),xr=Mn[0],yi=Mn[1],Qi=St.useMemo(function(){if(!Oe&&xr.length===1){var mi=xr[0];if(mi.value===null&&(mi.label===null||mi.label===void 0))return[]}return xr.map(function(Ti){var jn;return(0,zt.Z)((0,zt.Z)({},Ti),{},{label:(jn=typeof wn=="function"?wn(Ti):Ti.label)!==null&&jn!==void 0?jn:Ti.value})})},[Oe,xr,wn]),Zi=St.useMemo(function(){return new Set(xr.map(function(mi){return mi.value}))},[xr]);St.useEffect(function(){if(Oe==="combobox"){var mi,Ti=(mi=xr[0])===null||mi===void 0?void 0:mi.value;qr(se(Ti)?String(Ti):"")}},[xr]);var Bi=ai(function(mi,Ti){var jn=Ti!=null?Ti:mi;return(0,ot.Z)((0,ot.Z)({},Ci.value,mi),Ci.label,jn)}),no=St.useMemo(function(){if(Oe!=="tags")return ur;var mi=(0,Re.Z)(ur),Ti=function(Wr){return di.has(Wr)};return(0,Re.Z)(xr).sort(function(jn,Wr){return jn.value<Wr.value?-1:1}).forEach(function(jn){var Wr=jn.value;Ti(Wr)||mi.push(Bi(Wr,jn.label))}),mi},[Bi,ur,di,xr,Oe]),Wi=dr(no,Ci,Ji,Oo,Si),qo=St.useMemo(function(){return Oe!=="tags"||!Ji||Wi.some(function(mi){return mi[Si||"value"]===Ji})||Wi.some(function(mi){return mi[Ci.value]===Ji})?Wi:[Bi(Ji)].concat((0,Re.Z)(Wi))},[Bi,Si,Oe,Wi,Ji,Ci]),Xo=function mi(Ti){var jn=(0,Re.Z)(Ti).sort(function(Wr,vi){return cn(Wr,vi,{searchValue:Ji})});return jn.map(function(Wr){return Array.isArray(Wr.options)?(0,zt.Z)((0,zt.Z)({},Wr),{},{options:Wr.options.length>0?mi(Wr.options):Wr.options}):Wr})},Ja=St.useMemo(function(){return cn?Xo(qo):qo},[qo,cn,Ji]),on=St.useMemo(function(){return Wt(Ja,{fieldNames:Ci,childrenAsData:gi})},[Ja,Ci,gi]),xo=function(Ti){var jn=br(Ti);if(eo(jn),ni&&(jn.length!==xr.length||jn.some(function($i,hs){var $a;return(($a=xr[hs])===null||$a===void 0?void 0:$a.value)!==($i==null?void 0:$i.value)}))){var Wr=Jr?jn:jn.map(function($i){return $i.value}),vi=jn.map(function($i){return te(yi($i.value))});ni(si?Wr:Wr[0],si?vi:vi[0])}},Rl=St.useState(null),oa=(0,Bt.Z)(Rl,2),bl=oa[0],Hi=oa[1],Mu=St.useState(0),_l=(0,Bt.Z)(Mu,2),Xi=_l[0],Ro=_l[1],Pl=nr!==void 0?nr:Oe!=="combobox",pa=St.useCallback(function(mi,Ti){var jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Wr=jn.source,vi=Wr===void 0?"keyboard":Wr;Ro(Ti),Gn&&Oe==="combobox"&&mi!==null&&vi==="keyboard"&&Hi(String(mi))},[Gn,Oe]),Ys=function(Ti,jn,Wr){var vi=function(){var Js,_o=yi(Ti);return[Jr?{label:_o==null?void 0:_o[Ci.label],value:Ti,key:(Js=_o==null?void 0:_o.key)!==null&&Js!==void 0?Js:Ti}:Ti,te(_o)]};if(jn&&In){var $i=vi(),hs=(0,Bt.Z)($i,2),$a=hs[0],ei=hs[1];In($a,ei)}else if(!jn&&Wn&&Wr!=="clear"){var Yo=vi(),Na=(0,Bt.Z)(Yo,2),Jo=Na[0],ja=Na[1];Wn(Jo,ja)}},us=ai(function(mi,Ti){var jn,Wr=si?Ti.selected:!0;Wr?jn=si?[].concat((0,Re.Z)(xr),[mi]):[mi]:jn=xr.filter(function(vi){return vi.value!==mi}),xo(jn),Ys(mi,Wr),Oe==="combobox"?Hi(""):(!$e||Xn)&&(qr(""),Hi(""))}),Ar=function(Ti,jn){xo(Ti);var Wr=jn.type,vi=jn.values;(Wr==="remove"||Wr==="clear")&&vi.forEach(function($i){Ys($i.value,!1,Wr)})},ta=function(Ti,jn){if(qr(Ti),Hi(null),jn.source==="submit"){var Wr=(Ti||"").trim();if(Wr){var vi=Array.from(new Set([].concat((0,Re.Z)(Zi),[Wr])));xo(vi),Ys(Wr,!0),qr("")}return}jn.source!=="blur"&&(Oe==="combobox"&&xo(Ti),er==null||er(Ti))},Tu=function(Ti){var jn=Ti;Oe!=="tags"&&(jn=Ti.map(function(vi){var $i=Oi.get(vi);return $i==null?void 0:$i.value}).filter(function(vi){return vi!==void 0}));var Wr=Array.from(new Set([].concat((0,Re.Z)(Zi),(0,Re.Z)(jn))));xo(Wr),Wr.forEach(function(vi){Ys(vi,!0)})},Qa=St.useMemo(function(){var mi=lr!==!1&&sr!==!1;return(0,zt.Z)((0,zt.Z)({},_r),{},{flattenOptions:on,onActiveValue:pa,defaultActiveFirstOption:Pl,onSelect:us,menuItemSelectedIcon:fr,rawValues:Zi,fieldNames:Ci,virtual:mi,direction:Pr,listHeight:zr,listItemHeight:Yr,childrenAsData:gi,maxCount:oi,optionRender:an})},[oi,_r,on,pa,Pl,us,fr,Zi,Ci,lr,sr,Pr,zr,Yr,gi,an]);return St.createElement(Ae.Provider,{value:Qa},St.createElement(Ze,(0,ae.Z)({},Ui,{id:ji,prefixCls:En,ref:Xe,omitDomProps:He,mode:Oe,displayValues:Qi,onDisplayValuesChange:Ar,direction:Pr,searchValue:Ji,onSearch:ta,autoClearSearchValue:Xn,onSearchSplit:Tu,dropdownMatchSelectWidth:sr,OptionList:gr,emptyOptions:!on.length,activeValue:bl,activeDescendantId:"".concat(ji,"_list_").concat(Xi)})))}),Qn=On;Qn.Option=nn,Qn.OptGroup=We;var yn=Qn,Nn=yn},63158:function(mn,gn,he){"use strict";var ae=he(72308),Re=he(49618),ot=he(52487),zt=he(74416),Bt=he(59301),vt=he(92310),gt=he.n(vt),Et=he(18929),Ct=he(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,zt.Z)(mt,St),Gt=(0,Et.Z)(!1,{value:it,defaultValue:lt}),Ht=(0,ot.Z)(Gt,2),Yt=Ht[0],Ut=Ht[1];function Vt(Se,Qt){var ne=Yt;return ut||(ne=Se,Ut(ne),Ft==null||Ft(ne,Qt)),ne}function oe(Se){Se.which===Ct.Z.LEFT?Vt(!1,Se):Se.which===Ct.Z.RIGHT&&Vt(!0,Se),jt==null||jt(Se)}function se(Se){var Qt=Vt(!Yt,Se);Dt==null||Dt(Qt,Se)}var de=gt()(tt,at,(ft={},(0,Re.Z)(ft,"".concat(tt,"-checked"),Yt),(0,Re.Z)(ft,"".concat(tt,"-disabled"),ut),ft));return Bt.createElement("button",(0,ae.Z)({},Nt,{type:"button",role:"switch","aria-checked":Yt,disabled:ut,className:de,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",gn.Z=Tt},22711:function(mn,gn,he){"use strict";he.r(gn),he.d(gn,{ResizableTextArea:function(){return Ht},default:function(){return oe}});var ae=he(72308),Re=he(49618),ot=he(77321),zt=he(80702),Bt=he(52487),vt=he(74416),gt=he(92310),Et=he.n(gt),Ct=he(36901),St=he(66003),Tt=he(30292),mt=he(18929),xt=he(59301),ft=he(62853),z=he(29301),tt=he(34280),at=he(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 de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=se.getAttribute("id")||se.getAttribute("data-reactid")||se.getAttribute("name");if(de&&ut[Se])return ut[Se];var Qt=window.getComputedStyle(se),ne=Qt.getPropertyValue("box-sizing")||Qt.getPropertyValue("-moz-box-sizing")||Qt.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(Qt.getPropertyValue("padding-bottom"))+parseFloat(Qt.getPropertyValue("padding-top")),we=parseFloat(Qt.getPropertyValue("border-bottom-width"))+parseFloat(Qt.getPropertyValue("border-top-width")),be=lt.map(function(pe){return"".concat(pe,":").concat(Qt.getPropertyValue(pe))}).join(";"),fe={sizingStyle:be,paddingSize:ye,borderSize:we,boxSizing:ne};return de&&Se&&(ut[Se]=fe),fe}function At(se){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Qt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;dt||(dt=document.createElement("textarea"),dt.setAttribute("tab-index","-1"),dt.setAttribute("aria-hidden","true"),dt.setAttribute("name","hiddenTextarea"),document.body.appendChild(dt)),se.getAttribute("wrap")?dt.setAttribute("wrap",se.getAttribute("wrap")):dt.removeAttribute("wrap");var ne=Pt(se,de),ye=ne.paddingSize,we=ne.borderSize,be=ne.boxSizing,fe=ne.sizingStyle;dt.setAttribute("style","".concat(fe,";").concat(it)),dt.value=se.value||se.placeholder||"";var pe=void 0,ce=void 0,Ce,ve=dt.scrollHeight;if(be==="border-box"?ve+=we:be==="content-box"&&(ve-=ye),Se!==null||Qt!==null){dt.value=" ";var Fe=dt.scrollHeight-ye;Se!==null&&(pe=Fe*Se,be==="border-box"&&(pe=pe+ye+we),ve=Math.max(pe,ve)),Qt!==null&&(ce=Fe*Qt,be==="border-box"&&(ce=ce+ye+we),Ce=ve>ce?"":"hidden",ve=Math.min(ce,ve))}var ge={height:ve,overflowY:Ce,resize:"none"};return pe&&(ge.minHeight=pe),ce&&(ge.maxHeight=ce),ge}var Dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ft=0,jt=1,Nt=2,Gt=xt.forwardRef(function(se,de){var Se=se,Qt=Se.prefixCls,ne=Se.defaultValue,ye=Se.value,we=Se.autoSize,be=Se.onResize,fe=Se.className,pe=Se.style,ce=Se.disabled,Ce=Se.onChange,ve=Se.onInternalAutoSize,Fe=(0,vt.Z)(Se,Dt),ge=(0,mt.Z)(ne,{value:ye,postState:function(bn){return bn!=null?bn:""}}),xe=(0,Bt.Z)(ge,2),ee=xe[0],Kt=xe[1],wt=function(bn){Kt(bn.target.value),Ce==null||Ce(bn)},Lt=xt.useRef();xt.useImperativeHandle(de,function(){return{textArea:Lt.current}});var Xt=xt.useMemo(function(){return we&&(0,ft.Z)(we)==="object"?[we.minRows,we.maxRows]:[]},[we]),re=(0,Bt.Z)(Xt,2),It=re[0],Rt=re[1],Wt=!!we,te=function(){try{if(document.activeElement===Lt.current){var bn=Lt.current,Un=bn.selectionStart,Vn=bn.selectionEnd,Yn=bn.scrollTop;Lt.current.setSelectionRange(Un,Vn),Lt.current.scrollTop=Yn}}catch(vr){}},ue=xt.useState(Nt),le=(0,Bt.Z)(ue,2),Ae=le[0],Le=le[1],Be=xt.useState(),tn=(0,Bt.Z)(Be,2),$e=tn[0],Qe=tn[1],Ze=function(){Le(Ft)};(0,tt.Z)(function(){Wt&&Ze()},[ye,It,Rt,Wt]),(0,tt.Z)(function(){if(Ae===Ft)Le(jt);else if(Ae===jt){var un=At(Lt.current,!1,It,Rt);Le(Nt),Qe(un)}else te()},[Ae]);var Ge=xt.useRef(),We=function(){at.Z.cancel(Ge.current)},Ke=function(bn){Ae===Nt&&(be==null||be(bn),we&&(We(),Ge.current=(0,at.Z)(function(){Ze()})))};xt.useEffect(function(){return We},[]);var nn=Wt?$e:null,hn=(0,ot.Z)((0,ot.Z)({},pe),nn);return(Ae===Ft||Ae===jt)&&(hn.overflowY="hidden",hn.overflowX="hidden"),xt.createElement(z.Z,{onResize:Ke,disabled:!(we||be)},xt.createElement("textarea",(0,ae.Z)({},Fe,{ref:Lt,style:hn,className:Et()(Qt,fe,(0,Re.Z)({},"".concat(Qt,"-disabled"),ce)),disabled:ce,value:ee,onChange:wt})))}),Ht=Gt,Yt=["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,de){var Se,Qt=se.defaultValue,ne=se.value,ye=se.onFocus,we=se.onBlur,be=se.onChange,fe=se.allowClear,pe=se.maxLength,ce=se.onCompositionStart,Ce=se.onCompositionEnd,ve=se.suffix,Fe=se.prefixCls,ge=Fe===void 0?"rc-textarea":Fe,xe=se.showCount,ee=se.count,Kt=se.className,wt=se.style,Lt=se.disabled,Xt=se.hidden,re=se.classNames,It=se.styles,Rt=se.onResize,Wt=se.onClear,te=se.onPressEnter,ue=se.readOnly,le=se.autoSize,Ae=se.onKeyDown,Le=(0,vt.Z)(se,Yt),Be=(0,mt.Z)(Qt,{value:ne,defaultValue:Qt}),tn=(0,Bt.Z)(Be,2),$e=tn[0],Qe=tn[1],Ze=$e==null?"":String($e),Ge=xt.useState(!1),We=(0,Bt.Z)(Ge,2),Ke=We[0],nn=We[1],hn=xt.useRef(!1),un=xt.useState(null),bn=(0,Bt.Z)(un,2),Un=bn[0],Vn=bn[1],Yn=(0,xt.useRef)(null),vr=(0,xt.useRef)(null),pr=function(){var en;return(en=vr.current)===null||en===void 0?void 0:en.textArea},gr=function(){pr().focus()};(0,xt.useImperativeHandle)(de,function(){var Nn;return{resizableTextArea:vr.current,focus:gr,blur:function(){pr().blur()},nativeElement:((Nn=Yn.current)===null||Nn===void 0?void 0:Nn.nativeElement)||pr()}}),(0,xt.useEffect)(function(){nn(function(Nn){return!Lt&&Nn})},[Lt]);var Nr=xt.useState(null),Lr=(0,Bt.Z)(Nr,2),dr=Lr[0],cr=Lr[1];xt.useEffect(function(){if(dr){var Nn;(Nn=pr()).setSelectionRange.apply(Nn,(0,zt.Z)(dr))}},[dr]);var jr=(0,St.Z)(ee,xe),$t=(Se=jr.max)!==null&&Se!==void 0?Se:pe,$n=Number($t)>0,Zn=jr.strategy(Ze),Dr=!!$t&&Zn>$t,Vr=function(en,Xe){var Dn=Xe;!hn.current&&jr.exceedFormatter&&jr.max&&jr.strategy(Xe)>jr.max&&(Dn=jr.exceedFormatter(Xe,{max:jr.max}),Xe!==Dn&&cr([pr().selectionStart||0,pr().selectionEnd||0])),Qe(Dn),(0,Tt.rJ)(en.currentTarget,en,be,Dn)},Ur=function(en){hn.current=!0,ce==null||ce(en)},ai=function(en){hn.current=!1,Vr(en,en.currentTarget.value),Ce==null||Ce(en)},qn=function(en){Vr(en,en.target.value)},zn=function(en){en.key==="Enter"&&te&&te(en),Ae==null||Ae(en)},Ye=function(en){nn(!0),ye==null||ye(en)},Ve=function(en){nn(!1),we==null||we(en)},He=function(en){Qe(""),gr(),(0,Tt.rJ)(pr(),en,be)},Fn=ve,On;jr.show&&(jr.showFormatter?On=jr.showFormatter({value:Ze,count:Zn,maxLength:$t}):On="".concat(Zn).concat($n?" / ".concat($t):""),Fn=xt.createElement(xt.Fragment,null,Fn,xt.createElement("span",{className:Et()("".concat(ge,"-data-count"),re==null?void 0:re.count),style:It==null?void 0:It.count},On)));var Qn=function(en){var Xe;Rt==null||Rt(en),(Xe=pr())!==null&&Xe!==void 0&&Xe.style.height&&Vn(!0)},yn=!le&&!xe&&!fe;return xt.createElement(Ct.BaseInput,{ref:Yn,value:Ze,allowClear:fe,handleReset:He,suffix:Fn,prefixCls:ge,classNames:(0,ot.Z)((0,ot.Z)({},re),{},{affixWrapper:Et()(re==null?void 0:re.affixWrapper,(0,Re.Z)((0,Re.Z)({},"".concat(ge,"-show-count"),xe),"".concat(ge,"-textarea-allow-clear"),fe))}),disabled:Lt,focused:Ke,className:Et()(Kt,Dr&&"".concat(ge,"-out-of-range")),style:(0,ot.Z)((0,ot.Z)({},wt),Un&&!yn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof On=="string"?On:void 0}},hidden:Xt,readOnly:ue,onClear:Wt},xt.createElement(Ht,(0,ae.Z)({},Le,{autoSize:le,maxLength:pe,onKeyDown:zn,onChange:qn,onFocus:Ye,onBlur:Ve,onCompositionStart:Ur,onCompositionEnd:ai,className:Et()(re==null?void 0:re.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:Qn,ref:vr,readOnly:ue})))}),Vt=Ut,oe=Vt},639:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ut}});var ae=he(72308),Re=he(49618),ot=he(77321),zt=he(52487),Bt=he(74416),vt=he(59301),gt=he(92310),Et=he.n(gt),Ct=he(26112),St=he(30699),Tt=function(Pt){for(var At=Pt.prefixCls,Dt=Pt.level,Ft=Pt.isStart,jt=Pt.isEnd,Nt="".concat(At,"-indent-unit"),Gt=[],Ht=0;Ht<Dt;Ht+=1)Gt.push(vt.createElement("span",{key:Ht,className:Et()(Nt,(0,Re.Z)((0,Re.Z)({},"".concat(Nt,"-start"),Ft[Ht]),"".concat(Nt,"-end"),jt[Ht]))}));return vt.createElement("span",{"aria-hidden":"true",className:"".concat(At,"-indent")},Gt)},mt=vt.memo(Tt),xt=he(65065),ft=he(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,Ht=Pt.dragOver,Yt=Pt.dragOverGapTop,Ut=Pt.dragOverGapBottom,Vt=Pt.isLeaf,oe=Pt.isStart,se=Pt.isEnd,de=Pt.expanded,Se=Pt.selected,Qt=Pt.checked,ne=Pt.halfChecked,ye=Pt.loading,we=Pt.domRef,be=Pt.active,fe=Pt.data,pe=Pt.onMouseMove,ce=Pt.selectable,Ce=(0,Bt.Z)(Pt,z),ve=vt.useContext(St.k),Fe=vt.useContext(St.y),ge=vt.useRef(null),xe=vt.useState(!1),ee=(0,zt.Z)(xe,2),Kt=ee[0],wt=ee[1],Lt=!!(ve.disabled||Pt.disabled||(At=Fe.nodeDisabled)!==null&&At!==void 0&&At.call(Fe,fe)),Xt=vt.useMemo(function(){return!ve.checkable||Pt.checkable===!1?!1:ve.checkable},[ve.checkable,Pt.checkable]),re=function(Zn){Lt||ve.onNodeSelect(Zn,(0,ft.F)(Pt))},It=function(Zn){Lt||!Xt||Pt.disableCheckbox||ve.onNodeCheck(Zn,(0,ft.F)(Pt),!Qt)},Rt=vt.useMemo(function(){return typeof ce=="boolean"?ce:ve.selectable},[ce,ve.selectable]),Wt=function(Zn){ve.onNodeClick(Zn,(0,ft.F)(Pt)),Rt?re(Zn):It(Zn)},te=function(Zn){ve.onNodeDoubleClick(Zn,(0,ft.F)(Pt))},ue=function(Zn){ve.onNodeMouseEnter(Zn,(0,ft.F)(Pt))},le=function(Zn){ve.onNodeMouseLeave(Zn,(0,ft.F)(Pt))},Ae=function(Zn){ve.onNodeContextMenu(Zn,(0,ft.F)(Pt))},Le=vt.useMemo(function(){return!!(ve.draggable&&(!ve.draggable.nodeDraggable||ve.draggable.nodeDraggable(fe)))},[ve.draggable,fe]),Be=function(Zn){Zn.stopPropagation(),wt(!0),ve.onNodeDragStart(Zn,Pt);try{Zn.dataTransfer.setData("text/plain","")}catch(Dr){}},tn=function(Zn){Zn.preventDefault(),Zn.stopPropagation(),ve.onNodeDragEnter(Zn,Pt)},$e=function(Zn){Zn.preventDefault(),Zn.stopPropagation(),ve.onNodeDragOver(Zn,Pt)},Qe=function(Zn){Zn.stopPropagation(),ve.onNodeDragLeave(Zn,Pt)},Ze=function(Zn){Zn.stopPropagation(),wt(!1),ve.onNodeDragEnd(Zn,Pt)},Ge=function(Zn){Zn.preventDefault(),Zn.stopPropagation(),wt(!1),ve.onNodeDrop(Zn,Pt)},We=function(Zn){ye||ve.onNodeExpand(Zn,(0,ft.F)(Pt))},Ke=vt.useMemo(function(){var $n=(0,xt.Z)(ve.keyEntities,jt)||{},Zn=$n.children;return!!(Zn||[]).length},[ve.keyEntities,jt]),nn=vt.useMemo(function(){return Vt===!1?!1:Vt||!ve.loadData&&!Ke||ve.loadData&&Pt.loaded&&!Ke},[Vt,ve.loadData,Ke,Pt.loaded]);vt.useEffect(function(){ye||typeof ve.loadData=="function"&&de&&!nn&&!Pt.loaded&&ve.onNodeLoad((0,ft.F)(Pt))},[ye,ve.loadData,ve.onNodeLoad,de,nn,Pt]);var hn=vt.useMemo(function(){var $n;return($n=ve.draggable)!==null&&$n!==void 0&&$n.icon?vt.createElement("span",{className:"".concat(ve.prefixCls,"-draggable-icon")},ve.draggable.icon):null},[ve.draggable]),un=function(Zn){var Dr=Pt.switcherIcon||ve.switcherIcon;return typeof Dr=="function"?Dr((0,ot.Z)((0,ot.Z)({},Pt),{},{isLeaf:Zn})):Dr},bn=function(){if(nn){var Zn=un(!0);return Zn!==!1?vt.createElement("span",{className:Et()("".concat(ve.prefixCls,"-switcher"),"".concat(ve.prefixCls,"-switcher-noop"))},Zn):null}var Dr=un(!1);return Dr!==!1?vt.createElement("span",{onClick:We,className:Et()("".concat(ve.prefixCls,"-switcher"),"".concat(ve.prefixCls,"-switcher_").concat(de?tt:at))},Dr):null},Un=vt.useMemo(function(){if(!Xt)return null;var $n=typeof Xt!="boolean"?Xt:null;return vt.createElement("span",{className:Et()("".concat(ve.prefixCls,"-checkbox"),(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(ve.prefixCls,"-checkbox-checked"),Qt),"".concat(ve.prefixCls,"-checkbox-indeterminate"),!Qt&&ne),"".concat(ve.prefixCls,"-checkbox-disabled"),Lt||Pt.disableCheckbox)),onClick:It,role:"checkbox","aria-checked":ne?"mixed":Qt,"aria-disabled":Lt||Pt.disableCheckbox,"aria-label":"Select ".concat(typeof Pt.title=="string"?Pt.title:"tree node")},$n)},[Xt,Qt,ne,Lt,Pt.disableCheckbox,Pt.title]),Vn=vt.useMemo(function(){return nn?null:de?tt:at},[nn,de]),Yn=vt.useMemo(function(){return vt.createElement("span",{className:Et()("".concat(ve.prefixCls,"-iconEle"),"".concat(ve.prefixCls,"-icon__").concat(Vn||"docu"),(0,Re.Z)({},"".concat(ve.prefixCls,"-icon_loading"),ye))})},[ve.prefixCls,Vn,ye]),vr=vt.useMemo(function(){var $n=!!ve.draggable,Zn=!Pt.disabled&&$n&&ve.dragOverNodeKey===jt;return Zn?ve.dropIndicatorRender({dropPosition:ve.dropPosition,dropLevelOffset:ve.dropLevelOffset,indent:ve.indent,prefixCls:ve.prefixCls,direction:ve.direction}):null},[ve.dropPosition,ve.dropLevelOffset,ve.indent,ve.prefixCls,ve.direction,ve.draggable,ve.dragOverNodeKey,ve.dropIndicatorRender]),pr=vt.useMemo(function(){var $n=Pt.title,Zn=$n===void 0?it:$n,Dr="".concat(ve.prefixCls,"-node-content-wrapper"),Vr;if(ve.showIcon){var Ur=Pt.icon||ve.icon;Vr=Ur?vt.createElement("span",{className:Et()("".concat(ve.prefixCls,"-iconEle"),"".concat(ve.prefixCls,"-icon__customize"))},typeof Ur=="function"?Ur(Pt):Ur):Yn}else ve.loadData&&ye&&(Vr=Yn);var ai;return typeof Zn=="function"?ai=Zn(fe):ve.titleRender?ai=ve.titleRender(fe):ai=Zn,vt.createElement("span",{ref:ge,title:typeof Zn=="string"?Zn:"",className:Et()(Dr,"".concat(Dr,"-").concat(Vn||"normal"),(0,Re.Z)({},"".concat(ve.prefixCls,"-node-selected"),!Lt&&(Se||Kt))),onMouseEnter:ue,onMouseLeave:le,onContextMenu:Ae,onClick:Wt,onDoubleClick:te},Vr,vt.createElement("span",{className:"".concat(ve.prefixCls,"-title")},ai),vr)},[ve.prefixCls,ve.showIcon,Pt,ve.icon,Yn,ve.titleRender,fe,Vn,ue,le,Ae,Wt,te]),gr=(0,Ct.Z)(Ce,{aria:!0,data:!0}),Nr=(0,xt.Z)(ve.keyEntities,jt)||{},Lr=Nr.level,dr=se[se.length-1],cr=!Lt&&Le,jr=ve.draggingNodeKey===jt,$t=ce!==void 0?{"aria-selected":!!ce}:void 0;return vt.createElement("div",(0,ae.Z)({ref:we,role:"treeitem","aria-expanded":Vt?void 0:de,className:Et()(Nt,"".concat(ve.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(ve.prefixCls,"-treenode-disabled"),Lt),"".concat(ve.prefixCls,"-treenode-switcher-").concat(de?"open":"close"),!Vt),"".concat(ve.prefixCls,"-treenode-checkbox-checked"),Qt),"".concat(ve.prefixCls,"-treenode-checkbox-indeterminate"),ne),"".concat(ve.prefixCls,"-treenode-selected"),Se),"".concat(ve.prefixCls,"-treenode-loading"),ye),"".concat(ve.prefixCls,"-treenode-active"),be),"".concat(ve.prefixCls,"-treenode-leaf-last"),dr),"".concat(ve.prefixCls,"-treenode-draggable"),Le),"dragging",jr),(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"drop-target",ve.dropTargetKey===jt),"drop-container",ve.dropContainerKey===jt),"drag-over",!Lt&&Ht),"drag-over-gap-top",!Lt&&Yt),"drag-over-gap-bottom",!Lt&&Ut),"filter-node",(Dt=ve.filterTreeNode)===null||Dt===void 0?void 0:Dt.call(ve,(0,ft.F)(Pt))),"".concat(ve.prefixCls,"-treenode-leaf"),nn))),style:Gt,draggable:cr,onDragStart:cr?Be:void 0,onDragEnter:Le?tn:void 0,onDragOver:Le?$e:void 0,onDragLeave:Le?Qe:void 0,onDrop:Le?Ge:void 0,onDragEnd:Le?Ze:void 0,onMouseMove:pe},$t,gr),vt.createElement(mt,{prefixCls:ve.prefixCls,level:Lr,isStart:oe,isEnd:se}),hn,bn(),Un,pr)};lt.isTreeNode=1;var ut=lt},30699:function(mn,gn,he){"use strict";he.d(gn,{k:function(){return Re},y:function(){return ot}});var ae=he(59301),Re=ae.createContext(null),ot=ae.createContext({})},15018:function(mn,gn,he){"use strict";he.d(gn,{OF:function(){return jt.Z},y6:function(){return at.y},ZP:function(){return Lt}});var ae=he(72308),Re=he(62853),ot=he(77321),zt=he(80702),Bt=he(96949),vt=he(55090),gt=he(80237),Et=he(77205),Ct=he(38793),St=he(49618),Tt=he(92310),mt=he.n(Tt),xt=he(10228),ft=he(26112),z=he(48736),tt=he(59301),at=he(30699),it=function(re){var It=re.dropPosition,Rt=re.dropLevelOffset,Wt=re.indent,te={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(It){case-1:te.top=0,te.left=-Rt*Wt;break;case 1:te.bottom=0,te.left=-Rt*Wt;break;case 0:te.bottom=0,te.left=Wt;break}return tt.createElement("div",{style:te})},lt=it;function ut(Xt){if(Xt==null)throw new TypeError("Cannot destructure "+Xt)}var dt=he(52487),Pt=he(74416),At=he(34280),Dt=he(45680),Ft=he(77900),jt=he(639);function Nt(Xt,re){var It=tt.useState(!1),Rt=(0,dt.Z)(It,2),Wt=Rt[0],te=Rt[1];(0,At.Z)(function(){if(Wt)return Xt(),function(){re()}},[Wt]),(0,At.Z)(function(){return te(!0),function(){te(!1)}},[])}var Gt=Nt,Ht=he(34061),Yt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ut=tt.forwardRef(function(Xt,re){var It=Xt.className,Rt=Xt.style,Wt=Xt.motion,te=Xt.motionNodes,ue=Xt.motionType,le=Xt.onMotionStart,Ae=Xt.onMotionEnd,Le=Xt.active,Be=Xt.treeNodeRequiredProps,tn=(0,Pt.Z)(Xt,Yt),$e=tt.useState(!0),Qe=(0,dt.Z)($e,2),Ze=Qe[0],Ge=Qe[1],We=tt.useContext(at.k),Ke=We.prefixCls,nn=te&&ue!=="hide";(0,At.Z)(function(){te&&nn!==Ze&&Ge(nn)},[te]);var hn=function(){te&&le()},un=tt.useRef(!1),bn=function(){te&&!un.current&&(un.current=!0,Ae())};Gt(hn,bn);var Un=function(Yn){nn===Yn&&bn()};return te?tt.createElement(Ft.default,(0,ae.Z)({ref:re,visible:Ze},Wt,{motionAppear:ue==="show",onVisibleChanged:Un}),function(Vn,Yn){var vr=Vn.className,pr=Vn.style;return tt.createElement("div",{ref:Yn,className:mt()("".concat(Ke,"-treenode-motion"),vr),style:pr},te.map(function(gr){var Nr=Object.assign({},(ut(gr.data),gr.data)),Lr=gr.title,dr=gr.key,cr=gr.isStart,jr=gr.isEnd;delete Nr.children;var $t=(0,Ht.H8)(dr,Be);return tt.createElement(jt.Z,(0,ae.Z)({},Nr,$t,{title:Lr,active:Le,data:gr.data,key:dr,isStart:cr,isEnd:jr}))}))}):tt.createElement(jt.Z,(0,ae.Z)({domRef:re,className:It,style:Rt},tn,{active:Le}))}),Vt=Ut;function oe(){var Xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],It=Xt.length,Rt=re.length;if(Math.abs(It-Rt)!==1)return{add:!1,key:null};function Wt(te,ue){var le=new Map;te.forEach(function(Le){le.set(Le,!0)});var Ae=ue.filter(function(Le){return!le.has(Le)});return Ae.length===1?Ae[0]:null}return It<Rt?{add:!0,key:Wt(Xt,re)}:{add:!1,key:Wt(re,Xt)}}function se(Xt,re,It){var Rt=Xt.findIndex(function(le){return le.key===It}),Wt=Xt[Rt+1],te=re.findIndex(function(le){return le.key===It});if(Wt){var ue=re.findIndex(function(le){return le.key===Wt.key});return re.slice(te+1,ue)}return re.slice(te+1)}var de=["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"],Se={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Qt=function(){},ne="RC_TREE_MOTION_".concat(Math.random()),ye={key:ne},we={key:ne,level:0,index:0,pos:"0",node:ye,nodes:[ye]},be={parent:null,children:[],pos:we.pos,data:ye,title:null,key:ne,isStart:[],isEnd:[]};function fe(Xt,re,It,Rt){return re===!1||!It?Xt:Xt.slice(0,Math.ceil(It/Rt)+1)}function pe(Xt){var re=Xt.key,It=Xt.pos;return(0,Ht.km)(re,It)}function ce(Xt){for(var re=String(Xt.data.key),It=Xt;It.parent;)It=It.parent,re="".concat(It.data.key," > ").concat(re);return re}var Ce=tt.forwardRef(function(Xt,re){var It=Xt.prefixCls,Rt=Xt.data,Wt=Xt.selectable,te=Xt.checkable,ue=Xt.expandedKeys,le=Xt.selectedKeys,Ae=Xt.checkedKeys,Le=Xt.loadedKeys,Be=Xt.loadingKeys,tn=Xt.halfCheckedKeys,$e=Xt.keyEntities,Qe=Xt.disabled,Ze=Xt.dragging,Ge=Xt.dragOverNodeKey,We=Xt.dropPosition,Ke=Xt.motion,nn=Xt.height,hn=Xt.itemHeight,un=Xt.virtual,bn=Xt.scrollWidth,Un=Xt.focusable,Vn=Xt.activeItem,Yn=Xt.focused,vr=Xt.tabIndex,pr=Xt.onKeyDown,gr=Xt.onFocus,Nr=Xt.onBlur,Lr=Xt.onActiveChange,dr=Xt.onListChangeStart,cr=Xt.onListChangeEnd,jr=(0,Pt.Z)(Xt,de),$t=tt.useRef(null),$n=tt.useRef(null);tt.useImperativeHandle(re,function(){return{scrollTo:function(er){$t.current.scrollTo(er)},getIndentWidth:function(){return $n.current.offsetWidth}}});var Zn=tt.useState(ue),Dr=(0,dt.Z)(Zn,2),Vr=Dr[0],Ur=Dr[1],ai=tt.useState(Rt),qn=(0,dt.Z)(ai,2),zn=qn[0],Ye=qn[1],Ve=tt.useState(Rt),He=(0,dt.Z)(Ve,2),Fn=He[0],On=He[1],Qn=tt.useState([]),yn=(0,dt.Z)(Qn,2),Nn=yn[0],en=yn[1],Xe=tt.useState(null),Dn=(0,dt.Z)(Xe,2),Oe=Dn[0],ln=Dn[1],En=tt.useRef(Rt);En.current=Rt;function Gn(){var An=En.current;Ye(An),On(An),en([]),ln(null),cr()}(0,At.Z)(function(){Ur(ue);var An=oe(Vr,ue);if(An.key!==null)if(An.add){var er=zn.findIndex(function(sr){var mr=sr.key;return mr===An.key}),ar=fe(se(zn,Rt,An.key),un,nn,hn),Xn=zn.slice();Xn.splice(er+1,0,be),On(Xn),en(ar),ln("show")}else{var In=Rt.findIndex(function(sr){var mr=sr.key;return mr===An.key}),Wn=fe(se(Rt,zn,An.key),un,nn,hn),rr=Rt.slice();rr.splice(In+1,0,be),On(rr),en(Wn),ln("hide")}else zn!==Rt&&(Ye(Rt),On(Rt))},[ue,Rt]),tt.useEffect(function(){Ze||Gn()},[Ze]);var sn=Ke?Fn:Rt,dn={expandedKeys:ue,selectedKeys:le,loadedKeys:Le,loadingKeys:Be,checkedKeys:Ae,halfCheckedKeys:tn,dragOverNodeKey:Ge,dropPosition:We,keyEntities:$e};return tt.createElement(tt.Fragment,null,Yn&&Vn&&tt.createElement("span",{style:Se,"aria-live":"assertive"},ce(Vn)),tt.createElement("div",null,tt.createElement("input",{style:Se,disabled:Un===!1||Qe,tabIndex:Un!==!1?vr:null,onKeyDown:pr,onFocus:gr,onBlur:Nr,value:"",onChange:Qt,"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:$n,className:"".concat(It,"-indent-unit")}))),tt.createElement(Dt.Z,(0,ae.Z)({},jr,{data:sn,itemKey:pe,height:nn,fullHeight:!1,virtual:un,itemHeight:hn,scrollWidth:bn,prefixCls:"".concat(It,"-list"),ref:$t,role:"tree",onVisibleChange:function(er){er.every(function(ar){return pe(ar)!==ne})&&Gn()}}),function(An){var er=An.pos,ar=Object.assign({},(ut(An.data),An.data)),Xn=An.title,In=An.key,Wn=An.isStart,rr=An.isEnd,sr=(0,Ht.km)(In,er);delete ar.key,delete ar.children;var mr=(0,Ht.H8)(sr,dn);return tt.createElement(Vt,(0,ae.Z)({},ar,mr,{title:Xn,active:!!Vn&&In===Vn.key,pos:er,data:An.data,isStart:Wn,isEnd:rr,motion:Ke,motionNodes:In===ne?Nn:null,motionType:Oe,onMotionStart:dr,onMotionEnd:Gn,treeNodeRequiredProps:dn,onMouseMove:function(){Lr(null)}}))}))}),ve=Ce,Fe=he(82661),ge=he(34643),xe=he(65065),ee=10,Kt=function(Xt){(0,Et.Z)(It,Xt);var re=(0,Ct.Z)(It);function It(){var Rt;(0,Bt.Z)(this,It);for(var Wt=arguments.length,te=new Array(Wt),ue=0;ue<Wt;ue++)te[ue]=arguments[ue];return Rt=re.call.apply(re,[this].concat(te)),(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,Ht.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(le,Ae){var Le=Rt.state,Be=Le.expandedKeys,tn=Le.keyEntities,$e=Rt.props.onDragStart,Qe=Ae.eventKey;Rt.dragNodeProps=Ae,Rt.dragStartMousePosition={x:le.clientX,y:le.clientY};var Ze=(0,Fe._5)(Be,Qe);Rt.setState({draggingNodeKey:Qe,dragChildrenKeys:(0,Fe.wA)(Qe,tn),indent:Rt.listRef.current.getIndentWidth()}),Rt.setExpandedKeys(Ze),window.addEventListener("dragend",Rt.onWindowDragEnd),$e==null||$e({event:le,node:(0,Ht.F)(Ae)})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnter",function(le,Ae){var Le=Rt.state,Be=Le.expandedKeys,tn=Le.keyEntities,$e=Le.dragChildrenKeys,Qe=Le.flattenNodes,Ze=Le.indent,Ge=Rt.props,We=Ge.onDragEnter,Ke=Ge.onExpand,nn=Ge.allowDrop,hn=Ge.direction,un=Ae.pos,bn=Ae.eventKey;if(Rt.currentMouseOverDroppableNodeKey!==bn&&(Rt.currentMouseOverDroppableNodeKey=bn),!Rt.dragNodeProps){Rt.resetDragState();return}var Un=(0,Fe.OM)(le,Rt.dragNodeProps,Ae,Ze,Rt.dragStartMousePosition,nn,Qe,tn,Be,hn),Vn=Un.dropPosition,Yn=Un.dropLevelOffset,vr=Un.dropTargetKey,pr=Un.dropContainerKey,gr=Un.dropTargetPos,Nr=Un.dropAllowed,Lr=Un.dragOverNodeKey;if($e.includes(vr)||!Nr){Rt.resetDragState();return}if(Rt.delayedDragEnterLogic||(Rt.delayedDragEnterLogic={}),Object.keys(Rt.delayedDragEnterLogic).forEach(function(dr){clearTimeout(Rt.delayedDragEnterLogic[dr])}),Rt.dragNodeProps.eventKey!==Ae.eventKey&&(le.persist(),Rt.delayedDragEnterLogic[un]=window.setTimeout(function(){if(Rt.state.draggingNodeKey!==null){var dr=(0,zt.Z)(Be),cr=(0,xe.Z)(tn,Ae.eventKey);cr&&(cr.children||[]).length&&(dr=(0,Fe.L0)(Be,Ae.eventKey)),Rt.props.hasOwnProperty("expandedKeys")||Rt.setExpandedKeys(dr),Ke==null||Ke(dr,{node:(0,Ht.F)(Ae),expanded:!0,nativeEvent:le.nativeEvent})}},800)),Rt.dragNodeProps.eventKey===vr&&Yn===0){Rt.resetDragState();return}Rt.setState({dragOverNodeKey:Lr,dropPosition:Vn,dropLevelOffset:Yn,dropTargetKey:vr,dropContainerKey:pr,dropTargetPos:gr,dropAllowed:Nr}),We==null||We({event:le,node:(0,Ht.F)(Ae),expandedKeys:Be})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragOver",function(le,Ae){var Le=Rt.state,Be=Le.dragChildrenKeys,tn=Le.flattenNodes,$e=Le.keyEntities,Qe=Le.expandedKeys,Ze=Le.indent,Ge=Rt.props,We=Ge.onDragOver,Ke=Ge.allowDrop,nn=Ge.direction;if(Rt.dragNodeProps){var hn=(0,Fe.OM)(le,Rt.dragNodeProps,Ae,Ze,Rt.dragStartMousePosition,Ke,tn,$e,Qe,nn),un=hn.dropPosition,bn=hn.dropLevelOffset,Un=hn.dropTargetKey,Vn=hn.dropContainerKey,Yn=hn.dropTargetPos,vr=hn.dropAllowed,pr=hn.dragOverNodeKey;Be.includes(Un)||!vr||(Rt.dragNodeProps.eventKey===Un&&bn===0?Rt.state.dropPosition===null&&Rt.state.dropLevelOffset===null&&Rt.state.dropTargetKey===null&&Rt.state.dropContainerKey===null&&Rt.state.dropTargetPos===null&&Rt.state.dropAllowed===!1&&Rt.state.dragOverNodeKey===null||Rt.resetDragState():un===Rt.state.dropPosition&&bn===Rt.state.dropLevelOffset&&Un===Rt.state.dropTargetKey&&Vn===Rt.state.dropContainerKey&&Yn===Rt.state.dropTargetPos&&vr===Rt.state.dropAllowed&&pr===Rt.state.dragOverNodeKey||Rt.setState({dropPosition:un,dropLevelOffset:bn,dropTargetKey:Un,dropContainerKey:Vn,dropTargetPos:Yn,dropAllowed:vr,dragOverNodeKey:pr}),We==null||We({event:le,node:(0,Ht.F)(Ae)}))}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragLeave",function(le,Ae){Rt.currentMouseOverDroppableNodeKey===Ae.eventKey&&!le.currentTarget.contains(le.relatedTarget)&&(Rt.resetDragState(),Rt.currentMouseOverDroppableNodeKey=null);var Le=Rt.props.onDragLeave;Le==null||Le({event:le,node:(0,Ht.F)(Ae)})}),(0,St.Z)((0,gt.Z)(Rt),"onWindowDragEnd",function(le){Rt.onNodeDragEnd(le,null,!0),window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnd",function(le,Ae){var Le=Rt.props.onDragEnd;Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Le==null||Le({event:le,node:(0,Ht.F)(Ae)}),Rt.dragNodeProps=null,window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDrop",function(le,Ae){var Le,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tn=Rt.state,$e=tn.dragChildrenKeys,Qe=tn.dropPosition,Ze=tn.dropTargetKey,Ge=tn.dropTargetPos,We=tn.dropAllowed;if(We){var Ke=Rt.props.onDrop;if(Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Ze!==null){var nn=(0,ot.Z)((0,ot.Z)({},(0,Ht.H8)(Ze,Rt.getTreeNodeRequiredProps())),{},{active:((Le=Rt.getActiveItem())===null||Le===void 0?void 0:Le.key)===Ze,data:(0,xe.Z)(Rt.state.keyEntities,Ze).node}),hn=$e.includes(Ze);(0,z.ZP)(!hn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var un=(0,Fe.yx)(Ge),bn={event:le,node:(0,Ht.F)(nn),dragNode:Rt.dragNodeProps?(0,Ht.F)(Rt.dragNodeProps):null,dragNodesKeys:[Rt.dragNodeProps.eventKey].concat($e),dropToGap:Qe!==0,dropPosition:Qe+Number(un[un.length-1])};Be||Ke==null||Ke(bn),Rt.dragNodeProps=null}}}),(0,St.Z)((0,gt.Z)(Rt),"cleanDragState",function(){var le=Rt.state.draggingNodeKey;le!==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(le,Ae){var Le=Rt.state,Be=Le.expandedKeys,tn=Le.flattenNodes,$e=Ae.expanded,Qe=Ae.key,Ze=Ae.isLeaf;if(!(Ze||le.shiftKey||le.metaKey||le.ctrlKey)){var Ge=tn.filter(function(Ke){return Ke.key===Qe})[0],We=(0,Ht.F)((0,ot.Z)((0,ot.Z)({},(0,Ht.H8)(Qe,Rt.getTreeNodeRequiredProps())),{},{data:Ge.data}));Rt.setExpandedKeys($e?(0,Fe._5)(Be,Qe):(0,Fe.L0)(Be,Qe)),Rt.onNodeExpand(le,We)}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeClick",function(le,Ae){var Le=Rt.props,Be=Le.onClick,tn=Le.expandAction;tn==="click"&&Rt.triggerExpandActionExpand(le,Ae),Be==null||Be(le,Ae)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDoubleClick",function(le,Ae){var Le=Rt.props,Be=Le.onDoubleClick,tn=Le.expandAction;tn==="doubleClick"&&Rt.triggerExpandActionExpand(le,Ae),Be==null||Be(le,Ae)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeSelect",function(le,Ae){var Le=Rt.state.selectedKeys,Be=Rt.state,tn=Be.keyEntities,$e=Be.fieldNames,Qe=Rt.props,Ze=Qe.onSelect,Ge=Qe.multiple,We=Ae.selected,Ke=Ae[$e.key],nn=!We;nn?Ge?Le=(0,Fe.L0)(Le,Ke):Le=[Ke]:Le=(0,Fe._5)(Le,Ke);var hn=Le.map(function(un){var bn=(0,xe.Z)(tn,un);return bn?bn.node:null}).filter(Boolean);Rt.setUncontrolledState({selectedKeys:Le}),Ze==null||Ze(Le,{event:"select",selected:nn,node:Ae,selectedNodes:hn,nativeEvent:le.nativeEvent})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeCheck",function(le,Ae,Le){var Be=Rt.state,tn=Be.keyEntities,$e=Be.checkedKeys,Qe=Be.halfCheckedKeys,Ze=Rt.props,Ge=Ze.checkStrictly,We=Ze.onCheck,Ke=Ae.key,nn,hn={event:"check",node:Ae,checked:Le,nativeEvent:le.nativeEvent};if(Ge){var un=Le?(0,Fe.L0)($e,Ke):(0,Fe._5)($e,Ke),bn=(0,Fe._5)(Qe,Ke);nn={checked:un,halfChecked:bn},hn.checkedNodes=un.map(function(gr){return(0,xe.Z)(tn,gr)}).filter(Boolean).map(function(gr){return gr.node}),Rt.setUncontrolledState({checkedKeys:un})}else{var Un=(0,ge.S)([].concat((0,zt.Z)($e),[Ke]),!0,tn),Vn=Un.checkedKeys,Yn=Un.halfCheckedKeys;if(!Le){var vr=new Set(Vn);vr.delete(Ke);var pr=(0,ge.S)(Array.from(vr),{checked:!1,halfCheckedKeys:Yn},tn);Vn=pr.checkedKeys,Yn=pr.halfCheckedKeys}nn=Vn,hn.checkedNodes=[],hn.checkedNodesPositions=[],hn.halfCheckedKeys=Yn,Vn.forEach(function(gr){var Nr=(0,xe.Z)(tn,gr);if(Nr){var Lr=Nr.node,dr=Nr.pos;hn.checkedNodes.push(Lr),hn.checkedNodesPositions.push({node:Lr,pos:dr})}}),Rt.setUncontrolledState({checkedKeys:Vn},!1,{halfCheckedKeys:Yn})}We==null||We(nn,hn)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeLoad",function(le){var Ae,Le=le.key,Be=Rt.state.keyEntities,tn=(0,xe.Z)(Be,Le);if(!(tn!=null&&(Ae=tn.children)!==null&&Ae!==void 0&&Ae.length)){var $e=new Promise(function(Qe,Ze){Rt.setState(function(Ge){var We=Ge.loadedKeys,Ke=We===void 0?[]:We,nn=Ge.loadingKeys,hn=nn===void 0?[]:nn,un=Rt.props,bn=un.loadData,Un=un.onLoad;if(!bn||Ke.includes(Le)||hn.includes(Le))return null;var Vn=bn(le);return Vn.then(function(){var Yn=Rt.state.loadedKeys,vr=(0,Fe.L0)(Yn,Le);Un==null||Un(vr,{event:"load",node:le}),Rt.setUncontrolledState({loadedKeys:vr}),Rt.setState(function(pr){return{loadingKeys:(0,Fe._5)(pr.loadingKeys,Le)}}),Qe()}).catch(function(Yn){if(Rt.setState(function(pr){return{loadingKeys:(0,Fe._5)(pr.loadingKeys,Le)}}),Rt.loadingRetryTimes[Le]=(Rt.loadingRetryTimes[Le]||0)+1,Rt.loadingRetryTimes[Le]>=ee){var vr=Rt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Rt.setUncontrolledState({loadedKeys:(0,Fe.L0)(vr,Le)}),Qe()}Ze(Yn)}),{loadingKeys:(0,Fe.L0)(hn,Le)}})});return $e.catch(function(){}),$e}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseEnter",function(le,Ae){var Le=Rt.props.onMouseEnter;Le==null||Le({event:le,node:Ae})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseLeave",function(le,Ae){var Le=Rt.props.onMouseLeave;Le==null||Le({event:le,node:Ae})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeContextMenu",function(le,Ae){var Le=Rt.props.onRightClick;Le&&(le.preventDefault(),Le({event:le,node:Ae}))}),(0,St.Z)((0,gt.Z)(Rt),"onFocus",function(){var le=Rt.props.onFocus;Rt.setState({focused:!0});for(var Ae=arguments.length,Le=new Array(Ae),Be=0;Be<Ae;Be++)Le[Be]=arguments[Be];le==null||le.apply(void 0,Le)}),(0,St.Z)((0,gt.Z)(Rt),"onBlur",function(){var le=Rt.props.onBlur;Rt.setState({focused:!1}),Rt.onActiveChange(null);for(var Ae=arguments.length,Le=new Array(Ae),Be=0;Be<Ae;Be++)Le[Be]=arguments[Be];le==null||le.apply(void 0,Le)}),(0,St.Z)((0,gt.Z)(Rt),"getTreeNodeRequiredProps",function(){var le=Rt.state,Ae=le.expandedKeys,Le=le.selectedKeys,Be=le.loadedKeys,tn=le.loadingKeys,$e=le.checkedKeys,Qe=le.halfCheckedKeys,Ze=le.dragOverNodeKey,Ge=le.dropPosition,We=le.keyEntities;return{expandedKeys:Ae||[],selectedKeys:Le||[],loadedKeys:Be||[],loadingKeys:tn||[],checkedKeys:$e||[],halfCheckedKeys:Qe||[],dragOverNodeKey:Ze,dropPosition:Ge,keyEntities:We}}),(0,St.Z)((0,gt.Z)(Rt),"setExpandedKeys",function(le){var Ae=Rt.state,Le=Ae.treeData,Be=Ae.fieldNames,tn=(0,Ht.oH)(Le,le,Be);Rt.setUncontrolledState({expandedKeys:le,flattenNodes:tn},!0)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeExpand",function(le,Ae){var Le=Rt.state.expandedKeys,Be=Rt.state,tn=Be.listChanging,$e=Be.fieldNames,Qe=Rt.props,Ze=Qe.onExpand,Ge=Qe.loadData,We=Ae.expanded,Ke=Ae[$e.key];if(!tn){var nn=Le.includes(Ke),hn=!We;if((0,z.ZP)(We&&nn||!We&&!nn,"Expand state not sync with index check"),Le=hn?(0,Fe.L0)(Le,Ke):(0,Fe._5)(Le,Ke),Rt.setExpandedKeys(Le),Ze==null||Ze(Le,{node:Ae,expanded:hn,nativeEvent:le.nativeEvent}),hn&&Ge){var un=Rt.onNodeLoad(Ae);un&&un.then(function(){var bn=(0,Ht.oH)(Rt.state.treeData,Le,$e);Rt.setUncontrolledState({flattenNodes:bn})}).catch(function(){var bn=Rt.state.expandedKeys,Un=(0,Fe._5)(bn,Ke);Rt.setExpandedKeys(Un)})}}}),(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(le){var Ae=Rt.state.activeKey,Le=Rt.props,Be=Le.onActiveChange,tn=Le.itemScrollOffset,$e=tn===void 0?0:tn;Ae!==le&&(Rt.setState({activeKey:le}),le!==null&&Rt.scrollTo({key:le,offset:$e}),Be==null||Be(le))}),(0,St.Z)((0,gt.Z)(Rt),"getActiveItem",function(){var le=Rt.state,Ae=le.activeKey,Le=le.flattenNodes;return Ae===null?null:Le.find(function(Be){var tn=Be.key;return tn===Ae})||null}),(0,St.Z)((0,gt.Z)(Rt),"offsetActiveKey",function(le){var Ae=Rt.state,Le=Ae.flattenNodes,Be=Ae.activeKey,tn=Le.findIndex(function(Ze){var Ge=Ze.key;return Ge===Be});tn===-1&&le<0&&(tn=Le.length),tn=(tn+le+Le.length)%Le.length;var $e=Le[tn];if($e){var Qe=$e.key;Rt.onActiveChange(Qe)}else Rt.onActiveChange(null)}),(0,St.Z)((0,gt.Z)(Rt),"onKeyDown",function(le){var Ae=Rt.state,Le=Ae.activeKey,Be=Ae.expandedKeys,tn=Ae.checkedKeys,$e=Ae.fieldNames,Qe=Rt.props,Ze=Qe.onKeyDown,Ge=Qe.checkable,We=Qe.selectable;switch(le.which){case xt.Z.UP:{Rt.offsetActiveKey(-1),le.preventDefault();break}case xt.Z.DOWN:{Rt.offsetActiveKey(1),le.preventDefault();break}}var Ke=Rt.getActiveItem();if(Ke&&Ke.data){var nn=Rt.getTreeNodeRequiredProps(),hn=Ke.data.isLeaf===!1||!!(Ke.data[$e.children]||[]).length,un=(0,Ht.F)((0,ot.Z)((0,ot.Z)({},(0,Ht.H8)(Le,nn)),{},{data:Ke.data,active:!0}));switch(le.which){case xt.Z.LEFT:{hn&&Be.includes(Le)?Rt.onNodeExpand({},un):Ke.parent&&Rt.onActiveChange(Ke.parent.key),le.preventDefault();break}case xt.Z.RIGHT:{hn&&!Be.includes(Le)?Rt.onNodeExpand({},un):Ke.children&&Ke.children.length&&Rt.onActiveChange(Ke.children[0].key),le.preventDefault();break}case xt.Z.ENTER:case xt.Z.SPACE:{Ge&&!un.disabled&&un.checkable!==!1&&!un.disableCheckbox?Rt.onNodeCheck({},un,!tn.includes(Le)):!Ge&&We&&!un.disabled&&un.selectable!==!1&&Rt.onNodeSelect({},un);break}}}Ze==null||Ze(le)}),(0,St.Z)((0,gt.Z)(Rt),"setUncontrolledState",function(le){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Rt.destroyed){var Be=!1,tn=!0,$e={};Object.keys(le).forEach(function(Qe){if(Rt.props.hasOwnProperty(Qe)){tn=!1;return}Be=!0,$e[Qe]=le[Qe]}),Be&&(!Ae||tn)&&Rt.setState((0,ot.Z)((0,ot.Z)({},$e),Le))}}),(0,St.Z)((0,gt.Z)(Rt),"scrollTo",function(le){Rt.listRef.current.scrollTo(le)}),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 Wt=this.props,te=Wt.activeKey,ue=Wt.itemScrollOffset,le=ue===void 0?0:ue;te!==void 0&&te!==this.state.activeKey&&(this.setState({activeKey:te}),te!==null&&this.scrollTo({key:te,offset:le}))}},{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 Wt=this.state,te=Wt.focused,ue=Wt.flattenNodes,le=Wt.keyEntities,Ae=Wt.draggingNodeKey,Le=Wt.activeKey,Be=Wt.dropLevelOffset,tn=Wt.dropContainerKey,$e=Wt.dropTargetKey,Qe=Wt.dropPosition,Ze=Wt.dragOverNodeKey,Ge=Wt.indent,We=this.props,Ke=We.prefixCls,nn=We.className,hn=We.style,un=We.showLine,bn=We.focusable,Un=We.tabIndex,Vn=Un===void 0?0:Un,Yn=We.selectable,vr=We.showIcon,pr=We.icon,gr=We.switcherIcon,Nr=We.draggable,Lr=We.checkable,dr=We.checkStrictly,cr=We.disabled,jr=We.motion,$t=We.loadData,$n=We.filterTreeNode,Zn=We.height,Dr=We.itemHeight,Vr=We.scrollWidth,Ur=We.virtual,ai=We.titleRender,qn=We.dropIndicatorRender,zn=We.onContextMenu,Ye=We.onScroll,Ve=We.direction,He=We.rootClassName,Fn=We.rootStyle,On=(0,ft.Z)(this.props,{aria:!0,data:!0}),Qn;Nr&&((0,Re.Z)(Nr)==="object"?Qn=Nr:typeof Nr=="function"?Qn={nodeDraggable:Nr}:Qn={});var yn={prefixCls:Ke,selectable:Yn,showIcon:vr,icon:pr,switcherIcon:gr,draggable:Qn,draggingNodeKey:Ae,checkable:Lr,checkStrictly:dr,disabled:cr,keyEntities:le,dropLevelOffset:Be,dropContainerKey:tn,dropTargetKey:$e,dropPosition:Qe,dragOverNodeKey:Ze,indent:Ge,direction:Ve,dropIndicatorRender:qn,loadData:$t,filterTreeNode:$n,titleRender:ai,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:yn},tt.createElement("div",{className:mt()(Ke,nn,He,(0,St.Z)((0,St.Z)((0,St.Z)({},"".concat(Ke,"-show-line"),un),"".concat(Ke,"-focused"),te),"".concat(Ke,"-active-focused"),Le!==null)),style:Fn},tt.createElement(ve,(0,ae.Z)({ref:this.listRef,prefixCls:Ke,style:hn,data:ue,disabled:cr,selectable:Yn,checkable:!!Lr,motion:jr,dragging:Ae!==null,height:Zn,itemHeight:Dr,virtual:Ur,focusable:bn,focused:te,tabIndex:Vn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:zn,onScroll:Ye,scrollWidth:Vr},this.getTreeNodeRequiredProps(),On))))}}],[{key:"getDerivedStateFromProps",value:function(Wt,te){var ue=te.prevProps,le={prevProps:Wt};function Ae(Vn){return!ue&&Wt.hasOwnProperty(Vn)||ue&&ue[Vn]!==Wt[Vn]}var Le,Be=te.fieldNames;if(Ae("fieldNames")&&(Be=(0,Ht.w$)(Wt.fieldNames),le.fieldNames=Be),Ae("treeData")?Le=Wt.treeData:Ae("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Le=(0,Ht.zn)(Wt.children)),Le){le.treeData=Le;var tn=(0,Ht.I8)(Le,{fieldNames:Be});le.keyEntities=(0,ot.Z)((0,St.Z)({},ne,we),tn.keyEntities)}var $e=le.keyEntities||te.keyEntities;if(Ae("expandedKeys")||ue&&Ae("autoExpandParent"))le.expandedKeys=Wt.autoExpandParent||!ue&&Wt.defaultExpandParent?(0,Fe.r7)(Wt.expandedKeys,$e):Wt.expandedKeys;else if(!ue&&Wt.defaultExpandAll){var Qe=(0,ot.Z)({},$e);delete Qe[ne];var Ze=[];Object.keys(Qe).forEach(function(Vn){var Yn=Qe[Vn];Yn.children&&Yn.children.length&&Ze.push(Yn.key)}),le.expandedKeys=Ze}else!ue&&Wt.defaultExpandedKeys&&(le.expandedKeys=Wt.autoExpandParent||Wt.defaultExpandParent?(0,Fe.r7)(Wt.defaultExpandedKeys,$e):Wt.defaultExpandedKeys);if(le.expandedKeys||delete le.expandedKeys,Le||le.expandedKeys){var Ge=(0,Ht.oH)(Le||te.treeData,le.expandedKeys||te.expandedKeys,Be);le.flattenNodes=Ge}if(Wt.selectable&&(Ae("selectedKeys")?le.selectedKeys=(0,Fe.BT)(Wt.selectedKeys,Wt):!ue&&Wt.defaultSelectedKeys&&(le.selectedKeys=(0,Fe.BT)(Wt.defaultSelectedKeys,Wt))),Wt.checkable){var We;if(Ae("checkedKeys")?We=(0,Fe.E6)(Wt.checkedKeys)||{}:!ue&&Wt.defaultCheckedKeys?We=(0,Fe.E6)(Wt.defaultCheckedKeys)||{}:Le&&(We=(0,Fe.E6)(Wt.checkedKeys)||{checkedKeys:te.checkedKeys,halfCheckedKeys:te.halfCheckedKeys}),We){var Ke=We,nn=Ke.checkedKeys,hn=nn===void 0?[]:nn,un=Ke.halfCheckedKeys,bn=un===void 0?[]:un;if(!Wt.checkStrictly){var Un=(0,ge.S)(hn,!0,$e);hn=Un.checkedKeys,bn=Un.halfCheckedKeys}le.checkedKeys=hn,le.halfCheckedKeys=bn}}return Ae("loadedKeys")&&(le.loadedKeys=Wt.loadedKeys),le}}]),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(mn,gn,he){"use strict";he.d(gn,{BT:function(){return tt},E6:function(){return lt},L0:function(){return St},OM:function(){return z},_5:function(){return Ct},r7:function(){return ut},wA:function(){return mt},yx:function(){return Tt}});var ae=he(80702),Re=he(62853),ot=he(48736),zt=he(59301),Bt=he(639),vt=he(65065),gt=he(34061),Et=null;function Ct(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,Ht=Nt.children;At.push(Gt),Ft(Ht)})}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,Ht,Yt){var Ut,Vt=dt.clientX,oe=dt.clientY,se=dt.target.getBoundingClientRect(),de=se.top,Se=se.height,Qt=(Yt==="rtl"?-1:1)*(((Ft==null?void 0:Ft.x)||0)-Vt),ne=(Qt-12)/Dt,ye=Ht.filter(function(Lt){var Xt;return(Xt=Gt[Lt])===null||Xt===void 0||(Xt=Xt.children)===null||Xt===void 0?void 0:Xt.length}),we=(0,vt.Z)(Gt,At.eventKey);if(oe<de+Se/2){var be=Nt.findIndex(function(Lt){return Lt.key===we.key}),fe=be<=0?0:be-1,pe=Nt[fe].key;we=(0,vt.Z)(Gt,pe)}var ce=we.key,Ce=we,ve=we.key,Fe=0,ge=0;if(!ye.includes(ce))for(var xe=0;xe<ne&&xt(we);xe+=1)we=we.parent,ge+=1;var ee=Pt.data,Kt=we.node,wt=!0;return ft(we)&&we.level===0&&oe<de+Se/2&&jt({dragNode:ee,dropNode:Kt,dropPosition:-1})&&we.key===At.eventKey?Fe=-1:(Ce.children||[]).length&&ye.includes(ve)?jt({dragNode:ee,dropNode:Kt,dropPosition:0})?Fe=0:wt=!1:ge===0?ne>-1.5?jt({dragNode:ee,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1:jt({dragNode:ee,dropNode:Kt,dropPosition:0})?Fe=0:jt({dragNode:ee,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1:jt({dragNode:ee,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1,{dropPosition:Fe,dropLevelOffset:ge,dropTargetKey:we.key,dropTargetPos:we.pos,dragOverNodeKey:ve,dropContainerKey:Fe===0?null:((Ut=we.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,Ht=_objectWithoutProperties(Nt,Et),Yt=it(Gt,Pt);return React.createElement(TreeNode,_extends({key:Ht.key},Ft(Ht)),Yt)})}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(mn,gn,he){"use strict";he.d(gn,{S:function(){return gt}});var ae=he(48736),Re=he(65065);function ot(Et,Ct){var St=new Set;return Et.forEach(function(Tt){Ct.has(Tt)||St.add(Tt)}),St}function zt(Et){var Ct=Et||{},St=Ct.disabled,Tt=Ct.disableCheckbox,mt=Ct.checkable;return!!(St||Tt)||mt===!1}function Bt(Et,Ct,St,Tt){for(var mt=new Set(Et),xt=new Set,ft=0;ft<=St;ft+=1){var z=Ct.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=Ct.get(at)||new Set;it.forEach(function(lt){var ut=lt.parent,dt=lt.node;if(!(Tt(dt)||!lt.parent||tt.has(lt.parent.key))){if(Tt(lt.parent.node)){tt.add(ut.key);return}var 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(Et,Ct,St,Tt,mt){for(var xt=new Set(Et),ft=new Set(Ct),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(Et,Ct,St,Tt){var mt=[],xt;Tt?xt=Tt:xt=zt;var ft=new Set(Et.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 Ct===!0?at=Bt(ft,z,tt,xt):at=vt(ft,Ct.halfCheckedKeys,z,tt,xt),at}},65065:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ae}});function ae(Re,ot){return Re[ot]}},34061:function(mn,gn,he){"use strict";he.d(gn,{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=he(62853),Re=he(80702),ot=he(77321),zt=he(74416),Bt=he(11592),vt=he(2738),gt=he(48736),Et=he(65065),Ct=["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],Ht=Nt[Pt.children];warning(Gt!=null,"Tree node must have a certain key: [".concat(jt).concat(Gt,"]"));var Yt=String(Gt);warning(!At.has(Yt)||Gt===null||Gt===void 0,"Same 'key' exist in the Tree: ".concat(Yt)),At.set(Yt,!0),Dt(Ht,"".concat(jt).concat(Yt," > "))})}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,Ht=(0,zt.Z)(Nt,Ct),Yt=(0,ot.Z)({key:jt},Ht),Ut=Pt(Gt);return Ut.length&&(Yt.children=Ut),Yt}).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),Ht=[];function Yt(Ut){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ut.map(function(oe,se){for(var de=St(Vt?Vt.pos:"0",se),Se=mt(oe[jt],de),Qt,ne=0;ne<Ft.length;ne+=1){var ye=Ft[ne];if(oe[ye]!==void 0){Qt=oe[ye];break}}var we=Object.assign((0,vt.Z)(oe,[].concat((0,Re.Z)(Ft),[jt,Nt])),{title:Qt,key:Se,parent:Vt,pos:de,children:null,data:oe,isStart:[].concat((0,Re.Z)(Vt?Vt.isStart:[]),[se===0]),isEnd:[].concat((0,Re.Z)(Vt?Vt.isEnd:[]),[se===Ut.length-1])});return Ht.push(we),Pt===!0||Gt.has(Se)?we.children=Yt(oe[Nt]||[],we):we.children=[],we})}return Yt(dt),Ht}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,Ht=xt(Gt),Yt=Ht.key,Ut=Ht.children,Vt=jt||Ut,oe;Nt?typeof Nt=="string"?oe=function(Se){return Se[Nt]}:typeof Nt=="function"&&(oe=function(Se){return Nt(Se)}):oe=function(Se,Qt){return mt(Se[Yt],Qt)};function se(de,Se,Qt,ne){var ye=de?de[Vt]:dt,we=de?St(Qt.pos,Se):"0",be=de?[].concat((0,Re.Z)(ne),[de]):[];if(de){var fe=oe(de,we),pe={node:de,index:Se,pos:we,key:fe,parentPos:Qt.node?Qt.pos:null,level:Qt.level+1,nodes:be};Pt(pe)}ye&&ye.forEach(function(ce,Ce){se(ce,Ce,{node:de,pos:we,level:Qt?Qt.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,Ht=arguments.length>2?arguments[2]:void 0,Yt=jt||Ht,Ut={},Vt={},oe={posEntities:Ut,keyEntities:Vt};return At&&(oe=At(oe)||oe),at(dt,function(se){var de=se.node,Se=se.index,Qt=se.pos,ne=se.key,ye=se.parentPos,we=se.level,be=se.nodes,fe={node:de,nodes:be,index:Se,key:ne,pos:Qt,level:we},pe=mt(ne,Qt);Ut[Qt]=fe,Vt[pe]=fe,fe.parent=Ut[ye],fe.parent&&(fe.parent.children=fe.parent.children||[],fe.parent.children.push(fe)),Dt&&Dt(fe,oe)},{externalGetKey:Yt,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,Ht=Pt.dragOverNodeKey,Yt=Pt.dropPosition,Ut=Pt.keyEntities,Vt=(0,Et.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(Vt?Vt.pos:""),dragOver:Ht===dt&&Yt===0,dragOverGapTop:Ht===dt&&Yt===-1,dragOverGapBottom:Ht===dt&&Yt===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,Ht=dt.dragOver,Yt=dt.dragOverGapTop,Ut=dt.dragOverGapBottom,Vt=dt.pos,oe=dt.active,se=dt.eventKey,de=(0,ot.Z)((0,ot.Z)({},Pt),{},{expanded:At,selected:Dt,checked:Ft,loaded:jt,loading:Nt,halfChecked:Gt,dragOver:Ht,dragOverGapTop:Yt,dragOverGapBottom:Ut,pos:Vt,active:oe,key:se});return"props"in de||Object.defineProperty(de,"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}}),de}},90472:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return se}});var ae=he(72308),Re=he(96949),ot=he(55090),zt=he(80237),Bt=he(77205),vt=he(38793),gt=he(49618),Et=he(59301),Ct=he(77321),St=he(74416),Tt=he(62853),mt=he(65736),xt=he(72633),ft=he(80702),z=he(92310),tt=he.n(z),at=he(26112),it=he(48736),lt=function(de,Se){if(de&&Se){var Qt=Array.isArray(Se)?Se:Se.split(","),ne=de.name||"",ye=de.type||"",we=ye.replace(/\/.*$/,"");return Qt.some(function(be){var fe=be.trim();if(/^\*(\/\*)?$/.test(be))return!0;if(fe.charAt(0)==="."){var pe=ne.toLowerCase(),ce=fe.toLowerCase(),Ce=[ce];return(ce===".jpg"||ce===".jpeg")&&(Ce=[".jpg",".jpeg"]),Ce.some(function(ve){return pe.endsWith(ve)})}return/\/\*$/.test(fe)?we===fe.replace(/\/.*$/,""):ye===fe?!0:/^\w+$/.test(fe)?((0,it.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(fe,"'.Skip for check.")),!0):!1})}return!0};function ut(de,Se){var Qt="cannot ".concat(de.method," ").concat(de.action," ").concat(Se.status,"'"),ne=new Error(Qt);return ne.status=Se.status,ne.method=de.method,ne.url=de.action,ne}function dt(de){var Se=de.responseText||de.response;if(!Se)return Se;try{return JSON.parse(Se)}catch(Qt){return Se}}function Pt(de){var Se=new XMLHttpRequest;de.onProgress&&Se.upload&&(Se.upload.onprogress=function(we){we.total>0&&(we.percent=we.loaded/we.total*100),de.onProgress(we)});var Qt=new FormData;de.data&&Object.keys(de.data).forEach(function(ye){var we=de.data[ye];if(Array.isArray(we)){we.forEach(function(be){Qt.append("".concat(ye,"[]"),be)});return}Qt.append(ye,we)}),de.file instanceof Blob?Qt.append(de.filename,de.file,de.file.name):Qt.append(de.filename,de.file),Se.onerror=function(we){de.onError(we)},Se.onload=function(){return Se.status<200||Se.status>=300?de.onError(ut(de,Se),dt(Se)):de.onSuccess(dt(Se),Se)},Se.open(de.method,de.action,!0),de.withCredentials&&"withCredentials"in Se&&(Se.withCredentials=!0);var ne=de.headers||{};return ne["X-Requested-With"]!==null&&Se.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ne).forEach(function(ye){ne[ye]!==null&&Se.setRequestHeader(ye,ne[ye])}),Se.send(Qt),{abort:function(){Se.abort()}}}var At=function(){var de=(0,xt.Z)((0,mt.Z)().mark(function Se(Qt,ne){var ye,we,be,fe,pe,ce,Ce,ve;return(0,mt.Z)().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:ce=function(){return ce=(0,xt.Z)((0,mt.Z)().mark(function ee(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(re){ne(re)?(Kt.fullPath&&!re.webkitRelativePath&&(Object.defineProperties(re,{webkitRelativePath:{writable:!0}}),re.webkitRelativePath=Kt.fullPath.replace(/^\//,""),Object.defineProperties(re,{webkitRelativePath:{writable:!1}})),Xt(re)):Xt(null)})}));case 1:case"end":return Lt.stop()}},ee)})),ce.apply(this,arguments)},pe=function(ee){return ce.apply(this,arguments)},fe=function(){return fe=(0,xt.Z)((0,mt.Z)().mark(function ee(Kt){var wt,Lt,Xt,re,It;return(0,mt.Z)().wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:wt=Kt.createReader(),Lt=[];case 2:return Wt.next=5,new Promise(function(te){wt.readEntries(te,function(){return te([])})});case 5:if(Xt=Wt.sent,re=Xt.length,re){Wt.next=9;break}return Wt.abrupt("break",12);case 9:for(It=0;It<re;It++)Lt.push(Xt[It]);Wt.next=2;break;case 12:return Wt.abrupt("return",Lt);case 13:case"end":return Wt.stop()}},ee)})),fe.apply(this,arguments)},be=function(ee){return fe.apply(this,arguments)},ye=[],we=[],Qt.forEach(function(xe){return we.push(xe.webkitGetAsEntry())}),Ce=function(){var xe=(0,xt.Z)((0,mt.Z)().mark(function ee(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,we.push.apply(we,(0,ft.Z)(Xt));case 15:case"end":return It.stop()}},ee)}));return function(Kt,wt){return xe.apply(this,arguments)}}(),ve=0;case 9:if(!(ve<we.length)){ge.next=15;break}return ge.next=12,Ce(we[ve]);case 12:ve++,ge.next=9;break;case 15:return ge.abrupt("return",ye);case 16:case"end":return ge.stop()}},Se)}));return function(Qt,ne){return de.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"],Ht=function(de){(0,Bt.Z)(Qt,de);var Se=(0,vt.Z)(Qt);function Qt(){var ne;(0,Re.Z)(this,Qt);for(var ye=arguments.length,we=new Array(ye),be=0;be<ye;be++)we[be]=arguments[be];return ne=Se.call.apply(Se,[this].concat(we)),(0,gt.Z)((0,zt.Z)(ne),"state",{uid:Nt()}),(0,gt.Z)((0,zt.Z)(ne),"reqs",{}),(0,gt.Z)((0,zt.Z)(ne),"fileInput",void 0),(0,gt.Z)((0,zt.Z)(ne),"_isMounted",void 0),(0,gt.Z)((0,zt.Z)(ne),"onChange",function(fe){var pe=ne.props,ce=pe.accept,Ce=pe.directory,ve=fe.target.files,Fe=(0,ft.Z)(ve).filter(function(ge){return!Ce||lt(ge,ce)});ne.uploadFiles(Fe),ne.reset()}),(0,gt.Z)((0,zt.Z)(ne),"onClick",function(fe){var pe=ne.fileInput;if(pe){var ce=fe.target,Ce=ne.props.onClick;if(ce&&ce.tagName==="BUTTON"){var ve=pe.parentNode;ve.focus(),ce.blur()}pe.click(),Ce&&Ce(fe)}}),(0,gt.Z)((0,zt.Z)(ne),"onKeyDown",function(fe){fe.key==="Enter"&&ne.onClick(fe)}),(0,gt.Z)((0,zt.Z)(ne),"onFileDrop",function(){var fe=(0,xt.Z)((0,mt.Z)().mark(function pe(ce){var Ce,ve,Fe;return(0,mt.Z)().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(Ce=ne.props.multiple,ce.preventDefault(),ce.type!=="dragover"){xe.next=4;break}return xe.abrupt("return");case 4:if(!ne.props.directory){xe.next=11;break}return xe.next=7,Dt(Array.prototype.slice.call(ce.dataTransfer.items),function(ee){return lt(ee,ne.props.accept)});case 7:ve=xe.sent,ne.uploadFiles(ve),xe.next=14;break;case 11:Fe=(0,ft.Z)(ce.dataTransfer.files).filter(function(ee){return lt(ee,ne.props.accept)}),Ce===!1&&(Fe=Fe.slice(0,1)),ne.uploadFiles(Fe);case 14:case"end":return xe.stop()}},pe)}));return function(pe){return fe.apply(this,arguments)}}()),(0,gt.Z)((0,zt.Z)(ne),"uploadFiles",function(fe){var pe=(0,ft.Z)(fe),ce=pe.map(function(Ce){return Ce.uid=Nt(),ne.processFile(Ce,pe)});Promise.all(ce).then(function(Ce){var ve=ne.props.onBatchStart;ve==null||ve(Ce.map(function(Fe){var ge=Fe.origin,xe=Fe.parsedFile;return{file:ge,parsedFile:xe}})),Ce.filter(function(Fe){return Fe.parsedFile!==null}).forEach(function(Fe){ne.post(Fe)})})}),(0,gt.Z)((0,zt.Z)(ne),"processFile",function(){var fe=(0,xt.Z)((0,mt.Z)().mark(function pe(ce,Ce){var ve,Fe,ge,xe,ee,Kt,wt,Lt,Xt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(ve=ne.props.beforeUpload,Fe=ce,!ve){It.next=14;break}return It.prev=3,It.next=6,ve(ce,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:ce,parsedFile:null,action:null,data:null});case 14:if(ge=ne.props.action,typeof ge!="function"){It.next=21;break}return It.next=18,ge(ce);case 18:xe=It.sent,It.next=22;break;case 21:xe=ge;case 22:if(ee=ne.props.data,typeof ee!="function"){It.next=29;break}return It.next=26,ee(ce);case 26:Kt=It.sent,It.next=30;break;case 29:Kt=ee;case 30:return wt=((0,Tt.Z)(Fe)==="object"||typeof Fe=="string")&&Fe?Fe:ce,wt instanceof File?Lt=wt:Lt=new File([wt],ce.name,{type:ce.type}),Xt=Lt,Xt.uid=ce.uid,It.abrupt("return",{origin:ce,data:Kt,parsedFile:Xt,action:xe});case 35:case"end":return It.stop()}},pe,null,[[3,9]])}));return function(pe,ce){return fe.apply(this,arguments)}}()),(0,gt.Z)((0,zt.Z)(ne),"saveFileInput",function(fe){ne.fileInput=fe}),ne}return(0,ot.Z)(Qt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(ye){var we=this,be=ye.data,fe=ye.origin,pe=ye.action,ce=ye.parsedFile;if(this._isMounted){var Ce=this.props,ve=Ce.onStart,Fe=Ce.customRequest,ge=Ce.name,xe=Ce.headers,ee=Ce.withCredentials,Kt=Ce.method,wt=fe.uid,Lt=Fe||Pt,Xt={action:pe,filename:ge,data:be,file:ce,headers:xe,withCredentials:ee,method:Kt||"post",onProgress:function(It){var Rt=we.props.onProgress;Rt==null||Rt(It,ce)},onSuccess:function(It,Rt){var Wt=we.props.onSuccess;Wt==null||Wt(It,ce,Rt),delete we.reqs[wt]},onError:function(It,Rt){var Wt=we.props.onError;Wt==null||Wt(It,Rt,ce),delete we.reqs[wt]}};ve(fe),this.reqs[wt]=Lt(Xt)}}},{key:"reset",value:function(){this.setState({uid:Nt()})}},{key:"abort",value:function(ye){var we=this.reqs;if(ye){var be=ye.uid?ye.uid:ye;we[be]&&we[be].abort&&we[be].abort(),delete we[be]}else Object.keys(we).forEach(function(fe){we[fe]&&we[fe].abort&&we[fe].abort(),delete we[fe]})}},{key:"render",value:function(){var ye=this.props,we=ye.component,be=ye.prefixCls,fe=ye.className,pe=ye.classNames,ce=pe===void 0?{}:pe,Ce=ye.disabled,ve=ye.id,Fe=ye.name,ge=ye.style,xe=ye.styles,ee=xe===void 0?{}:xe,Kt=ye.multiple,wt=ye.accept,Lt=ye.capture,Xt=ye.children,re=ye.directory,It=ye.openFileDialogOnClick,Rt=ye.onMouseEnter,Wt=ye.onMouseLeave,te=ye.hasControlInside,ue=(0,St.Z)(ye,Gt),le=tt()((0,gt.Z)((0,gt.Z)((0,gt.Z)({},be,!0),"".concat(be,"-disabled"),Ce),fe,fe)),Ae=re?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Le=Ce?{}:{onClick:It?this.onClick:function(){},onKeyDown:It?this.onKeyDown:function(){},onMouseEnter:Rt,onMouseLeave:Wt,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:te?void 0:"0"};return Et.createElement(we,(0,ae.Z)({},Le,{className:le,role:te?void 0:"button",style:ge}),Et.createElement("input",(0,ae.Z)({},(0,at.Z)(ue,{aria:!0,data:!0}),{id:ve,name:Fe,disabled:Ce,type:"file",ref:this.saveFileInput,onClick:function(tn){return tn.stopPropagation()},key:this.state.uid,style:(0,Ct.Z)({display:"none"},ee.input),className:ce.input,accept:wt},Ae,{multiple:Kt,onChange:this.onChange},Lt!=null?{capture:Lt}:{})),Xt)}}]),Qt}(Et.Component),Yt=Ht;function Ut(){}var Vt=function(de){(0,Bt.Z)(Qt,de);var Se=(0,vt.Z)(Qt);function Qt(){var ne;(0,Re.Z)(this,Qt);for(var ye=arguments.length,we=new Array(ye),be=0;be<ye;be++)we[be]=arguments[be];return ne=Se.call.apply(Se,[this].concat(we)),(0,gt.Z)((0,zt.Z)(ne),"uploader",void 0),(0,gt.Z)((0,zt.Z)(ne),"saveUploader",function(fe){ne.uploader=fe}),ne}return(0,ot.Z)(Qt,[{key:"abort",value:function(ye){this.uploader.abort(ye)}},{key:"render",value:function(){return Et.createElement(Yt,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),Qt}(Et.Component);(0,gt.Z)(Vt,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ut,onError:Ut,onSuccess:Ut,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var oe=Vt,se=oe},45680:function(mn,gn,he){"use strict";he.d(gn,{Z:function(){return ee}});var ae=he(72308),Re=he(62853),ot=he(77321),zt=he(49618),Bt=he(52487),vt=he(74416),gt=he(92310),Et=he.n(gt),Ct=he(29301),St=he(70425),Tt=he(34280),mt=he(59301),xt=he(4676),ft=mt.forwardRef(function(Kt,wt){var Lt=Kt.height,Xt=Kt.offsetY,re=Kt.offsetX,It=Kt.children,Rt=Kt.prefixCls,Wt=Kt.onInnerResize,te=Kt.innerProps,ue=Kt.rtl,le=Kt.extra,Ae={},Le={display:"flex",flexDirection:"column"};return Xt!==void 0&&(Ae={height:Lt,position:"relative",overflow:"hidden"},Le=(0,ot.Z)((0,ot.Z)({},Le),{},(0,zt.Z)((0,zt.Z)((0,zt.Z)((0,zt.Z)((0,zt.Z)({transform:"translateY(".concat(Xt,"px)")},ue?"marginRight":"marginLeft",-re),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:Ae},mt.createElement(Ct.Z,{onResize:function(tn){var $e=tn.offsetHeight;$e&&Wt&&Wt()}},mt.createElement("div",(0,ae.Z)({style:Le,className:Et()((0,zt.Z)({},"".concat(Rt,"-holder-inner"),Rt)),ref:wt},te),It,le)))});ft.displayName="Filler";var z=ft;function tt(Kt){var wt=Kt.children,Lt=Kt.setRef,Xt=mt.useCallback(function(re){Lt(re)},[]);return mt.cloneElement(wt,{ref:Xt})}function at(Kt,wt,Lt,Xt,re,It,Rt,Wt){var te=Wt.getKey;return Kt.slice(wt,Lt+1).map(function(ue,le){var Ae=wt+le,Le=Rt(ue,Ae,{style:{width:Xt},offsetX:re}),Be=te(ue);return mt.createElement(tt,{key:Be,setRef:function($e){return It(ue,$e)}},Le)})}function it(Kt,wt,Lt,Xt){var re=Lt-Kt,It=wt-Lt,Rt=Math.min(re,It)*2;if(Xt<=Rt){var Wt=Math.floor(Xt/2);return Xt%2?Lt+Wt+1:Lt-Wt}return re>It?Lt-(Xt-It):Lt+(Xt-re)}function lt(Kt,wt,Lt){var Xt=Kt.length,re=wt.length,It,Rt;if(Xt===0&&re===0)return null;Xt<re?(It=Kt,Rt=wt):(It=wt,Rt=Kt);var Wt={__EMPTY_ITEM__:!0};function te(tn){return tn!==void 0?Lt(tn):Wt}for(var ue=null,le=Math.abs(Xt-re)!==1,Ae=0;Ae<Rt.length;Ae+=1){var Le=te(It[Ae]),Be=te(Rt[Ae]);if(Le!==Be){ue=Ae,le=le||Le!==te(Rt[Ae+1]);break}}return ue===null?null:{index:ue,multiple:le}}function ut(Kt,wt,Lt){var Xt=mt.useState(Kt),re=(0,Bt.Z)(Xt,2),It=re[0],Rt=re[1],Wt=mt.useState(null),te=(0,Bt.Z)(Wt,2),ue=te[0],le=te[1];return mt.useEffect(function(){var Ae=lt(It||[],Kt||[],wt);(Ae==null?void 0:Ae.index)!==void 0&&(Lt==null||Lt(Ae.index),le(Kt[Ae.index])),Rt(Kt)},[Kt]),[ue]}var dt=he(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 re=(0,mt.useRef)(!1),It=(0,mt.useRef)(null);function Rt(){clearTimeout(It.current),re.current=!0,It.current=setTimeout(function(){re.current=!1},50)}var Wt=(0,mt.useRef)({top:Kt,bottom:wt,left:Lt,right:Xt});return Wt.current.top=Kt,Wt.current.bottom=wt,Wt.current.left=Lt,Wt.current.right=Xt,function(te,ue){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ae=te?ue<0&&Wt.current.left||ue>0&&Wt.current.right:ue<0&&Wt.current.top||ue>0&&Wt.current.bottom;return le&&Ae?(clearTimeout(It.current),re.current=!1):(!Ae||re.current)&&Rt(),!re.current&&Ae}};function Ft(Kt,wt,Lt,Xt,re,It,Rt){var Wt=(0,mt.useRef)(0),te=(0,mt.useRef)(null),ue=(0,mt.useRef)(null),le=(0,mt.useRef)(!1),Ae=Dt(wt,Lt,Xt,re);function Le(Ge,We){if(dt.Z.cancel(te.current),!Ae(!1,We)){var Ke=Ge;if(!Ke._virtualHandled)Ke._virtualHandled=!0;else return;Wt.current+=We,ue.current=We,At||Ke.preventDefault(),te.current=(0,dt.Z)(function(){var nn=le.current?10:1;Rt(Wt.current*nn,!1),Wt.current=0})}}function Be(Ge,We){Rt(We,!0),At||Ge.preventDefault()}var tn=(0,mt.useRef)(null),$e=(0,mt.useRef)(null);function Qe(Ge){if(Kt){dt.Z.cancel($e.current),$e.current=(0,dt.Z)(function(){tn.current=null},2);var We=Ge.deltaX,Ke=Ge.deltaY,nn=Ge.shiftKey,hn=We,un=Ke;(tn.current==="sx"||!tn.current&&nn&&Ke&&!We)&&(hn=Ke,un=0,tn.current="sx");var bn=Math.abs(hn),Un=Math.abs(un);tn.current===null&&(tn.current=It&&bn>Un?"x":"y"),tn.current==="y"?Le(Ge,un):Be(Ge,hn)}}function Ze(Ge){Kt&&(le.current=Ge.detail===ue.current)}return[Qe,Ze]}function jt(Kt,wt,Lt,Xt){var re=mt.useMemo(function(){return[new Map,[]]},[Kt,Lt.id,Xt]),It=(0,Bt.Z)(re,2),Rt=It[0],Wt=It[1],te=function(le){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le,Le=Rt.get(le),Be=Rt.get(Ae);if(Le===void 0||Be===void 0)for(var tn=Kt.length,$e=Wt.length;$e<tn;$e+=1){var Qe,Ze=Kt[$e],Ge=wt(Ze);Rt.set(Ge,$e);var We=(Qe=Lt.get(Ge))!==null&&Qe!==void 0?Qe:Xt;if(Wt[$e]=(Wt[$e-1]||0)+We,Ge===le&&(Le=$e),Ge===Ae&&(Be=$e),Le!==void 0&&Be!==void 0)break}return{top:Wt[Le-1]||0,bottom:Wt[Be]}};return te}var Nt=he(96949),Gt=he(55090),Ht=function(){function Kt(){(0,Nt.Z)(this,Kt),(0,zt.Z)(this,"maps",void 0),(0,zt.Z)(this,"id",0),(0,zt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Gt.Z)(Kt,[{key:"set",value:function(Lt,Xt){this.maps[Lt]=Xt,this.id+=1,this.diffKeys.add(Lt)}},{key:"get",value:function(Lt){return this.maps[Lt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Kt}(),Yt=Ht;function Ut(Kt){var wt=parseFloat(Kt);return isNaN(wt)?0:wt}function Vt(Kt,wt,Lt){var Xt=mt.useState(0),re=(0,Bt.Z)(Xt,2),It=re[0],Rt=re[1],Wt=(0,mt.useRef)(new Map),te=(0,mt.useRef)(new Yt),ue=(0,mt.useRef)(0);function le(){ue.current+=1}function Ae(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le();var tn=function(){var Ze=!1;Wt.current.forEach(function(Ge,We){if(Ge&&Ge.offsetParent){var Ke=Ge.offsetHeight,nn=getComputedStyle(Ge),hn=nn.marginTop,un=nn.marginBottom,bn=Ut(hn),Un=Ut(un),Vn=Ke+bn+Un;te.current.get(We)!==Vn&&(te.current.set(We,Vn),Ze=!0)}}),Ze&&Rt(function(Ge){return Ge+1})};if(Be)tn();else{ue.current+=1;var $e=ue.current;Promise.resolve().then(function(){$e===ue.current&&tn()})}}function Le(Be,tn){var $e=Kt(Be),Qe=Wt.current.get($e);tn?(Wt.current.set($e,tn),Ae()):Wt.current.delete($e),!Qe!=!tn&&(tn?wt==null||wt(Be):Lt==null||Lt(Be))}return(0,mt.useEffect)(function(){return le},[]),[Le,Ae,te.current,It]}var oe=14/15;function se(Kt,wt,Lt){var Xt=(0,mt.useRef)(!1),re=(0,mt.useRef)(0),It=(0,mt.useRef)(0),Rt=(0,mt.useRef)(null),Wt=(0,mt.useRef)(null),te,ue=function(Be){if(Xt.current){var tn=Math.ceil(Be.touches[0].pageX),$e=Math.ceil(Be.touches[0].pageY),Qe=re.current-tn,Ze=It.current-$e,Ge=Math.abs(Qe)>Math.abs(Ze);Ge?re.current=tn:It.current=$e;var We=Lt(Ge,Ge?Qe:Ze,!1,Be);We&&Be.preventDefault(),clearInterval(Wt.current),We&&(Wt.current=setInterval(function(){Ge?Qe*=oe:Ze*=oe;var Ke=Math.floor(Ge?Qe:Ze);(!Lt(Ge,Ke,!0)||Math.abs(Ke)<=.1)&&clearInterval(Wt.current)},16))}},le=function(){Xt.current=!1,te()},Ae=function(Be){te(),Be.touches.length===1&&!Xt.current&&(Xt.current=!0,re.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",le,{passive:!0}))};te=function(){Rt.current&&(Rt.current.removeEventListener("touchmove",ue),Rt.current.removeEventListener("touchend",le))},(0,Tt.Z)(function(){return Kt&&wt.current.addEventListener("touchstart",Ae,{passive:!0}),function(){var Le;(Le=wt.current)===null||Le===void 0||Le.removeEventListener("touchstart",Ae),te(),clearInterval(Wt.current)}},[Kt])}function de(Kt){return Math.floor(Math.pow(Kt,.5))}function Se(Kt,wt){var Lt="touches"in Kt?Kt.touches[0]:Kt;return Lt[wt?"pageX":"pageY"]-window[wt?"scrollX":"scrollY"]}function Qt(Kt,wt,Lt){mt.useEffect(function(){var Xt=wt.current;if(Kt&&Xt){var re=!1,It,Rt,Wt=function(){dt.Z.cancel(It)},te=function Le(){Wt(),It=(0,dt.Z)(function(){Lt(Rt),Le()})},ue=function(Be){if(!(Be.target.draggable||Be.button!==0)){var tn=Be;tn._virtualHandled||(tn._virtualHandled=!0,re=!0)}},le=function(){re=!1,Wt()},Ae=function(Be){if(re){var tn=Se(Be,!1),$e=Xt.getBoundingClientRect(),Qe=$e.top,Ze=$e.bottom;if(tn<=Qe){var Ge=Qe-tn;Rt=-de(Ge),te()}else if(tn>=Ze){var We=tn-Ze;Rt=de(We),te()}else Wt()}};return Xt.addEventListener("mousedown",ue),Xt.ownerDocument.addEventListener("mouseup",le),Xt.ownerDocument.addEventListener("mousemove",Ae),function(){Xt.removeEventListener("mousedown",ue),Xt.ownerDocument.removeEventListener("mouseup",le),Xt.ownerDocument.removeEventListener("mousemove",Ae),Wt()}}},[Kt])}var ne=10;function ye(Kt,wt,Lt,Xt,re,It,Rt,Wt){var te=mt.useRef(),ue=mt.useState(null),le=(0,Bt.Z)(ue,2),Ae=le[0],Le=le[1];return(0,Tt.Z)(function(){if(Ae&&Ae.times<ne){if(!Kt.current){Le(function(jr){return(0,ot.Z)({},jr)});return}It();var Be=Ae.targetAlign,tn=Ae.originAlign,$e=Ae.index,Qe=Ae.offset,Ze=Kt.current.clientHeight,Ge=!1,We=Be,Ke=null;if(Ze){for(var nn=Be||tn,hn=0,un=0,bn=0,Un=Math.min(wt.length-1,$e),Vn=0;Vn<=Un;Vn+=1){var Yn=re(wt[Vn]);un=hn;var vr=Lt.get(Yn);bn=un+(vr===void 0?Xt:vr),hn=bn}for(var pr=nn==="top"?Qe:Ze-Qe,gr=Un;gr>=0;gr-=1){var Nr=re(wt[gr]),Lr=Lt.get(Nr);if(Lr===void 0){Ge=!0;break}if(pr-=Lr,pr<=0)break}switch(nn){case"top":Ke=un-Qe;break;case"bottom":Ke=bn-Ze+Qe;break;default:{var dr=Kt.current.scrollTop,cr=dr+Ze;un<dr?We="top":bn>cr&&(We="bottom")}}Ke!==null&&Rt(Ke),Ke!==Ae.lastTop&&(Ge=!0)}Ge&&Le((0,ot.Z)((0,ot.Z)({},Ae),{},{times:Ae.times+1,targetAlign:We,lastTop:Ke}))}},[Ae,Kt.current]),function(Be){if(Be==null){Wt();return}if(dt.Z.cancel(te.current),typeof Be=="number")Rt(Be);else if(Be&&(0,Re.Z)(Be)==="object"){var tn,$e=Be.align;"index"in Be?tn=Be.index:tn=wt.findIndex(function(Ge){return re(Ge)===Be.key});var Qe=Be.offset,Ze=Qe===void 0?0:Qe;Le({times:0,index:tn,offset:Ze,originAlign:$e})}}}var we=mt.forwardRef(function(Kt,wt){var Lt=Kt.prefixCls,Xt=Kt.rtl,re=Kt.scrollOffset,It=Kt.scrollRange,Rt=Kt.onStartMove,Wt=Kt.onStopMove,te=Kt.onScroll,ue=Kt.horizontal,le=Kt.spinSize,Ae=Kt.containerSize,Le=Kt.style,Be=Kt.thumbStyle,tn=Kt.showScrollBar,$e=mt.useState(!1),Qe=(0,Bt.Z)($e,2),Ze=Qe[0],Ge=Qe[1],We=mt.useState(null),Ke=(0,Bt.Z)(We,2),nn=Ke[0],hn=Ke[1],un=mt.useState(null),bn=(0,Bt.Z)(un,2),Un=bn[0],Vn=bn[1],Yn=!Xt,vr=mt.useRef(),pr=mt.useRef(),gr=mt.useState(tn),Nr=(0,Bt.Z)(gr,2),Lr=Nr[0],dr=Nr[1],cr=mt.useRef(),jr=function(){tn===!0||tn===!1||(clearTimeout(cr.current),dr(!0),cr.current=setTimeout(function(){dr(!1)},3e3))},$t=It-Ae||0,$n=Ae-le||0,Zn=mt.useMemo(function(){if(re===0||$t===0)return 0;var He=re/$t;return He*$n},[re,$t,$n]),Dr=function(Fn){Fn.stopPropagation(),Fn.preventDefault()},Vr=mt.useRef({top:Zn,dragging:Ze,pageY:nn,startTop:Un});Vr.current={top:Zn,dragging:Ze,pageY:nn,startTop:Un};var Ur=function(Fn){Ge(!0),hn(Se(Fn,ue)),Vn(Vr.current.top),Rt(),Fn.stopPropagation(),Fn.preventDefault()};mt.useEffect(function(){var He=function(yn){yn.preventDefault()},Fn=vr.current,On=pr.current;return Fn.addEventListener("touchstart",He,{passive:!1}),On.addEventListener("touchstart",Ur,{passive:!1}),function(){Fn.removeEventListener("touchstart",He),On.removeEventListener("touchstart",Ur)}},[]);var ai=mt.useRef();ai.current=$t;var qn=mt.useRef();qn.current=$n,mt.useEffect(function(){if(Ze){var He,Fn=function(yn){var Nn=Vr.current,en=Nn.dragging,Xe=Nn.pageY,Dn=Nn.startTop;dt.Z.cancel(He);var Oe=vr.current.getBoundingClientRect(),ln=Ae/(ue?Oe.width:Oe.height);if(en){var En=(Se(yn,ue)-Xe)*ln,Gn=Dn;!Yn&&ue?Gn-=En:Gn+=En;var sn=ai.current,dn=qn.current,An=dn?Gn/dn:0,er=Math.ceil(An*sn);er=Math.max(er,0),er=Math.min(er,sn),He=(0,dt.Z)(function(){te(er,ue)})}},On=function(){Ge(!1),Wt()};return window.addEventListener("mousemove",Fn,{passive:!0}),window.addEventListener("touchmove",Fn,{passive:!0}),window.addEventListener("mouseup",On,{passive:!0}),window.addEventListener("touchend",On,{passive:!0}),function(){window.removeEventListener("mousemove",Fn),window.removeEventListener("touchmove",Fn),window.removeEventListener("mouseup",On),window.removeEventListener("touchend",On),dt.Z.cancel(He)}}},[Ze]),mt.useEffect(function(){return jr(),function(){clearTimeout(cr.current)}},[re]),mt.useImperativeHandle(wt,function(){return{delayHidden:jr}});var zn="".concat(Lt,"-scrollbar"),Ye={position:"absolute",visibility:Lr?null:"hidden"},Ve={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,Ve.height="100%",Ve.width=le,Yn?Ve.left=Zn:Ve.right=Zn):(Ye.width=8,Ye.top=0,Ye.bottom=0,Yn?Ye.right=0:Ye.left=0,Ve.width="100%",Ve.height=le,Ve.top=Zn),mt.createElement("div",{ref:vr,className:Et()(zn,(0,zt.Z)((0,zt.Z)((0,zt.Z)({},"".concat(zn,"-horizontal"),ue),"".concat(zn,"-vertical"),!ue),"".concat(zn,"-visible"),Lr)),style:(0,ot.Z)((0,ot.Z)({},Ye),Le),onMouseDown:Dr,onMouseMove:jr},mt.createElement("div",{ref:pr,className:Et()("".concat(zn,"-thumb"),(0,zt.Z)({},"".concat(zn,"-thumb-moving"),Ze)),style:(0,ot.Z)((0,ot.Z)({},Ve),Be),onMouseDown:Ur}))}),be=we,fe=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,fe),Math.floor(Lt)}var ce=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ce=[],ve={overflowY:"auto",overflowAnchor:"none"};function Fe(Kt,wt){var Lt=Kt.prefixCls,Xt=Lt===void 0?"rc-virtual-list":Lt,re=Kt.className,It=Kt.height,Rt=Kt.itemHeight,Wt=Kt.fullHeight,te=Wt===void 0?!0:Wt,ue=Kt.style,le=Kt.data,Ae=Kt.children,Le=Kt.itemKey,Be=Kt.virtual,tn=Kt.direction,$e=Kt.scrollWidth,Qe=Kt.component,Ze=Qe===void 0?"div":Qe,Ge=Kt.onScroll,We=Kt.onVirtualScroll,Ke=Kt.onVisibleChange,nn=Kt.innerProps,hn=Kt.extraRender,un=Kt.styles,bn=Kt.showScrollBar,Un=bn===void 0?"optional":bn,Vn=(0,vt.Z)(Kt,ce),Yn=mt.useCallback(function(ur){return typeof Le=="function"?Le(ur):ur==null?void 0:ur[Le]},[Le]),vr=Vt(Yn,null,null),pr=(0,Bt.Z)(vr,4),gr=pr[0],Nr=pr[1],Lr=pr[2],dr=pr[3],cr=!!(Be!==!1&&It&&Rt),jr=mt.useMemo(function(){return Object.values(Lr.maps).reduce(function(ur,br){return ur+br},0)},[Lr.id,Lr.maps]),$t=cr&&le&&(Math.max(Rt*le.length,jr)>It||!!$e),$n=tn==="rtl",Zn=Et()(Xt,(0,zt.Z)({},"".concat(Xt,"-rtl"),$n),re),Dr=le||Ce,Vr=(0,mt.useRef)(),Ur=(0,mt.useRef)(),ai=(0,mt.useRef)(),qn=(0,mt.useState)(0),zn=(0,Bt.Z)(qn,2),Ye=zn[0],Ve=zn[1],He=(0,mt.useState)(0),Fn=(0,Bt.Z)(He,2),On=Fn[0],Qn=Fn[1],yn=(0,mt.useState)(!1),Nn=(0,Bt.Z)(yn,2),en=Nn[0],Xe=Nn[1],Dn=function(){Xe(!0)},Oe=function(){Xe(!1)},ln={getKey:Yn};function En(ur){Ve(function(br){var Zr;typeof ur=="function"?Zr=ur(br):Zr=ur;var Br=Pr(Zr);return Vr.current.scrollTop=Br,Br})}var Gn=(0,mt.useRef)({start:0,end:Dr.length}),sn=(0,mt.useRef)(),dn=ut(Dr,Yn),An=(0,Bt.Z)(dn,1),er=An[0];sn.current=er;var ar=mt.useMemo(function(){if(!cr)return{scrollHeight:void 0,start:0,end:Dr.length-1,offset:void 0};if(!$t){var ur;return{scrollHeight:((ur=Ur.current)===null||ur===void 0?void 0:ur.offsetHeight)||0,start:0,end:Dr.length-1,offset:void 0}}for(var br=0,Zr,Br,ti,eo=Dr.length,Or=0;Or<eo;Or+=1){var Er=Dr[Or],Mn=Yn(Er),xr=Lr.get(Mn),yi=br+(xr===void 0?Rt:xr);yi>=Ye&&Zr===void 0&&(Zr=Or,Br=br),yi>Ye+It&&ti===void 0&&(ti=Or),br=yi}return Zr===void 0&&(Zr=0,Br=0,ti=Math.ceil(It/Rt)),ti===void 0&&(ti=Dr.length-1),ti=Math.min(ti+1,Dr.length-1),{scrollHeight:br,start:Zr,end:ti,offset:Br}},[$t,cr,Ye,Dr,dr,It]),Xn=ar.scrollHeight,In=ar.start,Wn=ar.end,rr=ar.offset;Gn.current.start=In,Gn.current.end=Wn,mt.useLayoutEffect(function(){var ur=Lr.getRecord();if(ur.size===1){var br=Array.from(ur)[0],Zr=Dr[In];if(Zr){var Br=Yn(Zr);if(Br===br){var ti=Lr.get(br),eo=ti-Rt;En(function(Or){return Or+eo})}}}Lr.resetRecord()},[Xn]);var sr=mt.useState({width:0,height:It}),mr=(0,Bt.Z)(sr,2),cn=mr[0],Si=mr[1],Rr=function(br){Si({width:br.offsetWidth,height:br.offsetHeight})},pi=(0,mt.useRef)(),an=(0,mt.useRef)(),Rn=mt.useMemo(function(){return pe(cn.width,$e)},[cn.width,$e]),nr=mt.useMemo(function(){return pe(cn.height,Xn)},[cn.height,Xn]),fr=Xn-It,lr=(0,mt.useRef)(fr);lr.current=fr;function Pr(ur){var br=ur;return Number.isNaN(lr.current)||(br=Math.min(br,lr.current)),br=Math.max(br,0),br}var Xr=Ye<=0,zr=Ye>=fr,Kr=On<=0,Yr=On>=$e,wn=Dt(Xr,zr,Kr,Yr),ci=function(){return{x:$n?-On:On,y:Ye}},Sn=(0,mt.useRef)(ci()),Jr=(0,St.zX)(function(ur){if(We){var br=(0,ot.Z)((0,ot.Z)({},ci()),ur);(Sn.current.x!==br.x||Sn.current.y!==br.y)&&(We(br),Sn.current=br)}});function ni(ur,br){var Zr=ur;br?((0,xt.flushSync)(function(){Qn(Zr)}),Jr()):En(Zr)}function oi(ur){var br=ur.currentTarget.scrollTop;br!==Ye&&En(br),Ge==null||Ge(ur),Jr()}var Ui=function(br){var Zr=br,Br=$e?$e-cn.width:0;return Zr=Math.max(Zr,0),Zr=Math.min(Zr,Br),Zr},ji=(0,St.zX)(function(ur,br){br?((0,xt.flushSync)(function(){Qn(function(Zr){var Br=Zr+($n?-ur:ur);return Ui(Br)})}),Jr()):En(function(Zr){var Br=Zr+ur;return Br})}),si=Ft(cr,Xr,zr,Kr,Yr,!!$e,ji),gi=(0,Bt.Z)(si,2),Oo=gi[0],Ci=gi[1];se(cr,Vr,function(ur,br,Zr,Br){var ti=Br;return wn(ur,br,Zr)?!1:!ti||!ti._virtualHandled?(ti&&(ti._virtualHandled=!0),Oo({preventDefault:function(){},deltaX:ur?br:0,deltaY:ur?0:br}),!0):!1}),Qt($t,Vr,function(ur){En(function(br){return br+ur})}),(0,Tt.Z)(function(){function ur(Zr){var Br=Xr&&Zr.detail<0,ti=zr&&Zr.detail>0;cr&&!Br&&!ti&&Zr.preventDefault()}var br=Vr.current;return br.addEventListener("wheel",Oo,{passive:!1}),br.addEventListener("DOMMouseScroll",Ci,{passive:!0}),br.addEventListener("MozMousePixelScroll",ur,{passive:!1}),function(){br.removeEventListener("wheel",Oo),br.removeEventListener("DOMMouseScroll",Ci),br.removeEventListener("MozMousePixelScroll",ur)}},[cr,Xr,zr]),(0,Tt.Z)(function(){if($e){var ur=Ui(On);Qn(ur),Jr({x:ur})}},[cn.width,$e]);var or=function(){var br,Zr;(br=pi.current)===null||br===void 0||br.delayHidden(),(Zr=an.current)===null||Zr===void 0||Zr.delayHidden()},Me=ye(Vr,Dr,Lr,Rt,Yn,function(){return Nr(!0)},En,or);mt.useImperativeHandle(wt,function(){return{nativeElement:ai.current,getScrollInfo:ci,scrollTo:function(br){function Zr(Br){return Br&&(0,Re.Z)(Br)==="object"&&("left"in Br||"top"in Br)}Zr(br)?(br.left!==void 0&&Qn(Ui(br.left)),Me(br.top)):Me(br)}}}),(0,Tt.Z)(function(){if(Ke){var ur=Dr.slice(In,Wn+1);Ke(ur,Dr)}},[In,Wn,Dr]);var Ji=jt(Dr,Yn,Lr,Rt),qr=hn==null?void 0:hn({start:In,end:Wn,virtual:$t,offsetX:On,offsetY:rr,rtl:$n,getSize:Ji}),_r=at(Dr,In,Wn,$e,On,gr,Ae,ln),di=null;It&&(di=(0,ot.Z)((0,zt.Z)({},te?"height":"maxHeight",It),ve),cr&&(di.overflowY="hidden",$e&&(di.overflowX="hidden"),en&&(di.pointerEvents="none")));var Oi={};return $n&&(Oi.dir="rtl"),mt.createElement("div",(0,ae.Z)({ref:ai,style:(0,ot.Z)((0,ot.Z)({},ue),{},{position:"relative"}),className:Zn},Oi,Vn),mt.createElement(Ct.Z,{onResize:Rr},mt.createElement(Ze,{className:"".concat(Xt,"-holder"),style:di,ref:Vr,onScroll:oi,onMouseEnter:or},mt.createElement(z,{prefixCls:Xt,height:Xn,offsetX:On,offsetY:rr,scrollWidth:$e,onInnerResize:Nr,ref:Ur,innerProps:nn,rtl:$n,extra:qr},_r))),$t&&Xn>It&&mt.createElement(be,{ref:pi,prefixCls:Xt,scrollOffset:Ye,scrollRange:Xn,rtl:$n,onScroll:ni,onStartMove:Dn,onStopMove:Oe,spinSize:nr,containerSize:cn.height,style:un==null?void 0:un.verticalScrollBar,thumbStyle:un==null?void 0:un.verticalScrollBarThumb,showScrollBar:Un}),$t&&$e>cn.width&&mt.createElement(be,{ref:an,prefixCls:Xt,scrollOffset:On,scrollRange:$e,rtl:$n,onScroll:ni,onStartMove:Dn,onStopMove:Oe,spinSize:Rn,containerSize:cn.width,horizontal:!0,style:un==null?void 0:un.horizontalScrollBar,thumbStyle:un==null?void 0:un.horizontalScrollBarThumb,showScrollBar:Un}))}var ge=mt.forwardRef(Fe);ge.displayName="List";var xe=ge,ee=xe},7062:function(mn,gn,he){var ae=he(19637),Re=he(97573),ot=[he(96627)];mn.exports=ae.createStore(Re,ot)},96627:function(mn,gn,he){mn.exports=ae;function ae(){return he(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(mn){return mn<10?"0"+mn:mn}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(mn){return rx_escapable.lastIndex=0,rx_escapable.test(mn)?'"'+mn.replace(rx_escapable,function(gn){var he=meta[gn];return typeof he=="string"?he:"\\u"+("0000"+gn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+mn+'"'}function str(mn,gn){var he,ae,Re,ot,zt=gap,Bt,vt=gn[mn];switch(vt&&typeof vt=="object"&&typeof vt.toJSON=="function"&&(vt=vt.toJSON(mn)),typeof rep=="function"&&(vt=rep.call(gn,mn,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,he=0;he<ot;he+=1)Bt[he]=str(he,vt)||"null";return Re=Bt.length===0?"[]":gap?`[
|
|
`+gap+Bt.join(`,
|
|
`+gap)+`
|
|
`+zt+"]":"["+Bt.join(",")+"]",gap=zt,Re}if(rep&&typeof rep=="object")for(ot=rep.length,he=0;he<ot;he+=1)typeof rep[he]=="string"&&(ae=rep[he],Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));else for(ae in vt)Object.prototype.hasOwnProperty.call(vt,ae)&&(Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));return Re=Bt.length===0?"{}":gap?`{
|
|
`+gap+Bt.join(`,
|
|
`+gap)+`
|
|
`+zt+"}":"{"+Bt.join(",")+"}",gap=zt,Re}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(mn,gn,he){var ae;if(gap="",indent="",typeof he=="number")for(ae=0;ae<he;ae+=1)indent+=" ";else typeof he=="string"&&(indent=he);if(rep=gn,gn&&typeof gn!="function"&&(typeof gn!="object"||typeof gn.length!="number"))throw new Error("JSON.stringify");return str("",{"":mn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(mn,gn){var he,ae,Re=mn[gn];if(Re&&typeof Re=="object")for(he in Re)Object.prototype.hasOwnProperty.call(Re,he)&&(ae=walk(Re,he),ae!==void 0?Re[he]=ae:delete Re[he]);return reviver.call(mn,gn,Re)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(mn){return"\\u"+("0000"+mn.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(mn,gn,he){var ae=he(67039),Re=ae.slice,ot=ae.pluck,zt=ae.each,Bt=ae.bind,vt=ae.create,gt=ae.isList,Et=ae.isFunction,Ct=ae.isObject;mn.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 zt(arguments,function(Ht,Yt){Ft[Yt]=Ht}),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)){zt(dt,function(Ft){Pt._addPlugin(Ft)});return}var At=ot(this.plugins,function(Ft){return dt===Ft});if(!At){if(this.plugins.push(dt),!Et(dt))throw new Error("Plugins must be function values that return objects");var Dt=dt.call(this);if(!Ct(Dt))throw new Error("Plugins must return an object of function properties");zt(Dt,function(Ft,jt){if(!Et(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={},zt(ut,function(dt,Pt){Et(dt)&&(ut.raw[Pt]=Bt(ut,dt))}),zt(xt,function(dt){ut._addStorage(dt)}),zt(ft,function(dt){ut._addPlugin(dt)}),ut}},67039:function(mn,gn,he){var ae=Bt(),Re=vt(),ot=gt(),zt=typeof window!="undefined"?window:he.g;mn.exports={assign:ae,create:Re,trim:ot,bind:Et,slice:Ct,each:St,map:Tt,pluck:mt,isList:xt,isFunction:ft,isObject:z,Global:zt};function Bt(){return Object.assign?Object.assign:function(at,it,lt,ut){for(var dt=1;dt<arguments.length;dt++)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=Ct(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=Ct(arguments,1);return at.prototype=lt,ae.apply(this,[new at].concat(At))}}}function gt(){return String.prototype.trim?function(at){return String.prototype.trim.call(at)}:function(at){return at.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function Et(tt,at){return function(){return at.apply(tt,Array.prototype.slice.call(arguments,0))}}function Ct(tt,at){return Array.prototype.slice.call(tt,at||0)}function 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(mn,gn,he){mn.exports=[he(52496),he(16436),he(76673),he(35701),he(65578),he(65300)]},35701:function(mn,gn,he){var ae=he(67039),Re=ae.Global,ot=ae.trim;mn.exports={name:"cookieStorage",read:Bt,write:gt,each:vt,remove:Et,clearAll:Ct};var zt=Re.document;function Bt(Tt){if(!Tt||!St(Tt))return null;var mt="(?:^|.*;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(zt.cookie.replace(new RegExp(mt),"$1"))}function vt(Tt){for(var mt=zt.cookie.split(/; ?/g),xt=mt.length-1;xt>=0;xt--)if(ot(mt[xt])){var ft=mt[xt].split("="),z=unescape(ft[0]),tt=unescape(ft[1]);Tt(tt,z)}}function gt(Tt,mt){Tt&&(zt.cookie=escape(Tt)+"="+escape(mt)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function Et(Tt){!Tt||!St(Tt)||(zt.cookie=escape(Tt)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ct(){vt(function(Tt,mt){Et(mt)})}function St(Tt){return new RegExp("(?:^|;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(zt.cookie)}},52496:function(mn,gn,he){var ae=he(67039),Re=ae.Global;mn.exports={name:"localStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:Et};function ot(){return Re.localStorage}function zt(Ct){return ot().getItem(Ct)}function Bt(Ct,St){return ot().setItem(Ct,St)}function vt(Ct){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);Ct(zt(Tt),Tt)}}function gt(Ct){return ot().removeItem(Ct)}function Et(){return ot().clear()}},65300:function(mn){mn.exports={name:"memoryStorage",read:he,write:ae,each:Re,remove:ot,clearAll:zt};var gn={};function he(Bt){return gn[Bt]}function ae(Bt,vt){gn[Bt]=vt}function Re(Bt){for(var vt in gn)gn.hasOwnProperty(vt)&&Bt(gn[vt],vt)}function ot(Bt){delete gn[Bt]}function zt(Bt){gn={}}},16436:function(mn,gn,he){var ae=he(67039),Re=ae.Global;mn.exports={name:"oldFF-globalStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:Et};var ot=Re.globalStorage;function zt(Ct){return ot[Ct]}function Bt(Ct,St){ot[Ct]=St}function vt(Ct){for(var St=ot.length-1;St>=0;St--){var Tt=ot.key(St);Ct(ot[Tt],Tt)}}function gt(Ct){return ot.removeItem(Ct)}function Et(){vt(function(Ct,St){delete ot[Ct]})}},76673:function(mn,gn,he){var ae=he(67039),Re=ae.Global;mn.exports={name:"oldIE-userDataStorage",write:gt,read:Et,each:Ct,remove:St,clearAll:Tt};var ot="storejs",zt=Re.document,Bt=ft(),vt=(Re.navigator?Re.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function gt(z,tt){if(!vt){var at=xt(z);Bt(function(it){it.setAttribute(at,tt),it.save(ot)})}}function Et(z){if(!vt){var tt=xt(z),at=null;return Bt(function(it){at=it.getAttribute(tt)}),at}}function Ct(z){Bt(function(tt){for(var at=tt.XMLDocument.documentElement.attributes,it=at.length-1;it>=0;it--){var lt=at[it];z(tt.getAttribute(lt.name),lt.name)}})}function 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(!zt||!zt.documentElement||!zt.documentElement.addBehavior)return null;var z="script",tt,at,it;try{at=new ActiveXObject("htmlfile"),at.open(),at.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),at.close(),tt=at.w.frames[0].document,it=tt.createElement("div")}catch(lt){it=zt.createElement("div"),tt=zt.body}return function(lt){var ut=[].slice.call(arguments,0);ut.unshift(it),tt.appendChild(it),it.addBehavior("#default#userData"),it.load(ot),lt.apply(this,ut),tt.removeChild(it)}}},65578:function(mn,gn,he){var ae=he(67039),Re=ae.Global;mn.exports={name:"sessionStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:Et};function ot(){return Re.sessionStorage}function zt(Ct){return ot().getItem(Ct)}function Bt(Ct,St){return ot().setItem(Ct,St)}function vt(Ct){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);Ct(zt(Tt),Tt)}}function gt(Ct){return ot().removeItem(Ct)}function Et(){return ot().clear()}},93314:function(mn){"use strict";mn.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(mn){"use strict";mn.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(mn){"use strict";mn.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(mn){"use strict";mn.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(mn,gn,he){"use strict";he.d(gn,{Z:function(){return Et}});const ae=Ct=>typeof Ct=="object"&&Ct!=null&&Ct.nodeType===1,Re=(Ct,St)=>(!St||Ct!=="hidden")&&Ct!=="visible"&&Ct!=="clip",ot=(Ct,St)=>{if(Ct.clientHeight<Ct.scrollHeight||Ct.clientWidth<Ct.scrollWidth){const Tt=getComputedStyle(Ct,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)})(Ct)}return!1},zt=(Ct,St,Tt,mt,xt,ft,z,tt)=>ft<Ct&&z>St||ft>Ct&&z<St?0:ft<=Ct&&tt<=Tt||z>=St&&tt>=Tt?ft-Ct-mt:z>St&&tt<Tt||ft<Ct&&tt>Tt?z-St+xt:0,Bt=Ct=>{const St=Ct.parentElement;return St==null?Ct.getRootNode().host||null:St},vt=(Ct,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(Ct))throw new TypeError("Invalid target");const dt=document.scrollingElement||document.documentElement,Pt=[];let At=Ct;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:Ht,top:Yt,right:Ut,bottom:Vt,left:oe}=Ct.getBoundingClientRect(),{top:se,right:de,bottom:Se,left:Qt}=(be=>{const fe=window.getComputedStyle(be);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(Ct);let ne=tt==="start"||tt==="nearest"?Yt-se:tt==="end"?Vt+Se:Yt+Gt/2-se+Se,ye=at==="center"?oe+Ht/2-Qt+de:at==="end"?Ut+de:oe-Qt;const we=[];for(let be=0;be<Pt.length;be++){const fe=Pt[be],{height:pe,width:ce,top:Ce,right:ve,bottom:Fe,left:ge}=fe.getBoundingClientRect();if(z==="if-needed"&&Yt>=0&&oe>=0&&Vt<=Ft&&Ut<=Dt&&(fe===dt&&!ot(fe)||Yt>=Ce&&Vt<=Fe&&oe>=ge&&Ut<=ve))return we;const xe=getComputedStyle(fe),ee=parseInt(xe.borderLeftWidth,10),Kt=parseInt(xe.borderTopWidth,10),wt=parseInt(xe.borderRightWidth,10),Lt=parseInt(xe.borderBottomWidth,10);let Xt=0,re=0;const It="offsetWidth"in fe?fe.offsetWidth-fe.clientWidth-ee-wt:0,Rt="offsetHeight"in fe?fe.offsetHeight-fe.clientHeight-Kt-Lt:0,Wt="offsetWidth"in fe?fe.offsetWidth===0?0:ce/fe.offsetWidth:0,te="offsetHeight"in fe?fe.offsetHeight===0?0:pe/fe.offsetHeight:0;if(dt===fe)Xt=tt==="start"?ne:tt==="end"?ne-Ft:tt==="nearest"?zt(Nt,Nt+Ft,Ft,Kt,Lt,Nt+ne,Nt+ne+Gt,Gt):ne-Ft/2,re=at==="start"?ye:at==="center"?ye-Dt/2:at==="end"?ye-Dt:zt(jt,jt+Dt,Dt,ee,wt,jt+ye,jt+ye+Ht,Ht),Xt=Math.max(0,Xt+Nt),re=Math.max(0,re+jt);else{Xt=tt==="start"?ne-Ce-Kt:tt==="end"?ne-Fe+Lt+Rt:tt==="nearest"?zt(Ce,Fe,pe,Kt,Lt+Rt,ne,ne+Gt,Gt):ne-(Ce+pe/2)+Rt/2,re=at==="start"?ye-ge-ee:at==="center"?ye-(ge+ce/2)+It/2:at==="end"?ye-ve+wt+It:zt(ge,ve,ce,ee,wt+It,ye,ye+Ht,Ht);const{scrollLeft:ue,scrollTop:le}=fe;Xt=te===0?0:Math.max(0,Math.min(le+Xt/te,fe.scrollHeight-pe/te+Rt)),re=Wt===0?0:Math.max(0,Math.min(ue+re/Wt,fe.scrollWidth-ce/Wt+It)),ne+=le-Xt,ye+=ue-re}we.push({el:fe,top:Xt,left:re})}return we},gt=Ct=>Ct===!1?{block:"end",inline:"nearest"}:(St=>St===Object(St)&&Object.keys(St).length!==0)(Ct)?Ct:{block:"start",inline:"nearest"};function Et(Ct,St){if(!Ct.isConnected||!(xt=>{let ft=xt;for(;ft&&ft.parentNode;){if(ft.parentNode===document)return!0;ft=ft.parentNode instanceof ShadowRoot?ft.parentNode.host:ft.parentNode}return!1})(Ct))return;const Tt=(xt=>{const ft=window.getComputedStyle(xt);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(Ct);if((xt=>typeof xt=="object"&&typeof xt.behavior=="function")(St))return St.behavior(vt(Ct,St));const mt=typeof St=="boolean"||St==null?void 0:St.behavior;for(const{el:xt,top:ft,left:z}of vt(Ct,gt(St))){const tt=ft-Tt.top+Tt.bottom,at=z-Tt.left+Tt.right;xt.scroll({top:tt,left:at,behavior:mt})}}}}]);
|