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

1245 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[6913],{65363:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});var ht=at(67711),Dt=at(59301),oe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},ze=oe,De=at(7657),fe=function(Se,Le){return Dt.createElement(De.Z,(0,ht.Z)({},Se,{ref:Le,icon:ze}))},me=Dt.forwardRef(fe),ke=me},76618:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});var ht=at(67711),Dt=at(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},ze=oe,De=at(7657),fe=function(Se,Le){return Dt.createElement(De.Z,(0,ht.Z)({},Se,{ref:Le,icon:ze}))},me=Dt.forwardRef(fe),ke=me},66543:function(){"use strict"},59598:function(){"use strict"},21697:function(gn,cn){"use strict";cn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},45298:function(){"use strict"},20397:function(){"use strict";function gn(de,z,ee,ae){ee===void 0&&(ee=0),ae===void 0&&(ae=1/0),this._name=de,this._defaultValue=z,this._minimum=ee,this._maximum=ae}Object.defineProperty(gn.prototype,"name",{get:function(){return this._name},set:function(de){if(typeof de!="string"||de==="")throw new Error("Shape name must be a valid string.");this._name=de}}),Object.defineProperty(gn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("The default value must be a real number, not: "+de);this._defaultValue=de}}),Object.defineProperty(gn.prototype,"minimum",{get:function(){return this._minimum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Minimum must be a real number, not: "+de);this._minimum=de}}),Object.defineProperty(gn.prototype,"maximum",{get:function(){return this._maximum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Maximum must be a real number, not: "+de);this._maximum=de}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(de,z){var ee=go.Shape._FigureParameters[de];return ee?ee[z]:null},go.Shape.setFigureParameter=function(de,z,ee){if(!(ee instanceof gn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ae=go.Shape._FigureParameters[de];ae||(ae=[],go.Shape._FigureParameters[de]=ae),ae[z]=ee};var cn=[];function at(de,z){var ee=cn.pop();return ee===void 0?new go.Point(de,z):(ee.x=de,ee.y=z,ee)}function ht(){var de=cn.pop();return de===void 0?new go.Point:de}function Dt(de){cn.push(de)}function oe(de,z,ee,ae,ie,le,ue,ge,Pe){Pe||(Pe=new go.Point);var je=de-ee,Be=ie-ue,Fe=NaN,Ne=NaN;if(je===0)if(Be===0)de===ee&&(Fe=de,Ne=z);else{var Ae=(le-ge)/Be,Re=le-Ae*ie;Fe=de,Ne=Ae*Fe+Re}else if(Be===0){var We=(z-ae)/je,Ye=z-We*de;Fe=ie,Ne=We*Fe+Ye}else{var We=(z-ae)/je,Ae=(le-ge)/Be,Ye=z-We*de,Re=le-Ae*ie;Fe=(Re-Ye)/(We-Ae),Ne=We*Fe+Ye}return Pe.x=Fe,Pe.y=Ne,Pe}function ze(de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae){var Re=1-Pe,We=Pe,Ye=de*Re+ee*We,Ue=z*Re+ae*We,Ve=ee*Re+ie*We,ot=ae*Re+le*We,st=ie*Re+ue*We,ct=le*Re+ge*We,Pt=Ye*Re+Ve*We,$e=Ue*Re+ot*We,nt=Ve*Re+st*We,yt=ot*Re+ct*We,xt=Pt*Re+nt*We,wt=$e*Re+yt*We;je.x=Ye,je.y=Ue,Be.x=Pt,Be.y=$e,Fe.x=xt,Fe.y=wt,Ne.x=nt,Ne.y=yt,Ae.x=st,Ae.y=ct}var De=new go.Spot(.156,.156),fe=new go.Spot(.844,.844),me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new gn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=5),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=new go.Geometry().add(new go.PathFigure(ae,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-ae,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)).add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ae,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,ae)).add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(de,z,ee){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,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).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(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=ee/2,ae.endX=z,ae.endY=ee/2,ae}),go.Shape.defineFigureGenerator("LineV",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z/2,ae.startY=0,ae.endX=z/2,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!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,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(de,z,ee){var ae=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ae*z,(1-ae)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(de,z,ee){var ae=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ae,ae,ae,ae).close()));return ie.spot1=De,ie.spot2=fe,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=0,ae.endX=z,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Line2",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z,ae.startY=0,ae.endX=0,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Curve1",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,me*z,0,z,(1-me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,me*ee,(1-me)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,me*ee,me*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-me)*z,0,0,(1-me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(de,z,ee){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,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(de,z,ee){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,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new gn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.1:ae<-1?ae=-1:ae>1&&(ae=1);var ie=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z:ae>z&&(ae=z);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new gn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.2:ae<.5?ae=-.5:ae>.5&&(ae=.5);var ie=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new gn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=20:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var ke=[];function Ce(){var de=ke.pop();return de===void 0?[]:de}function Se(de){de.length=0,ke.push(de)}function Le(de){for(var z=Ce(),ee=.5,ae=.5,ie=Math.PI*1.5,le=0,ue=0;ue<de;ue++)le=2*Math.PI/de*ue+ie,z[ue]=new go.Point(ae+ee*Math.cos(le),ae+ee*Math.sin(le));return z.push(z[0]),z}function ve(de){var z=we(de),ee=Ce();ee[0]=z[0];for(var ae=1,ie=1;ae<z.length;ae+=2,ie+=3)ee[ie]=z[ae],ee[ie+1]=z[ae],ee[ie+2]=z[ae+1];return Se(z),ee}function we(de){for(var z=Le(de),ee=Ce(),ae=Math.floor(z.length/2),ie=z.length-1,le=de%2===0?2:1,ue=0;ue<ie;ue++){var ge=z[ue],Pe=z[ue+1],je=z[(ae+ue-1)%ie],Be=z[(ae+ue+le)%ie];ee[ue*2]=ge,ee[ue*2+1]=oe(ge.x,ge.y,je.x,je.y,Pe.x,Pe.y,Be.x,Be.y,new go.Point)}return ee[ee.length]=ee[0],Se(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(de,z,ee){var ae=Le(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(de,z,ee){var ae=Le(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(de,z,ee){var ae=Le(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(de,z,ee){var ae=Le(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(de,z,ee){var ae=Le(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(de,z,ee){var ae=Le(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(de,z,ee){var ae=Le(12),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(de,z,ee){var ae=we(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(de,z,ee){var ae=we(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(de,z,ee){var ae=we(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(de,z,ee){var ae=we(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(de,z,ee){var ae=we(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(de,z,ee){var ae=we(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(de,z,ee){var ae=ve(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(de,z,ee){var ae=ve(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(de,z,ee){var ae=ve(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(de,z,ee){var ae=ve(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(de,z,ee){var ae=ve(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(de,z,ee){var ae=ve(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new gn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new gn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ue=new go.PathFigure(0,0,!0);return le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,ae,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ie).close())),le.setSpots(0,0,1,1,ae,ie,-ae,-ie),le}),go.Shape.setFigureParameter("Ring",0,new gn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=8);var ie=z/2,le=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var ge=Math.max(ie-ae,0);return ge>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+ge,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ge,ge).close())),le.spot1=De,le.spot2=fe,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(de,z,ee){var ae=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ae*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close())).setSpots(ae/2,ae/2,1-ae/2,1-ae/2)}),go.Shape.setFigureParameter("Pie",0,new gn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new gn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=0),isNaN(ie)&&(ie=315);var le=ae%360;le<0&&(le+=360);var ue=ie%360,ge=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(ge,ge).add(new go.PathSegment(go.PathSegment.Arc,le,ue,ge,ge,ge,ge).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(de,z,ee){var ae=me/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,le*ee,z,(1-ae)*ee,(ie+ae)*z,(le+ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30);var ie=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var ie=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(de,z,ee){var ae=de?de.parameter1:NaN;if((isNaN(ae)||ae<0)&&(ae=30),z===0||ee===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=ee,ie}else{var le=z/2,ue=ee/2,ge=Math.atan2(ee,z),Pe=ae-Math.min(Math.cos(ge)*ae/2,le),je=ae-Math.min(Math.sin(ge)*ae/2,ue),ie=new go.Geometry,Be=new go.PathFigure(Pe,0,!0);return ie.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,0)),Be.add(new go.PathSegment(go.PathSegment.Line,z,je)),Be.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,z,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var ie=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new gn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new gn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-ae)*z,.25*ee,Math.abs(1-ae)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,me*z,0,z,(.5-me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+me/2)*ee,me*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var le=.2,ue=.3,ge=0,Pe=le*me;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue+.05)*z,(.5-Pe+ge-.02)*ee)),le=.2,ue=0,ge=-.3,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pe+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),le=.2,ue=-.3,ge=0,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue-.05)*z,(.5-Pe+ge-.02)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee).close()),ae.setSpots(.06,.33,.93,.68),ae}),go.Shape.defineFigureGenerator("YinYang",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ue=.5,ge=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,ge*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*ge,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),ge=.75,ie=new go.PathFigure((ue+le)*z,ge*ee,!0),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*ge,le*z,le*z).close()),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Peace",function(de,z,ee){var ae=.8535533905932737,ie=.5*z,le=.5*ee;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,le,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ie,ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ae*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure(ue*z,(ge-le)*ee);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),le=.4,ie=me*.4;var je=ht(),Be=ht(),Fe=ht(),Ne=ht();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.42,je,Be,Fe,Ne,Ne);var Ae=ht(),Re=ht(),We=ht();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.58,Ne,Ne,We,Ae,Re);var Ye=ht(),Ue=ht(),Ve=ht();ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.42,Ye,Ue,Ve,Ne,Ne);var ot=ht(),st=ht(),ct=ht();return ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.58,Ne,Ne,ct,ot,st),Pe.add(new go.PathSegment(go.PathSegment.Move,ct.x*z,ct.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,ot.x*z,ot.y*ee,st.x*z,st.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*ee,je.x*z,je.y*ee,Be.x*z,Be.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,ct.x*z,ct.y*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,Ve.x*z,Ve.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,We.x*z,We.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Ae.x*z,Ae.y*ee,Re.x*z,Re.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ve.x*z,Ve.y*ee,Ye.x*z,Ye.y*ee,Ue.x*z,Ue.y*ee).close()),Dt(je),Dt(Be),Dt(Fe),Dt(Ne),Dt(Ae),Dt(Re),Dt(We),Dt(Ye),Dt(Ue),Dt(Ve),Dt(ot),Dt(st),Dt(ct),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Fragile",function(de,z,ee){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*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).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*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30),ae>z&&(ae=z);var ie=(z-ae)/2,le=ie+ae;return new go.Geometry().add(new go.PathFigure(le,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=ht(),je=ht(),Be=ht(),Fe=ht(),Ne=new go.PathFigure((ue-le)*z,ge*ee,!1);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.44,Be,Fe,je,Pe,Pe),Ne.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee));var Ae=at(je.x,je.y);ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.56,Pe,Pe,je,Be,Fe);var Re=at(je.x,je.y);Ne.add(new go.PathSegment(go.PathSegment.Line,(Ae.x*.1+.95*.9)*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Re.x*.1+.9)*z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Re.x*.1+.9)*z,(Re.y*.1+.05*.9)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Re.x*z,Re.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),le=.35,ie=me*.35;var We=new go.PathFigure(ue*z,(ge-le)*ee,!1);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee));var Ye=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Ye),Dt(Pe),Dt(je),Dt(Be),Dt(Fe),Dt(Ae),Dt(Re),ae.spot1=new go.Spot(.202,.257),ae.spot2=new go.Spot(.792,.739),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("GenderFemale",function(de,z,ee){var ae=new go.Geometry,ie=.375,le=0,ue=-.125,ge=ie*me,Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,le=0,ue=-.125,ge=ie*me;var Pe=new go.PathFigure((1-.5+ie+le)*z,(.5+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee));var Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);return ae.add(Pe),ae.spot1=new go.Spot(.232,.136),ae.spot2=new go.Spot(.682,.611),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicImplies",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(de,z,ee){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,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(de,z,ee){var ae=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicTruth",function(de,z,ee){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,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(de,z,ee){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*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(de,z,ee){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*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new gn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new gn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-ae)*z,ue=(.5-ie/2)*ee,ge=(.5+ie/2)*ee,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,ht());return Pe.spot2=new go.Spot(Be.x,Be.y),Dt(Be),Pe}),go.Shape.setFigureParameter("Arrow2",0,new gn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new gn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=30),ae>z&&(ae=z);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var le=z-ae,ue=(ee-ie)/2,ge=ue+ie,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,ht());return Pe.spot2=new go.Spot(Be.x,Be.y),Dt(Be),Pe}),go.Shape.defineFigureGenerator("Chevron",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("DoubleArrow",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ae}),go.Shape.setFigureParameter("DoubleEndArrow",0,new gn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Pe=oe(0,.5,.3,0,0,ie/ee,.1,ie/ee,ht());return ue.spot1=new go.Spot(Pe.x,Pe.y),Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,Pe),ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new gn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new gn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close());var Fe=oe(0,.5,.3,ge/ee,0,le/ee,1,le/ee,ht());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Dt(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new gn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ht());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new gn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new gn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close()),je.spot1=new go.Spot(0,le/ee);var Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,ht());return je.spot2=new go.Spot(Fe.x,Fe.y),Dt(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new gn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.1);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(.2,.65,1,.65,0,1,1,.5,ht());return ie.spot2=new go.Spot(ue.x,ue.y),Dt(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new gn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(0,.65,1,.65,0,1,1,.5,ht());return ie.spot2=new go.Spot(ue.x,ue.y),Dt(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new gn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.4);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ht());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new gn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=50);var ie=(ee-ae)/2,le=ie+ae;ae>ee&&(ie=0,le=ee);var ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ht());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("SquareArrow",0,new gn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.7);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(ae,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(0,.9*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee).close()),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.97),ae}),go.Shape.defineFigureGenerator("Cone2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var le=new go.PathFigure(0,.9*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.82),ae}),go.Shape.defineFigureGenerator("Cube1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.5,.85),ae}),go.Shape.defineFigureGenerator("Cube2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.7,1),ae}),go.Shape.defineFigureGenerator("Cylinder1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,ae,(.5+le)*z,0,1*z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-me*ae,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,1*ee,0,ee-me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae));var ge=new go.PathFigure(z,ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*ae,1*z,2*ae-me*ae,(.5+le)*z,2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,ae,(.5-le)*z,2*ae,0,2*ae-me*ae)),ie.spot1=new go.Spot(0,0,0,2*ae),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ee-ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,(.5+le)*z,0,z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-me*ae,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,ee,0,ee-me*ae));var ge=new go.PathFigure(0,ee-ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*ae,0,ee-ae-me*ae,(.5-le)*z,ee-2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-ae,(.5+le)*z,ee-2*ae,z,ee-ae-me*ae)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*ae),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0));var ge=new go.PathFigure(ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,2*ae,.5*ee,ae+me*ae,0,2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,ee,2*ae,(.5+le)*ee,ae+me*ae,ee)),ie.spot1=new go.Spot(0,0,2*ae,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(z-ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0));var ge=new go.PathFigure(z-ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-2*ae,.5*ee,z-ae-me*ae,0,z-2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z-2*ae,(.5+le)*ee,z-ae-me*ae,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*ae,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.25*z,.25*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.408,.172),ae.spot2=new go.Spot(.833,.662),ae}),go.Shape.defineFigureGenerator("Prism2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("Pyramid1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Pyramid2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Actor",function(de,z,ee){var ae=new go.Geometry,ie=.2,le=.1,ue=me*ie,ge=me*le,Pe=.5,je=.1,Be=new go.PathFigure(Pe*z,(je+le)*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ie)*z,je*ee,(Pe-ue)*z,(je+le)*ee,(Pe-ie)*z,(je+ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-le)*ee,(Pe-ie)*z,(je-ge)*ee,(Pe-ue)*z,(je-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ie)*z,je*ee,(Pe+ue)*z,(je-le)*ee,(Pe+ie)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+le)*ee,(Pe+ie)*z,(je+ge)*ee,(Pe+ue)*z,(je+le)*ee));var Fe=.05,Ne=me*Fe;Pe=.05,je=.25;var Ae=new go.PathFigure(.5*z,.2*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Pe=.95,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Fe)*z,je*ee,(Pe+Ne)*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.825,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Fe=.05,Ne=me*Fe,Pe=.5,je=.7,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.175,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Fe=.05,Ne=me*Fe,Pe=.05,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee,(Pe-Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ae.spot1=new go.Spot(.2,.2),ae.spot2=new go.Spot(.8,.65),ae}),go.Shape.setFigureParameter("Card",0,new gn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var ie=new go.Geometry,le=new go.PathFigure(z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),ie.spot1=new go.Spot(0,ae),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var le=new go.PathFigure(.5*z,.5*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,.25),ae}),go.Shape.defineFigureGenerator("CreateRequest",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),ae}),go.Shape.defineFigureGenerator("Database",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+ie)*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+le)*ee)),ae.spot1=new go.Spot(0,.4),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("DataStorage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),ae.spot1=new go.Spot(.226,0),ae.spot2=new go.Spot(.81,1),ae}),go.Shape.defineFigureGenerator("DiskStorage",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("Display",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("DividedEvent",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=me*.2,ue=new go.PathFigure(0,.2*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*ee,(.2-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+le)*z,0,z,(.2-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+le)*ee,(.8+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-le)*z,ee,0,(.8+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var ge=new go.PathFigure(0,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("DividedProcess",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("Document",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("ExternalOrganization",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),ae}),go.Shape.defineFigureGenerator("ExternalProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(.1*z,.4*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("File",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.75*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Interrupt",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var le=new go.PathFigure(z,.5*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("InternalStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),ae}),go.Shape.defineFigureGenerator("Junction",function(de,z,ee){var ae=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=me*.5,ge=.5,Pe=new go.PathFigure(z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,ee,z,(ge+ue)*ee,(ge+ue)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*ee,(ge-ue)*z,ee,0,(ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,0,0,(ge-ue)*ee,(ge-ue)*z,0)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ge*ee,(ge+ue)*z,0,z,(ge-ue)*ee));var je=new go.PathFigure((le+ie)*z,(le+ie)*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*ee)),ae}),go.Shape.defineFigureGenerator("LinedDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var le=new go.PathFigure(.1*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),ae.spot1=new go.Spot(.1,0),ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("LoopLimit",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MagneticTape",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*ee,z,(le+ie)*ee,(le+ie)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.15,.15),ae.spot2=new go.Spot(.85,.8),ae}),go.Shape.defineFigureGenerator("ManualInput",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MessageFromUser",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("MicroformProcessing",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("MicroformRecording",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("MultiDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.8,.77),ae}),go.Shape.defineFigureGenerator("MultiProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var le=new go.PathFigure(.2*z,.1*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ae.spot1=new go.Spot(0,.2),ae.spot2=new go.Spot(.8,1),ae}),go.Shape.defineFigureGenerator("OfflineStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var ge=new go.PathFigure(.5*ie*z,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),ae}),go.Shape.defineFigureGenerator("OffPageConnector",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("Or",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var ge=new go.PathFigure(z,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ae}),go.Shape.defineFigureGenerator("PaperTape",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=new go.Spot(0,.49),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Procedure",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-ie)*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ae}),go.Shape.defineFigureGenerator("Process",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Sort",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(0,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.5),ae}),go.Shape.defineFigureGenerator("Start",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ae.spot1=new go.Spot(ie,0),ae.spot2=new go.Spot(1-ie,1),ae}),go.Shape.defineFigureGenerator("Terminator",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),ae.spot1=new go.Spot(.23,0),ae.spot2=new go.Spot(.77,1),ae}),go.Shape.defineFigureGenerator("TransmittalTape",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("AndGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+ie)*z,0,z,(.5-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+ie)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.55,1),ae}),go.Shape.defineFigureGenerator("Buffer",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Clock",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var ge=new go.PathFigure(z,le*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Pe=new go.PathFigure(.8*z,.75*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),ae}),go.Shape.defineFigureGenerator("Ground",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ae}),go.Shape.defineFigureGenerator("Inverter",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.9,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var je=new go.PathFigure((ue+le)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.4,.75),ae}),go.Shape.defineFigureGenerator("NandGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.4,ue=me*.1,ge=.1,Pe=.9,je=.5,Be=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+ie)*z,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,0)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-le)*ee));var Fe=new go.PathFigure((Pe+ge)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z,je*ee,(Pe-ue)*z,(je+ge)*ee,(Pe-ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z,je*ee,(Pe+ue)*z,(je-ge)*ee,(Pe+ge)*z,(je-ue)*ee)),ae.spot1=new go.Spot(0,.05),ae.spot2=new go.Spot(.55,.95),ae}),go.Shape.defineFigureGenerator("NorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var je=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.6,.75),ae}),go.Shape.defineFigureGenerator("OrGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(0,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(ge-ie)*ee,.8*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(ge+le)*ee,(ue+le+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("XnorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.8*z,.5*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var Be=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.65,.75),ae}),go.Shape.defineFigureGenerator("XorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.2*z,0,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(ge-ie)*ee,.9*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.8,.75),ae}),go.Shape.defineFigureGenerator("Capacitor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Resistor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Inductor",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.1,ge=.5,Pe=new go.PathFigure((ue-ie*.5)*z,ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.3,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.5,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.7,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.9,Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),ae}),go.Shape.defineFigureGenerator("ACvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,ge*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,ge*ee,ue*z,(ge-le)*ee,ue*z,(ge+le)*ee)),ae}),go.Shape.defineFigureGenerator("DCvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Diode",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Wifi",function(de,z,ee){var ae=new go.Geometry,ie=z,le=ee;z=z*.38,ee=ee*.6;var ue=me*.8,ge=.8,Pe=0,je=.5,Be=(ie-z)/2,Fe=(le-ee)/2,Ne=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.4,ge=.4,Pe=.2,je=.5;var Ae=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.2,ge=.2,Pe=.5,je=.5;var Re=new go.PathFigure((Pe-ge)*z+Be,je*ee+Fe,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),ue=me*.4,ge=.4,Pe=.8,je=.5;var We=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ue=me*.8,ge=.8,Pe=1,je=.5;var Ye=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);return ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ae}),go.Shape.defineFigureGenerator("Email",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Ethernet",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,ee,!0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var ge=new go.PathFigure(0,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Power",function(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=ht(),je=ht(),Be=ht(),Fe=ht();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe);var Ne=at(je.x,je.y),Ae=new go.PathFigure(je.x*z,je.y*ee,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),ze(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),ie=me*.3,le=.3,ze(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee).close());var Ae=new go.PathFigure(.45*z,0,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Dt(Pe),Dt(je),Dt(Be),Dt(Fe),Dt(Ne),ae.spot1=new go.Spot(.25,.45),ae.spot2=new go.Spot(.75,.8),ae}),go.Shape.defineFigureGenerator("Fallout",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,ge,Pe){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+ge)*z,(.8+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+ge)*z,(.8+Pe)*ee).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),ae}),go.Shape.defineFigureGenerator("IrritationHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ae.spot1=new go.Spot(.3,.3),ae.spot2=new go.Spot(.7,.7),ae}),go.Shape.defineFigureGenerator("ElectricalHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ae}),go.Shape.defineFigureGenerator("FireHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),ae.spot1=new go.Spot(.07,.445),ae.spot2=new go.Spot(.884,.958),ae}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=0,ue=0,ge=ie*me,Pe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,Be=1,Fe=.5,Ne=.5,Ae=0,Re=new go.PathFigure(Pe*z,(1-je)*ee,!1);return ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,Fe*ee,Be*z,.7*ee,Be*z,Fe*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+le)*z,(Ae+le)*ee,(.5+ie+le)*z,(.5-ge+le)*ee,(.5+ge+le)*z,(.5-ie+le)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,.9*ee)),Re.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Re.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Re.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var ie=new go.PathFigure(0,.2*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var le=new go.PathFigure(.45*z,.73*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,ge=.5,Pe=ue,je=Math.PI/4,Be=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=Be*.5,Ne=ue,Ae=ue,Re=Be*Ne,We=Be*Ae;le.add(new go.PathSegment(go.PathSegment.Bezier,(ge-Ne)*z,Pe*ee,(ge-(Re+Ne)/2)*z,(Pe+(Ae+We)/2)*ee,(ge-Ne)*z,(Pe+We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,(Pe-Ae)*ee,(ge-Ne)*z,(Pe-We)*ee,(ge-Re)*z,(Pe-Ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ge+Ne)*z,Pe*ee,(ge+Re)*z,(Pe-Ae)*ee,(ge+Ne)*z,(Pe-We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ge+Ne)*z,(Pe+We)*ee,(ge+(Re+Ne)/2)*z,(Pe+(Ae+We)/2)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var Ye=new go.PathFigure(.2*z,ee,!1);ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var Ue=new go.PathFigure(.8*z,ee,!1);return ae.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var le=new go.PathFigure(.2*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventError",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Caution",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,le*z,le*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),ae}),go.Shape.defineFigureGenerator("Recycle",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var le=new go.PathFigure(.475*z,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=new go.PathFigure(z,ie*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+le)*ee,(ie+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-le)*z,ee,0,(ie+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*ee,(ie-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+le)*z,0,z,(ie-le)*ee));var ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Package",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,.15*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),ae.spot1=new go.Spot(0,.1),ae.spot2=new go.Spot(1,1),ae}),go.Shape.defineFigureGenerator("Class",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Component",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var le=new go.PathFigure(0,.2*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ae}),go.Shape.defineFigureGenerator("Boat Shipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var le=new go.PathFigure(.15*z,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Customer/Supplier",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Workcell",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Supermarket",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ae}),go.Shape.defineFigureGenerator("TruckShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,ge=me*.1,Pe=.2,je=.9,Be=new go.PathFigure((Pe-ue)*z,je*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ue=.1,ge=me*.1,Pe=.8,je=.9;var Fe=new go.PathFigure((Pe-ue)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ae}),go.Shape.defineFigureGenerator("KanbanPost",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ae}),go.Shape.defineFigureGenerator("Forklift",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var ge=new go.PathFigure(.5*z,.7*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Pe=.1,je=me*.1,Be=.1,Fe=.9,Ne=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),Pe=.1,je=me*.1,Be=.4,Fe=.9;var Ae=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),ae}),go.Shape.defineFigureGenerator("RailShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var le=new go.PathFigure(.45*z,.7*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Be=.05,Fe=me*.05,Ne=.175,Ae=.95,ge=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.375,Ae=.95,Pe=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.625,Ae=.95,je=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.825,Ae=.95,Re=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee).close());var We=new go.PathFigure(0,ee,!1);return ae.add(We),We.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Warehouse",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var ge=.05,Pe=me*.05,je=.35,Be=.775,Fe=new go.PathFigure((je-ge)*z,Be*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be-ge)*ee,(je-ge)*z,(Be-Pe)*ee,(je-Pe)*z,(Be-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+ge)*z,Be*ee,(je+Pe)*z,(Be-ge)*ee,(je+ge)*z,(Be-Pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be+ge)*ee,(je+ge)*z,(Be+Pe)*ee,(je+Pe)*z,(Be+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-ge)*z,Be*ee,(je-Pe)*z,(Be+ge)*ee,(je-ge)*z,(Be+Pe)*ee).close()),ae}),go.Shape.defineFigureGenerator("ControlCenter",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),ae}),go.Shape.defineFigureGenerator("Bluetooth",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Globe",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),ae}),go.Shape.defineFigureGenerator("Wave",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Operator",function(de,z,ee){var ae=new go.Geometry,ie=.3,le=me*.3,ue=.5,ge=.7,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(0,.7*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),ae}),go.Shape.defineFigureGenerator("TripleFanBlades",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("CentrifugalPump",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae}),go.Shape.defineFigureGenerator("Battery",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var le=new go.PathFigure(0,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Delete",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(.15*z,.5*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Flag",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),ae}),go.Shape.defineFigureGenerator("Help",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),ie=.05,le=me*.05,ue=.5,ge=.8;var je=new go.PathFigure((ue-ie)*z,ge*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),ae}),go.Shape.defineFigureGenerator("Location",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),ae}),go.Shape.defineFigureGenerator("Unlocked",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),ae}),go.Shape.defineFigureGenerator("Gear",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Map",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("Eject",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var le=new go.PathFigure(0,ee*.6,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),ae}),go.Shape.defineFigureGenerator("Pencil",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var le=new go.PathFigure(.126*z,.85*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var ge=new go.PathFigure(.678*z,.85*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Pe=new go.PathFigure(.5*z,.1*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),ae}),go.Shape.defineFigureGenerator("Staircase",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ae}),go.Shape.defineFigureGenerator("5Bars",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var le=new go.PathFigure(z*.204,ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var ge=new go.PathFigure(z*.612,ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Pe=new go.PathFigure(z*.816,ee,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),ae}),go.Shape.defineFigureGenerator("PC",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var ge=new go.PathFigure(z*.055,.18*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Pe=new go.PathFigure(z*1,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),ae}),go.Shape.defineFigureGenerator("Plane",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),ae}),go.Shape.defineFigureGenerator("Key",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),ae}),go.Shape.defineFigureGenerator("FilmTape",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var le=new go.PathFigure(0,0,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var ge=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Pe=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),ae}),go.Shape.defineFigureGenerator("FloppyDisk",function(de,z,ee){var ae=new go.Geometry,ie=8,le=ie*me,ue=new go.PathFigure(ie,0,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var ge=new go.PathFigure(z*.83,0,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Pe=new go.PathFigure(z*.83,ee*1,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var je=new go.PathFigure(z*.78,ee*.05,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("SpeechBubble",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=15),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=ee*.8,ue=new go.Geometry,ge=new go.PathFigure(ae,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le-ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,le,z,le-ie,z-ie,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),ge.add(new go.PathSegment(go.PathSegment.Line,ae,le)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,le-ae,ie,le,0,le-ie)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var le=new go.PathFigure(z*1,ee*.55,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),ae}),go.Shape.defineFigureGenerator("Windows",function(de,z,ee){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,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var le=new go.PathFigure(z*.1,ee*.2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),ae}),go.Shape.defineFigureGenerator("Beaker",function(de,z,ee){var ae=new go.Geometry,ie=15,le=ie*me,ue=new go.PathFigure(z*.62,ee*.475,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),le>1?(ae.spot1=new go.Spot(0,0,le,le),ae.spot2=new go.Spot(1,1,-le,-le)):(ae.spot1=go.Spot.TopLeft,ae.spot2=go.Spot.BottomRight),ae}),go.Shape.defineFigureGenerator("Download",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),ae}),go.Shape.defineFigureGenerator("Bin",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close()),ae}),go.Shape.defineFigureGenerator("Upload",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("EmptyDrink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),ae}),go.Shape.defineFigureGenerator("Drink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var le=new go.PathFigure(z*.235,ee*.28,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),ae}),go.Shape.defineFigureGenerator("4Arrows",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),ae}),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")},11081: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 gn={},cn="5.0",at={},ht=null,Dt=!1,oe=!1,ze=null,De=!1,fe=null,me=null,ke=0;ke<arguments.length;ke++){var Ce=arguments[ke];if(Ce!==null)switch(typeof Ce){case"number":cn=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?cn=Ce:ze=Ce;break;case"object":typeof Ce.is3D!="undefined"?ht=Ce:at=Ce;break;case"boolean":Dt=Ce,oe=!0;break}}ht===null&&(ht={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},at.material_id!==void 0&&!oe&&(Dt=!0)),ze!==null&&at.id===void 0&&(at.id=ze);var Se="",Le="",ve=!1,we=null,de=null,z=null,ee=!1,ae=null,ie=null,le=null,ue=null,ge=null;at.height!==void 0&&(at.height=Math.round(at.height)),at.width!==void 0&&(at.width=Math.round(at.width));var Pe=function(dt){return parseFloat(dt)>4?parseFloat(dt):5};gn.setHTML5Codebase=function(dt,ft){me=dt,yt(dt,ft)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(dt,ft){var ut=parseFloat(dt);if(ut!==NaN&&ut<5){console.log("The GeoGebra HTML5 codebase version "+ut+" is deprecated. Using version latest instead.");return}fe=dt,nt(dt,ft)},gn.getHTML5CodebaseVersion=function(){return de},gn.getParameters=function(){return at},gn.setFontsCSSURL=function(dt){ue=dt},gn.setGiacJSURL=function(dt){},gn.setJNLPFile=function(dt){Se=dt},gn.setJNLPBaseDir=function(dt){},gn.inject=function(){function dt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ft="auto",ut=at.id,Et,mt=!1,vt=0;vt<arguments.length;vt++){var kt=arguments[vt];typeof kt=="string"?(kt=kt.toLowerCase(),kt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ft=kt:ut=arguments[vt]):typeof kt=="boolean"?mt=kt:kt instanceof HTMLElement&&(Et=kt)}pt();function pt(){if(!De){setTimeout(pt,200);return}ft=Pt(ft);var Qe=Et||document.getElementById(ut);if(!Qe){console.log("possibly bug on ajax loading? ");return}if(gn.removeExistingApplet(Qe,!1),at.width===void 0&&Qe.clientWidth&&(at.width=Qe.clientWidth),at.height===void 0&&Qe.clientHeight&&(at.height=Qe.clientHeight),!(at.width&&at.height)&&ft==="html5"&&(delete at.width,delete at.height),we=ft,ft==="screenshot")Ue(Qe,at);else{var Ke=!1;at.hasOwnProperty("playButton")&&at.playButton||at.hasOwnProperty("clickToLoad")&&at.clickToLoad?Ke=!0:at.hasOwnProperty("playButtonAutoDecide")&&at.playButtonAutoDecide&&(Ke=(!je()||dt())&&Be()),Ke?(we="screenshot",ot(Qe,at,mt,ft)):Ye(Qe,at,mt)}}};function je(){try{return window.self!==window.top}catch(dt){return!0}}function Be(){return at.hasOwnProperty("screenshotGenerator")&&at.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return ht},gn.isJavaInstalled=function(){return!1};var Fe=function(dt){var ft=function(vt){var kt=JSON.parse(vt),pt=function(xe){return xe.type=="G"||xe.type=="E"},Qe=kt.elements?kt.elements.filter(pt)[0]:kt;if(!Qe||!Qe.url){ut();return}at.fileName=Qe.url,Ne(Qe.settings||{}),ht.is3D=!0;var Ke="https://www.geogebra.org/images/";gn.setPreviewImage(ae||Qe.previewUrl,Ke+"GeoGebra_loading.png",Ke+"applet_play.png"),dt()},ut=function(){at.onError&&at.onError(),xt("Error: Fetching material (id "+at.material_id+") failed.",at)},Et=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",mt="/materials/"+at.material_id+"?scope=basic";Ae("https://"+Et+"/api/proxy.php?path="+encodeURIComponent(mt),ft,ut)};function Ne(dt){var ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ut){dt[ut]=!!dt[ut]}),ft.forEach(function(ut){at[ut]===void 0&&dt[ut]!==void 0&&(at[ut]=dt[ut])}),at.showToolBarHelp===void 0&&(at.showToolBarHelp=at.showToolBar)}function Ae(dt,ft,ut){var Et=new XMLHttpRequest;Et.open("GET",dt),Et.onload=function(){ft(Et.responseText)},Et.onerror=ut,Et.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return we},gn.setPreviewImage=function(dt,ft,ut){ae=dt,ie=ft,le=ut},gn.removeExistingApplet=function(dt,ft){var ut;typeof dt=="string"&&(dt=document.getElementById(dt)),we=null;var Et=null;for(ut=0;ut<dt.childNodes.length;ut++){var mt=dt.childNodes[ut],vt=mt.className;vt==="applet_screenshot"?ft?(mt.style.display="block",we="screenshot"):mt.style.display="none":vt!=="applet_scaler prerender"&&(dt.removeChild(mt),Et=vt&&vt.indexOf("appletParameters")!=-1?mt.id:null,ut--)}var kt=at.id!==void 0?at.id:Et,pt=window[kt];pt&&typeof pt.getBase64=="function"&&(pt.remove(),window[kt]=null)},gn.refreshHitPoints=function(){if(Pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var dt=gn.getAppletObject();return dt&&typeof dt.recalculateEnvironments=="function"?(dt.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var dt=gn.getAppletObject();return dt&&typeof dt.startAnimation=="function"?(dt.startAnimation(),!0):!1},gn.stopAnimation=function(){var dt=gn.getAppletObject();return dt&&typeof dt.stopAnimation=="function"?(dt.stopAnimation(),!0):!1},gn.getAppletObject=function(){var dt=at.id!==void 0?at.id:"ggbApplet";return window[dt]},gn.resize=function(){};var Re=function(dt,ft,ut){var Et=document.createElement("param");Et.setAttribute("name",ft),Et.setAttribute("value",ut),dt.appendChild(Et)},We=function(dt){return dt&&dt!=="false"},Ye=function(dt,ft,ut){Pe(de)<=4.2&&(ut=!0);var Et=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Et=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var mt=document.createElement("div");mt.classList.add("appletParameters","notranslate");var vt=ft.width,kt=ft.height;if(ft.disableAutoScale=ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ft.disableAutoScale,ft.width!==void 0)if(Pe(de)<=4.4)We(ft.showToolBar)&&(ft.height-=7),We(ft.showAlgebraInput)&&(ft.height-=37),ft.width<605&&We(ft.showToolBar)&&(ft.width=605,vt=605);else{var pt=100;(We(ft.showToolBar)||We(ft.showMenuBar))&&(ft.hasOwnProperty("customToolBar")&&(ft.customToolbar=ft.customToolBar),pt=We(ft.showMenuBar)?245:155),vt<pt&&(ft.width=pt,vt=pt)}mt.style.border="none",mt.style.display="inline-block";for(var Qe in ft)ft.hasOwnProperty(Qe)&&Qe!=="appletOnLoad"&&mt.setAttribute("data-param-"+Qe,ft[Qe]);ue&&mt.setAttribute("data-param-fontscssurl",ue),gn.resize=function(){GGBAppletUtils.responsiveResize(dt,ft)},window.addEventListener("resize",function(Ot){gn.resize()});var Ke=typeof ft.appletOnLoad=="function"?ft.appletOnLoad:function(){};if(!ut&&ft.width!==void 0){ft.hasOwnProperty("showSplash")||mt.setAttribute("data-param-showSplash","false");var xe=dt.querySelector(".applet_scaler.prerender"),Me=xe!==null;if(Me)var Ze=xe.querySelector(".ggb_preview");else{var Ze=ct(vt,kt,ft.borderColor,!1);xe=document.createElement("div"),xe.className="applet_scaler",xe.style.position="relative",xe.style.display="block",xe.style.width=vt+"px",xe.style.height=kt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(xe,"66%"),Pe(de)>=5?(ft.appletOnLoad=function(Ot){var Rt=dt.querySelector(".ggb_preview");Rt&&Rt.parentNode.removeChild(Rt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(xe),window.GGBT_wsf_view&&$(window).trigger("resize"),Ke(Ot)},Me||xe.appendChild(Ze)):mt.appendChild(Ze),xe.appendChild(mt),Me||dt.appendChild(xe),setTimeout(function(){gn.resize()},1)}else{var tt=document.createElement("div");tt.className="applet_scaler",tt.style.position="relative",tt.style.display="block",tt.appendChild(mt),dt.appendChild(tt),ft.appletOnLoad=function(Ot){gn.resize(),Ke(Ot)}}function Ie(Ot,Rt){Rt&&typeof Rt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ot,Rt.appletOnLoad):renderGGBElement(Ot),xt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Rt)}function _e(Ot,Rt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ot,params:Rt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function($t){Ie($t.article,$t.params)}),html5AppletsToProcess=null)},Pe(de)<5&&(Ot.className+=" geogebraweb")):Ie(Ot,Rt)}if(Et){scriptLoadStarted=!0;for(var He=0;He<mt.childNodes.length;He++){var rt=mt.childNodes[He].tagName;rt==="TABLE"&&(mt.removeChild(mt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var St=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');St!=null&&St.parentNode.removeChild(St)}var Ct=document.createElement("script"),Nt=function(){_e(mt,ft)};Ct.src=Le+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=de,ggbHTML5LoadedScript=Ct.src,xt("GeoGebra HTML5 codebase loaded: '"+Le+"'.",ft),!me&&(!fe||fe=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Nt()):Le.requirejs?__webpack_require__.e(981).then(function(){var Ot=[__webpack_require__(60981)];Nt.apply(null,Ot)}.bind(this)).catch(__webpack_require__.oe):(Ct.onload=Nt,dt.appendChild(Ct))}else _e(mt,ft);ft.height=kt,ft.width=vt},Ue=function(dt,ft,ut){var Et=ct(ft.width,ft.height,ft.borderColor,ut),mt=document.createElement("div");mt.style.position="relative",mt.style.display="block",mt.style.width=ft.width+"px",mt.style.height=ft.height+"px",mt.className="applet_screenshot applet_scaler"+(ut?" applet_screenshot_play":""),mt.appendChild(Et);var vt=GGBAppletUtils.getScale(ft,dt,ut);ut?(dt.appendChild(st()),window.GGBT_wsf_view||(dt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(mt,"66%"),dt.appendChild(mt),vt!==1&&!isNaN(vt)&&(GGBAppletUtils.scaleElement(mt,vt),mt.style.width=ft.width+"px",mt.style.height=ft.height+"px",mt.parentNode.style.width=ft.width*vt+"px",mt.parentNode.style.height=ft.height*vt+"px"),gn.resize=function(){Ve(dt,Et,mt,ut)},window.addEventListener("resize",function(kt){gn.resize()}),gn.resize()};function Ve(dt,ft,ut,Et){if(dt.contains(ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(dt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(dt)}var mt=GGBAppletUtils.getScale(at,dt,Et);ut.parentNode!==null&&(!isNaN(mt)&&mt!==1?(GGBAppletUtils.scaleElement(ut,mt),ut.parentNode.style.width=at.width*mt+"px",ut.parentNode.style.height=at.height*mt+"px"):(GGBAppletUtils.scaleElement(ut,1),ut.parentNode.style.width=at.width+"px",ut.parentNode.style.height=at.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(dt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(dt,ft){ft.appendChild(dt)};var ot=function(dt,ft,ut,Et){Ue(dt,ft,!0);for(var mt=function(){var pt=[];for(kt=0;kt<dt.childNodes.length;kt++)pt.push(dt.childNodes[kt]);if(window.GGBT_wsf_view){var Qe=window.GGBT_wsf_view.renderFullScreen(dt,ft.id),Ke=document.getElementById("fullscreencontainer"),xe=jQuery(dt).find(".fullscreencontent");xe.length>0?(Qe.remove(),xe.attr("id","fullscreencontent").show(),jQuery(Ke).append(xe),window.dispatchEvent(new Event("resize"))):Ye(Qe,ft,!1),window.GGBT_wsf_view.launchFullScreen(Ke)}else we=Et,Ye(dt,ft,!1);if(!window.GGBT_wsf_view)for(kt=0;kt<pt.length;kt++)dt.removeChild(pt[kt])},vt=dt.getElementsByClassName("ggb_preview_play"),kt=0;kt<vt.length;kt++)vt[kt].addEventListener("click",mt,!1),vt[kt].addEventListener("ontouchstart",mt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(dt),Be()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},st=function(){var dt=document.createElement("div");if(dt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ft='.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");}',ut=document.createElement("style");ut.styleSheet?ut.styleSheet.cssText=ft:ut.appendChild(document.createTextNode(ft)),document.getElementsByTagName("head")[0].appendChild(ut)}return dt},ct=function(dt,ft,ut,Et){var mt=document.createElement("div");mt.className="ggb_preview",mt.style.position="absolute",mt.style.zIndex="90",mt.style.width=dt-2+"px",mt.style.height=ft-2+"px",mt.style.top="0px",mt.style.left="0px",mt.style.overflow="hidden",mt.style.backgroundColor="white";var vt="lightgrey";ut!==void 0&&(ut==="none"?vt="transparent":vt=ut),mt.style.border="1px solid "+vt;var kt=document.createElement("img");if(kt.style.position="relative",kt.style.zIndex="1000",kt.style.top="-1px",kt.style.left="-1px",ae!==null&&kt.setAttribute("src",ae),kt.style.opacity=.7,ie!==null){var pt,Qe,Ke;if(!Et){pt=document.createElement("img"),pt.style.position="absolute",pt.style.zIndex="1001",pt.style.opacity=1,kt.style.opacity=.3,Qe=360,Qe>dt/4*3&&(Qe=dt/4*3),Ke=Qe/5.8,pt.setAttribute("src",ie),pt.setAttribute("width",Qe),pt.setAttribute("height",Ke);var xe=(dt-Qe)/2,Me=(ft-Ke)/2;pt.style.left=xe+"px",pt.style.top=Me+"px",mt.appendChild(pt)}}return mt.appendChild(kt),mt},Pt=function(dt){return dt=dt.toLowerCase(),dt==="html5"||dt==="screenshot"?dt:"html5"},$e=["web","webSimple","web3d","tablet","tablet3d","phone"],nt=function(dt,ft){if(de=dt,ft){yt(de,!0);return}var ut=!Dt;if(ut){var Et=Pe(de);!isNaN(Et)&&Et<4.4&&(ut=!1)}var mt,vt;window.location.protocol.substr(0,4)==="http"?mt=window.location.protocol:mt="http:";var kt=de.indexOf("//");kt>0?vt=de:kt===0?vt=mt+de:vt="https://www.geogebra.org/apps/5.2.814.0/";for(var pt in $e)if(de.slice($e[pt].length*-1)===$e[pt]||de.slice(($e[pt].length+1)*-1)===$e[pt]+"/"){yt(vt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ut&&!ht.is3D&&!ht.AV&&!ht.SV&&!ht.CV&&!ht.EV2&&!ht.CP&&!ht.PC&&!ht.DA&&!ht.FI&&!ht.PV&&!We(at.showToolBar)&&!We(at.showMenuBar)&&!We(at.showAlgebraInput)&&!We(at.enableRightClick)&&(!at.appName||at.appName=="classic")?vt+="webSimple/":vt+="web3d/",yt(vt,!1)},yt=function(dt,ft){if(dt.requirejs){Le=dt;return}dt.slice(-1)!=="/"&&(dt+="/"),Le=dt,ft===null&&(ft=dt.indexOf("http")===-1),ve=ft,z="web.nocache.js",ee=!1;var ut=Le.split("/");ut.length>1&&(!ft&&ut[ut.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):$e.indexOf(ut[ut.length-2])>=0&&(z=ut[ut.length-2]+".nocache.js")),ut=dt.split("/"),de=ut[ut.length-3],de.substr(0,4)==="test"?de=de.substr(4,1)+"."+de.substr(5,1):(de.substr(0,3)==="war"||de.substr(0,4)==="beta")&&(de="5.0");var Et=parseFloat(de);Et!==NaN&&Et<5&&dt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Et+" is deprecated. Using version latest instead."),nt("5.0",ft))},xt=function(dt,ft){window.console&&window.console.log&&(!ft||typeof ft.showLogging=="undefined"||ft.showLogging&&ft.showLogging!=="false")&&console.log(dt)};at.material_id!==void 0?Fe(wt):wt();function wt(){var dt=cn;fe!==null?dt=fe:parseFloat(dt)<5&&(dt="5.0"),nt(dt,!1),me!==null&&yt(me,ve),De=!0}return gn},GGBAppletUtils=function(){"use strict";function gn(){return window.GGBT_wsf_edit!==void 0}function cn(De,fe){fe!=1?(De.style.transformOrigin="0% 0% 0px",De.style.webkitTransformOrigin="0% 0% 0px",De.style.transform="scale("+fe+","+fe+")",De.style.webkitTransform="scale("+fe+","+fe+")",De.style.maxWidth="initial",De.querySelector(".ggb_preview")!==null&&(De.querySelector(".ggb_preview").style.maxWidth="initial"),De.querySelectorAll(".ggb_preview img")[0]!==void 0&&(De.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),De.querySelectorAll(".ggb_preview img")[1]!==void 0&&(De.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(De.style.transform="none",De.style.webkitTransform="none")}function at(De,fe,me,ke,Ce,Se){var Le=null;if(Se!=null&&Se!="")for(var ve=De.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+Se+" ")>-1){Le=ve;break}else ve=ve.parentNode;var we=0,de=0,z=0,ee=0,ae=0,ie=0,le=0;if(Le)we=Le.offsetWidth,de=Math.max(ke?Le.offsetWidth:0,Le.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(we=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),z=we):(we=window.innerWidth,de=window.innerHeight,z=window.innerWidth),De){var ue=De.getBoundingClientRect();ue.left>0&&ue.left<=we&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=we-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,ae=z<=480?10:30),ee=ie+ae)}if(De&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ge=De.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return De&&((me===void 0||!me)&&fe>0&&fe+ee<we?we=fe:we-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(me===void 0||!me)&&(de-=le)),{width:we,height:de}}function ht(De,fe,me,ke,Ce){if(De.isScreenshoGenerator)return 1;var Se=ke!==void 0&&ke,Le=De.noScaleMargin!=null&&De.noScaleMargin,ve=function(ge){return ge&&ge!=="false"},we=ve(De.autoHeight),de=at(fe,De.width,me,we,Se&&window.GGBT_wsf_view||Le,Ce),z=parseInt(de.width),ee=De.width,ae=De.height;if(ee===void 0){var ie=fe.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,ae=ie.offsetHeight)}var le=z/ee,ue=Se?1:de.height/ae;return me!==void 0&&!me&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function Dt(De,fe,me){var ke=1,Ce,Se=!1;if(De.hasOwnProperty("allowUpscale")&&(Se=De.allowUpscale),De.hasOwnProperty("scale")&&(ke=parseFloat(De.scale),(isNaN(ke)||ke===null||ke===0)&&(ke=1),ke>1&&(Se=!0)),fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(De.hasOwnProperty("disableAutoScale")&&De.disableAutoScale))Ce=ht(De,fe,Se,me,De.scaleContainerClass);else return ke;return Se&&(!De.hasOwnProperty("scale")||ke===1)?Ce:Math.min(ke,Ce)}function oe(De){var fe=Math.min(window.innerWidth,document.documentElement.clientWidth),me=Math.min(window.innerHeight,document.documentElement.clientHeight),ke=De.getBoundingClientRect(),Ce=(fe-ke.width)/2,Se=(me-ke.height)/2;Se<0&&(Se=0),De.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?De.style.left="40px":De.style.left=Ce+"px",De.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?De.style.top="40px":De.style.top=Se+"px",De.style.left=Ce+"px")}function ze(De,fe){var me=De.querySelector(".appletParameters");if(me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!==me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(De)}if(me.parentElement&&/fullscreen/.test(me.parentElement.className))return;var ke=Dt(fe,De);gn()&&me.setAttribute("data-param-scale",ke);for(var Ce=null,Se=0;Se<De.childNodes.length;Se++)if(De.childNodes[Se].className!==void 0&&De.childNodes[Se].className.match(/^applet_scaler/)){Ce=De.childNodes[Se];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var Le=fe.id!==void 0?fe.id:"ggbApplet",ve=window[Le];(ve==null||!ve.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(ke)&&ke!==1?(Ce.parentNode.style.width=fe.width*ke+"px",Ce.parentNode.style.height=fe.height*ke+"px",cn(Ce,ke)):(cn(Ce,1),Ce.parentNode.style.width=fe.width+"px",Ce.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe(De),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(me).parents(".content-added-content"))}}return{responsiveResize:ze,isFlexibleWorksheetEditor:gn,positionCenter:oe,getScale:Dt,scaleElement:cn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var gn=n.location.search;return gn.indexOf(J)!=-1||gn.indexOf(K)!=-1}function q(gn,cn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(gn){var cn=s[L].bindings;s[L].bindings=function(){for(var at=cn?cn():{},ht=gn[webModule.__softPermutationId],Dt=O;Dt<ht.length;Dt++){var oe=ht[Dt];at[oe[O]]=oe[P]}return at}};var t;function u(){return v(),t}function v(){if(!t){var gn=o.createElement(Q);if(gn.id=L,gn.style.cssText=R+S,gn.tabIndex=-1,o.body.appendChild(gn),t=gn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var cn=document.compatMode==U?V:W;t.write(cn+X),t.close()}}}function w(gn){function cn(ht){function Dt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Dt();if(oe){ht();return}function ze(){if(!oe){if(!Dt())return;oe=!0,ht(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),De&&clearInterval(De)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var De=setInterval(function(){ze()},$)}function at(ht){var Dt=u(),oe=Dt.body,ze=Dt.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=ht,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+ht))}),oe.appendChild(ze)}cn(function(){at(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var cn=u(),at=cn.body,ht=cn.createElement(_);ht.language=ab,ht.text=gn,at.appendChild(ht),at.removeChild(ht)};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(gn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(gn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(gn){var cn=c[gn];return cn==null?null:cn},r=d,webModule.__errFn=e}function B(){function gn(De){var fe=De.lastIndexOf(rb);fe==-1&&(fe=De.length);var me=De.indexOf(sb);me==-1&&(me=De.length);var ke=De.lastIndexOf(tb,Math.min(me,fe));return ke>=O?De.substring(O,ke+P):W}function cn(De){if(!De.match(/^\w+:\/\//)){var fe=o.createElement(ub);fe.src=De+vb,De=gn(fe.src)}return De}function at(){var De=__gwt_getMetaProperty(wb);return De!=null?De:W}function ht(){for(var De=o.getElementsByTagName(_),fe=O;fe<De.length;++fe)if(De[fe].src.indexOf(xb)!=-1)return gn(De[fe].src);return W}function Dt(){var De=o.getElementsByTagName(yb);return De.length>O?De[De.length-P].href:W}function oe(){var De=o.location;return De.href==De.protocol+zb+De.host+De.pathname+De.search+De.hash}var ze=at();return ze==W&&(ze=ht()),ze==W&&(ze=Dt()),ze==W&&oe()&&(ze=gn(o.location.href)),ze=cn(ze),ze}function C(gn){return gn.match(/^\//)||gn.match(/^[a-zA-Z]+:\/\//)?gn:webModule.__moduleBase+gn}function D(){var gn=[],cn=O,at=[],ht=[];function Dt(De){var fe=ht[De](),me=at[De];if(fe in me)return fe;var ke=[];for(var Ce in me)ke[me[Ce]]=Ce;throw r&&r(De,ke,fe),null}if(__gwt_isKnownPropertyValue=function(De,fe){return fe in at[De]},webModule.__getPropMap=function(){var De={};for(var fe in at)at.hasOwnProperty(fe)&&(De[fe]=Dt(fe));return De},webModule.__computePropValue=Dt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var ze=oe.indexOf(Db);ze!=-1&&(cn=parseInt(oe.substring(ze+P),$),oe=oe.substring(O,ze))}catch(De){}return webModule.__softPermutationId=cn,C(oe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function(gn,cn,at){"use strict";at.d(cn,{Ax:function(){return ze},Ds:function(){return De},KI:function(){return me},SI:function(){return oe},f1:function(){return Dt}});var ht=at(90524);function Dt(ke){let Ce=!0;if(ke.length>0){for(let Se=0;Se<ke.length;Se++)if(ke[Se].compile_success==0||!ke[Se].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function oe(ke,Ce=""){let Se=[];for(let Le=0;Le<ke.length;Le++){let ve=ke[Le],we=Ce?`${Ce}/${ve.name}`:`${ve.name}`;Se.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:we})}return Se}function ze(ke,Ce,Se){for(let Le=0;Le<ke.length;Le++){let ve=ke[Le];if(ve.key===Ce){ve.children=Se;break}ve.children&&ze(ve.children,Ce,Se)}return ke}function De(ke,Ce,Se){let Le;return function(){let ve=this,we=arguments,de=function(){Le=null,Se||ke.apply(ve,we)},z=Se&&!Le;clearTimeout(Le),Le=setTimeout(de,Ce),z&&ke.apply(ve,we)}}const fe=!0,me=ht.Z.API_SERVER},6077:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Le}});var ht=at(59301),Dt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=at(92310),ze=at.n(oe),De=at(29787),fe=at(2859),me=at(82093),ke=at(49661),Ce=(ve,we,de)=>new Promise((z,ee)=>{var ae=ue=>{try{le(de.next(ue))}catch(ge){ee(ge)}},ie=ue=>{try{le(de.throw(ue))}catch(ge){ee(ge)}},le=ue=>ue.done?z(ue.value):Promise.resolve(ue.value).then(ae,ie);le((de=de.apply(ve,we)).next())}),Le=({data:ve,className:we,fullWidth:de,style:z={},onClose:ee,onOk:ae,showFullTools:ie,noAssociationId:le})=>{const ue=(0,ht.useRef)(null),ge=(0,ht.useRef)(null),Pe=(0,ht.useRef)(null),je=(0,ht.useRef)(null),[Be,Fe]=(0,ht.useState)(!1),[Ne,Ae]=(0,ht.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ht.useEffect)(()=>(Pe.current||(Pe.current=document.createElement("style"),document.head.appendChild(Pe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),Pe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Re()):(document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)),()=>{document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)}),[ve==null?void 0:ve.visible]);const Re=()=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ve=yield(0,ke.ZJ)(ve==null?void 0:ve.src);ue.current.src="",ue.current.src=Ve,ue.current.onload=function(){Ue()},Fe(!1),Ae("")}),We=Ve=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Ve.dataUrl}});ot!=null&&ot.id&&!le?(yield(0,me.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:ot==null?void 0:ot.id,settings:JSON.stringify(Ve.state)}})).status===0&&ae():ot!=null&&ot.id&&ae(ot),Fe(!1),Ae("")}),Ye=()=>{const Ve=document.querySelector('a[href="https://markerjs.com/"]');Ve&&Ve.parentNode&&(Ve.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(st=>{const ct=document.querySelector(st.name);ct&&ct.setAttribute("title",st.title)})},Ue=()=>{ge.current=new fe.hP(ue.current),ge.current.targetRoot=je.current,ge.current.addEventListener("render",We),ge.current.addEventListener("beforeclose",ee),ie&&(ge.current.availableMarkerTypes=ge.current.ALL_MARKER_TYPES,ge.current.uiStyleSettings.redoButtonVisible=!0,ge.current.uiStyleSettings.notesButtonVisible=!0,ge.current.uiStyleSettings.zoomButtonVisible=!0,ge.current.uiStyleSettings.zoomOutButtonVisible=!0,ge.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ge.current.uiStyleSettings,ge.current.show(),ve!=null&&ve.snapshotData&&ge.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return ht.createElement(ht.Fragment,null,(ve==null?void 0:ve.visible)&&ht.createElement(De.Z,{spinning:Be,tip:Ne,style:{position:"absolute",width:"100vw"}},ht.createElement("div",{ref:je,className:ze()(Dt.imageDimensions,we,de?Dt.fullWidth:""),style:z},ht.createElement("img",{className:Dt.img,ref:ue}))))}},88615:function(gn,cn,at){"use strict";var ht=at(59301),Dt=at(77019),oe=at(5269),ze=at(20554),De=at(99571),fe=at(3713),me=at(21697),ke=at(48136),Ce=at(59301);const Se=(0,ht.forwardRef)(({callback:Le,showSaveButton:ve,value:we=""},de)=>{const z=(0,ht.useRef)(),ee=[{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 "}]}]}],ae=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],ie=ge=>{z.current.setValue(z.current.getValue()+" "+ge.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(Dt.Z,{className:me.Z.lists,gutter:[10,10]},ee.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:`$$${ge.value}$$`}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},Ce.createElement("h1",null,je.name),Ce.createElement(Dt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(Dt.Z,{className:me.Z.lists,gutter:[10,10]},ae.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:"`$$"+ge.value+"$$`"}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},je.name&&Ce.createElement("h1",null,je.name),Ce.createElement(Dt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ue=()=>{var ge=document.createElement("div");ge.innerHTML=z.current.getValue();var Pe=ge.innerText;return Le&&Le(Pe),Pe};return(0,ht.useImperativeHandle)(de,()=>({getData:ue})),Ce.createElement("div",{className:me.Z.mathWrap},Ce.createElement(ze.default,{defaultActiveKey:"1",items:le}),Ce.createElement("math-field",{locale:"zh_cn",className:me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},we||""),ve&&Ce.createElement("div",{className:me.Z.button},Ce.createElement(De.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});cn.Z=Se},57884:function(gn,cn,at){"use strict";var ht=at(59301),Dt=at(93314),oe=at(99571),ze=Object.defineProperty,De=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Se=(de,z,ee)=>z in de?ze(de,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):de[z]=ee,Le=(de,z)=>{for(var ee in z||(z={}))ke.call(z,ee)&&Se(de,ee,z[ee]);if(me)for(var ee of me(z))Ce.call(z,ee)&&Se(de,ee,z[ee]);return de},ve=(de,z)=>De(de,fe(z));const we=({img:de,buttonProps:z={},styles:ee={},customText:ae,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:ge,imgStyles:Pe,loading:je=!1,className:Be=""})=>ht.createElement("section",{className:`tc animated fadeIn ${Be}`,style:Le({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},ee)},ht.createElement("img",{src:de||Dt,style:ve(Le({},Pe),{pointerEvents:"none",userSelect:"none"})}),ht.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&ht.createElement(oe.ZP,Le({className:ue,onClick:le},z),ie),ge&&ge);cn.Z=we},41550:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var ht=at(59301),Dt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=at(99571),ze=at(70557),De=at(51124),fe=at(25399),me=at(49661),ke=at(72664),Ce=at(57884),Se=at(90524),Le=at(14794),ve=at(59301),we=Object.defineProperty,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(ge,Pe,je)=>Pe in ge?we(ge,Pe,{enumerable:!0,configurable:!0,writable:!0,value:je}):ge[Pe]=je,ie=(ge,Pe)=>{for(var je in Pe||(Pe={}))z.call(Pe,je)&&ae(ge,je,Pe[je]);if(de)for(var je of de(Pe))ee.call(Pe,je)&&ae(ge,je,Pe[je]);return ge},le=(ge,Pe,je)=>new Promise((Be,Fe)=>{var Ne=We=>{try{Re(je.next(We))}catch(Ye){Fe(Ye)}},Ae=We=>{try{Re(je.throw(We))}catch(Ye){Fe(Ye)}},Re=We=>We.done?Be(We.value):Promise.resolve(We.value).then(Ne,Ae);Re((je=je.apply(ge,Pe)).next())}),ue=({editOffice:ge="view",data:Pe,issaver:je,onSaver:Be,theme:Fe,type:Ne,filename:Ae,monacoEditor:Re,className:We,style:Ye,close:Ue,onClose:Ve,hasMask:ot,disabledDownload:st,onImgDimensions:ct,showNodata:Pt,recordInfo:$e})=>{const[nt,yt]=(0,ht.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[xt,wt]=(0,ht.useState)(""),[dt,ft]=(0,ht.useState)(),ut=window.ENV==="build"?"/react/build":"",Et=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,vt=10*(1024*1024),kt=(0,ht.useRef)();Pe!=null&&Pe.startsWith("/api")&&Ne!=="txt"&&(Pe=Se.Z.API_SERVER+Pe);const pt=Ze=>Ze.substring(Ze.lastIndexOf("/")+1).split(".").pop();Ae&&Re&&(Re.filename=Ae),(0,ht.useEffect)(()=>{var Ze,tt;const Ie=(tt=(Ze=document.cookie)==null?void 0:Ze.replace(/\s/g,""))==null?void 0:tt.split(";");Ie==null||Ie.map(_e=>{let He=_e.split("=");He[0]==="_educoder_session"&&wt(He[1])})},[]),(0,ht.useEffect)(()=>{Ne==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?ft({url:Pe,fileType:pt(Pe),model:Pe.indexOf("model=edit")?"edit":"view"}):Ke())},[Ne,Pe]);function Qe(Ze){return le(this,null,function*(){Ze.data.type==="pdfdata"&&(Be(Ze.data.data),window.removeEventListener("message",Qe,!1)),console.log("mess---:",Ze.data)})}const Ke=()=>le(void 0,null,function*(){console.log("data:",Pe);let Ze=Pe;Pe.startsWith("http")||(Ze=location.origin+Ze);let tt=new URL(Ze).pathname.split("/").pop();const Ie=yield(0,ke.gJ)({attachment_id:tt});Ie.url=Et+Ie.url,ft(Ie)}),xe=()=>{if(Pe.startsWith("http")||Pe.startsWith("blob:")){Me();return}(0,me.Sv)(Ae||"educoder",Pe,Ae)},Me=()=>{$e&&(0,Le.fc)({id:$e==null?void 0:$e.id,watch_type:1,course_id:$e==null?void 0:$e.course_id}),(0,me.Nd)(Ae||"educoder",decodeURIComponent(Pe))};return ve.createElement("div",{style:ie({},Ye||{}),className:`${ot&&Dt.bgBlack} ${Ne?Dt.wrp:"hide"}`},Ue&&ve.createElement("div",{className:Dt.close,ref:kt},!!ct&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>kt.current},ve.createElement("span",{onClick:()=>{Ve(),ct()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!st&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>kt.current},ve.createElement("span",{onClick:Me},ve.createElement("i",{className:"icon-quxiaozhiding"}))),je&&ve.createElement(fe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>kt.current},ve.createElement("span",{className:"",onClick:()=>{const Ze=document.getElementById("pdfiframe");window.addEventListener("message",Qe,!1),setTimeout(()=>{Ze.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(fe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>kt.current},ve.createElement("span",{className:"",onClick:()=>{Ve()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${Dt[We]} ${We} ${Dt.monaco} ${Ne==="txt"?"show":"hide"}`},Ne==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(De.ZP,ie({},Re)))),Ne==="audio"&&ve.createElement("audio",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pe}`,autoPlay:!0}),Ne==="video"&&ve.createElement(ve.Fragment,null,(Pe==null?void 0:Pe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${Pe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pe}`,autoPlay:!0})),Ne==="office"&&dt&&ve.createElement("iframe",{src:`${ut}/office.html?key=${dt.key}&url=${btoa(dt.url)}&callbackUrl=${Et+(dt.callbackUrl||"")}&fileType=${dt.fileType}&title=${dt.title||""}&model=${ge}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!st}`}),Ne==="html"&&ve.createElement("iframe",{src:Pe+"&disposition=inline"}),Ne==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ut}/js/pdfview/index.html?filename=${Ae||"educoder.pdf"}&url=${encodeURIComponent(Pe)}&disabledDownload=${!!st}&model=${ge}`}),Ne==="image"&&ve.createElement("img",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pe}`}),(Ne==="other"||Ne==="download")&&ve.createElement(ve.Fragment,null,Pt?ve.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(oe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:xe,disabled:st},"\u4E0B\u8F7D")}):ve.createElement(oe.ZP,{type:"primary",size:"middle",onClick:xe,disabled:st},ve.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},3713:function(gn,cn,at){"use strict";at.d(cn,{z:function(){return Fe},Z:function(){return Ne}});var ht=at(59301),Dt=at(88831),oe=at(90290),ze=at(64018),De=at(81168),fe=at(90524),me=at(49661),ke=at(15342),Ce=at(1012),Se=at(41550),Le=at(59301),we=({html:Ae})=>{const Re=(0,ht.useRef)(null),We=(0,ht.useRef)(null),Ye=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,ht.useEffect)(()=>{const Ue=Re.current.attachShadow({mode:"open"});We.current=document.createElement("div"),We.current.className="markdown-body",We.current.innerHTML=Ae,Ue.appendChild(We.current);const Ve=document.createElement("style");return Ve.textContent=Ye,Ue.appendChild(Ve),()=>{Ue.innerHTML=""}},[]),(0,ht.useEffect)(()=>{We.current&&(We.current.innerHTML=Ae)},[Ae]),Le.createElement("div",{ref:Re})};function de(Ae){const Re=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],We=new RegExp(`\\b(${Re.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ae.replace(We,"").trim()}var z=Object.defineProperty,ee=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(Ae,Re,We)=>Re in Ae?z(Ae,Re,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ae[Re]=We,ue=(Ae,Re)=>{for(var We in Re||(Re={}))ae.call(Re,We)&&le(Ae,We,Re[We]);if(ee)for(var We of ee(Re))ie.call(Re,We)&&le(Ae,We,Re[We]);return Ae};const ge="@\u2581\u2581@",Pe="@\u2581@",je=/<pre[^>]*>/g;function Be(Ae){let Re=document.createElement("div");return Re.innerHTML=Ae,Re.childNodes.length===0?"":Re.childNodes[0].nodeValue}const Fe=(Ae,Re)=>{Ae=Ae||"";const We=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ve=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Re?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(We,(ot,st,ct,Pt,$e,nt,yt)=>{const xt=st||Pt||nt,wt=ct||$e||yt||"?";return fe.Z.API_SERVER+"/api/attachments/"+xt+wt+"&t="+(0,me.Jn)(xt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(Ve,(ot,st,ct,Pt,$e,nt,yt)=>{const xt=st||Pt||nt,wt=ct||$e||yt||"?";return fe.Z.API_SERVER+"/attachments/download/"+xt+wt+"&t="+(0,me.Jn)(xt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(We,(ot,st,ct,Pt,$e,nt,yt)=>{const xt=st||Pt||nt,wt=ct||$e||yt||"?";return fe.Z.API_SERVER+"/api/attachments/"+xt+wt+"&t="+(0,me.Jn)(xt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ye,(ot,st,ct,Pt,$e)=>{const nt=st||Pt,yt=ct||$e||"";return'"'+fe.Z.API_SERVER+"/api/attachments/"+nt+yt+nt+yt+"&t="+(0,me.Jn)(nt,Date.now())}).replace(Ue,(ot,st,ct,Pt,$e)=>{const nt=st||Pt,yt=ct||$e||"";return"("+fe.Z.API_SERVER+"/files/uploads/"+nt+yt+nt+yt+"&t="+(0,me.Jn)(nt,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,`
`),Ae)};var Ne=({value:Ae="",className:Re,showTextOnly:We,showLines:Ye,style:Ue={},stylesPrev:Ve={},highlightKeywords:ot,showProgramFill:st,isProgramFill:ct,disabledFill:Pt=!1,programFillValue:$e,onFillChange:nt=wt=>{},onFillBlur:yt=()=>{},onFillFocus:xt=()=>{}})=>{let wt=de(String(Ae||""));const[dt,ft]=(0,ht.useState)(""),[ut,Et]=(0,ht.useState)("office"),[mt,vt]=(0,ht.useState)([]),kt=(0,ht.useRef)("a"+(0,Ce.Z)()),pt={},Qe=Nt=>/<style[\s\S]*?>/i.test(Nt||""),Ke=(Nt,Ot,Rt)=>{const $t=document.createElement(Nt===Pe?"input":"textarea");$t.style.width="100%",$t.style.height=Nt===Pe?"40px":"151px",$t.rows=5,$t.spellcheck=!1,$t.name="edu-program-fill",$t.placeholder="\u8BF7\u8F93\u5165",$t.dataset.id=Ot;const qt=Object.keys(pt).length;return pt[qt]=$t,`<span class="edu-program-fill-wrap ${Nt===Pe?"":"show"}" style="width:${Nt===Pe?"600px":"100%"}" title=${Rt||""}><span>${$t.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function xe(Nt){return Nt=Nt.replace(/!\[.*?\]\(.*?\)/g,""),Nt=Nt.replace(/\[.*?\]\(.*?\)/g,""),Nt=Nt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Nt=Nt.replace(/<embed.*?>/g,""),Nt=Nt.replace(/<img.*?>/g,""),Nt=Nt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Nt=Nt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Nt=Nt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Nt=Nt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Nt}const Me=Nt=>!We&&Qe(wt)?Nt:Nt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ot,Rt){let $t=Rt.replace(/(\n|\r)/g,"").split("}"),qt=[];return $t.map(rn=>{rn!=""&&qt.push(`.${kt.current} ${rn}`)}),`<style>${qt.join("}")}</style>`}),Ze=(0,ht.useMemo)(()=>{try{const $t=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,qt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,rn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ht=/\(\/attachments\/download\//g;wt=wt.replace(Ht,"("+fe.Z.API_SERVER+"/attachments/download/").replace($t,"("+fe.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+fe.Z.API_SERVER+"/api/attachments/").replace(rn,'"'+fe.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($t){}if(st){let $t=-1;return wt=wt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(qt,rn,Ht){var sn;return++$t,Ke(qt,$t,(sn=$e==null?void 0:$e[$t])==null?void 0:sn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Me(wt||"")}</pre>`}let Nt=Me(wt);Nt=(0,oe.ZP)(Nt);const Ot=(0,oe.ez)();wt.match(/\[TOC\]/)&&(Nt=Nt.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),Nt=Nt.replace(/(__special_katext_id_\d+__)/g,($t,qt)=>{const{type:rn,expression:Ht}=Ot[qt];return(0,ke.renderToString)(Be(Ht)||"",{displayMode:rn==="block",throwOnError:!1,output:"html"})}),Nt=Nt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=Nt,We)return Rt.innerText;if(ot){const $t=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return He(Rt,$t),Rt.innerHTML}return setTimeout(()=>Ct(),500),Rt.innerHTML},[wt,ot]);(0,ht.useEffect)(()=>{rt.current&&rt.current.querySelectorAll(["input","textarea"]).forEach(Ot=>{Ot.oninput=tt,Ot.onblur=Ie,Ot.onfocus=_e})},[mt]),(0,ht.useEffect)(()=>{var Nt,Ot,Rt,$t,qt;if($e!=null&&$e.length)try{const rn=rt.current.querySelectorAll(".edu-program-fill-score"),Ht=rt.current.querySelectorAll('[name="edu-program-fill"]');for(const[sn,tn]of Ht.entries())tn.value=((Nt=$e==null?void 0:$e[sn])==null?void 0:Nt.value)||"",((Ot=$e==null?void 0:$e[sn])==null?void 0:Ot.type)==="warning"?tn.className="program-fill-warning":((Rt=$e==null?void 0:$e[sn])==null?void 0:Rt.type)==="success"?tn.className="program-fill-success":tn.className="";for(const[sn,tn]of rn.entries())tn.innerHTML=($t=$e==null?void 0:$e[sn])!=null&&$t.score?`${(qt=$e==null?void 0:$e[sn])==null?void 0:qt.score}\u5206`:"";vt($e)}catch(rn){console.log(rn,"error")}},[$e]);const tt=Nt=>{mt[Nt.target.dataset.id]=mt[Nt.target.dataset.id]||{},mt[Nt.target.dataset.id].value=Nt.target.value,vt([...mt]),nt(mt,Nt.target.dataset.id)},Ie=Nt=>{mt[Nt.target.dataset.id]=mt[Nt.target.dataset.id]||{},mt[Nt.target.dataset.id].value=Nt.target.value,vt([...mt]),yt(mt,Nt.target.dataset.id)},_e=Nt=>{mt[Nt.target.dataset.id]=mt[Nt.target.dataset.id]||{},mt[Nt.target.dataset.id].value=Nt.target.value,vt([...mt]),xt(mt,Nt.target.dataset.id)};function He(Nt,Ot){return Nt.childNodes.forEach(Rt=>{var $t;if(Rt.childNodes.length>0)He(Rt,Ot);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=($t=Rt.innerHTML)==null?void 0:$t.replace(new RegExp(Ot,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const qt=document.createElement("span");qt.innerHTML=Rt.textContent.replace(new RegExp(Ot,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(qt)}})}const rt=(0,ht.useRef)();oe.jb.WebkitLineClamp=Ye,Ye&&(Ue=ue(ue({},Ue),oe.jb));function St(Nt){let Ot=Nt.target;if(Ot.tagName.toUpperCase()==="A"){let Rt=Ot.getAttribute("href");if(Rt.indexOf("office")>-1)Nt.preventDefault(),ft(Rt),Et("office");else if(Rt.indexOf("application/pdf")>-1)Nt.preventDefault(),ft(Rt),Et("pdf");else if(Rt.indexOf("text/html")>-1)Nt.preventDefault(),ft(Rt),Et("html");else if(Rt.startsWith("#")){Nt.preventDefault();let $t=document.getElementById(Rt.replace("#",""));$t&&$t.scrollIntoView(!0)}}}const Ct=()=>{var Nt;const Ot=(Nt=rt.current)==null?void 0:Nt.querySelectorAll("video");Ot==null||Ot.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(De.ZP.isSupported()){var $t=new De.ZP;$t.loadSource(Rt.src),$t.attachMedia(Rt)}}})};return(0,ht.useEffect)(()=>{if(rt.current&&Ze&&Ze.match(je)&&window.PR.prettyPrint(),rt.current)return rt.current.addEventListener("click",St),()=>{var Nt;(Nt=rt.current)==null||Nt.removeEventListener("click",St),(0,oe.AL)(),(0,oe.Iy)()}},[Ze,rt.current,St]),(0,ht.useEffect)(()=>{var Nt;const Ot=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(Nt=rt.current)==null||Nt.addEventListener("copy",Ot),()=>{var Rt;(Rt=rt.current)==null||Rt.removeEventListener("copy",Ot)}},[rt.current]),ht.createElement(ht.Fragment,null,We&&ht.createElement("div",{ref:rt},Ze),!We&&!Qe(Ze)&&ht.createElement("div",{ref:rt,style:ue({},Ue),className:`${Re||""} ${Pt?"disabled-fill":""} markdown-body ${kt.current}`,dangerouslySetInnerHTML:{__html:Ze}}),!We&&Qe(Ze)&&ht.createElement(we,{html:Ze}),ht.createElement(Se.Z,{close:!0,data:dt,type:dt!=null&&dt.length?ut:"",style:ue({},Ve),onClose:()=>ft("")}))}},72015:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ze}});var ht=at(59301),Dt=at(33796),oe=at(59301),ze=({defaultX:De="40%",leftChild:fe,rightChild:me,className:ke,hideResize:Ce=!1})=>{const[Se,Le]=(0,ht.useState)(De),ve=(0,ht.useRef)();function we(){ve.current=!0}(0,ht.useEffect)(()=>{function ee(ie){ve.current&&(Dt.Z.publish("resize-move-bar",ie),Le(ie.pageX))}function ae(){ve.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",ae),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",ae)}},[]);const de=typeof Se=="number"&&Se!==.01?`${Se}px`:De,z=`calc(100% - ${Ce?"0px":"4px"} - ${de})`;return oe.createElement("div",{className:`split-panel-container ${ke}`},oe.createElement("section",{style:{width:de,display:Se===.01?"none":""}},fe),oe.createElement("section",{className:"resize-x-bar",onMouseDown:we},oe.createElement("a",{className:"btn-resize"},oe.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},oe.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),oe.createElement("section",{style:{width:z}},me))}},25992:function(gn,cn,at){"use strict";at.d(cn,{cT:function(){return Ne},pe:function(){return je}});var ht=at(59301),Dt=at(14566),oe=at(6767),ze=at(82093),De=at(28209),fe=at.n(De),me=at(1012),ke=at(76560),Ce=at(47257),Se=at.n(Ce),Le=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Re,We,Ye)=>We in Re?Le(Re,We,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Re[We]=Ye,ie=(Re,We)=>{for(var Ye in We||(We={}))z.call(We,Ye)&&ae(Re,Ye,We[Ye]);if(de)for(var Ye of de(We))ee.call(We,Ye)&&ae(Re,Ye,We[Ye]);return Re},le=(Re,We)=>ve(Re,we(We)),ue=(Re,We)=>{var Ye={};for(var Ue in Re)z.call(Re,Ue)&&We.indexOf(Ue)<0&&(Ye[Ue]=Re[Ue]);if(Re!=null&&de)for(var Ue of de(Re))We.indexOf(Ue)<0&&ee.call(Re,Ue)&&(Ye[Ue]=Re[Ue]);return Ye},ge=(Re,We,Ye)=>new Promise((Ue,Ve)=>{var ot=Pt=>{try{ct(Ye.next(Pt))}catch($e){Ve($e)}},st=Pt=>{try{ct(Ye.throw(Pt))}catch($e){Ve($e)}},ct=Pt=>Pt.done?Ue(Pt.value):Promise.resolve(Pt.value).then(ot,st);ct((Ye=Ye.apply(Re,We)).next())});const{Dragger:Pe}=Dt.default,je=Re=>{const We="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ue=fe().enc.Utf8.parse(We);let Ve=fe().enc.Utf8.parse(Ye);var ot=fe().AES.decrypt(Re,Ue,{iv:Ve,mode:fe().mode.CBC});return ot.toString(fe().enc.Utf8)};let Be;const Fe=Re=>ge(void 0,[Re],function*({identifier:We,oldFilename:Ye,newFilename:Ue}){var Ve,ot,st,ct,Pt,$e;const nt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});nt.data=JSON.parse(je(nt.data));const yt=new OSS({endpoint:(Ve=nt==null?void 0:nt.data)==null?void 0:Ve.end_point,region:(ot=nt==null?void 0:nt.data)==null?void 0:ot.region,accessKeyId:(st=nt==null?void 0:nt.data)==null?void 0:st.access_key_id,accessKeySecret:(ct=nt==null?void 0:nt.data)==null?void 0:ct.access_key_secret,bucket:(Pt=nt==null?void 0:nt.data)==null?void 0:Pt.bucket,stsToken:($e=nt==null?void 0:nt.data)==null?void 0:$e.security_token});return new Promise((xt,wt)=>{console.log(11111,`${We}/${Ye}`,`${We}/${Ue}`,nt.data),yt.copy(`/${We}/${Ye}`,`/${We}/${Ue}`).then(dt=>{console.log("\u62F7\u8D1D\u6210\u529F",dt)}).catch(dt=>{console.log(dt)})})}),Ne=(Re,We,Ye)=>ge(void 0,null,function*(){var Ue,Ve,ot,st,ct,Pt;We.file_name=Re.name;const $e=yield(0,ze.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",je($e.data)),$e.data=JSON.parse(je($e.data));const nt=Re.name.split(".");nt.pop();const yt=We.realFileName?nt.join(""):(0,me.Z)(),xt=new(Se())({endpoint:(Ue=$e==null?void 0:$e.data)==null?void 0:Ue.end_point,region:(Ve=$e==null?void 0:$e.data)==null?void 0:Ve.region,accessKeyId:(ot=$e==null?void 0:$e.data)==null?void 0:ot.access_key_id,accessKeySecret:(st=$e==null?void 0:$e.data)==null?void 0:st.access_key_secret,bucket:(ct=$e==null?void 0:$e.data)==null?void 0:ct.bucket,stsToken:(Pt=$e==null?void 0:$e.data)==null?void 0:Pt.security_token});return new Promise((wt,dt)=>{var ft;xt.multipartUpload(`${yt}`,new Blob([Re],{type:Re.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(ft=$e==null?void 0:$e.data)==null?void 0:ft.callback_url,host:$e==null?void 0:$e.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(We)}})).then(function(ut){var Et;Re.response=(Et=ut.data)==null?void 0:Et.data,wt(ut==null?void 0:ut.data)}).catch(function(ut){dt(ut),console.log("err:",ut)})})}),Ae=Re=>{var We=Re,{user:Ye,cancelUpload:Ue}=We,Ve=ue(We,["user","cancelUpload"]);const[ot,st]=(0,ht.useState)([]);let[ct,Pt]=(0,ht.useState)();const $e={onRemove:yt=>{st([...ot.filter(xt=>xt.name!==yt.name)]),Ve.onChange(ot.filter(xt=>xt.name!==yt.name))},disabled:Ve.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(yt=>yt.file),customRequest:()=>{},beforeUpload:yt=>ge(void 0,null,function*(){let xt=Ve.maxSize||1073741824;if(ot.filter(wt=>wt.name===yt.name).length){oe.ZP.info(`${yt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(yt==null?void 0:yt.size)>xt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${xt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:yt.name,file:yt}),st([...ot]),Ve.onChange(ot),!1)})},nt=(yt,xt)=>ge(void 0,null,function*(){var wt,dt,ft,ut,Et,mt;xt.file_name=yt.name;const vt=yt.name,kt=yield(0,ze.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(kt.data=JSON.parse(je(kt.data)),(kt==null?void 0:kt.status)!==0){ot[ot.findIndex(Ke=>Ke.name===vt)].status="error",ot[ot.findIndex(Ke=>Ke.name===vt)].file.status="error",Ve.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ct=new(Se())({endpoint:(wt=kt==null?void 0:kt.data)==null?void 0:wt.end_point,region:(dt=kt==null?void 0:kt.data)==null?void 0:dt.region,accessKeyId:(ft=kt==null?void 0:kt.data)==null?void 0:ft.access_key_id,accessKeySecret:(ut=kt==null?void 0:kt.data)==null?void 0:ut.access_key_secret,bucket:(Et=kt==null?void 0:kt.data)==null?void 0:Et.bucket,stsToken:(mt=kt==null?void 0:kt.data)==null?void 0:mt.security_token}),console.log(yt,"file"),Pt(ct);const pt=yt.name.split(".");pt.pop();const Qe=vt.indexOf(".")>-1?xt.realFileName?pt.join("."):(0,me.Z)():vt;return new Promise((Ke,xe)=>{var Me;try{ct.multipartUpload(`${Ve.identifier}/${Qe}${vt.indexOf(".")>-1?"."+vt.split(".").pop():""}`,new Blob([yt.file],{type:yt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ze,tt,Ie)=>{try{console.log("\u8FDB\u5EA6",Ze,tt,Ie);const _e=ot.findIndex(He=>He.name===vt);ot[_e].file.percent=Ze*100,ot[_e].tempCheckpoint=tt,st([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Ze=>Ze.name===vt)].tempCheckpoint,callback:{customValue:{id:vt+""},url:(Me=kt==null?void 0:kt.data)==null?void 0:Me.callback_url,host:kt==null?void 0:kt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(xt)}}).then(function(Ze){var tt,Ie,_e;const He=ot.findIndex(St=>St.name===vt);let rt="done";if(((tt=Ze.data)==null?void 0:tt.status)===0){yt.response=(Ie=Ze.data)==null?void 0:Ie.data;const St=ot.findIndex(Ct=>Ct.name===vt);ot[St].status="done",ot[St].file.status="done"}else oe.ZP.warning((_e=Ze.data)==null?void 0:_e.message),rt="error";ot[He].status=rt,ot[He].file.status=rt,Ve.onChange(ot),Ke(Ze==null?void 0:Ze.data)}).catch(function(Ze){ot[ot.findIndex(tt=>tt.name===vt)].status="error",ot[ot.findIndex(tt=>tt.name===vt)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),st([...ot]),Ve.onChange(ot),xe(Ze),console.log("err:",Ze)})}catch(Ze){}})});return(0,ht.useEffect)(()=>{ot.every(yt=>yt==="done"||yt==="error")&&Ve.onComplete(ot)},[ot]),(0,ht.useEffect)(()=>{Ue&&(ct==null||ct.cancel())},[Ue]),(0,ht.useEffect)(()=>{Ve.uploading&&ot.map(yt=>ge(void 0,null,function*(){var xt;if((!yt.status||yt.status==="error")&&!Ue){yt.status="uploading",yt.file.status="uploading";const wt=yield nt(yt,{login:(xt=Ye==null?void 0:Ye.userInfo)==null?void 0:xt.login,container_type:Ve.container_type,container_id:Ve.container_id,description:Ve.description,realFileName:Ve.realFileName})}}))},[Ve.uploading]),ht.createElement(Pe,le(ie({},$e),{height:Ve.height,className:Ve.className}),ht.createElement("p",{className:"ant-upload-hint"},Ve.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};cn.ZP=(0,ke.connect)(({loading:Re,globalSetting:We,user:Ye})=>({globalSetting:We,loading:Re.models.competitions,user:Ye}))(Ae)},44905:function(gn,cn,at){"use strict";at.d(cn,{h:function(){return ge}});var ht=at(59301),Dt=at(82326),oe=at(28284),ze=at(99571),De=at(89780),fe=at.n(De),me=at(66543),ke=at(59598),Ce=Object.defineProperty,Se=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,z=(Pe,je,Be)=>je in Pe?Ce(Pe,je,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Pe[je]=Be,ee=(Pe,je)=>{for(var Be in je||(je={}))we.call(je,Be)&&z(Pe,Be,je[Be]);if(ve)for(var Be of ve(je))de.call(je,Be)&&z(Pe,Be,je[Be]);return Pe},ae=(Pe,je)=>Se(Pe,Le(je));const ie=Dt.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},ue={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};cn.Z=({callback:Pe,onCancel:je})=>{const[Be,Fe]=(0,ht.useState)("python");function Ne(Re){Fe(ue[Re][1])}function Ae(Re){Pe(Re)}return ht.createElement(oe.default,ae(ee({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),ht.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ht.createElement(Dt.default,{getPopupContainer:Re=>Re.parentNode,onChange:Ne},Object.keys(ue).map(Re=>ht.createElement(ie,{key:Re,value:Re},ue[Re][0])))),ht.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ht.createElement(ge,{mode:Be})),ht.createElement("div",{className:"flex-container flex-end"},ht.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ht.createElement(ze.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function ge({value:Pe,onChange:je,mode:Be,options:Fe={}}){const Ne=(0,ht.useRef)(),[Ae,Re]=(0,ht.useState)();return(0,ht.useEffect)(()=>{if(Ae){let We=function(Ye){const Ue=Ye.getValue();je&&je(Ue)};return Ae.on("change",We),()=>{Ae.off("change",We)}}},[Ae,je]),(0,ht.useEffect)(()=>{Ae&&Ae.setOption("mode",Be)},[Ae,Be]),(0,ht.useEffect)(()=>{Ae&&(Pe!==Ae.getValue()||Pe==="")&&setTimeout(()=>{Ae.setValue(Pe||"")},300)},[Ae,Pe]),(0,ht.useEffect)(()=>{if(Ne.current&&!Ae){const We=fe().fromTextArea(Ne.current,ee({mode:Be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Re(We)}},[Ne.current,Ae]),ht.createElement("div",{className:"my-codemirror-container"},ht.createElement("textarea",{ref:Ne}))}},89389:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return uo}});var ht=at(59301),Dt=at(89780),oe=at.n(Dt),ze=at(76374),De=at(66543),fe=at(6313),me=at(25717),ke=at(99498),Ce=at(25419),Se=at(67549),Le=at(3713),ve=({value:on="",className:dn,showTextOnly:en,showLines:vn,style:fr={}})=>{const cr=(0,ht.useMemo)(()=>"",[on]);return ht.createElement(ht.Fragment,null,ht.createElement("div",{dangerouslySetInnerHTML:{__html:cr}}))},we=Object.defineProperty,de=Object.defineProperties,z=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(on,dn,en)=>dn in on?we(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:en}):on[dn]=en,ue=(on,dn)=>{for(var en in dn||(dn={}))ae.call(dn,en)&&le(on,en,dn[en]);if(ee)for(var en of ee(dn))ie.call(dn,en)&&le(on,en,dn[en]);return on},ge=(on,dn)=>de(on,z(dn));let Pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function je({onActionCallback:on,title:dn,icon:en,actionName:vn,className:fr="",children:cr}){function oi(){on(vn)}return ht.createElement("a",{title:dn,className:fr,onClick:oi},ht.createElement("i",{className:`${en}`}),cr)}var Be=({watch:on,showNullButton:dn,showNullProgramButton:en,onActionCallback:vn,fullScreen:fr,insertTemp:cr,hidetoolBar:oi,extraUse:an})=>{const Nn=[...Pe,{title:`${on?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${on?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ht.createElement("ul",{className:"markdown-toolbar-container"},!oi&&Nn.map((gr,Zr)=>ht.createElement("li",{key:Zr},gr.actionName?ht.createElement(je,ge(ue({},gr),{onActionCallback:vn})):ht.createElement("span",{className:"v-line"}))),dn?ht.createElement("li",null,ht.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:vn},ht.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,en?ht.createElement(ht.Fragment,null,ht.createElement("li",null,ht.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:vn},ht.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ht.createElement("li",null,ht.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:vn},ht.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,cr&&ht.createElement("li",null,ht.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${cr}`,onActionCallback:vn},ht.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),an&&ht.createElement("li",null,an),ht.createElement("li",{className:"btn-full-screen"},ht.createElement(je,{icon:`${fr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:vn})))},Fe=at(75790),Ne=at(28284),Ae=at(37568),Re=at(99571),We=Object.defineProperty,Ye=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,ct=(on,dn,en)=>dn in on?We(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:en}):on[dn]=en,Pt=(on,dn)=>{for(var en in dn||(dn={}))ot.call(dn,en)&&ct(on,en,dn[en]);if(Ve)for(var en of Ve(dn))st.call(dn,en)&&ct(on,en,dn[en]);return on},$e=(on,dn)=>Ye(on,Ue(dn));const nt={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:on,onCancel:dn})=>{function en(vn){on(vn)}return ht.createElement(Ne.default,$e(Pt({},nt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:en,style:{width:500}}),ht.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ht.createElement(Ae.default,null)),ht.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ht.createElement(Ae.default,null)),ht.createElement("div",{className:"flex-container flex-end"},ht.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ht.createElement(Re.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},xt=at(44905),wt=at(45596),dt=at(62957),ft=at(77019),ut=at(6077),Et=at(59301),mt=({callback:on,onCancel:dn})=>{const en=document.createElement("canvas"),vn=en.getContext("2d");en.width=1e3,en.height=800,vn.fillStyle="#ffffff",vn.fillRect(0,0,en.width,en.height);const fr=en.toDataURL("image/png");return Et.createElement(dt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Et.createElement(ft.Z,{style:{height:"100vh"}},Et.createElement(ut.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fr,visible:!0,title:String(Date.now())},onOk:cr=>{on({src:cr.url})},onClose:dn})))},vt=at(12378);function kt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(kt,go.CommandHandler),kt.prototype.canAlignSelection=function(){var on=this.diagram;return!(on===null||on.isReadOnly||on.isModelReadOnly||on.selection.count<2)},kt.prototype.alignLeft=function(){var on=this.diagram;on.startTransaction("aligning left");var dn=1/0;on.selection.each(function(en){en instanceof go.Link||(dn=Math.min(en.position.x,dn))}),on.selection.each(function(en){en instanceof go.Link||en.move(new go.Point(dn,en.position.y))}),on.commitTransaction("aligning left")},kt.prototype.alignRight=function(){var on=this.diagram;on.startTransaction("aligning right");var dn=-1/0;on.selection.each(function(en){if(!(en instanceof go.Link)){var vn=en.actualBounds.x+en.actualBounds.width;dn=Math.max(vn,dn)}}),on.selection.each(function(en){en instanceof go.Link||en.move(new go.Point(dn-en.actualBounds.width,en.position.y))}),on.commitTransaction("aligning right")},kt.prototype.alignTop=function(){var on=this.diagram;on.startTransaction("alignTop");var dn=1/0;on.selection.each(function(en){en instanceof go.Link||(dn=Math.min(en.position.y,dn))}),on.selection.each(function(en){en instanceof go.Link||en.move(new go.Point(en.position.x,dn))}),on.commitTransaction("alignTop")},kt.prototype.alignBottom=function(){var on=this.diagram;on.startTransaction("aligning bottom");var dn=-1/0;on.selection.each(function(en){if(!(en instanceof go.Link)){var vn=en.actualBounds.y+en.actualBounds.height;dn=Math.max(vn,dn)}}),on.selection.each(function(en){en instanceof go.Link||en.move(new go.Point(en.actualBounds.x,dn-en.actualBounds.height))}),on.commitTransaction("aligning bottom")},kt.prototype.alignCenterX=function(){var on=this.diagram,dn=on.selection.first();if(dn){on.startTransaction("aligning Center X");var en=dn.actualBounds.x+dn.actualBounds.width/2;on.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(en-vn.actualBounds.width/2,vn.actualBounds.y))}),on.commitTransaction("aligning Center X")}},kt.prototype.alignCenterY=function(){var on=this.diagram,dn=on.selection.first();if(dn){on.startTransaction("aligning Center Y");var en=dn.actualBounds.y+dn.actualBounds.height/2;on.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(vn.actualBounds.x,en-vn.actualBounds.height/2))}),on.commitTransaction("aligning Center Y")}},kt.prototype.alignColumn=function(on){var dn=this.diagram;dn.startTransaction("align Column"),on===void 0&&(on=0),on=parseFloat(on);var en=new Array;dn.selection.each(function(an){an instanceof go.Link||en.push(an)});for(var vn=0;vn<en.length-1;vn++){var fr=en[vn],cr=fr.actualBounds.y+fr.actualBounds.height+on,oi=en[vn+1];oi.move(new go.Point(fr.actualBounds.x,cr))}dn.commitTransaction("align Column")},kt.prototype.alignRow=function(on){on===void 0&&(on=0),on=parseFloat(on);var dn=this.diagram;dn.startTransaction("align Row");var en=new Array;dn.selection.each(function(an){an instanceof go.Link||en.push(an)});for(var vn=0;vn<en.length-1;vn++){var fr=en[vn],cr=fr.actualBounds.x+fr.actualBounds.width+on,oi=en[vn+1];oi.move(new go.Point(cr,fr.actualBounds.y))}dn.commitTransaction("align Row")},kt.prototype.canRotate=function(on){var dn=this.diagram;return!(dn===null||dn.isReadOnly||dn.isModelReadOnly||dn.selection.count<1)},kt.prototype.rotate=function(on){on===void 0&&(on=90);var dn=this.diagram;dn.startTransaction("rotate "+on.toString());var dn=this.diagram;dn.selection.each(function(en){en instanceof go.Link||en instanceof go.Group||(en.angle+=on)}),dn.commitTransaction("rotate "+on.toString())},kt.prototype.pullToFront=function(){var on=this.diagram;on.startTransaction("pullToFront");var dn=new go.Map;on.selection.each(function(en){dn.set(en.layer,0)}),dn.iteratorKeys.each(function(en){var vn=0;en.parts.each(function(fr){if(!fr.isSelected){var cr=fr.zOrder;isNaN(cr)?fr.zOrder=0:vn=Math.max(vn,cr)}}),dn.set(en,vn)}),on.selection.each(function(en){kt._assignZOrder(en,dn.get(en.layer)+1)}),on.commitTransaction("pullToFront")},kt.prototype.pushToBack=function(){var on=this.diagram;on.startTransaction("pushToBack");var dn=new go.Map;on.selection.each(function(en){dn.set(en.layer,0)}),dn.iteratorKeys.each(function(en){var vn=0;en.parts.each(function(fr){if(!fr.isSelected){var cr=fr.zOrder;isNaN(cr)?fr.zOrder=0:vn=Math.min(vn,cr)}}),dn.set(en,vn)}),on.selection.each(function(en){kt._assignZOrder(en,dn.get(en.layer)-1-kt._findGroupDepth(en))}),on.commitTransaction("pushToBack")},kt._assignZOrder=function(on,dn,en){en===void 0&&(en=on),on.layer===en.layer&&(on.zOrder=dn),on instanceof go.Group&&on.memberParts.each(function(vn){kt._assignZOrder(vn,dn+1,en)})},kt._findGroupDepth=function(on){if(on instanceof go.Group){var dn=0;return on.memberParts.each(function(en){dn=Math.max(dn,kt._findGroupDepth(en))}),dn+1}else return 0},kt.prototype.doKeyDown=function(){var on=this.diagram;if(on!==null){var dn=on.lastInput;if(dn.key==="Up"||dn.key==="Down"||dn.key==="Left"||dn.key==="Right"){var en=this.arrowKeyBehavior;if(en==="none")return;if(en==="select"){this._arrowKeySelect();return}else if(en==="move"){this._arrowKeyMove();return}else if(en==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},kt.prototype._getAllParts=function(){var on=new Array;return this.diagram.nodes.each(function(dn){on.push(dn)}),this.diagram.parts.each(function(dn){on.push(dn)}),on},kt.prototype._arrowKeyMove=function(){var on=this.diagram,dn=on.lastInput,en=0,vn=0;if(dn.control||dn.meta)en=1,vn=1;else if(on.grid!==null){var fr=on.grid.gridCellSize;vn=fr.width,en=fr.height}on.startTransaction("arrowKeyMove"),on.selection.each(function(cr){dn.key==="Up"?cr.move(new go.Point(cr.actualBounds.x,cr.actualBounds.y-en)):dn.key==="Down"?cr.move(new go.Point(cr.actualBounds.x,cr.actualBounds.y+en)):dn.key==="Left"?cr.move(new go.Point(cr.actualBounds.x-vn,cr.actualBounds.y)):dn.key==="Right"&&cr.move(new go.Point(cr.actualBounds.x+vn,cr.actualBounds.y))}),on.commitTransaction("arrowKeyMove")},kt.prototype._arrowKeySelect=function(){var on=this.diagram,dn=on.lastInput,en=null;dn.key==="Up"?en=this._findNearestPartTowards(270):dn.key==="Down"?en=this._findNearestPartTowards(90):dn.key==="Left"?en=this._findNearestPartTowards(180):dn.key==="Right"&&(en=this._findNearestPartTowards(0)),en!==null&&(dn.shift?en.isSelected=!0:dn.control||dn.meta?en.isSelected=!en.isSelected:on.select(en))},kt.prototype._findNearestPartTowards=function(on){var dn=this.diagram.selection.first();if(dn===null)return null;for(var en=dn.actualBounds.center,vn=this._getAllParts(),fr=1/0,cr=dn,oi=0;oi<vn.length;oi++){var an=vn[oi];if(an!==dn&&an.canSelect()){var Nn=an.actualBounds.center,gr=en.directionPoint(Nn),Zr=this._angleCloseness(gr,on);if(Zr<=45){var Xn=en.distanceSquaredPoint(Nn);Xn*=1+Math.sin(Zr*Math.PI/180),Xn<fr&&(fr=Xn,cr=an)}}}return cr},kt.prototype._angleCloseness=function(on,dn){return Math.min(Math.abs(dn-on),Math.min(Math.abs(dn+360-on),Math.abs(dn-360-on)))},kt.prototype._arrowKeyTree=function(){var on=this.diagram,dn=on.selection.first();if(dn instanceof go.Node){var en=on.lastInput;if(en.key==="Right"){if(!dn.isTreeLeaf)if(!dn.isTreeExpanded)on.commandHandler.canExpandTree(dn)&&on.commandHandler.expandTree(dn);else{var vn=this._sortTreeChildrenByY(dn).first();vn!==null&&on.select(vn)}}else if(en.key==="Left")if(!dn.isTreeLeaf&&dn.isTreeExpanded)on.commandHandler.canCollapseTree(dn)&&on.commandHandler.collapseTree(dn);else{var fr=dn.findTreeParentNode();fr!==null&&on.select(fr)}else if(en.key==="Up"){var fr=dn.findTreeParentNode();if(fr!==null){var cr=this._sortTreeChildrenByY(fr),oi=cr.indexOf(dn);if(oi>0){for(var an=cr.elt(oi-1);an!==null&&an.isTreeExpanded&&!an.isTreeLeaf;){var Nn=this._sortTreeChildrenByY(an);an=Nn.last()}an!==null&&on.select(an)}else on.select(fr)}}else if(en.key==="Down")if(dn.isTreeExpanded&&!dn.isTreeLeaf){var vn=this._sortTreeChildrenByY(dn).first();vn!==null&&on.select(vn)}else for(;dn!==null;){var fr=dn.findTreeParentNode();if(fr===null)break;var cr=this._sortTreeChildrenByY(fr),oi=cr.indexOf(dn);if(oi<cr.length-1){on.select(cr.elt(oi+1));break}else dn=fr}var gr=on.selection.first();gr!==null&&on.scrollToRect(gr.actualBounds)}},kt.prototype._sortTreeChildrenByY=function(on){var dn=new go.List().addAll(on.findTreeChildrenNodes());return dn.sort(function(en,vn){var fr=en.location,cr=vn.location;return fr.y<cr.y?-1:fr.y>cr.y?1:fr.x<cr.x?-1:fr.x>cr.x?1:0}),dn},kt.prototype.copyToClipboard=function(on){go.CommandHandler.prototype.copyToClipboard.call(this,on),this._lastPasteOffset.set(this.pasteOffset)},kt.prototype.pasteFromClipboard=function(){var on=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(on,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),on},Object.defineProperty(kt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(on){if(on!=="move"&&on!=="select"&&on!=="scroll"&&on!=="tree"&&on!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+on);this._arrowKeyBehavior=on}}),Object.defineProperty(kt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(on){if(!(on instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+on);this._pasteOffset.set(on)}});var pt=kt,Qe=at(20397),Ke=at(5269),xe=at(82093),Me={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ze=at(34055),tt=at(59301),Ie=(on,dn,en)=>new Promise((vn,fr)=>{var cr=Nn=>{try{an(en.next(Nn))}catch(gr){fr(gr)}},oi=Nn=>{try{an(en.throw(Nn))}catch(gr){fr(gr)}},an=Nn=>Nn.done?vn(Nn.value):Promise.resolve(Nn.value).then(cr,oi);an((en=en.apply(on,dn)).next())});function _e({onCancel:on,callback:dn}){let en=(0,ht.useRef)(),vn=(0,ht.useRef)(),fr=(0,ht.useRef)(),cr=(0,ht.useRef)(!1);const oi=(0,ht.useRef)(!1),[an,Nn]=(0,ht.useState)(0);function gr(){const Xn=vt.bx.make,jt={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"};en.current=new vt.S0(vn.current,{padding:20,grid:Xn(vt.s_,"Grid",Xn(vt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Xn(vt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Yt=>{var vr=Yt.diagram.commandHandler.addTopLevelParts(Yt.diagram.selection,!0);vr||Yt.diagram.currentTool.doCancel()},commandHandler:Xn(pt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Yt=>{var vr=Yt.subject;vr.location=vr.location.copy().snapToGridPoint(Yt.diagram.grid.gridOrigin,Yt.diagram.grid.gridCellSize),setTimeout(()=>{Yt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Yt=>{var vr=Yt.subject;setTimeout(()=>{Yt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Yt=>{var vr=Yt.parameter.part;vr.invalidateConnectedLinks();var zr=Yt.subject;Yt.diagram.toolManager.linkingTool.isForwards?zr.toNode.invalidateConnectedLinks():zr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),en.current.nodeTemplate=Xn(vt.NB,"Auto",{locationSpot:vt.z6.Center,locationObjectName:"SHAPE",desiredSize:new vt.$u(120,60),minSize:new vt.$u(40,40),resizable:!0,resizeCellSize:new vt.$u(10,10),rotatable:!0},new vt.KX("location","loc",vt.E9.parse).makeTwoWay(vt.E9.stringify),new vt.KX("desiredSize","size",vt.$u.parse).makeTwoWay(vt.$u.stringify),Xn(vt.bn,{name:"SHAPE",fill:jt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:vt.z6.AllSides,toSpot:vt.z6.AllSides},new vt.KX("figure"),new vt.KX("fill"),new vt.KX("stroke","borderColor"),new vt.KX("strokeWidth","thickness"),new vt.KX("strokeDashArray","dash")),Xn(vt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Xn(vt.al,{margin:1,textAlign:"center",overflow:vt.al.OverflowEllipsis,editable:!0},new vt.KX("text").makeTwoWay(),new vt.KX("stroke","color"))),en.current.nodeTemplate.toolTip=Xn("ToolTip",Xn(vt.s_,"Vertical",{maxSize:new vt.$u(200,NaN)},Xn(vt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new vt.KX("text")),Xn(vt.al,{font:"10pt sans-serif",textAlign:"center"},new vt.KX("text","details"))));function Wt(Yt,vr){var zr=(nr,vi)=>{nr.handled=!0,nr.diagram.model.commit(Qr=>{var hi=vi.part.adornedPart,$r=new vt.E9().setRectSpot(hi.actualBounds,Yt);$r.subtract(hi.location),$r.scale(2,2),$r.x+=Math.sign($r.x)*130,$r.y+=Math.sign($r.y)*130,$r.add(hi.location),$r.snapToGridPoint(nr.diagram.grid.gridOrigin,nr.diagram.grid.gridCellSize);var si=Qr.copyNodeData(hi.data);Qr.setGroupKeyForNodeData(si,Qr.getGroupKeyForNodeData(hi.data)),Qr.addNodeData(si);var bi={from:hi.key,to:Qr.getKeyForNodeData(si)};Qr.addLinkData(bi);var pn=nr.diagram.findNodeForData(si);pn.location=$r,nr.diagram.select(pn),setTimeout(()=>{nr.diagram.commandHandler.editTextBlock()},20)})};return Xn(vt.bn,{figure:vr,alignment:Yt,alignmentFocus:Yt.opposite(),width:Yt.equals(vt.z6.Top)||Yt.equals(vt.z6.Bottom)?25:18,height:Yt.equals(vt.z6.Top)||Yt.equals(vt.z6.Bottom)?18:25,fill:"orange",stroke:jt.white,strokeWidth:4,mouseEnter:(nr,vi)=>vi.fill="dodgerblue",mouseLeave:(nr,vi)=>vi.fill="orange",isActionable:!0,click:zr,contextClick:zr})}function jn(Yt){return Xn(vt.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:(vr,zr)=>zr.fill="dodgerblue",mouseLeave:(vr,zr)=>zr.fill="orange",click:(vr,zr)=>{vr.diagram.commandHandler.showContextMenu(zr.part.adornedPart)}},Yt||{})}en.current.nodeTemplate.selectionAdornmentTemplate=Xn(vt.uz,"Spot",Xn(vt.Vm,{padding:10}),Wt(vt.z6.Top,"TriangleUp"),Wt(vt.z6.Left,"TriangleLeft"),Wt(vt.z6.Right,"TriangleRight"),Wt(vt.z6.Bottom,"TriangleDown"),jn({alignment:new vt.z6(.75,0)}));function Cn(Yt,vr){return(zr,nr)=>{zr.handled=!0,zr.diagram.model.commit(vi=>{vi.set(nr.part.adornedPart.data,Yt,vr)})}}function Jt(Yt,vr){return vr||(vr="color"),Xn(vt.bn,{width:16,height:16,stroke:"lightgray",fill:Yt,margin:1,background:"transparent",mouseEnter:(zr,nr)=>nr.stroke="dodgerblue",mouseLeave:(zr,nr)=>nr.stroke="lightgray",click:Cn(vr,Yt),contextClick:Cn(vr,Yt)})}function _n(){return[Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Jt(jt.white,"fill"),Jt(jt.beige,"fill"),Jt(jt.extralightblue,"fill"),Jt(jt.extralightred,"fill"))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Jt(jt.lightgray,"fill"),Jt(jt.lightgreen,"fill"),Jt(jt.lightblue,"fill"),Jt(jt.lightred,"fill")))]}function ur(){return[Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Jt(jt.black),Jt(jt.green),Jt(jt.blue),Jt(jt.red))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Jt(jt.white),Jt(jt.magenta),Jt(jt.purple),Jt(jt.orange)))]}function ar(Yt,vr){return vr||(vr="thickness"),Xn(vt.bn,"LineH",{width:16,height:16,strokeWidth:Yt,margin:1,background:"transparent",mouseEnter:(zr,nr)=>nr.background="dodgerblue",mouseLeave:(zr,nr)=>nr.background="transparent",click:Cn(vr,Yt),contextClick:Cn(vr,Yt)})}function mr(Yt,vr){return vr||(vr="dash"),Xn(vt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Yt,margin:1,background:"transparent",mouseEnter:(zr,nr)=>nr.background="dodgerblue",mouseLeave:(zr,nr)=>nr.background="transparent",click:Cn(vr,Yt),contextClick:Cn(vr,Yt)})}function Bn(){return[Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",ar(1),ar(2),ar(3),ar(4))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",mr(null),mr([2,4]),mr([4,4])))]}function Un(Yt,vr){return vr||(vr="figure"),Xn(vt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Yt,margin:1,background:"transparent",mouseEnter:(zr,nr)=>nr.fill="dodgerblue",mouseLeave:(zr,nr)=>nr.fill="lightgray",click:Cn(vr,Yt),contextClick:Cn(vr,Yt)})}en.current.nodeTemplate.contextMenu=Xn("ContextMenu",Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Un("Rectangle"),Un("RoundedRectangle"),Un("Ellipse"),Un("Diamond"))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Un("Parallelogram2"),Un("ManualOperation"),Un("Procedure"),Un("Cylinder1"))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Un("Terminator"),Un("CreateRequest"),Un("Document"),Un("TriangleDown"))),_n(),ur(),Bn()),en.current.groupTemplate=Xn(vt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:vt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Yt,vr)=>{var zr=vr.addMembers(vr.diagram.selection,!0);zr||vr.diagram.currentTool.doCancel()},avoidable:!1},new vt.KX("location","loc",vt.E9.parse).makeTwoWay(vt.E9.stringify),Xn(vt.s_,"Auto",{name:"BODY"},Xn(vt.bn,{parameter1:10,fill:jt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:vt.z6.AllSides,toSpot:vt.z6.AllSides},new vt.KX("fill"),new vt.KX("stroke","color"),new vt.KX("strokeWidth","thickness"),new vt.KX("strokeDashArray","dash")),Xn(vt.Vm,{background:"transparent",margin:20})),Xn(vt.al,{alignment:vt.z6.Top,alignmentFocus:vt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new vt.KX("text"),new vt.KX("stroke","color"))),en.current.groupTemplate.selectionAdornmentTemplate=Xn(vt.uz,"Spot",Xn(vt.s_,"Auto",Xn(vt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Xn(vt.Vm,{margin:1.5})),jn({alignment:vt.z6.TopRight,alignmentFocus:vt.z6.BottomRight})),en.current.groupTemplate.contextMenu=Xn("ContextMenu",_n(),ur(),Bn()),en.current.linkTemplate=Xn(vt.rU,{layerName:"Foreground",routing:vt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new vt.KX("fromSpot","fromSpot",vt.z6.parse),new vt.KX("toSpot","toSpot",vt.z6.parse),new vt.KX("fromShortLength","dir",Yt=>Yt>=1?10:0),new vt.KX("toShortLength","dir",Yt=>Yt>=1?10:0),new vt.KX("points").makeTwoWay(),Xn(vt.bn,{strokeWidth:2},new vt.KX("stroke","color"),new vt.KX("strokeWidth","thickness"),new vt.KX("strokeDashArray","dash")),Xn(vt.bn,{segmentIndex:0,segmentOffset:new vt.E9(15,0),segmentOrientation:vt.rU.OrientAlong,alignmentFocus:vt.z6.Right,figure:"circle",width:10,strokeWidth:0},new vt.KX("fill","color"),new vt.KX("visible","dir",Yt=>Yt===1)),Xn(vt.bn,{segmentIndex:-1,segmentOffset:new vt.E9(-10,6),segmentOrientation:vt.rU.OrientPlus90,alignmentFocus:vt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new vt.KX("fill","color"),new vt.KX("visible","dir",Yt=>Yt>=1),new vt.KX("width","thickness",Yt=>7+3*Yt),new vt.KX("height","thickness",Yt=>7+3*Yt),new vt.KX("segmentOffset","thickness",Yt=>new vt.E9(-15,4+1.5*Yt))),Xn(vt.bn,{segmentIndex:0,segmentOffset:new vt.E9(15,-6),segmentOrientation:vt.rU.OrientMinus90,alignmentFocus:vt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new vt.KX("fill","color"),new vt.KX("visible","dir",Yt=>Yt===2),new vt.KX("width","thickness",Yt=>7+3*Yt),new vt.KX("height","thickness",Yt=>7+3*Yt),new vt.KX("segmentOffset","thickness",Yt=>new vt.E9(-15,4+1.5*Yt))),Xn(vt.al,{alignmentFocus:new vt.z6(0,1,-4,0),editable:!0},new vt.KX("text").makeTwoWay(),new vt.KX("stroke","color"))),en.current.linkTemplate.selectionAdornmentTemplate=Xn(vt.uz,Xn(vt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:er(2)},new vt.KX("pathPattern","thickness",er)),jn({alignmentFocus:new vt.z6(0,0,-6,-4)}));function er(Yt){return Xn(vt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Yt+4).toString()+" H3"})}function Ar(Yt){var vr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Yt===0?vr="M0 0 M16 16 M0 8 L16 8":Yt===2&&(vr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Xn(vt.bn,{geometryString:vr,margin:2,background:"transparent",mouseEnter:(zr,nr)=>nr.background="dodgerblue",mouseLeave:(zr,nr)=>nr.background="transparent",click:Cn("dir",Yt),contextClick:Cn("dir",Yt)})}function sr(Yt){var vr=(zr,nr)=>{zr.handled=!0,zr.diagram.model.commit(vi=>{var Qr=nr.part.adornedPart;vi.set(Qr.data,Yt?"toSpot":"fromSpot",vt.z6.stringify(vt.z6.AllSides)),(Yt?Qr.toNode:Qr.fromNode).invalidateConnectedLinks()})};return Xn(vt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(zr,nr)=>nr.background="dodgerblue",mouseLeave:(zr,nr)=>nr.background="transparent",click:vr,contextClick:vr})}function mn(Yt,vr){var zr=0,nr=vt.z6.RightSide;Yt.equals(vt.z6.Top)?(zr=270,nr=vt.z6.TopSide):Yt.equals(vt.z6.Left)?(zr=180,nr=vt.z6.LeftSide):Yt.equals(vt.z6.Bottom)&&(zr=90,nr=vt.z6.BottomSide),vr||(zr-=180);var vi=(Qr,hi)=>{Qr.handled=!0,Qr.diagram.model.commit($r=>{var si=hi.part.adornedPart;$r.set(si.data,vr?"toSpot":"fromSpot",vt.z6.stringify(nr)),(vr?si.toNode:si.fromNode).invalidateConnectedLinks()})};return Xn(vt.bn,{alignment:Yt,alignmentFocus:Yt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:zr,background:"transparent",mouseEnter:(Qr,hi)=>hi.background="dodgerblue",mouseLeave:(Qr,hi)=>hi.background="transparent",click:vi,contextClick:vi})}en.current.linkTemplate.contextMenu=Xn("ContextMenu",ur(),Bn(),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Ar(0),Ar(1),Ar(2))),Xn("ContextMenuButton",Xn(vt.s_,"Horizontal",Xn(vt.s_,"Spot",sr(!1),mn(vt.z6.Top,!1),mn(vt.z6.Left,!1),mn(vt.z6.Right,!1),mn(vt.z6.Bottom,!1)),Xn(vt.s_,"Spot",{margin:new vt.Zt(0,0,0,2)},sr(!0),mn(vt.z6.Top,!0),mn(vt.z6.Left,!0),mn(vt.z6.Right,!0),mn(vt.z6.Bottom,!0)))));const tr=`{ "class": "GraphLinksModel",
"nodeDataArray": [
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
],
"linkDataArray": [
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
]}`;var Vr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function pi(Yt){return console.log("shapeName:",Yt),Vr.indexOf(Yt)>=0}var zi=new vt.YI(fr.current,{maxSelectionCount:1,linkTemplate:Xn(vt.rU,{locationSpot:vt.z6.Center,selectionAdornmentTemplate:Xn(vt.uz,"Link",{locationSpot:vt.z6.Center},Xn(vt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Xn(vt.bn,{toArrow:"Standard",stroke:null}))},{routing:vt.rU.AvoidsNodes,curve:vt.rU.JumpOver,corner:5,toShortLength:4},new vt.KX("points"),Xn(vt.bn,{isPanelMain:!0,strokeWidth:2}),Xn(vt.bn,{toArrow:"Standard",stroke:null})),model:new vt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...vt.bn.getFigureGenerators().toArray().map(Yt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Yt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return en.current.addDiagramListener("TextEdited",function(Yt){var vr;const zr=Yt.subject.part;var nr=(vr=document.activeElement)==null?void 0:vr.value;typeof nr=="string"&&nr.trim()===""&&en.current.model.commit(function(vi){vi.set(zr.data,"text","\u672A\u547D\u540D"),en.current.commandHandler.stopCommand()},"increment")}),zi.nodeTemplate=Xn(vt.NB,"Auto",{locationSpot:vt.z6.Center},new vt.KX("location","location",vt.E9.parse).makeTwoWay(vt.E9.stringify),Xn(vt.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 vt.KX("stroke").makeTwoWay(),new vt.KX("fill").makeTwoWay(),new vt.KX("figure")),Xn(vt.al,{margin:new vt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new vt.$u(16,16),maxSize:new vt.$u(10,NaN),textAlign:"center",editable:!0},new vt.KX("key").makeTwoWay())),setTimeout(()=>{en.current.grid=Xn(vt.s_,"Grid",Xn(vt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Xn(vt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),en.current.grid.visible=!0,en.current.grid.gridCellStroke="darkgray",en.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=en.current,en.current}const Zr=()=>Ie(this,null,function*(){var Xn,jt=en.current.makeImage();const Wt=yield(0,xe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:jt.src,file_data:JSON.stringify({login:(Xn=(0,Ze.eY)())==null?void 0:Xn.login,data:JSON.parse(en.current.model.toJson())})}});dn({src:Wt.url})});return(0,ht.useEffect)(()=>(setTimeout(()=>{gr()},500),Nn(an+1),()=>{en.current=null}),[]),tt.createElement("div",{ref:oi,className:"body-overflow-initial"},tt.createElement(dt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!an,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:tt.createElement(ft.Z,null,tt.createElement(Ke.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),tt.createElement(Ke.Z,{onClick:()=>{var Xn,jt,Wt=en.current.selection.first();if(cr.current=!cr.current,document.activeElement&&Wt){let jn=(jt=(Xn=document.activeElement)==null?void 0:Xn.value)==null?void 0:jt.trim();typeof jn=="string"&&en.current.model.commit(function(Cn){Cn.set(Wt.data,"text",jn||"\u672A\u547D\u540D"),en.current.commandHandler.stopCommand()},"increment")}Nn(an+1)}},tt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:on},tt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:cr.current?"none":"block"},className:Me.flowChartWrp},tt.createElement("div",{style:{display:"flex",height:"100%"}},tt.createElement("div",{style:{width:"300px",height:"100%"}},tt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),tt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Me.myPaletteDiv,ref:fr})),tt.createElement("div",{style:{flex:1,position:"relative"}},tt.createElement("div",{ref:vn,style:{height:"80vh"}}))),tt.createElement("div",{className:"tr"},tt.createElement(Re.ZP,{size:"large",onClick:Zr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var He=_e,rt=at(47889),St=at(71051);const Ct=rt.ZP.Group,Nt={margin:"0 8px"};var Ot=({callback:on,onCancel:dn})=>{function en(vn){on(vn)}return ht.createElement(Ne.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:en},ht.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ht.createElement("span",{style:Nt},"\u5355\u5143\u683C\u6570\uFF1A"),ht.createElement("span",{style:Nt},"\u884C\u6570"),ht.createElement(Ne.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ht.createElement(St.Z,null)),ht.createElement("span",{style:Nt},"\u5217\u6570"),ht.createElement(Ne.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ht.createElement(St.Z,null))),ht.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ht.createElement("span",{style:Nt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ht.createElement(Ne.default.Item,{name:"align"},ht.createElement(Ct,null,ht.createElement(rt.ZP,{value:"default"},ht.createElement("i",{className:"fa fa-align-justify"})),ht.createElement(rt.ZP,{value:"left"},ht.createElement("i",{className:"fa fa-align-left"})),ht.createElement(rt.ZP,{value:"center"},ht.createElement("i",{className:"fa fa-align-center"})),ht.createElement(rt.ZP,{value:"right"},ht.createElement("i",{className:"fa fa-align-right"}))))),ht.createElement("div",{className:"flex-container flex-end"},ht.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ht.createElement(Re.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},Rt=at(71411),$t=at(11081),qt=at.n($t),Ht=(0,ht.forwardRef)(({use3d:on,width:dn,height:en,callback:vn,showSaveButton:fr},cr)=>{const oi=(0,ht.useRef)(),an=(0,ht.useRef)(),[Nn,gr]=(0,ht.useState)(!1),Zr=(0,ht.useRef)({id:oi,appName:"graphing",width:dn||1e3,height:en||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ht.useEffect)(()=>{an.current=new(qt())(Zr.current,!0),window.onload=function(){an.current.inject("applet_container")}},[]);const Xn=()=>{var jt=window.ggbApplet.getPNGBase64(1,!0,72);return vn&&vn(jt),jt};return(0,ht.useEffect)(()=>{Zr.current.appName=Nn?"3D":"graphing",an.current.inject("applet_container")},[Nn]),(0,ht.useEffect)(()=>{gr(on)},[on]),(0,ht.useImperativeHandle)(cr,()=>({getImgData:Xn})),ht.createElement(ht.Fragment,null,ht.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:oi}),ht.createElement(ft.Z,{align:"middle"},ht.createElement(Ke.Z,{flex:1},ht.createElement(Rt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:jt=>gr(jt)})),ht.createElement(Ke.Z,null,ht.createElement(Re.ZP,{size:"large",onClick:Xn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),sn=at(88615),tn=at(6767);const Ut="link",En="upload-image",bn="add-flowchart",Dn="draw-image",Qn="add-flowchart",Pr="code-block",Yn="add-table",Mr="------------",Ur={default:Mr,left:`:${Mr}`,center:`:${Mr}:`,right:`${Mr}:`};var _r=at(17904);function ni(){}let Li=0;const _i=1e4,Di="\u2581",ui="@\u2581\u2581@",Wi="@\u2581@",et=`
**\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`,jr=["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(on){return/^\d+$/.test(on)?`${on}px`:on}const lr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",yr={[lr+"-B"]:"bold",[lr+"-I"]:"italic"},Lr={[Ut]:"\u6DFB\u52A0\u94FE\u63A5",[Pr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[En]:"\u6DFB\u52A0\u56FE\u7247",[Dn]:"\u6DFB\u52A0\u753B\u56FE",[bn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Yn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var uo=({defaultValue:on="",onChange:dn,width:en="100%",height:vn=400,miniToolbar:fr=!1,isFocus:cr=!1,watch:oi,insertTemp:an,mode:Nn="markdown",id:gr="markdown-editor-id",showResizeBar:Zr=!1,noStorage:Xn=!1,showNullButton:jt=!1,showNullProgramButton:Wt=!1,hidetoolBar:jn=!1,fullScreen:Cn=!1,onBlur:Jt,onCMBeforeChange:_n,onFullScreen:ur,className:ar="",disablePaste:mr=!1,disabled:Bn=!1,disabledFill:Un=!1,placeholder:er="",values:Ar="",extraUse:sr})=>{const[mn,tr]=(0,ht.useState)(null),[Vr,pi]=(0,ht.useState)(on),[zi,Yt]=(0,ht.useState)(oi),[vr,zr]=(0,ht.useState)(Cn),[nr,vi]=(0,ht.useState)(""),[Qr,hi]=(0,ht.useState)(0),[$r,si]=(0,ht.useState)(vn),[bi,pn]=(0,ht.useState)(!1),[Oi,yn]=(0,ht.useState)(0),[Sr,li]=(0,ht.useState)(0),Jr=(0,ht.useRef)(),Hi=(0,ht.useRef)(),ci=(0,ht.useRef)(),Hr=(0,ht.useRef)();(0,ht.useEffect)(()=>{const An=window.scrollY||window.pageYOffset;pi(Ar),mn==null||mn.setValue(Ar),window.scrollTo(0,An)},[Ar]),(0,ht.useEffect)(()=>{ur==null||ur(vr)},[vr]),(0,ht.useEffect)(()=>{if(Jr.current){let An=function(Wn,ln){var br;if(mr){ln.preventDefault();return}const Cr=ln.clipboardData;if(Cr){const ri=Cr.types.toString(),Er=Cr.items;if(ri==="Files"||Cr.types.indexOf("Files")>-1){if(ln.preventDefault(),Nn=="stex")return;try{let xi=Er[1];((br=Er[0])==null?void 0:br.kind)==="file"&&(xi=Er[0]);const gi=xi.getAsFile(),Ci=gi.name.split(".").pop();(0,wt.I)(gi,Si=>{var Bi,Vi,Xt;Si.id?((Bi=gi==null?void 0:gi.type)==null?void 0:Bi.indexOf("image"))>-1?Vn.replaceSelection(`<img width="100%" src="/api/attachments/${Si.id}?type=${Si.content_type})" alt="" />`):((Vi=gi==null?void 0:gi.type)==null?void 0:Vi.indexOf("video"))>-1?Vn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Si.id}"></video>`):((Xt=gi==null?void 0:gi.type)==null?void 0:Xt.indexOf("pdf"))>-1?Vn.replaceSelection(`<a href="/api/attachments/${Si.id}?type=${gi.type}&disposition=inline" target="_blank">${gi.name}</a>`):jr.includes(Ci)?Vn.replaceSelection(`<a href="/api/attachments/${Si.id}?type=office&disposition=inline" target="_blank">${gi.name}</a>`):Vn.replaceSelection(`[${gi.name}](/api/attachments/${Si.id}?type=${Si.content_type})`):(Si==null?void 0:Si.status)===401&&(document.location.href="/user/login")})}catch(xi){tn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Vn=oe().fromTextArea(Jr.current,{mode:Nn,lineNumbers:!fr,lineWrapping:!0,value:on,autoCloseTags:!0,autoCloseBrackets:!0});return Vn.on("keyup",function(Wn,ln){ln.keyCode===8&&(Wn.getValue()==""?Vn.setOption("placeholder",er):Vn.setOption("placeholder",null))}),Vn.on("keydown",function(Wn,ln){if(ln.keyCode===8){var br=Qt(Wn);br&&ln.preventDefault()}}),cr&&Vn.focus(),Vn.on("paste",An),Bn&&Vn.on("beforeChange",function(Wn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),tr(Vn),()=>{Vn.off("paste",An)}}},[]);const Ki=(0,ht.useCallback)(()=>{if(Hi.current)try{}catch(An){console.log(An,"---- to set md editor body height")}},[$r,Hi,vr]);(0,ht.useEffect)(()=>{function An(){let Vn=new ze.Z(Wn=>{for(let ln of Wn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Ki(),mn.setSize("100%","100%"),mn.refresh())});return Vn.observe(Jr.current.parentElement),Vn}if(mn){const Vn=An();return()=>{var Wn,ln;(Wn=Jr.current)!=null&&Wn.parentElement&&Vn.unobserve((ln=Jr.current)==null?void 0:ln.parentElement)}}},[mn,Ki]),(0,ht.useEffect)(()=>{if(mn){let An=[];for(const[Vn,Wn]of Object.entries(yr)){let ln={[Vn]:()=>{wn(Wn)}};An.push(ln),mn.addKeyMap(ln)}return()=>{for(let Vn of An)mn.removeKeyMap(Vn)}}},[mn]),(0,ht.useEffect)(()=>{Cn!==vr&&zr(Cn)},[Cn]),(0,_r.Z)(()=>{if(!Xn&&Qr>0){let An=new Date().getTime(),Vn=window.sessionStorage.getItem(gr);An>=Qr+_i&&(!Vn||Vn!==Vr)&&(window.sessionStorage.setItem(gr,Vr),pn(!0))}},_i),(0,ht.useEffect)(()=>{Yt(oi)},[mn,oi]),(0,ht.useEffect)(()=>{mn&&cr&&mn.focus()},[mn,cr]),(0,ht.useEffect)(()=>{if(zi&&mn){let An=function(Wn){let ln=Wn.target;if(Hr.current){let br=ln.scrollTop/ln.scrollHeight;Hr.current.scrollTop=Hr.current.scrollHeight*br}};const Vn=mn.getScrollerElement();return Vn.addEventListener("scroll",An),()=>{Vn.removeEventListener("scroll",An)}}},[mn,zi]),(0,ht.useEffect)(()=>{if(mn&&_n){let An=function(Vn,Wn){_n(Vn,Wn)};return mn.on("beforeChange",An),()=>{mn.off("beforeChange",An)}}},[mn,_n]),(0,ht.useEffect)(()=>{if(mn&&Jt){let An=function(){Jt(mn.getValue())};return mn.on("blur",An),()=>{mn.off("blur",An)}}},[mn,Jt]);function Qt(An,Vn){var Wn=An.getDoc(),ln=Wn.getCursor(),br=Wn.getLine(ln.line),Cr=br.charAt(ln.ch-1),ri=br.lastIndexOf("@\u2581@",ln.ch),Er=br.lastIndexOf("@\u2581\u2581@",ln.ch),xi=ri>Er?ri:Er,gi=ri>Er?3:4;if(ui.indexOf(Cr)===-1)return null;if(console.log("change1:",Vn,An,br,ln,xi,ri,Er,Cr),xi>=0&&ln.ch-xi<5){var Ci=xi+gi;return Wn.replaceRange("",{line:ln.line,ch:xi},{line:ln.line,ch:Ci}),{line:ln.line,ch:Ci}}return null}(0,ht.useEffect)(()=>{if(mn){let An=function(Vn,Wn){const ln=Vn.getValue();pi(ln),hi(new Date().getTime()),Vn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),dn&&(Wt?dn(ln,un(ln)):dn(ln))};return mn.on("change",An),()=>{mn.off("change",An)}}},[mn,dn]),(0,ht.useEffect)(()=>{if(mn)if(on==null)mn.setValue(""),pi("");else{const An=window.scrollY||window.pageYOffset;on!==mn.getValue()&&(mn.setValue(on),pi(on),mn.setCursor(Bn?1:mn.lineCount(),0),window.scrollTo(0,An))}},[mn,on]);const wn=(0,ht.useCallback)(An=>{const Vn=mn.getCursor(),Wn=mn.getSelection();let ln=Wn.split(`
`);switch(An){case"bold":return mn.replaceSelection("**"+Wn+"**"),Wn===""&&mn.setCursor(Vn.line,Vn.ch+2),mn.focus();case"italic":return mn.replaceSelection("*"+Wn+"*"),Wn===""&&mn.setCursor(Vn.line,Vn.ch+1),mn.focus();case"code":return mn.replaceSelection("`"+Wn+"`"),Wn===""&&mn.setCursor(Vn.line,Vn.ch+1),mn.focus();case"inline-latex":return vi("inline-latex"),mn.focus();case"latex":return mn.replaceSelection("```latex\n"+Wn+"\n```"),mn.setCursor(Vn.line+1,Wn.length+1),mn.focus();case"line-break":return mn.replaceSelection(`<br/>
`),mn.focus();case"list-ul":return Wn===""?mn.replaceSelection("- "+Wn):mn.replaceSelection(ln.map(br=>br===""?"":`- ${br}`).join(`
`)),mn.focus();case"list-ol":return Wn===""?mn.replaceSelection("1. "+Wn):mn.replaceSelection(ln.map((br,Cr)=>br===""?"":`${Cr+1}. ${br}`).join(`
`)),mn.focus();case"add-null-ch":return Wn===""&&mn.setCursor(Vn.line,Vn.ch),mn.replaceSelection(Di),mn.focus();case"add-signal":return Wn===""&&mn.setCursor(Vn.line,Vn.ch),mn.replaceSelection(Wi),mn.focus();case"add-multiple":return Wn===""&&mn.setCursor(Vn.line,Vn.ch),mn.replaceSelection(ui),mn.focus();case"inster-template-1":return Wn===""&&mn.setCursor(Vn.line,Vn.ch),mn.replaceSelection(et),mn.focus();case"eraser":return mn.setValue(""),mn.focus();case"trigger-watch":return Yt(!zi),mn.focus();case"trigger-full-screen":return zr(!vr),mn.focus();case Ut:vi(Ut);return;case Pr:vi(Pr);return;case En:vi(En);return;case Dn:vi(Dn);return;case"maths-latex":vi("maths-latex");return;case bn:vi(bn);return;case Yn:vi(Yn);return;default:throw new Error}},[mn,zi,vr]),Zt=(0,ht.useCallback)((An,Vn)=>{var Wn,ln,br,Cr,ri,Er;switch(vi(""),nr){case Ut:const{title:Bi,link:Vi}=An;return mn.replaceSelection(`[${Bi}](${Vi})`),mn.focus();case Pr:const{language:Xt,content:wi}=An;return mn.replaceSelection(["```"+Xt,wi,"```"].join(`
`)),mn.focus();case"maths-latex":for(var xi=atob(An),gi=new Uint8Array(xi.length),Ci=0;Ci<xi.length;Ci++)gi[Ci]=xi.charCodeAt(Ci);var Si=new Blob([gi],{type:"image/png"});(0,wt.I)(Si,_o=>{_o.id?mn.replaceSelection(`![,](/api/attachments/${_o.id}?type=${_o.content_type})`):(_o==null?void 0:_o.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":mn.replaceSelection("`$$"+An+"$$`");break;case En:case Dn:case Qn:const{src:qr,alt:Wr}=An,Br=Vn,Pi=(br=(ln=(Wn=Br==null?void 0:Br.name)==null?void 0:Wn.split("."))==null?void 0:ln.pop)==null?void 0:br.call(ln);return((Cr=Br==null?void 0:Br.type)==null?void 0:Cr.indexOf("image"))>-1||!(Br!=null&&Br.type)?Br!=null&&Br.align||Br!=null&&Br.width?mn.replaceSelection(`<p style="text-align:${Br.align||"initial"}"><img width="${Br.width?Br.width+"%":"initial"}" src="${qr}" alt="${Wr||""}" /></p>`):mn.replaceSelection(`<img width="100%" src="${qr}" alt="${Wr||""}" />`):((ri=Br==null?void 0:Br.type)==null?void 0:ri.indexOf("video"))>-1?mn.replaceSelection(`<video width="100%" controls src="${qr}"></video>`):((Er=Br==null?void 0:Br.type)==null?void 0:Er.indexOf("pdf"))>-1?mn.replaceSelection(`<a href="${qr}?type=${Br.type}&disposition=inline" target="_blank">${Br.name}</a>`):jr.includes(Pi)?mn.replaceSelection(`<a href="${qr}?type=office&disposition=inline" target="_blank">${Br.name}</a>`):mn.replaceSelection(`[${Br.name}](${qr})`),mn.focus();case Yn:const{row:Ii,col:Fi,align:ei}=An;let $i=`
`;for(let _o=0;_o<Ii;_o++){let fa=[],Ps=[];for(let wa=0;wa<Fi;wa++)_o===1&&Ps.push(Ur[ei]),fa.push(" ");_o===1&&($i+=`| ${Ps.join(" | ")} |
`),$i+=`| ${fa.join(Fi===1?"":" | ")} |
`}return mn.replaceSelection($i+`
`),mn.focus();default:throw new Error}},[mn,nr]),lt=(0,ht.useMemo)(()=>{switch(nr){case Ut:return ht.createElement(yt,{callback:Zt,onCancel:On});case Pr:return ht.createElement(xt.Z,{callback:Zt,onCancel:On});case En:return ht.createElement(wt.Z,{callback:Zt,onCancel:On});case bn:return ht.createElement(He,{callback:Zt,onCancel:On});case Yn:return ht.createElement(Ot,{callback:Zt,onCancel:On});case"maths-latex":return ht.createElement(Ht,{showSaveButton:!0,callback:Zt});case"inline-latex":return ht.createElement(sn.Z,{showSaveButton:!0,callback:Zt});default:return null}},[nr]);function On(){vi("")}(0,ht.useEffect)(()=>{if(ci.current){let An=function(ri){br=!0,Cr=ri.pageY},Vn=function(){br=!1},Wn=function(ri){if(br){let Er=ri.pageY-Cr;Er<0&&(Er=0),Er>300&&(Er=300);let xi=vn+Er+"px";si(xi)}},ln=ci.current,br=!1,Cr=0;return ln.addEventListener("mousedown",An),document.addEventListener("mousemove",Wn),document.addEventListener("mouseup",Vn),()=>{ln.removeEventListener("mousedown",An),document.removeEventListener("mousemove",Wn),document.removeEventListener("mouseup",Vn)}}},[mn,ci]),(0,ht.useEffect)(()=>{si(vn)},[vn]);const Sn=dr(en),Hn=dr($r),$n={width:Sn,height:Hn},Kn=(0,ht.useMemo)(()=>{if(Qr){let An=new Date(Qr),Vn=An.getHours(),Wn=An.getMinutes(),ln=An.getSeconds();return Vn=Vn<10?"0"+Vn:Vn,Wn=Wn<10?"0"+Wn:Wn,ln=ln<10?"0"+ln:ln,`${Vn}:${Wn}:${ln}`}return 0},[Qr]),un=An=>{const Vn=[];if(Wt){let Wn=-1;An=An.replace(/(@▁▁@|@▁@)/g,function(ln,br,Cr){Vn.push({multiLine:ln!==Wi})})}return Vn};function Fn(){window.sessionStorage.removeItem(gr),pn(!1),hi(0)}function zn(){pn(!1),hi(0),mn.setValue(window.sessionStorage.getItem(gr))}(0,ht.useEffect)(()=>{Lr[nr]&&nr!==Dn&&nr!==bn&&setTimeout(()=>{const An=document.getElementsByClassName("markdown-popup-form")[0],Vn=window.innerWidth/2-An.offsetWidth/2,Wn=window.innerHeight/2-An.offsetHeight/2;yn(Vn),li(Wn)},0)},[nr]);const Ln=An=>{An.preventDefault();const Vn=An.clientX-Oi,Wn=An.clientY-Sr;document.body.onmousemove=ln=>{let br=ln.clientX-Vn,Cr=ln.clientY-Wn;const ri=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth-ri.offsetWidth,xi=window.innerHeight-ri.offsetHeight;br=Math.max(0,Math.min(br,Er)),Cr=Math.max(0,Math.min(Cr,xi)),In(ln.clientX,ln.clientY,Vn,Wn)&&(yn(br),li(Cr))},document.body.onmouseup=function(){document.body.onmousemove=null}},In=(An,Vn,Wn,ln)=>{const br=document.body.clientHeight,Cr=document.body.clientWidth;return An<20&&Wn>An||An>Cr-20&&Wn<An||Vn<20&&ln>Vn||Vn>br-20&&ln<Vn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ht.createElement(ht.Fragment,null,ht.createElement("div",{className:"markdown-editor-wrapper",ref:Hi},ht.createElement("div",{className:`markdown-editor-container ${ar} ${zi?"on-preview":""} ${fr?"mini":""} ${vr?"full-screen":""}`,style:$n},ht.createElement(Be,{insertTemp:an,watch:zi,fullScreen:vr,showNullButton:jt,showNullProgramButton:Wt,onActionCallback:wn,hidetoolBar:jn,extraUse:sr}),ht.createElement("div",{className:"markdown-editor-body"},ht.createElement("div",{className:"codemirror-container"},ht.createElement("textarea",{ref:Jr,placeholder:er})),zi?ht.createElement("div",{ref:Hr,className:"preview-container"},Nn==="stex"&&ht.createElement(ve,{value:Vr}),Nn!=="stex"&&ht.createElement(Le.Z,{disabledFill:Un,showProgramFill:Wt,value:Vr})):null))),Zr?ht.createElement("a",{ref:ci,className:"editor-resize"}):null,nr===Dn&&ht.createElement(mt,{callback:Zt,onCancel:On}),nr===bn&&ht.createElement(He,{callback:Zt,onCancel:On}),ht.createElement(Fe.Z,null,Lr[nr]&&nr!==Dn&&nr!==bn?ht.createElement(dt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Oi,top:Sr},title:ht.createElement("div",{style:{cursor:"move"},onMouseDown:Ln},Lr[nr]),open:!0,onCancel:On,footer:null,destroyOnClose:!0,width:nr===bn?"1200px":null,height:nr===bn?"80vh":null,className:"markdown-popup-form"},lt):null))}},45596:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return je},I:function(){return Fe}});var ht=at(28284),Dt=at(6767),oe=at(37568),ze=at(77736),De=at(71051),fe=at(47889),me=at(99571),ke=at(67303),Ce=at(59301),Se=at(59301),Le=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ne,Ae,Re)=>Ae in Ne?Le(Ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ne[Ae]=Re,ie=(Ne,Ae)=>{for(var Re in Ae||(Ae={}))z.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);if(de)for(var Re of de(Ae))ee.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);return Ne},le=(Ne,Ae)=>ve(Ne,we(Ae));const{useForm:ue}=ht.default,ge={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ne,onCancel:Ae})=>{const[Re]=ue();let We=(0,Ce.useRef)();function Ye(ot){We.current.width=Re.getFieldValue("width"),We.current.align=Re.getFieldValue("align"),Ne(ot,We.current)}function Ue(ot,st){if(ot.status===-1){Dt.ZP.error(ot.message);return}Re.setFieldsValue({src:`/api/attachments/${ot.id}`,type:st.type})}function Ve(ot){let st=ot.target.files[0];We.current=st,Fe(st,Ue)}return Se.createElement(ht.default,le(ie({form:Re},Pe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(ht.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(ht.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(oe.default,{style:ge})),Se.createElement(Be,{onFileChange:Ve}))),Se.createElement(ht.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(ht.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(ze.Z,null,Se.createElement(ht.default.Item,{name:"width",style:{margin:0}},Se.createElement(De.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(ht.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(fe.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Se.createElement("aside",null,Se.createElement(ht.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(me.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88"))))};function Be({onFileChange:Ne}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Ne}))}function Fe(Ne,Ae){if(!Ne)throw new String("\u6CA1\u6709\u6587\u4EF6");let Re=new FormData;Re.append("editormd-image-file",Ne),Re.append("file_param_name","editormd-image-file"),Re.append("byxhr","true");var We=new window.XMLHttpRequest;We.withCredentials=!0,We.addEventListener("load",function(Ye){Ae(JSON.parse(Ye.target.responseText),Ne)},!1),We.addEventListener("error",function(Ye){console.error(Ye)},!1),We.open("POST",`${ke.KI}/api/attachments.json`),We.send(Re)}},75790:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return oe}});var ht=at(59301),Dt=at(4676);class oe extends ht.Component{constructor(De){super(De);const fe=window.document;this.node=fe.createElement("div"),fe.body.appendChild(this.node)}render(){const{children:De}=this.props;return(0,Dt.createPortal)(De,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(gn,cn,at){"use strict";at.d(cn,{SV:function(){return vt},ZP:function(){return mt}});var ht=at(59301),Dt=at(76374);const oe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ze={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"]},De={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(`
`)}]},fe={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(`
`)}]},me={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 ke=at(53184),Ce=at.n(ke),Se=(kt,pt,Qe)=>new Promise((Ke,xe)=>{var Me=Ie=>{try{tt(Qe.next(Ie))}catch(_e){xe(_e)}},Ze=Ie=>{try{tt(Qe.throw(Ie))}catch(_e){xe(_e)}},tt=Ie=>Ie.done?Ke(Ie.value):Promise.resolve(Ie.value).then(Me,Ze);tt((Qe=Qe.apply(kt,pt)).next())});const Le={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"]}},ve=(kt,pt,Qe,Ke)=>{const xe=pt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Qe.lineNumber,endColumn:Qe.column});return Array.from(new Set(xe.match(/\b\w{2,}\b/g)||[])).map(Ze=>({label:Ze,kind:kt.languages.CompletionItemKind.Text,insertText:Ze,range:Ke}))},we=(kt,pt,Qe,Ke)=>{kt.languages.registerCompletionItemProvider(pt,{provideCompletionItems(xe,Me){const Ze=xe.getWordUntilPosition(Me),tt={startLineNumber:Me.lineNumber,endLineNumber:Me.lineNumber,startColumn:Ze.startColumn,endColumn:Ze.endColumn},Ie=xe.getLineContent(Me.lineNumber).substring(Ze.startColumn-2,Ze.endColumn);return{suggestions:[...ve(kt,xe,Me,tt),...Qe.map(He=>({label:He,kind:kt.languages.CompletionItemKind.Keyword,documentation:He,insertText:He,insertTextRules:kt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tt})),...Ke.map(He=>({label:He.label,kind:kt.languages.CompletionItemKind.Snippet,documentation:He.content,insertText:Ie.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:kt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tt}))]}}})};var de=kt=>{Le.languages.forEach(pt=>{kt.languages.registerDocumentFormattingEditProvider(pt,{provideDocumentFormattingEdits(Qe){return Se(this,null,function*(){const Ke=Ce()(Qe.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:Qe.getFullModelRange(),text:Ke}]})}})}),we(kt,"java",ze.keywords,ze.quickKey),we(kt,"cpp",De.keywords,De.quickKey),we(kt,"c",oe.keywords,[]),we(kt,"python",fe.keywords,fe.quickKey),we(kt,"scala",me.keywords,me.quickKey)};const z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ee=Object.defineProperty,ae=(kt,pt,Qe)=>pt in kt?ee(kt,pt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):kt[pt]=Qe,ie=(kt,pt,Qe)=>ae(kt,typeof pt!="symbol"?pt+"":pt,Qe);const le=class mx{constructor(pt,Qe,Ke){this.placeholder=pt,this.editor=Qe,this.monaco=Ke,Qe.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)}};ie(le,"ID","editor.widget.placeholderHint");var ge=le,Pe=at(96236),je=at(6767),Be=at(25399),Fe=at(89392),Ne=at(33796),Ae=at(56102),Re=Object.defineProperty,We=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,st=(kt,pt,Qe)=>pt in kt?Re(kt,pt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):kt[pt]=Qe,ct=(kt,pt)=>{for(var Qe in pt||(pt={}))Ve.call(pt,Qe)&&st(kt,Qe,pt[Qe]);if(Ue)for(var Qe of Ue(pt))ot.call(pt,Qe)&&st(kt,Qe,pt[Qe]);return kt},Pt=(kt,pt)=>We(kt,Ye(pt)),$e=(kt,pt)=>{var Qe={};for(var Ke in kt)Ve.call(kt,Ke)&&pt.indexOf(Ke)<0&&(Qe[Ke]=kt[Ke]);if(kt!=null&&Ue)for(var Ke of Ue(kt))pt.indexOf(Ke)<0&&ot.call(kt,Ke)&&(Qe[Ke]=kt[Ke]);return Qe},nt=(kt,pt,Qe)=>new Promise((Ke,xe)=>{var Me=Ie=>{try{tt(Qe.next(Ie))}catch(_e){xe(_e)}},Ze=Ie=>{try{tt(Qe.throw(Ie))}catch(_e){xe(_e)}},tt=Ie=>Ie.done?Ke(Ie.value):Promise.resolve(Ie.value).then(Me,Ze);tt((Qe=Qe.apply(kt,pt)).next())});function yt(kt){return/^\d+$/.test(kt)?`${kt}px`:kt}function xt(){}let wt=!1;const dt={"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 ft(kt=[]){let pt=kt;if(Array.isArray(kt)){for(let Qe=0;Qe<kt.length;Qe++){let Ke=dt[kt[Qe]];if(Ke)return Ke}return pt[0]}return dt[pt]||pt}let ut=null;const Et=()=>nt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(kt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",kt)}});var mt=kt=>{var pt=kt,{width:Qe="100%",height:Ke="100%",value:xe,language:Me="javascript",style:Ze={},options:tt={},overrideServices:Ie={},theme:_e="vs-dark",onEditBlur:He,isCopy:rt=!1,onSave:St,autoHeight:Ct=!1,forbidCopy:Nt=!1,onChange:Ot=xt,editorDidMount:Rt=xt,onFocus:$t=xt,onBreakPoint:qt=xt,breakPointValue:rn=[],filename:Ht="educoder.txt",errorLine:sn,errorContent:tn="",highlightLine:Ut,openBreakPoint:En=!1,placeholder:bn="",showMiniMap:Dn=!0}=pt,Qn=$e(pt,["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 Pr=(0,ht.useRef)(),Yn=(0,ht.useRef)({}),Mr=(0,ht.useRef)(),Ur=(0,ht.useRef)(),_r=(0,ht.useRef)([]),ni=(0,ht.useRef)(!1),Li=(0,ht.useRef)(),_i=(0,ht.useRef)(),Di=(0,ht.useRef)(!1),[ui,Wi]=(0,ht.useState)(!1);function et(){let an;return Pr.current&&(an=new Dt.Z(Nn=>{for(let gr of Nn)(gr.target.offsetHeight>0||gr.target.offsetWidth>0)&&Yn.current.instance.layout()}),an.observe(Pr.current)),an}function jr(){je.ZP.warning({content:decodeURIComponent(z),key:"monaco-editor-tip"})}const dr=()=>{let an=Yn.current.instance;if(xe!=null&&an&&ui){const Nn=an.getModel();Nn&&xe!==Nn.getValue()&&(wt=!0,Nn.setValue(xe),an.layout(),wt=!1)}};(0,ht.useEffect)(()=>{const an=Ne.Z.subscribe("formatDocument",Nn=>{var gr;let Zr=Yn.current.instance;(gr=Zr==null?void 0:Zr.getAction)==null||gr.call(Zr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Nn=>{Ot(Nn)},an},[]),(0,ht.useEffect)(()=>{var an;let Nn=Yn.current.instance;Ur.current&&clearTimeout(Ur.current),Ur.current=setTimeout(()=>{dr()},500),xe&&(xe!=null&&xe.length)&&((an=Nn==null?void 0:Nn.updateOptions)==null||an.call(Nn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(xe.split(/\r\n|\r|\n/g).length))+3,5)}))},[xe,ui,Yn.current]),(0,ht.useEffect)(()=>{if(sn&&Yn.current&&Yn.current.instance){let Nn=Yn.current.instance;Nn.changeViewZones(function(gr){var Zr=document.createElement("div");Zr.style.padding="10px 20px",Zr.style.width="calc(100% - 20px)",Zr.className="my-error-line-wrp",Zr.innerHTML=tn,gr.addZone({afterLineNumber:sn||11,heightInLines:3,domNode:Zr})});var an={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Nn.addOverlayWidget(an),Nn.revealPositionInCenter({lineNumber:20,column:1})}},[sn,Yn.current,ui]);const Ai=(an="",Nn)=>{if(!an||an.trim()==="")return!0;const Zr=Yn.current.instance.getModel().getLineTokens(Nn);let Xn=!1;for(let jt=0;jt<2;jt++)Zr.getStandardTokenType(jt)===1&&(Xn=!0);return Xn};(0,ht.useEffect)(()=>{var an;const Nn=(an=Yn.current)==null?void 0:an.instance;if(Nn&&ui&&Nt){const gr=Nn.onDidBlurEditorWidget(()=>{Di.current=!1}),Zr=Nn.onDidFocusEditorText(()=>{Di.current=!0});return()=>{gr.dispose(),Zr.dispose()}}},[Yn.current,ui,Nt]),(0,ht.useEffect)(()=>{var an;if((an=Yn.current)!=null&&an.instance&&ui&&En){let Nn=Yn.current.instance,gr=Nn.getModel();if(!gr)return;(()=>{var Bn;let Un=[],er=[];const Ar=gr.getAllDecorations();for(let mn of Ar)mn.options.className==="highlighted-line"&&(Un.push((Bn=mn==null?void 0:mn.range)==null?void 0:Bn.startLineNumber),er.push(mn==null?void 0:mn.id));if(Ut===Un[0])return;gr.deltaDecorations(er,[]);const sr=gr.getLineCount();Ut&&Ut<=sr&&(Nn.deltaDecorations([],[{range:new ut.Range(Ut,1,Ut,gr.getLineMaxColumn(Ut)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Nn.revealLineInCenter(Ut))})();const Xn=(Bn=!1)=>{var Un;let er=[],Ar=[];const sr=gr.getAllDecorations();for(let mn of sr)mn.options.linesDecorationsClassName==="breakpoints-select"&&(er.push((Un=mn==null?void 0:mn.range)==null?void 0:Un.startLineNumber),Ar.push(mn==null?void 0:mn.id));if(Bn)return{lines:er,ids:Ar};qt(er)},jt=Bn=>nt(void 0,null,function*(){let Un={range:new ut.Range(Bn,1,Bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield gr.deltaDecorations([],[Un]),Xn()}),Wt=Bn=>nt(void 0,null,function*(){let Un=[];const er=Nn.getLineDecorations(Bn);for(let Ar of er)Ar.options.linesDecorationsClassName==="breakpoints-select"&&Un.push(Ar.id);yield gr.deltaDecorations(Un,[]),Xn()}),jn=Bn=>{let Un=Nn.getLineDecorations(Bn);for(let er of Un)if(er.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Fe.isEqual)(rn,Xn(!0).lines)){gr.deltaDecorations(Xn(!0).ids,[]);const Bn=rn.map(Un=>({range:new ut.Range(Un,1,Un,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));gr.deltaDecorations([],Bn)}const Cn=Nn.onDidChangeModelContent(Bn=>{let Un=Nn.getPosition();if(Un){let er=Un.lineNumber;clearTimeout(_i.current),_i.current=setTimeout(()=>{Ai(gr.getLineContent(er),er)?Wt(er):jn(er)?(Wt(er),jt(er)):Xn()},100)}}),Jt=Nn.onMouseDown(Bn=>{var Un,er,Ar;if(Bn.target.detail&&((Ar=(er=(Un=Bn.target)==null?void 0:Un.element)==null?void 0:er.className)!=null&&Ar.includes("line-numbers"))){let sr=Bn.target.position.lineNumber;if(Ai(gr.getLineContent(sr),sr))return;jn(sr)?Wt(sr):jt(sr)}}),_n=Bn=>{let Un={range:new ut.Range(Bn,1,Bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};_r.current=Nn.deltaDecorations(_r.current,[Un])},ur=()=>{_r.current=Nn.deltaDecorations(_r.current,[])},ar=Nn.onMouseMove(Bn=>{var Un,er,Ar;if(ur(),Bn.target.detail&&((Ar=(er=(Un=Bn.target)==null?void 0:Un.element)==null?void 0:er.className)!=null&&Ar.includes("line-numbers"))){let sr=Bn.target.position.lineNumber;if(Ai(gr.getLineContent(sr),sr))return;_n(sr)}}),mr=Nn.onMouseLeave(()=>{ur()});return()=>{Cn.dispose(),Jt.dispose(),ar.dispose(),mr.dispose()}}},[Yn.current,ui,rn,Ut,En,Me]),(0,ht.useEffect)(()=>{var an;(an=Yn.current)!=null&&an.instance&&En&&Yn.current.instance.setPosition({lineNumber:0,column:0})},[Ut]);function lr(){let an=Yn.current.instance;if(an){const Nn=an.getSelection(),gr=Yn.current.pastePos||{},Zr=new ut.Range(gr.startLineNumber||Nn.endLineNumber,gr.startColumn||Nn.endColumn,gr.endLineNumber||Nn.endLineNumber,gr.endColumn||Nn.endColumn);setTimeout(()=>{an.executeEdits("",[{range:Zr,text:""}])},300)}}function yr(an){(window.navigator.platform.match("Mac")?an.metaKey:an.ctrlKey)&&an.keyCode==83&&(an.preventDefault(),St())}const Lr=()=>{if(Ct&&Yn.current.instance){const an=Yn.current.instance.getContentHeight();cr(an<Ke?Ke:an)}else cr(Ke)};function uo(an){var Nn=document.createEvent("MouseEvents");Nn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),an.dispatchEvent(Nn)}const on=an=>{if(!Di.current)return;const{keyCode:Nn,ctrlKey:gr,metaKey:Zr,target:Xn,type:jt}=an;return(jt==="paste"||(Nn===67||Nn===86)&&(Zr||gr))&&Xn.nodeName==="TEXTAREA"&&(jr(),an.preventDefault()),!1};function dn(an,Nn){var gr=window.URL||window.webkitURL||window,Zr=new Blob([Nn]),Xn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Xn.href=gr.createObjectURL(Zr),Xn.download=an,uo(Xn)}(0,ht.useEffect)(()=>{Lr()},[Lr]),(0,ht.useEffect)(()=>{Pr.current&&!ui&&Promise.all([at.e(8909),at.e(5028)]).then(at.bind(at,71448)).then(an=>{try{ut=an,Yn.current.instance=ut.editor.create(Pr.current,{value:xe,language:ft(Me),theme:_e,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Dn||!1}},Ie);const Nn=Yn.current.instance;let Xn=[...Pe.BH._menuItems].find(Cn=>Cn[0]._debugName=="EditorContext")[1],jt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Wt=(Cn,Jt)=>{var _n,ur;let ar=Cn._first;do Jt.includes((ur=(_n=ar.element)==null?void 0:_n.command)==null?void 0:ur.id)&&Cn._remove(ar);while(ar=ar.next)};if(Rt(Nn,ut),setTimeout(()=>{Lr(),Yn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{dn(Ht||"educoder.txt",Nn.getValue())}})},500),Yn.current.subscription=Nn.onDidChangeModelContent(Cn=>{ni.current?clearTimeout(Li.current):(Lr(),Ot(Nn.getValue(),Cn)),Li.current=setTimeout(()=>{ni.current=!1},500)}),window.Monaco||de(ut,ft(Me)),Nt&&(Wt(Xn,jt),Pr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",on),window.removeEventListener("paste",on),window.addEventListener("keydown",on),window.addEventListener("paste",on)),window.Monaco=ut,He&&Nn.onDidBlurEditorWidget(()=>{He(Nn.getValue())}),$t&&Nn.onDidFocusEditorText(()=>{Nt&&Et(),$t(Nn.getValue())}),Nt){Et();try{Nn.onDidPaste(Cn=>{const Jt=Nn.getSelection(),_n=Yn.current.pastePos||{},ur=new ut.Range(_n.startLineNumber||Jt.endLineNumber,_n.startColumn||Jt.endColumn,_n.endLineNumber||Jt.endLineNumber,_n.endColumn||Jt.endColumn);Nn.executeEdits("",[{range:Cn.range,text:""}])})}catch(Cn){}}let jn=et();return bn&&typeof bn=="string"&&new ge(bn,Nn,ut),Wi(!0),()=>{const Cn=Yn.current.instance;Cn.dispose();const Jt=Cn.getModel();Jt&&Jt.dispose(),Yn.current.subscription&&Yn.current.subscription.dispose(),jn.unobserve(Pr.current)}}catch(Nn){}})},[]),(0,ht.useEffect)(()=>{if(Yn.current.instance&&ui)return document.addEventListener("keydown",yr,!1),()=>{document.removeEventListener("keydown",yr)}},[St,ui]),(0,ht.useEffect)(()=>{let an=Yn.current.instance;if(an&&ui){let Nn=ft(Me);ut.editor.setModelLanguage(an.getModel(),Nn)}},[Me,ui]),(0,ht.useEffect)(()=>{Yn.current.instance&&ui&&ut.editor.setTheme(_e)},[_e,ui]),(0,ht.useEffect)(()=>{let an=Yn.current.instance;Mr.current=tt,an&&ui&&(an.updateOptions(ct({},tt)),setTimeout(()=>{an.getModel().updateOptions(ct({},tt))},200))},[JSON.stringify(tt),ui]),(0,ht.useEffect)(()=>{let an=Yn.current.instance;an&&ui&&an.layout()},[Qe,Ke,ui]);const[en,vn]=(0,ht.useState)(yt(Qe)),[fr,cr]=(0,ht.useState)(yt(Ke)),oi=Pt(ct({},Ze),{width:en,height:fr,position:"relative"});return ht.createElement("div",{className:"my-monaco-editor",ref:Pr,style:oi},rt&&ht.createElement(Ae.CopyToClipboard,{text:xe,onCopy:()=>je.ZP.success("\u590D\u5236\u6210\u529F")},ht.createElement(Be.Z,{title:"\u590D\u5236\u4EE3\u7801"},ht.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ht.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function vt({width:kt="100%",height:pt="100%",original:Qe,modified:Ke,language:xe,options:Me={}}){const Ze=(0,ht.useRef)(),[tt,Ie]=(0,ht.useState)(null);function _e(Ct){let Nt;return Ze.current&&(Nt=new Dt.Z(Ot=>{for(let Rt of Ot)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&Ct.layout()}),Nt.observe(Ze.current)),Nt}(0,ht.useEffect)(()=>(Ze.current&&Promise.all([at.e(8909),at.e(9404)]).then(at.bind(at,2550)).then(Ct=>{ut=Ct;const Nt=ut.editor.createDiffEditor(Ze.current,Pt(ct({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},Me),{wordWrap:!0}));Ie(Nt);let Ot=_e(Nt);return()=>{Nt.dispose();const Rt=Nt.getModel();Rt&&Rt.dispose(),Ot.unobserve(Ze.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ht.useEffect)(()=>{tt&&tt.setModel({original:ut.editor.createModel(Qe,xe),modified:ut.editor.createModel(Ke,xe)})},[Qe,Ke,xe,tt]);const He=yt(kt),rt=yt(pt),St={width:He,height:rt};return ht.createElement("div",{className:"my-diff-editor",ref:Ze,style:St})}},64536:function(gn,cn,at){"use strict";var ht=at(45298),Dt=at(82326),oe=at(71411),ze=at(59301);const De=Dt.default.Option;cn.Z=({isTheoretical:fe,onFontSizeChange:me,cmFontSize:ke,cmCodeMode:Ce,autoFormat:Se,onCodeModeChange:Le,onTabToSpace:ve,onAutoFormat:we,formatDocument:de,className:z="",tabToSpace:ee,children:ae,code_editor:ie,challenge:le,shixun_environment_id:ue,shixun_environments:ge})=>{var Pe;const je={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Be=(Pe=ge==null?void 0:ge.find(Fe=>Fe.shixun_environment_id===ue))==null?void 0:Pe.program_language;return console.log("----",Be,ge,ue,ie),ze.createElement("div",{className:`tpi-code-setting ${z}`},ze.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ze.createElement(Dt.default,{bordered:!1,size:"small",value:Ce,onChange:Le},ze.createElement(De,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ze.createElement(De,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ze.createElement(Dt.default,{bordered:!1,size:"small",value:ke,onChange:me},ze.createElement(De,{value:12},"12px"),ze.createElement(De,{value:14},"14px"),ze.createElement(De,{value:16},"16px"),ze.createElement(De,{value:18},"18px"),ze.createElement(De,{value:20},"20px"),ze.createElement(De,{value:22},"22px"))),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"Tab\u8F6C\u6362"),ze.createElement(oe.Z,{checked:ee,onChange:ve})),ze.createElement("div",{className:"file-item",onClick:de},ze.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ze.createElement("span",null,"Ctrl + S")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ze.createElement("span",null,"F1 / Alt + F1")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ze.createElement("span",null,"Ctrl + ]/[")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ze.createElement("span",null,"Ctrl + Shift + \\")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ze.createElement("span",null,"Home")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ze.createElement("span",null,"End"))),ae),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,Be&&ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),ze.createElement("span",null,Be)),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ze.createElement("span",null,je[le==null?void 0:le.difficulty])),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ze.createElement("span",null,ie==null?void 0:ie.name)),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ze.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},17904:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Dt}});var ht=at(59301);function Dt(oe,ze){const De=(0,ht.useRef)();(0,ht.useEffect)(()=>{De.current=oe}),(0,ht.useEffect)(()=>{function fe(){De.current()}if(ze!==null){let me=setInterval(fe,ze);return()=>clearInterval(me)}},[ze])}},29499:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{Types:function(){return Wi},default:function(){return dr}});var ht=at(59301),Dt={header:"header___N_IdR",field:"field___XG_dh","oj-form-container":"oj-form-container___syYzK","oj-left-panel":"oj-left-panel___L082x","oj-form-info":"oj-form-info___q0IU5",footer:"footer___pGCM2",result:"result___LM9Ms",passText:"passText___nUoL4",noPassText:"noPassText___ECHHG",pass:"pass___tDubp",noPass:"noPass___ilYvg","test-case-name":"test-case-name___MI_KD","btn-remove-case":"btn-remove-case___OiaTQ","icon-tag":"icon-tag___D86WO",btn_back:"btn_back___FyaSY",testJi:"testJi___NDviK",upBtn:"upBtn___FiZX4","oj-problems":"oj-problems___xb70g",row:"row___v036E",a:"a___yRaYH",b:"b___gWQyu",inputTwo:"inputTwo___IZ9og",inputOne:"inputOne____NmcT",cusModal:"cusModal___fJ5gm","oj-custom-large-spin":"oj-custom-large-spin___Aar0g",MdEditor:"MdEditor___hgoes"},oe=at(37568),ze=at(62957),De=at(8848),fe=at(28284),me=at(6767),ke=at(77019),Ce=at(5269),Se=at(29787),Le=at(99571),ve=at(54172),we=at(82326),de=at(71051),z=at(47889),ee=at(62673),ae=at(77736),ie=at(93725),le=at(59301);const{Option:ue}=we.default;var ge=(lr=>(lr[lr.language=0]="language",lr[lr.difficulty=1]="difficulty",lr[lr.category=2]="category",lr[lr.openOrNot=3]="openOrNot",lr))(ge||{});const Pe={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",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 je(lr){return Pe[lr].map(yr=>le.createElement(ue,{key:yr.title,value:yr.key}," ",yr.title," "))}function Be(lr,yr){lr.map(Lr=>{const{id:uo,name:on,sub_disciplines:dn}=Lr;let en={value:uo,label:on};yr.push(en),dn&&dn.length>0&&(en.children=[],Be(dn,en.children))})}function Fe(lr,yr){var Lr;let uo=[];for(let on=0;on<lr.length;on++){const dn=lr[on];if(((Lr=dn.sub_disciplines)==null?void 0:Lr.length)>0){uo[0]=dn.id;for(let en=0;en<dn.sub_disciplines.length;en++){const vn=dn.sub_disciplines[en];if(vn.id===yr)return uo[1]=vn.id,[uo,vn.tag_disciplines||vn.sub_disciplines||[]]}}}return[uo,[]]}var Ne=at(76560),Ae=at(24334),Re=at(76618),We=at(65363),Ye=at(89389),Ue=at(82093);function Ve(lr){return(0,Ue.v_)("practices.json",lr)}function ot(){return(0,Ue.U2)("problems/new.json")}function st(lr){return(0,Ue.U2)(`practices/${lr}/edit.json`)}function ct(lr,yr){return(0,Ue.gz)(`practices/${lr}`,yr)}function Pt(lr,yr){return post(`exercises/${lr}/exercise_questions.json`,yr)}function $e(lr,yr){return put(`exercise_questions/${lr}.json`,yr)}var nt=at(72015),yt=at(30641),xt=at(51124),wt=at(64536),dt=at(75790),ft=at(89613),ut={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},Et=Object.defineProperty,mt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Ke=(lr,yr,Lr)=>yr in lr?Et(lr,yr,{enumerable:!0,configurable:!0,writable:!0,value:Lr}):lr[yr]=Lr,xe=(lr,yr)=>{for(var Lr in yr||(yr={}))pt.call(yr,Lr)&&Ke(lr,Lr,yr[Lr]);if(kt)for(var Lr of kt(yr))Qe.call(yr,Lr)&&Ke(lr,Lr,yr[Lr]);return lr},Me=(lr,yr)=>mt(lr,vt(yr));const Ze={theme:(0,ft.G)("cmCodeMode","vs-dark"),fontSize:(0,ft.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ft.G)("cmTabToSpace",!0)};var tt=(lr=>(lr[lr.set_font_size=0]="set_font_size",lr[lr.set_theme=1]="set_theme",lr[lr.on_tab_to_space=2]="on_tab_to_space",lr[lr.set_show_editor_setting=3]="set_show_editor_setting",lr))(tt||{});function Ie(lr,yr){switch(yr.type){case 3:return Me(xe({},lr),{showEditorSetting:yr.payload});case 1:return Me(xe({},lr),{theme:yr.payload});case 0:return Me(xe({},lr),{fontSize:yr.payload});case 2:return Me(xe({},lr),{tabToSpace:yr.payload});default:throw new Error}}var _e=({value:lr,onChange:yr,language:Lr,onLanguage:uo,languageItems:on,ActionBarRender:dn=en=>ht.createElement(He,{languageItems:on,onLanguage:uo,language:Lr,onShowCodeSetting:en})})=>{const[en,vn]=(0,ht.useReducer)(Ie,Ze),{theme:fr,fontSize:cr,showEditorSetting:oi,tabToSpace:an}=en;console.log(lr,Lr,"value");const Nn={onFontSizeChange:jt=>{vn({type:0,payload:jt}),(0,ft.t)("cmFontSize",jt)},tabToSpace:an,cmFontSize:cr,className:"oj",cmCodeMode:fr,onTabToSpace:jt=>{vn({type:2,payload:jt}),(0,ft.t)("cmTabToSpace",jt)},onCodeModeChange:jt=>{vn({type:1,payload:jt}),(0,ft.t)("cmCodeMode",jt)}};function gr(){vn({type:3,payload:!1})}function Zr(){vn({type:3,payload:!0})}const Xn={value:lr,language:Lr,onChange:yr,theme:fr,height:"calc(100% - 56px)",options:{fontSize:cr,insertSpaces:an}};return ht.createElement(ht.Fragment,null,ht.createElement("div",{className:ut["code-panel-container"]},dn(Zr),ht.createElement(xt.ZP,xe({key:Lr},Xn))),ht.createElement(dt.Z,null,ht.createElement(yt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:oi,onClose:gr},ht.createElement(wt.Z,xe({},Nn)))))};function He({languageItems:lr,language:yr,onShowCodeSetting:Lr,onLanguage:uo}){return ht.createElement("div",{className:ut["action-oj-bar"]},lr==null?void 0:lr.map(on=>ht.createElement("div",{className:yr===(on==null?void 0:on.language)?ut.active:"",onClick:()=>uo(on==null?void 0:on.language),key:on==null?void 0:on.language},on==null?void 0:on.language)),ht.createElement("a",{onClick:Lr},ht.createElement("i",{className:"iconfont icon-shezhi"})))}var rt=at(20554),St={flex_box_center:"flex_box_center___4yAaY",flex_space_between:"flex_space_between___YaUgM",flex_box_vertical_center:"flex_box_vertical_center___zR3dp",flex_box_center_end:"flex_box_center_end___rwgS5",flex_box_column:"flex_box_column___LhFeP",wrap:"wrap___xTL91",in:"in___eSY86",btns:"btns___UdEGI",customModal:"customModal___CL0OL"},Ct=(lr,yr,Lr)=>new Promise((uo,on)=>{var dn=fr=>{try{vn(Lr.next(fr))}catch(cr){on(cr)}},en=fr=>{try{vn(Lr.throw(fr))}catch(cr){on(cr)}},vn=fr=>fr.done?uo(fr.value):Promise.resolve(fr.value).then(dn,en);vn((Lr=Lr.apply(lr,yr)).next())}),Ot=({visible:lr,onOK:yr,onCancel:Lr})=>{const[uo,on]=(0,ht.useState)(!1),[dn,en]=(0,ht.useState)(!1),[vn,fr]=(0,ht.useState)("1"),[cr,oi]=(0,ht.useState)(""),[an,Nn]=(0,ht.useState)([]),gr=()=>Ct(void 0,null,function*(){if(!cr){me.ZP.warning(`\u9898\u76EE${jn}\u4E0D\u80FD\u4E3A\u7A7A`);return}en(!0);const Cn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:lr,name:cr}});if((Cn==null?void 0:Cn.status)===0){yr();return}en(!1)}),Zr=(Cn="")=>Ct(void 0,null,function*(){on(!0);let Jt=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:lr,search:Cn}});Nn(Jt.tag_disciplines||[]),on(!1)}),Xn=Cn=>{let Jt=Cn.name;ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ht.createElement("div",null,ht.createElement(oe.default,{defaultValue:Jt,placeholder:`\u8BF7\u8F93\u5165${jn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:_n=>{Jt=_n.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ct(void 0,null,function*(){if(!Jt)return me.ZP.warning(`\u9898\u76EE${jn}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const _n=yield(0,Ue.ZP)(`/api/tag_disciplines/${Cn.id}/rename.json`,{method:"post",body:{id:Cn.id,name:Jt}});(_n==null?void 0:_n.status)===0&&Zr()})})},jt=Cn=>{ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:lr==="practice"?ht.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ht.createElement("span",{className:"c-light-primary"},Cn.name),"\u201D\u5220\u9664\u5417\uFF1F",ht.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ht.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ht.createElement("span",{className:"c-light-primary"},Cn.name),"\u201D\u5220\u9664\u5417\uFF1F",ht.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ct(void 0,null,function*(){const Jt=yield(0,Ue.ZP)(`/api/tag_disciplines/${Cn.id}.json`,{method:"delete",body:{id:Cn.id}});(Jt==null?void 0:Jt.status)===0&&Zr()})})},Wt=Cn=>{Zr(Cn)},jn=lr==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ht.createElement(ze.default,{afterClose:()=>{en(!1),on(!1),oi(""),fr("1"),Nn([])},centered:!0,keyboard:!1,width:600,title:`${jn}\u7BA1\u7406`,open:!!lr,className:St.customModal,footer:null,onCancel:Lr},ht.createElement("section",{className:St.wrap},ht.createElement(rt.default,{activeKey:vn,onChange:Cn=>{oi(""),fr(Cn),Zr()}},ht.createElement(rt.default.TabPane,{tab:`\u65B0\u589E${jn}`,key:"1"},ht.createElement(oe.default,{value:cr,onChange:Cn=>oi(Cn.target.value),className:St.in,placeholder:`\u8F93\u5165${jn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),ht.createElement("div",{className:St.btns},ht.createElement(Le.ZP,{onClick:Lr,className:"mr20"},"\u53D6\u6D88 "),ht.createElement(Le.ZP,{loading:dn,onClick:gr,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ht.createElement(rt.default.TabPane,{tab:`\u5DF2\u6709${jn}`,key:"2"},ht.createElement(oe.default.Search,{allowClear:!0,onSearch:Wt,value:cr,onChange:Cn=>oi(Cn.target.value),className:St.in,placeholder:`\u8F93\u5165${jn}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),ht.createElement(ve.default,{dataSource:an,bordered:!1,loading:uo,scroll:an.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${jn}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(Cn,Jt)=>ht.createElement("span",null,ht.createElement("span",{onClick:()=>Xn(Jt),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ht.createElement("span",{onClick:()=>jt(Jt),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Rt=at(90524),$t=at(12062),qt=at(61186),rn=at.n(qt),Ht=at(49661),sn=at(3713),tn=at(34055),Ut=at(59301),En=Object.defineProperty,bn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Qn=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,Mr=(lr,yr,Lr)=>yr in lr?En(lr,yr,{enumerable:!0,configurable:!0,writable:!0,value:Lr}):lr[yr]=Lr,Ur=(lr,yr)=>{for(var Lr in yr||(yr={}))Pr.call(yr,Lr)&&Mr(lr,Lr,yr[Lr]);if(Qn)for(var Lr of Qn(yr))Yn.call(yr,Lr)&&Mr(lr,Lr,yr[Lr]);return lr},_r=(lr,yr)=>bn(lr,Dn(yr)),ni=(lr,yr,Lr)=>new Promise((uo,on)=>{var dn=fr=>{try{vn(Lr.next(fr))}catch(cr){on(cr)}},en=fr=>{try{vn(Lr.throw(fr))}catch(cr){on(cr)}},vn=fr=>fr.done?uo(fr.value):Promise.resolve(fr.value).then(dn,en);vn((Lr=Lr.apply(lr,yr)).next())});const{TextArea:Li}=oe.default,{confirm:_i}=ze.default,{Panel:Di}=De.default,ui={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Wi=(lr=>(lr[lr.SET_INITAL_DATA=0]="SET_INITAL_DATA",lr[lr.SET_LOADING=1]="SET_LOADING",lr[lr.SET_STATUS=2]="SET_STATUS",lr))(Wi||{});const et="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function jr(lr,yr){switch(yr.type){case 0:return Ur(Ur({},lr),yr.payload);case 1:return _r(Ur({},lr),{loading:yr.payload});case 2:return _r(Ur({},lr),{status:yr.payload});default:throw new Error}}var dr=()=>{var lr,yr,Lr;const uo=(0,Ne.useLocation)(),{id:on}=(0,Ne.useParams)(),[dn]=fe.default.useForm(),[en,vn]=(0,ht.useState)(),[fr,cr]=(0,ht.useState)(!1),[oi,an]=(0,ht.useState)([]),[Nn,gr]=(0,ht.useState)([]),[Zr,Xn]=(0,ht.useState)([]),[jt,Wt]=(0,ht.useState)([]),[jn,Cn]=(0,ht.useState)([]),[Jt,_n]=(0,ht.useState)("C"),[ur,ar]=(0,ht.useReducer)(jr,ui),{loading:mr,data:Bn,user:Un,status:er}=ur,Ar=Bn==null?void 0:Bn.hack_sets,sr=(lr=Bn==null?void 0:Bn.hack)==null?void 0:lr.test_set_average,[mn,tr]=(0,ht.useState)(!1),Vr=(0,ht.useRef)([]),[pi,zi]=(0,ht.useState)(!1),[Yt,vr]=(0,ht.useState)(!1),zr=(0,ht.useRef)(!0),[nr,vi]=(0,ht.useState)({});(0,ht.useEffect)(()=>((0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ht.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Qr=()=>ni(void 0,null,function*(){const Sn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),Hn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});gr(Sn.tag_disciplines||[]),Xn(Hn.tag_disciplines||[])});var hi=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const $r=(0,ht.useCallback)(()=>ni(void 0,null,function*(){if(ar({type:1,payload:!0}),on){const Sn=yield st(on),{user:Hn,language:$n,practice_sets:Kn,practice_codes:un,description:Fn,difficulty:zn,name:Ln,open_or_not:In,time_limit:An,test_set_average:Vn,test_set_score:Wn,status:ln,tag_discipline_ids:br,source_discipline_ids:Cr,item_banks_group_id:ri,is_file:Er=!1,hide_actual_output:xi,review_privilege:gi,review_description:Ci,submit_rule:Si}=Sn;vi({review_privilege:gi,status:ln,review_description:Ci,name:Ln}),tr(xi);const Vi=Er?[{input:"",output:"",score:100,position:1}]:Kn;Er?(an(Kn),dn.setFieldsValue({hack_sets:Vi})):an([]),ar({type:0,payload:{loading:!0,user:Hn,status:ln,data:{hack:{difficulty:zn,name:Ln,description:Fn,open_or_not:In,time_limit:An,test_set_average:Vn,test_set_score:Wn,tag_discipline_ids:br,source_discipline_ids:Cr,is_file:Er,submit_rule:Si},hack_sets:Vi}}}),vn({hack:{difficulty:zn,name:Ln,description:Fn,open_or_not:In,time_limit:An,test_set_average:Vn,test_set_score:Wn,tag_discipline_ids:br,source_discipline_ids:Cr,is_file:Er}});const wi=un==null?void 0:un.map(qr=>_r(Ur({},qr),{code:Ae.Base64.decode(qr==null?void 0:qr.code)}));Cn(wi),Vr.current=wi}else{const{user:Sn}=yield ot();ar({type:0,payload:{loading:!0,status:0,user:Sn,data:{hack:{difficulty:"",time_limit:3,description:et,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1,submit_rule:1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),vn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Cn(hi),Vr.current=hi}ar({type:1,payload:!1})}),[on]);(0,ht.useEffect)(()=>{try{$r(),Qr()}catch(Sn){console.log(Sn,"----")}},[]);function si(Sn,Hn){return ni(this,null,function*(){var $n;const{hack_sets:Kn,hack:un}=Ur({},Sn);un.hide_actual_output=mn;let Fn=[],zn=[],Ln=0;const In=un!=null&&un.is_file?oi.map((Wn,ln)=>_r(Ur({},Wn),{position:ln+1})):Kn.map(Wn=>_r(Ur({},Wn),{is_file:!1}));for(let Wn of In)Ln+=Wn.score,Wn.id&&Wn.id>=0?Fn.push(Wn):zn.push(Wn);if(!(In!=null&&In.length)){me.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(Ln!==100&&!un.test_set_score){me.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(In!=null&&In.some(Wn=>!Wn.output)){me.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}zr.current?zi(!0):vr(!0);let An;const Vn=jn==null?void 0:jn.map(Wn=>_r(Ur({},Wn),{code:Ae.Base64.encode(Wn==null?void 0:Wn.code)}));if(on?An=yield ct(on,{practice:un,practice_codes:Vn,practice_sets:zn,update_practice_sets:Fn}):An=yield Ve({practice:un,practice_codes:Vn,practice_sets:In,publish:!zr.current}),zi(!1),vr(!1),(An==null?void 0:An.status)===0){if(($n=An==null?void 0:An.similar_practice)!=null&&$n.length){cr(!0),Wt(An==null?void 0:An.similar_practice);return}if(on){if(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),!zr.current){const Wn=yield(0,Ue.ZP)(`/api/practices/${on}/start`,{method:"get"});(Wn==null?void 0:Wn.status)===0&&Ne.history.push(`/problems/${Wn==null?void 0:Wn.identifier}/oj/${on}`)}}else me.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ne.history.replace(`/problems/${An==null?void 0:An.identifier}/ojedit`)}})}function bi(){Ne.history.replace("/problems")}const pn=Sn=>{const Hn=Math.floor(100/Sn.length),$n=Hn+100%Sn.length;Sn=Sn.map((Kn,un)=>un===Sn.length-1?_r(Ur({},Kn),{score:$n}):_r(Ur({},Kn),{score:Hn})),an(Sn)};function Oi(Sn){Sn.target.value||pn(oi),ar({type:0,payload:{data:_r(Ur({},Bn),{hack:_r(Ur({},Bn.hack),{test_set_score:Sn.target.value})})}})}function yn(Sn){ar({type:0,payload:{data:_r(Ur({},Bn),{hack:_r(Ur({},Bn.hack),{is_file:Sn.target.value})})}})}function Sr(Sn){tr(Sn.target.checked)}function li(Sn){const Hn=Sn.target.value;Hn&&pn(oi),ar({type:0,payload:{data:_r(Ur({},Bn),{hack:_r(Ur({},Bn.hack),{test_set_average:Hn})})}})}function Jr(){let Sn=dn.getFieldValue("hack_sets");const Hn=Sn.length+1,$n=Math.floor(100/Hn),Kn=100%Hn;Sn.map((un,Fn)=>(sr&&(un.score=$n),un.position=Fn+1,un)),Sn.push({input:"",output:"",position:Hn,score:sr?$n+Kn:0}),dn.setFieldsValue({hack_sets:Sn}),ar({type:0,payload:{data:_r(Ur({},Bn),{hack_sets:Sn})}})}(0,ht.useEffect)(()=>{if(sr){const Sn=Ar==null?void 0:Ar.length,Hn=Math.floor(100/Sn),$n=100%Sn;Ar==null||Ar.map((Kn,un)=>(Kn.score=Hn,Kn.position=un+1,un===Sn-1&&(Kn.score=Hn+$n),Kn)),ar({type:0,payload:{data:_r(Ur({},Bn),{hack_sets:Ar})}}),dn.setFieldsValue({hack_sets:Ar})}},[sr]);function Hi(Sn){let Hn=dn.getFieldValue("hack_sets");const $n=(Hn==null?void 0:Hn.length)-1,Kn=Math.ceil(100/$n),un=100%$n;Hn.splice(Sn,1),Hn==null||Hn.map((Fn,zn)=>(sr&&(Fn.score=Kn,zn===$n-1&&(Fn.score=Kn+un)),Fn.position=zn+1,Fn)),ar({type:0,payload:{data:_r(Ur({},Bn),{hack_sets:Hn})}}),dn.setFieldsValue({hack_sets:Hn})}function ci(Sn){_n(Sn)}const Hr=Sn=>{var Hn;const $n=(Hn=Vr.current)==null?void 0:Hn.findIndex(Kn=>Kn.language===Jt);Vr.current[$n].code=Sn,Cn(Vr.current)},Ki=Sn=>{vn(Ur({},dn.getFieldsValue()))},Qt=Sn=>ni(void 0,null,function*(){const Hn=yield(0,Ue.ZP)(`/api/practices/${Sn}/start`,{method:"get"});(Hn==null?void 0:Hn.status)===0&&(0,Ht.xg)(`/problems/${Hn==null?void 0:Hn.identifier}/oj/${Sn}`)}),wn=()=>ni(void 0,null,function*(){const Sn=yield st(on),{name:Hn,status:$n,review_privilege:Kn,review_description:un}=Sn;vi({review_privilege:Kn,status:$n,review_description:un,name:Hn})}),Zt=()=>{let Sn="";ze.default.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Ut.createElement("div",{className:"mt20"},Ut.createElement(Ye.Z,{className:Dt.MdEditor,defaultValue:Sn,onChange:Hn=>{Sn=Hn}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ni(void 0,null,function*(){if(!Sn)return me.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Hn=yield(0,Ue.ZP)(`/api/practices/${on}/review.json`,{method:"post",body:{op:"fail",description:Sn}});(Hn==null?void 0:Hn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})},lt=()=>ni(void 0,null,function*(){ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${nr==null?void 0:nr.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ni(void 0,null,function*(){const Sn=yield(0,Ue.ZP)(`/api/practices/${on}/review.json`,{method:"post",body:{op:"pass"}});(Sn==null?void 0:Sn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})}),On=()=>{const Sn=ze.default.confirm({icon:null,width:700,className:`${Dt.cusModal} custom-modal-divider`,centered:!0,title:Ut.createElement(ke.Z,null,Ut.createElement(Ce.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Ut.createElement(Ce.Z,null,Ut.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>Sn.destroy()}))),content:Ut.createElement("div",null,Ut.createElement(sn.Z,{className:"mt20",value:(nr==null?void 0:nr.review_description)||""}))})};return Ut.createElement(Se.Z,{spinning:mr,size:"large",className:Dt["oj-custom-large-spin"]},Bn?Ut.createElement(ht.Fragment,null,Ut.createElement("header",{className:Dt.header},Ut.createElement("div",null,Ut.createElement("img",{src:`${Rt.Z.IMG_SERVER}/images/${Un==null?void 0:Un.image_url}`,alt:"user",width:30}),Ut.createElement("span",null,Un==null?void 0:Un.name)),Ut.createElement("h2",null," ",(yr=Bn==null?void 0:Bn.hack)==null?void 0:yr.name," "),on?Ut.createElement("a",{className:Dt.btn_back,onClick:bi}," ",Ut.createElement(Re.Z,null),"\u9000\u51FA"):null),Ut.createElement(fe.default,{form:dn,initialValues:Bn,layout:"vertical",className:Dt["oj-form-container"],onValuesChange:Ki,onFinish:si},Ut.createElement(nt.Z,{hideResize:!0,className:Dt["oj-problems"],leftChild:Ut.createElement(Ai,{formValue:en,onRemoveTestCase:Hi,onAddTestCase:Jr,hack:Bn.hack,onChangeScore:Oi,onChangehide:Sr,onChangeAverage:li,onChangeFile:yn,uploadData:oi,setUploadData:an,handleUploadRatio:pn,ischecked:mn,pointData:Nn,sourceData:Zr,getPointData:Qr}),rightChild:Ut.createElement(_e,{value:(Lr=jn==null?void 0:jn.find(Sn=>Sn.language===Jt))==null?void 0:Lr.code,onChange:Hr,onLanguage:ci,languageItems:jn,language:Jt})}),Ut.createElement("div",{className:Dt.footer},!!on&&Ut.createElement("div",{className:Dt.result},Ut.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),nr!=null&&nr.review_privilege?Ut.createElement(Ut.Fragment,null,Ut.createElement("div",{onClick:lt,className:Dt.pass},"\u901A\u8FC7"),Ut.createElement("div",{onClick:Zt,className:Dt.noPass},"\u4E0D\u901A\u8FC7")):Ut.createElement(Ut.Fragment,null,(nr==null?void 0:nr.status)===0&&Ut.createElement("div",{className:Dt.passText},Ut.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(nr==null?void 0:nr.status)===1&&Ut.createElement("div",{className:Dt.passText},Ut.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(nr==null?void 0:nr.status)===2&&Ut.createElement("div",{className:Dt.passText},Ut.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(nr==null?void 0:nr.status)===3&&Ut.createElement("div",{className:Dt.passText},Ut.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(nr==null?void 0:nr.status)===4&&Ut.createElement("div",{className:Dt.passText},Ut.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(nr==null?void 0:nr.status)===5&&Ut.createElement("div",{className:Dt.noPassText},Ut.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Ut.createElement("span",{onClick:On},"\u67E5\u770B\u539F\u56E0")))),Ut.createElement(Le.ZP,{type:"primary",ghost:!0,onClick:bi},"\u9000\u51FA\u7F16\u8F91"),Ut.createElement(Le.ZP,{disabled:Yt,loading:pi,type:"primary",onClick:()=>{zr.current=!0,dn.submit()}},"\u4FDD\u5B58 "),on?Ut.createElement(Le.ZP,{disabled:pi,loading:Yt,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{zr.current=!1,dn.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Ut.createElement(Le.ZP,{disabled:pi,loading:Yt,type:"primary",onClick:()=>{zr.current=!1,dn.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Ut.createElement(ze.default,{centered:!0,destroyOnClose:!0,footer:null,open:fr,onCancel:()=>cr(!1),title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Ut.createElement("div",null,Ut.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Ut.createElement(ve.default,{dataSource:jt,bordered:!1,scroll:jt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(Sn,Hn)=>Ut.createElement("span",{onClick:()=>Qt(Hn==null?void 0:Hn.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},Sn)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:Sn=>{var Hn;return(Hn=rn()(Sn))==null?void 0:Hn.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ai({ischecked:lr,formValue:yr,hack:Lr,onChangeAverage:uo,onChangeScore:on,onChangehide:dn,onChangeFile:en,onAddTestCase:vn,onRemoveTestCase:fr,uploadData:cr,setUploadData:oi,handleUploadRatio:an,pointData:Nn,sourceData:gr,getPointData:Zr}){var Xn,jt;const{test_set_average:Wt,test_set_score:jn}=Lr,[Cn,Jt]=(0,ht.useState)(!1),[_n,ur]=(0,ht.useState)(!1),ar=(sr,mn)=>{const tr=[...cr];tr.splice(mn,1),Wt?an(tr):oi(tr)},mr=(sr,mn)=>{console.log(sr,mn);const tr=cr.map((Vr,pi)=>pi===mn?_r(Ur({},Vr),{score:sr.target.value?Number(sr.target.value):0}):Vr);oi(tr)},Bn=sr=>{const mn=cr.concat(sr);Lr.test_set_average?an(mn):oi(mn)};function Un(sr){sr.stopPropagation()}function er(){if((0,tn.Ny)()){ur("practice");return}let sr="";ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Ut.createElement("div",null,Ut.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:mn=>{sr=mn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ni(this,null,function*(){const mn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:sr}});(mn==null?void 0:mn.status)===0&&Zr()})})}function Ar(){if((0,tn.Ny)()){ur("practice_source");return}let sr="";ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Ut.createElement("div",null,Ut.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:mn=>{sr=mn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ni(this,null,function*(){const mn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:sr}});(mn==null?void 0:mn.status)===0&&Zr()})})}return Ut.createElement("div",{className:Dt["oj-left-panel"]},Ut.createElement("div",{className:Dt["oj-form-info"]},Ut.createElement(fe.default.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:Dt.inputOne},Ut.createElement(oe.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Ut.createElement("span",null,((jt=(Xn=yr==null?void 0:yr.hack)==null?void 0:Xn.name)==null?void 0:jt.length)||0,"/",Ut.createElement("span",{className:"c-grey-999"},"60"))})),Ut.createElement(fe.default.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Ut.createElement(Ye.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Ut.createElement("div",{className:Dt.row},Ut.createElement("div",{className:Dt.a},Ut.createElement(fe.default.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Ut.createElement(we.default,null,je(ge.difficulty)))),Ut.createElement("div",{className:Dt.b},Ut.createElement(fe.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Ut.createElement(we.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:sr=>sr.parentNode},gr.map(sr=>Ut.createElement(we.default.Option,{key:sr.id,value:sr.id},sr.name)))),Ut.createElement(Le.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>Ar()},(0,tn.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Ut.createElement("div",{className:Dt.row},Ut.createElement("div",{className:Dt.b,style:{width:"100%",marginLeft:0}},Ut.createElement(fe.default.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Ut.createElement(we.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:sr=>sr.parentNode},Nn.map(sr=>Ut.createElement(we.default.Option,{key:sr.id,value:sr.id},sr.name)))),Ut.createElement(Le.ZP,{type:"primary",ghost:!0,onClick:()=>er()},(0,tn.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Ut.createElement("div",{className:Dt.field},Ut.createElement(fe.default.Item,{label:"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:1,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F1\u79D2"}],className:Dt.inputTwo,extra:Ut.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Ut.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Ut.createElement(de.Z,{style:{width:185},min:1}))),Ut.createElement("div",{className:"tst-case-info"},Ut.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Lr.is_file&&Ut.createElement(Le.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:vn},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Ut.createElement(fe.default.Item,{name:["hack","test_set_score"]},Ut.createElement(z.ZP.Group,{onChange:on},Ut.createElement(z.ZP,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Ut.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Ut.createElement(z.ZP,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Ut.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Ut.createElement(ee.default,{style:{marginBottom:"5px"},checked:lr,onChange:dn},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Ut.createElement(fe.default.Item,{className:Dt.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Ut.createElement(z.ZP.Group,{onChange:en},Ut.createElement(ae.Z,{direction:"horizontal"},Ut.createElement(z.ZP,{value:!1},"\u6587\u672C"),Ut.createElement(z.ZP,{value:!0},"\u6587\u4EF6")))),Ut.createElement(fe.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",name:["hack","submit_rule"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},Ut.createElement(z.ZP.Group,null,Ut.createElement(z.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Ut.createElement(z.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Ut.createElement(z.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),!Lr.test_set_score&&Ut.createElement(fe.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Ut.createElement(z.ZP.Group,{onChange:uo},Ut.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Ut.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Lr.is_file&&Ut.createElement("div",{className:Dt.upBtn},Ut.createElement(Le.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>Jt(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Ut.createElement($t.Y2,{disabled:Lr==null?void 0:Lr.test_set_average,inputChange:mr,showScore:!Lr.test_set_score,data:cr,onRemove:ar})),!Lr.is_file&&Ut.createElement(fe.default.List,{name:"hack_sets"},(sr,{})=>Ut.createElement(De.default,{accordion:!0},sr.map((mn,tr)=>Ut.createElement(Di,{key:`${mn.key}--${tr}`,header:Ut.createElement("a",{className:Dt["test-case-name"]},Ut.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",tr+1),jn?null:Ut.createElement(Ut.Fragment,null,Ut.createElement(fe.default.Item,{name:[mn.name,"score"],fieldKey:[mn.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${tr+1}\u8BC4\u5206`}]},Ut.createElement(de.Z,{onClick:Un,min:0,max:100,disabled:Wt})),Ut.createElement("span",null,"%"))),extra:tr>0?Ut.createElement("div",{onClick:Un},Ut.createElement(ie.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(tr+1),onConfirm:()=>{fr(tr)}},Ut.createElement(We.Z,{className:Dt["btn-remove-case"]}))):null},Ut.createElement(fe.default.Item,{label:"\u8F93\u5165",name:[mn.name,"input"],fieldKey:[mn.fieldKey,"input"]},Ut.createElement(Li,null)),Ut.createElement(fe.default.Item,{label:"\u8F93\u51FA",name:[mn.name,"output"],fieldKey:[mn.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Ut.createElement(Li,null)))))))),Ut.createElement($t.ZP,{rootIdentifier:null,visible:Cn,onClose:()=>Jt(!1),onOK:Bn}),Ut.createElement(Ot,{visible:_n,onCancel:()=>{ur(!1),Zr()},onOK:()=>{ur(!1),Zr()}}))}},12062:function(gn,cn,at){"use strict";at.d(cn,{Y2:function(){return st},ZP:function(){return ct}});var ht=at(59301),Dt=at(14566),oe=at(6767),ze=at(62957),De=at(77019),fe=at(47889),me=at(99571),ke=at(62673),Ce=at(25399),Se=at(37568),Le={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"},ve="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==",we=at(47257),de=at.n(we),z=at(25992),ee=at(82093),ae=at(1012),ie=at(49661),le=at(41550),ue=at(59301),ge=Object.defineProperty,Pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ae=(Pt,$e,nt)=>$e in Pt?ge(Pt,$e,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Pt[$e]=nt,Re=(Pt,$e)=>{for(var nt in $e||($e={}))Fe.call($e,nt)&&Ae(Pt,nt,$e[nt]);if(Be)for(var nt of Be($e))Ne.call($e,nt)&&Ae(Pt,nt,$e[nt]);return Pt},We=(Pt,$e)=>Pe(Pt,je($e)),Ye=(Pt,$e,nt)=>new Promise((yt,xt)=>{var wt=ut=>{try{ft(nt.next(ut))}catch(Et){xt(Et)}},dt=ut=>{try{ft(nt.throw(ut))}catch(Et){xt(Et)}},ft=ut=>ut.done?yt(ut.value):Promise.resolve(ut.value).then(wt,dt);ft((nt=nt.apply(Pt,$e)).next())});const{Dragger:Ue}=Dt.default,Ve=Pt=>{const $e=Et=>Et&&Et.substring(0,Et.lastIndexOf("."));for(var nt=[...Pt],yt=0,xt=[],wt=0;wt<nt.length;wt++){for(var dt="",ft=0;ft<xt.length;ft++)if($e(xt[ft][0].name)==$e(nt[wt].name)){yt=1,dt=ft;break}if(yt==1)xt[dt].push(nt[wt]),yt=0;else if(yt==0){let Et=new Array;Et.push(nt[wt]),xt.push(Et)}}return xt.map(Et=>{if(Et.forEach(mt=>{let vt=mt.name.split(/\.(?=[^\.]+$)/);mt.name=`${vt[0]}.${vt[1].toLowerCase()}`}),Et[0].name.includes(".in"))return Et.length===2?Et:[Et[0],{}];if(Et[0].name.includes(".out"))return Et.length===2?Et.reverse():[{},Et[0]]})},ot=({onClose:Pt,onOK:$e,visible:nt,wrapClassName:yt,rootIdentifier:xt,multiple:wt=!1,defaultMultipleValue:dt=!0})=>{const[ft,ut]=(0,ht.useState)([]),[Et,mt]=(0,ht.useState)({}),[vt,kt]=(0,ht.useState)(!1),[pt,Qe]=(0,ht.useState)(!0),Ke=(0,ht.useRef)([]),xe=(0,ht.useRef)(0),Me=()=>{Pt()};(0,ht.useEffect)(()=>{Ze()},[]),(0,ht.useEffect)(()=>{nt&&(Ke.current=[],xe.current=0,ut([]),Qe(dt))},[nt]);const Ze=()=>Ye(void 0,null,function*(){try{const Nt=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Ot=JSON.parse((0,z.pe)(Nt.data));mt(Ot)}catch(Nt){}}),tt=Nt=>Nt&&Nt.substring(0,Nt.lastIndexOf(".")),Ie=Nt=>{var Ot,Rt;const $t=tt((Ot=Nt[0])==null?void 0:Ot.name)||tt((Rt=Nt[1])==null?void 0:Rt.name),qt=ft.filter(rn=>tt(rn.name)!==$t);Ke.current=[...qt],ut([...qt])},_e=Nt=>{if(!pt){const Ht=new FormData;Ht.append("file",Nt.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ht},!0).then(tn=>{if(tn.status===0){xe.current=xe.current+1;const Ut=Ke.current.map(En=>{var bn;if(En.name===Nt.name){const Dn=Re({},En);return(bn=Nt==null?void 0:Nt.name)!=null&&bn.includes(".in")?Dn.input=tn==null?void 0:tn.content:Dn.output=tn==null?void 0:tn.content,Dn}return En});if(Ke.current=[...Ut],ut([...Ut]),xe.current>0&&xe.current===ft.length){kt(!1);let En=Ve(Ut);En=En.filter(bn=>{var Dn,Qn;return!!((Dn=bn[0])!=null&&Dn.name&&((Qn=bn[1])!=null&&Qn.name))}),En=En.map(bn=>We(Re(Re({},bn[0]),bn[1]),{is_file:!1})),$e(En),Pt()}}else kt(!1),Pt()});return}const Ot=new(de())({endpoint:Et.end_point,region:Et.region,accessKeyId:Et.access_key_id,accessKeySecret:Et.access_key_secret,bucket:Et.bucket,stsToken:Et.security_token}),Rt=Nt.name,$t={container_type:"TestSet",file_name:Rt},qt=(0,ae.Z)();let rn=`testsets/${xt}/${qt}${Rt.indexOf(".")>-1?"."+Rt.split(".").pop():""}`;xt===null&&(rn=`testsets/${qt}${Rt.indexOf(".")>-1?"."+Rt.split(".").pop():""}`),Ot.multipartUpload(rn,new Blob([Nt.file],{type:Nt.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Rt+""},url:Et==null?void 0:Et.callback_url,host:Et==null?void 0:Et.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)($t)}}).then(function(Ht){if(Ht.data.status===0){xe.current=xe.current+1;const sn=Ke.current.map(tn=>{var Ut,En,bn,Dn,Qn,Pr,Yn,Mr,Ur,_r,ni,Li,_i,Di,ui,Wi,et;if(tn.name===((En=(Ut=Ht.data)==null?void 0:Ut.data)==null?void 0:En.file_name)){const jr=Re({},tn);return(Qn=(Dn=(bn=Ht.data)==null?void 0:bn.data)==null?void 0:Dn.file_name)!=null&&Qn.includes(".in")?(jr.in_object_key=(Yn=(Pr=Ht.data)==null?void 0:Pr.data)==null?void 0:Yn.object,jr.in_object_size=(Ur=(Mr=Ht.data)==null?void 0:Mr.data)==null?void 0:Ur.size,jr.input=(ni=(_r=Ht.data)==null?void 0:_r.data)==null?void 0:ni.file_name,jr.in_file=Nt):(jr.out_object_key=(_i=(Li=Ht.data)==null?void 0:Li.data)==null?void 0:_i.object,jr.out_object_size=(ui=(Di=Ht.data)==null?void 0:Di.data)==null?void 0:ui.size,jr.output=(et=(Wi=Ht.data)==null?void 0:Wi.data)==null?void 0:et.file_name,jr.out_file=Nt),jr}return tn});if(Ke.current=[...sn],ut([...sn]),xe.current>0&&xe.current===ft.length){kt(!1);let tn=Ve(sn);tn=tn.filter(Ut=>{var En,bn;return!!((En=Ut[0])!=null&&En.name&&((bn=Ut[1])!=null&&bn.name))}),tn=tn.map(Ut=>We(Re(Re({},Ut[0]),Ut[1]),{is_file:!0})),$e(tn),Pt()}}})},He=Nt=>new Promise((Ot,Rt)=>{let $t=0,qt=[];for(let rn=0;rn<Nt.length;rn++)Nt[rn].file.slice(0,1).arrayBuffer().then(()=>{$t++,$t===Nt.length&&(qt.length?(oe.ZP.warning(`${qt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Rt()):Ot(Nt))}).catch(Ht=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ht),$t++,qt.push(Nt[rn].name),$t===Nt.length&&(qt.length?(oe.ZP.warning(`${qt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Rt()):Ot(Nt))})}),rt=()=>Ye(void 0,null,function*(){if(ft.length===0){oe.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield He(ft),kt(!0),Ve(ft).some(Ot=>{var Rt,$t;return!((Rt=Ot[0])!=null&&Rt.name&&(($t=Ot[1])!=null&&$t.name))})){ze.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:()=>Ye(void 0,null,function*(){ft.map(Ot=>Ye(void 0,null,function*(){_e(Ot)}))}),onCancel:()=>{kt(!1)}});return}ft.map(Ot=>Ye(void 0,null,function*(){_e(Ot)}))}),St={name:"file",fileList:ft,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Nt=>{if(ft!=null&&ft.some(Rt=>Rt.name===Nt.name))return oe.ZP.info(`${Nt.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Nt.size/1024/1024>100)return oe.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Nt.name))return oe.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Ot={name:Nt.name,uid:Nt.uid,file:Nt,percent:0};return ft.push(Ot),Ke.current=[...ft],ut([...ft]),!1}},Ct=Ve(ft);return console.log(ft,Ct,"fileList"),ue.createElement(ze.default,{open:nt,wrapClassName:yt,onOk:rt,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:vt},onCancel:Me,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Le.wrap},ft.length?ue.createElement("div",null,ue.createElement(De.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:wt?"visible":"hidden"}},ue.createElement("span",{className:Le.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(fe.ZP.Group,{className:`ml20 ${Le.testCaseRadio}`,optionType:"button",value:pt,onChange:Nt=>Qe(Nt.target.value)},ue.createElement(fe.ZP,{value:!1},"\u6587\u672C"),ue.createElement(fe.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(Dt.default,Re({},St),ue.createElement(me.ZP,{type:"primary",className:Le.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(st,{data:Ct,onRemove:Ie})):ue.createElement("div",{className:`${Le.noData} mb30`},ue.createElement(Dt.default.Dragger,We(Re({},St),{className:Le.dragger}),ue.createElement("img",{src:ve,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:Le.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:Le.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.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",ue.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",ue.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",ue.createElement("br",null))))},st=({data:Pt=[],onRemove:$e,width:nt="auto",showScore:yt=!1,disabled:xt=!1,inputChange:wt,onEvaluatingChange:dt,onSelectAll:ft,checkAll1:ut,checkAll2:Et,checkAll3:mt,checkAll4:vt,checkAll5:kt,showEvaluatingSetting:pt=!1,className:Qe="",isProgramHomework:Ke=!1})=>{const xe={value:"",filename:"",dataUrl:""},[Me,Ze]=(0,ht.useState)(Re({},xe)),tt=He=>{let rt=document.createElement("a");document.body.appendChild(rt);let St=URL.createObjectURL(He.file);rt.href=St,rt.download=He.name,rt.click(),URL.revokeObjectURL(St),document.body.removeChild(rt)},Ie=(He,rt)=>{(0,ie.LR)(He,rt)},_e=(He,rt)=>{ze.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{$e(He,rt)},onCancel:()=>{}})};return Pt.length?ue.createElement("div",{className:Qe,style:{width:nt}},ue.createElement("div",{className:`${Ke?Le.headProgram:Le.head}`},pt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:ut,onChange:He=>{ft(He.target.checked,"hidden")}}),ue.createElement(Ce.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{style:{width:Ke?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:yt?Ke?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:yt?Ke?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),yt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),pt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:vt,onChange:He=>{ft(He.target.checked,"input_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Et,onChange:He=>{ft(He.target.checked,"is_invisible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:kt,onChange:He=>{ft(He.target.checked,"actual_output_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:mt,onChange:He=>{ft(He.target.checked,"last_match_rule")}}),ue.createElement(Ce.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"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:Le.operation,style:Ke?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:Le.listWrapper,style:{boxShadow:Ke?"0px 2px 4px 0px #EAEEF4":"unset"}},Pt.map((He,rt)=>{var St,Ct,Nt,Ot;return ue.createElement("div",{key:rt,className:Le.list,style:Ke?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},pt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(ke.default,{checked:!!He.hidden,onChange:Rt=>{dt(Rt.target.checked,rt,"hidden")}})),ue.createElement("div",{style:{width:Ke?"25%":"15%",paddingLeft:Ke?"5px":"0px",paddingRight:Ke?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",rt+1),ue.createElement("div",{className:Le.info,style:{width:yt?Ke?"20%":"15%":"25%"}},ue.createElement("span",{title:He.input||((St=He[0])==null?void 0:St.name),onClick:()=>Ye(void 0,null,function*(){let Rt;He.input?He.input_file_url?Rt=He.input_file_url:Rt=He.in_file:Rt=He[0];let $t;typeof Rt=="string"?($t=yield fetch(Rt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield $t.text(),filename:"",dataUrl:Rt})):($t=yield(0,ie.db)(Rt.file),Ze({value:$t.text,filename:Rt.name,dataUrl:$t.link}))})},He.input||((Ct=He[0])==null?void 0:Ct.name))),ue.createElement("div",{className:Le.info,style:{width:yt?Ke?"20%":"15%":"25%"}},ue.createElement("span",{title:He.output||((Nt=He[1])==null?void 0:Nt.name),onClick:()=>Ye(void 0,null,function*(){let Rt;He.input?He.output_file_url?Rt=He.output_file_url:Rt=He.out_file:Rt=He[1];let $t;typeof Rt=="string"?($t=yield fetch(Rt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield $t.text(),filename:"",dataUrl:Rt})):($t=yield(0,ie.db)(Rt.file),Ze({value:$t.text,filename:Rt.name,dataUrl:$t.link}))})},He.output||((Ot=He[1])==null?void 0:Ot.name))),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Se.default,{size:"large",addonAfter:Ke?"%":null,disabled:xt,style:{width:"80%"},onChange:Rt=>wt(Rt,rt),value:He.score}),!Ke&&ue.createElement("span",null,"\xA0%")),pt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.input_visible||!1,onChange:Rt=>{dt(Rt.target.checked,rt,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.is_invisible||!1,onChange:Rt=>{dt(Rt.target.checked,rt,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.actual_output_visible||!1,onChange:Rt=>{dt(Rt.target.checked,rt,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.last_match_rule||!1,onChange:Rt=>{dt(Rt.target.checked,rt,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>_e(He,rt),style:Ke?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:Le.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:Me.dataUrl,filename:Me.filename,type:Me.dataUrl.length?"txt":"",onClose:()=>Ze(Re({},xe)),monacoEditor:{value:Me.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var ct=ot},90290:function(gn,cn,at){"use strict";at.d(cn,{AL:function(){return ge},Iy:function(){return Le},Qv:function(){return de},ez:function(){return ue},jb:function(){return ve}});var ht=at(32834),Dt=at.n(ht),oe=at(11690),ze=at.n(oe);let De=1;function fe(Ne,Ae){const Re=Ne.match(/^(\s+)(?:```)/);if(Re===null)return Ae;const We=Re[1];return Ae.split(`
`).map(Ye=>{const Ue=Ye.match(/^\s+/);if(Ue===null)return Ye;const[Ve]=Ue;return Ve.length>=We.length?Ye.slice(We.length):Ye}).join(`
`)}let me=[],ke=["<ul>"];const Ce=new(Dt()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Le(){me.length=0,ke=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function we(Ne,Ae,Re,We){if(Ae>=Ne.length||Ne[Ae].level<=Re)return Ae;var Ye=Ne[Ae];We.push("<li><a href='#"+De+Ye.anchor+"'>"+Ye.text+"</a>"),Ae++;var Ue=[];return Ae=we(Ne,Ae,Ye.level,Ue),Ue.length>0&&(We.push("<ul>"),Ue.forEach(function(Ve){We.push(Ve)}),We.push("</ul>")),We.push("</li>"),Ae=we(Ne,Ae,Re,We),Ae}function de(){return we(me,0,0,ke),ke.push("</ul>"),ke.join("")}const z={heading(Ne){const Ae=Se.exec(Ne);if(De+=1,Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},fences(Ne){const Ae=this.rules.block.fences.exec(Ne);if(Ae){const Re=Ae[0];let We=fe(Re,Ae[3]||"");const Ye=Ae[2]?Ae[2].trim():Ae[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ue=ie(),Ve=We;We=Ue,le[Ue]={type:"block",expression:Ve}}return{type:"code",raw:Re,lang:Ye,text:We}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ae=0;const ie=()=>`__special_katext_id_${ae++}__`;let le={};function ue(){return le}function ge(){ae=0,le={}}function Pe(Ne){return Ne=Ne.replace(ee,(Ae,Re)=>{const We=ie();return le[We]={type:"inline",expression:Re},We}),Ne}const je=Ce.listitem;Ce.listitem=function(Ne){return je(Pe(Ne))};const Be=Ce.paragraph;Ce.paragraph=function(Ne){return Be(Pe(Ne))};const Fe=Ce.tablecell;Ce.tablecell=function(Ne,Ae){return Fe(Pe(Ne),Ae)},Ce.code=function(Ne,Ae,Re){const We=(Ae||"").match(/\S*/)[0];return We?["latex","katex","math"].indexOf(We)>=0?`<p class='editormd-tex'>${Ne}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ae}">${Re?Ne:(0,oe.escape)(Ne,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Re?Ne:(0,oe.escape)(Ne,!0))+"</code></pre>"},Ce.heading=function(Ne,Ae,Re){let We=this.options.headerPrefix+Re.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return me.push({anchor:We,level:Ae,text:Ne}),"<h"+Ae+' id="'+De+We+'">'+Ne+"</h"+Ae+">"},Dt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Dt().use({tokenizer:z,renderer:Ce}),cn.ZP=Dt()},89613:function(gn,cn,at){"use strict";at.d(cn,{G:function(){return De},t:function(){return ze}});var ht=at(7062),Dt=at.n(ht);const oe=null;function ze(fe,me){let ke=Dt().get("__ec");ke||(ke={}),ke[fe]=me,Dt().set("__ec",ke)}function De(fe,me){let ke=Dt().get("__ec");return ke?ke[fe]===void 0?me:ke[fe]:me}},47257:function(gn){(function(cn){(function(at){if(1)gn.exports=at();else var ht})(function(){var at,ht,Dt;return function(){function oe(ze,De,fe){function me(Se,Le){if(!De[Se]){if(!ze[Se]){var ve=void 0;if(!Le&&ve)return require(Se,!0);if(ke)return ke(Se,!0);var we=new Error("Cannot find module '"+Se+"'");throw we.code="MODULE_NOT_FOUND",we}var de=De[Se]={exports:{}};ze[Se][0].call(de.exports,function(z){var ee=ze[Se][1][z];return me(ee||z)},de,de.exports,oe,ze,De,fe)}return De[Se].exports}for(var ke=void 0,Ce=0;Ce<fe.length;Ce++)me(fe[Ce]);return me}return oe}()({1:[function(oe,ze,De){"use strict";var fe=oe("./browser/client");fe.Buffer=oe("buffer").Buffer,fe.urllib=oe("../shims/xhr"),fe.version=oe("./browser/version").version,ze.exports=fe},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("assert"),Se=oe("../common/utils/checkBucketName"),Le=Se.checkBucketName,ve=De;function we(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function de(z){return z?we(z)?z:[z]:[]}ve.useBucket=function(ee){return Le(ee),this.options.bucket=ee,this},ve.setBucket=function(ee){return Le(ee),this.options.bucket=ee,this},ve.getBucket=function(){return this.options.bucket},ve.deleteBucket=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(ue);case 3:if(ge=je.sent,!(ge.status===200||ge.status===204)){je.next=6;break}return je.abrupt("return",{res:ge.res});case 6:return je.next=8,this.requestError(ge);case 8:throw je.sent;case 9:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"acl",ue),ge.headers={"x-oss-acl":le},ge.successStatuses=[200],Be.next=5,this.request(ge);case 5:return Pe=Be.sent,Be.abrupt("return",{bucket:Pe.headers.location&&Pe.headers.location.substring(1)||null,res:Pe.res});case 7:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("GET",ie,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,je.next=5,this.request(ue);case 5:return ge=je.sent,je.abrupt("return",{acl:ge.data.AccessControlList.Grant,owner:{id:ge.data.Owner.ID,displayName:ge.data.Owner.DisplayName},res:ge.res});case 7:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"logging",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(ie,`</TargetBucket>
`),le&&(Pe+="<TargetPrefix>".concat(le,`</TargetPrefix>
`)),Pe+=`</LoggingEnabled>
</BucketLoggingStatus>`,ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Fe.next=9,this.request(ge);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.LoggingEnabled,Be.abrupt("return",{enable:!!Pe,prefix:Pe&&Pe.TargetPrefix||null,res:ge.res});case 8:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"logging",le),ue.successStatuses=[204,200],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye;return me.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:for(le=le||[],Ce(le.length,"rules is required"),le.forEach(function(ot){Ce(ot.allowedOrigin,"allowedOrigin is required"),Ce(ot.allowedMethod,"allowedMethod is required")}),ge=this._bucketRequestParams("PUT",ie,"cors",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,je=function(st){Pe+="<AllowedOrigin>".concat(st,"</AllowedOrigin>")},Be=function(st){Pe+="<AllowedMethod>".concat(st,"</AllowedMethod>")},Fe=function(st){Pe+="<AllowedHeader>".concat(st,"</AllowedHeader>")},Ne=function(st){Pe+="<ExposeHeader>".concat(st,"</ExposeHeader>")},Ae=0,Re=le.length;Ae<Re;Ae++)We=le[Ae],Pe+="<CORSRule>",de(We.allowedOrigin).forEach(je),de(We.allowedMethod).forEach(Be),de(We.allowedHeader).forEach(Fe),de(We.exposeHeader).forEach(Ne),We.maxAgeSeconds&&(Pe+="<MaxAgeSeconds>".concat(We.maxAgeSeconds,"</MaxAgeSeconds>")),Pe+="</CORSRule>";return Pe+="</CORSConfiguration>",ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Ve.next=16,this.request(ge);case 16:return Ye=Ve.sent,Ve.abrupt("return",{res:Ye.res});case 18:case"end":return Ve.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ue=this._bucketRequestParams("GET",ie,"cors",le),ue.successStatuses=[200],ue.xmlResponse=!0,Fe.next=5,this.request(ue);case 5:return ge=Fe.sent,Pe=[],ge.data&&ge.data.CORSRule&&(je=ge.data.CORSRule,we(je)||(je=[je]),je.forEach(function(Ne){var Ae={};Object.keys(Ne).forEach(function(Re){Ae[Re.slice(0,1).toLowerCase()+Re.slice(1,Re.length)]=Ne[Re]}),Pe.push(Ae)})),Fe.abrupt("return",{rules:Pe,res:ge.res});case 9:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"cors",le),ue.successStatuses=[204],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue,ge){var Pe,je,Be,Fe;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(Pe=this._bucketRequestParams("PUT",ie,"referer",ge),je=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ue&&ue.length>0){for(je+=` <RefererList>
`,Be=0;Be<ue.length;Be++)je+=" <Referer>".concat(ue[Be],`</Referer>
`);je+=` </RefererList>
`}else je+=` <RefererList />
`;return je+="</RefererConfiguration>",Pe.content=je,Pe.mime="xml",Pe.successStatuses=[200],Ae.next=10,this.request(Pe);case 10:return Fe=Ae.sent,Ae.abrupt("return",{res:Fe.res});case 12:case"end":return Ae.stop()}},ae,this)}));function ee(ae,ie,le,ue){return z.apply(this,arguments)}return ee}(),ve.getBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.RefererList.Referer||null,Pe&&(we(Pe)||(Pe=[Pe])),Be.abrupt("return",{allowEmpty:ge.data.AllowEmptyReferer==="true",referers:Pe,res:ge.res});case 9:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ge.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return ge.abrupt("return",ge.sent);case 3:case"end":return ge.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve._bucketRequestParams=function(ee,ae,ie,le){return{method:ee,bucket:ae,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/regenerator")),Se=ke(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.to-string.js");var Le=oe("debug")("ali-oss"),ve=oe("xml2js"),we=oe("agentkeepalive"),de=oe("merge-descriptors"),z=oe("platform"),ee=oe("utility"),ae=oe("urllib"),ie=oe("./version"),le=oe("bowser"),ue=oe("../common/signUtils"),ge=oe("../common/client/initOptions"),Pe=oe("../common/utils/createRequest"),je=Pe.createRequest,Be=oe("../common/utils/encoder"),Fe=Be.encoder,Ne=oe("../common/client/getReqUrl"),Ae=Ne.getReqUrl,Re=oe("../common/utils/setSTSToken"),We=Re.setSTSToken,Ye=oe("../common/utils/retry"),Ue=Ye.retry,Ve=oe("../common/utils/isFunction"),ot=Ve.isFunction,st=new we;function ct(){var wt=z.name,dt=z.version;wt&&wt.toLowerCase&&wt.toLowerCase()==="ie"&&dt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Pt(){return location&&location.protocol==="https:"}function $e(wt,dt){if(ct(),!(this instanceof $e))return new $e(wt,dt);wt&&wt.inited?this.options=wt:this.options=$e.initOptions(wt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||st),this.ctx=dt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}ze.exports=$e,$e.initOptions=function(dt){dt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var ft=Object.assign({secure:Pt(),useFetch:!1},dt);return ge(ft)};var nt=$e.prototype;nt.debug=Le,de(nt,oe("./object")),de(nt,oe("./bucket")),de(nt,oe("../common/bucket/getBucketWebsite")),de(nt,oe("../common/bucket/putBucketWebsite")),de(nt,oe("../common/bucket/deleteBucketWebsite")),de(nt,oe("../common/bucket/getBucketLifecycle")),de(nt,oe("../common/bucket/putBucketLifecycle")),de(nt,oe("../common/bucket/deleteBucketLifecycle")),de(nt,oe("../common/bucket/putBucketVersioning")),de(nt,oe("../common/bucket/getBucketVersioning")),de(nt,oe("../common/bucket/getBucketInventory")),de(nt,oe("../common/bucket/deleteBucketInventory")),de(nt,oe("../common/bucket/listBucketInventory")),de(nt,oe("../common/bucket/putBucketInventory")),de(nt,oe("../common/bucket/abortBucketWorm")),de(nt,oe("../common/bucket/completeBucketWorm")),de(nt,oe("../common/bucket/extendBucketWorm")),de(nt,oe("../common/bucket/getBucketWorm")),de(nt,oe("../common/bucket/initiateBucketWorm")),de(nt,oe("./managed-upload")),de(nt,oe("../common/multipart-copy")),de(nt,oe("../common/multipart")),de(nt,oe("../common/parallel")),nt.signature=function(dt){return this.debug("authorization stringToSign: %s",dt,"info"),ue.computeSignature(this.options.accessKeySecret,dt,this.options.headerEncoding)},nt._getReqUrl=Ae,nt.authorization=function(dt,ft,ut,Et){var mt=ue.buildCanonicalString(dt.toUpperCase(),ft,{headers:Et,parameters:ut});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,mt,this.options.headerEncoding)},nt.request=function(){var wt=(0,Se.default)(Ce.default.mark(function dt(ft){var ut=this;return Ce.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if(!this.options.retryMax){mt.next=6;break}return mt.next=3,Ue(yt.bind(this),this.options.retryMax,{errorHandler:function(kt){var pt=function(Ke){if(ft.stream)return!1;var xe=[-1,-2].includes(Ke.status),Me=ut.options.requestErrorRetryHandle||function(){return!0};return xe&&Me(Ke)};return!!pt(kt)}})(ft);case 3:return mt.abrupt("return",mt.sent);case 6:return mt.abrupt("return",yt.call(this,ft));case 7:case"end":return mt.stop()}},dt,this)}));return function(dt){return wt.apply(this,arguments)}}();function yt(wt){return xt.apply(this,arguments)}function xt(){return xt=(0,Se.default)(Ce.default.mark(function wt(dt){var ft,ut,Et,mt,vt,kt;return Ce.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){Qe.next=3;break}return Qe.next=3,We.call(this);case 3:return ft=je.call(this,dt),this.options.useFetch||(ft.params.mode="disable-fetch"),mt=!!dt.stream,Qe.prev=6,Qe.next=9,this.urllib.request(ft.url,ft.params);case 9:ut=Qe.sent,this.debug("response %s %s, got %s, headers: %j",dt.method,ft.url,ut.status,ut.headers,"info"),Qe.next=16;break;case 13:Qe.prev=13,Qe.t0=Qe.catch(6),Et=Qe.t0;case 16:if(!(ut&&dt.successStatuses&&dt.successStatuses.indexOf(ut.status)===-1)){Qe.next=28;break}return Qe.next=19,this.requestError(ut);case 19:if(vt=Qe.sent,!(vt.code==="RequestTimeTooSkewed"&&!mt)){Qe.next=25;break}return this.options.amendTimeSkewed=+new Date(vt.serverTime)-new Date,Qe.next=24,this.request(dt);case 24:return Qe.abrupt("return",Qe.sent);case 25:vt.params=dt,Qe.next=32;break;case 28:if(!Et){Qe.next=32;break}return Qe.next=31,this.requestError(Et);case 31:vt=Qe.sent;case 32:if(!vt){Qe.next=34;break}throw vt;case 34:if(!dt.xmlResponse){Qe.next=39;break}return Qe.next=37,this.parseXML(ut.data);case 37:kt=Qe.sent,ut.data=kt;case 39:return Qe.abrupt("return",ut);case 40:case"end":return Qe.stop()}},wt,this,[[6,13]])})),xt.apply(this,arguments)}nt._getResource=function(dt){var ft="/";return dt.bucket&&(ft+="".concat(dt.bucket,"/")),dt.object&&(ft+=Fe(dt.object,this.options.headerEncoding)),ft},nt._escape=function(dt){return ee.encodeURIComponent(dt).replace(/%2F/g,"/")},nt._getUserAgent=function(){var dt=me&&me.browser?"js":"nodejs",ft="aliyun-sdk-".concat(dt,"/").concat(ie.version),ut=z.description;return!ut&&me&&(ut="Node.js ".concat(me.version.slice(1)," on ").concat(me.platform," ").concat(me.arch)),this._checkUserAgent("".concat(ft," ").concat(ut))},nt._checkUserAgent=function(dt){var ft=dt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return ft},nt.checkBrowserAndVersion=function(dt,ft){return le.name===dt&&le.version.split(".")[0]===ft},nt.parseXML=function(dt){return new Promise(function(ft,ut){fe.isBuffer(dt)&&(dt=dt.toString()),ve.parseString(dt,{explicitRoot:!1,explicitArray:!1},function(Et,mt){Et?ut(Et):ft(mt)})})},nt.requestError=function(){var wt=(0,Se.default)(Ce.default.mark(function ft(ut){var Et,mt,vt,kt;return Ce.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(Et=null,!(!ut.data||!ut.data.length)){Qe.next=5;break}ut.status===-1||ut.status===-2?(Et=new Error(ut.message),Et.name=ut.name,Et.status=ut.status,Et.code=ut.name):(ut.status===404?(Et=new Error("Object not exists"),Et.name="NoSuchKeyError",Et.status=404,Et.code="NoSuchKey"):ut.status===412?(Et=new Error("Pre condition failed"),Et.name="PreconditionFailedError",Et.status=412,Et.code="PreconditionFailed"):(Et=new Error("Unknow error, status: ".concat(ut.status)),Et.name="UnknownError",Et.status=ut.status),Et.requestId=ut.headers["x-oss-request-id"],Et.host=""),Qe.next=32;break;case 5:return mt=String(ut.data),this.debug("request response error data: %s",mt,"error"),Qe.prev=7,Qe.next=10,this.parseXML(mt);case 10:if(Qe.t0=Qe.sent,Qe.t0){Qe.next=13;break}Qe.t0={};case 13:vt=Qe.t0,Qe.next=23;break;case 16:return Qe.prev=16,Qe.t1=Qe.catch(7),this.debug(mt,"error"),Qe.t1.message+=`
raw xml: `.concat(mt),Qe.t1.status=ut.status,Qe.t1.requestId=ut.headers["x-oss-request-id"],Qe.abrupt("return",Qe.t1);case 23:kt=vt.Message||"unknow request error, status: ".concat(ut.status),vt.Condition&&(kt+=" (condition: ".concat(vt.Condition,")")),Et=new Error(kt),Et.name=vt.Code?"".concat(vt.Code,"Error"):"UnknownError",Et.status=ut.status,Et.code=vt.Code,Et.requestId=vt.RequestId,Et.hostId=vt.HostId,Et.serverTime=vt.ServerTime;case 32:return this.debug("generate error %j",Et,"error"),Qe.abrupt("return",Et);case 34:case"end":return Qe.stop()}},ft,this,[[7,16]])}));function dt(ft){return wt.apply(this,arguments)}return dt}()}).call(this)}).call(this,{isBuffer:oe("../../node_modules/is-buffer/index.js")},oe("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("util"),Le=oe("path"),ve=oe("mime"),we=oe("copy-to"),de=oe("../common/utils/isBlob"),z=de.isBlob,ee=oe("../common/utils/isFile"),ae=ee.isFile,ie=oe("../common/utils/isBuffer"),le=ie.isBuffer,ue=De;ue.multipartUpload=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We){var Ye,Ue,Ve,ot,st,ct,Pt,$e,nt,yt=arguments;return ke.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Ye=yt.length>2&&yt[2]!==void 0?yt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){wt.next=8;break}return We&&ae(We)&&(Ye.checkpoint.file=We),wt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return wt.abrupt("return",wt.sent);case 8:return Ue=102400,Ye.mime||(ae(We)?Ye.mime=ve.getType(Le.extname(We.name)):z(We)?Ye.mime=We.type:le(We)?Ye.mime="":Ye.mime=ve.getType(Le.extname(We))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),wt.next=14,this._getFileSize(We);case 14:if(Ve=wt.sent,!(Ve<Ue)){wt.next=26;break}return Ye.contentLength=Ve,wt.next=19,this.put(Re,We,Ye);case 19:if(ot=wt.sent,!(Ye&&Ye.progress)){wt.next=23;break}return wt.next=23,Ye.progress(1);case 23:return st={res:ot.res,bucket:this.options.bucket,name:Re,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(st.data=ot.data),wt.abrupt("return",st);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){wt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ue)){wt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ue));case 30:return wt.next=32,this.initMultipartUpload(Re,Ye);case 32:if(ct=wt.sent,Pt=ct.uploadId,$e=this._getPartSize(Ve,Ye.partSize),nt={file:We,name:Re,fileSize:Ve,partSize:$e,uploadId:Pt,doneParts:[]},!(Ye&&Ye.progress)){wt.next=39;break}return wt.next=39,Ye.progress(0,nt,ct.res);case 39:return wt.next=41,this._resumeMultipart(nt,Ye);case 41:return wt.abrupt("return",wt.sent);case 42:case"end":return wt.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._resumeMultipart=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We){var Ye,Ue,Ve,ot,st,ct,Pt,$e,nt,yt,xt,wt,dt,ft,ut,Et,mt,vt,kt;return ke.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(Ye=this,!this.isCancel()){Qe.next=3;break}throw this._makeCancelEvent();case 3:return Ue=Re.file,Ve=Re.fileSize,ot=Re.partSize,st=Re.uploadId,ct=Re.doneParts,Pt=Re.name,$e=[],ct.length>0&&we(ct).to($e),nt=this._divideParts(Ve,ot),yt=nt.length,xt=!1,wt=function(xe,Me){return new Promise(function(){var Ze=(0,Ce.default)(ke.default.mark(function tt(Ie,_e){var He,rt,St,Ct,Nt;return ke.default.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(Rt.prev=0,xe.isCancel()){Rt.next=29;break}return He=nt[Me-1],Rt.next=5,xe._createBuffer(Ue,He.start,He.end);case 5:return rt=Rt.sent,St={content:rt,size:He.end-He.start},Rt.prev=7,Rt.next=10,xe._uploadPart(Pt,st,Me,St,We);case 10:Ct=Rt.sent,Rt.next=18;break;case 13:if(Rt.prev=13,Rt.t0=Rt.catch(7),Rt.t0.status!==404){Rt.next=17;break}throw xe._makeAbortEvent();case 17:throw Rt.t0;case 18:if(!(!xe.isCancel()&&!xt)){Rt.next=26;break}if(Re.doneParts.push({number:Me,etag:Ct.res.headers.etag}),!We.progress){Rt.next=23;break}return Rt.next=23,We.progress(ct.length/(yt+1),Re,Ct.res);case 23:Ie({number:Me,etag:Ct.res.headers.etag}),Rt.next=27;break;case 26:Ie();case 27:Rt.next=30;break;case 29:Ie();case 30:Rt.next=41;break;case 32:Rt.prev=32,Rt.t1=Rt.catch(0),Nt=new Error,Nt.name=Rt.t1.name,Nt.message=Rt.t1.message,Nt.stack=Rt.t1.stack,Nt.partNum=Me,we(Rt.t1).to(Nt),_e(Nt);case 41:case"end":return Rt.stop()}},tt,null,[[0,32],[7,13]])}));return function(tt,Ie){return Ze.apply(this,arguments)}}())},dt=Array.from(new Array(yt),function(Ke,xe){return xe+1}),ft=$e.map(function(Ke){return Ke.number}),ut=dt.filter(function(Ke){return ft.indexOf(Ke)<0}),Et=5,mt=We.parallel||Et,Qe.next=17,this._parallel(ut,mt,function(Ke){return new Promise(function(xe,Me){wt(Ye,Ke).then(function(Ze){Ze&&$e.push(Ze),xe()}).catch(function(Ze){Me(Ze)})})});case 17:if(vt=Qe.sent,xt=!0,kt=vt.find(function(Ke){return Ke.name==="abort"}),!kt){Qe.next=22;break}throw kt;case 22:if(!this.isCancel()){Qe.next=25;break}throw wt=null,this._makeCancelEvent();case 25:if(!(vt&&vt.length>0)){Qe.next=28;break}throw vt[0].message="Failed to upload some parts with error: ".concat(vt[0].toString()," part_num: ").concat(vt[0].partNum),vt[0];case 28:return Qe.next=30,this.completeMultipartUpload(Pt,st,$e,We);case 30:return Qe.abrupt("return",Qe.sent);case 31:case"end":return Qe.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._getFileSize=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re){return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Re)){Ye.next=4;break}return Ye.abrupt("return",Re.length);case 4:if(!(z(Re)||ae(Re))){Ye.next=6;break}return Ye.abrupt("return",Re.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Ae)}));function Ne(Ae){return Fe.apply(this,arguments)}return Ne}();var ge=oe("stream"),Pe=ge.Readable;function je(Fe,Ne){if(!(this instanceof je))return new je(Fe,Ne);Pe.call(this,Ne),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,Pe),je.prototype.readFileAndPush=function(Ne){if(this.fileBuffer)for(var Ae=!0;Ae&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Re=this.start,We=Re+Ne;We=We>this.fileBuffer.length?this.fileBuffer.length:We,this.start=We,Ae=this.push(this.fileBuffer.slice(Re,We))}},je.prototype._read=function(Ne){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 Ae=16*1024;Ne=Ne||Ae;var Re=this;this.reader.onload=function(Ye){Re.fileBuffer=fe.from(new Uint8Array(Ye.target.result)),Re.file=null,Re.readFileAndPush(Ne)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ne)};function Be(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Ne,Ae){var Re=new FileReader;Re.onload=function(We){Ne(We.target.result)},Re.onerror=function(We){Ae(We)},Re.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We,Ye){var Ue,Ve;return ke.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(!(z(Re)||ae(Re))){st.next=8;break}return Ue=Re.slice(We,Ye),st.next=4,Be(Ue);case 4:return Ve=st.sent,st.abrupt("return",fe.from(Ve));case 8:if(!le(Re)){st.next=12;break}return st.abrupt("return",Re.subarray(We,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return st.stop()}},Ae)}));function Ne(Ae,Re,We){return Fe.apply(this,arguments)}return Ne}(),ue._getPartSize=function(Ne,Ae){var Re=1e4,We=1*1024*1024;Ae||(Ae=We);var Ye=Math.ceil(Ne/Re);return Ae<Ye&&(Ae=Ye,console.warn("partSize has been set to ".concat(Ae,", because the partSize you provided causes partNumber to be greater than 10,000"))),Ae},ue._divideParts=function(Ne,Ae){for(var Re=Math.ceil(Ne/Ae),We=[],Ye=0;Ye<Re;Ye++){var Ue=Ae*Ye,Ve=Math.min(Ue+Ae,Ne);We.push({start:Ue,end:Ve})}return We}}).call(this)}).call(this,oe("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.promise.js");var me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("fs"),Se=oe("copy-to"),Le=oe("path"),ve=oe("mime"),we=oe("../common/callback"),de=oe("merge-descriptors"),z=oe("../common/utils/isBlob"),ee=z.isBlob,ae=oe("../common/utils/isFile"),ie=ae.isFile,le=oe("../common/utils/isBuffer"),ue=le.isBuffer,ge=oe("../common/utils/obj2xml"),Pe=ge.obj2xml,je=De;je.append=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye;return me.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return We=We||{},We.position===void 0&&(We.position="0"),We.subres={append:"",position:We.position},We.method="POST",Ve.next=6,this.put(Ae,Re,We);case 6:return Ye=Ve.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ve.abrupt("return",Ye);case 9:case"end":return Ve.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.put=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ve,ot,st;return me.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(We=We||{},We.disabledMD5=We.disabledMD5===void 0?!0:!!We.disabledMD5,We.headers=We.headers||{},Ae=this._objectName(Ae),!ue(Re)){Pt.next=8;break}Ye=Re,Pt.next=19;break;case 8:if(!(ee(Re)||ie(Re))){Pt.next=18;break}return We.mime||(ie(Re)?We.mime=ve.getType(Le.extname(Re.name)):We.mime=Re.type),Pt.next=12,this._createBuffer(Re,0,Re.size);case 12:return Ye=Pt.sent,Pt.next=15,this._getFileSize(Re);case 15:We.contentLength=Pt.sent,Pt.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(We.meta,We.headers),Ue=We.method||"PUT",Ve=this._objectRequestParams(Ue,Ae,We),we.encodeCallback(Ve,We),Ve.mime=We.mime,Ve.disabledMD5=We.disabledMD5,Ve.content=Ye,Ve.successStatuses=[200],Pt.next=29,this.request(Ve);case 29:return ot=Pt.sent,st={name:Ae,url:this._objectUrl(Ae),res:ot.res},Ve.headers&&Ve.headers["x-oss-callback"]&&(st.data=JSON.parse(ot.data.toString())),Pt.abrupt("return",st);case 33:case"end":return Pt.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.putStream=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ve,ot;return me.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return We=We||{},We.headers=We.headers||{},Ae=this._objectName(Ae),We.contentLength?We.headers["Content-Length"]=We.contentLength:We.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(We.meta,We.headers),Ye=We.method||"PUT",Ue=this._objectRequestParams(Ye,Ae,We),we.encodeCallback(Ue,We),Ue.mime=We.mime,Ue.stream=Re,Ue.successStatuses=[200],ct.next=13,this.request(Ue);case 13:return Ve=ct.sent,ot={name:Ae,url:this._objectUrl(Ae),res:Ve.res},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ve.data.toString())),ct.abrupt("return",ot);case 17:case"end":return ct.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),de(je,oe("../common/object/copyObject")),de(je,oe("../common/object/getObjectTagging")),de(je,oe("../common/object/putObjectTagging")),de(je,oe("../common/object/deleteObjectTagging")),de(je,oe("../common/image")),de(je,oe("../common/object/getBucketVersions")),de(je,oe("../common/object/getACL")),de(je,oe("../common/object/putACL")),de(je,oe("../common/object/head")),de(je,oe("../common/object/delete")),de(je,oe("../common/object/get")),de(je,oe("../common/object/putSymlink")),de(je,oe("../common/object/getSymlink")),de(je,oe("../common/object/deleteMulti")),de(je,oe("../common/object/getObjectMeta")),de(je,oe("../common/object/getObjectUrl")),de(je,oe("../common/object/generateObjectUrl")),de(je,oe("../common/object/signatureUrl")),de(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye;return me.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,this.copy(Ae,Ae,{meta:Re||{},timeout:We&&We.timeout,ctx:We&&We.ctx});case 2:return Ye=Ve.sent,Ve.abrupt("return",Ye);case 4:case"end":return Ve.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.list=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re){var We,Ye,Ue,Ve,ot;return me.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return We=this._objectRequestParams("GET","",Re),We.query=Ae,We.xmlResponse=!0,We.successStatuses=[200],ct.next=6,this.request(We);case 6:return Ye=ct.sent,Ue=Ye.data.Contents||[],Ve=this,Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Ue=Ue.map(function(Pt){return{name:Pt.Key,url:Ve._objectUrl(Pt.Key),lastModified:Pt.LastModified,etag:Pt.ETag,type:Pt.Type,size:Number(Pt.Size),storageClass:Pt.StorageClass,owner:{id:Pt.Owner.ID,displayName:Pt.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(Pt){return Pt.Prefix})),ct.abrupt("return",{res:Ye.res,objects:Ue,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ct.stop()}},Ne,this)}));function Fe(Ne,Ae){return Be.apply(this,arguments)}return Fe}(),je.listV2=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Re,We,Ye,Ue,Ve,ot,st,ct=arguments;return me.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return Re=ct.length>1&&ct[1]!==void 0?ct[1]:{},We=Ae["continuation-token"]||Ae.continuationToken,We&&(Re.subres=Object.assign({"continuation-token":We},Re.subres)),Ye=this._objectRequestParams("GET","",Re),Ye.query=Object.assign({"list-type":2},Ae),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],$e.next=11,this.request(Ye);case 11:return Ue=$e.sent,Ve=Ue.data.Contents||[],ot=this,Ve&&(Array.isArray(Ve)||(Ve=[Ve]),Ve=Ve.map(function(nt){var yt=null;return nt.Owner&&(yt={id:nt.Owner.ID,displayName:nt.Owner.DisplayName}),{name:nt.Key,url:ot._objectUrl(nt.Key),lastModified:nt.LastModified,etag:nt.ETag,type:nt.Type,size:Number(nt.Size),storageClass:nt.StorageClass,owner:yt}})),st=Ue.data.CommonPrefixes||null,st&&(Array.isArray(st)||(st=[st]),st=st.map(function(nt){return nt.Prefix})),$e.abrupt("return",{res:Ue.res,objects:Ve,prefixes:st,isTruncated:Ue.data.IsTruncated==="true",keyCount:+Ue.data.KeyCount,continuationToken:Ue.data.ContinuationToken||null,nextContinuationToken:Ue.data.NextContinuationToken||null});case 18:case"end":return $e.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je.restore=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Re,We,Ye,Ue,Ve=arguments;return me.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return Re=Ve.length>1&&Ve[1]!==void 0?Ve[1]:{type:"Archive"},Re=Re||{},Re.subres=Object.assign({restore:""},Re.subres),Re.versionId&&(Re.subres.versionId=Re.versionId),We=this._objectRequestParams("POST",Ae,Re),Re.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Re.Days?Re.Days:2,JobParameters:{Tier:Re.JobParameters?Re.JobParameters:"Standard"}}},We.content=Pe(Ye,{headers:!0}),We.mime="xml"),We.successStatuses=[202],st.next=9,this.request(We);case 9:return Ue=st.sent,st.abrupt("return",{res:Ue.res});case 11:case"end":return st.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Ne,Ae){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Ae=Ae||{},Ne=this._objectName(Ne);var Re={object:Ne,bucket:this.options.bucket,method:Fe,subres:Ae&&Ae.subres,timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx};return Ae.headers&&(Re.headers={},Se(Ae.headers).to(Re.headers)),Re},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Ne){Fe&&Object.keys(Fe).forEach(function(Ae){Ne["x-oss-meta-".concat(Ae)]=Fe[Ae]})},je._deleteFileSafe=function(Fe){var Ne=this;return new Promise(function(Ae){Ce.exists(Fe,function(Re){Re?Ce.unlink(Fe,function(We){We&&Ne.debug("unlink %j error: %s",Fe,We,"error"),Ae()}):Ae()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(oe,ze,De){"use strict";De.version="6.18.1"},{}],7:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.abortBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Le.apply(this,arguments)}function Le(){return Le=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return Ce.checkBucketName(we),z=this._bucketRequestParams("DELETE",we,"worm",de),ie.next=4,this.request(z);case 4:return ee=ie.sent,ie.abrupt("return",{res:ee.res,status:ee.status});case 6:case"end":return ie.stop()}},ve,this)})),Le.apply(this,arguments)}De.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.completeBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we,de){return Le.apply(this,arguments)}function Le(){return Le=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(we),ee=this._bucketRequestParams("POST",we,{wormId:de},z),le.next=4,this.request(ee);case 4:return ae=le.sent,le.abrupt("return",{res:ae.res,status:ae.status});case 6:case"end":return le.stop()}},ve,this)})),Le.apply(this,arguments)}De.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.deleteBucketInventory=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Le.apply(this,arguments)}function Le(){return Le=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee,ae,ie,le=arguments;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},ee=Object.assign({inventory:"",inventoryId:de},z.subres),Ce.checkBucketName(we),ae=this._bucketRequestParams("DELETE",we,ee,z),ae.successStatuses=[204],ge.next=7,this.request(ae);case 7:return ie=ge.sent,ge.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return ge.stop()}},ve,this)})),Le.apply(this,arguments)}De.deleteBucketInventory=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=De;Le.deleteBucketLifecycle=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"lifecycle",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=De;Le.deleteBucketWebsite=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"website",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.extendBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Le(we,de,z,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee,ae){var ie,le,ue;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Ce.checkBucketName(de),ie=this._bucketRequestParams("POST",de,{wormExtend:"",wormId:z},ae),le={ExtendWormConfiguration:{RetentionPeriodInDays:ee}},ie.mime="xml",ie.content=Se.obj2xml(le,{headers:!0}),ie.successStatuses=[200],Pe.next=8,this.request(ie);case 8:return ue=Pe.sent,Pe.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.extendBucketWorm=Le},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Le(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>2&&ue[2]!==void 0?ue[2]:{},ae=Object.assign({inventory:"",inventoryId:z},ee.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,ee),ie.successStatuses=[200],ie.xmlResponse=!0,Pe.next=8,this.request(ie);case 8:return le=Pe.sent,Pe.abrupt("return",{status:le.status,res:le.res,inventory:Se.formatInventoryConfig(le.data)});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketInventory=Le},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("../utils/isArray"),ve=Le.isArray,we=oe("../utils/formatObjKey"),de=we.formatObjKey,z=De;z.getBucketLifecycle=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),ge=this._bucketRequestParams("GET",le,"lifecycle",ue),ge.successStatuses=[200],ge.xmlResponse=!0,Fe.next=6,this.request(ge);case 6:return Pe=Fe.sent,je=Pe.data.Rule||null,je&&(ve(je)||(je=[je]),je=je.map(function(Ne){return Ne.ID&&(Ne.id=Ne.ID,delete Ne.ID),Ne.Tag&&!ve(Ne.Tag)&&(Ne.Tag=[Ne.Tag]),de(Ne,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:Pe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function ae(ie,le){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=De;Le.getBucketVersioning=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se(z),ae=this._bucketRequestParams("GET",z,"versioning",ee),ae.xmlResponse=!0,ae.successStatuses=[200],ge.next=6,this.request(ae);case 6:return ie=ge.sent,le=ie.data.Status,ge.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return ge.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("../utils/isObject"),ve=Le.isObject,we=De;we.getBucketWebsite=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(ae),le=this._bucketRequestParams("GET",ae,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return ue=je.sent,ge=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(ve(ue.data.RoutingRules.RoutingRule)?ge=[ue.data.RoutingRules.RoutingRule]:ge=ue.data.RoutingRules.RoutingRule),je.abrupt("return",{index:ue.data.IndexDocument&&ue.data.IndexDocument.Suffix||"",supportSubDir:ue.data.IndexDocument&&ue.data.IndexDocument.SupportSubDir||"false",type:ue.data.IndexDocument&&ue.data.IndexDocument.Type,routingRules:ge,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return je.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function Le(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(de),ee=this._bucketRequestParams("GET",de,"worm",z),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=6,this.request(ee);case 6:return ae=le.sent,Se.dataFix(ae.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},ae.data),{res:ae.res,status:ae.status}));case 9:case"end":return le.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketWorm=Le},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.initiateBucketWorm=void 0;var Ce=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function Le(we,de,z){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se.checkBucketName(de),ae=this._bucketRequestParams("POST",de,"worm",ee),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},ae.mime="xml",ae.content=Ce.obj2xml(ie,{headers:!0}),ae.successStatuses=[200],ge.next=8,this.request(ae);case 8:return le=ge.sent,ge.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return ge.stop()}},we,this)})),ve.apply(this,arguments)}De.initiateBucketWorm=Le},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.listBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Le(we){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de){var z,ee,ae,ie,le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},ee=z.continuationToken,ae=Object.assign({inventory:""},ee&&{"continuation-token":ee},z.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ue=le.data,ge=le.res,Pe=le.status,Fe.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:Se.formatInventoryConfig(ue.InventoryConfiguration,!0),status:Pe,res:ge});case 12:case"end":return Fe.stop()}},we,this)})),ve.apply(this,arguments)}De.listBucketInventory=Le},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.putBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Le(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return ee=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},ae=Object.assign({inventory:"",inventoryId:z.id},ee.subres),Ce.checkBucketName(de),ie=z.OSSBucketDestination,le=z.optionalFields,ue=z.includedObjectVersions,ge="acs:oss:::",Pe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(Pe).concat(ie.rolename),Bucket:"".concat(ge).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},Be=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",de,ae,ee),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=Be,We.next=14,this.request(Fe);case 14:return Ne=We.sent,We.abrupt("return",{status:Ne.status,res:Ne.res});case 16:case"end":return We.stop()}},we,this)})),ve.apply(this,arguments)}De.putBucketInventory=Le},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("../utils/isArray"),ve=Le.isArray,we=oe("../utils/deepCopy"),de=we.deepCopy,z=oe("../utils/isObject"),ee=z.isObject,ae=oe("../utils/obj2xml"),ie=ae.obj2xml,le=oe("../utils/checkObjectTag"),ue=le.checkObjectTag,ge=oe("../utils/getStrBytesCount"),Pe=ge.getStrBytesCount,je=De;je.putBucketLifecycle=function(){var Re=(0,ke.default)(me.default.mark(function Ye(Ue,Ve,ot){var st,ct,Pt,$e,nt;return me.default.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(Se(Ue),ve(Ve)){xt.next=3;break}throw new Error("rules must be Array");case 3:return st=this._bucketRequestParams("PUT",Ue,"lifecycle",ot),ct=[],Pt={LifecycleConfiguration:{Rule:ct}},Ve.forEach(function(wt){Be(wt),Ae(wt),wt.id&&(wt.ID=wt.id,delete wt.id),ct.push(wt)}),$e=ie(Pt,{headers:!0,firstUpperCase:!0}),st.content=$e,st.mime="xml",st.successStatuses=[200],xt.next=13,this.request(st);case 13:return nt=xt.sent,xt.abrupt("return",{res:nt.res});case 15:case"end":return xt.stop()}},Ye,this)}));function We(Ye,Ue,Ve){return Re.apply(this,arguments)}return We}();function Be(Re){Re.days&&(Re.expiration={days:Re.days}),Re.date&&(Re.expiration={createdBeforeDate:Re.date})}function Fe(Re,We){var Ye=Re.days,Ue=Re.createdBeforeDate;if(!Ye&&!Ue)throw new Error("".concat(We," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ue&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ue))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Ne(Re){if(!ve(Re)&&!ee(Re))throw new Error("tag must be Object or Array");Re=ee(Re)?[Re]:Re;var We={},Ye=de(Re);Ye.forEach(function(Ue){We[Ue.key]=Ue.value}),ue(We)}function Ae(Re){if(Re.id&&Pe(Re.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Re.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Re.status))throw new Error("Status must be Enabled or Disabled");if(Re.transition){if(!["IA","Archive"].includes(Re.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Re.transition,"Transition")}if(Re.expiration){if(!Re.expiration.expiredObjectDeleteMarker)Fe(Re.expiration,"Expiration");else if(Re.expiration.days||Re.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Re.abortMultipartUpload&&Fe(Re.abortMultipartUpload,"AbortMultipartUpload"),!Re.expiration&&!Re.abortMultipartUpload&&!Re.transition&&!Re.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Re.tag){if(Re.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ne(Re.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("../utils/obj2xml"),ve=Le.obj2xml,we=De;we.putBucketVersioning=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(ae),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",ae,"versioning",le),ge={VersioningConfiguration:{Status:ie}},ue.mime="xml",ue.content=ve(ge,{headers:!0}),Fe.next=10,this.request(ue);case 10:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 12:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("../utils/obj2xml"),ve=Le.obj2xml,we=oe("../utils/isArray"),de=we.isArray,z=De;z.putBucketWebsite=function(){var ee=(0,ke.default)(me.default.mark(function ie(le){var ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},ge=Ae.length>2?Ae[2]:void 0,Se(le),Pe=this._bucketRequestParams("PUT",le,"website",ge),je={Suffix:ue.index||"index.html"},Be={IndexDocument:je},Fe={WebsiteConfiguration:Be},ue.supportSubDir&&(je.SupportSubDir=ue.supportSubDir),ue.type&&(je.Type=ue.type),ue.error&&(Be.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){We.next=14;break}if(de(ue.routingRules)){We.next=13;break}throw new Error("RoutingRules must be Array");case 13:Be.RoutingRules={RoutingRule:ue.routingRules};case 14:return Fe=ve(Fe),Pe.content=Fe,Pe.mime="xml",Pe.successStatuses=[200],We.next=20,this.request(Pe);case 20:return Ne=We.sent,We.abrupt("return",{res:Ne.res});case 22:case"end":return We.stop()}},ie,this)}));function ae(ie){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),De.encodeCallback=function(ke,Ce){if(ke.headers=ke.headers||{},!Object.prototype.hasOwnProperty.call(ke.headers,"x-oss-callback")&&Ce.callback){var Se={callbackUrl:encodeURI(Ce.callback.url),callbackBody:Ce.callback.body};Ce.callback.host&&(Se.callbackHost=Ce.callback.host),Ce.callback.contentType&&(Se.callbackBodyType=Ce.callback.contentType);var Le=fe.from(JSON.stringify(Se)).toString("base64");if(ke.headers["x-oss-callback"]=Le,Ce.callback.customValue){var ve={};Object.keys(Ce.callback.customValue).forEach(function(we){ve["x:".concat(we)]=Ce.callback.customValue[we].toString()}),ke.headers["x-oss-callback-var"]=fe.from(JSON.stringify(ve)).toString("base64")}}}}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var fe=function(de){return de&&de.__esModule?de:{default:de}};Object.defineProperty(De,"__esModule",{value:!0}),De.getReqUrl=void 0;var me=fe(oe("copy-to")),ke=fe(oe("url")),Ce=fe(oe("merge-descriptors")),Se=fe(oe("is-type-of")),Le=oe("../utils/isIP"),ve=oe("../utils/checkConfigValid");function we(de){var z={},ee=this.options.cname;ve.checkConfigValid(this.options.endpoint,"endpoint"),me.default(this.options.endpoint,!1).to(z),de.bucket&&!ee&&!Le.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(de.bucket,".").concat(z.host));var ae="/";de.bucket&&this.options.sldEnable&&(ae+="".concat(de.bucket,"/")),de.object&&(ae+=this._escape(de.object).replace(/\+/g,"%2B")),z.pathname=ae;var ie={};if(de.query&&Ce.default(ie,de.query),de.subres){var le={};Se.default.string(de.subres)?le[de.subres]="":Se.default.array(de.subres)?de.subres.forEach(function(ue){le[ue]=""}):le=de.subres,Ce.default(ie,le)}return z.query=ie,ke.default.format(z)}De.getReqUrl=we},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.string.trim.js");var fe=oe("humanize-ms"),me=oe("url"),ke=oe("../utils/checkBucketName"),Ce=ke.checkBucketName,Se=oe("../utils/setRegion"),Le=Se.setRegion,ve=oe("../utils/checkConfigValid"),we=ve.checkConfigValid;function de(z,ee){we(z,"endpoint");var ae=me.parse(z);if(ae.protocol||(ae=me.parse("http".concat(ee?"s":"","://").concat(z))),ae.protocol!=="http:"&&ae.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return ae}ze.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&&Ce(z.bucket);var ee=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(ee.accessKeyId=ee.accessKeyId.trim(),ee.accessKeySecret=ee.accessKeySecret.trim(),ee.timeout&&(ee.timeout=fe(ee.timeout)),ee.endpoint)ee.endpoint=de(ee.endpoint,ee.secure);else if(ee.region)ee.endpoint=Le(ee.region,ee.internal,ee.secure);else throw new Error("require options.endpoint or options.region");return ee.inited=!0,ee}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(oe,ze,De){"use strict";var fe=oe("merge-descriptors"),me=De;fe(me,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Le=oe("querystring"),ve=oe("js-base64"),we=ve.Base64.encode,de=De;de.processObjectSave=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue,ge,Pe){var je,Be,Fe,Ne;return me.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return z(le,"sourceObject"),z(ue,"targetObject"),z(ge,"process"),ue=this._objectName(ue),Pe&&Se(Pe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),Be=Pe?",b_".concat(we(Pe)):"",ue=we(ue),Fe={"x-oss-process":"".concat(ge,"|sys/saveas,o_").concat(ue).concat(Be)},je.content=Le.stringify(Fe),Re.next=12,this.request(je);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,status:Ne.res.status});case 14:case"end":return Re.stop()}},ie,this)}));function ae(ie,le,ue,ge){return ee.apply(this,arguments)}return ae}();function z(ee,ae){if(!ee)throw new Error("".concat(ae," is required"));if(typeof ee!="string")throw new Error("".concat(ae," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.regexp.to-string.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("debug")("ali-oss:multipart-copy"),Se=oe("copy-to"),Le=De;Le.uploadPartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie,le){var ue,ge,Pe,je,Be,Fe=arguments;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ue.headers=ue.headers||{},ge=ue.versionId||ue.subres&&ue.subres.versionId||null,ge?Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(ge):Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=Pe,ie&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ue.subres={partNumber:ae,uploadId:ee},je=this._objectRequestParams("PUT",z,ue),je.mime=ue.mime,je.successStatuses=[200],Ae.next=12,this.request(je);case 12:return Be=Ae.sent,Ae.abrupt("return",{name:z,etag:Be.res.headers.etag,res:Be.res});case 14:case"end":return Ae.stop()}},de,this)}));function we(de,z,ee,ae,ie){return ve.apply(this,arguments)}return we}(),Le.multipartUploadCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We=arguments;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return ae=We.length>2&&We[2]!==void 0?We[2]:{},this.resetCancelFlag(),ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},Ue.next=6,this._getObjectMeta(ee.sourceBucketName,ee.sourceKey,ue);case 6:if(ge=Ue.sent,Pe=ge.res.headers["content-length"],ee.startOffset=ee.startOffset||0,ee.endOffset=ee.endOffset||Pe,!(ae.checkpoint&&ae.checkpoint.uploadId)){Ue.next=14;break}return Ue.next=13,this._resumeMultipartCopy(ae.checkpoint,ee,ae);case 13:return Ue.abrupt("return",Ue.sent);case 14:if(je=102400,Be=ee.endOffset-ee.startOffset,!(Be<je)){Ue.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(ae.partSize&&ae.partSize<je)){Ue.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ue.next=22,this.initMultipartUpload(z,ae);case 22:if(Fe=Ue.sent,Ne=Fe.uploadId,Ae=this._getPartSize(Be,ae.partSize),Re={name:z,copySize:Be,partSize:Ae,uploadId:Ne,doneParts:[]},!(ae&&ae.progress)){Ue.next=29;break}return Ue.next=29,ae.progress(0,Re,Fe.res);case 29:return Ue.next=31,this._resumeMultipartCopy(Re,ee,ae);case 31:return Ue.abrupt("return",Ue.sent);case 32:case"end":return Ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}(),Le._resumeMultipartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye,Ue,Ve,ot,st,ct,Pt,$e,nt;return me.default.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(!this.isCancel()){xt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},ge=z.copySize,Pe=z.partSize,je=z.uploadId,Be=z.doneParts,Fe=z.name,Ne=this._divideMultipartCopyParts(ge,Pe,ee.startOffset),Ae=Ne.length,Re={headers:{}},ae.copyheaders&&Se(ae.copyheaders).to(Re.headers),le&&Se(ue).to(Re),We=function(dt,ft,ut){return new Promise(function(){var Et=(0,ke.default)(me.default.mark(function mt(vt,kt){var pt,Qe,Ke;return me.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(Me.prev=0,dt.isCancel()){Me.next=22;break}return pt=Ne[ft-1],Qe="".concat(pt.start,"-").concat(pt.end-1),Me.prev=4,Me.next=7,dt.uploadPartCopy(Fe,je,ft,Qe,ut,Re);case 7:Ke=Me.sent,Me.next=15;break;case 10:if(Me.prev=10,Me.t0=Me.catch(4),Me.t0.status!==404){Me.next=14;break}throw dt._makeAbortEvent();case 14:throw Me.t0;case 15:if(dt.isCancel()){Me.next=22;break}if(Ce("content-range ".concat(Ke.res.headers["content-range"])),Be.push({number:ft,etag:Ke.res.headers.etag}),z.doneParts=Be,!(ae&&ae.progress)){Me.next=22;break}return Me.next=22,ae.progress(Be.length/Ae,z,Ke.res);case 22:vt(),Me.next=29;break;case 25:Me.prev=25,Me.t1=Me.catch(0),Me.t1.partNum=ft,kt(Me.t1);case 29:case"end":return Me.stop()}},mt,null,[[0,25],[4,10]])}));return function(mt,vt){return Et.apply(this,arguments)}}())},Ye=Array.from(new Array(Ae),function(wt,dt){return dt+1}),Ue=Be.map(function(wt){return wt.number}),Ve=Ye.filter(function(wt){return Ue.indexOf(wt)<0}),ot=5,st=ae.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||st===1)){xt.next=28;break}ct=0;case 18:if(!(ct<Ve.length)){xt.next=26;break}if(!this.isCancel()){xt.next=21;break}throw this._makeCancelEvent();case 21:return xt.next=23,We(this,Ve[ct],ee);case 23:ct++,xt.next=18;break;case 26:xt.next=40;break;case 28:return xt.next=30,this._parallelNode(Ve,st,We,ee);case 30:if(Pt=xt.sent,$e=Pt.find(function(wt){return wt.name==="abort"}),!$e){xt.next=34;break}throw $e;case 34:if(!this.isCancel()){xt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Pt&&Pt.length>0)){xt.next=40;break}throw nt=Pt[0],nt.message="Failed to copy some parts with error: ".concat(nt.toString()," part_num: ").concat(nt.partNum),nt;case 40:return xt.next=42,this.completeMultipartUpload(Fe,je,Be,ae);case 42:return xt.abrupt("return",xt.sent);case 43:case"end":return xt.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}(),Le._divideMultipartCopyParts=function(we,de,z){for(var ee=Math.ceil(we/de),ae=[],ie=0;ie<ee;ie++){var le=de*ie+z,ue=Math.min(le+de,we+z);ae.push({start:le,end:ue})}return ae},Le._getObjectMeta=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ie=this.getBucket(),this.setBucket(z),ge.next=4,this.head(ee,ae);case 4:return le=ge.sent,this.setBucket(ie),ge.abrupt("return",le);case 7:case"end":return ge.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("copy-to"),Le=oe("./callback"),ve=oe("./utils/deepCopy"),we=ve.deepCopyWith,de=oe("./utils/isBuffer"),z=de.isBuffer,ee=oe("./utils/omit"),ae=ee.omit,ie=De;ie.listUploads=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.subres="uploads",Fe=this._objectRequestParams("GET","",Be),Fe.query=Pe,Fe.xmlResponse=!0,Fe.successStatuses=[200],We.next=10,this.request(Fe);case 10:return Ne=We.sent,Ae=Ne.data.Upload||[],Array.isArray(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),We.abrupt("return",{res:Ne.res,uploads:Ae,bucket:Ne.data.Bucket,nextKeyMarker:Ne.data.NextKeyMarker,nextUploadIdMarker:Ne.data.NextUploadIdMarker,isTruncated:Ne.data.IsTruncated==="true"});case 15:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.listParts=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Re;return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Ne={},Se(Fe).to(Ne),Ne.subres={uploadId:je},Ae=this._objectRequestParams("GET",Pe,Ne),Ae.query=Be,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ye.next=10,this.request(Ae);case 10:return Re=Ye.sent,Ye.abrupt("return",{res:Re.res,uploadId:Re.data.UploadId,bucket:Re.data.Bucket,name:Re.data.Key,partNumberMarker:Re.data.PartNumberMarker,nextPartNumberMarker:Re.data.NextPartNumberMarker,maxParts:Re.data.MaxParts,isTruncated:Re.data.IsTruncated,parts:Re.data.Part||[]});case 12:case"end":return Ye.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie.abortMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be){var Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return this._stop(),Be=Be||{},Fe={},Se(Be).to(Fe),Fe.subres={uploadId:je},Ne=this._objectRequestParams("DELETE",Pe,Fe),Ne.successStatuses=[204],We.next=9,this.request(Ne);case 9:return Ae=We.sent,We.abrupt("return",{res:Ae.res});case 11:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe,je){return le.apply(this,arguments)}return ue}(),ie.initMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne;return ke.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.headers=Be.headers||{},this._convertMetaToHeaders(je.meta,Be.headers),Be.subres="uploads",Fe=this._objectRequestParams("POST",Pe,Be),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Re.next=12,this.request(Fe);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,bucket:Ne.data.Bucket,name:Ne.data.Key,uploadId:Ne.data.UploadId});case 14:case"end":return Re.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne,Ae,Re){var We,Ye;return ke.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(We={size:Ae-Ne},Ye=fe&&fe.browser,!Ye){Ve.next=8;break}return Ve.next=5,this._createBuffer(Fe,Ne,Ae);case 5:We.content=Ve.sent,Ve.next=11;break;case 8:return Ve.next=10,this._createStream(Fe,Ne,Ae);case 10:We.stream=Ve.sent;case 11:return Ve.next=13,this._uploadPart(Pe,je,Be,We,Re);case 13:return Ve.abrupt("return",Ve.sent);case 14:case"end":return Ve.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe,Ne,Ae){return le.apply(this,arguments)}return ue}(),ie.completeMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Re,We,Ye,Ue,Ve,ot;return ke.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:for(Ne=Be.concat().sort(function(Pt,$e){return Pt.number-$e.number}).filter(function(Pt,$e,nt){return!$e||Pt.number!==nt[$e-1].number}),Ae=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Re=0;Re<Ne.length;Re++)We=Ne[Re],Ae+=`<Part>
`,Ae+="<PartNumber>".concat(We.number,`</PartNumber>
`),Ae+="<ETag>".concat(We.etag,`</ETag>
`),Ae+=`</Part>
`;return Ae+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=we(Fe,function(Pt){if(z(Pt))return null}),Ye.subres={uploadId:je},Ye.headers=ae(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ue=this._objectRequestParams("POST",Pe,Ye),Le.encodeCallback(Ue,Ye),Ue.mime="xml",Ue.content=Ae,Ue.headers&&Ue.headers["x-oss-callback"]||(Ue.xmlResponse=!0),Ue.successStatuses=[200],ct.next=17,this.request(Ue);case 17:if(Ve=ct.sent,!Fe.progress){ct.next=21;break}return ct.next=21,Fe.progress(1,null,Ve.res);case 21:return ot={res:Ve.res,bucket:Ue.bucket,name:Pe,etag:Ve.res.headers.etag},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ve.data.toString())),ct.abrupt("return",ot);case 24:case"end":return ct.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie._uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne){var Ae,Re,We,Ye;return ke.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ne=Ne||{},Ae={},Se(Ne).to(Ae),Ae.headers=Ae.headers||{},Ae.headers["Content-Length"]=Fe.size,Ae.headers=ae(Ae.headers,["x-oss-server-side-encryption"]),Ae.subres={partNumber:Be,uploadId:je},Re=this._objectRequestParams("PUT",Pe,Ae),Re.mime=Ae.mime,We=fe&&fe.browser,We?Re.content=Fe.content:Re.stream=Fe.stream,Re.successStatuses=[200],Re.disabledMD5=Ne.disabledMD5,Ve.next=15,this.request(Re);case 15:if(Ye=Ve.sent,Ye.res.headers.etag){Ve.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return Fe.stream&&(Fe.stream=null,Re.stream=null),Ve.abrupt("return",{name:Pe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ve.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,oe("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("url"),Se=oe("utility"),Le=oe("copy-to"),ve=oe("../../common/signUtils"),we=oe("../utils/isIP"),de=we.isIP,z=oe("../utils/setSTSToken"),ee=z.setSTSToken,ae=oe("../utils/isFunction"),ie=ae.isFunction,le=De;le.asyncSignatureUrl=function(){var ue=(0,ke.default)(me.default.mark(function Pe(je,Be){var Fe,Ne,Ae,Re,We;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!de(this.options.endpoint.hostname)){Ue.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Be=Be||{},je=this._objectName(je),Be.method=Be.method||"GET",Fe=Se.timestamp()+(Be.expires||1800),Ne={bucket:this.options.bucket,object:je},Ae=this._getResource(Ne),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ue.next=11;break}return Ue.next=11,ee.call(this);case 11:return this.options.stsToken&&(Be["security-token"]=this.options.stsToken),Re=ve._signatureForURL(this.options.accessKeySecret,Be,Ae,Fe),We=Ce.parse(this._getReqUrl(Ne)),We.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Re.Signature},Le(Re.subResource).to(We.query),Ue.abrupt("return",We.format());case 17:case"end":return Ue.stop()}},Pe,this)}));function ge(Pe,je){return ue.apply(this,arguments)}return ge}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var ke=fe(oe("@babel/runtime/helpers/typeof")),Ce=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("../utils/checkBucketName"),Le=Se.checkBucketName,ve=De,we=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];ve.copy=function(){var de=(0,Ce.default)(me.default.mark(function ee(ae,ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,ke.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(Ne){ue.headers["x-oss-copy-source-".concat(Ne.toLowerCase())]=ue.headers[Ne]}),(ue.meta||Object.keys(ue.headers).find(function(Ne){return we.includes(Ne.toLowerCase())}))&&(ue.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ue.meta,ue.headers),ie=this._getSourceName(ie,le),ue.versionId&&(ie="".concat(ie,"?versionId=").concat(ue.versionId)),ue.headers["x-oss-copy-source"]=ie,ge=this._objectRequestParams("PUT",ae,ue),ge.xmlResponse=!0,ge.successStatuses=[200,304],Fe.next=14,this.request(ge);case 14:return Pe=Fe.sent,je=Pe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:Pe.res});case 18:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae,ie,le){return de.apply(this,arguments)}return z}(),ve._getSourceName=function(z,ee){return typeof ee=="string"?z=this._objectName(z):z[0]!=="/"?ee=this.options.bucket:(ee=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Le(ee),z=encodeURIComponent(z),z="/".concat(ee,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.delete=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("DELETE",we,de),z.successStatuses=[204],le.next=7,this.request(z);case 7:return ee=le.sent,le.abrupt("return",{res:ee.res});case 9:case"end":return le.stop()}},ve,this)}));function Le(ve){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("utility"),Se=oe("../utils/obj2xml"),Le=Se.obj2xml,ve=De;ve.deleteMulti=function(){var we=(0,ke.default)(me.default.mark(function z(ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye=arguments;return me.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(ae=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!ee||!ee.length)){Ve.next=4;break}throw new Error("names is required");case 4:for(le=0;le<ee.length;le++)ue={},typeof ee[le]=="string"?ue.Key=Ce.escape(this._objectName(ee[le])):(ge=ee[le],Pe=ge.key,je=ge.versionId,ue.Key=Ce.escape(this._objectName(Pe)),ue.VersionId=je),ie.push(ue);return Be={Delete:{Quiet:!!ae.quiet,Object:ie}},Fe=Le(Be,{headers:!0}),ae.subres=Object.assign({delete:""},ae.subres),ae.versionId&&(ae.subres.versionId=ae.versionId),Ne=this._objectRequestParams("POST","",ae),Ne.mime="xml",Ne.content=Fe,Ne.xmlResponse=!0,Ne.successStatuses=[200],Ve.next=16,this.request(Ne);case 16:return Ae=Ve.sent,Re=Ae.data,We=Re&&Re.Deleted||null,We&&(Array.isArray(We)||(We=[We])),Ve.abrupt("return",{res:Ae.res,deleted:We||[]});case 21:case"end":return Ve.stop()}},z,this)}));function de(z){return we.apply(this,arguments)}return de}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.deleteObjectTagging=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({tagging:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("DELETE",we,de),z.successStatuses=[204],le.next=8,this.request(z);case 8:return ee=le.sent,le.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return le.stop()}},ve,this)}));function Le(ve){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js");var fe=oe("url"),me=oe("../utils/isIP"),ke=me.isIP,Ce=De;Ce.generateObjectUrl=function(Le,ve){if(ke(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(ve)ve[ve.length-1]!=="/"&&(ve+="/");else{ve=this.options.endpoint.format();var we=fe.parse(ve),de=this.options.bucket;we.hostname="".concat(de,".").concat(we.hostname),we.host="".concat(de,".").concat(we.host),ve=we.format()}return ve+this._escape(this._objectName(Le))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("fs"),Le=oe("is-type-of"),ve=De;ve.get=function(){var we=(0,Ce.default)(ke.default.mark(function z(ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne=arguments;return ke.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return ie=Ne.length>2&&Ne[2]!==void 0?Ne[2]:{},le=null,ue=!1,Le.writableStream(ae)?le=ae:Le.string(ae)?(le=Se.createWriteStream(ae),ue=!0):ie=ae,ie=ie||{},ge=fe&&fe.browser,Pe=ie.responseCacheControl===null?"":"no-cache",je=ge&&Pe?{"response-cache-control":Pe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Re.prev=11,Fe=this._objectRequestParams("GET",ee,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Re.next=17,this.request(Fe);case 17:Be=Re.sent,ue&&le.destroy(),Re.next=28;break;case 21:if(Re.prev=21,Re.t0=Re.catch(11),!ue){Re.next=27;break}return le.destroy(),Re.next=27,this._deleteFileSafe(ae);case 27:throw Re.t0;case 28:return Re.abrupt("return",{res:Be.res,content:Be.data});case 29:case"end":return Re.stop()}},z,this,[[11,21]])}));function de(z,ee){return we.apply(this,arguments)}return de}()}).call(this)}).call(this,oe("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({acl:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return ee=le.sent,le.abrupt("return",{acl:ee.data.AccessControlList.Grant,owner:{id:ee.data.Owner.ID,displayName:ee.data.Owner.DisplayName},res:ee.res});case 11:case"end":return le.stop()}},ve,this)}));function Le(ve){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Le=Se.isObject,ve=oe("../utils/isArray"),we=ve.isArray;Ce.getBucketVersions=de,Ce.listObjectVersions=de;function de(){return z.apply(this,arguments)}function z(){return z=(0,ke.default)(me.default.mark(function ie(){var le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(le=Ae.length>0&&Ae[0]!==void 0?Ae[0]:{},ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){We.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ue.subres=Object.assign({versions:""},ue.subres),ue.versionId&&(ue.subres.versionId=ue.versionId),ge=this._objectRequestParams("GET","",ue),ge.xmlResponse=!0,ge.successStatuses=[200],ge.query=ae(le),We.next=12,this.request(ge);case 12:return Pe=We.sent,je=Pe.data.Version||[],Be=Pe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Be&&(we(Be)||(Be=[Be]),Be=Be.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ne=Pe.data.CommonPrefixes||null,Ne&&(we(Ne)||(Ne=[Ne]),Ne=Ne.map(function(Ye){return Ye.Prefix})),We.abrupt("return",{res:Pe.res,objects:je,deleteMarker:Be,prefixes:Ne,nextMarker:Pe.data.NextKeyMarker||null,NextVersionIdMarker:Pe.data.NextVersionIdMarker||null,nextKeyMarker:Pe.data.NextKeyMarker||null,nextVersionIdMarker:Pe.data.NextVersionIdMarker||null,isTruncated:Pe.data.IsTruncated==="true"});case 21:case"end":return We.stop()}},ie,this)})),z.apply(this,arguments)}function ee(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function ae(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Le(ie)&&Object.keys(ie).forEach(function(ue){le[ee(ue)]=ie[ue]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getObjectMeta=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return de=de||{},we=this._objectName(we),de.subres=Object.assign({objectMeta:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("HEAD",we,de),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return ee=ie.sent,ie.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return ie.stop()}},ve,this)}));function Le(ve,we){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Le=Se.isObject;Ce.getObjectTagging=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue,ge,Pe=arguments;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ee=Pe.length>1&&Pe[1]!==void 0?Pe[1]:{},ee.subres=Object.assign({tagging:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),z=this._objectName(z),ae=this._objectRequestParams("GET",z,ee),ae.successStatuses=[200],Be.next=8,this.request(ae);case 8:return ie=Be.sent,Be.next=11,this.parseXML(ie.data);case 11:return le=Be.sent,ue=le.TagSet.Tag,ue=ue&&Le(ue)?[ue]:ue||[],ge={},ue.forEach(function(Fe){ge[Fe.Key]=Fe.Value}),Be.abrupt("return",{status:ie.status,res:ie.res,tag:ge});case 17:case"end":return Be.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(oe,ze,De){"use strict";var fe=oe("../utils/isIP"),me=fe.isIP,ke=De;ke.getObjectUrl=function(Se,Le){if(me(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Le?Le[Le.length-1]!=="/"&&(Le+="/"):Le=this.options.endpoint.format(),Le+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae,ie=arguments;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return de=ie.length>1&&ie[1]!==void 0?ie[1]:{},de.subres=Object.assign({symlink:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),z.successStatuses=[200],ue.next=8,this.request(z);case 8:return ee=ue.sent,ae=ee.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(ae),res:ee.res});case 11:case"end":return ue.stop()}},ve,this)}));function Le(ve){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkEnv"),Se=Ce.checkEnv,Le=De;Le.head=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>1&&ue[1]!==void 0?ue[1]:{},Se("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),ee.subres=Object.assign({},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),ae=this._objectRequestParams("HEAD",z,ee),ae.successStatuses=[200,304],Pe.next=8,this.request(ae);case 8:return ie=Pe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),Pe.abrupt("return",le);case 12:case"end":return Pe.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=de,we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=10,this.request(ee);case 10:return ae=le.sent,le.abrupt("return",{res:ae.res});case 12:case"end":return le.stop()}},ve,this)}));function Le(ve,we,de){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/obj2xml"),Se=Ce.obj2xml,Le=oe("../utils/checkObjectTag"),ve=Le.checkObjectTag,we=De;we.putObjectTagging=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},ve(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),ae=this._objectName(ae),ue=this._objectRequestParams("PUT",ae,le),ue.successStatuses=[200],ie=Object.keys(ie).map(function(Ne){return{Key:Ne,Value:ie[Ne]}}),ge={Tagging:{TagSet:{Tag:ie}}},ue.mime="xml",ue.content=Se(ge),Fe.next=13,this.request(ue);case 13:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 15:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},de=this._escape(this._objectName(de)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=de,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=13,this.request(ee);case 13:return ae=le.sent,le.abrupt("return",{res:ae.res});case 15:case"end":return le.stop()}},ve,this)}));function Le(ve,we,de){return Se.apply(this,arguments)}return Le}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,ze,De){"use strict";var fe=oe("url"),me=oe("utility"),ke=oe("copy-to"),Ce=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Le=Se.isIP,ve=De;ve.signatureUrl=function(de,z){if(Le(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},de=this._objectName(de),z.method=z.method||"GET";var ee=me.timestamp()+(z.expires||1800),ae={bucket:this.options.bucket,object:de},ie=this._getResource(ae);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=Ce._signatureForURL(this.options.accessKeySecret,z,ie,ee),ue=fe.parse(this._getReqUrl(ae));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ee,Signature:le.Signature},ke(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.function.name.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("./utils/isArray"),Se=Ce.isArray,Le=De;Le._parallelNode=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie){var le,ue,ge,Pe,je,Be,Fe,Ne;return me.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:le=this,ue=[],ge=[],Pe=z.length/ee,je=z.length%ee,Be=je===0?Pe:(z.length-je)/ee+1,Fe=1,Ne=0;case 8:if(!(Ne<z.length)){Re.next=26;break}if(!le.isCancel()){Re.next=11;break}return Re.abrupt("break",26);case 11:if(ie?ge.push(ae(le,z[Ne],ie)):ge.push(ae(le,z[Ne])),!(ge.length===ee||Fe===Be&&Ne===z.length-1)){Re.next=23;break}return Re.prev=13,Fe+=1,Re.next=17,Promise.all(ge);case 17:Re.next=22;break;case 19:Re.prev=19,Re.t0=Re.catch(13),ue.push(Re.t0);case 22:ge=[];case 23:Ne++,Re.next=8;break;case 26:return Re.abrupt("return",ue);case 27:case"end":return Re.stop()}},de,this,[[13,19]])}));function we(de,z,ee,ae){return ve.apply(this,arguments)}return we}(),Le._parallel=function(we,de,z){var ee=this;return new Promise(function(ae){var ie=[];if(de<=0||!we){ae(ie);return}function le(Re){return function(){if(Re===null)throw new Error("Callback was already called.");var We=Re;Re=null;for(var Ye=arguments.length,Ue=new Array(Ye),Ve=0;Ve<Ye;Ve++)Ue[Ve]=arguments[Ve];We.apply(this,Ue)}}function ue(Re){var We=-1,Ye=Re.length;return function(){return++We<Ye&&!ee.isCancel()?{value:Re[We],key:We}:null}}var ge=ue(we),Pe=!1,je=0,Be=!1;function Fe(Re){je-=1,Re?(Pe=!0,ie.push(Re),ae(ie)):Pe&&je<=0?(Pe=!0,ae(ie)):Be||(ee.isCancel()?ae(ie):Ae())}function Ne(Re,We){z(Re).then(function(Ye){We(null,Ye)}).catch(function(Ye){We(Ye)})}function Ae(){for(Be=!0;je<de&&!Pe&&!ee.isCancel();){var Re=ge();if(Re===null||ie.length>0){Pe=!0,je<=0&&ae(ie);return}je+=1,Ne(Re.value,le(Fe))}Be=!1}Ae()})},Le.cancel=function(we){this.options.cancelFlag=!0,Se(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(de){if(de.destroyed===!1){var z={name:"cancel",message:"cancel"};de.destroy(z)}}),this.multipartUploadStreams=[],we&&this.abortMultipartUpload(we.name,we.uploadId,we.options)},Le.isCancel=function(){return this.options.cancelFlag},Le.resetCancelFlag=function(){this.options.cancelFlag=!1},Le._stop=function(){this.options.cancelFlag=!0},Le._makeCancelEvent=function(){var we={status:0,name:"cancel"};return we},Le._makeAbortEvent=function(){var we={status:0,name:"abort",message:"upload task has been abort"};return we}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var me=oe("./../../shims/crypto/crypto.js"),ke=oe("is-type-of"),Ce=oe("./utils/lowercaseKeyHeader"),Se=Ce.lowercaseKeyHeader;De.buildCanonicalizedResource=function(ve,we){var de="".concat(ve),z="?";if(ke.string(we)&&we.trim()!=="")de+=z+we;else if(ke.array(we))we.sort(),de+=z+we.join("&");else if(we){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},ae=function(le){de+=z+le,(we[le]||we[le]===0)&&(de+="=".concat(we[le])),z="&"};Object.keys(we).sort(ee).forEach(ae)}return de},De.buildCanonicalString=function(ve,we,de,z){de=de||{};var ee=Se(de.headers),ae="x-oss-",ie=[],le={},ue=[ve.toUpperCase(),ee["content-md5"]||"",ee["content-type"],z||ee["x-oss-date"]];return Object.keys(ee).forEach(function(ge){var Pe=ge.toLowerCase();Pe.indexOf(ae)===0&&(le[Pe]=String(ee[ge]).trim())}),Object.keys(le).sort().forEach(function(ge){ie.push("".concat(ge,":").concat(le[ge]))}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(we,de.parameters)),ue.join(`
`)},De.computeSignature=function(ve,we){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=me.createHmac("sha1",ve);return z.update(fe.from(we,de)).digest("base64")},De.authorization=function(ve,we,de,z){return"OSS ".concat(ve,":").concat(this.computeSignature(we,de,z))},De._signatureForURL=function(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,ee=arguments.length>4?arguments[4]:void 0,ae={},ie=we.subResource,le=ie===void 0?{}:ie;if(we.process){var ue="x-oss-process";le[ue]=we.process}if(we.trafficLimit){var ge="x-oss-traffic-limit";le[ge]=we.trafficLimit}if(we.response&&Object.keys(we.response).forEach(function(Fe){var Ne="response-".concat(Fe.toLowerCase());le[Ne]=we.response[Fe]}),Object.keys(we).forEach(function(Fe){var Ne=Fe.toLowerCase(),Ae=we[Fe];Ne.indexOf("x-oss-")===0?ae[Ne]=Ae:(Ne.indexOf("content-md5")===0||Ne.indexOf("content-type")===0)&&(ae[Fe]=Ae)}),Object.prototype.hasOwnProperty.call(we,"security-token")&&(le["security-token"]=we["security-token"]),Object.prototype.hasOwnProperty.call(we,"callback")){var Pe={callbackUrl:encodeURI(we.callback.url),callbackBody:we.callback.body};if(we.callback.host&&(Pe.callbackHost=we.callback.host),we.callback.contentType&&(Pe.callbackBodyType=we.callback.contentType),le.callback=fe.from(JSON.stringify(Pe)).toString("base64"),we.callback.customValue){var je={};Object.keys(we.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=we.callback.customValue[Fe]}),le["callback-var"]=fe.from(JSON.stringify(je)).toString("base64")}}var Be=this.buildCanonicalString(we.method,de,{headers:ae,parameters:le},z.toString());return{Signature:this.computeSignature(ve,Be,ee),subResource:le}}}).call(this)}).call(this,oe("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkBucketName=void 0,De.checkBucketName=function(fe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke=me?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!ke.test(fe))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkConfigValid=void 0;var fe={endpoint:me,region:/^[a-zA-Z0-9\-_]+$/};function me(ke){return typeof ke=="string"?/^[a-zA-Z0-9._:/-]+$/.test(ke):ke.host?/^[a-zA-Z0-9._:/-]+$/.test(ke.host):!1}De.checkConfigValid=function(ke,Ce){if(fe[Ce]){var Se=!0;if(fe[Ce]instanceof Function?Se=fe[Ce](ke):Se=fe[Ce].test(ke),!Se)throw new Error("The ".concat(Ce," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(oe,ze,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.checkEnv=void 0;function me(ke){fe.browser&&console.warn(ke)}De.checkEnv=me}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkObjectTag=void 0;var fe=oe("./checkValid"),me=fe.checkValid,ke=oe("./isObject"),Ce=ke.isObject,Se=[{validator:function(de){if(typeof de!="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 (/)"}],Le={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function ve(we){if(!Ce(we))throw new Error("tag must be Object");var de=Object.entries(we);if(de.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];de.forEach(function(ee){ee.forEach(function(ae,ie){me(ae,Le[z[ie]])})})}De.checkObjectTag=ve},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkValid=void 0;function fe(me,ke){ke.forEach(function(Ce){if(Ce.validator)Ce.validator(me);else if(Ce.pattern&&!Ce.pattern.test(me))throw new Error(Ce.msg)})}De.checkValid=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.createRequest=void 0;var me=oe("./../../../shims/crypto/crypto.js"),ke=oe("debug")("ali-oss"),Ce=oe("mime"),Se=oe("dateformat"),Le=oe("copy-to"),ve=oe("path"),we=oe("./encoder"),de=we.encoder,z=oe("./isIP"),ee=z.isIP,ae=oe("./setRegion"),ie=ae.setRegion,le=oe("../client/getReqUrl"),ue=le.getReqUrl,ge=oe("./isDingTalk"),Pe=ge.isDingTalk;function je(Ne,Ae){return Ne[Ae]||Ne[Ae.toLowerCase()]}function Be(Ne,Ae){delete Ne[Ae],delete Ne[Ae.toLowerCase()]}function Fe(Ne){var Ae=new Date;this.options.amendTimeSkewed&&(Ae=+new Date+this.options.amendTimeSkewed);var Re={"x-oss-date":Se(Ae,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Re["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Re["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Re,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Re["x-oss-security-token"]=this.options.stsToken),Le(Ne.headers).to(Re),je(Re,"Content-Type")||(Ne.mime&&Ne.mime.indexOf("/")>0?Re["Content-Type"]=Ne.mime:Pe()?Re["Content-Type"]="application/octet-stream":Re["Content-Type"]=Ce.getType(Ne.mime||ve.extname(Ne.object||""))),je(Re,"Content-Type")||Be(Re,"Content-Type"),Ne.content&&(Ne.disabledMD5||(!Ne.headers||!Ne.headers["Content-MD5"]?Re["Content-MD5"]=me.createHash("md5").update(fe.from(Ne.content,"utf8")).digest("base64"):Re["Content-MD5"]=Ne.headers["Content-MD5"]),Re["Content-Length"]||(Re["Content-Length"]=Ne.content.length));var We=Object.prototype.hasOwnProperty;for(var Ye in Re)Re[Ye]&&We.call(Re,Ye)&&(Re[Ye]=de(String(Re[Ye]),this.options.headerEncoding));var Ue=this._getResource(Ne);if(Re.authorization=this.authorization(Ne.method,Ue,Ne.subres,Re,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ve=this.options,ot=Ve.region,st=Ve.internal,ct=Ve.secure,Pt=ie(ot,st,ct);Re.host="".concat(Ne.bucket,".").concat(Pt.host)}var $e=ue.bind(this)(Ne);ke("request %s %s, with headers %j, !!stream: %s",Ne.method,$e,Re,!!Ne.stream);var nt=Ne.timeout||this.options.timeout,yt={method:Ne.method,content:Ne.content,stream:Ne.stream,headers:Re,timeout:nt,writeStream:Ne.writeStream,customResponse:Ne.customResponse,ctx:Ne.ctx||this.ctx};return this.agent&&(yt.agent=this.agent),this.httpsAgent&&(yt.httpsAgent=this.httpsAgent),yt.enableProxy=!!this.options.enableProxy,yt.proxy=this.options.proxy?this.options.proxy:null,{url:$e,params:yt}}De.createRequest=Fe}).call(this)}).call(this,oe("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.dataFix=void 0;var fe=oe("./isObject"),me=["true","TRUE","1",1],ke=["false","FALSE","0",0];function Ce(ve,we,de){if(fe.isObject(ve)){var z=we.remove,ee=z===void 0?[]:z,ae=we.rename,ie=ae===void 0?{}:ae,le=we.camel,ue=le===void 0?[]:le,ge=we.bool,Pe=ge===void 0?[]:ge,je=we.lowerFirst,Be=je===void 0?!1:je;return ee.forEach(function(Fe){return delete ve[Fe]}),Object.entries(ie).forEach(function(Fe){ve[Fe[0]]&&(ve[Fe[1]]||(ve[Fe[1]]=ve[Fe[0]],delete ve[Fe[0]]))}),ue.forEach(function(Fe){if(ve[Fe]){var Ne=Fe.replace(/^(.)/,function(Ae){return Ae.toLowerCase()}).replace(/-(\w)/g,function(Ae,Re){return Re.toUpperCase()});ve[Ne]||(ve[Ne]=ve[Fe])}}),Pe.forEach(function(Fe){ve[Fe]=Se(ve[Fe])}),typeof de=="function"&&de(ve),Le(ve,Be),Ce}}De.dataFix=Ce;function Se(ve){return ve?me.includes(ve)?!0:ke.includes(ve)?!1:ve:!1}function Le(ve,we){we&&Object.keys(ve).forEach(function(de){var z=de.replace(/^\w/,function(ee){return ee.toLowerCase()});typeof ve[z]=="undefined"&&(ve[z]=ve[de],delete ve[de])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.deepCopyWith=De.deepCopy=void 0;var ke=oe("./isBuffer");De.deepCopy=function(Ce){if(Ce===null||(0,me.default)(Ce)!=="object")return Ce;if(ke.isBuffer(Ce))return Ce.slice();var Se=Array.isArray(Ce)?[]:{};return Object.keys(Ce).forEach(function(Le){Se[Le]=De.deepCopy(Ce[Le])}),Se},De.deepCopyWith=function(Ce,Se){function Le(ve,we,de){var z=Se(ve,we,de);if(z!==void 0)return z;if(ve===null||(0,me.default)(ve)!=="object")return ve;if(ke.isBuffer(ve))return ve.slice();var ee=Array.isArray(ve)?[]:{};return Object.keys(ve).forEach(function(ae){ee[ae]=Le(ve[ae],ae,ve)}),ee}return Se?Le(Ce,"",null):De.deepCopy(Ce)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.encoder=void 0;function me(ke){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ce==="utf-8"?ke:fe.from(ke).toString("latin1")}De.encoder=me}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.formatInventoryConfig=void 0;var fe=oe("../utils/dataFix"),me=oe("../utils/isObject"),ke=oe("../utils/isArray"),Ce=oe("../utils/formatObjKey");function Se(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return we&&me.isObject(ve)&&(ve=[ve]),ke.isArray(ve)?ve=ve.map(Le):ve=Le(ve),ve}De.formatInventoryConfig=Se;function Le(ve){return fe.dataFix(ve,{bool:["IsEnabled"]},function(we){var de,z;we.prefix=we.Filter.Prefix,delete we.Filter,we.OSSBucketDestination=we.Destination.OSSBucketDestination,we.OSSBucketDestination.rolename=we.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete we.OSSBucketDestination.RoleArn,we.OSSBucketDestination.bucket=we.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete we.OSSBucketDestination.Bucket,delete we.Destination,we.frequency=we.Schedule.Frequency,delete we.Schedule.Frequency,!((de=we==null?void 0:we.OptionalFields)===null||de===void 0)&&de.Field&&!ke.isArray((z=we.OptionalFields)===null||z===void 0?void 0:z.Field)&&(we.OptionalFields.Field=[we.OptionalFields.Field])}),ve=Ce.formatObjKey(ve,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),ve}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.formatObjKey=void 0;function ke(Se,Le,ve){if(Se===null||(0,me.default)(Se)!=="object")return Se;var we;if(Array.isArray(Se)){we=[];for(var de=0;de<Se.length;de++)we.push(ke(Se[de],Le,ve))}else we={},Object.keys(Se).forEach(function(z){we[Ce(z,Le,ve)]=ke(Se[z],Le,ve)});return we}De.formatObjKey=ke;function Ce(Se,Le,ve){return ve&&ve.exclude&&ve.exclude.includes(Se)||(Le==="firstUpperCase"?Se=Se.replace(/^./,function(we){return we.toUpperCase()}):Le==="firstLowerCase"&&(Se=Se.replace(/^./,function(we){return we.toLowerCase()}))),Se}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.getStrBytesCount=void 0;function fe(me){for(var ke=0,Ce=0;Ce<me.length;Ce++){var Se=me.charAt(Ce);/^[\u00-\uff]$/.test(Se)?ke+=1:ke+=2}return ke}De.getStrBytesCount=fe},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isArray=void 0,De.isArray=function(fe){return Object.prototype.toString.call(fe)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBlob=void 0;function fe(me){return typeof Blob!="undefined"&&me instanceof Blob}De.isBlob=fe},{}],65:[function(oe,ze,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBuffer=void 0;function me(ke){return fe.isBuffer(ke)}De.isBuffer=me}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isDingTalk=void 0;function me(){return!!(fe.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}De.isDingTalk=me}).call(this)}).call(this,oe("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFile=void 0,De.isFile=function(fe){return typeof File!="undefined"&&fe instanceof File}},{}],68:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFunction=void 0,De.isFunction=function(fe){return typeof fe=="function"}},{}],69:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isIP=void 0,De.isIP=function(fe){var me=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,ke=/^\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 me.test(fe)||ke.test(fe)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isObject=void 0,De.isObject=function(fe){return Object.prototype.toString.call(fe)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.lowercaseKeyHeader=void 0;var fe=oe("./isObject");function me(ke){var Ce={};return fe.isObject(ke)&&Object.keys(ke).forEach(function(Se){Ce[Se.toLowerCase()]=ke[Se]}),Ce}De.lowercaseKeyHeader=me},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.obj2xml=void 0;var fe=oe("./formatObjKey");function me(Ce){return Object.prototype.toString.call(Ce).replace(/(.*? |])/g,"").toLowerCase()}function ke(Ce,Se){var Le="";return Se&&Se.headers&&(Le=`<?xml version="1.0" encoding="UTF-8"?>
`),Se&&Se.firstUpperCase&&(Ce=fe.formatObjKey(Ce,"firstUpperCase")),me(Ce)==="object"?Object.keys(Ce).forEach(function(ve){me(Ce[ve])!=="undefined"&&me(Ce[ve])!=="null"&&(me(Ce[ve])==="string"||me(Ce[ve])==="number"?Le+="<".concat(ve,">").concat(Ce[ve],"</").concat(ve,">"):me(Ce[ve])==="object"?Le+="<".concat(ve,">").concat(ke(Ce[ve]),"</").concat(ve,">"):me(Ce[ve])==="array"?Le+=Ce[ve].map(function(we){return"<".concat(ve,">").concat(ke(we),"</").concat(ve,">")}).join(""):Le+="<".concat(ve,">").concat(Ce[ve].toString(),"</").concat(ve,">"))}):Le+=Ce.toString(),Le}De.obj2xml=ke},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.symbol.iterator.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/es.object.assign.js");function fe(Se,Le){var ve=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!ve){if(Array.isArray(Se)||(ve=me(Se))||Le&&Se&&typeof Se.length=="number"){ve&&(Se=ve);var we=0,de=function(){};return{s:de,n:function(){return we>=Se.length?{done:!0}:{done:!1,value:Se[we++]}},e:function(le){throw le},f:de}}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,ee=!1,ae;return{s:function(){ve=ve.call(Se)},n:function(){var le=ve.next();return z=le.done,le},e:function(le){ee=!0,ae=le},f:function(){try{!z&&ve.return!=null&&ve.return()}finally{if(ee)throw ae}}}}function me(Se,Le){if(Se){if(typeof Se=="string")return ke(Se,Le);var ve=Object.prototype.toString.call(Se).slice(8,-1);if(ve==="Object"&&Se.constructor&&(ve=Se.constructor.name),ve==="Map"||ve==="Set")return Array.from(Se);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return ke(Se,Le)}}function ke(Se,Le){(Le==null||Le>Se.length)&&(Le=Se.length);for(var ve=0,we=new Array(Le);ve<Le;ve++)we[ve]=Se[ve];return we}Object.defineProperty(De,"__esModule",{value:!0}),De.omit=void 0;function Ce(Se,Le){var ve=Object.assign({},Se),we=fe(Le),de;try{for(we.s();!(de=we.n()).done;){var z=de.value;delete ve[z]}}catch(ee){we.e(ee)}finally{we.f()}return ve}De.omit=Ce},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.retry=void 0;function fe(me,ke){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,Le=Ce.retryDelay,ve=Le===void 0?500:Le,we=Ce.errorHandler,de=we===void 0?function(){return!0}:we,z=function ee(){for(var ae=arguments.length,ie=new Array(ae),le=0;le<ae;le++)ie[le]=arguments[le];return new Promise(function(ue,ge){me.apply(void 0,ie).then(function(Pe){Se=0,ue(Pe)}).catch(function(Pe){Se<ke&&de(Pe)?(Se++,setTimeout(function(){ue(ee.apply(void 0,ie))},ve)):(Se=0,ge(Pe))})})};return z}De.retry=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,ze,De){"use strict";var fe=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(De,"__esModule",{value:!0}),De.setRegion=void 0;var me=fe(oe("url")),ke=oe("./checkConfigValid");function Ce(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ke.checkConfigValid(Se,"region");var we=ve?"https://":"http://",de=Le?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(de=".aliyuncs.com"),me.default.parse(we+Se+de)}De.setRegion=Ce},{"./checkConfigValid":52,url:472}],76:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.checkCredentials=De.setSTSToken=void 0;var Ce=oe("./formatObjKey");function Se(){return Le.apply(this,arguments)}function Le(){return Le=(0,ke.default)(me.default.mark(function we(){var de,z;return me.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(this.options||(this.options={}),de=new Date,!this.stsTokenFreshTime){ae.next=14;break}if(!(+de-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){ae.next=12;break}return this.stsTokenFreshTime=de,ae.next=7,this.options.refreshSTSToken();case 7:z=ae.sent,z=Ce.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),ve(z),Object.assign(this.options,z);case 12:ae.next=15;break;case 14:this.stsTokenFreshTime=de;case 15:return ae.abrupt("return",null);case 16:case"end":return ae.stop()}},we,this)})),Le.apply(this,arguments)}De.setSTSToken=Se;function ve(we){var de=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(we);de.forEach(function(ee){if(!z.find(function(ae){return ae===ee}))throw Error("refreshSTSToken must return contains ".concat(ee))})}De.checkCredentials=ve},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(oe,ze,De){function fe(ke,Ce,Se,Le,ve,we,de){try{var z=ke[we](de),ee=z.value}catch(ae){Se(ae);return}z.done?Ce(ee):Promise.resolve(ee).then(Le,ve)}function me(ke){return function(){var Ce=this,Se=arguments;return new Promise(function(Le,ve){var we=ke.apply(Ce,Se);function de(ee){fe(we,Le,ve,de,z,"next",ee)}function z(ee){fe(we,Le,ve,de,z,"throw",ee)}de(void 0)})}}ze.exports=me,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],78:[function(oe,ze,De){function fe(me){return me&&me.__esModule?me:{default:me}}ze.exports=fe,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],79:[function(oe,ze,De){function fe(me){"@babel/helpers - typeof";return ze.exports=fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ke){return typeof ke}:function(ke){return ke&&typeof Symbol=="function"&&ke.constructor===Symbol&&ke!==Symbol.prototype?"symbol":typeof ke},ze.exports.__esModule=!0,ze.exports.default=ze.exports,fe(me)}ze.exports=fe,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],80:[function(oe,ze,De){ze.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,ze,De){ze.exports=fe,ze.exports.HttpsAgent=fe;function fe(){}},{}],82:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("object-assign");function ke(ot,st){if(ot===st)return 0;for(var ct=ot.length,Pt=st.length,$e=0,nt=Math.min(ct,Pt);$e<nt;++$e)if(ot[$e]!==st[$e]){ct=ot[$e],Pt=st[$e];break}return ct<Pt?-1:Pt<ct?1:0}function Ce(ot){return fe.Buffer&&typeof fe.Buffer.isBuffer=="function"?fe.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Le=Object.prototype.hasOwnProperty,ve=Array.prototype.slice,we=function(){return function(){}.name==="foo"}();function de(ot){return Object.prototype.toString.call(ot)}function z(ot){return Ce(ot)||typeof fe.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ot):ot?!!(ot instanceof DataView||ot.buffer&&ot.buffer instanceof ArrayBuffer):!1}var ee=ze.exports=je,ae=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(we)return ot.name;var st=ot.toString(),ct=st.match(ae);return ct&&ct[1]}}ee.AssertionError=function(st){this.name="AssertionError",this.actual=st.actual,this.expected=st.expected,this.operator=st.operator,st.message?(this.message=st.message,this.generatedMessage=!1):(this.message=ge(this),this.generatedMessage=!0);var ct=st.stackStartFunction||Pe;if(Error.captureStackTrace)Error.captureStackTrace(this,ct);else{var Pt=new Error;if(Pt.stack){var $e=Pt.stack,nt=ie(ct),yt=$e.indexOf(`
`+nt);if(yt>=0){var xt=$e.indexOf(`
`,yt+1);$e=$e.substring(xt+1)}this.stack=$e}}},Se.inherits(ee.AssertionError,Error);function le(ot,st){return typeof ot=="string"?ot.length<st?ot:ot.slice(0,st):ot}function ue(ot){if(we||!Se.isFunction(ot))return Se.inspect(ot);var st=ie(ot),ct=st?": "+st:"";return"[Function"+ct+"]"}function ge(ot){return le(ue(ot.actual),128)+" "+ot.operator+" "+le(ue(ot.expected),128)}function Pe(ot,st,ct,Pt,$e){throw new ee.AssertionError({message:ct,actual:ot,expected:st,operator:Pt,stackStartFunction:$e})}ee.fail=Pe;function je(ot,st){ot||Pe(ot,!0,st,"==",ee.ok)}ee.ok=je,ee.equal=function(st,ct,Pt){st!=ct&&Pe(st,ct,Pt,"==",ee.equal)},ee.notEqual=function(st,ct,Pt){st==ct&&Pe(st,ct,Pt,"!=",ee.notEqual)},ee.deepEqual=function(st,ct,Pt){Be(st,ct,!1)||Pe(st,ct,Pt,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(st,ct,Pt){Be(st,ct,!0)||Pe(st,ct,Pt,"deepStrictEqual",ee.deepStrictEqual)};function Be(ot,st,ct,Pt){if(ot===st)return!0;if(Ce(ot)&&Ce(st))return ke(ot,st)===0;if(Se.isDate(ot)&&Se.isDate(st))return ot.getTime()===st.getTime();if(Se.isRegExp(ot)&&Se.isRegExp(st))return ot.source===st.source&&ot.global===st.global&&ot.multiline===st.multiline&&ot.lastIndex===st.lastIndex&&ot.ignoreCase===st.ignoreCase;if((ot===null||typeof ot!="object")&&(st===null||typeof st!="object"))return ct?ot===st:ot==st;if(z(ot)&&z(st)&&de(ot)===de(st)&&!(ot instanceof Float32Array||ot instanceof Float64Array))return ke(new Uint8Array(ot.buffer),new Uint8Array(st.buffer))===0;if(Ce(ot)!==Ce(st))return!1;Pt=Pt||{actual:[],expected:[]};var $e=Pt.actual.indexOf(ot);return $e!==-1&&$e===Pt.expected.indexOf(st)?!0:(Pt.actual.push(ot),Pt.expected.push(st),Ne(ot,st,ct,Pt))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Ne(ot,st,ct,Pt){if(ot==null||st===null||st===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(st))return ot===st;if(ct&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(st))return!1;var $e=Fe(ot),nt=Fe(st);if($e&&!nt||!$e&&nt)return!1;if($e)return ot=ve.call(ot),st=ve.call(st),Be(ot,st,ct);var yt=Ve(ot),xt=Ve(st),wt,dt;if(yt.length!==xt.length)return!1;for(yt.sort(),xt.sort(),dt=yt.length-1;dt>=0;dt--)if(yt[dt]!==xt[dt])return!1;for(dt=yt.length-1;dt>=0;dt--)if(wt=yt[dt],!Be(ot[wt],st[wt],ct,Pt))return!1;return!0}ee.notDeepEqual=function(st,ct,Pt){Be(st,ct,!1)&&Pe(st,ct,Pt,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Ae;function Ae(ot,st,ct){Be(ot,st,!0)&&Pe(ot,st,ct,"notDeepStrictEqual",Ae)}ee.strictEqual=function(st,ct,Pt){st!==ct&&Pe(st,ct,Pt,"===",ee.strictEqual)},ee.notStrictEqual=function(st,ct,Pt){st===ct&&Pe(st,ct,Pt,"!==",ee.notStrictEqual)};function Re(ot,st){if(!ot||!st)return!1;if(Object.prototype.toString.call(st)=="[object RegExp]")return st.test(ot);try{if(ot instanceof st)return!0}catch(ct){}return Error.isPrototypeOf(st)?!1:st.call({},ot)===!0}function We(ot){var st;try{ot()}catch(ct){st=ct}return st}function Ye(ot,st,ct,Pt){var $e;if(typeof st!="function")throw new TypeError('"block" argument must be a function');typeof ct=="string"&&(Pt=ct,ct=null),$e=We(st),Pt=(ct&&ct.name?" ("+ct.name+").":".")+(Pt?" "+Pt:"."),ot&&!$e&&Pe($e,ct,"Missing expected exception"+Pt);var nt=typeof Pt=="string",yt=!ot&&Se.isError($e),xt=!ot&&$e&&!ct;if((yt&&nt&&Re($e,ct)||xt)&&Pe($e,ct,"Got unwanted exception"+Pt),ot&&$e&&ct&&!Re($e,ct)||!ot&&$e)throw $e}ee.throws=function(ot,st,ct){Ye(!0,ot,st,ct)},ee.doesNotThrow=function(ot,st,ct){Ye(!1,ot,st,ct)},ee.ifError=function(ot){if(ot)throw ot};function Ue(ot,st){ot||Pe(ot,!0,st,"==",Ue)}ee.strict=me(Ue,ee,{equal:ee.strictEqual,deepEqual:ee.deepStrictEqual,notEqual:ee.notStrictEqual,notDeepEqual:ee.notDeepStrictEqual}),ee.strict.strict=ee.strict;var Ve=Object.keys||function(ot){var st=[];for(var ct in ot)Le.call(ot,ct)&&st.push(ct);return st}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(oe,ze,De){typeof Object.create=="function"?ze.exports=function(me,ke){me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}})}:ze.exports=function(me,ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}},{}],84:[function(oe,ze,De){ze.exports=function(me){return me&&typeof me=="object"&&typeof me.copy=="function"&&typeof me.fill=="function"&&typeof me.readUInt8=="function"}},{}],85:[function(oe,ze,De){(function(fe,me){(function(){var ke=/%[sdj%]/g;De.format=function(xt){if(!Ne(xt)){for(var wt=[],dt=0;dt<arguments.length;dt++)wt.push(Le(arguments[dt]));return wt.join(" ")}for(var dt=1,ft=arguments,ut=ft.length,Et=String(xt).replace(ke,function(vt){if(vt==="%%")return"%";if(dt>=ut)return vt;switch(vt){case"%s":return String(ft[dt++]);case"%d":return Number(ft[dt++]);case"%j":try{return JSON.stringify(ft[dt++])}catch(kt){return"[Circular]"}default:return vt}}),mt=ft[dt];dt<ut;mt=ft[++dt])je(mt)||!Ye(mt)?Et+=" "+mt:Et+=" "+Le(mt);return Et},De.deprecate=function(xt,wt){if(Re(me.process))return function(){return De.deprecate(xt,wt).apply(this,arguments)};if(fe.noDeprecation===!0)return xt;var dt=!1;function ft(){if(!dt){if(fe.throwDeprecation)throw new Error(wt);fe.traceDeprecation?console.trace(wt):console.error(wt),dt=!0}return xt.apply(this,arguments)}return ft};var Ce={},Se;De.debuglog=function(xt){if(Re(Se)&&(Se=fe.env.NODE_DEBUG||""),xt=xt.toUpperCase(),!Ce[xt])if(new RegExp("\\b"+xt+"\\b","i").test(Se)){var wt=fe.pid;Ce[xt]=function(){var dt=De.format.apply(De,arguments);console.error("%s %d: %s",xt,wt,dt)}}else Ce[xt]=function(){};return Ce[xt]};function Le(xt,wt){var dt={seen:[],stylize:we};return arguments.length>=3&&(dt.depth=arguments[2]),arguments.length>=4&&(dt.colors=arguments[3]),Pe(wt)?dt.showHidden=wt:wt&&De._extend(dt,wt),Re(dt.showHidden)&&(dt.showHidden=!1),Re(dt.depth)&&(dt.depth=2),Re(dt.colors)&&(dt.colors=!1),Re(dt.customInspect)&&(dt.customInspect=!0),dt.colors&&(dt.stylize=ve),z(dt,xt,dt.depth)}De.inspect=Le,Le.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]},Le.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ve(xt,wt){var dt=Le.styles[wt];return dt?"\x1B["+Le.colors[dt][0]+"m"+xt+"\x1B["+Le.colors[dt][1]+"m":xt}function we(xt,wt){return xt}function de(xt){var wt={};return xt.forEach(function(dt,ft){wt[dt]=!0}),wt}function z(xt,wt,dt){if(xt.customInspect&&wt&&ot(wt.inspect)&&wt.inspect!==De.inspect&&!(wt.constructor&&wt.constructor.prototype===wt)){var ft=wt.inspect(dt,xt);return Ne(ft)||(ft=z(xt,ft,dt)),ft}var ut=ee(xt,wt);if(ut)return ut;var Et=Object.keys(wt),mt=de(Et);if(xt.showHidden&&(Et=Object.getOwnPropertyNames(wt)),Ve(wt)&&(Et.indexOf("message")>=0||Et.indexOf("description")>=0))return ae(wt);if(Et.length===0){if(ot(wt)){var vt=wt.name?": "+wt.name:"";return xt.stylize("[Function"+vt+"]","special")}if(We(wt))return xt.stylize(RegExp.prototype.toString.call(wt),"regexp");if(Ue(wt))return xt.stylize(Date.prototype.toString.call(wt),"date");if(Ve(wt))return ae(wt)}var kt="",pt=!1,Qe=["{","}"];if(ge(wt)&&(pt=!0,Qe=["[","]"]),ot(wt)){var Ke=wt.name?": "+wt.name:"";kt=" [Function"+Ke+"]"}if(We(wt)&&(kt=" "+RegExp.prototype.toString.call(wt)),Ue(wt)&&(kt=" "+Date.prototype.toUTCString.call(wt)),Ve(wt)&&(kt=" "+ae(wt)),Et.length===0&&(!pt||wt.length==0))return Qe[0]+kt+Qe[1];if(dt<0)return We(wt)?xt.stylize(RegExp.prototype.toString.call(wt),"regexp"):xt.stylize("[Object]","special");xt.seen.push(wt);var xe;return pt?xe=ie(xt,wt,dt,mt,Et):xe=Et.map(function(Me){return le(xt,wt,dt,mt,Me,pt)}),xt.seen.pop(),ue(xe,kt,Qe)}function ee(xt,wt){if(Re(wt))return xt.stylize("undefined","undefined");if(Ne(wt)){var dt="'"+JSON.stringify(wt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return xt.stylize(dt,"string")}if(Fe(wt))return xt.stylize(""+wt,"number");if(Pe(wt))return xt.stylize(""+wt,"boolean");if(je(wt))return xt.stylize("null","null")}function ae(xt){return"["+Error.prototype.toString.call(xt)+"]"}function ie(xt,wt,dt,ft,ut){for(var Et=[],mt=0,vt=wt.length;mt<vt;++mt)yt(wt,String(mt))?Et.push(le(xt,wt,dt,ft,String(mt),!0)):Et.push("");return ut.forEach(function(kt){kt.match(/^\d+$/)||Et.push(le(xt,wt,dt,ft,kt,!0))}),Et}function le(xt,wt,dt,ft,ut,Et){var mt,vt,kt;if(kt=Object.getOwnPropertyDescriptor(wt,ut)||{value:wt[ut]},kt.get?kt.set?vt=xt.stylize("[Getter/Setter]","special"):vt=xt.stylize("[Getter]","special"):kt.set&&(vt=xt.stylize("[Setter]","special")),yt(ft,ut)||(mt="["+ut+"]"),vt||(xt.seen.indexOf(kt.value)<0?(je(dt)?vt=z(xt,kt.value,null):vt=z(xt,kt.value,dt-1),vt.indexOf(`
`)>-1&&(Et?vt=vt.split(`
`).map(function(pt){return" "+pt}).join(`
`).substr(2):vt=`
`+vt.split(`
`).map(function(pt){return" "+pt}).join(`
`))):vt=xt.stylize("[Circular]","special")),Re(mt)){if(Et&&ut.match(/^\d+$/))return vt;mt=JSON.stringify(""+ut),mt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(mt=mt.substr(1,mt.length-2),mt=xt.stylize(mt,"name")):(mt=mt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),mt=xt.stylize(mt,"string"))}return mt+": "+vt}function ue(xt,wt,dt){var ft=0,ut=xt.reduce(function(Et,mt){return ft++,mt.indexOf(`
`)>=0&&ft++,Et+mt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ut>60?dt[0]+(wt===""?"":wt+`
`)+" "+xt.join(`,
`)+" "+dt[1]:dt[0]+wt+" "+xt.join(", ")+" "+dt[1]}function ge(xt){return Array.isArray(xt)}De.isArray=ge;function Pe(xt){return typeof xt=="boolean"}De.isBoolean=Pe;function je(xt){return xt===null}De.isNull=je;function Be(xt){return xt==null}De.isNullOrUndefined=Be;function Fe(xt){return typeof xt=="number"}De.isNumber=Fe;function Ne(xt){return typeof xt=="string"}De.isString=Ne;function Ae(xt){return typeof xt=="symbol"}De.isSymbol=Ae;function Re(xt){return xt===void 0}De.isUndefined=Re;function We(xt){return Ye(xt)&&ct(xt)==="[object RegExp]"}De.isRegExp=We;function Ye(xt){return typeof xt=="object"&&xt!==null}De.isObject=Ye;function Ue(xt){return Ye(xt)&&ct(xt)==="[object Date]"}De.isDate=Ue;function Ve(xt){return Ye(xt)&&(ct(xt)==="[object Error]"||xt instanceof Error)}De.isError=Ve;function ot(xt){return typeof xt=="function"}De.isFunction=ot;function st(xt){return xt===null||typeof xt=="boolean"||typeof xt=="number"||typeof xt=="string"||typeof xt=="symbol"||typeof xt=="undefined"}De.isPrimitive=st,De.isBuffer=oe("./support/isBuffer");function ct(xt){return Object.prototype.toString.call(xt)}function Pt(xt){return xt<10?"0"+xt.toString(10):xt.toString(10)}var $e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(){var xt=new Date,wt=[Pt(xt.getHours()),Pt(xt.getMinutes()),Pt(xt.getSeconds())].join(":");return[xt.getDate(),$e[xt.getMonth()],wt].join(" ")}De.log=function(){console.log("%s - %s",nt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(xt,wt){if(!wt||!Ye(wt))return xt;for(var dt=Object.keys(wt),ft=dt.length;ft--;)xt[dt[ft]]=wt[dt[ft]];return xt};function yt(xt,wt){return Object.prototype.hasOwnProperty.call(xt,wt)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],ke=typeof globalThis=="undefined"?fe:globalThis;ze.exports=function(){for(var Se=[],Le=0;Le<me.length;Le++)typeof ke[me[Le]]=="function"&&(Se[Se.length]=me[Le]);return Se}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,ze,De){"use strict";De.byteLength=we,De.toByteArray=z,De.fromByteArray=ie;for(var fe=[],me=[],ke=typeof Uint8Array!="undefined"?Uint8Array:Array,Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Le=Ce.length;Se<Le;++Se)fe[Se]=Ce[Se],me[Ce.charCodeAt(Se)]=Se;me[45]=62,me[95]=63;function ve(le){var ue=le.length;if(ue%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ge=le.indexOf("=");ge===-1&&(ge=ue);var Pe=ge===ue?0:4-ge%4;return[ge,Pe]}function we(le){var ue=ve(le),ge=ue[0],Pe=ue[1];return(ge+Pe)*3/4-Pe}function de(le,ue,ge){return(ue+ge)*3/4-ge}function z(le){var ue,ge=ve(le),Pe=ge[0],je=ge[1],Be=new ke(de(le,Pe,je)),Fe=0,Ne=je>0?Pe-4:Pe,Ae;for(Ae=0;Ae<Ne;Ae+=4)ue=me[le.charCodeAt(Ae)]<<18|me[le.charCodeAt(Ae+1)]<<12|me[le.charCodeAt(Ae+2)]<<6|me[le.charCodeAt(Ae+3)],Be[Fe++]=ue>>16&255,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255;return je===2&&(ue=me[le.charCodeAt(Ae)]<<2|me[le.charCodeAt(Ae+1)]>>4,Be[Fe++]=ue&255),je===1&&(ue=me[le.charCodeAt(Ae)]<<10|me[le.charCodeAt(Ae+1)]<<4|me[le.charCodeAt(Ae+2)]>>2,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255),Be}function ee(le){return fe[le>>18&63]+fe[le>>12&63]+fe[le>>6&63]+fe[le&63]}function ae(le,ue,ge){for(var Pe,je=[],Be=ue;Be<ge;Be+=3)Pe=(le[Be]<<16&16711680)+(le[Be+1]<<8&65280)+(le[Be+2]&255),je.push(ee(Pe));return je.join("")}function ie(le){for(var ue,ge=le.length,Pe=ge%3,je=[],Be=16383,Fe=0,Ne=ge-Pe;Fe<Ne;Fe+=Be)je.push(ae(le,Fe,Fe+Be>Ne?Ne:Fe+Be));return Pe===1?(ue=le[ge-1],je.push(fe[ue>>2]+fe[ue<<4&63]+"==")):Pe===2&&(ue=(le[ge-2]<<8)+le[ge-1],je.push(fe[ue>>10]+fe[ue>>4&63]+fe[ue<<2&63]+"=")),je.join("")}},{}],88:[function(oe,ze,De){(function(fe,me,ke){typeof ze!="undefined"&&ze.exports?ze.exports=ke():typeof at=="function"&&at.amd?at(me,ke):fe[me]=ke()})(this,"bowser",function(){var fe=!0;function me(de){function z(wt){var dt=de.match(wt);return dt&&dt.length>1&&dt[1]||""}function ee(wt){var dt=de.match(wt);return dt&&dt.length>1&&dt[2]||""}var ae=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),le=!ie&&/android/i.test(de),ue=/nexus\s*[0-6]\s*/i.test(de),ge=!ue&&/nexus\s*[0-9]+/i.test(de),Pe=/CrOS/.test(de),je=/silk/i.test(de),Be=/sailfish/i.test(de),Fe=/tizen/i.test(de),Ne=/(web|hpw)(o|0)s/i.test(de),Ae=/windows phone/i.test(de),Re=/SamsungBrowser/i.test(de),We=!Ae&&/windows/i.test(de),Ye=!ae&&!je&&/macintosh/i.test(de),Ue=!le&&!Be&&!Fe&&!Ne&&/linux/i.test(de),Ve=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),st=/tablet/i.test(de)&&!/tablet pc/i.test(de),ct=!st&&/[^-]mobi/i.test(de),Pt=/xbox/i.test(de),$e;/opera/i.test(de)?$e={name:"Opera",opera:fe,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?$e={name:"Opera",opera:fe,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(de)?$e={name:"Samsung Internet for Android",samsungBrowser:fe,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(de)?$e={name:"NAVER Whale browser",whale:fe,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(de)?$e={name:"MZ Browser",mzbrowser:fe,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(de)?$e={name:"Opera Coast",coast:fe,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(de)?$e={name:"Focus",focus:fe,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(de)?$e={name:"Yandex Browser",yandexbrowser:fe,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?$e={name:"UC Browser",ucbrowser:fe,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?$e={name:"Maxthon",maxthon:fe,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?$e={name:"Epiphany",epiphany:fe,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?$e={name:"Puffin",puffin:fe,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?$e={name:"Sleipnir",sleipnir:fe,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?$e={name:"K-Meleon",kMeleon:fe,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ae?($e={name:"Windows Phone",osname:"Windows Phone",windowsphone:fe},Ve?($e.msedge=fe,$e.version=Ve):($e.msie=fe,$e.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?$e={name:"Internet Explorer",msie:fe,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Pe?$e={name:"Chrome",osname:"Chrome OS",chromeos:fe,chromeBook:fe,chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?$e={name:"Microsoft Edge",msedge:fe,version:Ve}:/vivaldi/i.test(de)?$e={name:"Vivaldi",vivaldi:fe,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:Be?$e={name:"Sailfish",osname:"Sailfish OS",sailfish:fe,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?$e={name:"SeaMonkey",seamonkey:fe,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?($e={name:"Firefox",firefox:fe,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&($e.firefoxos=fe,$e.osname="Firefox OS")):je?$e={name:"Amazon Silk",silk:fe,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?$e={name:"PhantomJS",phantom:fe,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?$e={name:"SlimerJS",slimer:fe,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?$e={name:"BlackBerry",osname:"BlackBerry OS",blackberry:fe,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ne?($e={name:"WebOS",osname:"WebOS",webos:fe,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&($e.touchpad=fe)):/bada/i.test(de)?$e={name:"Bada",osname:"Bada",bada:fe,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?$e={name:"Tizen",osname:"Tizen",tizen:fe,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(de)?$e={name:"QupZilla",qupzilla:fe,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(de)?$e={name:"Chromium",chromium:fe,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(de)?$e={name:"Chrome",chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?$e={name:"Android",version:ot}:/safari|applewebkit/i.test(de)?($e={name:"Safari",safari:fe},ot&&($e.version=ot)):ae?($e={name:ae=="iphone"?"iPhone":ae=="ipad"?"iPad":"iPod"},ot&&($e.version=ot)):/googlebot/i.test(de)?$e={name:"Googlebot",googlebot:fe,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:$e={name:z(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!$e.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?($e.name=$e.name||"Blink",$e.blink=fe):($e.name=$e.name||"Webkit",$e.webkit=fe),!$e.version&&ot&&($e.version=ot)):!$e.opera&&/gecko\//i.test(de)&&($e.name=$e.name||"Gecko",$e.gecko=fe,$e.version=$e.version||z(/gecko\/(\d+(\.\d+)?)/i)),!$e.windowsphone&&(le||$e.silk)?($e.android=fe,$e.osname="Android"):!$e.windowsphone&&ae?($e[ae]=fe,$e.ios=fe,$e.osname="iOS"):Ye?($e.mac=fe,$e.osname="macOS"):Pt?($e.xbox=fe,$e.osname="Xbox"):We?($e.windows=fe,$e.osname="Windows"):Ue&&($e.linux=fe,$e.osname="Linux");function nt(wt){switch(wt){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 yt="";$e.windows?yt=nt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):$e.windowsphone?yt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):$e.mac?(yt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),yt=yt.replace(/[_\s]/g,".")):ae?(yt=z(/os (\d+([_\s]\d+)*) like mac os x/i),yt=yt.replace(/[_\s]/g,".")):le?yt=z(/android[ \/-](\d+(\.\d+)*)/i):$e.webos?yt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):$e.blackberry?yt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):$e.bada?yt=z(/bada\/(\d+(\.\d+)*)/i):$e.tizen&&(yt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),yt&&($e.osversion=yt);var xt=!$e.windows&&yt.split(".")[0];return st||ge||ae=="ipad"||le&&(xt==3||xt>=4&&!ct)||$e.silk?$e.tablet=fe:(ct||ae=="iphone"||ae=="ipod"||le||ue||$e.blackberry||$e.webos||$e.bada)&&($e.mobile=fe),$e.msedge||$e.msie&&$e.version>=10||$e.yandexbrowser&&$e.version>=15||$e.vivaldi&&$e.version>=1||$e.chrome&&$e.version>=20||$e.samsungBrowser&&$e.version>=4||$e.whale&&Le([$e.version,"1.0"])===1||$e.mzbrowser&&Le([$e.version,"6.0"])===1||$e.focus&&Le([$e.version,"1.0"])===1||$e.firefox&&$e.version>=20||$e.safari&&$e.version>=6||$e.opera&&$e.version>=10||$e.ios&&$e.osversion&&$e.osversion.split(".")[0]>=6||$e.blackberry&&$e.version>=10.1||$e.chromium&&$e.version>=20?$e.a=fe:$e.msie&&$e.version<10||$e.chrome&&$e.version<20||$e.firefox&&$e.version<20||$e.safari&&$e.version<6||$e.opera&&$e.version<10||$e.ios&&$e.osversion&&$e.osversion.split(".")[0]<6||$e.chromium&&$e.version<20?$e.c=fe:$e.x=fe,$e}var ke=me(typeof navigator!="undefined"&&navigator.userAgent||"");ke.test=function(de){for(var z=0;z<de.length;++z){var ee=de[z];if(typeof ee=="string"&&ee in ke)return!0}return!1};function Ce(de){return de.split(".").length}function Se(de,z){var ee=[],ae;if(Array.prototype.map)return Array.prototype.map.call(de,z);for(ae=0;ae<de.length;ae++)ee.push(z(de[ae]));return ee}function Le(de){for(var z=Math.max(Ce(de[0]),Ce(de[1])),ee=Se(de,function(ae){var ie=z-Ce(ae);return ae=ae+new Array(ie+1).join(".0"),Se(ae.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(ee[0][z]>ee[1][z])return 1;if(ee[0][z]===ee[1][z]){if(z===0)return 0}else return-1}}function ve(de,z,ee){var ae=ke;typeof z=="string"&&(ee=z,z=void 0),z===void 0&&(z=!1),ee&&(ae=me(ee));var ie=""+ae.version;for(var le in de)if(de.hasOwnProperty(le)&&ae[le]){if(typeof de[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(de));return Le([ie,de[le]])<0}return z}function we(de,z,ee){return!ve(de,z,ee)}return ke.isUnsupportedBrowser=ve,ke.compareVersions=Le,ke.check=we,ke._detect=me,ke.detect=me,ke})},{}],89:[function(oe,ze,De){},{}],90:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("base64-js"),ke=oe("ieee754");De.Buffer=ve,De.SlowBuffer=Pe,De.INSPECT_MAX_BYTES=50;var Ce=2147483647;De.kMaxLength=Ce,ve.TYPED_ARRAY_SUPPORT=Se(),!ve.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Se(){try{var _e=new Uint8Array(1);return _e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},_e.foo()===42}catch(He){return!1}}Object.defineProperty(ve.prototype,"parent",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.buffer}}),Object.defineProperty(ve.prototype,"offset",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.byteOffset}});function Le(_e){if(_e>Ce)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var He=new Uint8Array(_e);return He.__proto__=ve.prototype,He}function ve(_e,He,rt){if(typeof _e=="number"){if(typeof He=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(_e)}return we(_e,He,rt)}typeof Symbol!="undefined"&&Symbol.species!=null&&ve[Symbol.species]===ve&&Object.defineProperty(ve,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),ve.poolSize=8192;function we(_e,He,rt){if(typeof _e=="string")return ae(_e,He);if(ArrayBuffer.isView(_e))return ie(_e);if(_e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(tt(_e,ArrayBuffer)||_e&&tt(_e.buffer,ArrayBuffer))return le(_e,He,rt);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var St=_e.valueOf&&_e.valueOf();if(St!=null&&St!==_e)return ve.from(St,He,rt);var Ct=ue(_e);if(Ct)return Ct;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return ve.from(_e[Symbol.toPrimitive]("string"),He,rt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e)}ve.from=function(_e,He,rt){return we(_e,He,rt)},ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array;function de(_e){if(typeof _e!="number")throw new TypeError('"size" argument must be of type number');if(_e<0)throw new RangeError('The value "'+_e+'" is invalid for option "size"')}function z(_e,He,rt){return de(_e),_e<=0?Le(_e):He!==void 0?typeof rt=="string"?Le(_e).fill(He,rt):Le(_e).fill(He):Le(_e)}ve.alloc=function(_e,He,rt){return z(_e,He,rt)};function ee(_e){return de(_e),Le(_e<0?0:ge(_e)|0)}ve.allocUnsafe=function(_e){return ee(_e)},ve.allocUnsafeSlow=function(_e){return ee(_e)};function ae(_e,He){if((typeof He!="string"||He==="")&&(He="utf8"),!ve.isEncoding(He))throw new TypeError("Unknown encoding: "+He);var rt=je(_e,He)|0,St=Le(rt),Ct=St.write(_e,He);return Ct!==rt&&(St=St.slice(0,Ct)),St}function ie(_e){for(var He=_e.length<0?0:ge(_e.length)|0,rt=Le(He),St=0;St<He;St+=1)rt[St]=_e[St]&255;return rt}function le(_e,He,rt){if(He<0||_e.byteLength<He)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<He+(rt||0))throw new RangeError('"length" is outside of buffer bounds');var St;return He===void 0&&rt===void 0?St=new Uint8Array(_e):rt===void 0?St=new Uint8Array(_e,He):St=new Uint8Array(_e,He,rt),St.__proto__=ve.prototype,St}function ue(_e){if(ve.isBuffer(_e)){var He=ge(_e.length)|0,rt=Le(He);return rt.length===0||_e.copy(rt,0,0,He),rt}if(_e.length!==void 0)return typeof _e.length!="number"||Ie(_e.length)?Le(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function ge(_e){if(_e>=Ce)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce.toString(16)+" bytes");return _e|0}function Pe(_e){return+_e!=_e&&(_e=0),ve.alloc(+_e)}ve.isBuffer=function(He){return He!=null&&He._isBuffer===!0&&He!==ve.prototype},ve.compare=function(He,rt){if(tt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),tt(rt,Uint8Array)&&(rt=ve.from(rt,rt.offset,rt.byteLength)),!ve.isBuffer(He)||!ve.isBuffer(rt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(He===rt)return 0;for(var St=He.length,Ct=rt.length,Nt=0,Ot=Math.min(St,Ct);Nt<Ot;++Nt)if(He[Nt]!==rt[Nt]){St=He[Nt],Ct=rt[Nt];break}return St<Ct?-1:Ct<St?1:0},ve.isEncoding=function(He){switch(String(He).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}},ve.concat=function(He,rt){if(!Array.isArray(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return ve.alloc(0);var St;if(rt===void 0)for(rt=0,St=0;St<He.length;++St)rt+=He[St].length;var Ct=ve.allocUnsafe(rt),Nt=0;for(St=0;St<He.length;++St){var Ot=He[St];if(tt(Ot,Uint8Array)&&(Ot=ve.from(Ot)),!ve.isBuffer(Ot))throw new TypeError('"list" argument must be an Array of Buffers');Ot.copy(Ct,Nt),Nt+=Ot.length}return Ct};function je(_e,He){if(ve.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||tt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var rt=_e.length,St=arguments.length>2&&arguments[2]===!0;if(!St&&rt===0)return 0;for(var Ct=!1;;)switch(He){case"ascii":case"latin1":case"binary":return rt;case"utf8":case"utf-8":return Qe(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt*2;case"hex":return rt>>>1;case"base64":return Me(_e).length;default:if(Ct)return St?-1:Qe(_e).length;He=(""+He).toLowerCase(),Ct=!0}}ve.byteLength=je;function Be(_e,He,rt){var St=!1;if((He===void 0||He<0)&&(He=0),He>this.length||((rt===void 0||rt>this.length)&&(rt=this.length),rt<=0)||(rt>>>=0,He>>>=0,rt<=He))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return xt(this,He,rt);case"utf8":case"utf-8":return ct(this,He,rt);case"ascii":return nt(this,He,rt);case"latin1":case"binary":return yt(this,He,rt);case"base64":return st(this,He,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,He,rt);default:if(St)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),St=!0}}ve.prototype._isBuffer=!0;function Fe(_e,He,rt){var St=_e[He];_e[He]=_e[rt],_e[rt]=St}ve.prototype.swap16=function(){var He=this.length;if(He%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var rt=0;rt<He;rt+=2)Fe(this,rt,rt+1);return this},ve.prototype.swap32=function(){var He=this.length;if(He%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var rt=0;rt<He;rt+=4)Fe(this,rt,rt+3),Fe(this,rt+1,rt+2);return this},ve.prototype.swap64=function(){var He=this.length;if(He%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var rt=0;rt<He;rt+=8)Fe(this,rt,rt+7),Fe(this,rt+1,rt+6),Fe(this,rt+2,rt+5),Fe(this,rt+3,rt+4);return this},ve.prototype.toString=function(){var He=this.length;return He===0?"":arguments.length===0?ct(this,0,He):Be.apply(this,arguments)},ve.prototype.toLocaleString=ve.prototype.toString,ve.prototype.equals=function(He){if(!ve.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He?!0:ve.compare(this,He)===0},ve.prototype.inspect=function(){var He="",rt=De.INSPECT_MAX_BYTES;return He=this.toString("hex",0,rt).replace(/(.{2})/g,"$1 ").trim(),this.length>rt&&(He+=" ... "),"<Buffer "+He+">"},ve.prototype.compare=function(He,rt,St,Ct,Nt){if(tt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),!ve.isBuffer(He))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof He);if(rt===void 0&&(rt=0),St===void 0&&(St=He?He.length:0),Ct===void 0&&(Ct=0),Nt===void 0&&(Nt=this.length),rt<0||St>He.length||Ct<0||Nt>this.length)throw new RangeError("out of range index");if(Ct>=Nt&&rt>=St)return 0;if(Ct>=Nt)return-1;if(rt>=St)return 1;if(rt>>>=0,St>>>=0,Ct>>>=0,Nt>>>=0,this===He)return 0;for(var Ot=Nt-Ct,Rt=St-rt,$t=Math.min(Ot,Rt),qt=this.slice(Ct,Nt),rn=He.slice(rt,St),Ht=0;Ht<$t;++Ht)if(qt[Ht]!==rn[Ht]){Ot=qt[Ht],Rt=rn[Ht];break}return Ot<Rt?-1:Rt<Ot?1:0};function Ne(_e,He,rt,St,Ct){if(_e.length===0)return-1;if(typeof rt=="string"?(St=rt,rt=0):rt>2147483647?rt=2147483647:rt<-2147483648&&(rt=-2147483648),rt=+rt,Ie(rt)&&(rt=Ct?0:_e.length-1),rt<0&&(rt=_e.length+rt),rt>=_e.length){if(Ct)return-1;rt=_e.length-1}else if(rt<0)if(Ct)rt=0;else return-1;if(typeof He=="string"&&(He=ve.from(He,St)),ve.isBuffer(He))return He.length===0?-1:Ae(_e,He,rt,St,Ct);if(typeof He=="number")return He=He&255,typeof Uint8Array.prototype.indexOf=="function"?Ct?Uint8Array.prototype.indexOf.call(_e,He,rt):Uint8Array.prototype.lastIndexOf.call(_e,He,rt):Ae(_e,[He],rt,St,Ct);throw new TypeError("val must be string, number or Buffer")}function Ae(_e,He,rt,St,Ct){var Nt=1,Ot=_e.length,Rt=He.length;if(St!==void 0&&(St=String(St).toLowerCase(),St==="ucs2"||St==="ucs-2"||St==="utf16le"||St==="utf-16le")){if(_e.length<2||He.length<2)return-1;Nt=2,Ot/=2,Rt/=2,rt/=2}function $t(tn,Ut){return Nt===1?tn[Ut]:tn.readUInt16BE(Ut*Nt)}var qt;if(Ct){var rn=-1;for(qt=rt;qt<Ot;qt++)if($t(_e,qt)===$t(He,rn===-1?0:qt-rn)){if(rn===-1&&(rn=qt),qt-rn+1===Rt)return rn*Nt}else rn!==-1&&(qt-=qt-rn),rn=-1}else for(rt+Rt>Ot&&(rt=Ot-Rt),qt=rt;qt>=0;qt--){for(var Ht=!0,sn=0;sn<Rt;sn++)if($t(_e,qt+sn)!==$t(He,sn)){Ht=!1;break}if(Ht)return qt}return-1}ve.prototype.includes=function(He,rt,St){return this.indexOf(He,rt,St)!==-1},ve.prototype.indexOf=function(He,rt,St){return Ne(this,He,rt,St,!0)},ve.prototype.lastIndexOf=function(He,rt,St){return Ne(this,He,rt,St,!1)};function Re(_e,He,rt,St){rt=Number(rt)||0;var Ct=_e.length-rt;St?(St=Number(St),St>Ct&&(St=Ct)):St=Ct;var Nt=He.length;St>Nt/2&&(St=Nt/2);for(var Ot=0;Ot<St;++Ot){var Rt=parseInt(He.substr(Ot*2,2),16);if(Ie(Rt))return Ot;_e[rt+Ot]=Rt}return Ot}function We(_e,He,rt,St){return Ze(Qe(He,_e.length-rt),_e,rt,St)}function Ye(_e,He,rt,St){return Ze(Ke(He),_e,rt,St)}function Ue(_e,He,rt,St){return Ye(_e,He,rt,St)}function Ve(_e,He,rt,St){return Ze(Me(He),_e,rt,St)}function ot(_e,He,rt,St){return Ze(xe(He,_e.length-rt),_e,rt,St)}ve.prototype.write=function(He,rt,St,Ct){if(rt===void 0)Ct="utf8",St=this.length,rt=0;else if(St===void 0&&typeof rt=="string")Ct=rt,St=this.length,rt=0;else if(isFinite(rt))rt=rt>>>0,isFinite(St)?(St=St>>>0,Ct===void 0&&(Ct="utf8")):(Ct=St,St=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Nt=this.length-rt;if((St===void 0||St>Nt)&&(St=Nt),He.length>0&&(St<0||rt<0)||rt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ct||(Ct="utf8");for(var Ot=!1;;)switch(Ct){case"hex":return Re(this,He,rt,St);case"utf8":case"utf-8":return We(this,He,rt,St);case"ascii":return Ye(this,He,rt,St);case"latin1":case"binary":return Ue(this,He,rt,St);case"base64":return Ve(this,He,rt,St);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,He,rt,St);default:if(Ot)throw new TypeError("Unknown encoding: "+Ct);Ct=(""+Ct).toLowerCase(),Ot=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function st(_e,He,rt){return He===0&&rt===_e.length?me.fromByteArray(_e):me.fromByteArray(_e.slice(He,rt))}function ct(_e,He,rt){rt=Math.min(_e.length,rt);for(var St=[],Ct=He;Ct<rt;){var Nt=_e[Ct],Ot=null,Rt=Nt>239?4:Nt>223?3:Nt>191?2:1;if(Ct+Rt<=rt){var $t,qt,rn,Ht;switch(Rt){case 1:Nt<128&&(Ot=Nt);break;case 2:$t=_e[Ct+1],($t&192)===128&&(Ht=(Nt&31)<<6|$t&63,Ht>127&&(Ot=Ht));break;case 3:$t=_e[Ct+1],qt=_e[Ct+2],($t&192)===128&&(qt&192)===128&&(Ht=(Nt&15)<<12|($t&63)<<6|qt&63,Ht>2047&&(Ht<55296||Ht>57343)&&(Ot=Ht));break;case 4:$t=_e[Ct+1],qt=_e[Ct+2],rn=_e[Ct+3],($t&192)===128&&(qt&192)===128&&(rn&192)===128&&(Ht=(Nt&15)<<18|($t&63)<<12|(qt&63)<<6|rn&63,Ht>65535&&Ht<1114112&&(Ot=Ht))}}Ot===null?(Ot=65533,Rt=1):Ot>65535&&(Ot-=65536,St.push(Ot>>>10&1023|55296),Ot=56320|Ot&1023),St.push(Ot),Ct+=Rt}return $e(St)}var Pt=4096;function $e(_e){var He=_e.length;if(He<=Pt)return String.fromCharCode.apply(String,_e);for(var rt="",St=0;St<He;)rt+=String.fromCharCode.apply(String,_e.slice(St,St+=Pt));return rt}function nt(_e,He,rt){var St="";rt=Math.min(_e.length,rt);for(var Ct=He;Ct<rt;++Ct)St+=String.fromCharCode(_e[Ct]&127);return St}function yt(_e,He,rt){var St="";rt=Math.min(_e.length,rt);for(var Ct=He;Ct<rt;++Ct)St+=String.fromCharCode(_e[Ct]);return St}function xt(_e,He,rt){var St=_e.length;(!He||He<0)&&(He=0),(!rt||rt<0||rt>St)&&(rt=St);for(var Ct="",Nt=He;Nt<rt;++Nt)Ct+=pt(_e[Nt]);return Ct}function wt(_e,He,rt){for(var St=_e.slice(He,rt),Ct="",Nt=0;Nt<St.length;Nt+=2)Ct+=String.fromCharCode(St[Nt]+St[Nt+1]*256);return Ct}ve.prototype.slice=function(He,rt){var St=this.length;He=~~He,rt=rt===void 0?St:~~rt,He<0?(He+=St,He<0&&(He=0)):He>St&&(He=St),rt<0?(rt+=St,rt<0&&(rt=0)):rt>St&&(rt=St),rt<He&&(rt=He);var Ct=this.subarray(He,rt);return Ct.__proto__=ve.prototype,Ct};function dt(_e,He,rt){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+He>rt)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(He,rt,St){He=He>>>0,rt=rt>>>0,St||dt(He,rt,this.length);for(var Ct=this[He],Nt=1,Ot=0;++Ot<rt&&(Nt*=256);)Ct+=this[He+Ot]*Nt;return Ct},ve.prototype.readUIntBE=function(He,rt,St){He=He>>>0,rt=rt>>>0,St||dt(He,rt,this.length);for(var Ct=this[He+--rt],Nt=1;rt>0&&(Nt*=256);)Ct+=this[He+--rt]*Nt;return Ct},ve.prototype.readUInt8=function(He,rt){return He=He>>>0,rt||dt(He,1,this.length),this[He]},ve.prototype.readUInt16LE=function(He,rt){return He=He>>>0,rt||dt(He,2,this.length),this[He]|this[He+1]<<8},ve.prototype.readUInt16BE=function(He,rt){return He=He>>>0,rt||dt(He,2,this.length),this[He]<<8|this[He+1]},ve.prototype.readUInt32LE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),(this[He]|this[He+1]<<8|this[He+2]<<16)+this[He+3]*16777216},ve.prototype.readUInt32BE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),this[He]*16777216+(this[He+1]<<16|this[He+2]<<8|this[He+3])},ve.prototype.readIntLE=function(He,rt,St){He=He>>>0,rt=rt>>>0,St||dt(He,rt,this.length);for(var Ct=this[He],Nt=1,Ot=0;++Ot<rt&&(Nt*=256);)Ct+=this[He+Ot]*Nt;return Nt*=128,Ct>=Nt&&(Ct-=Math.pow(2,8*rt)),Ct},ve.prototype.readIntBE=function(He,rt,St){He=He>>>0,rt=rt>>>0,St||dt(He,rt,this.length);for(var Ct=rt,Nt=1,Ot=this[He+--Ct];Ct>0&&(Nt*=256);)Ot+=this[He+--Ct]*Nt;return Nt*=128,Ot>=Nt&&(Ot-=Math.pow(2,8*rt)),Ot},ve.prototype.readInt8=function(He,rt){return He=He>>>0,rt||dt(He,1,this.length),this[He]&128?(255-this[He]+1)*-1:this[He]},ve.prototype.readInt16LE=function(He,rt){He=He>>>0,rt||dt(He,2,this.length);var St=this[He]|this[He+1]<<8;return St&32768?St|4294901760:St},ve.prototype.readInt16BE=function(He,rt){He=He>>>0,rt||dt(He,2,this.length);var St=this[He+1]|this[He]<<8;return St&32768?St|4294901760:St},ve.prototype.readInt32LE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),this[He]|this[He+1]<<8|this[He+2]<<16|this[He+3]<<24},ve.prototype.readInt32BE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),this[He]<<24|this[He+1]<<16|this[He+2]<<8|this[He+3]},ve.prototype.readFloatLE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),ke.read(this,He,!0,23,4)},ve.prototype.readFloatBE=function(He,rt){return He=He>>>0,rt||dt(He,4,this.length),ke.read(this,He,!1,23,4)},ve.prototype.readDoubleLE=function(He,rt){return He=He>>>0,rt||dt(He,8,this.length),ke.read(this,He,!0,52,8)},ve.prototype.readDoubleBE=function(He,rt){return He=He>>>0,rt||dt(He,8,this.length),ke.read(this,He,!1,52,8)};function ft(_e,He,rt,St,Ct,Nt){if(!ve.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>Ct||He<Nt)throw new RangeError('"value" argument is out of bounds');if(rt+St>_e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(He,rt,St,Ct){if(He=+He,rt=rt>>>0,St=St>>>0,!Ct){var Nt=Math.pow(2,8*St)-1;ft(this,He,rt,St,Nt,0)}var Ot=1,Rt=0;for(this[rt]=He&255;++Rt<St&&(Ot*=256);)this[rt+Rt]=He/Ot&255;return rt+St},ve.prototype.writeUIntBE=function(He,rt,St,Ct){if(He=+He,rt=rt>>>0,St=St>>>0,!Ct){var Nt=Math.pow(2,8*St)-1;ft(this,He,rt,St,Nt,0)}var Ot=St-1,Rt=1;for(this[rt+Ot]=He&255;--Ot>=0&&(Rt*=256);)this[rt+Ot]=He/Rt&255;return rt+St},ve.prototype.writeUInt8=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,1,255,0),this[rt]=He&255,rt+1},ve.prototype.writeUInt16LE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,2,65535,0),this[rt]=He&255,this[rt+1]=He>>>8,rt+2},ve.prototype.writeUInt16BE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,2,65535,0),this[rt]=He>>>8,this[rt+1]=He&255,rt+2},ve.prototype.writeUInt32LE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,4,4294967295,0),this[rt+3]=He>>>24,this[rt+2]=He>>>16,this[rt+1]=He>>>8,this[rt]=He&255,rt+4},ve.prototype.writeUInt32BE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,4,4294967295,0),this[rt]=He>>>24,this[rt+1]=He>>>16,this[rt+2]=He>>>8,this[rt+3]=He&255,rt+4},ve.prototype.writeIntLE=function(He,rt,St,Ct){if(He=+He,rt=rt>>>0,!Ct){var Nt=Math.pow(2,8*St-1);ft(this,He,rt,St,Nt-1,-Nt)}var Ot=0,Rt=1,$t=0;for(this[rt]=He&255;++Ot<St&&(Rt*=256);)He<0&&$t===0&&this[rt+Ot-1]!==0&&($t=1),this[rt+Ot]=(He/Rt>>0)-$t&255;return rt+St},ve.prototype.writeIntBE=function(He,rt,St,Ct){if(He=+He,rt=rt>>>0,!Ct){var Nt=Math.pow(2,8*St-1);ft(this,He,rt,St,Nt-1,-Nt)}var Ot=St-1,Rt=1,$t=0;for(this[rt+Ot]=He&255;--Ot>=0&&(Rt*=256);)He<0&&$t===0&&this[rt+Ot+1]!==0&&($t=1),this[rt+Ot]=(He/Rt>>0)-$t&255;return rt+St},ve.prototype.writeInt8=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,1,127,-128),He<0&&(He=255+He+1),this[rt]=He&255,rt+1},ve.prototype.writeInt16LE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,2,32767,-32768),this[rt]=He&255,this[rt+1]=He>>>8,rt+2},ve.prototype.writeInt16BE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,2,32767,-32768),this[rt]=He>>>8,this[rt+1]=He&255,rt+2},ve.prototype.writeInt32LE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,4,2147483647,-2147483648),this[rt]=He&255,this[rt+1]=He>>>8,this[rt+2]=He>>>16,this[rt+3]=He>>>24,rt+4},ve.prototype.writeInt32BE=function(He,rt,St){return He=+He,rt=rt>>>0,St||ft(this,He,rt,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),this[rt]=He>>>24,this[rt+1]=He>>>16,this[rt+2]=He>>>8,this[rt+3]=He&255,rt+4};function ut(_e,He,rt,St,Ct,Nt){if(rt+St>_e.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("Index out of range")}function Et(_e,He,rt,St,Ct){return He=+He,rt=rt>>>0,Ct||ut(_e,He,rt,4,34028234663852886e22,-34028234663852886e22),ke.write(_e,He,rt,St,23,4),rt+4}ve.prototype.writeFloatLE=function(He,rt,St){return Et(this,He,rt,!0,St)},ve.prototype.writeFloatBE=function(He,rt,St){return Et(this,He,rt,!1,St)};function mt(_e,He,rt,St,Ct){return He=+He,rt=rt>>>0,Ct||ut(_e,He,rt,8,17976931348623157e292,-17976931348623157e292),ke.write(_e,He,rt,St,52,8),rt+8}ve.prototype.writeDoubleLE=function(He,rt,St){return mt(this,He,rt,!0,St)},ve.prototype.writeDoubleBE=function(He,rt,St){return mt(this,He,rt,!1,St)},ve.prototype.copy=function(He,rt,St,Ct){if(!ve.isBuffer(He))throw new TypeError("argument should be a Buffer");if(St||(St=0),!Ct&&Ct!==0&&(Ct=this.length),rt>=He.length&&(rt=He.length),rt||(rt=0),Ct>0&&Ct<St&&(Ct=St),Ct===St||He.length===0||this.length===0)return 0;if(rt<0)throw new RangeError("targetStart out of bounds");if(St<0||St>=this.length)throw new RangeError("Index out of range");if(Ct<0)throw new RangeError("sourceEnd out of bounds");Ct>this.length&&(Ct=this.length),He.length-rt<Ct-St&&(Ct=He.length-rt+St);var Nt=Ct-St;if(this===He&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(rt,St,Ct);else if(this===He&&St<rt&&rt<Ct)for(var Ot=Nt-1;Ot>=0;--Ot)He[Ot+rt]=this[Ot+St];else Uint8Array.prototype.set.call(He,this.subarray(St,Ct),rt);return Nt},ve.prototype.fill=function(He,rt,St,Ct){if(typeof He=="string"){if(typeof rt=="string"?(Ct=rt,rt=0,St=this.length):typeof St=="string"&&(Ct=St,St=this.length),Ct!==void 0&&typeof Ct!="string")throw new TypeError("encoding must be a string");if(typeof Ct=="string"&&!ve.isEncoding(Ct))throw new TypeError("Unknown encoding: "+Ct);if(He.length===1){var Nt=He.charCodeAt(0);(Ct==="utf8"&&Nt<128||Ct==="latin1")&&(He=Nt)}}else typeof He=="number"&&(He=He&255);if(rt<0||this.length<rt||this.length<St)throw new RangeError("Out of range index");if(St<=rt)return this;rt=rt>>>0,St=St===void 0?this.length:St>>>0,He||(He=0);var Ot;if(typeof He=="number")for(Ot=rt;Ot<St;++Ot)this[Ot]=He;else{var Rt=ve.isBuffer(He)?He:ve.from(He,Ct),$t=Rt.length;if($t===0)throw new TypeError('The value "'+He+'" is invalid for argument "value"');for(Ot=0;Ot<St-rt;++Ot)this[Ot+rt]=Rt[Ot%$t]}return this};var vt=/[^+/0-9A-Za-z-_]/g;function kt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(vt,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function pt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function Qe(_e,He){He=He||1/0;for(var rt,St=_e.length,Ct=null,Nt=[],Ot=0;Ot<St;++Ot){if(rt=_e.charCodeAt(Ot),rt>55295&&rt<57344){if(!Ct){if(rt>56319){(He-=3)>-1&&Nt.push(239,191,189);continue}else if(Ot+1===St){(He-=3)>-1&&Nt.push(239,191,189);continue}Ct=rt;continue}if(rt<56320){(He-=3)>-1&&Nt.push(239,191,189),Ct=rt;continue}rt=(Ct-55296<<10|rt-56320)+65536}else Ct&&(He-=3)>-1&&Nt.push(239,191,189);if(Ct=null,rt<128){if((He-=1)<0)break;Nt.push(rt)}else if(rt<2048){if((He-=2)<0)break;Nt.push(rt>>6|192,rt&63|128)}else if(rt<65536){if((He-=3)<0)break;Nt.push(rt>>12|224,rt>>6&63|128,rt&63|128)}else if(rt<1114112){if((He-=4)<0)break;Nt.push(rt>>18|240,rt>>12&63|128,rt>>6&63|128,rt&63|128)}else throw new Error("Invalid code point")}return Nt}function Ke(_e){for(var He=[],rt=0;rt<_e.length;++rt)He.push(_e.charCodeAt(rt)&255);return He}function xe(_e,He){for(var rt,St,Ct,Nt=[],Ot=0;Ot<_e.length&&!((He-=2)<0);++Ot)rt=_e.charCodeAt(Ot),St=rt>>8,Ct=rt%256,Nt.push(Ct),Nt.push(St);return Nt}function Me(_e){return me.toByteArray(kt(_e))}function Ze(_e,He,rt,St){for(var Ct=0;Ct<St&&!(Ct+rt>=He.length||Ct>=_e.length);++Ct)He[Ct+rt]=_e[Ct];return Ct}function tt(_e,He){return _e instanceof He||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===He.name}function Ie(_e){return _e!==_e}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,ze,De){ze.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(oe,ze,De){"use strict";var fe=oe("get-intrinsic"),me=oe("./"),ke=me(fe("String.prototype.indexOf"));ze.exports=function(Se,Le){var ve=fe(Se,!!Le);return typeof ve=="function"&&ke(Se,".prototype.")>-1?me(ve):ve}},{"./":93,"get-intrinsic":348}],93:[function(oe,ze,De){"use strict";var fe=oe("function-bind"),me=oe("get-intrinsic"),ke=me("%Function.prototype.apply%"),Ce=me("%Function.prototype.call%"),Se=me("%Reflect.apply%",!0)||fe.call(Ce,ke),Le=me("%Object.getOwnPropertyDescriptor%",!0),ve=me("%Object.defineProperty%",!0),we=me("%Math.max%");if(ve)try{ve({},"a",{value:1})}catch(z){ve=null}ze.exports=function(ee){var ae=Se(fe,Ce,arguments);if(Le&&ve){var ie=Le(ae,"length");ie.configurable&&ve(ae,"length",{value:1+we(0,ee.length-(arguments.length-1))})}return ae};var de=function(){return Se(fe,ke,arguments)};ve?ve(ze.exports,"apply",{value:de}):ze.exports.apply=de},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,ze,De){"use strict";var fe=Array.prototype.slice;ze.exports=me;function me(Ce,Se){if(!(this instanceof me))return new me(Ce,Se);this.src=Ce,this._withAccess=Se}me.prototype.withAccess=function(Ce){return this._withAccess=Ce!==!1,this},me.prototype.pick=function(Ce){return Array.isArray(Ce)||(Ce=fe.call(arguments)),Ce.length&&(this.keys=Ce),this},me.prototype.to=function(Ce){if(Ce=Ce||{},!this.src)return Ce;var Se=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Le=0;Le<Se.length;Le++)ve=Se[Le],Ce[ve]===void 0&&(Ce[ve]=this.src[ve]);return Ce}for(var Le=0;Le<Se.length;Le++){var ve=Se[Le];if(ke(Ce,ve)){var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}}return Ce},me.prototype.toCover=function(Ce){for(var Se=this.keys||Object.keys(this.src),Le=0;Le<Se.length;Le++){var ve=Se[Le];delete Ce[ve];var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}},me.prototype.override=me.prototype.toCover,me.prototype.and=function(Ce){var Se={};return this.to(Se),this.src=Ce,this.to(Se),this.src=Se,this};function ke(Ce,Se){return Ce[Se]===void 0&&Ce.__lookupGetter__(Se)===void 0&&Ce.__lookupSetter__(Se)===void 0}},{}],95:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-constructor"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=fe.String,Ce=fe.TypeError;ze.exports=function(Se){if(typeof Se=="object"||me(Se))return Se;throw Ce("Can't set "+ke(Se)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/object-create"),ke=oe("../internals/object-define-property"),Ce=fe("unscopables"),Se=Array.prototype;Se[Ce]==null&&ke.f(Se,Ce,{configurable:!0,value:me(null)}),ze.exports=function(Le){Se[Ce][Le]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,ze,De){"use strict";var fe=oe("../internals/string-multibyte").charAt;ze.exports=function(me,ke,Ce){return ke+(Ce?fe(me,ke).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/object-is-prototype-of"),ke=fe.TypeError;ze.exports=function(Ce,Se){if(me(Se,Ce))return Ce;throw ke("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.String,Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(oe,ze,De){ze.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-native"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/is-callable"),Se=oe("../internals/is-object"),Le=oe("../internals/has-own-property"),ve=oe("../internals/classof"),we=oe("../internals/try-to-string"),de=oe("../internals/create-non-enumerable-property"),z=oe("../internals/redefine"),ee=oe("../internals/object-define-property").f,ae=oe("../internals/object-is-prototype-of"),ie=oe("../internals/object-get-prototype-of"),le=oe("../internals/object-set-prototype-of"),ue=oe("../internals/well-known-symbol"),ge=oe("../internals/uid"),Pe=ke.Int8Array,je=Pe&&Pe.prototype,Be=ke.Uint8ClampedArray,Fe=Be&&Be.prototype,Ne=Pe&&ie(Pe),Ae=je&&ie(je),Re=Object.prototype,We=ke.TypeError,Ye=ue("toStringTag"),Ue=ge("TYPED_ARRAY_TAG"),Ve=ge("TYPED_ARRAY_CONSTRUCTOR"),ot=fe&&!!le&&ve(ke.opera)!=="Opera",st=!1,ct,Pt,$e,nt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},yt={BigInt64Array:8,BigUint64Array:8},xt=function(vt){if(!Se(vt))return!1;var kt=ve(vt);return kt==="DataView"||Le(nt,kt)||Le(yt,kt)},wt=function(mt){if(!Se(mt))return!1;var vt=ve(mt);return Le(nt,vt)||Le(yt,vt)},dt=function(mt){if(wt(mt))return mt;throw We("Target is not a typed array")},ft=function(mt){if(Ce(mt)&&(!le||ae(Ne,mt)))return mt;throw We(we(mt)+" is not a typed array constructor")},ut=function(mt,vt,kt,pt){if(me){if(kt)for(var Qe in nt){var Ke=ke[Qe];if(Ke&&Le(Ke.prototype,mt))try{delete Ke.prototype[mt]}catch(xe){try{Ke.prototype[mt]=vt}catch(Me){}}}(!Ae[mt]||kt)&&z(Ae,mt,kt?vt:ot&&je[mt]||vt,pt)}},Et=function(mt,vt,kt){var pt,Qe;if(me){if(le){if(kt){for(pt in nt)if(Qe=ke[pt],Qe&&Le(Qe,mt))try{delete Qe[mt]}catch(Ke){}}if(!Ne[mt]||kt)try{return z(Ne,mt,kt?vt:ot&&Ne[mt]||vt)}catch(Ke){}else return}for(pt in nt)Qe=ke[pt],Qe&&(!Qe[mt]||kt)&&z(Qe,mt,vt)}};for(ct in nt)Pt=ke[ct],$e=Pt&&Pt.prototype,$e?de($e,Ve,Pt):ot=!1;for(ct in yt)Pt=ke[ct],$e=Pt&&Pt.prototype,$e&&de($e,Ve,Pt);if((!ot||!Ce(Ne)||Ne===Function.prototype)&&(Ne=function(){throw We("Incorrect invocation")},ot))for(ct in nt)ke[ct]&&le(ke[ct],Ne);if((!ot||!Ae||Ae===Re)&&(Ae=Ne.prototype,ot))for(ct in nt)ke[ct]&&le(ke[ct].prototype,Ae);if(ot&&ie(Fe)!==Ae&&le(Fe,Ae),me&&!Le(Ae,Ye)){st=!0,ee(Ae,Ye,{get:function(){return Se(this)?this[Ue]:void 0}});for(ct in nt)ke[ct]&&de(ke[ct],Ue,ct)}ze.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ve,TYPED_ARRAY_TAG:st&&Ue,aTypedArray:dt,aTypedArrayConstructor:ft,exportTypedArrayMethod:ut,exportTypedArrayStaticMethod:Et,isView:xt,isTypedArray:wt,TypedArray:Ne,TypedArrayPrototype:Ae}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/descriptors"),Ce=oe("../internals/array-buffer-native"),Se=oe("../internals/function-name"),Le=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/redefine-all"),we=oe("../internals/fails"),de=oe("../internals/an-instance"),z=oe("../internals/to-integer-or-infinity"),ee=oe("../internals/to-length"),ae=oe("../internals/to-index"),ie=oe("../internals/ieee754"),le=oe("../internals/object-get-prototype-of"),ue=oe("../internals/object-set-prototype-of"),ge=oe("../internals/object-get-own-property-names").f,Pe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),Be=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Ne=oe("../internals/internal-state"),Ae=Se.PROPER,Re=Se.CONFIGURABLE,We=Ne.get,Ye=Ne.set,Ue="ArrayBuffer",Ve="DataView",ot="prototype",st="Wrong length",ct="Wrong index",Pt=fe[Ue],$e=Pt,nt=$e&&$e[ot],yt=fe[Ve],xt=yt&&yt[ot],wt=Object.prototype,dt=fe.Array,ft=fe.RangeError,ut=me(je),Et=me([].reverse),mt=ie.pack,vt=ie.unpack,kt=function(Ot){return[Ot&255]},pt=function(Ot){return[Ot&255,Ot>>8&255]},Qe=function(Ot){return[Ot&255,Ot>>8&255,Ot>>16&255,Ot>>24&255]},Ke=function(Ot){return Ot[3]<<24|Ot[2]<<16|Ot[1]<<8|Ot[0]},xe=function(Ot){return mt(Ot,23,4)},Me=function(Ot){return mt(Ot,52,8)},Ze=function(Ot,Rt){Pe(Ot[ot],Rt,{get:function(){return We(this)[Rt]}})},tt=function(Ot,Rt,$t,qt){var rn=ae($t),Ht=We(Ot);if(rn+Rt>Ht.byteLength)throw ft(ct);var sn=We(Ht.buffer).bytes,tn=rn+Ht.byteOffset,Ut=Be(sn,tn,tn+Rt);return qt?Ut:Et(Ut)},Ie=function(Ot,Rt,$t,qt,rn,Ht){var sn=ae($t),tn=We(Ot);if(sn+Rt>tn.byteLength)throw ft(ct);for(var Ut=We(tn.buffer).bytes,En=sn+tn.byteOffset,bn=qt(+rn),Dn=0;Dn<Rt;Dn++)Ut[En+Dn]=bn[Ht?Dn:Rt-Dn-1]};if(!Ce)$e=function(Rt){de(this,nt);var $t=ae(Rt);Ye(this,{bytes:ut(dt($t),0),byteLength:$t}),ke||(this.byteLength=$t)},nt=$e[ot],yt=function(Rt,$t,qt){de(this,xt),de(Rt,nt);var rn=We(Rt).byteLength,Ht=z($t);if(Ht<0||Ht>rn)throw ft("Wrong offset");if(qt=qt===void 0?rn-Ht:ee(qt),Ht+qt>rn)throw ft(st);Ye(this,{buffer:Rt,byteLength:qt,byteOffset:Ht}),ke||(this.buffer=Rt,this.byteLength=qt,this.byteOffset=Ht)},xt=yt[ot],ke&&(Ze($e,"byteLength"),Ze(yt,"buffer"),Ze(yt,"byteLength"),Ze(yt,"byteOffset")),ve(xt,{getInt8:function(Rt){return tt(this,1,Rt)[0]<<24>>24},getUint8:function(Rt){return tt(this,1,Rt)[0]},getInt16:function(Rt){var $t=tt(this,2,Rt,arguments.length>1?arguments[1]:void 0);return($t[1]<<8|$t[0])<<16>>16},getUint16:function(Rt){var $t=tt(this,2,Rt,arguments.length>1?arguments[1]:void 0);return $t[1]<<8|$t[0]},getInt32:function(Rt){return Ke(tt(this,4,Rt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Rt){return Ke(tt(this,4,Rt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Rt){return vt(tt(this,4,Rt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Rt){return vt(tt(this,8,Rt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Rt,$t){Ie(this,1,Rt,kt,$t)},setUint8:function(Rt,$t){Ie(this,1,Rt,kt,$t)},setInt16:function(Rt,$t){Ie(this,2,Rt,pt,$t,arguments.length>2?arguments[2]:void 0)},setUint16:function(Rt,$t){Ie(this,2,Rt,pt,$t,arguments.length>2?arguments[2]:void 0)},setInt32:function(Rt,$t){Ie(this,4,Rt,Qe,$t,arguments.length>2?arguments[2]:void 0)},setUint32:function(Rt,$t){Ie(this,4,Rt,Qe,$t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Rt,$t){Ie(this,4,Rt,xe,$t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Rt,$t){Ie(this,8,Rt,Me,$t,arguments.length>2?arguments[2]:void 0)}});else{var _e=Ae&&Pt.name!==Ue;if(!we(function(){Pt(1)})||!we(function(){new Pt(-1)})||we(function(){return new Pt,new Pt(1.5),new Pt(NaN),_e&&!Re})){$e=function(Rt){return de(this,nt),new Pt(ae(Rt))},$e[ot]=nt;for(var He=ge(Pt),rt=0,St;He.length>rt;)(St=He[rt++])in $e||Le($e,St,Pt[St]);nt.constructor=$e}else _e&&Re&&Le(Pt,"name",Ue);ue&&le(xt)!==wt&&ue(xt,wt);var Ct=new yt(new $e(2)),Nt=me(xt.setInt8);Ct.setInt8(0,2147483648),Ct.setInt8(1,2147483649),(Ct.getInt8(0)||!Ct.getInt8(1))&&ve(xt,{setInt8:function(Rt,$t){Nt(this,Rt,$t<<24>>24)},setUint8:function(Rt,$t){Nt(this,Rt,$t<<24>>24)}},{unsafe:!0})}Fe($e,Ue),Fe(yt,Ve),ze.exports={ArrayBuffer:$e,DataView:yt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=Math.min;ze.exports=[].copyWithin||function(Le,ve){var we=fe(this),de=ke(we),z=me(Le,de),ee=me(ve,de),ae=arguments.length>2?arguments[2]:void 0,ie=Ce((ae===void 0?de:me(ae,de))-ee,de-z),le=1;for(ee<z&&z<ee+ie&&(le=-1,ee+=ie-1,z+=ie-1);ie-- >0;)ee in we?we[z]=we[ee]:delete we[z],z+=le,ee+=le;return we}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like");ze.exports=function(Se){for(var Le=fe(this),ve=ke(Le),we=arguments.length,de=me(we>1?arguments[1]:void 0,ve),z=we>2?arguments[2]:void 0,ee=z===void 0?ve:me(z,ve);ee>de;)Le[de++]=Se;return Le}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-iteration").forEach,me=oe("../internals/array-method-is-strict"),ke=me("forEach");ze.exports=ke?[].forEach:function(Se){return fe(this,Se,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(oe,ze,De){var fe=oe("../internals/length-of-array-like");ze.exports=function(me,ke){for(var Ce=0,Se=fe(ke),Le=new me(Se);Se>Ce;)Le[Ce]=ke[Ce++];return Le}},{"../internals/length-of-array-like":188}],109:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/to-object"),Se=oe("../internals/call-with-safe-iteration-closing"),Le=oe("../internals/is-array-iterator-method"),ve=oe("../internals/is-constructor"),we=oe("../internals/length-of-array-like"),de=oe("../internals/create-property"),z=oe("../internals/get-iterator"),ee=oe("../internals/get-iterator-method"),ae=fe.Array;ze.exports=function(le){var ue=Ce(le),ge=ve(this),Pe=arguments.length,je=Pe>1?arguments[1]:void 0,Be=je!==void 0;Be&&(je=me(je,Pe>2?arguments[2]:void 0));var Fe=ee(ue),Ne=0,Ae,Re,We,Ye,Ue,Ve;if(Fe&&!(this==ae&&Le(Fe)))for(Ye=z(ue,Fe),Ue=Ye.next,Re=ge?new this:[];!(We=ke(Ue,Ye)).done;Ne++)Ve=Be?Se(Ye,je,[We.value,Ne],!0):We.value,de(Re,Ne,Ve);else for(Ae=we(ue),Re=ge?new this(Ae):ae(Ae);Ae>Ne;Ne++)Ve=Be?je(ue[Ne],Ne):ue[Ne],de(Re,Ne,Ve);return Re.length=Ne,Re}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(oe,ze,De){var fe=oe("../internals/to-indexed-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=function(Se){return function(Le,ve,we){var de=fe(Le),z=ke(de),ee=me(we,z),ae;if(Se&&ve!=ve){for(;z>ee;)if(ae=de[ee++],ae!=ae)return!0}else for(;z>ee;ee++)if((Se||ee in de)&&de[ee]===ve)return Se||ee||0;return!Se&&-1}};ze.exports={includes:Ce(!0),indexOf:Ce(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(oe,ze,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Le=oe("../internals/array-species-create"),ve=me([].push),we=function(de){var z=de==1,ee=de==2,ae=de==3,ie=de==4,le=de==6,ue=de==7,ge=de==5||le;return function(Pe,je,Be,Fe){for(var Ne=Ce(Pe),Ae=ke(Ne),Re=fe(je,Be),We=Se(Ae),Ye=0,Ue=Fe||Le,Ve=z?Ue(Pe,We):ee||ue?Ue(Pe,0):void 0,ot,st;We>Ye;Ye++)if((ge||Ye in Ae)&&(ot=Ae[Ye],st=Re(ot,Ye,Ne),de))if(z)Ve[Ye]=st;else if(st)switch(de){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:ve(Ve,ot)}else switch(de){case 4:return!1;case 7:ve(Ve,ot)}return le?-1:ae||ie?ie:Ve}};ze.exports={forEach:we(0),map:we(1),filter:we(2),some:we(3),every:we(4),find:we(5),findIndex:we(6),filterReject:we(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/to-integer-or-infinity"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/array-method-is-strict"),Le=Math.min,ve=[].lastIndexOf,we=!!ve&&1/[1].lastIndexOf(1,-0)<0,de=Se("lastIndexOf"),z=we||!de;ze.exports=z?function(ae){if(we)return fe(ve,this,arguments)||0;var ie=me(this),le=Ce(ie),ue=le-1;for(arguments.length>1&&(ue=Le(ue,ke(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in ie&&ie[ue]===ae)return ue||0;return-1}:ve},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/well-known-symbol"),ke=oe("../internals/engine-v8-version"),Ce=me("species");ze.exports=function(Se){return ke>=51||!fe(function(){var Le=[],ve=Le.constructor={};return ve[Ce]=function(){return{foo:1}},Le[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,ze,De){"use strict";var fe=oe("../internals/fails");ze.exports=function(me,ke){var Ce=[][me];return!!Ce&&fe(function(){Ce.call(null,ke||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/a-callable"),ke=oe("../internals/to-object"),Ce=oe("../internals/indexed-object"),Se=oe("../internals/length-of-array-like"),Le=fe.TypeError,ve=function(we){return function(de,z,ee,ae){me(z);var ie=ke(de),le=Ce(ie),ue=Se(ie),ge=we?ue-1:0,Pe=we?-1:1;if(ee<2)for(;;){if(ge in le){ae=le[ge],ge+=Pe;break}if(ge+=Pe,we?ge<0:ue<=ge)throw Le("Reduce of empty array with no initial value")}for(;we?ge>=0:ue>ge;ge+=Pe)ge in le&&(ae=z(ae,le[ge],ge,ie));return ae}};ze.exports={left:ve(!1),right:ve(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=oe("../internals/create-property"),Se=fe.Array,Le=Math.max;ze.exports=function(ve,we,de){for(var z=ke(ve),ee=me(we,z),ae=me(de===void 0?z:de,z),ie=Se(Le(ae-ee,0)),le=0;ee<ae;ee++,le++)Ce(ie,le,ve[ee]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,ze,De){var fe=oe("../internals/array-slice-simple"),me=Math.floor,ke=function(Le,ve){var we=Le.length,de=me(we/2);return we<8?Ce(Le,ve):Se(Le,ke(fe(Le,0,de),ve),ke(fe(Le,de),ve),ve)},Ce=function(Le,ve){for(var we=Le.length,de=1,z,ee;de<we;){for(ee=de,z=Le[de];ee&&ve(Le[ee-1],z)>0;)Le[ee]=Le[--ee];ee!==de++&&(Le[ee]=z)}return Le},Se=function(Le,ve,we,de){for(var z=ve.length,ee=we.length,ae=0,ie=0;ae<z||ie<ee;)Le[ae+ie]=ae<z&&ie<ee?de(ve[ae],we[ie])<=0?ve[ae++]:we[ie++]:ae<z?ve[ae++]:we[ie++];return Le};ze.exports=ke},{"../internals/array-slice-simple":116}],119:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-array"),ke=oe("../internals/is-constructor"),Ce=oe("../internals/is-object"),Se=oe("../internals/well-known-symbol"),Le=Se("species"),ve=fe.Array;ze.exports=function(we){var de;return me(we)&&(de=we.constructor,ke(de)&&(de===ve||me(de.prototype))?de=void 0:Ce(de)&&(de=de[Le],de===null&&(de=void 0))),de===void 0?ve:de}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,ze,De){var fe=oe("../internals/array-species-constructor");ze.exports=function(me,ke){return new(fe(me))(ke===0?0:ke)}},{"../internals/array-species-constructor":119}],121:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/iterator-close");ze.exports=function(ke,Ce,Se,Le){try{return Le?Ce(fe(Se)[0],Se[1]):Ce(Se)}catch(ve){me(ke,"throw",ve)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("iterator"),ke=!1;try{var Ce=0,Se={next:function(){return{done:!!Ce++}},return:function(){ke=!0}};Se[me]=function(){return this},Array.from(Se,function(){throw 2})}catch(Le){}ze.exports=function(Le,ve){if(!ve&&!ke)return!1;var we=!1;try{var de={};de[me]=function(){return{next:function(){return{done:we=!0}}}},Le(de)}catch(z){}return we}},{"../internals/well-known-symbol":268}],123:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=fe({}.toString),ke=fe("".slice);ze.exports=function(Ce){return ke(me(Ce),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-string-tag-support"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof-raw"),Se=oe("../internals/well-known-symbol"),Le=Se("toStringTag"),ve=fe.Object,we=Ce(function(){return arguments}())=="Arguments",de=function(z,ee){try{return z[ee]}catch(ae){}};ze.exports=me?Ce:function(z){var ee,ae,ie;return z===void 0?"Undefined":z===null?"Null":typeof(ae=de(ee=ve(z),Le))=="string"?ae:we?Ce(ee):(ie=Ce(ee))=="Object"&&ke(ee.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(oe,ze,De){var fe=oe("../internals/has-own-property"),me=oe("../internals/own-keys"),ke=oe("../internals/object-get-own-property-descriptor"),Ce=oe("../internals/object-define-property");ze.exports=function(Se,Le,ve){for(var we=me(Le),de=Ce.f,z=ke.f,ee=0;ee<we.length;ee++){var ae=we[ee];!fe(Se,ae)&&!(ve&&fe(ve,ae))&&de(Se,ae,z(Le,ae))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("match");ze.exports=function(ke){var Ce=/./;try{"/./"[ke](Ce)}catch(Se){try{return Ce[me]=!1,"/./"[ke](Ce)}catch(Le){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){function me(){}return me.prototype.constructor=null,Object.getPrototypeOf(new me)!==me.prototype})},{"../internals/fails":150}],128:[function(oe,ze,De){"use strict";var fe=oe("../internals/iterators-core").IteratorPrototype,me=oe("../internals/object-create"),ke=oe("../internals/create-property-descriptor"),Ce=oe("../internals/set-to-string-tag"),Se=oe("../internals/iterators"),Le=function(){return this};ze.exports=function(ve,we,de,z){var ee=we+" Iterator";return ve.prototype=me(fe,{next:ke(+!z,de)}),Ce(ve,ee,!1,!0),Se[ee]=Le,ve}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");ze.exports=fe?function(Ce,Se,Le){return me.f(Ce,Se,ke(1,Le))}:function(Ce,Se,Le){return Ce[Se]=Le,Ce}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,ze,De){ze.exports=function(fe,me){return{enumerable:!(fe&1),configurable:!(fe&2),writable:!(fe&4),value:me}}},{}],131:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-property-key"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");ze.exports=function(Ce,Se,Le){var ve=fe(Se);ve in Ce?me.f(Ce,ve,ke(0,Le)):Ce[ve]=Le}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/is-pure"),Ce=oe("../internals/function-name"),Se=oe("../internals/is-callable"),Le=oe("../internals/create-iterator-constructor"),ve=oe("../internals/object-get-prototype-of"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/redefine"),ae=oe("../internals/well-known-symbol"),ie=oe("../internals/iterators"),le=oe("../internals/iterators-core"),ue=Ce.PROPER,ge=Ce.CONFIGURABLE,Pe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,Be=ae("iterator"),Fe="keys",Ne="values",Ae="entries",Re=function(){return this};ze.exports=function(We,Ye,Ue,Ve,ot,st,ct){Le(Ue,Ye,Ve);var Pt=function(mt){if(mt===ot&&wt)return wt;if(!je&&mt in yt)return yt[mt];switch(mt){case Fe:return function(){return new Ue(this,mt)};case Ne:return function(){return new Ue(this,mt)};case Ae:return function(){return new Ue(this,mt)}}return function(){return new Ue(this)}},$e=Ye+" Iterator",nt=!1,yt=We.prototype,xt=yt[Be]||yt["@@iterator"]||ot&&yt[ot],wt=!je&&xt||Pt(ot),dt=Ye=="Array"&&yt.entries||xt,ft,ut,Et;if(dt&&(ft=ve(dt.call(new We)),ft!==Object.prototype&&ft.next&&(!ke&&ve(ft)!==Pe&&(we?we(ft,Pe):Se(ft[Be])||ee(ft,Be,Re)),de(ft,$e,!0,!0),ke&&(ie[$e]=Re))),ue&&ot==Ne&&xt&&xt.name!==Ne&&(!ke&&ge?z(yt,"name",Ne):(nt=!0,wt=function(){return me(xt,this)})),ot)if(ut={values:Pt(Ne),keys:st?wt:Pt(Fe),entries:Pt(Ae)},ct)for(Et in ut)(je||nt||!(Et in yt))&&ee(yt,Et,ut[Et]);else fe({target:Ye,proto:!0,forced:je||nt},ut);return(!ke||ct)&&yt[Be]!==wt&&ee(yt,Be,wt,{name:ot}),ie[Ye]=wt,ut}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(oe,ze,De){var fe=oe("../internals/path"),me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol-wrapped"),Ce=oe("../internals/object-define-property").f;ze.exports=function(Se){var Le=fe.Symbol||(fe.Symbol={});me(Le,Se)||Ce(Le,Se,{value:ke.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.document,Ce=me(ke)&&me(ke.createElement);ze.exports=function(Se){return Ce?ke.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,ze,De){ze.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(oe,ze,De){var fe=oe("../internals/document-create-element"),me=fe("span").classList,ke=me&&me.constructor&&me.constructor.prototype;ze.exports=ke===Object.prototype?void 0:ke},{"../internals/document-create-element":135}],138:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/firefox\/(\d+)/i);ze.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],139:[function(oe,ze,De){ze.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/MSIE|Trident/.test(fe)},{"../internals/engine-user-agent":145}],141:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=oe("../internals/global");ze.exports=/ipad|iphone|ipod/i.test(fe)&&me.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(fe)},{"../internals/engine-user-agent":145}],143:[function(oe,ze,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/global");ze.exports=fe(me.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/web0s(?!.*chrome)/i.test(fe)},{"../internals/engine-user-agent":145}],145:[function(oe,ze,De){var fe=oe("../internals/get-built-in");ze.exports=fe("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/engine-user-agent"),ke=fe.process,Ce=fe.Deno,Se=ke&&ke.versions||Ce&&Ce.version,Le=Se&&Se.v8,ve,we;Le&&(ve=Le.split("."),we=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!we&&me&&(ve=me.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=me.match(/Chrome\/(\d+)/),ve&&(we=+ve[1]))),ze.exports=we},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/AppleWebKit\/(\d+)\./);ze.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],148:[function(oe,ze,De){ze.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/object-get-own-property-descriptor").f,ke=oe("../internals/create-non-enumerable-property"),Ce=oe("../internals/redefine"),Se=oe("../internals/set-global"),Le=oe("../internals/copy-constructor-properties"),ve=oe("../internals/is-forced");ze.exports=function(we,de){var z=we.target,ee=we.global,ae=we.stat,ie,le,ue,ge,Pe,je;if(ee?le=fe:ae?le=fe[z]||Se(z,{}):le=(fe[z]||{}).prototype,le)for(ue in de){if(Pe=de[ue],we.noTargetGet?(je=me(le,ue),ge=je&&je.value):ge=le[ue],ie=ve(ee?ue:z+(ae?".":"#")+ue,we.forced),!ie&&ge!==void 0){if(typeof Pe==typeof ge)continue;Le(Pe,ge)}(we.sham||ge&&ge.sham)&&ke(Pe,"sham",!0),Ce(le,ue,Pe,we)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(oe,ze,De){ze.exports=function(fe){try{return!!fe()}catch(me){return!0}}},{}],151:[function(oe,ze,De){"use strict";oe("../modules/es.regexp.exec");var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/redefine"),ke=oe("../internals/regexp-exec"),Ce=oe("../internals/fails"),Se=oe("../internals/well-known-symbol"),Le=oe("../internals/create-non-enumerable-property"),ve=Se("species"),we=RegExp.prototype;ze.exports=function(de,z,ee,ae){var ie=Se(de),le=!Ce(function(){var je={};return je[ie]=function(){return 7},""[de](je)!=7}),ue=le&&!Ce(function(){var je=!1,Be=/a/;return de==="split"&&(Be={},Be.constructor={},Be.constructor[ve]=function(){return Be},Be.flags="",Be[ie]=/./[ie]),Be.exec=function(){return je=!0,null},Be[ie](""),!je});if(!le||!ue||ee){var ge=fe(/./[ie]),Pe=z(ie,""[de],function(je,Be,Fe,Ne,Ae){var Re=fe(je),We=Be.exec;return We===ke||We===we.exec?le&&!Ae?{done:!0,value:ge(Be,Fe,Ne)}:{done:!0,value:Re(Fe,Be,Ne)}:{done:!1}});me(String.prototype,de,Pe[0]),me(we,ie,Pe[1])}ae&&Le(we[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.apply,Ce=me.call;ze.exports=typeof Reflect=="object"&&Reflect.apply||(fe?Ce.bind(ke):function(){return Ce.apply(ke,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/a-callable"),ke=oe("../internals/function-bind-native"),Ce=fe(fe.bind);ze.exports=function(Se,Le){return me(Se),Le===void 0?Se:ke?Ce(Se,Le):function(){return Se.apply(Le,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){var me=function(){}.bind();return typeof me!="function"||me.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype.call;ze.exports=fe?me.bind(me):function(){return me.apply(me,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/has-own-property"),ke=Function.prototype,Ce=fe&&Object.getOwnPropertyDescriptor,Se=me(ke,"name"),Le=Se&&function(){}.name==="something",ve=Se&&(!fe||fe&&Ce(ke,"name").configurable);ze.exports={EXISTS:Se,PROPER:Le,CONFIGURABLE:ve}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.bind,Ce=me.call,Se=fe&&ke.bind(Ce,Ce);ze.exports=fe?function(Le){return Le&&Se(Le)}:function(Le){return Le&&function(){return Ce.apply(Le,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=function(Ce){return me(Ce)?Ce:void 0};ze.exports=function(Ce,Se){return arguments.length<2?ke(fe[Ce]):fe[Ce]&&fe[Ce][Se]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(oe,ze,De){var fe=oe("../internals/classof"),me=oe("../internals/get-method"),ke=oe("../internals/iterators"),Ce=oe("../internals/well-known-symbol"),Se=Ce("iterator");ze.exports=function(Le){if(Le!=null)return me(Le,Se)||me(Le,"@@iterator")||ke[fe(Le)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Le=oe("../internals/get-iterator-method"),ve=fe.TypeError;ze.exports=function(we,de){var z=arguments.length<2?Le(we):de;if(ke(z))return Ce(me(z,we));throw ve(Se(we)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(oe,ze,De){var fe=oe("../internals/a-callable");ze.exports=function(me,ke){var Ce=me[ke];return Ce==null?void 0:fe(Ce)}},{"../internals/a-callable":95}],162:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=Math.floor,Ce=fe("".charAt),Se=fe("".replace),Le=fe("".slice),ve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,we=/\$([$&'`]|\d{1,2})/g;ze.exports=function(de,z,ee,ae,ie,le){var ue=ee+de.length,ge=ae.length,Pe=we;return ie!==void 0&&(ie=me(ie),Pe=ve),Se(le,Pe,function(je,Be){var Fe;switch(Ce(Be,0)){case"$":return"$";case"&":return de;case"`":return Le(z,0,ee);case"'":return Le(z,ue);case"<":Fe=ie[Le(Be,1,-1)];break;default:var Ne=+Be;if(Ne===0)return je;if(Ne>ge){var Ae=ke(Ne/10);return Ae===0?je:Ae<=ge?ae[Ae-1]===void 0?Ce(Be,1):ae[Ae-1]+Ce(Be,1):je}Fe=ae[Ne-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,ze,De){(function(fe){(function(){var me=function(ke){return ke&&ke.Math==Math&&ke};ze.exports=me(typeof globalThis=="object"&&globalThis)||me(typeof window=="object"&&window)||me(typeof self=="object"&&self)||me(typeof fe=="object"&&fe)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=fe({}.hasOwnProperty);ze.exports=Object.hasOwn||function(Se,Le){return ke(me(Se),Le)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,ze,De){ze.exports={}},{}],166:[function(oe,ze,De){var fe=oe("../internals/global");ze.exports=function(me,ke){var Ce=fe.console;Ce&&Ce.error&&(arguments.length==1?Ce.error(me):Ce.error(me,ke))}},{"../internals/global":163}],167:[function(oe,ze,De){var fe=oe("../internals/get-built-in");ze.exports=fe("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails"),ke=oe("../internals/document-create-element");ze.exports=!fe&&!me(function(){return Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.Array,ke=Math.abs,Ce=Math.pow,Se=Math.floor,Le=Math.log,ve=Math.LN2,we=function(z,ee,ae){var ie=me(ae),le=ae*8-ee-1,ue=(1<<le)-1,ge=ue>>1,Pe=ee===23?Ce(2,-24)-Ce(2,-77):0,je=z<0||z===0&&1/z<0?1:0,Be=0,Fe,Ne,Ae;for(z=ke(z),z!=z||z===1/0?(Ne=z!=z?1:0,Fe=ue):(Fe=Se(Le(z)/ve),Ae=Ce(2,-Fe),z*Ae<1&&(Fe--,Ae*=2),Fe+ge>=1?z+=Pe/Ae:z+=Pe*Ce(2,1-ge),z*Ae>=2&&(Fe++,Ae/=2),Fe+ge>=ue?(Ne=0,Fe=ue):Fe+ge>=1?(Ne=(z*Ae-1)*Ce(2,ee),Fe=Fe+ge):(Ne=z*Ce(2,ge-1)*Ce(2,ee),Fe=0));ee>=8;)ie[Be++]=Ne&255,Ne/=256,ee-=8;for(Fe=Fe<<ee|Ne,le+=ee;le>0;)ie[Be++]=Fe&255,Fe/=256,le-=8;return ie[--Be]|=je*128,ie},de=function(z,ee){var ae=z.length,ie=ae*8-ee-1,le=(1<<ie)-1,ue=le>>1,ge=ie-7,Pe=ae-1,je=z[Pe--],Be=je&127,Fe;for(je>>=7;ge>0;)Be=Be*256+z[Pe--],ge-=8;for(Fe=Be&(1<<-ge)-1,Be>>=-ge,ge+=ee;ge>0;)Fe=Fe*256+z[Pe--],ge-=8;if(Be===0)Be=1-ue;else{if(Be===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+Ce(2,ee),Be=Be-ue}return(je?-1:1)*Fe*Ce(2,Be-ee)};ze.exports={pack:we,unpack:de}},{"../internals/global":163}],170:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/classof-raw"),Se=fe.Object,Le=me("".split);ze.exports=ke(function(){return!Se("z").propertyIsEnumerable(0)})?function(ve){return Ce(ve)=="String"?Le(ve,""):Se(ve)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,ze,De){var fe=oe("../internals/is-callable"),me=oe("../internals/is-object"),ke=oe("../internals/object-set-prototype-of");ze.exports=function(Ce,Se,Le){var ve,we;return ke&&fe(ve=Se.constructor)&&ve!==Le&&me(we=ve.prototype)&&we!==Le.prototype&&ke(Ce,we),Ce}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/is-callable"),ke=oe("../internals/shared-store"),Ce=fe(Function.toString);me(ke.inspectSource)||(ke.inspectSource=function(Se){return Ce(Se)}),ze.exports=ke.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,ze,De){var fe=oe("../internals/native-weak-map"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-object"),Se=oe("../internals/create-non-enumerable-property"),Le=oe("../internals/has-own-property"),ve=oe("../internals/shared-store"),we=oe("../internals/shared-key"),de=oe("../internals/hidden-keys"),z="Object already initialized",ee=me.TypeError,ae=me.WeakMap,ie,le,ue,ge=function(Re){return ue(Re)?le(Re):ie(Re,{})},Pe=function(Re){return function(We){var Ye;if(!Ce(We)||(Ye=le(We)).type!==Re)throw ee("Incompatible receiver, "+Re+" required");return Ye}};if(fe||ve.state){var je=ve.state||(ve.state=new ae),Be=ke(je.get),Fe=ke(je.has),Ne=ke(je.set);ie=function(Re,We){if(Fe(je,Re))throw new ee(z);return We.facade=Re,Ne(je,Re,We),We},le=function(Re){return Be(je,Re)||{}},ue=function(Re){return Fe(je,Re)}}else{var Ae=we("state");de[Ae]=!0,ie=function(Re,We){if(Le(Re,Ae))throw new ee(z);return We.facade=Re,Se(Re,Ae,We),We},le=function(Re){return Le(Re,Ae)?Re[Ae]:{}},ue=function(Re){return Le(Re,Ae)}}ze.exports={set:ie,get:le,has:ue,enforce:ge,getterFor:Pe}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/iterators"),ke=fe("iterator"),Ce=Array.prototype;ze.exports=function(Se){return Se!==void 0&&(me.Array===Se||Ce[ke]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,ze,De){var fe=oe("../internals/classof-raw");ze.exports=Array.isArray||function(ke){return fe(ke)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,ze,De){ze.exports=function(fe){return typeof fe=="function"}},{}],177:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/fails"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof"),Se=oe("../internals/get-built-in"),Le=oe("../internals/inspect-source"),ve=function(){},we=[],de=Se("Reflect","construct"),z=/^\s*(?:class|function)\b/,ee=fe(z.exec),ae=!z.exec(ve),ie=function(ge){if(!ke(ge))return!1;try{return de(ve,we,ge),!0}catch(Pe){return!1}},le=function(ge){if(!ke(ge))return!1;switch(Ce(ge)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(z,Le(ge))}catch(Pe){return!0}};le.sham=!0,ze.exports=!de||me(function(){var ue;return ie(ie.call)||!ie(Object)||!ie(function(){ue=!0})||ue})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=/#|\.prototype\./,Ce=function(de,z){var ee=Le[Se(de)];return ee==we?!0:ee==ve?!1:me(z)?fe(z):!!z},Se=Ce.normalize=function(de){return String(de).replace(ke,".").toLowerCase()},Le=Ce.data={},ve=Ce.NATIVE="N",we=Ce.POLYFILL="P";ze.exports=Ce},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,ze,De){var fe=oe("../internals/is-object"),me=Math.floor;ze.exports=Number.isInteger||function(Ce){return!fe(Ce)&&isFinite(Ce)&&me(Ce)===Ce}},{"../internals/is-object":180}],180:[function(oe,ze,De){var fe=oe("../internals/is-callable");ze.exports=function(me){return typeof me=="object"?me!==null:fe(me)}},{"../internals/is-callable":176}],181:[function(oe,ze,De){ze.exports=!1},{}],182:[function(oe,ze,De){var fe=oe("../internals/is-object"),me=oe("../internals/classof-raw"),ke=oe("../internals/well-known-symbol"),Ce=ke("match");ze.exports=function(Se){var Le;return fe(Se)&&((Le=Se[Ce])!==void 0?!!Le:me(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-callable"),Ce=oe("../internals/object-is-prototype-of"),Se=oe("../internals/use-symbol-as-uid"),Le=fe.Object;ze.exports=Se?function(ve){return typeof ve=="symbol"}:function(ve){var we=me("Symbol");return ke(we)&&Ce(we.prototype,Le(ve))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Le=oe("../internals/is-array-iterator-method"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/get-iterator"),z=oe("../internals/get-iterator-method"),ee=oe("../internals/iterator-close"),ae=fe.TypeError,ie=function(ue,ge){this.stopped=ue,this.result=ge},le=ie.prototype;ze.exports=function(ue,ge,Pe){var je=Pe&&Pe.that,Be=!!(Pe&&Pe.AS_ENTRIES),Fe=!!(Pe&&Pe.IS_ITERATOR),Ne=!!(Pe&&Pe.INTERRUPTED),Ae=me(ge,je),Re,We,Ye,Ue,Ve,ot,st,ct=function($e){return Re&&ee(Re,"normal",$e),new ie(!0,$e)},Pt=function($e){return Be?(Ce($e),Ne?Ae($e[0],$e[1],ct):Ae($e[0],$e[1])):Ne?Ae($e,ct):Ae($e)};if(Fe)Re=ue;else{if(We=z(ue),!We)throw ae(Se(ue)+" is not iterable");if(Le(We)){for(Ye=0,Ue=ve(ue);Ue>Ye;Ye++)if(Ve=Pt(ue[Ye]),Ve&&we(le,Ve))return Ve;return new ie(!1)}Re=de(ue,We)}for(ot=Re.next;!(st=ke(ot,Re)).done;){try{Ve=Pt(st.value)}catch($e){ee(Re,"throw",$e)}if(typeof Ve=="object"&&Ve&&we(le,Ve))return Ve}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/an-object"),ke=oe("../internals/get-method");ze.exports=function(Ce,Se,Le){var ve,we;me(Ce);try{if(ve=ke(Ce,"return"),!ve){if(Se==="throw")throw Le;return Le}ve=fe(ve,Ce)}catch(de){we=!0,ve=de}if(Se==="throw")throw Le;if(we)throw ve;return me(ve),Le}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,ze,De){"use strict";var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=oe("../internals/object-create"),Ce=oe("../internals/object-get-prototype-of"),Se=oe("../internals/redefine"),Le=oe("../internals/well-known-symbol"),ve=oe("../internals/is-pure"),we=Le("iterator"),de=!1,z,ee,ae;[].keys&&(ae=[].keys(),"next"in ae?(ee=Ce(Ce(ae)),ee!==Object.prototype&&(z=ee)):de=!0);var ie=z==null||fe(function(){var le={};return z[we].call(le)!==le});ie?z={}:ve&&(z=ke(z)),me(z[we])||Se(z,we,function(){return this}),ze.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:de}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(oe,ze,De){arguments[4][165][0].apply(De,arguments)},{dup:165}],188:[function(oe,ze,De){var fe=oe("../internals/to-length");ze.exports=function(me){return fe(me.length)}},{"../internals/to-length":249}],189:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/object-get-own-property-descriptor").f,Ce=oe("../internals/task").set,Se=oe("../internals/engine-is-ios"),Le=oe("../internals/engine-is-ios-pebble"),ve=oe("../internals/engine-is-webos-webkit"),we=oe("../internals/engine-is-node"),de=fe.MutationObserver||fe.WebKitMutationObserver,z=fe.document,ee=fe.process,ae=fe.Promise,ie=ke(fe,"queueMicrotask"),le=ie&&ie.value,ue,ge,Pe,je,Be,Fe,Ne,Ae;le||(ue=function(){var Re,We;for(we&&(Re=ee.domain)&&Re.exit();ge;){We=ge.fn,ge=ge.next;try{We()}catch(Ye){throw ge?je():Pe=void 0,Ye}}Pe=void 0,Re&&Re.enter()},!Se&&!we&&!ve&&de&&z?(Be=!0,Fe=z.createTextNode(""),new de(ue).observe(Fe,{characterData:!0}),je=function(){Fe.data=Be=!Be}):!Le&&ae&&ae.resolve?(Ne=ae.resolve(void 0),Ne.constructor=ae,Ae=me(Ne.then,Ne),je=function(){Ae(ue)}):we?je=function(){ee.nextTick(ue)}:(Ce=me(Ce,fe),je=function(){Ce(ue)})),ze.exports=le||function(Re){var We={fn:Re,next:void 0};Pe&&(Pe.next=We),ge||(ge=We,je()),Pe=We}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(oe,ze,De){var fe=oe("../internals/native-symbol");ze.exports=fe&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,ze,De){var fe=oe("../internals/engine-v8-version"),me=oe("../internals/fails");ze.exports=!!Object.getOwnPropertySymbols&&!me(function(){var ke=Symbol();return!String(ke)||!(Object(ke)instanceof Symbol)||!Symbol.sham&&fe&&fe<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/inspect-source"),Ce=fe.WeakMap;ze.exports=me(Ce)&&/native code/.test(ke(Ce))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,ze,De){"use strict";var fe=oe("../internals/a-callable"),me=function(ke){var Ce,Se;this.promise=new ke(function(Le,ve){if(Ce!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");Ce=Le,Se=ve}),this.resolve=fe(Ce),this.reject=fe(Se)};ze.exports.f=function(ke){return new me(ke)}},{"../internals/a-callable":95}],194:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-regexp"),ke=fe.TypeError;ze.exports=function(Ce){if(me(Ce))throw ke("The method doesn't accept regular expressions");return Ce}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(oe,ze,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/function-call"),Ce=oe("../internals/fails"),Se=oe("../internals/object-keys"),Le=oe("../internals/object-get-own-property-symbols"),ve=oe("../internals/object-property-is-enumerable"),we=oe("../internals/to-object"),de=oe("../internals/indexed-object"),z=Object.assign,ee=Object.defineProperty,ae=me([].concat);ze.exports=!z||Ce(function(){if(fe&&z({b:1},z(ee({},"a",{enumerable:!0,get:function(){ee(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ue=Symbol(),ge="abcdefghijklmnopqrst";return ie[ue]=7,ge.split("").forEach(function(Pe){le[Pe]=Pe}),z({},ie)[ue]!=7||Se(z({},le)).join("")!=ge})?function(le,ue){for(var ge=we(le),Pe=arguments.length,je=1,Be=Le.f,Fe=ve.f;Pe>je;)for(var Ne=de(arguments[je++]),Ae=Be?ae(Se(Ne),Be(Ne)):Se(Ne),Re=Ae.length,We=0,Ye;Re>We;)Ye=Ae[We++],(!fe||ke(Fe,Ne,Ye))&&(ge[Ye]=Ne[Ye]);return ge}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/object-define-properties"),ke=oe("../internals/enum-bug-keys"),Ce=oe("../internals/hidden-keys"),Se=oe("../internals/html"),Le=oe("../internals/document-create-element"),ve=oe("../internals/shared-key"),we=">",de="<",z="prototype",ee="script",ae=ve("IE_PROTO"),ie=function(){},le=function(Be){return de+ee+we+Be+de+"/"+ee+we},ue=function(Be){Be.write(le("")),Be.close();var Fe=Be.parentWindow.Object;return Be=null,Fe},ge=function(){var Be=Le("iframe"),Fe="java"+ee+":",Ne;return Be.style.display="none",Se.appendChild(Be),Be.src=String(Fe),Ne=Be.contentWindow.document,Ne.open(),Ne.write(le("document.F=Object")),Ne.close(),Ne.F},Pe,je=function(){try{Pe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&Pe?ue(Pe):ge():ue(Pe);for(var Be=ke.length;Be--;)delete je[z][ke[Be]];return je()};Ce[ae]=!0,ze.exports=Object.create||function(Fe,Ne){var Ae;return Fe!==null?(ie[z]=fe(Fe),Ae=new ie,ie[z]=null,Ae[ae]=Fe):Ae=je(),Ne===void 0?Ae:me.f(Ae,Ne)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/v8-prototype-define-bug"),ke=oe("../internals/object-define-property"),Ce=oe("../internals/an-object"),Se=oe("../internals/to-indexed-object"),Le=oe("../internals/object-keys");De.f=fe&&!me?Object.defineProperties:function(we,de){Ce(we);for(var z=Se(de),ee=Le(de),ae=ee.length,ie=0,le;ae>ie;)ke.f(we,le=ee[ie++],z[le]);return we}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/descriptors"),ke=oe("../internals/ie8-dom-define"),Ce=oe("../internals/v8-prototype-define-bug"),Se=oe("../internals/an-object"),Le=oe("../internals/to-property-key"),ve=fe.TypeError,we=Object.defineProperty,de=Object.getOwnPropertyDescriptor,z="enumerable",ee="configurable",ae="writable";De.f=me?Ce?function(le,ue,ge){if(Se(le),ue=Le(ue),Se(ge),typeof le=="function"&&ue==="prototype"&&"value"in ge&&ae in ge&&!ge[ae]){var Pe=de(le,ue);Pe&&Pe[ae]&&(le[ue]=ge.value,ge={configurable:ee in ge?ge[ee]:Pe[ee],enumerable:z in ge?ge[z]:Pe[z],writable:!1})}return we(le,ue,ge)}:we:function(le,ue,ge){if(Se(le),ue=Le(ue),Se(ge),ke)try{return we(le,ue,ge)}catch(Pe){}if("get"in ge||"set"in ge)throw ve("Accessors not supported");return"value"in ge&&(le[ue]=ge.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-call"),ke=oe("../internals/object-property-is-enumerable"),Ce=oe("../internals/create-property-descriptor"),Se=oe("../internals/to-indexed-object"),Le=oe("../internals/to-property-key"),ve=oe("../internals/has-own-property"),we=oe("../internals/ie8-dom-define"),de=Object.getOwnPropertyDescriptor;De.f=fe?de:function(ee,ae){if(ee=Se(ee),ae=Le(ae),we)try{return de(ee,ae)}catch(ie){}if(ve(ee,ae))return Ce(!me(ke.f,ee,ae),ee[ae])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(oe,ze,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/object-get-own-property-names").f,Ce=oe("../internals/array-slice-simple"),Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Le=function(ve){try{return ke(ve)}catch(we){return Ce(Se)}};ze.exports.f=function(we){return Se&&fe(we)=="Window"?Le(we):ke(me(we))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(oe,ze,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys"),ke=me.concat("length","prototype");De.f=Object.getOwnPropertyNames||function(Se){return fe(Se,ke)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,ze,De){De.f=Object.getOwnPropertySymbols},{}],203:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/shared-key"),Le=oe("../internals/correct-prototype-getter"),ve=Se("IE_PROTO"),we=fe.Object,de=we.prototype;ze.exports=Le?we.getPrototypeOf:function(z){var ee=Ce(z);if(me(ee,ve))return ee[ve];var ae=ee.constructor;return ke(ae)&&ee instanceof ae?ae.prototype:ee instanceof we?de:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/has-own-property"),ke=oe("../internals/to-indexed-object"),Ce=oe("../internals/array-includes").indexOf,Se=oe("../internals/hidden-keys"),Le=fe([].push);ze.exports=function(ve,we){var de=ke(ve),z=0,ee=[],ae;for(ae in de)!me(Se,ae)&&me(de,ae)&&Le(ee,ae);for(;we.length>z;)me(de,ae=we[z++])&&(~Ce(ee,ae)||Le(ee,ae));return ee}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(oe,ze,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys");ze.exports=Object.keys||function(Ce){return fe(Ce,me)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,ze,De){"use strict";var fe={}.propertyIsEnumerable,me=Object.getOwnPropertyDescriptor,ke=me&&!fe.call({1:2},1);De.f=ke?function(Se){var Le=me(this,Se);return!!Le&&Le.enumerable}:fe},{}],208:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/an-object"),ke=oe("../internals/a-possible-prototype");ze.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ce=!1,Se={},Le;try{Le=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Le(Se,[]),Ce=Se instanceof Array}catch(ve){}return function(we,de){return me(we),ke(de),Ce?Le(we,de):we.__proto__=de,we}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-keys"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/object-property-is-enumerable").f,Le=me(Se),ve=me([].push),we=function(de){return function(z){for(var ee=Ce(z),ae=ke(ee),ie=ae.length,le=0,ue=[],ge;ie>le;)ge=ae[le++],(!fe||Le(ee,ge))&&ve(ue,de?[ge,ee[ge]]:ee[ge]);return ue}};ze.exports={entries:we(!0),values:we(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/classof");ze.exports=fe?{}.toString:function(){return"[object "+me(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-object"),Se=fe.TypeError;ze.exports=function(Le,ve){var we,de;if(ve==="string"&&ke(we=Le.toString)&&!Ce(de=me(we,Le))||ke(we=Le.valueOf)&&!Ce(de=me(we,Le))||ve!=="string"&&ke(we=Le.toString)&&!Ce(de=me(we,Le)))return de;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,ze,De){var fe=oe("../internals/get-built-in"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-get-own-property-names"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/an-object"),Le=me([].concat);ze.exports=fe("Reflect","ownKeys")||function(we){var de=ke.f(Se(we)),z=Ce.f;return z?Le(de,z(we)):de}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(oe,ze,De){var fe=oe("../internals/global");ze.exports=fe},{"../internals/global":163}],214:[function(oe,ze,De){ze.exports=function(fe){try{return{error:!1,value:fe()}}catch(me){return{error:!0,value:me}}}},{}],215:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/promise-native-constructor"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inspect-source"),Le=oe("../internals/well-known-symbol"),ve=oe("../internals/engine-is-browser"),we=oe("../internals/is-pure"),de=oe("../internals/engine-v8-version"),z=me&&me.prototype,ee=Le("species"),ae=!1,ie=ke(fe.PromiseRejectionEvent),le=Ce("Promise",function(){var ue=Se(me),ge=ue!==String(me);if(!ge&&de===66||we&&!(z.catch&&z.finally))return!0;if(de>=51&&/native code/.test(ue))return!1;var Pe=new me(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},Be=Pe.constructor={};return Be[ee]=je,ae=Pe.then(function(){})instanceof je,ae?!ge&&ve&&!ie:!0});ze.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:ae}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(oe,ze,De){var fe=oe("../internals/global");ze.exports=fe.Promise},{"../internals/global":163}],217:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/is-object"),ke=oe("../internals/new-promise-capability");ze.exports=function(Ce,Se){if(fe(Ce),me(Se)&&Se.constructor===Ce)return Se;var Le=ke.f(Ce),ve=Le.resolve;return ve(Se),Le.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,ze,De){var fe=oe("../internals/promise-native-constructor"),me=oe("../internals/check-correctness-of-iteration"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR;ze.exports=ke||!me(function(Ce){fe.all(Ce).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(oe,ze,De){var fe=oe("../internals/object-define-property").f;ze.exports=function(me,ke,Ce){Ce in me||fe(me,Ce,{configurable:!0,get:function(){return ke[Ce]},set:function(Se){ke[Ce]=Se}})}},{"../internals/object-define-property":198}],220:[function(oe,ze,De){var fe=function(){this.head=null,this.tail=null};fe.prototype={add:function(me){var ke={item:me,next:null};this.head?this.tail.next=ke:this.head=ke,this.tail=ke},get:function(){var me=this.head;if(me)return this.head=me.next,this.tail===me&&(this.tail=null),me.item}},ze.exports=fe},{}],221:[function(oe,ze,De){var fe=oe("../internals/redefine");ze.exports=function(me,ke,Ce){for(var Se in ke)fe(me,Se,ke[Se],Ce);return me}},{"../internals/redefine":222}],222:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/create-non-enumerable-property"),Se=oe("../internals/set-global"),Le=oe("../internals/inspect-source"),ve=oe("../internals/internal-state"),we=oe("../internals/function-name").CONFIGURABLE,de=ve.get,z=ve.enforce,ee=String(String).split("String");(ze.exports=function(ae,ie,le,ue){var ge=ue?!!ue.unsafe:!1,Pe=ue?!!ue.enumerable:!1,je=ue?!!ue.noTargetGet:!1,Be=ue&&ue.name!==void 0?ue.name:ie,Fe;if(me(le)&&(String(Be).slice(0,7)==="Symbol("&&(Be="["+String(Be).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ke(le,"name")||we&&le.name!==Be)&&Ce(le,"name",Be),Fe=z(le),Fe.source||(Fe.source=ee.join(typeof Be=="string"?Be:""))),ae===fe){Pe?ae[ie]=le:Se(ie,le);return}else ge?!je&&ae[ie]&&(Pe=!0):delete ae[ie];Pe?ae[ie]=le:Ce(ae,ie,le)})(Function.prototype,"toString",function(){return me(this)&&de(this).source||Le(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/an-object"),Ce=oe("../internals/is-callable"),Se=oe("../internals/classof-raw"),Le=oe("../internals/regexp-exec"),ve=fe.TypeError;ze.exports=function(we,de){var z=we.exec;if(Ce(z)){var ee=me(z,we,de);return ee!==null&&ke(ee),ee}if(Se(we)==="RegExp")return me(Le,we,de);throw ve("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/to-string"),Ce=oe("../internals/regexp-flags"),Se=oe("../internals/regexp-sticky-helpers"),Le=oe("../internals/shared"),ve=oe("../internals/object-create"),we=oe("../internals/internal-state").get,de=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),ee=Le("native-string-replace",String.prototype.replace),ae=RegExp.prototype.exec,ie=ae,le=me("".charAt),ue=me("".indexOf),ge=me("".replace),Pe=me("".slice),je=function(){var Ae=/a/,Re=/b*/g;return fe(ae,Ae,"a"),fe(ae,Re,"a"),Ae.lastIndex!==0||Re.lastIndex!==0}(),Be=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Ne=je||Fe||Be||de||z;Ne&&(ie=function(Re){var We=this,Ye=we(We),Ue=ke(Re),Ve=Ye.raw,ot,st,ct,Pt,$e,nt,yt;if(Ve)return Ve.lastIndex=We.lastIndex,ot=fe(ie,Ve,Ue),We.lastIndex=Ve.lastIndex,ot;var xt=Ye.groups,wt=Be&&We.sticky,dt=fe(Ce,We),ft=We.source,ut=0,Et=Ue;if(wt&&(dt=ge(dt,"y",""),ue(dt,"g")===-1&&(dt+="g"),Et=Pe(Ue,We.lastIndex),We.lastIndex>0&&(!We.multiline||We.multiline&&le(Ue,We.lastIndex-1)!==`
`)&&(ft="(?: "+ft+")",Et=" "+Et,ut++),st=new RegExp("^(?:"+ft+")",dt)),Fe&&(st=new RegExp("^"+ft+"$(?!\\s)",dt)),je&&(ct=We.lastIndex),Pt=fe(ae,wt?st:We,Et),wt?Pt?(Pt.input=Pe(Pt.input,ut),Pt[0]=Pe(Pt[0],ut),Pt.index=We.lastIndex,We.lastIndex+=Pt[0].length):We.lastIndex=0:je&&Pt&&(We.lastIndex=We.global?Pt.index+Pt[0].length:ct),Fe&&Pt&&Pt.length>1&&fe(ee,Pt[0],st,function(){for($e=1;$e<arguments.length-2;$e++)arguments[$e]===void 0&&(Pt[$e]=void 0)}),Pt&&xt)for(Pt.groups=nt=ve(null),$e=0;$e<xt.length;$e++)yt=xt[$e],nt[yt[0]]=Pt[yt[1]];return Pt}),ze.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(oe,ze,De){"use strict";var fe=oe("../internals/an-object");ze.exports=function(){var me=fe(this),ke="";return me.hasIndices&&(ke+="d"),me.global&&(ke+="g"),me.ignoreCase&&(ke+="i"),me.multiline&&(ke+="m"),me.dotAll&&(ke+="s"),me.unicode&&(ke+="u"),me.sticky&&(ke+="y"),ke}},{"../internals/an-object":101}],226:[function(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/has-own-property"),ke=oe("../internals/object-is-prototype-of"),Ce=oe("../internals/regexp-flags"),Se=RegExp.prototype;ze.exports=function(Le){var ve=Le.flags;return ve===void 0&&!("flags"in Se)&&!me(Le,"flags")&&ke(Se,Le)?fe(Ce,Le):ve}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp,Ce=fe(function(){var ve=ke("a","y");return ve.lastIndex=2,ve.exec("abcd")!=null}),Se=Ce||fe(function(){return!ke("a","y").sticky}),Le=Ce||fe(function(){var ve=ke("^r","gy");return ve.lastIndex=2,ve.exec("str")!=null});ze.exports={BROKEN_CARET:Le,MISSED_STICKY:Se,UNSUPPORTED_Y:Ce}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;ze.exports=fe(function(){var Ce=ke(".","s");return!(Ce.dotAll&&Ce.exec(`
`)&&Ce.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;ze.exports=fe(function(){var Ce=ke("(?<a>b)","g");return Ce.exec("b").groups.a!=="b"||"b".replace(Ce,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.TypeError;ze.exports=function(ke){if(ke==null)throw me("Can't call method on "+ke);return ke}},{"../internals/global":163}],231:[function(oe,ze,De){ze.exports=Object.is||function(me,ke){return me===ke?me!==0||1/me===1/ke:me!=me&&ke!=ke}},{}],232:[function(oe,ze,De){var fe=oe("../internals/global"),me=Object.defineProperty;ze.exports=function(ke,Ce){try{me(fe,ke,{value:Ce,configurable:!0,writable:!0})}catch(Se){fe[ke]=Ce}return Ce}},{"../internals/global":163}],233:[function(oe,ze,De){"use strict";var fe=oe("../internals/get-built-in"),me=oe("../internals/object-define-property"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/descriptors"),Se=ke("species");ze.exports=function(Le){var ve=fe(Le),we=me.f;Ce&&ve&&!ve[Se]&&we(ve,Se,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(oe,ze,De){var fe=oe("../internals/object-define-property").f,me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol"),Ce=ke("toStringTag");ze.exports=function(Se,Le,ve){Se&&!ve&&(Se=Se.prototype),Se&&!me(Se,Ce)&&fe(Se,Ce,{configurable:!0,value:Le})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,ze,De){var fe=oe("../internals/shared"),me=oe("../internals/uid"),ke=fe("keys");ze.exports=function(Ce){return ke[Ce]||(ke[Ce]=me(Ce))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/set-global"),ke="__core-js_shared__",Ce=fe[ke]||me(ke,{});ze.exports=Ce},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,ze,De){var fe=oe("../internals/is-pure"),me=oe("../internals/shared-store");(ze.exports=function(ke,Ce){return me[ke]||(me[ke]=Ce!==void 0?Ce:{})})("versions",[]).push({version:"3.22.1",mode:fe?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/a-constructor"),ke=oe("../internals/well-known-symbol"),Ce=ke("species");ze.exports=function(Se,Le){var ve=fe(Se).constructor,we;return ve===void 0||(we=fe(ve)[Ce])==null?Le:me(we)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-string"),Ce=oe("../internals/require-object-coercible"),Se=fe("".charAt),Le=fe("".charCodeAt),ve=fe("".slice),we=function(de){return function(z,ee){var ae=ke(Ce(z)),ie=me(ee),le=ae.length,ue,ge;return ie<0||ie>=le?de?"":void 0:(ue=Le(ae,ie),ue<55296||ue>56319||ie+1===le||(ge=Le(ae,ie+1))<56320||ge>57343?de?Se(ae,ie):ue:de?ve(ae,ie,ie+2):(ue-55296<<10)+(ge-56320)+65536)}};ze.exports={codeAt:we(!1),charAt:we(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(oe,ze,De){var fe=oe("../internals/function-name").PROPER,me=oe("../internals/fails"),ke=oe("../internals/whitespaces"),Ce="\u200B\x85\u180E";ze.exports=function(Se){return me(function(){return!!ke[Se]()||Ce[Se]()!==Ce||fe&&ke[Se].name!==Se})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/require-object-coercible"),ke=oe("../internals/to-string"),Ce=oe("../internals/whitespaces"),Se=fe("".replace),Le="["+Ce+"]",ve=RegExp("^"+Le+Le+"*"),we=RegExp(Le+Le+"*$"),de=function(z){return function(ee){var ae=ke(me(ee));return z&1&&(ae=Se(ae,ve,"")),z&2&&(ae=Se(ae,we,"")),ae}};ze.exports={start:de(1),end:de(2),trim:de(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/get-built-in"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/redefine");ze.exports=function(){var Se=me("Symbol"),Le=Se&&Se.prototype,ve=Le&&Le.valueOf,we=ke("toPrimitive");Le&&!Le[we]&&Ce(Le,we,function(de){return fe(ve,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/function-bind-context"),Ce=oe("../internals/is-callable"),Se=oe("../internals/has-own-property"),Le=oe("../internals/fails"),ve=oe("../internals/html"),we=oe("../internals/array-slice"),de=oe("../internals/document-create-element"),z=oe("../internals/validate-arguments-length"),ee=oe("../internals/engine-is-ios"),ae=oe("../internals/engine-is-node"),ie=fe.setImmediate,le=fe.clearImmediate,ue=fe.process,ge=fe.Dispatch,Pe=fe.Function,je=fe.MessageChannel,Be=fe.String,Fe=0,Ne={},Ae="onreadystatechange",Re,We,Ye,Ue;try{Re=fe.location}catch(Pt){}var Ve=function(Pt){if(Se(Ne,Pt)){var $e=Ne[Pt];delete Ne[Pt],$e()}},ot=function(Pt){return function(){Ve(Pt)}},st=function(Pt){Ve(Pt.data)},ct=function(Pt){fe.postMessage(Be(Pt),Re.protocol+"//"+Re.host)};(!ie||!le)&&(ie=function($e){z(arguments.length,1);var nt=Ce($e)?$e:Pe($e),yt=we(arguments,1);return Ne[++Fe]=function(){me(nt,void 0,yt)},We(Fe),Fe},le=function($e){delete Ne[$e]},ae?We=function(Pt){ue.nextTick(ot(Pt))}:ge&&ge.now?We=function(Pt){ge.now(ot(Pt))}:je&&!ee?(Ye=new je,Ue=Ye.port2,Ye.port1.onmessage=st,We=ke(Ue.postMessage,Ue)):fe.addEventListener&&Ce(fe.postMessage)&&!fe.importScripts&&Re&&Re.protocol!=="file:"&&!Le(ct)?(We=ct,fe.addEventListener("message",st,!1)):Ae in de("script")?We=function(Pt){ve.appendChild(de("script"))[Ae]=function(){ve.removeChild(this),Ve(Pt)}}:We=function(Pt){setTimeout(ot(Pt),0)}),ze.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,ze,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.max,ke=Math.min;ze.exports=function(Ce,Se){var Le=fe(Ce);return Le<0?me(Le+Se,0):ke(Le,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-length"),Ce=fe.RangeError;ze.exports=function(Se){if(Se===void 0)return 0;var Le=me(Se),ve=ke(Le);if(Le!==ve)throw Ce("Wrong length or index");return ve}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,ze,De){var fe=oe("../internals/indexed-object"),me=oe("../internals/require-object-coercible");ze.exports=function(ke){return fe(me(ke))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,ze,De){var fe=Math.ceil,me=Math.floor;ze.exports=function(ke){var Ce=+ke;return Ce!==Ce||Ce===0?0:(Ce>0?me:fe)(Ce)}},{}],249:[function(oe,ze,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.min;ze.exports=function(ke){return ke>0?me(fe(ke),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/require-object-coercible"),ke=fe.Object;ze.exports=function(Ce){return ke(me(Ce))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-positive-integer"),ke=fe.RangeError;ze.exports=function(Ce,Se){var Le=me(Ce);if(Le%Se)throw ke("Wrong offset");return Le}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=fe.RangeError;ze.exports=function(Ce){var Se=me(Ce);if(Se<0)throw ke("The argument can't be less than 0");return Se}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-object"),Ce=oe("../internals/is-symbol"),Se=oe("../internals/get-method"),Le=oe("../internals/ordinary-to-primitive"),ve=oe("../internals/well-known-symbol"),we=fe.TypeError,de=ve("toPrimitive");ze.exports=function(z,ee){if(!ke(z)||Ce(z))return z;var ae=Se(z,de),ie;if(ae){if(ee===void 0&&(ee="default"),ie=me(ae,z,ee),!ke(ie)||Ce(ie))return ie;throw we("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),Le(z,ee)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(oe,ze,De){var fe=oe("../internals/to-primitive"),me=oe("../internals/is-symbol");ze.exports=function(ke){var Ce=fe(ke,"string");return me(Ce)?Ce:Ce+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("toStringTag"),ke={};ke[me]="z",ze.exports=String(ke)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/classof"),ke=fe.String;ze.exports=function(Ce){if(me(Ce)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ke(Ce)}},{"../internals/classof":124,"../internals/global":163}],257:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.String;ze.exports=function(ke){try{return me(ke)}catch(Ce){return"Object"}}},{"../internals/global":163}],258:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/descriptors"),Se=oe("../internals/typed-array-constructors-require-wrappers"),Le=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-buffer"),we=oe("../internals/an-instance"),de=oe("../internals/create-property-descriptor"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/is-integral-number"),ae=oe("../internals/to-length"),ie=oe("../internals/to-index"),le=oe("../internals/to-offset"),ue=oe("../internals/to-property-key"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/classof"),je=oe("../internals/is-object"),Be=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Ne=oe("../internals/object-is-prototype-of"),Ae=oe("../internals/object-set-prototype-of"),Re=oe("../internals/object-get-own-property-names").f,We=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ue=oe("../internals/set-species"),Ve=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),st=oe("../internals/internal-state"),ct=oe("../internals/inherit-if-required"),Pt=st.get,$e=st.set,nt=Ve.f,yt=ot.f,xt=Math.round,wt=me.RangeError,dt=ve.ArrayBuffer,ft=dt.prototype,ut=ve.DataView,Et=Le.NATIVE_ARRAY_BUFFER_VIEWS,mt=Le.TYPED_ARRAY_CONSTRUCTOR,vt=Le.TYPED_ARRAY_TAG,kt=Le.TypedArray,pt=Le.TypedArrayPrototype,Qe=Le.aTypedArrayConstructor,Ke=Le.isTypedArray,xe="BYTES_PER_ELEMENT",Me="Wrong length",Ze=function(St,Ct){Qe(St);for(var Nt=0,Ot=Ct.length,Rt=new St(Ot);Ot>Nt;)Rt[Nt]=Ct[Nt++];return Rt},tt=function(St,Ct){nt(St,Ct,{get:function(){return Pt(this)[Ct]}})},Ie=function(St){var Ct;return Ne(ft,St)||(Ct=Pe(St))=="ArrayBuffer"||Ct=="SharedArrayBuffer"},_e=function(St,Ct){return Ke(St)&&!Be(Ct)&&Ct in St&&ee(+Ct)&&Ct>=0},He=function(Ct,Nt){return Nt=ue(Nt),_e(Ct,Nt)?de(2,Ct[Nt]):yt(Ct,Nt)},rt=function(Ct,Nt,Ot){return Nt=ue(Nt),_e(Ct,Nt)&&je(Ot)&&ge(Ot,"value")&&!ge(Ot,"get")&&!ge(Ot,"set")&&!Ot.configurable&&(!ge(Ot,"writable")||Ot.writable)&&(!ge(Ot,"enumerable")||Ot.enumerable)?(Ct[Nt]=Ot.value,Ct):nt(Ct,Nt,Ot)};Ce?(Et||(ot.f=He,Ve.f=rt,tt(pt,"buffer"),tt(pt,"byteOffset"),tt(pt,"byteLength"),tt(pt,"length")),fe({target:"Object",stat:!0,forced:!Et},{getOwnPropertyDescriptor:He,defineProperty:rt}),ze.exports=function(St,Ct,Nt){var Ot=St.match(/\d+$/)[0]/8,Rt=St+(Nt?"Clamped":"")+"Array",$t="get"+St,qt="set"+St,rn=me[Rt],Ht=rn,sn=Ht&&Ht.prototype,tn={},Ut=function(Dn,Qn){var Pr=Pt(Dn);return Pr.view[$t](Qn*Ot+Pr.byteOffset,!0)},En=function(Dn,Qn,Pr){var Yn=Pt(Dn);Nt&&(Pr=(Pr=xt(Pr))<0?0:Pr>255?255:Pr&255),Yn.view[qt](Qn*Ot+Yn.byteOffset,Pr,!0)},bn=function(Dn,Qn){nt(Dn,Qn,{get:function(){return Ut(this,Qn)},set:function(Pr){return En(this,Qn,Pr)},enumerable:!0})};Et?Se&&(Ht=Ct(function(Dn,Qn,Pr,Yn){return we(Dn,sn),ct(function(){return je(Qn)?Ie(Qn)?Yn!==void 0?new rn(Qn,le(Pr,Ot),Yn):Pr!==void 0?new rn(Qn,le(Pr,Ot)):new rn(Qn):Ke(Qn)?Ze(Ht,Qn):ke(We,Ht,Qn):new rn(ie(Qn))}(),Dn,Ht)}),Ae&&Ae(Ht,kt),Ye(Re(rn),function(Dn){Dn in Ht||z(Ht,Dn,rn[Dn])}),Ht.prototype=sn):(Ht=Ct(function(Dn,Qn,Pr,Yn){we(Dn,sn);var Mr=0,Ur=0,_r,ni,Li;if(!je(Qn))Li=ie(Qn),ni=Li*Ot,_r=new dt(ni);else if(Ie(Qn)){_r=Qn,Ur=le(Pr,Ot);var _i=Qn.byteLength;if(Yn===void 0){if(_i%Ot||(ni=_i-Ur,ni<0))throw wt(Me)}else if(ni=ae(Yn)*Ot,ni+Ur>_i)throw wt(Me);Li=ni/Ot}else return Ke(Qn)?Ze(Ht,Qn):ke(We,Ht,Qn);for($e(Dn,{buffer:_r,byteOffset:Ur,byteLength:ni,length:Li,view:new ut(_r)});Mr<Li;)bn(Dn,Mr++)}),Ae&&Ae(Ht,kt),sn=Ht.prototype=Fe(pt)),sn.constructor!==Ht&&z(sn,"constructor",Ht),z(sn,mt,Ht),vt&&z(sn,vt,Rt),tn[Rt]=Ht,fe({global:!0,forced:Ht!=rn,sham:!Et},tn),xe in Ht||z(Ht,xe,Ot),xe in sn||z(sn,xe,Ot),Ue(Rt)}):ze.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/check-correctness-of-iteration"),Ce=oe("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,Se=fe.ArrayBuffer,Le=fe.Int8Array;ze.exports=!Ce||!me(function(){Le(1)})||!me(function(){new Le(-1)})||!ke(function(ve){new Le,new Le(null),new Le(1.5),new Le(ve)},!0)||me(function(){return new Le(new Se(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(oe,ze,De){var fe=oe("../internals/array-from-constructor-and-list"),me=oe("../internals/typed-array-species-constructor");ze.exports=function(ke,Ce){return fe(me(ke),Ce)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(oe,ze,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-call"),ke=oe("../internals/a-constructor"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Le=oe("../internals/get-iterator"),ve=oe("../internals/get-iterator-method"),we=oe("../internals/is-array-iterator-method"),de=oe("../internals/array-buffer-view-core").aTypedArrayConstructor;ze.exports=function(ee){var ae=ke(this),ie=Ce(ee),le=arguments.length,ue=le>1?arguments[1]:void 0,ge=ue!==void 0,Pe=ve(ie),je,Be,Fe,Ne,Ae,Re;if(Pe&&!we(Pe))for(Ae=Le(ie,Pe),Re=Ae.next,ie=[];!(Ne=me(Re,Ae)).done;)ie.push(Ne.value);for(ge&&le>2&&(ue=fe(ue,arguments[2])),Be=Se(ie),Fe=new(de(ae))(Be),je=0;Be>je;je++)Fe[je]=ge?ue(ie[je],je):ie[je];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(oe,ze,De){var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/species-constructor"),ke=fe.TYPED_ARRAY_CONSTRUCTOR,Ce=fe.aTypedArrayConstructor;ze.exports=function(Se){return Ce(me(Se,Se[ke]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=0,ke=Math.random(),Ce=fe(1 .toString);ze.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+Ce(++me+ke,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,ze,De){var fe=oe("../internals/native-symbol");ze.exports=fe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails");ze.exports=fe&&me(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.TypeError;ze.exports=function(ke,Ce){if(ke<Ce)throw me("Not enough arguments");return ke}},{"../internals/global":163}],267:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol");De.f=fe},{"../internals/well-known-symbol":268}],268:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/shared"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/uid"),Se=oe("../internals/native-symbol"),Le=oe("../internals/use-symbol-as-uid"),ve=me("wks"),we=fe.Symbol,de=we&&we.for,z=Le?we:we&&we.withoutSetter||Ce;ze.exports=function(ee){if(!ke(ve,ee)||!(Se||typeof ve[ee]=="string")){var ae="Symbol."+ee;Se&&ke(we,ee)?ve[ee]=we[ee]:Le&&de?ve[ee]=de(ae):ve[ee]=z(ae)}return ve[ee]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(oe,ze,De){ze.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/array-buffer"),Ce=oe("../internals/set-species"),Se="ArrayBuffer",Le=ke[Se],ve=me[Se];fe({global:!0,forced:ve!==Le},{ArrayBuffer:Le}),Ce(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/array-buffer"),Se=oe("../internals/an-object"),Le=oe("../internals/to-absolute-index"),ve=oe("../internals/to-length"),we=oe("../internals/species-constructor"),de=Ce.ArrayBuffer,z=Ce.DataView,ee=z.prototype,ae=me(de.prototype.slice),ie=me(ee.getUint8),le=me(ee.setUint8),ue=ke(function(){return!new de(2).slice(1,void 0).byteLength});fe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(Pe,je){if(ae&&je===void 0)return ae(Se(this),Pe);for(var Be=Se(this).byteLength,Fe=Le(Pe,Be),Ne=Le(je===void 0?Be:je,Be),Ae=new(we(this,de))(ve(Ne-Fe)),Re=new z(this),We=new z(Ae),Ye=0;Fe<Ne;)le(We,Ye++,ie(Re,Fe++));return Ae}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/fails"),Ce=oe("../internals/is-array"),Se=oe("../internals/is-object"),Le=oe("../internals/to-object"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/create-property"),de=oe("../internals/array-species-create"),z=oe("../internals/array-method-has-species-support"),ee=oe("../internals/well-known-symbol"),ae=oe("../internals/engine-v8-version"),ie=ee("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",ge=me.TypeError,Pe=ae>=51||!ke(function(){var Ne=[];return Ne[ie]=!1,Ne.concat()[0]!==Ne}),je=z("concat"),Be=function(Ne){if(!Se(Ne))return!1;var Ae=Ne[ie];return Ae!==void 0?!!Ae:Ce(Ne)},Fe=!Pe||!je;fe({target:"Array",proto:!0,forced:Fe},{concat:function(Ae){var Re=Le(this),We=de(Re,0),Ye=0,Ue,Ve,ot,st,ct;for(Ue=-1,ot=arguments.length;Ue<ot;Ue++)if(ct=Ue===-1?Re:arguments[Ue],Be(ct)){if(st=ve(ct),Ye+st>le)throw ge(ue);for(Ve=0;Ve<st;Ve++,Ye++)Ve in ct&&we(We,Ye,ct[Ve])}else{if(Ye>=le)throw ge(ue);we(We,Ye++,ct)}return We.length=Ye,We}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/array-fill"),ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{fill:me}),ke("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/array-method-has-species-support"),Ce=ke("filter");fe({target:"Array",proto:!0,forced:!Ce},{filter:function(Le){return me(this,Le,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").find,ke=oe("../internals/add-to-unscopables"),Ce="find",Se=!0;Ce in[]&&Array(1)[Ce](function(){Se=!1}),fe({target:"Array",proto:!0,forced:Se},{find:function(ve){return me(this,ve,arguments.length>1?arguments[1]:void 0)}}),ke(Ce)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/array-from"),ke=oe("../internals/check-correctness-of-iteration"),Ce=!ke(function(Se){Array.from(Se)});fe({target:"Array",stat:!0,forced:Ce},{from:me})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-includes").includes,ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{includes:function(Se){return me(this,Se,arguments.length>1?arguments[1]:void 0)}}),ke("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-indexed-object"),me=oe("../internals/add-to-unscopables"),ke=oe("../internals/iterators"),Ce=oe("../internals/internal-state"),Se=oe("../internals/object-define-property").f,Le=oe("../internals/define-iterator"),ve=oe("../internals/is-pure"),we=oe("../internals/descriptors"),de="Array Iterator",z=Ce.set,ee=Ce.getterFor(de);ze.exports=Le(Array,"Array",function(ie,le){z(this,{type:de,target:fe(ie),index:0,kind:le})},function(){var ie=ee(this),le=ie.target,ue=ie.kind,ge=ie.index++;return!le||ge>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:ge,done:!1}:ue=="values"?{value:le[ge],done:!1}:{value:[ge,le[ge]],done:!1}},"values");var ae=ke.Arguments=ke.Array;if(me("keys"),me("values"),me("entries"),!ve&&we&&ae.name!=="values")try{Se(ae,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/array-method-is-strict"),Le=me([].join),ve=ke!=Object,we=Se("join",",");fe({target:"Array",proto:!0,forced:ve||!we},{join:function(z){return Le(Ce(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").map,ke=oe("../internals/array-method-has-species-support"),Ce=ke("map");fe({target:"Array",proto:!0,forced:!Ce},{map:function(Le){return me(this,Le,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/is-array"),Ce=oe("../internals/is-constructor"),Se=oe("../internals/is-object"),Le=oe("../internals/to-absolute-index"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/to-indexed-object"),de=oe("../internals/create-property"),z=oe("../internals/well-known-symbol"),ee=oe("../internals/array-method-has-species-support"),ae=oe("../internals/array-slice"),ie=ee("slice"),le=z("species"),ue=me.Array,ge=Math.max;fe({target:"Array",proto:!0,forced:!ie},{slice:function(je,Be){var Fe=we(this),Ne=ve(Fe),Ae=Le(je,Ne),Re=Le(Be===void 0?Ne:Be,Ne),We,Ye,Ue;if(ke(Fe)&&(We=Fe.constructor,Ce(We)&&(We===ue||ke(We.prototype))?We=void 0:Se(We)&&(We=We[le],We===null&&(We=void 0)),We===ue||We===void 0))return ae(Fe,Ae,Re);for(Ye=new(We===void 0?ue:We)(ge(Re-Ae,0)),Ue=0;Ae<Re;Ae++,Ue++)Ae in Fe&&de(Ye,Ue,Fe[Ae]);return Ye.length=Ue,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/a-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Le=oe("../internals/to-string"),ve=oe("../internals/fails"),we=oe("../internals/array-sort"),de=oe("../internals/array-method-is-strict"),z=oe("../internals/engine-ff-version"),ee=oe("../internals/engine-is-ie-or-edge"),ae=oe("../internals/engine-v8-version"),ie=oe("../internals/engine-webkit-version"),le=[],ue=me(le.sort),ge=me(le.push),Pe=ve(function(){le.sort(void 0)}),je=ve(function(){le.sort(null)}),Be=de("sort"),Fe=!ve(function(){if(ae)return ae<70;if(!(z&&z>3)){if(ee)return!0;if(ie)return ie<603;var Re="",We,Ye,Ue,Ve;for(We=65;We<76;We++){switch(Ye=String.fromCharCode(We),We){case 66:case 69:case 70:case 72:Ue=3;break;case 68:case 71:Ue=4;break;default:Ue=2}for(Ve=0;Ve<47;Ve++)le.push({k:Ye+Ve,v:Ue})}for(le.sort(function(ot,st){return st.v-ot.v}),Ve=0;Ve<le.length;Ve++)Ye=le[Ve].k.charAt(0),Re.charAt(Re.length-1)!==Ye&&(Re+=Ye);return Re!=="DGBEFHACIJK"}}),Ne=Pe||!je||!Be||!Fe,Ae=function(Re){return function(We,Ye){return Ye===void 0?-1:We===void 0?1:Re!==void 0?+Re(We,Ye)||0:Le(We)>Le(Ye)?1:-1}};fe({target:"Array",proto:!0,forced:Ne},{sort:function(We){We!==void 0&&ke(We);var Ye=Ce(this);if(Fe)return We===void 0?ue(Ye):ue(Ye,We);var Ue=[],Ve=Se(Ye),ot,st;for(st=0;st<Ve;st++)st in Ye&&ge(Ue,Ye[st]);for(we(Ue,Ae(We)),ot=Ue.length,st=0;st<ot;)Ye[st]=Ue[st++];for(;st<Ve;)delete Ye[st++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/to-integer-or-infinity"),Se=oe("../internals/length-of-array-like"),Le=oe("../internals/to-object"),ve=oe("../internals/array-species-create"),we=oe("../internals/create-property"),de=oe("../internals/array-method-has-species-support"),z=de("splice"),ee=me.TypeError,ae=Math.max,ie=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";fe({target:"Array",proto:!0,forced:!z},{splice:function(Pe,je){var Be=Le(this),Fe=Se(Be),Ne=ke(Pe,Fe),Ae=arguments.length,Re,We,Ye,Ue,Ve,ot;if(Ae===0?Re=We=0:Ae===1?(Re=0,We=Fe-Ne):(Re=Ae-2,We=ie(ae(Ce(je),0),Fe-Ne)),Fe+Re-We>le)throw ee(ue);for(Ye=ve(Be,We),Ue=0;Ue<We;Ue++)Ve=Ne+Ue,Ve in Be&&we(Ye,Ue,Be[Ve]);if(Ye.length=We,Re<We){for(Ue=Ne;Ue<Fe-We;Ue++)Ve=Ue+We,ot=Ue+Re,Ve in Be?Be[ot]=Be[Ve]:delete Be[ot];for(Ue=Fe;Ue>Fe-We+Re;Ue--)delete Be[Ue-1]}else if(Re>We)for(Ue=Fe-We;Ue>Ne;Ue--)Ve=Ue+We-1,ot=Ue+Re-1,Ve in Be?Be[ot]=Be[Ve]:delete Be[ot];for(Ue=0;Ue<Re;Ue++)Be[Ue+Ne]=arguments[Ue+2];return Be.length=Fe-We+Re,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-name").EXISTS,ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/object-define-property").f,Se=Function.prototype,Le=ke(Se.toString),ve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,we=ke(ve.exec),de="name";fe&&!me&&Ce(Se,de,{configurable:!0,get:function(){try{return we(ve,Le(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/function-apply"),Ce=oe("../internals/function-call"),Se=oe("../internals/function-uncurry-this"),Le=oe("../internals/fails"),ve=oe("../internals/is-array"),we=oe("../internals/is-callable"),de=oe("../internals/is-object"),z=oe("../internals/is-symbol"),ee=oe("../internals/array-slice"),ae=oe("../internals/native-symbol"),ie=me("JSON","stringify"),le=Se(/./.exec),ue=Se("".charAt),ge=Se("".charCodeAt),Pe=Se("".replace),je=Se(1 .toString),Be=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Ne=/^[\uDC00-\uDFFF]$/,Ae=!ae||Le(function(){var Ue=me("Symbol")();return ie([Ue])!="[null]"||ie({a:Ue})!="{}"||ie(Object(Ue))!="{}"}),Re=Le(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),We=function(Ue,Ve){var ot=ee(arguments),st=Ve;if(!(!de(Ve)&&Ue===void 0||z(Ue)))return ve(Ve)||(Ve=function(ct,Pt){if(we(st)&&(Pt=Ce(st,this,ct,Pt)),!z(Pt))return Pt}),ot[1]=Ve,ke(ie,null,ot)},Ye=function(Ue,Ve,ot){var st=ue(ot,Ve-1),ct=ue(ot,Ve+1);return le(Fe,Ue)&&!le(Ne,ct)||le(Ne,Ue)&&!le(Fe,st)?"\\u"+je(ge(Ue,0),16):Ue};ie&&fe({target:"JSON",stat:!0,forced:Ae||Re},{stringify:function(Ve,ot,st){var ct=ee(arguments),Pt=ke(Ae?We:ie,null,ct);return Re&&typeof Pt=="string"?Pe(Pt,Be,Ye):Pt}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(oe,ze,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/redefine"),Le=oe("../internals/has-own-property"),ve=oe("../internals/inherit-if-required"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-symbol"),z=oe("../internals/to-primitive"),ee=oe("../internals/fails"),ae=oe("../internals/object-get-own-property-names").f,ie=oe("../internals/object-get-own-property-descriptor").f,le=oe("../internals/object-define-property").f,ue=oe("../internals/this-number-value"),ge=oe("../internals/string-trim").trim,Pe="Number",je=me[Pe],Be=je.prototype,Fe=me.TypeError,Ne=ke("".slice),Ae=ke("".charCodeAt),Re=function(st){var ct=z(st,"number");return typeof ct=="bigint"?ct:We(ct)},We=function(st){var ct=z(st,"number"),Pt,$e,nt,yt,xt,wt,dt,ft;if(de(ct))throw Fe("Cannot convert a Symbol value to a number");if(typeof ct=="string"&&ct.length>2){if(ct=ge(ct),Pt=Ae(ct,0),Pt===43||Pt===45){if($e=Ae(ct,2),$e===88||$e===120)return NaN}else if(Pt===48){switch(Ae(ct,1)){case 66:case 98:nt=2,yt=49;break;case 79:case 111:nt=8,yt=55;break;default:return+ct}for(xt=Ne(ct,2),wt=xt.length,dt=0;dt<wt;dt++)if(ft=Ae(xt,dt),ft<48||ft>yt)return NaN;return parseInt(xt,nt)}}return+ct};if(Ce(Pe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ct){var Pt=arguments.length<1?0:je(Re(ct)),$e=this;return we(Be,$e)&&ee(function(){ue($e)})?ve(Object(Pt),$e,Ye):Pt},Ue=fe?ae(je):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ve=0,ot;Ue.length>Ve;Ve++)Le(je,ot=Ue[Ve])&&!Le(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=Be,Be.constructor=Ye,Se(me,Pe,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/object-assign");fe({target:"Object",stat:!0,forced:Object.assign!==me},{assign:me})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/object-to-array").entries;fe({target:"Object",stat:!0},{entries:function(Ce){return me(Ce)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/native-symbol"),ke=oe("../internals/fails"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/to-object"),Le=!me||ke(function(){Ce.f(1)});fe({target:"Object",stat:!0,forced:Le},{getOwnPropertySymbols:function(we){var de=Ce.f;return de?de(Se(we)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/to-object"),ke=oe("../internals/object-keys"),Ce=oe("../internals/fails"),Se=Ce(function(){ke(1)});fe({target:"Object",stat:!0,forced:Se},{keys:function(ve){return ke(me(ve))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(oe,ze,De){var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/redefine"),ke=oe("../internals/object-to-string");fe||me(Object.prototype,"toString",ke,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Le=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{all:function(de){var z=this,ee=Ce.f(z),ae=ee.resolve,ie=ee.reject,le=Se(function(){var ue=ke(z.resolve),ge=[],Pe=0,je=1;Le(de,function(Be){var Fe=Pe++,Ne=!1;je++,me(ue,z,Be).then(function(Ae){Ne||(Ne=!0,ge[Fe]=Ae,--je||ae(ge))},ie)}),--je||ae(ge)});return le.error&&ie(le.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/get-built-in"),Le=oe("../internals/is-callable"),ve=oe("../internals/redefine"),we=Ce&&Ce.prototype;if(fe({target:"Promise",proto:!0,forced:ke,real:!0},{catch:function(z){return this.then(void 0,z)}}),!me&&Le(Ce)){var de=Se("Promise").prototype.catch;we.catch!==de&&ve(we,"catch",de,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/engine-is-node"),Ce=oe("../internals/global"),Se=oe("../internals/function-call"),Le=oe("../internals/redefine"),ve=oe("../internals/redefine-all"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/set-species"),ee=oe("../internals/a-callable"),ae=oe("../internals/is-callable"),ie=oe("../internals/is-object"),le=oe("../internals/an-instance"),ue=oe("../internals/species-constructor"),ge=oe("../internals/task").set,Pe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),Be=oe("../internals/perform"),Fe=oe("../internals/queue"),Ne=oe("../internals/internal-state"),Ae=oe("../internals/promise-native-constructor"),Re=oe("../internals/promise-constructor-detection"),We=oe("../internals/new-promise-capability"),Ye="Promise",Ue=Re.CONSTRUCTOR,Ve=Re.REJECTION_EVENT,ot=Re.SUBCLASSING,st=Ne.getterFor(Ye),ct=Ne.set,Pt=Ae&&Ae.prototype,$e=Ae,nt=Pt,yt=Ce.TypeError,xt=Ce.document,wt=Ce.process,dt=We.f,ft=dt,ut=!!(xt&&xt.createEvent&&Ce.dispatchEvent),Et="unhandledrejection",mt="rejectionhandled",vt=0,kt=1,pt=2,Qe=1,Ke=2,xe,Me,Ze,tt,Ie=function(qt){var rn;return ie(qt)&&ae(rn=qt.then)?rn:!1},_e=function(qt,rn){var Ht=rn.value,sn=rn.state==kt,tn=sn?qt.ok:qt.fail,Ut=qt.resolve,En=qt.reject,bn=qt.domain,Dn,Qn,Pr;try{tn?(sn||(rn.rejection===Ke&&Nt(rn),rn.rejection=Qe),tn===!0?Dn=Ht:(bn&&bn.enter(),Dn=tn(Ht),bn&&(bn.exit(),Pr=!0)),Dn===qt.promise?En(yt("Promise-chain cycle")):(Qn=Ie(Dn))?Se(Qn,Dn,Ut,En):Ut(Dn)):En(Ht)}catch(Yn){bn&&!Pr&&bn.exit(),En(Yn)}},He=function(qt,rn){qt.notified||(qt.notified=!0,Pe(function(){for(var Ht=qt.reactions,sn;sn=Ht.get();)_e(sn,qt);qt.notified=!1,rn&&!qt.rejection&&St(qt)}))},rt=function(qt,rn,Ht){var sn,tn;ut?(sn=xt.createEvent("Event"),sn.promise=rn,sn.reason=Ht,sn.initEvent(qt,!1,!0),Ce.dispatchEvent(sn)):sn={promise:rn,reason:Ht},!Ve&&(tn=Ce["on"+qt])?tn(sn):qt===Et&&je("Unhandled promise rejection",Ht)},St=function(qt){Se(ge,Ce,function(){var rn=qt.facade,Ht=qt.value,sn=Ct(qt),tn;if(sn&&(tn=Be(function(){ke?wt.emit("unhandledRejection",Ht,rn):rt(Et,rn,Ht)}),qt.rejection=ke||Ct(qt)?Ke:Qe,tn.error))throw tn.value})},Ct=function(qt){return qt.rejection!==Qe&&!qt.parent},Nt=function(qt){Se(ge,Ce,function(){var rn=qt.facade;ke?wt.emit("rejectionHandled",rn):rt(mt,rn,qt.value)})},Ot=function(qt,rn,Ht){return function(sn){qt(rn,sn,Ht)}},Rt=function(qt,rn,Ht){qt.done||(qt.done=!0,Ht&&(qt=Ht),qt.value=rn,qt.state=pt,He(qt,!0))},$t=function(qt,rn,Ht){if(!qt.done){qt.done=!0,Ht&&(qt=Ht);try{if(qt.facade===rn)throw yt("Promise can't be resolved itself");var sn=Ie(rn);sn?Pe(function(){var tn={done:!1};try{Se(sn,rn,Ot($t,tn,qt),Ot(Rt,tn,qt))}catch(Ut){Rt(tn,Ut,qt)}}):(qt.value=rn,qt.state=kt,He(qt,!1))}catch(tn){Rt({done:!1},tn,qt)}}};if(Ue&&($e=function(rn){le(this,nt),ee(rn),Se(xe,this);var Ht=st(this);try{rn(Ot($t,Ht),Ot(Rt,Ht))}catch(sn){Rt(Ht,sn)}},nt=$e.prototype,xe=function(rn){ct(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:vt,value:void 0})},xe.prototype=ve(nt,{then:function(rn,Ht){var sn=st(this),tn=dt(ue(this,$e));return sn.parent=!0,tn.ok=ae(rn)?rn:!0,tn.fail=ae(Ht)&&Ht,tn.domain=ke?wt.domain:void 0,sn.state==vt?sn.reactions.add(tn):Pe(function(){_e(tn,sn)}),tn.promise}}),Me=function(){var qt=new xe,rn=st(qt);this.promise=qt,this.resolve=Ot($t,rn),this.reject=Ot(Rt,rn)},We.f=dt=function(qt){return qt===$e||qt===Ze?new Me(qt):ft(qt)},!me&&ae(Ae)&&Pt!==Object.prototype)){tt=Pt.then,ot||Le(Pt,"then",function(rn,Ht){var sn=this;return new $e(function(tn,Ut){Se(tt,sn,tn,Ut)}).then(rn,Ht)},{unsafe:!0});try{delete Pt.constructor}catch(qt){}we&&we(Pt,nt)}fe({global:!0,wrap:!0,forced:Ue},{Promise:$e}),de($e,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(oe,ze,De){oe("../modules/es.promise.constructor"),oe("../modules/es.promise.all"),oe("../modules/es.promise.catch"),oe("../modules/es.promise.race"),oe("../modules/es.promise.reject"),oe("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Le=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{race:function(de){var z=this,ee=Ce.f(z),ae=ee.reject,ie=Se(function(){var le=ke(z.resolve);Le(de,function(ue){me(le,z,ue).then(ee.resolve,ae)})});return ie.error&&ae(ie.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/new-promise-capability"),Ce=oe("../internals/promise-constructor-detection").CONSTRUCTOR;fe({target:"Promise",stat:!0,forced:Ce},{reject:function(Le){var ve=ke.f(this);return me(ve.reject,void 0,Le),ve.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-pure"),Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Le=oe("../internals/promise-resolve"),ve=me("Promise"),we=ke&&!Se;fe({target:"Promise",stat:!0,forced:ke||Se},{resolve:function(z){return Le(we&&this===ve?Ce:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inherit-if-required"),Le=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/object-get-own-property-names").f,we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-regexp"),z=oe("../internals/to-string"),ee=oe("../internals/regexp-get-flags"),ae=oe("../internals/regexp-sticky-helpers"),ie=oe("../internals/proxy-accessor"),le=oe("../internals/redefine"),ue=oe("../internals/fails"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),Be=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Ne=oe("../internals/regexp-unsupported-ncg"),Ae=Be("match"),Re=me.RegExp,We=Re.prototype,Ye=me.SyntaxError,Ue=ke(We.exec),Ve=ke("".charAt),ot=ke("".replace),st=ke("".indexOf),ct=ke("".slice),Pt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,$e=/a/g,nt=/a/g,yt=new Re($e)!==$e,xt=ae.MISSED_STICKY,wt=ae.UNSUPPORTED_Y,dt=fe&&(!yt||xt||Fe||Ne||ue(function(){return nt[Ae]=!1,Re($e)!=$e||Re(nt)==nt||Re($e,"i")!="/a/i"})),ft=function(kt){for(var pt=kt.length,Qe=0,Ke="",xe=!1,Me;Qe<=pt;Qe++){if(Me=Ve(kt,Qe),Me==="\\"){Ke+=Me+Ve(kt,++Qe);continue}!xe&&Me==="."?Ke+="[\\s\\S]":(Me==="["?xe=!0:Me==="]"&&(xe=!1),Ke+=Me)}return Ke},ut=function(kt){for(var pt=kt.length,Qe=0,Ke="",xe=[],Me={},Ze=!1,tt=!1,Ie=0,_e="",He;Qe<=pt;Qe++){if(He=Ve(kt,Qe),He==="\\")He=He+Ve(kt,++Qe);else if(He==="]")Ze=!1;else if(!Ze)switch(!0){case He==="[":Ze=!0;break;case He==="(":Ue(Pt,ct(kt,Qe+1))&&(Qe+=2,tt=!0),Ke+=He,Ie++;continue;case(He===">"&&tt):if(_e===""||ge(Me,_e))throw new Ye("Invalid capture group name");Me[_e]=!0,xe[xe.length]=[_e,Ie],tt=!1,_e="";continue}tt?_e+=He:Ke+=He}return[Ke,xe]};if(Ce("RegExp",dt)){for(var Et=function(pt,Qe){var Ke=we(We,this),xe=de(pt),Me=Qe===void 0,Ze=[],tt=pt,Ie,_e,He,rt,St,Ct;if(!Ke&&xe&&Me&&pt.constructor===Et)return pt;if((xe||we(We,pt))&&(pt=pt.source,Me&&(Qe=ee(tt))),pt=pt===void 0?"":z(pt),Qe=Qe===void 0?"":z(Qe),tt=pt,Fe&&"dotAll"in $e&&(_e=!!Qe&&st(Qe,"s")>-1,_e&&(Qe=ot(Qe,/s/g,""))),Ie=Qe,xt&&"sticky"in $e&&(He=!!Qe&&st(Qe,"y")>-1,He&&wt&&(Qe=ot(Qe,/y/g,""))),Ne&&(rt=ut(pt),pt=rt[0],Ze=rt[1]),St=Se(Re(pt,Qe),Ke?this:We,Et),(_e||He||Ze.length)&&(Ct=Pe(St),_e&&(Ct.dotAll=!0,Ct.raw=Et(ft(pt),Ie)),He&&(Ct.sticky=!0),Ze.length&&(Ct.groups=Ze)),pt!==tt)try{Le(St,"source",tt===""?"(?:)":tt)}catch(Nt){}return St},mt=ve(Re),vt=0;mt.length>vt;)ie(Et,Re,mt[vt++]);We.constructor=Et,Et.prototype=We,le(me,"RegExp",Et)}je("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/regexp-exec");fe({target:"RegExp",proto:!0,forced:/./.exec!==me},{exec:me})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-name").PROPER,me=oe("../internals/redefine"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-string"),Se=oe("../internals/fails"),Le=oe("../internals/regexp-get-flags"),ve="toString",we=RegExp.prototype,de=we[ve],z=Se(function(){return de.call({source:"a",flags:"b"})!="/a/b"}),ee=fe&&de.name!=ve;(z||ee)&&me(RegExp.prototype,ve,function(){var ie=ke(this),le=Ce(ie.source),ue=Ce(Le(ie));return"/"+le+"/"+ue},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/not-a-regexp"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/to-string"),Le=oe("../internals/correct-is-regexp-logic"),ve=me("".indexOf);fe({target:"String",proto:!0,forced:!Le("includes")},{includes:function(de){return!!~ve(Se(Ce(this)),Se(ke(de)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(oe,ze,De){"use strict";var fe=oe("../internals/string-multibyte").charAt,me=oe("../internals/to-string"),ke=oe("../internals/internal-state"),Ce=oe("../internals/define-iterator"),Se="String Iterator",Le=ke.set,ve=ke.getterFor(Se);Ce(String,"String",function(we){Le(this,{type:Se,string:me(we),index:0})},function(){var de=ve(this),z=de.string,ee=de.index,ae;return ee>=z.length?{value:void 0,done:!0}:(ae=fe(z,ee),de.index+=ae.length,{value:ae,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-length"),Se=oe("../internals/to-string"),Le=oe("../internals/require-object-coercible"),ve=oe("../internals/get-method"),we=oe("../internals/advance-string-index"),de=oe("../internals/regexp-exec-abstract");me("match",function(z,ee,ae){return[function(le){var ue=Le(this),ge=le==null?void 0:ve(le,z);return ge?fe(ge,le,ue):new RegExp(le)[z](Se(ue))},function(ie){var le=ke(this),ue=Se(ie),ge=ae(ee,le,ue);if(ge.done)return ge.value;if(!le.global)return de(le,ue);var Pe=le.unicode;le.lastIndex=0;for(var je=[],Be=0,Fe;(Fe=de(le,ue))!==null;){var Ne=Se(Fe[0]);je[Be]=Ne,Ne===""&&(le.lastIndex=we(ue,Ce(le.lastIndex),Pe)),Be++}return Be===0?null:je}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/fails"),Le=oe("../internals/an-object"),ve=oe("../internals/is-callable"),we=oe("../internals/to-integer-or-infinity"),de=oe("../internals/to-length"),z=oe("../internals/to-string"),ee=oe("../internals/require-object-coercible"),ae=oe("../internals/advance-string-index"),ie=oe("../internals/get-method"),le=oe("../internals/get-substitution"),ue=oe("../internals/regexp-exec-abstract"),ge=oe("../internals/well-known-symbol"),Pe=ge("replace"),je=Math.max,Be=Math.min,Fe=ke([].concat),Ne=ke([].push),Ae=ke("".indexOf),Re=ke("".slice),We=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ue=function(){return/./[Pe]?/./[Pe]("a","$0")==="":!1}(),Ve=!Se(function(){var ot=/./;return ot.exec=function(){var st=[];return st.groups={a:"7"},st},"".replace(ot,"$<a>")!=="7"});Ce("replace",function(ot,st,ct){var Pt=Ue?"$":"$0";return[function(nt,yt){var xt=ee(this),wt=nt==null?void 0:ie(nt,Pe);return wt?me(wt,nt,xt,yt):me(st,z(xt),nt,yt)},function($e,nt){var yt=Le(this),xt=z($e);if(typeof nt=="string"&&Ae(nt,Pt)===-1&&Ae(nt,"$<")===-1){var wt=ct(st,yt,xt,nt);if(wt.done)return wt.value}var dt=ve(nt);dt||(nt=z(nt));var ft=yt.global;if(ft){var ut=yt.unicode;yt.lastIndex=0}for(var Et=[];;){var mt=ue(yt,xt);if(mt===null||(Ne(Et,mt),!ft))break;var vt=z(mt[0]);vt===""&&(yt.lastIndex=ae(xt,de(yt.lastIndex),ut))}for(var kt="",pt=0,Qe=0;Qe<Et.length;Qe++){mt=Et[Qe];for(var Ke=z(mt[0]),xe=je(Be(we(mt.index),xt.length),0),Me=[],Ze=1;Ze<mt.length;Ze++)Ne(Me,We(mt[Ze]));var tt=mt.groups;if(dt){var Ie=Fe([Ke],Me,xe,xt);tt!==void 0&&Ne(Ie,tt);var _e=z(fe(nt,void 0,Ie))}else _e=le(Ke,xt,xe,Me,tt,nt);xe>=pt&&(kt+=Re(xt,pt,xe)+_e,pt=xe+Ke.length)}return kt+Re(xt,pt)}]},!Ve||!Ye||Ue)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/same-value"),Le=oe("../internals/to-string"),ve=oe("../internals/get-method"),we=oe("../internals/regexp-exec-abstract");me("search",function(de,z,ee){return[function(ie){var le=Ce(this),ue=ie==null?void 0:ve(ie,de);return ue?fe(ue,ie,le):new RegExp(ie)[de](Le(le))},function(ae){var ie=ke(this),le=Le(ae),ue=ee(z,ie,le);if(ue.done)return ue.value;var ge=ie.lastIndex;Se(ge,0)||(ie.lastIndex=0);var Pe=we(ie,le);return Se(ie.lastIndex,ge)||(ie.lastIndex=ge),Pe===null?-1:Pe.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/is-regexp"),Le=oe("../internals/an-object"),ve=oe("../internals/require-object-coercible"),we=oe("../internals/species-constructor"),de=oe("../internals/advance-string-index"),z=oe("../internals/to-length"),ee=oe("../internals/to-string"),ae=oe("../internals/get-method"),ie=oe("../internals/array-slice-simple"),le=oe("../internals/regexp-exec-abstract"),ue=oe("../internals/regexp-exec"),ge=oe("../internals/regexp-sticky-helpers"),Pe=oe("../internals/fails"),je=ge.UNSUPPORTED_Y,Be=4294967295,Fe=Math.min,Ne=[].push,Ae=ke(/./.exec),Re=ke(Ne),We=ke("".slice),Ye=!Pe(function(){var Ue=/(?:)/,Ve=Ue.exec;Ue.exec=function(){return Ve.apply(this,arguments)};var ot="ab".split(Ue);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});Ce("split",function(Ue,Ve,ot){var st;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?st=function(ct,Pt){var $e=ee(ve(this)),nt=Pt===void 0?Be:Pt>>>0;if(nt===0)return[];if(ct===void 0)return[$e];if(!Se(ct))return me(Ve,$e,ct,nt);for(var yt=[],xt=(ct.ignoreCase?"i":"")+(ct.multiline?"m":"")+(ct.unicode?"u":"")+(ct.sticky?"y":""),wt=0,dt=new RegExp(ct.source,xt+"g"),ft,ut,Et;(ft=me(ue,dt,$e))&&(ut=dt.lastIndex,!(ut>wt&&(Re(yt,We($e,wt,ft.index)),ft.length>1&&ft.index<$e.length&&fe(Ne,yt,ie(ft,1)),Et=ft[0].length,wt=ut,yt.length>=nt)));)dt.lastIndex===ft.index&&dt.lastIndex++;return wt===$e.length?(Et||!Ae(dt,""))&&Re(yt,""):Re(yt,We($e,wt)),yt.length>nt?ie(yt,0,nt):yt}:"0".split(void 0,0).length?st=function(ct,Pt){return ct===void 0&&Pt===0?[]:me(Ve,this,ct,Pt)}:st=Ve,[function(Pt,$e){var nt=ve(this),yt=Pt==null?void 0:ae(Pt,Ue);return yt?me(yt,Pt,nt,$e):me(st,ee(nt),Pt,$e)},function(ct,Pt){var $e=Le(this),nt=ee(ct),yt=ot(st,$e,nt,Pt,st!==Ve);if(yt.done)return yt.value;var xt=we($e,RegExp),wt=$e.unicode,dt=($e.ignoreCase?"i":"")+($e.multiline?"m":"")+($e.unicode?"u":"")+(je?"g":"y"),ft=new xt(je?"^(?:"+$e.source+")":$e,dt),ut=Pt===void 0?Be:Pt>>>0;if(ut===0)return[];if(nt.length===0)return le(ft,nt)===null?[nt]:[];for(var Et=0,mt=0,vt=[];mt<nt.length;){ft.lastIndex=je?0:mt;var kt=le(ft,je?We(nt,mt):nt),pt;if(kt===null||(pt=Fe(z(ft.lastIndex+(je?mt:0)),nt.length))===Et)mt=de(nt,mt,wt);else{if(Re(vt,We(nt,Et,mt)),vt.length===ut)return vt;for(var Qe=1;Qe<=kt.length-1;Qe++)if(Re(vt,kt[Qe]),vt.length===ut)return vt;mt=Et=pt}}return Re(vt,We(nt,Et)),vt}]},!Ye,je)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/string-trim").trim,ke=oe("../internals/string-trim-forced");fe({target:"String",proto:!0,forced:ke("trim")},{trim:function(){return me(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/is-pure"),Le=oe("../internals/descriptors"),ve=oe("../internals/native-symbol"),we=oe("../internals/fails"),de=oe("../internals/has-own-property"),z=oe("../internals/object-is-prototype-of"),ee=oe("../internals/an-object"),ae=oe("../internals/to-indexed-object"),ie=oe("../internals/to-property-key"),le=oe("../internals/to-string"),ue=oe("../internals/create-property-descriptor"),ge=oe("../internals/object-create"),Pe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),Be=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Ne=oe("../internals/object-get-own-property-descriptor"),Ae=oe("../internals/object-define-property"),Re=oe("../internals/object-define-properties"),We=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ue=oe("../internals/shared"),Ve=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),st=oe("../internals/uid"),ct=oe("../internals/well-known-symbol"),Pt=oe("../internals/well-known-symbol-wrapped"),$e=oe("../internals/define-well-known-symbol"),nt=oe("../internals/symbol-define-to-primitive"),yt=oe("../internals/set-to-string-tag"),xt=oe("../internals/internal-state"),wt=oe("../internals/array-iteration").forEach,dt=Ve("hidden"),ft="Symbol",ut="prototype",Et=xt.set,mt=xt.getterFor(ft),vt=Object[ut],kt=me.Symbol,pt=kt&&kt[ut],Qe=me.TypeError,Ke=me.QObject,xe=Ne.f,Me=Ae.f,Ze=Be.f,tt=We.f,Ie=Ce([].push),_e=Ue("symbols"),He=Ue("op-symbols"),rt=Ue("wks"),St=!Ke||!Ke[ut]||!Ke[ut].findChild,Ct=Le&&we(function(){return ge(Me({},"a",{get:function(){return Me(this,"a",{value:7}).a}})).a!=7})?function(tn,Ut,En){var bn=xe(vt,Ut);bn&&delete vt[Ut],Me(tn,Ut,En),bn&&tn!==vt&&Me(vt,Ut,bn)}:Me,Nt=function(tn,Ut){var En=_e[tn]=ge(pt);return Et(En,{type:ft,tag:tn,description:Ut}),Le||(En.description=Ut),En},Ot=function(Ut,En,bn){Ut===vt&&Ot(He,En,bn),ee(Ut);var Dn=ie(En);return ee(bn),de(_e,Dn)?(bn.enumerable?(de(Ut,dt)&&Ut[dt][Dn]&&(Ut[dt][Dn]=!1),bn=ge(bn,{enumerable:ue(0,!1)})):(de(Ut,dt)||Me(Ut,dt,ue(1,{})),Ut[dt][Dn]=!0),Ct(Ut,Dn,bn)):Me(Ut,Dn,bn)},Rt=function(Ut,En){ee(Ut);var bn=ae(En),Dn=Pe(bn).concat(sn(bn));return wt(Dn,function(Qn){(!Le||ke(qt,bn,Qn))&&Ot(Ut,Qn,bn[Qn])}),Ut},$t=function(Ut,En){return En===void 0?ge(Ut):Rt(ge(Ut),En)},qt=function(Ut){var En=ie(Ut),bn=ke(tt,this,En);return this===vt&&de(_e,En)&&!de(He,En)?!1:bn||!de(this,En)||!de(_e,En)||de(this,dt)&&this[dt][En]?bn:!0},rn=function(Ut,En){var bn=ae(Ut),Dn=ie(En);if(!(bn===vt&&de(_e,Dn)&&!de(He,Dn))){var Qn=xe(bn,Dn);return Qn&&de(_e,Dn)&&!(de(bn,dt)&&bn[dt][Dn])&&(Qn.enumerable=!0),Qn}},Ht=function(Ut){var En=Ze(ae(Ut)),bn=[];return wt(En,function(Dn){!de(_e,Dn)&&!de(ot,Dn)&&Ie(bn,Dn)}),bn},sn=function(tn){var Ut=tn===vt,En=Ze(Ut?He:ae(tn)),bn=[];return wt(En,function(Dn){de(_e,Dn)&&(!Ut||de(vt,Dn))&&Ie(bn,_e[Dn])}),bn};ve||(kt=function(){if(z(pt,this))throw Qe("Symbol is not a constructor");var Ut=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),En=st(Ut),bn=function(Dn){this===vt&&ke(bn,He,Dn),de(this,dt)&&de(this[dt],En)&&(this[dt][En]=!1),Ct(this,En,ue(1,Dn))};return Le&&St&&Ct(vt,En,{configurable:!0,set:bn}),Nt(En,Ut)},pt=kt[ut],Ye(pt,"toString",function(){return mt(this).tag}),Ye(kt,"withoutSetter",function(tn){return Nt(st(tn),tn)}),We.f=qt,Ae.f=Ot,Re.f=Rt,Ne.f=rn,je.f=Be.f=Ht,Fe.f=sn,Pt.f=function(tn){return Nt(ct(tn),tn)},Le&&(Me(pt,"description",{configurable:!0,get:function(){return mt(this).description}}),Se||Ye(vt,"propertyIsEnumerable",qt,{unsafe:!0}))),fe({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:kt}),wt(Pe(rt),function(tn){$e(tn)}),fe({target:ft,stat:!0,forced:!ve},{useSetter:function(){St=!0},useSimple:function(){St=!1}}),fe({target:"Object",stat:!0,forced:!ve,sham:!Le},{create:$t,defineProperty:Ot,defineProperties:Rt,getOwnPropertyDescriptor:rn}),fe({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:Ht}),nt(),yt(kt,ft),ot[dt]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/has-own-property"),Le=oe("../internals/is-callable"),ve=oe("../internals/object-is-prototype-of"),we=oe("../internals/to-string"),de=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),ee=ke.Symbol,ae=ee&&ee.prototype;if(me&&Le(ee)&&(!("description"in ae)||ee().description!==void 0)){var ie={},le=function(){var Ae=arguments.length<1||arguments[0]===void 0?void 0:we(arguments[0]),Re=ve(ae,this)?new ee(Ae):Ae===void 0?ee():ee(Ae);return Ae===""&&(ie[Re]=!0),Re};z(le,ee),le.prototype=ae,ae.constructor=le;var ue=String(ee("test"))=="Symbol(test)",ge=Ce(ae.toString),Pe=Ce(ae.valueOf),je=/^Symbol\((.*)\)[^)]+$/,Be=Ce("".replace),Fe=Ce("".slice);de(ae,"description",{configurable:!0,get:function(){var Ae=Pe(this),Re=ge(Ae);if(Se(ie,Ae))return"";var We=ue?Fe(Re,7,-1):Be(Re,je,"$1");return We===""?void 0:We}}),fe({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/to-string"),Se=oe("../internals/shared"),Le=oe("../internals/native-symbol-registry"),ve=Se("string-to-symbol-registry"),we=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Le},{for:function(de){var z=Ce(de);if(ke(ve,z))return ve[z];var ee=me("Symbol")(z);return ve[z]=ee,we[ee]=z,ee}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(oe,ze,De){var fe=oe("../internals/define-well-known-symbol");fe("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,ze,De){oe("../modules/es.symbol.constructor"),oe("../modules/es.symbol.for"),oe("../modules/es.symbol.key-for"),oe("../modules/es.json.stringify"),oe("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-symbol"),Ce=oe("../internals/try-to-string"),Se=oe("../internals/shared"),Le=oe("../internals/native-symbol-registry"),ve=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Le},{keyFor:function(de){if(!ke(de))throw TypeError(Ce(de)+" is not a symbol");if(me(ve,de))return ve[de]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/array-buffer-view-core"),ke=oe("../internals/array-copy-within"),Ce=fe(ke),Se=me.aTypedArray,Le=me.exportTypedArrayMethod;Le("copyWithin",function(we,de){return Ce(Se(this),we,de,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").every,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("every",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-call"),ke=oe("../internals/array-fill"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("fill",function(ve){var we=arguments.length;return me(ke,Ce(this),ve,we>1?arguments[1]:void 0,we>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/typed-array-from-species-and-list"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("filter",function(ve){var we=me(Ce(this),ve,arguments.length>1?arguments[1]:void 0);return ke(this,we)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").findIndex,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("findIndex",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").find,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("find",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").forEach,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("forEach",function(Le){me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").includes,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("includes",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").indexOf,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("indexOf",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/array-buffer-view-core"),Se=oe("../modules/es.array.iterator"),Le=oe("../internals/well-known-symbol"),ve=Le("iterator"),we=fe.Uint8Array,de=ke(Se.values),z=ke(Se.keys),ee=ke(Se.entries),ae=Ce.aTypedArray,ie=Ce.exportTypedArrayMethod,le=we&&we.prototype,ue=!me(function(){le[ve].call([1])}),ge=!!le&&le.values&&le[ve]===le.values&&le.values.name==="values",Pe=function(){return de(ae(this))};ie("entries",function(){return ee(ae(this))},ue),ie("keys",function(){return z(ae(this))},ue),ie("values",Pe,ue||!ge,{name:"values"}),ie(ve,Pe,ue||!ge,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-uncurry-this"),ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod,Se=me([].join);Ce("join",function(ve){return Se(ke(this),ve)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-apply"),ke=oe("../internals/array-last-index-of"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("lastIndexOf",function(ve){var we=arguments.length;return me(ke,Ce(this),we>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").map,ke=oe("../internals/typed-array-species-constructor"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("map",function(ve){return me(Ce(this),ve,arguments.length>1?arguments[1]:void 0,function(we,de){return new(ke(we))(de)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").right,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduceRight",function(Le){var ve=arguments.length;return me(ke(this),Le,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").left,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduce",function(Le){var ve=arguments.length;return me(ke(this),Le,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=fe.aTypedArray,ke=fe.exportTypedArrayMethod,Ce=Math.floor;ke("reverse",function(){for(var Le=this,ve=me(Le).length,we=Ce(ve/2),de=0,z;de<we;)z=Le[de],Le[de++]=Le[--ve],Le[ve]=z;return Le})},{"../internals/array-buffer-view-core":103}],331:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/to-offset"),Le=oe("../internals/to-object"),ve=oe("../internals/fails"),we=fe.RangeError,de=fe.Int8Array,z=de&&de.prototype,ee=z&&z.set,ae=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=!ve(function(){var ge=new Uint8ClampedArray(2);return me(ee,ge,{length:1,0:3},1),ge[1]!==3}),ue=le&&ke.NATIVE_ARRAY_BUFFER_VIEWS&&ve(function(){var ge=new de(2);return ge.set(1),ge.set("2",1),ge[0]!==0||ge[1]!==2});ie("set",function(Pe){ae(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),Be=Le(Pe);if(le)return me(ee,this,Be,je);var Fe=this.length,Ne=Ce(Be),Ae=0;if(Ne+je>Fe)throw we("Wrong length");for(;Ae<Ne;)this[je+Ae]=Be[Ae++]},!le||ue)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/typed-array-species-constructor"),ke=oe("../internals/fails"),Ce=oe("../internals/array-slice"),Se=fe.aTypedArray,Le=fe.exportTypedArrayMethod,ve=ke(function(){new Int8Array(1).slice()});Le("slice",function(de,z){for(var ee=Ce(Se(this),de,z),ae=me(this),ie=0,le=ee.length,ue=new ae(le);le>ie;)ue[ie]=ee[ie++];return ue},ve)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").some,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("some",function(Le){return me(ke(this),Le,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/a-callable"),Se=oe("../internals/array-sort"),Le=oe("../internals/array-buffer-view-core"),ve=oe("../internals/engine-ff-version"),we=oe("../internals/engine-is-ie-or-edge"),de=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),ee=Le.aTypedArray,ae=Le.exportTypedArrayMethod,ie=fe.Uint16Array,le=ie&&me(ie.prototype.sort),ue=!!le&&!(ke(function(){le(new ie(2),null)})&&ke(function(){le(new ie(2),{})})),ge=!!le&&!ke(function(){if(de)return de<74;if(ve)return ve<67;if(we)return!0;if(z)return z<602;var je=new ie(516),Be=Array(516),Fe,Ne;for(Fe=0;Fe<516;Fe++)Ne=Fe%4,je[Fe]=515-Fe,Be[Fe]=Fe-2*Ne+3;for(le(je,function(Ae,Re){return(Ae/4|0)-(Re/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==Be[Fe])return!0}),Pe=function(je){return function(Be,Fe){return je!==void 0?+je(Be,Fe)||0:Fe!==Fe?-1:Be!==Be?1:Be===0&&Fe===0?1/Be>0&&1/Fe<0?1:-1:Be>Fe}};ae("sort",function(Be){return Be!==void 0&&Ce(Be),ge?le(this,Be):Se(ee(this),Pe(Be))},!ge||ue)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/to-length"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/typed-array-species-constructor"),Se=fe.aTypedArray,Le=fe.exportTypedArrayMethod;Le("subarray",function(we,de){var z=Se(this),ee=z.length,ae=ke(we,ee),ie=Ce(z);return new ie(z.buffer,z.byteOffset+ae*z.BYTES_PER_ELEMENT,me((de===void 0?ee:ke(de,ee))-ae))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/fails"),Se=oe("../internals/array-slice"),Le=fe.Int8Array,ve=ke.aTypedArray,we=ke.exportTypedArrayMethod,de=[].toLocaleString,z=!!Le&&Ce(function(){de.call(new Le(1))}),ee=Ce(function(){return[1,2].toLocaleString()!=new Le([1,2]).toLocaleString()})||!Ce(function(){Le.prototype.toLocaleString.call([1,2])});we("toLocaleString",function(){return me(de,z?Se(ve(this)):ve(this),Se(arguments))},ee)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core").exportTypedArrayMethod,me=oe("../internals/fails"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=ke.Uint8Array,Le=Se&&Se.prototype||{},ve=[].toString,we=Ce([].join);me(function(){ve.call({})})&&(ve=function(){return we(this)});var de=Le.toString!=ve;fe("toString",ve,de)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,ze,De){var fe=oe("../internals/typed-array-constructor");fe("Uint8",function(me){return function(Ce,Se,Le){return me(this,Ce,Se,Le)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../internals/array-for-each"),Se=oe("../internals/create-non-enumerable-property"),Le=function(we){if(we&&we.forEach!==Ce)try{Se(we,"forEach",Ce)}catch(de){we.forEach=Ce}};for(var ve in me)me[ve]&&Le(fe[ve]&&fe[ve].prototype);Le(ke)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../modules/es.array.iterator"),Se=oe("../internals/create-non-enumerable-property"),Le=oe("../internals/well-known-symbol"),ve=Le("iterator"),we=Le("toStringTag"),de=Ce.values,z=function(ae,ie){if(ae){if(ae[ve]!==de)try{Se(ae,ve,de)}catch(ue){ae[ve]=de}if(ae[we]||Se(ae,we,ie),me[ie]){for(var le in Ce)if(ae[le]!==Ce[le])try{Se(ae,le,Ce[le])}catch(ue){ae[le]=Ce[le]}}}};for(var ee in me)z(fe[ee]&&fe[ee].prototype,ee);z(ke,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(oe,ze,De){function fe(ge){return Array.isArray?Array.isArray(ge):ue(ge)==="[object Array]"}De.isArray=fe;function me(ge){return typeof ge=="boolean"}De.isBoolean=me;function ke(ge){return ge===null}De.isNull=ke;function Ce(ge){return ge==null}De.isNullOrUndefined=Ce;function Se(ge){return typeof ge=="number"}De.isNumber=Se;function Le(ge){return typeof ge=="string"}De.isString=Le;function ve(ge){return typeof ge=="symbol"}De.isSymbol=ve;function we(ge){return ge===void 0}De.isUndefined=we;function de(ge){return ue(ge)==="[object RegExp]"}De.isRegExp=de;function z(ge){return typeof ge=="object"&&ge!==null}De.isObject=z;function ee(ge){return ue(ge)==="[object Date]"}De.isDate=ee;function ae(ge){return ue(ge)==="[object Error]"||ge instanceof Error}De.isError=ae;function ie(ge){return typeof ge=="function"}De.isFunction=ie;function le(ge){return ge===null||typeof ge=="boolean"||typeof ge=="number"||typeof ge=="string"||typeof ge=="symbol"||typeof ge=="undefined"}De.isPrimitive=le,De.isBuffer=oe("buffer").Buffer.isBuffer;function ue(ge){return Object.prototype.toString.call(ge)}},{buffer:90}],342:[function(oe,ze,De){(function(fe){"use strict";var me=function(){var ve=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,we=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,de=/[^-+\dA-Z]/g;return function(z,ee,ae,ie){if(arguments.length===1&&Le(z)==="string"&&!/\d/.test(z)&&(ee=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");ee=String(me.masks[ee]||ee||me.masks.default);var le=ee.slice(0,4);(le==="UTC:"||le==="GMT:")&&(ee=ee.slice(4),ae=!0,le==="GMT:"&&(ie=!0));var ue=ae?"getUTC":"get",ge=z[ue+"Date"](),Pe=z[ue+"Day"](),je=z[ue+"Month"](),Be=z[ue+"FullYear"](),Fe=z[ue+"Hours"](),Ne=z[ue+"Minutes"](),Ae=z[ue+"Seconds"](),Re=z[ue+"Milliseconds"](),We=ae?0:z.getTimezoneOffset(),Ye=Ce(z),Ue=Se(z),Ve={d:ge,dd:ke(ge),ddd:me.i18n.dayNames[Pe],dddd:me.i18n.dayNames[Pe+7],m:je+1,mm:ke(je+1),mmm:me.i18n.monthNames[je],mmmm:me.i18n.monthNames[je+12],yy:String(Be).slice(2),yyyy:Be,h:Fe%12||12,hh:ke(Fe%12||12),H:Fe,HH:ke(Fe),M:Ne,MM:ke(Ne),s:Ae,ss:ke(Ae),l:ke(Re,3),L:ke(Math.round(Re/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":ae?"UTC":(String(z).match(we)||[""]).pop().replace(de,""),o:(We>0?"-":"+")+ke(Math.floor(Math.abs(We)/60)*100+Math.abs(We)%60,4),S:["th","st","nd","rd"][ge%10>3?0:(ge%100-ge%10!=10)*ge%10],W:Ye,N:Ue};return ee.replace(ve,function(ot){return ot in Ve?Ve[ot]:ot.slice(1,ot.length-1)})}}();me.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"},me.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 ke(ve,we){for(ve=String(ve),we=we||2;ve.length<we;)ve="0"+ve;return ve}function Ce(ve){var we=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());we.setDate(we.getDate()-(we.getDay()+6)%7+3);var de=new Date(we.getFullYear(),0,4);de.setDate(de.getDate()-(de.getDay()+6)%7+3);var z=we.getTimezoneOffset()-de.getTimezoneOffset();we.setHours(we.getHours()-z);var ee=(we-de)/(864e5*7);return 1+Math.floor(ee)}function Se(ve){var we=ve.getDay();return we===0&&(we=7),we}function Le(ve){return ve===null?"null":ve===void 0?"undefined":typeof ve!="object"?typeof ve:Array.isArray(ve)?"array":{}.toString.call(ve).slice(8,-1).toLowerCase()}typeof at=="function"&&at.amd?at(function(){return me}):typeof De=="object"?ze.exports=me:fe.dateFormat=me})(this)},{}],343:[function(oe,ze,De){"use strict";var fe=/["'&<>]/;ze.exports=me;function me(ke){var Ce=""+ke,Se=fe.exec(Ce);if(!Se)return Ce;var Le,ve="",we=0,de=0;for(we=Se.index;we<Ce.length;we++){switch(Ce.charCodeAt(we)){case 34:Le="&quot;";break;case 38:Le="&amp;";break;case 39:Le="&#39;";break;case 60:Le="&lt;";break;case 62:Le="&gt;";break;default:continue}de!==we&&(ve+=Ce.substring(de,we)),de=we+1,ve+=Le}return de!==we?ve+Ce.substring(de,we):ve}},{}],344:[function(oe,ze,De){"use strict";var fe=typeof Reflect=="object"?Reflect:null,me=fe&&typeof fe.apply=="function"?fe.apply:function(Ae,Re,We){return Function.prototype.apply.call(Ae,Re,We)},ke;fe&&typeof fe.ownKeys=="function"?ke=fe.ownKeys:Object.getOwnPropertySymbols?ke=function(Ae){return Object.getOwnPropertyNames(Ae).concat(Object.getOwnPropertySymbols(Ae))}:ke=function(Ae){return Object.getOwnPropertyNames(Ae)};function Ce(Ne){console&&console.warn&&console.warn(Ne)}var Se=Number.isNaN||function(Ae){return Ae!==Ae};function Le(){Le.init.call(this)}ze.exports=Le,ze.exports.once=je,Le.EventEmitter=Le,Le.prototype._events=void 0,Le.prototype._eventsCount=0,Le.prototype._maxListeners=void 0;var ve=10;function we(Ne){if(typeof Ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ne)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(Ne){if(typeof Ne!="number"||Ne<0||Se(Ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ne+".");ve=Ne}}),Le.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},Le.prototype.setMaxListeners=function(Ae){if(typeof Ae!="number"||Ae<0||Se(Ae))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Ae+".");return this._maxListeners=Ae,this};function de(Ne){return Ne._maxListeners===void 0?Le.defaultMaxListeners:Ne._maxListeners}Le.prototype.getMaxListeners=function(){return de(this)},Le.prototype.emit=function(Ae){for(var Re=[],We=1;We<arguments.length;We++)Re.push(arguments[We]);var Ye=Ae==="error",Ue=this._events;if(Ue!==void 0)Ye=Ye&&Ue.error===void 0;else if(!Ye)return!1;if(Ye){var Ve;if(Re.length>0&&(Ve=Re[0]),Ve instanceof Error)throw Ve;var ot=new Error("Unhandled error."+(Ve?" ("+Ve.message+")":""));throw ot.context=Ve,ot}var st=Ue[Ae];if(st===void 0)return!1;if(typeof st=="function")me(st,this,Re);else for(var ct=st.length,Pt=ue(st,ct),We=0;We<ct;++We)me(Pt[We],this,Re);return!0};function z(Ne,Ae,Re,We){var Ye,Ue,Ve;if(we(Re),Ue=Ne._events,Ue===void 0?(Ue=Ne._events=Object.create(null),Ne._eventsCount=0):(Ue.newListener!==void 0&&(Ne.emit("newListener",Ae,Re.listener?Re.listener:Re),Ue=Ne._events),Ve=Ue[Ae]),Ve===void 0)Ve=Ue[Ae]=Re,++Ne._eventsCount;else if(typeof Ve=="function"?Ve=Ue[Ae]=We?[Re,Ve]:[Ve,Re]:We?Ve.unshift(Re):Ve.push(Re),Ye=de(Ne),Ye>0&&Ve.length>Ye&&!Ve.warned){Ve.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Ve.length+" "+String(Ae)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Ne,ot.type=Ae,ot.count=Ve.length,Ce(ot)}return Ne}Le.prototype.addListener=function(Ae,Re){return z(this,Ae,Re,!1)},Le.prototype.on=Le.prototype.addListener,Le.prototype.prependListener=function(Ae,Re){return z(this,Ae,Re,!0)};function ee(){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 ae(Ne,Ae,Re){var We={fired:!1,wrapFn:void 0,target:Ne,type:Ae,listener:Re},Ye=ee.bind(We);return Ye.listener=Re,We.wrapFn=Ye,Ye}Le.prototype.once=function(Ae,Re){return we(Re),this.on(Ae,ae(this,Ae,Re)),this},Le.prototype.prependOnceListener=function(Ae,Re){return we(Re),this.prependListener(Ae,ae(this,Ae,Re)),this},Le.prototype.removeListener=function(Ae,Re){var We,Ye,Ue,Ve,ot;if(we(Re),Ye=this._events,Ye===void 0)return this;if(We=Ye[Ae],We===void 0)return this;if(We===Re||We.listener===Re)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Ae],Ye.removeListener&&this.emit("removeListener",Ae,We.listener||Re));else if(typeof We!="function"){for(Ue=-1,Ve=We.length-1;Ve>=0;Ve--)if(We[Ve]===Re||We[Ve].listener===Re){ot=We[Ve].listener,Ue=Ve;break}if(Ue<0)return this;Ue===0?We.shift():ge(We,Ue),We.length===1&&(Ye[Ae]=We[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Ae,ot||Re)}return this},Le.prototype.off=Le.prototype.removeListener,Le.prototype.removeAllListeners=function(Ae){var Re,We,Ye;if(We=this._events,We===void 0)return this;if(We.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):We[Ae]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete We[Ae]),this;if(arguments.length===0){var Ue=Object.keys(We),Ve;for(Ye=0;Ye<Ue.length;++Ye)Ve=Ue[Ye],Ve!=="removeListener"&&this.removeAllListeners(Ve);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Re=We[Ae],typeof Re=="function")this.removeListener(Ae,Re);else if(Re!==void 0)for(Ye=Re.length-1;Ye>=0;Ye--)this.removeListener(Ae,Re[Ye]);return this};function ie(Ne,Ae,Re){var We=Ne._events;if(We===void 0)return[];var Ye=We[Ae];return Ye===void 0?[]:typeof Ye=="function"?Re?[Ye.listener||Ye]:[Ye]:Re?Pe(Ye):ue(Ye,Ye.length)}Le.prototype.listeners=function(Ae){return ie(this,Ae,!0)},Le.prototype.rawListeners=function(Ae){return ie(this,Ae,!1)},Le.listenerCount=function(Ne,Ae){return typeof Ne.listenerCount=="function"?Ne.listenerCount(Ae):le.call(Ne,Ae)},Le.prototype.listenerCount=le;function le(Ne){var Ae=this._events;if(Ae!==void 0){var Re=Ae[Ne];if(typeof Re=="function")return 1;if(Re!==void 0)return Re.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?ke(this._events):[]};function ue(Ne,Ae){for(var Re=new Array(Ae),We=0;We<Ae;++We)Re[We]=Ne[We];return Re}function ge(Ne,Ae){for(;Ae+1<Ne.length;Ae++)Ne[Ae]=Ne[Ae+1];Ne.pop()}function Pe(Ne){for(var Ae=new Array(Ne.length),Re=0;Re<Ae.length;++Re)Ae[Re]=Ne[Re].listener||Ne[Re];return Ae}function je(Ne,Ae){return new Promise(function(Re,We){function Ye(Ve){Ne.removeListener(Ae,Ue),We(Ve)}function Ue(){typeof Ne.removeListener=="function"&&Ne.removeListener("error",Ye),Re([].slice.call(arguments))}Fe(Ne,Ae,Ue,{once:!0}),Ae!=="error"&&Be(Ne,Ye,{once:!0})})}function Be(Ne,Ae,Re){typeof Ne.on=="function"&&Fe(Ne,"error",Ae,Re)}function Fe(Ne,Ae,Re,We){if(typeof Ne.on=="function")We.once?Ne.once(Ae,Re):Ne.on(Ae,Re);else if(typeof Ne.addEventListener=="function")Ne.addEventListener(Ae,function Ye(Ue){We.once&&Ne.removeEventListener(Ae,Ye),Re(Ue)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ne)}},{}],345:[function(oe,ze,De){"use strict";var fe=oe("is-callable"),me=Object.prototype.toString,ke=Object.prototype.hasOwnProperty,Ce=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},Se=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ee==null?z(de.charAt(ae),ae,de):z.call(ee,de.charAt(ae),ae,de)},Le=function(de,z,ee){for(var ae in de)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},ve=function(de,z,ee){if(!fe(z))throw new TypeError("iterator must be a function");var ae;arguments.length>=3&&(ae=ee),me.call(de)==="[object Array]"?Ce(de,z,ae):typeof de=="string"?Se(de,z,ae):Le(de,z,ae)};ze.exports=ve},{"is-callable":367}],346:[function(oe,ze,De){"use strict";var fe="Function.prototype.bind called on incompatible ",me=Array.prototype.slice,ke=Object.prototype.toString,Ce="[object Function]";ze.exports=function(Le){var ve=this;if(typeof ve!="function"||ke.call(ve)!==Ce)throw new TypeError(fe+ve);for(var we=me.call(arguments,1),de,z=function(){if(this instanceof de){var ue=ve.apply(this,we.concat(me.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Le,we.concat(me.call(arguments)))},ee=Math.max(0,ve.length-we.length),ae=[],ie=0;ie<ee;ie++)ae.push("$"+ie);if(de=Function("binder","return function ("+ae.join(",")+"){ return binder.apply(this,arguments); }")(z),ve.prototype){var le=function(){};le.prototype=ve.prototype,de.prototype=new le,le.prototype=null}return de}},{}],347:[function(oe,ze,De){"use strict";var fe=oe("./implementation");ze.exports=Function.prototype.bind||fe},{"./implementation":346}],348:[function(oe,ze,De){"use strict";var fe,me=SyntaxError,ke=Function,Ce=TypeError,Se=function(st){try{return ke('"use strict"; return ('+st+").constructor;")()}catch(ct){}},Le=Object.getOwnPropertyDescriptor;if(Le)try{Le({},"")}catch(st){Le=null}var ve=function(){throw new Ce},we=Le?function(){try{return arguments.callee,ve}catch(st){try{return Le(arguments,"callee").get}catch(ct){return ve}}}():ve,de=oe("has-symbols")(),z=oe("has-proto")(),ee=Object.getPrototypeOf||(z?function(st){return st.__proto__}:null),ae={},ie=typeof Uint8Array=="undefined"||!ee?fe:ee(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?fe:ArrayBuffer,"%ArrayIteratorPrototype%":de&&ee?ee([][Symbol.iterator]()):fe,"%AsyncFromSyncIteratorPrototype%":fe,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics=="undefined"?fe:Atomics,"%BigInt%":typeof BigInt=="undefined"?fe:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?fe:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?fe:FinalizationRegistry,"%Function%":ke,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array=="undefined"?fe:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?fe:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":de&&ee?ee(ee([][Symbol.iterator]())):fe,"%JSON%":typeof JSON=="object"?JSON:fe,"%Map%":typeof Map=="undefined"?fe:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!de||!ee?fe:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?fe:Promise,"%Proxy%":typeof Proxy=="undefined"?fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?fe:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!de||!ee?fe:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":de&&ee?ee(""[Symbol.iterator]()):fe,"%Symbol%":de?Symbol:fe,"%SyntaxError%":me,"%ThrowTypeError%":we,"%TypedArray%":ie,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?fe:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?fe:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?fe:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?fe:WeakSet};if(ee)try{null.error}catch(st){var ue=ee(ee(st));le["%Error.prototype%"]=ue}var ge=function st(ct){var Pt;if(ct==="%AsyncFunction%")Pt=Se("async function () {}");else if(ct==="%GeneratorFunction%")Pt=Se("function* () {}");else if(ct==="%AsyncGeneratorFunction%")Pt=Se("async function* () {}");else if(ct==="%AsyncGenerator%"){var $e=st("%AsyncGeneratorFunction%");$e&&(Pt=$e.prototype)}else if(ct==="%AsyncIteratorPrototype%"){var nt=st("%AsyncGenerator%");nt&&ee&&(Pt=ee(nt.prototype))}return le[ct]=Pt,Pt},Pe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},je=oe("function-bind"),Be=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Ne=je.call(Function.apply,Array.prototype.splice),Ae=je.call(Function.call,String.prototype.replace),Re=je.call(Function.call,String.prototype.slice),We=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ue=/\\(\\)?/g,Ve=function(ct){var Pt=Re(ct,0,1),$e=Re(ct,-1);if(Pt==="%"&&$e!=="%")throw new me("invalid intrinsic syntax, expected closing `%`");if($e==="%"&&Pt!=="%")throw new me("invalid intrinsic syntax, expected opening `%`");var nt=[];return Ae(ct,Ye,function(yt,xt,wt,dt){nt[nt.length]=wt?Ae(dt,Ue,"$1"):xt||yt}),nt},ot=function(ct,Pt){var $e=ct,nt;if(Be(Pe,$e)&&(nt=Pe[$e],$e="%"+nt[0]+"%"),Be(le,$e)){var yt=le[$e];if(yt===ae&&(yt=ge($e)),typeof yt=="undefined"&&!Pt)throw new Ce("intrinsic "+ct+" exists, but is not available. Please file an issue!");return{alias:nt,name:$e,value:yt}}throw new me("intrinsic "+ct+" does not exist!")};ze.exports=function(ct,Pt){if(typeof ct!="string"||ct.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Pt!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(We(/^%?[^%]*%?$/,ct)===null)throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $e=Ve(ct),nt=$e.length>0?$e[0]:"",yt=ot("%"+nt+"%",Pt),xt=yt.name,wt=yt.value,dt=!1,ft=yt.alias;ft&&(nt=ft[0],Ne($e,Fe([0,1],ft)));for(var ut=1,Et=!0;ut<$e.length;ut+=1){var mt=$e[ut],vt=Re(mt,0,1),kt=Re(mt,-1);if((vt==='"'||vt==="'"||vt==="`"||kt==='"'||kt==="'"||kt==="`")&&vt!==kt)throw new me("property names with quotes must have matching quotes");if((mt==="constructor"||!Et)&&(dt=!0),nt+="."+mt,xt="%"+nt+"%",Be(le,xt))wt=le[xt];else if(wt!=null){if(!(mt in wt)){if(!Pt)throw new Ce("base intrinsic for "+ct+" exists, but the property is not available.");return}if(Le&&ut+1>=$e.length){var pt=Le(wt,mt);Et=!!pt,Et&&"get"in pt&&!("originalValue"in pt.get)?wt=pt.get:wt=wt[mt]}else Et=Be(wt,mt),wt=wt[mt];Et&&!dt&&(le[xt]=wt)}}return wt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,ze,De){"use strict";var fe=oe("get-intrinsic"),me=fe("%Object.getOwnPropertyDescriptor%",!0);if(me)try{me([],"length")}catch(ke){me=null}ze.exports=me},{"get-intrinsic":348}],350:[function(oe,ze,De){"use strict";var fe={foo:{}},me=Object;ze.exports=function(){return{__proto__:fe}.foo===fe.foo&&!({__proto__:null}instanceof me)}},{}],351:[function(oe,ze,De){"use strict";var fe=typeof Symbol!="undefined"&&Symbol,me=oe("./shams");ze.exports=function(){return typeof fe!="function"||typeof Symbol!="function"||typeof fe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:me()}},{"./shams":352}],352:[function(oe,ze,De){"use strict";ze.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var me={},ke=Symbol("test"),Ce=Object(ke);if(typeof ke=="string"||Object.prototype.toString.call(ke)!=="[object Symbol]"||Object.prototype.toString.call(Ce)!=="[object Symbol]")return!1;var Se=42;me[ke]=Se;for(ke in me)return!1;if(typeof Object.keys=="function"&&Object.keys(me).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(me).length!==0)return!1;var Le=Object.getOwnPropertySymbols(me);if(Le.length!==1||Le[0]!==ke||!Object.prototype.propertyIsEnumerable.call(me,ke))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ve=Object.getOwnPropertyDescriptor(me,ke);if(ve.value!==Se||ve.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,ze,De){"use strict";var fe=oe("has-symbols/shams");ze.exports=function(){return fe()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,ze,De){"use strict";var fe=oe("function-bind");ze.exports=fe.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,ze,De){var fe=oe("http"),me=oe("url"),ke=ze.exports;for(var Ce in fe)fe.hasOwnProperty(Ce)&&(ke[Ce]=fe[Ce]);ke.request=function(Le,ve){return Le=Se(Le),fe.request.call(this,Le,ve)},ke.get=function(Le,ve){return Le=Se(Le),fe.get.call(this,Le,ve)};function Se(Le){if(typeof Le=="string"&&(Le=me.parse(Le)),Le.protocol||(Le.protocol="https:"),Le.protocol!=="https:")throw new Error('Protocol "'+Le.protocol+'" not supported. Expected "https:"');return Le}},{http:468,url:472}],356:[function(oe,ze,De){"use strict";var fe=oe("util"),me=oe("ms");ze.exports=function(ke){if(typeof ke=="number")return ke;var Ce=me(ke);if(Ce===void 0){var Se=new Error(fe.format("humanize-ms(%j) result undefined",ke));console.warn(Se.stack)}return Ce}},{ms:376,util:419}],357:[function(oe,ze,De){De.read=function(fe,me,ke,Ce,Se){var Le,ve,we=Se*8-Ce-1,de=(1<<we)-1,z=de>>1,ee=-7,ae=ke?Se-1:0,ie=ke?-1:1,le=fe[me+ae];for(ae+=ie,Le=le&(1<<-ee)-1,le>>=-ee,ee+=we;ee>0;Le=Le*256+fe[me+ae],ae+=ie,ee-=8);for(ve=Le&(1<<-ee)-1,Le>>=-ee,ee+=Ce;ee>0;ve=ve*256+fe[me+ae],ae+=ie,ee-=8);if(Le===0)Le=1-z;else{if(Le===de)return ve?NaN:(le?-1:1)*(1/0);ve=ve+Math.pow(2,Ce),Le=Le-z}return(le?-1:1)*ve*Math.pow(2,Le-Ce)},De.write=function(fe,me,ke,Ce,Se,Le){var ve,we,de,z=Le*8-Se-1,ee=(1<<z)-1,ae=ee>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=Ce?0:Le-1,ue=Ce?1:-1,ge=me<0||me===0&&1/me<0?1:0;for(me=Math.abs(me),isNaN(me)||me===1/0?(we=isNaN(me)?1:0,ve=ee):(ve=Math.floor(Math.log(me)/Math.LN2),me*(de=Math.pow(2,-ve))<1&&(ve--,de*=2),ve+ae>=1?me+=ie/de:me+=ie*Math.pow(2,1-ae),me*de>=2&&(ve++,de/=2),ve+ae>=ee?(we=0,ve=ee):ve+ae>=1?(we=(me*de-1)*Math.pow(2,Se),ve=ve+ae):(we=me*Math.pow(2,ae-1)*Math.pow(2,Se),ve=0));Se>=8;fe[ke+le]=we&255,le+=ue,we/=256,Se-=8);for(ve=ve<<Se|we,z+=Se;z>0;fe[ke+le]=ve&255,le+=ue,ve/=256,z-=8);fe[ke+le-ue]|=ge*128}},{}],358:[function(oe,ze,De){"use strict";var fe=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],me,ke,Ce=-1,Se=[],Le=!1;function ve(){!me||!ke||(me=!1,ke.length?Se=ke.concat(Se):Ce=-1,Se.length&&we())}function we(){if(!me){Le=!1,me=!0;for(var le=Se.length,ue=setTimeout(ve);le;){for(ke=Se,Se=[];ke&&++Ce<le;)ke[Ce].run();Ce=-1,le=Se.length}ke=null,Ce=-1,me=!1,clearTimeout(ue)}}for(var de,z=-1,ee=fe.length;++z<ee;)if(fe[z]&&fe[z].test&&fe[z].test()){de=fe[z].install(we);break}function ae(le,ue){this.fun=le,this.array=ue}ae.prototype.run=function(){var le=this.fun,ue=this.array;switch(ue.length){case 0:return le();case 1:return le(ue[0]);case 2:return le(ue[0],ue[1]);case 3:return le(ue[0],ue[1],ue[2]);default:return le.apply(null,ue)}},ze.exports=ie;function ie(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var ge=1;ge<arguments.length;ge++)ue[ge-1]=arguments[ge];Se.push(new ae(le,ue)),!Le&&!me&&(Le=!0,de())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return fe.setImmediate?!1:typeof fe.MessageChannel!="undefined"},De.install=function(me){var ke=new fe.MessageChannel;return ke.port1.onmessage=me,function(){ke.port2.postMessage(0)}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=fe.MutationObserver||fe.WebKitMutationObserver;De.test=function(){return me},De.install=function(ke){var Ce=0,Se=new me(ke),Le=fe.document.createTextNode("");return Se.observe(Le,{characterData:!0}),function(){Le.data=Ce=++Ce%2}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return typeof fe.queueMicrotask=="function"},De.install=function(me){return function(){fe.queueMicrotask(me)}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return"document"in fe&&"onreadystatechange"in fe.document.createElement("script")},De.install=function(me){return function(){var ke=fe.document.createElement("script");return ke.onreadystatechange=function(){me(),ke.onreadystatechange=null,ke.parentNode.removeChild(ke),ke=null},fe.document.documentElement.appendChild(ke),me}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(oe,ze,De){"use strict";De.test=function(){return!0},De.install=function(fe){return function(){setTimeout(fe,0)}}},{}],364:[function(oe,ze,De){typeof Object.create=="function"?ze.exports=function(me,ke){ke&&(me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}))}:ze.exports=function(me,ke){if(ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}}},{}],365:[function(oe,ze,De){"use strict";var fe=oe("has-tostringtag/shams")(),me=oe("call-bind/callBound"),ke=me("Object.prototype.toString"),Ce=function(we){return fe&&we&&typeof we=="object"&&Symbol.toStringTag in we?!1:ke(we)==="[object Arguments]"},Se=function(we){return Ce(we)?!0:we!==null&&typeof we=="object"&&typeof we.length=="number"&&we.length>=0&&ke(we)!=="[object Array]"&&ke(we.callee)==="[object Function]"},Le=function(){return Ce(arguments)}();Ce.isLegacyArguments=Se,ze.exports=Le?Ce:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,ze,De){ze.exports=function(ke){return ke!=null&&(fe(ke)||me(ke)||!!ke._isBuffer)};function fe(ke){return!!ke.constructor&&typeof ke.constructor.isBuffer=="function"&&ke.constructor.isBuffer(ke)}function me(ke){return typeof ke.readFloatLE=="function"&&typeof ke.slice=="function"&&fe(ke.slice(0,0))}},{}],367:[function(oe,ze,De){"use strict";var fe=Function.prototype.toString,me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ke,Ce;if(typeof me=="function"&&typeof Object.defineProperty=="function")try{ke=Object.defineProperty({},"length",{get:function(){throw Ce}}),Ce={},me(function(){throw 42},null,ke)}catch(Be){Be!==Ce&&(me=null)}else me=null;var Se=/^\s*class\b/,Le=function(Fe){try{var Ne=fe.call(Fe);return Se.test(Ne)}catch(Ae){return!1}},ve=function(Fe){try{return Le(Fe)?!1:(fe.call(Fe),!0)}catch(Ne){return!1}},we=Object.prototype.toString,de="[object Object]",z="[object Function]",ee="[object GeneratorFunction]",ae="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,ge=!(0 in[,]),Pe=function(){return!1};if(typeof document=="object"){var je=document.all;we.call(je)===we.call(document.all)&&(Pe=function(Fe){if((ge||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Ne=we.call(Fe);return(Ne===ae||Ne===ie||Ne===le||Ne===de)&&Fe("")==null}catch(Ae){}return!1})}ze.exports=me?function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{me(Fe,null,ke)}catch(Ne){if(Ne!==Ce)return!1}return!Le(Fe)&&ve(Fe)}:function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ue)return ve(Fe);if(Le(Fe))return!1;var Ne=we.call(Fe);return Ne!==z&&Ne!==ee&&!/^\[object HTML/.test(Ne)?!1:ve(Fe)}},{}],368:[function(oe,ze,De){"use strict";var fe=Object.prototype.toString,me=Function.prototype.toString,ke=/^\s*(?:function)?\*/,Ce=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,Le=function(){if(!Ce)return!1;try{return Function("return function*() {}")()}catch(we){}},ve;ze.exports=function(de){if(typeof de!="function")return!1;if(ke.test(me.call(de)))return!0;if(!Ce){var z=fe.call(de);return z==="[object GeneratorFunction]"}if(!Se)return!1;if(typeof ve=="undefined"){var ee=Le();ve=ee?Se(ee):!1}return Se(de)===ve}},{"has-tostringtag/shams":353}],369:[function(oe,ze,De){"use strict";var fe=oe("which-typed-array");ze.exports=function(ke){return!!fe(ke)}},{"which-typed-array":420}],370:[function(oe,ze,De){var fe={}.toString;ze.exports=Array.isArray||function(me){return fe.call(me)=="[object Array]"}},{}],371:[function(oe,ze,De){(function(fe){(function(){(function(me,ke){typeof De=="object"&&typeof ze!="undefined"?ze.exports=ke(me):typeof at=="function"&&at.amd?at(ke):ke(me)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof fe!="undefined"?fe:this,function(me){"use strict";me=me||{};var ke=me.Base64,Ce="2.6.4",Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Le=function(ct){for(var Pt={},$e=0,nt=ct.length;$e<nt;$e++)Pt[ct.charAt($e)]=$e;return Pt}(Se),ve=String.fromCharCode,we=function(ct){if(ct.length<2){var Pt=ct.charCodeAt(0);return Pt<128?ct:Pt<2048?ve(192|Pt>>>6)+ve(128|Pt&63):ve(224|Pt>>>12&15)+ve(128|Pt>>>6&63)+ve(128|Pt&63)}else{var Pt=65536+(ct.charCodeAt(0)-55296)*1024+(ct.charCodeAt(1)-56320);return ve(240|Pt>>>18&7)+ve(128|Pt>>>12&63)+ve(128|Pt>>>6&63)+ve(128|Pt&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ct){return ct.replace(de,we)},ee=function(ct){var Pt=[0,2,1][ct.length%3],$e=ct.charCodeAt(0)<<16|(ct.length>1?ct.charCodeAt(1):0)<<8|(ct.length>2?ct.charCodeAt(2):0),nt=[Se.charAt($e>>>18),Se.charAt($e>>>12&63),Pt>=2?"=":Se.charAt($e>>>6&63),Pt>=1?"=":Se.charAt($e&63)];return nt.join("")},ae=me.btoa&&typeof me.btoa=="function"?function(ct){return me.btoa(ct)}:function(ct){if(ct.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ct.replace(/[\s\S]{1,3}/g,ee)},ie=function(ct){return ae(z(String(ct)))},le=function(ct){return ct.replace(/[+\/]/g,function(Pt){return Pt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(ct,Pt){return Pt?le(ie(ct)):ie(ct)},ge=function(ct){return ue(ct,!0)},Pe;me.Uint8Array&&(Pe=function(ct,Pt){for(var $e="",nt=0,yt=ct.length;nt<yt;nt+=3){var xt=ct[nt],wt=ct[nt+1],dt=ct[nt+2],ft=xt<<16|wt<<8|dt;$e+=Se.charAt(ft>>>18)+Se.charAt(ft>>>12&63)+(typeof wt!="undefined"?Se.charAt(ft>>>6&63):"=")+(typeof dt!="undefined"?Se.charAt(ft&63):"=")}return Pt?le($e):$e});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Be=function(ct){switch(ct.length){case 4:var Pt=(7&ct.charCodeAt(0))<<18|(63&ct.charCodeAt(1))<<12|(63&ct.charCodeAt(2))<<6|63&ct.charCodeAt(3),$e=Pt-65536;return ve(($e>>>10)+55296)+ve(($e&1023)+56320);case 3:return ve((15&ct.charCodeAt(0))<<12|(63&ct.charCodeAt(1))<<6|63&ct.charCodeAt(2));default:return ve((31&ct.charCodeAt(0))<<6|63&ct.charCodeAt(1))}},Fe=function(ct){return ct.replace(je,Be)},Ne=function(ct){var Pt=ct.length,$e=Pt%4,nt=(Pt>0?Le[ct.charAt(0)]<<18:0)|(Pt>1?Le[ct.charAt(1)]<<12:0)|(Pt>2?Le[ct.charAt(2)]<<6:0)|(Pt>3?Le[ct.charAt(3)]:0),yt=[ve(nt>>>16),ve(nt>>>8&255),ve(nt&255)];return yt.length-=[0,0,2,1][$e],yt.join("")},Ae=me.atob&&typeof me.atob=="function"?function(ct){return me.atob(ct)}:function(ct){return ct.replace(/\S{1,4}/g,Ne)},Re=function(ct){return Ae(String(ct).replace(/[^A-Za-z0-9\+\/]/g,""))},We=function(ct){return Fe(Ae(ct))},Ye=function(ct){return String(ct).replace(/[-_]/g,function(Pt){return Pt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ue=function(ct){return We(Ye(ct))},Ve;me.Uint8Array&&(Ve=function(ct){return Uint8Array.from(Re(Ye(ct)),function(Pt){return Pt.charCodeAt(0)})});var ot=function(){var ct=me.Base64;return me.Base64=ke,ct};if(me.Base64={VERSION:Ce,atob:Re,btoa:ae,fromBase64:Ue,toBase64:ue,utob:z,encode:ue,encodeURI:ge,btou:Fe,decode:Ue,noConflict:ot,fromUint8Array:Pe,toUint8Array:Ve},typeof Object.defineProperty=="function"){var st=function(ct){return{value:ct,enumerable:!1,writable:!0,configurable:!0}};me.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",st(function(){return Ue(this)})),Object.defineProperty(String.prototype,"toBase64",st(function(ct){return ue(this,ct)})),Object.defineProperty(String.prototype,"toBase64URI",st(function(){return ue(this,!0)}))}}return me.Meteor&&(Base64=me.Base64),typeof ze!="undefined"&&ze.exports?ze.exports.Base64=me.Base64:typeof at=="function"&&at.amd&&at([],function(){return me.Base64}),{Base64:me.Base64}})}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(oe,ze,De){"use strict";ze.exports=me;var fe=Object.prototype.hasOwnProperty;function me(ke,Ce,Se){if(!ke)throw new TypeError("argument dest is required");if(!Ce)throw new TypeError("argument src is required");return Se===void 0&&(Se=!0),Object.getOwnPropertyNames(Ce).forEach(function(ve){if(!(!Se&&fe.call(ke,ve))){var we=Object.getOwnPropertyDescriptor(Ce,ve);Object.defineProperty(ke,ve,we)}}),ke}},{}],373:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.regexp.constructor.js"),oe("core-js/modules/es.regexp.to-string.js");function fe(){this._types=Object.create(null),this._extensions=Object.create(null);for(var me=0;me<arguments.length;me++)this.define(arguments[me]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}fe.prototype.define=function(me,ke){for(var Ce in me){var Se=me[Ce].map(function(de){return de.toLowerCase()});Ce=Ce.toLowerCase();for(var Le=0;Le<Se.length;Le++){var ve=Se[Le];if(ve[0]!=="*"){if(!ke&&ve in this._types)throw new Error('Attempt to change mapping for "'+ve+'" extension from "'+this._types[ve]+'" to "'+Ce+'". Pass `force=true` to allow this, otherwise remove "'+ve+'" from the list of extensions for "'+Ce+'".');this._types[ve]=Ce}}if(ke||!this._extensions[Ce]){var we=Se[0];this._extensions[Ce]=we[0]!=="*"?we:we.substr(1)}}},fe.prototype.getType=function(me){me=String(me);var ke=me.replace(/^.*[/\\]/,"").toLowerCase(),Ce=ke.replace(/^.*\./,"").toLowerCase(),Se=ke.length<me.length,Le=Ce.length<ke.length-1;return(Le||!Se)&&this._types[Ce]||null},fe.prototype.getExtension=function(me){return me=/^\s*([^;\s]*)/.test(me)&&RegExp.$1,me&&this._extensions[me.toLowerCase()]||null},ze.exports=fe},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(oe,ze,De){"use strict";var fe=oe("./Mime");ze.exports=new fe(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,ze,De){"use strict";ze.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(oe,ze,De){var fe=1e3,me=fe*60,ke=me*60,Ce=ke*24,Se=Ce*7,Le=Ce*365.25;ze.exports=function(ee,ae){ae=ae||{};var ie=typeof ee;if(ie==="string"&&ee.length>0)return ve(ee);if(ie==="number"&&isFinite(ee))return ae.long?de(ee):we(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function ve(ee){if(ee=String(ee),!(ee.length>100)){var ae=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(ae){var ie=parseFloat(ae[1]),le=(ae[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Le;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*Ce;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*ke;case"minutes":case"minute":case"mins":case"min":case"m":return ie*me;case"seconds":case"second":case"secs":case"sec":case"s":return ie*fe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function we(ee){var ae=Math.abs(ee);return ae>=Ce?Math.round(ee/Ce)+"d":ae>=ke?Math.round(ee/ke)+"h":ae>=me?Math.round(ee/me)+"m":ae>=fe?Math.round(ee/fe)+"s":ee+"ms"}function de(ee){var ae=Math.abs(ee);return ae>=Ce?z(ee,ae,Ce,"day"):ae>=ke?z(ee,ae,ke,"hour"):ae>=me?z(ee,ae,me,"minute"):ae>=fe?z(ee,ae,fe,"second"):ee+" ms"}function z(ee,ae,ie,le){var ue=ae>=ie*1.5;return Math.round(ee/ie)+" "+le+(ue?"s":"")}},{}],377:[function(oe,ze,De){"use strict";var fe=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;function Ce(Le){if(Le==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Le)}function Se(){try{if(!Object.assign)return!1;var Le=new String("abc");if(Le[5]="de",Object.getOwnPropertyNames(Le)[0]==="5")return!1;for(var ve={},we=0;we<10;we++)ve["_"+String.fromCharCode(we)]=we;var de=Object.getOwnPropertyNames(ve).map(function(ee){return ve[ee]});if(de.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){z[ee]=ee}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(ee){return!1}}ze.exports=Se()?Object.assign:function(Le,ve){for(var we,de=Ce(Le),z,ee=1;ee<arguments.length;ee++){we=Object(arguments[ee]);for(var ae in we)me.call(we,ae)&&(de[ae]=we[ae]);if(fe){z=fe(we);for(var ie=0;ie<z.length;ie++)ke.call(we,z[ie])&&(de[z[ie]]=we[z[ie]])}}return de}},{}],378:[function(oe,ze,De){(function(fe){(function(){"use strict";function me(Le){if(typeof Le!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Le))}function ke(Le,ve){for(var we="",de=0,z=-1,ee=0,ae,ie=0;ie<=Le.length;++ie){if(ie<Le.length)ae=Le.charCodeAt(ie);else{if(ae===47)break;ae=47}if(ae===47){if(!(z===ie-1||ee===1))if(z!==ie-1&&ee===2){if(we.length<2||de!==2||we.charCodeAt(we.length-1)!==46||we.charCodeAt(we.length-2)!==46){if(we.length>2){var le=we.lastIndexOf("/");if(le!==we.length-1){le===-1?(we="",de=0):(we=we.slice(0,le),de=we.length-1-we.lastIndexOf("/")),z=ie,ee=0;continue}}else if(we.length===2||we.length===1){we="",de=0,z=ie,ee=0;continue}}ve&&(we.length>0?we+="/..":we="..",de=2)}else we.length>0?we+="/"+Le.slice(z+1,ie):we=Le.slice(z+1,ie),de=ie-z-1;z=ie,ee=0}else ae===46&&ee!==-1?++ee:ee=-1}return we}function Ce(Le,ve){var we=ve.dir||ve.root,de=ve.base||(ve.name||"")+(ve.ext||"");return we?we===ve.root?we+de:we+Le+de:de}var Se={resolve:function(){for(var ve="",we=!1,de,z=arguments.length-1;z>=-1&&!we;z--){var ee;z>=0?ee=arguments[z]:(de===void 0&&(de=fe.cwd()),ee=de),me(ee),ee.length!==0&&(ve=ee+"/"+ve,we=ee.charCodeAt(0)===47)}return ve=ke(ve,!we),we?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(me(ve),ve.length===0)return".";var we=ve.charCodeAt(0)===47,de=ve.charCodeAt(ve.length-1)===47;return ve=ke(ve,!we),ve.length===0&&!we&&(ve="."),ve.length>0&&de&&(ve+="/"),we?"/"+ve:ve},isAbsolute:function(ve){return me(ve),ve.length>0&&ve.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ve,we=0;we<arguments.length;++we){var de=arguments[we];me(de),de.length>0&&(ve===void 0?ve=de:ve+="/"+de)}return ve===void 0?".":Se.normalize(ve)},relative:function(ve,we){if(me(ve),me(we),ve===we||(ve=Se.resolve(ve),we=Se.resolve(we),ve===we))return"";for(var de=1;de<ve.length&&ve.charCodeAt(de)===47;++de);for(var z=ve.length,ee=z-de,ae=1;ae<we.length&&we.charCodeAt(ae)===47;++ae);for(var ie=we.length,le=ie-ae,ue=ee<le?ee:le,ge=-1,Pe=0;Pe<=ue;++Pe){if(Pe===ue){if(le>ue){if(we.charCodeAt(ae+Pe)===47)return we.slice(ae+Pe+1);if(Pe===0)return we.slice(ae+Pe)}else ee>ue&&(ve.charCodeAt(de+Pe)===47?ge=Pe:Pe===0&&(ge=0));break}var je=ve.charCodeAt(de+Pe),Be=we.charCodeAt(ae+Pe);if(je!==Be)break;je===47&&(ge=Pe)}var Fe="";for(Pe=de+ge+1;Pe<=z;++Pe)(Pe===z||ve.charCodeAt(Pe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+we.slice(ae+ge):(ae+=ge,we.charCodeAt(ae)===47&&++ae,we.slice(ae))},_makeLong:function(ve){return ve},dirname:function(ve){if(me(ve),ve.length===0)return".";for(var we=ve.charCodeAt(0),de=we===47,z=-1,ee=!0,ae=ve.length-1;ae>=1;--ae)if(we=ve.charCodeAt(ae),we===47){if(!ee){z=ae;break}}else ee=!1;return z===-1?de?"/":".":de&&z===1?"//":ve.slice(0,z)},basename:function(ve,we){if(we!==void 0&&typeof we!="string")throw new TypeError('"ext" argument must be a string');me(ve);var de=0,z=-1,ee=!0,ae;if(we!==void 0&&we.length>0&&we.length<=ve.length){if(we.length===ve.length&&we===ve)return"";var ie=we.length-1,le=-1;for(ae=ve.length-1;ae>=0;--ae){var ue=ve.charCodeAt(ae);if(ue===47){if(!ee){de=ae+1;break}}else le===-1&&(ee=!1,le=ae+1),ie>=0&&(ue===we.charCodeAt(ie)?--ie===-1&&(z=ae):(ie=-1,z=le))}return de===z?z=le:z===-1&&(z=ve.length),ve.slice(de,z)}else{for(ae=ve.length-1;ae>=0;--ae)if(ve.charCodeAt(ae)===47){if(!ee){de=ae+1;break}}else z===-1&&(ee=!1,z=ae+1);return z===-1?"":ve.slice(de,z)}},extname:function(ve){me(ve);for(var we=-1,de=0,z=-1,ee=!0,ae=0,ie=ve.length-1;ie>=0;--ie){var le=ve.charCodeAt(ie);if(le===47){if(!ee){de=ie+1;break}continue}z===-1&&(ee=!1,z=ie+1),le===46?we===-1?we=ie:ae!==1&&(ae=1):we!==-1&&(ae=-1)}return we===-1||z===-1||ae===0||ae===1&&we===z-1&&we===de+1?"":ve.slice(we,z)},format:function(ve){if(ve===null||typeof ve!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof ve);return Ce("/",ve)},parse:function(ve){me(ve);var we={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return we;var de=ve.charCodeAt(0),z=de===47,ee;z?(we.root="/",ee=1):ee=0;for(var ae=-1,ie=0,le=-1,ue=!0,ge=ve.length-1,Pe=0;ge>=ee;--ge){if(de=ve.charCodeAt(ge),de===47){if(!ue){ie=ge+1;break}continue}le===-1&&(ue=!1,le=ge+1),de===46?ae===-1?ae=ge:Pe!==1&&(Pe=1):ae!==-1&&(Pe=-1)}return ae===-1||le===-1||Pe===0||Pe===1&&ae===le-1&&ae===ie+1?le!==-1&&(ie===0&&z?we.base=we.name=ve.slice(1,le):we.base=we.name=ve.slice(ie,le)):(ie===0&&z?(we.name=ve.slice(1,ae),we.base=ve.slice(1,le)):(we.name=ve.slice(ie,ae),we.base=ve.slice(ie,le)),we.ext=ve.slice(ae,le)),ie>0?we.dir=ve.slice(0,ie-1):z&&(we.dir="/"),we},sep:"/",delimiter:":",win32:null,posix:null};Se.posix=Se,ze.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,ze,De){(function(fe){(function(){(function(){"use strict";var me={function:!0,object:!0},ke=me[typeof window]&&window||this,Ce=ke,Se=me[typeof De]&&De,Le=me[typeof ze]&&ze&&!ze.nodeType&&ze,ve=Se&&Le&&typeof fe=="object"&&fe;ve&&(ve.global===ve||ve.window===ve||ve.self===ve)&&(ke=ve);var we=Math.pow(2,53)-1,de=/\bOpera/,z=this,ee=Object.prototype,ae=ee.hasOwnProperty,ie=ee.toString;function le(Ue){return Ue=String(Ue),Ue.charAt(0).toUpperCase()+Ue.slice(1)}function ue(Ue,Ve,ot){var st={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ve&&ot&&/^Win/i.test(Ue)&&!/^Windows Phone /i.test(Ue)&&(st=st[/[\d.]+$/.exec(Ue)])&&(Ue="Windows "+st),Ue=String(Ue),Ve&&ot&&(Ue=Ue.replace(RegExp(Ve,"i"),ot)),Ue=Pe(Ue.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]),Ue}function ge(Ue,Ve){var ot=-1,st=Ue?Ue.length:0;if(typeof st=="number"&&st>-1&&st<=we)for(;++ot<st;)Ve(Ue[ot],ot,Ue);else je(Ue,Ve)}function Pe(Ue){return Ue=Re(Ue),/^(?:webOS|i(?:OS|P))/.test(Ue)?Ue:le(Ue)}function je(Ue,Ve){for(var ot in Ue)ae.call(Ue,ot)&&Ve(Ue[ot],ot,Ue)}function Be(Ue){return Ue==null?le(Ue):ie.call(Ue).slice(8,-1)}function Fe(Ue,Ve){var ot=Ue!=null?typeof Ue[Ve]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ue[Ve]:!0)}function Ne(Ue){return String(Ue).replace(/([ -])(?!$)/g,"$1?")}function Ae(Ue,Ve){var ot=null;return ge(Ue,function(st,ct){ot=Ve(ot,st,ct,Ue)}),ot}function Re(Ue){return String(Ue).replace(/^ +| +$/g,"")}function We(Ue){var Ve=ke,ot=Ue&&typeof Ue=="object"&&Be(Ue)!="String";ot&&(Ve=Ue,Ue=null);var st=Ve.navigator||{},ct=st.userAgent||"";Ue||(Ue=ct);var Pt=ot||z==Ce,$e=ot?!!st.likeChrome:/\bChrome\b/.test(Ue)&&!/internal|\n/i.test(ie.toString()),nt="Object",yt=ot?nt:"ScriptBridgingProxyObject",xt=ot?nt:"Environment",wt=ot&&Ve.java?"JavaPackage":Be(Ve.java),dt=ot?nt:"RuntimeObject",ft=/\bJava/.test(wt)&&Ve.java,ut=ft&&Be(Ve.environment)==xt,Et=ft?"a":"\u03B1",mt=ft?"b":"\u03B2",vt=Ve.document||{},kt=Ve.operamini||Ve.opera,pt=de.test(pt=ot&&kt?kt["[[Class]]"]:Be(kt))?pt:kt=null,Qe,Ke=Ue,xe=[],Me=null,Ze=Ue==ct,tt=Ze&&kt&&typeof kt.version=="function"&&kt.version(),Ie,_e=Nt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),He=Rt(["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"]),rt=qt([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),St=Ot({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}}),Ct=$t(["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 Nt(tn){return Ae(tn,function(Ut,En){return Ut||RegExp("\\b"+(En.pattern||Ne(En))+"\\b","i").exec(Ue)&&(En.label||En)})}function Ot(tn){return Ae(tn,function(Ut,En,bn){return Ut||(En[rt]||En[/^[a-z]+(?: +[a-z]+\b)*/i.exec(rt)]||RegExp("\\b"+Ne(bn)+"(?:\\b|\\w*\\d)","i").exec(Ue))&&bn})}function Rt(tn){return Ae(tn,function(Ut,En){return Ut||RegExp("\\b"+(En.pattern||Ne(En))+"\\b","i").exec(Ue)&&(En.label||En)})}function $t(tn){return Ae(tn,function(Ut,En){var bn=En.pattern||Ne(En);return!Ut&&(Ut=RegExp("\\b"+bn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ue))&&(Ut=ue(Ut,bn,En.label||En)),Ut})}function qt(tn){return Ae(tn,function(Ut,En){var bn=En.pattern||Ne(En);return!Ut&&(Ut=RegExp("\\b"+bn+" *\\d+[.\\w_]*","i").exec(Ue)||RegExp("\\b"+bn+" *\\w+-[\\w]*","i").exec(Ue)||RegExp("\\b"+bn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ue))&&((Ut=String(En.label&&!RegExp(bn,"i").test(En.label)?En.label:Ut).split("/"))[1]&&!/[\d.]+/.test(Ut[0])&&(Ut[0]+=" "+Ut[1]),En=En.label||En,Ut=Pe(Ut[0].replace(RegExp(bn,"i"),En).replace(RegExp("; *(?:"+En+"[_-])?","i")," ").replace(RegExp("("+En+")[-_.]?(\\w)","i"),"$1 $2"))),Ut})}function rn(tn){return Ae(tn,function(Ut,En){return Ut||(RegExp(En+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ue)||0)[1]||null})}function Ht(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(Ct)&&!rt&&(Qe=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ue))&&(rt=Re(Qe[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),St&&!rt?rt=qt([St]):St&&rt&&(rt=rt.replace(RegExp("^("+Ne(St)+")[-_.\\s]","i"),St+" ").replace(RegExp("^("+Ne(St)+")[-_.]?(\\w)","i"),St+" $2")),(Qe=/\bGoogle TV\b/.exec(rt))&&(rt=Qe[0]),/\bSimulator\b/i.test(Ue)&&(rt=(rt?rt+" ":"")+"Simulator"),He=="Opera Mini"&&/\bOPiOS\b/.test(Ue)&&xe.push("running in Turbo/Uncompressed mode"),He=="IE"&&/\blike iPhone OS\b/.test(Ue)?(Qe=We(Ue.replace(/like iPhone OS/,"")),St=Qe.manufacturer,rt=Qe.product):/^iP/.test(rt)?(He||(He="Safari"),Ct="iOS"+((Qe=/ OS ([\d_]+)/i.exec(Ue))?" "+Qe[1].replace(/_/g,"."):"")):He=="Konqueror"&&/^Linux\b/i.test(Ct)?Ct="Kubuntu":St&&St!="Google"&&(/Chrome/.test(He)&&!/\bMobile Safari\b/i.test(Ue)||/\bVita\b/.test(rt))||/\bAndroid\b/.test(Ct)&&/^Chrome/.test(He)&&/\bVersion\//i.test(Ue)?(He="Android Browser",Ct=/\bAndroid\b/.test(Ct)?Ct:"Android"):He=="Silk"?(/\bMobi/i.test(Ue)||(Ct="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(Ue)&&xe.unshift("accelerated")):He=="UC Browser"&&/\bUCWEB\b/.test(Ue)?xe.push("speed mode"):He=="PaleMoon"&&(Qe=/\bFirefox\/([\d.]+)\b/.exec(Ue))?xe.push("identifying as Firefox "+Qe[1]):He=="Firefox"&&(Qe=/\b(Mobile|Tablet|TV)\b/i.exec(Ue))?(Ct||(Ct="Firefox OS"),rt||(rt=Qe[1])):!He||(Qe=!/\bMinefield\b/i.test(Ue)&&/\b(?:Firefox|Safari)\b/.exec(He))?(He&&!rt&&/[\/,]|^[^(]+?\)/.test(Ue.slice(Ue.indexOf(Qe+"/")+8))&&(He=null),(Qe=rt||St||Ct)&&(rt||St||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Ct))&&(He=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Ct)?Ct:Qe)+" Browser")):He=="Electron"&&(Qe=(/\bChrome\/([\d.]+)\b/.exec(Ue)||0)[1])&&xe.push("Chromium "+Qe),tt||(tt=rn(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ne(He),"(?:Firefox|Minefield|NetFront)"])),(Qe=_e=="iCab"&&parseFloat(tt)>3&&"WebKit"||/\bOpera\b/.test(He)&&(/\bOPR\b/.test(Ue)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ue)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(Ue)&&(Ct=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(He)&&"NetFront")&&(_e=[Qe]),He=="IE"&&(Qe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ue)||0)[1])?(He+=" Mobile",Ct="Windows Phone "+(/\+$/.test(Qe)?Qe:Qe+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ue)?(He="IE Mobile",Ct="Windows Phone 8.x",xe.unshift("desktop mode"),tt||(tt=(/\brv:([\d.]+)/.exec(Ue)||0)[1])):He!="IE"&&_e=="Trident"&&(Qe=/\brv:([\d.]+)/.exec(Ue))&&(He&&xe.push("identifying as "+He+(tt?" "+tt:"")),He="IE",tt=Qe[1]),Ze){if(Fe(Ve,"global"))if(ft&&(Qe=ft.lang.System,Ke=Qe.getProperty("os.arch"),Ct=Ct||Qe.getProperty("os.name")+" "+Qe.getProperty("os.version")),ut){try{tt=Ve.require("ringo/engine").version.join("."),He="RingoJS"}catch(tn){(Qe=Ve.system)&&Qe.global.system==Ve.system&&(He="Narwhal",Ct||(Ct=Qe[0].os||null))}He||(He="Rhino")}else typeof Ve.process=="object"&&!Ve.process.browser&&(Qe=Ve.process)&&(typeof Qe.versions=="object"&&(typeof Qe.versions.electron=="string"?(xe.push("Node "+Qe.versions.node),He="Electron",tt=Qe.versions.electron):typeof Qe.versions.nw=="string"&&(xe.push("Chromium "+tt,"Node "+Qe.versions.node),He="NW.js",tt=Qe.versions.nw)),He||(He="Node.js",Ke=Qe.arch,Ct=Qe.platform,tt=/[\d.]+/.exec(Qe.version),tt=tt?tt[0]:null));else Be(Qe=Ve.runtime)==yt?(He="Adobe AIR",Ct=Qe.flash.system.Capabilities.os):Be(Qe=Ve.phantom)==dt?(He="PhantomJS",tt=(Qe=Qe.version||null)&&Qe.major+"."+Qe.minor+"."+Qe.patch):typeof vt.documentMode=="number"&&(Qe=/\bTrident\/(\d+)/i.exec(Ue))?(tt=[tt,vt.documentMode],(Qe=+Qe[1]+4)!=tt[1]&&(xe.push("IE "+tt[1]+" mode"),_e&&(_e[1]=""),tt[1]=Qe),tt=He=="IE"?String(tt[1].toFixed(1)):tt[0]):typeof vt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(He)&&(xe.push("masking as "+He+" "+tt),He="IE",tt="11.0",_e=["Trident"],Ct="Windows");Ct=Ct&&Pe(Ct)}if(tt&&(Qe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(tt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ue+";"+(Ze&&st.appMinorVersion))||/\bMinefield\b/i.test(Ue)&&"a")&&(Me=/b/i.test(Qe)?"beta":"alpha",tt=tt.replace(RegExp(Qe+"\\+?$"),"")+(Me=="beta"?mt:Et)+(/\d+\+?/.exec(Qe)||"")),He=="Fennec"||He=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ct))He="Firefox Mobile";else if(He=="Maxthon"&&tt)tt=tt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(rt))rt=="Xbox 360"&&(Ct=null),rt=="Xbox 360"&&/\bIEMobile\b/.test(Ue)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(He)||He&&!rt&&!/Browser|Mobi/.test(He))&&(Ct=="Windows CE"||/Mobi/i.test(Ue)))He+=" Mobile";else if(He=="IE"&&Ze)try{Ve.external===null&&xe.unshift("platform preview")}catch(tn){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(rt)||/\bBB10\b/.test(Ue))&&(Qe=(RegExp(rt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ue)||0)[1]||tt)?(Qe=[Qe,/BB10/.test(Ue)],Ct=(Qe[1]?(rt=null,St="BlackBerry"):"Device Software")+" "+Qe[0],tt=null):this!=je&&rt!="Wii"&&(Ze&&kt||/Opera/.test(He)&&/\b(?:MSIE|Firefox)\b/i.test(Ue)||He=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ct)||He=="IE"&&(Ct&&!/^Win/.test(Ct)&&tt>5.5||/\bWindows XP\b/.test(Ct)&&tt>8||tt==8&&!/\bTrident\b/.test(Ue)))&&!de.test(Qe=We.call(je,Ue.replace(de,"")+";"))&&Qe.name&&(Qe="ing as "+Qe.name+((Qe=Qe.version)?" "+Qe:""),de.test(He)?(/\bIE\b/.test(Qe)&&Ct=="Mac OS"&&(Ct=null),Qe="identify"+Qe):(Qe="mask"+Qe,pt?He=Pe(pt.replace(/([a-z])([A-Z])/g,"$1 $2")):He="Opera",/\bIE\b/.test(Qe)&&(Ct=null),Ze||(tt=null)),_e=["Presto"],xe.push(Qe));(Qe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ue)||0)[1])&&(Qe=[parseFloat(Qe.replace(/\.(\d)$/,".0$1")),Qe],He=="Safari"&&Qe[1].slice(-1)=="+"?(He="WebKit Nightly",Me="alpha",tt=Qe[1].slice(0,-1)):(tt==Qe[1]||tt==(Qe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ue)||0)[1]))&&(tt=null),Qe[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ue)||0)[1],Qe[0]==537.36&&Qe[2]==537.36&&parseFloat(Qe[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Ze||!$e&&!Qe[1]?(_e&&(_e[1]="like Safari"),Qe=(Qe=Qe[0],Qe<400?1:Qe<500?2:Qe<526?3:Qe<533?4:Qe<534?"4+":Qe<535?5:Qe<537?6:Qe<538?7:Qe<601?8:Qe<602?9:Qe<604?10:Qe<606?11:Qe<608?12:"12")):(_e&&(_e[1]="like Chrome"),Qe=Qe[1]||(Qe=Qe[0],Qe<530?1:Qe<532?2:Qe<532.05?3:Qe<533?4:Qe<534.03?5:Qe<534.07?6:Qe<534.1?7:Qe<534.13?8:Qe<534.16?9:Qe<534.24?10:Qe<534.3?11:Qe<535.01?12:Qe<535.02?"13+":Qe<535.07?15:Qe<535.11?16:Qe<535.19?17:Qe<536.05?18:Qe<536.1?19:Qe<537.01?20:Qe<537.11?"21+":Qe<537.13?23:Qe<537.18?24:Qe<537.24?25:Qe<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(Qe+=typeof Qe=="number"?".x":/[.+]/.test(Qe)?"":"+")),He=="Safari"&&(!tt||parseInt(tt)>45)?tt=Qe:He=="Chrome"&&/\bHeadlessChrome/i.test(Ue)&&xe.unshift("headless")),He=="Opera"&&(Qe=/\bzbov|zvav$/.exec(Ct))?(He+=" ",xe.unshift("desktop mode"),Qe=="zvav"?(He+="Mini",tt=null):He+="Mobile",Ct=Ct.replace(RegExp(" *"+Qe+"$"),"")):He=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(xe.unshift("desktop mode"),He="Chrome Mobile",tt=null,/\bOS X\b/.test(Ct)?(St="Apple",Ct="iOS 4.3+"):Ct=null):/\bSRWare Iron\b/.test(He)&&!tt&&(tt=rn("Chrome")),tt&&tt.indexOf(Qe=/[\d.]+$/.exec(Ct))==0&&Ue.indexOf("/"+Qe+"-")>-1&&(Ct=Re(Ct.replace(Qe,""))),Ct&&Ct.indexOf(He)!=-1&&!RegExp(He+" OS").test(Ct)&&(Ct=Ct.replace(RegExp(" *"+Ne(He)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(He)&&(/Browser|Lunascape|Maxthon/.test(He)||He!="Safari"&&/^iOS/.test(Ct)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(He)&&_e[1])&&(Qe=_e[_e.length-1])&&xe.push(Qe),xe.length&&(xe=["("+xe.join("; ")+")"]),St&&rt&&rt.indexOf(St)<0&&xe.push("on "+St),rt&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+rt),Ct&&(Qe=/ ([\d.+]+)$/.exec(Ct),Ie=Qe&&Ct.charAt(Ct.length-Qe[0].length-1)=="/",Ct={architecture:32,family:Qe&&!Ie?Ct.replace(Qe[0],""):Ct,version:Qe?Qe[1]:null,toString:function(){var tn=this.version;return this.family+(tn&&!Ie?" "+tn:"")+(this.architecture==64?" 64-bit":"")}}),(Qe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ke))&&!/\bi686\b/i.test(Ke)?(Ct&&(Ct.architecture=64,Ct.family=Ct.family.replace(RegExp(" *"+Qe),"")),He&&(/\bWOW64\b/i.test(Ue)||Ze&&/\w(?:86|32)$/.test(st.cpuClass||st.platform)&&!/\bWin64; x64\b/i.test(Ue))&&xe.unshift("32-bit")):Ct&&/^OS X/.test(Ct.family)&&He=="Chrome"&&parseFloat(tt)>=39&&(Ct.architecture=64),Ue||(Ue=null);var sn={};return sn.description=Ue,sn.layout=_e&&_e[0],sn.manufacturer=St,sn.name=He,sn.prerelease=Me,sn.product=rt,sn.ua=Ue,sn.version=He&&tt,sn.os=Ct||{architecture:null,family:null,version:null,toString:function(){return"null"}},sn.parse=We,sn.toString=Ht,sn.version&&xe.unshift(tt),sn.name&&xe.unshift(He),Ct&&He&&!(Ct==String(Ct).split(" ")[0]&&(Ct==He.split(" ")[0]||rt))&&xe.push(rt?"("+Ct+")":"on "+Ct),xe.length&&(sn.description=xe.join(" ")),sn}var Ye=We();typeof at=="function"&&typeof at.amd=="object"&&at.amd?(ke.platform=Ye,at(function(){return Ye})):Se&&Le?je(Ye,function(Ue,Ve){Se[Ve]=Ue}):ke.platform=Ye}).call(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,ze,De){(function(fe){(function(){"use strict";typeof fe=="undefined"||!fe.version||fe.version.indexOf("v0.")===0||fe.version.indexOf("v1.")===0&&fe.version.indexOf("v1.8.")!==0?ze.exports={nextTick:me}:ze.exports=fe;function me(ke,Ce,Se,Le){if(typeof ke!="function")throw new TypeError('"callback" argument must be a function');var ve=arguments.length,we,de;switch(ve){case 0:case 1:return fe.nextTick(ke);case 2:return fe.nextTick(function(){ke.call(null,Ce)});case 3:return fe.nextTick(function(){ke.call(null,Ce,Se)});case 4:return fe.nextTick(function(){ke.call(null,Ce,Se,Le)});default:for(we=new Array(ve-1),de=0;de<we.length;)we[de++]=arguments[de];return fe.nextTick(function(){ke.apply(null,we)})}}}).call(this)}).call(this,oe("_process"))},{_process:467}],381:[function(oe,ze,De){var fe=ze.exports={},me,ke;function Ce(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?me=setTimeout:me=Ce}catch(ge){me=Ce}try{typeof clearTimeout=="function"?ke=clearTimeout:ke=Se}catch(ge){ke=Se}})();function Le(ge){if(me===setTimeout)return setTimeout(ge,0);if((me===Ce||!me)&&setTimeout)return me=setTimeout,setTimeout(ge,0);try{return me(ge,0)}catch(Pe){try{return me.call(null,ge,0)}catch(je){return me.call(this,ge,0)}}}function ve(ge){if(ke===clearTimeout)return clearTimeout(ge);if((ke===Se||!ke)&&clearTimeout)return ke=clearTimeout,clearTimeout(ge);try{return ke(ge)}catch(Pe){try{return ke.call(null,ge)}catch(je){return ke.call(this,ge)}}}var we=[],de=!1,z,ee=-1;function ae(){!de||!z||(de=!1,z.length?we=z.concat(we):ee=-1,we.length&&ie())}function ie(){if(!de){var ge=Le(ae);de=!0;for(var Pe=we.length;Pe;){for(z=we,we=[];++ee<Pe;)z&&z[ee].run();ee=-1,Pe=we.length}z=null,de=!1,ve(ge)}}fe.nextTick=function(ge){var Pe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)Pe[je-1]=arguments[je];we.push(new le(ge,Pe)),we.length===1&&!de&&Le(ie)};function le(ge,Pe){this.fun=ge,this.array=Pe}le.prototype.run=function(){this.fun.apply(null,this.array)},fe.title="browser",fe.browser=!0,fe.env={},fe.argv=[],fe.version="",fe.versions={};function ue(){}fe.on=ue,fe.addListener=ue,fe.once=ue,fe.off=ue,fe.removeListener=ue,fe.removeAllListeners=ue,fe.emit=ue,fe.prependListener=ue,fe.prependOnceListener=ue,fe.listeners=function(ge){return[]},fe.binding=function(ge){throw new Error("process.binding is not supported")},fe.cwd=function(){return"/"},fe.chdir=function(ge){throw new Error("process.chdir is not supported")},fe.umask=function(){return 0}},{}],382:[function(oe,ze,De){(function(fe){(function(){(function(me){var ke=typeof De=="object"&&De&&!De.nodeType&&De,Ce=typeof ze=="object"&&ze&&!ze.nodeType&&ze,Se=typeof fe=="object"&&fe;(Se.global===Se||Se.window===Se||Se.self===Se)&&(me=Se);var Le,ve=2147483647,we=36,de=1,z=26,ee=38,ae=700,ie=72,le=128,ue="-",ge=/^xn--/,Pe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,Be={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=we-de,Ne=Math.floor,Ae=String.fromCharCode,Re;function We(wt){throw new RangeError(Be[wt])}function Ye(wt,dt){for(var ft=wt.length,ut=[];ft--;)ut[ft]=dt(wt[ft]);return ut}function Ue(wt,dt){var ft=wt.split("@"),ut="";ft.length>1&&(ut=ft[0]+"@",wt=ft[1]),wt=wt.replace(je,".");var Et=wt.split("."),mt=Ye(Et,dt).join(".");return ut+mt}function Ve(wt){for(var dt=[],ft=0,ut=wt.length,Et,mt;ft<ut;)Et=wt.charCodeAt(ft++),Et>=55296&&Et<=56319&&ft<ut?(mt=wt.charCodeAt(ft++),(mt&64512)==56320?dt.push(((Et&1023)<<10)+(mt&1023)+65536):(dt.push(Et),ft--)):dt.push(Et);return dt}function ot(wt){return Ye(wt,function(dt){var ft="";return dt>65535&&(dt-=65536,ft+=Ae(dt>>>10&1023|55296),dt=56320|dt&1023),ft+=Ae(dt),ft}).join("")}function st(wt){return wt-48<10?wt-22:wt-65<26?wt-65:wt-97<26?wt-97:we}function ct(wt,dt){return wt+22+75*(wt<26)-((dt!=0)<<5)}function Pt(wt,dt,ft){var ut=0;for(wt=ft?Ne(wt/ae):wt>>1,wt+=Ne(wt/dt);wt>Fe*z>>1;ut+=we)wt=Ne(wt/Fe);return Ne(ut+(Fe+1)*wt/(wt+ee))}function $e(wt){var dt=[],ft=wt.length,ut,Et=0,mt=le,vt=ie,kt,pt,Qe,Ke,xe,Me,Ze,tt,Ie;for(kt=wt.lastIndexOf(ue),kt<0&&(kt=0),pt=0;pt<kt;++pt)wt.charCodeAt(pt)>=128&&We("not-basic"),dt.push(wt.charCodeAt(pt));for(Qe=kt>0?kt+1:0;Qe<ft;){for(Ke=Et,xe=1,Me=we;Qe>=ft&&We("invalid-input"),Ze=st(wt.charCodeAt(Qe++)),(Ze>=we||Ze>Ne((ve-Et)/xe))&&We("overflow"),Et+=Ze*xe,tt=Me<=vt?de:Me>=vt+z?z:Me-vt,!(Ze<tt);Me+=we)Ie=we-tt,xe>Ne(ve/Ie)&&We("overflow"),xe*=Ie;ut=dt.length+1,vt=Pt(Et-Ke,ut,Ke==0),Ne(Et/ut)>ve-mt&&We("overflow"),mt+=Ne(Et/ut),Et%=ut,dt.splice(Et++,0,mt)}return ot(dt)}function nt(wt){var dt,ft,ut,Et,mt,vt,kt,pt,Qe,Ke,xe,Me=[],Ze,tt,Ie,_e;for(wt=Ve(wt),Ze=wt.length,dt=le,ft=0,mt=ie,vt=0;vt<Ze;++vt)xe=wt[vt],xe<128&&Me.push(Ae(xe));for(ut=Et=Me.length,Et&&Me.push(ue);ut<Ze;){for(kt=ve,vt=0;vt<Ze;++vt)xe=wt[vt],xe>=dt&&xe<kt&&(kt=xe);for(tt=ut+1,kt-dt>Ne((ve-ft)/tt)&&We("overflow"),ft+=(kt-dt)*tt,dt=kt,vt=0;vt<Ze;++vt)if(xe=wt[vt],xe<dt&&++ft>ve&&We("overflow"),xe==dt){for(pt=ft,Qe=we;Ke=Qe<=mt?de:Qe>=mt+z?z:Qe-mt,!(pt<Ke);Qe+=we)_e=pt-Ke,Ie=we-Ke,Me.push(Ae(ct(Ke+_e%Ie,0))),pt=Ne(_e/Ie);Me.push(Ae(ct(pt,0))),mt=Pt(ft,tt,ut==Et),ft=0,++ut}++ft,++dt}return Me.join("")}function yt(wt){return Ue(wt,function(dt){return ge.test(dt)?$e(dt.slice(4).toLowerCase()):dt})}function xt(wt){return Ue(wt,function(dt){return Pe.test(dt)?"xn--"+nt(dt):dt})}if(Le={version:"1.4.1",ucs2:{decode:Ve,encode:ot},decode:$e,encode:nt,toASCII:xt,toUnicode:yt},typeof at=="function"&&typeof at.amd=="object"&&at.amd)at("punycode",function(){return Le});else if(ke&&Ce)if(ze.exports==ke)Ce.exports=Le;else for(Re in Le)Le.hasOwnProperty(Re)&&(ke[Re]=Le[Re]);else me.punycode=Le})(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,ze,De){"use strict";function fe(ke,Ce){return Object.prototype.hasOwnProperty.call(ke,Ce)}ze.exports=function(ke,Ce,Se,Le){Ce=Ce||"&",Se=Se||"=";var ve={};if(typeof ke!="string"||ke.length===0)return ve;var we=/\+/g;ke=ke.split(Ce);var de=1e3;Le&&typeof Le.maxKeys=="number"&&(de=Le.maxKeys);var z=ke.length;de>0&&z>de&&(z=de);for(var ee=0;ee<z;++ee){var ae=ke[ee].replace(we,"%20"),ie=ae.indexOf(Se),le,ue,ge,Pe;ie>=0?(le=ae.substr(0,ie),ue=ae.substr(ie+1)):(le=ae,ue=""),ge=decodeURIComponent(le),Pe=decodeURIComponent(ue),fe(ve,ge)?me(ve[ge])?ve[ge].push(Pe):ve[ge]=[ve[ge],Pe]:ve[ge]=Pe}return ve};var me=Array.isArray||function(ke){return Object.prototype.toString.call(ke)==="[object Array]"}},{}],384:[function(oe,ze,De){"use strict";var fe=function(Se){switch(typeof Se){case"string":return Se;case"boolean":return Se?"true":"false";case"number":return isFinite(Se)?Se:"";default:return""}};ze.exports=function(Se,Le,ve,we){return Le=Le||"&",ve=ve||"=",Se===null&&(Se=void 0),typeof Se=="object"?ke(Ce(Se),function(de){var z=encodeURIComponent(fe(de))+ve;return me(Se[de])?ke(Se[de],function(ee){return z+encodeURIComponent(fe(ee))}).join(Le):z+encodeURIComponent(fe(Se[de]))}).join(Le):we?encodeURIComponent(fe(we))+ve+encodeURIComponent(fe(Se)):""};var me=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function ke(Se,Le){if(Se.map)return Se.map(Le);for(var ve=[],we=0;we<Se.length;we++)ve.push(Le(Se[we],we));return ve}var Ce=Object.keys||function(Se){var Le=[];for(var ve in Se)Object.prototype.hasOwnProperty.call(Se,ve)&&Le.push(ve);return Le}},{}],385:[function(oe,ze,De){"use strict";De.decode=De.parse=oe("./decode"),De.encode=De.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,ze,De){"use strict";var fe=oe("process-nextick-args"),me=Object.keys||function(ae){var ie=[];for(var le in ae)ie.push(le);return ie};ze.exports=de;var ke=Object.create(oe("core-util-is"));ke.inherits=oe("inherits");var Ce=oe("./_stream_readable"),Se=oe("./_stream_writable");ke.inherits(de,Ce);for(var Le=me(Se.prototype),ve=0;ve<Le.length;ve++){var we=Le[ve];de.prototype[we]||(de.prototype[we]=Se.prototype[we])}function de(ae){if(!(this instanceof de))return new de(ae);Ce.call(this,ae),Se.call(this,ae),ae&&ae.readable===!1&&(this.readable=!1),ae&&ae.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ae&&ae.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||fe.nextTick(ee,this)}function ee(ae){ae.end()}Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}}),de.prototype._destroy=function(ae,ie){this.push(null),this.end(),fe.nextTick(ie,ae)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(oe,ze,De){"use strict";ze.exports=ke;var fe=oe("./_stream_transform"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(ke,fe);function ke(Ce){if(!(this instanceof ke))return new ke(Ce);fe.call(this,Ce)}ke.prototype._transform=function(Ce,Se,Le){Le(null,Ce)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("process-nextick-args");ze.exports=Ae;var Ce=oe("isarray"),Se;Ae.ReadableState=Ne;var Le=oe("events").EventEmitter,ve=function(xe,Me){return xe.listeners(Me).length},we=oe("./internal/streams/stream"),de=oe("safe-buffer").Buffer,z=me.Uint8Array||function(){};function ee(xe){return de.from(xe)}function ae(xe){return de.isBuffer(xe)||xe instanceof z}var ie=Object.create(oe("core-util-is"));ie.inherits=oe("inherits");var le=oe("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var ge=oe("./internal/streams/BufferList"),Pe=oe("./internal/streams/destroy"),je;ie.inherits(Ae,we);var Be=["error","close","destroy","pause","resume"];function Fe(xe,Me,Ze){if(typeof xe.prependListener=="function")return xe.prependListener(Me,Ze);!xe._events||!xe._events[Me]?xe.on(Me,Ze):Ce(xe._events[Me])?xe._events[Me].unshift(Ze):xe._events[Me]=[Ze,xe._events[Me]]}function Ne(xe,Me){Se=Se||oe("./_stream_duplex"),xe=xe||{};var Ze=Me instanceof Se;this.objectMode=!!xe.objectMode,Ze&&(this.objectMode=this.objectMode||!!xe.readableObjectMode);var tt=xe.highWaterMark,Ie=xe.readableHighWaterMark,_e=this.objectMode?16:16*1024;tt||tt===0?this.highWaterMark=tt:Ze&&(Ie||Ie===0)?this.highWaterMark=Ie:this.highWaterMark=_e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ge,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=xe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,xe.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(xe.encoding),this.encoding=xe.encoding)}function Ae(xe){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Ae))return new Ae(xe);this._readableState=new Ne(xe,this),this.readable=!0,xe&&(typeof xe.read=="function"&&(this._read=xe.read),typeof xe.destroy=="function"&&(this._destroy=xe.destroy)),we.call(this)}Object.defineProperty(Ae.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(xe){this._readableState&&(this._readableState.destroyed=xe)}}),Ae.prototype.destroy=Pe.destroy,Ae.prototype._undestroy=Pe.undestroy,Ae.prototype._destroy=function(xe,Me){this.push(null),Me(xe)},Ae.prototype.push=function(xe,Me){var Ze=this._readableState,tt;return Ze.objectMode?tt=!0:typeof xe=="string"&&(Me=Me||Ze.defaultEncoding,Me!==Ze.encoding&&(xe=de.from(xe,Me),Me=""),tt=!0),Re(this,xe,Me,!1,tt)},Ae.prototype.unshift=function(xe){return Re(this,xe,null,!0,!1)};function Re(xe,Me,Ze,tt,Ie){var _e=xe._readableState;if(Me===null)_e.reading=!1,ct(xe,_e);else{var He;Ie||(He=Ye(_e,Me)),He?xe.emit("error",He):_e.objectMode||Me&&Me.length>0?(typeof Me!="string"&&!_e.objectMode&&Object.getPrototypeOf(Me)!==de.prototype&&(Me=ee(Me)),tt?_e.endEmitted?xe.emit("error",new Error("stream.unshift() after end event")):We(xe,_e,Me,!0):_e.ended?xe.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Ze?(Me=_e.decoder.write(Me),_e.objectMode||Me.length!==0?We(xe,_e,Me,!1):nt(xe,_e)):We(xe,_e,Me,!1))):tt||(_e.reading=!1)}return Ue(_e)}function We(xe,Me,Ze,tt){Me.flowing&&Me.length===0&&!Me.sync?(xe.emit("data",Ze),xe.read(0)):(Me.length+=Me.objectMode?1:Ze.length,tt?Me.buffer.unshift(Ze):Me.buffer.push(Ze),Me.needReadable&&Pt(xe)),nt(xe,Me)}function Ye(xe,Me){var Ze;return!ae(Me)&&typeof Me!="string"&&Me!==void 0&&!xe.objectMode&&(Ze=new TypeError("Invalid non-string/buffer chunk")),Ze}function Ue(xe){return!xe.ended&&(xe.needReadable||xe.length<xe.highWaterMark||xe.length===0)}Ae.prototype.isPaused=function(){return this._readableState.flowing===!1},Ae.prototype.setEncoding=function(xe){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(xe),this._readableState.encoding=xe,this};var Ve=8388608;function ot(xe){return xe>=Ve?xe=Ve:(xe--,xe|=xe>>>1,xe|=xe>>>2,xe|=xe>>>4,xe|=xe>>>8,xe|=xe>>>16,xe++),xe}function st(xe,Me){return xe<=0||Me.length===0&&Me.ended?0:Me.objectMode?1:xe!==xe?Me.flowing&&Me.length?Me.buffer.head.data.length:Me.length:(xe>Me.highWaterMark&&(Me.highWaterMark=ot(xe)),xe<=Me.length?xe:Me.ended?Me.length:(Me.needReadable=!0,0))}Ae.prototype.read=function(xe){ue("read",xe),xe=parseInt(xe,10);var Me=this._readableState,Ze=xe;if(xe!==0&&(Me.emittedReadable=!1),xe===0&&Me.needReadable&&(Me.length>=Me.highWaterMark||Me.ended))return ue("read: emitReadable",Me.length,Me.ended),Me.length===0&&Me.ended?pt(this):Pt(this),null;if(xe=st(xe,Me),xe===0&&Me.ended)return Me.length===0&&pt(this),null;var tt=Me.needReadable;ue("need readable",tt),(Me.length===0||Me.length-xe<Me.highWaterMark)&&(tt=!0,ue("length less than watermark",tt)),Me.ended||Me.reading?(tt=!1,ue("reading or ended",tt)):tt&&(ue("do read"),Me.reading=!0,Me.sync=!0,Me.length===0&&(Me.needReadable=!0),this._read(Me.highWaterMark),Me.sync=!1,Me.reading||(xe=st(Ze,Me)));var Ie;return xe>0?Ie=Et(xe,Me):Ie=null,Ie===null?(Me.needReadable=!0,xe=0):Me.length-=xe,Me.length===0&&(Me.ended||(Me.needReadable=!0),Ze!==xe&&Me.ended&&pt(this)),Ie!==null&&this.emit("data",Ie),Ie};function ct(xe,Me){if(!Me.ended){if(Me.decoder){var Ze=Me.decoder.end();Ze&&Ze.length&&(Me.buffer.push(Ze),Me.length+=Me.objectMode?1:Ze.length)}Me.ended=!0,Pt(xe)}}function Pt(xe){var Me=xe._readableState;Me.needReadable=!1,Me.emittedReadable||(ue("emitReadable",Me.flowing),Me.emittedReadable=!0,Me.sync?ke.nextTick($e,xe):$e(xe))}function $e(xe){ue("emit readable"),xe.emit("readable"),ut(xe)}function nt(xe,Me){Me.readingMore||(Me.readingMore=!0,ke.nextTick(yt,xe,Me))}function yt(xe,Me){for(var Ze=Me.length;!Me.reading&&!Me.flowing&&!Me.ended&&Me.length<Me.highWaterMark&&(ue("maybeReadMore read 0"),xe.read(0),Ze!==Me.length);)Ze=Me.length;Me.readingMore=!1}Ae.prototype._read=function(xe){this.emit("error",new Error("_read() is not implemented"))},Ae.prototype.pipe=function(xe,Me){var Ze=this,tt=this._readableState;switch(tt.pipesCount){case 0:tt.pipes=xe;break;case 1:tt.pipes=[tt.pipes,xe];break;default:tt.pipes.push(xe);break}tt.pipesCount+=1,ue("pipe count=%d opts=%j",tt.pipesCount,Me);var Ie=(!Me||Me.end!==!1)&&xe!==fe.stdout&&xe!==fe.stderr,_e=Ie?rt:Ht;tt.endEmitted?ke.nextTick(_e):Ze.once("end",_e),xe.on("unpipe",He);function He(sn,tn){ue("onunpipe"),sn===Ze&&tn&&tn.hasUnpiped===!1&&(tn.hasUnpiped=!0,Nt())}function rt(){ue("onend"),xe.end()}var St=xt(Ze);xe.on("drain",St);var Ct=!1;function Nt(){ue("cleanup"),xe.removeListener("close",qt),xe.removeListener("finish",rn),xe.removeListener("drain",St),xe.removeListener("error",$t),xe.removeListener("unpipe",He),Ze.removeListener("end",rt),Ze.removeListener("end",Ht),Ze.removeListener("data",Rt),Ct=!0,tt.awaitDrain&&(!xe._writableState||xe._writableState.needDrain)&&St()}var Ot=!1;Ze.on("data",Rt);function Rt(sn){ue("ondata"),Ot=!1;var tn=xe.write(sn);tn===!1&&!Ot&&((tt.pipesCount===1&&tt.pipes===xe||tt.pipesCount>1&&Ke(tt.pipes,xe)!==-1)&&!Ct&&(ue("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,Ot=!0),Ze.pause())}function $t(sn){ue("onerror",sn),Ht(),xe.removeListener("error",$t),ve(xe,"error")===0&&xe.emit("error",sn)}Fe(xe,"error",$t);function qt(){xe.removeListener("finish",rn),Ht()}xe.once("close",qt);function rn(){ue("onfinish"),xe.removeListener("close",qt),Ht()}xe.once("finish",rn);function Ht(){ue("unpipe"),Ze.unpipe(xe)}return xe.emit("pipe",Ze),tt.flowing||(ue("pipe resume"),Ze.resume()),xe};function xt(xe){return function(){var Me=xe._readableState;ue("pipeOnDrain",Me.awaitDrain),Me.awaitDrain&&Me.awaitDrain--,Me.awaitDrain===0&&ve(xe,"data")&&(Me.flowing=!0,ut(xe))}}Ae.prototype.unpipe=function(xe){var Me=this._readableState,Ze={hasUnpiped:!1};if(Me.pipesCount===0)return this;if(Me.pipesCount===1)return xe&&xe!==Me.pipes?this:(xe||(xe=Me.pipes),Me.pipes=null,Me.pipesCount=0,Me.flowing=!1,xe&&xe.emit("unpipe",this,Ze),this);if(!xe){var tt=Me.pipes,Ie=Me.pipesCount;Me.pipes=null,Me.pipesCount=0,Me.flowing=!1;for(var _e=0;_e<Ie;_e++)tt[_e].emit("unpipe",this,Ze);return this}var He=Ke(Me.pipes,xe);return He===-1?this:(Me.pipes.splice(He,1),Me.pipesCount-=1,Me.pipesCount===1&&(Me.pipes=Me.pipes[0]),xe.emit("unpipe",this,Ze),this)},Ae.prototype.on=function(xe,Me){var Ze=we.prototype.on.call(this,xe,Me);if(xe==="data")this._readableState.flowing!==!1&&this.resume();else if(xe==="readable"){var tt=this._readableState;!tt.endEmitted&&!tt.readableListening&&(tt.readableListening=tt.needReadable=!0,tt.emittedReadable=!1,tt.reading?tt.length&&Pt(this):ke.nextTick(wt,this))}return Ze},Ae.prototype.addListener=Ae.prototype.on;function wt(xe){ue("readable nexttick read 0"),xe.read(0)}Ae.prototype.resume=function(){var xe=this._readableState;return xe.flowing||(ue("resume"),xe.flowing=!0,dt(this,xe)),this};function dt(xe,Me){Me.resumeScheduled||(Me.resumeScheduled=!0,ke.nextTick(ft,xe,Me))}function ft(xe,Me){Me.reading||(ue("resume read 0"),xe.read(0)),Me.resumeScheduled=!1,Me.awaitDrain=0,xe.emit("resume"),ut(xe),Me.flowing&&!Me.reading&&xe.read(0)}Ae.prototype.pause=function(){return ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ut(xe){var Me=xe._readableState;for(ue("flow",Me.flowing);Me.flowing&&xe.read()!==null;);}Ae.prototype.wrap=function(xe){var Me=this,Ze=this._readableState,tt=!1;xe.on("end",function(){if(ue("wrapped end"),Ze.decoder&&!Ze.ended){var He=Ze.decoder.end();He&&He.length&&Me.push(He)}Me.push(null)}),xe.on("data",function(He){if(ue("wrapped data"),Ze.decoder&&(He=Ze.decoder.write(He)),!(Ze.objectMode&&He==null)&&!(!Ze.objectMode&&(!He||!He.length))){var rt=Me.push(He);rt||(tt=!0,xe.pause())}});for(var Ie in xe)this[Ie]===void 0&&typeof xe[Ie]=="function"&&(this[Ie]=function(He){return function(){return xe[He].apply(xe,arguments)}}(Ie));for(var _e=0;_e<Be.length;_e++)xe.on(Be[_e],this.emit.bind(this,Be[_e]));return this._read=function(He){ue("wrapped _read",He),tt&&(tt=!1,xe.resume())},this},Object.defineProperty(Ae.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Ae._fromList=Et;function Et(xe,Me){if(Me.length===0)return null;var Ze;return Me.objectMode?Ze=Me.buffer.shift():!xe||xe>=Me.length?(Me.decoder?Ze=Me.buffer.join(""):Me.buffer.length===1?Ze=Me.buffer.head.data:Ze=Me.buffer.concat(Me.length),Me.buffer.clear()):Ze=mt(xe,Me.buffer,Me.decoder),Ze}function mt(xe,Me,Ze){var tt;return xe<Me.head.data.length?(tt=Me.head.data.slice(0,xe),Me.head.data=Me.head.data.slice(xe)):xe===Me.head.data.length?tt=Me.shift():tt=Ze?vt(xe,Me):kt(xe,Me),tt}function vt(xe,Me){var Ze=Me.head,tt=1,Ie=Ze.data;for(xe-=Ie.length;Ze=Ze.next;){var _e=Ze.data,He=xe>_e.length?_e.length:xe;if(He===_e.length?Ie+=_e:Ie+=_e.slice(0,xe),xe-=He,xe===0){He===_e.length?(++tt,Ze.next?Me.head=Ze.next:Me.head=Me.tail=null):(Me.head=Ze,Ze.data=_e.slice(He));break}++tt}return Me.length-=tt,Ie}function kt(xe,Me){var Ze=de.allocUnsafe(xe),tt=Me.head,Ie=1;for(tt.data.copy(Ze),xe-=tt.data.length;tt=tt.next;){var _e=tt.data,He=xe>_e.length?_e.length:xe;if(_e.copy(Ze,Ze.length-xe,0,He),xe-=He,xe===0){He===_e.length?(++Ie,tt.next?Me.head=tt.next:Me.head=Me.tail=null):(Me.head=tt,tt.data=_e.slice(He));break}++Ie}return Me.length-=Ie,Ze}function pt(xe){var Me=xe._readableState;if(Me.length>0)throw new Error('"endReadable()" called on non-empty stream');Me.endEmitted||(Me.ended=!0,ke.nextTick(Qe,Me,xe))}function Qe(xe,Me){!xe.endEmitted&&xe.length===0&&(xe.endEmitted=!0,Me.readable=!1,Me.emit("end"))}function Ke(xe,Me){for(var Ze=0,tt=xe.length;Ze<tt;Ze++)if(xe[Ze]===Me)return Ze;return-1}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(oe,ze,De){"use strict";ze.exports=Ce;var fe=oe("./_stream_duplex"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(Ce,fe);function ke(ve,we){var de=this._transformState;de.transforming=!1;var z=de.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,we!=null&&this.push(we),z(ve);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function Ce(ve){if(!(this instanceof Ce))return new Ce(ve);fe.call(this,ve),this._transformState={afterTransform:ke.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ve&&(typeof ve.transform=="function"&&(this._transform=ve.transform),typeof ve.flush=="function"&&(this._flush=ve.flush)),this.on("prefinish",Se)}function Se(){var ve=this;typeof this._flush=="function"?this._flush(function(we,de){Le(ve,we,de)}):Le(this,null,null)}Ce.prototype.push=function(ve,we){return this._transformState.needTransform=!1,fe.prototype.push.call(this,ve,we)},Ce.prototype._transform=function(ve,we,de){throw new Error("_transform() is not implemented")},Ce.prototype._write=function(ve,we,de){var z=this._transformState;if(z.writecb=de,z.writechunk=ve,z.writeencoding=we,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},Ce.prototype._read=function(ve){var we=this._transformState;we.writechunk!==null&&we.writecb&&!we.transforming?(we.transforming=!0,this._transform(we.writechunk,we.writeencoding,we.afterTransform)):we.needTransform=!0},Ce.prototype._destroy=function(ve,we){var de=this;fe.prototype._destroy.call(this,ve,function(z){we(z),de.emit("close")})};function Le(ve,we,de){if(we)return ve.emit("error",we);if(de!=null&&ve.push(de),ve._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(ve._transformState.transforming)throw new Error("Calling transform done when still transforming");return ve.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(oe,ze,De){(function(fe,me,ke){(function(){"use strict";var Ce=oe("process-nextick-args");ze.exports=Fe;function Se(ft,ut,Et){this.chunk=ft,this.encoding=ut,this.callback=Et,this.next=null}function Le(ft){var ut=this;this.next=null,this.entry=null,this.finish=function(){dt(ut,ft)}}var ve=!fe.browser&&["v0.10","v0.9."].indexOf(fe.version.slice(0,5))>-1?ke:Ce.nextTick,we;Fe.WritableState=je;var de=Object.create(oe("core-util-is"));de.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},ee=oe("./internal/streams/stream"),ae=oe("safe-buffer").Buffer,ie=me.Uint8Array||function(){};function le(ft){return ae.from(ft)}function ue(ft){return ae.isBuffer(ft)||ft instanceof ie}var ge=oe("./internal/streams/destroy");de.inherits(Fe,ee);function Pe(){}function je(ft,ut){we=we||oe("./_stream_duplex"),ft=ft||{};var Et=ut instanceof we;this.objectMode=!!ft.objectMode,Et&&(this.objectMode=this.objectMode||!!ft.writableObjectMode);var mt=ft.highWaterMark,vt=ft.writableHighWaterMark,kt=this.objectMode?16:16*1024;mt||mt===0?this.highWaterMark=mt:Et&&(vt||vt===0)?this.highWaterMark=vt:this.highWaterMark=kt,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 pt=ft.decodeStrings===!1;this.decodeStrings=!pt,this.defaultEncoding=ft.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Qe){ot(ut,Qe)},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 Le(this)}je.prototype.getBuffer=function(){for(var ut=this.bufferedRequest,Et=[];ut;)Et.push(ut),ut=ut.next;return Et},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ft){}}();var Be;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Be=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(ft){return Be.call(this,ft)?!0:this!==Fe?!1:ft&&ft._writableState instanceof je}})):Be=function(ft){return ft instanceof this};function Fe(ft){if(we=we||oe("./_stream_duplex"),!Be.call(Fe,this)&&!(this instanceof we))return new Fe(ft);this._writableState=new je(ft,this),this.writable=!0,ft&&(typeof ft.write=="function"&&(this._write=ft.write),typeof ft.writev=="function"&&(this._writev=ft.writev),typeof ft.destroy=="function"&&(this._destroy=ft.destroy),typeof ft.final=="function"&&(this._final=ft.final)),ee.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ne(ft,ut){var Et=new Error("write after end");ft.emit("error",Et),Ce.nextTick(ut,Et)}function Ae(ft,ut,Et,mt){var vt=!0,kt=!1;return Et===null?kt=new TypeError("May not write null values to stream"):typeof Et!="string"&&Et!==void 0&&!ut.objectMode&&(kt=new TypeError("Invalid non-string/buffer chunk")),kt&&(ft.emit("error",kt),Ce.nextTick(mt,kt),vt=!1),vt}Fe.prototype.write=function(ft,ut,Et){var mt=this._writableState,vt=!1,kt=!mt.objectMode&&ue(ft);return kt&&!ae.isBuffer(ft)&&(ft=le(ft)),typeof ut=="function"&&(Et=ut,ut=null),kt?ut="buffer":ut||(ut=mt.defaultEncoding),typeof Et!="function"&&(Et=Pe),mt.ended?Ne(this,Et):(kt||Ae(this,mt,ft,Et))&&(mt.pendingcb++,vt=We(this,mt,kt,ft,ut,Et)),vt},Fe.prototype.cork=function(){var ft=this._writableState;ft.corked++},Fe.prototype.uncork=function(){var ft=this._writableState;ft.corked&&(ft.corked--,!ft.writing&&!ft.corked&&!ft.finished&&!ft.bufferProcessing&&ft.bufferedRequest&&Pt(this,ft))},Fe.prototype.setDefaultEncoding=function(ut){if(typeof ut=="string"&&(ut=ut.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ut+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ut);return this._writableState.defaultEncoding=ut,this};function Re(ft,ut,Et){return!ft.objectMode&&ft.decodeStrings!==!1&&typeof ut=="string"&&(ut=ae.from(ut,Et)),ut}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function We(ft,ut,Et,mt,vt,kt){if(!Et){var pt=Re(ut,mt,vt);mt!==pt&&(Et=!0,vt="buffer",mt=pt)}var Qe=ut.objectMode?1:mt.length;ut.length+=Qe;var Ke=ut.length<ut.highWaterMark;if(Ke||(ut.needDrain=!0),ut.writing||ut.corked){var xe=ut.lastBufferedRequest;ut.lastBufferedRequest={chunk:mt,encoding:vt,isBuf:Et,callback:kt,next:null},xe?xe.next=ut.lastBufferedRequest:ut.bufferedRequest=ut.lastBufferedRequest,ut.bufferedRequestCount+=1}else Ye(ft,ut,!1,Qe,mt,vt,kt);return Ke}function Ye(ft,ut,Et,mt,vt,kt,pt){ut.writelen=mt,ut.writecb=pt,ut.writing=!0,ut.sync=!0,Et?ft._writev(vt,ut.onwrite):ft._write(vt,kt,ut.onwrite),ut.sync=!1}function Ue(ft,ut,Et,mt,vt){--ut.pendingcb,Et?(Ce.nextTick(vt,mt),Ce.nextTick(xt,ft,ut),ft._writableState.errorEmitted=!0,ft.emit("error",mt)):(vt(mt),ft._writableState.errorEmitted=!0,ft.emit("error",mt),xt(ft,ut))}function Ve(ft){ft.writing=!1,ft.writecb=null,ft.length-=ft.writelen,ft.writelen=0}function ot(ft,ut){var Et=ft._writableState,mt=Et.sync,vt=Et.writecb;if(Ve(Et),ut)Ue(ft,Et,mt,ut,vt);else{var kt=$e(Et);!kt&&!Et.corked&&!Et.bufferProcessing&&Et.bufferedRequest&&Pt(ft,Et),mt?ve(st,ft,Et,kt,vt):st(ft,Et,kt,vt)}}function st(ft,ut,Et,mt){Et||ct(ft,ut),ut.pendingcb--,mt(),xt(ft,ut)}function ct(ft,ut){ut.length===0&&ut.needDrain&&(ut.needDrain=!1,ft.emit("drain"))}function Pt(ft,ut){ut.bufferProcessing=!0;var Et=ut.bufferedRequest;if(ft._writev&&Et&&Et.next){var mt=ut.bufferedRequestCount,vt=new Array(mt),kt=ut.corkedRequestsFree;kt.entry=Et;for(var pt=0,Qe=!0;Et;)vt[pt]=Et,Et.isBuf||(Qe=!1),Et=Et.next,pt+=1;vt.allBuffers=Qe,Ye(ft,ut,!0,ut.length,vt,"",kt.finish),ut.pendingcb++,ut.lastBufferedRequest=null,kt.next?(ut.corkedRequestsFree=kt.next,kt.next=null):ut.corkedRequestsFree=new Le(ut),ut.bufferedRequestCount=0}else{for(;Et;){var Ke=Et.chunk,xe=Et.encoding,Me=Et.callback,Ze=ut.objectMode?1:Ke.length;if(Ye(ft,ut,!1,Ze,Ke,xe,Me),Et=Et.next,ut.bufferedRequestCount--,ut.writing)break}Et===null&&(ut.lastBufferedRequest=null)}ut.bufferedRequest=Et,ut.bufferProcessing=!1}Fe.prototype._write=function(ft,ut,Et){Et(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(ft,ut,Et){var mt=this._writableState;typeof ft=="function"?(Et=ft,ft=null,ut=null):typeof ut=="function"&&(Et=ut,ut=null),ft!=null&&this.write(ft,ut),mt.corked&&(mt.corked=1,this.uncork()),!mt.ending&&!mt.finished&&wt(this,mt,Et)};function $e(ft){return ft.ending&&ft.length===0&&ft.bufferedRequest===null&&!ft.finished&&!ft.writing}function nt(ft,ut){ft._final(function(Et){ut.pendingcb--,Et&&ft.emit("error",Et),ut.prefinished=!0,ft.emit("prefinish"),xt(ft,ut)})}function yt(ft,ut){!ut.prefinished&&!ut.finalCalled&&(typeof ft._final=="function"?(ut.pendingcb++,ut.finalCalled=!0,Ce.nextTick(nt,ft,ut)):(ut.prefinished=!0,ft.emit("prefinish")))}function xt(ft,ut){var Et=$e(ut);return Et&&(yt(ft,ut),ut.pendingcb===0&&(ut.finished=!0,ft.emit("finish"))),Et}function wt(ft,ut,Et){ut.ending=!0,xt(ft,ut),Et&&(ut.finished?Ce.nextTick(Et):ft.once("finish",Et)),ut.ended=!0,ft.writable=!1}function dt(ft,ut,Et){var mt=ft.entry;for(ft.entry=null;mt;){var vt=mt.callback;ut.pendingcb--,vt(Et),mt=mt.next}ut.corkedRequestsFree?ut.corkedRequestsFree.next=ft:ut.corkedRequestsFree=ft}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ft){this._writableState&&(this._writableState.destroyed=ft)}}),Fe.prototype.destroy=ge.destroy,Fe.prototype._undestroy=ge.undestroy,Fe.prototype._destroy=function(ft,ut){this.end(),ut(ft)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(oe,ze,De){"use strict";function fe(Se,Le){if(!(Se instanceof Le))throw new TypeError("Cannot call a class as a function")}var me=oe("safe-buffer").Buffer,ke=oe("util");function Ce(Se,Le,ve){Se.copy(Le,ve)}ze.exports=function(){function Se(){fe(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(ve){var we={data:ve,next:null};this.length>0?this.tail.next=we:this.head=we,this.tail=we,++this.length},Se.prototype.unshift=function(ve){var we={data:ve,next:this.head};this.length===0&&(this.tail=we),this.head=we,++this.length},Se.prototype.shift=function(){if(this.length!==0){var ve=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ve}},Se.prototype.clear=function(){this.head=this.tail=null,this.length=0},Se.prototype.join=function(ve){if(this.length===0)return"";for(var we=this.head,de=""+we.data;we=we.next;)de+=ve+we.data;return de},Se.prototype.concat=function(ve){if(this.length===0)return me.alloc(0);if(this.length===1)return this.head.data;for(var we=me.allocUnsafe(ve>>>0),de=this.head,z=0;de;)Ce(de.data,we,z),z+=de.data.length,de=de.next;return we},Se}(),ke&&ke.inspect&&ke.inspect.custom&&(ze.exports.prototype[ke.inspect.custom]=function(){var Se=ke.inspect({length:this.length});return this.constructor.name+" "+Se})},{"safe-buffer":396,util:89}],392:[function(oe,ze,De){"use strict";var fe=oe("process-nextick-args");function me(Se,Le){var ve=this,we=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return we||de?(Le?Le(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&fe.nextTick(Ce,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Le&&z?(fe.nextTick(Ce,ve,z),ve._writableState&&(ve._writableState.errorEmitted=!0)):Le&&Le(z)}),this)}function ke(){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 Ce(Se,Le){Se.emit("error",Le)}ze.exports={destroy:me,undestroy:ke}},{"process-nextick-args":380}],393:[function(oe,ze,De){ze.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,ze,De){De=ze.exports=oe("./lib/_stream_readable.js"),De.Stream=De,De.Readable=De,De.Writable=oe("./lib/_stream_writable.js"),De.Duplex=oe("./lib/_stream_duplex.js"),De.Transform=oe("./lib/_stream_transform.js"),De.PassThrough=oe("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(oe,ze,De){var fe=function(me){"use strict";var ke=Object.prototype,Ce=ke.hasOwnProperty,Se,Le=typeof Symbol=="function"?Symbol:{},ve=Le.iterator||"@@iterator",we=Le.asyncIterator||"@@asyncIterator",de=Le.toStringTag||"@@toStringTag";function z(yt,xt,wt){return Object.defineProperty(yt,xt,{value:wt,enumerable:!0,configurable:!0,writable:!0}),yt[xt]}try{z({},"")}catch(yt){z=function(xt,wt,dt){return xt[wt]=dt}}function ee(yt,xt,wt,dt){var ft=xt&&xt.prototype instanceof je?xt:je,ut=Object.create(ft.prototype),Et=new Pt(dt||[]);return ut._invoke=Ve(yt,wt,Et),ut}me.wrap=ee;function ae(yt,xt,wt){try{return{type:"normal",arg:yt.call(xt,wt)}}catch(dt){return{type:"throw",arg:dt}}}var ie="suspendedStart",le="suspendedYield",ue="executing",ge="completed",Pe={};function je(){}function Be(){}function Fe(){}var Ne={};z(Ne,ve,function(){return this});var Ae=Object.getPrototypeOf,Re=Ae&&Ae(Ae($e([])));Re&&Re!==ke&&Ce.call(Re,ve)&&(Ne=Re);var We=Fe.prototype=je.prototype=Object.create(Ne);Be.prototype=Fe,z(We,"constructor",Fe),z(Fe,"constructor",Be),Be.displayName=z(Fe,de,"GeneratorFunction");function Ye(yt){["next","throw","return"].forEach(function(xt){z(yt,xt,function(wt){return this._invoke(xt,wt)})})}me.isGeneratorFunction=function(yt){var xt=typeof yt=="function"&&yt.constructor;return xt?xt===Be||(xt.displayName||xt.name)==="GeneratorFunction":!1},me.mark=function(yt){return Object.setPrototypeOf?Object.setPrototypeOf(yt,Fe):(yt.__proto__=Fe,z(yt,de,"GeneratorFunction")),yt.prototype=Object.create(We),yt},me.awrap=function(yt){return{__await:yt}};function Ue(yt,xt){function wt(ut,Et,mt,vt){var kt=ae(yt[ut],yt,Et);if(kt.type==="throw")vt(kt.arg);else{var pt=kt.arg,Qe=pt.value;return Qe&&typeof Qe=="object"&&Ce.call(Qe,"__await")?xt.resolve(Qe.__await).then(function(Ke){wt("next",Ke,mt,vt)},function(Ke){wt("throw",Ke,mt,vt)}):xt.resolve(Qe).then(function(Ke){pt.value=Ke,mt(pt)},function(Ke){return wt("throw",Ke,mt,vt)})}}var dt;function ft(ut,Et){function mt(){return new xt(function(vt,kt){wt(ut,Et,vt,kt)})}return dt=dt?dt.then(mt,mt):mt()}this._invoke=ft}Ye(Ue.prototype),z(Ue.prototype,we,function(){return this}),me.AsyncIterator=Ue,me.async=function(yt,xt,wt,dt,ft){ft===void 0&&(ft=Promise);var ut=new Ue(ee(yt,xt,wt,dt),ft);return me.isGeneratorFunction(xt)?ut:ut.next().then(function(Et){return Et.done?Et.value:ut.next()})};function Ve(yt,xt,wt){var dt=ie;return function(ut,Et){if(dt===ue)throw new Error("Generator is already running");if(dt===ge){if(ut==="throw")throw Et;return nt()}for(wt.method=ut,wt.arg=Et;;){var mt=wt.delegate;if(mt){var vt=ot(mt,wt);if(vt){if(vt===Pe)continue;return vt}}if(wt.method==="next")wt.sent=wt._sent=wt.arg;else if(wt.method==="throw"){if(dt===ie)throw dt=ge,wt.arg;wt.dispatchException(wt.arg)}else wt.method==="return"&&wt.abrupt("return",wt.arg);dt=ue;var kt=ae(yt,xt,wt);if(kt.type==="normal"){if(dt=wt.done?ge:le,kt.arg===Pe)continue;return{value:kt.arg,done:wt.done}}else kt.type==="throw"&&(dt=ge,wt.method="throw",wt.arg=kt.arg)}}}function ot(yt,xt){var wt=yt.iterator[xt.method];if(wt===Se){if(xt.delegate=null,xt.method==="throw"){if(yt.iterator.return&&(xt.method="return",xt.arg=Se,ot(yt,xt),xt.method==="throw"))return Pe;xt.method="throw",xt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pe}var dt=ae(wt,yt.iterator,xt.arg);if(dt.type==="throw")return xt.method="throw",xt.arg=dt.arg,xt.delegate=null,Pe;var ft=dt.arg;if(!ft)return xt.method="throw",xt.arg=new TypeError("iterator result is not an object"),xt.delegate=null,Pe;if(ft.done)xt[yt.resultName]=ft.value,xt.next=yt.nextLoc,xt.method!=="return"&&(xt.method="next",xt.arg=Se);else return ft;return xt.delegate=null,Pe}Ye(We),z(We,de,"Generator"),z(We,ve,function(){return this}),z(We,"toString",function(){return"[object Generator]"});function st(yt){var xt={tryLoc:yt[0]};1 in yt&&(xt.catchLoc=yt[1]),2 in yt&&(xt.finallyLoc=yt[2],xt.afterLoc=yt[3]),this.tryEntries.push(xt)}function ct(yt){var xt=yt.completion||{};xt.type="normal",delete xt.arg,yt.completion=xt}function Pt(yt){this.tryEntries=[{tryLoc:"root"}],yt.forEach(st,this),this.reset(!0)}me.keys=function(yt){var xt=[];for(var wt in yt)xt.push(wt);return xt.reverse(),function dt(){for(;xt.length;){var ft=xt.pop();if(ft in yt)return dt.value=ft,dt.done=!1,dt}return dt.done=!0,dt}};function $e(yt){if(yt){var xt=yt[ve];if(xt)return xt.call(yt);if(typeof yt.next=="function")return yt;if(!isNaN(yt.length)){var wt=-1,dt=function ft(){for(;++wt<yt.length;)if(Ce.call(yt,wt))return ft.value=yt[wt],ft.done=!1,ft;return ft.value=Se,ft.done=!0,ft};return dt.next=dt}}return{next:nt}}me.values=$e;function nt(){return{value:Se,done:!0}}return Pt.prototype={constructor:Pt,reset:function(yt){if(this.prev=0,this.next=0,this.sent=this._sent=Se,this.done=!1,this.delegate=null,this.method="next",this.arg=Se,this.tryEntries.forEach(ct),!yt)for(var xt in this)xt.charAt(0)==="t"&&Ce.call(this,xt)&&!isNaN(+xt.slice(1))&&(this[xt]=Se)},stop:function(){this.done=!0;var yt=this.tryEntries[0],xt=yt.completion;if(xt.type==="throw")throw xt.arg;return this.rval},dispatchException:function(yt){if(this.done)throw yt;var xt=this;function wt(vt,kt){return ut.type="throw",ut.arg=yt,xt.next=vt,kt&&(xt.method="next",xt.arg=Se),!!kt}for(var dt=this.tryEntries.length-1;dt>=0;--dt){var ft=this.tryEntries[dt],ut=ft.completion;if(ft.tryLoc==="root")return wt("end");if(ft.tryLoc<=this.prev){var Et=Ce.call(ft,"catchLoc"),mt=Ce.call(ft,"finallyLoc");if(Et&&mt){if(this.prev<ft.catchLoc)return wt(ft.catchLoc,!0);if(this.prev<ft.finallyLoc)return wt(ft.finallyLoc)}else if(Et){if(this.prev<ft.catchLoc)return wt(ft.catchLoc,!0)}else if(mt){if(this.prev<ft.finallyLoc)return wt(ft.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(yt,xt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var dt=this.tryEntries[wt];if(dt.tryLoc<=this.prev&&Ce.call(dt,"finallyLoc")&&this.prev<dt.finallyLoc){var ft=dt;break}}ft&&(yt==="break"||yt==="continue")&&ft.tryLoc<=xt&&xt<=ft.finallyLoc&&(ft=null);var ut=ft?ft.completion:{};return ut.type=yt,ut.arg=xt,ft?(this.method="next",this.next=ft.finallyLoc,Pe):this.complete(ut)},complete:function(yt,xt){if(yt.type==="throw")throw yt.arg;return yt.type==="break"||yt.type==="continue"?this.next=yt.arg:yt.type==="return"?(this.rval=this.arg=yt.arg,this.method="return",this.next="end"):yt.type==="normal"&&xt&&(this.next=xt),Pe},finish:function(yt){for(var xt=this.tryEntries.length-1;xt>=0;--xt){var wt=this.tryEntries[xt];if(wt.finallyLoc===yt)return this.complete(wt.completion,wt.afterLoc),ct(wt),Pe}},catch:function(yt){for(var xt=this.tryEntries.length-1;xt>=0;--xt){var wt=this.tryEntries[xt];if(wt.tryLoc===yt){var dt=wt.completion;if(dt.type==="throw"){var ft=dt.arg;ct(wt)}return ft}}throw new Error("illegal catch attempt")},delegateYield:function(yt,xt,wt){return this.delegate={iterator:$e(yt),resultName:xt,nextLoc:wt},this.method==="next"&&(this.arg=Se),Pe}},me}(typeof ze=="object"?ze.exports:{});try{regeneratorRuntime=fe}catch(me){typeof globalThis=="object"?globalThis.regeneratorRuntime=fe:Function("r","regeneratorRuntime = r")(fe)}},{}],396:[function(oe,ze,De){var fe=oe("buffer"),me=fe.Buffer;function ke(Se,Le){for(var ve in Se)Le[ve]=Se[ve]}me.from&&me.alloc&&me.allocUnsafe&&me.allocUnsafeSlow?ze.exports=fe:(ke(fe,De),De.Buffer=Ce);function Ce(Se,Le,ve){return me(Se,Le,ve)}ke(me,Ce),Ce.from=function(Se,Le,ve){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return me(Se,Le,ve)},Ce.alloc=function(Se,Le,ve){if(typeof Se!="number")throw new TypeError("Argument must be a number");var we=me(Se);return Le!==void 0?typeof ve=="string"?we.fill(Le,ve):we.fill(Le):we.fill(0),we},Ce.allocUnsafe=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return me(Se)},Ce.allocUnsafeSlow=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return fe.SlowBuffer(Se)}},{buffer:90}],397:[function(oe,ze,De){(function(fe){(function(){(function(me){me.parser=function(pt,Qe){return new Ce(pt,Qe)},me.SAXParser=Ce,me.SAXStream=ee,me.createStream=z,me.MAX_BUFFER_LENGTH=64*1024;var ke=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];me.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ce(pt,Qe){if(!(this instanceof Ce))return new Ce(pt,Qe);var Ke=this;Le(Ke),Ke.q=Ke.c="",Ke.bufferCheckPosition=me.MAX_BUFFER_LENGTH,Ke.opt=Qe||{},Ke.opt.lowercase=Ke.opt.lowercase||Ke.opt.lowercasetags,Ke.looseCase=Ke.opt.lowercase?"toLowerCase":"toUpperCase",Ke.tags=[],Ke.closed=Ke.closedRoot=Ke.sawRoot=!1,Ke.tag=Ke.error=null,Ke.strict=!!pt,Ke.noscript=!!(pt||Ke.opt.noscript),Ke.state=Ue.BEGIN,Ke.strictEntities=Ke.opt.strictEntities,Ke.ENTITIES=Ke.strictEntities?Object.create(me.XML_ENTITIES):Object.create(me.ENTITIES),Ke.attribList=[],Ke.opt.xmlns&&(Ke.ns=Object.create(ge)),Ke.trackPosition=Ke.opt.position!==!1,Ke.trackPosition&&(Ke.position=Ke.line=Ke.column=0),ot(Ke,"onready")}Object.create||(Object.create=function(pt){function Qe(){}Qe.prototype=pt;var Ke=new Qe;return Ke}),Object.keys||(Object.keys=function(pt){var Qe=[];for(var Ke in pt)pt.hasOwnProperty(Ke)&&Qe.push(Ke);return Qe});function Se(pt){for(var Qe=Math.max(me.MAX_BUFFER_LENGTH,10),Ke=0,xe=0,Me=ke.length;xe<Me;xe++){var Ze=pt[ke[xe]].length;if(Ze>Qe)switch(ke[xe]){case"textNode":ct(pt);break;case"cdata":st(pt,"oncdata",pt.cdata),pt.cdata="";break;case"script":st(pt,"onscript",pt.script),pt.script="";break;default:$e(pt,"Max buffer length exceeded: "+ke[xe])}Ke=Math.max(Ke,Ze)}var tt=me.MAX_BUFFER_LENGTH-Ke;pt.bufferCheckPosition=tt+pt.position}function Le(pt){for(var Qe=0,Ke=ke.length;Qe<Ke;Qe++)pt[ke[Qe]]=""}function ve(pt){ct(pt),pt.cdata!==""&&(st(pt,"oncdata",pt.cdata),pt.cdata=""),pt.script!==""&&(st(pt,"onscript",pt.script),pt.script="")}Ce.prototype={end:function(){nt(this)},write:kt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var we;try{we=oe("stream").Stream}catch(pt){we=function(){}}var de=me.EVENTS.filter(function(pt){return pt!=="error"&&pt!=="end"});function z(pt,Qe){return new ee(pt,Qe)}function ee(pt,Qe){if(!(this instanceof ee))return new ee(pt,Qe);we.apply(this),this._parser=new Ce(pt,Qe),this.writable=!0,this.readable=!0;var Ke=this;this._parser.onend=function(){Ke.emit("end")},this._parser.onerror=function(xe){Ke.emit("error",xe),Ke._parser.error=null},this._decoder=null,de.forEach(function(xe){Object.defineProperty(Ke,"on"+xe,{get:function(){return Ke._parser["on"+xe]},set:function(Me){if(!Me)return Ke.removeAllListeners(xe),Ke._parser["on"+xe]=Me,Me;Ke.on(xe,Me)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(we.prototype,{constructor:{value:ee}}),ee.prototype.write=function(pt){if(typeof fe=="function"&&typeof fe.isBuffer=="function"&&fe.isBuffer(pt)){if(!this._decoder){var Qe=oe("string_decoder").StringDecoder;this._decoder=new Qe("utf8")}pt=this._decoder.write(pt)}return this._parser.write(pt.toString()),this.emit("data",pt),!0},ee.prototype.end=function(pt){return pt&&pt.length&&this.write(pt),this._parser.end(),!0},ee.prototype.on=function(pt,Qe){var Ke=this;return!Ke._parser["on"+pt]&&de.indexOf(pt)!==-1&&(Ke._parser["on"+pt]=function(){var xe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xe.splice(0,0,pt),Ke.emit.apply(Ke,xe)}),we.prototype.on.call(Ke,pt,Qe)};var ae="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",ge={xml:le,xmlns:ue},Pe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Be=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Ne(pt){return pt===" "||pt===`
`||pt==="\r"||pt===" "}function Ae(pt){return pt==='"'||pt==="'"}function Re(pt){return pt===">"||Ne(pt)}function We(pt,Qe){return pt.test(Qe)}function Ye(pt,Qe){return!We(pt,Qe)}var Ue=0;me.STATE={BEGIN:Ue++,BEGIN_WHITESPACE:Ue++,TEXT:Ue++,TEXT_ENTITY:Ue++,OPEN_WAKA:Ue++,SGML_DECL:Ue++,SGML_DECL_QUOTED:Ue++,DOCTYPE:Ue++,DOCTYPE_QUOTED:Ue++,DOCTYPE_DTD:Ue++,DOCTYPE_DTD_QUOTED:Ue++,COMMENT_STARTING:Ue++,COMMENT:Ue++,COMMENT_ENDING:Ue++,COMMENT_ENDED:Ue++,CDATA:Ue++,CDATA_ENDING:Ue++,CDATA_ENDING_2:Ue++,PROC_INST:Ue++,PROC_INST_BODY:Ue++,PROC_INST_ENDING:Ue++,OPEN_TAG:Ue++,OPEN_TAG_SLASH:Ue++,ATTRIB:Ue++,ATTRIB_NAME:Ue++,ATTRIB_NAME_SAW_WHITE:Ue++,ATTRIB_VALUE:Ue++,ATTRIB_VALUE_QUOTED:Ue++,ATTRIB_VALUE_CLOSED:Ue++,ATTRIB_VALUE_UNQUOTED:Ue++,ATTRIB_VALUE_ENTITY_Q:Ue++,ATTRIB_VALUE_ENTITY_U:Ue++,CLOSE_TAG:Ue++,CLOSE_TAG_SAW_WHITE:Ue++,SCRIPT:Ue++,SCRIPT_ENDING:Ue++},me.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},me.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(me.ENTITIES).forEach(function(pt){var Qe=me.ENTITIES[pt],Ke=typeof Qe=="number"?String.fromCharCode(Qe):Qe;me.ENTITIES[pt]=Ke});for(var Ve in me.STATE)me.STATE[me.STATE[Ve]]=Ve;Ue=me.STATE;function ot(pt,Qe,Ke){pt[Qe]&&pt[Qe](Ke)}function st(pt,Qe,Ke){pt.textNode&&ct(pt),ot(pt,Qe,Ke)}function ct(pt){pt.textNode=Pt(pt.opt,pt.textNode),pt.textNode&&ot(pt,"ontext",pt.textNode),pt.textNode=""}function Pt(pt,Qe){return pt.trim&&(Qe=Qe.trim()),pt.normalize&&(Qe=Qe.replace(/\s+/g," ")),Qe}function $e(pt,Qe){return ct(pt),pt.trackPosition&&(Qe+=`
Line: `+pt.line+`
Column: `+pt.column+`
Char: `+pt.c),Qe=new Error(Qe),pt.error=Qe,ot(pt,"onerror",Qe),pt}function nt(pt){return pt.sawRoot&&!pt.closedRoot&&yt(pt,"Unclosed root tag"),pt.state!==Ue.BEGIN&&pt.state!==Ue.BEGIN_WHITESPACE&&pt.state!==Ue.TEXT&&$e(pt,"Unexpected end"),ct(pt),pt.c="",pt.closed=!0,ot(pt,"onend"),Ce.call(pt,pt.strict,pt.opt),pt}function yt(pt,Qe){if(typeof pt!="object"||!(pt instanceof Ce))throw new Error("bad call to strictFail");pt.strict&&$e(pt,Qe)}function xt(pt){pt.strict||(pt.tagName=pt.tagName[pt.looseCase]());var Qe=pt.tags[pt.tags.length-1]||pt,Ke=pt.tag={name:pt.tagName,attributes:{}};pt.opt.xmlns&&(Ke.ns=Qe.ns),pt.attribList.length=0,st(pt,"onopentagstart",Ke)}function wt(pt,Qe){var Ke=pt.indexOf(":"),xe=Ke<0?["",pt]:pt.split(":"),Me=xe[0],Ze=xe[1];return Qe&&pt==="xmlns"&&(Me="xmlns",Ze=""),{prefix:Me,local:Ze}}function dt(pt){if(pt.strict||(pt.attribName=pt.attribName[pt.looseCase]()),pt.attribList.indexOf(pt.attribName)!==-1||pt.tag.attributes.hasOwnProperty(pt.attribName)){pt.attribName=pt.attribValue="";return}if(pt.opt.xmlns){var Qe=wt(pt.attribName,!0),Ke=Qe.prefix,xe=Qe.local;if(Ke==="xmlns")if(xe==="xml"&&pt.attribValue!==le)yt(pt,"xml: prefix must be bound to "+le+`
Actual: `+pt.attribValue);else if(xe==="xmlns"&&pt.attribValue!==ue)yt(pt,"xmlns: prefix must be bound to "+ue+`
Actual: `+pt.attribValue);else{var Me=pt.tag,Ze=pt.tags[pt.tags.length-1]||pt;Me.ns===Ze.ns&&(Me.ns=Object.create(Ze.ns)),Me.ns[xe]=pt.attribValue}pt.attribList.push([pt.attribName,pt.attribValue])}else pt.tag.attributes[pt.attribName]=pt.attribValue,st(pt,"onattribute",{name:pt.attribName,value:pt.attribValue});pt.attribName=pt.attribValue=""}function ft(pt,Qe){if(pt.opt.xmlns){var Ke=pt.tag,xe=wt(pt.tagName);Ke.prefix=xe.prefix,Ke.local=xe.local,Ke.uri=Ke.ns[xe.prefix]||"",Ke.prefix&&!Ke.uri&&(yt(pt,"Unbound namespace prefix: "+JSON.stringify(pt.tagName)),Ke.uri=xe.prefix);var Me=pt.tags[pt.tags.length-1]||pt;Ke.ns&&Me.ns!==Ke.ns&&Object.keys(Ke.ns).forEach(function(Rt){st(pt,"onopennamespace",{prefix:Rt,uri:Ke.ns[Rt]})});for(var Ze=0,tt=pt.attribList.length;Ze<tt;Ze++){var Ie=pt.attribList[Ze],_e=Ie[0],He=Ie[1],rt=wt(_e,!0),St=rt.prefix,Ct=rt.local,Nt=St===""?"":Ke.ns[St]||"",Ot={name:_e,value:He,prefix:St,local:Ct,uri:Nt};St&&St!=="xmlns"&&!Nt&&(yt(pt,"Unbound namespace prefix: "+JSON.stringify(St)),Ot.uri=St),pt.tag.attributes[_e]=Ot,st(pt,"onattribute",Ot)}pt.attribList.length=0}pt.tag.isSelfClosing=!!Qe,pt.sawRoot=!0,pt.tags.push(pt.tag),st(pt,"onopentag",pt.tag),Qe||(!pt.noscript&&pt.tagName.toLowerCase()==="script"?pt.state=Ue.SCRIPT:pt.state=Ue.TEXT,pt.tag=null,pt.tagName=""),pt.attribName=pt.attribValue="",pt.attribList.length=0}function ut(pt){if(!pt.tagName){yt(pt,"Weird empty close tag."),pt.textNode+="</>",pt.state=Ue.TEXT;return}if(pt.script){if(pt.tagName!=="script"){pt.script+="</"+pt.tagName+">",pt.tagName="",pt.state=Ue.SCRIPT;return}st(pt,"onscript",pt.script),pt.script=""}var Qe=pt.tags.length,Ke=pt.tagName;pt.strict||(Ke=Ke[pt.looseCase]());for(var xe=Ke;Qe--;){var Me=pt.tags[Qe];if(Me.name!==xe)yt(pt,"Unexpected close tag");else break}if(Qe<0){yt(pt,"Unmatched closing tag: "+pt.tagName),pt.textNode+="</"+pt.tagName+">",pt.state=Ue.TEXT;return}pt.tagName=Ke;for(var Ze=pt.tags.length;Ze-- >Qe;){var tt=pt.tag=pt.tags.pop();pt.tagName=pt.tag.name,st(pt,"onclosetag",pt.tagName);var Ie={};for(var _e in tt.ns)Ie[_e]=tt.ns[_e];var He=pt.tags[pt.tags.length-1]||pt;pt.opt.xmlns&&tt.ns!==He.ns&&Object.keys(tt.ns).forEach(function(rt){var St=tt.ns[rt];st(pt,"onclosenamespace",{prefix:rt,uri:St})})}Qe===0&&(pt.closedRoot=!0),pt.tagName=pt.attribValue=pt.attribName="",pt.attribList.length=0,pt.state=Ue.TEXT}function Et(pt){var Qe=pt.entity,Ke=Qe.toLowerCase(),xe,Me="";return pt.ENTITIES[Qe]?pt.ENTITIES[Qe]:pt.ENTITIES[Ke]?pt.ENTITIES[Ke]:(Qe=Ke,Qe.charAt(0)==="#"&&(Qe.charAt(1)==="x"?(Qe=Qe.slice(2),xe=parseInt(Qe,16),Me=xe.toString(16)):(Qe=Qe.slice(1),xe=parseInt(Qe,10),Me=xe.toString(10))),Qe=Qe.replace(/^0+/,""),isNaN(xe)||Me.toLowerCase()!==Qe?(yt(pt,"Invalid character entity"),"&"+pt.entity+";"):String.fromCodePoint(xe))}function mt(pt,Qe){Qe==="<"?(pt.state=Ue.OPEN_WAKA,pt.startTagPosition=pt.position):Ne(Qe)||(yt(pt,"Non-whitespace before first tag."),pt.textNode=Qe,pt.state=Ue.TEXT)}function vt(pt,Qe){var Ke="";return Qe<pt.length&&(Ke=pt.charAt(Qe)),Ke}function kt(pt){var Qe=this;if(this.error)throw this.error;if(Qe.closed)return $e(Qe,"Cannot write after close. Assign an onready handler.");if(pt===null)return nt(Qe);typeof pt=="object"&&(pt=pt.toString());for(var Ke=0,xe="";xe=vt(pt,Ke++),Qe.c=xe,!!xe;)switch(Qe.trackPosition&&(Qe.position++,xe===`
`?(Qe.line++,Qe.column=0):Qe.column++),Qe.state){case Ue.BEGIN:if(Qe.state=Ue.BEGIN_WHITESPACE,xe==="\uFEFF")continue;mt(Qe,xe);continue;case Ue.BEGIN_WHITESPACE:mt(Qe,xe);continue;case Ue.TEXT:if(Qe.sawRoot&&!Qe.closedRoot){for(var Me=Ke-1;xe&&xe!=="<"&&xe!=="&";)xe=vt(pt,Ke++),xe&&Qe.trackPosition&&(Qe.position++,xe===`
`?(Qe.line++,Qe.column=0):Qe.column++);Qe.textNode+=pt.substring(Me,Ke-1)}xe==="<"&&!(Qe.sawRoot&&Qe.closedRoot&&!Qe.strict)?(Qe.state=Ue.OPEN_WAKA,Qe.startTagPosition=Qe.position):(!Ne(xe)&&(!Qe.sawRoot||Qe.closedRoot)&&yt(Qe,"Text data outside of root node."),xe==="&"?Qe.state=Ue.TEXT_ENTITY:Qe.textNode+=xe);continue;case Ue.SCRIPT:xe==="<"?Qe.state=Ue.SCRIPT_ENDING:Qe.script+=xe;continue;case Ue.SCRIPT_ENDING:xe==="/"?Qe.state=Ue.CLOSE_TAG:(Qe.script+="<"+xe,Qe.state=Ue.SCRIPT);continue;case Ue.OPEN_WAKA:if(xe==="!")Qe.state=Ue.SGML_DECL,Qe.sgmlDecl="";else if(!Ne(xe))if(We(Pe,xe))Qe.state=Ue.OPEN_TAG,Qe.tagName=xe;else if(xe==="/")Qe.state=Ue.CLOSE_TAG,Qe.tagName="";else if(xe==="?")Qe.state=Ue.PROC_INST,Qe.procInstName=Qe.procInstBody="";else{if(yt(Qe,"Unencoded <"),Qe.startTagPosition+1<Qe.position){var Ze=Qe.position-Qe.startTagPosition;xe=new Array(Ze).join(" ")+xe}Qe.textNode+="<"+xe,Qe.state=Ue.TEXT}continue;case Ue.SGML_DECL:(Qe.sgmlDecl+xe).toUpperCase()===ae?(st(Qe,"onopencdata"),Qe.state=Ue.CDATA,Qe.sgmlDecl="",Qe.cdata=""):Qe.sgmlDecl+xe==="--"?(Qe.state=Ue.COMMENT,Qe.comment="",Qe.sgmlDecl=""):(Qe.sgmlDecl+xe).toUpperCase()===ie?(Qe.state=Ue.DOCTYPE,(Qe.doctype||Qe.sawRoot)&&yt(Qe,"Inappropriately located doctype declaration"),Qe.doctype="",Qe.sgmlDecl=""):xe===">"?(st(Qe,"onsgmldeclaration",Qe.sgmlDecl),Qe.sgmlDecl="",Qe.state=Ue.TEXT):(Ae(xe)&&(Qe.state=Ue.SGML_DECL_QUOTED),Qe.sgmlDecl+=xe);continue;case Ue.SGML_DECL_QUOTED:xe===Qe.q&&(Qe.state=Ue.SGML_DECL,Qe.q=""),Qe.sgmlDecl+=xe;continue;case Ue.DOCTYPE:xe===">"?(Qe.state=Ue.TEXT,st(Qe,"ondoctype",Qe.doctype),Qe.doctype=!0):(Qe.doctype+=xe,xe==="["?Qe.state=Ue.DOCTYPE_DTD:Ae(xe)&&(Qe.state=Ue.DOCTYPE_QUOTED,Qe.q=xe));continue;case Ue.DOCTYPE_QUOTED:Qe.doctype+=xe,xe===Qe.q&&(Qe.q="",Qe.state=Ue.DOCTYPE);continue;case Ue.DOCTYPE_DTD:Qe.doctype+=xe,xe==="]"?Qe.state=Ue.DOCTYPE:Ae(xe)&&(Qe.state=Ue.DOCTYPE_DTD_QUOTED,Qe.q=xe);continue;case Ue.DOCTYPE_DTD_QUOTED:Qe.doctype+=xe,xe===Qe.q&&(Qe.state=Ue.DOCTYPE_DTD,Qe.q="");continue;case Ue.COMMENT:xe==="-"?Qe.state=Ue.COMMENT_ENDING:Qe.comment+=xe;continue;case Ue.COMMENT_ENDING:xe==="-"?(Qe.state=Ue.COMMENT_ENDED,Qe.comment=Pt(Qe.opt,Qe.comment),Qe.comment&&st(Qe,"oncomment",Qe.comment),Qe.comment=""):(Qe.comment+="-"+xe,Qe.state=Ue.COMMENT);continue;case Ue.COMMENT_ENDED:xe!==">"?(yt(Qe,"Malformed comment"),Qe.comment+="--"+xe,Qe.state=Ue.COMMENT):Qe.state=Ue.TEXT;continue;case Ue.CDATA:xe==="]"?Qe.state=Ue.CDATA_ENDING:Qe.cdata+=xe;continue;case Ue.CDATA_ENDING:xe==="]"?Qe.state=Ue.CDATA_ENDING_2:(Qe.cdata+="]"+xe,Qe.state=Ue.CDATA);continue;case Ue.CDATA_ENDING_2:xe===">"?(Qe.cdata&&st(Qe,"oncdata",Qe.cdata),st(Qe,"onclosecdata"),Qe.cdata="",Qe.state=Ue.TEXT):xe==="]"?Qe.cdata+="]":(Qe.cdata+="]]"+xe,Qe.state=Ue.CDATA);continue;case Ue.PROC_INST:xe==="?"?Qe.state=Ue.PROC_INST_ENDING:Ne(xe)?Qe.state=Ue.PROC_INST_BODY:Qe.procInstName+=xe;continue;case Ue.PROC_INST_BODY:if(!Qe.procInstBody&&Ne(xe))continue;xe==="?"?Qe.state=Ue.PROC_INST_ENDING:Qe.procInstBody+=xe;continue;case Ue.PROC_INST_ENDING:xe===">"?(st(Qe,"onprocessinginstruction",{name:Qe.procInstName,body:Qe.procInstBody}),Qe.procInstName=Qe.procInstBody="",Qe.state=Ue.TEXT):(Qe.procInstBody+="?"+xe,Qe.state=Ue.PROC_INST_BODY);continue;case Ue.OPEN_TAG:We(je,xe)?Qe.tagName+=xe:(xt(Qe),xe===">"?ft(Qe):xe==="/"?Qe.state=Ue.OPEN_TAG_SLASH:(Ne(xe)||yt(Qe,"Invalid character in tag name"),Qe.state=Ue.ATTRIB));continue;case Ue.OPEN_TAG_SLASH:xe===">"?(ft(Qe,!0),ut(Qe)):(yt(Qe,"Forward-slash in opening tag not followed by >"),Qe.state=Ue.ATTRIB);continue;case Ue.ATTRIB:if(Ne(xe))continue;xe===">"?ft(Qe):xe==="/"?Qe.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(Qe.attribName=xe,Qe.attribValue="",Qe.state=Ue.ATTRIB_NAME):yt(Qe,"Invalid attribute name");continue;case Ue.ATTRIB_NAME:xe==="="?Qe.state=Ue.ATTRIB_VALUE:xe===">"?(yt(Qe,"Attribute without value"),Qe.attribValue=Qe.attribName,dt(Qe),ft(Qe)):Ne(xe)?Qe.state=Ue.ATTRIB_NAME_SAW_WHITE:We(je,xe)?Qe.attribName+=xe:yt(Qe,"Invalid attribute name");continue;case Ue.ATTRIB_NAME_SAW_WHITE:if(xe==="=")Qe.state=Ue.ATTRIB_VALUE;else{if(Ne(xe))continue;yt(Qe,"Attribute without value"),Qe.tag.attributes[Qe.attribName]="",Qe.attribValue="",st(Qe,"onattribute",{name:Qe.attribName,value:""}),Qe.attribName="",xe===">"?ft(Qe):We(Pe,xe)?(Qe.attribName=xe,Qe.state=Ue.ATTRIB_NAME):(yt(Qe,"Invalid attribute name"),Qe.state=Ue.ATTRIB)}continue;case Ue.ATTRIB_VALUE:if(Ne(xe))continue;Ae(xe)?(Qe.q=xe,Qe.state=Ue.ATTRIB_VALUE_QUOTED):(yt(Qe,"Unquoted attribute value"),Qe.state=Ue.ATTRIB_VALUE_UNQUOTED,Qe.attribValue=xe);continue;case Ue.ATTRIB_VALUE_QUOTED:if(xe!==Qe.q){xe==="&"?Qe.state=Ue.ATTRIB_VALUE_ENTITY_Q:Qe.attribValue+=xe;continue}dt(Qe),Qe.q="",Qe.state=Ue.ATTRIB_VALUE_CLOSED;continue;case Ue.ATTRIB_VALUE_CLOSED:Ne(xe)?Qe.state=Ue.ATTRIB:xe===">"?ft(Qe):xe==="/"?Qe.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(yt(Qe,"No whitespace between attributes"),Qe.attribName=xe,Qe.attribValue="",Qe.state=Ue.ATTRIB_NAME):yt(Qe,"Invalid attribute name");continue;case Ue.ATTRIB_VALUE_UNQUOTED:if(!Re(xe)){xe==="&"?Qe.state=Ue.ATTRIB_VALUE_ENTITY_U:Qe.attribValue+=xe;continue}dt(Qe),xe===">"?ft(Qe):Qe.state=Ue.ATTRIB;continue;case Ue.CLOSE_TAG:if(Qe.tagName)xe===">"?ut(Qe):We(je,xe)?Qe.tagName+=xe:Qe.script?(Qe.script+="</"+Qe.tagName,Qe.tagName="",Qe.state=Ue.SCRIPT):(Ne(xe)||yt(Qe,"Invalid tagname in closing tag"),Qe.state=Ue.CLOSE_TAG_SAW_WHITE);else{if(Ne(xe))continue;Ye(Pe,xe)?Qe.script?(Qe.script+="</"+xe,Qe.state=Ue.SCRIPT):yt(Qe,"Invalid tagname in closing tag."):Qe.tagName=xe}continue;case Ue.CLOSE_TAG_SAW_WHITE:if(Ne(xe))continue;xe===">"?ut(Qe):yt(Qe,"Invalid characters in closing tag");continue;case Ue.TEXT_ENTITY:case Ue.ATTRIB_VALUE_ENTITY_Q:case Ue.ATTRIB_VALUE_ENTITY_U:var tt,Ie;switch(Qe.state){case Ue.TEXT_ENTITY:tt=Ue.TEXT,Ie="textNode";break;case Ue.ATTRIB_VALUE_ENTITY_Q:tt=Ue.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case Ue.ATTRIB_VALUE_ENTITY_U:tt=Ue.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}xe===";"?(Qe[Ie]+=Et(Qe),Qe.entity="",Qe.state=tt):We(Qe.entity.length?Fe:Be,xe)?Qe.entity+=xe:(yt(Qe,"Invalid character in entity name"),Qe[Ie]+="&"+Qe.entity+xe,Qe.entity="",Qe.state=tt);continue;default:throw new Error(Qe,"Unknown state: "+Qe.state)}return Qe.position>=Qe.bufferCheckPosition&&Se(Qe),Qe}String.fromCodePoint||function(){var pt=String.fromCharCode,Qe=Math.floor,Ke=function(){var xe=16384,Me=[],Ze,tt,Ie=-1,_e=arguments.length;if(!_e)return"";for(var He="";++Ie<_e;){var rt=Number(arguments[Ie]);if(!isFinite(rt)||rt<0||rt>1114111||Qe(rt)!==rt)throw RangeError("Invalid code point: "+rt);rt<=65535?Me.push(rt):(rt-=65536,Ze=(rt>>10)+55296,tt=rt%1024+56320,Me.push(Ze,tt)),(Ie+1===_e||Me.length>xe)&&(He+=pt.apply(null,Me),Me.length=0)}return He};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Ke,configurable:!0,writable:!0}):String.fromCodePoint=Ke}()})(typeof De=="undefined"?this.sax={}:De)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,ze,De){ze.exports=ke;var fe=oe("events").EventEmitter,me=oe("inherits");me(ke,fe),ke.Readable=oe("readable-stream/lib/_stream_readable.js"),ke.Writable=oe("readable-stream/lib/_stream_writable.js"),ke.Duplex=oe("readable-stream/lib/_stream_duplex.js"),ke.Transform=oe("readable-stream/lib/_stream_transform.js"),ke.PassThrough=oe("readable-stream/lib/_stream_passthrough.js"),ke.finished=oe("readable-stream/lib/internal/streams/end-of-stream.js"),ke.pipeline=oe("readable-stream/lib/internal/streams/pipeline.js"),ke.Stream=ke;function ke(){fe.call(this)}ke.prototype.pipe=function(Ce,Se){var Le=this;function ve(le){Ce.writable&&Ce.write(le)===!1&&Le.pause&&Le.pause()}Le.on("data",ve);function we(){Le.readable&&Le.resume&&Le.resume()}Ce.on("drain",we),!Ce._isStdio&&(!Se||Se.end!==!1)&&(Le.on("end",z),Le.on("close",ee));var de=!1;function z(){de||(de=!0,Ce.end())}function ee(){de||(de=!0,typeof Ce.destroy=="function"&&Ce.destroy())}function ae(le){if(ie(),fe.listenerCount(this,"error")===0)throw le}Le.on("error",ae),Ce.on("error",ae);function ie(){Le.removeListener("data",ve),Ce.removeListener("drain",we),Le.removeListener("end",z),Le.removeListener("close",ee),Le.removeListener("error",ae),Ce.removeListener("error",ae),Le.removeListener("end",ie),Le.removeListener("close",ie),Ce.removeListener("close",ie)}return Le.on("end",ie),Le.on("close",ie),Ce.on("close",ie),Ce.emit("pipe",Le),Ce}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(oe,ze,De){"use strict";function fe(we,de){we.prototype=Object.create(de.prototype),we.prototype.constructor=we,we.__proto__=de}var me={};function ke(we,de,z){z||(z=Error);function ee(ie,le,ue){return typeof de=="string"?de:de(ie,le,ue)}var ae=function(ie){fe(le,ie);function le(ue,ge,Pe){return ie.call(this,ee(ue,ge,Pe))||this}return le}(z);ae.prototype.name=z.name,ae.prototype.code=we,me[we]=ae}function Ce(we,de){if(Array.isArray(we)){var z=we.length;return we=we.map(function(ee){return String(ee)}),z>2?"one of ".concat(de," ").concat(we.slice(0,z-1).join(", "),", or ")+we[z-1]:z===2?"one of ".concat(de," ").concat(we[0]," or ").concat(we[1]):"of ".concat(de," ").concat(we[0])}else return"of ".concat(de," ").concat(String(we))}function Se(we,de,z){return we.substr(!z||z<0?0:+z,de.length)===de}function Le(we,de,z){return(z===void 0||z>we.length)&&(z=we.length),we.substring(z-de.length,z)===de}function ve(we,de,z){return typeof z!="number"&&(z=0),z+de.length>we.length?!1:we.indexOf(de,z)!==-1}ke("ERR_INVALID_OPT_VALUE",function(we,de){return'The value "'+de+'" is invalid for option "'+we+'"'},TypeError),ke("ERR_INVALID_ARG_TYPE",function(we,de,z){var ee;typeof de=="string"&&Se(de,"not ")?(ee="must not be",de=de.replace(/^not /,"")):ee="must be";var ae;if(Le(we," argument"))ae="The ".concat(we," ").concat(ee," ").concat(Ce(de,"type"));else{var ie=ve(we,".")?"property":"argument";ae='The "'.concat(we,'" ').concat(ie," ").concat(ee," ").concat(Ce(de,"type"))}return ae+=". Received type ".concat(typeof z),ae},TypeError),ke("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ke("ERR_METHOD_NOT_IMPLEMENTED",function(we){return"The "+we+" method is not implemented"}),ke("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ke("ERR_STREAM_DESTROYED",function(we){return"Cannot call "+we+" after a stream was destroyed"}),ke("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ke("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ke("ERR_STREAM_WRITE_AFTER_END","write after end"),ke("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ke("ERR_UNKNOWN_ENCODING",function(we){return"Unknown encoding: "+we},TypeError),ke("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ze.exports.codes=me},{}],400:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=Object.keys||function(ee){var ae=[];for(var ie in ee)ae.push(ie);return ae};ze.exports=we;var ke=oe("./_stream_readable"),Ce=oe("./_stream_writable");oe("inherits")(we,ke);for(var Se=me(Ce.prototype),Le=0;Le<Se.length;Le++){var ve=Se[Le];we.prototype[ve]||(we.prototype[ve]=Ce.prototype[ve])}function we(ee){if(!(this instanceof we))return new we(ee);ke.call(this,ee),Ce.call(this,ee),this.allowHalfOpen=!0,ee&&(ee.readable===!1&&(this.readable=!1),ee.writable===!1&&(this.writable=!1),ee.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",de)))}Object.defineProperty(we.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(we.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(we.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(){this._writableState.ended||fe.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(we.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}})}).call(this)}).call(this,oe("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(oe,ze,De){"use strict";ze.exports=me;var fe=oe("./_stream_transform");oe("inherits")(me,fe);function me(ke){if(!(this instanceof me))return new me(ke);fe.call(this,ke)}me.prototype._transform=function(ke,Ce,Se){Se(null,ke)}},{"./_stream_transform":403,inherits:364}],402:[function(oe,ze,De){(function(fe,me){(function(){"use strict";ze.exports=st;var ke;st.ReadableState=ot;var Ce=oe("events").EventEmitter,Se=function(_e,He){return _e.listeners(He).length},Le=oe("./internal/streams/stream"),ve=oe("buffer").Buffer,we=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function de(Ie){return ve.from(Ie)}function z(Ie){return ve.isBuffer(Ie)||Ie instanceof we}var ee=oe("util"),ae;ee&&ee.debuglog?ae=ee.debuglog("stream"):ae=function(){};var ie=oe("./internal/streams/buffer_list"),le=oe("./internal/streams/destroy"),ue=oe("./internal/streams/state"),ge=ue.getHighWaterMark,Pe=oe("../errors").codes,je=Pe.ERR_INVALID_ARG_TYPE,Be=Pe.ERR_STREAM_PUSH_AFTER_EOF,Fe=Pe.ERR_METHOD_NOT_IMPLEMENTED,Ne=Pe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ae,Re,We;oe("inherits")(st,Le);var Ye=le.errorOrDestroy,Ue=["error","close","destroy","pause","resume"];function Ve(Ie,_e,He){if(typeof Ie.prependListener=="function")return Ie.prependListener(_e,He);!Ie._events||!Ie._events[_e]?Ie.on(_e,He):Array.isArray(Ie._events[_e])?Ie._events[_e].unshift(He):Ie._events[_e]=[He,Ie._events[_e]]}function ot(Ie,_e,He){ke=ke||oe("./_stream_duplex"),Ie=Ie||{},typeof He!="boolean"&&(He=_e instanceof ke),this.objectMode=!!Ie.objectMode,He&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=ge(this,Ie,"readableHighWaterMark",He),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ie.emitClose!==!1,this.autoDestroy=!!Ie.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ie.encoding&&(Ae||(Ae=oe("string_decoder/").StringDecoder),this.decoder=new Ae(Ie.encoding),this.encoding=Ie.encoding)}function st(Ie){if(ke=ke||oe("./_stream_duplex"),!(this instanceof st))return new st(Ie);var _e=this instanceof ke;this._readableState=new ot(Ie,this,_e),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.destroy)),Le.call(this)}Object.defineProperty(st.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),st.prototype.destroy=le.destroy,st.prototype._undestroy=le.undestroy,st.prototype._destroy=function(Ie,_e){_e(Ie)},st.prototype.push=function(Ie,_e){var He=this._readableState,rt;return He.objectMode?rt=!0:typeof Ie=="string"&&(_e=_e||He.defaultEncoding,_e!==He.encoding&&(Ie=ve.from(Ie,_e),_e=""),rt=!0),ct(this,Ie,_e,!1,rt)},st.prototype.unshift=function(Ie){return ct(this,Ie,null,!0,!1)};function ct(Ie,_e,He,rt,St){ae("readableAddChunk",_e);var Ct=Ie._readableState;if(_e===null)Ct.reading=!1,wt(Ie,Ct);else{var Nt;if(St||(Nt=$e(Ct,_e)),Nt)Ye(Ie,Nt);else if(Ct.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!Ct.objectMode&&Object.getPrototypeOf(_e)!==ve.prototype&&(_e=de(_e)),rt)Ct.endEmitted?Ye(Ie,new Ne):Pt(Ie,Ct,_e,!0);else if(Ct.ended)Ye(Ie,new Be);else{if(Ct.destroyed)return!1;Ct.reading=!1,Ct.decoder&&!He?(_e=Ct.decoder.write(_e),Ct.objectMode||_e.length!==0?Pt(Ie,Ct,_e,!1):ut(Ie,Ct)):Pt(Ie,Ct,_e,!1)}else rt||(Ct.reading=!1,ut(Ie,Ct))}return!Ct.ended&&(Ct.length<Ct.highWaterMark||Ct.length===0)}function Pt(Ie,_e,He,rt){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Ie.emit("data",He)):(_e.length+=_e.objectMode?1:He.length,rt?_e.buffer.unshift(He):_e.buffer.push(He),_e.needReadable&&dt(Ie)),ut(Ie,_e)}function $e(Ie,_e){var He;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Ie.objectMode&&(He=new je("chunk",["string","Buffer","Uint8Array"],_e)),He}st.prototype.isPaused=function(){return this._readableState.flowing===!1},st.prototype.setEncoding=function(Ie){Ae||(Ae=oe("string_decoder/").StringDecoder);var _e=new Ae(Ie);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var He=this._readableState.buffer.head,rt="";He!==null;)rt+=_e.write(He.data),He=He.next;return this._readableState.buffer.clear(),rt!==""&&this._readableState.buffer.push(rt),this._readableState.length=rt.length,this};var nt=1073741824;function yt(Ie){return Ie>=nt?Ie=nt:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function xt(Ie,_e){return Ie<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Ie!==Ie?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Ie>_e.highWaterMark&&(_e.highWaterMark=yt(Ie)),Ie<=_e.length?Ie:_e.ended?_e.length:(_e.needReadable=!0,0))}st.prototype.read=function(Ie){ae("read",Ie),Ie=parseInt(Ie,10);var _e=this._readableState,He=Ie;if(Ie!==0&&(_e.emittedReadable=!1),Ie===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return ae("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?Me(this):dt(this),null;if(Ie=xt(Ie,_e),Ie===0&&_e.ended)return _e.length===0&&Me(this),null;var rt=_e.needReadable;ae("need readable",rt),(_e.length===0||_e.length-Ie<_e.highWaterMark)&&(rt=!0,ae("length less than watermark",rt)),_e.ended||_e.reading?(rt=!1,ae("reading or ended",rt)):rt&&(ae("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Ie=xt(He,_e)));var St;return Ie>0?St=xe(Ie,_e):St=null,St===null?(_e.needReadable=_e.length<=_e.highWaterMark,Ie=0):(_e.length-=Ie,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),He!==Ie&&_e.ended&&Me(this)),St!==null&&this.emit("data",St),St};function wt(Ie,_e){if(ae("onEofChunk"),!_e.ended){if(_e.decoder){var He=_e.decoder.end();He&&He.length&&(_e.buffer.push(He),_e.length+=_e.objectMode?1:He.length)}_e.ended=!0,_e.sync?dt(Ie):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,ft(Ie)))}}function dt(Ie){var _e=Ie._readableState;ae("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(ae("emitReadable",_e.flowing),_e.emittedReadable=!0,fe.nextTick(ft,Ie))}function ft(Ie){var _e=Ie._readableState;ae("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Ie.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,Ke(Ie)}function ut(Ie,_e){_e.readingMore||(_e.readingMore=!0,fe.nextTick(Et,Ie,_e))}function Et(Ie,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var He=_e.length;if(ae("maybeReadMore read 0"),Ie.read(0),He===_e.length)break}_e.readingMore=!1}st.prototype._read=function(Ie){Ye(this,new Fe("_read()"))},st.prototype.pipe=function(Ie,_e){var He=this,rt=this._readableState;switch(rt.pipesCount){case 0:rt.pipes=Ie;break;case 1:rt.pipes=[rt.pipes,Ie];break;default:rt.pipes.push(Ie);break}rt.pipesCount+=1,ae("pipe count=%d opts=%j",rt.pipesCount,_e);var St=(!_e||_e.end!==!1)&&Ie!==fe.stdout&&Ie!==fe.stderr,Ct=St?Ot:Ut;rt.endEmitted?fe.nextTick(Ct):He.once("end",Ct),Ie.on("unpipe",Nt);function Nt(En,bn){ae("onunpipe"),En===He&&bn&&bn.hasUnpiped===!1&&(bn.hasUnpiped=!0,qt())}function Ot(){ae("onend"),Ie.end()}var Rt=mt(He);Ie.on("drain",Rt);var $t=!1;function qt(){ae("cleanup"),Ie.removeListener("close",sn),Ie.removeListener("finish",tn),Ie.removeListener("drain",Rt),Ie.removeListener("error",Ht),Ie.removeListener("unpipe",Nt),He.removeListener("end",Ot),He.removeListener("end",Ut),He.removeListener("data",rn),$t=!0,rt.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&Rt()}He.on("data",rn);function rn(En){ae("ondata");var bn=Ie.write(En);ae("dest.write",bn),bn===!1&&((rt.pipesCount===1&&rt.pipes===Ie||rt.pipesCount>1&&tt(rt.pipes,Ie)!==-1)&&!$t&&(ae("false write response, pause",rt.awaitDrain),rt.awaitDrain++),He.pause())}function Ht(En){ae("onerror",En),Ut(),Ie.removeListener("error",Ht),Se(Ie,"error")===0&&Ye(Ie,En)}Ve(Ie,"error",Ht);function sn(){Ie.removeListener("finish",tn),Ut()}Ie.once("close",sn);function tn(){ae("onfinish"),Ie.removeListener("close",sn),Ut()}Ie.once("finish",tn);function Ut(){ae("unpipe"),He.unpipe(Ie)}return Ie.emit("pipe",He),rt.flowing||(ae("pipe resume"),He.resume()),Ie};function mt(Ie){return function(){var He=Ie._readableState;ae("pipeOnDrain",He.awaitDrain),He.awaitDrain&&He.awaitDrain--,He.awaitDrain===0&&Se(Ie,"data")&&(He.flowing=!0,Ke(Ie))}}st.prototype.unpipe=function(Ie){var _e=this._readableState,He={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Ie&&Ie!==_e.pipes?this:(Ie||(Ie=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Ie&&Ie.emit("unpipe",this,He),this);if(!Ie){var rt=_e.pipes,St=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var Ct=0;Ct<St;Ct++)rt[Ct].emit("unpipe",this,{hasUnpiped:!1});return this}var Nt=tt(_e.pipes,Ie);return Nt===-1?this:(_e.pipes.splice(Nt,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Ie.emit("unpipe",this,He),this)},st.prototype.on=function(Ie,_e){var He=Le.prototype.on.call(this,Ie,_e),rt=this._readableState;return Ie==="data"?(rt.readableListening=this.listenerCount("readable")>0,rt.flowing!==!1&&this.resume()):Ie==="readable"&&!rt.endEmitted&&!rt.readableListening&&(rt.readableListening=rt.needReadable=!0,rt.flowing=!1,rt.emittedReadable=!1,ae("on readable",rt.length,rt.reading),rt.length?dt(this):rt.reading||fe.nextTick(kt,this)),He},st.prototype.addListener=st.prototype.on,st.prototype.removeListener=function(Ie,_e){var He=Le.prototype.removeListener.call(this,Ie,_e);return Ie==="readable"&&fe.nextTick(vt,this),He},st.prototype.removeAllListeners=function(Ie){var _e=Le.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&fe.nextTick(vt,this),_e};function vt(Ie){var _e=Ie._readableState;_e.readableListening=Ie.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function kt(Ie){ae("readable nexttick read 0"),Ie.read(0)}st.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(ae("resume"),Ie.flowing=!Ie.readableListening,pt(this,Ie)),Ie.paused=!1,this};function pt(Ie,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,fe.nextTick(Qe,Ie,_e))}function Qe(Ie,_e){ae("resume",_e.reading),_e.reading||Ie.read(0),_e.resumeScheduled=!1,Ie.emit("resume"),Ke(Ie),_e.flowing&&!_e.reading&&Ie.read(0)}st.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ke(Ie){var _e=Ie._readableState;for(ae("flow",_e.flowing);_e.flowing&&Ie.read()!==null;);}st.prototype.wrap=function(Ie){var _e=this,He=this._readableState,rt=!1;Ie.on("end",function(){if(ae("wrapped end"),He.decoder&&!He.ended){var Nt=He.decoder.end();Nt&&Nt.length&&_e.push(Nt)}_e.push(null)}),Ie.on("data",function(Nt){if(ae("wrapped data"),He.decoder&&(Nt=He.decoder.write(Nt)),!(He.objectMode&&Nt==null)&&!(!He.objectMode&&(!Nt||!Nt.length))){var Ot=_e.push(Nt);Ot||(rt=!0,Ie.pause())}});for(var St in Ie)this[St]===void 0&&typeof Ie[St]=="function"&&(this[St]=function(Ot){return function(){return Ie[Ot].apply(Ie,arguments)}}(St));for(var Ct=0;Ct<Ue.length;Ct++)Ie.on(Ue[Ct],this.emit.bind(this,Ue[Ct]));return this._read=function(Nt){ae("wrapped _read",Nt),rt&&(rt=!1,Ie.resume())},this},typeof Symbol=="function"&&(st.prototype[Symbol.asyncIterator]=function(){return Re===void 0&&(Re=oe("./internal/streams/async_iterator")),Re(this)}),Object.defineProperty(st.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(st.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(st.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(_e){this._readableState&&(this._readableState.flowing=_e)}}),st._fromList=xe,Object.defineProperty(st.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xe(Ie,_e){if(_e.length===0)return null;var He;return _e.objectMode?He=_e.buffer.shift():!Ie||Ie>=_e.length?(_e.decoder?He=_e.buffer.join(""):_e.buffer.length===1?He=_e.buffer.first():He=_e.buffer.concat(_e.length),_e.buffer.clear()):He=_e.buffer.consume(Ie,_e.decoder),He}function Me(Ie){var _e=Ie._readableState;ae("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,fe.nextTick(Ze,_e,Ie))}function Ze(Ie,_e){if(ae("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,_e.readable=!1,_e.emit("end"),Ie.autoDestroy)){var He=_e._writableState;(!He||He.autoDestroy&&He.finished)&&_e.destroy()}}typeof Symbol=="function"&&(st.from=function(Ie,_e){return We===void 0&&(We=oe("./internal/streams/from")),We(st,Ie,_e)});function tt(Ie,_e){for(var He=0,rt=Ie.length;He<rt;He++)if(Ie[He]===_e)return He;return-1}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(oe,ze,De){"use strict";ze.exports=we;var fe=oe("../errors").codes,me=fe.ERR_METHOD_NOT_IMPLEMENTED,ke=fe.ERR_MULTIPLE_CALLBACK,Ce=fe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=fe.ERR_TRANSFORM_WITH_LENGTH_0,Le=oe("./_stream_duplex");oe("inherits")(we,Le);function ve(ee,ae){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new ke);ie.writechunk=null,ie.writecb=null,ae!=null&&this.push(ae),le(ee);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function we(ee){if(!(this instanceof we))return new we(ee);Le.call(this,ee),this._transformState={afterTransform:ve.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ee&&(typeof ee.transform=="function"&&(this._transform=ee.transform),typeof ee.flush=="function"&&(this._flush=ee.flush)),this.on("prefinish",de)}function de(){var ee=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(ae,ie){z(ee,ae,ie)}):z(this,null,null)}we.prototype.push=function(ee,ae){return this._transformState.needTransform=!1,Le.prototype.push.call(this,ee,ae)},we.prototype._transform=function(ee,ae,ie){ie(new me("_transform()"))},we.prototype._write=function(ee,ae,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=ee,le.writeencoding=ae,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},we.prototype._read=function(ee){var ae=this._transformState;ae.writechunk!==null&&!ae.transforming?(ae.transforming=!0,this._transform(ae.writechunk,ae.writeencoding,ae.afterTransform)):ae.needTransform=!0},we.prototype._destroy=function(ee,ae){Le.prototype._destroy.call(this,ee,function(ie){ae(ie)})};function z(ee,ae,ie){if(ae)return ee.emit("error",ae);if(ie!=null&&ee.push(ie),ee._writableState.length)throw new Se;if(ee._transformState.transforming)throw new Ce;return ee.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,ze,De){(function(fe,me){(function(){"use strict";ze.exports=ot;function ke(Ke,xe,Me){this.chunk=Ke,this.encoding=xe,this.callback=Me,this.next=null}function Ce(Ke){var xe=this;this.next=null,this.entry=null,this.finish=function(){Qe(xe,Ke)}}var Se;ot.WritableState=Ue;var Le={deprecate:oe("util-deprecate")},ve=oe("./internal/streams/stream"),we=oe("buffer").Buffer,de=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Ke){return we.from(Ke)}function ee(Ke){return we.isBuffer(Ke)||Ke instanceof de}var ae=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,ue=oe("../errors").codes,ge=ue.ERR_INVALID_ARG_TYPE,Pe=ue.ERR_METHOD_NOT_IMPLEMENTED,je=ue.ERR_MULTIPLE_CALLBACK,Be=ue.ERR_STREAM_CANNOT_PIPE,Fe=ue.ERR_STREAM_DESTROYED,Ne=ue.ERR_STREAM_NULL_VALUES,Ae=ue.ERR_STREAM_WRITE_AFTER_END,Re=ue.ERR_UNKNOWN_ENCODING,We=ae.errorOrDestroy;oe("inherits")(ot,ve);function Ye(){}function Ue(Ke,xe,Me){Se=Se||oe("./_stream_duplex"),Ke=Ke||{},typeof Me!="boolean"&&(Me=xe instanceof Se),this.objectMode=!!Ke.objectMode,Me&&(this.objectMode=this.objectMode||!!Ke.writableObjectMode),this.highWaterMark=le(this,Ke,"writableHighWaterMark",Me),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ze=Ke.decodeStrings===!1;this.decodeStrings=!Ze,this.defaultEncoding=Ke.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){wt(xe,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Ke.emitClose!==!1,this.autoDestroy=!!Ke.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ce(this)}Ue.prototype.getBuffer=function(){for(var xe=this.bufferedRequest,Me=[];xe;)Me.push(xe),xe=xe.next;return Me},function(){try{Object.defineProperty(Ue.prototype,"buffer",{get:Le.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Ke){}}();var Ve;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ve=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(xe){return Ve.call(this,xe)?!0:this!==ot?!1:xe&&xe._writableState instanceof Ue}})):Ve=function(xe){return xe instanceof this};function ot(Ke){Se=Se||oe("./_stream_duplex");var xe=this instanceof Se;if(!xe&&!Ve.call(ot,this))return new ot(Ke);this._writableState=new Ue(Ke,this,xe),this.writable=!0,Ke&&(typeof Ke.write=="function"&&(this._write=Ke.write),typeof Ke.writev=="function"&&(this._writev=Ke.writev),typeof Ke.destroy=="function"&&(this._destroy=Ke.destroy),typeof Ke.final=="function"&&(this._final=Ke.final)),ve.call(this)}ot.prototype.pipe=function(){We(this,new Be)};function st(Ke,xe){var Me=new Ae;We(Ke,Me),fe.nextTick(xe,Me)}function ct(Ke,xe,Me,Ze){var tt;return Me===null?tt=new Ne:typeof Me!="string"&&!xe.objectMode&&(tt=new ge("chunk",["string","Buffer"],Me)),tt?(We(Ke,tt),fe.nextTick(Ze,tt),!1):!0}ot.prototype.write=function(Ke,xe,Me){var Ze=this._writableState,tt=!1,Ie=!Ze.objectMode&&ee(Ke);return Ie&&!we.isBuffer(Ke)&&(Ke=z(Ke)),typeof xe=="function"&&(Me=xe,xe=null),Ie?xe="buffer":xe||(xe=Ze.defaultEncoding),typeof Me!="function"&&(Me=Ye),Ze.ending?st(this,Me):(Ie||ct(this,Ze,Ke,Me))&&(Ze.pendingcb++,tt=$e(this,Ze,Ie,Ke,xe,Me)),tt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var Ke=this._writableState;Ke.corked&&(Ke.corked--,!Ke.writing&&!Ke.corked&&!Ke.bufferProcessing&&Ke.bufferedRequest&&ut(this,Ke))},ot.prototype.setDefaultEncoding=function(xe){if(typeof xe=="string"&&(xe=xe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((xe+"").toLowerCase())>-1))throw new Re(xe);return this._writableState.defaultEncoding=xe,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Pt(Ke,xe,Me){return!Ke.objectMode&&Ke.decodeStrings!==!1&&typeof xe=="string"&&(xe=we.from(xe,Me)),xe}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $e(Ke,xe,Me,Ze,tt,Ie){if(!Me){var _e=Pt(xe,Ze,tt);Ze!==_e&&(Me=!0,tt="buffer",Ze=_e)}var He=xe.objectMode?1:Ze.length;xe.length+=He;var rt=xe.length<xe.highWaterMark;if(rt||(xe.needDrain=!0),xe.writing||xe.corked){var St=xe.lastBufferedRequest;xe.lastBufferedRequest={chunk:Ze,encoding:tt,isBuf:Me,callback:Ie,next:null},St?St.next=xe.lastBufferedRequest:xe.bufferedRequest=xe.lastBufferedRequest,xe.bufferedRequestCount+=1}else nt(Ke,xe,!1,He,Ze,tt,Ie);return rt}function nt(Ke,xe,Me,Ze,tt,Ie,_e){xe.writelen=Ze,xe.writecb=_e,xe.writing=!0,xe.sync=!0,xe.destroyed?xe.onwrite(new Fe("write")):Me?Ke._writev(tt,xe.onwrite):Ke._write(tt,Ie,xe.onwrite),xe.sync=!1}function yt(Ke,xe,Me,Ze,tt){--xe.pendingcb,Me?(fe.nextTick(tt,Ze),fe.nextTick(kt,Ke,xe),Ke._writableState.errorEmitted=!0,We(Ke,Ze)):(tt(Ze),Ke._writableState.errorEmitted=!0,We(Ke,Ze),kt(Ke,xe))}function xt(Ke){Ke.writing=!1,Ke.writecb=null,Ke.length-=Ke.writelen,Ke.writelen=0}function wt(Ke,xe){var Me=Ke._writableState,Ze=Me.sync,tt=Me.writecb;if(typeof tt!="function")throw new je;if(xt(Me),xe)yt(Ke,Me,Ze,xe,tt);else{var Ie=Et(Me)||Ke.destroyed;!Ie&&!Me.corked&&!Me.bufferProcessing&&Me.bufferedRequest&&ut(Ke,Me),Ze?fe.nextTick(dt,Ke,Me,Ie,tt):dt(Ke,Me,Ie,tt)}}function dt(Ke,xe,Me,Ze){Me||ft(Ke,xe),xe.pendingcb--,Ze(),kt(Ke,xe)}function ft(Ke,xe){xe.length===0&&xe.needDrain&&(xe.needDrain=!1,Ke.emit("drain"))}function ut(Ke,xe){xe.bufferProcessing=!0;var Me=xe.bufferedRequest;if(Ke._writev&&Me&&Me.next){var Ze=xe.bufferedRequestCount,tt=new Array(Ze),Ie=xe.corkedRequestsFree;Ie.entry=Me;for(var _e=0,He=!0;Me;)tt[_e]=Me,Me.isBuf||(He=!1),Me=Me.next,_e+=1;tt.allBuffers=He,nt(Ke,xe,!0,xe.length,tt,"",Ie.finish),xe.pendingcb++,xe.lastBufferedRequest=null,Ie.next?(xe.corkedRequestsFree=Ie.next,Ie.next=null):xe.corkedRequestsFree=new Ce(xe),xe.bufferedRequestCount=0}else{for(;Me;){var rt=Me.chunk,St=Me.encoding,Ct=Me.callback,Nt=xe.objectMode?1:rt.length;if(nt(Ke,xe,!1,Nt,rt,St,Ct),Me=Me.next,xe.bufferedRequestCount--,xe.writing)break}Me===null&&(xe.lastBufferedRequest=null)}xe.bufferedRequest=Me,xe.bufferProcessing=!1}ot.prototype._write=function(Ke,xe,Me){Me(new Pe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(Ke,xe,Me){var Ze=this._writableState;return typeof Ke=="function"?(Me=Ke,Ke=null,xe=null):typeof xe=="function"&&(Me=xe,xe=null),Ke!=null&&this.write(Ke,xe),Ze.corked&&(Ze.corked=1,this.uncork()),Ze.ending||pt(this,Ze,Me),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Et(Ke){return Ke.ending&&Ke.length===0&&Ke.bufferedRequest===null&&!Ke.finished&&!Ke.writing}function mt(Ke,xe){Ke._final(function(Me){xe.pendingcb--,Me&&We(Ke,Me),xe.prefinished=!0,Ke.emit("prefinish"),kt(Ke,xe)})}function vt(Ke,xe){!xe.prefinished&&!xe.finalCalled&&(typeof Ke._final=="function"&&!xe.destroyed?(xe.pendingcb++,xe.finalCalled=!0,fe.nextTick(mt,Ke,xe)):(xe.prefinished=!0,Ke.emit("prefinish")))}function kt(Ke,xe){var Me=Et(xe);if(Me&&(vt(Ke,xe),xe.pendingcb===0&&(xe.finished=!0,Ke.emit("finish"),xe.autoDestroy))){var Ze=Ke._readableState;(!Ze||Ze.autoDestroy&&Ze.endEmitted)&&Ke.destroy()}return Me}function pt(Ke,xe,Me){xe.ending=!0,kt(Ke,xe),Me&&(xe.finished?fe.nextTick(Me):Ke.once("finish",Me)),xe.ended=!0,Ke.writable=!1}function Qe(Ke,xe,Me){var Ze=Ke.entry;for(Ke.entry=null;Ze;){var tt=Ze.callback;xe.pendingcb--,tt(Me),Ze=Ze.next}xe.corkedRequestsFree.next=Ke}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(xe){this._writableState&&(this._writableState.destroyed=xe)}}),ot.prototype.destroy=ae.destroy,ot.prototype._undestroy=ae.undestroy,ot.prototype._destroy=function(Ke,xe){xe(Ke)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(oe,ze,De){(function(fe){(function(){"use strict";var me;function ke(Ne,Ae,Re){return Ae=Ce(Ae),Ae in Ne?Object.defineProperty(Ne,Ae,{value:Re,enumerable:!0,configurable:!0,writable:!0}):Ne[Ae]=Re,Ne}function Ce(Ne){var Ae=Se(Ne,"string");return typeof Ae=="symbol"?Ae:String(Ae)}function Se(Ne,Ae){if(typeof Ne!="object"||Ne===null)return Ne;var Re=Ne[Symbol.toPrimitive];if(Re!==void 0){var We=Re.call(Ne,Ae||"default");if(typeof We!="object")return We;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ae==="string"?String:Number)(Ne)}var Le=oe("./end-of-stream"),ve=Symbol("lastResolve"),we=Symbol("lastReject"),de=Symbol("error"),z=Symbol("ended"),ee=Symbol("lastPromise"),ae=Symbol("handlePromise"),ie=Symbol("stream");function le(Ne,Ae){return{value:Ne,done:Ae}}function ue(Ne){var Ae=Ne[ve];if(Ae!==null){var Re=Ne[ie].read();Re!==null&&(Ne[ee]=null,Ne[ve]=null,Ne[we]=null,Ae(le(Re,!1)))}}function ge(Ne){fe.nextTick(ue,Ne)}function Pe(Ne,Ae){return function(Re,We){Ne.then(function(){if(Ae[z]){Re(le(void 0,!0));return}Ae[ae](Re,We)},We)}}var je=Object.getPrototypeOf(function(){}),Be=Object.setPrototypeOf((me={get stream(){return this[ie]},next:function(){var Ae=this,Re=this[de];if(Re!==null)return Promise.reject(Re);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ve,ot){fe.nextTick(function(){Ae[de]?ot(Ae[de]):Ve(le(void 0,!0))})});var We=this[ee],Ye;if(We)Ye=new Promise(Pe(We,this));else{var Ue=this[ie].read();if(Ue!==null)return Promise.resolve(le(Ue,!1));Ye=new Promise(this[ae])}return this[ee]=Ye,Ye}},ke(me,Symbol.asyncIterator,function(){return this}),ke(me,"return",function(){var Ae=this;return new Promise(function(Re,We){Ae[ie].destroy(null,function(Ye){if(Ye){We(Ye);return}Re(le(void 0,!0))})})}),me),je),Fe=function(Ae){var Re,We=Object.create(Be,(Re={},ke(Re,ie,{value:Ae,writable:!0}),ke(Re,ve,{value:null,writable:!0}),ke(Re,we,{value:null,writable:!0}),ke(Re,de,{value:null,writable:!0}),ke(Re,z,{value:Ae._readableState.endEmitted,writable:!0}),ke(Re,ae,{value:function(Ue,Ve){var ot=We[ie].read();ot?(We[ee]=null,We[ve]=null,We[we]=null,Ue(le(ot,!1))):(We[ve]=Ue,We[we]=Ve)},writable:!0}),Re));return We[ee]=null,Le(Ae,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ue=We[we];Ue!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ue(Ye)),We[de]=Ye;return}var Ve=We[ve];Ve!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ve(le(void 0,!0))),We[z]=!0}),Ae.on("readable",ge.bind(null,We)),We};ze.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,ze,De){"use strict";function fe(ue,ge){var Pe=Object.keys(ue);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(ue);ge&&(je=je.filter(function(Be){return Object.getOwnPropertyDescriptor(ue,Be).enumerable})),Pe.push.apply(Pe,je)}return Pe}function me(ue){for(var ge=1;ge<arguments.length;ge++){var Pe=arguments[ge]!=null?arguments[ge]:{};ge%2?fe(Object(Pe),!0).forEach(function(je){ke(ue,je,Pe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(Pe)):fe(Object(Pe)).forEach(function(je){Object.defineProperty(ue,je,Object.getOwnPropertyDescriptor(Pe,je))})}return ue}function ke(ue,ge,Pe){return ge=ve(ge),ge in ue?Object.defineProperty(ue,ge,{value:Pe,enumerable:!0,configurable:!0,writable:!0}):ue[ge]=Pe,ue}function Ce(ue,ge){if(!(ue instanceof ge))throw new TypeError("Cannot call a class as a function")}function Se(ue,ge){for(var Pe=0;Pe<ge.length;Pe++){var je=ge[Pe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ue,ve(je.key),je)}}function Le(ue,ge,Pe){return ge&&Se(ue.prototype,ge),Pe&&Se(ue,Pe),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function ve(ue){var ge=we(ue,"string");return typeof ge=="symbol"?ge:String(ge)}function we(ue,ge){if(typeof ue!="object"||ue===null)return ue;var Pe=ue[Symbol.toPrimitive];if(Pe!==void 0){var je=Pe.call(ue,ge||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ge==="string"?String:Number)(ue)}var de=oe("buffer"),z=de.Buffer,ee=oe("util"),ae=ee.inspect,ie=ae&&ae.custom||"inspect";function le(ue,ge,Pe){z.prototype.copy.call(ue,ge,Pe)}ze.exports=function(){function ue(){Ce(this,ue),this.head=null,this.tail=null,this.length=0}return Le(ue,[{key:"push",value:function(Pe){var je={data:Pe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(Pe){var je={data:Pe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Pe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Pe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Pe){if(this.length===0)return"";for(var je=this.head,Be=""+je.data;je=je.next;)Be+=Pe+je.data;return Be}},{key:"concat",value:function(Pe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(Pe>>>0),Be=this.head,Fe=0;Be;)le(Be.data,je,Fe),Fe+=Be.data.length,Be=Be.next;return je}},{key:"consume",value:function(Pe,je){var Be;return Pe<this.head.data.length?(Be=this.head.data.slice(0,Pe),this.head.data=this.head.data.slice(Pe)):Pe===this.head.data.length?Be=this.shift():Be=je?this._getString(Pe):this._getBuffer(Pe),Be}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Pe){var je=this.head,Be=1,Fe=je.data;for(Pe-=Fe.length;je=je.next;){var Ne=je.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ae===Ne.length?Fe+=Ne:Fe+=Ne.slice(0,Pe),Pe-=Ae,Pe===0){Ae===Ne.length?(++Be,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Ne.slice(Ae));break}++Be}return this.length-=Be,Fe}},{key:"_getBuffer",value:function(Pe){var je=z.allocUnsafe(Pe),Be=this.head,Fe=1;for(Be.data.copy(je),Pe-=Be.data.length;Be=Be.next;){var Ne=Be.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ne.copy(je,je.length-Pe,0,Ae),Pe-=Ae,Pe===0){Ae===Ne.length?(++Fe,Be.next?this.head=Be.next:this.head=this.tail=null):(this.head=Be,Be.data=Ne.slice(Ae));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(Pe,je){return ae(this,me(me({},je),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(oe,ze,De){(function(fe){(function(){"use strict";function me(we,de){var z=this,ee=this._readableState&&this._readableState.destroyed,ae=this._writableState&&this._writableState.destroyed;return ee||ae?(de?de(we):we&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fe.nextTick(Le,this,we)):fe.nextTick(Le,this,we)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ie){!de&&ie?z._writableState?z._writableState.errorEmitted?fe.nextTick(Ce,z):(z._writableState.errorEmitted=!0,fe.nextTick(ke,z,ie)):fe.nextTick(ke,z,ie):de?(fe.nextTick(Ce,z),de(ie)):fe.nextTick(Ce,z)}),this)}function ke(we,de){Le(we,de),Ce(we)}function Ce(we){we._writableState&&!we._writableState.emitClose||we._readableState&&!we._readableState.emitClose||we.emit("close")}function Se(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Le(we,de){we.emit("error",de)}function ve(we,de){var z=we._readableState,ee=we._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?we.destroy(de):we.emit("error",de)}ze.exports={destroy:me,undestroy:Se,errorOrDestroy:ve}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,ze,De){"use strict";var fe=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function me(Le){var ve=!1;return function(){if(!ve){ve=!0;for(var we=arguments.length,de=new Array(we),z=0;z<we;z++)de[z]=arguments[z];Le.apply(this,de)}}}function ke(){}function Ce(Le){return Le.setHeader&&typeof Le.abort=="function"}function Se(Le,ve,we){if(typeof ve=="function")return Se(Le,null,ve);ve||(ve={}),we=me(we||ke);var de=ve.readable||ve.readable!==!1&&Le.readable,z=ve.writable||ve.writable!==!1&&Le.writable,ee=function(){Le.writable||ie()},ae=Le._writableState&&Le._writableState.finished,ie=function(){z=!1,ae=!0,de||we.call(Le)},le=Le._readableState&&Le._readableState.endEmitted,ue=function(){de=!1,le=!0,z||we.call(Le)},ge=function(Fe){we.call(Le,Fe)},Pe=function(){var Fe;if(de&&!le)return(!Le._readableState||!Le._readableState.ended)&&(Fe=new fe),we.call(Le,Fe);if(z&&!ae)return(!Le._writableState||!Le._writableState.ended)&&(Fe=new fe),we.call(Le,Fe)},je=function(){Le.req.on("finish",ie)};return Ce(Le)?(Le.on("complete",ie),Le.on("abort",Pe),Le.req?je():Le.on("request",je)):z&&!Le._writableState&&(Le.on("end",ee),Le.on("close",ee)),Le.on("end",ue),Le.on("finish",ie),ve.error!==!1&&Le.on("error",ge),Le.on("close",Pe),function(){Le.removeListener("complete",ie),Le.removeListener("abort",Pe),Le.removeListener("request",je),Le.req&&Le.req.removeListener("finish",ie),Le.removeListener("end",ee),Le.removeListener("close",ee),Le.removeListener("finish",ie),Le.removeListener("end",ue),Le.removeListener("error",ge),Le.removeListener("close",Pe)}}ze.exports=Se},{"../../../errors":399}],409:[function(oe,ze,De){ze.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,ze,De){"use strict";var fe;function me(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var ke=oe("../../../errors").codes,Ce=ke.ERR_MISSING_ARGS,Se=ke.ERR_STREAM_DESTROYED;function Le(ie){if(ie)throw ie}function ve(ie){return ie.setHeader&&typeof ie.abort=="function"}function we(ie,le,ue,ge){ge=me(ge);var Pe=!1;ie.on("close",function(){Pe=!0}),fe===void 0&&(fe=oe("./end-of-stream")),fe(ie,{readable:le,writable:ue},function(Be){if(Be)return ge(Be);Pe=!0,ge()});var je=!1;return function(Be){if(!Pe&&!je){if(je=!0,ve(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();ge(Be||new Se("pipe"))}}}function de(ie){ie()}function z(ie,le){return ie.pipe(le)}function ee(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Le:ie.pop()}function ae(){for(var ie=arguments.length,le=new Array(ie),ue=0;ue<ie;ue++)le[ue]=arguments[ue];var ge=ee(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new Ce("streams");var Pe,je=le.map(function(Be,Fe){var Ne=Fe<le.length-1,Ae=Fe>0;return we(Be,Ne,Ae,function(Re){Pe||(Pe=Re),Re&&je.forEach(de),!Ne&&(je.forEach(de),ge(Pe))})});return le.reduce(z)}ze.exports=ae},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,ze,De){"use strict";var fe=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function me(Ce,Se,Le){return Ce.highWaterMark!=null?Ce.highWaterMark:Se?Ce[Le]:null}function ke(Ce,Se,Le,ve){var we=me(Se,ve,Le);if(we!=null){if(!(isFinite(we)&&Math.floor(we)===we)||we<0){var de=ve?Le:"highWaterMark";throw new fe(de,we)}return Math.floor(we)}return Ce.objectMode?16:16*1024}ze.exports={getHighWaterMark:ke}},{"../../../errors":399}],412:[function(oe,ze,De){arguments[4][393][0].apply(De,arguments)},{dup:393,events:344}],413:[function(oe,ze,De){"use strict";var fe=oe("safe-buffer").Buffer,me=fe.isEncoding||function(je){switch(je=""+je,je&&je.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ke(je){if(!je)return"utf8";for(var Be;;)switch(je){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return je;default:if(Be)return;je=(""+je).toLowerCase(),Be=!0}}function Ce(je){var Be=ke(je);if(typeof Be!="string"&&(fe.isEncoding===me||!me(je)))throw new Error("Unknown encoding: "+je);return Be||je}De.StringDecoder=Se;function Se(je){this.encoding=Ce(je);var Be;switch(this.encoding){case"utf16le":this.text=ae,this.end=ie,Be=4;break;case"utf8":this.fillLast=de,Be=4;break;case"base64":this.text=le,this.end=ue,Be=3;break;default:this.write=ge,this.end=Pe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fe.allocUnsafe(Be)}Se.prototype.write=function(je){if(je.length===0)return"";var Be,Fe;if(this.lastNeed){if(Be=this.fillLast(je),Be===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?Be?Be+this.text(je,Fe):this.text(je,Fe):Be||""},Se.prototype.end=ee,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Le(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function ve(je,Be,Fe){var Ne=Be.length-1;if(Ne<Fe)return 0;var Ae=Le(Be[Ne]);return Ae>=0?(Ae>0&&(je.lastNeed=Ae-1),Ae):--Ne<Fe||Ae===-2?0:(Ae=Le(Be[Ne]),Ae>=0?(Ae>0&&(je.lastNeed=Ae-2),Ae):--Ne<Fe||Ae===-2?0:(Ae=Le(Be[Ne]),Ae>=0?(Ae>0&&(Ae===2?Ae=0:je.lastNeed=Ae-3),Ae):0))}function we(je,Be,Fe){if((Be[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&Be.length>1){if((Be[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&Be.length>2&&(Be[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function de(je){var Be=this.lastTotal-this.lastNeed,Fe=we(this,je,Be);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,Be,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,Be,0,je.length),this.lastNeed-=je.length}function z(je,Be){var Fe=ve(this,je,Be);if(!this.lastNeed)return je.toString("utf8",Be);this.lastTotal=Fe;var Ne=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Ne),je.toString("utf8",Be,Ne)}function ee(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+"\uFFFD":Be}function ae(je,Be){if((je.length-Be)%2===0){var Fe=je.toString("utf16le",Be);if(Fe){var Ne=Fe.charCodeAt(Fe.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",Be,je.length-1)}function ie(je){var Be=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return Be+this.lastChar.toString("utf16le",0,Fe)}return Be}function le(je,Be){var Fe=(je.length-Be)%3;return Fe===0?je.toString("base64",Be):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",Be,je.length-Fe))}function ue(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+this.lastChar.toString("base64",0,3-this.lastNeed):Be}function ge(je){return je.toString(this.encoding)}function Pe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,ze,De){(function(fe,me){(function(){var ke=oe("process/browser.js").nextTick,Ce=Function.prototype.apply,Se=Array.prototype.slice,Le={},ve=0;De.setTimeout=function(){return new we(Ce.call(setTimeout,window,arguments),clearTimeout)},De.setInterval=function(){return new we(Ce.call(setInterval,window,arguments),clearInterval)},De.clearTimeout=De.clearInterval=function(de){de.close()};function we(de,z){this._id=de,this._clearFn=z}we.prototype.unref=we.prototype.ref=function(){},we.prototype.close=function(){this._clearFn.call(window,this._id)},De.enroll=function(de,z){clearTimeout(de._idleTimeoutId),de._idleTimeout=z},De.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},De._unrefActive=De.active=function(de){clearTimeout(de._idleTimeoutId);var z=de._idleTimeout;z>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},z))},De.setImmediate=typeof fe=="function"?fe:function(de){var z=ve++,ee=arguments.length<2?!1:Se.call(arguments,1);return Le[z]=!0,ke(function(){Le[z]&&(ee?de.apply(null,ee):de.call(null),De.clearImmediate(z))}),z},De.clearImmediate=typeof me=="function"?me:function(de){delete Le[de]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,ze,De){var fe=oe("buffer").Buffer;ze.exports=function(me){if(me instanceof Uint8Array){if(me.byteOffset===0&&me.byteLength===me.buffer.byteLength)return me.buffer;if(typeof me.buffer.slice=="function")return me.buffer.slice(me.byteOffset,me.byteOffset+me.byteLength)}if(fe.isBuffer(me)){for(var ke=new Uint8Array(me.length),Ce=me.length,Se=0;Se<Ce;Se++)ke[Se]=me[Se];return ke.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(oe,ze,De){(function(fe){(function(){ze.exports=me;function me(Ce,Se){if(ke("noDeprecation"))return Ce;var Le=!1;function ve(){if(!Le){if(ke("throwDeprecation"))throw new Error(Se);ke("traceDeprecation")?console.trace(Se):console.warn(Se),Le=!0}return Ce.apply(this,arguments)}return ve}function ke(Ce){try{if(!fe.localStorage)return!1}catch(Le){return!1}var Se=fe.localStorage[Ce];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(oe,ze,De){arguments[4][84][0].apply(De,arguments)},{dup:84}],418:[function(oe,ze,De){"use strict";var fe=oe("is-arguments"),me=oe("is-generator-function"),ke=oe("which-typed-array"),Ce=oe("is-typed-array");function Se(St){return St.call.bind(St)}var Le=typeof BigInt!="undefined",ve=typeof Symbol!="undefined",we=Se(Object.prototype.toString),de=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),ee=Se(Boolean.prototype.valueOf);if(Le)var ae=Se(BigInt.prototype.valueOf);if(ve)var ie=Se(Symbol.prototype.valueOf);function le(St,Ct){if(typeof St!="object")return!1;try{return Ct(St),!0}catch(Nt){return!1}}De.isArgumentsObject=fe,De.isGeneratorFunction=me,De.isTypedArray=Ce;function ue(St){return typeof Promise!="undefined"&&St instanceof Promise||St!==null&&typeof St=="object"&&typeof St.then=="function"&&typeof St.catch=="function"}De.isPromise=ue;function ge(St){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(St):Ce(St)||ut(St)}De.isArrayBufferView=ge;function Pe(St){return ke(St)==="Uint8Array"}De.isUint8Array=Pe;function je(St){return ke(St)==="Uint8ClampedArray"}De.isUint8ClampedArray=je;function Be(St){return ke(St)==="Uint16Array"}De.isUint16Array=Be;function Fe(St){return ke(St)==="Uint32Array"}De.isUint32Array=Fe;function Ne(St){return ke(St)==="Int8Array"}De.isInt8Array=Ne;function Ae(St){return ke(St)==="Int16Array"}De.isInt16Array=Ae;function Re(St){return ke(St)==="Int32Array"}De.isInt32Array=Re;function We(St){return ke(St)==="Float32Array"}De.isFloat32Array=We;function Ye(St){return ke(St)==="Float64Array"}De.isFloat64Array=Ye;function Ue(St){return ke(St)==="BigInt64Array"}De.isBigInt64Array=Ue;function Ve(St){return ke(St)==="BigUint64Array"}De.isBigUint64Array=Ve;function ot(St){return we(St)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function st(St){return typeof Map=="undefined"?!1:ot.working?ot(St):St instanceof Map}De.isMap=st;function ct(St){return we(St)==="[object Set]"}ct.working=typeof Set!="undefined"&&ct(new Set);function Pt(St){return typeof Set=="undefined"?!1:ct.working?ct(St):St instanceof Set}De.isSet=Pt;function $e(St){return we(St)==="[object WeakMap]"}$e.working=typeof WeakMap!="undefined"&&$e(new WeakMap);function nt(St){return typeof WeakMap=="undefined"?!1:$e.working?$e(St):St instanceof WeakMap}De.isWeakMap=nt;function yt(St){return we(St)==="[object WeakSet]"}yt.working=typeof WeakSet!="undefined"&&yt(new WeakSet);function xt(St){return yt(St)}De.isWeakSet=xt;function wt(St){return we(St)==="[object ArrayBuffer]"}wt.working=typeof ArrayBuffer!="undefined"&&wt(new ArrayBuffer);function dt(St){return typeof ArrayBuffer=="undefined"?!1:wt.working?wt(St):St instanceof ArrayBuffer}De.isArrayBuffer=dt;function ft(St){return we(St)==="[object DataView]"}ft.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&ft(new DataView(new ArrayBuffer(1),0,1));function ut(St){return typeof DataView=="undefined"?!1:ft.working?ft(St):St instanceof DataView}De.isDataView=ut;var Et=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function mt(St){return we(St)==="[object SharedArrayBuffer]"}function vt(St){return typeof Et=="undefined"?!1:(typeof mt.working=="undefined"&&(mt.working=mt(new Et)),mt.working?mt(St):St instanceof Et)}De.isSharedArrayBuffer=vt;function kt(St){return we(St)==="[object AsyncFunction]"}De.isAsyncFunction=kt;function pt(St){return we(St)==="[object Map Iterator]"}De.isMapIterator=pt;function Qe(St){return we(St)==="[object Set Iterator]"}De.isSetIterator=Qe;function Ke(St){return we(St)==="[object Generator]"}De.isGeneratorObject=Ke;function xe(St){return we(St)==="[object WebAssembly.Module]"}De.isWebAssemblyCompiledModule=xe;function Me(St){return le(St,de)}De.isNumberObject=Me;function Ze(St){return le(St,z)}De.isStringObject=Ze;function tt(St){return le(St,ee)}De.isBooleanObject=tt;function Ie(St){return Le&&le(St,ae)}De.isBigIntObject=Ie;function _e(St){return ve&&le(St,ie)}De.isSymbolObject=_e;function He(St){return Me(St)||Ze(St)||tt(St)||Ie(St)||_e(St)}De.isBoxedPrimitive=He;function rt(St){return typeof Uint8Array!="undefined"&&(dt(St)||vt(St))}De.isAnyArrayBuffer=rt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(St){Object.defineProperty(De,St,{enumerable:!1,value:function(){throw new Error(St+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,ze,De){(function(fe){(function(){var me=Object.getOwnPropertyDescriptors||function(Et){for(var mt=Object.keys(Et),vt={},kt=0;kt<mt.length;kt++)vt[mt[kt]]=Object.getOwnPropertyDescriptor(Et,mt[kt]);return vt},ke=/%[sdj%]/g;De.format=function(ut){if(!Ae(ut)){for(var Et=[],mt=0;mt<arguments.length;mt++)Et.push(ve(arguments[mt]));return Et.join(" ")}for(var mt=1,vt=arguments,kt=vt.length,pt=String(ut).replace(ke,function(Ke){if(Ke==="%%")return"%";if(mt>=kt)return Ke;switch(Ke){case"%s":return String(vt[mt++]);case"%d":return Number(vt[mt++]);case"%j":try{return JSON.stringify(vt[mt++])}catch(xe){return"[Circular]"}default:return Ke}}),Qe=vt[mt];mt<kt;Qe=vt[++mt])Be(Qe)||!Ue(Qe)?pt+=" "+Qe:pt+=" "+ve(Qe);return pt},De.deprecate=function(ut,Et){if(typeof fe!="undefined"&&fe.noDeprecation===!0)return ut;if(typeof fe=="undefined")return function(){return De.deprecate(ut,Et).apply(this,arguments)};var mt=!1;function vt(){if(!mt){if(fe.throwDeprecation)throw new Error(Et);fe.traceDeprecation?console.trace(Et):console.error(Et),mt=!0}return ut.apply(this,arguments)}return vt};var Ce={},Se=/^$/;if(fe.env.NODE_DEBUG){var Le=fe.env.NODE_DEBUG;Le=Le.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Le+"$","i")}De.debuglog=function(ut){if(ut=ut.toUpperCase(),!Ce[ut])if(Se.test(ut)){var Et=fe.pid;Ce[ut]=function(){var mt=De.format.apply(De,arguments);console.error("%s %d: %s",ut,Et,mt)}}else Ce[ut]=function(){};return Ce[ut]};function ve(ut,Et){var mt={seen:[],stylize:de};return arguments.length>=3&&(mt.depth=arguments[2]),arguments.length>=4&&(mt.colors=arguments[3]),je(Et)?mt.showHidden=Et:Et&&De._extend(mt,Et),We(mt.showHidden)&&(mt.showHidden=!1),We(mt.depth)&&(mt.depth=2),We(mt.colors)&&(mt.colors=!1),We(mt.customInspect)&&(mt.customInspect=!0),mt.colors&&(mt.stylize=we),ee(mt,ut,mt.depth)}De.inspect=ve,ve.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]},ve.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function we(ut,Et){var mt=ve.styles[Et];return mt?"\x1B["+ve.colors[mt][0]+"m"+ut+"\x1B["+ve.colors[mt][1]+"m":ut}function de(ut,Et){return ut}function z(ut){var Et={};return ut.forEach(function(mt,vt){Et[mt]=!0}),Et}function ee(ut,Et,mt){if(ut.customInspect&&Et&&st(Et.inspect)&&Et.inspect!==De.inspect&&!(Et.constructor&&Et.constructor.prototype===Et)){var vt=Et.inspect(mt,ut);return Ae(vt)||(vt=ee(ut,vt,mt)),vt}var kt=ae(ut,Et);if(kt)return kt;var pt=Object.keys(Et),Qe=z(pt);if(ut.showHidden&&(pt=Object.getOwnPropertyNames(Et)),ot(Et)&&(pt.indexOf("message")>=0||pt.indexOf("description")>=0))return ie(Et);if(pt.length===0){if(st(Et)){var Ke=Et.name?": "+Et.name:"";return ut.stylize("[Function"+Ke+"]","special")}if(Ye(Et))return ut.stylize(RegExp.prototype.toString.call(Et),"regexp");if(Ve(Et))return ut.stylize(Date.prototype.toString.call(Et),"date");if(ot(Et))return ie(Et)}var xe="",Me=!1,Ze=["{","}"];if(Pe(Et)&&(Me=!0,Ze=["[","]"]),st(Et)){var tt=Et.name?": "+Et.name:"";xe=" [Function"+tt+"]"}if(Ye(Et)&&(xe=" "+RegExp.prototype.toString.call(Et)),Ve(Et)&&(xe=" "+Date.prototype.toUTCString.call(Et)),ot(Et)&&(xe=" "+ie(Et)),pt.length===0&&(!Me||Et.length==0))return Ze[0]+xe+Ze[1];if(mt<0)return Ye(Et)?ut.stylize(RegExp.prototype.toString.call(Et),"regexp"):ut.stylize("[Object]","special");ut.seen.push(Et);var Ie;return Me?Ie=le(ut,Et,mt,Qe,pt):Ie=pt.map(function(_e){return ue(ut,Et,mt,Qe,_e,Me)}),ut.seen.pop(),ge(Ie,xe,Ze)}function ae(ut,Et){if(We(Et))return ut.stylize("undefined","undefined");if(Ae(Et)){var mt="'"+JSON.stringify(Et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ut.stylize(mt,"string")}if(Ne(Et))return ut.stylize(""+Et,"number");if(je(Et))return ut.stylize(""+Et,"boolean");if(Be(Et))return ut.stylize("null","null")}function ie(ut){return"["+Error.prototype.toString.call(ut)+"]"}function le(ut,Et,mt,vt,kt){for(var pt=[],Qe=0,Ke=Et.length;Qe<Ke;++Qe)xt(Et,String(Qe))?pt.push(ue(ut,Et,mt,vt,String(Qe),!0)):pt.push("");return kt.forEach(function(xe){xe.match(/^\d+$/)||pt.push(ue(ut,Et,mt,vt,xe,!0))}),pt}function ue(ut,Et,mt,vt,kt,pt){var Qe,Ke,xe;if(xe=Object.getOwnPropertyDescriptor(Et,kt)||{value:Et[kt]},xe.get?xe.set?Ke=ut.stylize("[Getter/Setter]","special"):Ke=ut.stylize("[Getter]","special"):xe.set&&(Ke=ut.stylize("[Setter]","special")),xt(vt,kt)||(Qe="["+kt+"]"),Ke||(ut.seen.indexOf(xe.value)<0?(Be(mt)?Ke=ee(ut,xe.value,null):Ke=ee(ut,xe.value,mt-1),Ke.indexOf(`
`)>-1&&(pt?Ke=Ke.split(`
`).map(function(Me){return" "+Me}).join(`
`).slice(2):Ke=`
`+Ke.split(`
`).map(function(Me){return" "+Me}).join(`
`))):Ke=ut.stylize("[Circular]","special")),We(Qe)){if(pt&&kt.match(/^\d+$/))return Ke;Qe=JSON.stringify(""+kt),Qe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Qe=Qe.slice(1,-1),Qe=ut.stylize(Qe,"name")):(Qe=Qe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Qe=ut.stylize(Qe,"string"))}return Qe+": "+Ke}function ge(ut,Et,mt){var vt=0,kt=ut.reduce(function(pt,Qe){return vt++,Qe.indexOf(`
`)>=0&&vt++,pt+Qe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return kt>60?mt[0]+(Et===""?"":Et+`
`)+" "+ut.join(`,
`)+" "+mt[1]:mt[0]+Et+" "+ut.join(", ")+" "+mt[1]}De.types=oe("./support/types");function Pe(ut){return Array.isArray(ut)}De.isArray=Pe;function je(ut){return typeof ut=="boolean"}De.isBoolean=je;function Be(ut){return ut===null}De.isNull=Be;function Fe(ut){return ut==null}De.isNullOrUndefined=Fe;function Ne(ut){return typeof ut=="number"}De.isNumber=Ne;function Ae(ut){return typeof ut=="string"}De.isString=Ae;function Re(ut){return typeof ut=="symbol"}De.isSymbol=Re;function We(ut){return ut===void 0}De.isUndefined=We;function Ye(ut){return Ue(ut)&&Pt(ut)==="[object RegExp]"}De.isRegExp=Ye,De.types.isRegExp=Ye;function Ue(ut){return typeof ut=="object"&&ut!==null}De.isObject=Ue;function Ve(ut){return Ue(ut)&&Pt(ut)==="[object Date]"}De.isDate=Ve,De.types.isDate=Ve;function ot(ut){return Ue(ut)&&(Pt(ut)==="[object Error]"||ut instanceof Error)}De.isError=ot,De.types.isNativeError=ot;function st(ut){return typeof ut=="function"}De.isFunction=st;function ct(ut){return ut===null||typeof ut=="boolean"||typeof ut=="number"||typeof ut=="string"||typeof ut=="symbol"||typeof ut=="undefined"}De.isPrimitive=ct,De.isBuffer=oe("./support/isBuffer");function Pt(ut){return Object.prototype.toString.call(ut)}function $e(ut){return ut<10?"0"+ut.toString(10):ut.toString(10)}var nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yt(){var ut=new Date,Et=[$e(ut.getHours()),$e(ut.getMinutes()),$e(ut.getSeconds())].join(":");return[ut.getDate(),nt[ut.getMonth()],Et].join(" ")}De.log=function(){console.log("%s - %s",yt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(ut,Et){if(!Et||!Ue(Et))return ut;for(var mt=Object.keys(Et),vt=mt.length;vt--;)ut[mt[vt]]=Et[mt[vt]];return ut};function xt(ut,Et){return Object.prototype.hasOwnProperty.call(ut,Et)}var wt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;De.promisify=function(Et){if(typeof Et!="function")throw new TypeError('The "original" argument must be of type Function');if(wt&&Et[wt]){var mt=Et[wt];if(typeof mt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(mt,wt,{value:mt,enumerable:!1,writable:!1,configurable:!0}),mt}function mt(){for(var vt,kt,pt=new Promise(function(xe,Me){vt=xe,kt=Me}),Qe=[],Ke=0;Ke<arguments.length;Ke++)Qe.push(arguments[Ke]);Qe.push(function(xe,Me){xe?kt(xe):vt(Me)});try{Et.apply(this,Qe)}catch(xe){kt(xe)}return pt}return Object.setPrototypeOf(mt,Object.getPrototypeOf(Et)),wt&&Object.defineProperty(mt,wt,{value:mt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(mt,me(Et))},De.promisify.custom=wt;function dt(ut,Et){if(!ut){var mt=new Error("Promise was rejected with a falsy value");mt.reason=ut,ut=mt}return Et(ut)}function ft(ut){if(typeof ut!="function")throw new TypeError('The "original" argument must be of type Function');function Et(){for(var mt=[],vt=0;vt<arguments.length;vt++)mt.push(arguments[vt]);var kt=mt.pop();if(typeof kt!="function")throw new TypeError("The last argument must be of type Function");var pt=this,Qe=function(){return kt.apply(pt,arguments)};ut.apply(this,mt).then(function(Ke){fe.nextTick(Qe.bind(null,null,Ke))},function(Ke){fe.nextTick(dt.bind(null,Ke,Qe))})}return Object.setPrototypeOf(Et,Object.getPrototypeOf(ut)),Object.defineProperties(Et,me(ut)),Et}De.callbackify=ft}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("for-each"),ke=oe("available-typed-arrays"),Ce=oe("call-bind"),Se=oe("call-bind/callBound"),Le=oe("gopd"),ve=Se("Object.prototype.toString"),we=oe("has-tostringtag/shams")(),de=typeof globalThis=="undefined"?fe:globalThis,z=ke(),ee=Se("String.prototype.slice"),ae=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,Be){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===Be)return Fe;return-1},le={__proto__:null};we&&Le&&ae?me(z,function(Pe){var je=new de[Pe];if(Symbol.toStringTag in je){var Be=ae(je),Fe=Le(Be,Symbol.toStringTag);if(!Fe){var Ne=ae(Be);Fe=Le(Ne,Symbol.toStringTag)}le["$"+Pe]=Ce(Fe.get)}}):me(z,function(Pe){var je=new de[Pe];le["$"+Pe]=Ce(je.slice)});var ue=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{"$"+Fe(je)===Ne&&(Be=ee(Ne,1))}catch(Ae){}}),Be},ge=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{Fe(je),Be=ee(Ne,1)}catch(Ae){}}),Be};ze.exports=function(je){if(!je||typeof je!="object")return!1;if(!we){var Be=ee(ve(je),8,-1);return ie(z,Be)>-1?Be:Be!=="Object"?!1:ge(je)}return Le?ue(je):null}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(oe,ze,De){(function(){"use strict";De.stripBOM=function(fe){return fe[0]==="\uFEFF"?fe.substring(1):fe}}).call(this)},{}],422:[function(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se,Le={}.hasOwnProperty;fe=oe("xmlbuilder"),me=oe("./defaults").defaults,Ce=function(ve){return typeof ve=="string"&&(ve.indexOf("&")>=0||ve.indexOf(">")>=0||ve.indexOf("<")>=0)},Se=function(ve){return"<![CDATA["+ke(ve)+"]]>"},ke=function(ve){return ve.replace("]]>","]]]]><![CDATA[>")},De.Builder=function(){function ve(we){var de,z,ee;this.options={},z=me["0.2"];for(de in z)Le.call(z,de)&&(ee=z[de],this.options[de]=ee);for(de in we)Le.call(we,de)&&(ee=we[de],this.options[de]=ee)}return ve.prototype.buildObject=function(we){var de,z,ee,ae,ie;return de=this.options.attrkey,z=this.options.charkey,Object.keys(we).length===1&&this.options.rootName===me["0.2"].rootName?(ie=Object.keys(we)[0],we=we[ie]):ie=this.options.rootName,ee=function(le){return function(ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(typeof ge!="object")le.options.cdata&&Ce(ge)?ue.raw(Se(ge)):ue.txt(ge);else if(Array.isArray(ge)){for(Fe in ge)if(Le.call(ge,Fe)){je=ge[Fe];for(Ne in je)Be=je[Ne],ue=ee(ue.ele(Ne),Be).up()}}else for(Ne in ge)if(Le.call(ge,Ne))if(je=ge[Ne],Ne===de){if(typeof je=="object")for(Pe in je)Ae=je[Pe],ue=ue.att(Pe,Ae)}else if(Ne===z)le.options.cdata&&Ce(je)?ue=ue.raw(Se(je)):ue=ue.txt(je);else if(Array.isArray(je))for(Fe in je)Le.call(je,Fe)&&(Be=je[Fe],typeof Be=="string"?le.options.cdata&&Ce(Be)?ue=ue.ele(Ne).raw(Se(Be)).up():ue=ue.ele(Ne,Be).up():ue=ee(ue.ele(Ne),Be).up());else typeof je=="object"?ue=ee(ue.ele(Ne),je).up():typeof je=="string"&&le.options.cdata&&Ce(je)?ue=ue.ele(Ne).raw(Se(je)).up():(je==null&&(je=""),ue=ue.ele(Ne,je.toString()).up());return ue}}(this),ae=fe.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ee(ae,we).end(this.options.renderOpts)},ve}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(oe,ze,De){(function(){De.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se,Le,ve,we,de,z=function(ie,le){return function(){return ie.apply(le,arguments)}},ee=function(ie,le){for(var ue in le)ae.call(le,ue)&&(ie[ue]=le[ue]);function ge(){this.constructor=ie}return ge.prototype=le.prototype,ie.prototype=new ge,ie.__super__=le.prototype,ie},ae={}.hasOwnProperty;we=oe("sax"),Ce=oe("events"),fe=oe("./bom"),ve=oe("./processors"),de=oe("timers").setImmediate,me=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Le=function(ie,le,ue){var ge,Pe,je;for(ge=0,Pe=ie.length;ge<Pe;ge++)je=ie[ge],le=je(le,ue);return le},ke=function(ie,le,ue){var ge;return ge=Object.create(null),ge.value=ue,ge.writable=!0,ge.enumerable=!0,ge.configurable=!0,Object.defineProperty(ie,le,ge)},De.Parser=function(ie){ee(le,ie);function le(ue){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 ge,Pe,je;if(!(this instanceof De.Parser))return new De.Parser(ue);this.options={},Pe=me["0.2"];for(ge in Pe)ae.call(Pe,ge)&&(je=Pe[ge],this.options[ge]=je);for(ge in ue)ae.call(ue,ge)&&(je=ue[ge],this.options[ge]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ve.normalize)),this.reset()}return le.prototype.processAsync=function(){var ue,ge;try{return this.remaining.length<=this.options.chunkSize?(ue=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ue),this.saxParser.close()):(ue=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ue),de(this.processAsync))}catch(Pe){if(ge=Pe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ge)}},le.prototype.assignOrPush=function(ue,ge,Pe){return ge in ue?(ue[ge]instanceof Array||ke(ue,ge,[ue[ge]]),ue[ge].push(Pe)):this.options.explicitArray?ke(ue,ge,[Pe]):ke(ue,ge,Pe)},le.prototype.reset=function(){var ue,ge,Pe,je;return this.removeAllListeners(),this.saxParser=we.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Be){return function(Fe){if(Be.saxParser.resume(),!Be.saxParser.errThrown)return Be.saxParser.errThrown=!0,Be.emit("error",Fe)}}(this),this.saxParser.onend=function(Be){return function(){if(!Be.saxParser.ended)return Be.saxParser.ended=!0,Be.emit("end",Be.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],ue=this.options.attrkey,ge=this.options.charkey,this.saxParser.onopentag=function(Be){return function(Fe){var Ne,Ae,Re,We,Ye;if(Re={},Re[ge]="",!Be.options.ignoreAttrs){Ye=Fe.attributes;for(Ne in Ye)ae.call(Ye,Ne)&&(!(ue in Re)&&!Be.options.mergeAttrs&&(Re[ue]={}),Ae=Be.options.attrValueProcessors?Le(Be.options.attrValueProcessors,Fe.attributes[Ne],Ne):Fe.attributes[Ne],We=Be.options.attrNameProcessors?Le(Be.options.attrNameProcessors,Ne):Ne,Be.options.mergeAttrs?Be.assignOrPush(Re,We,Ae):ke(Re[ue],We,Ae))}return Re["#name"]=Be.options.tagNameProcessors?Le(Be.options.tagNameProcessors,Fe.name):Fe.name,Be.options.xmlns&&(Re[Be.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Re)}}(this),this.saxParser.onclosetag=function(Be){return function(){var Fe,Ne,Ae,Re,We,Ye,Ue,Ve,ot,st;if(Ye=je.pop(),We=Ye["#name"],(!Be.options.explicitChildren||!Be.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[ge].match(/^\s*$/)&&!Fe?(Ne=Ye[ge],delete Ye[ge]):(Be.options.trim&&(Ye[ge]=Ye[ge].trim()),Be.options.normalize&&(Ye[ge]=Ye[ge].replace(/\s{2,}/g," ").trim()),Ye[ge]=Be.options.valueProcessors?Le(Be.options.valueProcessors,Ye[ge],We):Ye[ge],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])),Se(Ye)&&(typeof Be.options.emptyTag=="function"?Ye=Be.options.emptyTag():Ye=Be.options.emptyTag!==""?Be.options.emptyTag:Ne),Be.options.validator!=null&&(st="/"+function(){var ct,Pt,$e;for($e=[],ct=0,Pt=je.length;ct<Pt;ct++)Re=je[ct],$e.push(Re["#name"]);return $e}().concat(We).join("/"),function(){var ct;try{return Ye=Be.options.validator(st,ot&&ot[We],Ye)}catch(Pt){return ct=Pt,Be.emit("error",ct)}}()),Be.options.explicitChildren&&!Be.options.mergeAttrs&&typeof Ye=="object"){if(!Be.options.preserveChildrenOrder)Re={},Be.options.attrkey in Ye&&(Re[Be.options.attrkey]=Ye[Be.options.attrkey],delete Ye[Be.options.attrkey]),!Be.options.charsAsChildren&&Be.options.charkey in Ye&&(Re[Be.options.charkey]=Ye[Be.options.charkey],delete Ye[Be.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Re[Be.options.childkey]=Ye),Ye=Re;else if(ot){ot[Be.options.childkey]=ot[Be.options.childkey]||[],Ue={};for(Ae in Ye)ae.call(Ye,Ae)&&ke(Ue,Ae,Ye[Ae]);ot[Be.options.childkey].push(Ue),delete Ye["#name"],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])}}return je.length>0?Be.assignOrPush(ot,We,Ye):(Be.options.explicitRoot&&(Ve=Ye,Ye={},ke(Ye,We,Ve)),Be.resultObject=Ye,Be.saxParser.ended=!0,Be.emit("end",Be.resultObject))}}(this),Pe=function(Be){return function(Fe){var Ne,Ae;if(Ae=je[je.length-1],Ae)return Ae[ge]+=Fe,Be.options.explicitChildren&&Be.options.preserveChildrenOrder&&Be.options.charsAsChildren&&(Be.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Ae[Be.options.childkey]=Ae[Be.options.childkey]||[],Ne={"#name":"__text__"},Ne[ge]=Fe,Be.options.normalize&&(Ne[ge]=Ne[ge].replace(/\s{2,}/g," ").trim()),Ae[Be.options.childkey].push(Ne)),Ae}}(this),this.saxParser.ontext=Pe,this.saxParser.oncdata=function(Be){return function(Fe){var Ne;if(Ne=Pe(Fe),Ne)return Ne.cdata=!0}}(this)},le.prototype.parseString=function(ue,ge){var Pe;ge!=null&&typeof ge=="function"&&(this.on("end",function(je){return this.reset(),ge(null,je)}),this.on("error",function(je){return this.reset(),ge(je)}));try{return ue=ue.toString(),ue.trim()===""?(this.emit("end",null),!0):(ue=fe.stripBOM(ue),this.options.async?(this.remaining=ue,de(this.processAsync),this.saxParser):this.saxParser.write(ue).close())}catch(je){if(Pe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Pe}else return this.emit("error",Pe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(ge){return function(Pe,je){return ge.parseString(ue,function(Be,Fe){return Be?je(Be):Pe(Fe)})}}(this))},le}(Ce),De.parseString=function(ie,le,ue){var ge,Pe,je;return ue!=null?(typeof ue=="function"&&(ge=ue),typeof le=="object"&&(Pe=le)):(typeof le=="function"&&(ge=le),Pe={}),je=new De.Parser(Pe),je.parseString(ie,ge)},De.parseStringPromise=function(ie,le){var ue,ge;return typeof le=="object"&&(ue=le),ge=new De.Parser(ue),ge.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,ze,De){(function(){"use strict";var fe;fe=new RegExp(/(?!xmlns)^.*:/),De.normalize=function(me){return me.toLowerCase()},De.firstCharLowerCase=function(me){return me.charAt(0).toLowerCase()+me.slice(1)},De.stripPrefix=function(me){return me.replace(fe,"")},De.parseNumbers=function(me){return isNaN(me)||(me=me%1===0?parseInt(me,10):parseFloat(me)),me},De.parseBooleans=function(me){return/^(?:true|false)$/i.test(me)&&(me=me.toLowerCase()==="true"),me}}).call(this)},{}],426:[function(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Le.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Le={}.hasOwnProperty;me=oe("./defaults"),fe=oe("./builder"),ke=oe("./parser"),Ce=oe("./processors"),De.defaults=me.defaults,De.processors=Ce,De.ValidationError=function(ve){Se(we,ve);function we(de){this.message=de}return we}(Error),De.Builder=fe.Builder,De.Parser=ke.Parser,De.parseString=ke.parseString,De.parseStringPromise=ke.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,ze,De){(function(){ze.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,ze,De){(function(){ze.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we=[].slice,de={}.hasOwnProperty;fe=function(){var z,ee,ae,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?we.call(arguments,1):[],Se(Object.assign))Object.assign.apply(null,arguments);else for(z=0,ae=le.length;z<ae;z++)if(ie=le[z],ie!=null)for(ee in ie)de.call(ie,ee)&&(ue[ee]=ie[ee]);return ue},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Le=function(z){var ee;return!!z&&((ee=typeof z)=="function"||ee==="object")},ke=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ce=function(z){var ee;if(ke(z))return!z.length;for(ee in z)if(de.call(z,ee))return!1;return!0},ve=function(z){var ee,ae;return Le(z)&&(ae=Object.getPrototypeOf(z))&&(ee=ae.constructor)&&typeof ee=="function"&&ee instanceof ee&&Function.prototype.toString.call(ee)===Function.prototype.toString.call(Object)},me=function(z){return Se(z.valueOf)?z.valueOf():z},ze.exports.assign=fe,ze.exports.isFunction=Se,ze.exports.isObject=Le,ze.exports.isArray=ke,ze.exports.isEmpty=Ce,ze.exports.isPlainObject=ve,ze.exports.getValue=me}).call(this)},{}],430:[function(oe,ze,De){(function(){ze.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,ze,De){(function(){var fe,me,ke;fe=oe("./NodeType"),ke=oe("./XMLNode"),ze.exports=me=function(){function Ce(Se,Le,ve){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Le==null)throw new Error("Missing attribute name. "+this.debugInfo(Le));this.name=this.stringify.name(Le),this.value=this.stringify.attValue(ve),this.type=fe.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ce.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ce.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ce.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(Ce.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ce.prototype,"specified",{get:function(){return!0}}),Ce.prototype.clone=function(){return Object.create(this)},Ce.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},Ce.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},Ce.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},Ce}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;fe=oe("./NodeType"),ke=oe("./XMLCharacterData"),ze.exports=me=function(Le){Ce(ve,Le);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=fe.CData,this.value=this.stringify.cdata(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.cdata(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,ze,De){(function(){var fe,me,ke=function(Se,Le){for(var ve in Le)Ce.call(Le,ve)&&(Se[ve]=Le[ve]);function we(){this.constructor=Se}return we.prototype=Le.prototype,Se.prototype=new we,Se.__super__=Le.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLNode"),ze.exports=fe=function(Se){ke(Le,Se);function Le(ve){Le.__super__.constructor.call(this,ve),this.value=""}return Object.defineProperty(Le.prototype,"data",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Object.defineProperty(Le.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Le.prototype,"textContent",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Le.prototype.clone=function(){return Object.create(this)},Le.prototype.substringData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Le.prototype.appendData=function(ve){throw new Error("This DOM method is not implemented."+this.debugInfo())},Le.prototype.insertData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Le.prototype.deleteData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Le.prototype.replaceData=function(ve,we,de){throw new Error("This DOM method is not implemented."+this.debugInfo())},Le.prototype.isEqualNode=function(ve){return!(!Le.__super__.isEqualNode.apply(this,arguments).isEqualNode(ve)||ve.data!==this.data)},Le}(me)}).call(this)},{"./XMLNode":450}],434:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Le){Ce(ve,Le);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=fe.Comment,this.value=this.stringify.comment(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.comment(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(oe,ze,De){(function(){var fe,me,ke;me=oe("./XMLDOMErrorHandler"),ke=oe("./XMLDOMStringList"),ze.exports=fe=function(){function Ce(){var Se;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new me,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Se=Object.create(this.defaultParams)}return Object.defineProperty(Ce.prototype,"parameterNames",{get:function(){return new ke(Object.keys(this.defaultParams))}}),Ce.prototype.getParameter=function(Se){return this.params.hasOwnProperty(Se)?this.params[Se]:null},Ce.prototype.canSetParameter=function(Se,Le){return!0},Ce.prototype.setParameter=function(Se,Le){return Le!=null?this.params[Se]=Le:delete this.params[Se]},Ce}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(){}return me.prototype.handleError=function(ke){throw new Error(ke)},me}()}).call(this)},{}],437:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(){}return me.prototype.hasFeature=function(ke,Ce){return!0},me.prototype.createDocumentType=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createDocument=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createHTMLDocument=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.getFeature=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],438:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.arr=ke||[]}return Object.defineProperty(me.prototype,"length",{get:function(){return this.arr.length}}),me.prototype.item=function(ke){return this.arr[ke]||null},me.prototype.contains=function(ke){return this.arr.indexOf(ke)!==-1},me}()}).call(this)},{}],439:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Le){Ce(ve,Le);function ve(we,de,z,ee,ae,ie){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(de));if(!ee)throw new Error("Missing DTD attribute type. "+this.debugInfo(de));if(!ae)throw new Error("Missing DTD attribute default. "+this.debugInfo(de));if(ae.indexOf("#")!==0&&(ae="#"+ae),!ae.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(de));if(ie&&!ae.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(de));this.elementName=this.stringify.name(de),this.type=fe.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(ee),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=ae}return ve.prototype.toString=function(we){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Le){Ce(ve,Le);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(de),this.type=fe.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return ve.prototype.toString=function(we){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Le.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Le={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){if(we.__super__.constructor.call(this,de),ee==null)throw new Error("Missing DTD entity name. "+this.debugInfo(ee));if(ae==null)throw new Error("Missing DTD entity value. "+this.debugInfo(ee));if(this.pe=!!z,this.name=this.stringify.name(ee),this.type=fe.EntityDeclaration,!Ce(ae))this.value=this.stringify.dtdEntityValue(ae),this.internal=!0;else{if(!ae.pubID&&!ae.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(ee));if(ae.pubID&&!ae.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(ee));if(this.internal=!1,ae.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ae.pubID)),ae.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ae.sysID)),ae.nData!=null&&(this.nData=this.stringify.dtdNData(ae.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(ee))}}return Object.defineProperty(we.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(we.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(we.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(we.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlVersion",{get:function(){return null}}),we.prototype.toString=function(de){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Le){Ce(ve,Le);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD notation name. "+this.debugInfo(de));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(de));this.name=this.stringify.name(de),this.type=fe.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(ve.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ve.prototype,"systemId",{get:function(){return this.sysID}}),ve.prototype.toString=function(we){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Le.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Le={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){var ie;we.__super__.constructor.call(this,de),Ce(z)&&(ie=z,z=ie.version,ee=ie.encoding,ae=ie.standalone),z||(z="1.0"),this.type=fe.Declaration,this.version=this.stringify.xmlVersion(z),ee!=null&&(this.encoding=this.stringify.xmlEncoding(ee)),ae!=null&&(this.standalone=this.stringify.xmlStandalone(ae))}return we.prototype.toString=function(de){return this.options.writer.declaration(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility").isObject,we=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLDTDAttList"),Ce=oe("./XMLDTDEntity"),ke=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),ve=oe("./XMLNamedNodeMap"),ze.exports=Le=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(ie.__super__.constructor.call(this,le),this.type=fe.DocType,le.children){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.Element){this.name=Pe.name;break}}this.documentObject=le,de(ue)&&(Ne=ue,ue=Ne.pubID,ge=Ne.sysID),ge==null&&(Ae=[ue,ge],ge=Ae[0],ue=Ae[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),ge!=null&&(this.sysID=this.stringify.dtdSysID(ge))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.EntityDeclaration&&!le.pe&&(Pe[le.name]=le);return new ve(Pe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.NotationDeclaration&&(Pe[le.name]=le);return new ve(Pe)}}),Object.defineProperty(ie.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ie.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(ie.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),ie.prototype.element=function(le,ue){var ge;return ge=new ke(this,le,ue),this.children.push(ge),this},ie.prototype.attList=function(le,ue,ge,Pe,je){var Be;return Be=new me(this,le,ue,ge,Pe,je),this.children.push(Be),this},ie.prototype.entity=function(le,ue){var ge;return ge=new Ce(this,!1,le,ue),this.children.push(ge),this},ie.prototype.pEntity=function(le,ue){var ge;return ge=new Ce(this,!0,le,ue),this.children.push(ge),this},ie.prototype.notation=function(le,ue){var ge;return ge=new Se(this,le,ue),this.children.push(ge),this},ie.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},ie.prototype.ele=function(le,ue){return this.element(le,ue)},ie.prototype.att=function(le,ue,ge,Pe,je){return this.attList(le,ue,ge,Pe,je)},ie.prototype.ent=function(le,ue){return this.entity(le,ue)},ie.prototype.pent=function(le,ue){return this.pEntity(le,ue)},ie.prototype.not=function(le,ue){return this.notation(le,ue)},ie.prototype.up=function(){return this.root()||this.documentObject},ie.prototype.isEqualNode=function(le){return!(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},ie}(we)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de=function(ee,ae){for(var ie in ae)z.call(ae,ie)&&(ee[ie]=ae[ie]);function le(){this.constructor=ee}return le.prototype=ae.prototype,ee.prototype=new le,ee.__super__=ae.prototype,ee},z={}.hasOwnProperty;we=oe("./Utility").isPlainObject,ke=oe("./XMLDOMImplementation"),me=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),fe=oe("./NodeType"),ve=oe("./XMLStringifier"),Le=oe("./XMLStringWriter"),ze.exports=Ce=function(ee){de(ae,ee);function ae(ie){ae.__super__.constructor.call(this,null),this.name="#document",this.type=fe.Document,this.documentURI=null,this.domConfig=new me,ie||(ie={}),ie.writer||(ie.writer=new Le),this.options=ie,this.stringify=new ve(ie)}return Object.defineProperty(ae.prototype,"implementation",{value:new ke}),Object.defineProperty(ae.prototype,"doctype",{get:function(){var ie,le,ue,ge;for(ge=this.children,le=0,ue=ge.length;le<ue;le++)if(ie=ge[le],ie.type===fe.DocType)return ie;return null}}),Object.defineProperty(ae.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(ae.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(ae.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(ae.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].encoding:null}}),Object.defineProperty(ae.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(ae.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(ae.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(ae.prototype,"origin",{get:function(){return null}}),Object.defineProperty(ae.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(ae.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(ae.prototype,"contentType",{get:function(){return null}}),ae.prototype.end=function(ie){var le;return le={},ie?we(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},ae.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},ae.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.renameNode=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createNodeIterator=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTreeWalker=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye={}.hasOwnProperty;We=oe("./Utility"),Ae=We.isObject,Ne=We.isFunction,Re=We.isPlainObject,Fe=We.getValue,fe=oe("./NodeType"),ae=oe("./XMLDocument"),le=oe("./XMLElement"),Ce=oe("./XMLCData"),Se=oe("./XMLComment"),ge=oe("./XMLRaw"),Be=oe("./XMLText"),ue=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),ee=oe("./XMLDocType"),Le=oe("./XMLDTDAttList"),we=oe("./XMLDTDEntity"),ve=oe("./XMLDTDElement"),de=oe("./XMLDTDNotation"),ke=oe("./XMLAttribute"),je=oe("./XMLStringifier"),Pe=oe("./XMLStringWriter"),me=oe("./WriterState"),ze.exports=ie=function(){function Ue(Ve,ot,st){var ct;this.name="?xml",this.type=fe.Document,Ve||(Ve={}),ct={},Ve.writer?Re(Ve.writer)&&(ct=Ve.writer,Ve.writer=new Pe):Ve.writer=new Pe,this.options=Ve,this.writer=Ve.writer,this.writerOptions=this.writer.filterOptions(ct),this.stringify=new je(Ve),this.onDataCallback=ot||function(){},this.onEndCallback=st||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ue.prototype.createChildNode=function(Ve){var ot,st,ct,Pt,$e,nt,yt,xt;switch(Ve.type){case fe.CData:this.cdata(Ve.value);break;case fe.Comment:this.comment(Ve.value);break;case fe.Element:ct={},yt=Ve.attribs;for(st in yt)Ye.call(yt,st)&&(ot=yt[st],ct[st]=ot.value);this.node(Ve.name,ct);break;case fe.Dummy:this.dummy();break;case fe.Raw:this.raw(Ve.value);break;case fe.Text:this.text(Ve.value);break;case fe.ProcessingInstruction:this.instruction(Ve.target,Ve.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ve.constructor.name)}for(xt=Ve.children,$e=0,nt=xt.length;$e<nt;$e++)Pt=xt[$e],this.createChildNode(Pt),Pt.type===fe.Element&&this.up();return this},Ue.prototype.dummy=function(){return this},Ue.prototype.node=function(Ve,ot,st){var ct;if(Ve==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ve));return this.openCurrent(),Ve=Fe(Ve),ot==null&&(ot={}),ot=Fe(ot),Ae(ot)||(ct=[ot,st],st=ct[0],ot=ct[1]),this.currentNode=new le(this,Ve,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,st!=null&&this.text(st),this},Ue.prototype.element=function(Ve,ot,st){var ct,Pt,$e,nt,yt,xt;if(this.currentNode&&this.currentNode.type===fe.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ve)||Ae(Ve)||Ne(Ve))for(nt=this.options.noValidation,this.options.noValidation=!0,xt=new ae(this.options).element("TEMP_ROOT"),xt.element(Ve),this.options.noValidation=nt,yt=xt.children,Pt=0,$e=yt.length;Pt<$e;Pt++)ct=yt[Pt],this.createChildNode(ct),ct.type===fe.Element&&this.up();else this.node(Ve,ot,st);return this},Ue.prototype.attribute=function(Ve,ot){var st,ct;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ve));if(Ve!=null&&(Ve=Fe(Ve)),Ae(Ve))for(st in Ve)Ye.call(Ve,st)&&(ct=Ve[st],this.attribute(st,ct));else Ne(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Ve]=new ke(this,Ve,""):ot!=null&&(this.currentNode.attribs[Ve]=new ke(this,Ve,ot));return this},Ue.prototype.text=function(Ve){var ot;return this.openCurrent(),ot=new Be(this,Ve),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.cdata=function(Ve){var ot;return this.openCurrent(),ot=new Ce(this,Ve),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.comment=function(Ve){var ot;return this.openCurrent(),ot=new Se(this,Ve),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.raw=function(Ve){var ot;return this.openCurrent(),ot=new ge(this,Ve),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.instruction=function(Ve,ot){var st,ct,Pt,$e,nt;if(this.openCurrent(),Ve!=null&&(Ve=Fe(Ve)),ot!=null&&(ot=Fe(ot)),Array.isArray(Ve))for(st=0,$e=Ve.length;st<$e;st++)ct=Ve[st],this.instruction(ct);else if(Ae(Ve))for(ct in Ve)Ye.call(Ve,ct)&&(Pt=Ve[ct],this.instruction(ct,Pt));else Ne(ot)&&(ot=ot.apply()),nt=new ue(this,Ve,ot),this.onData(this.writer.processingInstruction(nt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ue.prototype.declaration=function(Ve,ot,st){var ct;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ct=new z(this,Ve,ot,st),this.onData(this.writer.declaration(ct,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.doctype=function(Ve,ot,st){if(this.openCurrent(),Ve==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new ee(this,ot,st),this.currentNode.rootNodeName=Ve,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ue.prototype.dtdElement=function(Ve,ot){var st;return this.openCurrent(),st=new ve(this,Ve,ot),this.onData(this.writer.dtdElement(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.attList=function(Ve,ot,st,ct,Pt){var $e;return this.openCurrent(),$e=new Le(this,Ve,ot,st,ct,Pt),this.onData(this.writer.dtdAttList($e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.entity=function(Ve,ot){var st;return this.openCurrent(),st=new we(this,!1,Ve,ot),this.onData(this.writer.dtdEntity(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.pEntity=function(Ve,ot){var st;return this.openCurrent(),st=new we(this,!0,Ve,ot),this.onData(this.writer.dtdEntity(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.notation=function(Ve,ot){var st;return this.openCurrent(),st=new de(this,Ve,ot),this.onData(this.writer.dtdNotation(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.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},Ue.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ue.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ue.prototype.openNode=function(Ve){var ot,st,ct,Pt;if(!Ve.isOpen){if(!this.root&&this.currentLevel===0&&Ve.type===fe.Element&&(this.root=Ve),st="",Ve.type===fe.Element){this.writerOptions.state=me.OpenTag,st=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"<"+Ve.name,Pt=Ve.attribs;for(ct in Pt)Ye.call(Pt,ct)&&(ot=Pt[ct],st+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));st+=(Ve.children?">":"/>")+this.writer.endline(Ve,this.writerOptions,this.currentLevel),this.writerOptions.state=me.InsideTag}else this.writerOptions.state=me.OpenTag,st=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ve.rootNodeName,Ve.pubID&&Ve.sysID?st+=' PUBLIC "'+Ve.pubID+'" "'+Ve.sysID+'"':Ve.sysID&&(st+=' SYSTEM "'+Ve.sysID+'"'),Ve.children?(st+=" [",this.writerOptions.state=me.InsideTag):(this.writerOptions.state=me.CloseTag,st+=">"),st+=this.writer.endline(Ve,this.writerOptions,this.currentLevel);return this.onData(st,this.currentLevel),Ve.isOpen=!0}},Ue.prototype.closeNode=function(Ve){var ot;if(!Ve.isClosed)return ot="",this.writerOptions.state=me.CloseTag,Ve.type===fe.Element?ot=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"</"+Ve.name+">"+this.writer.endline(Ve,this.writerOptions,this.currentLevel):ot=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ve,this.writerOptions,this.currentLevel),this.writerOptions.state=me.None,this.onData(ot,this.currentLevel),Ve.isClosed=!0},Ue.prototype.onData=function(Ve,ot){return this.documentStarted=!0,this.onDataCallback(Ve,ot+1)},Ue.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ue.prototype.debugInfo=function(Ve){return Ve==null?"":"node: <"+Ve+">"},Ue.prototype.ele=function(){return this.element.apply(this,arguments)},Ue.prototype.nod=function(Ve,ot,st){return this.node(Ve,ot,st)},Ue.prototype.txt=function(Ve){return this.text(Ve)},Ue.prototype.dat=function(Ve){return this.cdata(Ve)},Ue.prototype.com=function(Ve){return this.comment(Ve)},Ue.prototype.ins=function(Ve,ot){return this.instruction(Ve,ot)},Ue.prototype.dec=function(Ve,ot,st){return this.declaration(Ve,ot,st)},Ue.prototype.dtd=function(Ve,ot,st){return this.doctype(Ve,ot,st)},Ue.prototype.e=function(Ve,ot,st){return this.element(Ve,ot,st)},Ue.prototype.n=function(Ve,ot,st){return this.node(Ve,ot,st)},Ue.prototype.t=function(Ve){return this.text(Ve)},Ue.prototype.d=function(Ve){return this.cdata(Ve)},Ue.prototype.c=function(Ve){return this.comment(Ve)},Ue.prototype.r=function(Ve){return this.raw(Ve)},Ue.prototype.i=function(Ve,ot){return this.instruction(Ve,ot)},Ue.prototype.att=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.a=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.ent=function(Ve,ot){return this.entity(Ve,ot)},Ue.prototype.pent=function(Ve,ot){return this.pEntity(Ve,ot)},Ue.prototype.not=function(Ve,ot){return this.notation(Ve,ot)},Ue}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Le){Ce(ve,Le);function ve(we){ve.__super__.constructor.call(this,we),this.type=fe.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return""},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility"),we=de.isObject,ve=de.isFunction,Le=de.getValue,Se=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLAttribute"),Ce=oe("./XMLNamedNodeMap"),ze.exports=ke=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,Fe;if(ie.__super__.constructor.call(this,le),ue==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ue),this.type=fe.Element,this.attribs={},this.schemaTypeInfo=null,ge!=null&&this.attribute(ge),le.type===fe.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.DocType){Pe.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new Ce(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ue,ge,Pe;ge=Object.create(this),ge.isRoot&&(ge.documentObject=null),ge.attribs={},Pe=this.attribs;for(ue in Pe)ee.call(Pe,ue)&&(le=Pe[ue],ge.attribs[ue]=le.clone());return ge.children=[],this.children.forEach(function(je){var Be;return Be=je.clone(),Be.parent=ge,ge.children.push(Be)}),ge},ie.prototype.attribute=function(le,ue){var ge,Pe;if(le!=null&&(le=Le(le)),we(le))for(ge in le)ee.call(le,ge)&&(Pe=le[ge],this.attribute(ge,Pe));else ve(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new me(this,le,""):ue!=null&&(this.attribs[le]=new me(this,le,ue));return this},ie.prototype.removeAttribute=function(le){var ue,ge,Pe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Le(le),Array.isArray(le))for(ge=0,Pe=le.length;ge<Pe;ge++)ue=le[ge],delete this.attribs[ue];else delete this.attribs[le];return this},ie.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},ie.prototype.att=function(le,ue){return this.attribute(le,ue)},ie.prototype.a=function(le,ue){return this.attribute(le,ue)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},ie.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,ue,ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},ie.prototype.hasAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,ue){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ue},ie.prototype.setIdAttributeNS=function(le,ue,ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.isEqualNode=function(le){var ue,ge,Pe;if(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ue=ge=0,Pe=this.attribs.length-1;0<=Pe?ge<=Pe:ge>=Pe;ue=0<=Pe?++ge:--ge)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},ie}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.getNamedItem=function(ke){return this.nodes[ke]},me.prototype.setNamedItem=function(ke){var Ce;return Ce=this.nodes[ke.nodeName],this.nodes[ke.nodeName]=ke,Ce||null},me.prototype.removeNamedItem=function(ke){var Ce;return Ce=this.nodes[ke],delete this.nodes[ke],Ce||null},me.prototype.item=function(ke){return this.nodes[Object.keys(this.nodes)[ke]]||null},me.prototype.getNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me.prototype.setNamedItemNS=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.removeNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],450:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe={}.hasOwnProperty;Be=oe("./Utility"),je=Be.isObject,Pe=Be.isFunction,ge=Be.isEmpty,ue=Be.getValue,we=null,ke=null,Ce=null,Se=null,Le=null,ie=null,le=null,ae=null,ve=null,me=null,ee=null,de=null,fe=null,ze.exports=z=function(){function Ne(Ae){this.parent=Ae,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,we||(we=oe("./XMLElement"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Le=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),ae=oe("./XMLProcessingInstruction"),ve=oe("./XMLDummy"),me=oe("./NodeType"),ee=oe("./XMLNodeList"),de=oe("./XMLNamedNodeMap"),fe=oe("./DocumentPosition"))}return Object.defineProperty(Ne.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ne.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ne.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ne.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ne.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ne.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ne.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ne.prototype,"previousSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae-1]||null}}),Object.defineProperty(Ne.prototype,"nextSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae+1]||null}}),Object.defineProperty(Ne.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ne.prototype,"textContent",{get:function(){var Ae,Re,We,Ye,Ue;if(this.nodeType===me.Element||this.nodeType===me.DocumentFragment){for(Ue="",Ye=this.children,Re=0,We=Ye.length;Re<We;Re++)Ae=Ye[Re],Ae.textContent&&(Ue+=Ae.textContent);return Ue}else return null},set:function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Ne.prototype.setParent=function(Ae){var Re,We,Ye,Ue,Ve;for(this.parent=Ae,Ae&&(this.options=Ae.options,this.stringify=Ae.stringify),Ue=this.children,Ve=[],We=0,Ye=Ue.length;We<Ye;We++)Re=Ue[We],Ve.push(Re.setParent(this));return Ve},Ne.prototype.element=function(Ae,Re,We){var Ye,Ue,Ve,ot,st,ct,Pt,$e,nt,yt,xt;if(ct=null,Re===null&&We==null&&(nt=[{},null],Re=nt[0],We=nt[1]),Re==null&&(Re={}),Re=ue(Re),je(Re)||(yt=[Re,We],We=yt[0],Re=yt[1]),Ae!=null&&(Ae=ue(Ae)),Array.isArray(Ae))for(Ve=0,Pt=Ae.length;Ve<Pt;Ve++)Ue=Ae[Ve],ct=this.element(Ue);else if(Pe(Ae))ct=this.element(Ae.apply());else if(je(Ae)){for(st in Ae)if(Fe.call(Ae,st))if(xt=Ae[st],Pe(xt)&&(xt=xt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&st.indexOf(this.stringify.convertAttKey)===0)ct=this.attribute(st.substr(this.stringify.convertAttKey.length),xt);else if(!this.options.separateArrayItems&&Array.isArray(xt)&&ge(xt))ct=this.dummy();else if(je(xt)&&ge(xt))ct=this.element(st);else if(!this.options.keepNullNodes&&xt==null)ct=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(xt))for(ot=0,$e=xt.length;ot<$e;ot++)Ue=xt[ot],Ye={},Ye[st]=Ue,ct=this.element(Ye);else je(xt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&st.indexOf(this.stringify.convertTextKey)===0?ct=this.element(xt):(ct=this.element(st),ct.element(xt)):ct=this.element(st,xt)}else!this.options.keepNullNodes&&We===null?ct=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Ae.indexOf(this.stringify.convertTextKey)===0?ct=this.text(We):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Ae.indexOf(this.stringify.convertCDataKey)===0?ct=this.cdata(We):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Ae.indexOf(this.stringify.convertCommentKey)===0?ct=this.comment(We):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Ae.indexOf(this.stringify.convertRawKey)===0?ct=this.raw(We):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Ae.indexOf(this.stringify.convertPIKey)===0?ct=this.instruction(Ae.substr(this.stringify.convertPIKey.length),We):ct=this.node(Ae,Re,We);if(ct==null)throw new Error("Could not create any elements with: "+Ae+". "+this.debugInfo());return ct},Ne.prototype.insertBefore=function(Ae,Re,We){var Ye,Ue,Ve,ot,st;if(Ae!=null&&Ae.type)return Ve=Ae,ot=Re,Ve.setParent(this),ot?(Ue=children.indexOf(ot),st=children.splice(Ue),children.push(Ve),Array.prototype.push.apply(children,st)):children.push(Ve),Ve;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),st=this.parent.children.splice(Ue),Ye=this.parent.element(Ae,Re,We),Array.prototype.push.apply(this.parent.children,st),Ye},Ne.prototype.insertAfter=function(Ae,Re,We){var Ye,Ue,Ve;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),Ve=this.parent.children.splice(Ue+1),Ye=this.parent.element(Ae,Re,We),Array.prototype.push.apply(this.parent.children,Ve),Ye},Ne.prototype.remove=function(){var Ae,Re;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Ae=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Ae,Ae-Ae+1].concat(Re=[])),this.parent},Ne.prototype.node=function(Ae,Re,We){var Ye,Ue;return Ae!=null&&(Ae=ue(Ae)),Re||(Re={}),Re=ue(Re),je(Re)||(Ue=[Re,We],We=Ue[0],Re=Ue[1]),Ye=new we(this,Ae,Re),We!=null&&Ye.text(We),this.children.push(Ye),Ye},Ne.prototype.text=function(Ae){var Re;return je(Ae)&&this.element(Ae),Re=new le(this,Ae),this.children.push(Re),this},Ne.prototype.cdata=function(Ae){var Re;return Re=new ke(this,Ae),this.children.push(Re),this},Ne.prototype.comment=function(Ae){var Re;return Re=new Ce(this,Ae),this.children.push(Re),this},Ne.prototype.commentBefore=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.commentAfter=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We+1),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.raw=function(Ae){var Re;return Re=new ie(this,Ae),this.children.push(Re),this},Ne.prototype.dummy=function(){var Ae;return Ae=new ve(this),Ae},Ne.prototype.instruction=function(Ae,Re){var We,Ye,Ue,Ve,ot;if(Ae!=null&&(Ae=ue(Ae)),Re!=null&&(Re=ue(Re)),Array.isArray(Ae))for(Ve=0,ot=Ae.length;Ve<ot;Ve++)We=Ae[Ve],this.instruction(We);else if(je(Ae))for(We in Ae)Fe.call(Ae,We)&&(Ye=Ae[We],this.instruction(We,Ye));else Pe(Re)&&(Re=Re.apply()),Ue=new ae(this,Ae,Re),this.children.push(Ue);return this},Ne.prototype.instructionBefore=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.instructionAfter=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye+1),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.declaration=function(Ae,Re,We){var Ye,Ue;return Ye=this.document(),Ue=new Se(Ye,Ae,Re,We),Ye.children.length===0?Ye.children.unshift(Ue):Ye.children[0].type===me.Declaration?Ye.children[0]=Ue:Ye.children.unshift(Ue),Ye.root()||Ye},Ne.prototype.dtd=function(Ae,Re){var We,Ye,Ue,Ve,ot,st,ct,Pt,$e,nt;for(Ye=this.document(),Ue=new Le(Ye,Ae,Re),$e=Ye.children,Ve=ot=0,ct=$e.length;ot<ct;Ve=++ot)if(We=$e[Ve],We.type===me.DocType)return Ye.children[Ve]=Ue,Ue;for(nt=Ye.children,Ve=st=0,Pt=nt.length;st<Pt;Ve=++st)if(We=nt[Ve],We.isRoot)return Ye.children.splice(Ve,0,Ue),Ue;return Ye.children.push(Ue),Ue},Ne.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},Ne.prototype.root=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae.rootObject;if(Ae.isRoot)return Ae;Ae=Ae.parent}},Ne.prototype.document=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae;Ae=Ae.parent}},Ne.prototype.end=function(Ae){return this.document().end(Ae)},Ne.prototype.prev=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Ae-1]},Ne.prototype.next=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae===-1||Ae===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Ae+1]},Ne.prototype.importDocument=function(Ae){var Re;return Re=Ae.root().clone(),Re.parent=this,Re.isRoot=!1,this.children.push(Re),this},Ne.prototype.debugInfo=function(Ae){var Re,We;return Ae=Ae||this.name,Ae==null&&!((Re=this.parent)!=null&&Re.name)?"":Ae==null?"parent: <"+this.parent.name+">":(We=this.parent)!=null&&We.name?"node: <"+Ae+">, parent: <"+this.parent.name+">":"node: <"+Ae+">"},Ne.prototype.ele=function(Ae,Re,We){return this.element(Ae,Re,We)},Ne.prototype.nod=function(Ae,Re,We){return this.node(Ae,Re,We)},Ne.prototype.txt=function(Ae){return this.text(Ae)},Ne.prototype.dat=function(Ae){return this.cdata(Ae)},Ne.prototype.com=function(Ae){return this.comment(Ae)},Ne.prototype.ins=function(Ae,Re){return this.instruction(Ae,Re)},Ne.prototype.doc=function(){return this.document()},Ne.prototype.dec=function(Ae,Re,We){return this.declaration(Ae,Re,We)},Ne.prototype.e=function(Ae,Re,We){return this.element(Ae,Re,We)},Ne.prototype.n=function(Ae,Re,We){return this.node(Ae,Re,We)},Ne.prototype.t=function(Ae){return this.text(Ae)},Ne.prototype.d=function(Ae){return this.cdata(Ae)},Ne.prototype.c=function(Ae){return this.comment(Ae)},Ne.prototype.r=function(Ae){return this.raw(Ae)},Ne.prototype.i=function(Ae,Re){return this.instruction(Ae,Re)},Ne.prototype.u=function(){return this.up()},Ne.prototype.importXMLBuilder=function(Ae){return this.importDocument(Ae)},Ne.prototype.replaceChild=function(Ae,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.removeChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.appendChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.hasChildNodes=function(){return this.children.length!==0},Ne.prototype.cloneNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isSupported=function(Ae,Re){return!0},Ne.prototype.hasAttributes=function(){return this.attribs.length!==0},Ne.prototype.compareDocumentPosition=function(Ae){var Re,We;return Re=this,Re===Ae?0:this.document()!==Ae.document()?(We=fe.Disconnected|fe.ImplementationSpecific,Math.random()<.5?We|=fe.Preceding:We|=fe.Following,We):Re.isAncestor(Ae)?fe.Contains|fe.Preceding:Re.isDescendant(Ae)?fe.Contains|fe.Following:Re.isPreceding(Ae)?fe.Preceding:fe.Following},Ne.prototype.isSameNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupPrefix=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isDefaultNamespace=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupNamespaceURI=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isEqualNode=function(Ae){var Re,We,Ye;if(Ae.nodeType!==this.nodeType||Ae.children.length!==this.children.length)return!1;for(Re=We=0,Ye=this.children.length-1;0<=Ye?We<=Ye:We>=Ye;Re=0<=Ye?++We:--We)if(!this.children[Re].isEqualNode(Ae.children[Re]))return!1;return!0},Ne.prototype.getFeature=function(Ae,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.setUserData=function(Ae,Re,We){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.getUserData=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.contains=function(Ae){return Ae?Ae===this||this.isDescendant(Ae):!1},Ne.prototype.isDescendant=function(Ae){var Re,We,Ye,Ue,Ve;for(Ve=this.children,Ye=0,Ue=Ve.length;Ye<Ue;Ye++)if(Re=Ve[Ye],Ae===Re||(We=Re.isDescendant(Ae),We))return!0;return!1},Ne.prototype.isAncestor=function(Ae){return Ae.isDescendant(this)},Ne.prototype.isPreceding=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re<We},Ne.prototype.isFollowing=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re>We},Ne.prototype.treePosition=function(Ae){var Re,We;return We=0,Re=!1,this.foreachTreeNode(this.document(),function(Ye){if(We++,!Re&&Ye===Ae)return Re=!0}),Re?We:-1},Ne.prototype.foreachTreeNode=function(Ae,Re){var We,Ye,Ue,Ve,ot;for(Ae||(Ae=this.document()),Ve=Ae.children,Ye=0,Ue=Ve.length;Ye<Ue;Ye++){if(We=Ve[Ye],ot=Re(We))return ot;if(ot=this.foreachTreeNode(We,Re),ot)return ot}},Ne}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return this.nodes.length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.item=function(ke){return this.nodes[ke]||null},me}()}).call(this)},{}],452:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Le){Ce(ve,Le);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=fe.ProcessingInstruction,this.target=this.stringify.insTarget(de),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(we))},ve.prototype.isEqualNode=function(we){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(we)||we.target!==this.target)},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLNode"),ze.exports=ke=function(Le){Ce(ve,Le);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=fe.Raw,this.value=this.stringify.raw(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.raw(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Le.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Le={}.hasOwnProperty;fe=oe("./NodeType"),Ce=oe("./XMLWriterBase"),me=oe("./WriterState"),ze.exports=ke=function(ve){Se(we,ve);function we(de,z){this.stream=de,we.__super__.constructor.call(this,z)}return we.prototype.endline=function(de,z,ee){return de.isLastRootNode&&z.state===me.CloseTag?"":we.__super__.endline.call(this,de,z,ee)},we.prototype.document=function(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be;for(Pe=de.children,ae=ie=0,ue=Pe.length;ie<ue;ae=++ie)ee=Pe[ae],ee.isLastRootNode=ae===de.children.length-1;for(z=this.filterOptions(z),je=de.children,Be=[],le=0,ge=je.length;le<ge;le++)ee=je[le],Be.push(this.writeChildNode(ee,z,0));return Be},we.prototype.attribute=function(de,z,ee){return this.stream.write(we.__super__.attribute.call(this,de,z,ee))},we.prototype.cdata=function(de,z,ee){return this.stream.write(we.__super__.cdata.call(this,de,z,ee))},we.prototype.comment=function(de,z,ee){return this.stream.write(we.__super__.comment.call(this,de,z,ee))},we.prototype.declaration=function(de,z,ee){return this.stream.write(we.__super__.declaration.call(this,de,z,ee))},we.prototype.docType=function(de,z,ee){var ae,ie,le,ue;if(ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)),this.stream.write("<!DOCTYPE "+de.root().name),de.pubID&&de.sysID?this.stream.write(' PUBLIC "'+de.pubID+'" "'+de.sysID+'"'):de.sysID&&this.stream.write(' SYSTEM "'+de.sysID+'"'),de.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(de,z,ee)),z.state=me.InsideTag,ue=de.children,ie=0,le=ue.length;ie<le;ie++)ae=ue[ie],this.writeChildNode(ae,z,ee+1);z.state=me.CloseTag,this.stream.write("]")}return z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.element=function(de,z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne;ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)+"<"+de.name),Fe=de.attribs;for(je in Fe)Le.call(Fe,je)&&(ae=Fe[je],this.attribute(ae,z,ee));if(le=de.children.length,ue=le===0?null:de.children[0],le===0||de.children.every(function(Ae){return(Ae.type===fe.Text||Ae.type===fe.Raw)&&Ae.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=me.CloseTag,this.stream.write("</"+de.name+">")):(z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ue.type===fe.Text||ue.type===fe.Raw)&&ue.value!=null)this.stream.write(">"),z.state=me.InsideTag,z.suppressPrettyCount++,Be=!0,this.writeChildNode(ue,z,ee+1),z.suppressPrettyCount--,Be=!1,z.state=me.CloseTag,this.stream.write("</"+de.name+">");else{for(this.stream.write(">"+this.endline(de,z,ee)),z.state=me.InsideTag,Ne=de.children,ge=0,Pe=Ne.length;ge<Pe;ge++)ie=Ne[ge],this.writeChildNode(ie,z,ee+1);z.state=me.CloseTag,this.stream.write(this.indent(de,z,ee)+"</"+de.name+">")}return this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.processingInstruction=function(de,z,ee){return this.stream.write(we.__super__.processingInstruction.call(this,de,z,ee))},we.prototype.raw=function(de,z,ee){return this.stream.write(we.__super__.raw.call(this,de,z,ee))},we.prototype.text=function(de,z,ee){return this.stream.write(we.__super__.text.call(this,de,z,ee))},we.prototype.dtdAttList=function(de,z,ee){return this.stream.write(we.__super__.dtdAttList.call(this,de,z,ee))},we.prototype.dtdElement=function(de,z,ee){return this.stream.write(we.__super__.dtdElement.call(this,de,z,ee))},we.prototype.dtdEntity=function(de,z,ee){return this.stream.write(we.__super__.dtdEntity.call(this,de,z,ee))},we.prototype.dtdNotation=function(de,z,ee){return this.stream.write(we.__super__.dtdNotation.call(this,de,z,ee))},we}(Ce)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,ze,De){(function(){var fe,me,ke=function(Se,Le){for(var ve in Le)Ce.call(Le,ve)&&(Se[ve]=Le[ve]);function we(){this.constructor=Se}return we.prototype=Le.prototype,Se.prototype=new we,Se.__super__=Le.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLWriterBase"),ze.exports=fe=function(Se){ke(Le,Se);function Le(ve){Le.__super__.constructor.call(this,ve)}return Le.prototype.document=function(ve,we){var de,z,ee,ae,ie;for(we=this.filterOptions(we),ae="",ie=ve.children,z=0,ee=ie.length;z<ee;z++)de=ie[z],ae+=this.writeChildNode(de,we,0);return we.pretty&&ae.slice(-we.newline.length)===we.newline&&(ae=ae.slice(0,-we.newline.length)),ae},Le}(me)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,ze,De){(function(){var fe,me=function(Ce,Se){return function(){return Ce.apply(Se,arguments)}},ke={}.hasOwnProperty;ze.exports=fe=function(){function Ce(Se){this.assertLegalName=me(this.assertLegalName,this),this.assertLegalChar=me(this.assertLegalChar,this);var Le,ve,we;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),ve=Se.stringify||{};for(Le in ve)ke.call(ve,Le)&&(we=ve[Le],this[Le]=we)}return Ce.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},Ce.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},Ce.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},Ce.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},Ce.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},Ce.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},Ce.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},Ce.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},Ce.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.convertAttKey="@",Ce.prototype.convertPIKey="?",Ce.prototype.convertTextKey="#text",Ce.prototype.convertCDataKey="#cdata",Ce.prototype.convertCommentKey="#comment",Ce.prototype.convertRawKey="#raw",Ce.prototype.assertLegalChar=function(Se){var Le,ve;if(this.options.noValidation)return Se;if(Le="",this.options.version==="1.0"){if(Le=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Le))throw new Error("Invalid character in string: "+Se+" at index "+ve.index)}else if(this.options.version==="1.1"&&(Le=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Le)))throw new Error("Invalid character in string: "+Se+" at index "+ve.index);return Se},Ce.prototype.assertLegalName=function(Se){var Le;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Le=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!Se.match(Le))throw new Error("Invalid character in name");return Se},Ce.prototype.textEscape=function(Se){var Le;return this.options.noValidation?Se:(Le=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Le,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},Ce.prototype.attEscape=function(Se){var Le;return this.options.noValidation?Se:(Le=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Le,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},Ce}()}).call(this)},{}],457:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Le,ve){for(var we in ve)Se.call(ve,we)&&(Le[we]=ve[we]);function de(){this.constructor=Le}return de.prototype=ve.prototype,Le.prototype=new de,Le.__super__=ve.prototype,Le},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Le){Ce(ve,Le);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=fe.Text,this.value=this.stringify.text(de)}return Object.defineProperty(ve.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ve.prototype,"wholeText",{get:function(){var we,de,z;for(z="",de=this.previousSibling;de;)z=de.data+z,de=de.previousSibling;for(z+=this.data,we=this.nextSibling;we;)z=z+we.data,we=we.nextSibling;return z}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.text(this,this.options.writer.filterOptions(we))},ve.prototype.splitText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je={}.hasOwnProperty;Pe=oe("./Utility").assign,fe=oe("./NodeType"),de=oe("./XMLDeclaration"),z=oe("./XMLDocType"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),ae=oe("./XMLElement"),le=oe("./XMLRaw"),ue=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),ee=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Le=oe("./XMLDTDElement"),ve=oe("./XMLDTDEntity"),we=oe("./XMLDTDNotation"),me=oe("./WriterState"),ze.exports=ge=function(){function Be(Fe){var Ne,Ae,Re;Fe||(Fe={}),this.options=Fe,Ae=Fe.writer||{};for(Ne in Ae)je.call(Ae,Ne)&&(Re=Ae[Ne],this["_"+Ne]=this[Ne],this[Ne]=Re)}return Be.prototype.filterOptions=function(Fe){var Ne,Ae,Re,We,Ye,Ue,Ve,ot;return Fe||(Fe={}),Fe=Pe({},this.options,Fe),Ne={writer:this},Ne.pretty=Fe.pretty||!1,Ne.allowEmpty=Fe.allowEmpty||!1,Ne.indent=(Ae=Fe.indent)!=null?Ae:" ",Ne.newline=(Re=Fe.newline)!=null?Re:`
`,Ne.offset=(We=Fe.offset)!=null?We:0,Ne.dontPrettyTextNodes=(Ye=(Ue=Fe.dontPrettyTextNodes)!=null?Ue:Fe.dontprettytextnodes)!=null?Ye:0,Ne.spaceBeforeSlash=(Ve=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Ve:"",Ne.spaceBeforeSlash===!0&&(Ne.spaceBeforeSlash=" "),Ne.suppressPrettyCount=0,Ne.user={},Ne.state=me.None,Ne},Be.prototype.indent=function(Fe,Ne,Ae){var Re;return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.pretty&&(Re=(Ae||0)+Ne.offset+1,Re>0)?new Array(Re).join(Ne.indent):""},Be.prototype.endline=function(Fe,Ne,Ae){return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.newline},Be.prototype.attribute=function(Fe,Ne,Ae){var Re;return this.openAttribute(Fe,Ne,Ae),Re=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Ne,Ae),Re},Be.prototype.cdata=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<![CDATA[",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+="]]>"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.comment=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!-- ",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=" -->"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.declaration=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?xml",Ne.state=me.InsideTag,Re+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Re+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Re+=' standalone="'+Fe.standalone+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.docType=function(Fe,Ne,Ae){var Re,We,Ye,Ue,Ve;if(Ae||(Ae=0),this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ue=this.indent(Fe,Ne,Ae),Ue+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ue+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ue+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ue+=" [",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,Ve=Fe.children,We=0,Ye=Ve.length;We<Ye;We++)Re=Ve[We],Ue+=this.writeChildNode(Re,Ne,Ae+1);Ne.state=me.CloseTag,Ue+="]"}return Ne.state=me.CloseTag,Ue+=Ne.spaceBeforeSlash+">",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ue},Be.prototype.element=function(Fe,Ne,Ae){var Re,We,Ye,Ue,Ve,ot,st,ct,Pt,$e,nt,yt,xt,wt;Ae||(Ae=0),$e=!1,nt="",this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,nt+=this.indent(Fe,Ne,Ae)+"<"+Fe.name,yt=Fe.attribs;for(Pt in yt)je.call(yt,Pt)&&(Re=yt[Pt],nt+=this.attribute(Re,Ne,Ae));if(Ye=Fe.children.length,Ue=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(dt){return(dt.type===fe.Text||dt.type===fe.Raw)&&dt.value===""}))Ne.allowEmpty?(nt+=">",Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae)):(Ne.state=me.CloseTag,nt+=Ne.spaceBeforeSlash+"/>"+this.endline(Fe,Ne,Ae));else if(Ne.pretty&&Ye===1&&(Ue.type===fe.Text||Ue.type===fe.Raw)&&Ue.value!=null)nt+=">",Ne.state=me.InsideTag,Ne.suppressPrettyCount++,$e=!0,nt+=this.writeChildNode(Ue,Ne,Ae+1),Ne.suppressPrettyCount--,$e=!1,Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae);else{if(Ne.dontPrettyTextNodes){for(xt=Fe.children,Ve=0,st=xt.length;Ve<st;Ve++)if(We=xt[Ve],(We.type===fe.Text||We.type===fe.Raw)&&We.value!=null){Ne.suppressPrettyCount++,$e=!0;break}}for(nt+=">"+this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,wt=Fe.children,ot=0,ct=wt.length;ot<ct;ot++)We=wt[ot],nt+=this.writeChildNode(We,Ne,Ae+1);Ne.state=me.CloseTag,nt+=this.indent(Fe,Ne,Ae)+"</"+Fe.name+">",$e&&Ne.suppressPrettyCount--,nt+=this.endline(Fe,Ne,Ae),Ne.state=me.None}return this.closeNode(Fe,Ne,Ae),nt},Be.prototype.writeChildNode=function(Fe,Ne,Ae){switch(Fe.type){case fe.CData:return this.cdata(Fe,Ne,Ae);case fe.Comment:return this.comment(Fe,Ne,Ae);case fe.Element:return this.element(Fe,Ne,Ae);case fe.Raw:return this.raw(Fe,Ne,Ae);case fe.Text:return this.text(Fe,Ne,Ae);case fe.ProcessingInstruction:return this.processingInstruction(Fe,Ne,Ae);case fe.Dummy:return"";case fe.Declaration:return this.declaration(Fe,Ne,Ae);case fe.DocType:return this.docType(Fe,Ne,Ae);case fe.AttributeDeclaration:return this.dtdAttList(Fe,Ne,Ae);case fe.ElementDeclaration:return this.dtdElement(Fe,Ne,Ae);case fe.EntityDeclaration:return this.dtdEntity(Fe,Ne,Ae);case fe.NotationDeclaration:return this.dtdNotation(Fe,Ne,Ae);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},Be.prototype.processingInstruction=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?",Ne.state=me.InsideTag,Re+=Fe.target,Fe.value&&(Re+=" "+Fe.value),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.raw=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.text=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdAttList=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ATTLIST",Ne.state=me.InsideTag,Re+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Re+=" "+Fe.defaultValueType),Fe.defaultValue&&(Re+=' "'+Fe.defaultValue+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdElement=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ELEMENT",Ne.state=me.InsideTag,Re+=" "+Fe.name+" "+Fe.value,Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdEntity=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ENTITY",Ne.state=me.InsideTag,Fe.pe&&(Re+=" %"),Re+=" "+Fe.name,Fe.value?Re+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Re+=" NDATA "+Fe.nData)),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdNotation=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!NOTATION",Ne.state=me.InsideTag,Re+=" "+Fe.name,Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Re+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.openNode=function(Fe,Ne,Ae){},Be.prototype.closeNode=function(Fe,Ne,Ae){},Be.prototype.openAttribute=function(Fe,Ne,Ae){},Be.prototype.closeAttribute=function(Fe,Ne,Ae){},Be}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Le,ve,we,de,z;z=oe("./Utility"),we=z.assign,de=z.isFunction,ke=oe("./XMLDOMImplementation"),Ce=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),ve=oe("./XMLStringWriter"),Le=oe("./XMLStreamWriter"),fe=oe("./NodeType"),me=oe("./WriterState"),ze.exports.create=function(ee,ae,ie,le){var ue,ge;if(ee==null)throw new Error("Root element needs a name.");return le=we({},ae,ie,le),ue=new Ce(le),ge=ue.element(ee),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),ge},ze.exports.begin=function(ee,ae,ie){var le;return de(ee)&&(le=[ee,ae],ae=le[0],ie=le[1],ee={}),ae?new Se(ee,ae,ie):new Ce(ee)},ze.exports.stringWriter=function(ee){return new ve(ee)},ze.exports.streamWriter=function(ee,ae){return new Le(ee,ae)},ze.exports.implementation=new ke,ze.exports.nodeType=fe,ze.exports.writerState=me}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,ze,De){ze.exports=me;var fe=Object.prototype.hasOwnProperty;function me(){for(var ke={},Ce=0;Ce<arguments.length;Ce++){var Se=arguments[Ce];for(var Le in Se)fe.call(Se,Le)&&(ke[Le]=Se[Le])}return ke}},{}],461:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.slice.js");var fe=oe("buffer").Buffer,me=oe("./sha"),ke=oe("./md5"),Ce={sha1:me,md5:ke},Se=64,Le=fe.alloc(Se);Le.fill(0);function ve(z,ee,ae){fe.isBuffer(ee)||(ee=fe.from(ee)),fe.isBuffer(ae)||(ae=fe.from(ae)),ee.length>Se?ee=z(ee):ee.length<Se&&(ee=fe.concat([ee,Le],Se));for(var ie=fe.alloc(Se),le=fe.alloc(Se),ue=0;ue<Se;ue++)ie[ue]=ee[ue]^54,le[ue]=ee[ue]^92;var ge=z(fe.concat([ie,ae]));return z(fe.concat([le,ge]))}function we(z,ee){z=z||"sha1";var ae=Ce[z],ie=[],le=0;return ae||de("algorithm:",z,"is not yet supported"),{update:function(ge){return fe.isBuffer(ge)||(ge=fe.from(ge)),ie.push(ge),le+=ge.length,this},digest:function(ge){var Pe=fe.concat(ie),je=ee?ve(ae,ee,Pe):ae(Pe);return ie=null,ge?je.toString(ge):je}}}function de(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}De.createHash=function(z){return we(z)},De.createHmac=function(z,ee){return we(z,ee)},De.createCredentials=function(){de("sorry,createCredentials is not implemented yet")},De.createCipher=function(){de("sorry,createCipher is not implemented yet")},De.createCipheriv=function(){de("sorry,createCipheriv is not implemented yet")},De.createDecipher=function(){de("sorry,createDecipher is not implemented yet")},De.createDecipheriv=function(){de("sorry,createDecipheriv is not implemented yet")},De.createSign=function(){de("sorry,createSign is not implemented yet")},De.createVerify=function(){de("sorry,createVerify is not implemented yet")},De.createDiffieHellman=function(){de("sorry,createDiffieHellman is not implemented yet")},De.pbkdf2=function(){de("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js");var fe=oe("buffer").Buffer,me=4,ke=fe.alloc(me);ke.fill(0);var Ce=8;function Se(we,de){if(we.length%me!==0){var z=we.length+(me-we.length%me);we=fe.concat([we,ke],z)}for(var ee=[],ae=de?we.readInt32BE:we.readInt32LE,ie=0;ie<we.length;ie+=me)ee.push(ae.call(we,ie));return ee}function Le(we,de,z){for(var ee=fe.alloc(de),ae=z?ee.writeInt32BE:ee.writeInt32LE,ie=0;ie<we.length;ie++)ae.call(ee,we[ie],ie*4,!0);return ee}function ve(we,de,z,ee){fe.isBuffer(we)||(we=fe.from(we));var ae=de(Se(we,ee),we.length*Ce);return Le(ae,z,ee)}ze.exports={hash:ve}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,ze,De){"use strict";var fe=oe("./helpers");function me(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function ke(ee,ae){ee[ae>>5]|=128<<ae%32,ee[(ae+64>>>9<<4)+14]=ae;for(var ie=1732584193,le=-271733879,ue=-1732584194,ge=271733878,Pe=0;Pe<ee.length;Pe+=16){var je=ie,Be=le,Fe=ue,Ne=ge;ie=Se(ie,le,ue,ge,ee[Pe+0],7,-680876936),ge=Se(ge,ie,le,ue,ee[Pe+1],12,-389564586),ue=Se(ue,ge,ie,le,ee[Pe+2],17,606105819),le=Se(le,ue,ge,ie,ee[Pe+3],22,-1044525330),ie=Se(ie,le,ue,ge,ee[Pe+4],7,-176418897),ge=Se(ge,ie,le,ue,ee[Pe+5],12,1200080426),ue=Se(ue,ge,ie,le,ee[Pe+6],17,-1473231341),le=Se(le,ue,ge,ie,ee[Pe+7],22,-45705983),ie=Se(ie,le,ue,ge,ee[Pe+8],7,1770035416),ge=Se(ge,ie,le,ue,ee[Pe+9],12,-1958414417),ue=Se(ue,ge,ie,le,ee[Pe+10],17,-42063),le=Se(le,ue,ge,ie,ee[Pe+11],22,-1990404162),ie=Se(ie,le,ue,ge,ee[Pe+12],7,1804603682),ge=Se(ge,ie,le,ue,ee[Pe+13],12,-40341101),ue=Se(ue,ge,ie,le,ee[Pe+14],17,-1502002290),le=Se(le,ue,ge,ie,ee[Pe+15],22,1236535329),ie=Le(ie,le,ue,ge,ee[Pe+1],5,-165796510),ge=Le(ge,ie,le,ue,ee[Pe+6],9,-1069501632),ue=Le(ue,ge,ie,le,ee[Pe+11],14,643717713),le=Le(le,ue,ge,ie,ee[Pe+0],20,-373897302),ie=Le(ie,le,ue,ge,ee[Pe+5],5,-701558691),ge=Le(ge,ie,le,ue,ee[Pe+10],9,38016083),ue=Le(ue,ge,ie,le,ee[Pe+15],14,-660478335),le=Le(le,ue,ge,ie,ee[Pe+4],20,-405537848),ie=Le(ie,le,ue,ge,ee[Pe+9],5,568446438),ge=Le(ge,ie,le,ue,ee[Pe+14],9,-1019803690),ue=Le(ue,ge,ie,le,ee[Pe+3],14,-187363961),le=Le(le,ue,ge,ie,ee[Pe+8],20,1163531501),ie=Le(ie,le,ue,ge,ee[Pe+13],5,-1444681467),ge=Le(ge,ie,le,ue,ee[Pe+2],9,-51403784),ue=Le(ue,ge,ie,le,ee[Pe+7],14,1735328473),le=Le(le,ue,ge,ie,ee[Pe+12],20,-1926607734),ie=ve(ie,le,ue,ge,ee[Pe+5],4,-378558),ge=ve(ge,ie,le,ue,ee[Pe+8],11,-2022574463),ue=ve(ue,ge,ie,le,ee[Pe+11],16,1839030562),le=ve(le,ue,ge,ie,ee[Pe+14],23,-35309556),ie=ve(ie,le,ue,ge,ee[Pe+1],4,-1530992060),ge=ve(ge,ie,le,ue,ee[Pe+4],11,1272893353),ue=ve(ue,ge,ie,le,ee[Pe+7],16,-155497632),le=ve(le,ue,ge,ie,ee[Pe+10],23,-1094730640),ie=ve(ie,le,ue,ge,ee[Pe+13],4,681279174),ge=ve(ge,ie,le,ue,ee[Pe+0],11,-358537222),ue=ve(ue,ge,ie,le,ee[Pe+3],16,-722521979),le=ve(le,ue,ge,ie,ee[Pe+6],23,76029189),ie=ve(ie,le,ue,ge,ee[Pe+9],4,-640364487),ge=ve(ge,ie,le,ue,ee[Pe+12],11,-421815835),ue=ve(ue,ge,ie,le,ee[Pe+15],16,530742520),le=ve(le,ue,ge,ie,ee[Pe+2],23,-995338651),ie=we(ie,le,ue,ge,ee[Pe+0],6,-198630844),ge=we(ge,ie,le,ue,ee[Pe+7],10,1126891415),ue=we(ue,ge,ie,le,ee[Pe+14],15,-1416354905),le=we(le,ue,ge,ie,ee[Pe+5],21,-57434055),ie=we(ie,le,ue,ge,ee[Pe+12],6,1700485571),ge=we(ge,ie,le,ue,ee[Pe+3],10,-1894986606),ue=we(ue,ge,ie,le,ee[Pe+10],15,-1051523),le=we(le,ue,ge,ie,ee[Pe+1],21,-2054922799),ie=we(ie,le,ue,ge,ee[Pe+8],6,1873313359),ge=we(ge,ie,le,ue,ee[Pe+15],10,-30611744),ue=we(ue,ge,ie,le,ee[Pe+6],15,-1560198380),le=we(le,ue,ge,ie,ee[Pe+13],21,1309151649),ie=we(ie,le,ue,ge,ee[Pe+4],6,-145523070),ge=we(ge,ie,le,ue,ee[Pe+11],10,-1120210379),ue=we(ue,ge,ie,le,ee[Pe+2],15,718787259),le=we(le,ue,ge,ie,ee[Pe+9],21,-343485551),ie=de(ie,je),le=de(le,Be),ue=de(ue,Fe),ge=de(ge,Ne)}return Array(ie,le,ue,ge)}function Ce(ee,ae,ie,le,ue,ge){return de(z(de(de(ae,ee),de(le,ge)),ue),ie)}function Se(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&ie|~ae&le,ee,ae,ue,ge,Pe)}function Le(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&le|ie&~le,ee,ae,ue,ge,Pe)}function ve(ee,ae,ie,le,ue,ge,Pe){return Ce(ae^ie^le,ee,ae,ue,ge,Pe)}function we(ee,ae,ie,le,ue,ge,Pe){return Ce(ie^(ae|~le),ee,ae,ue,ge,Pe)}function de(ee,ae){var ie=(ee&65535)+(ae&65535),le=(ee>>16)+(ae>>16)+(ie>>16);return le<<16|ie&65535}function z(ee,ae){return ee<<ae|ee>>>32-ae}ze.exports=function(ae){return fe.hash(ae,ke,16)}},{"./helpers":462}],464:[function(oe,ze,De){"use strict";var fe=oe("./helpers");function me(ve,we){ve[we>>5]|=128<<24-we%32,ve[(we+64>>9<<4)+15]=we;for(var de=Array(80),z=1732584193,ee=-271733879,ae=-1732584194,ie=271733878,le=-1009589776,ue=0;ue<ve.length;ue+=16){for(var ge=z,Pe=ee,je=ae,Be=ie,Fe=le,Ne=0;Ne<80;Ne++){Ne<16?de[Ne]=ve[ue+Ne]:de[Ne]=Le(de[Ne-3]^de[Ne-8]^de[Ne-14]^de[Ne-16],1);var Ae=Se(Se(Le(z,5),ke(Ne,ee,ae,ie)),Se(Se(le,de[Ne]),Ce(Ne)));le=ie,ie=ae,ae=Le(ee,30),ee=z,z=Ae}z=Se(z,ge),ee=Se(ee,Pe),ae=Se(ae,je),ie=Se(ie,Be),le=Se(le,Fe)}return Array(z,ee,ae,ie,le)}function ke(ve,we,de,z){return ve<20?we&de|~we&z:ve<40?we^de^z:ve<60?we&de|we&z|de&z:we^de^z}function Ce(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function Se(ve,we){var de=(ve&65535)+(we&65535),z=(ve>>16)+(we>>16)+(de>>16);return z<<16|de&65535}function Le(ve,we){return ve<<we|ve>>>32-we}ze.exports=function(we){return fe.hash(we,me,20,!0)}},{"./helpers":462}],465:[function(oe,ze,De){"use strict";ze.exports=function(){return function(){}}},{}],466:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/helpers/typeof")),Ce=oe("stream"),Se=Ce.Stream,Le=oe("../lib/common/utils/isArray"),ve=Le.isArray;ze.exports.string=function(z){return typeof z=="string"},ze.exports.array=ve,ze.exports.buffer=fe.isBuffer;function we(de){return de instanceof Se}ze.exports.writableStream=function(z){return we(z)&&typeof z._write=="function"&&(0,ke.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:oe("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(oe,ze,De){"use strict";var fe=oe("immediate"),me=ze.exports={};me.nextTick=fe,me.title="browser",me.browser=!0,me.env={},me.argv=[],me.version="",me.versions={};function ke(){}me.on=ke,me.addListener=ke,me.once=ke,me.off=ke,me.removeListener=ke,me.removeAllListeners=ke,me.emit=ke,me.prependListener=ke,me.prependOnceListener=ke,me.listeners=function(Ce){return[]},me.binding=function(Ce){throw new Error("process.binding is not supported")},me.cwd=function(){return"/"},me.chdir=function(Ce){throw new Error("process.chdir is not supported")},me.umask=function(){return 0}},{immediate:358}],468:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js");var me=oe("./lib/request"),ke=oe("./lib/response"),Ce=oe("xtend"),Se=oe("builtin-status-codes"),Le=oe("url"),ve=De;ve.request=function(we,de){typeof we=="string"?we=Le.parse(we):we=Ce(we);var z=fe.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=we.protocol||z,ae=we.hostname||we.host,ie=we.port,le=we.path||"/";ae&&ae.indexOf(":")!==-1&&(ae="["+ae+"]"),we.url=(ae?ee+"//"+ae:"")+(ie?":"+ie:"")+le,we.method=(we.method||"GET").toUpperCase(),we.headers=we.headers||{};var ue=new me(we);return de&&ue.on("response",de),ue},ve.get=function(de,z){var ee=ve.request(de,z);return ee.end(),ee},ve.ClientRequest=me,ve.IncomingMessage=ke.IncomingMessage,ve.Agent=function(){},ve.Agent.defaultMaxSockets=4,ve.globalAgent=new ve.Agent,ve.STATUS_CODES=Se,ve.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array-buffer.constructor.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.array.slice.js"),De.fetch=ve(fe.fetch)&&ve(fe.ReadableStream),De.writableStream=ve(fe.WritableStream),De.abortController=ve(fe.AbortController),De.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),De.blobConstructor=!0}catch(we){}var me;function ke(){if(me!==void 0)return me;if(fe.XMLHttpRequest){me=new fe.XMLHttpRequest;try{me.open("GET",fe.XDomainRequest?"/":"https://example.com")}catch(we){me=null}}else me=null;return me}function Ce(we){var de=ke();if(!de)return!1;try{return de.responseType=we,de.responseType===we}catch(z){}return!1}var Se=typeof fe.ArrayBuffer!="undefined",Le=Se&&ve(fe.ArrayBuffer.prototype.slice);De.arraybuffer=De.fetch||Se&&Ce("arraybuffer"),De.msstream=!De.fetch&&Le&&Ce("ms-stream"),De.mozchunkedarraybuffer=!De.fetch&&Se&&Ce("moz-chunked-arraybuffer"),De.overrideMimeType=De.fetch||(ke()?ve(ke().overrideMimeType):!1),De.vbArray=ve(fe.VBArray);function ve(we){return typeof we=="function"}me=null}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(oe,ze,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js");var Ce=oe("./capability"),Se=oe("inherits"),Le=oe("./response"),ve=oe("readable-stream"),we=oe("to-arraybuffer"),de=Le.IncomingMessage,z=Le.readyStates;function ee(ue,ge){return Ce.fetch&&ge?"fetch":Ce.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ce.msstream?"ms-stream":Ce.arraybuffer&&ue?"arraybuffer":Ce.vbArray&&ue?"text:vbarray":"text"}var ae=ze.exports=function(ue){var ge=this;ve.Writable.call(ge),ge._opts=ue,ge._body=[],ge._headers={},ue.auth&&ge.setHeader("Authorization","Basic "+new ke(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(Be){ge.setHeader(Be,ue.headers[Be])});var Pe,je=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!Ce.abortController)je=!1,Pe=!0;else if(ue.mode==="prefer-streaming")Pe=!1;else if(ue.mode==="allow-wrong-content-type")Pe=!Ce.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")Pe=!0;else throw new Error("Invalid value for opts.mode");ge._mode=ee(Pe,je),ge._fetchTimer=null,ge.on("finish",function(){ge._onFinish()})};Se(ae,ve.Writable),ae.prototype.setHeader=function(ue,ge){var Pe=this,je=ue.toLowerCase();le.indexOf(je)===-1&&(Pe._headers[je]={name:ue,value:ge})},ae.prototype.getHeader=function(ue){var ge=this._headers[ue.toLowerCase()];return ge?ge.value:null},ae.prototype.removeHeader=function(ue){var ge=this;delete ge._headers[ue.toLowerCase()]},ae.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var ge=ue._opts,Pe=ue._headers,je=null;ge.method!=="GET"&&ge.method!=="HEAD"&&(Ce.arraybuffer?je=we(ke.concat(ue._body)):Ce.blobConstructor?je=new me.Blob(ue._body.map(function(We){return we(We)}),{type:(Pe["content-type"]||{}).value||""}):je=ke.concat(ue._body).toString());var Be=[];if(Object.keys(Pe).forEach(function(We){var Ye=Pe[We].name,Ue=Pe[We].value;Array.isArray(Ue)?Ue.forEach(function(Ve){Be.push([Ye,Ve])}):Be.push([Ye,Ue])}),ue._mode==="fetch"){var Fe=null,Ne=null;if(Ce.abortController){var Ae=new AbortController;Fe=Ae.signal,ue._fetchAbortController=Ae,"requestTimeout"in ge&&ge.requestTimeout!==0&&(ue._fetchTimer=me.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},ge.requestTimeout))}me.fetch(ue._opts.url,{method:ue._opts.method,headers:Be,body:je||void 0,mode:"cors",credentials:ge.withCredentials?"include":"same-origin",signal:Fe}).then(function(We){ue._fetchResponse=We,ue._connect()},function(We){me.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",We)})}else{var Re=ue._xhr=new me.XMLHttpRequest;try{Re.open(ue._opts.method,ue._opts.url,!0)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}"responseType"in Re&&(Re.responseType=ue._mode.split(":")[0]),"withCredentials"in Re&&(Re.withCredentials=!!ge.withCredentials),ue._mode==="text"&&"overrideMimeType"in Re&&Re.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ge&&(Re.timeout=ge.requestTimeout,Re.ontimeout=function(){ue.emit("requestTimeout")}),Be.forEach(function(We){Re.setRequestHeader(We[0],We[1])}),ue._response=null,Re.onreadystatechange=function(){switch(Re.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Re.onprogress=function(){ue._onXHRProgress()}),Re.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Re.send(je)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}}}};function ie(ue){try{var ge=ue.status;return ge!==null&&ge!==0}catch(Pe){return!1}}ae.prototype._onXHRProgress=function(){var ue=this;!ie(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},ae.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new de(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(ge){ue.emit("error",ge)}),ue.emit("response",ue._response))},ae.prototype._write=function(ue,ge,Pe){var je=this;je._body.push(ue),Pe()},ae.prototype.abort=ae.prototype.destroy=function(){var ue=this;ue._destroyed=!0,me.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},ae.prototype.end=function(ue,ge,Pe){var je=this;typeof ue=="function"&&(Pe=ue,ue=void 0),ve.Writable.prototype.end.call(je,ue,ge,Pe)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(oe,ze,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("./capability"),Se=oe("inherits"),Le=oe("readable-stream"),ve=De.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},we=De.IncomingMessage=function(de,z,ee,ae){var ie=this;if(Le.Readable.call(ie),ie._mode=ee,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){fe.nextTick(function(){ie.emit("close")})}),ee==="fetch"){var le=function Fe(){ge.read().then(function(Ne){if(!ie._destroyed){if(Ne.done){me.clearTimeout(ae),ie.push(null);return}ie.push(new ke(Ne.value)),Fe()}}).catch(function(Ne){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Ne)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Ne){ie.headers[Ne.toLowerCase()]=Fe,ie.rawHeaders.push(Ne,Fe)}),Ce.writableStream){var ue=new WritableStream({write:function(Ne){return new Promise(function(Ae,Re){ie._destroyed?Re():ie.push(new ke(Ne))?Ae():ie._resumeFetch=Ae})},close:function(){me.clearTimeout(ae),ie._destroyed||ie.push(null)},abort:function(Ne){ie._destroyed||ie.emit("error",Ne)}});try{z.body.pipeTo(ue).catch(function(Fe){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var ge=z.body.getReader();le()}else{ie._xhr=de,ie._pos=0,ie.url=de.responseURL,ie.statusCode=de.status,ie.statusMessage=de.statusText;var Pe=de.getAllResponseHeaders().split(/\r?\n/);if(Pe.forEach(function(Fe){var Ne=Fe.match(/^([^:]+):\s*(.*)/);if(Ne){var Ae=Ne[1].toLowerCase();Ae==="set-cookie"?(ie.headers[Ae]===void 0&&(ie.headers[Ae]=[]),ie.headers[Ae].push(Ne[2])):ie.headers[Ae]!==void 0?ie.headers[Ae]+=", "+Ne[2]:ie.headers[Ae]=Ne[2],ie.rawHeaders.push(Ne[1],Ne[2])}}),ie._charset="x-user-defined",!Ce.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var Be=je.match(/;\s*charset=([^;])(;|$)/);Be&&(ie._charset=Be[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(we,Le.Readable),we.prototype._read=function(){var de=this,z=de._resumeFetch;z&&(de._resumeFetch=null,z())},we.prototype._onXHRProgress=function(){var de=this,z=de._xhr,ee=null;switch(de._mode){case"text:vbarray":if(z.readyState!==ve.DONE)break;try{ee=new me.VBArray(z.responseBody).toArray()}catch(ge){}if(ee!==null){de.push(new ke(ee));break}case"text":try{ee=z.responseText}catch(ge){de._mode="text:vbarray";break}if(ee.length>de._pos){var ae=ee.substr(de._pos);if(de._charset==="x-user-defined"){for(var ie=new ke(ae.length),le=0;le<ae.length;le++)ie[le]=ae.charCodeAt(le)&255;de.push(ie)}else de.push(ae,de._charset);de._pos=ee.length}break;case"arraybuffer":if(z.readyState!==ve.DONE||!z.response)break;ee=z.response,de.push(new ke(new Uint8Array(ee)));break;case"moz-chunked-arraybuffer":if(ee=z.response,z.readyState!==ve.LOADING||!ee)break;de.push(new ke(new Uint8Array(ee)));break;case"ms-stream":if(ee=z.response,z.readyState!==ve.LOADING)break;var ue=new me.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>de._pos&&(de.push(new ke(new Uint8Array(ue.result.slice(de._pos)))),de._pos=ue.result.byteLength)},ue.onload=function(){de.push(null)},ue.readAsArrayBuffer(ee);break}de._xhr.readyState===ve.DONE&&de._mode!=="ms-stream"&&de.push(null)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.splice.js");var ke=oe("punycode"),Ce=oe("./util");De.parse=Ne,De.resolve=Re,De.resolveObject=We,De.format=Ae,De.Url=Se;function Se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Le=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,we=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,de=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(de),ee=["'"].concat(z),ae=["%","/","?",";","#"].concat(ee),ie=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,ge=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},Be={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Ne(Ye,Ue,Ve){if(Ye&&Ce.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ue,Ve),ot}Se.prototype.parse=function(Ye,Ue,Ve){if(!Ce.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,me.default)(Ye));var ot=Ye.indexOf("?"),st=ot!==-1&&ot<Ye.indexOf("#")?"?":"#",ct=Ye.split(st),Pt=/\\/g;ct[0]=ct[0].replace(Pt,"/"),Ye=ct.join(st);var $e=Ye;if($e=$e.trim(),!Ve&&Ye.split("#").length===1){var nt=we.exec($e);if(nt)return this.path=$e,this.href=$e,this.pathname=nt[1],nt[2]?(this.search=nt[2],Ue?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ue&&(this.search="",this.query={}),this}var yt=Le.exec($e);if(yt){yt=yt[0];var xt=yt.toLowerCase();this.protocol=xt,$e=$e.substr(yt.length)}if(Ve||yt||$e.match(/^\/\/[^@\/]+@[^@\/]+/)){var wt=$e.substr(0,2)==="//";wt&&!(yt&&je[yt])&&($e=$e.substr(2),this.slashes=!0)}if(!je[yt]&&(wt||yt&&!Be[yt])){for(var dt=-1,ft=0;ft<ie.length;ft++){var ut=$e.indexOf(ie[ft]);ut!==-1&&(dt===-1||ut<dt)&&(dt=ut)}var Et,mt;dt===-1?mt=$e.lastIndexOf("@"):mt=$e.lastIndexOf("@",dt),mt!==-1&&(Et=$e.slice(0,mt),$e=$e.slice(mt+1),this.auth=decodeURIComponent(Et)),dt=-1;for(var ft=0;ft<ae.length;ft++){var ut=$e.indexOf(ae[ft]);ut!==-1&&(dt===-1||ut<dt)&&(dt=ut)}dt===-1&&(dt=$e.length),this.host=$e.slice(0,dt),$e=$e.slice(dt),this.parseHost(),this.hostname=this.hostname||"";var vt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!vt)for(var kt=this.hostname.split("."),ft=0,pt=kt.length;ft<pt;ft++){var Qe=kt[ft];if(Qe&&!Qe.match(ue)){for(var Ke="",xe=0,Me=Qe.length;xe<Me;xe++)Qe.charCodeAt(xe)>127?Ke+="x":Ke+=Qe[xe];if(!Ke.match(ue)){var Ze=kt.slice(0,ft),tt=kt.slice(ft+1),Ie=Qe.match(ge);Ie&&(Ze.push(Ie[1]),tt.unshift(Ie[2])),tt.length&&($e="/"+tt.join(".")+$e),this.hostname=Ze.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),vt||(this.hostname=ke.toASCII(this.hostname));var _e=this.port?":"+this.port:"",He=this.hostname||"";this.host=He+_e,this.href+=this.host,vt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),$e[0]!=="/"&&($e="/"+$e))}if(!Pe[xt])for(var ft=0,pt=ee.length;ft<pt;ft++){var rt=ee[ft];if($e.indexOf(rt)!==-1){var St=encodeURIComponent(rt);St===rt&&(St=escape(rt)),$e=$e.split(rt).join(St)}}var Ct=$e.indexOf("#");Ct!==-1&&(this.hash=$e.substr(Ct),$e=$e.slice(0,Ct));var Nt=$e.indexOf("?");if(Nt!==-1?(this.search=$e.substr(Nt),this.query=$e.substr(Nt+1),Ue&&(this.query=Fe.parse(this.query)),$e=$e.slice(0,Nt)):Ue&&(this.search="",this.query={}),$e&&(this.pathname=$e),Be[xt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Ot=this.search||"";this.path=_e+Ot}return this.href=this.format(),this};function Ae(Ye){return Ce.isString(Ye)&&(Ye=Ne(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ue=this.protocol||"",Ve=this.pathname||"",ot=this.hash||"",st=!1,ct="";this.host?st=Ye+this.host:this.hostname&&(st=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(st+=":"+this.port)),this.query&&Ce.isObject(this.query)&&Object.keys(this.query).length&&(ct=Fe.stringify(this.query));var Pt=this.search||ct&&"?"+ct||"";return Ue&&Ue.substr(-1)!==":"&&(Ue+=":"),this.slashes||(!Ue||Be[Ue])&&st!==!1?(st="//"+(st||""),Ve&&Ve.charAt(0)!=="/"&&(Ve="/"+Ve)):st||(st=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),Pt&&Pt.charAt(0)!=="?"&&(Pt="?"+Pt),Ve=Ve.replace(/[?#]/g,function($e){return encodeURIComponent($e)}),Pt=Pt.replace("#","%23"),Ue+st+Ve+Pt+ot};function Re(Ye,Ue){return Ne(Ye,!1,!0).resolve(Ue)}Se.prototype.resolve=function(Ye){return this.resolveObject(Ne(Ye,!1,!0)).format()};function We(Ye,Ue){return Ye?Ne(Ye,!1,!0).resolveObject(Ue):Ue}Se.prototype.resolveObject=function(Ye){if(Ce.isString(Ye)){var Ue=new Se;Ue.parse(Ye,!1,!0),Ye=Ue}for(var Ve=new Se,ot=Object.keys(this),st=0;st<ot.length;st++){var ct=ot[st];Ve[ct]=this[ct]}if(Ve.hash=Ye.hash,Ye.href==="")return Ve.href=Ve.format(),Ve;if(Ye.slashes&&!Ye.protocol){for(var Pt=Object.keys(Ye),$e=0;$e<Pt.length;$e++){var nt=Pt[$e];nt!=="protocol"&&(Ve[nt]=Ye[nt])}return Be[Ve.protocol]&&Ve.hostname&&!Ve.pathname&&(Ve.path=Ve.pathname="/"),Ve.href=Ve.format(),Ve}if(Ye.protocol&&Ye.protocol!==Ve.protocol){if(!Be[Ye.protocol]){for(var yt=Object.keys(Ye),xt=0;xt<yt.length;xt++){var wt=yt[xt];Ve[wt]=Ye[wt]}return Ve.href=Ve.format(),Ve}if(Ve.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var pt=(Ye.pathname||"").split("/");pt.length&&!(Ye.host=pt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),pt[0]!==""&&pt.unshift(""),pt.length<2&&pt.unshift(""),Ve.pathname=pt.join("/")}else Ve.pathname=Ye.pathname;if(Ve.search=Ye.search,Ve.query=Ye.query,Ve.host=Ye.host||"",Ve.auth=Ye.auth,Ve.hostname=Ye.hostname||Ye.host,Ve.port=Ye.port,Ve.pathname||Ve.search){var dt=Ve.pathname||"",ft=Ve.search||"";Ve.path=dt+ft}return Ve.slashes=Ve.slashes||Ye.slashes,Ve.href=Ve.format(),Ve}var ut=Ve.pathname&&Ve.pathname.charAt(0)==="/",Et=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",mt=Et||ut||Ve.host&&Ye.pathname,vt=mt,kt=Ve.pathname&&Ve.pathname.split("/")||[],pt=Ye.pathname&&Ye.pathname.split("/")||[],Qe=Ve.protocol&&!Be[Ve.protocol];if(Qe&&(Ve.hostname="",Ve.port=null,Ve.host&&(kt[0]===""?kt[0]=Ve.host:kt.unshift(Ve.host)),Ve.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(pt[0]===""?pt[0]=Ye.host:pt.unshift(Ye.host)),Ye.host=null),mt=mt&&(pt[0]===""||kt[0]==="")),Et)Ve.host=Ye.host||Ye.host===""?Ye.host:Ve.host,Ve.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ve.hostname,Ve.search=Ye.search,Ve.query=Ye.query,kt=pt;else if(pt.length)kt||(kt=[]),kt.pop(),kt=kt.concat(pt),Ve.search=Ye.search,Ve.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(Qe){Ve.hostname=Ve.host=kt.shift();var Ke=Ve.host&&Ve.host.indexOf("@")>0?Ve.host.split("@"):!1;Ke&&(Ve.auth=Ke.shift(),Ve.host=Ve.hostname=Ke.shift())}return Ve.search=Ye.search,Ve.query=Ye.query,(!Ce.isNull(Ve.pathname)||!Ce.isNull(Ve.search))&&(Ve.path=(Ve.pathname?Ve.pathname:"")+(Ve.search?Ve.search:"")),Ve.href=Ve.format(),Ve}if(!kt.length)return Ve.pathname=null,Ve.search?Ve.path="/"+Ve.search:Ve.path=null,Ve.href=Ve.format(),Ve;for(var xe=kt.slice(-1)[0],Me=(Ve.host||Ye.host||kt.length>1)&&(xe==="."||xe==="..")||xe==="",Ze=0,tt=kt.length;tt>=0;tt--)xe=kt[tt],xe==="."?kt.splice(tt,1):xe===".."?(kt.splice(tt,1),Ze++):Ze&&(kt.splice(tt,1),Ze--);if(!mt&&!vt)for(;Ze--;Ze)kt.unshift("..");mt&&kt[0]!==""&&(!kt[0]||kt[0].charAt(0)!=="/")&&kt.unshift(""),Me&&kt.join("/").substr(-1)!=="/"&&kt.push("");var Ie=kt[0]===""||kt[0]&&kt[0].charAt(0)==="/";if(Qe){Ve.hostname=Ve.host=Ie?"":kt.length?kt.shift():"";var Ke=Ve.host&&Ve.host.indexOf("@")>0?Ve.host.split("@"):!1;Ke&&(Ve.auth=Ke.shift(),Ve.host=Ve.hostname=Ke.shift())}return mt=mt||Ve.host&&kt.length,mt&&!Ie&&kt.unshift(""),kt.length?Ve.pathname=kt.join("/"):(Ve.pathname=null,Ve.path=null),(!Ce.isNull(Ve.pathname)||!Ce.isNull(Ve.search))&&(Ve.path=(Ve.pathname?Ve.pathname:"")+(Ve.search?Ve.search:"")),Ve.auth=Ye.auth||Ve.auth,Ve.slashes=Ve.slashes||Ye.slashes,Ve.href=Ve.format(),Ve},Se.prototype.parseHost=function(){var Ye=this.host,Ue=ve.exec(Ye);Ue&&(Ue=Ue[0],Ue!==":"&&(this.port=Ue.substr(1)),Ye=Ye.substr(0,Ye.length-Ue.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));ze.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return(0,me.default)(Ce)==="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(oe,ze,De){"use strict";oe("core-js/modules/es.number.constructor.js"),De.encodeURIComponent=function(fe){try{return encodeURIComponent(fe)}catch(me){return fe}},De.escape=oe("escape-html"),De.timestamp=function(me){if(me){var ke=me;return typeof ke=="string"&&(ke=Number(ke)),String(me).length===10&&(ke*=1e3),new Date(ke)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.concat.js");var Se=oe("util"),Le=oe("url"),ve=oe("http"),we=oe("https"),de=oe("debug")("urllib"),z=oe("humanize-ms"),ee=0,ae=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,Be){return je===void 0?Be:je}function ue(je){return je?je.split(";")[0].trim().toLowerCase():""}function ge(je,Be){return function(Fe,Ne,Ae){if(Fe)return Be(Fe);je({data:Ne,status:Ae.statusCode,headers:Ae.headers,res:Ae})}}De.TIMEOUTS=[z("300s"),z("300s")];var Pe=["json","text"];De.request=function(Be,Fe,Ne){return arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),typeof Ne=="function"?De.requestWithCallback(Be,Fe,Ne):new Promise(function(Ae,Re){De.requestWithCallback(Be,Fe,ge(Ae,Re))})},De.requestWithCallback=function(Be,Fe,Ne){if(!Be||typeof Be!="string"&&(0,Ce.default)(Be)!=="object"){var Ae=Se.format("expect request url to be a string or a http request options, but got %j",Be);throw new Error(Ae)}arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),Fe=Fe||{},ee>=ae&&(ee=0);var Re=++ee;Fe.requestUrls=Fe.requestUrls||[];var We={requestId:Re,url:Be,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",We),Fe.timeout=Fe.timeout||De.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ue;typeof Be=="string"?(ie.test(Be)||(Be="https://"+Be),Ue=Le.parse(Be)):Ue=Be;var Ve=(Fe.type||Fe.method||Ue.method||"GET").toUpperCase(),ot=Ue.port||80,st=ve,ct=le(Fe.agent,De.agent),Pt=Fe.fixJSONCtlChars;Ue.protocol==="https:"&&(st=we,ct=le(Fe.httpsAgent,De.httpsAgent),Ue.port||(ot=443));var $e={host:Ue.hostname||Ue.host||"localhost",path:Ue.path||"/",method:Ve,port:ot,agent:ct,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?$e.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&($e.requestTimeout=Fe.timeout);var nt=Fe.auth||Ue.auth;nt&&($e.auth=nt);var yt=Fe.content||Fe.data,xt=Ve==="GET"||Ve==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&yt&&!(typeof yt=="string"||me.isBuffer(yt)))if(xt)yt=Fe.nestedQuerystring?qs.stringify(yt):querystring.stringify(yt);else{var wt=$e.headers["Content-Type"]||$e.headers["content-type"];wt||(Fe.contentType==="json"?wt="application/json":wt="application/x-www-form-urlencoded",$e.headers["Content-Type"]=wt),ue(wt)==="application/json"?yt=JSON.stringify(yt):yt=Fe.nestedQuerystring?qs.stringify(yt):querystring.stringify(yt)}xt&&yt&&($e.path+=(Ue.query?"&":"?")+yt,yt=null);var dt=0;if(yt){var ft=yt.length;me.isBuffer(yt)||(ft=me.byteLength(yt)),dt=$e.headers["Content-Length"]=ft}Fe.dataType==="json"&&($e.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest($e);var ut=null,Et=null,mt=null,vt=!1,kt=!1,pt=0,Qe=-1,Ke=!1,xe="",Me="",Ze=null;Fe.timing&&(Ze={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function tt(){ut&&(clearTimeout(ut),ut=null)}function Ie(){Et&&(clearTimeout(Et),Et=null)}function _e(Ht,sn,tn){if(Ie(),!Ne){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Re,fe.pid,$e.method,Be),Ht&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Re,fe.pid,Ht.name,Ht.message,Ht.stack);return}var Ut=Ne;Ne=null;var En={};tn&&(Qe=tn.statusCode,En=tn.headers);var bn=Date.now()-Ye;Ze&&(Ze.contentDownload=bn),de("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",bn,pt,Qe,$e.method,$e.host,$e.path,kt,Ze);var Dn={status:Qe,statusCode:Qe,headers:En,size:pt,aborted:Ke,rt:bn,keepAliveSocket:kt,data:sn,requestUrls:Fe.requestUrls,timing:Ze,remoteAddress:xe,remotePort:Me};if(Ht){var Qn="";ct&&typeof ct.getCurrentStatus=="function"&&(Qn=", agent status: "+JSON.stringify(ct.getCurrentStatus())),Ht.message+=", "+$e.method+" "+Be+" "+Qe+" (connected: "+vt+", keepalive socket: "+kt+Qn+`)
headers: `+JSON.stringify(En),Ht.data=sn,Ht.path=$e.path,Ht.status=Qe,Ht.headers=En,Ht.res=Dn}Ut(Ht,sn,Fe.streaming?tn:Dn),Fe.emitter&&(We.url=Be,We.socket=qt&&qt.connection,We.options=$e,We.size=dt,Fe.emitter.emit("response",{requestId:Re,error:Ht,ctx:Fe.ctx,req:We,res:Dn}))}function He(Ht){var sn=null;if(Fe.followRedirect&&statuses.redirect[Ht.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var tn=Ht.headers.location;if(!tn)sn=new Error("Got statusCode "+Ht.statusCode+" but cannot resolve next location from headers"),sn.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)sn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Be),sn.name="MaxRedirectError";else{var Ut=Fe.formatRedirectUrl?Fe.formatRedirectUrl(Be,tn):Le.resolve(Be,tn);de("Request#%d %s: `redirected` from %s to %s",Re,$e.path,Be,Ut),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(tn)&&(Fe.headers.Host=null);var En=Ne;return Ne=null,De.requestWithCallback(Ut,Fe,En),{redirect:!0,error:null}}}return{redirect:!1,error:sn}}Fe.gzip&&!$e.headers["Accept-Encoding"]&&!$e.headers["accept-encoding"]&&($e.headers["Accept-Encoding"]="gzip");function rt(Ht,sn,tn){var Ut=Ht.headers["content-encoding"];return tn(null,sn,Ut)}var St=Fe.writeStream;de("Request#%d %s %s with headers %j, options.path: %s",Re,Ve,Be,$e.headers,$e.path),Fe.requestUrls.push(Be);function Ct(Ht){if(Ze&&(Ze.waiting=Date.now()-Ye),de("Request#%d %s `req response` event emit: status %d, headers: %j",Re,Be,Ht.statusCode,Ht.headers),Fe.streaming){var sn=He(Ht);if(sn.redirect){Ht.resume();return}return sn.error?(Ht.resume(),_e(sn.error,null,Ht)):_e(null,null,Ht)}if(Ht.on("close",function(){de("Request#%d %s: `res close` event emit, total size %d",Re,Be,pt)}),Ht.on("error",function(){de("Request#%d %s: `res error` event emit, total size %d",Re,Be,pt)}),Ht.on("aborted",function(){Ke=!0,de("Request#%d %s: `res aborted` event emit, total size %d",Re,Be,pt)}),St){var tn=He(Ht);if(tn.redirect){Ht.resume();return}return tn.error?(Ht.resume(),St.end(),_e(tn.error,null,Ht)):(Fe.consumeWriteStream===!1?Ht.on("end",_e.bind(null,null,null,Ht)):St.on("close",function(){de("Request#%d %s: writeStream close event emitted",Re,Be),_e(mt||null,null,Ht)}),Ht.pipe(St))}var Ut=[];Ht.on("data",function(En){de("Request#%d %s: `res data` event emit, size %d",Re,Be,En.length),pt+=En.length,Ut.push(En)}),Ht.on("end",function(){var En=me.concat(Ut,pt);if(de("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Re,Be,pt,Ht._dumped),mt)return _e(mt,En,Ht);var bn=He(Ht);if(bn.error)return _e(bn.error,En,Ht);bn.redirect||rt(Ht,En,function(Dn,Qn,Pr){if(Dn)return _e(Dn,En,Ht);if(!Pr&&Pe.indexOf(Fe.dataType)>=0){try{Qn=decodeBodyByCharset(Qn,Ht)}catch(Mr){return de("decodeBodyByCharset error: %s",Mr),_e(null,Qn,Ht)}if(Fe.dataType==="json")if(pt===0)Qn=null;else{var Yn=parseJSON(Qn,Pt);Yn.error?Dn=Yn.error:Qn=Yn.data}}Ke&&de("Request#%d %s: Remote socket was terminated before `response.end()` was called",Re,Be),_e(Dn,Qn,Ht)})})}var Nt,Ot;Array.isArray(Fe.timeout)?(Nt=z(Fe.timeout[0]),Ot=z(Fe.timeout[1])):Nt=Ot=z(Fe.timeout),de("ConnectTimeout: %d, ResponseTimeout: %d",Nt,Ot);function Rt(){de("Connect timer ticking, timeout: %d",Nt),ut=setTimeout(function(){ut=null,Qe===-1&&(Qe=-2);var Ht="Connect timeout for "+Nt+"ms",sn="ConnectionTimeoutError";qt.socket||(sn="SocketAssignTimeoutError",Ht+=", working sockets is full"),mt=new Error(Ht),mt.name=sn,mt.requestId=Re,de("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,mt.name,Ht,vt),rn()},Nt)}function $t(){de("Response timer ticking, timeout: %d",Ot),Et=setTimeout(function(){Et=null;var Ht="Response timeout for "+Ot+"ms",sn="ResponseTimeoutError";mt=new Error(Ht),mt.name=sn,mt.requestId=Re,de("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,mt.name,Ht,vt),rn()},Ot)}var qt;$e.mode=Fe.mode?Fe.mode:"";try{qt=st.request($e,Ct)}catch(Ht){return _e(Ht)}typeof window=="undefined"?Rt():qt.on("requestTimeout",function(){Qe===-1&&(Qe=-2);var Ht="Connect timeout for "+Nt+"ms",sn="ConnectionTimeoutError";mt=new Error(Ht),mt.name=sn,mt.requestId=Re,rn()});function rn(){de("Request#%d %s abort, connected: %s",Re,Be,vt),qt.socket||(mt.noSocket=!0,_e(mt)),qt.abort()}return Ze&&qt.on("finish",function(){Ze.requestSent=Date.now()-Ye}),qt.once("socket",function(Ht){Ze&&(Ze.queuing=Date.now()-Ye);var sn=Ht.readyState;if(sn==="opening"){Ht.once("lookup",function(tn,Ut,En){de("Request#%d %s lookup: %s, %s, %s",Re,Be,tn,Ut,En),Ze&&(Ze.dnslookup=Date.now()-Ye),Ut&&(xe=Ut)}),Ht.once("connect",function(){Ze&&(Ze.connected=Date.now()-Ye),tt(),$t(),de("Request#%d %s new socket connected",Re,Be),vt=!0,xe||(xe=Ht.remoteAddress),Me=Ht.remotePort});return}de("Request#%d %s reuse socket connected, readyState: %s",Re,Be,sn),vt=!0,kt=!0,xe||(xe=Ht.remoteAddress),Me=Ht.remotePort,tt(),$t()}),qt.on("error",function(Ht){(Ht.name==="Error"||Ht.name==="TypeError")&&(Ht.name=vt?"ResponseError":"RequestError"),Ht.message+=' (req "error")',de("Request#%d %s `req error` event emit, %s: %s",Re,Be,Ht.name,Ht.message),_e(mt||Ht)}),St&&St.once("error",function(Ht){Ht.message+=' (writeStream "error")',mt=Ht,de("Request#%d %s `writeStream error` event emit, %s: %s",Re,Be,Ht.name,Ht.message),rn()}),Fe.stream?(Fe.stream.pipe(qt),Fe.stream.once("error",function(Ht){Ht.message+=' (stream "error")',mt=Ht,de("Request#%d %s `readStream error` event emit, %s: %s",Re,Be,Ht.name,Ht.message),rn()})):qt.end(yt),qt.requestId=Re,qt}}).call(this)}).call(this,oe("_process"),oe("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},99498:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){ht.defineOption("placeholder","",function(ke,Ce,Se){var Le=Se&&Se!=ht.Init;if(Ce&&!Le)ke.on("blur",De),ke.on("change",fe),ke.on("swapDoc",fe),ht.on(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose=function(){ze(ke)}),fe(ke);else if(!Ce&&Le){ke.off("blur",De),ke.off("change",fe),ke.off("swapDoc",fe),ht.off(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose),Dt(ke);var ve=ke.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ce&&!ke.hasFocus()&&De(ke)});function Dt(ke){ke.state.placeholder&&(ke.state.placeholder.parentNode.removeChild(ke.state.placeholder),ke.state.placeholder=null)}function oe(ke){Dt(ke);var Ce=ke.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=ke.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var Se=ke.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),Ce.appendChild(Se),ke.display.lineSpace.insertBefore(Ce,ke.display.lineSpace.firstChild)}function ze(ke){setTimeout(function(){var Ce=!1,Se=ke.getInputField();Se.nodeName=="TEXTAREA"?Ce=!Se.value:ke.lineCount()==1&&(Ce=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),Ce?oe(ke):Dt(ke)},20)}function De(ke){me(ke)&&oe(ke)}function fe(ke){var Ce=ke.getWrapperElement(),Se=me(ke);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?oe(ke):Dt(ke)}function me(ke){return ke.lineCount()===1&&ke.getLine(0)===""}})},25717:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){var Dt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=ht.Pos;ht.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=ht.Init&&(z.removeKeyMap(De),z.state.closeBrackets=null),ee&&(fe(ze(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(De))});function ze(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:Dt[ee]}var De={Backspace:Ce,Enter:Se};function fe(z){for(var ee=0;ee<z.length;ee++){var ae=z.charAt(ee),ie="'"+ae+"'";De[ie]||(De[ie]=me(ae))}}fe(Dt.pairs+"`");function me(z){return function(ee){return ve(ee,z)}}function ke(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var ae=z.getModeAt(z.getCursor());return ae.closeBrackets||ee}function Ce(z){var ee=ke(z);if(!ee||z.getOption("disableInput"))return ht.Pass;for(var ae=ze(ee,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ht.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return ht.Pass}for(var le=ie.length-1;le>=0;le--){var ge=ie[le].head;z.replaceRange("",oe(ge.line,ge.ch-1),oe(ge.line,ge.ch+1),"+delete")}}function Se(z){var ee=ke(z),ae=ee&&ze(ee,"explode");if(!ae||z.getOption("disableInput"))return ht.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ht.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return ht.Pass}z.operation(function(){var ge=z.lineSeparator()||`
`;z.replaceSelection(ge+ge,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var Pe=0;Pe<ie.length;Pe++){var je=ie[Pe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Le(z){var ee=ht.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new oe(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var ae=ke(z);if(!ae||z.getOption("disableInput"))return ht.Pass;var ie=ze(ae,"pairs"),le=ie.indexOf(ee);if(le==-1)return ht.Pass;for(var ue=ze(ae,"closeBefore"),ge=ze(ae,"triples"),Pe=ie.charAt(le+1)==ee,je=z.listSelections(),Be=le%2==0,Fe,Ne=0;Ne<je.length;Ne++){var Ae=je[Ne],Re=Ae.head,We,Ye=z.getRange(Re,oe(Re.line,Re.ch+1));if(Be&&!Ae.empty())We="surround";else if((Pe||!Be)&&Ye==ee)Pe&&de(z,Re)?We="both":ge.indexOf(ee)>=0&&z.getRange(Re,oe(Re.line,Re.ch+3))==ee+ee+ee?We="skipThree":We="skip";else if(Pe&&Re.ch>1&&ge.indexOf(ee)>=0&&z.getRange(oe(Re.line,Re.ch-2),Re)==ee+ee){if(Re.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Re.line,Re.ch-2))))return ht.Pass;We="addFour"}else if(Pe){var Ue=Re.ch==0?" ":z.getRange(oe(Re.line,Re.ch-1),Re);if(!ht.isWordChar(Ye)&&Ue!=ee&&!ht.isWordChar(Ue))We="both";else return ht.Pass}else if(Be&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))We="both";else return ht.Pass;if(!Fe)Fe=We;else if(Fe!=We)return ht.Pass}var Ve=le%2?ie.charAt(le-1):ee,ot=le%2?ee:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var st=0;st<3;st++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var ct=z.getSelections(),st=0;st<ct.length;st++)ct[st]=Ve+ct[st]+ot;z.replaceSelections(ct,"around"),ct=z.listSelections().slice();for(var st=0;st<ct.length;st++)ct[st]=Le(ct[st]);z.setSelections(ct)}else Fe=="both"?(z.replaceSelection(Ve+ot,null),z.triggerElectric(Ve+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ve+Ve+Ve+Ve,"before"),z.execCommand("goCharRight"))})}function we(z,ee){var ae=z.getRange(oe(ee.line,ee.ch-1),oe(ee.line,ee.ch+1));return ae.length==2?ae:null}function de(z,ee){var ae=z.getTokenAt(oe(ee.line,ee.ch+1));return/\bstring/.test(ae.type)&&ae.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(gn,cn,at){(function(ht){ht(at(89780),at(32855))})(function(ht){ht.defineOption("autoCloseTags",!1,function(Ce,Se,Le){if(Le!=ht.Init&&Le&&Ce.removeKeyMap("autoCloseTags"),!!Se){var ve={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(ve["'/'"]=function(we){return fe(we)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(ve["'>'"]=function(we){return ze(we)}),Ce.addKeyMap(ve)}});var Dt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ze(Ce){if(Ce.getOption("disableInput"))return ht.Pass;for(var Se=Ce.listSelections(),Le=[],ve=Ce.getOption("autoCloseTags"),we=0;we<Se.length;we++){if(!Se[we].empty())return ht.Pass;var de=Se[we].head,z=Ce.getTokenAt(de),ee=ht.innerMode(Ce.getMode(),z.state),ae=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=ie&&ie.name;if(!le)return ht.Pass;var ue=ee.mode.configuration=="html",ge=typeof ve=="object"&&ve.dontCloseTags||ue&&Dt,Pe=typeof ve=="object"&&ve.indentTags||ue&&oe;z.end>de.ch&&(le=le.slice(0,le.length-z.end+de.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=de.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==de.ch-z.start-1||ge&&me(ge,je)>-1||ke(Ce,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ae)||[],le,de,!0))return ht.Pass;var Be=typeof ve=="object"&&ve.emptyTags;if(Be&&me(Be,le)>-1){Le[we]={text:"/>",newPos:ht.Pos(de.line,de.ch+2)};continue}var Fe=Pe&&me(Pe,je)>-1;Le[we]={indent:Fe,text:">"+(Fe?`
`:"")+"</"+le+">",newPos:Fe?ht.Pos(de.line+1,0):ht.Pos(de.line,de.ch+1)}}for(var Ne=typeof ve=="object"&&ve.dontIndentOnAutoClose,we=Se.length-1;we>=0;we--){var Ae=Le[we];Ce.replaceRange(Ae.text,Se[we].head,Se[we].anchor,"+insert");var Re=Ce.listSelections().slice(0);Re[we]={head:Ae.newPos,anchor:Ae.newPos},Ce.setSelections(Re),!Ne&&Ae.indent&&(Ce.indentLine(Ae.newPos.line,null,!0),Ce.indentLine(Ae.newPos.line+1,null,!0))}}function De(Ce,Se){for(var Le=Ce.listSelections(),ve=[],we=Se?"/":"</",de=Ce.getOption("autoCloseTags"),z=typeof de=="object"&&de.dontIndentOnSlash,ee=0;ee<Le.length;ee++){if(!Le[ee].empty())return ht.Pass;var ae=Le[ee].head,ie=Ce.getTokenAt(ae),le=ht.innerMode(Ce.getMode(),ie.state),ue=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=ae.ch-1))return ht.Pass;var ge,Pe=le.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Pe&&le.mode.name=="javascript")ge=we+"script";else if(Pe&&le.mode.name=="css")ge=we+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!je||je.length&&ke(Ce,je,je[je.length-1],ae))return ht.Pass;ge=we+je[je.length-1]}Ce.getLine(ae.line).charAt(ie.end)!=">"&&(ge+=">"),ve[ee]=ge}if(Ce.replaceSelections(ve),Le=Ce.listSelections(),!z)for(var ee=0;ee<Le.length;ee++)(ee==Le.length-1||Le[ee].head.line<Le[ee+1].head.line)&&Ce.indentLine(Le[ee].head.line)}function fe(Ce){return Ce.getOption("disableInput")?ht.Pass:De(Ce,!0)}ht.commands.closeTag=function(Ce){return De(Ce)};function me(Ce,Se){if(Ce.indexOf)return Ce.indexOf(Se);for(var Le=0,ve=Ce.length;Le<ve;++Le)if(Ce[Le]==Se)return Le;return-1}function ke(Ce,Se,Le,ve,we){if(!ht.scanForClosingTag)return!1;var de=Math.min(Ce.lastLine()+1,ve.line+500),z=ht.scanForClosingTag(Ce,ve,null,de);if(!z||z.tag!=Le)return!1;for(var ee=we?1:0,ae=Se.length-1;ae>=0&&Se[ae]==Le;ae--)++ee;ve=z.to;for(var ae=1;ae<ee;ae++){var ie=ht.scanForClosingTag(Ce,ve,null,de);if(!ie||ie.tag!=Le)return!1;ve=ie.to}return!0}})},32855:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){"use strict";var Dt=ht.Pos;function oe(ae,ie){return ae.line-ie.line||ae.ch-ie.ch}var ze="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",De=ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+ze+"]["+De+"]*)","g");function me(ae,ie,le,ue){this.line=ie,this.ch=le,this.cm=ae,this.text=ae.getLine(ie),this.min=ue?Math.max(ue.from,ae.firstLine()):ae.firstLine(),this.max=ue?Math.min(ue.to-1,ae.lastLine()):ae.lastLine()}function ke(ae,ie){var le=ae.cm.getTokenTypeAt(Dt(ae.line,ie));return le&&/\btag\b/.test(le)}function Ce(ae){if(!(ae.line>=ae.max))return ae.ch=0,ae.text=ae.cm.getLine(++ae.line),!0}function Se(ae){if(!(ae.line<=ae.min))return ae.text=ae.cm.getLine(--ae.line),ae.ch=ae.text.length,!0}function Le(ae){for(;;){var ie=ae.text.indexOf(">",ae.ch);if(ie==-1){if(Ce(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie+1;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function ve(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf("<",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}fe.lastIndex=ie,ae.ch=ie;var le=fe.exec(ae.text);if(le&&le.index==ie)return le}}function we(ae){for(;;){fe.lastIndex=ae.ch;var ie=fe.exec(ae.text);if(!ie){if(Ce(ae))continue;return}if(!ke(ae,ie.index+1)){ae.ch=ie.index+1;continue}return ae.ch=ie.index+ie[0].length,ie}}function de(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf(">",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function z(ae,ie){for(var le=[];;){var ue=we(ae),ge,Pe=ae.line,je=ae.ch-(ue?ue[0].length:0);if(!ue||!(ge=Le(ae)))return;if(ge!="selfClose")if(ue[1]){for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==ue[2]){le.length=Be;break}if(Be<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:Dt(Pe,je),to:Dt(ae.line,ae.ch)}}else le.push(ue[2])}}function ee(ae,ie){for(var le=[];;){var ue=de(ae);if(!ue)return;if(ue=="selfClose"){ve(ae);continue}var ge=ae.line,Pe=ae.ch,je=ve(ae);if(!je)return;if(je[1])le.push(je[2]);else{for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==je[2]){le.length=Be;break}if(Be<0&&(!ie||ie==je[2]))return{tag:je[2],from:Dt(ae.line,ae.ch),to:Dt(ge,Pe)}}}}ht.registerHelper("fold","xml",function(ae,ie){for(var le=new me(ae,ie.line,0);;){var ue=we(le);if(!ue||le.line!=ie.line)return;var ge=Le(le);if(!ge)return;if(!ue[1]&&ge!="selfClose"){var Pe=Dt(le.line,le.ch),je=z(le,ue[2]);return je&&oe(je.from,Pe)>0?{from:Pe,to:je.from}:null}}}),ht.findMatchingTag=function(ae,ie,le){var ue=new me(ae,ie.line,ie.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var ge=Le(ue),Pe=ge&&Dt(ue.line,ue.ch),je=ge&&ve(ue);if(!(!ge||!je||oe(ue,ie)>0)){var Be={from:Dt(ue.line,ue.ch),to:Pe,tag:je[2]};return ge=="selfClose"?{open:Be,close:null,at:"open"}:je[1]?{open:ee(ue,je[2]),close:Be,at:"close"}:(ue=new me(ae,Pe.line,Pe.ch,le),{open:Be,close:z(ue,je[2]),at:"open"})}}},ht.findEnclosingTag=function(ae,ie,le,ue){for(var ge=new me(ae,ie.line,ie.ch,le);;){var Pe=ee(ge,ue);if(!Pe)break;var je=new me(ae,ie.line,ie.ch,le),Be=z(je,Pe.tag);if(Be)return{open:Pe,close:Be}}},ht.scanForClosingTag=function(ae,ie,le,ue){var ge=new me(ae,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(ge,le)}})},89780:function(gn){(function(cn,at){gn.exports=at()})(this,function(){"use strict";var cn=navigator.userAgent,at=navigator.platform,ht=/gecko\/\d/i.test(cn),Dt=/MSIE \d/.test(cn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn),ze=/Edge\/(\d+)/.exec(cn),De=Dt||oe||ze,fe=De&&(Dt?document.documentMode||6:+(ze||oe)[1]),me=!ze&&/WebKit\//.test(cn),ke=me&&/Qt\/\d+\.\d+/.test(cn),Ce=!ze&&/Chrome\//.test(cn),Se=/Opera\//.test(cn),Le=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(cn),we=/PhantomJS/.test(cn),de=!ze&&/AppleWebKit/.test(cn)&&/Mobile\/\w+/.test(cn),z=/Android/.test(cn),ee=de||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(cn),ae=de||/Mac/.test(at),ie=/\bCrOS\b/.test(cn),le=/win/i.test(at),ue=Se&&cn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Se=!1,me=!0);var ge=ae&&(ke||Se&&(ue==null||ue<12.11)),Pe=ht||De&&fe>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Be=function(re,ce){var Ee=re.className,be=je(ce).exec(Ee);if(be){var Oe=Ee.slice(be.index+be[0].length);re.className=Ee.slice(0,be.index)+(Oe?be[1]+Oe:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function Ne(re,ce){return Fe(re).appendChild(ce)}function Ae(re,ce,Ee,be){var Oe=document.createElement(re);if(Ee&&(Oe.className=Ee),be&&(Oe.style.cssText=be),typeof ce=="string")Oe.appendChild(document.createTextNode(ce));else if(ce)for(var qe=0;qe<ce.length;++qe)Oe.appendChild(ce[qe]);return Oe}function Re(re,ce,Ee,be){var Oe=Ae(re,ce,Ee,be);return Oe.setAttribute("role","presentation"),Oe}var We;document.createRange?We=function(re,ce,Ee,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ee),Oe.setStart(re,ce),Oe}:We=function(re,ce,Ee){var be=document.body.createTextRange();try{be.moveToElementText(re.parentNode)}catch(Oe){return be}return be.collapse(!0),be.moveEnd("character",Ee),be.moveStart("character",ce),be};function Ye(re,ce){if(ce.nodeType==3&&(ce=ce.parentNode),re.contains)return re.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==re)return!0;while(ce=ce.parentNode)}function Ue(){var re;try{re=document.activeElement}catch(ce){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ve(re,ce){var Ee=re.className;je(ce).test(Ee)||(re.className+=(Ee?" ":"")+ce)}function ot(re,ce){for(var Ee=re.split(" "),be=0;be<Ee.length;be++)Ee[be]&&!je(Ee[be]).test(ce)&&(ce+=" "+Ee[be]);return ce}var st=function(re){re.select()};de?st=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:De&&(st=function(re){try{re.select()}catch(ce){}});function ct(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function Pt(re,ce,Ee){ce||(ce={});for(var be in re)re.hasOwnProperty(be)&&(Ee!==!1||!ce.hasOwnProperty(be))&&(ce[be]=re[be]);return ce}function $e(re,ce,Ee,be,Oe){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var qe=be||0,gt=Oe||0;;){var Lt=re.indexOf(" ",qe);if(Lt<0||Lt>=ce)return gt+(ce-qe);gt+=Lt-qe,gt+=Ee-gt%Ee,qe=Lt+1}}var nt=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(this.onTimeout,this)};nt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},nt.prototype.set=function(re,ce){this.f=ce;var Ee=+new Date+re;(!this.id||Ee<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ee)};function yt(re,ce){for(var Ee=0;Ee<re.length;++Ee)if(re[Ee]==ce)return Ee;return-1}var xt=50,wt={toString:function(){return"CodeMirror.Pass"}},dt={scroll:!1},ft={origin:"*mouse"},ut={origin:"+move"};function Et(re,ce,Ee){for(var be=0,Oe=0;;){var qe=re.indexOf(" ",be);qe==-1&&(qe=re.length);var gt=qe-be;if(qe==re.length||Oe+gt>=ce)return be+Math.min(gt,ce-Oe);if(Oe+=qe-be,Oe+=Ee-Oe%Ee,be=qe+1,Oe>=ce)return be}}var mt=[""];function vt(re){for(;mt.length<=re;)mt.push(kt(mt)+" ");return mt[re]}function kt(re){return re[re.length-1]}function pt(re,ce){for(var Ee=[],be=0;be<re.length;be++)Ee[be]=ce(re[be],be);return Ee}function Qe(re,ce,Ee){for(var be=0,Oe=Ee(ce);be<re.length&&Ee(re[be])<=Oe;)be++;re.splice(be,0,ce)}function Ke(){}function xe(re,ce){var Ee;return Object.create?Ee=Object.create(re):(Ke.prototype=re,Ee=new Ke),ce&&Pt(ce,Ee),Ee}var Me=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ze(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Me.test(re))}function tt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Ze(re)?!0:ce.test(re):Ze(re)}function Ie(re){for(var ce in re)if(re.hasOwnProperty(ce)&&re[ce])return!1;return!0}var _e=/[\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 He(re){return re.charCodeAt(0)>=768&&_e.test(re)}function rt(re,ce,Ee){for(;(Ee<0?ce>0:ce<re.length)&&He(re.charAt(ce));)ce+=Ee;return ce}function St(re,ce,Ee){for(var be=ce>Ee?-1:1;;){if(ce==Ee)return ce;var Oe=(ce+Ee)/2,qe=be<0?Math.ceil(Oe):Math.floor(Oe);if(qe==ce)return re(qe)?ce:Ee;re(qe)?Ee=qe:ce=qe+be}}function Ct(re,ce,Ee,be){if(!re)return be(ce,Ee,"ltr",0);for(var Oe=!1,qe=0;qe<re.length;++qe){var gt=re[qe];(gt.from<Ee&&gt.to>ce||ce==Ee&&gt.to==ce)&&(be(Math.max(gt.from,ce),Math.min(gt.to,Ee),gt.level==1?"rtl":"ltr",qe),Oe=!0)}Oe||be(ce,Ee,"ltr")}var Nt=null;function Ot(re,ce,Ee){var be;Nt=null;for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.from<ce&&qe.to>ce)return Oe;qe.to==ce&&(qe.from!=qe.to&&Ee=="before"?be=Oe:Nt=Oe),qe.from==ce&&(qe.from!=qe.to&&Ee!="before"?be=Oe:Nt=Oe)}return be!=null?be:Nt}var Rt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ee(It){return It<=247?re.charAt(It):1424<=It&&It<=1524?"R":1536<=It&&It<=1785?ce.charAt(It-1536):1774<=It&&It<=2220?"r":8192<=It&&It<=8203?"w":It==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,qe=/[LRr]/,gt=/[Lb1n]/,Lt=/[1n]/;function Tt(It,nn,zt){this.level=It,this.from=nn,this.to=zt}return function(It,nn){var zt=nn=="ltr"?"L":"R";if(It.length==0||nn=="ltr"&&!be.test(It))return!1;for(var xn=It.length,fn=[],rr=0;rr<xn;++rr)fn.push(Ee(It.charCodeAt(rr)));for(var or=0,pr=zt;or<xn;++or){var Nr=fn[or];Nr=="m"?fn[or]=pr:pr=Nr}for(var Yr=0,Gr=zt;Yr<xn;++Yr){var ii=fn[Yr];ii=="1"&&Gr=="r"?fn[Yr]="n":qe.test(ii)&&(Gr=ii,ii=="r"&&(fn[Yr]="R"))}for(var ji=1,Rr=fn[0];ji<xn-1;++ji){var eo=fn[ji];eo=="+"&&Rr=="1"&&fn[ji+1]=="1"?fn[ji]="1":eo==","&&Rr==fn[ji+1]&&(Rr=="1"||Rr=="n")&&(fn[ji]=Rr),Rr=eo}for(var Yo=0;Yo<xn;++Yo){var Ia=fn[Yo];if(Ia==",")fn[Yo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Yo+1;ia<xn&&fn[ia]=="%";++ia);for(var Rs=Yo&&fn[Yo-1]=="!"||ia<xn&&fn[ia]=="1"?"1":"N",ms=Yo;ms<ia;++ms)fn[ms]=Rs;Yo=ia-1}}for(var Ma=0,Xs=zt;Ma<xn;++Ma){var as=fn[Ma];Xs=="L"&&as=="1"?fn[Ma]="L":qe.test(as)&&(Xs=as)}for(var La=0;La<xn;++La)if(Oe.test(fn[La])){var mo=void 0;for(mo=La+1;mo<xn&&Oe.test(fn[mo]);++mo);for(var ua=(La?fn[La-1]:zt)=="L",Xa=(mo<xn?fn[mo]:zt)=="L",ss=ua==Xa?ua?"L":"R":zt,Bl=La;Bl<mo;++Bl)fn[Bl]=ss;La=mo-1}for(var oa=[],bl,pa=0;pa<xn;)if(gt.test(fn[pa])){var Af=pa;for(++pa;pa<xn&&gt.test(fn[pa]);++pa);oa.push(new Tt(0,Af,pa))}else{var cl=pa,Ys=oa.length,_s=nn=="rtl"?1:0;for(++pa;pa<xn&&fn[pa]!="L";++pa);for(var Bo=cl;Bo<pa;)if(Lt.test(fn[Bo])){cl<Bo&&(oa.splice(Ys,0,new Tt(1,cl,Bo)),Ys+=_s);var Ya=Bo;for(++Bo;Bo<pa&&Lt.test(fn[Bo]);++Bo);oa.splice(Ys,0,new Tt(2,Ya,Bo)),Ys+=_s,cl=Bo}else++Bo;cl<pa&&oa.splice(Ys,0,new Tt(1,cl,pa))}return nn=="ltr"&&(oa[0].level==1&&(bl=It.match(/^\s+/))&&(oa[0].from=bl[0].length,oa.unshift(new Tt(0,0,bl[0].length))),kt(oa).level==1&&(bl=It.match(/\s+$/))&&(kt(oa).to-=bl[0].length,oa.push(new Tt(0,xn-bl[0].length,xn)))),nn=="rtl"?oa.reverse():oa}}();function $t(re,ce){var Ee=re.order;return Ee==null&&(Ee=re.order=Rt(re.text,ce)),Ee}var qt=[],rn=function(re,ce,Ee){if(re.addEventListener)re.addEventListener(ce,Ee,!1);else if(re.attachEvent)re.attachEvent("on"+ce,Ee);else{var be=re._handlers||(re._handlers={});be[ce]=(be[ce]||qt).concat(Ee)}};function Ht(re,ce){return re._handlers&&re._handlers[ce]||qt}function sn(re,ce,Ee){if(re.removeEventListener)re.removeEventListener(ce,Ee,!1);else if(re.detachEvent)re.detachEvent("on"+ce,Ee);else{var be=re._handlers,Oe=be&&be[ce];if(Oe){var qe=yt(Oe,Ee);qe>-1&&(be[ce]=Oe.slice(0,qe).concat(Oe.slice(qe+1)))}}}function tn(re,ce){var Ee=Ht(re,ce);if(Ee.length)for(var be=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ee.length;++Oe)Ee[Oe].apply(null,be)}function Ut(re,ce,Ee){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),tn(re,Ee||ce.type,re,ce),Yn(ce)||ce.codemirrorIgnore}function En(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var Ee=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),be=0;be<ce.length;++be)yt(Ee,ce[be])==-1&&Ee.push(ce[be])}function bn(re,ce){return Ht(re,ce).length>0}function Dn(re){re.prototype.on=function(ce,Ee){rn(this,ce,Ee)},re.prototype.off=function(ce,Ee){sn(this,ce,Ee)}}function Qn(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Pr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Yn(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Mr(re){Qn(re),Pr(re)}function Ur(re){return re.target||re.srcElement}function _r(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),ae&&re.ctrlKey&&ce==1&&(ce=3),ce}var ni=function(){if(De&&fe<9)return!1;var re=Ae("div");return"draggable"in re||"dragDrop"in re}(),Li;function _i(re){if(Li==null){var ce=Ae("span","\u200B");Ne(re,Ae("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Li=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(De&&fe<8))}var Ee=Li?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ee.setAttribute("cm-text",""),Ee}var Di;function ui(re){if(Di!=null)return Di;var ce=Ne(re,document.createTextNode("A\u062EA")),Ee=We(ce,0,1).getBoundingClientRect(),be=We(ce,1,2).getBoundingClientRect();return Fe(re),!Ee||Ee.left==Ee.right?!1:Di=be.right-Ee.right<3}var Wi=`
b`.split(/\n/).length!=3?function(re){for(var ce=0,Ee=[],be=re.length;ce<=be;){var Oe=re.indexOf(`
`,ce);Oe==-1&&(Oe=re.length);var qe=re.slice(ce,re.charAt(Oe-1)=="\r"?Oe-1:Oe),gt=qe.indexOf("\r");gt!=-1?(Ee.push(qe.slice(0,gt)),ce+=gt+1):(Ee.push(qe),ce=Oe+1)}return Ee}:function(re){return re.split(/\r\n?|\n/)},et=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(ce){return!1}}:function(re){var ce;try{ce=re.ownerDocument.selection.createRange()}catch(Ee){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},jr=function(){var re=Ae("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),dr=null;function Ai(re){if(dr!=null)return dr;var ce=Ne(re,Ae("span","x")),Ee=ce.getBoundingClientRect(),be=We(ce,0,1).getBoundingClientRect();return dr=Math.abs(Ee.left-be.left)>1}var lr={},yr={};function Lr(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),lr[re]=ce}function uo(re,ce){yr[re]=ce}function on(re){if(typeof re=="string"&&yr.hasOwnProperty(re))re=yr[re];else if(re&&typeof re.name=="string"&&yr.hasOwnProperty(re.name)){var ce=yr[re.name];typeof ce=="string"&&(ce={name:ce}),re=xe(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return on("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return on("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function dn(re,ce){ce=on(ce);var Ee=lr[ce.name];if(!Ee)return dn(re,"text/plain");var be=Ee(re,ce);if(en.hasOwnProperty(ce.name)){var Oe=en[ce.name];for(var qe in Oe)Oe.hasOwnProperty(qe)&&(be.hasOwnProperty(qe)&&(be["_"+qe]=be[qe]),be[qe]=Oe[qe])}if(be.name=ce.name,ce.helperType&&(be.helperType=ce.helperType),ce.modeProps)for(var gt in ce.modeProps)be[gt]=ce.modeProps[gt];return be}var en={};function vn(re,ce){var Ee=en.hasOwnProperty(re)?en[re]:en[re]={};Pt(ce,Ee)}function fr(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var Ee={};for(var be in ce){var Oe=ce[be];Oe instanceof Array&&(Oe=Oe.concat([])),Ee[be]=Oe}return Ee}function cr(re,ce){for(var Ee;re.innerMode&&(Ee=re.innerMode(ce),!(!Ee||Ee.mode==re));)ce=Ee.state,re=Ee.mode;return Ee||{mode:re,state:ce}}function oi(re,ce,Ee){return re.startState?re.startState(ce,Ee):!0}var an=function(re,ce,Ee){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ee};an.prototype.eol=function(){return this.pos>=this.string.length},an.prototype.sol=function(){return this.pos==this.lineStart},an.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},an.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},an.prototype.eat=function(re){var ce=this.string.charAt(this.pos),Ee;if(typeof re=="string"?Ee=ce==re:Ee=ce&&(re.test?re.test(ce):re(ce)),Ee)return++this.pos,ce},an.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},an.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},an.prototype.skipToEnd=function(){this.pos=this.string.length},an.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},an.prototype.backUp=function(re){this.pos-=re},an.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$e(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},an.prototype.indentation=function(){return $e(this.string,null,this.tabSize)-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},an.prototype.match=function(re,ce,Ee){if(typeof re=="string"){var be=function(gt){return Ee?gt.toLowerCase():gt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return ce!==!1&&(this.pos+=re.length),!0}else{var qe=this.string.slice(this.pos).match(re);return qe&&qe.index>0?null:(qe&&ce!==!1&&(this.pos+=qe[0].length),qe)}},an.prototype.current=function(){return this.string.slice(this.start,this.pos)},an.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},an.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},an.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function Nn(re,ce){if(ce-=re.first,ce<0||ce>=re.size)throw new Error("There is no line "+(ce+re.first)+" in the document.");for(var Ee=re;!Ee.lines;)for(var be=0;;++be){var Oe=Ee.children[be],qe=Oe.chunkSize();if(ce<qe){Ee=Oe;break}ce-=qe}return Ee.lines[ce]}function gr(re,ce,Ee){var be=[],Oe=ce.line;return re.iter(ce.line,Ee.line+1,function(qe){var gt=qe.text;Oe==Ee.line&&(gt=gt.slice(0,Ee.ch)),Oe==ce.line&&(gt=gt.slice(ce.ch)),be.push(gt),++Oe}),be}function Zr(re,ce,Ee){var be=[];return re.iter(ce,Ee,function(Oe){be.push(Oe.text)}),be}function Xn(re,ce){var Ee=ce-re.height;if(Ee)for(var be=re;be;be=be.parent)be.height+=Ee}function jt(re){if(re.parent==null)return null;for(var ce=re.parent,Ee=yt(ce.lines,re),be=ce.parent;be;ce=be,be=be.parent)for(var Oe=0;be.children[Oe]!=ce;++Oe)Ee+=be.children[Oe].chunkSize();return Ee+ce.first}function Wt(re,ce){var Ee=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],qe=Oe.height;if(ce<qe){re=Oe;continue e}ce-=qe,Ee+=Oe.chunkSize()}return Ee}while(!re.lines);for(var gt=0;gt<re.lines.length;++gt){var Lt=re.lines[gt],Tt=Lt.height;if(ce<Tt)break;ce-=Tt}return Ee+gt}function jn(re,ce){return ce>=re.first&&ce<re.first+re.size}function Cn(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function Jt(re,ce,Ee){if(Ee===void 0&&(Ee=null),!(this instanceof Jt))return new Jt(re,ce,Ee);this.line=re,this.ch=ce,this.sticky=Ee}function _n(re,ce){return re.line-ce.line||re.ch-ce.ch}function ur(re,ce){return re.sticky==ce.sticky&&_n(re,ce)==0}function ar(re){return Jt(re.line,re.ch)}function mr(re,ce){return _n(re,ce)<0?ce:re}function Bn(re,ce){return _n(re,ce)<0?re:ce}function Un(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function er(re,ce){if(ce.line<re.first)return Jt(re.first,0);var Ee=re.first+re.size-1;return ce.line>Ee?Jt(Ee,Nn(re,Ee).text.length):Ar(ce,Nn(re,ce.line).text.length)}function Ar(re,ce){var Ee=re.ch;return Ee==null||Ee>ce?Jt(re.line,ce):Ee<0?Jt(re.line,0):re}function sr(re,ce){for(var Ee=[],be=0;be<ce.length;be++)Ee[be]=er(re,ce[be]);return Ee}var mn=function(re,ce){this.state=re,this.lookAhead=ce},tr=function(re,ce,Ee,be){this.state=ce,this.doc=re,this.line=Ee,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};tr.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},tr.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},tr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},tr.fromSaved=function(re,ce,Ee){return ce instanceof mn?new tr(re,fr(re.mode,ce.state),Ee,ce.lookAhead):new tr(re,fr(re.mode,ce),Ee)},tr.prototype.save=function(re){var ce=re!==!1?fr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mn(ce,this.maxLookAhead):ce};function Vr(re,ce,Ee,be){var Oe=[re.state.modeGen],qe={};hi(re,ce.text,re.doc.mode,Ee,function(It,nn){return Oe.push(It,nn)},qe,be);for(var gt=Ee.state,Lt=function(It){Ee.baseTokens=Oe;var nn=re.state.overlays[It],zt=1,xn=0;Ee.state=!0,hi(re,ce.text,nn.mode,Ee,function(fn,rr){for(var or=zt;xn<fn;){var pr=Oe[zt];pr>fn&&Oe.splice(zt,1,fn,Oe[zt+1],pr),zt+=2,xn=Math.min(fn,pr)}if(rr)if(nn.opaque)Oe.splice(or,zt-or,fn,"overlay "+rr),zt=or+2;else for(;or<zt;or+=2){var Nr=Oe[or+1];Oe[or+1]=(Nr?Nr+" ":"")+"overlay "+rr}},qe),Ee.state=gt,Ee.baseTokens=null,Ee.baseTokenPos=1},Tt=0;Tt<re.state.overlays.length;++Tt)Lt(Tt);return{styles:Oe,classes:qe.bgClass||qe.textClass?qe:null}}function pi(re,ce,Ee){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var be=zi(re,jt(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&fr(re.doc.mode,be.state),qe=Vr(re,ce,be);Oe&&(be.state=Oe),ce.stateAfter=be.save(!Oe),ce.styles=qe.styles,qe.classes?ce.styleClasses=qe.classes:ce.styleClasses&&(ce.styleClasses=null),Ee===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function zi(re,ce,Ee){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new tr(be,!0,ce);var qe=$r(re,ce,Ee),gt=qe>be.first&&Nn(be,qe-1).stateAfter,Lt=gt?tr.fromSaved(be,gt,qe):new tr(be,oi(be.mode),qe);return be.iter(qe,ce,function(Tt){Yt(re,Tt.text,Lt);var It=Lt.line;Tt.stateAfter=It==ce-1||It%5==0||It>=Oe.viewFrom&&It<Oe.viewTo?Lt.save():null,Lt.nextLine()}),Ee&&(be.modeFrontier=Lt.line),Lt}function Yt(re,ce,Ee,be){var Oe=re.doc.mode,qe=new an(ce,re.options.tabSize,Ee);for(qe.start=qe.pos=be||0,ce==""&&vr(Oe,Ee.state);!qe.eol();)zr(Oe,qe,Ee.state),qe.start=qe.pos}function vr(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var Ee=cr(re,ce);if(Ee.mode.blankLine)return Ee.mode.blankLine(Ee.state)}}function zr(re,ce,Ee,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=cr(re,Ee).mode);var qe=re.token(ce,Ee);if(ce.pos>ce.start)return qe}throw new Error("Mode "+re.name+" failed to advance stream.")}var nr=function(re,ce,Ee){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=Ee};function vi(re,ce,Ee,be){var Oe=re.doc,qe=Oe.mode,gt;ce=er(Oe,ce);var Lt=Nn(Oe,ce.line),Tt=zi(re,ce.line,Ee),It=new an(Lt.text,re.options.tabSize,Tt),nn;for(be&&(nn=[]);(be||It.pos<ce.ch)&&!It.eol();)It.start=It.pos,gt=zr(qe,It,Tt.state),be&&nn.push(new nr(It,gt,fr(Oe.mode,Tt.state)));return be?nn:new nr(It,gt,Tt.state)}function Qr(re,ce){if(re)for(;;){var Ee=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Ee)break;re=re.slice(0,Ee.index)+re.slice(Ee.index+Ee[0].length);var be=Ee[1]?"bgClass":"textClass";ce[be]==null?ce[be]=Ee[2]:new RegExp("(?:^|\\s)"+Ee[2]+"(?:$|\\s)").test(ce[be])||(ce[be]+=" "+Ee[2])}return re}function hi(re,ce,Ee,be,Oe,qe,gt){var Lt=Ee.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var Tt=0,It=null,nn=new an(ce,re.options.tabSize,be),zt,xn=re.options.addModeClass&&[null];for(ce==""&&Qr(vr(Ee,be.state),qe);!nn.eol();){if(nn.pos>re.options.maxHighlightLength?(Lt=!1,gt&&Yt(re,ce,be,nn.pos),nn.pos=ce.length,zt=null):zt=Qr(zr(Ee,nn,be.state,xn),qe),xn){var fn=xn[0].name;fn&&(zt="m-"+(zt?fn+" "+zt:fn))}if(!Lt||It!=zt){for(;Tt<nn.start;)Tt=Math.min(nn.start,Tt+5e3),Oe(Tt,It);It=zt}nn.start=nn.pos}for(;Tt<nn.pos;){var rr=Math.min(nn.pos,Tt+5e3);Oe(rr,It),Tt=rr}}function $r(re,ce,Ee){for(var be,Oe,qe=re.doc,gt=Ee?-1:ce-(re.doc.mode.innerMode?1e3:100),Lt=ce;Lt>gt;--Lt){if(Lt<=qe.first)return qe.first;var Tt=Nn(qe,Lt-1),It=Tt.stateAfter;if(It&&(!Ee||Lt+(It instanceof mn?It.lookAhead:0)<=qe.modeFrontier))return Lt;var nn=$e(Tt.text,null,re.options.tabSize);(Oe==null||be>nn)&&(Oe=Lt-1,be=nn)}return Oe}function si(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var Ee=re.first,be=ce-1;be>Ee;be--){var Oe=Nn(re,be).stateAfter;if(Oe&&(!(Oe instanceof mn)||be+Oe.lookAhead<ce)){Ee=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ee)}}var bi=!1,pn=!1;function Oi(){bi=!0}function yn(){pn=!0}function Sr(re,ce,Ee){this.marker=re,this.from=ce,this.to=Ee}function li(re,ce){if(re)for(var Ee=0;Ee<re.length;++Ee){var be=re[Ee];if(be.marker==ce)return be}}function Jr(re,ce){for(var Ee,be=0;be<re.length;++be)re[be]!=ce&&(Ee||(Ee=[])).push(re[be]);return Ee}function Hi(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function ci(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],gt=qe.marker,Lt=qe.from==null||(gt.inclusiveLeft?qe.from<=ce:qe.from<ce);if(Lt||qe.from==ce&&gt.type=="bookmark"&&(!Ee||!qe.marker.insertLeft)){var Tt=qe.to==null||(gt.inclusiveRight?qe.to>=ce:qe.to>ce);(be||(be=[])).push(new Sr(gt,qe.from,Tt?null:qe.to))}}return be}function Hr(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],gt=qe.marker,Lt=qe.to==null||(gt.inclusiveRight?qe.to>=ce:qe.to>ce);if(Lt||qe.from==ce&&gt.type=="bookmark"&&(!Ee||qe.marker.insertLeft)){var Tt=qe.from==null||(gt.inclusiveLeft?qe.from<=ce:qe.from<ce);(be||(be=[])).push(new Sr(gt,Tt?null:qe.from-ce,qe.to==null?null:qe.to-ce))}}return be}function Ki(re,ce){if(ce.full)return null;var Ee=jn(re,ce.from.line)&&Nn(re,ce.from.line).markedSpans,be=jn(re,ce.to.line)&&Nn(re,ce.to.line).markedSpans;if(!Ee&&!be)return null;var Oe=ce.from.ch,qe=ce.to.ch,gt=_n(ce.from,ce.to)==0,Lt=ci(Ee,Oe,gt),Tt=Hr(be,qe,gt),It=ce.text.length==1,nn=kt(ce.text).length+(It?Oe:0);if(Lt)for(var zt=0;zt<Lt.length;++zt){var xn=Lt[zt];if(xn.to==null){var fn=li(Tt,xn.marker);fn?It&&(xn.to=fn.to==null?null:fn.to+nn):xn.to=Oe}}if(Tt)for(var rr=0;rr<Tt.length;++rr){var or=Tt[rr];if(or.to!=null&&(or.to+=nn),or.from==null){var pr=li(Lt,or.marker);pr||(or.from=nn,It&&(Lt||(Lt=[])).push(or))}else or.from+=nn,It&&(Lt||(Lt=[])).push(or)}Lt&&(Lt=Qt(Lt)),Tt&&Tt!=Lt&&(Tt=Qt(Tt));var Nr=[Lt];if(!It){var Yr=ce.text.length-2,Gr;if(Yr>0&&Lt)for(var ii=0;ii<Lt.length;++ii)Lt[ii].to==null&&(Gr||(Gr=[])).push(new Sr(Lt[ii].marker,null,null));for(var ji=0;ji<Yr;++ji)Nr.push(Gr);Nr.push(Tt)}return Nr}function Qt(re){for(var ce=0;ce<re.length;++ce){var Ee=re[ce];Ee.from!=null&&Ee.from==Ee.to&&Ee.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function wn(re,ce,Ee){var be=null;if(re.iter(ce.line,Ee.line+1,function(fn){if(fn.markedSpans)for(var rr=0;rr<fn.markedSpans.length;++rr){var or=fn.markedSpans[rr].marker;or.readOnly&&(!be||yt(be,or)==-1)&&(be||(be=[])).push(or)}}),!be)return null;for(var Oe=[{from:ce,to:Ee}],qe=0;qe<be.length;++qe)for(var gt=be[qe],Lt=gt.find(0),Tt=0;Tt<Oe.length;++Tt){var It=Oe[Tt];if(!(_n(It.to,Lt.from)<0||_n(It.from,Lt.to)>0)){var nn=[Tt,1],zt=_n(It.from,Lt.from),xn=_n(It.to,Lt.to);(zt<0||!gt.inclusiveLeft&&!zt)&&nn.push({from:It.from,to:Lt.from}),(xn>0||!gt.inclusiveRight&&!xn)&&nn.push({from:Lt.to,to:It.to}),Oe.splice.apply(Oe,nn),Tt+=nn.length-3}}return Oe}function Zt(re){var ce=re.markedSpans;if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.detachLine(re);re.markedSpans=null}}function lt(re,ce){if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.attachLine(re);re.markedSpans=ce}}function On(re){return re.inclusiveLeft?-1:0}function Sn(re){return re.inclusiveRight?1:0}function Hn(re,ce){var Ee=re.lines.length-ce.lines.length;if(Ee!=0)return Ee;var be=re.find(),Oe=ce.find(),qe=_n(be.from,Oe.from)||On(re)-On(ce);if(qe)return-qe;var gt=_n(be.to,Oe.to)||Sn(re)-Sn(ce);return gt||ce.id-re.id}function $n(re,ce){var Ee=pn&&re.markedSpans,be;if(Ee)for(var Oe=void 0,qe=0;qe<Ee.length;++qe)Oe=Ee[qe],Oe.marker.collapsed&&(ce?Oe.from:Oe.to)==null&&(!be||Hn(be,Oe.marker)<0)&&(be=Oe.marker);return be}function Kn(re){return $n(re,!0)}function un(re){return $n(re,!1)}function Fn(re,ce){var Ee=pn&&re.markedSpans,be;if(Ee)for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe];qe.marker.collapsed&&(qe.from==null||qe.from<ce)&&(qe.to==null||qe.to>ce)&&(!be||Hn(be,qe.marker)<0)&&(be=qe.marker)}return be}function zn(re,ce,Ee,be,Oe){var qe=Nn(re,ce),gt=pn&&qe.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;++Lt){var Tt=gt[Lt];if(Tt.marker.collapsed){var It=Tt.marker.find(0),nn=_n(It.from,Ee)||On(Tt.marker)-On(Oe),zt=_n(It.to,be)||Sn(Tt.marker)-Sn(Oe);if(!(nn>=0&&zt<=0||nn<=0&&zt>=0)&&(nn<=0&&(Tt.marker.inclusiveRight&&Oe.inclusiveLeft?_n(It.to,Ee)>=0:_n(It.to,Ee)>0)||nn>=0&&(Tt.marker.inclusiveRight&&Oe.inclusiveLeft?_n(It.from,be)<=0:_n(It.from,be)<0)))return!0}}}function Ln(re){for(var ce;ce=Kn(re);)re=ce.find(-1,!0).line;return re}function In(re){for(var ce;ce=un(re);)re=ce.find(1,!0).line;return re}function An(re){for(var ce,Ee;ce=un(re);)re=ce.find(1,!0).line,(Ee||(Ee=[])).push(re);return Ee}function Vn(re,ce){var Ee=Nn(re,ce),be=Ln(Ee);return Ee==be?ce:jt(be)}function Wn(re,ce){if(ce>re.lastLine())return ce;var Ee=Nn(re,ce),be;if(!ln(re,Ee))return ce;for(;be=un(Ee);)Ee=be.find(1,!0).line;return jt(Ee)+1}function ln(re,ce){var Ee=pn&&ce.markedSpans;if(Ee){for(var be=void 0,Oe=0;Oe<Ee.length;++Oe)if(be=Ee[Oe],!!be.marker.collapsed){if(be.from==null)return!0;if(!be.marker.widgetNode&&be.from==0&&be.marker.inclusiveLeft&&br(re,ce,be))return!0}}}function br(re,ce,Ee){if(Ee.to==null){var be=Ee.marker.find(1,!0);return br(re,be.line,li(be.line.markedSpans,Ee.marker))}if(Ee.marker.inclusiveRight&&Ee.to==ce.text.length)return!0;for(var Oe=void 0,qe=0;qe<ce.markedSpans.length;++qe)if(Oe=ce.markedSpans[qe],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ee.to&&(Oe.to==null||Oe.to!=Ee.from)&&(Oe.marker.inclusiveLeft||Ee.marker.inclusiveRight)&&br(re,ce,Oe))return!0}function Cr(re){re=Ln(re);for(var ce=0,Ee=re.parent,be=0;be<Ee.lines.length;++be){var Oe=Ee.lines[be];if(Oe==re)break;ce+=Oe.height}for(var qe=Ee.parent;qe;Ee=qe,qe=Ee.parent)for(var gt=0;gt<qe.children.length;++gt){var Lt=qe.children[gt];if(Lt==Ee)break;ce+=Lt.height}return ce}function ri(re){if(re.height==0)return 0;for(var ce=re.text.length,Ee,be=re;Ee=Kn(be);){var Oe=Ee.find(0,!0);be=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(be=re;Ee=un(be);){var qe=Ee.find(0,!0);ce-=be.text.length-qe.from.ch,be=qe.to.line,ce+=be.text.length-qe.to.ch}return ce}function Er(re){var ce=re.display,Ee=re.doc;ce.maxLine=Nn(Ee,Ee.first),ce.maxLineLength=ri(ce.maxLine),ce.maxLineChanged=!0,Ee.iter(function(be){var Oe=ri(be);Oe>ce.maxLineLength&&(ce.maxLineLength=Oe,ce.maxLine=be)})}var xi=function(re,ce,Ee){this.text=re,lt(this,ce),this.height=Ee?Ee(this):1};xi.prototype.lineNo=function(){return jt(this)},Dn(xi);function gi(re,ce,Ee,be){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Zt(re),lt(re,Ee);var Oe=be?be(re):1;Oe!=re.height&&Xn(re,Oe)}function Ci(re){re.parent=null,Zt(re)}var Si={},Bi={};function Vi(re,ce){if(!re||/^\s*$/.test(re))return null;var Ee=ce.addModeClass?Bi:Si;return Ee[re]||(Ee[re]=re.replace(/\S+/g,"cm-$&"))}function Xt(re,ce){var Ee=Re("span",null,null,me?"padding-right: .1px":null),be={pre:Re("pre",[Ee],"CodeMirror-line"),content:Ee,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};ce.measure={};for(var Oe=0;Oe<=(ce.rest?ce.rest.length:0);Oe++){var qe=Oe?ce.rest[Oe-1]:ce.line,gt=void 0;be.pos=0,be.addToken=qr,ui(re.display.measure)&&(gt=$t(qe,re.doc.direction))&&(be.addToken=Br(be.addToken,gt)),be.map=[];var Lt=ce!=re.display.externalMeasured&&jt(qe);Ii(qe,be,pi(re,qe,Lt)),qe.styleClasses&&(qe.styleClasses.bgClass&&(be.bgClass=ot(qe.styleClasses.bgClass,be.bgClass||"")),qe.styleClasses.textClass&&(be.textClass=ot(qe.styleClasses.textClass,be.textClass||""))),be.map.length==0&&be.map.push(0,0,be.content.appendChild(_i(re.display.measure))),Oe==0?(ce.measure.map=be.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(be.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(me){var Tt=be.content.lastChild;(/\bcm-tab\b/.test(Tt.className)||Tt.querySelector&&Tt.querySelector(".cm-tab"))&&(be.content.className="cm-tab-wrap-hack")}return tn(re,"renderLine",re,ce.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function wi(re){var ce=Ae("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function qr(re,ce,Ee,be,Oe,qe,gt){if(ce){var Lt=re.splitSpaces?Wr(ce,re.trailingSpace):ce,Tt=re.cm.state.specialChars,It=!1,nn;if(!Tt.test(ce))re.col+=ce.length,nn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+ce.length,nn),De&&fe<9&&(It=!0),re.pos+=ce.length;else{nn=document.createDocumentFragment();for(var zt=0;;){Tt.lastIndex=zt;var xn=Tt.exec(ce),fn=xn?xn.index-zt:ce.length-zt;if(fn){var rr=document.createTextNode(Lt.slice(zt,zt+fn));De&&fe<9?nn.appendChild(Ae("span",[rr])):nn.appendChild(rr),re.map.push(re.pos,re.pos+fn,rr),re.col+=fn,re.pos+=fn}if(!xn)break;zt+=fn+1;var or=void 0;if(xn[0]==" "){var pr=re.cm.options.tabSize,Nr=pr-re.col%pr;or=nn.appendChild(Ae("span",vt(Nr),"cm-tab")),or.setAttribute("role","presentation"),or.setAttribute("cm-text"," "),re.col+=Nr}else xn[0]=="\r"||xn[0]==`
`?(or=nn.appendChild(Ae("span",xn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),or.setAttribute("cm-text",xn[0]),re.col+=1):(or=re.cm.options.specialCharPlaceholder(xn[0]),or.setAttribute("cm-text",xn[0]),De&&fe<9?nn.appendChild(Ae("span",[or])):nn.appendChild(or),re.col+=1);re.map.push(re.pos,re.pos+1,or),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(ce.length-1)==32,Ee||be||Oe||It||qe||gt){var Yr=Ee||"";be&&(Yr+=be),Oe&&(Yr+=Oe);var Gr=Ae("span",[nn],Yr,qe);if(gt)for(var ii in gt)gt.hasOwnProperty(ii)&&ii!="style"&&ii!="class"&&Gr.setAttribute(ii,gt[ii]);return re.content.appendChild(Gr)}re.content.appendChild(nn)}}function Wr(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var Ee=ce,be="",Oe=0;Oe<re.length;Oe++){var qe=re.charAt(Oe);qe==" "&&Ee&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&(qe="\xA0"),be+=qe,Ee=qe==" "}return be}function Br(re,ce){return function(Ee,be,Oe,qe,gt,Lt,Tt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var It=Ee.pos,nn=It+be.length;;){for(var zt=void 0,xn=0;xn<ce.length&&(zt=ce[xn],!(zt.to>It&&zt.from<=It));xn++);if(zt.to>=nn)return re(Ee,be,Oe,qe,gt,Lt,Tt);re(Ee,be.slice(0,zt.to-It),Oe,qe,null,Lt,Tt),qe=null,be=be.slice(zt.to-It),It=zt.to}}}function Pi(re,ce,Ee,be){var Oe=!be&&Ee.widgetNode;Oe&&re.map.push(re.pos,re.pos+ce,Oe),!be&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",Ee.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=ce,re.trailingSpace=!1}function Ii(re,ce,Ee){var be=re.markedSpans,Oe=re.text,qe=0;if(!be){for(var gt=1;gt<Ee.length;gt+=2)ce.addToken(ce,Oe.slice(qe,qe=Ee[gt]),Vi(Ee[gt+1],ce.cm.options));return}for(var Lt=Oe.length,Tt=0,It=1,nn="",zt,xn,fn=0,rr,or,pr,Nr,Yr;;){if(fn==Tt){rr=or=pr=xn="",Yr=null,Nr=null,fn=1/0;for(var Gr=[],ii=void 0,ji=0;ji<be.length;++ji){var Rr=be[ji],eo=Rr.marker;if(eo.type=="bookmark"&&Rr.from==Tt&&eo.widgetNode)Gr.push(eo);else if(Rr.from<=Tt&&(Rr.to==null||Rr.to>Tt||eo.collapsed&&Rr.to==Tt&&Rr.from==Tt)){if(Rr.to!=null&&Rr.to!=Tt&&fn>Rr.to&&(fn=Rr.to,or=""),eo.className&&(rr+=" "+eo.className),eo.css&&(xn=(xn?xn+";":"")+eo.css),eo.startStyle&&Rr.from==Tt&&(pr+=" "+eo.startStyle),eo.endStyle&&Rr.to==fn&&(ii||(ii=[])).push(eo.endStyle,Rr.to),eo.title&&((Yr||(Yr={})).title=eo.title),eo.attributes)for(var Yo in eo.attributes)(Yr||(Yr={}))[Yo]=eo.attributes[Yo];eo.collapsed&&(!Nr||Hn(Nr.marker,eo)<0)&&(Nr=Rr)}else Rr.from>Tt&&fn>Rr.from&&(fn=Rr.from)}if(ii)for(var Ia=0;Ia<ii.length;Ia+=2)ii[Ia+1]==fn&&(or+=" "+ii[Ia]);if(!Nr||Nr.from==Tt)for(var ia=0;ia<Gr.length;++ia)Pi(ce,0,Gr[ia]);if(Nr&&(Nr.from||0)==Tt){if(Pi(ce,(Nr.to==null?Lt+1:Nr.to)-Tt,Nr.marker,Nr.from==null),Nr.to==null)return;Nr.to==Tt&&(Nr=!1)}}if(Tt>=Lt)break;for(var Rs=Math.min(Lt,fn);;){if(nn){var ms=Tt+nn.length;if(!Nr){var Ma=ms>Rs?nn.slice(0,Rs-Tt):nn;ce.addToken(ce,Ma,zt?zt+rr:rr,pr,Tt+Ma.length==fn?or:"",xn,Yr)}if(ms>=Rs){nn=nn.slice(Rs-Tt),Tt=Rs;break}Tt=ms,pr=""}nn=Oe.slice(qe,qe=Ee[It++]),zt=Vi(Ee[It++],ce.cm.options)}}}function Fi(re,ce,Ee){this.line=ce,this.rest=An(ce),this.size=this.rest?jt(kt(this.rest))-Ee+1:1,this.node=this.text=null,this.hidden=ln(re,ce)}function ei(re,ce,Ee){for(var be=[],Oe,qe=ce;qe<Ee;qe=Oe){var gt=new Fi(re.doc,Nn(re.doc,qe),qe);Oe=qe+gt.size,be.push(gt)}return be}var $i=null;function _o(re){$i?$i.ops.push(re):re.ownsGroup=$i={ops:[re],delayedCallbacks:[]}}function fa(re){var ce=re.delayedCallbacks,Ee=0;do{for(;Ee<ce.length;Ee++)ce[Ee].call(null);for(var be=0;be<re.ops.length;be++){var Oe=re.ops[be];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ee<ce.length)}function Ps(re,ce){var Ee=re.ownsGroup;if(Ee)try{fa(Ee)}finally{$i=null,ce(Ee)}}var wa=null;function Ir(re,ce){var Ee=Ht(re,ce);if(Ee.length){var be=Array.prototype.slice.call(arguments,2),Oe;$i?Oe=$i.delayedCallbacks:wa?Oe=wa:(Oe=wa=[],setTimeout(Po,0));for(var qe=function(Lt){Oe.push(function(){return Ee[Lt].apply(null,be)})},gt=0;gt<Ee.length;++gt)qe(gt)}}function Po(){var re=wa;wa=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function bo(re,ce,Ee,be){for(var Oe=0;Oe<ce.changes.length;Oe++){var qe=ce.changes[Oe];qe=="text"?qn(re,ce):qe=="gutter"?Xr(re,ce,Ee,be):qe=="class"?Or(re,ce):qe=="widget"&&yi(re,ce,be)}ce.changes=null}function ta(re){return re.node==re.text&&(re.node=Ae("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),De&&fe<8&&(re.node.style.zIndex=2)),re.node}function Ao(re,ce){var Ee=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Ee&&(Ee+=" CodeMirror-linebackground"),ce.background)Ee?ce.background.className=Ee:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Ee){var be=ta(ce);ce.background=be.insertBefore(Ae("div",null,Ee),be.firstChild),re.display.input.setUneditable(ce.background)}}function Ko(re,ce){var Ee=re.display.externalMeasured;return Ee&&Ee.line==ce.line?(re.display.externalMeasured=null,ce.measure=Ee.measure,Ee.built):Xt(re,ce)}function qn(re,ce){var Ee=ce.text.className,be=Ko(re,ce);ce.text==ce.node&&(ce.node=be.pre),ce.text.parentNode.replaceChild(be.pre,ce.text),ce.text=be.pre,be.bgClass!=ce.bgClass||be.textClass!=ce.textClass?(ce.bgClass=be.bgClass,ce.textClass=be.textClass,Or(re,ce)):Ee&&(ce.text.className=Ee)}function Or(re,ce){Ao(re,ce),ce.line.wrapClass?ta(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Ee=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Ee||""}function Xr(re,ce,Ee,be){if(ce.gutter&&(ce.node.removeChild(ce.gutter),ce.gutter=null),ce.gutterBackground&&(ce.node.removeChild(ce.gutterBackground),ce.gutterBackground=null),ce.line.gutterClass){var Oe=ta(ce);ce.gutterBackground=Ae("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px; width: "+be.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),Oe.insertBefore(ce.gutterBackground,ce.text)}var qe=ce.line.gutterMarkers;if(re.options.lineNumbers||qe){var gt=ta(ce),Lt=ce.gutter=Ae("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Lt),gt.insertBefore(Lt,ce.text),ce.line.gutterClass&&(Lt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!qe||!qe["CodeMirror-linenumbers"])&&(ce.lineNumber=Lt.appendChild(Ae("div",Cn(re.options,Ee),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),qe)for(var Tt=0;Tt<re.display.gutterSpecs.length;++Tt){var It=re.display.gutterSpecs[Tt].className,nn=qe.hasOwnProperty(It)&&qe[It];nn&&Lt.appendChild(Ae("div",[nn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[It]+"px; width: "+be.gutterWidth[It]+"px"))}}}function yi(re,ce,Ee){ce.alignable&&(ce.alignable=null);for(var be=je("CodeMirror-linewidget"),Oe=ce.node.firstChild,qe=void 0;Oe;Oe=qe)qe=Oe.nextSibling,be.test(Oe.className)&&ce.node.removeChild(Oe);to(re,ce,Ee)}function Ei(re,ce,Ee,be){var Oe=Ko(re,ce);return ce.text=ce.node=Oe.pre,Oe.bgClass&&(ce.bgClass=Oe.bgClass),Oe.textClass&&(ce.textClass=Oe.textClass),Or(re,ce),Xr(re,ce,Ee,be),to(re,ce,be),ce.node}function to(re,ce,Ee){if(Fr(re,ce.line,ce,Ee,!0),ce.rest)for(var be=0;be<ce.rest.length;be++)Fr(re,ce.rest[be],ce,Ee,!1)}function Fr(re,ce,Ee,be,Oe){if(ce.widgets)for(var qe=ta(Ee),gt=0,Lt=ce.widgets;gt<Lt.length;++gt){var Tt=Lt[gt],It=Ae("div",[Tt.node],"CodeMirror-linewidget"+(Tt.className?" "+Tt.className:""));Tt.handleMouseEvents||It.setAttribute("cm-ignore-events","true"),Aa(Tt,It,Ee,be),re.display.input.setUneditable(It),Oe&&Tt.above?qe.insertBefore(It,Ee.gutter||Ee.text):qe.appendChild(It),Ir(Tt,"redraw")}}function Aa(re,ce,Ee,be){if(re.noHScroll){(Ee.alignable||(Ee.alignable=[])).push(ce);var Oe=be.wrapperWidth;ce.style.left=be.fixedPos+"px",re.coverGutter||(Oe-=be.gutterTotalWidth,ce.style.paddingLeft=be.gutterTotalWidth+"px"),ce.style.width=Oe+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-be.gutterTotalWidth+"px"))}function zo(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Ye(document.body,re.node)){var Ee="position: relative;";re.coverGutter&&(Ee+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ee+="width: "+ce.display.wrapper.clientWidth+"px;"),Ne(ce.display.measure,Ae("div",[re.node],null,Ee))}return re.height=re.node.parentNode.offsetHeight}function jo(re,ce){for(var Ee=Ur(ce);Ee!=re.wrapper;Ee=Ee.parentNode)if(!Ee||Ee.nodeType==1&&Ee.getAttribute("cm-ignore-events")=="true"||Ee.parentNode==re.sizer&&Ee!=re.mover)return!0}function Ni(re){return re.lineSpace.offsetTop}function Vo(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function ja(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=Ne(re.measure,Ae("pre","x","CodeMirror-line-like")),Ee=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,be={left:parseInt(Ee.paddingLeft),right:parseInt(Ee.paddingRight)};return!isNaN(be.left)&&!isNaN(be.right)&&(re.cachedPaddingH=be),be}function vo(re){return xt-re.display.nativeBarWidth}function fs(re){return re.display.scroller.clientWidth-vo(re)-re.display.barWidth}function ds(re){return re.display.scroller.clientHeight-vo(re)-re.display.barHeight}function bs(re,ce,Ee){var be=re.options.lineWrapping,Oe=be&&fs(re);if(!ce.measure.heights||be&&ce.measure.width!=Oe){var qe=ce.measure.heights=[];if(be){ce.measure.width=Oe;for(var gt=ce.text.firstChild.getClientRects(),Lt=0;Lt<gt.length-1;Lt++){var Tt=gt[Lt],It=gt[Lt+1];Math.abs(Tt.bottom-It.bottom)>2&&qe.push((Tt.bottom+It.top)/2-Ee.top)}}qe.push(Ee.bottom-Ee.top)}}function na(re,ce,Ee){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var be=0;be<re.rest.length;be++)if(re.rest[be]==ce)return{map:re.measure.maps[be],cache:re.measure.caches[be]};for(var Oe=0;Oe<re.rest.length;Oe++)if(jt(re.rest[Oe])>Ee)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function eh(re,ce){ce=Ln(ce);var Ee=jt(ce),be=re.display.externalMeasured=new Fi(re.doc,ce,Ee);be.lineN=Ee;var Oe=be.built=Xt(re,be);return be.text=Oe.pre,Ne(re.display.lineMeasure,Oe.pre),be}function ju(re,ce,Ee,be){return Os(re,Sl(re,ce),Ee,be)}function il(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[Ds(re,ce)];var Ee=re.display.externalMeasured;if(Ee&&ce>=Ee.lineN&&ce<Ee.lineN+Ee.size)return Ee}function Sl(re,ce){var Ee=jt(ce),be=il(re,Ee);be&&!be.text?be=null:be&&be.changes&&(bo(re,be,Ee,ol(re)),re.curOp.forceUpdate=!0),be||(be=eh(re,ce));var Oe=na(be,ce,Ee);return{line:ce,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Os(re,ce,Ee,be,Oe){ce.before&&(Ee=-1);var qe=Ee+(be||""),gt;return ce.cache.hasOwnProperty(qe)?gt=ce.cache[qe]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(bs(re,ce.view,ce.rect),ce.hasHeights=!0),gt=Zo(re,ce,Ee,be),gt.bogus||(ce.cache[qe]=gt)),{left:gt.left,right:gt.right,top:Oe?gt.rtop:gt.top,bottom:Oe?gt.rbottom:gt.bottom}}var Vl={left:0,right:0,top:0,bottom:0};function th(re,ce,Ee){for(var be,Oe,qe,gt,Lt,Tt,It=0;It<re.length;It+=3)if(Lt=re[It],Tt=re[It+1],ce<Lt?(Oe=0,qe=1,gt="left"):ce<Tt?(Oe=ce-Lt,qe=Oe+1):(It==re.length-3||ce==Tt&&re[It+3]>ce)&&(qe=Tt-Lt,Oe=qe-1,ce>=Tt&&(gt="right")),Oe!=null){if(be=re[It+2],Lt==Tt&&Ee==(be.insertLeft?"left":"right")&&(gt=Ee),Ee=="left"&&Oe==0)for(;It&&re[It-2]==re[It-3]&&re[It-1].insertLeft;)be=re[(It-=3)+2],gt="left";if(Ee=="right"&&Oe==Tt-Lt)for(;It<re.length-3&&re[It+3]==re[It+4]&&!re[It+5].insertLeft;)be=re[(It+=3)+2],gt="right";break}return{node:be,start:Oe,end:qe,collapse:gt,coverStart:Lt,coverEnd:Tt}}function nh(re,ce){var Ee=Vl;if(ce=="left")for(var be=0;be<re.length&&(Ee=re[be]).left==Ee.right;be++);else for(var Oe=re.length-1;Oe>=0&&(Ee=re[Oe]).left==Ee.right;Oe--);return Ee}function Zo(re,ce,Ee,be){var Oe=th(ce.map,Ee,be),qe=Oe.node,gt=Oe.start,Lt=Oe.end,Tt=Oe.collapse,It;if(qe.nodeType==3){for(var nn=0;nn<4;nn++){for(;gt&&He(ce.line.text.charAt(Oe.coverStart+gt));)--gt;for(;Oe.coverStart+Lt<Oe.coverEnd&&He(ce.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(De&&fe<9&&gt==0&&Lt==Oe.coverEnd-Oe.coverStart?It=qe.parentNode.getBoundingClientRect():It=nh(We(qe,gt,Lt).getClientRects(),be),It.left||It.right||gt==0)break;Lt=gt,gt=gt-1,Tt="right"}De&&fe<11&&(It=Ou(re.display.measure,It))}else{gt>0&&(Tt=be="right");var zt;re.options.lineWrapping&&(zt=qe.getClientRects()).length>1?It=zt[be=="right"?zt.length-1:0]:It=qe.getBoundingClientRect()}if(De&&fe<9&&!gt&&(!It||!It.left&&!It.right)){var xn=qe.parentNode.getClientRects()[0];xn?It={left:xn.left,right:xn.left+Fs(re.display),top:xn.top,bottom:xn.bottom}:It=Vl}for(var fn=It.top-ce.rect.top,rr=It.bottom-ce.rect.top,or=(fn+rr)/2,pr=ce.view.measure.heights,Nr=0;Nr<pr.length-1&&!(or<pr[Nr]);Nr++);var Yr=Nr?pr[Nr-1]:0,Gr=pr[Nr],ii={left:(Tt=="right"?It.right:It.left)-ce.rect.left,right:(Tt=="left"?It.left:It.right)-ce.rect.left,top:Yr,bottom:Gr};return!It.left&&!It.right&&(ii.bogus=!0),re.options.singleCursorHeightPerLine||(ii.rtop=fn,ii.rbottom=rr),ii}function Ou(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ai(re))return ce;var Ee=screen.logicalXDPI/screen.deviceXDPI,be=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Ee,right:ce.right*Ee,top:ce.top*be,bottom:ce.bottom*be}}function rh(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var ce=0;ce<re.rest.length;ce++)re.measure.caches[ce]={}}function Zl(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)rh(re.display.view[ce])}function uu(re){Zl(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function Ca(){return Ce&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Oa(){return Ce&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(re){var ce=0;if(re.widgets)for(var Ee=0;Ee<re.widgets.length;++Ee)re.widgets[Ee].above&&(ce+=zo(re.widgets[Ee]));return ce}function ga(re,ce,Ee,be,Oe){if(!Oe){var qe=aa(ce);Ee.top+=qe,Ee.bottom+=qe}if(be=="line")return Ee;be||(be="local");var gt=Cr(ce);if(be=="local"?gt+=Ni(re.display):gt-=re.display.viewOffset,be=="page"||be=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();gt+=Lt.top+(be=="window"?0:Oa());var Tt=Lt.left+(be=="window"?0:Ca());Ee.left+=Tt,Ee.right+=Tt}return Ee.top+=gt,Ee.bottom+=gt,Ee}function Xl(re,ce,Ee){if(Ee=="div")return ce;var be=ce.left,Oe=ce.top;if(Ee=="page")be-=Ca(),Oe-=Oa();else if(Ee=="local"||!Ee){var qe=re.display.sizer.getBoundingClientRect();be+=qe.left,Oe+=qe.top}var gt=re.display.lineSpace.getBoundingClientRect();return{left:be-gt.left,top:Oe-gt.top}}function Ga(re,ce,Ee,be,Oe){return be||(be=Nn(re.doc,ce.line)),ga(re,be,ju(re,be,ce.ch,Oe),Ee)}function co(re,ce,Ee,be,Oe,qe){be=be||Nn(re.doc,ce.line),Oe||(Oe=Sl(re,be));function gt(rr,or){var pr=Os(re,Oe,rr,or?"right":"left",qe);return or?pr.left=pr.right:pr.right=pr.left,ga(re,be,pr,Ee)}var Lt=$t(be,re.doc.direction),Tt=ce.ch,It=ce.sticky;if(Tt>=be.text.length?(Tt=be.text.length,It="before"):Tt<=0&&(Tt=0,It="after"),!Lt)return gt(It=="before"?Tt-1:Tt,It=="before");function nn(rr,or,pr){var Nr=Lt[or],Yr=Nr.level==1;return gt(pr?rr-1:rr,Yr!=pr)}var zt=Ot(Lt,Tt,It),xn=Nt,fn=nn(Tt,zt,It=="before");return xn!=null&&(fn.other=nn(Tt,xn,It!="before")),fn}function io(re,ce){var Ee=0;ce=er(re.doc,ce),re.options.lineWrapping||(Ee=Fs(re.display)*ce.ch);var be=Nn(re.doc,ce.line),Oe=Cr(be)+Ni(re.display);return{left:Ee,right:Ee,top:Oe,bottom:Oe+be.height}}function Ji(re,ce,Ee,be,Oe){var qe=Jt(re,ce,Ee);return qe.xRel=Oe,be&&(qe.outside=be),qe}function sa(re,ce,Ee){var be=re.doc;if(Ee+=re.display.viewOffset,Ee<0)return Ji(be.first,0,null,-1,-1);var Oe=Wt(be,Ee),qe=be.first+be.size-1;if(Oe>qe)return Ji(be.first+be.size-1,Nn(be,qe).text.length,null,1,1);ce<0&&(ce=0);for(var gt=Nn(be,Oe);;){var Lt=kn(re,gt,Oe,ce,Ee),Tt=Fn(gt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!Tt)return Lt;var It=Tt.find(1);if(It.line==Oe)return It;gt=Nn(be,Oe=It.line)}}function xr(re,ce,Ee,be){be-=aa(ce);var Oe=ce.text.length,qe=St(function(gt){return Os(re,Ee,gt-1).bottom<=be},Oe,0);return Oe=St(function(gt){return Os(re,Ee,gt).top>be},qe,Oe),{begin:qe,end:Oe}}function da(re,ce,Ee,be){Ee||(Ee=Sl(re,ce));var Oe=ga(re,ce,Os(re,Ee,be),"line").top;return xr(re,ce,Ee,Oe)}function Gt(re,ce,Ee,be){return re.bottom<=Ee?!1:re.top>Ee?!0:(be?re.left:re.right)>ce}function kn(re,ce,Ee,be,Oe){Oe-=Cr(ce);var qe=Sl(re,ce),gt=aa(ce),Lt=0,Tt=ce.text.length,It=!0,nn=$t(ce,re.doc.direction);if(nn){var zt=(re.options.lineWrapping?jl:Hs)(re,ce,Ee,qe,nn,be,Oe);It=zt.level!=1,Lt=It?zt.from:zt.to-1,Tt=It?zt.to:zt.from-1}var xn=null,fn=null,rr=St(function(ji){var Rr=Os(re,qe,ji);return Rr.top+=gt,Rr.bottom+=gt,Gt(Rr,be,Oe,!1)?(Rr.top<=Oe&&Rr.left<=be&&(xn=ji,fn=Rr),!0):!1},Lt,Tt),or,pr,Nr=!1;if(fn){var Yr=be-fn.left<fn.right-be,Gr=Yr==It;rr=xn+(Gr?0:1),pr=Gr?"after":"before",or=Yr?fn.left:fn.right}else{!It&&(rr==Tt||rr==Lt)&&rr++,pr=rr==0?"after":rr==ce.text.length?"before":Os(re,qe,rr-(It?1:0)).bottom+gt<=Oe==It?"after":"before";var ii=co(re,Jt(Ee,rr,pr),"line",ce,qe);or=ii.left,Nr=Oe<ii.top?-1:Oe>=ii.bottom?1:0}return rr=rt(ce.text,rr,1),Ji(Ee,rr,pr,Nr,be-or)}function Hs(re,ce,Ee,be,Oe,qe,gt){var Lt=St(function(zt){var xn=Oe[zt],fn=xn.level!=1;return Gt(co(re,Jt(Ee,fn?xn.to:xn.from,fn?"before":"after"),"line",ce,be),qe,gt,!0)},0,Oe.length-1),Tt=Oe[Lt];if(Lt>0){var It=Tt.level!=1,nn=co(re,Jt(Ee,It?Tt.from:Tt.to,It?"after":"before"),"line",ce,be);Gt(nn,qe,gt,!0)&&nn.top>gt&&(Tt=Oe[Lt-1])}return Tt}function jl(re,ce,Ee,be,Oe,qe,gt){var Lt=xr(re,ce,be,gt),Tt=Lt.begin,It=Lt.end;/\s/.test(ce.text.charAt(It-1))&&It--;for(var nn=null,zt=null,xn=0;xn<Oe.length;xn++){var fn=Oe[xn];if(!(fn.from>=It||fn.to<=Tt)){var rr=fn.level!=1,or=Os(re,be,rr?Math.min(It,fn.to)-1:Math.max(Tt,fn.from)).right,pr=or<qe?qe-or+1e9:or-qe;(!nn||zt>pr)&&(nn=fn,zt=pr)}}return nn||(nn=Oe[Oe.length-1]),nn.from<Tt&&(nn={from:Tt,to:nn.to,level:nn.level}),nn.to>It&&(nn={from:nn.from,to:It,level:nn.level}),nn}var Qo;function Pa(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Qo==null){Qo=Ae("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Qo.appendChild(document.createTextNode("x")),Qo.appendChild(Ae("br"));Qo.appendChild(document.createTextNode("x"))}Ne(re.measure,Qo);var Ee=Qo.offsetHeight/50;return Ee>3&&(re.cachedTextHeight=Ee),Fe(re.measure),Ee||1}function Fs(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var ce=Ae("span","xxxxxxxxxx"),Ee=Ae("pre",[ce],"CodeMirror-line-like");Ne(re.measure,Ee);var be=ce.getBoundingClientRect(),Oe=(be.right-be.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function ol(re){for(var ce=re.display,Ee={},be={},Oe=ce.gutters.clientLeft,qe=ce.gutters.firstChild,gt=0;qe;qe=qe.nextSibling,++gt){var Lt=re.display.gutterSpecs[gt].className;Ee[Lt]=qe.offsetLeft+qe.clientLeft+Oe,be[Lt]=qe.clientWidth}return{fixedPos:Fu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Ee,gutterWidth:be,wrapperWidth:ce.wrapper.clientWidth}}function Fu(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var ce=Pa(re.display),Ee=re.options.lineWrapping,be=Ee&&Math.max(5,re.display.scroller.clientWidth/Fs(re.display)-3);return function(Oe){if(ln(re.doc,Oe))return 0;var qe=0;if(Oe.widgets)for(var gt=0;gt<Oe.widgets.length;gt++)Oe.widgets[gt].height&&(qe+=Oe.widgets[gt].height);return Ee?qe+(Math.ceil(Oe.text.length/be)||1)*ce:qe+ce}}function fi(re){var ce=re.doc,Ee=Oo(re);ce.iter(function(be){var Oe=Ee(be);Oe!=be.height&&Xn(be,Oe)})}function Ua(re,ce,Ee,be){var Oe=re.display;if(!Ee&&Ur(ce).getAttribute("cm-not-content")=="true")return null;var qe,gt,Lt=Oe.lineSpace.getBoundingClientRect();try{qe=ce.clientX-Lt.left,gt=ce.clientY-Lt.top}catch(zt){return null}var Tt=sa(re,qe,gt),It;if(be&&Tt.xRel>0&&(It=Nn(re.doc,Tt.line).text).length==Tt.ch){var nn=$e(It,It.length,re.options.tabSize)-It.length;Tt=Jt(Tt.line,Math.max(0,Math.round((qe-ja(re.display).left)/Fs(re.display))-nn))}return Tt}function Ds(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var Ee=re.display.view,be=0;be<Ee.length;be++)if(ce-=Ee[be].size,ce<0)return be}function Fo(re,ce,Ee,be){ce==null&&(ce=re.doc.first),Ee==null&&(Ee=re.doc.first+re.doc.size),be||(be=0);var Oe=re.display;if(be&&Ee<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>ce)&&(Oe.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=Oe.viewTo)pn&&Vn(re.doc,ce)<Oe.viewTo&&Go(re);else if(Ee<=Oe.viewFrom)pn&&Wn(re.doc,Ee+be)>Oe.viewFrom?Go(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(ce<=Oe.viewFrom&&Ee>=Oe.viewTo)Go(re);else if(ce<=Oe.viewFrom){var qe=ps(re,Ee,Ee+be,1);qe?(Oe.view=Oe.view.slice(qe.index),Oe.viewFrom=qe.lineN,Oe.viewTo+=be):Go(re)}else if(Ee>=Oe.viewTo){var gt=ps(re,ce,ce,-1);gt?(Oe.view=Oe.view.slice(0,gt.index),Oe.viewTo=gt.lineN):Go(re)}else{var Lt=ps(re,ce,ce,-1),Tt=ps(re,Ee,Ee+be,1);Lt&&Tt?(Oe.view=Oe.view.slice(0,Lt.index).concat(ei(re,Lt.lineN,Tt.lineN)).concat(Oe.view.slice(Tt.index)),Oe.viewTo+=be):Go(re)}var It=Oe.externalMeasured;It&&(Ee<It.lineN?It.lineN+=be:ce<It.lineN+It.size&&(Oe.externalMeasured=null))}function Ri(re,ce,Ee){re.curOp.viewChanged=!0;var be=re.display,Oe=re.display.externalMeasured;if(Oe&&ce>=Oe.lineN&&ce<Oe.lineN+Oe.size&&(be.externalMeasured=null),!(ce<be.viewFrom||ce>=be.viewTo)){var qe=be.view[Ds(re,ce)];if(qe.node!=null){var gt=qe.changes||(qe.changes=[]);yt(gt,Ee)==-1&&gt.push(Ee)}}}function Go(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ps(re,ce,Ee,be){var Oe=Ds(re,ce),qe,gt=re.display.view;if(!pn||Ee==re.doc.first+re.doc.size)return{index:Oe,lineN:Ee};for(var Lt=re.display.viewFrom,Tt=0;Tt<Oe;Tt++)Lt+=gt[Tt].size;if(Lt!=ce){if(be>0){if(Oe==gt.length-1)return null;qe=Lt+gt[Oe].size-ce,Oe++}else qe=Lt-ce;ce+=qe,Ee+=qe}for(;Vn(re.doc,Ee)!=Ee;){if(Oe==(be<0?0:gt.length-1))return null;Ee+=be*gt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ee}}function xo(re,ce,Ee){var be=re.display,Oe=be.view;Oe.length==0||ce>=be.viewTo||Ee<=be.viewFrom?(be.view=ei(re,ce,Ee),be.viewFrom=ce):(be.viewFrom>ce?be.view=ei(re,ce,be.viewFrom).concat(be.view):be.viewFrom<ce&&(be.view=be.view.slice(Ds(re,ce))),be.viewFrom=ce,be.viewTo<Ee?be.view=be.view.concat(ei(re,be.viewTo,Ee)):be.viewTo>Ee&&(be.view=be.view.slice(0,Ds(re,Ee)))),be.viewTo=Ee}function Cs(re){for(var ce=re.display.view,Ee=0,be=0;be<ce.length;be++){var Oe=ce[be];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ee}return Ee}function ma(re){re.display.input.showSelection(re.display.input.prepareSelection())}function hu(re,ce){ce===void 0&&(ce=!0);for(var Ee=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),qe=be.selection=document.createDocumentFragment(),gt=0;gt<Ee.sel.ranges.length;gt++)if(!(!ce&&gt==Ee.sel.primIndex)){var Lt=Ee.sel.ranges[gt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var Tt=Lt.empty();(Tt||re.options.showCursorWhenSelecting)&&oo(re,Lt.head,Oe),Tt||no(re,Lt,qe)}}return be}function oo(re,ce,Ee){var be=co(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=be.left+"px",Oe.style.top=be.top+"px",Oe.style.height=Math.max(0,be.bottom-be.top)*re.options.cursorHeight+"px",be.other){var qe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));qe.style.display="",qe.style.left=be.other.left+"px",qe.style.top=be.other.top+"px",qe.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,ce){return re.top-ce.top||re.left-ce.left}function no(re,ce,Ee){var be=re.display,Oe=re.doc,qe=document.createDocumentFragment(),gt=ja(re.display),Lt=gt.left,Tt=Math.max(be.sizerWidth,fs(re)-be.sizer.offsetLeft)-gt.right,It=Oe.direction=="ltr";function nn(Gr,ii,ji,Rr){ii<0&&(ii=0),ii=Math.round(ii),Rr=Math.round(Rr),qe.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+Gr+`px;
top: `+ii+"px; width: "+(ji==null?Tt-Gr:ji)+`px;
height: `+(Rr-ii)+"px"))}function zt(Gr,ii,ji){var Rr=Nn(Oe,Gr),eo=Rr.text.length,Yo,Ia;function ia(Ma,Xs){return Ga(re,Jt(Gr,Ma),"div",Rr,Xs)}function Rs(Ma,Xs,as){var La=da(re,Rr,null,Ma),mo=Xs=="ltr"==(as=="after")?"left":"right",ua=as=="after"?La.begin:La.end-(/\s/.test(Rr.text.charAt(La.end-1))?2:1);return ia(ua,mo)[mo]}var ms=$t(Rr,Oe.direction);return Ct(ms,ii||0,ji==null?eo:ji,function(Ma,Xs,as,La){var mo=as=="ltr",ua=ia(Ma,mo?"left":"right"),Xa=ia(Xs-1,mo?"right":"left"),ss=ii==null&&Ma==0,Bl=ji==null&&Xs==eo,oa=La==0,bl=!ms||La==ms.length-1;if(Xa.top-ua.top<=3){var pa=(It?ss:Bl)&&oa,Af=(It?Bl:ss)&&bl,cl=pa?Lt:(mo?ua:Xa).left,Ys=Af?Tt:(mo?Xa:ua).right;nn(cl,ua.top,Ys-cl,ua.bottom)}else{var _s,Bo,Ya,yu;mo?(_s=It&&ss&&oa?Lt:ua.left,Bo=It?Tt:Rs(Ma,as,"before"),Ya=It?Lt:Rs(Xs,as,"after"),yu=It&&Bl&&bl?Tt:Xa.right):(_s=It?Rs(Ma,as,"before"):Lt,Bo=!It&&ss&&oa?Tt:ua.right,Ya=!It&&Bl&&bl?Lt:Xa.left,yu=It?Rs(Xs,as,"after"):Tt),nn(_s,ua.top,Bo-_s,ua.bottom),ua.bottom<Xa.top&&nn(Lt,ua.bottom,null,Xa.top),nn(Ya,Xa.top,yu-Ya,Xa.bottom)}(!Yo||Ea(ua,Yo)<0)&&(Yo=ua),Ea(Xa,Yo)<0&&(Yo=Xa),(!Ia||Ea(ua,Ia)<0)&&(Ia=ua),Ea(Xa,Ia)<0&&(Ia=Xa)}),{start:Yo,end:Ia}}var xn=ce.from(),fn=ce.to();if(xn.line==fn.line)zt(xn.line,xn.ch,fn.ch);else{var rr=Nn(Oe,xn.line),or=Nn(Oe,fn.line),pr=Ln(rr)==Ln(or),Nr=zt(xn.line,xn.ch,pr?rr.text.length+1:null).end,Yr=zt(fn.line,pr?0:null,fn.ch).start;pr&&(Nr.top<Yr.top-2?(nn(Nr.right,Nr.top,null,Nr.bottom),nn(Lt,Yr.top,Yr.left,Yr.bottom)):nn(Nr.right,Nr.top,Yr.left-Nr.right,Nr.bottom)),Nr.bottom<Yr.top&&nn(Lt,Nr.bottom,null,Yr.top)}Ee.appendChild(qe)}function wo(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var Ee=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Du(re),ce.cursorDiv.style.visibility=(Ee=!Ee)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function Eo(re){re.state.focused||(re.display.input.focus(),ho(re))}function Uo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Du(re))},100)}function ho(re,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(tn(re,"focus",re,ce),re.state.focused=!0,Ve(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),me&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),wo(re))}function Du(re,ce){re.state.delayingBlurEvent||(re.state.focused&&(tn(re,"blur",re,ce),re.state.focused=!1,Be(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function ai(re){for(var ce=re.display,Ee=ce.lineDiv.offsetTop,be=0;be<ce.view.length;be++){var Oe=ce.view[be],qe=re.options.lineWrapping,gt=void 0,Lt=0;if(!Oe.hidden){if(De&&fe<8){var Tt=Oe.node.offsetTop+Oe.node.offsetHeight;gt=Tt-Ee,Ee=Tt}else{var It=Oe.node.getBoundingClientRect();gt=It.bottom-It.top,!qe&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-It.left-1)}var nn=Oe.line.height-gt;if((nn>.005||nn<-.005)&&(Xn(Oe.line,gt),uf(Oe.line),Oe.rest))for(var zt=0;zt<Oe.rest.length;zt++)uf(Oe.rest[zt]);if(Lt>re.display.sizerWidth){var xn=Math.ceil(Lt/Fs(re.display));xn>re.display.maxLineLength&&(re.display.maxLineLength=xn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var Ee=re.widgets[ce],be=Ee.node.parentNode;be&&(Ee.height=be.offsetHeight)}}function Qi(re,ce,Ee){var be=Ee&&Ee.top!=null?Math.max(0,Ee.top):re.scroller.scrollTop;be=Math.floor(be-Ni(re));var Oe=Ee&&Ee.bottom!=null?Ee.bottom:be+re.wrapper.clientHeight,qe=Wt(ce,be),gt=Wt(ce,Oe);if(Ee&&Ee.ensure){var Lt=Ee.ensure.from.line,Tt=Ee.ensure.to.line;Lt<qe?(qe=Lt,gt=Wt(ce,Cr(Nn(ce,Lt))+re.wrapper.clientHeight)):Math.min(Tt,ce.lastLine())>=gt&&(qe=Wt(ce,Cr(Nn(ce,Tt))-re.wrapper.clientHeight),gt=Tt)}return{from:qe,to:Math.max(gt,qe+1)}}function Cc(re,ce){if(!Ut(re,"scrollCursorIntoView")){var Ee=re.display,be=Ee.sizer.getBoundingClientRect(),Oe=null;if(ce.top+be.top<0?Oe=!0:ce.bottom+be.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!we){var qe=Ae("div","\u200B",null,`position: absolute;
top: `+(ce.top-Ee.viewOffset-Ni(re.display))+`px;
height: `+(ce.bottom-ce.top+vo(re)+Ee.barHeight)+`px;
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild(qe),qe.scrollIntoView(Oe),re.display.lineSpace.removeChild(qe)}}}function cu(re,ce,Ee,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&ce==Ee&&(ce=ce.ch?Jt(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Ee=ce.sticky=="before"?Jt(ce.line,ce.ch+1,"before"):ce);for(var qe=0;qe<5;qe++){var gt=!1,Lt=co(re,ce),Tt=!Ee||Ee==ce?Lt:co(re,Ee);Oe={left:Math.min(Lt.left,Tt.left),top:Math.min(Lt.top,Tt.top)-be,right:Math.max(Lt.left,Tt.left),bottom:Math.max(Lt.bottom,Tt.bottom)+be};var It=Ec(re,Oe),nn=re.doc.scrollTop,zt=re.doc.scrollLeft;if(It.scrollTop!=null&&(Yl(re,It.scrollTop),Math.abs(re.doc.scrollTop-nn)>1&&(gt=!0)),It.scrollLeft!=null&&($l(re,It.scrollLeft),Math.abs(re.doc.scrollLeft-zt)>1&&(gt=!0)),!gt)break}return Oe}function ih(re,ce){var Ee=Ec(re,ce);Ee.scrollTop!=null&&Yl(re,Ee.scrollTop),Ee.scrollLeft!=null&&$l(re,Ee.scrollLeft)}function Ec(re,ce){var Ee=re.display,be=Pa(re.display);ce.top<0&&(ce.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ee.scroller.scrollTop,qe=ds(re),gt={};ce.bottom-ce.top>qe&&(ce.bottom=ce.top+qe);var Lt=re.doc.height+Vo(Ee),Tt=ce.top<be,It=ce.bottom>Lt-be;if(ce.top<Oe)gt.scrollTop=Tt?0:ce.top;else if(ce.bottom>Oe+qe){var nn=Math.min(ce.top,(It?Lt:ce.bottom)-qe);nn!=Oe&&(gt.scrollTop=nn)}var zt=re.options.fixedGutter?0:Ee.gutters.offsetWidth,xn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ee.scroller.scrollLeft-zt,fn=fs(re)-Ee.gutters.offsetWidth,rr=ce.right-ce.left>fn;return rr&&(ce.right=ce.left+fn),ce.left<10?gt.scrollLeft=0:ce.left<xn?gt.scrollLeft=Math.max(0,ce.left+zt-(rr?0:10)):ce.right>fn+xn-3&&(gt.scrollLeft=ce.right+(rr?0:10)-fn),gt}function _h(re,ce){ce!=null&&(al(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function Ol(re){al(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function Bu(re,ce,Ee){(ce!=null||Ee!=null)&&al(re),ce!=null&&(re.curOp.scrollLeft=ce),Ee!=null&&(re.curOp.scrollTop=Ee)}function lo(re,ce){al(re),re.curOp.scrollToPos=ce}function al(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var Ee=io(re,ce.from),be=io(re,ce.to);zh(re,Ee,be,ce.margin)}}function zh(re,ce,Ee,be){var Oe=Ec(re,{left:Math.min(ce.left,Ee.left),top:Math.min(ce.top,Ee.top)-be,right:Math.max(ce.right,Ee.right),bottom:Math.max(ce.bottom,Ee.bottom)+be});Bu(re,Oe.scrollLeft,Oe.scrollTop)}function Yl(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(ht||ah(re,{top:ce}),kc(re,ce,!0),ht&&ah(re),Tc(re,100))}function kc(re,ce,Ee){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!Ee)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function $l(re,ce,Ee,be){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ee?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!be)&&(re.doc.scrollLeft=ce,td(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function Gi(re){var ce=re.display,Ee=ce.gutters.offsetWidth,be=Math.round(re.doc.height+Vo(re.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:re.options.fixedGutter?Ee:0,docHeight:be,scrollHeight:be+vo(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Ee}}var ao=function(re,ce,Ee){this.cm=Ee;var be=this.vert=Ae("div",[Ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Ae("div",[Ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),rn(be,"scroll",function(){be.clientHeight&&ce(be.scrollTop,"vertical")}),rn(Oe,"scroll",function(){Oe.clientWidth&&ce(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,De&&fe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ao.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,Ee=re.scrollHeight>re.clientHeight+1,be=re.nativeBarWidth;if(Ee){this.vert.style.display="block",this.vert.style.bottom=ce?be+"px":"0";var Oe=re.viewHeight-(ce?be:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Oe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=Ee?be+"px":"0",this.horiz.style.left=re.barLeft+"px";var qe=re.viewWidth-re.barLeft-(Ee?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+qe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(be==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ee?be:0,bottom:ce?be:0}},ao.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ao.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ao.prototype.zeroWidthHack=function(){var re=ae&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new nt,this.disableVert=new nt},ao.prototype.enableZeroWidthBar=function(re,ce,Ee){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),qe=Ee=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);qe!=re?re.style.pointerEvents="none":ce.set(1e3,be)}ce.set(1e3,be)},ao.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Xo=function(){};Xo.prototype.update=function(){return{bottom:0,right:0}},Xo.prototype.setScrollLeft=function(){},Xo.prototype.setScrollTop=function(){},Xo.prototype.clear=function(){};function Fa(re,ce){ce||(ce=Gi(re));var Ee=re.display.barWidth,be=re.display.barHeight;ka(re,ce);for(var Oe=0;Oe<4&&Ee!=re.display.barWidth||be!=re.display.barHeight;Oe++)Ee!=re.display.barWidth&&re.options.lineWrapping&&ai(re),ka(re,Gi(re)),Ee=re.display.barWidth,be=re.display.barHeight}function ka(re,ce){var Ee=re.display,be=Ee.scrollbars.update(ce);Ee.sizer.style.paddingRight=(Ee.barWidth=be.right)+"px",Ee.sizer.style.paddingBottom=(Ee.barHeight=be.bottom)+"px",Ee.heightForcer.style.borderBottom=be.bottom+"px solid transparent",be.right&&be.bottom?(Ee.scrollbarFiller.style.display="block",Ee.scrollbarFiller.style.height=be.bottom+"px",Ee.scrollbarFiller.style.width=be.right+"px"):Ee.scrollbarFiller.style.display="",be.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ee.gutterFiller.style.display="block",Ee.gutterFiller.style.height=be.bottom+"px",Ee.gutterFiller.style.width=ce.gutterWidth+"px"):Ee.gutterFiller.style.display=""}var fu={native:ao,null:Xo};function Jl(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Be(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new fu[re.options.scrollbarStyle](function(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),rn(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Ee){Ee=="horizontal"?$l(re,ce):Yl(re,ce)},re),re.display.scrollbars.addClass&&Ve(re.display.wrapper,re.display.scrollbars.addClass)}var du=0;function sl(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++du},_o(re.curOp)}function Fl(re){var ce=re.curOp;ce&&Ps(ce,function(Ee){for(var be=0;be<Ee.ops.length;be++)Ee.ops[be].cm.curOp=null;J0(Ee)})}function J0(re){for(var ce=re.ops,Ee=0;Ee<ce.length;Ee++)Q0(ce[Ee]);for(var be=0;be<ce.length;be++)q0(ce[be]);for(var Oe=0;Oe<ce.length;Oe++)Rg(ce[Oe]);for(var qe=0;qe<ce.length;qe++)la(ce[qe]);for(var gt=0;gt<ce.length;gt++)oh(ce[gt])}function Q0(re){var ce=re.cm,Ee=ce.display;_g(ce),re.updateMaxLine&&Er(ce),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Ee.viewFrom||re.scrollToPos.to.line>=Ee.viewTo)||Ee.maxLineChanged&&ce.options.lineWrapping,re.update=re.mustUpdate&&new Gh(ce,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function q0(re){re.updatedDisplay=re.mustUpdate&&ed(re.cm,re.update)}function Rg(re){var ce=re.cm,Ee=ce.display;re.updatedDisplay&&ai(ce),re.barMeasure=Gi(ce),Ee.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=ju(ce,Ee.maxLine,Ee.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ee.scroller.clientWidth,Ee.sizer.offsetLeft+re.adjustWidthTo+vo(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,Ee.sizer.offsetLeft+re.adjustWidthTo-fs(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ee.input.prepareSelection())}function la(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&$l(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Ee=re.focus&&re.focus==Ue();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,Ee),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&Fa(ce,re.barMeasure),re.updatedDisplay&&lh(ce,re.barMeasure),re.selectionChanged&&wo(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),Ee&&Eo(re.cm)}function oh(re){var ce=re.cm,Ee=ce.display,be=ce.doc;if(re.updatedDisplay&&ko(ce,re.update),Ee.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ee.wheelStartX=Ee.wheelStartY=null),re.scrollTop!=null&&kc(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&$l(ce,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=cu(ce,er(be,re.scrollToPos.from),er(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(ce,Oe)}var qe=re.maybeHiddenMarkers,gt=re.maybeUnhiddenMarkers;if(qe)for(var Lt=0;Lt<qe.length;++Lt)qe[Lt].lines.length||tn(qe[Lt],"hide");if(gt)for(var Tt=0;Tt<gt.length;++Tt)gt[Tt].lines.length&&tn(gt[Tt],"unhide");Ee.wrapper.offsetHeight&&(be.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&tn(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function yo(re,ce){if(re.curOp)return ce();sl(re);try{return ce()}finally{Fl(re)}}function Da(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);sl(re);try{return ce.apply(re,arguments)}finally{Fl(re)}}}function Wa(re){return function(){if(this.curOp)return re.apply(this,arguments);sl(this);try{return re.apply(this,arguments)}finally{Fl(this)}}}function Ha(re){return function(){var ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);sl(ce);try{return re.apply(this,arguments)}finally{Fl(ce)}}}function Tc(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,ct(Ka,re))}function Ka(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var Ee=+new Date+re.options.workTime,be=zi(re,ce.highlightFrontier),Oe=[];ce.iter(be.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function(qe){if(be.line>=re.display.viewFrom){var gt=qe.styles,Lt=qe.text.length>re.options.maxHighlightLength?fr(ce.mode,be.state):null,Tt=Vr(re,qe,be,!0);Lt&&(be.state=Lt),qe.styles=Tt.styles;var It=qe.styleClasses,nn=Tt.classes;nn?qe.styleClasses=nn:It&&(qe.styleClasses=null);for(var zt=!gt||gt.length!=qe.styles.length||It!=nn&&(!It||!nn||It.bgClass!=nn.bgClass||It.textClass!=nn.textClass),xn=0;!zt&&xn<gt.length;++xn)zt=gt[xn]!=qe.styles[xn];zt&&Oe.push(be.line),qe.stateAfter=be.save(),be.nextLine()}else qe.text.length<=re.options.maxHighlightLength&&Yt(re,qe.text,be),qe.stateAfter=be.line%5==0?be.save():null,be.nextLine();if(+new Date>Ee)return Tc(re,re.options.workDelay),!0}),ce.highlightFrontier=be.line,ce.modeFrontier=Math.max(ce.modeFrontier,be.line),Oe.length&&yo(re,function(){for(var qe=0;qe<Oe.length;qe++)Ri(re,Oe[qe],"text")})}}var Gh=function(re,ce,Ee){var be=re.display;this.viewport=ce,this.visible=Qi(be,re.doc,ce),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=fs(re),this.force=Ee,this.dims=ol(re),this.events=[]};Gh.prototype.signal=function(re,ce){bn(re,ce)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)tn.apply(null,this.events[re])};function _g(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=vo(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=vo(re)+"px",ce.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var ce=Ue();if(!ce||!Ye(re.display.lineDiv,ce))return null;var Ee={activeElt:ce};if(window.getSelection){var be=window.getSelection();be.anchorNode&&be.extend&&Ye(re.display.lineDiv,be.anchorNode)&&(Ee.anchorNode=be.anchorNode,Ee.anchorOffset=be.anchorOffset,Ee.focusNode=be.focusNode,Ee.focusOffset=be.focusOffset)}return Ee}function Bs(re){if(!(!re||!re.activeElt||re.activeElt==Ue())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Ye(document.body,re.anchorNode)&&Ye(document.body,re.focusNode))){var ce=window.getSelection(),Ee=document.createRange();Ee.setEnd(re.anchorNode,re.anchorOffset),Ee.collapse(!1),ce.removeAllRanges(),ce.addRange(Ee),ce.extend(re.focusNode,re.focusOffset)}}function ed(re,ce){var Ee=re.display,be=re.doc;if(ce.editorIsHidden)return Go(re),!1;if(!ce.force&&ce.visible.from>=Ee.viewFrom&&ce.visible.to<=Ee.viewTo&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo)&&Ee.renderedView==Ee.view&&Cs(re)==0)return!1;ba(re)&&(Go(re),ce.dims=ol(re));var Oe=be.first+be.size,qe=Math.max(ce.visible.from-re.options.viewportMargin,be.first),gt=Math.min(Oe,ce.visible.to+re.options.viewportMargin);Ee.viewFrom<qe&&qe-Ee.viewFrom<20&&(qe=Math.max(be.first,Ee.viewFrom)),Ee.viewTo>gt&&Ee.viewTo-gt<20&&(gt=Math.min(Oe,Ee.viewTo)),pn&&(qe=Vn(re.doc,qe),gt=Wn(re.doc,gt));var Lt=qe!=Ee.viewFrom||gt!=Ee.viewTo||Ee.lastWrapHeight!=ce.wrapperHeight||Ee.lastWrapWidth!=ce.wrapperWidth;xo(re,qe,gt),Ee.viewOffset=Cr(Nn(re.doc,Ee.viewFrom)),re.display.mover.style.top=Ee.viewOffset+"px";var Tt=Cs(re);if(!Lt&&Tt==0&&!ce.force&&Ee.renderedView==Ee.view&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo))return!1;var It=zg(re);return Tt>4&&(Ee.lineDiv.style.display="none"),lp(re,Ee.updateLineNumbers,ce.dims),Tt>4&&(Ee.lineDiv.style.display=""),Ee.renderedView=Ee.view,Bs(It),Fe(Ee.cursorDiv),Fe(Ee.selectionDiv),Ee.gutters.style.height=Ee.sizer.style.minHeight=0,Lt&&(Ee.lastWrapHeight=ce.wrapperHeight,Ee.lastWrapWidth=ce.wrapperWidth,Tc(re,400)),Ee.updateLineNumbers=null,!0}function ko(re,ce){for(var Ee=ce.viewport,be=!0;;be=!1){if(!be||!re.options.lineWrapping||ce.oldDisplayWidth==fs(re)){if(Ee&&Ee.top!=null&&(Ee={top:Math.min(re.doc.height+Vo(re.display)-ds(re),Ee.top)}),ce.visible=Qi(re.display,re.doc,Ee),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else be&&(ce.visible=Qi(re.display,re.doc,Ee));if(!ed(re,ce))break;ai(re);var Oe=Gi(re);ma(re),Fa(re,Oe),lh(re,Oe),ce.force=!1}ce.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(ce.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function ah(re,ce){var Ee=new Gh(re,ce);if(ed(re,Ee)){ai(re),ko(re,Ee);var be=Gi(re);ma(re),Fa(re,be),lh(re,be),Ee.finish()}}function lp(re,ce,Ee){var be=re.display,Oe=re.options.lineNumbers,qe=be.lineDiv,gt=qe.firstChild;function Lt(rr){var or=rr.nextSibling;return me&&ae&&re.display.currentWheelTarget==rr?rr.style.display="none":rr.parentNode.removeChild(rr),or}for(var Tt=be.view,It=be.viewFrom,nn=0;nn<Tt.length;nn++){var zt=Tt[nn];if(!zt.hidden)if(!zt.node||zt.node.parentNode!=qe){var xn=Ei(re,zt,It,Ee);qe.insertBefore(xn,gt)}else{for(;gt!=zt.node;)gt=Lt(gt);var fn=Oe&&ce!=null&&ce<=It&&zt.lineNumber;zt.changes&&(yt(zt.changes,"gutter")>-1&&(fn=!1),bo(re,zt,It,Ee)),fn&&(Fe(zt.lineNumber),zt.lineNumber.appendChild(document.createTextNode(Cn(re.options,It)))),gt=zt.node.nextSibling}It+=zt.size}for(;gt;)gt=Lt(gt)}function sh(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function lh(re,ce){re.display.sizer.style.minHeight=ce.docHeight+"px",re.display.heightForcer.style.top=ce.docHeight+"px",re.display.gutters.style.height=ce.docHeight+re.display.barHeight+vo(re)+"px"}function td(re){var ce=re.display,Ee=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var be=Fu(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,Oe=ce.gutters.offsetWidth,qe=be+"px",gt=0;gt<Ee.length;gt++)if(!Ee[gt].hidden){re.options.fixedGutter&&(Ee[gt].gutter&&(Ee[gt].gutter.style.left=qe),Ee[gt].gutterBackground&&(Ee[gt].gutterBackground.style.left=qe));var Lt=Ee[gt].alignable;if(Lt)for(var Tt=0;Tt<Lt.length;Tt++)Lt[Tt].style.left=qe}re.options.fixedGutter&&(ce.gutters.style.left=be+Oe+"px")}}function ba(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,Ee=Cn(re.options,ce.first+ce.size-1),be=re.display;if(Ee.length!=be.lineNumChars){var Oe=be.measure.appendChild(Ae("div",[Ae("div",Ee)],"CodeMirror-linenumber CodeMirror-gutter-elt")),qe=Oe.firstChild.offsetWidth,gt=Oe.offsetWidth-qe;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max(qe,be.lineGutter.offsetWidth-gt)+1,be.lineNumWidth=be.lineNumInnerWidth+gt,be.lineNumChars=be.lineNumInnerWidth?Ee.length:-1,be.lineGutter.style.width=be.lineNumWidth+"px",sh(re.display),!0}return!1}function Va(re,ce){for(var Ee=[],be=!1,Oe=0;Oe<re.length;Oe++){var qe=re[Oe],gt=null;if(typeof qe!="string"&&(gt=qe.style,qe=qe.className),qe=="CodeMirror-linenumbers")if(ce)be=!0;else continue;Ee.push({className:qe,style:gt})}return ce&&!be&&Ee.push({className:"CodeMirror-linenumbers",style:null}),Ee}function Uh(re){var ce=re.gutters,Ee=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var be=0;be<Ee.length;++be){var Oe=Ee[be],qe=Oe.className,gt=Oe.style,Lt=ce.appendChild(Ae("div",null,"CodeMirror-gutter "+qe));gt&&(Lt.style.cssText=gt),qe=="CodeMirror-linenumbers"&&(re.lineGutter=Lt,Lt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=Ee.length?"":"none",sh(re)}function ll(re){Uh(re.display),Fo(re),td(re)}function uh(re,ce,Ee,be){var Oe=this;this.input=Ee,Oe.scrollbarFiller=Ae("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Ae("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Re("div",null,"CodeMirror-code"),Oe.selectionDiv=Ae("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Ae("div",null,"CodeMirror-cursors"),Oe.measure=Ae("div",null,"CodeMirror-measure"),Oe.lineMeasure=Ae("div",null,"CodeMirror-measure"),Oe.lineSpace=Re("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var qe=Re("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Ae("div",[qe],null,"position: relative"),Oe.sizer=Ae("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Ae("div",null,null,"position: absolute; height: "+xt+"px; width: 1px;"),Oe.gutters=Ae("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Ae("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Ae("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),De&&fe<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!me&&!(ht&&ee)&&(Oe.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Oe.wrapper):re(Oe.wrapper)),Oe.viewFrom=Oe.viewTo=ce.first,Oe.reportedViewFrom=Oe.reportedViewTo=ce.first,Oe.view=[],Oe.renderedView=null,Oe.externalMeasured=null,Oe.viewOffset=0,Oe.lastWrapHeight=Oe.lastWrapWidth=0,Oe.updateLineNumbers=null,Oe.nativeBarWidth=Oe.barHeight=Oe.barWidth=0,Oe.scrollbarsClipped=!1,Oe.lineNumWidth=Oe.lineNumInnerWidth=Oe.lineNumChars=null,Oe.alignWidgets=!1,Oe.cachedCharWidth=Oe.cachedTextHeight=Oe.cachedPaddingH=null,Oe.maxLine=null,Oe.maxLineLength=0,Oe.maxLineChanged=!1,Oe.wheelDX=Oe.wheelDY=Oe.wheelStartX=Oe.wheelStartY=null,Oe.shift=!1,Oe.selForContextMenu=null,Oe.activeTouch=null,Oe.gutterSpecs=Va(be.gutters,be.lineNumbers),Uh(Oe),Ee.init(Oe)}var Ks=0,va=null;De?va=-.53:ht?va=15:Ce?va=-.7:Le&&(va=-1/3);function Ql(re){var ce=re.wheelDeltaX,Ee=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),Ee==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ee=re.detail:Ee==null&&(Ee=re.wheelDelta),{x:ce,y:Ee}}function ul(re){var ce=Ql(re);return ce.x*=va,ce.y*=va,ce}function Za(re,ce){var Ee=Ql(ce),be=Ee.x,Oe=Ee.y,qe=re.display,gt=qe.scroller,Lt=gt.scrollWidth>gt.clientWidth,Tt=gt.scrollHeight>gt.clientHeight;if(be&&Lt||Oe&&Tt){if(Oe&&ae&&me){e:for(var It=ce.target,nn=qe.view;It!=gt;It=It.parentNode)for(var zt=0;zt<nn.length;zt++)if(nn[zt].node==It){re.display.currentWheelTarget=It;break e}}if(be&&!ht&&!Se&&va!=null){Oe&&Tt&&Yl(re,Math.max(0,gt.scrollTop+Oe*va)),$l(re,Math.max(0,gt.scrollLeft+be*va)),(!Oe||Oe&&Tt)&&Qn(ce),qe.wheelStartX=null;return}if(Oe&&va!=null){var xn=Oe*va,fn=re.doc.scrollTop,rr=fn+qe.wrapper.clientHeight;xn<0?fn=Math.max(0,fn+xn-50):rr=Math.min(re.doc.height,rr+xn+50),ah(re,{top:fn,bottom:rr})}Ks<20&&(qe.wheelStartX==null?(qe.wheelStartX=gt.scrollLeft,qe.wheelStartY=gt.scrollTop,qe.wheelDX=be,qe.wheelDY=Oe,setTimeout(function(){if(qe.wheelStartX!=null){var or=gt.scrollLeft-qe.wheelStartX,pr=gt.scrollTop-qe.wheelStartY,Nr=pr&&qe.wheelDY&&pr/qe.wheelDY||or&&qe.wheelDX&&or/qe.wheelDX;qe.wheelStartX=qe.wheelStartY=null,Nr&&(va=(va*Ks+Nr)/(Ks+1),++Ks)}},200)):(qe.wheelDX+=be,qe.wheelDY+=Oe))}}var xl=function(re,ce){this.ranges=re,this.primIndex=ce};xl.prototype.primary=function(){return this.ranges[this.primIndex]},xl.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var Ee=this.ranges[ce],be=re.ranges[ce];if(!ur(Ee.anchor,be.anchor)||!ur(Ee.head,be.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new To(ar(this.ranges[ce].anchor),ar(this.ranges[ce].head));return new xl(re,this.primIndex)},xl.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},xl.prototype.contains=function(re,ce){ce||(ce=re);for(var Ee=0;Ee<this.ranges.length;Ee++){var be=this.ranges[Ee];if(_n(ce,be.from())>=0&&_n(re,be.to())<=0)return Ee}return-1};var To=function(re,ce){this.anchor=re,this.head=ce};To.prototype.from=function(){return Bn(this.anchor,this.head)},To.prototype.to=function(){return mr(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Dl(re,ce,Ee){var be=re&&re.options.selectionsMayTouch,Oe=ce[Ee];ce.sort(function(xn,fn){return _n(xn.from(),fn.from())}),Ee=yt(ce,Oe);for(var qe=1;qe<ce.length;qe++){var gt=ce[qe],Lt=ce[qe-1],Tt=_n(Lt.to(),gt.from());if(be&&!gt.empty()?Tt>0:Tt>=0){var It=Bn(Lt.from(),gt.from()),nn=mr(Lt.to(),gt.to()),zt=Lt.empty()?gt.from()==gt.head:Lt.from()==Lt.head;qe<=Ee&&--Ee,ce.splice(--qe,2,new To(zt?nn:It,zt?It:nn))}}return new xl(ce,Ee)}function Iu(re,ce){return new xl([new To(re,ce||re)],0)}function hh(re){return re.text?Jt(re.from.line+re.text.length-1,kt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Wh(re,ce){if(_n(re,ce.from)<0)return re;if(_n(re,ce.to)<=0)return hh(ce);var Ee=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,be=re.ch;return re.line==ce.to.line&&(be+=hh(ce).ch-ce.to.ch),Jt(Ee,be)}function hf(re,ce){for(var Ee=[],be=0;be<re.sel.ranges.length;be++){var Oe=re.sel.ranges[be];Ee.push(new To(Wh(Oe.anchor,ce),Wh(Oe.head,ce)))}return Dl(re.cm,Ee,re.sel.primIndex)}function Mc(re,ce,Ee){return re.line==ce.line?Jt(Ee.line,re.ch-ce.ch+Ee.ch):Jt(Ee.line+(re.line-ce.line),re.ch)}function cf(re,ce,Ee){for(var be=[],Oe=Jt(re.first,0),qe=Oe,gt=0;gt<ce.length;gt++){var Lt=ce[gt],Tt=Mc(Lt.from,Oe,qe),It=Mc(hh(Lt),Oe,qe);if(Oe=Lt.to,qe=It,Ee=="around"){var nn=re.sel.ranges[gt],zt=_n(nn.head,nn.anchor)<0;be[gt]=new To(zt?It:Tt,zt?Tt:It)}else be[gt]=new To(Tt,Tt)}return new xl(be,re.sel.primIndex)}function qi(re){re.doc.mode=dn(re.options,re.doc.modeOption),ff(re)}function ff(re){re.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Tc(re,100),re.state.modeGen++,re.curOp&&Fo(re)}function up(re,ce){return ce.from.ch==0&&ce.to.ch==0&&kt(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,ce,Ee,be){function Oe(Yr){return Ee?Ee[Yr]:null}function qe(Yr,Gr,ii){gi(Yr,Gr,ii,be),Ir(Yr,"change",Yr,ce)}function gt(Yr,Gr){for(var ii=[],ji=Yr;ji<Gr;++ji)ii.push(new xi(It[ji],Oe(ji),be));return ii}var Lt=ce.from,Tt=ce.to,It=ce.text,nn=Nn(re,Lt.line),zt=Nn(re,Tt.line),xn=kt(It),fn=Oe(It.length-1),rr=Tt.line-Lt.line;if(ce.full)re.insert(0,gt(0,It.length)),re.remove(It.length,re.size-It.length);else if(up(re,ce)){var or=gt(0,It.length-1);qe(zt,zt.text,fn),rr&&re.remove(Lt.line,rr),or.length&&re.insert(Lt.line,or)}else if(nn==zt)if(It.length==1)qe(nn,nn.text.slice(0,Lt.ch)+xn+nn.text.slice(Tt.ch),fn);else{var pr=gt(1,It.length-1);pr.push(new xi(xn+nn.text.slice(Tt.ch),fn,be)),qe(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),re.insert(Lt.line+1,pr)}else if(It.length==1)qe(nn,nn.text.slice(0,Lt.ch)+It[0]+zt.text.slice(Tt.ch),Oe(0)),re.remove(Lt.line+1,rr);else{qe(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),qe(zt,xn+zt.text.slice(Tt.ch),fn);var Nr=gt(1,It.length-1);rr>1&&re.remove(Lt.line+1,rr-1),re.insert(Lt.line+1,Nr)}Ir(re,"change",re,ce)}function ql(re,ce,Ee){function be(Oe,qe,gt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var Tt=Oe.linked[Lt];if(Tt.doc!=qe){var It=gt&&Tt.sharedHist;Ee&&!It||(ce(Tt.doc,It),be(Tt.doc,Oe,It))}}}be(re,null,!0)}function rd(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,fi(re),qi(re),df(re),re.options.lineWrapping||Er(re),re.options.mode=ce.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Ve:Be)(re.display.lineDiv,"CodeMirror-rtl")}function ev(re){yo(re,function(){df(re),Fo(re)})}function Lc(re){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=re||1}function id(re,ce){var Ee={from:ar(ce.from),to:hh(ce),text:gr(re,ce.from,ce.to)};return ch(re,Ee,ce.from.line,ce.to.line+1),ql(re,function(be){return ch(be,Ee,ce.from.line,ce.to.line+1)},!0),Ee}function Nc(re){for(;re.length;){var ce=kt(re);if(ce.ranges)re.pop();else break}}function pf(re,ce){if(ce)return Nc(re.done),kt(re.done);if(re.done.length&&!kt(re.done).ranges)return kt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),kt(re.done)}function gf(re,ce,Ee,be){var Oe=re.history;Oe.undone.length=0;var qe=+new Date,gt,Lt;if((Oe.lastOp==be||Oe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Oe.lastModTime>qe-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(gt=pf(Oe,Oe.lastOp==be)))Lt=kt(gt.changes),_n(ce.from,ce.to)==0&&_n(ce.from,Lt.to)==0?Lt.to=hh(ce):gt.changes.push(id(re,ce));else{var Tt=kt(Oe.done);for((!Tt||!Tt.ranges)&&Ac(re.sel,Oe.done),gt={changes:[id(re,ce)],generation:Oe.generation},Oe.done.push(gt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(Ee),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=qe,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=ce.origin,Lt||tn(re,"historyAdded")}function hp(re,ce,Ee,be){var Oe=ce.charAt(0);return Oe=="*"||Oe=="+"&&Ee.ranges.length==be.ranges.length&&Ee.somethingSelected()==be.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,ce,Ee,be){var Oe=re.history,qe=be&&be.origin;Ee==Oe.lastSelOp||qe&&Oe.lastSelOrigin==qe&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==qe||hp(re,qe,kt(Oe.done),ce))?Oe.done[Oe.done.length-1]=ce:Ac(ce,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=qe,Oe.lastSelOp=Ee,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,ce){var Ee=kt(ce);Ee&&Ee.ranges&&Ee.equals(re)||ce.push(re)}function ch(re,ce,Ee,be){var Oe=ce["spans_"+re.id],qe=0;re.iter(Math.max(re.first,Ee),Math.min(re.first+re.size,be),function(gt){gt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[qe]=gt.markedSpans),++qe})}function Es(re){if(!re)return null;for(var ce,Ee=0;Ee<re.length;++Ee)re[Ee].marker.explicitlyCleared?ce||(ce=re.slice(0,Ee)):ce&&ce.push(re[Ee]);return ce?ce.length?ce:null:re}function pu(re,ce){var Ee=ce["spans_"+re.id];if(!Ee)return null;for(var be=[],Oe=0;Oe<ce.text.length;++Oe)be.push(Es(Ee[Oe]));return be}function od(re,ce){var Ee=pu(re,ce),be=Ki(re,ce);if(!Ee)return be;if(!be)return Ee;for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe],gt=be[Oe];if(qe&&gt)e:for(var Lt=0;Lt<gt.length;++Lt){for(var Tt=gt[Lt],It=0;It<qe.length;++It)if(qe[It].marker==Tt.marker)continue e;qe.push(Tt)}else gt&&(Ee[Oe]=gt)}return Ee}function Ru(re,ce,Ee){for(var be=[],Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.ranges){be.push(Ee?xl.prototype.deepCopy.call(qe):qe);continue}var gt=qe.changes,Lt=[];be.push({changes:Lt});for(var Tt=0;Tt<gt.length;++Tt){var It=gt[Tt],nn=void 0;if(Lt.push({from:It.from,to:It.to,text:It.text}),ce)for(var zt in It)(nn=zt.match(/^spans_(\d+)$/))&&yt(ce,Number(nn[1]))>-1&&(kt(Lt)[zt]=It[zt],delete It[zt])}}return be}function ad(re,ce,Ee,be){if(be){var Oe=re.anchor;if(Ee){var qe=_n(ce,Oe)<0;qe!=_n(Ee,Oe)<0?(Oe=ce,ce=Ee):qe!=_n(ce,Ee)<0&&(ce=Ee)}return new To(Oe,ce)}else return new To(Ee||ce,ce)}function sd(re,ce,Ee,be,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),gs(re,new xl([ad(re.sel.primary(),ce,Ee,Oe)],0),be)}function Gg(re,ce,Ee){for(var be=[],Oe=re.cm&&(re.cm.display.shift||re.extend),qe=0;qe<re.sel.ranges.length;qe++)be[qe]=ad(re.sel.ranges[qe],ce[qe],null,Oe);var gt=Dl(re.cm,be,re.sel.primIndex);gs(re,gt,Ee)}function fh(re,ce,Ee,be){var Oe=re.sel.ranges.slice(0);Oe[ce]=Ee,gs(re,Dl(re.cm,Oe,re.sel.primIndex),be)}function Hh(re,ce,Ee,be){gs(re,Iu(ce,Ee),be)}function Ug(re,ce,Ee){var be={ranges:ce.ranges,update:function(Oe){this.ranges=[];for(var qe=0;qe<Oe.length;qe++)this.ranges[qe]=new To(er(re,Oe[qe].anchor),er(re,Oe[qe].head))},origin:Ee&&Ee.origin};return tn(re,"beforeSelectionChange",re,be),re.cm&&tn(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=ce.ranges?Dl(re.cm,be.ranges,be.ranges.length-1):ce}function ld(re,ce,Ee){var be=re.history.done,Oe=kt(be);Oe&&Oe.ranges?(be[be.length-1]=ce,Kh(re,ce,Ee)):gs(re,ce,Ee)}function gs(re,ce,Ee){Kh(re,ce,Ee),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ee)}function Kh(re,ce,Ee){(bn(re,"beforeSelectionChange")||re.cm&&bn(re.cm,"beforeSelectionChange"))&&(ce=Ug(re,ce,Ee));var be=Ee&&Ee.bias||(_n(ce.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,ce,be,!0)),!(Ee&&Ee.scroll===!1)&&re.cm&&Ol(re.cm)}function cp(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,En(re.cm)),Ir(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,ce,Ee,be){for(var Oe,qe=0;qe<ce.ranges.length;qe++){var gt=ce.ranges[qe],Lt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[qe],Tt=Sf(re,gt.anchor,Lt&&Lt.anchor,Ee,be),It=Sf(re,gt.head,Lt&&Lt.head,Ee,be);(Oe||Tt!=gt.anchor||It!=gt.head)&&(Oe||(Oe=ce.ranges.slice(0,qe)),Oe[qe]=new To(Tt,It))}return Oe?Dl(re.cm,Oe,ce.primIndex):ce}function _u(re,ce,Ee,be,Oe){var qe=Nn(re,ce.line);if(qe.markedSpans)for(var gt=0;gt<qe.markedSpans.length;++gt){var Lt=qe.markedSpans[gt],Tt=Lt.marker,It="selectLeft"in Tt?!Tt.selectLeft:Tt.inclusiveLeft,nn="selectRight"in Tt?!Tt.selectRight:Tt.inclusiveRight;if((Lt.from==null||(It?Lt.from<=ce.ch:Lt.from<ce.ch))&&(Lt.to==null||(nn?Lt.to>=ce.ch:Lt.to>ce.ch))){if(Oe&&(tn(Tt,"beforeCursorEnter"),Tt.explicitlyCleared))if(qe.markedSpans){--gt;continue}else break;if(!Tt.atomic)continue;if(Ee){var zt=Tt.find(be<0?1:-1),xn=void 0;if((be<0?nn:It)&&(zt=fp(re,zt,-be,zt&&zt.line==ce.line?qe:null)),zt&&zt.line==ce.line&&(xn=_n(zt,Ee))&&(be<0?xn<0:xn>0))return _u(re,zt,ce,be,Oe)}var fn=Tt.find(be<0?-1:1);return(be<0?It:nn)&&(fn=fp(re,fn,be,fn.line==ce.line?qe:null)),fn?_u(re,fn,ce,be,Oe):null}}return ce}function Sf(re,ce,Ee,be,Oe){var qe=be||1,gt=_u(re,ce,Ee,qe,Oe)||!Oe&&_u(re,ce,Ee,qe,!0)||_u(re,ce,Ee,-qe,Oe)||!Oe&&_u(re,ce,Ee,-qe,!0);return gt||(re.cantEdit=!0,Jt(re.first,0))}function fp(re,ce,Ee,be){return Ee<0&&ce.ch==0?ce.line>re.first?er(re,Jt(ce.line-1)):null:Ee>0&&ce.ch==(be||Nn(re,ce.line)).text.length?ce.line<re.first+re.size-1?Jt(ce.line+1,0):null:new Jt(ce.line,ce.ch+Ee)}function ya(re){re.setSelection(Jt(re.firstLine(),0),Jt(re.lastLine()),dt)}function xf(re,ce,Ee){var be={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return be.canceled=!0}};return Ee&&(be.update=function(Oe,qe,gt,Lt){Oe&&(be.from=er(re,Oe)),qe&&(be.to=er(re,qe)),gt&&(be.text=gt),Lt!==void 0&&(be.origin=Lt)}),tn(re,"beforeChange",re,be),re.cm&&tn(re.cm,"beforeChange",re.cm,be),be.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:be.from,to:be.to,text:be.text,origin:be.origin}}function dh(re,ce,Ee){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,ce,Ee);if(re.cm.state.suppressEdits)return}if(!((bn(re,"beforeChange")||re.cm&&bn(re.cm,"beforeChange"))&&(ce=xf(re,ce,!0),!ce))){var be=bi&&!Ee&&wn(re,ce.from,ce.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Vh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:ce.text,origin:ce.origin});else Vh(re,ce)}}function Vh(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&_n(ce.from,ce.to)==0)){var Ee=hf(re,ce);gf(re,ce,Ee,re.cm?re.cm.curOp.id:NaN),jc(re,ce,Ee,Ki(re,ce));var be=[];ql(re,function(Oe,qe){!qe&&yt(be,Oe.history)==-1&&(pp(Oe.history,ce),be.push(Oe.history)),jc(Oe,ce,null,Ki(Oe,ce))})}}function wf(re,ce,Ee){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ee)){for(var Oe=re.history,qe,gt=re.sel,Lt=ce=="undo"?Oe.done:Oe.undone,Tt=ce=="undo"?Oe.undone:Oe.done,It=0;It<Lt.length&&(qe=Lt[It],!(Ee?qe.ranges&&!qe.equals(re.sel):!qe.ranges));It++);if(It!=Lt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if(qe=Lt.pop(),qe.ranges){if(Ac(qe,Tt),Ee&&!qe.equals(re.sel)){gs(re,qe,{clearRedo:!1});return}gt=qe}else if(be){Lt.push(qe);return}else break;var nn=[];Ac(gt,Tt),Tt.push({changes:nn,generation:Oe.generation}),Oe.generation=qe.generation||++Oe.maxGeneration;for(var zt=bn(re,"beforeChange")||re.cm&&bn(re.cm,"beforeChange"),xn=function(or){var pr=qe.changes[or];if(pr.origin=ce,zt&&!xf(re,pr,!1))return Lt.length=0,{};nn.push(id(re,pr));var Nr=or?hf(re,pr):kt(Lt);jc(re,pr,Nr,od(re,pr)),!or&&re.cm&&re.cm.scrollIntoView({from:pr.from,to:hh(pr)});var Yr=[];ql(re,function(Gr,ii){!ii&&yt(Yr,Gr.history)==-1&&(pp(Gr.history,pr),Yr.push(Gr.history)),jc(Gr,pr,null,od(Gr,pr))})},fn=qe.changes.length-1;fn>=0;--fn){var rr=xn(fn);if(rr)return rr.v}}}}function dp(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new xl(pt(re.sel.ranges,function(Oe){return new To(Jt(Oe.anchor.line+ce,Oe.anchor.ch),Jt(Oe.head.line+ce,Oe.head.ch))}),re.sel.primIndex),re.cm)){Fo(re.cm,re.first,re.first-ce,ce);for(var Ee=re.cm.display,be=Ee.viewFrom;be<Ee.viewTo;be++)Ri(re.cm,be,"gutter")}}function jc(re,ce,Ee,be){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,ce,Ee,be);if(ce.to.line<re.first){dp(re,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>re.lastLine())){if(ce.from.line<re.first){var Oe=ce.text.length-1-(re.first-ce.from.line);dp(re,Oe),ce={from:Jt(re.first,0),to:Jt(ce.to.line+Oe,ce.to.ch),text:[kt(ce.text)],origin:ce.origin}}var qe=re.lastLine();ce.to.line>qe&&(ce={from:ce.from,to:Jt(qe,Nn(re,qe).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=gr(re,ce.from,ce.to),Ee||(Ee=hf(re,ce)),re.cm?Wg(re.cm,ce,be):nd(re,ce,be),Kh(re,Ee,dt),re.cantEdit&&Sf(re,Jt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Wg(re,ce,Ee){var be=re.doc,Oe=re.display,qe=ce.from,gt=ce.to,Lt=!1,Tt=qe.line;re.options.lineWrapping||(Tt=jt(Ln(Nn(be,qe.line))),be.iter(Tt,gt.line+1,function(fn){if(fn==Oe.maxLine)return Lt=!0,!0})),be.sel.contains(ce.from,ce.to)>-1&&En(re),nd(be,ce,Ee,Oo(re)),re.options.lineWrapping||(be.iter(Tt,qe.line+ce.text.length,function(fn){var rr=ri(fn);rr>Oe.maxLineLength&&(Oe.maxLine=fn,Oe.maxLineLength=rr,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),si(be,qe.line),Tc(re,400);var It=ce.text.length-(gt.line-qe.line)-1;ce.full?Fo(re):qe.line==gt.line&&ce.text.length==1&&!up(re.doc,ce)?Ri(re,qe.line,"text"):Fo(re,qe.line,gt.line+1,It);var nn=bn(re,"changes"),zt=bn(re,"change");if(zt||nn){var xn={from:qe,to:gt,text:ce.text,removed:ce.removed,origin:ce.origin};zt&&Ir(re,"change",re,xn),nn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(xn)}re.display.selForContextMenu=null}function Zh(re,ce,Ee,be,Oe){var qe;be||(be=Ee),_n(be,Ee)<0&&(qe=[be,Ee],Ee=qe[0],be=qe[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),dh(re,{from:Ee,to:be,text:ce,origin:Oe})}function wl(re,ce,Ee,be){Ee<re.line?re.line+=be:ce<re.line&&(re.line=ce,re.ch=0)}function Hg(re,ce,Ee,be){for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],gt=!0;if(qe.ranges){qe.copied||(qe=re[Oe]=qe.deepCopy(),qe.copied=!0);for(var Lt=0;Lt<qe.ranges.length;Lt++)wl(qe.ranges[Lt].anchor,ce,Ee,be),wl(qe.ranges[Lt].head,ce,Ee,be);continue}for(var Tt=0;Tt<qe.changes.length;++Tt){var It=qe.changes[Tt];if(Ee<It.from.line)It.from=Jt(It.from.line+be,It.from.ch),It.to=Jt(It.to.line+be,It.to.ch);else if(ce<=It.to.line){gt=!1;break}}gt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,ce){var Ee=ce.from.line,be=ce.to.line,Oe=ce.text.length-(be-Ee)-1;Hg(re.done,Ee,be,Oe),Hg(re.undone,Ee,be,Oe)}function Xh(re,ce,Ee,be){var Oe=ce,qe=ce;return typeof ce=="number"?qe=Nn(re,Un(re,ce)):Oe=jt(ce),Oe==null?null:(be(qe,Oe)&&re.cm&&Ri(re.cm,Oe,Ee),qe)}function Oc(re){this.lines=re,this.parent=null;for(var ce=0,Ee=0;Ee<re.length;++Ee)re[Ee].parent=this,ce+=re[Ee].height;this.height=ce}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var Ee=re,be=re+ce;Ee<be;++Ee){var Oe=this.lines[Ee];this.height-=Oe.height,Ci(Oe),Ir(Oe,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,Ee){this.height+=Ee,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var be=0;be<ce.length;++be)ce[be].parent=this},iterN:function(re,ce,Ee){for(var be=re+ce;re<be;++re)if(Ee(this.lines[re]))return!0}};function ra(re){this.children=re;for(var ce=0,Ee=0,be=0;be<re.length;++be){var Oe=re[be];ce+=Oe.chunkSize(),Ee+=Oe.height,Oe.parent=this}this.size=ce,this.height=Ee,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var Ee=0;Ee<this.children.length;++Ee){var be=this.children[Ee],Oe=be.chunkSize();if(re<Oe){var qe=Math.min(ce,Oe-re),gt=be.height;if(be.removeInner(re,qe),this.height-=gt-be.height,Oe==qe&&(this.children.splice(Ee--,1),be.parent=null),(ce-=qe)==0)break;re=0}else re-=Oe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Lt=[];this.collapse(Lt),this.children=[new Oc(Lt)],this.children[0].parent=this}},collapse:function(re){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(re)},insertInner:function(re,ce,Ee){this.size+=ce.length,this.height+=Ee;for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<=qe){if(Oe.insertInner(re,ce,Ee),Oe.lines&&Oe.lines.length>50){for(var gt=Oe.lines.length%25+25,Lt=gt;Lt<Oe.lines.length;){var Tt=new Oc(Oe.lines.slice(Lt,Lt+=25));Oe.height-=Tt.height,this.children.splice(++be,0,Tt),Tt.parent=this}Oe.lines=Oe.lines.slice(0,gt),this.maybeSpill()}break}re-=qe}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),Ee=new ra(ce);if(re.parent){re.size-=Ee.size,re.height-=Ee.height;var Oe=yt(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ee)}else{var be=new ra(re.children);be.parent=re,re.children=[be,Ee],re=be}Ee.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,Ee){for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<qe){var gt=Math.min(ce,qe-re);if(Oe.iterN(re,gt,Ee))return!0;if((ce-=gt)==0)break;re=0}else re-=qe}}};var zu=function(re,ce,Ee){if(Ee)for(var be in Ee)Ee.hasOwnProperty(be)&&(this[be]=Ee[be]);this.doc=re,this.node=ce};zu.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,Ee=this.line,be=jt(Ee);if(!(be==null||!ce)){for(var Oe=0;Oe<ce.length;++Oe)ce[Oe]==this&&ce.splice(Oe--,1);ce.length||(Ee.widgets=null);var qe=zo(this);Xn(Ee,Math.max(0,Ee.height-qe)),re&&(yo(re,function(){Kg(re,Ee,-qe),Ri(re,be,"widget")}),Ir(re,"lineWidgetCleared",re,this,be))}},zu.prototype.changed=function(){var re=this,ce=this.height,Ee=this.doc.cm,be=this.line;this.height=null;var Oe=zo(this)-ce;Oe&&(ln(this.doc,be)||Xn(be,be.height+Oe),Ee&&yo(Ee,function(){Ee.curOp.forceUpdate=!0,Kg(Ee,be,Oe),Ir(Ee,"lineWidgetChanged",Ee,re,jt(be))}))},Dn(zu);function Kg(re,ce,Ee){Cr(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ee)}function ud(re,ce,Ee,be){var Oe=new zu(re,Ee,be),qe=re.cm;return qe&&Oe.noHScroll&&(qe.display.alignWidgets=!0),Xh(re,ce,"widget",function(gt){var Lt=gt.widgets||(gt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=gt,qe&&!ln(re,gt)){var Tt=Cr(gt)<re.scrollTop;Xn(gt,gt.height+zo(Oe)),Tt&&_h(qe,Oe.height),qe.curOp.forceUpdate=!0}return!0}),qe&&Ir(qe,"lineWidgetAdded",qe,Oe,typeof ce=="number"?ce:jt(ce)),Oe}var Vg=0,Vt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++Vg};Vt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&sl(re),bn(this,"clear")){var Ee=this.find();Ee&&Ir(this,"clear",Ee.from,Ee.to)}for(var be=null,Oe=null,qe=0;qe<this.lines.length;++qe){var gt=this.lines[qe],Lt=li(gt.markedSpans,this);re&&!this.collapsed?Ri(re,jt(gt),"text"):re&&(Lt.to!=null&&(Oe=jt(gt)),Lt.from!=null&&(be=jt(gt))),gt.markedSpans=Jr(gt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!ln(this.doc,gt)&&re&&Xn(gt,Pa(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Tt=0;Tt<this.lines.length;++Tt){var It=Ln(this.lines[Tt]),nn=ri(It);nn>re.display.maxLineLength&&(re.display.maxLine=It,re.display.maxLineLength=nn,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Fo(re,be,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Ir(re,"markerCleared",re,this,be,Oe),ce&&Fl(re),this.parent&&this.parent.clear()}},Vt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var Ee,be,Oe=0;Oe<this.lines.length;++Oe){var qe=this.lines[Oe],gt=li(qe.markedSpans,this);if(gt.from!=null&&(Ee=Jt(ce?qe:jt(qe),gt.from),re==-1))return Ee;if(gt.to!=null&&(be=Jt(ce?qe:jt(qe),gt.to),re==1))return be}return Ee&&{from:Ee,to:be}},Vt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),Ee=this,be=this.doc.cm;!ce||!be||yo(be,function(){var Oe=ce.line,qe=jt(ce.line),gt=il(be,qe);if(gt&&(rh(gt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!ln(Ee.doc,Oe)&&Ee.height!=null){var Lt=Ee.height;Ee.height=null;var Tt=zo(Ee)-Lt;Tt&&Xn(Oe,Oe.height+Tt)}Ir(be,"markerChanged",be,re)})},Vt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||yt(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Vt.prototype.detachLine=function(re){if(this.lines.splice(yt(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Dn(Vt);function Yh(re,ce,Ee,be,Oe){if(be&&be.shared)return Zg(re,ce,Ee,be,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,ce,Ee,be,Oe);var qe=new Vt(re,Oe),gt=_n(ce,Ee);if(be&&Pt(be,qe,!1),gt>0||gt==0&&qe.clearWhenEmpty!==!1)return qe;if(qe.replacedWith&&(qe.collapsed=!0,qe.widgetNode=Re("span",[qe.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||qe.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&(qe.widgetNode.insertLeft=!0)),qe.collapsed){if(zn(re,ce.line,ce,Ee,qe)||ce.line!=Ee.line&&zn(re,Ee.line,ce,Ee,qe))throw new Error("Inserting collapsed marker partially overlapping an existing one");yn()}qe.addToHistory&&gf(re,{from:ce,to:Ee,origin:"markText"},re.sel,NaN);var Lt=ce.line,Tt=re.cm,It;if(re.iter(Lt,Ee.line+1,function(zt){Tt&&qe.collapsed&&!Tt.options.lineWrapping&&Ln(zt)==Tt.display.maxLine&&(It=!0),qe.collapsed&&Lt!=ce.line&&Xn(zt,0),Hi(zt,new Sr(qe,Lt==ce.line?ce.ch:null,Lt==Ee.line?Ee.ch:null)),++Lt}),qe.collapsed&&re.iter(ce.line,Ee.line+1,function(zt){ln(re,zt)&&Xn(zt,0)}),qe.clearOnEnter&&rn(qe,"beforeCursorEnter",function(){return qe.clear()}),qe.readOnly&&(Oi(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),qe.collapsed&&(qe.id=++Vg,qe.atomic=!0),Tt){if(It&&(Tt.curOp.updateMaxLine=!0),qe.collapsed)Fo(Tt,ce.line,Ee.line+1);else if(qe.className||qe.startStyle||qe.endStyle||qe.css||qe.attributes||qe.title)for(var nn=ce.line;nn<=Ee.line;nn++)Ri(Tt,nn,"text");qe.atomic&&vf(Tt.doc),Ir(Tt,"markerAdded",Tt,qe)}return qe}var gu=function(re,ce){this.markers=re,this.primary=ce;for(var Ee=0;Ee<re.length;++Ee)re[Ee].parent=this};gu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Ir(this,"clear")}},gu.prototype.find=function(re,ce){return this.primary.find(re,ce)},Dn(gu);function Zg(re,ce,Ee,be,Oe){be=Pt(be),be.shared=!1;var qe=[Yh(re,ce,Ee,be,Oe)],gt=qe[0],Lt=be.widgetNode;return ql(re,function(Tt){Lt&&(be.widgetNode=Lt.cloneNode(!0)),qe.push(Yh(Tt,er(Tt,ce),er(Tt,Ee),be,Oe));for(var It=0;It<Tt.linked.length;++It)if(Tt.linked[It].isParent)return;gt=kt(qe)}),new gu(qe,gt)}function gp(re){return re.findMarks(Jt(re.first,0),re.clipPos(Jt(re.lastLine())),function(ce){return ce.parent})}function Xg(re,ce){for(var Ee=0;Ee<ce.length;Ee++){var be=ce[Ee],Oe=be.find(),qe=re.clipPos(Oe.from),gt=re.clipPos(Oe.to);if(_n(qe,gt)){var Lt=Yh(re,qe,gt,be.primary,be.primary.type);be.markers.push(Lt),Lt.parent=be}}}function mp(re){for(var ce=function(be){var Oe=re[be],qe=[Oe.primary.doc];ql(Oe.primary.doc,function(Tt){return qe.push(Tt)});for(var gt=0;gt<Oe.markers.length;gt++){var Lt=Oe.markers[gt];yt(qe,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(gt--,1))}},Ee=0;Ee<re.length;Ee++)ce(Ee)}var tv=0,os=function(re,ce,Ee,be,Oe){if(!(this instanceof os))return new os(re,ce,Ee,be,Oe);Ee==null&&(Ee=0),ra.call(this,[new Oc([new xi("",null)])]),this.first=Ee,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ee;var qe=Jt(Ee,0);this.sel=Iu(qe),this.history=new Lc(null),this.id=++tv,this.modeOption=ce,this.lineSep=be,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:qe,to:qe,text:re}),gs(this,Iu(qe),dt)};os.prototype=xe(ra.prototype,{constructor:os,iter:function(re,ce,Ee){Ee?this.iterN(re-this.first,ce-re,Ee):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var Ee=0,be=0;be<ce.length;++be)Ee+=ce[be].height;this.insertInner(re-this.first,ce,Ee)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=Zr(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Ha(function(re){var ce=Jt(this.first,0),Ee=this.first+this.size-1;dh(this,{from:ce,to:Jt(Ee,Nn(this,Ee).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Bu(this.cm,0,0),gs(this,Iu(ce),dt)}),replaceRange:function(re,ce,Ee,be){ce=er(this,ce),Ee=Ee?er(this,Ee):ce,Zh(this,re,ce,Ee,be)},getRange:function(re,ce,Ee){var be=gr(this,er(this,re),er(this,ce));return Ee===!1?be:be.join(Ee||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(jn(this,re))return Nn(this,re)},getLineNumber:function(re){return jt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=Nn(this,re)),Ln(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return er(this,re)},getCursor:function(re){var ce=this.sel.primary(),Ee;return re==null||re=="head"?Ee=ce.head:re=="anchor"?Ee=ce.anchor:re=="end"||re=="to"||re===!1?Ee=ce.to():Ee=ce.from(),Ee},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ha(function(re,ce,Ee){Hh(this,er(this,typeof re=="number"?Jt(re,ce||0):re),null,Ee)}),setSelection:Ha(function(re,ce,Ee){Hh(this,er(this,re),er(this,ce||re),Ee)}),extendSelection:Ha(function(re,ce,Ee){sd(this,er(this,re),ce&&er(this,ce),Ee)}),extendSelections:Ha(function(re,ce){Gg(this,sr(this,re),ce)}),extendSelectionsBy:Ha(function(re,ce){var Ee=pt(this.sel.ranges,re);Gg(this,sr(this,Ee),ce)}),setSelections:Ha(function(re,ce,Ee){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To(er(this,re[Oe].anchor),er(this,re[Oe].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),gs(this,Dl(this.cm,be,ce),Ee)}}),addSelection:Ha(function(re,ce,Ee){var be=this.sel.ranges.slice(0);be.push(new To(er(this,re),er(this,ce||re))),gs(this,Dl(this.cm,be,be.length-1),Ee)}),getSelection:function(re){for(var ce=this.sel.ranges,Ee,be=0;be<ce.length;be++){var Oe=gr(this,ce[be].from(),ce[be].to());Ee=Ee?Ee.concat(Oe):Oe}return re===!1?Ee:Ee.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],Ee=this.sel.ranges,be=0;be<Ee.length;be++){var Oe=gr(this,Ee[be].from(),Ee[be].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),ce[be]=Oe}return ce},replaceSelection:function(re,ce,Ee){for(var be=[],Oe=0;Oe<this.sel.ranges.length;Oe++)be[Oe]=re;this.replaceSelections(be,ce,Ee||"+input")},replaceSelections:Ha(function(re,ce,Ee){for(var be=[],Oe=this.sel,qe=0;qe<Oe.ranges.length;qe++){var gt=Oe.ranges[qe];be[qe]={from:gt.from(),to:gt.to(),text:this.splitLines(re[qe]),origin:Ee}}for(var Lt=ce&&ce!="end"&&cf(this,be,ce),Tt=be.length-1;Tt>=0;Tt--)dh(this,be[Tt]);Lt?ld(this,Lt):this.cm&&Ol(this.cm)}),undo:Ha(function(){wf(this,"undo")}),redo:Ha(function(){wf(this,"redo")}),undoSelection:Ha(function(){wf(this,"undo",!0)}),redoSelection:Ha(function(){wf(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,ce=0,Ee=0,be=0;be<re.done.length;be++)re.done[be].ranges||++ce;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ee;return{undo:ce,redo:Ee}},clearHistory:function(){var re=this;this.history=new Lc(this.history.maxGeneration),ql(this,function(ce){return ce.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:Ru(this.history.done),undone:Ru(this.history.undone)}},setHistory:function(re){var ce=this.history=new Lc(this.history.maxGeneration);ce.done=Ru(re.done.slice(0),null,!0),ce.undone=Ru(re.undone.slice(0),null,!0)},setGutterMarker:Ha(function(re,ce,Ee){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[ce]=Ee,!Ee&&Ie(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Ha(function(re){var ce=this;this.iter(function(Ee){Ee.gutterMarkers&&Ee.gutterMarkers[re]&&Xh(ce,Ee,"gutter",function(){return Ee.gutterMarkers[re]=null,Ie(Ee.gutterMarkers)&&(Ee.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!jn(this,re)||(ce=re,re=Nn(this,re),!re))return null}else if(ce=jt(re),ce==null)return null;return{line:ce,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Ha(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!be[Oe])be[Oe]=Ee;else{if(je(Ee).test(be[Oe]))return!1;be[Oe]+=" "+Ee}return!0})}),removeLineClass:Ha(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",qe=be[Oe];if(qe)if(Ee==null)be[Oe]=null;else{var gt=qe.match(je(Ee));if(!gt)return!1;var Lt=gt.index+gt[0].length;be[Oe]=qe.slice(0,gt.index)+(!gt.index||Lt==qe.length?"":" ")+qe.slice(Lt)||null}else return!1;return!0})}),addLineWidget:Ha(function(re,ce,Ee){return ud(this,re,ce,Ee)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,Ee){return Yh(this,er(this,re),er(this,ce),Ee,Ee&&Ee.type||"range")},setBookmark:function(re,ce){var Ee={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=er(this,re),Yh(this,re,re,Ee,"bookmark")},findMarksAt:function(re){re=er(this,re);var ce=[],Ee=Nn(this,re.line).markedSpans;if(Ee)for(var be=0;be<Ee.length;++be){var Oe=Ee[be];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&ce.push(Oe.marker.parent||Oe.marker)}return ce},findMarks:function(re,ce,Ee){re=er(this,re),ce=er(this,ce);var be=[],Oe=re.line;return this.iter(re.line,ce.line+1,function(qe){var gt=qe.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;Lt++){var Tt=gt[Lt];!(Tt.to!=null&&Oe==re.line&&re.ch>=Tt.to||Tt.from==null&&Oe!=re.line||Tt.from!=null&&Oe==ce.line&&Tt.from>=ce.ch)&&(!Ee||Ee(Tt.marker))&&be.push(Tt.marker.parent||Tt.marker)}++Oe}),be},getAllMarks:function(){var re=[];return this.iter(function(ce){var Ee=ce.markedSpans;if(Ee)for(var be=0;be<Ee.length;++be)Ee[be].from!=null&&re.push(Ee[be].marker)}),re},posFromIndex:function(re){var ce,Ee=this.first,be=this.lineSeparator().length;return this.iter(function(Oe){var qe=Oe.text.length+be;if(qe>re)return ce=re,!0;re-=qe,++Ee}),er(this,Jt(Ee,ce))},indexFromPos:function(re){re=er(this,re);var ce=re.ch;if(re.line<this.first||re.ch<0)return 0;var Ee=this.lineSeparator().length;return this.iter(this.first,re.line,function(be){ce+=be.text.length+Ee}),ce},copy:function(re){var ce=new os(Zr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,re&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(re){re||(re={});var ce=this.first,Ee=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<Ee&&(Ee=re.to);var be=new os(Zr(this,ce,Ee),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(be.history=this.history),(this.linked||(this.linked=[])).push({doc:be,sharedHist:re.sharedHist}),be.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(be,gp(this)),be},unlinkDoc:function(re){if(re instanceof po&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Ee=this.linked[ce];if(Ee.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var be=[re.id];ql(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Lc(null),re.history.done=Ru(this.history.done,be),re.history.undone=Ru(this.history.undone,be)}},iterLinkedDocs:function(re){ql(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Wi(re)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ha(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&ev(this.cm))})}),os.prototype.eachLine=os.prototype.iter;var Pf=0;function vp(re){var ce=this;if(Jg(ce),!(Ut(ce,re)||jo(ce.display,re))){Qn(re),De&&(Pf=+new Date);var Ee=Ua(ce,re,!0),be=re.dataTransfer.files;if(!(!Ee||ce.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,qe=Array(Oe),gt=0,Lt=function(){++gt==Oe&&Da(ce,function(){Ee=er(ce.doc,Ee);var fn={from:Ee,to:Ee,text:ce.doc.splitLines(qe.filter(function(rr){return rr!=null}).join(ce.doc.lineSeparator())),origin:"paste"};dh(ce.doc,fn),ld(ce.doc,Iu(er(ce.doc,Ee),er(ce.doc,hh(fn))))})()},Tt=function(fn,rr){if(ce.options.allowDropFileTypes&&yt(ce.options.allowDropFileTypes,fn.type)==-1){Lt();return}var or=new FileReader;or.onerror=function(){return Lt()},or.onload=function(){var pr=or.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(pr)){Lt();return}qe[rr]=pr,Lt()},or.readAsText(fn)},It=0;It<be.length;It++)Tt(be[It],It);else{if(ce.state.draggingText&&ce.doc.sel.contains(Ee)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var nn=re.dataTransfer.getData("Text");if(nn){var zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(zt=ce.listSelections()),Kh(ce.doc,Iu(Ee,Ee)),zt)for(var xn=0;xn<zt.length;++xn)Zh(ce.doc,"",zt[xn].anchor,zt[xn].head,"drag");ce.replaceSelection(nn,"around","paste"),ce.display.input.focus()}}catch(fn){}}}}function Yg(re,ce){if(De&&(!re.state.draggingText||+new Date-Pf<100)){Mr(ce);return}if(!(Ut(re,ce)||jo(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Le)){var Ee=Ae("img",null,null,"position: fixed; left: 0; top: 0;");Ee.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ee.width=Ee.height=1,re.display.wrapper.appendChild(Ee),Ee._top=Ee.offsetTop),ce.dataTransfer.setDragImage(Ee,0,0),Se&&Ee.parentNode.removeChild(Ee)}}function $g(re,ce){var Ee=Ua(re,ce);if(Ee){var be=document.createDocumentFragment();oo(re,Ee,be),re.display.dragCursor||(re.display.dragCursor=Ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Ne(re.display.dragCursor,be)}}function Jg(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function Qg(re){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),Ee=[],be=0;be<ce.length;be++){var Oe=ce[be].CodeMirror;Oe&&Ee.push(Oe)}Ee.length&&Ee[0].operation(function(){for(var qe=0;qe<Ee.length;qe++)re(Ee[qe])})}}var yp=!1;function hl(){yp||(Fc(),yp=!0)}function Fc(){var re;rn(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Qg(Sp)},100))}),rn(window,"blur",function(){return Qg(Du)})}function Sp(re){var ce=re.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,re.setSize()}for(var mu={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"},bf=0;bf<10;bf++)mu[bf+48]=mu[bf+96]=String(bf);for(var hd=65;hd<=90;hd++)mu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)mu[Cf+111]=mu[Cf+63235]="F"+Cf;var Vs={};Vs.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"},Vs.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"},Vs.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"},Vs.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"]},Vs.default=ae?Vs.macDefault:Vs.pcDefault;function xp(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var Ee,be,Oe,qe,gt=0;gt<ce.length-1;gt++){var Lt=ce[gt];if(/^(cmd|meta|m)$/i.test(Lt))qe=!0;else if(/^a(lt)?$/i.test(Lt))Ee=!0;else if(/^(c|ctrl|control)$/i.test(Lt))be=!0;else if(/^s(hift)?$/i.test(Lt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Ee&&(re="Alt-"+re),be&&(re="Ctrl-"+re),qe&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var ce={};for(var Ee in re)if(re.hasOwnProperty(Ee)){var be=re[Ee];if(/^(name|fallthrough|(de|at)tach)$/.test(Ee))continue;if(be=="..."){delete re[Ee];continue}for(var Oe=pt(Ee.split(" "),xp),qe=0;qe<Oe.length;qe++){var gt=void 0,Lt=void 0;qe==Oe.length-1?(Lt=Oe.join(" "),gt=be):(Lt=Oe.slice(0,qe+1).join(" "),gt="...");var Tt=ce[Lt];if(!Tt)ce[Lt]=gt;else if(Tt!=gt)throw new Error("Inconsistent bindings for "+Lt)}delete re[Ee]}for(var It in ce)re[It]=ce[It];return re}function Pl(re,ce,Ee,be){ce=$h(ce);var Oe=ce.call?ce.call(re,be):ce[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ee(Oe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return Pl(re,ce.fallthrough,Ee,be);for(var qe=0;qe<ce.fallthrough.length;qe++){var gt=Pl(re,ce.fallthrough[qe],Ee,be);if(gt)return gt}}}function Dc(re){var ce=typeof re=="string"?re:mu[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Pp(re,ce,Ee){var be=re;return ce.altKey&&be!="Alt"&&(re="Alt-"+re),(ge?ce.metaKey:ce.ctrlKey)&&be!="Ctrl"&&(re="Ctrl-"+re),(ge?ce.ctrlKey:ce.metaKey)&&be!="Mod"&&(re="Cmd-"+re),!Ee&&ce.shiftKey&&be!="Shift"&&(re="Shift-"+re),re}function qg(re,ce){if(Se&&re.keyCode==34&&re.char)return!1;var Ee=mu[re.keyCode];return Ee==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Ee=re.code),Pp(Ee,re,ce))}function $h(re){return typeof re=="string"?Vs[re]:re}function Zs(re,ce){for(var Ee=re.doc.sel.ranges,be=[],Oe=0;Oe<Ee.length;Oe++){for(var qe=ce(Ee[Oe]);be.length&&_n(qe.from,kt(be).to)<=0;){var gt=be.pop();if(_n(gt.from,qe.from)<0){qe.from=gt.from;break}}be.push(qe)}yo(re,function(){for(var Lt=be.length-1;Lt>=0;Lt--)Zh(re.doc,"",be[Lt].from,be[Lt].to,"+delete");Ol(re)})}function bp(re,ce,Ee){var be=rt(re.text,ce+Ee,Ee);return be<0||be>re.text.length?null:be}function Sa(re,ce,Ee){var be=bp(re,ce.ch,Ee);return be==null?null:new Jt(ce.line,be,Ee<0?"after":"before")}function Ef(re,ce,Ee,be,Oe){if(re){ce.doc.direction=="rtl"&&(Oe=-Oe);var qe=$t(Ee,ce.doc.direction);if(qe){var gt=Oe<0?kt(qe):qe[0],Lt=Oe<0==(gt.level==1),Tt=Lt?"after":"before",It;if(gt.level>0||ce.doc.direction=="rtl"){var nn=Sl(ce,Ee);It=Oe<0?Ee.text.length-1:0;var zt=Os(ce,nn,It).top;It=St(function(xn){return Os(ce,nn,xn).top==zt},Oe<0==(gt.level==1)?gt.from:gt.to-1,It),Tt=="before"&&(It=bp(Ee,It,1))}else It=Oe<0?gt.to:gt.from;return new Jt(be,It,Tt)}}return new Jt(be,Oe<0?Ee.text.length:0,Oe<0?"before":"after")}function cd(re,ce,Ee,be){var Oe=$t(ce,re.doc.direction);if(!Oe)return Sa(ce,Ee,be);Ee.ch>=ce.text.length?(Ee.ch=ce.text.length,Ee.sticky="before"):Ee.ch<=0&&(Ee.ch=0,Ee.sticky="after");var qe=Ot(Oe,Ee.ch,Ee.sticky),gt=Oe[qe];if(re.doc.direction=="ltr"&&gt.level%2==0&&(be>0?gt.to>Ee.ch:gt.from<Ee.ch))return Sa(ce,Ee,be);var Lt=function(Nr,Yr){return bp(ce,Nr instanceof Jt?Nr.ch:Nr,Yr)},Tt,It=function(Nr){return re.options.lineWrapping?(Tt=Tt||Sl(re,ce),da(re,ce,Tt,Nr)):{begin:0,end:ce.text.length}},nn=It(Ee.sticky=="before"?Lt(Ee,-1):Ee.ch);if(re.doc.direction=="rtl"||gt.level==1){var zt=gt.level==1==be<0,xn=Lt(Ee,zt?1:-1);if(xn!=null&&(zt?xn<=gt.to&&xn<=nn.end:xn>=gt.from&&xn>=nn.begin)){var fn=zt?"before":"after";return new Jt(Ee.line,xn,fn)}}var rr=function(Nr,Yr,Gr){for(var ii=function(Yo,Ia){return Ia?new Jt(Ee.line,Lt(Yo,1),"before"):new Jt(Ee.line,Yo,"after")};Nr>=0&&Nr<Oe.length;Nr+=Yr){var ji=Oe[Nr],Rr=Yr>0==(ji.level!=1),eo=Rr?Gr.begin:Lt(Gr.end,-1);if(ji.from<=eo&&eo<ji.to||(eo=Rr?ji.from:Lt(ji.to,-1),Gr.begin<=eo&&eo<Gr.end))return ii(eo,Rr)}},or=rr(qe+be,be,nn);if(or)return or;var pr=be>0?nn.end:Lt(nn.begin,-1);return pr!=null&&!(be>0&&pr==ce.text.length)&&(or=rr(be>0?0:Oe.length-1,be,It(pr)),or)?or:null}var ph={selectAll:ya,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),dt)},killLine:function(re){return Zs(re,function(ce){if(ce.empty()){var Ee=Nn(re.doc,ce.head.line).text.length;return ce.head.ch==Ee&&ce.head.line<re.lastLine()?{from:ce.head,to:Jt(ce.head.line+1,0)}:{from:ce.head,to:Jt(ce.head.line,Ee)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return Zs(re,function(ce){return{from:Jt(ce.from().line,0),to:er(re.doc,Jt(ce.to().line+1,0))}})},delLineLeft:function(re){return Zs(re,function(ce){return{from:Jt(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return Zs(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return{from:be,to:ce.from()}})},delWrappedLineRight:function(re){return Zs(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div");return{from:ce.from(),to:be}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(Jt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Jt(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return Bc(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Cp(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return Ic(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div")},ut)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:Ee},"div")},ut)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return be.ch<re.getLine(be.line).search(/\S/)?Cp(re,ce.head):be},ut)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var ce=[],Ee=re.listSelections(),be=re.options.tabSize,Oe=0;Oe<Ee.length;Oe++){var qe=Ee[Oe].from(),gt=$e(re.getLine(qe.line),qe.ch,be);ce.push(vt(be-gt%be))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return yo(re,function(){for(var ce=re.listSelections(),Ee=[],be=0;be<ce.length;be++)if(ce[be].empty()){var Oe=ce[be].head,qe=Nn(re.doc,Oe.line).text;if(qe){if(Oe.ch==qe.length&&(Oe=new Jt(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new Jt(Oe.line,Oe.ch+1),re.replaceRange(qe.charAt(Oe.ch-1)+qe.charAt(Oe.ch-2),Jt(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var gt=Nn(re.doc,Oe.line-1).text;gt&&(Oe=new Jt(Oe.line,1),re.replaceRange(qe.charAt(0)+re.doc.lineSeparator()+gt.charAt(gt.length-1),Jt(Oe.line-1,gt.length-1),Oe,"+transpose"))}}Ee.push(new To(Oe,Oe))}re.setSelections(Ee)})},newlineAndIndent:function(re){return yo(re,function(){for(var ce=re.listSelections(),Ee=ce.length-1;Ee>=0;Ee--)re.replaceRange(re.doc.lineSeparator(),ce[Ee].anchor,ce[Ee].head,"+input");ce=re.listSelections();for(var be=0;be<ce.length;be++)re.indentLine(ce[be].from().line,null,!0);Ol(re)})},openLine:function(re){return re.replaceSelection(`
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,ce){var Ee=Nn(re.doc,ce),be=Ln(Ee);return be!=Ee&&(ce=jt(be)),Ef(!0,re,be,ce,1)}function Ic(re,ce){var Ee=Nn(re.doc,ce),be=In(Ee);return be!=Ee&&(ce=jt(be)),Ef(!0,re,Ee,ce,-1)}function Cp(re,ce){var Ee=Bc(re,ce.line),be=Nn(re.doc,Ee.line),Oe=$t(be,re.doc.direction);if(!Oe||Oe[0].level==0){var qe=Math.max(Ee.ch,be.text.search(/\S/)),gt=ce.line==Ee.line&&ce.ch<=qe&&ce.ch;return Jt(Ee.line,gt?0:qe,Ee.sticky)}return Ee}function Rc(re,ce,Ee){if(typeof ce=="string"&&(ce=ph[ce],!ce))return!1;re.display.input.ensurePolled();var be=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ee&&(re.display.shift=!1),Oe=ce(re)!=wt}finally{re.display.shift=be,re.state.suppressEdits=!1}return Oe}function Ep(re,ce,Ee){for(var be=0;be<re.state.keyMaps.length;be++){var Oe=Pl(ce,re.state.keyMaps[be],Ee,re);if(Oe)return Oe}return re.options.extraKeys&&Pl(ce,re.options.extraKeys,Ee,re)||Pl(ce,re.options.keyMap,Ee,re)}var vu=new nt;function Jh(re,ce,Ee,be){var Oe=re.state.keySeq;if(Oe){if(Dc(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:vu.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+ce,Ee,be))return!0}return fd(re,ce,Ee,be)}function fd(re,ce,Ee,be){var Oe=Ep(re,ce,be);return Oe=="multi"&&(re.state.keySeq=ce),Oe=="handled"&&Ir(re,"keyHandled",re,ce,Ee),(Oe=="handled"||Oe=="multi")&&(Qn(Ee),wo(re)),!!Oe}function dd(re,ce){var Ee=qg(ce,!0);return Ee?ce.shiftKey&&!re.state.keySeq?Jh(re,"Shift-"+Ee,ce,function(be){return Rc(re,be,!0)})||Jh(re,Ee,ce,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Rc(re,be)}):Jh(re,Ee,ce,function(be){return Rc(re,be)}):!1}function pd(re,ce,Ee){return Jh(re,"'"+Ee+"'",ce,function(be){return Rc(re,be,!0)})}var Qh=null;function kp(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=Ue(),!Ut(ce,re))){De&&fe<11&&re.keyCode==27&&(re.returnValue=!1);var Ee=re.keyCode;ce.display.shift=Ee==16||re.shiftKey;var be=dd(ce,re);Se&&(Qh=be?Ee:null,!be&&Ee==88&&!jr&&(ae?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),ht&&!ae&&!be&&Ee==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ee==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Tp(ce)}}function Tp(re){var ce=re.display.lineDiv;Ve(ce,"CodeMirror-crosshair");function Ee(be){(be.keyCode==18||!be.altKey)&&(Be(ce,"CodeMirror-crosshair"),sn(document,"keyup",Ee),sn(document,"mouseover",Ee))}rn(document,"keyup",Ee),rn(document,"mouseover",Ee)}function Mp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Ut(this,re)}function eu(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(jo(ce.display,re)||Ut(ce,re)||re.ctrlKey&&!re.altKey||ae&&re.metaKey)){var Ee=re.keyCode,be=re.charCode;if(Se&&Ee==Qh){Qh=null,Qn(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(ce,re))){var Oe=String.fromCharCode(be==null?Ee:be);Oe!="\b"&&(pd(ce,re,Oe)||ce.display.input.onKeyPress(re))}}}var em=400,Lp=function(re,ce,Ee){this.time=re,this.pos=ce,this.button=Ee};Lp.prototype.compare=function(re,ce,Ee){return this.time+em>re&&_n(ce,this.pos)==0&&Ee==this.button};var _c,qh;function Np(re,ce){var Ee=+new Date;return qh&&qh.compare(Ee,re,ce)?(_c=qh=null,"triple"):_c&&_c.compare(Ee,re,ce)?(qh=new Lp(Ee,re,ce),_c=null,"double"):(_c=new Lp(Ee,re,ce),qh=null,"single")}function tu(re){var ce=this,Ee=ce.display;if(!(Ut(ce,re)||Ee.activeTouch&&Ee.input.supportsTouch())){if(Ee.input.ensurePolled(),Ee.shift=re.shiftKey,jo(Ee,re)){me||(Ee.scroller.draggable=!1,setTimeout(function(){return Ee.scroller.draggable=!0},100));return}if(!vd(ce,re)){var be=Ua(ce,re),Oe=_r(re),qe=be?Np(be,Oe):"single";window.focus(),Oe==1&&ce.state.selectingText&&ce.state.selectingText(re),!(be&&Ap(ce,Oe,be,qe,re))&&(Oe==1?be?tm(ce,be,qe,re):Ur(re)==Ee.scroller&&Qn(re):Oe==2?(be&&sd(ce.doc,be),setTimeout(function(){return Ee.input.focus()},20)):Oe==3&&(Pe?ce.display.input.onContextMenu(re):Uo(ce)))}}}function Ap(re,ce,Ee,be,Oe){var qe="Click";return be=="double"?qe="Double"+qe:be=="triple"&&(qe="Triple"+qe),qe=(ce==1?"Left":ce==2?"Middle":"Right")+qe,Jh(re,Pp(qe,Oe),Oe,function(gt){if(typeof gt=="string"&&(gt=ph[gt]),!gt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=gt(re,Ee)!=wt}finally{re.state.suppressEdits=!1}return Lt})}function gd(re,ce,Ee){var be=re.getOption("configureMouse"),Oe=be?be(re,ce,Ee):{};if(Oe.unit==null){var qe=ie?Ee.shiftKey&&Ee.metaKey:Ee.altKey;Oe.unit=qe?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||Ee.shiftKey),Oe.addNew==null&&(Oe.addNew=ae?Ee.metaKey:Ee.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(ae?Ee.altKey:Ee.ctrlKey)),Oe}function tm(re,ce,Ee,be){De?setTimeout(ct(Eo,re),0):re.curOp.focus=Ue();var Oe=gd(re,Ee,be),qe=re.doc.sel,gt;re.options.dragDrop&&ni&&!re.isReadOnly()&&Ee=="single"&&(gt=qe.contains(ce))>-1&&(_n((gt=qe.ranges[gt]).from(),ce)<0||ce.xRel>0)&&(_n(gt.to(),ce)>0||ce.xRel<0)?jp(re,be,ce,Oe):nv(re,be,ce,Oe)}function jp(re,ce,Ee,be){var Oe=re.display,qe=!1,gt=Da(re,function(It){me&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,sn(Oe.wrapper.ownerDocument,"mouseup",gt),sn(Oe.wrapper.ownerDocument,"mousemove",Lt),sn(Oe.scroller,"dragstart",Tt),sn(Oe.scroller,"drop",gt),qe||(Qn(It),be.addNew||sd(re.doc,Ee,null,null,be.extend),me&&!Le||De&&fe==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Lt=function(It){qe=qe||Math.abs(ce.clientX-It.clientX)+Math.abs(ce.clientY-It.clientY)>=10},Tt=function(){return qe=!0};me&&(Oe.scroller.draggable=!0),re.state.draggingText=gt,gt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),rn(Oe.wrapper.ownerDocument,"mouseup",gt),rn(Oe.wrapper.ownerDocument,"mousemove",Lt),rn(Oe.scroller,"dragstart",Tt),rn(Oe.scroller,"drop",gt),Uo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,ce,Ee){if(Ee=="char")return new To(ce,ce);if(Ee=="word")return re.findWordAt(ce);if(Ee=="line")return new To(Jt(ce.line,0),er(re.doc,Jt(ce.line+1,0)));var be=Ee(re,ce);return new To(be.from,be.to)}function nv(re,ce,Ee,be){var Oe=re.display,qe=re.doc;Qn(ce);var gt,Lt,Tt=qe.sel,It=Tt.ranges;if(be.addNew&&!be.extend?(Lt=qe.sel.contains(Ee),Lt>-1?gt=It[Lt]:gt=new To(Ee,Ee)):(gt=qe.sel.primary(),Lt=qe.sel.primIndex),be.unit=="rectangle")be.addNew||(gt=new To(Ee,Ee)),Ee=Ua(re,ce,!0,!0),Lt=-1;else{var nn=Op(re,Ee,be.unit);be.extend?gt=ad(gt,nn.anchor,nn.head,be.extend):gt=nn}be.addNew?Lt==-1?(Lt=It.length,gs(qe,Dl(re,It.concat([gt]),Lt),{scroll:!1,origin:"*mouse"})):It.length>1&&It[Lt].empty()&&be.unit=="char"&&!be.extend?(gs(qe,Dl(re,It.slice(0,Lt).concat(It.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),Tt=qe.sel):fh(qe,Lt,gt,ft):(Lt=0,gs(qe,new xl([gt],0),ft),Tt=qe.sel);var zt=Ee;function xn(Gr){if(_n(zt,Gr)!=0)if(zt=Gr,be.unit=="rectangle"){for(var ii=[],ji=re.options.tabSize,Rr=$e(Nn(qe,Ee.line).text,Ee.ch,ji),eo=$e(Nn(qe,Gr.line).text,Gr.ch,ji),Yo=Math.min(Rr,eo),Ia=Math.max(Rr,eo),ia=Math.min(Ee.line,Gr.line),Rs=Math.min(re.lastLine(),Math.max(Ee.line,Gr.line));ia<=Rs;ia++){var ms=Nn(qe,ia).text,Ma=Et(ms,Yo,ji);Yo==Ia?ii.push(new To(Jt(ia,Ma),Jt(ia,Ma))):ms.length>Ma&&ii.push(new To(Jt(ia,Ma),Jt(ia,Et(ms,Ia,ji))))}ii.length||ii.push(new To(Ee,Ee)),gs(qe,Dl(re,Tt.ranges.slice(0,Lt).concat(ii),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Gr)}else{var Xs=gt,as=Op(re,Gr,be.unit),La=Xs.anchor,mo;_n(as.anchor,La)>0?(mo=as.head,La=Bn(Xs.from(),as.anchor)):(mo=as.anchor,La=mr(Xs.to(),as.head));var ua=Tt.ranges.slice(0);ua[Lt]=nm(re,new To(er(qe,La),mo)),gs(qe,Dl(re,ua,Lt),ft)}}var fn=Oe.wrapper.getBoundingClientRect(),rr=0;function or(Gr){var ii=++rr,ji=Ua(re,Gr,!0,be.unit=="rectangle");if(ji)if(_n(ji,zt)!=0){re.curOp.focus=Ue(),xn(ji);var Rr=Qi(Oe,qe);(ji.line>=Rr.to||ji.line<Rr.from)&&setTimeout(Da(re,function(){rr==ii&&or(Gr)}),150)}else{var eo=Gr.clientY<fn.top?-20:Gr.clientY>fn.bottom?20:0;eo&&setTimeout(Da(re,function(){rr==ii&&(Oe.scroller.scrollTop+=eo,or(Gr))}),50)}}function pr(Gr){re.state.selectingText=!1,rr=1/0,Gr&&(Qn(Gr),Oe.input.focus()),sn(Oe.wrapper.ownerDocument,"mousemove",Nr),sn(Oe.wrapper.ownerDocument,"mouseup",Yr),qe.history.lastSelOrigin=null}var Nr=Da(re,function(Gr){Gr.buttons===0||!_r(Gr)?pr(Gr):or(Gr)}),Yr=Da(re,pr);re.state.selectingText=Yr,rn(Oe.wrapper.ownerDocument,"mousemove",Nr),rn(Oe.wrapper.ownerDocument,"mouseup",Yr)}function nm(re,ce){var Ee=ce.anchor,be=ce.head,Oe=Nn(re.doc,Ee.line);if(_n(Ee,be)==0&&Ee.sticky==be.sticky)return ce;var qe=$t(Oe);if(!qe)return ce;var gt=Ot(qe,Ee.ch,Ee.sticky),Lt=qe[gt];if(Lt.from!=Ee.ch&&Lt.to!=Ee.ch)return ce;var Tt=gt+(Lt.from==Ee.ch==(Lt.level!=1)?0:1);if(Tt==0||Tt==qe.length)return ce;var It;if(be.line!=Ee.line)It=(be.line-Ee.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var nn=Ot(qe,be.ch,be.sticky),zt=nn-gt||(be.ch-Ee.ch)*(Lt.level==1?-1:1);nn==Tt-1||nn==Tt?It=zt<0:It=zt>0}var xn=qe[Tt+(It?-1:0)],fn=It==(xn.level==1),rr=fn?xn.from:xn.to,or=fn?"after":"before";return Ee.ch==rr&&Ee.sticky==or?ce:new To(new Jt(Ee.line,rr,or),be)}function md(re,ce,Ee,be){var Oe,qe;if(ce.touches)Oe=ce.touches[0].clientX,qe=ce.touches[0].clientY;else try{Oe=ce.clientX,qe=ce.clientY}catch(xn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&Qn(ce);var gt=re.display,Lt=gt.lineDiv.getBoundingClientRect();if(qe>Lt.bottom||!bn(re,Ee))return Yn(ce);qe-=Lt.top-gt.viewOffset;for(var Tt=0;Tt<re.display.gutterSpecs.length;++Tt){var It=gt.gutters.childNodes[Tt];if(It&&It.getBoundingClientRect().right>=Oe){var nn=Wt(re.doc,qe),zt=re.display.gutterSpecs[Tt];return tn(re,Ee,re,nn,zt.className,ce),Yn(ce)}}}function vd(re,ce){return md(re,ce,"gutterClick",!0)}function yd(re,ce){jo(re.display,ce)||rm(re,ce)||Ut(re,ce,"contextmenu")||Pe||re.display.input.onContextMenu(ce)}function rm(re,ce){return bn(re,"gutterContextMenu")?md(re,ce,"gutterContextMenu",!1):!1}function Sd(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),uu(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var ce=re.optionHandlers;function Ee(be,Oe,qe,gt){re.defaults[be]=Oe,qe&&(ce[be]=gt?function(Lt,Tt,It){It!=gh&&qe(Lt,Tt,It)}:qe)}re.defineOption=Ee,re.Init=gh,Ee("value","",function(be,Oe){return be.setValue(Oe)},!0),Ee("mode",null,function(be,Oe){be.doc.modeOption=Oe,qi(be)},!0),Ee("indentUnit",2,qi,!0),Ee("indentWithTabs",!1),Ee("smartIndent",!0),Ee("tabSize",4,function(be){ff(be),uu(be),Fo(be)},!0),Ee("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var qe=[],gt=be.doc.first;be.doc.iter(function(Tt){for(var It=0;;){var nn=Tt.text.indexOf(Oe,It);if(nn==-1)break;It=nn+Oe.length,qe.push(Jt(gt,nn))}gt++});for(var Lt=qe.length-1;Lt>=0;Lt--)Zh(be.doc,Oe,qe[Lt],Jt(qe[Lt].line,qe[Lt].ch+Oe.length))}}),Ee("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,qe){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),qe!=gh&&be.refresh()}),Ee("specialCharPlaceholder",wi,function(be){return be.refresh()},!0),Ee("electricChars",!0),Ee("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ee("spellcheck",!1,function(be,Oe){return be.getInputField().spellcheck=Oe},!0),Ee("autocorrect",!1,function(be,Oe){return be.getInputField().autocorrect=Oe},!0),Ee("autocapitalize",!1,function(be,Oe){return be.getInputField().autocapitalize=Oe},!0),Ee("rtlMoveVisually",!le),Ee("wholeLineUpdateBefore",!0),Ee("theme","default",function(be){Sd(be),ll(be)},!0),Ee("keyMap","default",function(be,Oe,qe){var gt=$h(Oe),Lt=qe!=gh&&$h(qe);Lt&&Lt.detach&&Lt.detach(be,gt),gt.attach&&gt.attach(be,Lt||null)}),Ee("extraKeys",null),Ee("configureMouse",null),Ee("lineWrapping",!1,om,!0),Ee("gutters",[],function(be,Oe){be.display.gutterSpecs=Va(Oe,be.options.lineNumbers),ll(be)},!0),Ee("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Fu(be.display)+"px":"0",be.refresh()},!0),Ee("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ee("scrollbarStyle","native",function(be){Jl(be),Fa(be),be.display.scrollbars.setScrollTop(be.doc.scrollTop),be.display.scrollbars.setScrollLeft(be.doc.scrollLeft)},!0),Ee("lineNumbers",!1,function(be,Oe){be.display.gutterSpecs=Va(be.options.gutters,Oe),ll(be)},!0),Ee("firstLineNumber",1,ll,!0),Ee("lineNumberFormatter",function(be){return be},ll,!0),Ee("showCursorWhenSelecting",!1,ma,!0),Ee("resetSelectionOnContextMenu",!0),Ee("lineWiseCopyCut",!0),Ee("pasteLinesPerSelection",!0),Ee("selectionsMayTouch",!1),Ee("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Du(be),be.display.input.blur()),be.display.input.readOnlyChanged(Oe)}),Ee("screenReaderLabel",null,function(be,Oe){Oe=Oe===""?null:Oe,be.display.input.screenReaderLabelChanged(Oe)}),Ee("disableInput",!1,function(be,Oe){Oe||be.display.input.reset()},!0),Ee("dragDrop",!0,xd),Ee("allowDropFileTypes",null),Ee("cursorBlinkRate",530),Ee("cursorScrollMargin",0),Ee("cursorHeight",1,ma,!0),Ee("singleCursorHeightPerLine",!0,ma,!0),Ee("workTime",100),Ee("workDelay",100),Ee("flattenSpans",!0,ff,!0),Ee("addModeClass",!1,ff,!0),Ee("pollInterval",100),Ee("undoDepth",200,function(be,Oe){return be.doc.history.undoDepth=Oe}),Ee("historyEventDelay",1250),Ee("viewportMargin",10,function(be){return be.refresh()},!0),Ee("maxHighlightLength",1e4,ff,!0),Ee("moveInputWithCursor",!0,function(be,Oe){Oe||be.display.input.resetPosition()}),Ee("tabindex",null,function(be,Oe){return be.display.input.getField().tabIndex=Oe||""}),Ee("autofocus",null),Ee("direction","ltr",function(be,Oe){return be.doc.setDirection(Oe)},!0),Ee("phrases",null)}function xd(re,ce,Ee){var be=Ee&&Ee!=gh;if(!ce!=!be){var Oe=re.display.dragFunctions,qe=ce?rn:sn;qe(re.display.scroller,"dragstart",Oe.start),qe(re.display.scroller,"dragenter",Oe.enter),qe(re.display.scroller,"dragover",Oe.over),qe(re.display.scroller,"dragleave",Oe.leave),qe(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Ve(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Be(re.display.wrapper,"CodeMirror-wrap"),Er(re)),fi(re),Fo(re),uu(re),setTimeout(function(){return Fa(re)},100)}function po(re,ce){var Ee=this;if(!(this instanceof po))return new po(re,ce);this.options=ce=ce?Pt(ce):{},Pt(Fp,ce,!1);var be=ce.value;typeof be=="string"?be=new os(be,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(be.modeOption=ce.mode),this.doc=be;var Oe=new po.inputStyles[ce.inputStyle](this),qe=this.display=new uh(re,be,Oe,ce);qe.wrapper.CodeMirror=this,Sd(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Jl(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 nt,keySeq:null,specialChars:null},ce.autofocus&&!ee&&qe.input.focus(),De&&fe<11&&setTimeout(function(){return Ee.display.input.reset(!0)},20),zc(this),hl(),sl(this),this.curOp.forceUpdate=!0,rd(this,be),ce.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Ee.hasFocus()&&!Ee.state.focused&&ho(Ee)},20):Du(this);for(var gt in kf)kf.hasOwnProperty(gt)&&kf[gt](this,ce[gt],gh);ba(this),ce.finishInit&&ce.finishInit(this);for(var Lt=0;Lt<ec.length;++Lt)ec[Lt](this);Fl(this),me&&ce.lineWrapping&&getComputedStyle(qe.lineDiv).textRendering=="optimizelegibility"&&(qe.lineDiv.style.textRendering="auto")}po.defaults=Fp,po.optionHandlers=kf;function zc(re){var ce=re.display;rn(ce.scroller,"mousedown",Da(re,tu)),De&&fe<11?rn(ce.scroller,"dblclick",Da(re,function(Tt){if(!Ut(re,Tt)){var It=Ua(re,Tt);if(!(!It||vd(re,Tt)||jo(re.display,Tt))){Qn(Tt);var nn=re.findWordAt(It);sd(re.doc,nn.anchor,nn.head)}}})):rn(ce.scroller,"dblclick",function(Tt){return Ut(re,Tt)||Qn(Tt)}),rn(ce.scroller,"contextmenu",function(Tt){return yd(re,Tt)}),rn(ce.input.getField(),"contextmenu",function(Tt){ce.scroller.contains(Tt.target)||yd(re,Tt)});var Ee,be={end:0};function Oe(){ce.activeTouch&&(Ee=setTimeout(function(){return ce.activeTouch=null},1e3),be=ce.activeTouch,be.end=+new Date)}function qe(Tt){if(Tt.touches.length!=1)return!1;var It=Tt.touches[0];return It.radiusX<=1&&It.radiusY<=1}function gt(Tt,It){if(It.left==null)return!0;var nn=It.left-Tt.left,zt=It.top-Tt.top;return nn*nn+zt*zt>20*20}rn(ce.scroller,"touchstart",function(Tt){if(!Ut(re,Tt)&&!qe(Tt)&&!vd(re,Tt)){ce.input.ensurePolled(),clearTimeout(Ee);var It=+new Date;ce.activeTouch={start:It,moved:!1,prev:It-be.end<=300?be:null},Tt.touches.length==1&&(ce.activeTouch.left=Tt.touches[0].pageX,ce.activeTouch.top=Tt.touches[0].pageY)}}),rn(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),rn(ce.scroller,"touchend",function(Tt){var It=ce.activeTouch;if(It&&!jo(ce,Tt)&&It.left!=null&&!It.moved&&new Date-It.start<300){var nn=re.coordsChar(ce.activeTouch,"page"),zt;!It.prev||gt(It,It.prev)?zt=new To(nn,nn):!It.prev.prev||gt(It,It.prev.prev)?zt=re.findWordAt(nn):zt=new To(Jt(nn.line,0),er(re.doc,Jt(nn.line+1,0))),re.setSelection(zt.anchor,zt.head),re.focus(),Qn(Tt)}Oe()}),rn(ce.scroller,"touchcancel",Oe),rn(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Yl(re,ce.scroller.scrollTop),$l(re,ce.scroller.scrollLeft,!0),tn(re,"scroll",re))}),rn(ce.scroller,"mousewheel",function(Tt){return Za(re,Tt)}),rn(ce.scroller,"DOMMouseScroll",function(Tt){return Za(re,Tt)}),rn(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(Tt){Ut(re,Tt)||Mr(Tt)},over:function(Tt){Ut(re,Tt)||($g(re,Tt),Mr(Tt))},start:function(Tt){return Yg(re,Tt)},drop:Da(re,vp),leave:function(Tt){Ut(re,Tt)||Jg(re)}};var Lt=ce.input.getField();rn(Lt,"keyup",function(Tt){return Mp.call(re,Tt)}),rn(Lt,"keydown",Da(re,kp)),rn(Lt,"keypress",Da(re,eu)),rn(Lt,"focus",function(Tt){return ho(re,Tt)}),rn(Lt,"blur",function(Tt){return Du(re,Tt)})}var ec=[];po.defineInitHook=function(re){return ec.push(re)};function Ba(re,ce,Ee,be){var Oe=re.doc,qe;Ee==null&&(Ee="add"),Ee=="smart"&&(Oe.mode.indent?qe=zi(re,ce).state:Ee="prev");var gt=re.options.tabSize,Lt=Nn(Oe,ce),Tt=$e(Lt.text,null,gt);Lt.stateAfter&&(Lt.stateAfter=null);var It=Lt.text.match(/^\s*/)[0],nn;if(!be&&!/\S/.test(Lt.text))nn=0,Ee="not";else if(Ee=="smart"&&(nn=Oe.mode.indent(qe,Lt.text.slice(It.length),Lt.text),nn==wt||nn>150)){if(!be)return;Ee="prev"}Ee=="prev"?ce>Oe.first?nn=$e(Nn(Oe,ce-1).text,null,gt):nn=0:Ee=="add"?nn=Tt+re.options.indentUnit:Ee=="subtract"?nn=Tt-re.options.indentUnit:typeof Ee=="number"&&(nn=Tt+Ee),nn=Math.max(0,nn);var zt="",xn=0;if(re.options.indentWithTabs)for(var fn=Math.floor(nn/gt);fn;--fn)xn+=gt,zt+=" ";if(xn<nn&&(zt+=vt(nn-xn)),zt!=It)return Zh(Oe,zt,Jt(ce,0),Jt(ce,It.length),"+input"),Lt.stateAfter=null,!0;for(var rr=0;rr<Oe.sel.ranges.length;rr++){var or=Oe.sel.ranges[rr];if(or.head.line==ce&&or.head.ch<It.length){var pr=Jt(ce,It.length);fh(Oe,rr,new To(pr,pr));break}}}var Is=null;function tc(re){Is=re}function Tf(re,ce,Ee,be,Oe){var qe=re.doc;re.display.shift=!1,be||(be=qe.sel);var gt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>gt,Tt=Wi(ce),It=null;if(Lt&&be.ranges.length>1)if(Is&&Is.text.join(`
`)==ce){if(be.ranges.length%Is.text.length==0){It=[];for(var nn=0;nn<Is.text.length;nn++)It.push(qe.splitLines(Is.text[nn]))}}else Tt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(It=pt(Tt,function(Nr){return[Nr]}));for(var zt=re.curOp.updateInput,xn=be.ranges.length-1;xn>=0;xn--){var fn=be.ranges[xn],rr=fn.from(),or=fn.to();fn.empty()&&(Ee&&Ee>0?rr=Jt(rr.line,rr.ch-Ee):re.state.overwrite&&!Lt?or=Jt(or.line,Math.min(Nn(qe,or.line).text.length,or.ch+kt(Tt).length)):Lt&&Is&&Is.lineWise&&Is.text.join(`
`)==Tt.join(`
`)&&(rr=or=Jt(rr.line,0)));var pr={from:rr,to:or,text:It?It[xn%It.length]:Tt,origin:Oe||(Lt?"paste":re.state.cutIncoming>gt?"cut":"+input")};dh(re.doc,pr),Ir(re,"inputRead",re,pr)}ce&&!Lt&&Bp(re,ce),Ol(re),re.curOp.updateInput<2&&(re.curOp.updateInput=zt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,ce){var Ee=re.clipboardData&&re.clipboardData.getData("Text");if(Ee)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&yo(ce,function(){return Tf(ce,Ee,0,null,"paste")}),!0}function Bp(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ee=re.doc.sel,be=Ee.ranges.length-1;be>=0;be--){var Oe=Ee.ranges[be];if(!(Oe.head.ch>100||be&&Ee.ranges[be-1].head.line==Oe.head.line)){var qe=re.getModeAt(Oe.head),gt=!1;if(qe.electricChars){for(var Lt=0;Lt<qe.electricChars.length;Lt++)if(ce.indexOf(qe.electricChars.charAt(Lt))>-1){gt=Ba(re,Oe.head.line,"smart");break}}else qe.electricInput&&qe.electricInput.test(Nn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(gt=Ba(re,Oe.head.line,"smart"));gt&&Ir(re,"electricInput",re,Oe.head.line)}}}function Ip(re){for(var ce=[],Ee=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,qe={anchor:Jt(Oe,0),head:Jt(Oe+1,0)};Ee.push(qe),ce.push(re.getRange(qe.anchor,qe.head))}return{text:ce,ranges:Ee}}function Rp(re,ce,Ee,be){re.setAttribute("autocorrect",Ee?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!ce)}function _p(){var re=Ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Ae("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return me?re.style.width="1000px":re.setAttribute("wrap","off"),de&&(re.style.border="1px solid black"),Rp(re),ce}function mh(re){var ce=re.optionHandlers,Ee=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(be,Oe){var qe=this.options,gt=qe[be];qe[be]==Oe&&be!="mode"||(qe[be]=Oe,ce.hasOwnProperty(be)&&Da(this,ce[be])(this,Oe,gt),tn(this,"optionChange",this,be))},getOption:function(be){return this.options[be]},getDoc:function(){return this.doc},addKeyMap:function(be,Oe){this.state.keyMaps[Oe?"push":"unshift"]($h(be))},removeKeyMap:function(be){for(var Oe=this.state.keyMaps,qe=0;qe<Oe.length;++qe)if(Oe[qe]==be||Oe[qe].name==be)return Oe.splice(qe,1),!0},addOverlay:Wa(function(be,Oe){var qe=be.token?be:re.getMode(this.options,be);if(qe.startState)throw new Error("Overlays may not be stateful.");Qe(this.state.overlays,{mode:qe,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(gt){return gt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Wa(function(be){for(var Oe=this.state.overlays,qe=0;qe<Oe.length;++qe){var gt=Oe[qe].modeSpec;if(gt==be||typeof be=="string"&&gt.name==be){Oe.splice(qe,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Wa(function(be,Oe,qe){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),jn(this.doc,be)&&Ba(this,be,Oe,qe)}),indentSelection:Wa(function(be){for(var Oe=this.doc.sel.ranges,qe=-1,gt=0;gt<Oe.length;gt++){var Lt=Oe[gt];if(Lt.empty())Lt.head.line>qe&&(Ba(this,Lt.head.line,be,!0),qe=Lt.head.line,gt==this.doc.sel.primIndex&&Ol(this));else{var Tt=Lt.from(),It=Lt.to(),nn=Math.max(qe,Tt.line);qe=Math.min(this.lastLine(),It.line-(It.ch?0:1))+1;for(var zt=nn;zt<qe;++zt)Ba(this,zt,be);var xn=this.doc.sel.ranges;Tt.ch==0&&Oe.length==xn.length&&xn[gt].from().ch>0&&fh(this.doc,gt,new To(Tt,xn[gt].to()),dt)}}}),getTokenAt:function(be,Oe){return vi(this,be,Oe)},getLineTokens:function(be,Oe){return vi(this,Jt(be),Oe,!0)},getTokenTypeAt:function(be){be=er(this.doc,be);var Oe=pi(this,Nn(this.doc,be.line)),qe=0,gt=(Oe.length-1)/2,Lt=be.ch,Tt;if(Lt==0)Tt=Oe[2];else for(;;){var It=qe+gt>>1;if((It?Oe[It*2-1]:0)>=Lt)gt=It;else if(Oe[It*2+1]<Lt)qe=It+1;else{Tt=Oe[It*2+2];break}}var nn=Tt?Tt.indexOf("overlay "):-1;return nn<0?Tt:nn==0?null:Tt.slice(0,nn-1)},getModeAt:function(be){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(be).state).mode:Oe},getHelper:function(be,Oe){return this.getHelpers(be,Oe)[0]},getHelpers:function(be,Oe){var qe=[];if(!Ee.hasOwnProperty(Oe))return qe;var gt=Ee[Oe],Lt=this.getModeAt(be);if(typeof Lt[Oe]=="string")gt[Lt[Oe]]&&qe.push(gt[Lt[Oe]]);else if(Lt[Oe])for(var Tt=0;Tt<Lt[Oe].length;Tt++){var It=gt[Lt[Oe][Tt]];It&&qe.push(It)}else Lt.helperType&&gt[Lt.helperType]?qe.push(gt[Lt.helperType]):gt[Lt.name]&&qe.push(gt[Lt.name]);for(var nn=0;nn<gt._global.length;nn++){var zt=gt._global[nn];zt.pred(Lt,this)&&yt(qe,zt.val)==-1&&qe.push(zt.val)}return qe},getStateAfter:function(be,Oe){var qe=this.doc;return be=Un(qe,be==null?qe.first+qe.size-1:be),zi(this,be+1,Oe).state},cursorCoords:function(be,Oe){var qe,gt=this.doc.sel.primary();return be==null?qe=gt.head:typeof be=="object"?qe=er(this.doc,be):qe=be?gt.from():gt.to(),co(this,qe,Oe||"page")},charCoords:function(be,Oe){return Ga(this,er(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=Xl(this,be,Oe||"page"),sa(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=Xl(this,{top:be,left:0},Oe||"page").top,Wt(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,qe){var gt=!1,Lt;if(typeof be=="number"){var Tt=this.doc.first+this.doc.size-1;be<this.doc.first?be=this.doc.first:be>Tt&&(be=Tt,gt=!0),Lt=Nn(this.doc,be)}else Lt=be;return ga(this,Lt,{top:0,left:0},Oe||"page",qe||gt).top+(gt?this.doc.height-Cr(Lt):0)},defaultTextHeight:function(){return Pa(this.display)},defaultCharWidth:function(){return Fs(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,qe,gt,Lt){var Tt=this.display;be=co(this,er(this.doc,be));var It=be.bottom,nn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),Tt.sizer.appendChild(Oe),gt=="over")It=be.top;else if(gt=="above"||gt=="near"){var zt=Math.max(Tt.wrapper.clientHeight,this.doc.height),xn=Math.max(Tt.sizer.clientWidth,Tt.lineSpace.clientWidth);(gt=="above"||be.bottom+Oe.offsetHeight>zt)&&be.top>Oe.offsetHeight?It=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=zt&&(It=be.bottom),nn+Oe.offsetWidth>xn&&(nn=xn-Oe.offsetWidth)}Oe.style.top=It+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(nn=Tt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?nn=0:Lt=="middle"&&(nn=(Tt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=nn+"px"),qe&&ih(this,{left:nn,top:It,right:nn+Oe.offsetWidth,bottom:It+Oe.offsetHeight})},triggerOnKeyDown:Wa(kp),triggerOnKeyPress:Wa(eu),triggerOnKeyUp:Mp,triggerOnMouseDown:Wa(tu),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Wa(function(be){Bp(this,be)}),findPosH:function(be,Oe,qe,gt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var Tt=er(this.doc,be),It=0;It<Oe&&(Tt=Mf(this.doc,Tt,Lt,qe,gt),!Tt.hitSide);++It);return Tt},moveH:Wa(function(be,Oe){var qe=this;this.extendSelectionsBy(function(gt){return qe.display.shift||qe.doc.extend||gt.empty()?Mf(qe.doc,gt.head,be,Oe,qe.options.rtlMoveVisually):be<0?gt.from():gt.to()},ut)}),deleteH:Wa(function(be,Oe){var qe=this.doc.sel,gt=this.doc;qe.somethingSelected()?gt.replaceSelection("",null,"+delete"):Zs(this,function(Lt){var Tt=Mf(gt,Lt.head,be,Oe,!1);return be<0?{from:Tt,to:Lt.head}:{from:Lt.head,to:Tt}})}),findPosV:function(be,Oe,qe,gt){var Lt=1,Tt=gt;Oe<0&&(Lt=-1,Oe=-Oe);for(var It=er(this.doc,be),nn=0;nn<Oe;++nn){var zt=co(this,It,"div");if(Tt==null?Tt=zt.left:zt.left=Tt,It=vh(this,zt,Lt,qe),It.hitSide)break}return It},moveV:Wa(function(be,Oe){var qe=this,gt=this.doc,Lt=[],Tt=!this.display.shift&&!gt.extend&&gt.sel.somethingSelected();if(gt.extendSelectionsBy(function(nn){if(Tt)return be<0?nn.from():nn.to();var zt=co(qe,nn.head,"div");nn.goalColumn!=null&&(zt.left=nn.goalColumn),Lt.push(zt.left);var xn=vh(qe,zt,be,Oe);return Oe=="page"&&nn==gt.sel.primary()&&_h(qe,Ga(qe,xn,"div").top-zt.top),xn},ut),Lt.length)for(var It=0;It<gt.sel.ranges.length;It++)gt.sel.ranges[It].goalColumn=Lt[It]}),findWordAt:function(be){var Oe=this.doc,qe=Nn(Oe,be.line).text,gt=be.ch,Lt=be.ch;if(qe){var Tt=this.getHelper(be,"wordChars");(be.sticky=="before"||Lt==qe.length)&&gt?--gt:++Lt;for(var It=qe.charAt(gt),nn=tt(It,Tt)?function(zt){return tt(zt,Tt)}:/\s/.test(It)?function(zt){return/\s/.test(zt)}:function(zt){return!/\s/.test(zt)&&!tt(zt)};gt>0&&nn(qe.charAt(gt-1));)--gt;for(;Lt<qe.length&&nn(qe.charAt(Lt));)++Lt}return new To(Jt(be.line,gt),Jt(be.line,Lt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):Be(this.display.cursorDiv,"CodeMirror-overwrite"),tn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wa(function(be,Oe){Bu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-vo(this)-this.display.barHeight,width:be.scrollWidth-vo(this)-this.display.barWidth,clientHeight:ds(this),clientWidth:fs(this)}},scrollIntoView:Wa(function(be,Oe){be==null?(be={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof be=="number"?be={from:Jt(be,0),to:null}:be.from==null&&(be={from:be,to:null}),be.to||(be.to=be.from),be.margin=Oe||0,be.from.line!=null?lo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Wa(function(be,Oe){var qe=this,gt=function(Tt){return typeof Tt=="number"||/^\d+$/.test(String(Tt))?Tt+"px":Tt};be!=null&&(this.display.wrapper.style.width=gt(be)),Oe!=null&&(this.display.wrapper.style.height=gt(Oe)),this.options.lineWrapping&&Zl(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(Tt){if(Tt.widgets){for(var It=0;It<Tt.widgets.length;It++)if(Tt.widgets[It].noHScroll){Ri(qe,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,tn(this,"refresh",this)}),operation:function(be){return yo(this,be)},startOperation:function(){return sl(this)},endOperation:function(){return Fl(this)},refresh:Wa(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,uu(this),Bu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-Pa(this.display))>.5||this.options.lineWrapping)&&fi(this),tn(this,"refresh",this)}),swapDoc:Wa(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),uu(this),this.display.input.reset(),Bu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Ir(this,"swapDoc",this,Oe),Oe}),phrase:function(be){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,be)?Oe[be]:be},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Dn(re),re.registerHelper=function(be,Oe,qe){Ee.hasOwnProperty(be)||(Ee[be]=re[be]={_global:[]}),Ee[be][Oe]=qe},re.registerGlobalHelper=function(be,Oe,qe,gt){re.registerHelper(be,Oe,gt),Ee[be]._global.push({pred:qe,val:gt})}}function Mf(re,ce,Ee,be,Oe){var qe=ce,gt=Ee,Lt=Nn(re,ce.line),Tt=Oe&&re.direction=="rtl"?-Ee:Ee;function It(){var Yr=ce.line+Tt;return Yr<re.first||Yr>=re.first+re.size?!1:(ce=new Jt(Yr,ce.ch,ce.sticky),Lt=Nn(re,Yr))}function nn(Yr){var Gr;if(be=="codepoint"){var ii=Lt.text.charCodeAt(ce.ch+(be>0?0:-1));isNaN(ii)?Gr=null:Gr=new Jt(ce.line,Math.max(0,Math.min(Lt.text.length,ce.ch+Ee*(ii>=55296&&ii<56320?2:1))),-Ee)}else Oe?Gr=cd(re.cm,Lt,ce,Ee):Gr=Sa(Lt,ce,Ee);if(Gr==null)if(!Yr&&It())ce=Ef(Oe,re.cm,Lt,ce.line,Tt);else return!1;else ce=Gr;return!0}if(be=="char"||be=="codepoint")nn();else if(be=="column")nn(!0);else if(be=="word"||be=="group")for(var zt=null,xn=be=="group",fn=re.cm&&re.cm.getHelper(ce,"wordChars"),rr=!0;!(Ee<0&&!nn(!rr));rr=!1){var or=Lt.text.charAt(ce.ch)||`
`,pr=tt(or,fn)?"w":xn&&or==`
`?"n":!xn||/\s/.test(or)?null:"p";if(xn&&!rr&&!pr&&(pr="s"),zt&&zt!=pr){Ee<0&&(Ee=1,nn(),ce.sticky="after");break}if(pr&&(zt=pr),Ee>0&&!nn(!rr))break}var Nr=Sf(re,ce,qe,gt,!0);return ur(qe,Nr)&&(Nr.hitSide=!0),Nr}function vh(re,ce,Ee,be){var Oe=re.doc,qe=ce.left,gt;if(be=="page"){var Lt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Tt=Math.max(Lt-.5*Pa(re.display),3);gt=(Ee>0?ce.bottom:ce.top)+Ee*Tt}else be=="line"&&(gt=Ee>0?ce.bottom+3:ce.top-3);for(var It;It=sa(re,qe,gt),!!It.outside;){if(Ee<0?gt<=0:gt>=Oe.height){It.hitSide=!0;break}gt+=Ee*5}return It}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new nt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Do.prototype.init=function(re){var ce=this,Ee=this,be=Ee.cm,Oe=Ee.div=re.lineDiv;Rp(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function qe(Lt){for(var Tt=Lt.target;Tt;Tt=Tt.parentNode){if(Tt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Tt.className))break}return!1}rn(Oe,"paste",function(Lt){!qe(Lt)||Ut(be,Lt)||Dp(Lt,be)||fe<=11&&setTimeout(Da(be,function(){return ce.updateFromDOM()}),20)}),rn(Oe,"compositionstart",function(Lt){ce.composing={data:Lt.data,done:!1}}),rn(Oe,"compositionupdate",function(Lt){ce.composing||(ce.composing={data:Lt.data,done:!1})}),rn(Oe,"compositionend",function(Lt){ce.composing&&(Lt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),rn(Oe,"touchstart",function(){return Ee.forceCompositionEnd()}),rn(Oe,"input",function(){ce.composing||ce.readFromDOMSoon()});function gt(Lt){if(!(!qe(Lt)||Ut(be,Lt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Lt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var Tt=Ip(be);tc({lineWise:!0,text:Tt.text}),Lt.type=="cut"&&be.operation(function(){be.setSelections(Tt.ranges,0,dt),be.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var It=Is.text.join(`
`);if(Lt.clipboardData.setData("Text",It),Lt.clipboardData.getData("Text")==It){Lt.preventDefault();return}}var nn=_p(),zt=nn.firstChild;be.display.lineSpace.insertBefore(nn,be.display.lineSpace.firstChild),zt.value=Is.text.join(`
`);var xn=document.activeElement;st(zt),setTimeout(function(){be.display.lineSpace.removeChild(nn),xn.focus(),xn==Oe&&Ee.showPrimarySelection()},50)}}rn(Oe,"copy",gt),rn(Oe,"cut",gt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=hu(this.cm,!1);return re.focus=document.activeElement==this.div,re},Do.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Do.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Do.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,Ee=ce.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(ce.display.viewTo==ce.display.viewFrom||be.line>=ce.display.viewTo||Oe.line<ce.display.viewFrom){re.removeAllRanges();return}var qe=Lf(ce,re.anchorNode,re.anchorOffset),gt=Lf(ce,re.focusNode,re.focusOffset);if(!(qe&&!qe.bad&&gt&&!gt.bad&&_n(Bn(qe,gt),be)==0&&_n(mr(qe,gt),Oe)==0)){var Lt=ce.display.view,Tt=be.line>=ce.display.viewFrom&&wd(ce,be)||{node:Lt[0].measure.map[2],offset:0},It=Oe.line<ce.display.viewTo&&wd(ce,Oe);if(!It){var nn=Lt[Lt.length-1].measure,zt=nn.maps?nn.maps[nn.maps.length-1]:nn.map;It={node:zt[zt.length-1],offset:zt[zt.length-2]-zt[zt.length-3]}}if(!Tt||!It){re.removeAllRanges();return}var xn=re.rangeCount&&re.getRangeAt(0),fn;try{fn=We(Tt.node,Tt.offset,It.offset,It.node)}catch(rr){}fn&&(!ht&&ce.state.focused?(re.collapse(Tt.node,Tt.offset),fn.collapsed||(re.removeAllRanges(),re.addRange(fn))):(re.removeAllRanges(),re.addRange(fn)),xn&&re.anchorNode==null?re.addRange(xn):ht&&this.startGracePeriod()),this.rememberSelection()}},Do.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Do.prototype.showMultipleSelections=function(re){Ne(this.cm.display.cursorDiv,re.cursors),Ne(this.cm.display.selectionDiv,re.selection)},Do.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Do.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},Do.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Do.prototype.blur=function(){this.div.blur()},Do.prototype.getField=function(){return this.div},Do.prototype.supportsTouch=function(){return!0},Do.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():yo(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function ce(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},Do.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Do.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(z&&Ce&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ee=Lf(ce,re.anchorNode,re.anchorOffset),be=Lf(ce,re.focusNode,re.focusOffset);Ee&&be&&yo(ce,function(){gs(ce.doc,Iu(Ee,be),dt),(Ee.bad||be.bad)&&(ce.curOp.selectionChanged=!0)})}}},Do.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,Ee=re.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(be.ch==0&&be.line>re.firstLine()&&(be=Jt(be.line-1,Nn(re.doc,be.line-1).length)),Oe.ch==Nn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=Jt(Oe.line+1,0)),be.line<ce.viewFrom||Oe.line>ce.viewTo-1)return!1;var qe,gt,Lt;be.line==ce.viewFrom||(qe=Ds(re,be.line))==0?(gt=jt(ce.view[0].line),Lt=ce.view[0].node):(gt=jt(ce.view[qe].line),Lt=ce.view[qe-1].node.nextSibling);var Tt=Ds(re,Oe.line),It,nn;if(Tt==ce.view.length-1?(It=ce.viewTo-1,nn=ce.lineDiv.lastChild):(It=jt(ce.view[Tt+1].line)-1,nn=ce.view[Tt+1].node.previousSibling),!Lt)return!1;for(var zt=re.doc.splitLines(Uc(re,Lt,nn,gt,It)),xn=gr(re.doc,Jt(gt,0),Jt(It,Nn(re.doc,It).text.length));zt.length>1&&xn.length>1;)if(kt(zt)==kt(xn))zt.pop(),xn.pop(),It--;else if(zt[0]==xn[0])zt.shift(),xn.shift(),gt++;else break;for(var fn=0,rr=0,or=zt[0],pr=xn[0],Nr=Math.min(or.length,pr.length);fn<Nr&&or.charCodeAt(fn)==pr.charCodeAt(fn);)++fn;for(var Yr=kt(zt),Gr=kt(xn),ii=Math.min(Yr.length-(zt.length==1?fn:0),Gr.length-(xn.length==1?fn:0));rr<ii&&Yr.charCodeAt(Yr.length-rr-1)==Gr.charCodeAt(Gr.length-rr-1);)++rr;if(zt.length==1&&xn.length==1&&gt==be.line)for(;fn&&fn>be.ch&&Yr.charCodeAt(Yr.length-rr-1)==Gr.charCodeAt(Gr.length-rr-1);)fn--,rr++;zt[zt.length-1]=Yr.slice(0,Yr.length-rr).replace(/^\u200b+/,""),zt[0]=zt[0].slice(fn).replace(/\u200b+$/,"");var ji=Jt(gt,fn),Rr=Jt(It,xn.length?kt(xn).length-rr:0);if(zt.length>1||zt[0]||_n(ji,Rr))return Zh(re.doc,zt,ji,Rr,"+input"),!0},Do.prototype.ensurePolled=function(){this.forceCompositionEnd()},Do.prototype.reset=function(){this.forceCompositionEnd()},Do.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Do.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Do.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&yo(this.cm,function(){return Fo(re.cm)})},Do.prototype.setUneditable=function(re){re.contentEditable="false"},Do.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Da(this.cm,Tf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Do.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Do.prototype.onContextMenu=function(){},Do.prototype.resetPosition=function(){},Do.prototype.needsContentAttribute=!0;function wd(re,ce){var Ee=il(re,ce.line);if(!Ee||Ee.hidden)return null;var be=Nn(re.doc,ce.line),Oe=na(Ee,be,ce.line),qe=$t(be,re.doc.direction),gt="left";if(qe){var Lt=Ot(qe,ce.ch);gt=Lt%2?"right":"left"}var Tt=th(Oe.map,ce.ch,gt);return Tt.offset=Tt.collapse=="right"?Tt.end:Tt.start,Tt}function zp(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Gc(re,ce){return ce&&(re.bad=!0),re}function Uc(re,ce,Ee,be,Oe){var qe="",gt=!1,Lt=re.doc.lineSeparator(),Tt=!1;function It(fn){return function(rr){return rr.id==fn}}function nn(){gt&&(qe+=Lt,Tt&&(qe+=Lt),gt=Tt=!1)}function zt(fn){fn&&(nn(),qe+=fn)}function xn(fn){if(fn.nodeType==1){var rr=fn.getAttribute("cm-text");if(rr){zt(rr);return}var or=fn.getAttribute("cm-marker"),pr;if(or){var Nr=re.findMarks(Jt(be,0),Jt(Oe+1,0),It(+or));Nr.length&&(pr=Nr[0].find(0))&&zt(gr(re.doc,pr.from,pr.to).join(Lt));return}if(fn.getAttribute("contenteditable")=="false")return;var Yr=/^(pre|div|p|li|table|br)$/i.test(fn.nodeName);if(!/^br$/i.test(fn.nodeName)&&fn.textContent.length==0)return;Yr&&nn();for(var Gr=0;Gr<fn.childNodes.length;Gr++)xn(fn.childNodes[Gr]);/^(pre|p)$/i.test(fn.nodeName)&&(Tt=!0),Yr&&(gt=!0)}else fn.nodeType==3&&zt(fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;xn(ce),ce!=Ee;)ce=ce.nextSibling,Tt=!1;return qe}function Lf(re,ce,Ee){var be;if(ce==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ee],!be)return Gc(re.clipPos(Jt(re.display.viewTo-1)),!0);ce=null,Ee=0}else for(be=ce;;be=be.parentNode){if(!be||be==re.display.lineDiv)return null;if(be.parentNode&&be.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var qe=re.display.view[Oe];if(qe.node==be)return am(qe,ce,Ee)}}function am(re,ce,Ee){var be=re.text.firstChild,Oe=!1;if(!ce||!Ye(be,ce))return Gc(Jt(jt(re.line),0),!0);if(ce==be&&(Oe=!0,ce=be.childNodes[Ee],Ee=0,!ce)){var qe=re.rest?kt(re.rest):re.line;return Gc(Jt(jt(qe),qe.text.length),Oe)}var gt=ce.nodeType==3?ce:null,Lt=ce;for(!gt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(gt=ce.firstChild,Ee&&(Ee=gt.nodeValue.length));Lt.parentNode!=be;)Lt=Lt.parentNode;var Tt=re.measure,It=Tt.maps;function nn(pr,Nr,Yr){for(var Gr=-1;Gr<(It?It.length:0);Gr++)for(var ii=Gr<0?Tt.map:It[Gr],ji=0;ji<ii.length;ji+=3){var Rr=ii[ji+2];if(Rr==pr||Rr==Nr){var eo=jt(Gr<0?re.line:re.rest[Gr]),Yo=ii[ji]+Yr;return(Yr<0||Rr!=pr)&&(Yo=ii[ji+(Yr?1:0)]),Jt(eo,Yo)}}}var zt=nn(gt,Lt,Ee);if(zt)return Gc(zt,Oe);for(var xn=Lt.nextSibling,fn=gt?gt.nodeValue.length-Ee:0;xn;xn=xn.nextSibling){if(zt=nn(xn,xn.firstChild,0),zt)return Gc(Jt(zt.line,zt.ch-fn),Oe);fn+=xn.textContent.length}for(var rr=Lt.previousSibling,or=Ee;rr;rr=rr.previousSibling){if(zt=nn(rr,rr.firstChild,-1),zt)return Gc(Jt(zt.line,zt.ch+or),Oe);or+=rr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new nt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var ce=this,Ee=this,be=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),de&&(Oe.style.width="0px"),rn(Oe,"input",function(){De&&fe>=9&&ce.hasSelection&&(ce.hasSelection=null),Ee.poll()}),rn(Oe,"paste",function(gt){Ut(be,gt)||Dp(gt,be)||(be.state.pasteIncoming=+new Date,Ee.fastPoll())});function qe(gt){if(!Ut(be,gt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Lt=Ip(be);tc({lineWise:!0,text:Lt.text}),gt.type=="cut"?be.setSelections(Lt.ranges,null,dt):(Ee.prevInput="",Oe.value=Lt.text.join(`
`),st(Oe))}else return;gt.type=="cut"&&(be.state.cutIncoming=+new Date)}}rn(Oe,"cut",qe),rn(Oe,"copy",qe),rn(re.scroller,"paste",function(gt){if(!(jo(re,gt)||Ut(be,gt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ee.focus();return}var Lt=new Event("paste");Lt.clipboardData=gt.clipboardData,Oe.dispatchEvent(Lt)}}),rn(re.lineSpace,"selectstart",function(gt){jo(re,gt)||Qn(gt)}),rn(Oe,"compositionstart",function(){var gt=be.getCursor("from");Ee.composing&&Ee.composing.range.clear(),Ee.composing={start:gt,range:be.markText(gt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),rn(Oe,"compositionend",function(){Ee.composing&&(Ee.poll(),Ee.composing.range.clear(),Ee.composing=null)})},Ta.prototype.createField=function(re){this.wrapper=_p(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var re=this.cm,ce=re.display,Ee=re.doc,be=hu(re);if(re.options.moveInputWithCursor){var Oe=co(re,Ee.sel.primary().head,"div"),qe=ce.wrapper.getBoundingClientRect(),gt=ce.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+gt.top-qe.top)),be.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+gt.left-qe.left))}return be},Ta.prototype.showSelection=function(re){var ce=this.cm,Ee=ce.display;Ne(Ee.cursorDiv,re.cursors),Ne(Ee.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ta.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Ee=ce.getSelection();this.textarea.value=Ee,ce.state.focused&&st(this.textarea),De&&fe>=9&&(this.hasSelection=Ee)}else re||(this.prevInput=this.textarea.value="",De&&fe>=9&&(this.hasSelection=null))}},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||Ue()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ta.prototype.fastPoll=function(){var re=!1,ce=this;ce.pollingFast=!0;function Ee(){var be=ce.poll();!be&&!re?(re=!0,ce.polling.set(60,Ee)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Ee)},Ta.prototype.poll=function(){var re=this,ce=this.cm,Ee=this.textarea,be=this.prevInput;if(this.contextMenuPending||!ce.state.focused||et(Ee)&&!be&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Oe=Ee.value;if(Oe==be&&!ce.somethingSelected())return!1;if(De&&fe>=9&&this.hasSelection===Oe||ae&&/[\uf700-\uf7ff]/.test(Oe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var qe=Oe.charCodeAt(0);if(qe==8203&&!be&&(be="\u200B"),qe==8666)return this.reset(),this.cm.execCommand("undo")}for(var gt=0,Lt=Math.min(be.length,Oe.length);gt<Lt&&be.charCodeAt(gt)==Oe.charCodeAt(gt);)++gt;return yo(ce,function(){Tf(ce,Oe.slice(gt),be.length-gt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
`)>-1?Ee.value=re.prevInput="":re.prevInput=Oe,re.composing&&(re.composing.range.clear(),re.composing.range=ce.markText(re.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){De&&fe>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(re){var ce=this,Ee=ce.cm,be=Ee.display,Oe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var qe=Ua(Ee,re),gt=be.scroller.scrollTop;if(!qe||Se)return;var Lt=Ee.options.resetSelectionOnContextMenu;Lt&&Ee.doc.sel.contains(qe)==-1&&Da(Ee,gs)(Ee.doc,Iu(qe),dt);var Tt=Oe.style.cssText,It=ce.wrapper.style.cssText,nn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-nn.top-5)+"px; left: "+(re.clientX-nn.left-5)+`px;
z-index: 1000; background: `+(De?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var zt;me&&(zt=window.scrollY),be.input.focus(),me&&window.scrollTo(null,zt),be.input.reset(),Ee.somethingSelected()||(Oe.value=ce.prevInput=" "),ce.contextMenuPending=fn,be.selForContextMenu=Ee.doc.sel,clearTimeout(be.detectingSelectAll);function xn(){if(Oe.selectionStart!=null){var or=Ee.somethingSelected(),pr="\u200B"+(or?Oe.value:"");Oe.value="\u21DA",Oe.value=pr,ce.prevInput=or?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=pr.length,be.selForContextMenu=Ee.doc.sel}}function fn(){if(ce.contextMenuPending==fn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=It,Oe.style.cssText=Tt,De&&fe<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=gt),Oe.selectionStart!=null)){(!De||De&&fe<9)&&xn();var or=0,pr=function(){be.selForContextMenu==Ee.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Da(Ee,ya)(Ee):or++<10?be.detectingSelectAll=setTimeout(pr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(pr,200)}}if(De&&fe>=9&&xn(),Pe){Mr(re);var rr=function(){sn(window,"mouseup",rr),setTimeout(fn,20)};rn(window,"mouseup",rr)}else setTimeout(fn,50)},Ta.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ta.prototype.setUneditable=function(){},Ta.prototype.needsContentAttribute=!1;function sm(re,ce){if(ce=ce?Pt(ce):{},ce.value=re.value,!ce.tabindex&&re.tabIndex&&(ce.tabindex=re.tabIndex),!ce.placeholder&&re.placeholder&&(ce.placeholder=re.placeholder),ce.autofocus==null){var Ee=Ue();ce.autofocus=Ee==re||re.getAttribute("autofocus")!=null&&Ee==document.body}function be(){re.value=Lt.getValue()}var Oe;if(re.form&&(rn(re.form,"submit",be),!ce.leaveSubmitMethodAlone)){var qe=re.form;Oe=qe.submit;try{var gt=qe.submit=function(){be(),qe.submit=Oe,qe.submit(),qe.submit=gt}}catch(Tt){}}ce.finishInit=function(Tt){Tt.save=be,Tt.getTextArea=function(){return re},Tt.toTextArea=function(){Tt.toTextArea=isNaN,be(),re.parentNode.removeChild(Tt.getWrapperElement()),re.style.display="",re.form&&(sn(re.form,"submit",be),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Lt=po(function(Tt){return re.parentNode.insertBefore(Tt,re.nextSibling)},ce);return Lt}function Wc(re){re.off=sn,re.on=rn,re.wheelEventPixels=ul,re.Doc=os,re.splitLines=Wi,re.countColumn=$e,re.findColumn=Et,re.isWordChar=Ze,re.Pass=wt,re.signal=tn,re.Line=xi,re.changeEnd=hh,re.scrollbarModel=fu,re.Pos=Jt,re.cmpPos=_n,re.modes=lr,re.mimeModes=yr,re.resolveMode=on,re.getMode=dn,re.modeExtensions=en,re.extendMode=vn,re.copyState=fr,re.startState=oi,re.innerMode=cr,re.commands=ph,re.keyMap=Vs,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=Pl,re.normalizeKeyMap=wp,re.StringStream=an,re.SharedTextMarker=gu,re.TextMarker=Vt,re.LineWidget=zu,re.e_preventDefault=Qn,re.e_stopPropagation=Pr,re.e_stop=Mr,re.addClass=Ve,re.contains=Ye,re.rmClass=Be,re.keyNames=mu}im(po),mh(po);var Gu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in os.prototype)os.prototype.hasOwnProperty(Nf)&&yt(Gu,Nf)<0&&(po.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(os.prototype[Nf]));return Dn(os),po.inputStyles={textarea:Ta,contenteditable:Do},po.defineMode=function(re){!po.defaults.mode&&re!="null"&&(po.defaults.mode=re),Lr.apply(this,arguments)},po.defineMIME=uo,po.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),po.defineMIME("text/plain","null"),po.defineExtension=function(re,ce){po.prototype[re]=ce},po.defineDocExtension=function(re,ce){os.prototype[re]=ce},po.fromTextArea=sm,Wc(po),po.version="5.58.2",po})},25419:function(gn,cn,at){(function(ht){ht(at(89780),at(15525),at(98101))})(function(ht){"use strict";ht.defineMode("markdown",function(Dt,oe){var ze=ht.getMode(Dt,"text/html"),De=ze.name=="null";function fe($e){if(ht.findModeByName){var nt=ht.findModeByName($e);nt&&($e=nt.mime||nt.mimes[0])}var yt=ht.getMode(Dt,$e);return yt.name=="null"?null:yt}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var me={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 ke in me)me.hasOwnProperty(ke)&&oe.tokenTypeOverrides[ke]&&(me[ke]=oe.tokenTypeOverrides[ke]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Le=/^\[(x| )\](?=\s)/i,ve=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,we=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,ie=" ";function le($e,nt,yt){return nt.f=nt.inline=yt,yt($e,nt)}function ue($e,nt,yt){return nt.f=nt.block=yt,yt($e,nt)}function ge($e){return!$e||!/\S/.test($e.string)}function Pe($e){if($e.linkTitle=!1,$e.linkHref=!1,$e.linkText=!1,$e.em=!1,$e.strong=!1,$e.strikethrough=!1,$e.quote=0,$e.indentedCode=!1,$e.f==Be){var nt=De;if(!nt){var yt=ht.innerMode(ze,$e.htmlState);nt=yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText}nt&&($e.f=Re,$e.block=je,$e.htmlState=null)}return $e.trailingSpace=0,$e.trailingSpaceNewLine=!1,$e.prevLine=$e.thisLine,$e.thisLine={stream:null},null}function je($e,nt){var yt=$e.column()===nt.indentation,xt=ge(nt.prevLine.stream),wt=nt.indentedCode,dt=nt.prevLine.hr,ft=nt.list!==!1,ut=(nt.listStack[nt.listStack.length-1]||0)+3;nt.indentedCode=!1;var Et=nt.indentation;if(nt.indentationDiff===null&&(nt.indentationDiff=nt.indentation,ft)){for(nt.list=null;Et<nt.listStack[nt.listStack.length-1];)nt.listStack.pop(),nt.listStack.length?nt.indentation=nt.listStack[nt.listStack.length-1]:nt.list=!1;nt.list!==!1&&(nt.indentationDiff=Et-nt.listStack[nt.listStack.length-1])}var mt=!xt&&!dt&&!nt.prevLine.header&&(!ft||!wt)&&!nt.prevLine.fencedCodeEnd,vt=(nt.list===!1||dt||xt)&&nt.indentation<=ut&&$e.match(Ce),kt=null;if(nt.indentationDiff>=4&&(wt||nt.prevLine.fencedCodeEnd||nt.prevLine.header||xt))return $e.skipToEnd(),nt.indentedCode=!0,me.code;if($e.eatSpace())return null;if(yt&&nt.indentation<=ut&&(kt=$e.match(ve))&&kt[1].length<=6)return nt.quote=0,nt.header=kt[1].length,nt.thisLine.header=!0,oe.highlightFormatting&&(nt.formatting="header"),nt.f=nt.inline,Ne(nt);if(nt.indentation<=ut&&$e.eat(">"))return nt.quote=yt?1:nt.quote+1,oe.highlightFormatting&&(nt.formatting="quote"),$e.eatSpace(),Ne(nt);if(!vt&&!nt.setext&&yt&&nt.indentation<=ut&&(kt=$e.match(Se))){var pt=kt[1]?"ol":"ul";return nt.indentation=Et+$e.current().length,nt.list=!0,nt.quote=0,nt.listStack.push(nt.indentation),nt.em=!1,nt.strong=!1,nt.code=!1,nt.strikethrough=!1,oe.taskLists&&$e.match(Le,!1)&&(nt.taskList=!0),nt.f=nt.inline,oe.highlightFormatting&&(nt.formatting=["list","list-"+pt]),Ne(nt)}else{if(yt&&nt.indentation<=ut&&(kt=$e.match(z,!0)))return nt.quote=0,nt.fencedEndRE=new RegExp(kt[1]+"+ *$"),nt.localMode=oe.fencedCodeBlockHighlighting&&fe(kt[2]||oe.fencedCodeBlockDefaultMode),nt.localMode&&(nt.localState=ht.startState(nt.localMode)),nt.f=nt.block=Fe,oe.highlightFormatting&&(nt.formatting="code-block"),nt.code=-1,Ne(nt);if(nt.setext||(!mt||!ft)&&!nt.quote&&nt.list===!1&&!nt.code&&!vt&&!ee.test($e.string)&&(kt=$e.lookAhead(1))&&(kt=kt.match(we)))return nt.setext?(nt.header=nt.setext,nt.setext=0,$e.skipToEnd(),oe.highlightFormatting&&(nt.formatting="header")):(nt.header=kt[0].charAt(0)=="="?1:2,nt.setext=nt.header),nt.thisLine.header=!0,nt.f=nt.inline,Ne(nt);if(vt)return $e.skipToEnd(),nt.hr=!0,nt.thisLine.hr=!0,me.hr;if($e.peek()==="[")return le($e,nt,ot)}return le($e,nt,nt.inline)}function Be($e,nt){var yt=ze.token($e,nt.htmlState);if(!De){var xt=ht.innerMode(ze,nt.htmlState);(xt.mode.name=="xml"&&xt.state.tagStart===null&&!xt.state.context&&xt.state.tokenize.isInText||nt.md_inside&&$e.current().indexOf(">")>-1)&&(nt.f=Re,nt.block=je,nt.htmlState=null)}return yt}function Fe($e,nt){var yt=nt.listStack[nt.listStack.length-1]||0,xt=nt.indentation<yt,wt=yt+3;if(nt.fencedEndRE&&nt.indentation<=wt&&(xt||$e.match(nt.fencedEndRE))){oe.highlightFormatting&&(nt.formatting="code-block");var dt;return xt||(dt=Ne(nt)),nt.localMode=nt.localState=null,nt.block=je,nt.f=Re,nt.fencedEndRE=null,nt.code=0,nt.thisLine.fencedCodeEnd=!0,xt?ue($e,nt,nt.block):dt}else return nt.localMode?nt.localMode.token($e,nt.localState):($e.skipToEnd(),me.code)}function Ne($e){var nt=[];if($e.formatting){nt.push(me.formatting),typeof $e.formatting=="string"&&($e.formatting=[$e.formatting]);for(var yt=0;yt<$e.formatting.length;yt++)nt.push(me.formatting+"-"+$e.formatting[yt]),$e.formatting[yt]==="header"&&nt.push(me.formatting+"-"+$e.formatting[yt]+"-"+$e.header),$e.formatting[yt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?nt.push(me.formatting+"-"+$e.formatting[yt]+"-"+$e.quote):nt.push("error"))}if($e.taskOpen)return nt.push("meta"),nt.length?nt.join(" "):null;if($e.taskClosed)return nt.push("property"),nt.length?nt.join(" "):null;if($e.linkHref?nt.push(me.linkHref,"url"):($e.strong&&nt.push(me.strong),$e.em&&nt.push(me.em),$e.strikethrough&&nt.push(me.strikethrough),$e.emoji&&nt.push(me.emoji),$e.linkText&&nt.push(me.linkText),$e.code&&nt.push(me.code),$e.image&&nt.push(me.image),$e.imageAltText&&nt.push(me.imageAltText,"link"),$e.imageMarker&&nt.push(me.imageMarker)),$e.header&&nt.push(me.header,me.header+"-"+$e.header),$e.quote&&(nt.push(me.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?nt.push(me.quote+"-"+$e.quote):nt.push(me.quote+"-"+oe.maxBlockquoteDepth)),$e.list!==!1){var xt=($e.listStack.length-1)%3;xt?xt===1?nt.push(me.list2):nt.push(me.list3):nt.push(me.list1)}return $e.trailingSpaceNewLine?nt.push("trailing-space-new-line"):$e.trailingSpace&&nt.push("trailing-space-"+($e.trailingSpace%2?"a":"b")),nt.length?nt.join(" "):null}function Ae($e,nt){if($e.match(de,!0))return Ne(nt)}function Re($e,nt){var yt=nt.text($e,nt);if(typeof yt!="undefined")return yt;if(nt.list)return nt.list=null,Ne(nt);if(nt.taskList){var xt=$e.match(Le,!0)[1]===" ";return xt?nt.taskOpen=!0:nt.taskClosed=!0,oe.highlightFormatting&&(nt.formatting="task"),nt.taskList=!1,Ne(nt)}if(nt.taskOpen=!1,nt.taskClosed=!1,nt.header&&$e.match(/^#+$/,!0))return oe.highlightFormatting&&(nt.formatting="header"),Ne(nt);var wt=$e.next();if(nt.linkTitle){nt.linkTitle=!1;var dt=wt;wt==="("&&(dt=")"),dt=(dt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ft="^\\s*(?:[^"+dt+"\\\\]+|\\\\\\\\|\\\\.)"+dt;if($e.match(new RegExp(ft),!0))return me.linkHref}if(wt==="`"){var ut=nt.formatting;oe.highlightFormatting&&(nt.formatting="code"),$e.eatWhile("`");var Et=$e.current().length;if(nt.code==0&&(!nt.quote||Et==1))return nt.code=Et,Ne(nt);if(Et==nt.code){var mt=Ne(nt);return nt.code=0,mt}else return nt.formatting=ut,Ne(nt)}else if(nt.code)return Ne(nt);if(wt==="\\"&&($e.next(),oe.highlightFormatting)){var vt=Ne(nt),kt=me.formatting+"-escape";return vt?vt+" "+kt:kt}if(wt==="!"&&$e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return nt.imageMarker=!0,nt.image=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(wt==="["&&nt.imageMarker&&$e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return nt.imageMarker=!1,nt.imageAltText=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(wt==="]"&&nt.imageAltText){oe.highlightFormatting&&(nt.formatting="image");var vt=Ne(nt);return nt.imageAltText=!1,nt.image=!1,nt.inline=nt.f=Ye,vt}if(wt==="["&&!nt.image)return nt.linkText&&$e.match(/^.*?\]/)||(nt.linkText=!0,oe.highlightFormatting&&(nt.formatting="link")),Ne(nt);if(wt==="]"&&nt.linkText){oe.highlightFormatting&&(nt.formatting="link");var vt=Ne(nt);return nt.linkText=!1,nt.inline=nt.f=$e.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Re,vt}if(wt==="<"&&$e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var vt=Ne(nt);return vt?vt+=" ":vt="",vt+me.linkInline}if(wt==="<"&&$e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var vt=Ne(nt);return vt?vt+=" ":vt="",vt+me.linkEmail}if(oe.xml&&wt==="<"&&$e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pt=$e.string.indexOf(">",$e.pos);if(pt!=-1){var Qe=$e.string.substring($e.start,pt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Qe)&&(nt.md_inside=!0)}return $e.backUp(1),nt.htmlState=ht.startState(ze),ue($e,nt,Be)}if(oe.xml&&wt==="<"&&$e.match(/^\/\w*?>/))return nt.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var Ke=1,xe=$e.pos==1?" ":$e.string.charAt($e.pos-2);Ke<3&&$e.eat(wt);)Ke++;var Me=$e.peek()||" ",Ze=!/\s/.test(Me)&&(!ae.test(Me)||/\s/.test(xe)||ae.test(xe)),tt=!/\s/.test(xe)&&(!ae.test(xe)||/\s/.test(Me)||ae.test(Me)),Ie=null,_e=null;if(Ke%2&&(!nt.em&&Ze&&(wt==="*"||!tt||ae.test(xe))?Ie=!0:nt.em==wt&&tt&&(wt==="*"||!Ze||ae.test(Me))&&(Ie=!1)),Ke>1&&(!nt.strong&&Ze&&(wt==="*"||!tt||ae.test(xe))?_e=!0:nt.strong==wt&&tt&&(wt==="*"||!Ze||ae.test(Me))&&(_e=!1)),_e!=null||Ie!=null){oe.highlightFormatting&&(nt.formatting=Ie==null?"strong":_e==null?"em":"strong em"),Ie===!0&&(nt.em=wt),_e===!0&&(nt.strong=wt);var mt=Ne(nt);return Ie===!1&&(nt.em=!1),_e===!1&&(nt.strong=!1),mt}}else if(wt===" "&&($e.eat("*")||$e.eat("_"))){if($e.peek()===" ")return Ne(nt);$e.backUp(1)}if(oe.strikethrough){if(wt==="~"&&$e.eatWhile(wt)){if(nt.strikethrough){oe.highlightFormatting&&(nt.formatting="strikethrough");var mt=Ne(nt);return nt.strikethrough=!1,mt}else if($e.match(/^[^\s]/,!1))return nt.strikethrough=!0,oe.highlightFormatting&&(nt.formatting="strikethrough"),Ne(nt)}else if(wt===" "&&$e.match(/^~~/,!0)){if($e.peek()===" ")return Ne(nt);$e.backUp(2)}}if(oe.emoji&&wt===":"&&$e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){nt.emoji=!0,oe.highlightFormatting&&(nt.formatting="emoji");var He=Ne(nt);return nt.emoji=!1,He}return wt===" "&&($e.match(/^ +$/,!1)?nt.trailingSpace++:nt.trailingSpace&&(nt.trailingSpaceNewLine=!0)),Ne(nt)}function We($e,nt){var yt=$e.next();if(yt===">"){nt.f=nt.inline=Re,oe.highlightFormatting&&(nt.formatting="link");var xt=Ne(nt);return xt?xt+=" ":xt="",xt+me.linkInline}return $e.match(/^[^>]+/,!0),me.linkInline}function Ye($e,nt){if($e.eatSpace())return null;var yt=$e.next();return yt==="("||yt==="["?(nt.f=nt.inline=Ve(yt==="("?")":"]"),oe.highlightFormatting&&(nt.formatting="link-string"),nt.linkHref=!0,Ne(nt)):"error"}var Ue={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ve($e){return function(nt,yt){var xt=nt.next();if(xt===$e){yt.f=yt.inline=Re,oe.highlightFormatting&&(yt.formatting="link-string");var wt=Ne(yt);return yt.linkHref=!1,wt}return nt.match(Ue[$e]),yt.linkHref=!0,Ne(yt)}}function ot($e,nt){return $e.match(/^([^\]\\]|\\.)*\]:/,!1)?(nt.f=st,$e.next(),oe.highlightFormatting&&(nt.formatting="link"),nt.linkText=!0,Ne(nt)):le($e,nt,Re)}function st($e,nt){if($e.match(/^\]:/,!0)){nt.f=nt.inline=ct,oe.highlightFormatting&&(nt.formatting="link");var yt=Ne(nt);return nt.linkText=!1,yt}return $e.match(/^([^\]\\]|\\.)+/,!0),me.linkText}function ct($e,nt){return $e.eatSpace()?null:($e.match(/^[^\s]+/,!0),$e.peek()===void 0?nt.linkTitle=!0:$e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),nt.f=nt.inline=Re,me.linkHref+" url")}var Pt={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Re,text:Ae,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($e){return{f:$e.f,prevLine:$e.prevLine,thisLine:$e.thisLine,block:$e.block,htmlState:$e.htmlState&&ht.copyState(ze,$e.htmlState),indentation:$e.indentation,localMode:$e.localMode,localState:$e.localMode?ht.copyState($e.localMode,$e.localState):null,inline:$e.inline,text:$e.text,formatting:!1,linkText:$e.linkText,linkTitle:$e.linkTitle,linkHref:$e.linkHref,code:$e.code,em:$e.em,strong:$e.strong,strikethrough:$e.strikethrough,emoji:$e.emoji,header:$e.header,setext:$e.setext,hr:$e.hr,taskList:$e.taskList,list:$e.list,listStack:$e.listStack.slice(0),quote:$e.quote,indentedCode:$e.indentedCode,trailingSpace:$e.trailingSpace,trailingSpaceNewLine:$e.trailingSpaceNewLine,md_inside:$e.md_inside,fencedEndRE:$e.fencedEndRE}},token:function($e,nt){if(nt.formatting=!1,$e!=nt.thisLine.stream){if(nt.header=0,nt.hr=!1,$e.match(/^\s*$/,!0))return Pe(nt),null;if(nt.prevLine=nt.thisLine,nt.thisLine={stream:$e},nt.taskList=!1,nt.trailingSpace=0,nt.trailingSpaceNewLine=!1,!nt.localState&&(nt.f=nt.block,nt.f!=Be)){var yt=$e.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(nt.indentation=yt,nt.indentationDiff=null,yt>0)return null}}return nt.f($e,nt)},innerMode:function($e){return $e.block==Be?{state:$e.htmlState,mode:ze}:$e.localState?{state:$e.localState,mode:$e.localMode}:{state:$e,mode:Pt}},indent:function($e,nt,yt){return $e.block==Be&&ze.indent?ze.indent($e.htmlState,nt,yt):$e.localState&&$e.localMode.indent?$e.localMode.indent($e.localState,nt,yt):ht.Pass},blankLine:Pe,getType:Ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Pt},"xml"),ht.defineMIME("text/markdown","markdown"),ht.defineMIME("text/x-markdown","markdown")})},98101:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){"use strict";ht.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 Dt=0;Dt<ht.modeInfo.length;Dt++){var oe=ht.modeInfo[Dt];oe.mimes&&(oe.mime=oe.mimes[0])}ht.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var De=0;De<ht.modeInfo.length;De++){var fe=ht.modeInfo[De];if(fe.mime==ze)return fe;if(fe.mimes){for(var me=0;me<fe.mimes.length;me++)if(fe.mimes[me]==ze)return fe}}if(/\+xml$/.test(ze))return ht.findModeByMIME("application/xml");if(/\+json$/.test(ze))return ht.findModeByMIME("application/json")},ht.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var De=0;De<ht.modeInfo.length;De++){var fe=ht.modeInfo[De];if(fe.ext){for(var me=0;me<fe.ext.length;me++)if(fe.ext[me]==ze)return fe}}},ht.findModeByFileName=function(ze){for(var De=0;De<ht.modeInfo.length;De++){var fe=ht.modeInfo[De];if(fe.file&&fe.file.test(ze))return fe}var me=ze.lastIndexOf("."),ke=me>-1&&ze.substring(me+1,ze.length);if(ke)return ht.findModeByExtension(ke)},ht.findModeByName=function(ze){ze=ze.toLowerCase();for(var De=0;De<ht.modeInfo.length;De++){var fe=ht.modeInfo[De];if(fe.name.toLowerCase()==ze)return fe;if(fe.alias){for(var me=0;me<fe.alias.length;me++)if(fe.alias[me].toLowerCase()==ze)return fe}}}})},67549:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){"use strict";ht.defineMode("stex",function(Dt,oe){"use strict";function ze(de,z){de.cmdState.push(z)}function De(de){return de.cmdState.length>0?de.cmdState[de.cmdState.length-1]:null}function fe(de){var z=de.cmdState.pop();z&&z.closeBracket()}function me(de){for(var z=de.cmdState,ee=z.length-1;ee>=0;ee--){var ae=z[ee];if(ae.name!="DEFAULT")return ae}return{styleIdentifier:function(){return null}}}function ke(de,z,ee){return function(){this.name=de,this.bracketNo=0,this.style=z,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ce={};Ce.importmodule=ke("importmodule","tag",["string","builtin"]),Ce.documentclass=ke("documentclass","tag",["","atom"]),Ce.usepackage=ke("usepackage","tag",["atom"]),Ce.begin=ke("begin","tag",["atom"]),Ce.end=ke("end","tag",["atom"]),Ce.label=ke("label","tag",["atom"]),Ce.ref=ke("ref","tag",["atom"]),Ce.eqref=ke("eqref","tag",["atom"]),Ce.cite=ke("cite","tag",["atom"]),Ce.bibitem=ke("bibitem","tag",["atom"]),Ce.Bibitem=ke("Bibitem","tag",["atom"]),Ce.RBibitem=ke("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(de,z){de.f=z}function Le(de,z){var ee;if(de.match(/^\\[a-zA-Z@]+/)){var ae=de.current().slice(1);return ee=Ce.hasOwnProperty(ae)?Ce[ae]:Ce.DEFAULT,ee=new ee,ze(z,ee),Se(z,we),ee.style}if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/\\]/))return"tag";if(de.match("\\["))return Se(z,function(le,ue){return ve(le,ue,"\\]")}),"keyword";if(de.match("\\("))return Se(z,function(le,ue){return ve(le,ue,"\\)")}),"keyword";if(de.match("$$"))return Se(z,function(le,ue){return ve(le,ue,"$$")}),"keyword";if(de.match("$"))return Se(z,function(le,ue){return ve(le,ue,"$")}),"keyword";var ie=de.next();if(ie=="%")return de.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=De(z),ee)ee.closeBracket(ie),Se(z,we);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=Ce.DEFAULT,ee=new ee,ze(z,ee),"bracket"):/\d/.test(ie)?(de.eatWhile(/[\w.%]/),"atom"):(de.eatWhile(/[\w\-_]/),ee=me(z),ee.name=="begin"&&(ee.argument=de.current()),ee.styleIdentifier())}function ve(de,z,ee){if(de.eatSpace())return null;if(ee&&de.match(ee))return Se(z,Le),"keyword";if(de.match(/^\\[a-zA-Z@]+/))return"tag";if(de.match(/^[a-zA-Z]+/))return"variable-2";if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/]/)||de.match(/^[\^_&]/))return"tag";if(de.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(de.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ae=de.next();return ae=="{"||ae=="}"||ae=="["||ae=="]"||ae=="("||ae==")"?"bracket":ae=="%"?(de.skipToEnd(),"comment"):"error"}function we(de,z){var ee=de.peek(),ae;return ee=="{"||ee=="["?(ae=De(z),ae.openBracket(ee),de.eat(ee),Se(z,Le),"bracket"):/[ \t\r]/.test(ee)?(de.eat(ee),null):(Se(z,Le),fe(z),Le(de,z))}return{startState:function(){var de=oe.inMathMode?function(z,ee){return ve(z,ee)}:Le;return{cmdState:[],f:de}},copyState:function(de){return{cmdState:de.cmdState.slice(),f:de.f}},token:function(de,z){return z.f(de,z)},blankLine:function(de){de.f=Le,de.cmdState.length=0},lineComment:"%"}}),ht.defineMIME("text/x-stex","stex"),ht.defineMIME("text/x-latex","stex")})},15525:function(gn,cn,at){(function(ht){ht(at(89780))})(function(ht){"use strict";var Dt={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ht.defineMode("xml",function(ze,De){var fe=ze.indentUnit,me={},ke=De.htmlMode?Dt:oe;for(var Ce in ke)me[Ce]=ke[Ce];for(var Ce in De)me[Ce]=De[Ce];var Se,Le;function ve(We,Ye){function Ue(st){return Ye.tokenize=st,st(We,Ye)}var Ve=We.next();if(Ve=="<")return We.eat("!")?We.eat("[")?We.match("CDATA[")?Ue(z("atom","]]>")):null:We.match("--")?Ue(z("comment","-->")):We.match("DOCTYPE",!0,!0)?(We.eatWhile(/[\w\._\-]/),Ue(ee(1))):null:We.eat("?")?(We.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=We.eat("/")?"closeTag":"openTag",Ye.tokenize=we,"tag bracket");if(Ve=="&"){var ot;return We.eat("#")?We.eat("x")?ot=We.eatWhile(/[a-fA-F\d]/)&&We.eat(";"):ot=We.eatWhile(/[\d]/)&&We.eat(";"):ot=We.eatWhile(/[\w\.\-:]/)&&We.eat(";"),ot?"atom":"error"}else return We.eatWhile(/[^&<]/),null}ve.isInText=!0;function we(We,Ye){var Ue=We.next();if(Ue==">"||Ue=="/"&&We.eat(">"))return Ye.tokenize=ve,Se=Ue==">"?"endTag":"selfcloseTag","tag bracket";if(Ue=="=")return Se="equals",null;if(Ue=="<"){Ye.tokenize=ve,Ye.state=ue,Ye.tagName=Ye.tagStart=null;var Ve=Ye.tokenize(We,Ye);return Ve?Ve+" tag error":"tag error"}else return/[\'\"]/.test(Ue)?(Ye.tokenize=de(Ue),Ye.stringStartCol=We.column(),Ye.tokenize(We,Ye)):(We.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(We){var Ye=function(Ue,Ve){for(;!Ue.eol();)if(Ue.next()==We){Ve.tokenize=we;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(We,Ye){return function(Ue,Ve){for(;!Ue.eol();){if(Ue.match(Ye)){Ve.tokenize=ve;break}Ue.next()}return We}}function ee(We){return function(Ye,Ue){for(var Ve;(Ve=Ye.next())!=null;){if(Ve=="<")return Ue.tokenize=ee(We+1),Ue.tokenize(Ye,Ue);if(Ve==">")if(We==1){Ue.tokenize=ve;break}else return Ue.tokenize=ee(We-1),Ue.tokenize(Ye,Ue)}return"meta"}}function ae(We,Ye,Ue){this.prev=We.context,this.tagName=Ye,this.indent=We.indented,this.startOfLine=Ue,(me.doNotIndent.hasOwnProperty(Ye)||We.context&&We.context.noIndent)&&(this.noIndent=!0)}function ie(We){We.context&&(We.context=We.context.prev)}function le(We,Ye){for(var Ue;;){if(!We.context||(Ue=We.context.tagName,!me.contextGrabbers.hasOwnProperty(Ue)||!me.contextGrabbers[Ue].hasOwnProperty(Ye)))return;ie(We)}}function ue(We,Ye,Ue){return We=="openTag"?(Ue.tagStart=Ye.column(),ge):We=="closeTag"?Pe:ue}function ge(We,Ye,Ue){return We=="word"?(Ue.tagName=Ye.current(),Le="tag",Fe):me.allowMissingTagName&&We=="endTag"?(Le="tag bracket",Fe(We,Ye,Ue)):(Le="error",ge)}function Pe(We,Ye,Ue){if(We=="word"){var Ve=Ye.current();return Ue.context&&Ue.context.tagName!=Ve&&me.implicitlyClosed.hasOwnProperty(Ue.context.tagName)&&ie(Ue),Ue.context&&Ue.context.tagName==Ve||me.matchClosing===!1?(Le="tag",je):(Le="tag error",Be)}else return me.allowMissingTagName&&We=="endTag"?(Le="tag bracket",je(We,Ye,Ue)):(Le="error",Be)}function je(We,Ye,Ue){return We!="endTag"?(Le="error",je):(ie(Ue),ue)}function Be(We,Ye,Ue){return Le="error",je(We,Ye,Ue)}function Fe(We,Ye,Ue){if(We=="word")return Le="attribute",Ne;if(We=="endTag"||We=="selfcloseTag"){var Ve=Ue.tagName,ot=Ue.tagStart;return Ue.tagName=Ue.tagStart=null,We=="selfcloseTag"||me.autoSelfClosers.hasOwnProperty(Ve)?le(Ue,Ve):(le(Ue,Ve),Ue.context=new ae(Ue,Ve,ot==Ue.indented)),ue}return Le="error",Fe}function Ne(We,Ye,Ue){return We=="equals"?Ae:(me.allowMissing||(Le="error"),Fe(We,Ye,Ue))}function Ae(We,Ye,Ue){return We=="string"?Re:We=="word"&&me.allowUnquoted?(Le="string",Fe):(Le="error",Fe(We,Ye,Ue))}function Re(We,Ye,Ue){return We=="string"?Re:Fe(We,Ye,Ue)}return{startState:function(We){var Ye={tokenize:ve,state:ue,indented:We||0,tagName:null,tagStart:null,context:null};return We!=null&&(Ye.baseIndent=We),Ye},token:function(We,Ye){if(!Ye.tagName&&We.sol()&&(Ye.indented=We.indentation()),We.eatSpace())return null;Se=null;var Ue=Ye.tokenize(We,Ye);return(Ue||Se)&&Ue!="comment"&&(Le=null,Ye.state=Ye.state(Se||Ue,We,Ye),Le&&(Ue=Le=="error"?Ue+" error":Le)),Ue},indent:function(We,Ye,Ue){var Ve=We.context;if(We.tokenize.isInAttribute)return We.tagStart==We.indented?We.stringStartCol+1:We.indented+fe;if(Ve&&Ve.noIndent)return ht.Pass;if(We.tokenize!=we&&We.tokenize!=ve)return Ue?Ue.match(/^(\s*)/)[0].length:0;if(We.tagName)return me.multilineTagIndentPastTag!==!1?We.tagStart+We.tagName.length+2:We.tagStart+fe*(me.multilineTagIndentFactor||1);if(me.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Ve;)if(Ve.tagName==ot[2]){Ve=Ve.prev;break}else if(me.implicitlyClosed.hasOwnProperty(Ve.tagName))Ve=Ve.prev;else break;else if(ot)for(;Ve;){var st=me.contextGrabbers[Ve.tagName];if(st&&st.hasOwnProperty(ot[2]))Ve=Ve.prev;else break}for(;Ve&&Ve.prev&&!Ve.startOfLine;)Ve=Ve.prev;return Ve?Ve.indent+fe:We.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:me.htmlMode?"html":"xml",helperType:me.htmlMode?"html":"xml",skipAttribute:function(We){We.state==Ae&&(We.state=Fe)},xmlCurrentTag:function(We){return We.tagName?{name:We.tagName,close:We.type=="closeTag"}:null},xmlCurrentContext:function(We){for(var Ye=[],Ue=We.context;Ue;Ue=Ue.prev)Ue.tagName&&Ye.push(Ue.tagName);return Ye.reverse()}}}),ht.defineMIME("text/xml","xml"),ht.defineMIME("application/xml","xml"),ht.mimeModes.hasOwnProperty("text/html")||ht.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(gn,cn,at){"use strict";at.d(cn,{$u:function(){return Ce},BD:function(){return Ke},E9:function(){return ke},FF:function(){return Li},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Pe},NB:function(){return Ct},S0:function(){return kt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Ot},YI:function(){return pt},ZA:function(){return oe},Zt:function(){return Le},al:function(){return Ie},bn:function(){return tt},bx:function(){return xe},g2:function(){return Qe},h1:function(){return Ae},hD:function(){return Dn},l4:function(){return fe},rU:function(){return Nt},s_:function(){return Me},uz:function(){return St},z6:function(){return ve}}),gn=at.hmd(gn),function(){var et;function jr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function dr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:jr(a)}}function Ai(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var lr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},yr;if(typeof Object.setPrototypeOf=="function")yr=Object.setPrototypeOf;else{var Lr;e:{var uo={a:!0},on={};try{on.__proto__=uo,Lr=on.a;break e}catch(a){}Lr=!1}yr=Lr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var dn=yr;function en(a,y){if(a.prototype=lr(y.prototype),a.prototype.constructor=a,dn)dn(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 vn=typeof at.g!="undefined"&&at.g!=null?at.g:self,fr=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},cr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function oi(a,y){if(y){var x=vn;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&&cr(x,a,{writable:!0,value:y})}}oi("Object.assign",function(a){return a||fr}),oi("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var an=typeof globalThis=="object"&&globalThis||typeof at.g=="object"&&at.g.global===at.g&&at.g||typeof self=="object"&&self.self===self&&self||{};an.requestAnimationFrame===void 0&&(an.setImmediate===void 0?an.requestAnimationFrame=function(a){an.setTimeout(a,0)}:an.requestAnimationFrame=an.setImmediate);function Nn(){}function gr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&an.clearTimeout(x),x=Zr(function(){x=-1,a.apply(b,E)},y)}}function Zr(a,y){return an.setTimeout(a,y)}function Xn(a){return an.document.createElement(a)}function jt(a){throw Error(a)}function Wt(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),jt(a)}function jn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),jt(x+" is not in the range "+y+": "+a)}function Cn(a){an.console&&an.console.log(a)}function Jt(a){return typeof a=="object"&&a!==null}function _n(a){return Array.isArray(a)||an.NodeList&&a instanceof an.NodeList||an.HTMLCollection&&a instanceof an.HTMLCollection}function ur(a){return Array.prototype.slice.call(a)}function ar(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):jt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function mr(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):jt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Bn(){var a=zi.pop();return a===void 0?[]:a}function Un(a){a.length=0,zi.push(a)}function er(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(Jt(a)&&a.constructor)return er(a.constructor);return typeof a}function Ar(a){var y=a;return Jt(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 mn(a,y,x){Object.defineProperty(Qi.prototype,a,{get:y,set:x})}function tr(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 te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var Vr=an.navigator!==void 0&&0<an.navigator.userAgent.indexOf("Trident/7"),pi=an.navigator!==void 0&&an.navigator.platform!==void 0&&an.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zi=[];Object.freeze([]),Nn.className="Util",Nn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Nn.adym="gojs.net",Nn.vfo="28e645fdb266",Nn.className="Util";function Yt(a,y,x){Sr(this),this.j=a,this.xa=y,this.o=x}Yt.prototype.toString=function(){return"EnumValue."+this.xa};function vr(a,y){return y==null||y===""?null:a[y]}vn.Object.defineProperties(Yt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Yt.className="EnumValue";function zr(){this.ew=[]}zr.prototype.toString=function(){return this.ew.join("")},zr.prototype.add=function(a){a!==""&&this.ew.push(a)},zr.className="StringBuilder";function nr(){}nr.className="PropertyCollection";var vi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){an.console&&an.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,se){return function(){throw Error("Property "+ne.Zl[se.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Qr(){}Qr.prototype.reset=function(){},Qr.prototype.next=function(){return!1},Qr.prototype.Ad=function(){return!1},Qr.prototype.first=function(){return null},Qr.prototype.any=function(){return!1},Qr.prototype.all=function(){return!0},Qr.prototype.each=function(){return this},Qr.prototype.map=function(){return this},Qr.prototype.filter=function(){return this},Qr.prototype.de=function(){},Qr.prototype.toString=function(){return"EmptyIterator"},vn.Object.defineProperties(Qr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Qr.prototype.first=Qr.prototype.first,Qr.prototype.hasNext=Qr.prototype.Ad,Qr.prototype.next=Qr.prototype.next,Qr.prototype.reset=Qr.prototype.reset;var hi=null;Qr.className="EmptyIterator",hi=new Qr;function $r(a){this.key=-1,this.value=a}$r.prototype.reset=function(){this.key=-1},$r.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},$r.prototype.Ad=function(){return this.next()},$r.prototype.first=function(){return this.key=0,this.value},$r.prototype.any=function(a){return this.key=-1,a(this.value)},$r.prototype.all=function(a){return this.key=-1,a(this.value)},$r.prototype.each=function(a){return this.key=-1,a(this.value),this},$r.prototype.map=function(a){return new $r(a(this.value))},$r.prototype.filter=function(a){return a(this.value)?new $r(this.value):hi},$r.prototype.de=function(){this.value=null},$r.prototype.toString=function(){return"SingletonIterator("+this.value+")"},vn.Object.defineProperties($r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="SingletonIterator";function si(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}si.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},si.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},si.prototype.Ad=function(){return this.next()},si.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},si.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 te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},si.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 te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},si.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 te=y[E];(b===null||b(te))&&a(te)}return this},si.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,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new pn,a.s=x,a.xb(),a.iterator},si.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,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new pn,a.s=x,a.xb(),a.iterator},si.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},si.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},vn.Object.defineProperties(si.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}}}),si.prototype.first=si.prototype.first,si.prototype.hasNext=si.prototype.Ad,si.prototype.next=si.prototype.next,si.prototype.reset=si.prototype.reset,si.className="ListIterator";function bi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}bi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},bi.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)},bi.prototype.Ad=function(){return this.next()},bi.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},bi.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},bi.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},bi.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},bi.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 pn,a.s=x,a.xb(),a.iterator},bi.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 pn,a.s=x,a.xb(),a.iterator},bi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},bi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},vn.Object.defineProperties(bi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),bi.prototype.first=bi.prototype.first,bi.prototype.hasNext=bi.prototype.Ad,bi.prototype.next=bi.prototype.next,bi.prototype.reset=bi.prototype.reset,bi.className="ListIteratorBackwards";function pn(a){Sr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=pn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"List()#"+Jr(this)},et.add=function(a){return a===null?this:(this._isFrozen&&Wt(this,a),this.s.push(a),this.xb(),this)},et.push=function(a){this.add(a)},et.addAll=function(a){if(a===null)return this;this._isFrozen&&Wt(this);var y=this.s;if(_n(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},et.clear=function(){this._isFrozen&&Wt(this),this.s.length=0,this.xb()},et.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},et.has=function(a){return this.contains(a)},et.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},et.M=function(a){var y=this.s;return(0>a||a>=y.length)&&jn(a,"0 <= i < length",pn,"elt:i"),y[a]},et.get=function(a){return this.M(a)},et.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&jn(a,"0 <= i < length",pn,"setElt:i"),this._isFrozen&&Wt(this,a),x[a]=y},et.set=function(a,y){this.cd(a,y)},et.first=function(){var a=this.s;return a.length===0?null:a[0]},et.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},et.pop=function(){this._isFrozen&&Wt(this);var a=this.s;return 0<a.length?a.pop():null},pn.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},pn.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},pn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},pn.prototype.map=function(a){for(var y=new pn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},pn.prototype.filter=function(a){for(var y=new pn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},et=pn.prototype,et.Gb=function(a,y){0>a&&jn(a,">= 0",pn,"insertAt:i"),this._isFrozen&&Wt(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Wt(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)},et.delete=function(a){return this.remove(a)},et.mb=function(a){var y=this.s;(0>a||a>=y.length)&&jn(a,"0 <= i < length",pn,"removeAt:i"),this._isFrozen&&Wt(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},et.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&&Wt(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},pn.prototype.copy=function(){var a=new pn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=pn.prototype,et.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},et.Iv=function(){for(var a=new yn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&Wt(this),this.s.sort(a),this.xb(),this},et.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Wt(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&jn(y,"0 <= from < length",pn,"sortRange:from"),te===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},et.reverse=function(){return this._isFrozen&&Wt(this),this.s.reverse(),this.xb(),this},vn.Object.defineProperties(pn.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 hi;var a=this.Sa;return a!==null?(a.reset(),a):new si(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return hi;var a=this.Hg;return a!==null?(a.reset(),a):new bi(this)}}}),pn.prototype.reverse=pn.prototype.reverse,pn.prototype.sortRange=pn.prototype.zi,pn.prototype.sort=pn.prototype.sort,pn.prototype.toSet=pn.prototype.Iv,pn.prototype.toArray=pn.prototype.Fa,pn.prototype.removeRange=pn.prototype.removeRange,pn.prototype.removeAt=pn.prototype.mb,pn.prototype.delete=pn.prototype.delete,pn.prototype.remove=pn.prototype.remove,pn.prototype.insertAt=pn.prototype.Gb,pn.prototype.pop=pn.prototype.pop,pn.prototype.last=pn.prototype.jc,pn.prototype.first=pn.prototype.first,pn.prototype.set=pn.prototype.set,pn.prototype.setElt=pn.prototype.cd,pn.prototype.get=pn.prototype.get,pn.prototype.elt=pn.prototype.M,pn.prototype.indexOf=pn.prototype.indexOf,pn.prototype.has=pn.prototype.has,pn.prototype.contains=pn.prototype.contains,pn.prototype.clear=pn.prototype.clear,pn.prototype.addAll=pn.prototype.addAll,pn.prototype.push=pn.prototype.push,pn.prototype.add=pn.prototype.add,pn.prototype.thaw=pn.prototype.ka,pn.prototype.freeze=pn.prototype.freeze,pn.className="List";function Oi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Oi.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)},Oi.prototype.Ad=function(){return this.next()},Oi.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},Oi.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},Oi.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},Oi.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},Oi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Oi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},vn.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="SetIterator";function yn(a){Sr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=yn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Set()#"+Jr(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&Wt(this,a);var y=a;return Jt(a)&&(y=li(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Qt(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},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Wt(this),_n(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},et.contains=function(a){if(a===null)return!1;var y=a;return Jt(a)&&(y=Jr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},et.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},et.first=function(){var a=this.ea;return a===null?null:a.value},yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},yn.prototype.map=function(a){for(var y=new yn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},yn.prototype.filter=function(a){for(var y=new yn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=yn.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&Wt(this,a);var y=a;if(Jt(a)&&(y=Jr(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},et.delete=function(a){return this.remove(a)},et.hp=function(a){if(a===null)return this;if(this._isFrozen&&Wt(this),_n(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},et.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Wt(this);var y=new yn;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},et.clear=function(){this._isFrozen&&Wt(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},yn.prototype.copy=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},yn.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},yn.prototype.Hv=function(){var a=new pn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Sr(a){a.__gohashid=Hi++}function li(a){var y=a.__gohashid;return y===void 0&&(y=Hi++,a.__gohashid=y),y}function Jr(a){return a.__gohashid}vn.Object.defineProperties(yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return hi;var a=this.Sa;return a!==null?(a.reset(),a):new Oi(this)}}}),yn.prototype.toList=yn.prototype.Hv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.clear=yn.prototype.clear,yn.prototype.retainAll=yn.prototype.pA,yn.prototype.removeAll=yn.prototype.hp,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.first=yn.prototype.first,yn.prototype.containsAny=yn.prototype.Ty,yn.prototype.containsAll=yn.prototype.Sy,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze;var Hi=1;yn.className="Set",yn.uniqueHash=Sr,yn.hashIdUnique=li,yn.hashId=Jr;function ci(a){this.ma=a,this.qa=a.Ja,this.sa=null}ci.prototype.reset=function(){this.qa=this.ma.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.value=this.key=a=y.key,!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.value=this.key=a=a.key):null},ci.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},ci.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},ci.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},ci.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ci.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ci.prototype.de=function(){this.value=this.key=null,this.qa=-1},ci.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},vn.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="MapKeySetIterator";function Hr(a){yn.call(this),Sr(this),this._isFrozen=!0,this.ma=a}en(Hr,yn),et=Hr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){jt("This Set is read-only: "+this.toString())},et.contains=function(a){return this.ma.contains(a)},et.has=function(a){return this.contains(a)},et.remove=function(){jt("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){jt("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Hr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Hr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Hr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Hr.prototype.map=function(a){for(var y=new yn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Hr.prototype.filter=function(a){for(var y=new yn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Hr.prototype.copy=function(){return new Hr(this.ma)},Hr.prototype.Iv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Hr.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},Hr.prototype.Hv=function(){var a=new pn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},vn.Object.defineProperties(Hr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?hi:new ci(this.ma)}}}),Hr.prototype.toList=Hr.prototype.Hv,Hr.prototype.toArray=Hr.prototype.Fa,Hr.prototype.toSet=Hr.prototype.Iv,Hr.prototype.first=Hr.prototype.first,Hr.prototype.clear=Hr.prototype.clear,Hr.prototype.delete=Hr.prototype.delete,Hr.prototype.remove=Hr.prototype.remove,Hr.prototype.has=Hr.prototype.has,Hr.prototype.contains=Hr.prototype.contains,Hr.prototype.add=Hr.prototype.add,Hr.prototype.thaw=Hr.prototype.ka,Hr.prototype.freeze=Hr.prototype.freeze,Hr.className="MapKeySet";function Ki(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ki.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ki.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)},Ki.prototype.Ad=function(){return this.next()},Ki.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},Ki.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},Ki.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},Ki.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},Ki.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ki.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ki.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ki.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},vn.Object.defineProperties(Ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ki.prototype.first=Ki.prototype.first,Ki.prototype.hasNext=Ki.prototype.Ad,Ki.prototype.next=Ki.prototype.next,Ki.prototype.reset=Ki.prototype.reset,Ki.className="MapValueSetIterator";function Qt(a,y){this.key=a,this.value=y,this.ll=this.va=null}Qt.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Qt.className="KeyValuePair";function wn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}wn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},wn.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)},wn.prototype.Ad=function(){return this.next()},wn.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},wn.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},wn.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},wn.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},wn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},wn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},wn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},wn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},vn.Object.defineProperties(wn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wn.prototype.first=wn.prototype.first,wn.prototype.hasNext=wn.prototype.Ad,wn.prototype.next=wn.prototype.next,wn.prototype.reset=wn.prototype.reset,wn.className="MapIterator";function Zt(a){Sr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Zt.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Map()#"+Jr(this)},et.add=function(a,y){this._isFrozen&&Wt(this,a);var x=a;Jt(a)&&(x=li(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Qt(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},et.set=function(a,y){return this.add(a,y)},et.addAll=function(a){if(a===null)return this;if(_n(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 Zt)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},et.first=function(){return this.ea},Zt.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Zt.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Zt.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Zt.prototype.map=function(a){for(var y=new Zt,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Zt.prototype.filter=function(a){for(var y=new Zt,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=Zt.prototype,et.contains=function(a){var y=a;return Jt(a)&&(y=Jr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.I=function(a){var y=a;return Jt(a)&&(y=Jr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},et.get=function(a){return this.I(a)},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Wt(this,a);var y=a;if(Jt(a)&&(y=Jr(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},et.delete=function(a){return this.remove(a)},et.clear=function(){this._isFrozen&&Wt(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()},Zt.prototype.copy=function(){var a=new Zt,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Zt.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 Qt(E.key,E.value),x++}return y},Zt.prototype.Lf=function(){return new Hr(this)},vn.Object.defineProperties(Zt.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return hi;var a=this.Sa;return a!==null?(a.reset(),a):new wn(this)}},iteratorKeys:{get:function(){return 0>=this.count?hi:new ci(this)}},iteratorValues:{get:function(){if(0>=this.count)return hi;var a=this.jf;return a!==null?(a.reset(),a):new Ki(this)}}}),Zt.prototype.toKeySet=Zt.prototype.Lf,Zt.prototype.toArray=Zt.prototype.Fa,Zt.prototype.clear=Zt.prototype.clear,Zt.prototype.delete=Zt.prototype.delete,Zt.prototype.remove=Zt.prototype.remove,Zt.prototype.get=Zt.prototype.get,Zt.prototype.getValue=Zt.prototype.I,Zt.prototype.has=Zt.prototype.has,Zt.prototype.contains=Zt.prototype.contains,Zt.prototype.first=Zt.prototype.first,Zt.prototype.addAll=Zt.prototype.addAll,Zt.prototype.set=Zt.prototype.set,Zt.prototype.add=Zt.prototype.add,Zt.prototype.thaw=Zt.prototype.ka,Zt.prototype.freeze=Zt.prototype.freeze,Zt.className="Map";function lt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):jt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var On,Sn,Hn,$n,Kn;lt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.h=function(a,y){return this.x=a,this.y=y,this},lt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},lt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.copy=function(){var a=new lt;return a.x=this.x,a.y=this.y,a},et=lt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function un(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new lt(x,E)}return new lt}function Fn(a){return a.x.toString()+" "+a.y.toString()}et.toString=function(){return"Point("+this.x+","+this.y+")"},et.D=function(a){return a instanceof lt?this.x===a.x&&this.y===a.y:!1},et.hi=function(a,y){return this.x===a&&this.y===y},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)},et.add=function(a){return this.x+=a.x,this.y+=a.y,this},et.re=function(a){return this.x-=a.x,this.y-=a.y,this},et.offset=function(a,y){return this.x+=a,this.y+=y,this},lt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},et=lt.prototype,et.scale=function(a,y){return this.x*=a,this.y*=y,this},et.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},et.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},et.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},et.ab=function(a){return zn(a.x-this.x,a.y-this.y)},et.direction=function(a,y){return zn(a-this.x,y-this.y)};function zn(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}et.Ry=function(a,y){return Gt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},et.fA=function(a,y,x,b){return Gt.qh(a,y,x,b,this.x,this.y,this),this},et.gA=function(a,y){return Gt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},et.uA=function(a,y,x,b){return Gt.No(this.x,this.y,a,y,x,b,this),this},et.vA=function(a,y){return Gt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},et.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},et.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},et.transform=function(a){return a.Ga(this),this};function Ln(a,y){return y.Cd(a),a}function In(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var pe=-x*ne-b*se;return 0>=pe||pe>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function An(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Vn(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)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)},lt.alloc=function(){var a=Wn.pop();return a===void 0?new lt:a},lt.allocAt=function(a,y){var x=Wn.pop();return x===void 0?new lt(a,y):(x.x=a,x.y=y,x)},lt.free=function(a){Wn.push(a)},lt.prototype.isReal=lt.prototype.w,lt.prototype.setSpot=lt.prototype.yi,lt.prototype.setRectSpot=lt.prototype.xi,lt.prototype.snapToGridPoint=lt.prototype.vA,lt.prototype.snapToGrid=lt.prototype.uA,lt.prototype.projectOntoLineSegmentPoint=lt.prototype.gA,lt.prototype.projectOntoLineSegment=lt.prototype.fA,lt.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Gt.Rl(a,y,x,b,E,te,ne,se)},lt.prototype.compareWithLineSegmentPoint=lt.prototype.Ry,lt.compareWithLineSegment=function(a,y,x,b,E,te){return Gt.Fl(a,y,x,b,E,te)},lt.prototype.direction=lt.prototype.direction,lt.prototype.directionPoint=lt.prototype.ab,lt.prototype.normalize=lt.prototype.normalize,lt.prototype.distanceSquared=lt.prototype.zd,lt.prototype.distanceSquaredPoint=lt.prototype.Bf,lt.prototype.scale=lt.prototype.scale,lt.prototype.rotate=lt.prototype.rotate,lt.prototype.offset=lt.prototype.offset,lt.prototype.subtract=lt.prototype.re,lt.prototype.add=lt.prototype.add,lt.prototype.equalsApprox=lt.prototype.Xa,lt.prototype.equalTo=lt.prototype.hi,lt.prototype.equals=lt.prototype.D,lt.prototype.set=lt.prototype.set,lt.prototype.setTo=lt.prototype.sg;var Wn=[];lt.className="Point",lt.parse=un,lt.stringify=Fn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=An,lt.direction=Vn,lt.Origin=On=new lt(0,0).ja(),lt.InfiniteTopLeft=Sn=new lt(-1/0,-1/0).ja(),lt.InfiniteBottomRight=Hn=new lt(1/0,1/0).ja(),lt.SixPoint=$n=new lt(6,6).ja(),lt.NoPoint=Kn=new lt(NaN,NaN).ja(),lt.parse=un,lt.stringify=Fn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=An,lt.direction=Vn;function ln(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):jt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var br,Cr,ri,Er,xi,gi,Ci;ln.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},ln.prototype.h=function(a,y){return this.width=a,this.height=y,this},ln.prototype.sg=function(a,y){return this.width=a,this.height=y,this},ln.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},ln.prototype.copy=function(){var a=new ln;return a.width=this.width,a.height=this.height,a},et=ln.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Si(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 ln(x,E)}return new ln}function Bi(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof ln?this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y){return this.width===a&&this.height===y},et.Xa=function(a){return Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)},et.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},et.w=function(){return isFinite(this.width)&&isFinite(this.height)},ln.alloc=function(){var a=Vi.pop();return a===void 0?new ln:a},ln.free=function(a){Vi.push(a)},ln.prototype.isReal=ln.prototype.w,ln.prototype.inflate=ln.prototype.Bc,ln.prototype.equalsApprox=ln.prototype.Xa,ln.prototype.equalTo=ln.prototype.hi,ln.prototype.equals=ln.prototype.D,ln.prototype.set=ln.prototype.set,ln.prototype.setTo=ln.prototype.sg;var Vi=[];ln.className="Size",ln.parse=Si,ln.stringify=Bi,ln.ZeroSize=br=new ln(0,0).ja(),ln.OneSize=Cr=new ln(1,1).ja(),ln.SixSize=ri=new ln(6,6).ja(),ln.EightSize=Er=new ln(8,8).ja(),ln.TenSize=xi=new ln(10,10).ja(),ln.InfiniteSize=gi=new ln(1/0,1/0).ja(),ln.NoSize=Ci=new ln(NaN,NaN).ja(),ln.parse=Si,ln.stringify=Bi;function Xt(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof lt?(x=a.x,a=a.y,y instanceof lt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof ln?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):jt("Incorrect second argument supplied to Rect constructor "+y)):jt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=Xt.prototype,et.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function wi(a,y,x){a.width=y,a.height=x}et.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},et.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.dd=function(a){return this.x=a.x,this.y=a.y,this},et.tA=function(a){return this.width=a.width,this.height=a.height,this},Xt.prototype.copy=function(){var a=new Xt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=Xt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function qr(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 te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new Xt(x,E,te,ne)}return new Xt}function Wr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},et.D=function(a){return a instanceof Xt?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)&&Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)};function Br(a,y){return Gt.$(a.x,y.x)&&Gt.$(a.y,y.y)&&Gt.$(a.width,y.width)&&Gt.$(a.height,y.height)}et.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},et.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},et.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},et.offset=function(a,y){return this.x+=a,this.y+=y,this},et.Bc=function(a,y){return Pi(this,y,a,y,a)},et.Co=function(a){return Pi(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return Pi(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return Pi(this,a,y,x,b)};function Pi(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/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}et.Ex=function(a){return Ii(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return Ii(this,a,y,x,b)};function Ii(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}et.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},et.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>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 Fi(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))}et.Ye=function(a){return ei(this,a.x,a.y,0,0)},et.ed=function(a){return ei(this,a.x,a.y,a.width,a.height)},et.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),ei(this,a,y,x,b)};function ei(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}et.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 $i(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function _o(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},et.Mz=function(){return this.width===0&&this.height===0},Xt.alloc=function(){var a=wa.pop();return a===void 0?new Xt:a},Xt.allocAt=function(a,y,x,b){var E=wa.pop();return E===void 0?new Xt(a,y,x,b):E.h(a,y,x,b)},Xt.free=function(a){wa.push(a)},vn.Object.defineProperties(Xt.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new lt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new ln(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new lt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Xt.prototype.isEmpty=Xt.prototype.Mz,Xt.prototype.isReal=Xt.prototype.w,Xt.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Gt.Fx(a,y,x,b,E,te,ne,se)},Xt.prototype.setSpot=Xt.prototype.yi,Xt.prototype.union=Xt.prototype.Kv,Xt.prototype.unionRect=Xt.prototype.ed,Xt.prototype.unionPoint=Xt.prototype.Ye,Xt.prototype.intersects=Xt.prototype.Vu,Xt.prototype.intersectsRect=Xt.prototype.Yc,Xt.prototype.intersect=Xt.prototype.Uu,Xt.prototype.intersectRect=Xt.prototype.Ex,Xt.prototype.grow=Xt.prototype.Hz,Xt.prototype.subtractMargin=Xt.prototype.Fv,Xt.prototype.addMargin=Xt.prototype.Co,Xt.prototype.inflate=Xt.prototype.Bc,Xt.prototype.offset=Xt.prototype.offset,Xt.prototype.contains=Xt.prototype.contains,Xt.prototype.containsRect=Xt.prototype.Re,Xt.prototype.containsPoint=Xt.prototype.ca,Xt.prototype.equalsApprox=Xt.prototype.Xa,Xt.prototype.equalTo=Xt.prototype.hi,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.setSize=Xt.prototype.tA,Xt.prototype.setPoint=Xt.prototype.dd,Xt.prototype.set=Xt.prototype.set,Xt.prototype.setTo=Xt.prototype.sg;var fa=null,Ps=null,wa=[];Xt.className="Rect",Xt.parse=qr,Xt.stringify=Wr,Xt.contains=$i,Xt.intersects=_o,Xt.ZeroRect=fa=new Xt(0,0,0,0).ja(),Xt.NoRect=Ps=new Xt(NaN,NaN,NaN,NaN).ja(),Xt.parse=qr,Xt.stringify=Wr,Xt.contains=$i,Xt.intersects=_o;function Ir(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):jt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ir.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ir.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ir.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ir.prototype.copy=function(){var a=new Ir;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Ir.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Po(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 Ir;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ir(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ir(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ir(x,E):new Ir(x,E,te,ne)}return new Ir}function bo(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}et.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},et.D=function(a){return a instanceof Ir?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},et.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},et.Xa=function(a){return Gt.B(this.top,a.top)&&Gt.B(this.right,a.right)&&Gt.B(this.bottom,a.bottom)&&Gt.B(this.left,a.left)},et.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ir.alloc=function(){var a=Ko.pop();return a===void 0?new Ir:a},Ir.free=function(a){Ko.push(a)},Ir.prototype.isReal=Ir.prototype.w,Ir.prototype.equalsApprox=Ir.prototype.Xa,Ir.prototype.equalTo=Ir.prototype.hi,Ir.prototype.equals=Ir.prototype.D,Ir.prototype.set=Ir.prototype.set,Ir.prototype.setTo=Ir.prototype.sg;var ta=null,Ao=null,Ko=[];Ir.className="Margin",Ir.parse=Po,Ir.stringify=bo,Ir.ZeroMargin=ta=new Ir(0,0,0,0).ja(),Ir.TwoMargin=Ao=new Ir(2,2,2,2).ja(),Ir.parse=Po,Ir.stringify=bo;function qn(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 Or,Xr,yi,Ei,to,Fr,Aa,zo,jo,Ni,Vo,ja,vo,fs,ds,bs,na,eh,ju,il,Sl,Os,Vl,th,nh,Zo,Ou,rh,Zl,uu,Ca,Oa,aa,ga,Xl,Ga;qn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},qn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},qn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},qn.prototype.copy=function(){var a=new qn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=qn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function co(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function io(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Or;if(a==="TopLeft")return Xr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return yi;if(a==="TopRight")return Ei;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return to;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Aa;if(a==="BottomLeft")return zo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return Ni;if(a==="TopSide")return Vo;if(a==="LeftSide")return ja;if(a==="RightSide")return vo;if(a==="BottomSide")return fs;if(a==="TopBottomSides")return ds;if(a==="LeftRightSides")return bs;if(a==="TopLeftSides")return na;if(a==="TopRightSides")return eh;if(a==="BottomLeftSides")return ju;if(a==="BottomRightSides")return il;if(a==="NotTopSide")return Sl;if(a==="NotLeftSide")return Os;if(a==="NotRightSide")return Vl;if(a==="NotBottomSide")return th;if(a==="AllSides")return nh;if(a==="Default")return Zo;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 te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new qn(x,E,te,ne)}return new qn}function Ji(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}et.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(Or)?"None":this.D(Xr)?"TopLeft":this.D(yi)?"Top":this.D(Ei)?"TopRight":this.D(to)?"Left":this.D(Fr)?"Center":this.D(Aa)?"Right":this.D(zo)?"BottomLeft":this.D(jo)?"Bottom":this.D(Ni)?"BottomRight":this.D(Vo)?"TopSide":this.D(ja)?"LeftSide":this.D(vo)?"RightSide":this.D(fs)?"BottomSide":this.D(ds)?"TopBottomSides":this.D(bs)?"LeftRightSides":this.D(na)?"TopLeftSides":this.D(eh)?"TopRightSides":this.D(ju)?"BottomLeftSides":this.D(il)?"BottomRightSides":this.D(Sl)?"NotTopSide":this.D(Os)?"NotLeftSide":this.D(Vl)?"NotRightSide":this.D(th)?"NotBottomSide":this.D(nh)?"AllSides":this.D(Zo)?"Default":"None"},et.D=function(a){return a instanceof qn?(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},et.gv=function(){return new qn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},et.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Ou))a=ja;else if(a.D(rh))a=vo;else if(a.D(Zl))a=Vo;else if(a.D(uu))a=fs;else return!1;return a=a.offsetY,(this.offsetY&a)===a},et.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},et.Mc=function(){return isNaN(this.x)||isNaN(this.y)},et.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},et.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},et.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},qn.alloc=function(){var a=sa.pop();return a===void 0?new qn:a},qn.free=function(a){sa.push(a)},qn.prototype.isDefault=qn.prototype.Xb,qn.prototype.isNone=qn.prototype.ys,qn.prototype.isSide=qn.prototype.$c,qn.prototype.isNoSpot=qn.prototype.Mc,qn.prototype.isSpot=qn.prototype.sb,qn.prototype.includesSide=qn.prototype.Hf,qn.prototype.opposite=qn.prototype.gv,qn.prototype.equals=qn.prototype.D,qn.prototype.set=qn.prototype.set,qn.prototype.setTo=qn.prototype.sg;var sa=[];qn.className="Spot",qn.parse=io,qn.stringify=Ji,qn.None=Or=co(new qn(0,0,0,0),0).ja(),qn.Default=Zo=co(new qn(0,0,-1,0),-1).ja(),qn.TopLeft=Xr=new qn(0,0,0,0).ja(),qn.TopCenter=yi=new qn(.5,0,0,0).ja(),qn.TopRight=Ei=new qn(1,0,0,0).ja(),qn.LeftCenter=to=new qn(0,.5,0,0).ja(),qn.Center=Fr=new qn(.5,.5,0,0).ja(),qn.RightCenter=Aa=new qn(1,.5,0,0).ja(),qn.BottomLeft=zo=new qn(0,1,0,0).ja(),qn.BottomCenter=jo=new qn(.5,1,0,0).ja(),qn.BottomRight=Ni=new qn(1,1,0,0).ja(),qn.MiddleTop=Ca=yi,qn.MiddleLeft=Oa=to,qn.MiddleRight=aa=Aa,qn.MiddleBottom=ga=jo,qn.Top=Zl=yi,qn.Left=Ou=to,qn.Right=rh=Aa,qn.Bottom=uu=jo,qn.TopSide=Vo=co(new qn(0,0,1,1),1).ja(),qn.LeftSide=ja=co(new qn(0,0,1,2),1).ja(),qn.RightSide=vo=co(new qn(0,0,1,4),1).ja(),qn.BottomSide=fs=co(new qn(0,0,1,8),1).ja(),qn.TopBottomSides=ds=co(new qn(0,0,1,9),1).ja(),qn.LeftRightSides=bs=co(new qn(0,0,1,6),1).ja(),qn.TopLeftSides=na=co(new qn(0,0,1,3),1).ja(),qn.TopRightSides=eh=co(new qn(0,0,1,5),1).ja(),qn.BottomLeftSides=ju=co(new qn(0,0,1,10),1).ja(),qn.BottomRightSides=il=co(new qn(0,0,1,12),1).ja(),qn.NotTopSide=Sl=co(new qn(0,0,1,14),1).ja(),qn.NotLeftSide=Os=co(new qn(0,0,1,13),1).ja(),qn.NotRightSide=Vl=co(new qn(0,0,1,11),1).ja(),qn.NotBottomSide=th=co(new qn(0,0,1,7),1).ja(),qn.AllSides=nh=co(new qn(0,0,1,15),1).ja(),Xl=new qn(.156,.156).ja(),Ga=new qn(.844,.844).ja(),qn.parse=io,qn.stringify=Ji;function xr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}xr.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},xr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},xr.prototype.copy=function(){var a=new xr;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},xr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},xr.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},xr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},xr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},xr.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},xr.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,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},xr.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),te=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=te,this},xr.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,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},et=xr.prototype,et.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},et.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},et.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)},et.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))},et.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))},et.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,pe=this.dx,ye=this.dy,Te=y*te+x*se+pe,Ge=y*ne+x*he+ye,Xe=b*te+x*se+pe,Je=b*ne+x*he+ye;return x=y*te+E*se+pe,y=y*ne+E*he+ye,te=b*te+E*se+pe,b=b*ne+E*he+ye,E=Math.min(Te,Xe),Te=Math.max(Te,Xe),Xe=Math.min(Ge,Je),Ge=Math.max(Ge,Je),E=Math.min(E,x),Te=Math.max(Te,x),Xe=Math.min(Xe,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Te=Math.max(Te,te),Xe=Math.min(Xe,b),Ge=Math.max(Ge,b),a.h(E,Xe,Te-E,Ge-Xe),a},xr.alloc=function(){var a=da.pop();return a===void 0?new xr:a},xr.free=function(a){da.push(a)},xr.prototype.transformRect=xr.prototype.pp,xr.prototype.transformPoint=xr.prototype.Ga,xr.prototype.scale=xr.prototype.scale,xr.prototype.translate=xr.prototype.translate,xr.prototype.rotate=xr.prototype.rotate,xr.prototype.invert=xr.prototype.Vj,xr.prototype.multiplyInverted=xr.prototype.bv,xr.prototype.multiply=xr.prototype.multiply,xr.prototype.reset=xr.prototype.reset,xr.prototype.isIdentity=xr.prototype.ws,xr.prototype.equals=xr.prototype.D,xr.prototype.setTransform=xr.prototype.setTransform,xr.prototype.set=xr.prototype.set;var da=[];xr.className="Transform",xr.xF="54a702f3e53909c447824c6706603faf4c";var Gt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Gt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Gt.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var pe=y,ye=b;else pe=b,ye=y;if(a===x)return pe<=ne&&ne<=ye&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(ye+=E,pe-=E,pe<=ne&&ne<=ye))if(he-se>ye-pe)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te){if(Gt.Yb(a,y,ne,se,Te,x,b)&&Gt.Yb(a,y,ne,se,Te,E,te))return Gt.Yb(a,y,ne,se,Te,pe,ye);var Ge=(a+x)/2,Xe=(y+b)/2,Je=(x+E)/2,it=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+Je)/2,x=(Xe+it)/2,Je=(Je+E)/2,it=(it+te)/2;var Mt=(b+Je)/2,bt=(x+it)/2;return Gt.cs(a,y,Ge,Xe,b,x,Mt,bt,he,pe,ye,Te)||Gt.cs(Mt,bt,Je,it,E,te,ne,se,he,pe,ye,Te)},ax:function(a,y,x,b,E,te,ne,se,he){var pe=(x+E)/2,ye=(b+te)/2;return he.h((((a+x)/2+pe)/2+(pe+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,pe=(b+te)/2;return Vn(((a+x)/2+he)/2,((y+b)/2+pe)/2,(he+(E+ne)/2)/2,(pe+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))ei(pe,a,y,0,0),ei(pe,ne,se,0,0);else{var ye=(a+x)/2,Te=(y+b)/2,Ge=(x+E)/2,Xe=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Ge)/2,x=(Te+Xe)/2,Ge=(Ge+E)/2,Xe=(Xe+te)/2;var Je=(b+Ge)/2,it=(x+Xe)/2;Gt.Dl(a,y,ye,Te,b,x,Je,it,he,pe),Gt.Dl(Je,it,Ge,Xe,E,te,ne,se,he,pe)}return pe},Qe:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))pe.length===0&&(pe.push(a),pe.push(y)),pe.push(ne),pe.push(se);else{var ye=(a+x)/2,Te=(y+b)/2,Ge=(x+E)/2,Xe=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Ge)/2,x=(Te+Xe)/2,Ge=(Ge+E)/2,Xe=(Xe+te)/2;var Je=(b+Ge)/2,it=(x+Xe)/2;Gt.Qe(a,y,ye,Te,b,x,Je,it,he,pe),Gt.Qe(Je,it,Ge,Xe,E,te,ne,se,he,pe)}return pe},jv:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,E,te,pe,x,b))return Gt.Yb(a,y,E,te,pe,se,he);var ye=(a+x)/2,Te=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(ye+x)/2,Xe=(Te+b)/2;return Gt.jv(a,y,ye,Te,Ge,Xe,ne,se,he,pe)||Gt.jv(Ge,Xe,x,b,E,te,ne,se,he,pe)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Gt.Yb(a,y,E,te,ne,x,b))ei(se,a,y,0,0),ei(se,E,te,0,0);else{var he=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.iv(a,y,he,pe,ye,Te,ne,se),Gt.iv(ye,Te,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Gt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.ep(a,y,he,pe,ye,Te,ne,se),Gt.ep(ye,Te,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,Ge,Xe){if(Gt.Yb(a,y,ne,se,Ge,x,b)&&Gt.Yb(a,y,ne,se,Ge,E,te))return!Gt.Rl(a,y,ne,se,he,pe,ye,Te)||(Ge=(a-ne)*(pe-Te)-(y-se)*(he-ye),Ge===0)?!1:(Xe.h(((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/Ge,((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/Ge),!0);var Je=(a+x)/2,it=(y+b)/2,Mt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Mt)/2,x=(it+bt)/2,Mt=(Mt+E)/2,bt=(bt+te)/2;var At=(b+Mt)/2,Ft=(x+bt)/2,Bt=1/0,_t=!1,Kt=0,Rn=0;return Gt.Eo(a,y,Je,it,b,x,At,Ft,he,pe,ye,Te,Ge,Xe)&&(a=(Xe.x-he)*(Xe.x-he)+(Xe.y-pe)*(Xe.y-pe),a<Bt&&(Bt=a,_t=!0,Kt=Xe.x,Rn=Xe.y)),Gt.Eo(At,Ft,Mt,bt,E,te,ne,se,he,pe,ye,Te,Ge,Xe)&&(Xe.x-he)*(Xe.x-he)+(Xe.y-pe)*(Xe.y-pe)<Bt&&(_t=!0,Kt=Xe.x,Rn=Xe.y),_t&&(Xe.x=Kt,Xe.y=Rn),_t},Fo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,Ge){var Xe=0;if(Gt.Yb(a,y,ne,se,Ge,x,b)&&Gt.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(pe-Te)-(y-se)*(he-ye),Ge===0)return Xe;var Je=((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/Ge,it=((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/Ge;if(Je>=ye)return Xe;if((he>ye?he-ye:ye-he)<(pe>Te?pe-Te:Te-pe)){if(y<se?(he=y,a=se):(he=se,a=y),it<he||it>a)return Xe}else if(a<ne?(he=a,a=ne):he=ne,Je<he||Je>a)return Xe;0<Ge?Xe++:0>Ge&&Xe--}else{Je=(a+x)/2,it=(y+b)/2;var Mt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Mt)/2,x=(it+bt)/2,Mt=(Mt+E)/2,bt=(bt+te)/2;var At=(b+Mt)/2,Ft=(x+bt)/2;Xe+=Gt.Fo(a,y,Je,it,b,x,At,Ft,he,pe,ye,Te,Ge),Xe+=Gt.Fo(At,Ft,Mt,bt,E,te,ne,se,he,pe,ye,Te,Ge)}return Xe},qh:function(a,y,x,b,E,te,ne){return Gt.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):Gt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,se,he){return Gt.B(a,x)&&Gt.B(y,b)?(he.h(a,y),!1):Gt.$(E,ne)?Gt.$(a,x)?(Gt.qh(a,y,x,b,E,te,he),!1):Gt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Gt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),Gt.$(se,ne)?(Gt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Gt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):Gt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Gt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,pe){function ye(Mt,bt){var At=(Mt-a)*(Mt-a)+(bt-y)*(bt-y);At<Te&&(Te=At,he.h(Mt,bt))}var Te=1/0;ye(he.x,he.y);var Ge=0,Xe=0,Je=0,it=0;if(E<ne?(Ge=E,Xe=ne):(Ge=ne,Xe=E),te<se?(Je=E,it=ne):(Je=ne,it=E),Ge=(Xe-Ge)/2+pe,pe=(it-Je)/2+pe,E=(E+ne)/2,te=(te+se)/2,Ge===0||pe===0)return he;if(.5>(x>a?x-a:a-x)){if(Ge=1-(x-E)*(x-E)/(Ge*Ge),0>Ge)return he;Ge=Math.sqrt(Ge),b=-pe*Ge+te,ye(x,pe*Ge+te),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ge*Ge)+x*x/(pe*pe),se=2*x*(y-x*a)/(pe*pe)-2*x*te/(pe*pe)-2*E/(Ge*Ge),Ge=se*se-4*b*(2*x*a*te/(pe*pe)-2*y*te/(pe*pe)+te*te/(pe*pe)+E*E/(Ge*Ge)-1+(y-x*a)*(y-x*a)/(pe*pe)),0>Ge)return he;Ge=Math.sqrt(Ge),pe=(-se+Ge)/(2*b),ye(pe,x*pe-x*a+y),Ge=(-se-Ge)/(2*b),ye(Ge,x*Ge-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var pe=1e21,ye=a,Te=y;if(Gt.Ve(a,y,a,b,E,te,ne,se,he)){var Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);Ge<pe&&(pe=Ge,ye=he.x,Te=he.y)}return Gt.Ve(x,y,x,b,E,te,ne,se,he)&&(Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),Ge<pe&&(pe=Ge,ye=he.x,Te=he.y)),Gt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<pe&&(pe=y,ye=he.x,Te=he.y)),Gt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<pe&&(pe=a,ye=he.x,Te=he.y)),he.h(ye,Te),1e21>pe},us:function(a,y,x){return Gt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,pe=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=pe&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=pe&&se<=he&&E>=a):!!($i(a,y,x,b,E,te)||$i(a,y,x,b,ne,se)||Gt.Rl(a,y,he,y,E,te,ne,se)||Gt.Rl(he,y,he,pe,E,te,ne,se)||Gt.Rl(he,pe,a,pe,E,te,ne,se)||Gt.Rl(a,pe,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Gt.Fl(a,y,x,b,E,te)*Gt.Fl(a,y,x,b,ne,se)&&0>=Gt.Fl(E,te,ne,se,a,y)*Gt.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,pe=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=pe+se*Math.min(b,he),se=a+x*Math.cos(pe),pe=y+x*Math.sin(pe),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(pe+y)/2,te.push([se,pe,x,he,x,he,a,y]),te;for(;1e-5<b;)E=pe+se*Math.min(b,he),te.push(Gt.Vy(x,pe,E,a,y)),b-=Math.abs(E-pe),pe=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,pe=ne*ne+he*he,ye=pe+ne*ne+he*se;return pe=4/3*(Math.sqrt(2*pe*ye)-ye)/(ne*se-he*ne),se=ne-pe*he,ne=he+pe*ne,he=-ne,pe=te+y,te=Math.cos(pe),pe=Math.sin(pe),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*pe,E+se*pe+ne*te,b+se*te-he*pe,E+se*pe+he*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,se=0;else ne=0,se=1;var he=ne===0?a:y,pe=ne===0?x:b;return(ne===0?E:te)&&(pe=-pe),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Gt.az(he,ne===0?a:y,pe,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var pe=0;9999999999>pe&&(y=.5*(se+he),!(y===se||y===he));++pe){var ye=a/(y+E),Te=ne/(y+te);if(ye=ye*ye+Te*Te-1,0<ye)se=y;else if(0>ye)he=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new nr,um:new nr,Mf:new nr,Nf:0,vm:100};Gt.za=Gt.AA;function kn(a){Sr(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 pn:(kn.V===null&&(kn.V=new pn().freeze()),this.ee=kn.V),this.aq=this.ee.Ja,this.Ip=new Xt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Xr,this.gg=Ni,this.Rk=this.Sk=NaN,this.Uf=xn}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)&&jt("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?Hs(this,a):a.type===kn.j&&this.type===kn.o?Hs(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 Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)};function Hs(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&&Gt.B(a.startX,y.startX)&&Gt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ri&&Gt.B(a.endX,y.endX)&&Gt.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 Xt(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 Xt(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 te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.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 it>=Bt-1?!0:pe[it+1].match(_t)!==null}function b(){return it++,pe[it]}function E(kr){var wr=parseFloat(b()),mi=parseFloat(b());Mt===Mt.toLowerCase()&&(wr=Ft.x+wr,mi=Ft.y+mi),kr.h(wr,mi)}function te(){return E(Ft),Ft}function ne(){return E(At),At}function se(){var kr=bt.toLowerCase();return kr!=="c"&&kr!=="s"&&kr!=="q"&&kr!=="t"?Ft:new lt(2*Ft.x-At.x,2*Ft.y-At.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$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 pe=a.split(" ");for(a=0;a<pe.length;a++){var ye=pe[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){he=Bn();for(var Te="",Ge=!1,Xe=0;Xe<ye.length;Xe++){var Je=ye[Xe];Je!=="."||Ge?Je==="."?(he.push(Te),Te="."):Te+=Je:(Ge=!0,Te+=Je)}for(he.push(Te),pe.splice(a,1),ye=0;ye<he.length;ye++)pe.splice(a+ye,0,he[ye]);a+=he.length-1,Un(he)}}var it=-1,Mt="",bt="";he=new lt(0,0);var At=new lt(0,0),Ft=new lt(0,0),Bt=pe.length;a=A1(null),Ge=Te=ye=!1,Xe=!0,Je=null;for(var _t=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=Bt-1);)if(bt=Mt,Mt=b(),Mt!=="")switch(Mt.toUpperCase()){case"X":Xe=!0,Te=ye=!1;break;case"M":for(Je=te(),a.mc===null||Xe===!0?(Dd(a,Je.x,Je.y,ye,!Te,Ge),Xe=!1):a.moveTo(Je.x,Je.y),he.assign(Ft);!x();)Je=te(),a.lineTo(Je.x,Je.y);break;case"L":for(;!x();)Je=te(),a.lineTo(Je.x,Je.y);break;case"H":for(;!x();)Ft=new lt((Mt===Mt.toLowerCase()?Ft.x:0)+parseFloat(b()),Ft.y),a.lineTo(Ft.x,Ft.y);break;case"V":for(;!x();)Ft=new lt(Ft.x,(Mt===Mt.toLowerCase()?Ft.y:0)+parseFloat(b())),a.lineTo(Ft.x,Ft.y);break;case"C":for(;!x();){Je=new lt,E(Je);var Kt=ne(),Rn=te();wh(a,Je.x,Je.y,Kt.x,Kt.y,Rn.x,Rn.y)}break;case"S":for(;!x();)Je=se(),Kt=ne(),Rn=te(),wh(a,Je.x,Je.y,Kt.x,Kt.y,Rn.x,Rn.y);break;case"Q":for(;!x();)Je=ne(),Kt=te(),Im(a,Je.x,Je.y,Kt.x,Kt.y);break;case"T":for(;!x();)At=Je=se(),Kt=te(),Im(a,Je.x,Je.y,Kt.x,Kt.y);break;case"B":for(;!x();){Je=parseFloat(b()),Kt=parseFloat(b()),Rn=parseFloat(b());var Jn=parseFloat(b()),Zn=parseFloat(b()),Tn=Zn,hn=!1;x()||(Tn=parseFloat(b()),x()||(hn=parseFloat(b())!==0)),Mt===Mt.toLowerCase()&&(Rn+=Ft.x,Jn+=Ft.y),a.arcTo(Je,Kt,Rn,Jn,Zn,Tn,hn)}break;case"A":for(;!x();)Je=Math.abs(parseFloat(b())),Kt=Math.abs(parseFloat(b())),Rn=parseFloat(b()),Zn=Jn=!1,hn=Tn=0,Tn=b(),Tn.length===1?(Jn=!!parseFloat(Tn),Zn=!!parseFloat(b()),Tn=parseFloat(b())):Tn.length===2?(Jn=!!parseFloat(Tn[0]),Zn=!!parseFloat(Tn[1]),Tn=parseFloat(b())):(Jn=!!parseFloat(Tn[0]),Zn=!!parseFloat(Tn[1]),Tn=parseFloat(Tn.slice(2))),hn=parseFloat(b()),Mt===Mt.toLowerCase()&&(Tn=Ft.x+Tn,hn=Ft.y+hn),Ft.h(Tn,hn),bx(a,Je,Kt,Rn,Jn,Zn,Tn,hn);break;case"Z":Px(a),Ft.assign(he);break;case"F":for(Je="",Kt=1;pe[it+Kt];)if(pe[it+Kt]==="0")Ge=!0,Kt++;else if(pe[it+Kt].match(/[Uu]/)!==null)Kt++;else if(pe[it+Kt].match(_t)===null)Kt++;else{Je=pe[it+Kt];break}Je.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Je="",Kt=1;pe[it+Kt];)if(pe[it+Kt].match(/[Ff]/)!==null)Kt++;else if(pe[it+Kt].match(_t)===null)Kt++;else{Je=pe[it+Kt];break}Je.match(/[Mm]/)?Te=!0:a.mc.isShadowed=!1}if(he=a.os,Rm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},kn.Ha=function(a,y){for(var x=a.length,b=lt.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}lt.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 te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),jl(this,a,!1),ei(a,0,0,0,0),a.freeze()},kn.prototype.ix=function(){var a=new Xt;return jl(this,a,!0),a};function jl(a,y,x){switch(a.type){case kn.j:case kn.u:case kn.F:x?y.h(a.od,a.pd,0,0):ei(y,a.od,a.pd,0,0),ei(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 te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):ei(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,pe=te.startY,ye=0;ye<se;ye++){var Te=ne[ye];switch(Te.type){case Ri:case Fo:he=Te.endX,pe=Te.endY,ei(y,he,pe,0,0);break;case Go:Gt.Dl(he,pe,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case ps:Gt.iv(he,pe,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case xo:case Cs:var Ge=Te.type===xo?Ua(Te,te):Ds(Te,te,he,pe),Xe=Ge.length;if(Xe===0){he=Te.type===xo?Te.centerX:Te.endX,pe=Te.type===xo?Te.centerY:Te.endY,ei(y,he,pe,0,0);break}Te=null;for(var Je=0;Je<Xe;Je++)Te=Ge[Je],Gt.Dl(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.5,y);Te!==null&&(he=Te[6],pe=Te[7]);break;default:jt("Unknown Segment type: "+Te.type)}}}break;default:jt("Unknown Geometry type: "+a.type)}}kn.prototype.normalize=function(){this._isFrozen&&Wt(this);var a=this.ix();return this.offset(-a.x,-a.y),new lt(-a.x,-a.y)},kn.prototype.offset=function(a,y){return this._isFrozen&&Wt(this),this.transform(1,0,0,1,a,y),this},kn.prototype.scale=function(a,y){return this._isFrozen&&Wt(this),this.transform(a,0,0,y,0,0),this},kn.prototype.rotate=function(a,y,x){this._isFrozen&&Wt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=xr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),xr.free(b),this},et=kn.prototype,et.transform=function(a,y,x,b,E,te){switch(this.type){case kn.j:case kn.u:case kn.F:var ne=this.od,se=this.pd;this.od=ne*a+se*x+E,this.pd=ne*y+se*b+te,ne=this.Dc,se=this.Ec,this.Dc=ne*a+se*x+E,this.Ec=ne*y+se*b+te;break;case kn.o:for(var he=this.figures.s,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Te.startX,se=Te.startY,Te.startX=ne*a+se*x+E,Te.startY=ne*y+se*b+te,Te=Te.segments.s;for(var Ge=Te.length,Xe=0;Xe<Ge;Xe++){var Je=Te[Xe];switch(Je.type){case Ri:case Fo:ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case Go:ne=Je.point1X,se=Je.point1Y,Je.point1X=ne*a+se*x+E,Je.point1Y=ne*y+se*b+te,ne=Je.point2X,se=Je.point2Y,Je.point2X=ne*a+se*x+E,Je.point2Y=ne*y+se*b+te,ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case ps:ne=Je.point1X,se=Je.point1Y,Je.point1X=ne*a+se*x+E,Je.point1Y=ne*y+se*b+te,ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case xo:ne=Je.centerX,se=Je.centerY,Je.centerX=ne*a+se*x+E,Je.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.startAngle+=ne),0>a&&(Je.startAngle=180-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),0>b&&(Je.startAngle=-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY!==void 0&&(Je.radiusY*=Math.sqrt(y*y+b*b));break;case Cs:if(ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te,Je.radiusX===0||Je.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.xAxisRotation+=ne),0>a&&(Je.xAxisRotation=180-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),0>b&&(Je.xAxisRotation=-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY*=Math.sqrt(y*y+b*b);break;default:jt("Unknown Segment type: "+Je.type)}}}}return this._isInvalidBounds=!0,this},et.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case kn.j:return Gt.Yb(x,b,E,te,y,a.x,a.y);case kn.u:var ne=Xt.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),Xt.free(ne),a;case kn.F:ne=Math.min(x,E)-y;var se=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),se=a.y-(se+y),1>=ne*ne/(x*x)+se*se/(y*y));case kn.o:return Qo(this,a,y,!0,!1);default:return!1}};function Qo(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,pe,ye,Te,Ge=a.figures.s,Xe=Ge.length,Je=0;Je<Xe;Je++){var it=Ge[Je],Mt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(te,y,x))return!0;var bt=it.segments;he=it.startX,pe=it.startY;for(var At=he,Ft=pe,Bt=bt.s,_t=0;_t<=bt.length;_t++){var Kt=void 0;if(_t!==bt.length){Kt=Bt[_t];var Rn=Kt.type;a=Kt.endX,Te=Kt.endY}else Rn=Ri,a=At,Te=Ft;switch(Rn){case Fo:if(At=Pa(te,y,ne,y,he,pe,At,Ft),isNaN(At))return!0;se+=At,At=a,Ft=Te;break;case Ri:if(he=Pa(te,y,ne,y,he,pe,a,Te),isNaN(he))return!0;se+=he;break;case Go:ye=Gt.Fo(he,pe,Kt.point1X,Kt.point1Y,Kt.point2X,Kt.point2Y,a,Te,ne,y,te,y,.5),se+=ye;break;case ps:ye=Gt.Fo(he,pe,(he+2*Kt.point1X)/3,(pe+2*Kt.point1Y)/3,(2*Kt.point1X+a)/3,(2*Kt.point1Y+Te)/3,a,Te,ne,y,te,y,.5),se+=ye;break;case xo:case Cs:Rn=Kt.type===xo?Ua(Kt,it):Ds(Kt,it,he,pe);var Jn=Rn.length;if(Jn===0){if(he=Pa(te,y,ne,y,he,pe,Kt.type===xo?Kt.centerX:Kt.endX,Kt.type===xo?Kt.centerY:Kt.endY),isNaN(he))return!0;se+=he;break}Kt=null;for(var Zn=0;Zn<Jn;Zn++){if(Kt=Rn[Zn],Zn===0){if(ye=Pa(te,y,ne,y,he,pe,Kt[0],Kt[1]),isNaN(ye))return!0;se+=ye}ye=Gt.Fo(Kt[0],Kt[1],Kt[2],Kt[3],Kt[4],Kt[5],Kt[6],Kt[7],ne,y,te,y,.5),se+=ye}Kt!==null&&(a=Kt[6],Te=Kt[7]);break;default:jt("Unknown Segment type: "+Kt.type)}he=a,pe=Te}if(Mt){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(it.ca(te,y,E?x:x+2))return!0}return!1}function Pa(a,y,x,b,E,te,ne,se){if(Gt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var pe=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,pe>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(pe<E||pe>ne)return 0}else if(pe<ne||pe>E)return 0;return 0<he?1:-1}function Fs(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}et.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new lt),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,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],pe=he.length;for(a=0;a<pe;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},et.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,te=0,ne=0;ne<b;ne++){var se=x[ne],he=se.length;for(a=0;a<he;a++){var pe=se[a];if(te+pe>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=pe}}return NaN},et.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,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],pe=he.length;for(a=0;a<pe;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,ye=x[se],x=ye[2*a],se=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=ye}}return y},et.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 te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var se=lt.alloc();return Gt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,lt.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===kn.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var pe=Math.min(ne,he,se,E);if(pe===se)return b/te;if(pe===he)return(y+a)/te;if(pe===E)return(2*y+x-b)/te;if(pe===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=lt.alloc(),E=1/0,se=ne=0,he=y.length;for(var ye=pe=0,Te=0;Te<he;Te++)for(var Ge=y[Te],Xe=x[Te],Je=Ge.length,it=0;it<Je;it+=2){var Mt=Ge[it],bt=Ge[it+1];if(it!==0){Gt.qh(pe,ye,Mt,bt,a.x,a.y,b);var At=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);At<E&&(E=At,ne=se,ne+=Math.sqrt((b.x-pe)*(b.x-pe)+(b.y-ye)*(b.y-ye))),se+=Xe[(it-2)/2]}pe=Mt,ye=bt}return lt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function ol(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 te=new Oo;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new fi(xo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=Ua(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];Gt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(Fu(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,se=ne,he=te;for(var pe=E.segments.s,ye=pe.length,Te=0;Te<ye;Te++){var Ge=pe[Te];switch(Ge.type){case Fo:4<=b.length&&(y.push(b),x.push(Fu(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,se=ne,he=te;break;case Ri:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case Go:Gt.Qe(ne,te,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case ps:Gt.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case xo:var Xe=Ua(Ge,E),Je=Xe.length;if(Je===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var it=0;it<Je;it++){var Mt=Xe[it];Gt.Qe(ne,te,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],te=Mt[7]}break;case Cs:if(Xe=Ds(Ge,E,ne,te),Je=Xe.length,it=Ge.endX,Mt=Ge.endY,Je===0){b.push(it),b.push(Mt),ne=it,te=Mt;break}for(it=0;it<Je;it++)Mt=Xe[it],Gt.Qe(ne,te,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],te=Mt[7];break;default:jt("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Fu(b)))}}}function Fu(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],se=a[te+1];te!==0&&y.push(Math.sqrt(An(x,b,ne,se))),x=ne,b=se}return y}et.add=function(a){return this.ee.add(a),this},et.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&Wt(this),this.fg=new qn(a,y,E,te).freeze(),this.gg=new qn(x,b,ne,se).freeze(),this},vn.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 ol(this),this.tk}},flattenedLengths:{get:function(){return ol(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],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Wt(this,a),this.na=a,a===kn.o?this.ee=new pn:(kn.V===null&&(kn.V=new pn().freeze()),this.ee=kn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Wt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Wt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Wt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Wt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Wt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Wt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Wt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Wt(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 Yt(kn,"Line",0),kn.u=new Yt(kn,"Rectangle",1),kn.F=new Yt(kn,"Ellipse",2),kn.o=new Yt(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 Oo(a,y,x,b,E){Sr(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 pn,this.sr=this.pl.Ja,this.fw=null}Oo.prototype.copy=function(){var a=new Oo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},et=Oo.prototype,et.Xa=function(a){if(!(a instanceof Oo&&Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},et.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},et.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},et.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},et.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},et.add=function(a){return this.pl.add(a),this},et.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,pe=0;pe<he;pe++){var ye=se[pe];switch(ye.type){case Fo:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Ri:if(Gt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case Go:if(Gt.cs(b,E,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case ps:if(Gt.jv(b,E,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case xo:case Cs:var Te=ye.type===xo?Ua(ye,this):Ds(ye,this,b,E),Ge=Te.length,Xe=ye.type===xo?ye.centerX:ye.endX,Je=ye.type===xo?ye.centerY:ye.endY;if(Ge===0){if(Gt.Yb(b,E,Xe,Je,x,a,y))return!0;b=Xe,E=Je;break}for(Xe=null,Je=0;Je<Ge;Je++)if(Xe=Te[Je],Je===0&&Gt.Yb(b,E,Xe[0],Xe[1],x,a,y)||Gt.cs(Xe[0],Xe[1],Xe[2],Xe[3],Xe[4],Xe[5],Xe[6],Xe[7],.5,a,y,x))return!0;Xe!==null&&(b=Xe[6],E=Xe[7]);break;default:jt("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==te||E!==ne)&&Gt.Yb(b,E,te,ne,x,a,y))return!0}return!1},vn.Object.defineProperties(Oo.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&Wt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Wt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Wt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Wt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Wt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Wt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function fi(a,y,x,b,E,te,ne,se){Sr(this),a===void 0&&(a=Ri),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),te===void 0&&(te=0),ne===void 0&&(ne=0),a===Cs?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===xo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===xo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}fi.prototype.copy=function(){var a=new fi;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},et=fi.prototype,et.Xa=function(a){if(!(a instanceof fi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case Ri:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY);case Go:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y)&&Gt.B(this.point2X,a.point2X)&&Gt.B(this.point2Y,a.point2Y);case ps:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y);case xo:return Gt.B(this.startAngle,a.startAngle)&&Gt.B(this.sweepAngle,a.sweepAngle)&&Gt.B(this.centerX,a.centerX)&&Gt.B(this.centerY,a.centerY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);case Cs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Gt.B(this.xAxisRotation,a.xAxisRotation)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);default:return!1}},et.qb=function(a){a.classType===fi&&(this.type=a)},et.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ri:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Go: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 ps: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 xo:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Cs:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.close=function(){return this.isClosed=!0,this};function Ua(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,te=Gt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=xr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),kn.Ha(te,ne),xr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function Ds(a,y,x,b){function E(it,Mt,bt,At){return(it*At<Mt*bt?-1:1)*Math.acos((it*bt+Mt*At)/(Math.sqrt(it*it+Mt*Mt)*Math.sqrt(bt*bt+At*At)))}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 te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,se=a.isLargeArc,he=a.isClockwiseArc,pe=a.Dc,ye=a.Ec,Te=Math.cos(ne),Ge=Math.sin(ne),Xe=Te*(x-pe)/2+Ge*(b-ye)/2;ne=-Ge*(x-pe)/2+Te*(b-ye)/2;var Je=Xe*Xe/(y*y)+ne*ne/(te*te);return 1<Je&&(y*=Math.sqrt(Je),te*=Math.sqrt(Je)),Je=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Xe*Xe)/(y*y*ne*ne+te*te*Xe*Xe)),isNaN(Je)&&(Je=0),se=Je*y*ne/te,Je=Je*-te*Xe/y,isNaN(se)&&(se=0),isNaN(Je)&&(Je=0),x=(x+pe)/2+Te*se-Ge*Je,b=(b+ye)/2+Ge*se+Te*Je,ye=E(1,0,(Xe-se)/y,(ne-Je)/te),Te=(Xe-se)/y,pe=(ne-Je)/te,Xe=(-Xe-se)/y,se=(-ne-Je)/te,ne=E(Te,pe,Xe,se),Xe=(Te*Xe+pe*se)/(Math.sqrt(Te*Te+pe*pe)*Math.sqrt(Xe*Xe+se*se)),-1>=Xe?ne=Math.PI:1<=Xe&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Xe=y>te?te/y:1,y=Gt.jx(0,0,y>te?y:te,ye,ye+ne,!0),te=xr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Xe),kn.Ha(y,te),xr.free(te),a.ae=y,a.ae}vn.Object.defineProperties(fi.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&&Wt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Wt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Wt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Wt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Wt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Wt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Wt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Wt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Wt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&jn(a,">= zero",fi,"radiusX"),this._isFrozen&&Wt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&jn(a,">= zero",fi,"radiusY"),this._isFrozen&&Wt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Wt(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&&Wt(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&&Wt(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&&Wt(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&&Wt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fi.prototype.equalsApprox=fi.prototype.Xa;var Fo=new Yt(fi,"Move",0),Ri=new Yt(fi,"Line",1),Go=new Yt(fi,"Bezier",2),ps=new Yt(fi,"QuadraticBezier",3),xo=new Yt(fi,"Arc",4),Cs=new Yt(fi,"SvgArc",4);fi.className="PathSegment",fi.Move=Fo,fi.Line=Ri,fi.Bezier=Go,fi.QuadraticBezier=ps,fi.Arc=xo,fi.SvgArc=Cs;function ma(){this.H=null,this.xu=new lt(0,0).freeze(),this.mt=new lt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}ma.prototype.copy=function(){var a=new ma;return this.clone(a)},ma.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},ma.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},ma.prototype.So=function(a,y){var x=this.diagram;return x===null||Pp(x,a,y),y},ma.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Pp(x,a,y),y.assign(x.Ps(y))),y},vn.Object.defineProperties(ma.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}}}),ma.prototype.getMultiTouchDocumentPoint=ma.prototype.Bz,ma.prototype.getMultiTouchViewPoint=ma.prototype.So,ma.className="InputEvent";function hu(){this.H=null,this.xa="",this.ar=this.Lr=null}hu.prototype.copy=function(){var a=new hu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},hu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},vn.Object.defineProperties(hu.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),hu.className="DiagramEvent";function oo(){this.Fm=no,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=Jt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Jt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Jt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Jt(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===no?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ar(this.object)),this.oldValue!==null&&(a+=" old: "+Ar(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ar(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},vn.Object.defineProperties(oo.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Ea&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var Ea=new Yt(oo,"Transaction",-1),no=new Yt(oo,"Property",0),wo=new Yt(oo,"Insert",1),Eo=new Yt(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=Ea,oo.Property=no,oo.Insert=wo,oo.Remove=Eo;function Uo(){this.o=new pn().freeze(),this.xa="",this.j=!1}Uo.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},Uo.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()},Uo.prototype.canUndo=function(){return this.isComplete},Uo.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()}},Uo.prototype.canRedo=function(){return this.isComplete},Uo.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()}},Uo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Zt,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===no&&b.object){var E=y.get(b.object);E||(E=new Zt,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,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()}},vn.Object.defineProperties(Uo.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}}}),Uo.prototype.optimize=Uo.prototype.ak,Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.canRedo=Uo.prototype.canRedo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.clear=Uo.prototype.clear,Uo.className="Transaction";function ho(){this.Pt=new yn,this.Jd=!1,this.u=new pn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new pn().freeze(),this.hl=new pn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ho.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
`+this.history.M(b).toString(a-1);return y},ho.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},ho.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},et=ho.prototype,et.Xw=function(a){this.Pt.add(a)},et.Rx=function(a){this.Pt.remove(a)},et.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},et.eb=function(a){return a===void 0&&(a=""),Du(this,!0,a)},et.Kf=function(){return Du(this,!1,"")};function Du(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Cn("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 te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.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=te,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}et.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},ho.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ho.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Cn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ho.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ho.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Cn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ho.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new oo;for(b.change=Ea,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ho.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Uo);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||Cn("Change not within a transaction: "+x.toString()))}},ho.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},vn.Object.defineProperties(ho.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),ho.prototype.handleChanged=ho.prototype.Tu,ho.prototype.redo=ho.prototype.redo,ho.prototype.undo=ho.prototype.undo,ho.prototype.canUndo=ho.prototype.canUndo,ho.prototype.discardHistoryAfterIndex=ho.prototype.lx,ho.prototype.rollbackTransaction=ho.prototype.Kf,ho.prototype.commitTransaction=ho.prototype.eb,ho.prototype.startTransaction=ho.prototype.Ea,ho.prototype.removeModel=ho.prototype.Rx,ho.prototype.addModel=ho.prototype.Xw,ho.prototype.clear=ho.prototype.clear,ho.className="UndoManager";function ai(){Sr(this),this.H=gu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ma,this.Zr=-1}ai.prototype.toString=function(){return this.name!==""?this.name+" Tool":er(this.constructor)},ai.prototype.updateAdornments=function(){},ai.prototype.canStart=function(){return this.isEnabled},ai.prototype.doStart=function(){},ai.prototype.doActivate=function(){this.isActive=!0},ai.prototype.doDeactivate=function(){this.isActive=!1},ai.prototype.doStop=function(){},ai.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},ai.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},ai.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},ai.prototype.doMouseMove=function(){},ai.prototype.doMouseUp=function(){this.stopTool()},ai.prototype.doMouseWheel=function(){},ai.prototype.canStartMultiTouch=function(){return!0},ai.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}lt.free(x),lt.free(b)},ai.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new lt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var se=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=se}y.bubbles=!1}lt.free(x),lt.free(b)},ai.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},ai.prototype.doKeyUp=function(){},ai.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},ai.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},ai.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(pi?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||(pi?y.meta:y.control)||y.shift||a.clearSelection()}},ai.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,uf(a,b,x),b.handled};function uf(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}ai.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 te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var se=te.mouseLeave;if(se!==null&&(b===te||b!==null&&b.rg(te)||(se(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},ai.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},ai.prototype.doCurrentObjectChanged=function(){},ai.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===cu&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===cu&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},ai.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},ai.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Zr(function(){x.doWaitAfter(b)},a)},ai.prototype.cancelWaitAfter=function(){this.Zr!==-1&&an.clearTimeout(this.Zr),this.Zr=-1},ai.prototype.doWaitAfter=function(){},ai.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof di);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},ai.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},vn.Object.defineProperties(ai.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Vt&&(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}}}),ai.prototype.startTransaction=ai.prototype.Ea,ai.className="Tool";function Qi(){ai.call(this),this.name="ToolManager",this.hb=new pn,this.ob=new pn,this.Hb=new pn,this.F=this.V=850,this.o=new ln(2,2).ja(),this.Ha=5e3,this.ia=cu,this.u=_h,this.Mp=this.j=null,this.zj=-1}en(Qi,ai),Qi.prototype.initializeStandardTools=function(){},Qi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof di&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Qi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Ol&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)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===cu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=cu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Qi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Cc(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Cc(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Qi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof di&&(y===a||y.rg(a))||this.hideToolTip()},Qi.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()))},Qi.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)},Qi.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 di)||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()},Qi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof di){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 Ql&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(an.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Zr(function(){E.hideToolTip()},a)}},Qi.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}},Qi.prototype.hideToolTip=function(){this.zj!==-1&&(an.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof di?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ql&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Qi.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()},Qi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Qi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Qi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Qi.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},Qi.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},Qi.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)},vn.Object.defineProperties(Qi.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 di?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}}}),Qi.prototype.replaceStandardTool=Qi.prototype.gb;var cu=new Yt(Qi,"WheelScroll",0),ih=new Yt(Qi,"WheelZoom",1),Ec=new Yt(Qi,"WheelNone",2),_h=new Yt(Qi,"GestureZoom",3),Ol=new Yt(Qi,"GestureCancel",4),Bu=new Yt(Qi,"GestureNone",5);Qi.className="ToolManager",Qi.WheelScroll=cu,Qi.WheelZoom=ih,Qi.WheelNone=Ec,Qi.GestureZoom=_h,Qi.GestureCancel=Ol,Qi.GestureNone=Bu;function lo(){ai.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new lt(NaN,NaN),this.Fr=new lt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new yn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var al;en(lo,ai),lo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},lo.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},lo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(pi?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},lo.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),la=null,this.isActive=!0,this.tl.set(a.position),zh(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&os(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,la=this,oh=this.diagram,this.doSimulatedDragOut()))};function zh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Mn?(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 Bs,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}lo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},lo.prototype.Pd=function(a){return a===void 0?new Gu(On):this.isGridSnapEnabled?new Gu(new lt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Gu(a.copy())},lo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Yl(this),Qh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<al.count){for(var y=al,x=y.length,b=0;b<x;b++){var E=y.M(b);ao(E),Gi(E),Yl(E),E.diagram.ug()}y.clear()}ao(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),la=oh=null,Gi(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Pf(a,!0)},lo.prototype.stopTransaction=function(){var a=this.diagram,y=ai.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Yl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,fu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=la;Gi(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}lo.prototype.doCancel=function(){Gi(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},lo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},lo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function $l(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Fa(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Zt,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Mn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Gi(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 Mn&&(x.value.point=new lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ao(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Xo(a,y,x){var b=a.diagram,E=a.startPoint,te=lt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),lt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(os(b),b.hk())}lo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Jh(b,a,y,this.dragOptions,x)};function Fa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Mn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Ch(b,-E.x,-E.y)}y.bd()}}function ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),sl(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=fu(a,E,b),!a.isActive&&la===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Tr)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&la===null||(a.doDragOver(y,b),!a.isActive&&la===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}lo.prototype.findDragOverObject=function(a){var y=this;return mu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof di||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},lo.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function fu(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var se=a.Cg[ne],he=se.mouseDragLeave;if(he!==null&&(he(y,se,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&la===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Jl(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],se=ne.mouseDragEnter,se===null||(se(y,ne,te),b=!0,!y.handled));x++);return b}function Jl(a){var y=a.panel;return y!==null?y:a instanceof hr&&!(a instanceof Tr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function du(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(pe){return b.findValidLinkablePort(pe,x)});a=lt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var se=E.value;if(se.part!==null){var he=se.ga(Fr,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return lt.free(a),ne}function sl(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 te=null,ne=null;x.fromNode===null&&(te=du(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=du(a,x.i(x.pointsCount-1),!0),se!==null&&(he=se.part)),E.isValidLink(ne,te,he,se)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=he,se!==null&&(x.toPortId=se.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):ed(E,ne,te,he,se):ed(E,null,null,null,null)}}}}lo.prototype.doDragOver=function(){};function Fl(a,y){var x=a.diagram;a.dragsLink&&sl(a,!0),Yl(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;J0(a,E,te),te=Jl(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||la!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof Gn&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||la!==null){for(a=Xt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Gn&&Q0(x,b,a);Xt.free(a)}}}function J0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Tr||(x=a.mouseDrop,x!==null&&x(y))}function Q0(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 Mn},!0,function(E){return E instanceof Mn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}lo.prototype.doDropOnto=function(){},lo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?($l(this,!1),pd(a,this.copiedParts),Xo(this,this.copiedParts,!1),Qh(a,this.copiedParts)):this.mayMove()?(Gi(this),Xo(this,this.draggedParts,!0)):this.mayDragOut()?($l(this,!1),Xo(this,this.copiedParts,!1)):Gi(this),ka(this,a.lastInput.documentPoint))}},lo.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(Gi(this),$l(this,!0),pd(a,this.copiedParts),Xo(this,this.copiedParts,!1),Qh(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,Gi(this),this.mayMove()&&(Xo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Fl(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&q0(this),a.Ya(),Qh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},lo.prototype.simulatedMouseMove=function(a,y,x){if(la===null)return!1;var b=la.diagram;x instanceof Vt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),la.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),oh=x,x!==null&&x!==b&&(kc(),E=x.toolManager.findTool("Dragging"),E!==null&&(al.contains(E)||al.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},lo.prototype.simulatedMouseUp=function(a,y,x){if(la===null)return!1;var b=oh,E=la.diagram;if(x===null)return la.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),la.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),al.contains(b)||al.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new lt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=la,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function q0(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Gn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}lo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(pi?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},lo.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},lo.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},lo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},lo.prototype.Az=function(){return la},lo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=la;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},lo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Zs(a),a.animationManager.Cc(),a=la,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},lo.prototype.doSimulatedDragLeave=function(){var a=la;a!==null&&a.doSimulatedDragOut(),this.doCancel()},lo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=la;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Xo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},lo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=la;if(y!==null){var x=y.diagram;if(y.Ym=!0,Gi(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Xo(this,this.copiedParts,!1);var b=new yn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Fl(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 te=Xt.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var pe=he.value;if(pe.isVisible()){var ye=pe.location;pe=ye.x,ye=ye.y,isNaN(pe)||isNaN(ye)||(pe<b&&(b=pe),ye<E&&(E=ye),pe>ne&&(ne=pe),ye>se&&(se=ye))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,Xt.free(te),te=a.Fr,ne=new Zt,se=lt.alloc(),he=y.iterator;he.next();)pe=he.value,pe instanceof Mn&&pe.canCopy()&&(ye=x.I(pe),ye!==null&&(ye.points=pe.points,Ch(ye,te.x-b,te.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)pe=y.value,pe.Zc()&&pe.canCopy()&&(he=x.I(pe),he!==null&&(pe=pe.location,se.h(te.x-(b-pe.x),te.y-(E-pe.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));lt.free(se),a.copiedParts=ne,zh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}lo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},lo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new lt},vn.Object.defineProperties(lo.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),lo.prototype.getDraggingSource=lo.prototype.Az;var la=null,oh=null;lo.className="DraggingTool",al=new pn,mn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Qi.prototype.doCancel=function(){la!==null&&la.doCancel(),ai.prototype.doCancel.call(this)};function yo(){ai.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Mn,y=new Dr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Dr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Gn,y=new Dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Cr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Gn,y=new Dr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Cr,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 Zt,this.Of=this.gj=this.Pf=null}en(yo,ai),yo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},yo.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=ln.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,ln.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Fr,te=lt.alloc(),x.location=y.ga(Fr,te),lt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},yo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Cr,y.fromSpot=Or,y.toSpot=Or),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},yo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},yo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Gn){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},yo.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Gn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Gn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},yo.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(Te){return E.findValidLinkablePort(Te,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof Gn){var he=ne.ga(Fr,lt.alloc()),pe=x.x-he.x,ye=x.y-he.y;lt.free(he),he=pe*pe+ye*ye,he<b&&(pe=this.validPortsCache.I(ne),pe!==null?pe&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Gn&&(x.layer===null||x.layer.allowLink))?y:null},yo.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},yo.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},yo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},yo.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Gn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Gn))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},yo.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)},yo.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 yn;return b.add(a),Da(this,x,y,b)};function Da(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Da(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Da(a,y.labeledLink,x,b))))}yo.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Tf){if(b===Rp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Wa(this,a,y,x,!0)}if(b===_p){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Wa(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new yn,b.add(y),a=Ha(this,b,a,y,x)),!a;if(b===Bp)return!Wa(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new yn,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Wa(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&Wa(a,ne,x,b,E)))return!0}return!1}function Ha(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Ha(a,y,ne,b,E)))return!0}return!1}function Tc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var se=ne.fromNode;if(ne=ne.toNode,se=se===x?ne:se,se!==x&&Tc(a,y,se,b,E))return!0}}return!1}vn.Object.defineProperties(yo.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}}}),yo.className="LinkingBaseTool";function Ka(){yo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}en(Ka,yo),Ka.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},Ka.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Gn)))return null;var x=this.direction;if(x===Gh||x===_g){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Gh||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ka.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Gn&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Gn&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},Ka.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()},Ka.prototype.doStop=function(){yo.prototype.doStop.call(this),this.startObject=null},Ka.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var se=ne.part;se instanceof Gn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=se,E=ne):(y=se,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):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(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Ka.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Mn)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)},Ka.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ka.prototype.doNoLink=function(){},vn.Object.defineProperties(Ka.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Gh=new Yt(Ka,"Either",0),_g=new Yt(Ka,"ForwardsOnly",0),zg=new Yt(Ka,"BackwardsOnly",0);Ka.className="LinkingTool",Ka.Either=Gh,Ka.ForwardsOnly=_g,Ka.BackwardsOnly=zg;function Bs(){yo.call(this),this.name="Relinking";var a=new Dr;a.figure="Diamond",a.desiredSize=Er,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Dr,a.figure="Diamond",a.desiredSize=Er,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Xt}en(Bs,yo),Bs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Mn){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)}},Bs.prototype.makeAdornment=function(a,y){var x=new di;return x.type=Pn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Bs.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},Bs.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 di&&x.adornedPart instanceof Mn))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=br),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=br),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},Bs.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rd||x===Eh)&&(x=Qa),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Bs.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()},Bs.prototype.doStop=function(){yo.prototype.doStop.call(this),this.handle=null},Bs.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,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Gn&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Bs.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},Bs.prototype.doNoRelink=function(){};function ed(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}vn.Object.defineProperties(Bs.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 di))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Bs.className="RelinkingTool",mn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),mn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){ai.call(this),this.name="LinkReshaping";var a=new Dr;a.figure="Rectangle",a.desiredSize=ri,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Dr,a.figure="Diamond",a.desiredSize=Er,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new lt,this.Yq=new pn}en(ko,ai),ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lp},ko.prototype.om=function(a,y){a.reshapingBehavior=y},ko.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Mn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new di,E.type=Pn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Gs)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var pe=y.i(x+1);Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(pe=y.i(x-1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),pe=y.i(te),Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(he=y.i(te+1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")):ne!==te&&(this.om(se,td),se.cursor="move");E.add(se)}E.adornedObject=a}return E},ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ko.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},ko.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Mn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ko.prototype.stopTransaction=function(){var a=this.diagram,y=ai.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ko.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ko.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(ah(this,ne,b,E,te,!0)||ah(this,ne,b,E,te,!1))){var se=y.points.copy();ah(this,ne,b,E,te,!0)?(se.cd(x-2,new lt(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new lt(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new lt((te.x+ne.x)/2,ne.y)),se.cd(x+1,new lt((te.x+ne.x)/2,te.y))),se.mb(x),se.mb(x-1),y.points=se,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(ah(this,b,E,te,ne,!0)||ah(this,b,E,te,ne,!1))&&(se=y.points.copy(),ah(this,b,E,te,ne,!0)?(se.cd(x-1,new lt(b.x,(b.y+ne.y)/2)),se.cd(x+2,new lt(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new lt((b.x+ne.x)/2,b.y)),se.cd(x+2,new lt((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=lt.alloc(),Gt.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),lt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ah(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}ko.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===lh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===sh&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===lh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===sh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);Gt.B(te.x,E.x)&&Gt.B(E.y,ne.y)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Gt.B(te.y,E.y)&&Gt.B(E.x,ne.x)?(Gt.B(te.y,y.i(b-2).y)&&!Gt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.x,E.x)&&Gt.B(E.x,ne.x)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.y,E.y)&&Gt.B(E.y,ne.y)&&(Gt.B(te.y,y.i(b-2).y)&&!Gt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(Fr,lt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,lt.alloc()),y.L(0,b.x,b.y),lt.free(te),lt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(Fr,lt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,lt.alloc()),y.L(y.pointsCount-1,a.x,a.y),lt.free(x),lt.free(a));y.zf()},ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case td:return a;case lh:return new lt(y.i(x).x,a.y);case sh:return new lt(a.x,y.i(x).y);default:case lp:return y.i(x)}},vn.Object.defineProperties(ko.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof di))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),ko.prototype.setReshapingBehavior=ko.prototype.om,ko.prototype.getReshapingBehavior=ko.prototype.Ru;var lp=new Yt(ko,"None",0),sh=new Yt(ko,"Horizontal",1),lh=new Yt(ko,"Vertical",2),td=new Yt(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,mn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ba(){ai.call(this),this.name="Resizing",this.o=new ln(1,1).freeze(),this.j=new ln(9999,9999).freeze(),this.yg=new ln(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Dr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=ri,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new lt,this.Dw=new ln,this.Tn=new lt,this.rt=new ln(0,0),this.qt=new ln(1/0,1/0),this.pt=new ln(1,1)}en(ba,ai),ba.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Mn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),ic(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ba.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new di,y.type=Pn.Spot,y.locationSpot=Fr;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Xr)),y.add(this.makeHandle(a,Ei)),y.add(this.makeHandle(a,Ni)),y.add(this.makeHandle(a,zo)),y.add(this.makeHandle(a,Ca)),y.add(this.makeHandle(a,aa)),y.add(this.makeHandle(a,ga)),y.add(this.makeHandle(a,Oa))}else if(dl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ba.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ba.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=Fr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Pn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ba.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},ba.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))},ba.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ba.prototype.stopTransaction=function(){var a=this.diagram,y=ai.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ba.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ba.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),lt.free(E)}},ba.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),lt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ba.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 Tr){var b=new pn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;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()}},ba.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Fr);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,pe=ne.x+ne.width,ye=ne.y+ne.height,Te=1;if(!te){Te=ne.width;var Ge=ne.height;0>=Te&&(Te=1),0>=Ge&&(Ge=1),Te=Ge/Te}return Ge=lt.alloc(),Gt.No(a.x,a.y,se,he,E.width,E.height,Ge),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.y=Math.max(Ge.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width)):(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=pe-a.x,te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.y=Math.max(Ge.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width))):(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):0>=y.y?(a.y=Math.max(Ge.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,te||(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))),lt.free(Ge),a},ba.prototype.computeReshape=function(){var a=fn;return this.adornedObject instanceof Dr&&(a=Ev(this.adornedObject)),!(a===rr||this.diagram.lastInput.shift)},ba.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},ba.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},ba.prototype.computeCellSize=function(){var a=new ln(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},vn.Object.defineProperties(ba.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 di))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 di)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}}}),ba.className="ResizingTool",mn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Va(){ai.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new lt,this.ue=null;var a=new Dr;a.figure="Ellipse",a.desiredSize=Er,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new lt(NaN,NaN),this.u=0,this.F=50}en(Va,ai),Va.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},Va.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new di,y.type=Pn.Position,y.locationSpot=Fr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(dl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Va.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Va.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},Va.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(Fr)},Va.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Va.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new lt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Va.prototype.stopTransaction=function(){var a=this.diagram,y=ai.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Va.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Va.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Va.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Va.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Va.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},vn.Object.defineProperties(Va.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof di))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 di)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Va.className="RotatingTool",mn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){ai.call(this),this.name="ClickSelecting"}en(Uh,ai),Uh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Uh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Uh.className="ClickSelectingTool";function ll(){ai.call(this),this.name="Action",this.pk=null}en(ll,ai),ll.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},ll.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()},ll.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))}},ll.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()},ll.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())},ll.prototype.doStop=function(){this.pk=null},ll.className="ActionTool";function uh(){ai.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new lt(0,0)}en(uh,ai),uh.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},uh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},uh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof hr)x.Zc()&&(dl(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Jt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=lt.allocAt(a.x,a.y);this.isGridSnapEnabled&&dd(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),lt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},vn.Object.defineProperties(uh.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),uh.className="ClickCreatingTool";function Ks(){ai.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new hr;a.layerName="Tool",a.selectable=!1;var y=new Dr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}en(Ks,ai),Ks.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},Ks.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ks.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ks.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=ln.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),ln.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ks.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},Ks.prototype.computeBoxBounds=function(){var a=this.diagram;return new Xt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ks.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),pi?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 pn,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)}},vn.Object.defineProperties(Ks.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),Ks.className="DragSelectingTool";function va(){ai.call(this),this.name="Panning",this.Xt=new lt,this.xy=new lt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(an.document,"scroll",a.Kw,!1),a.stopTool()}}en(va,ai),va.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())},va.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(an.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},va.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},va.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},va.prototype.doMouseMove=function(){this.move()},va.prototype.doMouseUp=function(){this.move(),this.stopTool()},va.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)}},vn.Object.defineProperties(va.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),va.className="PanningTool",mn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),mn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),mn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),mn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),mn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ql(){this.F=this.u=this.j=this.o=null}vn.Object.defineProperties(Ql.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}}}),Ql.className="HTMLInfo";function ul(a,y,x){this.text=a,this.hx=y,this.visible=x}ul.className="ContextMenuButtonInfo";function Za(){ai.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new lt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}en(Za,ai);function xl(a){var y=new Ql;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Wh=y,a.tu=function(){a.stopTool()},y=Xn("div");var x=Xn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Xn("style");an.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",To,!1),b.addEventListener(y,"selectstart",To,!1),b.addEventListener(x,"contextmenu",To,!1)),y.className="goCXforeground",x.className="goCXbackground",an.document.body&&(an.document.body.appendChild(y),an.document.body.appendChild(x)),cf=y,Mc=x,hf=!0}function To(a){return a.preventDefault(),!1}Za.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)},Za.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Za.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Za.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Vt||(a instanceof zt?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},Za.prototype.doActivate=function(){},Za.prototype.doMouseDown=function(){if(ai.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Dl(this)},Za.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Dl(this)};function Dl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ql||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Iu(a,!0),a.isActive||a.stopTool())}Za.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Iu(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=Wh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof zt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof di&&!a.currentContextMenu.visible&&a.stopTool()}}Za.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Za.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof di){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 Ql&&a.show(y,x,this);this.currentContextMenu=a},Za.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}},Za.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof di?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ql&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function hh(a){var y=new pn;return y.add(new ul("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ul("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ul("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ul("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ul("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ul("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ul("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ul("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ul("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ul("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ul("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ul("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ul("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Za.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Mc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Xn("ul");x.className="goCXul",cf.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=Xn("li"),te.className="goCXli";var ne=Xn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}cf.style.display="block",Mc.style.display="block"},Za.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Wh){cf.style.display="none",Mc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Mc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},vn.Object.defineProperties(Za.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof di?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Wh===null&&po&&xl(this),Wh},set:function(a){a===null&&(hf=!0),Wh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Wh=null,hf=!1,Mc=null,cf=null;Za.className="ContextMenuTool",mn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function qi(){ai.call(this),this.name="TextEditing",this.Zh=new Zi,this.ia=null,this.V=Lc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new Ql,this.kt=null,ff(this,this.j)}en(qi,ai);function ff(a,y){if(po){var x=Xn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Zi&&te instanceof qi)if(te.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Fr),se=E.position,he=E.scale,pe=b.Df()*he;pe<te.minimumEditorScale&&(pe=te.minimumEditorScale);var ye=b.naturalBounds.width*pe+6,Te=b.naturalBounds.height*pe+2,Ge=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*pe,Te=se.y*Te-se.y*he+se.offsetY-(.5*Te-.5*he)-he/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*pe+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(Ge-ye/2|0)-1+"px",x.style.top=(ne+Te|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=pe,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}qi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(ql),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Zi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Lc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},qi.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},qi.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Zi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Xt(this.textBlock.ga(Xr),this.textBlock.ga(Ni));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},qi.prototype.doCancel=function(){this.stopTool()},qi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},qi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ql)},qi.prototype.acceptText=function(a){switch(a){case ql:this.qa===Ac?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this));break;case nd:case df:case rd:(df!==a||this.textBlock.isMultiline!==!0)&&(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this))}};function up(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Ac,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=mf,a.doError(E,te))}}qi.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},qi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},qi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},qi.prototype.doStop=function(){ch=null},qi.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},qi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},vn.Object.defineProperties(qi.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),qi.prototype.measureTemporaryTextBlock=qi.prototype.Lx;var nd=new Yt(qi,"LostFocus",0),ql=new Yt(qi,"MouseDown",1),rd=new Yt(qi,"Tab",2),df=new Yt(qi,"Enter",3),ev=new Yt(qi,"SingleClick",0),Lc=new Yt(qi,"SingleClickSelected",1),id=new Yt(qi,"DoubleClick",2),Nc=new Yt(qi,"StateNone",0),pf=new Yt(qi,"StateActive",1),gf=new Yt(qi,"StateEditing",2),hp=new Yt(qi,"StateValidating",3),mf=new Yt(qi,"StateInvalid",4),Ac=new Yt(qi,"StateValidated",5),ch=null;qi.className="TextEditingTool",qi.LostFocus=nd,qi.MouseDown=ql,qi.Tab=rd,qi.Enter=df,qi.SingleClick=ev,qi.SingleClickSelected=Lc,qi.DoubleClick=id,qi.StateNone=Nc,qi.StateActive=pf,qi.StateEditing=gf,qi.StateValidating=hp,qi.StateInvalid=mf,qi.StateValidated=Ac,mn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Es(a){yf||(cp(),yf=!0),this.H=gu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=_u,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new yn,this.ce=new ya,this.ce.Yd=this,this.Ei=new yn,this.pu=new yn,this.Sr=new yn,this.pr=new yn,a&&Object.assign(this,a)}Es.prototype.Xe=function(a){this.H=a},Es.prototype.canStart=function(){return!0};function pu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Sa(a.H),a.zb=!0)}function od(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===_u?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===fp&&y.vc.clear(),a.Qw=!!(a.Pk===Sf&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),xf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ba&&b!==null&&(delete b.start.scale,delete b.end.scale),an.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&os(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Zs(x,!0),Hh(a),x.R("AnimationStarting",a)))}))}}function Ru(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||Ru(a)||y instanceof Mn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}et=Es.prototype,et.fv=function(a){return this.ce.fv(a)},et.Xu=function(a){return this.ce.Xu(a)};function sd(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var se=!0;else{for(se=ne.vc.iterator;se.next();){var he=se.key;if(he instanceof zt&&he.diagram!==null||he instanceof Vt){se=!0;break e}}se=!1}se?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Zs(E.H),Hh(E)),an.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),an.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Hh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}et.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),xf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xf(y,this.H)},et.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))},et.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),gs(this,a))},et.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),dh(this.ce,y,"position",y.position,y.position),gs(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||Ru(a)||(a.H.pi||(y=x.copy()),dh(a.ce,a.H,"position",y,x))}function ld(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function gs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],se=a[2];a=a[3];var he=y[0],pe=y[1],ye=y[2];return y=y[3],se===0||se===100?(te=he,ne=pe):(ye===0||ye===100)&&(he=te,pe=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,pe-ne,b),se=E(x,se,ye-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function cp(){function a(x,b,E,te,ne,se){x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new Zt;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("location",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!0):x.location=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:placeholder",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,pe=E.actualBounds;E=pe.x+pe.width/2-he.width/2,he=pe.y+pe.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new lt(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se))}),y.add("desiredSize",function(x,b,E,te,ne,se){x.desiredSize=new Xt(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=Kh(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=Kh(b,E,ne,se,te)}),y.add("strokeWidth",function(x,b,E,te,ne,se){x.strokeWidth=te(ne,b,E-b,se)}),y.add("strokeDashOffset",function(x,b,E,te,ne,se){x.strokeDashOffset=te(ne,b,E-b,se)}),y.add("background",function(x,b,E,te,ne,se){x.background=Kh(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=Kh(b,E,ne,se,te)}),y.add("opacity",function(x,b,E,te,ne,se){x.opacity=te(ne,b,E-b,se)}),y.add("scale",function(x,b,E,te,ne,se){x.scale=te(ne,b,E-b,se)}),y.add("angle",function(x,b,E,te,ne,se){x.angle=te(ne,b,E-b,se)}),vf=y}vn.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&&jn(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 vf=null,yf=!1,_u=new Yt(Es,"Default",1),Sf=new Yt(Es,"AnimateLocations",2),fp=new Yt(Es,"None",3);Es.className="AnimationManager",Es.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},Es.Default=_u,Es.AnimateLocations=Sf,Es.None=fp;function ya(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=jc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=On,this.vc=new Zt,this.Tt=new Zt,this.yl=new yn,this.Ut=new yn,this.dw=mh,a&&Object.assign(this,a)}ya.prototype.suspend=function(){this.Xk=!0},ya.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,wf(this,!0),fh(this.Yd),Zs(this.H),Hh(this.Yd),this.H.redraw()};function xf(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}et=ya.prototype,et.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 Vt?a=x:x instanceof zt&&(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===_u&&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),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Hh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},et.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},et.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Vt?this.H=a:a instanceof zt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof hr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,te){var ne=a.vc;if(y instanceof Vt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Wu(b),sv(),b=[zs.j,zs.u,zs.o,zs.F],Wu(E),sv(),E=[zs.j,zs.u,zs.o,zs.F]),ne.contains(y)){var se=ne.I(y),he=se.start,pe=se.end;he[x]===void 0&&(he[x]=Vh(b)),pe[x]=Vh(E)}else he={},pe={},he[x]=Vh(b),pe[x]=Vh(E),se=he.position,y instanceof zt&&se instanceof lt&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(pe.position),se=new Zh(he,pe,te),ne.add(y,se);ne=he[x],ne instanceof lt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof hr?se.Ku.location=Vh(y.location):te&&(se.Ku[x]=Vh(b))}function Vh(a){return a instanceof lt||a instanceof ln?a.copy():a}et.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},et.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function wf(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),fh(x),dp(a,E),Zs(a.H,!0),Hh(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function dp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof zt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=vf,pe;for(pe in ne)pe==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(pe)===null||he.get(pe)(te,se[pe],ne[pe],a.Lp,y,x,a)}}}et.stop=function(){return this.bc?(this.Ml(!0),this):this},et.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,fh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=vf;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,pe=E?se.start:se.end,ye=se.Ku,Te;for(Te in pe)if(te.get(Te)!==null){var Ge=Te;!se.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,he[Te],ye[Te]!==void 0?ye[Te]:se.Hu?he[Te]:pe[Te],this.Lp,this.Gd,this.Gd,this)}se.Hu&&ye.location!==void 0&&ne instanceof hr&&(ne.location=ye.location),se.nv&&ne instanceof hr&&ne.Zb(!1)}if(y.As.clear(),Pf(y,!1),y.Ya(),y.N(),Zs(y,!0),x.defaultAnimation===this){for(Te=x.pr.iterator;Te.next();)E=Te.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Zs(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Hh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xf(this,null),x.Ml(this),y.$b())}},et.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Tr&&(b=y.placeholder),b!==null?(x=b.ga(Xr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new lt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Tr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Cj(b,y)},et.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Tr&&(x=y.placeholder),x!==null){var b=x.ga(Xr);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 Tr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Aj(b,y)}},et.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},vn.Object.defineProperties(ya.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&jn(a,">= 1",ya,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:jt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),ya.prototype.getTemporaryState=ya.prototype.Ez,ya.prototype.stop=ya.prototype.stop,ya.prototype.add=ya.prototype.add,ya.prototype.addTemporaryPart=ya.prototype.Iy;function jc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}ya.className="Animation",ya.EaseLinear=function(a,y,x,b){return x*a/b+y},ya.EaseInOutQuad=jc,ya.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ya.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ya.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ya.EaseOutExpo=Wg;function Zh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zh.className="AnimationState";function wl(a,y,x){this.xd=null,this.rf=a,this.so=x||pp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xh))}wl.prototype.copy=function(){var a=new wl(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))}vn.Object.defineProperties(wl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var pp=new Yt(wl,"Default",1),Xh=new Yt(wl,"Immediate",2),Oc=new Yt(wl,"Bundled",3);wl.className="AnimationTrigger",wl.Default=pp,wl.Immediate=Xh,wl.Bundled=Oc;function ra(a){Sr(this),this.H=null,this.Pa=new pn,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)}et=ra.prototype,et.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,La(x)}a.clear(),this.Zq.length=0},et.Xe=function(a){this.H=a},et.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,te=0,ne=0,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof Tr?E++:he instanceof Gn?b++:he instanceof Mn?te++:he instanceof di?ne++:x++}if(se="",0<x&&(se+=x+" Parts "),0<b&&(se+=b+" Nodes "),0<E&&(se+=E+" Groups "),0<te&&(se+=te+" Links "),0<ne&&(se+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,se+=`
`+x.toString(),b=x.data,b!==null&&Jr(b)&&(se+=" #"+Jr(b)),x instanceof Gn?se+=" "+Ar(b):x instanceof Mn&&(se+=" "+Ar(x.fromNode)+" "+Ar(x.toNode));return y+" "+this.Pa.count+": "+se},et.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=lt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||ic(se)!==!1)&&se.isVisible()&&(E.assign(a),Ln(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return lt.free(E),se}return lt.free(E),null},et.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof pn||b instanceof yn||(b=new yn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=lt.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||ic(he)!==!1)&&he.isVisible()){te.assign(a),Ln(te,he.oe);var pe=he;he.ji(te,y,x,b)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe))}}return lt.free(te),b},et.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 pn||E instanceof yn||(E=new yn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((te!==!0||ic(he)!==!1)&&he.isVisible()){var pe=he;he.Cf(a,y,x,b,E)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||E.add(pe))}}return E},et.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var pe=se[he];if((ne!==!0||ic(pe)!==!1)&&te(pe)&&pe.isVisible()){var ye=pe;pe.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},et.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=lt.alloc(),he=lt.alloc(),pe=this.Pa.s,ye=pe.length;ye--;){var Te=pe[ye];if((ne!==!0||ic(Te)!==!1)&&Te.isVisible()){se.assign(a),Ln(se,Te.oe),he.h(a.x+y,a.y),Ln(he,Te.oe);var Ge=Te;Te.og(se,he,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return lt.free(se),lt.free(he),te},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Bn();for(var E=Bn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Mn){if(ne.fd===!1)continue}else if(ne instanceof di&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Fi(se,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Bv(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++)Bv(E[y]);Un(a),Un(E)}}};function zu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}et.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=zu(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=Xt.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(Xt.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=zu(a,y),se=a.Zq;se.length=0;for(var he=x.scale,pe=Xt.alloc(),ye=0;ye<te;ye++){var Te=E[ye];b.contains(Te)&&a.Oj(y,Te,x,se,he,pe,!1)}Xt.free(pe),y.globalAlpha=ne}}}et.Oj=function(a,y,x,b,E,te,ne){if(ne&&!ic(y))a.Hs(y);else{if(b!==null&&y instanceof Mn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var se=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(se)){a.Hs(y);return}b=!te.Re(se)}b&&(a.save(),a instanceof ks?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(mo(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(mo(y,a,"rgba(0,0,0,0.3)",!0,!1,te,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),mo(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.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))}},et.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(no,a,this,y,x,b,E)},et.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&La(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),ud(this,a,y),a},et.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,La(y),a};function ud(a,y,x){if(y=Vg(a,y,x),x instanceof Tr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];if(se===x&&(y=ne,0<=b)||0>b&&se.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&ud(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var se=y+1,he=NaN;se<E&&(he=a.M(se).zOrder,!!isNaN(he));)se++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(he)&&he<b)for(;;){if(se===E||he>=b){if(se--,se===y)break;return a.mb(y),a.Gb(se,x),se}for(he=NaN;++se<E&&(he=a.M(se).zOrder,isNaN(he)););}return y}vn.Object.defineProperties(ra.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&jt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&jt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&jn(a,"0 <= value <= 1",ra,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Vt(a,y){if(am||(Ta(),am=!0),Sr(this),gu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,po){var x=this,b=function(){x.removeEventListener(an.document,"DOMContentLoaded",b,!1),x.setRTL()};an.document.body!==null?this.setRTL():x.addEventListener(an.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Ti);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var se=te.change;te.modelChange===""&&se===no&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new sm,a!==void 0&&(typeof a=="string"||an.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,gu;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 pn,a.pj=new Zt,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new lt(NaN,NaN).freeze(),a.du=new lt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new lt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new xr,a.zu=new lt(NaN,NaN).freeze(),a.ut=new Xt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ir(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Zo,a.Fg=Ba,a.pq=Zo,a.yt=Xr,a.Bt=Xr,a.Fc=!0,a.pn=!1,a.De=new yn,a.Eh=new Zt,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ir(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ma,a.bq.diagram=a,a.Qg=new ma,a.Qg.diagram=a,a.cj=new ma,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new yn,a.Ht=!0,a.uu=vh,a.pw=!1,a.wu=Tf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Zt,a.Xn=new pn,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 Ir(5).freeze(),a.Hw=new yn().freeze(),a.Nt=999999999,a.nw=new yn().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 yn,a.ow=new yn,a.Xh=null,a.aw=new ln(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new lt,bounds:new Xt,Py:new ln,bA:new ln,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Xt(NaN,NaN,NaN,NaN).freeze(),a.wo=new ln(NaN,NaN).freeze(),a.Sp=new Xt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Zt;var y=new Gn,x=new Zi;x.bind(new Mo("text","",Ar)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Gn,x=new Zi,x.stroke="brown",x.bind(new Mo("text","",Ar)),y.add(x),a.Lg.add("Comment",y),y=new Gn,y.selectable=!1,y.avoidable=!1,x=new Dr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new ln(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Zt,y=new Tr,y.selectionObjectName="GROUPPANEL",y.type=Pn.Vertical,x=new Zi,x.font="bold 12pt sans-serif",x.bind(new Mo("text","",Ar)),y.add(x),x=new Pn(Pn.Auto),x.name="GROUPPANEL";var b=new Dr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ja,b.padding=new Ir(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Zt,y=new Mn,x=new Dr,x.isPanelMain=!0,y.add(x),x=new Dr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Mn,x=new Dr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new di,y.type=Pn.Auto,x=new Dr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new Ir(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new di,y.type=Pn.Link,x=new Dr,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 Ti,a.toolManager=new Qi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ce,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=Kn,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new lt,a.zy=500,a.wp=new lt,a.wq=!1}Vt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new yn().freeze(),a.nw=new yn().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 te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var se=a.Wa.s[y].parts;se.next();){var he=se.value;he!==E&&he.data===null&&te.push(he)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Od(),a.Og.clear(),zi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Xg(){return null}Vt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),tu(this),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Vt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=an.document.body);var y=Xn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},Vt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=an.document.body);var y=0;if(po){var x=om;y=Yh,x===null&&(x=om=Xn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=Xn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||pi||(y=11)}this.Db=y,this.Gw=!0},Vt.prototype.qb=function(a){a.classType===Vt&&(this.autoScale=a)},Vt.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
`+x.value.toString(a-1);return y};function mp(a,y){if(po){if(y!=null||jt("Diagram setup requires an argument DIV."),a.Ka!==null&&jt("Diagram has already completed setup."),typeof y=="string"?a.Ka=an.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:jt("No DIV or DIV id supplied: "+y),a.Ka===null&&jt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&jt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&an.ResizeObserver){var x=gr(function(){a.$b()},250);a.ol=new an.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}an.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=an.go;var E=new fl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",an.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new fl(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,po){E=Xn("div");var te=Xn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=Jg,E.addEventListener("pointerdown",Qg),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=gr(function(){a.Yh=null,a.N()},300),a.Ov=gr(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Vs(a,ne,!0);se.bubbles=!0;var he=0,pe=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(pe=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-pe):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(pe=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-pe):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Pl(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Vs(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var pe=he;he=wp(a,ne,!0,!1,!0,pe),Dc(a,ne,he),he.targetDiagram=xp(ne,ne.target),he.targetObject=null,pe||he.clone(a.bq),pe=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(pe.x-ne.screenX)>se||Math.abs(pe.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():Pl(he,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.oj;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType){if(se[1]!==null&&se[1].pointerId===ne.pointerId){se[1]=ne;return}if(se[0]===null)se[0]=ne;else return}else se[0]=ne;if(se[0].pointerId===ne.pointerId){se=wp(a,ne,!1,!1,!1,se[1]!==null);var he=an.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var pe=a,ye=ne;he&&he.H&&(ye=ne,pe=he.H),se.targetDiagram=pe,Dc(a,ye,se),se.targetObject=null,a.doMouseMove(),Pl(se,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var se=ne.pointerType==="touch"||ne.pointerType==="pen",he=a.Yt;if(se&&a.qu)delete he[ne.pointerId],ne.preventDefault();else if(he=a.oj,he[0]===null||he[0].pointerId!==ne.pointerId&&he[0].pointerType===ne.pointerType)he[1]!==null&&he[1].pointerId===ne.pointerId&&(he[1]=null);else{he[0]=null,he=wp(a,ne,!1,!0,!0,!1);var pe=an.document.elementFromPoint(ne.clientX,ne.clientY)||null;pe!==null&&pe.shadowRoot!==void 0&&pe.shadowRoot!==null&&(pe=pe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),pe!==null&&pe.H instanceof Vt&&pe.H!==a&&Dc(pe.H,ne,he),pe===null&&(pe=ne.target),Dc(a,ne,he),he.clickCount=a.yq,he.targetDiagram=xp(ne,pe),he.targetObject=null,a.doMouseUp(),Pl(he,ne),se&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var se=a.Yt;se[ne.pointerId]&&delete se[ne.pointerId],se=a.oj,se[0]!==null&&se[0].pointerId===ne.pointerId&&(se[0]=null),se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var se=a.oj;se[0]!==null&&se[0].pointerId===ne.pointerId?(se[0]=null,a.wq=!1):se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null)},a.Vp=b.Z["d"+Nf[1]+Nf[2]+"wI"+Uc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Lf,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Vt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Vt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(an,"resize",a.Ov,!1)}function os(a){30<a.Sq&&(a.Yh=1)}function Pf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),vi&&vi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Vt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:an.devicePixelRatio||1},Vt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Vt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Vt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Vt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Vt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Vt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Vt.prototype.doFocus=function(){this.focus()},Vt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=an.scrollX||an.pageXOffset,y=an.scrollY||an.pageYOffset;this.ta.focus(),an.scrollTo(a,y)}},Vt.prototype.Oy=function(){this.H.R("GainedFocus")},Vt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function $g(a){var y=new Pn(Pn.Grid);y.name="GRID";var x=new Dr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Dr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Dr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Dr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new hr,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 Jg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rc(this.H)}function Qg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rc(this.H)}Vt.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,te=this.rj,ne=b.x-te.left,se=b.y-te.top,he=b.width+te.left+te.right,pe=b.height+te.top+te.bottom,ye=b.right+te.right;te=b.bottom+te.bottom;var Te=E.x;b=E.y;var Ge=E.width,Xe=E.height,Je=E.right,it=E.bottom;E=this.scale;var Mt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Mt=Mt+a.scrollWidth-a.clientWidth;break;case"reverse":Mt=a.scrollWidth-Mt-a.clientWidth}var bt=Mt;Ge<he||Xe<pe?(Mt=lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==bt&&(Mt.x=bt/E+ne,this.ju=bt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Mt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Mt,lt.free(Mt),this.Ee=this.qr=!1):(Mt=lt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Te&&(this.position=Mt.h(bt+ne,this.position.y)),ye>Je&&(this.position=Mt.h(-(y.scrollWidth-this.Aa)+bt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Mt.h(this.position.x,a.scrollTop+se)),te>it&&(this.position=Mt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),lt.free(Mt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,Je=E.right,te=b.bottom,it=E.bottom,ne=b.x,Te=E.x,se=b.y,b=E.y,Ge>=he&&ne>=Te&&ye<=Je&&(x.style.width="1px"),Xe>=pe&&se>=b&&te<=it&&(x.style.height="1px"))}},Vt.prototype.computeBounds=function(a){return a===void 0&&(a=new Xt),Sa(this),yp(this,a)};function yp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var se=ne.length,he=0;he<se;he++){var pe=ne[he];pe.isInDocumentBounds&&pe.isVisible()&&(pe=pe.actualBounds,pe.w()&&(x?(x=!1,y.assign(pe)):y.ed(pe)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Vt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(_n(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Mn||(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 Mn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Xt(NaN,NaN,0,0):x};function hl(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=lt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Xt.allocAt(0,0,b.width,b.height);var E=lt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Xt.free(b),lt.free(E),lt.free(x)}x=a.yh,y&&a.Fg!==Ba&&(x=a.Fg);var te=x!==Ba?Fc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,se=a.zk,he=a.pq;y&&!se.sb()&&(he.sb()||he.Xb())&&(se=he.Xb()?Fr:he),Sp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Gt.B(te.x,x)&&Gt.B(te.y,b)&&Gt.B(te.width,E)&&Gt.B(te.height,ne)||a.onViewportBoundsChanged(new Xt(x,b,E,ne),te,y,!1)}}function Fc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),se=te/E,he=ne/b;return y===Is?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===tc?(y=he>se?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Vt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Is),a!==mh&&(hl(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},et=Vt.prototype,et.BA=function(a,y){y===void 0&&(y=Is);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Is||y===tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===tc?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new lt(a.x,a.y)}},et.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new lt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},et.zz=function(a){if(a instanceof zt){this.eq=a;var y=lt.alloc();this.fq=this.op(a.ga(Xr,y)),lt.free(y)}else this.eq=null,this.fq=Kn};function Sp(a,y,x,b,E,te){var ne=lt.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var pe=lt.alloc();pe=a.eq.ga(Xr,pe),se=pe.x-a.fq.x/a.scale,he=pe.y-a.fq.y/a.scale,E=Or,lt.free(pe)}(te||a.scrollMode===mh)&&(E.sb()&&(x>y.width&&(se=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(he=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(se=Math.min(se+x/2,y.right+Math.max(te,E.right)-x/2),se=Math.max(se,y.left-Math.max(te,E.left)+x/2),se-=x/2):se>y.left?se=y.left:se<y.right-x&&(se=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(he=Math.min(he+b/2,y.bottom+Math.max(x,E.bottom)-b/2),he=Math.max(he,y.top-Math.max(x,E.top)+b/2),he-=b/2):he>y.top?he=y.top:he<y.bottom-b&&(he=y.bottom-b)),ne.x=isFinite(se)?se:-a.yb.left,ne.y=isFinite(he)?he:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),Ug(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),tu(a),lt.free(ne)}et.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=mu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof hr)return a}else if(a=mu(this,a,function(x){return x.part}),a instanceof hr)return a;return null},et.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Sa(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 mu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Sa(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}et.lz=function(a,y,x){return y===void 0&&(y=!0),bf(this,a,function(b){return b.part},y?function(b){return b instanceof hr&&b.canSelect()}:null,x)};function bf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof pn||E instanceof yn||(E=new yn),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}et.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof pn||b instanceof yn||(b=new yn),Sa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},et.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),hd(this,a,function(E){return E instanceof hr&&(!x||E.canSelect())},y,b)},et.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof pn||E instanceof yn||(E=new yn),Sa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},et.Nu=function(a,y,x,b,E,te){var ne=new yn;Sa(this);for(var se=this.Wa.iteratorBackwards;se.next();){var he=se.value;he.visible&&he.Nu(a,y,x,b,ne,E,te)}return ne};function hd(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof pn||E instanceof yn||(E=new yn),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}et.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Cf(this,a,y,function(te){return te instanceof hr&&(!b||te.canSelect())},x,E)},et.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),Sa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var se=ne.value;se.visible&&se.og(a,y,x,b,E,te)}return te};function Cf(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var se=a.value;se.visible&&!se.isTemporary&&se.og(y,x,ne,b,E,te)}return te}Vt.prototype.acceptEvent=function(a){return Vs(this,a,a instanceof MouseEvent)};function Vs(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Dc(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),pi&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=xp(y,y.target),b.targetObject=null,b}function xp(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function wp(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,pi&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function Pl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Vt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Vs(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(),Pl(x,a)},Vt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(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(),Pl(x,a)},Vt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Pl(x,a)},Vt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Pl(x,a)},Vt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new lt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Ln(new lt(y,a),this.Ab):new lt(y,a)};function Dc(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,se=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,se=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,se),a.Ab!==null?(y=lt.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),lt.free(y)):x.documentPoint.h(ne,se)}function Pp(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))}}Vt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Sa(a),a.Va()}Vt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=Vt.prototype,et.Pz=function(){return this.kg},et.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Zs(this),this.hf=!1,this.du=new lt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Zr(function(){b.ld=!1,pu(y,"Model"),a(b)},1)},et.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;an.requestAnimationFrame(function(){y.kg&&y.bd()})}},et.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Zs(this))};function $h(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rc(a)||(y&&Sa(a),x&&hl(a,!1))}function Zs(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,te=E.length,ne=0;ne<te;ne++){var se=E[ne];Bo(se,!1),se.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(he){he.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||vp(a),$h(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(eu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Sa(a),te=!1,(!a.hf||a.xh)&&(a.hf?jp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),jp(a,!1)),te=!0),a.Jk=!1,Sa(a),a.ou||qg(a),$h(a,!0,!1),ne=!1,te?(x=Xt.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,bp(a)),a.R("LayoutCompleted"),$h(a,!0,!1),Xt.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ba?a.scale=Fc(a,a.Fg):a.yh!==Ba?a.scale=Fc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),hl(a,!0)),te&&ne&&a.eb("Initial Layout"),Sa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function bp(a){if(a.Fg!==Ba)a.scale=Fc(a,a.Fg);else if(a.yh!==Ba)a.scale=Fc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}hl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),eu(a)}function Sa(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 yn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Tr&&b.U&65536&&(b.U=b.U^65536)})}}et.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Tr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Tr&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof Mn&&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 di&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=Bn(),b=Bn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Tr?(_s(te)||Ya(te)||rc(te))&&Ef(a,te):te instanceof Mn?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(Un(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();Un(b)}et.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},et.gc=function(a){if(this.Ka!==null){if(this.ta===null&&jt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ic(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,se=this.Ab;for(se.reset(),E!==1&&se.scale(E),y.x===0&&y.y===0||se.translate(-te,-ne),a.ti=null,Yy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Wc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(xr.prototype.Cd=xr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,Ic(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,se=this.pa;var he=this.Ca,pe=Math.round(se.x*he)/he,ye=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-pe,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),se=0;se<E;se++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[se].gc(a,this);if(y=!1,this.Yf?Wc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(xr.prototype.Cd=xr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=vi&&vi.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function cd(a,y,x,b,E,te,ne,se,he,pe){if(a.Ka!==null){a.ta===null&&jt("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),pe===void 0&&(pe=!1),Ic(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Te=a.Wa.s,Ge=Te.length;try{var Xe=new Xt(te.x,te.y,b.width/E,b.height/E),Je=Xe.copy();Je.Co(x),eu(a,Je),Sa(a),a.Fd(Te,Ge,a,Xe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),se!==null&&se!==""&&(y.fillStyle=se,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var Mt=xr.alloc();Mt.reset(),Mt.translate(x.left,x.top),Mt.scale(E),te.x===0&&te.y===0||Mt.translate(-te.x,-te.y),y.setTransform(Mt.m11,Mt.m12,Mt.m21,Mt.m22,Mt.dx,Mt.dy),y.yc(),y instanceof ks&&Yy(y,Mt.m11,Mt.m12,Mt.m21,Mt.m22,Mt.dx,Mt.dy),xr.free(Mt),ph(a,y),y.globalAlpha=a.pb;var bt=a.Qj("Grid");if(ne){var At=new yn,Ft=ne.iterator;for(Ft.reset();Ft.next();){var Bt=Ft.value;Bt instanceof hr&&(pe||Bt.layer!==bt)&&(Bt.Gj(),At.add(Bt))}for(pe=0;pe<Ge;pe++)Kg(Te[pe],y,a,At,he);At.each(function(Kt){return Kt.Gj()})}else for(At=0;At<Ge;At++){var _t=Te[At];_t===bt?pe&&_t.gc(y,a,!0):_t.gc(y,a,he)}a.$i=!1,a.Yf&&Wc(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Te,Ge,a,a.viewportBounds),eu(a),a.ib instanceof ks&&(a.ib.Nj.PA(),a.redraw())}}}et.Gf=function(a){return this.Rg[a]},et.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},et.Tx=function(){this.Rg=new nr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(pi||Vr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}et.Ql=function(a){return this.on[a]},et.sA=function(a,y){this.on[a]=y},et.Sx=function(){this.on=new nr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return this.nm(a)},et.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof Pn,b=a instanceof Vt,E;for(E in y){E===""&&jt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var se=E.indexOf(".");if(0<se){var he=E.substring(0,se);x?te=a.fb(he):(te=a[he],te==null&&(te=a.toolManager[he])),Jt(te)?ne=E.substr(se+1):jt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!sr(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&sr(a.toolManager,ne))te=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof ir&&ne==="Changed"){a.Pe(y[ne]);continue}else jt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof zt&&te.Vw(ne)}}et.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Zt,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},et.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")},Vt.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),te=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,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=Xt.alloc(),Ap(this,this.computeBounds(b)),Xt.free(b)),b=this.ta,b===null||b instanceof nu)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var pe=70*ne,ye=Math.max(te,0),Te=Math.max(y,0),Ge=Math.floor(E-ye),Xe=Math.floor(se-Te);a.drawImage(b.Oa,ye,Te,Ge,Xe,0,0,Ge,Xe),Wc(this.Yf,this)&&a.clearRect(0,0,he,pe),b=Bn(),a=Bn(),Xe=Math.abs(te),Ge=Math.abs(y);var Je=ye===0?0:E-Xe;ye=lt.allocAt(Je,0),Xe=lt.allocAt(Xe+Je,se),a.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),Ln(ye,it),Ln(Xe,it),b.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Je=Te===0?0:se-Ge,ye.h(0,Je),Xe.h(E,Ge+Je),a.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Ln(ye,it),Ln(Xe,it),b.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Wc(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,ye.h(E,se),Xe.h(he+E,pe+se),a.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Ln(ye,it),Ln(Xe,it),b.push(new Xt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y)))),lt.free(ye),lt.free(Xe),$h(this,!1,!0),this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ic(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,pe=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-pe),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),ph(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){pe=zu(ne,E),Te=ne.Zq,Te.length=0,ye=this.scale,Ge=Xt.alloc(),Xe=ne.Pa.s,it=Xe.length,Je=he.length;for(var Mt=0;Mt<it;Mt++){var bt=Xe[Mt],At=$c(bt,bt.actualBounds);e:{for(var Ft=2/ye,Bt=4/ye,_t=0;_t<Je;_t++){var Kt=he[_t];if(Kt.width!==0&&Kt.height!==0&&At.Vu(Kt.x-Ft,Kt.y-Ft,Kt.width+Bt,Kt.height+Bt)){At=!0;break e}}At=!1}At&&ne.Oj(E,bt,this,Te,ye,Ge,!0)}Xt.free(Ge),E.globalAlpha=pe}E.restore(),E.Vc(!0),this.Yf&&Wc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Un(b),Un(a),this.ld=!1}}else this.bd();x&&(os(this),this.bd(),Pf(this,!0))}else x?(os(this),this.bd(),Pf(this,!0)):this.bd()}};function Ic(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){tu(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,pe=E.clientHeight||b+se,ye=a.viewportBounds;E=ye.x;var Te=ye.y,Ge=ye.width,Xe=ye.height;if((he!==x+ne||pe!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=pe,te=a.pn=!0,tu(a)),!a.hf||!a.viewportBounds.w())return!0;var Je=a.ku,it=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Mt=a.documentBounds,bt=0,At=0,Ft=0,Bt=0,_t=ye.width,Kt=ye.height,Rn=a.rj;a.contentAlignment.sb()?(Mt.width>_t&&(bt=Rn.left,At=Rn.right),Mt.height>Kt&&(Ft=Rn.top,Bt=Rn.bottom)):(bt=Rn.left,At=Rn.right,Ft=Rn.top,Bt=Rn.bottom);var Jn=Mt.width+bt+At,Zn=Mt.height+Ft+Bt;Rn=a.scale;var Tn=Jn>he/Rn,hn=Zn>pe/Rn;if(!(te||a.gf||a.Be||Tn||hn))return!0;bt=Mt.x-bt,he=ye.x,At=Mt.right+At,pe=ye.right+ne,Ft=Mt.y-Ft;var kr=ye.y;Mt=Mt.bottom+Bt,ye=ye.bottom+se;var wr="1px";if(Bt="1px",a.scrollMode===mh&&(Tn||hn)&&(Tn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Tn=1,bt+1<he&&(Tn=Math.max((he-bt)*Rn+a.Aa,Tn)),At>pe+1&&(Tn=Math.max((At-pe)*Rn+a.Aa,Tn)),_t+ne+1<Jn&&(Tn=Math.max((Jn-_t)*Rn+a.Aa,Tn)),wr=Tn.toString()+"px"),hn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Tn=1,Ft+1<kr&&(Tn=Math.max((kr-Ft)*Rn+a.ya,Tn)),Mt>ye+1&&(Tn=Math.max((Mt-ye)*Rn+a.ya,Tn)),Kt+se+1<Zn&&(Tn=Math.max((Zn-Kt)*Rn+a.ya,Tn)),Bt=Tn.toString()+"px")),Tn=wr!=="1px",hn=Bt!=="1px",Tn&&hn||!Tn&&!hn||(hn&&(pe-=a.Db),Tn&&(ye-=a.Db),Jn<_t+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,bt+1<he&&(ne=Math.max((he-bt)*Rn+a.Aa,ne)),At>pe+1&&(ne=Math.max((At-pe)*Rn+a.Aa,ne)),_t+1<Jn&&(ne=Math.max((Jn-_t)*Rn+a.Aa,ne)),wr=ne.toString()+"px"),Tn=wr!=="1px",ne=a.ya,Tn!==a.Be&&(ne=Tn?a.ya-a.Db:a.ya+a.Db),Zn<Kt+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ft+1<kr&&(se=Math.max((kr-Ft)*Rn+ne,se)),Mt>ye+1&&(se=Math.max((Mt-ye)*Rn+ne,se)),Kt+1<Zn&&(se=Math.max((Zn-Kt)*Rn+ne,se)),Bt=se.toString()+"px"),hn=Bt!=="1px"),a.qr&&Tn===a.Be&&hn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Tn!==a.Be&&(wr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Tn,it.style.width=wr,hn!==a.gf&&(Bt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=lt.alloc(),hn?(y.style.left=a.Db+"px",a.position=se.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=se.h(a.pa.x-a.Db/a.scale,a.pa.y)),lt.free(se))),te&&tu(a),a.gf=hn,it.style.height=Bt,a.gu=!0,te&&(a.pn=!0),y=Je.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_t+1<Jn?y=(a.position.x-bt)*Rn:bt+1<he?y=Je.scrollWidth-Je.clientWidth:At>pe+1&&(y=a.position.x*Rn)),a.tn)switch(a.bu){case"negative":y=-(Je.scrollWidth-y-Je.clientWidth);break;case"reverse":y=Je.scrollWidth-y-Je.clientWidth}return Je.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Kt+1<Zn?Je.scrollTop=(a.position.y-Ft)*Rn:Ft+1<kr?Je.scrollTop=Je.scrollHeight-Je.clientHeight:Mt>ye+1&&(Je.scrollTop=a.position.y*Rn)),he=a.Aa,pe=a.ya,Je.style.width=he+(a.gf?a.Db:0)+"px",Je.style.height=pe+(a.Be?a.Db:0)+"px",x!==he||b!==pe||a.animationManager.zb?(x=Xt.allocAt(E,Te,Ge,Xe),a.onViewportBoundsChanged(x,a.viewportBounds,Rn,te),Xt.free(x),!1):!0}et=Vt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&jt("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&jt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(wo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},et.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof di||a instanceof Tr&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Ya(a)!==!0&&rc(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.remove=function(a){Ep(this,a,!0)};function Ep(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Eo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}et.Is=function(a,y){if(y===void 0&&(y=!1),_n(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 yn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},et.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Vt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new Zt;if(a!==null)if(_n(a))for(var te=0;te<a.length;te++)vu(this,E,a[te],x,b);else for(a=a.iterator;a.next();)vu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)vu(this,E,a.value,x,b);for(a=this.nodes;a.next();)vu(this,E,a.value,x,b);for(a=this.links;a.next();)vu(this,E,a.value,x,b)}Jh(this,E,y,b,x)}};function vu(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=fd(a)),x instanceof Gn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Tr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)vu(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var se=ne.fromNode,he=ne.toNode;se!==null&&y.contains(se)&&he!==null&&y.contains(he)&&vu(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)vu(a,y,x.value,b,E)}else if(x instanceof Mn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)vu(a,y,x.value,b,E);else x instanceof di||y.add(x,a.Pd(E,x,x.location))}function Jh(a,y,x,b,E){if(y!==null&&y.count!==0){var te=lt.alloc(),ne=lt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||pd(a,y);for(var se=Bn(),he=Bn(),pe=y.iterator,ye=lt.alloc();pe.next();){var Te=pe.key,Ge=pe.value;if(Te.Zc()){var Xe=kp(a,Te,y);Xe!==null?se.push(new re(Te,Ge,Xe)):(!E||Te.canMove())&&(Xe=Ge.point,te.assign(Xe),a.computeMove(Te,te.add(ne),b,ye),Te.location=ye,Ge.shifted===void 0&&(Ge.shifted=new lt),Ge.shifted.assign(ye.re(Xe)))}else pe.key instanceof Mn&&he.push(pe.sa)}for(lt.free(ye),E=se.length,pe=0;pe<E;pe++)Te=se[pe],te.assign(Te.info.point),Te.Su.shifted===void 0&&(Te.Su.shifted=new lt),Te.node.location=te.add(Te.Su.shifted);for(E=lt.alloc(),pe=lt.alloc(),Te=he.length,Ge=0;Ge<Te;Ge++){var Je=he[Ge];if(Xe=Je.key,Xe instanceof Mn)if(Xe.suspendsRouting){Xe.Tg=null,ye=Xe.fromNode;var it=Xe.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=Je.value.point,Xe.dragComputation===null)y.add(Xe,a.Pd(b,Xe,ne)),Ch(Xe,ne.x-it.x,ne.y-it.y);else{Je=lt.allocAt(0,0),(ye=Xe.i(0))&&ye.w()&&Je.assign(ye);var Mt=ye=lt.alloc().assign(Je).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Mt=lt.alloc(),dd(a,Xe,ye,Mt,b)),ye.assign(Xe.dragComputation(Xe,ye,Mt)).re(Je),y.add(Xe,a.Pd(b,Xe,ye)),Ch(Xe,ye.x-it.x,ye.y-it.y),lt.free(Je),lt.free(ye),Mt!==ye&&lt.free(Mt)}else ye!==null&&(E.assign(ye.location),Mt=y.I(ye),Mt!==null&&E.re(Mt.point)),it!==null&&(pe.assign(it.location),Mt=y.I(it),Mt!==null&&pe.re(Mt.point)),ye!==null&&it!==null?E.Xa(pe)?(ye=Je.value.point,it=te,it.assign(E),it.re(ye),y.add(Xe,a.Pd(b,Xe,E)),Ch(Xe,it.x,it.y)):(Xe.suspendsRouting=!1,Xe.bb()):(Je=Je.value.point,ye=ye!==null?E:it!==null?pe:ne,y.add(Xe,a.Pd(b,Xe,ye)),Ch(Xe,ye.x-Je.x,ye.y-Je.y))}else(Xe.fromNode===null||Xe.toNode===null)&&(ye=Je.value.point,y.add(Xe,a.Pd(b,Xe,ne)),Ch(Xe,ne.x-ye.x,ne.y-ye.y))}lt.free(te),lt.free(ne),lt.free(E),lt.free(pe),Un(se),Un(he),x||(Sa(a),Qh(a,y))}}Vt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new lt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=lt.alloc(),dd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var he=a.maxLocation,pe=he.x;return isNaN(pe)&&(pe=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,pe)),Math.max(ne,Math.min(x.y,he))),E!==y&&lt.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,se=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var he=te.gridCellSize;isNaN(a)&&(a=he.width),isNaN(y)&&(y=he.height),te=te.gridOrigin,isNaN(se)&&(se=te.x),isNaN(ne)&&(ne=te.y)}te=lt.allocAt(0,0),te.yi(0,0,a,y,E),Gt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),lt.free(te)}}function pd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Mn&&(y.suspendsRouting=!0)}function Qh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Mn&&(x.suspendsRouting=!1,Xv(x)&&x.bb())}a.Mr=!1}}function kp(a,y,x){return y=y.containingGroup,y!==null&&(a=kp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}et=Vt.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Gu(On);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Gu(new lt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Gu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&jt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&jt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&jt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&jt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&jt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}et.Al=function(a){Tp(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(wo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},et.Ww=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(wo,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},et.Cy=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(wo,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},et.kA=function(a){if(a.diagram!==this&&jt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},et.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},et.Yw=function(a){return this.pf===null&&(this.pf=new pn),this.pf.add(a),this.model.Pe(a),this},et.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},et.Pe=function(a){return this.zg===null&&(this.zg=new pn),this.zg.add(a),this},et.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},et.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new oo;se.diagram=this,se.change=a,se.propertyName=y,se.object=x,se.oldValue=b,se.oldParam=te,se.newValue=E,se.newParam=ne,this.ds(se)},et.g=function(a,y,x,b,E){this.cb(no,a,this,y,x,b,E)},Vt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===no){var E=a.object;if(ro(E,a.propertyName,a.I(y)),E instanceof zt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===wo){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Pn)if(typeof se=="number"&&he instanceof zt){y?ne.pc(se):ne.Gb(se,he);var pe=ne.part;pe!==null&&pe.Wb()}else typeof se=="number"&&he instanceof Io&&(he.isRow?c1(ne,se,y?void 0:he):f1(ne,se,y?void 0:he));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof se=="number"&&he instanceof hr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(ye?se:-1,he,ye)):ne.oi(se,he,ye))}else ne instanceof Vt?typeof se=="number"&&he instanceof ra&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):jt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Te=a.object,Ge=a.oldParam,Xe=a.oldValue;if(Te instanceof Pn)typeof Ge=="number"&&Xe instanceof zt?y?Te.Gb(Ge,Xe):Te.pc(Ge):typeof Ge=="number"&&Xe instanceof Io&&(Xe.isRow?c1(Te,Ge,y?Xe:void 0):f1(Te,Ge,y?Xe:void 0));else if(Te instanceof ra){var Je=a.newParam===!0;typeof Ge=="number"&&Xe instanceof hr&&(y?0>Te.Pa.indexOf(Xe)&&Te.oi(Ge,Xe,Je):(Xe.isSelected=!1,Xe.isHighlighted=!1,Xe.Wb(),Te.pc(Je?Ge:-1,Xe,Je)))}else Te instanceof Vt?typeof Ge=="number"&&Xe instanceof ra&&(y?(Xe.Xe(this),this.Wa.Gb(Ge,Xe)):this.Wa.mb(Ge)):jt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&jt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Vt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Vt.prototype.eb=function(a){return this.undoManager.eb(a)},Vt.prototype.Kf=function(){return this.undoManager.Kf()},Vt.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}},Vt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Vt.prototype.rp=function(){this.partManager.rp()};function Mp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,tu(a),a.N(),a.Ee=!0,b.zb&&(Ru(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,tu(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,pe=a.contentAlignment;isNaN(se)&&(pe.$c()?pe.Hf(ja)?se=0:pe.Hf(vo)&&(se=te-1):se=pe.sb()?pe.x*(te-1):te/2),isNaN(he)&&(pe.$c()?pe.Hf(Vo)?he=0:pe.Hf(fs)&&(he=ne-1):he=pe.sb()?pe.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=lt.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,lt.free(te),a.Ca=x,tu(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),hl(a,!1),b.zb&&(Ru(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Vt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Qi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),eu(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(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function eu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=ln.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var pe=ne[he],ye=Math.abs(pe.interval);2>ye||(mv(pe.figure)?te=te*ye/Gt.vx(te,ye):E=E*ye/Gt.vx(E,ye))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=Xt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Xt.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Xt.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=lt.alloc(),Gt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),ln.free(b),x.part.location=y,lt.free(y)}}Vt.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)}},Vt.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))},Vt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),_n(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof hr||jt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof hr||jt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Vt.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()}},et=Vt.prototype,et.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},et.Jz=function(a){a=new yn().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 hr||jt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},et.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=lt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),lt.free(te);return}jt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):jt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),lt.free(te)},et.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)},et.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},et.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)},et.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,pe=y.m22,ye=y.dx,Te=y.dy,Ge=x*ne+b*he+ye;y=x*se+b*pe+Te;var Xe=E*ne+b*he+ye;return a=E*se+b*pe+Te,b=x*ne+te*he+ye,x=x*se+te*pe+Te,ne=E*ne+te*he+ye,E=E*se+te*pe+Te,te=Math.min(Ge,Xe),Ge=Math.max(Ge,Xe),Xe=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ge=Math.max(Ge,b),Xe=Math.min(Xe,x),y=Math.max(y,x),te=Math.min(te,ne),Ge=Math.max(Ge,ne),Xe=Math.min(Xe,E),y=Math.max(y,E),new Xt(te,Xe,Ge-te,y-Xe)},et.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),Ln(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Lp(a){return a=xd.get(a),a!==null?new a:new Ti}Vt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(he){return he.diagram=E}),a.mouseMoveTools.each(function(he){return he.diagram=E}),a.mouseUpTools.each(function(he){return he.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Sa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||od(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(em(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;Zr(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function _c(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)qh(a,y[b])}function qh(a,y){if(y instanceof us){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof yn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Np(a,y){if(y instanceof us){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 te=0;te<E.length;te++)if(E[te]===y){E.splice(te,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 yn&&x.Bg.remove(a),Od(b));break}}}}}Vt.prototype.Wd=function(){this.partManager.Wd()},Vt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Vt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Vt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Vt.prototype.Vb=function(a){return this.partManager.Vb(a)},Vt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=Vt.prototype,et.Lc=function(a){return this.partManager.Lc(a)},et.ii=function(a){return this.partManager.ii(a)},et.Kc=function(a){return this.partManager.Kc(a)},et.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:Ai(dr(y)))},et.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:Ai(dr(y)))};function tu(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Ap(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),hl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}et.Va=function(){if(this.Zi){var a=Xt.alloc();Ap(this,this.computeBounds(a)),Xt.free(a)}},et.rz=function(){for(var a=new yn,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},et.qz=function(){return this.ai.iterator},et.Uz=function(a){Sa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Zs(this))};function gd(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function jp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||pu(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Op(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Sa(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||od(te),a.aa=x}}}function Op(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Op(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),Ef(a,y),E.isValidLayout=!0):a.xh=!0)}}et.yz=function(){for(var a=new pn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new pn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Zt,b=new Zt;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function md(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;jt("Unknown DiagramEvent name: "+y)}et.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},et.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},et.R=function(a,y,x){var b=md(this,a),E=new hu;if(E.diagram=this,a=nm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function vd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}et.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Vt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=rm(a,x)),x===null){y=Xt.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&Sd(a,ne,b,y)}Xt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Xt.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Gn&&Sd(a,ne,b,y);Xt.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Sd(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(_d(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(kh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=kh}else if(y instanceof Tr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Gn&&Sd(a,E,x,b)}}function gh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Vt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=Zr(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=Xt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),Xt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Vt.prototype.ug=function(){this.vk!==-1&&(an.clearTimeout(this.vk),this.vk=-1)},Vt.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=Xt.allocAt(0,0,b.width*E,b.height*E);var te=lt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(On)||(y=new lt(y.x+te.x/E,y.y+te.y/E)),Xt.free(b),lt.free(te),y},et=Vt.prototype,et.Cs=function(){return null},et.av=function(){return null},et.bs=function(a,y){this.pj.add(a,y)},et.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Tr&&(y.$p=null)})};function kf(a,y,x){function b(){var ye=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||ye-pe>he?y(x,E,se):an.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var se=a,he=x.callbackTimeout||300,pe=+new Date;return an.requestAnimationFrame(function(){b()}),null}et.Wz=function(a){return po?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},et.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},et.Xz=function(a,y,x){var b=im(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Uc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Uc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&jt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&jt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new ln(1/0,1/0):new ln(2e3,2e3));var se=y.position||null,he=y.parts||null,pe=y.padding===void 0?1:y.padding,ye=y.background||null,Te=y.omitTemporary;Te===void 0&&(Te=!0);var Ge=y.document||document,Xe=y.elementFinished||null,Je=y.showTemporary;Je===void 0&&(Je=!Te),y=y.showGrid,y===void 0&&(y=Je),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pe=="number"?pe=new Ir(pe):pe instanceof Ir||jt("MakeImage padding must be a Margin or a number."),pe.left=Math.max(pe.left,0),pe.right=Math.max(pe.right,0),pe.top=Math.max(pe.top,0),pe.bottom=Math.max(pe.bottom,0),a.ib.Vc(!0),Te=new fl(null,Ge,void 0,!0);var it=Te.context;if(!(E||te||he||se))return Te.width=a.Aa+Math.ceil(pe.left+pe.right),Te.height=a.ya+Math.ceil(pe.top+pe.bottom),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=Ge,b.hs=Xe,cd(a,b.context,pe,new ln(Te.width,Te.height),a.Ca,a.pa,he,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,pe,new ln(Te.width,Te.height),a.Ca,a.pa,he,ye,Je,y),a.Xm=!0,Te.context);var Mt=a.Pp,bt=a.documentBounds.copy();if(bt.Fv(a.yb),Je)for(var At=a.Wa.s,Ft=At.length,Bt=0;Bt<Ft;Bt++){var _t=At[Bt];if(_t.visible&&_t.isTemporary){_t=_t.Pa.s;for(var Kt=_t.length,Rn=0;Rn<Kt;Rn++){var Jn=_t[Rn];Jn.isInDocumentBounds&&Jn.isVisible()&&(Jn=Jn.actualBounds,Jn.w()&&bt.ed(Jn))}}}if(At=new lt(bt.x,bt.y),he!==null){for(Ft=new Xt(0,0,0,0),Bt=!0,_t=he.iterator,_t.reset();_t.next();)Kt=_t.value,Kt instanceof hr&&(Rn=Kt.layer,Rn!==null&&!Rn.visible||Rn!==null&&!Je&&Rn.isTemporary||!Kt.isVisible()||(Kt=Kt.actualBounds,Kt.w()&&(Bt?(Bt=!1,Ft.assign(Kt)):Ft.ed(Kt))));bt.width=Ft.width,bt.height=Ft.height,At.x=Ft.x,At.y=Ft.y}return se!==null&&se.w()&&(At=se,te||(te=Mt)),Ft=se=0,pe!==null&&(se=pe.left+pe.right,Ft=pe.top+pe.bottom),Bt=_t=0,E!==null&&(_t=E.width,Bt=E.height,isFinite(_t)&&(_t=Math.max(0,_t-se)),isFinite(Bt)&&(Bt=Math.max(0,Bt-Ft))),E!==null&&te!==null?(te==="NaN"&&(te=Mt),E.w()?(E=_t,bt=Bt):isNaN(Bt)?(E=_t,bt=bt.height*te):(E=bt.width*te,bt=Bt)):E!==null?E.w()?(te=Math.min(_t/bt.width,Bt/bt.height),E=_t,bt=Bt):isNaN(Bt)?(te=_t/bt.width,E=_t,bt=bt.height*te):(te=Bt/bt.height,E=bt.width*te,bt=Bt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/bt.width,(ne.height-Ft)/bt.height),te>Mt?(te=Mt,E=bt.width,bt=bt.height):(E=ne.width,bt=ne.height)):(E=bt.width*te,bt=bt.height*te):(te=Mt,E=bt.width,bt=bt.height),pe!==null?(E+=se,bt+=Ft):pe=new Ir(0),ne!==null&&(Mt=ne.width,ne=ne.height,isNaN(Mt)&&(Mt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Mt)&&(E=Math.min(E,Mt)),isFinite(ne)&&(bt=Math.min(bt,ne))),Te.width=Math.ceil(E),Te.height=Math.ceil(bt),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=Ge,b.hs=Xe,cd(a,b.context,pe,new ln(Math.ceil(E),Math.ceil(bt)),te,At,he,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,pe,new ln(Math.ceil(E),Math.ceil(bt)),te,At,he,ye,Je,y),a.Xm=!0,Te.context)}vn.Object.defineProperties(Vt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new nu(this,an.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new nu(this,an.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(an,"resize",this.Ov,!1),this.removeEventListener(an,"wheel",this.$j,!0),gu===this&&(gu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),mp(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&jn(a,"0 <= value <= 1",Vt,"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),hl(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),hl(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),hl(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),hl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&jn(a,">= 0",Vt,"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&&jn(a,">= 0",Vt,"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 jn(a,">= 0",Vt,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||em(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&jt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,pu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Lp(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(te){return a.Pe(te)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(an,"pointermove",this.dk,!0),this.addEventListener(an,"pointerdown",this.ui,!0),this.addEventListener(an,"pointerup",this.fk,!0),this.addEventListener(an,"pointerout",this.ek,!0),this.addEventListener(an,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(an,"wheel",this.$j,!0),this.addEventListener(an,"selectstart",this.preventDefault,!1)):(this.removeEventListener(an,"pointermove",this.dk,!0),this.removeEventListener(an,"pointerdown",this.ui,!0),this.removeEventListener(an,"pointerup",this.fk,!0),this.removeEventListener(an,"pointerout",this.ek,!0),this.removeEventListener(an,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(an,"wheel",this.$j,!0),this.removeEventListener(an,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=lt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?tu(this):(this.vb=!0,a=this.scale,Sp(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}lt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=$g(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=$g(this)),a.type!==Pn.Grid&&jt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),eu(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),tu(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||jt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===mh&&hl(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,hl(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,Mp(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&&Mp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Ba&&hl(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||jt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||jt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):jn(a,"> 0",Vt,"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)):jn(a,"> 0",Vt,"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),hl(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 Ir(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&jt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==vh&&a!==Do&&a!==wd&&jt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new ln(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 Ir(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),vn.Object.defineProperties(Vt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Vt.prototype.makeImageData=Vt.prototype.Jx,Vt.prototype.makeImage=Vt.prototype.Wz,Vt.prototype.cacheGroupExternalLinks=Vt.prototype.Fu,Vt.prototype.addRenderer=Vt.prototype.bs,Vt.prototype.makeSVG=Vt.prototype.av,Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.stopAutoScroll=Vt.prototype.ug,Vt.prototype.doAutoScroll=Vt.prototype.gs,Vt.prototype.isUnoccupied=Vt.prototype.Yj,Vt.prototype.raiseDiagramEvent=Vt.prototype.R,Vt.prototype.removeDiagramListener=Vt.prototype.am,Vt.prototype.addDiagramListener=Vt.prototype.Bj,Vt.prototype.findTreeRoots=Vt.prototype.yz,Vt.prototype.layoutDiagram=Vt.prototype.Uz,Vt.prototype.findTopLevelGroups=Vt.prototype.qz,Vt.prototype.findTopLevelNodesAndLinks=Vt.prototype.rz,Vt.prototype.ensureBounds=Vt.prototype.Va,Vt.prototype.findLinksByExample=Vt.prototype.ls,Vt.prototype.findNodesByExample=Vt.prototype.ms,Vt.prototype.findLinkForData=Vt.prototype.Kc,Vt.prototype.findNodeForData=Vt.prototype.ii,Vt.prototype.findPartForData=Vt.prototype.Lc,Vt.prototype.findLinkForKey=Vt.prototype.findLinkForKey,Vt.prototype.findNodeForKey=Vt.prototype.Vb,Vt.prototype.findPartForKey=Vt.prototype.findPartForKey,Vt.prototype.rebuildParts=Vt.prototype.Wd,Vt.prototype.transformViewToDoc=Vt.prototype.Ps,Vt.prototype.transformRectDocToView=Vt.prototype.zA,Vt.prototype.transformDocToView=Vt.prototype.op,Vt.prototype.centerRect=Vt.prototype.es,Vt.prototype.scrollToRect=Vt.prototype.tv,Vt.prototype.scroll=Vt.prototype.scroll,Vt.prototype.highlightCollection=Vt.prototype.Jz,Vt.prototype.highlight=Vt.prototype.Iz,Vt.prototype.selectCollection=Vt.prototype.rA,Vt.prototype.select=Vt.prototype.select,Vt.prototype.updateAllRelationshipsFromData=Vt.prototype.rp,Vt.prototype.updateAllTargetBindings=Vt.prototype.updateAllTargetBindings,Vt.prototype.commit=Vt.prototype.commit,Vt.prototype.rollbackTransaction=Vt.prototype.Kf,Vt.prototype.commitTransaction=Vt.prototype.eb,Vt.prototype.startTransaction=Vt.prototype.Ea,Vt.prototype.raiseChanged=Vt.prototype.g,Vt.prototype.raiseChangedEvent=Vt.prototype.cb,Vt.prototype.removeChangedListener=Vt.prototype.ik,Vt.prototype.addChangedListener=Vt.prototype.Pe,Vt.prototype.removeModelChangedListener=Vt.prototype.mA,Vt.prototype.addModelChangedListener=Vt.prototype.Yw,Vt.prototype.findLayer=Vt.prototype.Qj,Vt.prototype.removeLayer=Vt.prototype.kA,Vt.prototype.addLayerAfter=Vt.prototype.Cy,Vt.prototype.addLayerBefore=Vt.prototype.Ww,Vt.prototype.addLayer=Vt.prototype.Al,Vt.prototype.moveParts=Vt.prototype.moveParts,Vt.prototype.copyParts=Vt.prototype.Kj,Vt.prototype.removeParts=Vt.prototype.Is,Vt.prototype.remove=Vt.prototype.remove,Vt.prototype.add=Vt.prototype.add,Vt.prototype.clearDelayedGeometries=Vt.prototype.bx,Vt.prototype.setProperties=Vt.prototype.nm,Vt.prototype.attach=Vt.prototype.Du,Vt.prototype.set=Vt.prototype.set,Vt.prototype.resetInputOptions=Vt.prototype.Sx,Vt.prototype.setInputOption=Vt.prototype.sA,Vt.prototype.getInputOption=Vt.prototype.Ql,Vt.prototype.resetRenderingHints=Vt.prototype.Tx,Vt.prototype.setRenderingHint=Vt.prototype.Xx,Vt.prototype.getRenderingHint=Vt.prototype.Gf,Vt.prototype.maybeUpdate=Vt.prototype.bd,Vt.prototype.requestUpdate=Vt.prototype.$b,Vt.prototype.delayInitialization=Vt.prototype.Xy,Vt.prototype.isUpdateRequested=Vt.prototype.Pz,Vt.prototype.invalidateDocumentBounds=Vt.prototype.Ya,Vt.prototype.findObjectsNear=Vt.prototype.og,Vt.prototype.findPartsNear=Vt.prototype.mz,Vt.prototype.findObjectsIn=Vt.prototype.Cf,Vt.prototype.findPartsIn=Vt.prototype.ux,Vt.prototype.findObjectsAt=Vt.prototype.ji,Vt.prototype.findPartsAt=Vt.prototype.lz,Vt.prototype.findObjectAt=Vt.prototype.ic,Vt.prototype.findPartAt=Vt.prototype.Ol,Vt.prototype.focusObject=Vt.prototype.zz,Vt.prototype.alignDocument=Vt.prototype.Jy,Vt.prototype.zoomToRect=Vt.prototype.BA,Vt.prototype.zoomToFit=Vt.prototype.zoomToFit,Vt.prototype.diagramScroll=Vt.prototype.kx,Vt.prototype.focus=Vt.prototype.focus;var xd=new Zt,om=null,po=an.document!==void 0,zc=null,ec="",Ba=new Yt(Vt,"None",0),Is=new Yt(Vt,"Uniform",1),tc=new Yt(Vt,"UniformToFill",2),Tf=new Yt(Vt,"CycleAll",10),Dp=new Yt(Vt,"CycleNotDirected",11),Bp=new Yt(Vt,"CycleNotDirectedFast",12),Ip=new Yt(Vt,"CycleNotUndirected",13),Rp=new Yt(Vt,"CycleDestinationTree",14),_p=new Yt(Vt,"CycleSourceTree",15),mh=new Yt(Vt,"DocumentScroll",1),Mf=new Yt(Vt,"InfiniteScroll",2),vh=new Yt(Vt,"TreeParentCollapsed",21),Do=new Yt(Vt,"AllParentsCollapsed",22),wd=new Yt(Vt,"AnyParentsCollapsed",23),zp=new pn,Gc="2.3.10",Uc="image",Lf=null,am=!1;function Ta(){if(po){var a=an.document.createElement("canvas"),y=a.getContext("2d"),x=tr("7ca11abfd022028846");y[x]=tr("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Nn.Dx+"4ae6247590da4bb21c324ba3a84e385776",xr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[tr("7ca11abfd7330390")](tr(b[E-1]),10,15*E);for(y[x]=tr("39f046ebb36e4b"),x=1;5>x;x++)y[tr("7ca11abfd7330390")](tr(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(xr.prototype.Cd=xr.prototype.Eu),Lf=a}}Vt.className="Diagram",Vt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=an.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Vt?y.H:null},Vt.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},Vt.useDOM=function(a){po=a?an.document!==void 0:!1},Vt.isUsingDOM=function(){return po},Vt.None=Ba,Vt.Uniform=Is,Vt.UniformToFill=tc,Vt.CycleAll=Tf,Vt.CycleNotDirected=Dp,Vt.CycleNotDirectedFast=Bp,Vt.CycleNotUndirected=Ip,Vt.CycleDestinationTree=Rp,Vt.CycleSourceTree=_p,Vt.DocumentScroll=mh,Vt.InfiniteScroll=Mf,Vt.TreeParentCollapsed=vh,Vt.AllParentsCollapsed=Do,Vt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Wc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=an[tr("76a715b2f73f148a")][tr("72ba13b5")]||"";if(a.Rc=!0,po){var b=Vt[tr("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=tr(b).split(tr("39e9")),!(6>b.length));){var te=tr(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=tr(Nn[tr("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=an[tr("74a900bae4370f8b51")][tr("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[tr("73a612b6fb191d")](tr("3aad1ab6e022098b4dc4")),te=tr(b[2]),-1<ne&&(se=se[tr("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[tr("76ad18b4f73e")],se=x[tr("73a612b6fb191d")](tr("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[tr("73a612b6fb191d")](te),0>ne&&te!==tr("7da71ca0ad381e90")&&(ne=y[tr("73a612b6fb191d")](tr("76a715b2ef3e149757"))),0>ne&&(ne=y[tr("73a612b6fb191d")](tr("76a715b2ef3e149757"))),0>ne&&(ne=y[tr("73a612b6fb191d")](tr("2bfa41fdb3784bca12"))),0>ne&&(ne=x[tr("73a612b6fb191d")](tr("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[tr("73a612b6fb191d")](tr("35"))||y[tr("73a612b6fb191d")](tr("35"))===-1),!a.Rc||x[tr("73a612b6fb191d")](tr("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[tr("73a612b6fb191d")](te)),!a.Rc)||(ne=an[tr("76a715b2f73f148a")][tr("69ad17a1e03e")],se=ne[tr("73a612b6fb191d")](tr("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[tr("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=an.document.createElement("div");for(var he=b[0].replace(/[A-Za-z]/g,"");4>he.length;)he+="9";if(se=he,he=he.substr(he.length-4),b="",b+=["gsh","gsf"][parseInt(he.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(he.substr(0,1),10)%4],ne[tr("79a417a0f0181a8946")]=b,an.document[tr("78a712aa")]){an.document[tr("78a712aa")][tr("7bb806b6ed32388c4a875b")](ne),he=an.getComputedStyle(ne).getPropertyValue(tr("78a704b7e62456904c9b12701b6532a8"));var pe=an.getComputedStyle(ne).getPropertyValue(tr("75b817b0ea2202"));if(an.document[tr("78a712aa")][tr("68ad1bbcf533388c4a875b")](ne),he){if(ne=an[tr("77a902b0eb1b1e804a8a")],pe==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(tr("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var ye in ne)if(b===ne[ye].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ye=x[tr("76ad18b4f73e")],E=x[tr("73a612b6fb191d")](tr("35e7"))+2;E<ye;E++)y+=x[E];x=y[tr("73a612b6fb191d")](tr("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[tr("73a612b6fb191d")](tr("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Gu(a){this.j=a===void 0?new lt:a,this.o=new lt}vn.Object.defineProperties(Gu.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Nf="DraggingInfo";Gu.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new ln(NaN,NaN).freeze(),this.gridSnapCellSpot=Xr,this.gridSnapOrigin=new lt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Ee(a,y){if(typeof a=="string"||an.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}en(Ee,Vt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=yi,a.layout=new ha}Ee.prototype.reset=function(){Vt.prototype.reset.call(this),be(this)},Ee.className="Palette";function Oe(a,y){if(typeof a=="string"||an.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.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 hr;var E=new Dr;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 Ir(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new lt(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),gt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&gt(b)},x.autoScale=Is,x.vb=!1,y&&Object.assign(x,y),x}en(Oe,Vt),Oe.prototype.computePixelRatio=function(){return 1},Oe.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(Ic(this),this.ql===null){var x=new fl(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),qe(this)}finally{this.ta=a,this.ib=y}}}Vt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!(this.ta instanceof nu)&&(Bv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ic(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?qe(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 qe(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=Xt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),eu(y,E),Xt.free(E),Sa(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var se=y[ne],he=a;if(se.visible&&se.opacity!==0){var pe=se.diagram.grid.part;if(!x&&se.isTemporary)b&&pe.layer===se&&(se=zu(se,E),pe.gc(E,he),E.globalAlpha=se);else{for(var ye=zu(se,E),Te=he.scale,Ge=Xt.alloc(),Xe=se.Pa.s,Je=Xe.length,it=0;it<Je;it++){var Mt=Xe[it];(b||Mt!==pe)&&se.Oj(E,Mt,he,null,Te,Ge,!1)}Xt.free(Ge),E.globalAlpha=ye}}}}}function gt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=ln.alloc();E.h(x.width,x.height),b.desiredSize=E,ln.free(E),a=2/a.scale,b instanceof Dr&&(b.strokeWidth=a),y.location=new lt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return fa;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),gt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},vn.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&jt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),gt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),gt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Oe.className="Overview";function Lt(){lo.call(this),this.j=null}en(Lt,lo),Lt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new lt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)),!0)},Lt.prototype.doActivate=function(){this.j=null,lo.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new lt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)}}},Lt.className="OverviewDraggingTool";function Tt(){Sr(this),this.H=gu,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=fa,this.hb=!0,this.cg=null,this.ob=200}Tt.prototype.toString=function(){return"CommandHandler"},Tt.prototype.Xe=function(a){this.H=a},Tt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=pi?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Tt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Tt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Qi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Tt.prototype.canStopCommand=function(){return!0},Tt.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=""}},Tt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Tt.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 yn,x=a.selection.iterator;x.next();)oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Tt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Tt.prototype.copySelection=function(){var a=this.diagram,y=new yn;for(a=a.selection.iterator;a.next();)oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Tt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Tt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Tt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Tt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)zc=null,ec="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new pn,x.addAll(te),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},Tt.prototype.pasteFromClipboard=function(){var a=new yn,y=zc;if(y===null)return a;var x=this.diagram;if(ec!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},Tt.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 te=this.computeEffectiveCollection(y.selection,y.Wm);Jh(y,te,new lt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Tt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||zc===null||zc.count===0||ec!==a.model.dataFormat)},Tt.prototype.undo=function(){this.diagram.undoManager.undo()},Tt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Tt.prototype.redo=function(){this.diagram.undoManager.redo()},Tt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Tt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Tt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Tt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Tt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Tt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Tt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Tt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;pu(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=fa):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},Tt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Tt.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(he){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;pu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=It(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var he=E.pop();0<E.length&&he instanceof Gn&&he.isTreeExpanded&&(!(he instanceof Tr)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof hr&&y.tv(he.actualBounds),he instanceof Gn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Tr&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof hr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Zr(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function It(a,y,x){if(y.isVisible())return x;if(y instanceof di)It(a,y.adornedPart,x);else if(y instanceof Mn){var b=y.fromNode;b!==null&&It(a,b,x),y=y.toNode,y!==null&&It(a,y,x)}else y instanceof Gn&&(b=y.labeledLink,b!==null&&It(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),It(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),It(a,y,x));return x}Tt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof hr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Tt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),pu(y.animationManager,"Collapse Tree");var x=new pn;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 Gn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Tt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Gn&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Gn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Tt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),pu(y.animationManager,"Expand Tree");var x=new pn;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 Gn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Tt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Gn)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Gn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Tt.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 pn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new pn,he=E.iterator;he.next();){var pe=he.value;te=!1;for(var ye=E.iterator;ye.next();)if(pe.Td(ye.value)){te=!0;break}te||se.add(pe)}if(0<se.count){var Te=se.first().containingGroup;if(Te!==null)for(;Te!==null;){E=!1;for(var Ge=se.iterator;Ge.next();)if(!Ge.value.Td(Te)){E=!0;break}if(E)Te=Te.containingGroup;else break}if(x instanceof Tr)dl(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Xe=y.copyNodeData(x);Jt(Xe)&&(y.xf(Xe),b=a.ii(Xe))}if(b!==null){Te!==null&&this.isValidMember(Te,b)&&(b.containingGroup=Te);for(var Je=se.iterator;Je.next();){var it=Je.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Tt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function nn(a){var y=Bn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Mn||y.push(x)}a=new yn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return Un(y),a}Tt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Mn)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},Tt.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 pn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Tr&&te.canUngroup()&&b.add(te)}var ne=new pn;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var pe=he.containingGroup,ye=pe!==null&&pe.data!==null?x.wa(pe.data):void 0;ne.addAll(he.memberParts);for(var Te=ne.iterator;Te.next();){var Ge=Te.value;if(Ge.isSelected=!0,!(Ge instanceof Mn)){var Xe=Ge.data;Xe!==null?x.mp(Xe,ye):Ge.containingGroup=pe}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Tt.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 Tr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&y.canUngroup())return!0;return!1},Tt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=nn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Tt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),pu(y.animationManager,"Collapse SubGraph");var x=new pn;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 Tr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Tt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Tr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&y.isSubGraphExpanded)return!0;return!1},Tt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),pu(y.animationManager,"Expand SubGraph");var x=new pn;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 Tr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Tt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Tr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&!y.isSubGraphExpanded)return!0;return!1},Tt.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(te){return te instanceof Zi&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Tt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Zi))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof Zi&&x.editable}),a!==null))return!0;return!1},Tt.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 zt?E=a.ga(Fr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new lt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Iu(x,!1,a)}},Tt.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)},Tt.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 Zt,a===null)return b;for(var te=a.iterator;te.next();)vu(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof Mn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},vn.Object.defineProperties(Tt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||jt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Tt.className="CommandHandler",Xg=function(){return new Tt};function zt(){Sr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new lt(NaN,NaN).freeze(),this.jd=Ci,this.Ab=new xr,this.wh=new xr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ta,this.uc=new Xt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Xt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Xt(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Zo,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 xn,fn,rr,or,pr,Nr,Yr,Gr,ii,ji;zt.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=ur(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},zt.prototype.Vw=function(a){var y=this.Dh;if(_n(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},zt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},zt.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},zt.prototype.copy=function(){return this.clone()},et=zt.prototype,et.qb=function(a){a.classType===Mn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:jt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===zt&&(this.stretch=a)},et.toString=function(){return er(this.constructor)+"#"+Jr(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function Rr(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}et.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=Or,a.yj=Or,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},et.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===no&&pa(this)&&eo(this,se,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new Zt),ne=te.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(te=new ya,Hg(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(pu(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Pn&&x===se&&(se.l&16777216)!==0&&se.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)se=x[E],se instanceof Pn&&Zc(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function eo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=TS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}et.ks=function(a){return this.bindingId===a?this:null},et.g=function(a,y,x){this.cb(no,a,this,y,x)},et.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 xr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Yo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}et.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?In(a.x,a.y,0,0,0,b.height)<=y||In(a.x,a.y,0,b.height,b.width,b.height)<=y||In(a.x,a.y,b.width,b.height,b.width,0)<=y||In(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},et.se=function(){return!0},et.ca=function(a){var y=lt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return lt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,se=this.naturalBounds;b=this.Df()*b.scale;var he=1/b;if(se.width*b<E&&se.height*b<E)return a=$i(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),lt.free(y),a}return E=!1,(this instanceof di||this instanceof Dr?$i(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),lt.free(y),E},et.gh=function(a){var y=this.naturalBounds;return $i(0,0,y.width,y.height,a.x,a.y)},et.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Xt.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=lt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),lt.free(E),Xt.free(y),b},et.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=lt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),lt.free(E),b},et.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=lt.allocAt(0,0),E=lt.allocAt(0,x.height),te=lt.allocAt(x.width,x.height),ne=lt.allocAt(x.width,0),se=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))se=!0;else{x=Xt.allocAt(0,0,x.width,x.height);var he=lt.allocAt(a.x,a.y);x.ca(y.Cd(he))?se=!0:(he.h(a.x,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.y),x.ca(y.Cd(he))&&(se=!0)))),lt.free(he),Xt.free(x),!se&&(Gt.us(a,b,E)||Gt.us(a,E,te)||Gt.us(a,te,ne)||Gt.us(a,ne,b))&&(se=!0)}return lt.free(b),lt.free(E),lt.free(te),lt.free(ne),se},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof qn){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},et.mi=function(a){a===void 0&&(a=new Xt);var y=this.naturalBounds,x=this.oe,b=lt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),ei(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),ei(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),ei(a,b.x,b.y,0,0),lt.free(b),a},et.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},et.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},et.qs=function(a,y){return y===void 0&&(y=new lt),y.assign(a),this.oe.Cd(y),y},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Gt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*pe+Te,a=a*he+y*ye+Ge,y=x*se+b*pe+Te,x=x*he+b*ye+Ge,E.h(0,0),b=this.naturalBounds,x=Gt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},zt.prototype.measure=function(a,y,x,b){if(_s(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var se=this instanceof Pn;switch(ss(this,!0)){case fn:ne=E=0,se&&(y=a=1/0);break;case xn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case or:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case pr:isFinite(y)&&y>b&&(ne=y),E=0,se&&(a=1/0)}se=this.maxSize;var he=this.minSize;E>se.width&&he.width<se.width&&(E=se.width),ne>se.height&&he.height<se.height&&(ne=se.height),x=Math.max(E,he.width),b=Math.max(ne,he.height),se.width<x&&(x=Math.min(he.width,x)),se.height<b&&(b=Math.min(he.height,b)),a=Math.min(se.width,a),y=Math.min(se.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||jt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},zt.prototype.Wl=function(){},zt.prototype.Dd=function(){return!1},zt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Xt.alloc();te.assign(this.Ib),this.Ib.ka(),Ya(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&xh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Zi&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||jt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),yu(this,!1),Xt.free(te)},et=zt.prototype,et.eh=function(){};function Ia(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=ss(a,!0),x===b&&te===E&&(y=fn),y){case fn:(x>b||te>E)&&(Bo(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case xn:Bo(a,!0),a.measure(b,E,0,0);break;case or:Bo(a,!0),a.measure(b,te,0,0);break;case pr:Bo(a,!0),a.measure(x,E,0,0)}}}et.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_v(x,!0),this.N(),Br(a,y)||(x.oh(),this.Pn(x)))},et.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Gn&&H1(a,this))},et.gc=function(a,y){if(!Xs(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 te=this instanceof Pn&&xh(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,pe=this.areaBackground,ye=this.Ma;pe===null&&ye===null||a.yc(),pe!==null&&(mo(this,a,pe,!0,!0,he,se),pe instanceof ki&&pe.type===Js?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(pe)):a.fillRect(se.x,se.y,se.width,se.height)),ye!==null&&(mo(this,a,ye,!0,!1,he,se),ye instanceof ki&&ye.type===Js?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ye)):a.fillRect(se.x,se.y,se.width,se.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,se=this.panel,this.l&4096&&ua(this),pe=this.part,he=!1;var Te=0;pe&&y.Gf("drawShadows")&&(he=pe.isShadowed)&&(ye=pe.shadowOffset,Te=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var Ge;if(!(Ge=y.$i||!ye)){var Xe=this.naturalBounds;Ge=this.wh;var Je=Ge.m11,it=Ge.m21,Mt=Ge.dx,bt=Ge.m12,At=Ge.m22,Ft=Ge.dy,Bt,_t=Bt=0;Ge=Bt*Je+_t*it+Mt;var Kt=Bt*bt+_t*At+Ft;Bt=Xe.width+Te,_t=0;var Rn=Bt*Je+_t*it+Mt;Bt=Bt*bt+_t*At+Ft,_t=Math.min(Ge,Rn);var Jn=Math.min(Kt,Bt),Zn=Math.max(Ge+0,Rn)-_t,Tn=Math.max(Kt+0,Bt)-Jn;Ge=_t,Kt=Jn,Bt=Xe.width+Te,_t=Xe.height+Te,Rn=Bt*Je+_t*it+Mt,Bt=Bt*bt+_t*At+Ft,_t=Math.min(Ge,Rn),Jn=Math.min(Kt,Bt),Zn=Math.max(Ge+Zn,Rn)-_t,Tn=Math.max(Kt+Tn,Bt)-Jn,Ge=_t,Kt=Jn,Bt=0,_t=Xe.height+Te,Rn=Bt*Je+_t*it+Mt,Bt=Bt*bt+_t*At+Ft,_t=Math.min(Ge,Rn),Jn=Math.min(Kt,Bt),Zn=Math.max(Ge+Zn,Rn)-_t,Tn=Math.max(Kt+Tn,Bt)-Jn,Ge=_t,Kt=Jn,Te=y.viewportBounds,Xe=Te.x,Je=Te.y,Ge=!(Ge>Te.width+Xe||Xe>Zn+Ge||Kt>Te.height+Je||Je>Tn+Kt)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Zi&&(a.font=this.font),Ge){if(Kt=se.se()?se.naturalBounds:se.actualBounds,Zn=Math.max(ne.x,Kt.x),Tn=Math.max(ne.y,Kt.y),Te=Math.min(ne.right,Kt.right)-Zn,Xe=Math.min(ne.bottom,Kt.bottom)-Tn,Je=this.tb,Je!==null&&(Zn=Je.x,Tn=Je.y,Te=Je.width,Xe=Je.height),Zn>ne.width+ne.x||ne.x>Kt.width+Kt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Zn,Tn,Te,Xe),a.clip()}if(ye){if(!pe.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(Kt=pe.shadowOffset,a.Ev(Kt.x*y.scale*this.scale*y.Mb,Kt.y*y.scale*this.scale*y.Mb,pe.shadowBlur),Uu(a),a.shadowColor=pe.shadowColor)}he&&this.shadowVisible===!0?Uu(a):he&&this.shadowVisible===!1&&Su(a),pe=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Rs(this,a,pe,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&ia(this,se)&&this.shadowVisible===null&&Su(a),this.Ma!==null&&(a.yc(),ms(this,a,pe,ne)),he&&(this.Ma!==null||this.areaBackground!==null||ia(this,se))?(bl(this,!0),this.shadowVisible===null&&Su(a)):bl(this,!1),this.hh(a,y),he&&this.l&512&&Uu(a),ye&&he&&Su(a),Ge&&(a.restore(),a.Vc(this instanceof Pn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ia(a,y){return y===null?!1:(xh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Pn.Auto||y.type===Pn.Spot)&&y.Pb()!==a)}et.Dv=function(){};function Rs(a,y,x,b){mo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof ki&&a.areaBackground.type===Js?(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 ms(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;mo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof ki&&a.Ma.type===Js?(y.beginPath(),y.rect(te-E/2,ne-E/2,se,he),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,se,he)}function Ma(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Pn.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 Xs(a,y,x){if(!(y instanceof ks))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&&Ma(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),Uu(y),y.shadowColor=a.shadowColor}a instanceof Zi&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Pn;var se=a instanceof Pn?xh(a):!1;a.l&4096&&ua(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(Up(y,1,0,0,1,0,0),a.svg=y.ad):te?(Up(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Up(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var pe=ne.copy().Vj();y.rb.ha=[pe.m11,pe.m12,pe.m21,pe.m22,pe.dx,pe.dy],Rs(a,y,E,he),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(se&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),ms(a,y,E,he),se&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],ms(a,y,E,he)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,se=!1,E&&x.Gf("drawShadows")&&(se=E.isShadowed),y.clipInsteadOfFill&&(se=!1),a.Dd()&&se&&Uu(y),se&&a.shadowVisible===!0?Uu(y):se&&a.shadowVisible===!1&&Su(y),E=a.panel,se&&ia(a,E)&&a.shadowVisible===null&&Su(y),y.Il&&(pe=x.computePixelRatio(),pe="drop-shadow("+y.shadowOffsetX/pe+"px "+y.shadowOffsetY/pe+"px "+y.shadowBlur/pe/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",pe),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",pe)),se&&(a.Ma!==null||a.areaBackground!==null||ia(a,E))?(bl(a,!0),a.shadowVisible===null&&Su(y)):bl(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,pe=a.svg,!te&&pe!==null&&se!==pe&&pe.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),as(y,pe),!0):(a.svg=se,ne!==null&&se===null&&(um(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Uu(y),a.Dd()&&Su(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&se.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&se.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(se):y.Nj.prepend(se),y.ti=se):b!==null&&Ma(a,b,se),ne!==null&&ne(a,se)),!0)}et.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+Hi++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Pn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),se.appendChild(y),a.svg.appendChild(se),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=se.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),as(a,b)};function as(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function La(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=dr(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()}}et.hh=function(){},et.lv=function(){this.Uc=!0},et.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 Pn?xh(this):!1;if(!(this instanceof Pn&&E))if(this instanceof us){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&$y(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Pn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Dr){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Rs(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&hm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Pn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),ms(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),te&&hm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},et.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function mo(a,y,x,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var pe=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=pe,he+=pe),(te=y instanceof Vc)&&x.xe&&(x.type===Md||x.yk===se&&x.ft===he))var ye=x.xe;else{var Te=0,Ge=0,Xe=0,Je=0,it=0,Mt=0;if(Mt=it=0,E?(it=ne.x,Mt=ne.y):b||(it-=pe/2,Mt-=pe/2),Te=x.start.x*se+x.start.offsetX,Ge=x.start.y*he+x.start.offsetY,Xe=x.end.x*se+x.end.offsetX,Je=x.end.y*he+x.end.offsetY,Te+=it,Xe+=it,Ge+=Mt,Je+=Mt,x.type===Hu)ye=y.createLinearGradient(Te,Ge,Xe,Je);else if(x.type===Js)Mt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Mt=Math.max(se,he)/2):it=x.startRadius,ye=y.createRadialGradient(Te,Ge,it,Xe,Je,Mt);else if(x.type===Md)try{ye=y.createPattern(x.pattern,"repeat")}catch(At){ye=null}if(x.type!==Md&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(te&&(x.xe=ye,ye!==null&&(x.yk=se,x.ft=he),ye===null&&x.type===Md&&x.yk!==-1)){x.yk=-1;var bt=a.diagram;bt!==null&&x.yk===-1&&Zr(function(){bt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof Pn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},et.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},et.If=function(){for(var a=this instanceof Pn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ua(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){cl(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)}cl(a,!1),Ys(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ys(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,Ys(a,!1)))}et.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=lt.alloc();te.yi(y,x,b,E,Fr),a.rotate(this.Kb,te.x,te.y),lt.free(te)}},et.v=function(a){if(!_s(this)){a===void 0&&(a=!1),Bo(this,!0),yu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){_s(this)||(Bo(this,!0),yu(this,!0))};function Xa(a){if(!Ya(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Gn&&a.Bd(),y.$b())),yu(a,!0)}}et.Uk=function(){!(this.l&2048)&&(cl(this,!0),Ys(this,!0))},et.Wu=function(){Ys(this,!0)},et.N=function(){var a=this.part;a!==null&&a.N()};function ss(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Pn.Table?Bl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Pn.Auto&&b.Pb()===a?oa(a,xn,y):x===Nr?b!==null?b.type===Pn.Spot&&b.Pb()===a?oa(a,xn,y):(x=b.defaultStretch,x===Nr?oa(a,fn,y):oa(a,x,y)):oa(a,fn,y):oa(a,x,y)}function Bl(a,y,x,b){var E=a.stretch;if(E!==Nr)return oa(a,E,b);var te=E=null;switch(y.stretch){case pr:te=!0;break;case xn:te=!0}switch(x.stretch){case or:E=!0;break;case xn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===or||y===xn),te===null&&(te=y===pr||y===xn),E===!0&&te===!0?oa(a,xn,b):E===!0?oa(a,or,b):te===!0?oa(a,pr,b):oa(a,fn,b)}function oa(a,y,x){if(x)return y;if(y===fn||(x=a.desiredSize,x.w()))return fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===or)return fn;if(y===xn)return pr}else{if(y===pr)return fn;if(y===xn)return or}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===pr)return fn;if(y===xn)return or}else{if(y===or)return fn;if(y===xn)return pr}return y}function bl(a,y){a.l=y?a.l|512:a.l&-513}function pa(a){return(a.l&1024)!==0}function Af(a,y){a.l=y?a.l|1024:a.l&-1025}function cl(a,y){a.l=y?a.l|2048:a.l&-2049}function Ys(a,y){a.l=y?a.l|4096:a.l&-4097}function _s(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Ya(a){return(a.l&16384)!==0}function yu(a,y){a.l=y?a.l|16384:a.l&-16385}et.Gj=function(){this.svg=null},et.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},et.Av=function(){},et.zv=function(a){return this.pa=a,Xa(this),!0},et.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},et.kq=function(){return 0};function Hc(a){var y=a.part;if(y instanceof Gn&&(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 Pn?a instanceof Gn?a.Bd():a.qm(a,function(x){Hc(x)}):Hc(a))}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&jt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new pn),this.localBindings.add(E),this},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return rv(this,a),this},et.apply=function(a){return a(this),this},et.nm=function(a){return Bc(this,a),this},et.pz=function(){return this.ih()},et.ih=function(){for(var a=this instanceof Pn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},et.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Zt),this.animationTriggers.add(a.propertyName,a),this};function $s(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 te=Pd.I(a);typeof te=="function"?(x=ur(arguments),b=te(x),Jt(b)||jt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=an.go[a]}if(b===null&&(E!=null&&E.constructor||jt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Vt&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?jt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):rv(b,te);return b}function rv(a,y){if(typeof y=="string")if(a instanceof Zi)a.text=y;else if(a instanceof Dr)a.figure=y;else if(a instanceof us)a.source=y;else if(a instanceof Pn)y=Cl.I(y),y!==null&&(a.type=y);else if(a instanceof ki){var x=vr(ki,y);x!==null?a.type=x:jt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof kn?(y=vr(kn,y),y!==null&&(a.type=y)):a instanceof fi&&(y=vr(fi,y),y!==null&&(a.type=y));else if(y instanceof zt)a instanceof Pn||jt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Io?km(b,y):jt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Yt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Wo)a.type=y;else if(y instanceof Mo)a instanceof zt||a instanceof Io?a.bind(y):jt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof wl)a instanceof zt?a.Jv(y):jt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof kn&&a.type===kn.o?a.figures.add(y):jt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fi)a instanceof Oo?a.segments.add(y):jt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof so)a instanceof Vt||a instanceof Tr?a.layout=y:jt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)rv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof ki){x=new nr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new nr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else jt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function yh(a,y){Pd.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}vn.Object.defineProperties(zt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new jf),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new jf),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new jf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Rr(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&&(Rr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Qa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Qa&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:On},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Nr},set:function(a){var y=this.stretch;y!==a&&(Rr(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&&(Rr(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)&&jn(a,"0 <= value <= 1",zt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N($c(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($c(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Xy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Ff(a,"GraphObject.areaBackground"),a instanceof ki&&a.freeze(),Rr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"GraphObject.background"),a instanceof ki&&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 hr)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new lt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&jt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Dr&&this.qc(),this.g("desiredSize",b,a),pa(this)&&(a=this.part,a!==null&&(eo(this,a,"width"),eo(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 ln(a,this.jd.height).freeze(),this.v(),this instanceof Dr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&eo(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 ln(this.jd.width,a).freeze(),this.v(),this instanceof Dr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&eo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:br},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(),Rr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:gi},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(),Rr(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 Ir(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&&ua(this),this.Ab}},oe:{get:function(){return this.l&4096&&ua(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Rr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:fn},set:function(a){this.reshapingBehavior!==a&&(Rr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&jt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),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&&jn(a,">= 0",zt,"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&&jn(a,">= 1",zt,"columnSpan"),Rr(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&&jn(a,">= 0",zt,"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&&jn(a,">= 1",zt,"rowSpan"),Rr(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&&(Rr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Gn||jt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Wv(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:Or},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Hc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&jn(a,">= 0",zt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Hc(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),Hc(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&&jn(a,">= 0",zt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Or},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Hc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&jn(a,">= 0",zt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Hc(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),Hc(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&&jn(a,">= 0",zt,"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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(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&&(Rr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),zt.prototype.trigger=zt.prototype.Jv,zt.prototype.findBindingPanel=zt.prototype.ih,zt.prototype.findTemplateBinder=zt.prototype.pz,zt.prototype.setProperties=zt.prototype.nm,zt.prototype.apply=zt.prototype.apply,zt.prototype.attach=zt.prototype.Du,zt.prototype.set=zt.prototype.set,zt.prototype.isEnabledObject=zt.prototype.If,zt.prototype.isVisibleObject=zt.prototype.Ed,zt.prototype.isContainedBy=zt.prototype.rg,zt.prototype.getNearestIntersectionPoint=zt.prototype.rs,zt.prototype.getLocalPoint=zt.prototype.qs,zt.prototype.getDocumentScale=zt.prototype.Df,zt.prototype.getDocumentAngle=zt.prototype.li,zt.prototype.getDocumentBounds=zt.prototype.mi,zt.prototype.getDocumentPoint=zt.prototype.ga,zt.prototype.intersectsRect=zt.prototype.Yc,zt.prototype.containedInRect=zt.prototype.fh,zt.prototype.containsRect=zt.prototype.Re,zt.prototype.containsPoint=zt.prototype.ca,zt.prototype.raiseChanged=zt.prototype.g,zt.prototype.raiseChangedEvent=zt.prototype.cb,zt.prototype.addCopyProperty=zt.prototype.Vw;var Pd=null;zt.className="GraphObject",Pd=new Zt,yh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=$s(Pn,Pn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Pn){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"},$s(Dr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new qn(0,0,2.76142374915397,2.761423749153969),spot2:new qn(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 Pn&&(x=b.fb("ButtonBorder"),x instanceof Dr)){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 Pn&&(x=b.fb("ButtonBorder"),x instanceof Dr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Pn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Dr){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Pn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Dr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Pn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Dr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Pn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Dr))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),yh("TreeExpanderButton",function(){var a=$s("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},$s(Dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Er},new Mo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Mo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof di&&(x=x.adornedPart),x instanceof Gn){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),yh("SubGraphExpanderButton",function(){var a=$s("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$s(Dr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Er},new Mo("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 di&&(x=x.adornedPart),x instanceof Tr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),yh("ToolTip",function(){return $s(di,Pn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},$s(Dr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new qn(0,0,4,6),spot2:new qn(1,1,-4,-4)}))}),yh("ContextMenu",function(){return $s(di,Pn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},new Mo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=$s("Button");a.stretch=or;var y=a.fb("ButtonBorder");return y instanceof Dr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new qn(0,0,2,3),y.spot2=new qn(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=$s("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},$s(Dr,{name:"ButtonIcon",strokeWidth:2},new Mo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Dr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),yh("CheckBoxButton",function(a){var y=lm(a);return a=$s("Button",{desiredSize:new ln(14,14)},$s(Dr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:xn,geometryStretch:rr,visible:!1},y!==""?new Mo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Pn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),yh("CheckBox",function(a){a=lm(a),a=$s("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ir(0,1,0,0)});var y=$s(Pn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ir(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}),zt.None=fn=new Yt(zt,"None",0),zt.Default=Nr=new Yt(zt,"Default",0),zt.Vertical=pr=new Yt(zt,"Vertical",4),zt.Horizontal=or=new Yt(zt,"Horizontal",5),zt.Fill=xn=new Yt(zt,"Fill",3),zt.Uniform=rr=new Yt(zt,"Uniform",1),zt.UniformToFill=Yr=new Yt(zt,"UniformToFill",2),zt.FlipVertical=Gr=new Yt(zt,"FlipVertical",1),zt.FlipHorizontal=ii=new Yt(zt,"FlipHorizontal",2),zt.FlipBoth=ji=new Yt(zt,"FlipBoth",3),zt.make=$s,zt.getBuilders=function(){var a=new Zt,y;for(y in Pd)if(y!==y.toLowerCase()){var x=Pd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},zt.defineBuilder=yh,zt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=Pd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof zt))return y&&b.set(y),b;jt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},zt.takeBuilderArgument=lm;function jf(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=br,this.o=gi,this.hg=Nr,this.ob=this.Bi=1,this.Pf=fn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function nc(){this.u=-1/0,this.o=0,this.F=On,this.rr=Qa,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},nc.className="LinkElementSettings";function Gp(){this.yj=this.Xi=Zo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gp.prototype.copy=function(){var a=new Gp;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Gp.className="LinkSettings";function Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Kc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function nu(a,y,x){this.ownerDocument=a=y===void 0?an.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new ks(this,x)}nu.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},nu.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Jt(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},nu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},nu.prototype.focus=function(){this.Oa.focus()},nu.prototype.mx=function(){this.ownerDocument=null},vn.Object.defineProperties(nu.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}}}),nu.className="SVGSurface";function ks(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Hi++,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,te,ne){a.Nj===void 0?Up(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}et=ks.prototype,et.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,pe=he-1e-6,ye=x*Math.cos(b),Te=x*Math.sin(b),Ge=a+ye,Xe=y+Te,Je=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ge)||1e-6<Math.abs(se-Xe))&&this.path.push(["L",Ge,+Xe]),0>b&&(b=b%he+he),b>pe?(this.path.push(["A",x,x,0,1,Je,a-ye,y-Te]),this.path.push(["A",x,x,0,1,Je,Ge,Xe])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Je,a+x*Math.cos(E),y+x*Math.sin(E)])},et.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},et.Se=function(a){this.addPath(this.path,this.rb,a||0)},et.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},et.clearRect=function(){},et.clip=function(){this.Yl.clipPath=!0},et.closePath=function(){this.path.push(["z"])},et.createLinearGradient=function(a,y,x,b){var E=new Of("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},et.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"+Hi++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Uc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},et.createRadialGradient=function(a,y,x,b,E,te){var ne=new Of("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function $y(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}et.drawImage=function(a,y,x,b,E,te,ne,se,he){var pe="";a instanceof HTMLCanvasElement&&(pe=a.toDataURL()),a instanceof HTMLImageElement&&(pe=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=ye,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,$y(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:ye||b,height:a||E,href:pe},Gt.$(b,se)&&Gt.$(E,he)?pe.toLowerCase().indexOf(".svg")===-1&&pe.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),bd(this,Uc,te,this.rb),this.addElement(Uc,te)},et.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},et.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},et.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},bd(this,"fill",a,this.rb),this.addElement("rect",a)},et.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},bd(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},et.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},bd(this,"fill",y,this.rb),this.addElement("text",y,a[0])},et.lineTo=function(a,y){this.path.push(["L",a,y])},et.moveTo=function(a,y){this.path.push(["M",a,y])},et.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},et.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"])},et.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},et.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())},et.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||Up(this,a,y,x,b,E,te)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}et.scale=function(a,y){this.rb.scale(a,y)},et.translate=function(a,y){this.rb.translate(a,y)},et.transform=function(){},et.yc=function(){},et.stroke=function(){qy(this,this.Yl)},et.jk=function(){this.clipInsteadOfFill||this.stroke()},et.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},et.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 bd(a,y,x,b){y==="fill"?iv(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 iv(a,y){a.fillStyle instanceof Of?y.fill=ov(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 Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Of?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Of)y.stroke=ov(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 ov(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"+Hi++,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 te=[],ne=0;ne<y;ne++){var se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(pe,ye){return pe.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}et.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=ur(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,bd(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var se in a)se!=="transform"&&y.setAttributeNS(null,se,a[se]);else{se=y.getElementsByTagName("path");for(var he in a)he!=="transform"&&se[x].setAttributeNS(null,he,a[he])}else this.addElement("path",a)};function Up(a,y,x,b,E,te,ne){var se=new Kc;se.ha=[y,x,b,E,te,ne],y={},bd(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Su(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Uu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}et.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},et.fs=function(){this.Ct=!1},et.Vc=function(){},et.Wx=function(){},ks.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ks.prototype.getImageData=function(){return null},ks.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()))}ks.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ks.className="SVGContext",Vt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new nu(this,an.document));var y=new nu(this,an.document,!0);a===void 0&&(a=new nr);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.av=function(a){return this.Cs(a)},Vt.prototype.makeSVG=Vt.prototype.av;function fl(a,y,x,b){this.ownerDocument=y=y===void 0?an.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}fl.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},fl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},fl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},fl.prototype.focus=function(){this.Oa.focus()},fl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},vn.Object.defineProperties(fl.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}}}),fl.className="CanvasSurface";function Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&jt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new xr,this.isTemporary=!!x}et=Vc.prototype,et.Wx=function(a){this.Z.imageSmoothingEnabled=a},et.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},et.beginPath=function(){this.Z.beginPath()},et.Se=function(){},et.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},et.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},et.clip=function(){this.Z.clip()},et.closePath=function(){this.Z.closePath()},et.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},et.createPattern=function(a,y){return this.Z.createPattern(a,y)},et.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},et.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},et.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},et.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.fillText=function(a,y,x){this.Z.fillText(a,y,x)},et.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},et.lineTo=function(a,y){this.Z.lineTo(a,y)},et.measureText=function(a){return this.Z.measureText(a)},et.moveTo=function(a,y){this.Z.moveTo(a,y)},et.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},et.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},et.restore=function(){this.Z.restore()},et.save=function(){this.yc(),this.Z.save()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=Vc.prototype,et.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},et.scale=function(a,y){this.El.scale(a,y)},et.translate=function(a,y){this.El.translate(a,y)},et.stroke=function(){this.Z.stroke()},et.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,se=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=se,ne.m12=a,ne.m21=y,ne.m22=x}},et.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},et.ng=function(a,y){if(a instanceof ki&&a.type===Js){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)},et.jk=function(){this.Hm||this.stroke()},et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},et.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},et.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},et.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},et.Hs=function(){},vn.Object.defineProperties(Vc.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vx=Object.freeze([]);Vc.className="CanvasSurfaceContext";function Wp(){this.F=this.o=this.u=this.j=0}Wp.className="ColorNumbers";function ki(a,y){Td||(cv(),Td=!0),Sr(this),this._isFrozen=!1,a===void 0?(this.na=Sh,this.xk="black"):typeof a=="string"?(this.na=Sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Hu?(this.Qd=yi,this.Lk=jo):this.Lk=a===Js?this.Qd=Fr:this.Qd=Or,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ki.prototype.copy=function(){var a=new ki;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},et=ki.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===ki&&(this.type=a)},et.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Hu?a+"Linear ":this.type===Js?a+"Radial ":this.type===Md?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+")"},et.addColorStop=function(a,y){return this._isFrozen&&Wt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&jn(a,"0 <= loc <= 1",ki,"addColorStop:loc"),this.we===null&&(this.we=new Zt),this.we.add(a,y),this.na===Sh&&(this.type=Hu),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&Wt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Wu(this.color),this.color=Ed(a,y);else if((this.type===Hu||this.type===Js)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Wu(a),Ed(y,x)}et.Wy=function(a,y){if(this._isFrozen&&Wt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Wu(this.color),this.color=Ed(-a,y);else if((this.type===Hu||this.type===Js)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Wu(a),Ed(-y,x)}function av(a,y,x){Wu(a),a=Yi.j;var b=Yi.u,E=Yi.o,te=Yi.F;return Wu(y),x===void 0&&(x=.5),"rgba("+Math.round((Yi.j-a)*x+a)+", "+Math.round((Yi.u-b)*x+b)+", "+Math.round((Yi.o-E)*x+E)+", "+Math.round((Yi.F-te)*x+te)+")"}et.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Hu||this.type===Js)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Js)return Cd(a.first().value);if(a.get(.5)!==null)return Cd(a.get(.5));if(a.count===2)return a=a.Fa(),Cd(av(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,Cd(av(a.get(x),a.get(b),1-te/E))}return!1};function Cd(a){return a?a instanceof ki?a.Gx():(Wu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Ld:y=100*lv(Yi.j);var x=100*lv(Yi.u),b=100*lv(Yi.o);return $a.j=.4124564*y+.3575761*x+.1804375*b,$a.u=.2126729*y+.7151522*x+.072175*b,$a.o=.0193339*y+.119192*x+.9503041*b,$a.F=Yi.F,y=hv($a.j/kd[0]),x=hv($a.u/kd[1]),b=hv($a.o/kd[2]),xu.j=116*x-16,xu.u=500*(y-x),xu.o=200*(x-b),xu.F=$a.F,xu.j=Math.min(100,Math.max(0,xu.j+100*a)),a=(xu.j+16)/116,y=a-xu.o/200,$a.j=kd[0]*n1(xu.u/500+a),$a.u=kd[1]*(xu.j>cm*fv?Math.pow(a,3):xu.j/cm),$a.o=kd[2]*n1(y),$a.F=xu.F,a=-.969266*$a.j+1.8760108*$a.u+.041556*$a.o,y=.0556434*$a.j+-.2040259*$a.u+1.0572252*$a.o,Yi.j=255*uv((3.2404542*$a.j+-1.5371385*$a.u+-.4985314*$a.o)/100),Yi.u=255*uv(a/100),Yi.o=255*uv(y/100),Yi.F=$a.F,Yi.j=Math.round(Yi.j),255<Yi.j?Yi.j=255:0>Yi.j&&(Yi.j=0),Yi.u=Math.round(Yi.u),255<Yi.u?Yi.u=255:0>Yi.u&&(Yi.u=0),Yi.o=Math.round(Yi.o),255<Yi.o?Yi.o=255:0>Yi.o&&(Yi.o=0),"rgba("+Yi.j+", "+Yi.u+", "+Yi.o+", "+Yi.F+")";case r1:return sv(),zs.o=Math.min(100,Math.max(0,zs.o+100*a)),"hsla("+zs.j+", "+zs.u+"%, "+zs.o+"%, "+zs.F+")";default:jt("Unknown color space: "+y)}}function Wu(a){Td||(cv(),Td=!0);var y=dv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Yi.j=a[0],Yi.u=a[1],Yi.o=a[2],Yi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Yi.j=0,Yi.u=0,Yi.o=0,Yi.F=1)}}function sv(){var a=Yi.j/255,y=Yi.u/255,x=Yi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}zs.j=Math.round(ne),zs.u=Math.round(100*a),zs.o=Math.round(100*E),zs.F=Yi.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function hv(a){return a>fv?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>fv?y:(116*a-16)/cm}function Ff(a,y){typeof a!="string"&&(a instanceof ki||jt("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){dv=po?new fl(null,void 0,{willReadFrequently:!0}).context:null}vn.Object.defineProperties(ki.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Wt(this,a),this.na=a,this.start.Mc()&&(a===Hu?this.start=yi:a===Js&&(this.start=Fr)),this.end.Mc()&&(a===Hu?this.end=jo:a===Js&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Wt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Wt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Wt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Wt(this,a),0>a&&jn(a,">= zero",ki,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Wt(this,a),0>a&&jn(a,">= zero",ki,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Wt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Wt(this,a),this.cr=a,this.xe=null}}}),ki.prototype.isDark=ki.prototype.Gx,ki.prototype.darkenBy=ki.prototype.Wy,ki.prototype.lightenBy=ki.prototype.Vz,ki.prototype.addColorStop=ki.prototype.addColorStop;var fv=216/24389,cm=24389/27,kd=[95.047,100,108.883],dv=null,Yi=new Wp,zs=new Wp,$a=new Wp,xu=new Wp,Td=!1;ki.className="Brush";var Sh;ki.Solid=Sh=new Yt(ki,"Solid",0);var Hu;ki.Linear=Hu=new Yt(ki,"Linear",1);var Js;ki.Radial=Js=new Yt(ki,"Radial",2);var Md;ki.Pattern=Md=new Yt(ki,"Pattern",4);var Ld;ki.Lab=Ld=new Yt(ki,"Lab",5);var r1;ki.HSL=r1=new Yt(ki,"HSL",6),ki.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},ki.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Td||(cv(),Td=!0);var y=dv;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)},ki.lighten=function(a){return e1(a)},ki.lightenBy=e1,ki.darken=function(a){return t1(a)},ki.darkenBy=t1,ki.mix=av,ki.isDark=Cd;function Wo(){this.xa="Base"}Wo.prototype.measure=function(){},Wo.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Wo.prototype.arrange=function(){},Wo.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Wo.prototype.iA=function(a){a.Uj()},Wo.prototype.gc=function(){},vn.Object.defineProperties(Wo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Pn}}}),Wo.prototype.remeasureObject=Wo.prototype.iA,Wo.prototype.arrangeElement=Wo.prototype.Ly,Wo.prototype.measureElement=Wo.prototype.Yz,Wo.className="PanelLayout";function fm(){this.xa="Base"}en(fm,Wo),fm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Ku(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===a){var ye=pe.margin,Te=ye.right+ye.left;ye=ye.top+ye.bottom,pe.measure(y,x,te,ne);var Ge=pe.measuredBounds;Te=Math.max(Ge.width+Te,0),ye=Math.max(Ge.height+ye,0),Ge=pe.position.x;var Xe=pe.position.y;isFinite(Ge)||(Ge=0),isFinite(Xe)||(Xe=0),pe instanceof Dr&&pe.isGeometryPositioned&&(pe=pe.strokeWidth/2,Ge-=pe,Xe-=pe),ei(E,Ge,Xe,Te,ye)}}},fm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,se=te.margin,he=te.position.x,pe=te.position.y;if(he=isNaN(he)?-a:he-a,pe=isNaN(pe)?-x:pe-x,te instanceof Dr&&te.isGeometryPositioned){var ye=te.strokeWidth/2;he-=ye,pe-=ye}te.visible&&te.arrange(he+se.left,pe+se.top,ne.width,ne.height)}};function dm(){this.xa="Base"}en(dm,Wo),dm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=Bn(),te=Ku(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===te){var ye=ss(pe,!1);if(ye!==fn&&ye!==or)y.push(pe);else{pe.measure(1/0,x,0,ne),ye=pe.margin,pe=pe.measuredBounds;var Te=Math.max(pe.height+ye.top+ye.bottom,0);E.width+=Math.max(pe.width+ye.right+ye.left,0),E.height=Math.max(E.height,Te)}}}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++)he=y[a],(he.visible||he===te)&&(ye=he.margin,se=ye.right+ye.left,ye=ye.top+ye.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,ye=Math.max(he.height+ye,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,ye));Un(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,Ge=ye.margin,Xe=Ge.top+Ge.bottom,Je=te+E.bottom,it=Te.height,Mt=ss(ye,!1);(isNaN(ye.desiredSize.height)&&Mt===xn||Mt===pr)&&(it=Math.max(x.height-Xe-Je,0)),Xe=it+Xe+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=Fr),ne&&(se-=Te.width+Ge.left+Ge.right),ye.arrange(se+Je.offsetX+Ge.left,pe+Je.offsetY+Ge.top+(x.height*Je.y-Xe*Je.y),Te.width,it),ne||(se+=Te.width+Ge.left+Ge.right)}}};function pm(){this.xa="Base"}en(pm,Wo),pm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Bn();for(var se=Ku(a),he=0;he<ne;he++){var pe=b[he];if(pe.visible||pe===se){var ye=ss(pe,!1);if(ye!==fn&&ye!==pr)x.push(pe);else{var Te=pe.margin;ye=Te.right+Te.left,Te=Te.top+Te.bottom,pe.measure(y,1/0,te,0),pe=pe.measuredBounds,wi(E,Math.max(E.width,Math.max(pe.width+ye,0)),E.height+Math.max(pe.height+Te,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++)he=x[a],(he.visible||he===se)&&(pe=he.margin,ne=pe.right+pe.left,pe=pe.top+pe.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,pe=Math.max(he.height+pe,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=pe);Un(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,Ge=ye.margin,Xe=Ge.left+Ge.right,Je=te+E.right,it=Te.width,Mt=ss(ye,!1);(isNaN(ye.desiredSize.width)&&Mt===xn||Mt===or)&&(it=Math.max(x.width-Xe-Je,0)),Xe=it+Xe+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=Fr),ne&&(se-=Te.height+Ge.bottom+Ge.top),ye.arrange(pe+Je.offsetX+Ge.left+(x.width*Je.x-Xe*Je.x),se+Je.offsetY+Ge.top,it,Te.height),ne||(se+=Te.height+Ge.bottom+Ge.top)}}};function gm(){this.xa="Base"}en(gm,Wo),gm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=pe.right+pe.left,Te=pe.top+pe.bottom;he.measure(y,x,te,ne);var Ge=he.measuredBounds;te=Ge.width,ne=Ge.height;var Xe=Math.max(te+ye,0),Je=Math.max(ne+Te,0),it=a.isClipping,Mt=Xt.allocAt(-pe.left,-pe.top,Xe,Je),bt=Xt.allocAt(0,0,te,ne);pv(he,bt,!0),te=bt.width,ne=bt.height;for(var At=!0,Ft=Ku(a),Bt=0;Bt<se;Bt++){var _t=b[Bt];Ge=y;var Kt=x;if(_t!==he&&(_t.visible||_t===Ft)){pe=_t.margin;var Rn=pe.left,Jn=pe.top;switch(Xe=pe.right+pe.left,Je=pe.top+pe.bottom,pe=ss(_t,!1),pe){case xn:Ge=te,Kt=ne,Jn=Rn=Je=Xe=0;break;case or:Ge=te,Rn=Xe=0;break;case pr:Kt=ne,Jn=Je=0}_t.measure(Ge,Kt,0,0),Ge=_t.measuredBounds,Xe=Math.max(Ge.width+Xe,0),Je=Math.max(Ge.height+Je,0),pe=_t.alignment,pe.Xb()&&(pe=a.defaultAlignment),pe.sb()||(pe=Fr);var Zn=_t.alignmentFocus;if(Zn.Xb()&&(Zn=Fr),Kt=null,_t instanceof Pn&&_t.$e!==""&&(Kt=_t.fb(_t.$e),Kt===_t&&(Kt=null)),Rn=bt.x-Rn,Jn=bt.y-Jn,Kt!==null){for(_t.arrange(0,0,Ge.width,Ge.height),Ge=Kt.actualBounds,Ge=lt.allocAt(Ge.x+(Zn.x*Ge.width-Zn.offsetX),Ge.y+(Zn.y*Ge.height-Zn.offsetY)),Kt=Kt.panel;Kt!==_t;)Kt.transform.Ga(Ge),Kt=Kt.panel;Rn+=pe.x*te+pe.offsetX-Ge.x,Jn+=pe.y*ne+pe.offsetY-Ge.y,lt.free(Ge)}else Rn+=pe.x*te+pe.offsetX-(Zn.x*Ge.width+Zn.offsetX),Jn+=pe.y*ne+pe.offsetY-(Zn.y*Ge.height+Zn.offsetY);At?(At=!1,E.h(Rn,Jn,Xe,Je)):ei(E,Rn,Jn,Xe,Je)}}switch(At?E.assign(Mt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):ei(E,Mt.x,Mt.y,Mt.width,Mt.height),Xt.free(Mt),Xt.free(bt),pe=he.stretch,pe===Nr&&(pe=ss(he,!1)),pe){case fn:return;case xn:if(!isFinite(y)&&!isFinite(x))return;break;case or:if(!isFinite(y))return;break;case pr:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Xe=Math.max(te+ye,0),Je=Math.max(ne+Te,0),pe=he.margin,bt=Xt.allocAt(-pe.left,-pe.top,Xe,Je),pv(he,bt,!0),te=bt.width,ne=bt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ft||(pe=x.margin,Xe=pe.right+pe.left,Je=pe.top+pe.bottom,Ge=x.measuredBounds,Xe=Math.max(Ge.width+Xe,0),Je=Math.max(Ge.height+Je,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Fr),x=x.alignmentFocus,x.Xb()&&(x=Fr),At?(At=!1,E.h(ye.x*te+ye.offsetX-(x.x*Ge.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*Ge.height+x.offsetY)-pe.top,Xe,Je)):ei(E,ye.x*te+ye.offsetX-(x.x*Ge.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*Ge.height+x.offsetY)-pe.top,Xe,Je));At?E.assign(Mt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):ei(E,Mt.x,Mt.y,Mt.width,Mt.height),Xt.free(bt)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var pe=te-x.x,ye=he-x.y;for(E.arrange(pe,ye,ne,se),ne=Xt.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Te=y[se];if(Te!==E){pe=Te.measuredBounds;var Ge=pe.width,Xe=pe.height;ye=Te.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Fr);var Je=Te.alignmentFocus;if(Je.Xb()&&(Je=Fr),pe=null,Te instanceof Pn&&Te.$e!==""&&(pe=Te.fb(Te.$e),pe===Te&&(pe=null)),pe!==null){var it=pe.actualBounds;for(Je=lt.allocAt(it.x+(Je.x*it.width-Je.offsetX),it.y+(Je.y*it.height-Je.offsetY)),pe=pe.panel;pe!==Te;)pe.transform.Ga(Je),pe=pe.panel;pe=ye.x*ne.width+ye.offsetX-Je.x,ye=ye.y*ne.height+ye.offsetY-Je.y,lt.free(Je)}else pe=ye.x*ne.width+ye.offsetX-(Je.x*Ge+Je.offsetX),ye=ye.y*ne.height+ye.offsetY-(Je.y*Xe+Je.offsetY);pe+=ne.x-x.x,ye+=ne.y-x.y,Te.visible&&Te.arrange(te+pe,he+ye,Ge,Xe)}}Xt.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Pn&&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"}en(mm,Wo),mm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=y,Te=x,Ge=pe.right+pe.left,Xe=pe.top+pe.bottom;he.measure(y,x,te,ne),pe=he.measuredBounds;var Je=0,it=null;he instanceof Dr&&(it=he,Je=it.strokeWidth*it.scale);var Mt=Math.max(pe.width+Ge,0);pe=Math.max(pe.height+Xe,0);var bt=yv(he),At=bt.x*Mt+bt.offsetX;bt=bt.y*pe+bt.offsetY;var Ft=Sv(he),Bt=Ft.x*Mt+Ft.offsetX;for(Ft=Ft.y*pe+Ft.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(At-Bt)-Je,0)),isFinite(x)&&(Te=Math.max(Math.abs(bt-Ft)-Je,0)),Je=ln.alloc(),Je.h(0,0),a=Ku(a),Ft=0;Ft<se;Ft++)bt=b[Ft],bt===he||!bt.visible&&bt!==a||(pe=bt.margin,Mt=pe.right+pe.left,At=pe.top+pe.bottom,bt.measure(ye,Te,0,0),pe=bt.measuredBounds,Mt=Math.max(pe.width+Mt,0),pe=Math.max(pe.height+At,0),Je.h(Math.max(Mt,Je.width),Math.max(pe,Je.height)));if(se===1)E.width=Mt,E.height=pe,ln.free(Je);else{switch(bt=yv(he),Ft=Sv(he),se=b=0,Ft.x!==bt.x&&Ft.y!==bt.y&&(b=Je.width/Math.abs(Ft.x-bt.x),se=Je.height/Math.abs(Ft.y-bt.y)),ln.free(Je),Je=0,it!==null&&(Je=it.strokeWidth*it.scale,Ev(it)===rr&&(b=se=Math.max(b,se))),b+=Math.abs(bt.offsetX)+Math.abs(Ft.offsetX)+Je,se+=Math.abs(bt.offsetY)+Math.abs(Ft.offsetY)+Je,it=he.stretch,it===Nr&&(it=ss(he,!1)),it){case fn:ne=te=0;break;case xn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case or:isFinite(y)&&(b=y),ne=0;break;case pr:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+Ge,E.height=he.measuredBounds.height+Xe}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=Xt.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,pe=he.left;he=he.top,b.arrange(pe+se,he+ne,E.width,E.height);var ye=yv(b),Te=Sv(b),Ge=ye.y*E.height+ye.offsetY,Xe=Te.x*E.width+Te.offsetX;for(Te=Te.y*E.height+Te.offsetY,te.x=ye.x*E.width+ye.offsetX,te.y=Ge,ei(te,Xe,Te,0,0),te.x+=se+pe,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(pe=se.measuredBounds,ne=se.margin,he=Math.max(pe.width+ne.right+ne.left,0),ye=Math.max(pe.height+ne.top+ne.bottom,0),Ge=se.alignment,Ge.Xb()&&(Ge=a.defaultAlignment),Ge.sb()||(Ge=Fr),he=te.width*Ge.x+Ge.offsetX-he*Ge.x+ne.left+te.x,ne=te.height*Ge.y+Ge.offsetY-ye*Ge.y+ne.top+te.y,se.visible&&($i(te.x,te.y,te.width,te.height,he,ne,pe.width,pe.height)?se.arrange(he,ne,pe.width,pe.height):se.arrange(he,ne,pe.width,pe.height,new Xt(te.x,te.y,te.width,te.height))));Xt.free(te)};function vm(){this.xa="Base",this.name="Table"}en(vm,Wo),vm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Bn(),se=Bn(),he=0;he<te;he++){var pe=b[he],ye=pe instanceof Pn?pe:null;if(ye!==null&&xh(ye)&&pe.visible){se.push(ye);for(var Te=ye.O.s,Ge=Te.length,Xe=0;Xe<Ge;Xe++){var Je=Te[Xe];ye.type===Pn.TableRow?Je.row=pe.row:ye.type===Pn.TableColumn&&(Je.column=pe.column),ne.push(Je)}}else ne.push(pe)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var it=[],Mt=0;Mt<te;Mt++){var bt=ne[Mt];bt.visible&&(Bo(bt,!0),yu(bt,!0),it[bt.row]||(it[bt.row]=[]),it[bt.row][bt.column]||(it[bt.row][bt.column]=[]),it[bt.row][bt.column].push(bt))}Un(ne);var At=Bn(),Ft=Bn(),Bt=Bn(),_t={count:0},Kt={count:0},Rn=y,Jn=x,Zn=a.rowDefs,Tn=a.colDefs,hn=null;te=Zn.length;for(var kr=0;kr<te;kr++)hn=Zn[kr],hn!==void 0&&(hn.actual=0);te=Tn.length;for(var wr=0;wr<te;wr++)hn=Tn[wr],hn!==void 0&&(hn.actual=0);for(var mi=it.length,Ui=0,$o=0;$o<mi;$o++)it[$o]&&(Ui=Math.max(Ui,it[$o].length));var ea=Math.min(a.topIndex,mi-1),Ra=Math.min(a.leftIndex,Ui-1),Jo=0;mi=it.length;for(var Nh=Ku(a),Lo=0;Lo<mi;Lo++)if(it[Lo]){Ui=it[Lo].length;var Gl=a.Fb(Lo);Gl.actual=0;for(var _a=Gl.oc=0;_a<Ui;_a++)if(it[Lo][_a]){var Ah=a.Eb(_a);At[_a]===void 0&&(Ah.actual=0,Ah.oc=0,At[_a]=!0);for(var Ws=it[Lo][_a],ml=Ws.length,Ls=0;Ls<ml;Ls++){var ys=Ws[Ls];if(ys.visible||ys===Nh){var mc=1<ys.rowSpan||1<ys.columnSpan;mc&&(Lo<ea||_a<Ra||Ft.push(ys));var Ul=ys.margin,Qd=Ul.right+Ul.left,Ns=Ul.top+Ul.bottom,za=Bl(ys,Gl,Ah,!1),Ng=ys.desiredSize,Vf=!isNaN(Ng.height),ou=!isNaN(Ng.width)&&Vf;if(mc||za===fn||ou||Lo<ea||_a<Ra||(_t[_a]!==void 0||za!==xn&&za!==or||(_t[_a]=-1,_t.count++),Kt[Lo]!==void 0||za!==xn&&za!==pr||(Kt[Lo]=-1,Kt.count++),Bt.push(ys)),ys.measure(1/0,1/0,0,0),!(Lo<ea||_a<Ra)){var Ss=ys.measuredBounds,tf=Math.max(Ss.width+Qd,0),As=Math.max(Ss.height+Ns,0);if(ys.rowSpan===1&&(za===fn||za===or)){hn=a.Fb(Lo);var vc=hn.Wc();Jo=Math.max(As-hn.actual,0),Jo+vc>Jn&&(Jo=Math.max(Jn-vc,0));var z0=hn.oa===0;hn.oc=hn.oc+Jo,hn.actual=hn.oa+Jo,Jn=Math.max(Jn-(Jo+(z0?vc:0)),0)}if(ys.columnSpan===1&&(za===fn||za===pr)){hn=a.Eb(_a);var Ag=hn.Wc();Jo=Math.max(tf-hn.actual,0),Jo+Ag>Rn&&(Jo=Math.max(Rn-Ag,0));var Gy=hn.oa===0;hn.oc=hn.oc+Jo,hn.actual=hn.oa+Jo,Rn=Math.max(Rn-(Jo+(Gy?Ag:0)),0)}mc&&ys.Uj()}}}}}Un(At);var Lu=0,Xu=0;te=a.columnCount;for(var Zf=0;Zf<te;Zf++){var yc=Tn[Zf];yc!==void 0&&(Lu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Lu+=yc.Wc()))}te=a.rowCount;for(var qd=0;qd<te;qd++){var Sc=Zn[qd];Sc!==void 0&&(Xu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Xu+=Sc.Wc()))}Rn=Math.max(y-Lu,0);var Nu=Jn=Math.max(x-Xu,0),jh=Rn;te=Bt.length;for(var xs=0;xs<te;xs++){var au=Bt[xs],G0=a.Fb(au.row),Yu=a.Eb(au.column),ep=au.measuredBounds,Wl=au.margin,nf=Wl.right+Wl.left,su=Wl.top+Wl.bottom;_t[au.column]=Yu.oc===0&&_t[au.column]!==void 0?Math.max(ep.width+nf,_t[au.column]):null,Kt[au.row]=G0.oc===0&&Kt[au.row]!==void 0?Math.max(ep.height+su,Kt[au.row]):null}var Xf=0,tp=0,Nl;for(Nl in Kt)Nl!=="count"&&(Xf+=Kt[Nl]);for(Nl in _t)Nl!=="count"&&(tp+=_t[Nl]);for(var ca=ln.alloc(),jg=0;jg<te;jg++){var rs=Bt[jg];if(rs.visible||rs===Nh){var No=a.Fb(rs.row),is=a.Eb(rs.column),$u=0;isFinite(is.width)?$u=is.width:(isFinite(Rn)&&_t[rs.column]!==null?tp===0?$u=is.actual+Rn:$u=_t[rs.column]/tp*jh:_t[rs.column]!==null?$u=Rn:$u=is.actual||Rn,$u=Math.max(0,$u-is.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(Jn)&&Kt[rs.row]!==null?Xf===0?Oh=No.actual+Jn:Oh=Kt[rs.row]/Xf*Nu:Kt[rs.row]!==null?Oh=Jn:Oh=No.actual||Jn,Oh=Math.max(0,Oh-No.Wc())),ca.h(Math.max(is.minimum,Math.min($u,is.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Bl(rs,No,is,!1),za){case or:ca.height=Math.max(ca.height,No.actual+Jn);break;case pr:ca.width=Math.max(ca.width,is.actual+Rn)}var rf=rs.margin,Uy=rf.right+rf.left,U0=rf.top+rf.bottom;rs.Uj(),rs.measure(ca.width,ca.height,is.minimum,No.minimum);var np=rs.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+U0,0);isFinite(Rn)&&(of=Math.min(of,ca.width)),isFinite(Jn)&&(Yf=Math.min(Yf,ca.height));var ws=0;ws=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),Jo=No.actual-ws,Jn=Math.max(Jn-Jo,0),Kt[rs.row]===null&&(Nu=Math.max(Nu-Jo,0)),ws=is.actual,is.actual=Math.max(is.actual,of),is.oc=Math.max(is.oc,of),Jo=is.actual-ws,Rn=Math.max(Rn-Jo,0),_t[rs.column]===null&&(jh=Math.max(jh-Jo,0))}}Un(Bt);var Ju=ln.alloc(),Hl=Bn(),rl=Bn();if(te=Ft.length,te!==0){for(var xc=0;xc<mi;xc++)if(it[xc]){Ui=it[xc].length;var rp=a.Fb(xc);Hl[xc]=rp.actual;for(var wc=0;wc<Ui;wc++)if(it[xc][wc]){var W0=a.Eb(wc);rl[wc]=W0.actual}}}for(var ip=0;ip<te;ip++){var So=Ft[ip];if(So.visible||So===Nh){var Al=a.Fb(So.row),vl=a.Eb(So.column);switch(ca.h(Math.max(vl.minimum,Math.min(y,vl.maximum)),Math.max(Al.minimum,Math.min(x,Al.maximum))),za=Bl(So,Al,vl,!1),za){case xn:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index])),Hl[Al.index]!==0&&(ca.height=Math.min(ca.height,Hl[Al.index]));break;case or:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index]));break;case pr:Hl[Al.index]!==0&&(ca.height=Math.min(ca.height,Hl[Al.index]))}isFinite(vl.width)&&(ca.width=vl.width),isFinite(Al.height)&&(ca.height=Al.height),Ju.h(0,0);for(var H0=vl.minimum,js=Al.minimum,Fh=1;Fh<So.rowSpan&&!(So.row+Fh>=a.rowCount);Fh++)hn=a.Fb(So.row+Fh),Jo=0,Jo=za===xn||za===pr?Math.max(hn.minimum,Hl[So.row+Fh]===0?hn.maximum:Math.min(Hl[So.row+Fh],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Ju.height+=Jo,js+=hn.minimum;for(var yl=1;yl<So.columnSpan&&!(So.column+yl>=a.columnCount);yl++)hn=a.Eb(So.column+yl),Jo=0,Jo=za===xn||za===or?Math.max(hn.minimum,rl[So.column+yl]===0?hn.maximum:Math.min(rl[So.column+yl],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Ju.width+=Jo,H0+=hn.minimum;ca.width+=Ju.width,ca.height+=Ju.height;var op=So.margin,Pc=op.right+op.left,Og=op.top+op.bottom;So.measure(ca.width,ca.height,H0,js);for(var ap=So.measuredBounds,lu=Math.max(ap.width+Pc,0),af=Math.max(ap.height+Og,0),bc=0,sp=0;sp<So.rowSpan&&!(So.row+sp>=a.rowCount);sp++)hn=a.Fb(So.row+sp),bc+=hn.total||0;if(bc<af){var Dh=af-bc,Au=af-bc;if(So.spanAllocation!==null)for(var Bh=So.spanAllocation,Qu=0;Qu<So.rowSpan&&!(0>=Dh)&&!(So.row+Qu>=a.rowCount);Qu++){hn=a.Fb(So.row+Qu);var Ih=hn.oa||0,sf=Bh(So,hn,Au);hn.actual=Math.min(hn.maximum,Ih+sf),hn.oa!==Ih&&(Dh-=hn.oa-Ih)}for(;0<Dh;){var Kl=hn.oa||0;if(isNaN(hn.height)&&hn.maximum>Kl&&(hn.actual=Math.min(hn.maximum,Kl+Dh),hn.oa!==Kl&&(Dh-=hn.oa-Kl)),hn.index===0)break;hn=a.Fb(hn.index-1)}}for(var $f=0,Rh=0;Rh<So.columnSpan&&!(So.column+Rh>=a.columnCount);Rh++)hn=a.Eb(So.column+Rh),$f+=hn.total||0;if($f<lu){var Jf=lu-$f,Wy=lu-$f;if(So.spanAllocation!==null)for(var qu=So.spanAllocation,lf=0;lf<So.columnSpan&&!(0>=Jf)&&!(So.column+lf>=a.columnCount);lf++){hn=a.Eb(So.column+lf);var Fg=hn.oa||0,Hy=qu(So,hn,Wy);hn.actual=Math.min(hn.maximum,Fg+Hy),hn.oa!==Fg&&(Jf-=hn.oa-Fg)}for(;0<Jf;){var K0=hn.oa||0;if(isNaN(hn.width)&&hn.maximum>K0&&(hn.actual=Math.min(hn.maximum,K0+Jf),hn.oa!==K0&&(Jf-=hn.oa-K0)),hn.index===0)break;hn=a.Eb(hn.index-1)}}}}Un(Ft),ln.free(Ju),ln.free(ca),Hl!==void 0&&Un(Hl),rl!==void 0&&Un(rl);var Qf=0,qf=0,V0=a.desiredSize,gx=a.maxSize;za=ss(a,!0);var Dg=Xu=Lu=0,Bg=0;te=a.columnCount;for(var Z0=0;Z0<te;Z0++)Tn[Z0]!==void 0&&(hn=a.Eb(Z0),isFinite(hn.width)?(Dg+=hn.width,Dg+=hn.Wc()):Tm(hn)===Zp?(Dg+=hn.oa,Dg+=hn.Wc()):hn.oa!==0&&(Lu+=hn.oa,Lu+=hn.Wc()));isFinite(V0.width)?Qf=Math.min(V0.width,gx.width):Qf=za!==fn&&isFinite(y)?y:Lu,Qf=Math.max(Qf,a.minSize.width),Qf=Math.max(Qf-Dg,0);for(var Qx=Lu===0?1:Math.max(Qf/Lu,1),X0=0;X0<te;X0++)Tn[X0]!==void 0&&(hn=a.Eb(X0),isFinite(hn.width)||Tm(hn)===Zp||(hn.actual=hn.oa*Qx),hn.position=E.width,hn.oa!==0&&(E.width+=hn.oa,E.width+=hn.Wc()));te=a.rowCount;for(var Y0=0;Y0<te;Y0++)Zn[Y0]!==void 0&&(hn=a.Fb(Y0),isFinite(hn.height)?(Bg+=hn.height,Bg+=hn.Wc()):Tm(hn)===Zp?(Bg+=hn.oa,Bg+=hn.Wc()):hn.oa!==0&&(Xu+=hn.oa,Xu+=hn.Wc()));isFinite(V0.height)?qf=Math.min(V0.height,gx.height):qf=za!==fn&&isFinite(x)?x:Xu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Xu===0?1:Math.max(qf/Xu,1),$0=0;$0<te;$0++)Zn[$0]!==void 0&&(hn=a.Fb($0),isFinite(hn.height)||Tm(hn)===Zp||(hn.actual=hn.oa*qx),hn.position=E.height,hn.oa!==0&&(E.height+=hn.oa,E.height+=hn.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var Ig=se[Ky],Vy=0,Zy=0;Ig.type===Pn.TableRow?(Vy=E.width,hn=a.Fb(Ig.row),Zy=hn.actual):(hn=a.Eb(Ig.column),Vy=hn.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Bo(Ig,!1)}Un(se),a.inRowsCols=it},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,pe=ne.length,ye=0,Te=0;Te<pe;Te++)ne[Te]&&(ye=Math.max(ye,ne[Te].length));he=a.rowDefs,se=a.colDefs;var Ge=Te=0,Xe=Math.min(a.topIndex,pe-1);if(0<he.length){for(;Xe!==pe&&(he[Xe]===void 0||he[Xe].oa===0);)Xe++;Xe=Math.max(Math.min(Xe,pe-1),0),Te=-he[Xe].position}var Je=Math.min(a.leftIndex,ye-1);if(0<se.length){for(;Je!==ye&&(se[Je]===void 0||se[Je].oa===0);)Je++;Je=Math.max(Math.min(Je,ye-1),0),Ge=-se[Je].position}for(var it=0,Mt=0;it!==pe&&he[it]===void 0;)it++;for(;Mt!==pe&&se[Mt]===void 0;)Mt++;ye=a.part,a.Fb(it),a.Eb(Mt);for(var bt=0;bt<y.length;bt++){var At=y[bt];if(At instanceof Pn&&At.visible&&xh(At)){if(At.type===Pn.TableRow){se=a.Fb(At.row);var Ft=a.Eb(Mt)}else se=a.Fb(it),Ft=a.Eb(At.column);he=se.position+Te+E,se.oa!==0&&(he+=se.Io(Math.max(it,Xe))),se=Ft.position+Ge+te,Ft.oa!==0&&(se+=Ft.Io(Math.max(Mt,Je))),Ft=At.measuredBounds,At.Uk(),At.actualBounds.ka();var Bt=At.actualBounds,_t=Xt.allocAt(Bt.x,Bt.y,Bt.width,Bt.height);Bt.x=At.type===Pn.TableRow?te:se,Bt.y=At.type===Pn.TableColumn?E:he,Bt.width=Ft.width,Bt.height=Ft.height,At.actualBounds.freeze(),yu(At,!1),Br(_t,Bt)||ye===null||(ye.oh(),At.Pn(ye)),Xt.free(_t)}}for(bt=ln.alloc(),At=0;At<pe;At++)if(ne[At]){for(ye=ne[At].length,Ft=a.Fb(At),he=Ft.position+Te+E,Ft.oa!==0&&(he+=Ft.Io(Math.max(it,Xe))),Bt=0;Bt<ye;Bt++)if(ne[At][Bt]){_t=a.Eb(Bt),se=_t.position+Ge+te,_t.oa!==0&&(se+=_t.Io(Math.max(Mt,Je)));for(var Kt=ne[At][Bt],Rn=Kt.length,Jn=0;Jn<Rn;Jn++){var Zn=Kt[Jn],Tn=Zn.measuredBounds;bt.h(0,0);for(var hn=1;hn<Zn.rowSpan&&!(At+hn>=a.rowCount);hn++){var kr=a.Fb(At+hn);kr.oa!==0&&(bt.height+=kr.total)}for(hn=1;hn<Zn.columnSpan&&!(Bt+hn>=a.columnCount);hn++)kr=a.Eb(Bt+hn),kr.oa!==0&&(bt.width+=kr.total);var wr=_t.oa+bt.width,mi=Ft.oa+bt.height;hn=se,kr=he;var Ui=wr,$o=mi,ea=se,Ra=he,Jo=wr,Nh=mi;se+wr>x.width&&(Jo=Math.max(x.width-se,0)),he+mi>x.height&&(Nh=Math.max(x.height-he,0));var Lo=Zn.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=Fr);var Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX;Lo=Lo.offsetY;var Ws=_t.alignment,ml=Ft.alignment;Ws.sb()&&(Gl=Ws.x,Ah=Ws.offsetX),ml.sb()&&(_a=ml.y,Lo=ml.offsetY)}else Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX,Lo=Lo.offsetY;(isNaN(Gl)||isNaN(_a))&&(_a=Gl=.5,Lo=Ah=0),Ws=Tn.width,ml=Tn.height;var Ls=Zn.margin,ys=Ls.left+Ls.right,mc=Ls.top+Ls.bottom,Ul=Bl(Zn,Ft,_t,!1);!isNaN(Zn.desiredSize.width)||Ul!==xn&&Ul!==or||(Ws=Math.max(wr-ys,0)),!isNaN(Zn.desiredSize.height)||Ul!==xn&&Ul!==pr||(ml=Math.max(mi-mc,0)),wr=Zn.maxSize,mi=Zn.minSize,Ws=Math.min(wr.width,Ws),ml=Math.min(wr.height,ml),Ws=Math.max(mi.width,Ws),ml=Math.max(mi.height,ml),wr=ml+mc,hn+=Ui*Gl-(Ws+ys)*Gl+Ah+Ls.left,kr+=$o*_a-wr*_a+Lo+Ls.top,Zn.visible&&($i(ea,Ra,Jo,Nh,hn,kr,Tn.width,Tn.height)?Zn.arrange(hn,kr,Ws,ml):Zn.arrange(hn,kr,Ws,ml,new Xt(ea,Ra,Jo,Nh)))}}}for(ln.free(bt),a=0;a<b;a++)x=y[a],te=x instanceof Pn?x:null,te!==null&&xh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}en(ym,Wo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}en(Sm,Wo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}en(xm,Wo),xm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&jt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var se=b.measuredBounds,he=b.margin,pe=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Te=se.width;se=se.height;var Ge=Math.max(y-pe,0),Xe=Math.max(x-he,0),Je=1;a.viewboxStretch===rr?Te!==0&&se!==0&&(Je=Math.min(Ge/Te,Xe/se)):Te!==0&&se!==0&&(Je=Math.max(Ge/Te,Xe/se)),Je===0&&(Je=1e-4),b.Ca*=Je,ye!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+pe,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=Fr),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function Hp(){this.xa="Base"}en(Hp,Wo),Hp.prototype.measure=function(){},Hp.prototype.arrange=function(){},Hp.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 te=a.naturalBounds,ne=a.actualBounds,se=te.width,he=te.height,pe=Math.ceil(se/E),ye=Math.ceil(he/b),Te=a.gridOrigin,Ge=Te.x;Te=Te.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Xe=[],Je=a.O.s,it=Je.length,Mt=0;Mt<it;Mt++){var bt=Je[Mt],At=[];if(Xe.push(At),bt.visible){var Ft=bt.interval;if(!(0>Ft)){bt=mv(bt.figure);for(var Bt=0;Bt<it;Bt++)if(Bt!==Mt){var _t=Je[Bt];_t.visible&&mv(_t.figure)===bt&&(_t=_t.interval,_t>Ft&&At.push(_t))}}}}for(Je=a.O.s,it=Je.length,Mt=0;Mt<it;Mt++){var Kt=Je[Mt];if(Kt.visible&&(At=Kt.interval||1,bt=Math.abs(At),!(2>E*bt*x))){if(Ft=Kt.segmentIndex,(!isFinite(Ft)||isNaN(Ft))&&(Ft=0),0>Ft&&(Ft=bt-Math.min(-Ft,bt)),Ft=Math.round(Ft%bt),bt=Kt.opacity,Bt=1,bt!==1){if(bt===0)continue;Bt=y.globalAlpha,y.globalAlpha=Bt*bt}_t=Xe[Mt];var Rn=!1,Jn=Kt.strokeDashArray;if(Jn!==null&&(Rn=!0,y.js(Jn,Kt.strokeDashOffset)),Kt.figure==="LineV"&&Kt.stroke!==null&&0<Kt.strokeWidth){for(y.lineWidth=Kt.strokeWidth,mo(a,y,Kt.stroke,!1,!1,te,ne),y.beginPath(),Jn=Kt=Math.floor((Ge-E)/E);Jn<=Kt+pe;Jn++){var Zn=Jn*E+Ge;0<=Zn&&Zn<=se&&wm(Jn,At,Ft,_t)&&(y.moveTo(Zn,0),y.lineTo(Zn,he))}y.stroke(),y.Se()}else if(Kt.figure==="LineH"&&Kt.stroke!==null&&0<Kt.strokeWidth){for(y.lineWidth=Kt.strokeWidth,mo(a,y,Kt.stroke,!1,!1,te,ne),y.beginPath(),Jn=Kt=Math.floor((Te-b)/b);Jn<=Kt+ye;Jn++)Zn=Jn*b+Te,0<=Zn&&Zn<=he&&wm(Jn,At,Ft,_t)&&(y.moveTo(0,Zn),y.lineTo(se,Zn));y.stroke(),y.Se()}else if(Kt.figure==="BarV"&&Kt.fill!==null)for(mo(a,y,Kt.fill,!0,!1,te,ne),Kt=Kt.width,isNaN(Kt)&&(Kt=E),Zn=Jn=Math.floor((Ge-E)/E);Zn<=Jn+pe;Zn++){var Tn=Zn*E+Ge;0<=Tn+Kt&&Tn<=se&&wm(Zn,At,Ft,_t)&&y.fillRect(Tn,0,Kt,he)}else if(Kt.figure==="BarH"&&Kt.fill!==null)for(mo(a,y,Kt.fill,!0,!1,te,ne),Kt=Kt.height,isNaN(Kt)&&(Kt=b),Zn=Jn=Math.floor((Te-b)/b);Zn<=Jn+ye;Zn++)Tn=Zn*b+Te,0<=Tn+Kt&&Tn<=he&&wm(Zn,At,Ft,_t)&&y.fillRect(0,Tn,se,Kt);Rn&&y.fs(),bt!==1&&(y.globalAlpha=Bt)}}y.restore(),y.Vc(!1)};function wm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Pm(){this.xa="Base"}en(Pm,Wo),Pm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof di||a instanceof Mn){var ne=null,se=null;if(a instanceof Mn&&(ne=a),a instanceof di&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Mn){var he=ne;if(te===0)wi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pe=a instanceof di?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=he.points,Te=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var Ge=y.height,Xe=a.j;if(Xe.length=0,pe!==null){i1(a,se,Ge,pe);var Je=pe.measuredBounds;x.ed(Je),Xe.push(Je)}Je=xr.alloc();for(var it=lt.alloc(),Mt=lt.alloc(),bt=0;bt<te;bt++){var At=b[bt];if(At!==pe)if(At.isPanelMain&&At instanceof Dr){i1(a,se,Ge,At);var Ft=At.measuredBounds;x.ed(Ft),Xe.push(Ft)}else if(2>Te)At.measure(1/0,1/0,0,0),Ft=At.measuredBounds,x.ed(Ft),Xe.push(Ft);else{var Bt=At.segmentIndex,_t=At.segmentFraction,Kt=At.alignmentFocus;Kt.Mc()&&(Kt=Fr);var Rn=At.segmentOrientation,Jn=At.segmentOffset;if(isNaN(Bt)){var Zn=he.ua;Ft=Bn(),Zn.Qu(_t,Ft);var Tn=lt.allocAt(Ft[0],Ft[1]);if(Tn.add(he.i(0)),Zn.type===kn.j?Tn.offset(-Zn.startX,-Zn.startY):(Zn=Zn.figures.first(),Zn!==null&&Tn.offset(-Zn.startX,-Zn.startY)),Zn=Ft[2],Rn!==Qa){var hn=he.computeAngle(At,Rn,Zn);At.Kb=hn}hn=Tn.x-y.x;var kr=Tn.y-y.y;lt.free(Tn),Un(Ft)}else if(Bt<-Te||Bt>=Te)Ft=lt.alloc(),he.vg(),he.computeMidPoint(Ft),Zn=he.midAngle,Rn!==Qa&&(hn=he.computeAngle(At,Rn,Zn),At.Kb=hn),hn=Ft.x-y.x,kr=Ft.y-y.y,lt.free(Ft);else{if(hn=0,0<=Bt?(kr=ye.M(Bt),Ft=Bt<Te-1?ye.M(Bt+1):kr):(hn=Te+Bt,kr=ye.M(hn),Ft=0<hn?ye.M(hn-1):kr),kr.Xa(Ft)){0<=Bt?(Zn=0<Bt?ye.M(Bt-1):kr,hn=Bt<Te-2?ye.M(Bt+2):Ft):(Zn=hn<Te-1?ye.M(hn+1):kr,hn=1<hn?ye.M(hn-2):Ft),Tn=Zn.Bf(kr);var wr=Ft.Bf(hn);Zn=Tn>wr+10?0<=Bt?Zn.ab(kr):kr.ab(Zn):wr>Tn+10?0<=Bt?Ft.ab(hn):hn.ab(Ft):0<=Bt?Zn.ab(hn):hn.ab(Zn)}else Zn=0<=Bt?kr.ab(Ft):Ft.ab(kr);Rn!==Qa&&(hn=he.computeAngle(At,Rn,Zn),At.Kb=hn),hn=kr.x+(Ft.x-kr.x)*_t-y.x,kr=kr.y+(Ft.y-kr.y)*_t-y.y}At.measure(1/0,1/0,0,0),Ft=At.measuredBounds,Tn=At.naturalBounds;var mi=0;At instanceof Dr&&(mi=At.strokeWidth),wr=Tn.width+mi;var Ui=Tn.height+mi;Je.reset(),Je.translate(-Ft.x,-Ft.y),Je.scale(At.scale,At.scale),Je.rotate(Rn===Qa?At.angle:Zn,wr/2,Ui/2),Rn!==rg&&Rn!==og||Je.rotate(90,wr/2,Ui/2),Rn!==ig&&Rn!==ag||Je.rotate(-90,wr/2,Ui/2),Rn===Qm&&(45<Zn&&135>Zn||225<Zn&&315>Zn)&&Je.rotate(-Zn,wr/2,Ui/2),Tn=new Xt(0,0,wr,Ui),it.xi(Tn,Kt),Je.Ga(it),Kt=-it.x+mi/2*At.scale,At=-it.y+mi/2*At.scale,Mt.assign(Jn),mi=isNaN(Jn.x);var $o=isNaN(Jn.y);if(mi||$o){wr=wr/2+3,Ui=Ui/2+3;var ea=45<=Zn&&135>=Zn,Ra=225<=Zn&&315>=Zn;Rn===Qa&&(ea||Ra)?(Mt.x=$o?wr:Jn.y,Mt.y=mi?Ui:Jn.x,ea?0<=Bt||isNaN(Bt)&&.5>_t||!mi||(Mt.y=-Ui):Ra&&((0<=Bt||isNaN(Bt)&&.5>_t)&&mi&&(Mt.y=-Ui),$o&&(Mt.x=-wr))):(mi&&(Mt.x=0<=Bt||isNaN(Bt)&&.5>_t?wr:-wr),$o&&(Mt.y=-Ui),Mt.rotate(Zn))}else Mt.rotate(Zn);hn+=Mt.x,kr+=Mt.y,Tn.set(Ft),Tn.h(hn+Kt,kr+At,Ft.width,Ft.height),Xe.push(Tn),x.ed(Tn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),wi(E,x.width||0,x.height||0),xr.free(Je),lt.free(it),lt.free(Mt)}}}},Pm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof di||a instanceof Mn){var b=a,E=null;a instanceof di&&(E=a,b=E.adornedPart);var te=a instanceof di?null:b.path,ne=a.j;if(ne.length!==0){var se=0;if(te!==null&&se<ne.length){var he=ne[se];se++,te.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}for(he=0;he<x;he++){var pe=y[he];if(pe!==te&&se<ne.length){var ye=ne[se];se++,pe.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Mn)for(te=a.labelNodes;te.next();){var Te=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var Ge=ne.alignmentFocus;if(pe=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(se)){var Xe=Te.ua,Je=Bn();Xe.Qu(he,Je);var it=lt.allocAt(Je[0],Je[1]);it.add(Te.i(0)),Xe.type===kn.j||(Xe=Xe.figures.first()),it.offset(-Xe.startX,-Xe.startY),Xe=Je[2],pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=it.x;var Mt=it.y;lt.free(it),Un(Je)}else if(se<-x||se>=x)Je=lt.alloc(),Xe=Te,Mt=Je,Xe.vg(),Xe.computeMidPoint(Mt),Xe=Te.midAngle,pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=Je.x,Mt=Je.y,lt.free(Je);else{if(it=0,0<=se?(Je=y.s[se],Mt=se<x-1?y.s[se+1]:Je):(it=x+se,Je=y.s[it],Mt=0<it?y.s[it-1]:Je),Je.Xa(Mt)){0<=se?(Xe=0<se?y.s[se-1]:Je,it=se<x-2?y.s[se+2]:Mt):(Xe=it<x-1?y.s[it+1]:Je,it=1<it?y.s[it-2]:Mt);var bt=Xe.Bf(Je),At=Mt.Bf(it);Xe=bt>At+10?0<=se?Xe.ab(Je):Je.ab(Xe):At>bt+10?0<=se?Mt.ab(it):it.ab(Mt):0<=se?Xe.ab(it):it.ab(Xe)}else Xe=0<=se?Je.ab(Mt):Mt.ab(Je);pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=Je.x+(Mt.x-Je.x)*he,Mt=Je.y+(Mt.y-Je.y)*he}if(Ge.ys())ne.location=new lt(Te,Mt);else{Ge.Mc()&&(Ge=Fr),Je=xr.alloc(),Je.reset(),Je.scale(ne.scale,ne.scale),Je.rotate(ne.angle,0,0);var Ft=ne.naturalBounds;it=Xt.allocAt(0,0,Ft.width,Ft.height),bt=lt.alloc(),bt.xi(it,Ge),Je.Ga(bt),Ge=-bt.x,At=-bt.y;var Bt=Ft.width,_t=Ft.height;Ft=lt.alloc(),Ft.assign(ye);var Kt=isNaN(ye.x),Rn=isNaN(ye.y);if(Kt||Rn){Bt=Bt/2+3,_t=_t/2+3;var Jn=45<=Xe&&135>=Xe,Zn=225<=Xe&&315>=Xe;pe===Qa&&(Jn||Zn)?(Ft.x=Rn?Bt:ye.y,Ft.y=Kt?_t:ye.x,Jn?0<=se||isNaN(se)&&.5>he||!Kt||(Ft.y=-_t):Zn&&((0<=se||isNaN(se)&&.5>he)&&Kt&&(Ft.y=-_t),Rn&&(Ft.x=-Bt))):(Kt&&(Ft.x=0<=se||isNaN(se)&&.5>he?Bt:-Bt),Rn&&(Ft.y=-_t),Ft.rotate(Xe))}else Ft.rotate(Xe);Te+=Ft.x,Mt+=Ft.y,Je.pp(it),Ge+=it.x,At+=it.y,se=lt.allocAt(Te+Ge,Mt+At),ne.move(se),lt.free(se),lt.free(Ft),lt.free(bt),Xt.free(it),xr.free(Je)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),lt.free(b)}};function i1(a,y,x,b){if(_s(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof di&&a.type===Pn.Link&&a.adornedObject instanceof Dr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Mn&&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 di&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Bo(b,!1)}}function Kp(){this.xa="Base"}en(Kp,Wo),Kp.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,pe=he.right+he.left,ye=he.top+he.bottom;se.measure(y,x,te,ne);var Te=se.measuredBounds,Ge=new Xt(-he.left,-he.top,Math.max(Te.width+pe,0),Math.max(Te.height+ye,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Xe=se.geometry,Je=se.strokeWidth,it=Xe.flattenedSegments,Mt=Xe.flattenedLengths,bt=Xe.flattenedTotalLength,At=it.length,Ft=0,Bt=0,_t=Bn(),Kt=0;Kt<At;Kt++){var Rn=it[Kt],Jn=[];Bt=Ft=0;for(var Zn=Rn.length,Tn=0;Tn<Zn;Tn+=2){var hn=Rn[Tn],kr=Rn[Tn+1];if(Tn!==0){var wr=180*Math.atan2(kr-Bt,hn-Ft)/Math.PI;0>wr&&(wr+=360),Jn.push(wr)}Ft=hn,Bt=kr}_t.push(Jn)}if(a.graduatedIntervals===null){for(var mi=[],Ui=a.O.s,$o=Ui.length,ea=0;ea<$o;ea++){var Ra=Ui[ea],Jo=[];if(mi.push(Jo),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Lo=0;Lo<$o;Lo++)if(Lo!==ea){var Gl=Ui[Lo];if(Gl.visible&&Ra.constructor===Gl.constructor){var _a=Gl.interval;_a>Nh&&Jo.push(_a)}}}}}a.graduatedIntervals=mi}var Ah=a.graduatedIntervals,Ws=a.O.s,ml=Ws.length,Ls=0,ys=0,mc=bt;a.graduatedMarks=[];for(var Ul,Qd=0;Qd<ml;Qd++){var Ns=Ws[Qd];if(Ul=[],Ns.visible&&Ns!==se){var za=Math.abs(Ns.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*bt/a.graduatedRange&&Ns.graduatedSkip===null)){var Vf=Mt[0][0],ou=0,Ss=0;ys=bt*Ns.graduatedStart-1e-4,mc=bt*Ns.graduatedEnd+1e-4;var tf=Ng*za,As=a.graduatedTickBase;if(As<a.graduatedMin){var vc=(a.graduatedMin-As)/tf;vc=vc%1===0?vc:Math.floor(vc+1),As+=vc*tf}else As>a.graduatedMin+tf&&(As-=Math.floor((As-a.graduatedMin)/tf)*tf);for(var z0=Ah[Qd],Ag=As,Gy=1e-6*a.graduatedMax,Lu=1;As<=a.graduatedMax+Gy;Lu++){e:{for(var Xu=z0.length,Zf=0;Zf<Xu;Zf++){var yc=(As-a.graduatedTickBase)%(z0[Zf]*a.graduatedTickUnit),qd=1e-6*a.graduatedTickUnit;if(yc<qd&&yc>-qd){var Sc=!1;break e}}Sc=!0}if(Sc&&(As>a.graduatedMax&&(As=a.graduatedMax),Ns.graduatedSkip===null||Ns instanceof Zi&&!Ns.graduatedSkip(As,Ns)||Ns instanceof Dr&&!Ns.graduatedSkip(As,Ns))&&(Ls=(As-a.graduatedMin)*bt/a.graduatedRange,Ls>bt&&(Ls=bt),ys<=Ls&&Ls<=mc)){for(var Nu=_t[ou][Ss],jh=Mt[ou][Ss];ou<Mt.length;){for(;Ls>Vf&&Ss<Mt[ou].length-1;)Ss++,Nu=_t[ou][Ss],jh=Mt[ou][Ss],Vf+=jh;if(Ls<=Vf)break;ou++,Ss=0,Nu=_t[ou][Ss],jh=Mt[ou][Ss],Vf+=jh}var xs=it[ou],au=xs[2*Ss],G0=xs[2*Ss+1],Yu=(Ls-(Vf-jh))/jh,ep=new lt(au+(xs[2*Ss+2]-au)*Yu+Je/2-Xe.bounds.x,G0+(xs[2*Ss+3]-G0)*Yu+Je/2-Xe.bounds.y);ep.scale(se.scale,se.scale);e:{var Wl=Nu,nf=_t[ou];if(!(.5005>Yu&&.4995<Yu)){var su=Wl;if(.5>Yu?0<Ss?su=nf[Ss-1]:Gt.$(xs[0],xs[xs.length-2])&&Gt.$(xs[1],xs[xs.length-1])&&(su=nf[nf.length-1]):.5<Yu&&(Ss+1<nf.length?su=nf[Ss+1]:Gt.$(xs[0],xs[xs.length-2])&&Gt.$(xs[1],xs[xs.length-1])&&(su=nf[0])),Wl!==su){var Xf=Math.abs(Wl-su);if(180<Xf&&(Wl<su?Wl+=360:su+=360,Xf=Math.abs(Wl-su)),5e-4>Yu||.9995<Yu){Nu=(Wl+su)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-Yu);Nu=(Wl*tp+su*(1-tp))%360;break e}}}Nu=Wl}if(Ns instanceof Zi){var Nl="";Ns.graduatedFunction!==null?(Nl=Ns.graduatedFunction(As,Ns),Nl=Nl!=null?Nl.toString():""):Nl=(+As.toFixed(2)).toString(),Nl!==""&&Ul.push({$l:ep,angle:Nu,text:Nl})}else Ul.push({$l:ep,angle:Nu})}As=Ag+Lu*tf}}}a.graduatedMarks.push(Ul)}Un(_t);var ca=a.graduatedMarks;if(ca!==null)for(var jg=b.length,rs=0;rs<jg;rs++){var No=b[rs],is=ca[rs];if(No.visible&&No!==se&&is.length!==0){if(No instanceof Dr){var $u=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=yi);var Uy=No.angle;No.Kb=0,No.measure(1/0,1/0,0,0),No.Kb=Uy;var U0=No.measuredBounds,np=U0.width,of=U0.height,Yf=Xt.allocAt(0,0,np,of),ws=lt.alloc();ws.xi(Yf,rf),Xt.free(Yf);for(var Ju=-ws.x,Hl=-ws.y,rl=new Xt,xc=is.length,rp=0;rp<xc;rp++)for(var wc=is[rp],W0=wc.$l.x,ip=wc.$l.y,So=wc.angle,Al=0;4>Al;Al++){switch(Al){case 0:ws.h(Ju,Hl);break;case 1:ws.h(Ju+np,Hl);break;case 2:ws.h(Ju,Hl+of);break;case 3:ws.h(Ju+np,Hl+of)}ws.rotate(So+No.angle),ws.offset(W0,ip),rp===0&&Al===0?rl.h(ws.x,ws.y,0,0):rl.Ye(ws),ws.offset(-W0,-ip),ws.rotate(-So-No.angle)}lt.free(ws),$u.graduatedBounds!==null&&$u.graduatedBounds.push(rl),ei(Oh,rl.x,rl.y,rl.width,rl.height)}else if(No instanceof Zi){var vl=a,H0=E;vl.temporaryTextBlock===null&&(vl.temporaryTextBlock=new Zi);var js=vl.temporaryTextBlock;S1(js,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=yi);for(var yl=No.segmentOrientation,op=No.segmentOffset,Pc=new Xt,Og=0,ap=0,lu=0,af=0,bc=0,sp=is.length,Dh=0;Dh<sp;Dh++){var Au=is[Dh];Og=Au.$l.x,ap=Au.$l.y,lu=Au.angle,bc=af=No.angle,yl!==Qa&&(bc=yl===ng||yl===Jm?lu+No.angle:lu,af=Mn.computeAngle(yl,bc)),js.Kb=af,js.text=Au.text||"",js.measure(1/0,1/0,0,0);var Bh=js.measuredBounds,Qu=js.naturalBounds,Ih=Qu.width,sf=Qu.height,Kl=xr.alloc();Kl.reset(),Kl.translate(-Bh.x,-Bh.y),Kl.scale(js.scale,js.scale),Kl.rotate(bc,Ih/2,sf/2),yl!==rg&&yl!==og||Kl.rotate(90,Ih/2,sf/2),yl!==ig&&yl!==ag||Kl.rotate(-90,Ih/2,sf/2),yl===Qm&&(45<lu&&135>lu||225<lu&&315>lu)&&Kl.rotate(-lu,Ih/2,sf/2);var $f=Xt.allocAt(0,0,Ih,sf),Rh=lt.alloc();Rh.xi($f,Fh),Kl.Ga(Rh);var Jf=-Rh.x,Wy=-Rh.y,qu=lt.alloc();qu.assign(op),isNaN(qu.x)&&(qu.x=Ih/2+3),isNaN(qu.y)&&(qu.y=-(sf/2+3)),qu.rotate(lu),Og+=qu.x+Jf,ap+=qu.y+Wy;var lf=new Xt(Og,ap,Bh.width,Bh.height),Fg=new Xt(Bh.x,Bh.y,Bh.width,Bh.height),Hy=new Xt(Qu.x,Qu.y,Qu.width,Qu.height);Au.Sz=af,Au.lineCount=js.lineCount,Au.lines=[js.Cb,js.Ih,js.df,js.Le,js.Qc,js.Qb,js.ze],Au.actualBounds=lf,Au.measuredBounds=Fg,Au.naturalBounds=Hy,Dh===0?Pc.assign(lf):Pc.ed(lf),lt.free(qu),lt.free(Rh),Xt.free($f),xr.free(Kl)}vl.graduatedBounds!==null&&vl.graduatedBounds.push(Pc),ei(H0,Pc.x,Pc.y,Pc.width,Pc.height)}Bo(No,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,pe=0;pe<he;pe++){var ye=y[pe];se=E[pe],ye.visible&&ye!==b&&se.length!==0&&(se=te[ne],ne++,ye.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof ks,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,pe=a.graduatedMarks,ye=he.length,Te=0;Te<ye;Te++){var Ge=he[Te],Xe=pe[Te],Je=Xe.length;if(Ge.visible&&Ge!==te&&Xe.length!==0){if(Ge instanceof Dr){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var it=Ge.measuredBounds,Mt=Ge.strokeWidth*Ge.scale,bt=Ge.alignmentFocus;bt.Mc()&&(bt=yi);for(var At=0;At<Je;At++){var Ft=Xe[At].$l,Bt=Xe[At].angle,_t=bt,Kt=Ge.Ab;Kt.reset(),Kt.translate(Ft.x+se.x,Ft.y+se.y),Kt.rotate(Bt+Ge.angle,0,0),Kt.translate(-it.width*_t.x+_t.offsetX+Mt/2,-it.height*_t.y+_t.offsetY+Mt/2),Kt.scale(Ge.scale,Ge.scale),cl(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,Ys(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Zi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Zi),it=a.temporaryTextBlock,S1(it,Ge),Mt=0;Mt<Je;Mt++)bt=Xe[Mt],bt.actualBounds&&bt.measuredBounds&&bt.naturalBounds&&(it.ec=bt.text||"",it.Kb=bt.Sz||0,it.Gc=bt.lineCount||0,At=bt.lines,At!==void 0&&(it.Cb=At[0],it.Ih=At[1],it.df=At[2],it.Le=At[3],it.Qc=At[4],it.Qb=At[5],it.ze=At[6]),bt.naturalBounds&&(it.dc=bt.naturalBounds),bt.actualBounds&&(At=bt.actualBounds,it.arrange(At.x,At.y,At.width,At.height)),At=bt.actualBounds,it.arrange(At.x,At.y,At.width,At.height),Ft=bt.measuredBounds,bt=bt.naturalBounds,Bt=it.Ab,Bt.reset(),Bt.translate(At.x+se.x,At.y+se.y),Bt.translate(-Ft.x,-Ft.y),it.no(Bt,bt.x,bt.y,bt.width,bt.height),cl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Ys(it,!1),it.Ng=Ge.part,it.Me=Ge.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Pn(a,y){if(zt.call(this),this.na=null,a===void 0)this.na=Pn.Position;else if(typeof a=="string"){var x=Cl.I(a);x!==null&&(this.na=x)}else a instanceof Wo?this.na=a:a&&(this.na=Pn.Position,y=a);this.na===null&&jt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Pn.Grid?1048576:0),this.O=new pn,this.yb=ta,this.Tm=Zo,this.Uf=Nr,this.$g=null,this.$e="",this.jg=new Xt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=rr,this.jn=xi,this.kn=On,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}en(Pn,zt),Pn.prototype.cloneProtected=function(a){zt.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},Pn.prototype.Af=function(a){zt.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},Pn.prototype.copy=function(){var a=zt.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 te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof Gn&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(wo,"elements",a,null,E,null,ne)}}return a}return null},et=Pn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+Jr(this)},et.Pn=function(a){zt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},et.hh=function(a,y){if(this.na===Pn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Pn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Pn.Table)if(a.yc(),a instanceof ks){var x=a.yd;a.yd=um(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Pn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&bm(a,y,!0,x,!0),b!==null&&bm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&bm(a,y,!0,x,!1),b!==null&&bm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var pe=b[he];if(pe!==void 0&&pe.actual!==0)if(se)se=!1;else{if(x){if(pe.position>ne.height)continue}else if(pe.position>ne.width)continue;var ye=pe.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Te=pe.separatorStroke;if(Te===null&&(Te=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Te!==null){mo(a,y,Te,!1,!1,ne,te),Te=!1;var Ge=pe.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Te=!0,y.js(Ge,0)),y.beginPath(),Ge=pe.position+ye,x?Ge>ne.height&&(ye-=Ge-ne.height):Ge>ne.width&&(ye-=Ge-ne.width),pe=pe.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(pe+=ye.top,Ge=ne.width-ye.right,y.moveTo(ye.left,pe),y.lineTo(Ge,pe)):(pe+=ye.left,Ge=ne.height-ye.bottom,y.moveTo(pe,ye.top),y.lineTo(pe,Ge)),y.stroke(),y.Se(),Te&&y.fs()}}}}function bm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),pe=a1(a,!1),ye=0;ye<te;ye++){var Te=b[ye];if(Te!==void 0&&Te.background!==null&&Te.coversSeparators!==E&&Te.actual!==0){var Ge=x?ne.height:ne.width;if(!(Te.position>Ge)){var Xe=Te.Wc(),Je=Te.separatorStrokeWidth;isNaN(Je)&&(Je=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Te.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Te.index===(x?he:pe))&&(Je=0),Xe-=Je,Je=Te.position+Je,Xe+=Te.actual,Je+Xe>Ge&&(Xe=Ge-Je),0>=Xe||(Ge=a.yb,mo(a,y,Te.background,!0,!1,se,ne),x?y.fillRect(Ge.left,Je+Ge.top,ne.width-(Ge.left+Ge.right),Xe):y.fillRect(Je+Ge.left,Ge.top,Xe,ne.height-(Ge.top+Ge.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 mv(a){return a==="LineV"||a==="BarV"}et.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Pn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Pn.Grid||this.na===Pn.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},et.nk=function(){return!0},et.$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,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else zt.prototype.$o.call(this,a,y,x,b)},et.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,pe=-ne.m12*se,ye=-ne.m21*se,Te=ne.m11*se,Ge=se*(ne.m21*ne.dy-ne.m22*ne.dx),Xe=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Gt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*ye+Ge,se=a*pe+y*Te+Xe,a=x*he+b*ye+Ge,he=x*pe+b*Te+Xe,E.h(0,0),x=this.naturalBounds,te=Gt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,ye=pe=0,Te=1,Xe=Ge=0),se=a*he+y*ye+Ge,a=a*pe+y*Te+Xe,he=x*he+b*ye+Ge,x=x*pe+b*Te+Xe,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),pe=!1,Te=this.O.s,Xe=Te.length,ye=lt.alloc(),Ge=null,y=1/0;var Je=null,it=this.isClipping&&this.na===Pn.Spot;it&&(Je=lt.alloc(),Ge=this.Pb(),(pe=Ge.Sj(se,a,he,x,Je))&&(y=(se-Je.x)*(se-Je.x)+(a-Je.y)*(a-Je.y)));for(var Mt=0;Mt<Xe;Mt++){var bt=Te[Mt];bt.visible&&bt!==Ge&&bt.Sj(se,a,he,x,ye)&&(pe=!0,bt=(se-ye.x)*(se-ye.x)+(a-ye.y)*(a-ye.y),bt<b&&(b=bt,E.set(ye)))}return it&&(y>b&&E.set(Je),lt.free(Je)),lt.free(ye),te&&E.transform(ne),pe},et.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();zt.prototype.Gj.call(this)},et.v=function(a){if(!_s(this)){zt.prototype.v.call(this,a),a=null,(this.na===Pn.Auto||this.na===Pn.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 te=ss(E,!1);(E instanceof Ja||E instanceof Pn||E instanceof Zi||te!==fn)&&E.v(!0)}}}},et.Uj=function(){if(!_s(this)){Bo(this,!0),yu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},et.Uk=function(){if(!(this.l&2048)){cl(this,!0),Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},et.Wu=function(){Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},et.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var pe=this.O.s;pe.length!==0&&this.na.measure(this,a,y,pe,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),wi(E,a,he),wi(this.naturalBounds,a,he),this.Ge(0,0,a,he)},et.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 Ku(a){return a.part!==null?a.part.locationObject:null}et.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=ss(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,se=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=fn),a){case fn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case xn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case or:this.v(!0),this.measure(x+se,te+ne,0,0);break;case pr:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},et.gh=function(a){var y=this.naturalBounds,x=Ku(this);if($i(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=lt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Ln(E.set(a),te.transform),te.ca(E)))return lt.free(E),!0}return lt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},et.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},et.qm=function(a,y){if(y(this,a),a instanceof Pn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof Pn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Pn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}et.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Pn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}et.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Pn){var te=E.fb(a);if(te!==null)return te}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 Pn?x=Math.max(x,h1(E)):E instanceof Dr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===Pn.TableRow||this.type===Pn.TableColumn)};function xh(a){return a.type===Pn.TableRow||a.type===Pn.TableColumn}et.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ya(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Ln(lt.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,pe=5;if(se!==null&&(he=se.Ql("extraTouchArea"),pe=he/2),$i(-(pe*E),-(pe*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(se=lt.alloc(),pe=(he=this.isClipping&&this.na===Pn.Spot)?this.Pb():null,he&&(pe.se()?Ln(se.set(a),pe.transform):se.set(a),!pe.ca(se)))return lt.free(se),te||lt.free(ne),null;for(var Te=Ku(this);ye--;){var Ge=E[ye];if((Ge.visible||Ge===Te)&&(Ge.se()?Ln(se.set(a),Ge.transform):se.set(a),!he||Ge!==pe)){var Xe=null;if(Ge instanceof Pn?Xe=Ge.ic(se,y,x):Ge.pickable===!0&&Ge.ca(se)&&(Xe=Ge),Xe!==null&&(y!==null&&(Xe=y(Xe)),Xe!==null&&(x===null||x(Xe))))return lt.free(se),te||lt.free(ne),Xe}}lt.free(se)}return this.background===null&&this.areaBackground===null?(te||lt.free(ne),null):(a=$i(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||lt.free(ne),a)}return te||lt.free(ne),null},et.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,te=this.se(),ne=te?a:Ln(lt.allocAt(a.x,a.y),this.transform);if(E=$i(0,0,E.width,E.height,ne.x,ne.y),xh(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,pe=lt.alloc(),ye=Ku(this);he--;){var Te=se[he];if(Te.visible||Te===ye){Te.se()?Ln(pe.set(a),Te.transform):pe.set(a);var Ge=Te;Te=Te instanceof Pn?Te:null,(Te!==null?Te.ji(pe,y,x,b):Ge.ca(pe))&&Ge.pickable!==!1&&(y!==null&&(Ge=y(Ge)),Ge===null||x!==null&&!x(Ge)||b.add(Ge))}}lt.free(pe)}return te||lt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||lt.free(ne),!1},et.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=xr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&xr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Ku(this),he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===se){var Te=ye.actualBounds,Ge=this.naturalBounds;Te.x>Ge.width||Te.y>Ge.height||0>Te.x+Te.width||0>Te.y+Te.height||(Te=ye,ye=ye instanceof Pn?ye:null,Ge=xr.alloc(),Ge.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,Ge):Yo(Te,a,b,Ge))&&(y!==null&&(Te=y(Te)),Te===null||x!==null&&!x(Te)||E.add(Te)),xr.free(Ge))}}return te===void 0&&xr.free(ne),b}return te===void 0&&xr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Pn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}et.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,se=this.se(),he=se?a:Ln(lt.allocAt(a.x,a.y),this.transform),pe=se?y:Ln(lt.allocAt(y.x,y.y),this.transform),ye=he.Bf(pe),Te=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||In(he.x,he.y,0,0,0,ne.height)<=ye||In(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||In(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||In(he.x,he.y,ne.width,0,0,0)<=ye;if(ne=he.zd(0,0)<=ye&&he.zd(0,ne.height)<=ye&&he.zd(ne.width,0)<=ye&&he.zd(ne.width,ne.height)<=ye,se||(lt.free(he),lt.free(pe)),Te){if(!this.isAtomic){he=lt.alloc(),pe=lt.alloc(),ye=Ku(this);for(var Ge=this.O.s,Xe=Ge.length;Xe--;){var Je=Ge[Xe];if(Je.visible||Je===ye){var it=Je.actualBounds,Mt=this.naturalBounds;(!se||!(it.x>Mt.width||it.y>Mt.height||0>it.x+it.width||0>it.y+it.height))&&(Je.se()?(it=Je.transform,Ln(he.set(a),it),Ln(pe.set(y),it)):(he.set(a),pe.set(y)),it=Je,Je=Je instanceof Pn?Je:null,(Je!==null?Je.og(he,pe,x,b,E,te):it.tx(he,pe,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||te.add(it)))}}lt.free(he),lt.free(pe)}return E?Te:ne}return!1};function yv(a){var y=null;return a instanceof Dr&&(y=a.spot1,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Xr),y}function Sv(a){var y=null;return a instanceof Dr&&(y=a.spot2,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ni),y}et.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},et.M=function(a){return this.O.M(a)},et.Gb=function(a,y){y instanceof hr&&jt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&jt("Cannot make a Panel contain itself: "+this.toString()),jt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&jt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Pn.Grid||y instanceof Dr||jt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Pn.Graduated||y instanceof Dr||y instanceof Zi||jt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new Zt),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,se=ne.length,he=0;he<se;he++)if(ne[he]===y){te=he;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else jt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),_s(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Pn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Gn&&(x.Te=!0),x.Te&&x instanceof Gn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Eo,"elements",this,y,null,b,null),x.cb(wo,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}et.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)},et.mb=function(a){0<=a&&this.pc(a,!0)},et.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Bo(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof Gn&&(b instanceof Pn?b.qm(b,function(ne,se){Wv(te,se,y)}):Wv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Eo,"elements",this,b,null,a,null))},et.Fb=function(a){0>a&&jn(a,">= 0",Pn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(wo,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&jn(a,">= 0",Pn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&jn(a,">= 0",Pn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(wo,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&jn(a,">= 0",Pn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},et.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Io(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},et.nz=function(a){if(0>a||this.type!==Pn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.fz=function(a){if(0>a||this.type!==Pn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.Fz=function(a,y){if(y===void 0&&(y=new lt(NaN,NaN)),this.type!==Pn.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)},et.Gz=function(a){if(this.type!==Pn.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 dl(a){var y=a.allBindings;if(y===null)a.data!==null&&jt("Template cannot have .data be non-null: "+a),a.allBindings=y=new pn;else if(y._isFrozen)return;var x=new pn;xv(a,!1),a.qm(a,function(pe,ye){ye.th();var Te=ye.localBindings;if(Te!==null)for(Af(ye,!1),Te=Te.iterator;Te.next();){var Ge=Te.value;Ge.mode===pg&&Af(ye,!0);var Xe=Ge.sourceName;Xe!==null&&(Xe==="/"&&xv(pe,!0),Xe=TS(Ge,pe,ye),Xe!==null&&(x.add(Xe),Xe.srcBindings===null&&(Xe.srcBindings=new pn),Xe.srcBindings.add(Ge))),y.add(Ge)}if(ye instanceof Pn&&ye.type===Pn.Table){if(0<ye.rowCount){for(pe=ye.rowDefs,Te=pe.length,Ge=0;Ge<Te;Ge++)if(Xe=pe[Ge],Xe!==void 0&&Xe.be!==null)for(var Je=Xe.be.iterator;Je.next();){var it=Je.value;it.xd=Xe,it.to=2,it.wl=Xe.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,pe=ye.length,Te=0;Te<pe;Te++)if(Ge=ye[Te],Ge!==void 0&&Ge.be!==null)for(Xe=Ge.be.iterator;Xe.next();)Je=Xe.value,Je.xd=Ge,Je.to=1,Je.wl=Ge.index,y.add(Je)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Af(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new pn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Pn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):Cn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Io?(ne=Jr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof zt?(ne=Jr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):jt("Unknown type of binding target: "+te)}y.freeze(),a instanceof hr&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Pn&&(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&&dl(y),y},et.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 te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Pn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},et.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,te=null;E<x&&(te=a[E],!(te instanceof Pn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof Pn)||te.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===Pn.Spot||a.type===Pn.Auto)return Math.min(a.O.length,1);if(a.type===Pn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Dr&&b.isPanelMain))break}return x}return a.type===Pn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Pn&&xh(a))?1:0}et.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Cm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Pn){if(ne.data!==te){var se=Pv(a,ne.data),he=Pv(a,te),pe=he!==se;pe||(se=bv(a,se),pe=bv(a,he)!==se),pe?(a.pc(b,!1),Cm(a,te,E,!1)):ne.data=te}}else Cm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),_s(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Gn&&(y.Te=!0),y.Te&&y instanceof Gn&&(y.wc=null))}}function Cm(a,y,x,b){if(!(y==null||0>x)){var E=Pv(a,y);if(E=bv(a,E),E!==null){if(dl(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Zt),a.ge.add(y,E)),te=x+Vp(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Pn){var E=y,te=x;b.type===Pn.TableRow?b.row=E:b.type===Pn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function Pv(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=Co(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;jt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function bv(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,Cn('No item template Panel found for category "'+y+'" on '+a),Cn(" Using default item template."),a=new Pn,y=new Zi,y.bind(new Mo("text","",Ar)),a.add(y),m1=a),b=m1)),b}function Em(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Pn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Pn&&!te.isEnabled||Em(a,te,x)}}}function ru(a,y){y.name=a,Cl.add(a,y)}vn.Object.defineProperties(Pn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Pn.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&&jn(a,">= 0",Pn,"padding"),a=new Ir(a)):(0>a.left&&jn(a.left,">= 0",Pn,"padding:value.left"),0>a.right&&jn(a.right,">= 0",Pn,"padding:value.right"),0>a.top&&jn(a.top,">= 0",Pn,"padding:value.top"),0>a.bottom&&jn(a.bottom,">= 0",Pn,"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:ta},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Qs),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 ki)&&(a instanceof ki&&a.freeze(),this.T===null&&(this.T=new Qs),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 Qs),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 te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||jt("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Qs),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 ki)&&(a instanceof ki&&a.freeze(),this.T===null&&(this.T=new Qs),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 Qs),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 te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||jt("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Qs),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 Qs),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||jt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||jt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(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 Vu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&eo(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 Vu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&eo(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 Vu),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 Vu),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 Vu,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 Vu,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 Vu,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 Vu,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 Qs),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Qs),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Mm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Qs),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Mm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Qs),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&jt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Qs),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&jt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Qs),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 hr&&!(this instanceof di);dl(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Mn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof hr&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new jf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Zt}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof hr||a.isPanelMain)&&jt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););Rr(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&&(Rr(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 Tr&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Em(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),vn.Object.defineProperties(Pn,{Position:{get:function(){return Cl.I("Position")}},Horizontal:{get:function(){return Cl.I("Horizontal")}},Vertical:{get:function(){return Cl.I("Vertical")}},Spot:{get:function(){return Cl.I("Spot")}},Auto:{get:function(){return Cl.I("Auto")}},Table:{get:function(){return Cl.I("Table")}},Viewbox:{get:function(){return Cl.I("Viewbox")}},TableRow:{get:function(){return Cl.I("TableRow")}},TableColumn:{get:function(){return Cl.I("TableColumn")}},Link:{get:function(){return Cl.I("Link")}},Grid:{get:function(){return Cl.I("Grid")}},Graduated:{get:function(){return Cl.I("Graduated")}}}),Pn.prototype.rebuildItemElements=Pn.prototype.mv,Pn.prototype.findItemPanelForData=Pn.prototype.sx,Pn.prototype.updateTargetBindings=Pn.prototype.La,Pn.prototype.copyTemplate=Pn.prototype.Uy,Pn.prototype.graduatedValueForPoint=Pn.prototype.Gz,Pn.prototype.graduatedPointForValue=Pn.prototype.Fz,Pn.prototype.findColumnForLocalX=Pn.prototype.fz,Pn.prototype.findRowForLocalY=Pn.prototype.nz,Pn.prototype.addColumnDefinition=Pn.prototype.By,Pn.prototype.addRowDefinition=Pn.prototype.Hy,Pn.prototype.addRowColumnDefinition=Pn.prototype.Gy,Pn.prototype.removeColumnDefinition=Pn.prototype.jA,Pn.prototype.getColumnDefinition=Pn.prototype.Eb,Pn.prototype.removeRowDefinition=Pn.prototype.oA,Pn.prototype.getRowDefinition=Pn.prototype.Fb,Pn.prototype.removeAt=Pn.prototype.mb,Pn.prototype.remove=Pn.prototype.remove,Pn.prototype.insertAt=Pn.prototype.Gb,Pn.prototype.elt=Pn.prototype.M,Pn.prototype.add=Pn.prototype.add,Pn.prototype.findObject=Pn.prototype.fb,Pn.prototype.findInVisualTree=Pn.prototype.Nl,Pn.prototype.walkVisualTreeFrom=Pn.prototype.qm,Pn.prototype.findMainElement=Pn.prototype.Pb;var g1=!1,m1=null,Cl=new Zt;Pn.className="Panel",Pn.definePanelLayout=ru,ru("Position",new fm),ru("Vertical",new pm),ru("Auto",new mm),ru("Link",new Pm);function Vu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Vu.prototype.copy=function(){var a=new Vu;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},Vu.className="GradPanelSettings";function Qs(){this.Pc=[],this.Oc=[],this.j=this.ob=Mm,this.hb=this.Hb=0,this.Qp=ta,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Qs.prototype.copy=function(a){for(var y=new Qs,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Qs.className="TablePanelSettings";function Io(a){Sr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Zo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=Nr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Io.prototype.copy=function(){var a=new Io;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=ur(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=ur(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Io.prototype,et.qb=function(a){a.classType===Io&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Jr(this)},et.wi=function(a){this.Me=a},et.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)},et.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Pn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},et.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(no,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Tm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&jt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new pn),this.be.add(E),this},vn.Object.defineProperties(Io.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&jn(a,">= 0",Io,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&jn(a,">= 0",Io,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&jn(a,">= 0",Io,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&jn(a,">= 0",Io,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof ki&&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 te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||jt("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.background"),a instanceof ki&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var Cv=new Yt(Io,"Default",0),Zp=new Yt(Io,"None",1),Mm=new Yt(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=Cv,Io.None=Zp,Io.ProportionalExtra=Mm;function Dr(a,y){zt.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)}en(Dr,zt),Dr.prototype.cloneProtected=function(a){zt.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=ur(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Xc(a){a.Na===null?a.Na=new Tv:a.Na.nc&&(a.Na=a.Na.copy())}et=Dr.prototype,et.th=function(){zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===fn||a===rr||a===Yr||a===Nr?this.geometryStretch=a:zt.prototype.qb.call(this,a)},et.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Jr(this)};function Nd(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var se=x[0],he=x[1],pe,ye,Te,Ge,Xe,Je,it=0,Mt=Bn(),bt=2;bt<E;bt+=2)pe=x[bt],ye=x[bt+1],Te=pe-se,se=ye-he,Te===0&&(Te=.001),Ge=se/Te,Xe=Math.atan2(se,Te),Je=Math.sqrt(Te*Te+se*se),Mt.push([Te,Xe,Ge,Je]),it+=Je,se=pe,he=ye;se=x[0],he=x[1],Te=b.measuredBounds.width,b instanceof Dr&&(Te-=b.strokeWidth),1>Te&&(Te=1),E=x=Te,pe=ne/2,ye=pe!==0,bt=0,Je=Mt[bt],Te=Je[0],Xe=Je[1],Ge=Je[2],Je=Je[3];for(var At=0;.1<=it;){if(At===0&&(ye?(E=x,E-=pe,it-=pe,ye=!1):E=x,E===0&&(E=1)),E>it){Un(Mt);return}E>Je?(At=E-Je,E=Je):At=0;var Ft=Math.sqrt(E*E/(1+Ge*Ge));if(0>Te&&(Ft=-Ft),se+=Ft,he+=Ge*Ft,a.translate(se,he),a.rotate(Xe),a.translate(-(ne/2),-(te/2)),At===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Xe),a.translate(-se,-he),it-=E,Je-=E,At!==0){if(bt++,bt===Mt.length){Un(Mt);return}Je=Mt[bt],Te=Je[0],Xe=Je[1],Ge=Je[2],Je=Je[3],E=At}}Un(Mt)}}et.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 te=this.actualBounds,ne=this.naturalBounds;b!==null&&mo(this,a,b,!0,!1,ne,te);var se=this.part,he=this.ig;if(x===null||he!==0||se===null||!this.isPanelMain&&se.Pb()!==this||(he=se.type===Pn.Link&&se instanceof di&&se.category==="Selection"&&se.adornedObject instanceof Dr&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(mo(this,a,x,!1,!1,ne,te),a.lineWidth=he,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,se&&y.Gf("drawShadows")&&(te=se.isShadowed),a.Il===!1&&(te=!1),se=!0,x===null||b!==null&&b!=="transparent"||(se=!1),ne=!1,he=this.strokeDashArray,he!==null&&(ne=!0,a.js(he,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 pe=E.startX;he=E.startY;var ye=E.endX,Te=E.endY;E=Math.min(pe,ye);var Ge=Math.min(he,Te);pe=Math.abs(ye-pe),he=Math.abs(Te-he),a.beginPath(),a.rect(E,Ge,pe,he),b!==null&&a.ng(b),x!==null&&(se&&te&&Su(a),a.jk(),se&&te&&Uu(a)),a.Se()}else if(E.type===kn.F)pe=E.startX,he=E.startY,ye=E.endX,Te=E.endY,E=Math.abs(ye-pe)/2,Ge=Math.abs(Te-he)/2,pe=Math.min(pe,ye)+E,he=Math.min(he,Te)+Ge,a.beginPath(),a.moveTo(pe,he-Ge),a.bezierCurveTo(pe+Gt.wg*E,he-Ge,pe+E,he-Gt.wg*Ge,pe+E,he),a.bezierCurveTo(pe+E,he+Gt.wg*Ge,pe+Gt.wg*E,he+Ge,pe,he+Ge),a.bezierCurveTo(pe-Gt.wg*E,he+Ge,pe-E,he+Gt.wg*Ge,pe-E,he),a.bezierCurveTo(pe-E,he-Gt.wg*Ge,pe-Gt.wg*E,he-Ge,pe,he-Ge),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&Su(a),a.jk(),se&&te&&Uu(a)),a.Se();else if(E.type===kn.o)for(E=E.figures,he=E.length,Ge=0;Ge<he;Ge++){pe=E.s[Ge],a.beginPath(),a.moveTo(pe.startX,pe.startY),ye=pe.segments.s,Te=ye.length;for(var Xe=null,Je=0;Je<Te;Je++){var it=ye[Je];switch(it.type){case Fo:a.moveTo(it.endX,it.endY);break;case Ri:a.lineTo(it.endX,it.endY);break;case Go:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ps:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case xo:if(it.radiusX===it.radiusY){var Mt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Mt,(it.startAngle+it.sweepAngle)*Mt,0>it.sweepAngle,Xe!==null?Xe.endX:pe.startX,Xe!==null?Xe.endY:pe.startY)}else if(Xe=Ua(it,pe),Mt=Xe.length,Mt===0)a.lineTo(it.centerX,it.centerY);else for(var bt=0;bt<Mt;bt++){var At=Xe[bt];bt===0&&a.lineTo(At[0],At[1]),a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7])}break;case Cs:if(bt=Mt=0,Xe!==null&&Xe.type===xo){if(Xe=Ua(Xe,pe),At=Xe.length,At===0){a.lineTo(it.endX,it.endY);break}Xe=Xe[At-1]||null,Xe!==null&&(Mt=Xe[6],bt=Xe[7])}else Mt=Xe!==null?Xe.endX:pe.startX,bt=Xe!==null?Xe.endY:pe.startY;if(Xe=Ds(it,pe,Mt,bt),Mt=Xe.length,Mt===0){a.lineTo(it.endX,it.endY);break}for(bt=0;bt<Mt;bt++)At=Xe[bt],a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7]);break;default:jt("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),Xe=it}ye=pe.isFilled,te?pe.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&(ye&&se&&Su(a),a.jk(),ye&&se&&Uu(a))):(Su(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk(),Uu(a)):(ye&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk()),a.Se(Ge)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=Bn(),te.type===kn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),Nd(a,y,b,x);else if(te.type===kn.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,Ge=E,pe=se.segments.s,ye=pe.length,Te=0;Te<ye;Te++){switch(Je=pe[Te],Je.type){case Fo:Nd(a,y,b,x),b.length=0,b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY,he=ne,Ge=E;break;case Ri:b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break;case Go:Gt.Qe(ne,E,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case ps:Gt.ep(ne,E,Je.point1X,Je.point1Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case xo:if(it=Ua(Je,se),Xe=it.length,Xe===0){b.push(Je.centerX),b.push(Je.centerY),ne=Je.centerX,E=Je.centerY;break}for(Mt=0;Mt<Xe;Mt++)bt=it[Mt],Gt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;case Cs:if(it=Ds(Je,se,ne,E),Xe=it.length,Xe===0){b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break}for(Mt=0;Mt<Xe;Mt++)bt=it[Mt],Gt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;default:jt("Segment not of valid type: "+Je.type)}Je.isClosed&&(b.push(he),b.push(Ge),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(te.type===kn.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),Nd(a,y,b,x);else if(te.type===kn.F){if(E=new Oo,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new fi(xo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Ua(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)Ge=te[he],Gt.Qe(ne,E,Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],.5,b),ne=Ge[6],E=Ge[7];Nd(a,y,b,x)}Un(b),a.restore(),a.Vc(!1)}}}},et.kk=function(a,y,x){return!zt.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)},et.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:zt.prototype.nk.call(this,a)},et.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)}},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof qn){a.Mc()&&jt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},et.mi=function(a){a===void 0&&(a=new Xt);var y=this.naturalBounds,x=this.oe;y=Xt.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=lt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),ei(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),ei(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),ei(a,b.x,b.y,0,0),Xt.free(y),lt.free(b),a},et.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 te=Xt.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Xt.free(te),!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:(Xt.free(te),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===kn.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return Xt.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Xt.free(te),a}if(x.type===kn.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return Xt.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Xt.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===kn.o)return Xt.free(te),this.fill===null?Fs(x,a.x,a.y,E):Qo(x,a,E,1<this.strokeWidth,y);jt("Unknown Geometry type: "+x.type)},et.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=kv[se];if(he===void 0){var pe=Gt.Ze[se];typeof pe=="string"&&(pe=Gt.Ze[pe]),typeof pe=="function"?(he=pe(null,100,100),kv[se]=he):jt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,pe=ne.width;var ye=ne.height;switch(ss(this,!0)){case fn:b=x=0;break;case xn:pe=Math.max(a-te,0),ye=Math.max(y-te,0);break;case or:pe=Math.max(a-te,0),b=0;break;case pr:x=0,ye=Math.max(y-te,0)}isFinite(E.width)&&(pe=E.width),isFinite(E.height)&&(ye=E.height);var Te=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=isFinite(pe)?Math.max(x,pe):Math.max(se,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(he,b),x=Ev(this),x){case fn:break;case xn:se=pe,he=ye;break;case rr:x=Math.min(pe/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:jt(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Gt.$(this.ua.Sk,a-te)&&Gt.$(this.ua.Rk,y-te)||(this.ua=Dr.makeGeometry(this,se,he)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&se===0?0:ne.width+te,y===0&&he===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),pe+te,ye+te),E.w()?(pe=E.width,ye=E.height,pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=Math.max(Ge.width,pe),ye=Math.max(Ge.height,ye),this.dc.h(0,0,pe,ye)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===Nr?xn:y:y===Nr?kv[a.figure].defaultStretch:y}et.eh=function(a,y,x,b){Ia(this,a,y,x,b)},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*pe+Te,ne=a*he+y*ye+Ge,se=x*se+b*pe+Te,he=x*he+b*ye+Ge,Te=this.ig/2,pe=this.ua,pe===null&&(this.measure(1/0,1/0),pe=this.ua);var Xe=pe.bounds;if(ye=!1,pe.type===kn.j)if(1.5>=this.strokeWidth)ye=Gt.Ve(pe.startX,pe.startY,pe.endX,pe.endY,te,ne,se,he,E);else{if(pe.startX===pe.endX?(b=Te,ye=0):(y=(pe.endY-pe.startY)/(pe.endX-pe.startX),ye=Te/Math.sqrt(1+y*y),b=ye*y),y=Bn(),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.endX+b,pe.endY+ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX-b,pe.startY-ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.startX-b,pe.startY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.endX+b,pe.endY+ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return Un(y),!1;for(ye=!0,he=1/0,b=0;b<se;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<he&&(he=x,E.x=a.x,E.y=a.y);Un(y)}else if(pe.type===kn.u)ye=Gt.Ff(Xe.x-Te,Xe.y-Te,Xe.x+Xe.width+Te,Xe.y+Xe.height+Te,te,ne,se,he,E);else if(pe.type===kn.F){y=Xt.allocAt(Xe.x,Xe.y,Xe.width,Xe.height).Bc(Te,Te);e:if(y.width===0)ye=Gt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)ye=Gt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,pe=y.height/2,b=y.x+a,ye=y.y+pe,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-ye-x*(te-b),0>a*a*x*x+pe*pe-he*he){E.x=NaN,E.y=NaN,ye=!1;break e}Te=Math.sqrt(a*a*x*x+pe*pe-he*he),se=(-(a*a*x*he)+a*pe*Te)/(pe*pe+a*a*x*x)+b,a=(-(a*a*x*he)-a*pe*Te)/(pe*pe+a*a*x*x)+b,pe=x*(se-b)+he+ye,he=x*(a-b)+he+ye,Math.abs((te-se)*(te-se))+Math.abs((ne-pe)*(ne-pe))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=pe):(E.x=a,E.y=he)}else{if(se=pe*pe,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,ye=!1;break e}he=Math.sqrt(se),se=ye+he,he=ye-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}ye=!0}Xt.free(y)}else if(pe.type===kn.o){Ge=lt.alloc();var Je=se-te,it=he-ne,Mt=Je*Je+it*it,bt=te,At=ne;if(0<Mt&&Xe.contains(bt,At)&&(Ge.x=bt,Ge.y=At,this.ca(Ge)))for(Je!==0&&.5>Math.abs(Je)?(it*=.5/Je,Je=.5):it!==0&&.5>Math.abs(it)&&(Je*=.5/it,it=.5),bt-=Je,At-=it;Xe.contains(bt,At);)bt-=Je,At-=it;for(E.x=se,E.y=he,it=0;it<pe.figures.count;it++){var Ft=pe.figures.s[it],Bt=Ft.isFilled?bt:te,_t=Ft.isFilled?At:ne,Kt=Ft.segments;Xe=Ft.startX,Je=Ft.startY;for(var Rn=Xe,Jn=Je,Zn=0;Zn<Kt.count;Zn++){var Tn=Kt.s[Zn],hn=Tn.type,kr=Tn.endX,wr=Tn.endY,mi=!1;switch(hn){case Fo:Rn=kr,Jn=wr;break;case Ri:mi=Nm(Xe,Je,kr,wr,Bt,_t,se,he,Ge);break;case Go:mi=Gt.Eo(Xe,Je,Tn.point1X,Tn.point1Y,Tn.point2X,Tn.point2Y,kr,wr,Bt,_t,se,he,.6,Ge);break;case ps:mi=Gt.Eo(Xe,Je,Xe+2/3*(Tn.point1X-Xe),Je+2/3*(Tn.point1Y-Je),kr+2/3*(Tn.point1X-kr),wr+2/3*(Tn.point1Y-wr),kr,wr,Bt,_t,se,he,.6,Ge);break;case xo:case Cs:hn=Tn.type===xo?Ua(Tn,Ft):Ds(Tn,Ft,Xe,Je);var Ui=hn.length;if(Ui===0){mi=Nm(Xe,Je,Tn.type===xo?Tn.centerX:Tn.endX,Tn.type===xo?Tn.centerY:Tn.endY,Bt,_t,se,he,Ge);break}for(wr=null,kr=0;kr<Ui;kr++){if(wr=hn[kr],kr===0&&Nm(Xe,Je,wr[0],wr[1],Bt,_t,se,he,Ge)){var $o=Lm(Bt,_t,Ge,Mt,E);$o<Mt&&(Mt=$o,ye=!0)}Gt.Eo(wr[0],wr[1],wr[2],wr[3],wr[4],wr[5],wr[6],wr[7],Bt,_t,se,he,.6,Ge)&&($o=Lm(Bt,_t,Ge,Mt,E),$o<Mt&&(Mt=$o,ye=!0))}kr=wr[6],wr=wr[7];break;default:jt("Unknown Segment type: "+hn)}Xe=kr,Je=wr,mi&&(mi=Lm(Bt,_t,Ge,Mt,E),mi<Mt&&(Mt=mi,ye=!0)),Tn.isClosed&&(kr=Rn,wr=Jn,Nm(Xe,Je,kr,wr,Bt,_t,se,he,Ge)&&(Tn=Lm(Bt,_t,Ge,Mt,E),Tn<Mt&&(Mt=Tn,ye=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Te,E.y-=ne*Te,lt.free(Ge)}else jt("Unknown Geometry type: "+pe.type);return ye?(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 Nm(a,y,x,b,E,te,ne,se,he){if(Gt.$(a,x)&&Gt.$(y,b)||Gt.$(E,ne)&&Gt.$(te,se))return!1;var pe=!1,ye=(E-ne)*(y-b)-(te-se)*(a-x);return ye===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Gt.$(he.y,a))&&(he.y<y||Gt.$(he.y,y))&&(pe=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Gt.$(he.x,y))&&(he.x<a||Gt.$(he.x,a))&&(pe=!0)),pe)}et.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,te=lt.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),lt.free(te),E},et.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=xr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=lt.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return lt.free(ne),!0;var se=lt.alloc(),he=lt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),se.x=E,se.y=te,se.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,Yc(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Yc(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),Yc(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),Yc(this,ne,se,he)&&(y=!0)))),lt.free(ne),xr.free(x),lt.free(se),lt.free(he),y};function Yc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}et.tx=function(a,y,x){function b(Mt,bt){for(var At=Mt.length,Ft=0;Ft<At;Ft+=2)if(bt.zd(Mt[Ft],Mt[Ft+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,se=ne.x,he=ne.y,pe=ne.x+ne.width;if(ne=ne.y+ne.height,An(a.x,a.y,se,he)<=E&&An(a.x,a.y,pe,he)<=E&&An(a.x,a.y,se,ne)<=E&&An(a.x,a.y,pe,ne)<=E)return!0}if(se=y.startX,he=y.startY,pe=y.endX,ne=y.endY,y.type===kn.j){if(x=(se-pe)*(a.x-pe)+(he-ne)*(a.y-ne),In(a.x,a.y,se,he,pe,ne)<=(0<=(pe-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===kn.u)return y=!1,x&&(y=In(a.x,a.y,se,he,se,ne)<=E||In(a.x,a.y,se,he,pe,he)<=E||In(a.x,a.y,pe,he,pe,ne)<=E||In(a.x,a.y,se,ne,pe,ne)<=E),y;if(y.type===kn.F){y=a.x-(se+pe)/2,te=a.y-(he+ne)/2;var ye=Math.abs(pe-se)/2,Te=Math.abs(ne-he)/2;if(ye===0||Te===0)return In(a.x,a.y,se,he,pe,ne)<=E;if(x){if(a=Gt.$y(ye,Te,y,te),a*a<=E)return!0}else return!(An(y,te,-ye,0)>=E||An(y,te,0,-Te)>=E||An(y,te,0,Te)>=E||An(y,te,ye,0)>=E)}else if(y.type===kn.o){if(pe=y.bounds,te=pe.x,se=pe.y,he=pe.x+pe.width,pe=pe.y+pe.height,a.x>he&&a.x<te&&a.y>pe&&a.y<se&&In(a.x,a.y,te,se,te,pe)>E&&In(a.x,a.y,te,se,he,se)>E&&In(a.x,a.y,he,pe,te,pe)>E&&In(a.x,a.y,he,pe,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Fs(y,a.x,a.y,te):Qo(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,ye=te.startY,a.zd(ne,ye)>E)return!1;for(se=te.segments.s,he=se.length,pe=0;pe<he;pe++)switch(Te=se[pe],Te.type){case Fo:case Ri:if(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E)return!1;break;case Go:var Ge=Bn();if(Gt.Qe(ne,ye,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Un(Ge),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case ps:if(Ge=Bn(),Gt.ep(ne,ye,Te.point1X,Te.point1Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Un(Ge),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case xo:case Cs:Ge=Te.type===xo?Ua(Te,te):Ds(Te,te,ne,ye);var Xe=Ge.length;if(Xe===0){if(ne=Te.type===xo?Te.centerX:Te.endX,ye=Te.type===xo?Te.centerY:Te.endY,a.zd(ne,ye)>E)return!1;break}Te=null;for(var Je=Bn(),it=0;it<Xe;it++)if(Te=Ge[it],Je.length=0,Gt.Qe(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.8,Je),b(Je,a))return Un(Je),!1;Un(Je),Te!==null&&(ne=Te[6],ye=Te[7]);break;default:jt("Unknown Segment type: "+Te.type)}}return!0}}}return!1},et.qc=function(){this.ua=null},et.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ng,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=aa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new qn(1-aa.x,aa.y)))}Dr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=wu[a.toArrow];else a.fromArrow!=="None"?b=wu[a.fromArrow]:(b=Gt.Ze[a.figure],typeof b=="string"&&(b=Gt.Ze[b]),b===void 0&&jt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Gt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=wu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=wu[x],y===void 0){var b=null,E;for(E in Gt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=kn.parse(Gt.um[b],!1),wu[b]=a,x!==b&&(wu[x]=b),b}}return typeof y=="string"?y:y instanceof kn?a:null}vn.Object.defineProperties(Dr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),pa(this)&&(a=this.part,a!==null&&eo(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=lt.allocAt(-y.x,-y.y),lt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Ff(a,"Shape.fill"),a instanceof ki&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"Shape.stroke"),a instanceof ki&&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 jn(a,"value >= 0",Dr,"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"?jn(a,'"butt", "round", or "square"',Dr,"strokeCap"):(Xc(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?jn(a,'"miter", "bevel", or "round"',Dr,"strokeJoin"):(Xc(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Xc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||jt("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Xc(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=Gt.Ze[a];typeof x=="function"?x=a:(x=Gt.Ze[a.toLowerCase()])||jt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?jt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?jt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Zo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Zo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xc(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(Xc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Nr},set:function(a){var y=this.geometryStretch;y!==a&&(Xc(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Pu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&eu(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 Pu),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 Pu),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 Pu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Dr.prototype.intersectsRect=Dr.prototype.Yc,Dr.prototype.containedInRect=Dr.prototype.fh,Dr.prototype.getNearestIntersectionPoint=Dr.prototype.rs,Dr.prototype.getDocumentBounds=Dr.prototype.mi,Dr.prototype.getDocumentPoint=Dr.prototype.ga;var wu=new nr,kv=new nr;Dr.className="Shape",Dr.getFigureGenerators=function(){var a=new Zt,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Dr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Dr.getArrowheadGeometries=function(){var a=new Zt;for(b in Gt.um)if(wu[b]===void 0){var y=kn.parse(Gt.um[b],!1);wu[b]=y,y=b.toLowerCase(),y!==b&&(wu[y]=b)}for(var x in wu)if(x!==x.toLowerCase()){var b=wu[x];b instanceof kn&&a.add(x,b)}return a.freeze(),a},Dr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=kn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||jt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=wu;b[a]=x,b[y]=a};function Tv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Nr,this.gg=this.fg=Zo}Tv.prototype.copy=function(){var a=new Tv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Zi(a,y){return zt.call(this),Dm||(ls=po?new fl(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}en(Zi,zt),Zi.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function iu(a){a.da===null?a.da=new Fv:a.da.nc&&(a.da=a.da.copy())}et=Zi.prototype,et.th=function(){zt.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}et.qb=function(a){a.classType===Zi?this.wrap=a:zt.prototype.qb.call(this,a)},et.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},et.v=function(){zt.prototype.v.call(this)},et.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,te=x.height,ne=Yp(this),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var pe=this.isStrikethrough;mo(this,a,this.xc,!0,!1,x,b),(he||pe)&&mo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Te=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var Ge=y.scale;switch(8>(Te*Te+ye*ye)*Ge*Ge&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ks&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Te=this.spacingBelow,this.flip){case ii:a.translate(E,0),a.scale(-1,1);break;case Gr:a.translate(0,te),a.scale(1,-1);break;case ji:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,Ge=(y+ne+Te)*ye,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),ye===1&&this.ze!==null)Te=this.Cb,Te>E&&(Te=E),this.Oj(this.ze,a,0,b+y,E,ne,Te,x,se,he,pe);else if(this.Qc!==null&&this.Qb!==null)for(Ge=0;Ge<ye;Ge++){var Xe=this.Qc[Ge];Xe>E&&(Xe=E),b+=y,this.Oj(this.Qb[Ge],a,0,b,E,ne,Xe,x,se,he,pe),b+=ne+Te}switch(this.flip){case ii:a.scale(-1,1),a.translate(-E,0);break;case Gr:a.scale(1,-1),a.translate(0,-te);break;case ji:a.scale(-1,-1),a.translate(-E,-te)}}},et.Oj=function(a,y,x,b,E,te,ne,se,he,pe,ye){var Te=0;if(se)he==="left"?Te=0:he==="right"?Te=E-ne:he==="center"&&(Te=(E-ne)/2),y.fillRect(x+Te,b+.25*te,ne,1);else{if(he==="left"?Te=0:he==="right"?Te=E:he==="center"&&(Te=E/2),E=Am!==null?Am(this,te):.75*te,y.fillText(a,x+Te,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Te-=ne:he==="center"&&(Te-=ne/2),pe){se=jm!==null?jm(this,te):.8*te,he=x+Te,pe=b+se,E=x+Te+ne,se=b+se;var Ge=a;y.beginPath(),y.lineWidth=Ge,y.moveTo(he,pe),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td")}ye&&(ye=b+te-te/2.2|0,a%2!==0&&(ye+=.5),b=x+Te,te=ye,x=x+Te+ne,ne=ye,Te=a,y.beginPath(),y.lineWidth=Te,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td"))}},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(mo(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},et.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:zt.prototype.nk.call(this,a)},et.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)}},et.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ls!==null&&k1!==te&&(k1=ls.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),te.length===0)te=8;else if(this.isMultiline){for(var se=ne=0,he=!1;!he;){var pe=te.indexOf(`
`,se);pe===-1&&(pe=te.length,he=!0),se=te.substr(se,pe-se),this.formatting===$p&&(se=se.trim()),ne=Math.max(ne,El(se)),se=pe+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=El(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,he=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,pe=this.spacingAbove+this.spacingBelow,pe=Math.max(0,Yp(this)+pe),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/pe+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,pe=this.Qb[he],y=Math.max(1,a-y);El(pe)>y&&1<pe.length;)pe=pe.substr(0,pe.length-1);pe+=Jp,y=El(pe),this.Qb[he]=pe,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+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===P1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),wi(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},et.eh=function(a,y,x,b){Ia(this,a,y,x,b)};function Xp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===$p;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,Yp(a)+se);var he=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===Lv){a.Le=1;var pe=El(y);if(he===0||pe<=x)a.Cb=Math.max(a.Cb,pe),Xp(a,y,a.Cb),b!==null&&b.h(pe,se);else{for(te=Ad(a,ne),ne=ne.substr(te.length),y=Ad(a,ne),pe=El(te+y);0<y.length&&pe<=x;)te+=y,ne=ne.substr(y.length),y=Ad(a,ne),pe=te+y,E&&(pe=pe.trim()),pe=El(pe);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);El(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=Jp;var ye=El(te);a.Cb=ye,Xp(a,te,ye),b!==null&&b.h(ye,se)}}else{for(he=0,ne.length===0&&(he=1,Xp(a,ne,0));0<ne.length;){for(y=Ad(a,ne),ne=ne.substr(y.length);El(y)>x;){var Te=1;for(pe=El(y.substr(0,Te)),ye=0;pe<=x;)Te++,ye=pe,pe=El(y.substr(0,Te));if(Te===1){var Ge=pe;te=Math.max(te,pe)}else Ge=ye,te=Math.max(te,ye);if(Te--,1>Te&&(Te=1),Xp(a,y.substr(0,Te),Ge),he++,y=y.substr(Te),a.Gc+he>a.maxLines)break}for(ye=Ad(a,ne),pe=El(y+ye);0<ye.length&&pe<=x;)y+=ye,ne=ne.substr(ye.length),ye=Ad(a,ne),pe=y+ye,E&&(pe=pe.trim()),pe=El(pe);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Te=pe,te=Math.max(te,pe)):(Te=ye=El(y),te=Math.max(te,ye)),Xp(a,y,Te),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function Ad(a,y){if(a.wrap===b1)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 El(a){return ls===null?8*a.length:ls.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ls===null){var x=16;return a.df=x}return jv[y]!==void 0&&5e3>E1?x=jv[y]:(x=1.3*ls.measureText("M").width,jv[y]=x,E1++),a.df=x}function x1(a){if(ls===null)return 6;if(Fm[a]!==void 0&&5e3>Ov)var y=Fm[a];else y=ls.measureText(Jp).width,Fm[a]=y,Ov++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Yp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,se=!1;!se;){if(ne=x.indexOf(`
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==Lv){a.Le=0;var he=ln.alloc();Mv(a,te,y,he),E+=he.height,ln.free(he),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}vn.Object.defineProperties(Zi.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(iu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:fn},set:function(a){var y=this.flip;y!==a&&(iu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Zl},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),iu(this),this.da.Yr=a,Xa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=ln.alloc();Mv(this,this.ec,999999,a);var y=a.width;ln.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),wi(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:Nv},set:function(a){var y=this.wrap;y!==a&&(iu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(iu(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"TextBlock.stroke"),a instanceof ki&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(iu(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(iu(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Pu),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 Pu),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 Pu),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 Pu),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 Pu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(iu(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(iu(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(iu(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(iu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:$p},set:function(a){var y=this.formatting;y!==a&&(iu(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&jn(a,"> 0",Zi,"maxLines"),iu(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Am=null,jm=null,Lv=new Yt(Zi,"None",0),P1=new Yt(Zi,"WrapFit",1),Nv=new Yt(Zi,"WrapDesiredSize",2),b1=new Yt(Zi,"WrapBreakAll",3),Av=new Yt(Zi,"OverflowClip",0),Om=new Yt(Zi,"OverflowEllipsis",1),$p=new Yt(Zi,"FormatTrim",0),C1=new Yt(Zi,"FormatNone",0),xx=/[ \u200b\u00ad]/,jv=new nr,E1=0,Fm=new nr,Ov=0,Jp="...",k1="",ls=null,Dm=!1;Zi.className="TextBlock";function Fv(){this.nc=!1,this.Hd=null,this.Xf=fn,this.gq=$p,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Zl,this.$r=Nv}Fv.prototype.copy=function(){var a=new Fv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},Zi.getEllipsis=function(){return Jp},Zi.setEllipsis=function(a){Jp=a,Fm=new nr,Ov=0},Zi.getBaseline=function(){return Am},Zi.setBaseline=function(a){Am=a},Zi.getUnderline=function(){return jm},Zi.setUnderline=function(a){jm=a},Zi.isValidFont=function(a){if(Dm||(ls=po?new fl(null).context:null,Dm=!0),ls===null)return!0;var y=ls.font;if(a===y||a==="10px sans-serif")return!0;ls.font="10px sans-serif",ls.font=a;var x=ls.font;if(x!=="10px sans-serif")return ls.font=y,!0;ls.font="19px serif";var b=ls.font;return ls.font=a,x=ls.font,ls.font=y,x!==b},Zi.FormatNone=C1,Zi.FormatTrim=$p,Zi.None=Lv,Zi.OverflowClip=Av,Zi.OverflowEllipsis=Om,Zi.WrapBreakAll=b1,Zi.WrapDesiredSize=Nv,Zi.WrapFit=P1;function Pu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Pu.prototype.copy=function(){var a=new Pu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Pu.className="GradElementSettings";function us(a,y){zt.call(this),this.Eg=null,this.qo="",this.Xg=Ps,this.Nk=xn,this.Zg=this.Hd=null,this.Mk=Fr,this.Xf=fn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var jd;en(us,zt),us.prototype.cloneProtected=function(a){zt.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},us.prototype.qb=function(a){a===fn||a===rr||a===Yr?this.imageStretch=a:zt.prototype.qb.call(this,a)},us.prototype.toString=function(){return"Picture("+this.source+")#"+Jr(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new nr,Bm=0)}function T1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var se=ne.length,he=0;he<se;he++)te=ne[he],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(Bo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=Bn();for(var se=0;se<E;se++)te.push(ne[se]);if(y.hn)for(se=0;se<E;se++)ne=te[se],ne.Hd!==null&&ne.Hd(ne,x);Un(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}us.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},us.prototype.redraw=function(){this.N(),this.Uc=!0},us.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Vc)){var E=a instanceof ks;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var pe=he,ye=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Te=he,Ge=se,Xe=this.Nk,Je=this.Mk;switch(Xe){case fn:if(this.sourceRect.w())break;Te>=b.width&&(te=te+Je.offsetX+(Te*Je.x-b.width*Je.x)),Ge>=b.height&&(ne=ne+Je.offsetY+(Ge*Je.y-b.height*Je.y)),he=Math.min(b.width,Te),se=Math.min(b.height,Ge);break;case xn:Te=b.width,Ge=b.height;break;case rr:case Yr:Xe===rr?(Xe=Math.min(b.height/Ge,b.width/Te),Te*=Xe,Ge*=Xe):Xe===Yr&&(Xe=Math.max(b.height/Ge,b.width/Te),Te*=Xe,Ge*=Xe,Te>=b.width&&(te=(te+Je.offsetX+(Te*Je.x-b.width*Je.x)/Te)*he),Ge>=b.height&&(ne=(ne+Je.offsetY+(Ge*Je.y-b.height*Je.y)/Ge)*se),he*=1/(Te/b.width),se*=1/(Ge/b.height),Te=b.width,Ge=b.height)}Xe=this.Df()*y.scale;var it=Te*Xe*Ge*Xe,Mt=he*se/it,bt=x.__goCache;Xe=null;var At=wx;if(!E){if(x.sq&&bt!==void 0&&4<it&&Mt>At*At)for(bt.gi===null&&(L1(bt,4,pe,ye,x),L1(bt,16,pe,ye,x)),E=bt.gi,pe=E.length,ye=0;ye<pe&&E[ye].ratio*E[ye].ratio<Mt;ye++)Xe=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new fl(null).context;try{E.drawImage(this.Eg,0,0)}catch(Ft){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ft){this.vl=!0}}if(this.vl)return}}switch(E=Te<b.width?Je.offsetX+(b.width*Je.x-Te*Je.x):0,Je=Ge<b.height?Je.offsetY+(b.height*Je.y-Ge*Je.y):0,this.flip){case ii:a.translate(Math.min(b.width,Te),0),a.scale(-1,1);break;case Gr:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case ji:a.translate(Math.min(b.width,Te),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&bt!==void 0&&Xe!==null&&Xe.ratio!==1){a.save(),y=Xe.ratio;try{a.drawImage(Xe.source,te/y,ne/y,Math.min(Xe.source.width,he/y),Math.min(Xe.source.height,se/y),E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)),a instanceof ks&&(this.bt=[te/y,ne/y,Math.min(Xe.source.width,he/y),Math.min(Xe.source.height,se/y),E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)])}catch(Ft){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)),a instanceof ks&&(this.bt=[te,ne,he,se,E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)])}catch(Ft){this.en=!1}switch(this.flip){case ii:a.scale(-1,1),a.translate(-Math.min(b.width,Te),0);break;case Gr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case ji:a.scale(-1,-1),a.translate(-Math.min(b.width,Te),-Math.min(b.height,Ge))}}}}},us.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=ss(this,!0),ne=this.Eg,se=this.qn,he=0,pe=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,pe=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===xn||te===or?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=he)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:he),isFinite(E.height)||te===xn||te===pr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=pe)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:pe),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),wi(this.dc,a,y),this.Ge(0,0,a,y)},us.prototype.eh=function(a,y,x,b){Ia(this,a,y,x,b)},vn.Object.defineProperties(us.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||jt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Np(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new yn),b!==null&&x&&qh(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Bo(this,!1),this.v())):x&&T1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=jd;if(po){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=Xn("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),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}}}),us.prototype.redraw=us.prototype.redraw,us.prototype.reloadSource=us.prototype.hA;var Bm=0,wx=4;us.className="Picture",jd=new nr,us.clearCache=Od;function M1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new fl(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new N1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new kn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new kn,this.mc=null};function Dd(a,y,x,b,E,te){a.mc=new Oo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Fd.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(Fo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Fd.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(Ri);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function wh(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new fi(Go);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Im(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new fi(ps);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}Fd.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new fi(xo);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function bx(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new fi(Cs,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Rm=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new kn(kn.u),b.endX=y,b.endY=x,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new kn(kn.u),b.endX=y,b.endY=x,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=Gt.Mf[b];if(E!==void 0)return E;var te=a*Gt.wg;return E=new kn().add(new Oo(a,0,!0).add(new fi(Ri,y-a,0)).add(new fi(Go,y,a,y-te,0,y,te)).add(new fi(Ri,y,x-a)).add(new fi(Go,y-a,x,y,x-te,y-te,x)).add(new fi(Ri,a,x)).add(new fi(Go,0,x-a,te,x,0,x-te)).add(new fi(Ri,0,a)).add(new fi(Go,a,0,0,te,te,0).close())),1<te&&(E.spot1=new qn(0,0,te,te),E.spot2=new qn(1,1,-te,-te)),Gt.Nf<Gt.vm&&(Gt.Mf[b]=E,Gt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new kn(kn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new kn(kn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new kn().add(new Oo(0,0).add(new fi(Ri,y,.5*x)).add(new fi(Ri,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new kn().add(new Oo(0,0).add(new fi(Ri,y,0)).add(new fi(Ri,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new kn().add(new Oo(y,x).add(new fi(Ri,0,.5*x)).add(new fi(Ri,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new kn().add(new Oo(y,x).add(new fi(Ri,0,x)).add(new fi(Ri,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new kn().add(new Oo(.5*y,0).add(new fi(Ri,0,.5*x)).add(new fi(Ri,.5*y,x)).add(new fi(Ri,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("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}),Na("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}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new kn().add(new Oo(0,x/2,!1).add(new fi(Ri,y,x/2)).add(new fi(Fo,y/2,0)).add(new fi(Ri,y/2,x)))}),Na("XLine",function(a,y,x){return new kn().add(new Oo(0,x,!1).add(new fi(Ri,y,0)).add(new fi(Fo,0,0)).add(new fi(Ri,y,x)))}),Na("LineRight",function(a,y,x){return new kn().add(new Oo(.25*y,0,!1).add(new fi(Ri,.75*y,.5*x)).add(new fi(Ri,.25*y,x)))}),Na("LineDown",function(a,y,x){return new kn().add(new Oo(0,.25*x,!1).add(new fi(Ri,.5*y,.75*x)).add(new fi(Ri,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new kn().add(new Oo(.75*y,0,!1).add(new fi(Ri,.25*y,.5*x)).add(new fi(Ri,.75*y,x)))}),Na("LineUp",function(a,y,x){return new kn().add(new Oo(0,.75*x,!1).add(new fi(Ri,.5*y,.25*x)).add(new fi(Ri,y,.75*x)))}),Gt.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ci,this.ir=null,this.jr="",this.lr=Zo,this.Gq="",this.Hq=Xr,this.Pq=Sn,this.Kq=Hn,this.Up=null,this.Cq=127,this.zr=$n,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;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 hr(a,y){a===void 0||a instanceof Wo||typeof a=="string"?Pn.call(this,a):(Pn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new lt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Xt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}en(hr,Pn),hr.prototype.cloneProtected=function(a){Pn.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},et=hr.prototype,et.Af=function(a){Pn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=er(this.constructor)+"#"+Jr(this);return this.data!==null&&(a+="("+Ar(this.data)+")"),a};function hs(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}et.th=function(){Pn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},et.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===wo&&y==="elements"?E instanceof Pn?Zc(E,function(he){ly(se.partManager,he),_c(se,he)}):qh(se,E):a===Eo&&y==="elements"&&(E instanceof Pn?Zc(E,function(he){uy(se.partManager,he,se)}):Np(se,E)),se.cb(a,y,x,b,E,te,ne))},et.La=function(a){if(Pn.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 Pn&&Zc(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},hr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},hr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},hr.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 Zt),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)))}}},hr.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)}},hr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Bn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Un(y)}},hr.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Tr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof di))break e;dl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Pn.Link),x.adornedObject=y)}if(x!==null){x.type===Pn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},hr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Bv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function _m(a){if(rc(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,rc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=Xt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Xt.free(b),Rv(a,!1)}}hr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new xr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},hr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Fr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=lt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),lt.free(ne)}},hr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},hr.prototype.moveTo=function(a,y,x){a=lt.allocAt(a,y),this.move(a,x),lt.free(a)},hr.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())},hr.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())},hr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Zt),y.I(a)!==null)return y.I(a);var x=Pn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ph(a,y,x,b){b===void 0&&(b=new lt),x=x.Mc()?Fr:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}hr.prototype.mi=function(a){return a===void 0&&(a=new Xt),a.assign(this.actualBounds)},hr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=lt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Dr?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 $c(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 te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}hr.prototype.arrange=function(){if(Ya(this)===!1)j1(this);else{yu(this,!1);var a=this.Ib,y=Xt.alloc();y.assign(a);var x=ic(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Gt.B(y.width,a.width)&&Gt.B(y.height,a.height)||0<=this.vw&&this.C(16),Xt.free(y),Rv(this,!1)}},et=hr.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Xt.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),Xt.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Br(a,y)||(this instanceof Gn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},et.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&F1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new lt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),rc(this)===!1&&Ya(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof di||(y=y.animationManager,y.zb&&ad(y,a,new lt(b,E),x))}et.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Ya(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)},et.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):te?B1(a,y,x,E,b):ne&&I1(a,y,x,E,b),a.G|=2097152,lt.free(b),a.Uk()}function B1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof di||ad(x,a,new lt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new lt(te,ne),y.copy()))}function I1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function R1(a,y,x){_v(a,!1),a instanceof Gn&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(Fi(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}et.si=function(){return!0},et.Zc=function(){return!0},et.ph=function(){return!1},et.Dd=function(){return!0};function Iv(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Cn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Cn(" Old class: "+er(a.constructor)+", new class: "+er(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,se=!0,he=!0,pe=!1;a instanceof Gn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,pe=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=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Gn&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=pe?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)}hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function rc(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function _v(a,y){a.G=y?a.G|65536:a.G&-65537}function ic(a){return(a.G&131072)!==0}et=hr.prototype,et.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}et.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},et.N=function(){var a=this.diagram;a!==null&&!Ya(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N($c(this,this.Ib))},et.v=function(){Pn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Gn&&this.labeledLink!==null&&Xa(this.labeledLink),a.$b(!0))},et.Vo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},et.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},et.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Gn&&(y=y.labeledLink,y!==null)?zv(a,y):0}et.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Gn&&(x=y.labeledLink,x!==null)?_1(a,x):y}et.Td=function(a){return a instanceof Tr?Gv(this,this,a):!1};function Gv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Gv(a,b,x)?y instanceof Gn&&(y=y.labeledLink,y!==null)?Gv(a,y,x):!1:!0}et.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Tr&&zm(y,!0),y instanceof Gn){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof Gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Tr&&zm(y,!1),y instanceof Gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},hr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Gn&&this.isLinkLabel)},hr.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof Gn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function oc(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof di)){if(a.add(y),y instanceof Gn){if(x&&y instanceof Tr)for(var ne=y.memberParts;ne.next();)oc(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,pe=se.toNode;he=he===null||a.contains(he),pe=pe===null||a.contains(pe),(E?he&&pe:he||pe)&&oc(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)oc(a,y.value,x,b-1,E,te)}else if(y instanceof Mn)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,te)}}vn.Object.defineProperties(hr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?hi:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(Eo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(wo,"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&&(hs(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&ud(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof di?this.type!==Pn.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:Sn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),hs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Hn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),hs(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&&(hs(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:Xr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),hs(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,Ya(this)===!1&&(_m(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,te.x,te.y),this.g("position",te,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 di)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof di?this instanceof di&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(dl(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(te!==null&&te.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(dl(x),x=x.copy(),x===null||x instanceof Mn||(b=this.location.copy(),Iv(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){Iv(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&&(hs(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&&(hs(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&&(hs(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 Mn?(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&&(hs(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&&(hs(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&&(hs(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:Ci},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(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:Zo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),hs(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&jt("Cannot make a Group a member of itself: "+this.toString()),jt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof Tr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Kv(a,this):this instanceof Tr&&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 te=E.wa(a!==null?a.data:null);E.mp(b,te)}}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 Tr){for(x=new yn,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Gn)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof Gn){for(x=this.linksConnected;x.next();)Bd(x.value);x=this.labeledLink,x!==null&&Bd(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&ud(y,-1,a))}}else jt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(hs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Gn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(hs(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&&(hs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:$n},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),hr.prototype.invalidateLayout=hr.prototype.C,hr.prototype.findCommonContainingGroup=hr.prototype.px,hr.prototype.isMemberOf=hr.prototype.Td,hr.prototype.findTopLevelPart=hr.prototype.sz,hr.prototype.findSubGraphLevel=hr.prototype.oz,hr.prototype.ensureBounds=hr.prototype.Va,hr.prototype.getDocumentBounds=hr.prototype.mi,hr.prototype.findObject=hr.prototype.fb,hr.prototype.moveTo=hr.prototype.moveTo,hr.prototype.invalidateAdornments=hr.prototype.Wb,hr.prototype.clearAdornments=hr.prototype.Ej,hr.prototype.removeAdornment=hr.prototype.Jf,hr.prototype.addAdornment=hr.prototype.bh,hr.prototype.findAdornment=hr.prototype.Pj,hr.prototype.updateTargetBindings=hr.prototype.La;var G1=!1;hr.className="Part",hr.LayoutNone=0,hr.LayoutAdded=1,hr.LayoutRemoved=2,hr.LayoutShown=4,hr.LayoutHidden=8,hr.LayoutNodeSized=16,hr.LayoutGroupLayout=32,hr.LayoutNodeReplaced=64,hr.LayoutStandard=127,hr.LayoutAll=16777215;function di(a,y){a===void 0||a instanceof Wo||typeof a=="string"?hr.call(this,a):(hr.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)}en(di,hr),di.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},di.prototype.updateRelationshipsFromData=function(){},di.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Mn&&y instanceof Dr){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 Dr&&(E.ua=a)}}},di.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ya(a))},di.prototype.Zc=function(){return!1},di.prototype.gk=function(a,y,x,b,E,te,ne){if(a===wo&&y==="elements"){if(E instanceof Ja)this.$a===null&&(this.$a=E);else if(E instanceof Pn){var se=E.Nl(function(he){return he instanceof Ja});se instanceof Ja&&this.$a===null&&(this.$a=se)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Pn&&this.$a.rg(b)&&(this.$a=null));hr.prototype.gk.call(this,a,y,x,b,E,te,ne)},di.prototype.updateAdornments=function(){},di.prototype.Lj=function(){},vn.Object.defineProperties(di.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}}}),di.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ao,this.er=Wm,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Gn(a,y){a===void 0||a instanceof Wo||typeof a=="string"?hr.call(this,a):(hr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new pn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}en(Gn,hr),Gn.prototype.cloneProtected=function(a){hr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},et=Gn.prototype,et.Af=function(a){hr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function bh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}et.th=function(){hr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new yn),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 te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}et.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},et.gk=function(a,y,x,b,E,te,ne){a===wo&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),hr.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ts(x.fromPort),Ts(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ts(x.fromPort),Ts(x.toPort),x.bb())}}function Ts(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ts(y.port)}}et.si=function(){return!0},Gn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Gn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Gn.prototype.isVisible=function(){if(!hr.prototype.isVisible.call(this))return!1;var a=!0,y=vh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===vh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Do){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wd&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Gn.prototype.Zb=function(a){hr.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)}},Gn.prototype.qx=function(){var a=new yn,y=new yn;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Gn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new si(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},et=Gn.prototype,et.Mo=function(a){a===void 0&&(a=null);var y=new si(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},et.Sd=function(a){a===void 0&&(a=null);var y=new si(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},et.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 yn,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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):hi},et.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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):hi},et.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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):hi},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new si(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},et.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new si(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Gm(a,y,x){Ts(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 te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!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,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Um(a,y,x){Ts(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Qp(y)))}function Qp(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}}}Gn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},et=Gn.prototype,et.Vo=function(a){hr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){hr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},et.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,hr.prototype.Lj.call(this)},et.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Zt: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 Wv(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=Bn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Un(x)}}}et.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},et.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}},et.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},et.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},et.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Gn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},et.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 yn;return a(this,y),y},et.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}et.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new si(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},et.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 pn,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 pn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new $r(x):hi},et.wz=function(a){a===void 0&&(a=1/0);var y=new yn;return oc(y,this,!1,a,!0),y},Gn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new yn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(a,y,x,b,E,te,ne){if(1<b)for(var se=x?a.Mo():a.Sd();se.next();){var he=se.value;he.isTreeLink&&(he=he.To(a),he===null||he===a||y.contains(he)||(y.add(he),Y1(he,y,x,b-1,E,te,ne)))}else $1(a,y,x,E,te,ne)}function $1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var pe=se.value;if(pe.isTreeLink&&(pe=pe.To(a),pe!==null&&pe!==a)){var ye=y.contains(pe);if(ye||y.add(pe),ne){var Te=x?pe.Oo():pe.Po();he.uv=a,Te.all(function(Ge){return function(Xe){return Xe===Ge.uv||!Xe.isTreeExpanded}}(he))&&b.Aj(pe,E),pe.oh(),pe.Zb(!1)}pe.isTreeExpanded&&(pe.wasTreeExpanded=pe.isTreeExpanded,ye||$1(pe,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}Gn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new yn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),pe={};he.next();){var ye=he.value;if(ye.isTreeLink&&(se||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!se){ye.Zb(!0),ye.oh();var Te=x?ye.Oo():ye.Po();pe.vv=a,Te.all(function(Ge){return function(Xe){return Xe===Ge.vv||!Xe.isTreeExpanded}}(pe))&&E.Cj(ye,te)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,J1(ye,y,x,b-1,E,te,ne))}pe={vv:pe.vv}}a.isTreeExpanded=!0}vn.Object.defineProperties(Gn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(bh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&gh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ao},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),bh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&gh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(bh(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&&(bh(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&&(bh(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,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Xa(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(bh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Gn.prototype.expandTree=Gn.prototype.expandTree,Gn.prototype.collapseTree=Gn.prototype.collapseTree,Gn.prototype.findTreeParts=Gn.prototype.wz,Gn.prototype.findTreeChildrenNodes=Gn.prototype.Ou,Gn.prototype.findTreeChildrenLinks=Gn.prototype.Qo,Gn.prototype.findTreeLevel=Gn.prototype.uz,Gn.prototype.findTreeParentChain=Gn.prototype.vz,Gn.prototype.findTreeParentNode=Gn.prototype.pg,Gn.prototype.findTreeParentLink=Gn.prototype.kh,Gn.prototype.findCommonTreeParent=Gn.prototype.gz,Gn.prototype.findTreeRoot=Gn.prototype.xz,Gn.prototype.isInTreeOf=Gn.prototype.Nz,Gn.prototype.findPort=Gn.prototype.ns,Gn.prototype.findLinksTo=Gn.prototype.kz,Gn.prototype.findLinksBetween=Gn.prototype.jz,Gn.prototype.findNodesInto=Gn.prototype.Oo,Gn.prototype.findNodesOutOf=Gn.prototype.Po,Gn.prototype.findNodesConnected=Gn.prototype.Mu,Gn.prototype.findLinksInto=Gn.prototype.Sd,Gn.prototype.findLinksOutOf=Gn.prototype.Mo,Gn.prototype.findExternalTreeLinksConnected=Gn.prototype.qx,Gn.prototype.invalidateConnectedLinks=Gn.prototype.Bd,Gn.prototype.invalidateLinkBundle=Gn.prototype.Lz;var Ex=new Yt(Gn,"SpreadingNone",10),Wm=new Yt(Gn,"SpreadingEvenly",11),Hv=new Yt(Gn,"SpreadingPacked",12);Gn.className="Node",Gn.SpreadingNone=Ex,Gn.SpreadingEvenly=Wm,Gn.SpreadingPacked=Hv;function Tr(a,y){a===void 0||a instanceof Wo||typeof a=="string"?Gn.call(this,a):(Gn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new yn,this.$a=null,this.Sc=new so,this.Sc.group=this,this.gl=new yn,this.tb=this.$p=null,y&&Object.assign(this,y)}en(Tr,Gn),Tr.prototype.cloneProtected=function(a){Gn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ja});y instanceof Ja?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},et=Tr.prototype,et.Af=function(a){Gn.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof Gn)x.Bd(y);else if(x instanceof Mn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},et.gk=function(a,y,x,b,E,te,ne){if(a===wo&&y==="elements"){if(E instanceof Ja)this.$a===null?this.$a=E:this.$a!==E&&jt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Pn){var se=E.Nl(function(he){return he instanceof Ja});se instanceof Ja&&(this.$a===null?this.$a=se:this.$a!==se&&jt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Pn&&this.$a.rg(b)&&(this.$a=null));Gn.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Xl=function(a,y){Gn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Pn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Pn&&(a=a.Pb()),this.tb===null&&(this.tb=new Xt),a.mi(this.tb),a instanceof Dr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},et.eh=function(a,y,x,b){this.nf=this.$a,Gn.prototype.eh.call(this,a,y,x,b)},et.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Mn||y.Va()}),Gn.prototype.Va.call(this)},et.si=function(){if(!Gn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Gn){if(y.isVisible()&&Ya(y))return!1}else if(y instanceof Mn&&y.isVisible()&&Ya(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Kv(a,y){if(a.Gn.add(y)){y instanceof Tr&&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 Mn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof Tr&&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 Mn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}et.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Gn.prototype.Lj.call(this)},Tr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=nn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Tr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=nn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Tr.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))},et=Tr.prototype,et.Bd=function(a){var y=(this.U&65536)!==0;if(Gn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Ts(x.fromPort),Ts(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ts(x.fromPort),Ts(x.toPort),x.bb()))}}},et.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 yn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Gn)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},et.iz=function(){var a=this.Rj();a.add(this);for(var y=new yn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Gn)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},et.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new yn;return a(this,y),y},et.Rj=function(){var a=new yn;return oc(a,this,!0,0,!0),a.remove(this),a},et.Zb=function(a){Gn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Tr.prototype.collapseSubGraph=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 te=E.value;if(te.Zb(!1),te instanceof Tr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof Gn)te.Bd(y),x.Aj(te,b);else if(te instanceof Mn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Tr.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 te=E.value;if(te.Zb(!0),te instanceof Tr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof Gn)te.Bd(y),x.Cj(te,b);else if(te instanceof Mn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Tr.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,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=lt.alloc(),Gn.prototype.move.call(this,a,y),a=new yn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Mn&&(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 Gn&&E.isLinkLabel)){var ne=E.position,se=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):se.w()&&(te.x=se.x+b,te.y=se.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof Mn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),Xv(E)&&E.bb());lt.free(te)}},vn.Object.defineProperties(Tr.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&jt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(bh(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&&(bh(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&&(bh(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&&(bh(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)}}}),Tr.prototype.expandSubGraph=Tr.prototype.expandSubGraph,Tr.prototype.collapseSubGraph=Tr.prototype.collapseSubGraph,Tr.prototype.findSubGraphParts=Tr.prototype.Rj,Tr.prototype.findContainingGroupChain=Tr.prototype.hz,Tr.prototype.findExternalNodesConnected=Tr.prototype.iz,Tr.prototype.findExternalLinksConnected=Tr.prototype.Lu,Tr.prototype.ensureBounds=Tr.prototype.Va,Tr.className="Group";function Ja(a){zt.call(this),this.yb=ta,this.ko=new Xt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}en(Ja,zt),Ja.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return $i(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Tr||a instanceof di)||jt("Placeholder is not inside a Group or Adornment."),a instanceof Tr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(wi(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=lt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),lt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof Dr&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,pe=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Pn.Link&&(se=te.ga(a.category==="Selection"?Xr:a.locationSpot,lt.alloc()),a.location=se,lt.free(se)),isNaN(pe)||isNaN(ne)?(a=te.ga(Xr,lt.alloc()),pe=Xt.allocAt(a.x,a.y,0,0),pe.Ye(te.ga(Ni,a)),pe.Ye(te.ga(Ei,a)),pe.Ye(te.ga(zo,a)),wi(y,pe.width+b||0,pe.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),lt.free(a),Xt.free(pe)):(wi(y,pe+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Tr&&!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=Xt.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Tr&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),Xt.free(x),b&&y instanceof Tr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Tr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var se=ne.value;if(se.isVisible()){if(se instanceof Mn&&(!y.computesBoundsIncludingLinks||_s(se)||se.fromNode===y||se.toNode===y))continue;se=se.actualBounds,se.left<x&&(x=se.left),se.top<b&&(b=se.top),se.right>E&&(E=se.right),se.bottom>te&&(te=se.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},vn.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ir(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function Mn(a){hr.call(this,Pn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Qa,this.Om=0,this.Qm=Qa,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new pn().freeze(),this.Tg=this.Mg=null,this.ml=new Xt,this.ua=new kn,this.u=this.o=this.Sf=this.Wf=null,this.su=new lt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}en(Mn,hr),Mn.prototype.cloneProtected=function(a){hr.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())},et=Mn.prototype,et.Af=function(a){hr.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&&Ts(y),a=a.toPort,a!==null&&Ts(a)},et.qb=function(a){a.classType===Mn?(a.value&2)===2?this.routing=a:a===Gs||a===Eh||a===Rd?this.curve=a:a===tg||a===Ym||a===$m?this.adjusting=a:a!==Jv&&a!==Qa&&jt("Unknown Link enum value for a Link property: "+a):hr.prototype.qb.call(this,a)},et.Xc=function(){this.ba===null&&(this.ba=new Gp)},et.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ya(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ya(a)||rc(a)))},et.zv=function(){return!1},et.Av=function(){},et.Zc=function(){return!1},Mn.prototype.computeAngle=function(a,y,x){return Mn.computeAngle(y,x)},Mn.computeAngle=function(a,y){switch(a){default:case Qa:a=0;break;case ng:a=y;break;case rg:a=y+90;break;case ig:a=y-90;break;case Qv:a=y+180;break;case Jm:a=Gt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=Gt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=Gt.bp(y-90),90<a&&270>a&&(a-=180);break;case Qm:if(a=Gt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Gt.bp(a)};function Bd(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Vv(x,a),a.Ah=y,y!==null&&Kv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}et=Mn.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&hr.prototype.oh.call(this)},et.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},et.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new yn),a.wd.add(y),a.v()}et.Vo=function(a){if(hr.prototype.Vo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}qp(this)}},et.Wo=function(a){if(hr.prototype.Wo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}eg(this)}},et.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))},Mn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Mn.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?hr.prototype.move.call(this,a,!1):(a=lt.allocAt(x.x+b,x.y+E),hr.prototype.move.call(this,a,!1),lt.free(a)),Ch(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Mn.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},Mn.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},Mn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Kn),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()===Gs))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()===Gs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Gt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),Gt.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.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*(te.x-y.x),y.y+x*(te.y-y.y))),a},Mn.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()===Gs))return this.ua.wx(.5);if(this.computeCurve()===Gs&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),Gt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,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)},et=Mn.prototype,et.i=function(a){return this.Nb.s[a]},et.dd=function(a,y){this.Nb.cd(a,y)},et.L=function(a,y,x){this.Nb.cd(a,new lt(y,x))},et.Kz=function(a,y){this.Nb.Gb(a,y)},et.m=function(a,y,x){this.Nb.Gb(a,new lt(y,x))},et.ne=function(a){this.Nb.add(a)},et.yf=function(a,y){this.Nb.add(new lt(a,y))},et.pv=function(a){this.Nb.mb(a)},et.Fj=function(){this.Nb.clear()};function Ch(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new pn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new lt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Xa(a)),b?Hm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ld(ne.animationManager,a,E),a.g("points",te,E)}}et.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},et.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Math.min(Te.x,ne),se=Math.min(Te.y,se),Te.freeze()}if(y.freeze(),pe===te){for(te=0;te<pe;te++)if(ye=E[te],Te=he[te],ye.x-x!==Te.x-ne||ye.y-b!==Te.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Hm(this),this.g("points",a,y)}},et.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))}et.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())}},et.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()}}},Mn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(If||(If=new Gn,If.desiredSize=br,If.Va()),this.defaultFromPoint&&(If.location=this.defaultFromPoint,If.Va(),y=a=If)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Rf||(Rf=new Gn,Rf.desiredSize=br,Rf.Va()),this.defaultToPoint&&(Rf.location=this.defaultToPoint,Rf.Va(),E=b=Rf)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var se=Id(ne),he=Id(x),pe=y===E&&y!==null,ye=this.isOrthogonal,Te=this.curve===Gs;this.Wf=pe&&!ye?Te=!0:!1;var Ge=this.computeAdjusting()===Qa||pe;if(!ye&&!pe&&se&&he){if(se=!1,!Ge&&3<=te&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,Ge,te-1,he))&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ge,te-1,he)),!se)if(this.Fj(),Te){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ge=this.getLinkPoint(b,E,x,!1,!1,a,y),se=Ge.x-te.x,he=Ge.y-te.y,pe=this.computeCurviness(),Te=ye=0;var Xe=te.x+se/3,Je=te.y+he/3,it=Xe,Mt=Je;Gt.B(he,0)?Mt=0<se?Mt-pe:Mt+pe:(ye=-se/he,Te=Math.sqrt(pe*pe/(ye*ye+1)),0>pe&&(Te=-Te),it=(0>he?-1:1)*Te+Xe,Mt=ye*(it-Xe)+Je),Xe=te.x+2*se/3,Je=te.y+2*he/3;var bt=Xe,At=Je;Gt.B(he,0)?At=0<se?At-pe:At+pe:(bt=(0>he?-1:1)*Te+Xe,At=ye*(bt-Xe)+Je),this.Fj(),this.ne(te),this.yf(it,Mt),this.yf(bt,At),this.ne(Ge),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,Ge=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ge),E=this.getLinkPoint(te,Ge,x,!1,!1,a,y),this.hasCurviness()?(Ge=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ge/2,y=b.y+x/2,te=a,se=y,Gt.B(x,0)?se=0<Ge?se-ne:se+ne:(Ge=-Ge/x,te=Math.sqrt(ne*ne/(Ge*Ge+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=Ge*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=Xt.alloc(),y.mi(se),he=se.ca(E),Ge.mi(se),pe=se.ca(b),(he||pe)&&(ne=y.ga(Vm(ne),new lt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(Vm(x),new lt),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),Xt.free(se))}else{Te=this.isAvoiding,Ge&&(ye&&Te||pe)&&this.Fj();var Ft=pe?this.computeCurviness():0;Te=this.getLinkPoint(a,y,ne,!0,ye,b,E),Xe=it=Je=0,(ye||!se||pe)&&(Mt=this.computeEndSegmentLength(a,y,ne,!0),Xe=this.getLinkDirection(a,y,Te,ne,!0,ye,b,E),pe&&(se||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Xe-=ye?90:30,0>Ft&&(Xe-=180)),0>Xe?Xe+=360:360<=Xe&&(Xe-=360),pe&&(Mt+=Math.abs(Ft)*(ye?1:2)),Xe===0?Je=Mt:Xe===90?it=Mt:Xe===180?Je=-Mt:Xe===270?it=-Mt:(Je=Mt*Math.cos(Xe*Math.PI/180),it=Mt*Math.sin(Xe*Math.PI/180)),ne.Mc()&&pe&&(Mt=y.ga(Fr,lt.alloc()),bt=lt.allocAt(Mt.x+1e3*Je,Mt.y+1e3*it),this.getLinkPointFromPoint(a,y,Mt,bt,!0,Te),lt.free(Mt),lt.free(bt))),Mt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Bt=At=bt=0;if(ye||!he||pe){var _t=this.computeEndSegmentLength(b,E,x,!1);Bt=this.getLinkDirection(b,E,Mt,x,!1,ye,a,y),pe&&(he||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Bt+=ye?0:30,0>Ft&&(Bt+=180)),0>Bt?Bt+=360:360<=Bt&&(Bt-=360),pe&&(_t+=Math.abs(Ft)*(ye?1:2)),Bt===0?bt=_t:Bt===90?At=_t:Bt===180?bt=-_t:Bt===270?At=-_t:(bt=_t*Math.cos(Bt*Math.PI/180),At=_t*Math.sin(Bt*Math.PI/180)),x.Mc()&&pe&&(x=E.ga(Fr,lt.alloc()),ne=lt.allocAt(x.x+1e3*bt,x.y+1e3*At),this.getLinkPointFromPoint(b,E,x,ne,!1,Mt),lt.free(x),lt.free(ne))}x=Te,(ye||!se||pe)&&(x=new lt(Te.x+Je,Te.y+it)),ne=Mt,(ye||!he||pe)&&(ne=new lt(Mt.x+bt,Mt.y+At)),!Ge&&!ye&&se&&3<te&&this.adjustPoints(0,Te,te-2,ne)?this.dd(te-1,Mt):!Ge&&!ye&&he&&3<te&&this.adjustPoints(1,x,te-1,Mt)?this.dd(0,Te):!Ge&&(ye?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Te),this.dd(te-1,Mt)):(this.Fj(),this.ne(Te),(ye||!se||pe)&&this.ne(x),ye&&this.addOrthoPoints(x,Xe,ne,Bt,a,b),(ye||!he||pe)&&this.ne(ne),this.ne(Mt))}return!0};function Zv(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}Mn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new lt),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var se=-a.m12*E,he=-a.m21*E,pe=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Te=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+ye,b=b.x*se+b.y*pe+Te,ne=x.x*ne+x.y*he+ye,x=x.x*se+x.y*pe+Te}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Mn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new lt),x.sb()&&!Id(x))return y.ga(x,se),se;if(x.$c()){var he=Km(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var pe=Km(this,ne);if(pe!==null&&he.Gl<pe.Gl){he=lt.alloc(),pe=lt.alloc();var ye=new Xt(y.ga(Xr,he),y.ga(Ni,pe)),Te=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Te,!b,E,a,y,pe),(x.Hf(ja)||x.Hf(vo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?se.y=a.y:(x.Hf(Vo)||x.Hf(fs))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(se.x=a.x),lt.free(he),lt.free(pe)}}return se}}return x=y.ga(Vm(x),lt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Zv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=lt.alloc(),ne=ne.ga(Vm(he),te),E&&(ne=Zv(x,ne)),lt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),lt.free(x),se},Mn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,se){e:if(b.sb())var he=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()&&(he=Km(this,y),he!==null))switch(he.Nc){case 1:he=270;break e;case 2:he=180;break e;default:case 4:he=0;break e;case 8:he=90;break e}he=y.ga(Fr,lt.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Zv(he,se.copy()):x):(x=lt.alloc(),se=se.ga(Fr,x),lt.free(x)),x=Math.abs(se.x-he.x)>Math.abs(se.y-he.y)?se.x>=he.x?0:180:se.y>=he.y?90:270,lt.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Id(b)||(a=y.li(),a===0)||(45<=a&&135>a?he+=90:135<=a&&225>a?he+=180:225<=a&&315>a&&(he+=270),360<=he&&(he-=360)),he},Mn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Km(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Mn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Fr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Zo?Or:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Zo?Or:y)),a};function Id(a){return a===Or||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:Fr}Mn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Qa&&4<this.pointsCount?this.computeMidPoint(new lt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Fr))},Mn.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},Mn.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=xr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&xr.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===this.locationObject){var Te=ye.actualBounds,Ge=this.naturalBounds;if(!(Te.x>Ge.width||Te.y>Ge.height||0>Te.x+Te.width||0>Te.y+Te.height)){if(Te=xr.alloc(),Te.set(ne),ye instanceof Pn)se=ye.Cf(a,y,x,b,E,Te);else if(this.path===ye){if(ye instanceof Dr)if(se=a,Ge=b,ye.pickable===!1)se=!1;else if(Te.multiply(ye.transform),Ge)e:{var Xe=se,Je=Te;if(ye.fh(Xe,Je))se=!0;else{if(Je===void 0&&(Je=ye.transform,Xe.Re(ye.actualBounds))){se=!0;break e}se=Xe.left,Ge=Xe.right;var it=Xe.top;Xe=Xe.bottom;var Mt=lt.alloc(),bt=lt.alloc(),At=lt.alloc(),Ft=xr.alloc();Ft.set(Je),Ft.bv(ye.transform),Ft.Vj(),bt.x=Ge,bt.y=it,bt.transform(Ft),Mt.x=se,Mt.y=it,Mt.transform(Ft),Je=!1,Yc(ye,Mt,bt,At)?Je=!0:(Mt.x=Ge,Mt.y=Xe,Mt.transform(Ft),Yc(ye,Mt,bt,At)?Je=!0:(bt.x=se,bt.y=Xe,bt.transform(Ft),Yc(ye,Mt,bt,At)?Je=!0:(Mt.x=se,Mt.y=it,Mt.transform(Ft),Yc(ye,Mt,bt,At)&&(Je=!0)))),xr.free(Ft),lt.free(Mt),lt.free(bt),lt.free(At),se=Je}}else se=ye.fh(se,Te)}else se=Yo(ye,a,b,Te);se&&(Ge=ye,y!==null&&(Ge=y(ye)),Ge&&(x===null||x(Ge))&&E.add(Ge)),xr.free(Te)}}}return te===void 0&&xr.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&xr.free(ne),!1},Mn.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?Gs:this.curve},Mn.prototype.computeCorner=function(){if(this.curve===Gs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Mn.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},Mn.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,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===ng||b===Jm||b===Qv?a=Math.max(a,E):b===ig||b===ag||b===rg||b===og?a=Math.max(a,ne):(y=y.ga(Fr).ab(x.ga(Fr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Gs&&(a*=1.333)}}return a},Mn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Qa&&x.bb()}},Mn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=Bn(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),Un(x)}}return a},Mn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Mn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Mn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===$m&&(E=tg)}switch(E){case Ym:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var se=ne.x-E,he=ne.y-te,pe=Math.sqrt(se*se+he*he);if(!Gt.$(pe,0)){if(Gt.$(se,0))var ye=0>he?-Math.PI/2:Math.PI/2;else ye=Math.atan(he/Math.abs(se)),0>se&&(ye=Math.PI-ye);ne=y.x;var Te=y.y;se=b.x-ne;var Ge=b.y-Te;for(he=Math.sqrt(se*se+Ge*Ge),Gt.$(se,0)?Ge=0>Ge?-Math.PI/2:Math.PI/2:(Ge=Math.atan(Ge/Math.abs(se)),0>se&&(Ge=Math.PI-Ge)),pe=he/pe,ye=Ge-ye,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),Gt.$(y,0)||(Gt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+ye,y*=pe,this.L(a,ne+y*Math.cos(se),Te+y*Math.sin(se)));this.dd(x,b)}}return!0;case $m:if(te=this.i(a),Te=this.i(x),!te.Xa(y)||!Te.Xa(b)){E=te.x,te=te.y,ne=Te.x,Te=Te.y,pe=(ne-E)*(ne-E)+(Te-te)*(Te-te),se=y.x,ye=y.y,he=b.x,Ge=b.y;var Xe=1;if(he-se!==0){var Je=(Ge-ye)/(he-se);Xe=Math.sqrt(1+1/(Je*Je))}else Je=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Mt=y.y,bt=.5;pe!==0&&(bt=((E-it)*(E-ne)+(te-Mt)*(te-Te))/pe);var At=E+bt*(ne-E),Ft=te+bt*(Te-te);y=Math.sqrt((it-At)*(it-At)+(Mt-Ft)*(Mt-Ft)),Mt<Je*(it-At)+Ft&&(y=-y),0<Je&&(y=-y),it=se+bt*(he-se),bt=ye+bt*(Ge-ye),Je!==0?(y=it+y/Xe,this.L(a,y,bt-(y-it)/Je)):this.L(a,it,bt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,ye=te.y,Te=se,pe=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=y.y:Gt.B(te.y,ne.y)&&(se=y.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=y.x:Gt.B(te.x,ne.x)&&(ye=y.y)),this.L(a+1,se,ye),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,ye=te.y,he=se,Ge=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=b.y:Gt.B(te.y,ne.y)&&(se=b.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=b.x:Gt.B(te.x,ne.x)&&(ye=b.y)),this.L(x-1,se,ye),Xv(this))){this.L(a+1,Te,pe),this.L(x-1,he,Ge),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Mn.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var se=E.actualBounds.copy(),he=te.actualBounds.copy();if(se.w()&&he.w()){se.Bc(sg,sg),he.Bc(sg,sg),se.Ye(a),he.Ye(x);var pe=lt.alloc(),ye=lt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,ye.x=pe.x,ye.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(pe.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=pe.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,ye.x=pe.x,ye.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(pe.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=pe.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(pe.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,ye.x=x.x,ye.y=pe.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(pe.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),ye.x=pe.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(pe.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,ye.x=x.x,ye.y=pe.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(pe.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),ye.x=pe.x,ye.y=x.y)));var Te=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!vd(Ge)||se.ca(Te)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Xe=yd(Ge,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Xe.Yj(Math.min(a.x,pe.x),Math.min(a.y,pe.y),Math.abs(a.x-pe.x),Math.abs(a.y-pe.y))&&Xe.Yj(Math.min(pe.x,ye.x),Math.min(pe.y,ye.y),Math.abs(pe.x-ye.x),Math.abs(pe.y-ye.y))&&Xe.Yj(Math.min(ye.x,Te.x),Math.min(ye.y,Te.y),Math.abs(ye.x-Te.x),Math.abs(ye.y-Te.y)))y=!1;else{E=a,te=Te;var Je=x=null;if(Ge.isVirtualized){Ge=Xe.bounds.copy(),Ge.Bc(-Xe.Ho,-Xe.Go);var it=lt.alloc();_d(Xe,a.x,a.y)||(Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,a.x,a.y,pe.x,pe.y,it)?(x=a=it.copy(),y=it.ab(pe)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,pe.x,pe.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ye.x,ye.y,Te.x,Te.y,it)&&(x=a=it.copy(),y=it.ab(Te))),_d(Xe,Te.x,Te.y)||(Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Te.x,Te.y,ye.x,ye.y,it)?(Je=Te=it.copy(),b=ye.ab(it)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ye.x,ye.y,pe.x,pe.y,it)?(Je=Te=it.copy(),b=pe.ab(it)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,pe.x,pe.y,a.x,a.y,it)&&(Je=Te=it.copy(),b=a.ab(it))),lt.free(it)}se=se.copy().ed(he),se.Bc(Xe.Ho*Xe.Os,Xe.Go*Xe.Os),aS(Xe,a,y,Te,b,se,!0),he=bu(Xe,Te.x,Te.y),!Xe.abort&&he>=zd&&(oS(Xe),se.Bc(Xe.Ho*Xe.Hx,Xe.Go*Xe.Ix),aS(Xe,a,y,Te,b,se,!1),he=bu(Xe,Te.x,Te.y)),!Xe.abort&&he<zd&&bu(Xe,Te.x,Te.y)!==kh?(Yv(this,Xe,Te.x,Te.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Te.y):(se.x=Te.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Gt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):Gt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Xe.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(Gt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):Gt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Xe.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Je!==null&&(b===0||b===180?this.yf(te.x,Je.y):this.yf(Je.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(pe.copy()),this.ne(ye.copy())),lt.free(pe),lt.free(ye)}},Mn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function Xv(a){if(a.diagram===null||!a.isAvoiding||!vd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=yd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Yv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,pe=bu(y,x,b),ye=x,Te=b;for(E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,E!==ne&&pe>Qc&&bu(y,ye,Te)!==pe-1&&(bu(y,x-se,b)===pe-1?(E=180,ye=x-se,Te=b):bu(y,x+se,b)===pe-1?(E=0,ye=x+se,Te=b):bu(y,x,b-he)===pe-1?(E=270,ye=x,Te=b-he):bu(y,x,b+he)===pe-1&&(E=90,ye=x,Te=b+he));pe>Qc&&bu(y,ye,Te)===pe-1;)x=ye,b=Te,E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,--pe;te?pe>Qc&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),pe>Qc&&(te=E,ne=x,ye=b,E===0?(te=90,ye+=he):E===90?(te=180,ne-=se):E===180?(te=270,ye-=he):E===270&&(te=0,ne+=se),bu(y,ne,ye)===pe-1?Yv(a,y,ne,ye,te,!1,te):(ne=x,ye=b,E===0?(te=270,ye-=he):E===90?(te=0,ne+=se):E===180?(te=90,ye+=he):E===270&&(te=180,ne-=se),bu(y,ne,ye)===pe-1&&Yv(a,y,ne,ye,te,!1,te))),a.yf(x,b)}Mn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=In(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var se=In(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Mn.prototype.qc=function(){this.lk=!1,this.v()},Mn.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 Dr&&(E.ua=this.ua)}}},Mn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Jc(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(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Gs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||Jc(this)){if(a.type=kn.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),Dd(se,E.x,E.y,!1),ne===Gs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=Df(this,E,!1,te)),wh(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=lt.allocAt(b,he),x=lt.alloc(),x.assign(this.i(1)),te=lt.allocAt(b,he),E=lt.allocAt(b,he),ne=this.i(0);for(var pe,ye=this.smoothness/3,Te=1;Te<this.pointsCount-1;Te++){pe=this.i(Te);var Ge=ne,Xe=pe,Je=this.i($v(this,pe,Te,!1));if((!Gt.$(Ge.x,Xe.x)||!Gt.$(Xe.x,Je.x))&&(!Gt.$(Ge.y,Xe.y)||!Gt.$(Xe.y,Je.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Mt=Ge.x;Ge=Ge.y;var bt=Xe.x;Xe=Xe.y;var At=Je.x;Je=Je.y;var Ft=it*Zm(Mt,Ge,bt,Xe);it*=Zm(bt,Xe,At,Je),Gt.$(Ge,Xe)&&Gt.$(bt,At)&&(bt>Mt?Je>Xe?(te.x=bt-Ft,te.y=Xe-Ft,E.x=bt+it,E.y=Xe+it):(te.x=bt-Ft,te.y=Xe+Ft,E.x=bt+it,E.y=Xe-it):Je>Xe?(te.x=bt+Ft,te.y=Xe-Ft,E.x=bt-it,E.y=Xe+it):(te.x=bt+Ft,te.y=Xe+Ft,E.x=bt-it,E.y=Xe-it)),Gt.$(Mt,bt)&&Gt.$(Xe,Je)&&(Xe>Ge?(At>bt?(te.x=bt-Ft,te.y=Xe-Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Xe-Ft,E.x=bt-it),E.y=Xe+it):(At>bt?(te.x=bt-Ft,te.y=Xe+Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Xe+Ft,E.x=bt-it),E.y=Xe-it)),(Gt.$(Mt,bt)&&Gt.$(bt,At)||Gt.$(Ge,Xe)&&Gt.$(Xe,Je))&&(Mt=.5*(Mt+At),Ge=.5*(Ge+Je),te.x=Mt,te.y=Ge,E.x=Mt,E.y=Ge),(Te===1||Te===2&&Gt.$(ne.x,this.i(0).x)&&Gt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+pe.x),x.y=.5*(ne.y+pe.y)),wh(se,x.x-b,x.y-he,te.x-b,te.y-he,pe.x-b,pe.y-he),y.set(te),x.set(E),ne=pe}}pe=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,On)),pe=.5*(pe+ye.x),ne=.5*(ne+ye.y),wh(se,E.x-b,E.y-he,pe-b,ne-he,ye.x-b,ye.y-he),lt.free(y),lt.free(x),lt.free(te),lt.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Df(this,ne.copy(),!1,On)),wh(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=lt.alloc(),te.assign(this.i(0)),E=lt.alloc(),E.assign(te),ne=this.computeCorner(),Te=1,pe=0;Te<y;){if(Te=$v(this,te,Te,1<Te),ye=this.i(Te),Te>=y-1){if(!te.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,On)),Bf(this,se,-b,-he,te,ye,x);else if(pe===0)for(Te=1;Te<y;)E.assign(te),ye=this.i(Te++),Bf(this,se,-b,-he,te,ye,x),te.assign(ye);break}if(pe=$v(this,ye,Te+1,Te<y-3),Te=-b,Mt=-he,Ge=ye,bt=this.i(pe),it=x,Gt.B(te.y,Ge.y)&&Gt.B(Ge.x,bt.x))if(Je=Math.min(ne,Math.abs(Ge.x-E.x)/2),Je=Ft=Math.min(Je,Math.abs(bt.y-Ge.y)/2),Gt.B(Je,0))Bf(this,se,Te,Mt,te,Ge,it),te.assign(Ge);else{var Bt=Ge.x,_t=Ge.y;Xe=Bt,At=_t,Ge.x>te.x?Bt=Ge.x-Je:Bt=Ge.x+Je,bt.y>Ge.y?At=Ge.y+Ft:At=Ge.y-Ft,bt=lt.allocAt(Bt,_t),Bf(this,se,Te,Mt,te,bt,it),lt.free(bt),Im(se,Ge.x+Te,Ge.y+Mt,Xe+Te,At+Mt),te.h(Xe,At)}else Gt.B(te.x,Ge.x)&&Gt.B(Ge.y,bt.y)?(Je=Math.min(ne,Math.abs(Ge.y-E.y)/2),Je=Ft=Math.min(Je,Math.abs(bt.x-Ge.x)/2),Gt.B(Ft,0)?(Bf(this,se,Te,Mt,te,Ge,it),te.assign(Ge)):(Bt=Ge.x,_t=Ge.y,Xe=Bt,At=_t,Ge.y>te.y?_t=Ge.y-Je:_t=Ge.y+Je,bt.x>Ge.x?Xe=Ge.x+Ft:Xe=Ge.x-Ft,bt=lt.allocAt(Bt,_t),Bf(this,se,Te,Mt,te,bt,it),lt.free(bt),Im(se,Ge.x+Te,Ge.y+Mt,Xe+Te,At+Mt),te.h(Xe,At))):(Bf(this,se,Te,Mt,te,Ge,it),te.assign(Ge));E.assign(ye),Te=pe}lt.free(te)}Rm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Df(this,se,!1,te)),a.type=kn.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function Zm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Gt.$(a,0)?y:Gt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Df(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=Zm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=Zm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function $v(a,y,x,b){for(var E=a.pointsCount,te=y;Gt.$(y.x,te.x)&&Gt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Gt.$(y.x,te.x)&&!Gt.$(y.y,te.y))return x-1;for(var ne=te;Gt.$(y.x,te.x)&&Gt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Gt.$(y.y,te.y)&&Gt.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}Mn.prototype.computeJumpLength=function(){return 10};function Bf(a,y,x,b,E,te,ne){if(!ne&&Jc(a)){ne=a.computeJumpLength();var se=ne/2,he=[],pe=0;if(a.isVisible()&&(pe=kx(a,E,te,he)),0<pe){if(Gt.B(E.y,te.y))if(E.x<te.x)for(var ye=0;ye<pe;){var Te=Math.max(E.x,Math.min(he[ye++]-se,te.x-ne));y.lineTo(Te+x,te.y+b);for(var Ge=Te+x,Xe=Math.min(Te+ne,te.x);ye<pe&&(Te=he[ye],Te<Xe+ne);)ye++,Xe=Math.min(Te+se,te.x);Te=te.y-ne+b,Xe+=x;var Je=te.y+b;a.curve===Eh?Dd(y,Xe,Je,!1):wh(y,Ge,Te,Xe,Te,Xe,Je)}else for(--pe;0<=pe;){for(ye=Math.min(E.x,Math.max(he[pe--]+se,te.x+ne)),y.lineTo(ye+x,te.y+b),Ge=ye+x,Te=Math.max(ye-ne,te.x);0<=pe&&(ye=he[pe],ye>Te-ne);)pe--,Te=Math.max(ye-se,te.x);ye=te.y-ne+b,Te+=x,Xe=te.y+b,a.curve===Eh?Dd(y,Te,Xe,!1):wh(y,Ge,ye,Te,ye,Te,Xe)}else if(Gt.B(E.x,te.x))if(E.y<te.y)for(ye=0;ye<pe;){for(Te=Math.max(E.y,Math.min(he[ye++]-se,te.y-ne)),y.lineTo(te.x+x,Te+b),Ge=Te+b,Te=Math.min(Te+ne,te.y);ye<pe&&(Xe=he[ye],Xe<Te+ne);)ye++,Te=Math.min(Xe+se,te.y);Xe=te.x-ne+x,Je=te.x+x,Te+=b,a.curve===Eh?Dd(y,Je,Te,!1):wh(y,Xe,Ge,Xe,Te,Je,Te)}else for(--pe;0<=pe;){for(ye=Math.min(E.y,Math.max(he[pe--]+se,te.y+ne)),y.lineTo(te.x+x,ye+b),Ge=ye+b,ye=Math.max(ye-ne,te.y);0<=pe&&(Te=he[pe],Te>ye-ne);)pe--,ye=Math.max(Te-se,te.y);Te=te.x-ne+x,Xe=te.x+x,ye+=b,a.curve===Eh?Dd(y,Xe,ye,!1):wh(y,Te,Ge,Te,ye,Xe,ye)}}}y.lineTo(te.x+x,te.y+b)}function kx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,se=0;se<ne;se++){var he=te[se];if(he instanceof Mn){if(he===a)return 0<b.length&&b.sort(function(ye,Te){return ye-Te}),b.length;if(he.isVisible()&&Jc(he)){var pe=he.routeBounds;pe.w()&&a.routeBounds.Yc(pe)&&!a.usesSamePort(he)&&(pe=he.path,pe!==null&&pe.Ed()&&Tx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(ye,Te){return ye-Te}),b.length}function Tx(a,y,x,b){for(var E=Gt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=lt.alloc(),he=1;he<te;he++){var pe=b.i(he);if(he<te-1){var ye=b.i(he+1);if(ne.y===pe.y&&pe.y===ye.y){if(pe.x>ne.x&&ye.x>=pe.x||pe.x<ne.x&&ye.x<=pe.x)continue}else if(ne.x===pe.x&&pe.x===ye.x&&(pe.y>ne.y&&ye.y>=pe.y||pe.y<ne.y&&ye.y<=pe.y))continue}e:{ye=a.x;var Te=a.y,Ge=y.x,Xe=y.y,Je=ne.x;ne=ne.y;var it=pe.x,Mt=pe.y;if(Gt.B(ye,Ge)){if(!Gt.B(Te,Xe)&&Gt.B(ne,Mt)&&Math.min(Te,Xe)<ne&&Math.max(Te,Xe)>ne&&Math.min(Je,it)<ye&&Math.max(Je,it)>ye&&!Gt.B(Je,it)){se.x=ye,se.y=ne,ye=!0;break e}}else if(Gt.B(Te,Xe)&&Gt.B(Je,it)&&Math.min(ye,Ge)<Je&&Math.max(ye,Ge)>Je&&Math.min(ne,Mt)<Te&&Math.max(ne,Mt)>Te&&!Gt.B(ne,Mt)){se.x=Je,se.y=Te,ye=!0;break e}se.x=0,se.y=0,ye=!1}ye&&(E?x.push(se.x):x.push(se.y)),ne=pe}lt.free(se)}function Jc(a){return a=a.curve,a===Rd||a===Eh}function Xm(a,y){(y||Jc(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()))}Mn.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 te=!1;E=E.Pa.s;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];he instanceof Mn&&(he===this?te=!0:te&&tS(this,he,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)se=te[ne],se instanceof Mn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Jc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Mn.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},Mn.prototype.isVisible=function(){if(!hr.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},Mn.prototype.Zb=function(a){if(hr.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)},Mn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tg:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,se=ne.length,he=0;he<se;he++){var pe=ne[he];(pe.ef===y&&pe.ff===b&&pe.uf===x&&pe.vf===E||pe.ef===x&&pe.ff===E&&pe.uf===y&&pe.vf===b)&&(te===null?te=pe:(a===null&&(a=[],a.push(te)),a.push(pe)))}if(a!==null){for(te=W1(y,x,b,E),te===null&&(te=new qm(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function eg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(mr(y.links,a),y.Sl()))}Mn.prototype.ph=function(){return!0},vn.Object.defineProperties(Mn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Um(y,this,x),eg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),Bd(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ts(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Ts(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Um(y,this,x),eg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),Bd(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ts(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Ts(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Zo},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&&Ts(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&&jn(a,">= 0",Mn,"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:Zo},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&&Ts(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&&jn(a,">= 0",Mn,"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?hi: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&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Dr?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()===Gs&&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 te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),Gt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var se=this.i(te-1),he=this.i(te);Gt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new lt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||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);Gt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Gt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new pn,b=0;b<a.length/2;b++)E=new lt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!Jt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new pn,b=0;b<a.length;b++)E=a[b],x.add(new lt(E.x,E.y).freeze())}}else if(a instanceof pn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else jt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Hm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ld(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Id(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Id(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),Xm(this,y===Eh||y===Rd||a===Eh||a===Rd),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Xm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Mn.prototype.invalidateOtherJumpOvers=Mn.prototype.Xo,Mn.prototype.findClosestSegment=Mn.prototype.ez,Mn.prototype.updateRoute=Mn.prototype.vg,Mn.prototype.invalidateRoute=Mn.prototype.bb,Mn.prototype.rollbackRoute=Mn.prototype.rv,Mn.prototype.commitRoute=Mn.prototype.zf,Mn.prototype.startRoute=Mn.prototype.uh,Mn.prototype.clearPoints=Mn.prototype.Fj,Mn.prototype.removePoint=Mn.prototype.pv,Mn.prototype.addPointAt=Mn.prototype.yf,Mn.prototype.addPoint=Mn.prototype.ne,Mn.prototype.insertPointAt=Mn.prototype.m,Mn.prototype.insertPoint=Mn.prototype.Kz,Mn.prototype.setPointAt=Mn.prototype.L,Mn.prototype.setPoint=Mn.prototype.dd,Mn.prototype.getPoint=Mn.prototype.i,Mn.prototype.getOtherPort=Mn.prototype.Cz,Mn.prototype.getOtherNode=Mn.prototype.To;var If=null,Rf=null,Jv=new Yt(Mn,"Normal",1),Mx=new Yt(Mn,"Orthogonal",2),Lx=new Yt(Mn,"AvoidsNodes",6),nS=new Yt(Mn,"AvoidsNodesStraight",7),Qa=new Yt(Mn,"None",0),Gs=new Yt(Mn,"Bezier",9),Eh=new Yt(Mn,"JumpGap",10),Rd=new Yt(Mn,"JumpOver",11),tg=new Yt(Mn,"End",17),Ym=new Yt(Mn,"Scale",18),$m=new Yt(Mn,"Stretch",19),ng=new Yt(Mn,"OrientAlong",21),rg=new Yt(Mn,"OrientPlus90",22),ig=new Yt(Mn,"OrientMinus90",23),Qv=new Yt(Mn,"OrientOpposite",24),Jm=new Yt(Mn,"OrientUpright",25),og=new Yt(Mn,"OrientPlus90Upright",26),ag=new Yt(Mn,"OrientMinus90Upright",27),Qm=new Yt(Mn,"OrientUpright45",28),rS=16,iS=14,sg=8;Mn.className="Link",Mn.Normal=Jv,Mn.Orthogonal=Mx,Mn.AvoidsNodes=Lx,Mn.AvoidsNodesStraight=nS,Mn.None=Qa,Mn.Bezier=Gs,Mn.JumpGap=Eh,Mn.JumpOver=Rd,Mn.End=tg,Mn.Scale=Ym,Mn.Stretch=$m,Mn.OrientAlong=ng,Mn.OrientPlus90=rg,Mn.OrientMinus90=ig,Mn.OrientOpposite=Qv,Mn.OrientUpright=Jm,Mn.OrientPlus90Upright=og,Mn.OrientMinus90Upright=ag,Mn.OrientUpright45=Qm,Mn.EndSegmentStep=8,Mn.CurvinessStart=rS,Mn.SpacingMin=iS,Mn.OrthoShortCut=sg;function qm(a,y,x,b){Sr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}qm.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},qm.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},qm.className="LinkBundle";function lg(a){Sr(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}lg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function _d(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function bu(a,y,x){return _d(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}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]>=Qc&&(x[b]=qv)}lg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===kh)return!1}return!0};function Cu(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var pe=y|0,ye=x|0,Te=a.ac[pe][ye];if(Te>=Qc&&Te<zd)for(E?ye+=b:pe+=b,Te+=1;te<=pe&&pe<=ne&&se<=ye&&ye<=he&&!(Te>=a.ac[pe][ye]);)a.ac[pe][ye]=Te,Te+=1,E?ye+=b:pe+=b;if(pe=E?ye:pe,E)if(0<b)for(x+=b;x<pe;x+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>pe;x+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<pe;y+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>pe;y+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he)}}function e0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=Qc;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,pe=a.ac[y][x]}function t0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=zd;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=ye,E?x+=b:y+=b,pe=a.ac[y][x]}function aS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(_d(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var pe=b.x,ye=b.y;if(_d(a,pe,ye))if(pe-=a.Nd,pe/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(se-pe)&&1>=Math.abs(he-ye))a.abort=!0;else{var Te=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Te-=a.Nd,Te/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ge-=a.Od,Ge/=a.sc,te=Math.max(0,Math.min(a.di,Te|0)),y=Math.min(a.di,Math.max(0,y|0)),Te=Math.max(0,Math.min(a.ei,b|0)),Ge=Math.min(a.ei,Math.max(0,Ge|0)),b=a.ac,se|=0,he|=0,pe|=0,ye|=0;var Xe=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===kh?(e0(a,se,he,Xe,x,te,y,Te,Ge),e0(a,se,he,1,!x,te,y,Te,Ge),e0(a,se,he,-1,!x,te,y,Te,Ge)):e0(a,se,he,Xe,x,se,he,se,he),b[pe][ye]===kh?(t0(a,pe,ye,E===0||E===90?1:-1,E===90||E===270,te,y,Te,Ge),t0(a,pe,ye,1,!(E===90||E===270),te,y,Te,Ge),t0(a,pe,ye,-1,!(E===90||E===270),te,y,Te,Ge)):t0(a,pe,ye,Xe,x,pe,ye,pe,ye),x=Bn(),ne&&sS(a,pe,ye,E,se,he,x))for((x[0]!==pe||x[1]!==ye)&&(x.unshift(ye),x.unshift(pe)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=Qc,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],pe=x[te+1];y>E?E++:y<E?E--:pe>ne?ne++:pe<ne&&ne--,b[E][ne]=a++,E!==y||ne!==pe;);else Cu(a,se,he,1,!1,te,y,Te,Ge),Cu(a,se,he,-1,!1,te,y,Te,Ge),Cu(a,se,he,1,!0,te,y,Te,Ge),Cu(a,se,he,-1,!0,te,y,Te,Ge);Un(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,pe=x;;){if(he===E&&pe===te)return!0;var ye=he,Te=pe;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Te<te)Te++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Te>te)Te--;else break;var Ge=se[ye][Te];if(Ge===0||Ge===ey)break;he=ye,pe=Te}for(;;){if(ye=b,Te=he,Ge=pe,b===0?Ge<te?(ye=90,Ge++):Ge>te&&(ye=270,Ge--):b===90?Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--):b===180?Ge<te?(ye=90,Ge++):Ge>te&&(ye=270,Ge--):Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--),Te=se[Te][Ge],ye!==b&&Te!==0&&Te!==ey){if(ne.push(he),ne.push(pe),sS(a,he,pe,ye,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][pe]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(pe===x)return!1;pe--}else if(b===180){if(he===y)return!1;he++}else{if(pe===x)return!1;pe++}}}vn.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new Xt(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var kh=0,Qc=1,zd=999999,qv=zd+1,ey=zd+2;lg.className="PositionArray";function _f(){Sr(this),this.port=this.node=null,this.pe=[],this.ap=!1}_f.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
`+b.toString())}return y};function Nx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}_f.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof Tr?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var se=a.port.ga(Xr,lt.alloc()),he=a.port.ga(Ni,lt.alloc());for(E=Xt.allocAt(se.x,se.y,0,0),E.Ye(he),lt.free(se),lt.free(he),se=lt.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var pe=ne.value;if(pe.isVisible()&&pe.fromPort!==pe.toPort){var ye=pe.fromPort===a.port||pe.fromNode!==null&&pe.fromNode.Td(b),Te=pe.computeSpot(ye,a.port);if(Te.$c()&&(ye=ye?pe.toPort:pe.fromPort,ye!==null)){var Ge=ye.part;if(Ge!==null){var Xe=Ge.findVisibleNode();Xe!==null&&Xe!==Ge&&(Ge=Xe,ye=Ge.port),ye=pe.computeOtherPoint(Ge,ye),Ge=se.ab(ye),Ge-=he,0>Ge?Ge+=360:360<=Ge&&(Ge-=360),Te=Nx(E,Te,Ge,pe.isOrthogonal),Te===0?(Te=4,180<Ge&&(Ge-=360)):Te===90?(Te=8,270<Ge&&(Ge-=360)):Te===180?Te=2:(Te=1,90>Ge&&(Ge+=360)),Xe=a.pe[te],Xe===void 0?(Xe=new ty(pe,Ge,Te),a.pe[te]=Xe):(Xe.link=pe,Xe.angle=Ge,Xe.Nc=Te),Xe.hv.set(ye),te++}}}}for(lt.free(se),a.pe.sort(_f.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Te=a.port,b=a.node.portSpreading,se=lt.alloc(),he=lt.alloc(),ne=lt.alloc(),pe=lt.alloc(),Te.ga(Xr,se),Te.ga(Ei,he),Te.ga(Ni,ne),Te.ga(zo,pe),Xe=Ge=ye=Te=0,b===Hv)for(var Je=0;Je<te.length;Je++){var it=te[Je];if(it!==null){var Mt=it.link.computeThickness();switch(it.Nc){case 8:Ge+=Mt;break;case 2:Xe+=Mt;break;case 1:Te+=Mt;break;default:case 4:ye+=Mt}}}var bt=Je=0,At=1,Ft=it=0;for(Mt=0;Mt<te.length;Mt++){var Bt=te[Mt];if(Bt!==null){if(Je!==Bt.Nc){switch(Je=Bt.Nc,Je){case 8:var _t=ne;bt=pe;break;case 2:_t=pe,bt=se;break;case 1:_t=se,bt=he;break;default:case 4:_t=he,bt=ne}switch(it=bt.x-_t.x,Ft=bt.y-_t.y,Je){case 8:Ge>Math.abs(it)?(At=Math.abs(it)/Ge,Ge=Math.abs(it)):At=1;break;case 2:Xe>Math.abs(Ft)?(At=Math.abs(Ft)/Xe,Xe=Math.abs(Ft)):At=1;break;case 1:Te>Math.abs(it)?(At=Math.abs(it)/Te,Te=Math.abs(it)):At=1;break;default:case 4:ye>Math.abs(Ft)?(At=Math.abs(Ft)/ye,ye=Math.abs(Ft)):At=1}bt=0}var Kt=Bt.Zo;if(b===Hv){switch(Bt=Bt.link.computeThickness(),Bt*=At,Kt.set(_t),Je){case 8:Kt.x=_t.x+it/2+Ge/2-bt-Bt/2;break;case 2:Kt.y=_t.y+Ft/2+Xe/2-bt-Bt/2;break;case 1:Kt.x=_t.x+it/2-Te/2+bt+Bt/2;break;default:case 4:Kt.y=_t.y+Ft/2-ye/2+bt+Bt/2}bt+=Bt}else{var Rn=.5;b===Wm&&(Rn=(Bt.Uo+1)/(Bt.Gl+1)),Kt.x=_t.x+it*Rn,Kt.y=_t.y+Ft*Rn}}}for(lt.free(se),lt.free(he),lt.free(ne),lt.free(pe),_t=a.pe,te=0;te<_t.length;te++)b=_t[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Xt.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}_f.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},_f.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Or,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 te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},_f.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new lt,this.Gl=this.Uo=0,this.Zo=new lt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function so(a){Sr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new lt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}so.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},so.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},so.prototype.qb=function(){},so.prototype.toString=function(){var a=er(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},so.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},so.prototype.createNetwork=function(){return new Xi(this)},so.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Vt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Tr?y.lg(a.memberParts):y.lg(a.iterator),y},so.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},so.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},so.prototype.doLayout=function(a){var y=new yn;a instanceof Vt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Tr?ac(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},so.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var se=a.value;ug(se);var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(b,E),se instanceof Tr&&(se.rh=!1),b+=Math.max(pe,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},so.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value.node;if(!(se===null||se instanceof Mn)&&(ug(se),this.rh(se))){var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(x,b),se instanceof Tr&&(se.rh=!1),x+=Math.max(pe,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},so.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Tr&&a.rh)};function ac(a,y,x,b,E,te,ne,se){for(x=x.iterator;x.next();){var he=x.value;b&&!he.isTopLevel||E!==null&&!E(he)||!he.canLayout()||(te&&he instanceof Gn?he.isLinkLabel||(he instanceof Tr&&he.layout===null?ac(a,y,he.memberParts,!1,E,te,ne,se):(ug(he),y.add(he))):ne&&he instanceof Mn?y.add(he):!se||!he.Zc()||he instanceof Gn||(ug(he),y.add(he)))}}function ug(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}so.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Xt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},so.prototype.ex=function(a){var y=new yn;return a instanceof Vt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Tr?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},so.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Xr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},vn.Object.defineProperties(so.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),so.prototype.collectParts=so.prototype.ex,so.prototype.getLayoutBounds=so.prototype.ni,so.prototype.invalidateLayout=so.prototype.C,so.className="Layout";function Xi(a){Sr(this),this.Sc=a,this.wf=new yn,this.ye=new yn,this.Es=new Zt,this.zs=new Zt}Xi.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new yn,this.ye=new yn,this.Es=new Zt,this.zs=new Zt},Xi.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
`+x.value.toString(a-1)}return y},Xi.prototype.createVertex=function(){return new Ho(this)},Xi.prototype.createEdge=function(){return new Ms(this)},Xi.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof Gn)return!ne.isLinkLabel;if(ne instanceof Mn){var se=ne.fromNode;return se===null||se.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Gn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Tr&&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 Mn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},Xi.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},et=Xi.prototype,et.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},et.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},et.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}et.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},et.ki=function(a){return a===null?null:this.Es.I(a)},et.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}}et.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},et.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))}et.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},et.Lo=function(a){return a===null?null:this.zs.I(a)},et.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},et.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))}},et.Ko=function(){for(var a=Bn(),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]);Un(a)},Xi.prototype.deleteArtificialVertexes=function(){for(var a=Bn(),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=Bn(),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]);Un(a),Un(y)};function Ax(a){for(var y=Bn(),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]);Un(y)}Xi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new pn;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,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Xi.prototype.dz=function(){for(var a=new yn,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},vn.Object.defineProperties(Xi.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),Xi.prototype.findAllParts=Xi.prototype.dz,Xi.prototype.splitIntoSubNetworks=Xi.prototype.Zx,Xi.prototype.deleteSelfEdges=Xi.prototype.Ko,Xi.prototype.reverseEdge=Xi.prototype.gm,Xi.prototype.linkVertexes=Xi.prototype.Zj,Xi.prototype.findEdge=Xi.prototype.Lo,Xi.prototype.deleteLink=Xi.prototype.Yy,Xi.prototype.deleteEdge=Xi.prototype.Mj,Xi.prototype.addLink=Xi.prototype.Dy,Xi.prototype.addEdge=Xi.prototype.Bo,Xi.prototype.findVertex=Xi.prototype.ki,Xi.prototype.deleteNode=Xi.prototype.Zy,Xi.prototype.deleteVertex=Xi.prototype.Iu,Xi.prototype.addNode=Xi.prototype.Bl,Xi.prototype.addVertex=Xi.prototype.dh,Xi.prototype.addParts=Xi.prototype.lg,Xi.className="LayoutNetwork";function Ho(a){Sr(this),this.ob=a,this.j=new Xt(0,0,10,10).freeze(),this.o=new lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn}Ho.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn},Ho.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Jr(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 te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Ho.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Jt(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 Tr)){x=Xt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Fr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Xt.free(x);return}Xt.free(x)}a.moveTo(y.x,y.y)}},Ho.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ho.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ho.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ho.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}vn.Object.defineProperties(Ho.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=Xt.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),Xt.free(x),!(a instanceof Tr)&&(a=a.locationObject.ga(Fr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/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 yn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new yn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new yn,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 pn,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}}}),Ho.prototype.deleteDestinationEdge=Ho.prototype.Jl,Ho.prototype.addDestinationEdge=Ho.prototype.zl,Ho.prototype.deleteSourceEdge=Ho.prototype.Kl,Ho.prototype.addSourceEdge=Ho.prototype.Cl,Ho.className="LayoutVertex",Ho.standardComparer=oy,Ho.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 Ms(a){Sr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ms.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Jr(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},Ms.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ms.prototype.commit=function(){},Ms.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},vn.Object.defineProperties(Ms.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)}}}),Ms.prototype.getOtherVertex=Ms.prototype.Ax,Ms.className="LayoutEdge";function ha(a){so.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new ln(NaN,NaN).freeze(),this.tf=new ln(10,10).freeze(),this.Jb=hg,this.Rb=r0,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}en(ha,so),ha.prototype.cloneProtected=function(a){so.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},ha.prototype.qb=function(a){a.classType===ha?a===cg||a===o0||a===ay||a===i0?this.sorting=a:a===r0||a===Il?this.arrangement=a:a===hg||a===n0?this.alignment=a:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},ha.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 Tr)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 i0:E.reverse();break;case cg:E.sort(this.comparer);break;case o0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=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 n0:var se=y,he=x,pe=Xt.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Te=ye=0;Te<E.length;Te++){var Ge=this.ni(E[Te],pe);ye=Math.max(ye,Ge.width)}if(ye=Math.max(ye+se,1),Te=Math.max(this.cellSize.height,1),!isFinite(Te))for(Ge=Te=0;Ge<E.length;Ge++){var Xe=this.ni(E[Ge],pe);Te=Math.max(Te,Xe.height)}Te=Math.max(Te+he,1),Ge=this.arrangement;for(var Je=Xe=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Mt=0,bt=0,At=0;At<E.length;At++){var Ft=E[At],Bt=this.ni(Ft,pe),_t=Math.ceil((Bt.width+se)/ye)*ye,Kt=Math.ceil((Bt.height+he)/Te)*Te;switch(Ge){case Il:var Rn=Math.abs(Je-Bt.width);break;default:Rn=Je+Bt.width}switch((0<te&&Mt>te-1||0<ne&&0<Mt&&Rn-Xe>ne)&&(b.push(new Xt(0,it,ne+se,bt)),Mt=0,Je=Xe,it+=bt,bt=0),bt=Math.max(bt,Kt),Ge){case Il:Bt=-Bt.width;break;default:Bt=0}switch(Ft.moveTo(Je+Bt,it),Ge){case Il:Je-=_t;break;default:Je+=_t}Mt++}b.push(new Xt(0,it,ne+se,bt)),Xt.free(pe);break;case hg:for(he=ne,ye=te,Te=y,Ge=x,ne=Xt.alloc(),Xe=Math.max(this.cellSize.width,1),te=it=pe=0,se=lt.alloc(),Je=0;Je<E.length;Je++)bt=E[Je],Mt=this.ni(bt,ne),bt=Ph(bt,bt.locationObject,bt.locationSpot,se),pe=Math.max(pe,bt.x),it=Math.max(it,Mt.width-bt.x),te=Math.max(te,bt.y);switch(Je=this.arrangement,Je){case Il:pe+=Te;break;default:it+=Te}Xe=isFinite(Xe)?Math.max(Xe+Te,1):Math.max(pe+it,1);var Jn=bt=this.arrangementOrigin.x;for(At=this.arrangementOrigin.y,it=0,he>=pe&&(he-=pe),pe=Ft=0,_t=Math.max(this.cellSize.height,1),Bt=te=0,Kt=!0,Mt=lt.alloc(),Rn=0;Rn<E.length;Rn++){var Zn=E[Rn],Tn=this.ni(Zn,ne),hn=Ph(Zn,Zn.locationObject,Zn.locationSpot,se);if(0<it)switch(Je){case Il:Jn=(Jn-bt-(Tn.width-hn.x))/Xe,Jn=Gt.$(Math.round(Jn),Jn)?Math.round(Jn):Math.floor(Jn),Jn=Jn*Xe+bt;break;default:Jn=(Jn-bt+hn.x)/Xe,Jn=Gt.$(Math.round(Jn),Jn)?Math.round(Jn):Math.ceil(Jn),Jn=Jn*Xe+bt}else switch(Je){case Il:Ft=Jn+hn.x+Tn.width;break;default:Ft=Jn-hn.x}switch(Je){case Il:var kr=-(Jn+hn.x)+Ft;break;default:kr=Jn+Tn.width-hn.x-Ft}if(0<ye&&it>ye-1||0<he&&0<it&&kr>he){for(b.push(new Xt(0,Kt?At-te:At,he+Te,Bt+te+Ge)),Jn=0;Jn<it&&Rn!==it;Jn++){kr=E[Rn-it+Jn];var wr=Ph(kr,kr.locationObject,kr.locationSpot,Mt);kr.moveTo(kr.position.x,kr.position.y+te-wr.y)}Bt+=Ge,At=Kt?At+Bt:At+(Bt+te),it=Bt=te=0,Jn=bt,Kt=!1}switch(Jn===bt&&(pe=Je===Il?Math.max(pe,Tn.width-hn.x):Math.min(pe,-hn.x)),te=Math.max(te,hn.y),Bt=Math.max(Bt,Tn.height-hn.y),isFinite(_t)&&(Bt=Math.max(Bt,Math.max(Tn.height,_t)-hn.y)),Kt?Zn.moveTo(Jn-hn.x,At-hn.y):Zn.moveTo(Jn-hn.x,At),Je){case Il:Jn-=hn.x+Te;break;default:Jn+=Tn.width-hn.x+Te}it++}if(b.push(new Xt(0,At,he+Te,(Kt?Bt:Bt+te)+Ge)),E.length!==it)for(he=0;he<it;he++)ye=E[E.length-it+he],Te=Ph(ye,ye.locationObject,ye.locationSpot,se),ye.moveTo(ye.position.x,ye.position.y+te-Te.y);if(lt.free(se),lt.free(Mt),Je===Il)for(E=0;E<b.length;E++)te=b[E],te.width+=pe,te.x-=pe;else for(E=0;E<b.length;E++)te=b[E],te.x>pe&&(te.width+=te.x-pe,te.x=pe);Xt.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===Il?this.commitLayers(b,new lt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new lt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ha.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}vn.Object.defineProperties(ha.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==hg&&a!==n0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==r0&&a!==Il||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==i0&&a!==cg&&a!==o0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var n0=new Yt(ha,"Position",0),hg=new Yt(ha,"Location",1),r0=new Yt(ha,"LeftToRight",2),Il=new Yt(ha,"RightToLeft",3),ay=new Yt(ha,"Forward",4),i0=new Yt(ha,"Reverse",5),cg=new Yt(ha,"Ascending",6),o0=new Yt(ha,"Descending",7);ha.className="GridLayout",ha.standardComparer=hS,ha.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},ha.Position=n0,ha.Location=hg,ha.LeftToRight=r0,ha.RightToLeft=Il,ha.Forward=ay,ha.Reverse=i0,ha.Ascending=cg,ha.Descending=o0;function Ti(){this.On=new yn,this.Dn=new yn,this.Pa=new yn,this.cf=new Zt,this.bf=new Zt,this.aj=new Zt,this.H=null,this.tp=!1}et=Ti.prototype,et.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},et.Xe=function(a){this.H=a},et.oi=function(a){if(a instanceof Gn){if(this.On.add(a),a instanceof Tr){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 Mn?this.Dn.add(a):a instanceof di||this.Pa.add(a);y=a.data,y===null||a instanceof di||(a instanceof Mn?this.bf.add(y,a):this.cf.add(y,a))},et.pc=function(a){if(a.Ej(),a instanceof Gn){if(this.On.remove(a),a instanceof Tr){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 Mn?this.Dn.remove(a):a instanceof di||this.Pa.remove(a);y=a.data,y===null||a instanceof di||(a instanceof Mn?this.bf.remove(y):this.cf.remove(y))},et.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 Tr)&&jt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Tr||jt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Mn||jt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Bn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Bn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Bn(),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]);Un(y),Un(x),Un(a)}},Ti.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ti.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&gd(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(dl(E),E=E.copy(),E!==null)){var te=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=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}Ti.prototype.insertLink=function(){return null},Ti.prototype.resolveReferencesForData=function(){},Ti.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,Cn('No Group template found for category "'+x+'"'),Cn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Cn('No Node template found for category "'+x+'"'),Cn(" Using default node template")),y=a.ny))),y}Ti.prototype.getLinkCategoryForData=function(){return""},Ti.prototype.setLinkCategoryForData=function(){},Ti.prototype.setFromNodeForLink=function(){},Ti.prototype.setToNodeForLink=function(){},Ti.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,Cn('No Link template found for category "'+a+'"'),Cn(" Using default link template")),x=y.my)),x},Ti.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ti.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ti.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ti.prototype.unresolveReferencesForPart=function(){},Ti.prototype.removeDataForLink=function(){},Ti.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ti.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Gn?a:null)},Ti.prototype.findLinkForKey=function(){return null},et=Ti.prototype,et.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},et.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Gn?a:null)},et.Kc=function(a){return a===null?null:this.bf.I(a)},et.ms=function(a){for(var y=0;y<arguments.length;++y);y=new yn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Jt(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},et.ls=function(a){for(var y=0;y<arguments.length;++y);y=new yn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Jt(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],te=x[b];if(_n(te)){if(!_n(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!dS(a,E[ne],se))return!1}}else if(!dS(a,E,te))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(Jt(y)&&Jt(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Ti.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===no){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===wo){var ne=a.newValue;b==="nodeDataArray"&&Jt(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var se=a.oldValue;b==="nodeDataArray"&&Jt(se)&&this.ip(se),y.isModified=!0}else x===Ea&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===no){var he=a.propertyName,pe=a.object;pe===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(pe,he),y.isModified=!0}else if(x===wo||x===Eo){var ye=a.change===wo,Te=ye?a.newParam:a.oldParam,Ge=ye?a.newValue:a.oldValue,Xe=this.aj.I(a.object);if(Array.isArray(Xe))for(a=0;a<Xe.length;a++){var Je=Xe[a];if(ye)Cm(Je,Ge,Te,!0);else if(!(0>Te)){var it=Te+Vp(Je);Je.pc(it,!0),wv(Je,it,Te)}}y.isModified=!0}}finally{y.aa=!0}}}}},Ti.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)},Ti.prototype.rp=function(){for(var a=this.H.model,y=new yn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&CS(a,te,!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()},Ti.prototype.refreshDataBoundLinks=function(){},Ti.prototype.updateRelationshipsFromData=function(){},Ti.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,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=Bn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Un(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(_n(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){Zc(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)Np(x,ne[he])});var b=y.Hh;if(_n(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}Ti.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Zt;if(_n(a))for(var E=0;E<a.length;E++)a0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)a0(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 yn;for(var te=new Zt,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Mn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof Gn&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var pe=se.pg();pe!==null&&(pe=b.I(pe),pe!==null?(x.qe(he.data,x.wa(pe.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new Zt;b.each(function(Te){Te.key.data!==null&&ye.add(Te.key.data,Te.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function a0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof hr))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof Gn){for(var ne=y.linksConnected;ne.next();){var se=ne.value;if(se.fromNode===y){var he=b.I(se);he!==null&&(he.fromNode=te)}se.toNode===y&&(se=b.I(se),se!==null&&(se.toNode=te))}if(y instanceof Tr&&te instanceof Tr)for(y=y.memberParts;y.next();)ne=a0(a,y.value,x,b,E),ne instanceof Mn||ne===null||(ne.containingGroup=te)}else if(y instanceof Mn&&te instanceof Mn)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=a0(a,y.value,x,b,E),ne!==null&&ne instanceof Gn&&(ne.labeledLink=te);return te}Ti.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Mn||(b=E.copyNodeData(b),Jt(b)&&(E.xf(b),x=y.Lc(b)))}else dl(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 Mn||(E=y.copyNodeData(b)),Jt(E)&&(x.data=E)));return x},vn.Object.defineProperties(Ti.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}}}),Ti.prototype.updateAllRelationshipsFromData=Ti.prototype.rp,Ti.prototype.findLinksByExample=Ti.prototype.ls,Ti.prototype.findNodesByExample=Ti.prototype.ms,Ti.prototype.findLinkForData=Ti.prototype.Kc,Ti.prototype.findNodeForData=Ti.prototype.ii,Ti.prototype.findPartForData=Ti.prototype.Lc,Ti.prototype.findNodeForKey=Ti.prototype.Vb,Ti.prototype.removeModeledPart=Ti.prototype.ip,Ti.prototype.removeModeledParts=Ti.prototype.Gs,Ti.prototype.rebuildParts=Ti.prototype.Wd;var pS=!1,gS=!1,mS=!1;Ti.className="PartManager";function qo(a){Ti.apply(this,arguments)}en(qo,Ti),qo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},qo.prototype.addModeledParts=function(a){for(Ti.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Bd(a.value);gd(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),gd(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){dl(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 te=h0(x,y,!0);te!==""&&(E.fromPortId=te),te=Us(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Gn&&(E.fromNode=te)),te=h0(x,y,!1),te!==""&&(E.toPortId=te),te=Us(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof Gn&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}qo.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)})}qo.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},qo.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},qo.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},qo.prototype.findPartForKey=function(a){var y=Ti.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},qo.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},qo.prototype.doModelChanged=function(a){var y=this;if(Ti.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===no){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var pe=this.Kc(a.object);if(pe!==null){var ye=a.newValue;typeof ye=="string"&&(pe.fromPortId=ye)}}else if(E==="linkToPortId"){var Te=this.Kc(a.object);if(Te!==null){var Ge=a.newValue;typeof Ge=="string"&&(Te.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Xe=this.Lc(a.object);if(Xe!==null){var Je=a.newValue;if(Je!==void 0){var it=this.Vb(Je);it instanceof Tr?Xe.containingGroup=it:Xe.containingGroup=null}else Xe.containingGroup=null}}else if(E==="linkLabelKeys"){var Mt=this.Kc(a.object);if(Mt!==null){var bt=a.oldValue,At=a.newValue;Array.isArray(bt)&&bt.forEach(function(hn){0<=At.indexOf(hn)||(hn=y.Vb(hn),hn!==null&&(hn.labeledLink=null))}),Array.isArray(At)&&At.forEach(function(hn){hn=y.Vb(hn),hn!==null&&(hn.labeledLink=Mt)})}}else if(E==="linkCategory"){var Ft=this.Kc(a.object),Bt=a.newValue;Ft!==null&&typeof Bt=="string"&&(Ft.category=Bt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===wo){var _t=a.newValue;if(E==="linkDataArray"&&typeof _t=="object"&&_t!==null)yS(this,_t);else if(E==="linkLabelKeys"&&lc(_t)){var Kt=this.Kc(a.object),Rn=this.Vb(_t);Kt!==null&&Rn!==null&&(Rn.labeledLink=Kt)}x.isModified=!0}else if(b===Eo){var Jn=a.oldValue;if(E==="linkDataArray"&&typeof Jn=="object"&&Jn!==null)this.ip(Jn);else if(E==="linkLabelKeys"&&lc(Jn)){var Zn=this.Vb(Jn);Zn!==null&&(Zn.labeledLink=null)}x.isModified=!0}}else if(b===no){var Tn=a.propertyName;a.object!==x.model||Tn!=="linkFromKeyProperty"&&Tn!=="linkToKeyProperty"&&Tn!=="linkFromPortIdProperty"&&Tn!=="linkToPortIdProperty"&&Tn!=="linkLabelKeysProperty"&&Tn!=="nodeIsGroupProperty"&&Tn!=="nodeGroupKeyProperty"&&Tn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},qo.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new yn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&NS(y,te,!1)})},qo.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 Mn){var E=Us(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Us(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 te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new yn().addAll(y);var ne=new yn;a.labelNodes.each(function(se){se.data!==null&&(se=b.wa(se.data),se!==void 0&&ne.add(se))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink===a&&(se.labeledLink=null)}),E.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink!==a&&(se.labeledLink=a)}))}}else!(a instanceof di)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Tr)&&(a.containingGroup=y)}}},qo.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof Tr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Gn&&(Us(y,ne,!0)===x&&(te.link.fromNode=E),Us(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}_l(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Tr&&(E.containingGroup=a))}},qo.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Gn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Rl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Rl(y,x,b.data)),a instanceof Tr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Rl(y,x,b)}}},qo.prototype.copyPartData=function(a,y){var x=Ti.prototype.copyPartData.call(this,a,y);if(a instanceof Mn)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},qo.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),se="";if(a!==null&&(y===null&&(y=a),se=y.portId,se===null&&(se="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Mn){if(dl(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=se,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof Gn&&(dl(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ud(te,b,te.wa(a.data),!0),Wd(te,b,se,!0),x!==null&&Ud(te,b,te.wa(x.data),!1),Wd(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Gn||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},qo.prototype.findLinkForKey=qo.prototype.findLinkForKey,qo.prototype.findPartForKey=qo.prototype.findPartForKey,qo.prototype.removeAllModeledParts=qo.prototype.removeAllModeledParts,qo.prototype.addModeledParts=qo.prototype.addModeledParts,qo.prototype.addAllModeledParts=qo.prototype.addAllModeledParts,qo.className="GraphLinksPartManager";function el(){Ti.apply(this,arguments),this.Sg=null}en(el,Ti);function s0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!Wa(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(dl(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}el.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},el.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},el.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}},el.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))},el.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},el.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},el.prototype.doModelChanged=function(a){if(Ti.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===no){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:s0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),pe=a.newValue;if(he!==null&&typeof pe=="string"){var ye=he.kh();ye!==null&&(ye.category=pe)}}y.isModified=!0}}else if(x===no){var Te=a.propertyName;a.object===y.model&&Te==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},el.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Gn&&(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:s0(this,y,a):b!==null&&Ep(x,b,!1)))}}},el.prototype.updateDataBindings=function(a,y){Ti.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},el.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof Gn&&y.mh(te)===x&&s0(this,E,this.ii(te))}_l(y,x)}a=y.mh(a),a!==void 0&&E instanceof Gn&&(a=this.Vb(a),s0(this,a,E))}},el.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Gn){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 te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(Eo,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(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)&&Rl(y,x,E)}},el.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},el.prototype.findLinkForKey=el.prototype.findLinkForKey,el.className="TreePartManager";function ir(a,y){this.kl=new yn,this.il=new yn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Sr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Zt,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 Zt,this.Lt=new pn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(_n(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ir.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},ir.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ir.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ir.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)+":"+Ar(E)}}return y},ir.prototype.xA=function(a){a.change!==Ea&&jt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Uo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ir.prototype.Qv=function(a,y){var x=this,b=!1,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(Te){Te.model===x&&(Te.modelChange==="nodeDataArray"?Te.change===wo?E.add(Te.newValue):Te.change===Eo&&ne.add(Te.oldValue):x.lb(Te.object)?te.add(Te.object):Te.change!==no||x.modelData!==Te.object&&Te.propertyName!=="modelData"?Te.object!==null&&(se&&se.contains(Te.object)?se.get(Te.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Te.object instanceof ir||x.ri()&&x.Jc(Te.object)||PS(x,Te.object).each(function(Ge){te.add(Ge)})):b=!0)});var he=this.il;he.clear(),E.each(function(Te){he.add(x.wa(Te)),y||te.add(Te)});var pe=this.kl;pe.clear(),ne.each(function(Te){pe.add(x.wa(Te)),y&&te.add(Te)}),a=x.cloneDeep(te.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<he.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=he.Fa():ye.insertedNodeKeys=he.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<pe.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=pe.Fa():ye.removedNodeKeys=pe.Fa()),pe.clear(),he.clear(),ye},ir.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,te){function ne(Te,Ge){se?(Te.__gohashid===void 0&&te.push(Te),b.set(Te,Ge)):(Te=Hi++,b.set(Te,Ge),E.set(Te,y))}if(!Jt(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Zt),se){var he=b.get(y);if(he)return he}else for(E||(E=new Zt),he=E.iterator;he.next();){var pe=he.key;if(he.value===y&&(pe=b.get(pe)))return pe}if(Array.isArray(y)){he=[],ne(y,he);for(var ye=0;ye<y.length;ye++)he.push(Gd(a,y[ye],!1,b,E,te))}else if(y instanceof lt||y instanceof ln||y instanceof Xt||y instanceof Ir||y instanceof qn)he=y.copy(),ne(y,he);else{if(y instanceof ki||y instanceof kn||y instanceof Yt)return y;if(y instanceof pn)he=new pn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof yn)he=new yn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Zt)he=new Zt().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Date)he=new Date(y.getTime()),ne(y,he);else if(y instanceof RegExp)he=new RegExp(y),ne(y,he),he.lastIndex=y.lastIndex;else if(typeof y.copy=="function")he=y.copy(),ne(y,he);else for(ye in he={},ne(y,he),y)ye!=="__gohashid"&&(he[ye]=Gd(a,y[ye],!1,b,E,te))}return x&&te.forEach(function(Te){delete Te.__gohashid}),he}et=ir.prototype,et.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},et.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},et.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,Jt(y)&&(a.dm(y),a.modelData=y)}et.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!bS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+hy(this,this.modelData)),a+`,
"nodeDataArray": `+sc(this,this.nodeDataArray,!0)},et.kv=function(a){xS(this,a),a=a.nodeDataArray,_n(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new yn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Zt,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===no?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===wo||te===Eo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function PS(a,y){for(var x=new yn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];l0(a,y,E,E,x)}return x}function l0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(l0(a,y,ne,b,E))return!0}else if(Jt(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(l0(a,y,ne,b,E))return!0}return!1}et.Pv=function(a,y){var x=this,b=!1,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?te.add(ye.object):ye.change!==no||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){x.lb(Te)&&te.add(Te)}):ye.object instanceof ir||x.ri()&&x.Jc(ye.object)||PS(x,ye.object).each(function(Te){te.add(Te)})):b=!0)});var he=this.il;he.clear(),E.each(function(ye){he.add(x.wa(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(x.wa(ye)),y&&te.add(ye)}),a="",b&&(a+=`,
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Wv:this.Yv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&jt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Zt;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},et.$x=function(a,y){a.change!==Ea&&jt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Uo?(y===void 0&&(y=dg(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},et.yA=function(a,y){return this.$x(a,y)},et.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},et.toJSON=function(a){return this.np(a)},et.Zw=function(a){var y=null;if(typeof a=="string")try{y=an.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:jt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&jt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},et.Ky=function(a){return this.Zw(a)},ir.constructGraphLinksModel=function(){return new ir},et=ir.prototype,et.dm=function(a){if(_n(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Jt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:jt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Jt(a)){for(y in a)if(x=a[y],Jt(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 pn,b=0;b<x.length/2;b++)E.add(new lt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},et.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()):_n(a)?sc(this,a):Jt(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function sc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new zr;E.add("["),x&&1<b&&E.add(`
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
`),E.add("]"),E.toString()}function bS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function qa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof lt)y={class:"go.Point",x:qa(x.x),y:qa(x.y)};else if(x instanceof ln)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Xt)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof Ir)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof qn)x.sb()?y={class:"go.Spot",x:qa(x.x),y:qa(x.y),offsetX:qa(x.offsetX),offsetY:qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof ki){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Hu||x.type===Js)&&(y.start=x.start,y.end=x.end,x.type===Js&&(x.startRadius!==0&&(y.startRadius=qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=qa(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=qa(x.startX)),x.startY!==0&&(y.startY=qa(x.startY)),x.endX!==0&&(y.endX=qa(x.endX)),x.endY!==0&&(y.endY=qa(x.endY)),x.spot1.D(Xr)||(y.spot1=x.spot1),x.spot2.D(Ni)||(y.spot2=x.spot2),x.type===kn.o&&(y.path=kn.ia(x))):x instanceof Yt&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Co(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof pn){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function es(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function jx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new lt(es(a.x),es(a.y));else if(y==="Size")x=new ln(es(a.width),es(a.height));else if(y==="Rect")x=new Xt(es(a.x),es(a.y),es(a.width),es(a.height));else if(y==="Margin")x=new Ir(es(a.top),es(a.right),es(a.bottom),es(a.left));else if(y==="Spot")typeof a.enum=="string"?x=io(a.enum):x=new qn(es(a.x),es(a.y),es(a.offsetX),es(a.offsetY));else if(y==="Brush"){if(x=new ki,x.type=vr(ki,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof qn&&(x.start=a.start),a.end instanceof qn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=es(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=es(a.endRadius)),a=a.colorStops,Jt(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=vr(kn,a.type),typeof a.startX=="number"&&(x.startX=es(a.startX)),typeof a.startY=="number"&&(x.startY=es(a.startY)),typeof a.endX=="number"&&(x.endX=es(a.endX)),typeof a.endY=="number"&&(x.endY=es(a.endY)),a.spot1 instanceof qn&&(x.spot1=a.spot1),a.spot2 instanceof qn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=vr(b,a.name)));return x}et.Pe=function(a){return this.Lt.add(a),this},et.ik=function(a){this.Lt.remove(a)},et.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)},et.cb=function(a,y,x,b,E,te,ne){Ro(this,"",a,y,x,b,E,te,ne)},et.g=function(a,y,x,b,E){Ro(this,"",no,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,te){Ro(this,"",no,y,a,x,b,E,te)};function Ro(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var pe=new oo;pe.model=a,pe.change=x,pe.modelChange=y,pe.propertyName=b,pe.object=E,pe.oldValue=te,pe.oldParam=se,pe.newValue=ne,pe.newParam=he,a.ds(pe)}ir.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===no){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),ro(x,b,E)}else a.change===wo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Jt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&mr(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&ar(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!_n(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),_n(b)&&typeof x=="number"&&(a=a.newValue,y?mr(b,x):ar(b,x,a))):jt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Jt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&ar(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&mr(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!_n(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),_n(b)&&typeof x=="number"&&(a=a.oldValue,y?ar(b,x,a):mr(b,x))):jt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&jt("unknown ChangedEvent: "+a.toString())},ir.prototype.Ea=function(a){return this.undoManager.Ea(a)},ir.prototype.eb=function(a){return this.undoManager.eb(a)},ir.prototype.Kf=function(){return this.undoManager.Kf()},ir.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}},et=ir.prototype,et.La=function(a,y){y===void 0&&(y=""),Ro(this,"SourceChanged",Ea,y,a,null,null)},et.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for node data "+a+" is not a number or a string: "+y)}}},et.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&this.hc(y)===null&&(ro(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ro(this,"nodeKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ro(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}et.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},et.hc=function(a){return a===null&&jt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},et.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ro(a,y,x)}}}}},et.xf=function(a){a!==null&&(li(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&jt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,ar(a.Tc,b,y)),Ro(a,"nodeDataArray",wo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(_n(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)},et.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;mr(a.Tc,b)}Ro(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(_n(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)},et.$z=function(a){if(a!==this.nodeDataArray&&_n(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 te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},et.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof yn&&this.Vf.add(y,a))},et.Lv=function(){},et.fm=function(){},et.em=function(){},et.qp=function(){};function Rl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new yn,a.Vf.add(y,b)),b.add(x)}}function _l(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof yn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function fg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof yn?a:null)}et.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ir.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):u0(this,a,!0),Jt(a)&&Sr(a),a};function u0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=u0(a,y[x],a.copiesArrayObjects);b.push(E)}return Sr(b),b}if(x&&Jt(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 te=Co(y,b),ne=dg(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof ir||te instanceof ho||te instanceof Uo||te instanceof oo||(te=u0(a,te,!1)),ro(x,b,te)}return Sr(x),x}return y instanceof lt||y instanceof ln||y instanceof Xt||y instanceof qn||y instanceof Ir?y.copy():y}ir.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!kS&&a instanceof zt&&(kS=!0,Cn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Cn(" Is that really your intent?"));var b=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ir.prototype,et.set=function(a,y,x){this.setDataProperty(a,y,x)},et.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])}},et.Ay=function(a,y){this.ts(a,-1,y)},et.ts=function(a,y,x){0>y&&(y=a.length),ar(a,y,x),Ro(this,"",wo,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&jt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];mr(a,y),Ro(this,"",Eo,"",a,x,null,y,null)},et.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForNodeData found a non-string category for "+a+": "+y)},et.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"nodeCategory",no,x,a,b,y))}else ro(a,x,y)}},et.lm=function(a,y){this.jm(y,this.Ro(a))},et.Tl=function(){return!1},et.Wj=function(){return!1},et.ri=function(){return!1},et.xs=function(){return!1},et.Xj=function(){return!1};function cy(){return new ir}function dg(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return dg(a,y.constructor);return typeof y}function fy(a){return kl[a]?kl[a]:an.go!==void 0&&an.go[a]?an.go[a]:null}function Co(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function ro(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}vn.Object.defineProperties(ir.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&jt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&jt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];Jt(E)||jt("Model.nodeDataArray must only contain Objects, not: "+E),li(E)}for(this.Tc=a,b=new pn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(Ro(this,"nodeDataArray",no,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),ir.prototype.setCategoryForNodeData=ir.prototype.jm,ir.prototype.getCategoryForNodeData=ir.prototype.Ro,ir.prototype.removeArrayItem=ir.prototype.ov,ir.prototype.insertArrayItem=ir.prototype.ts,ir.prototype.addArrayItem=ir.prototype.Ay,ir.prototype.assignAllDataProperties=ir.prototype.Do,ir.prototype.set=ir.prototype.set,ir.prototype.clearUnresolvedReferences=ir.prototype.Qy,ir.prototype.mergeNodeDataArray=ir.prototype.$z,ir.prototype.removeNodeDataCollection=ir.prototype.nA,ir.prototype.removeNodeData=ir.prototype.cm,ir.prototype.addNodeDataCollection=ir.prototype.Fy,ir.prototype.addNodeData=ir.prototype.xf,ir.prototype.makeNodeDataKeyUnique=ir.prototype.$u,ir.prototype.findNodeDataForKey=ir.prototype.hc,ir.prototype.containsNodeData=ir.prototype.lb,ir.prototype.setKeyForNodeData=ir.prototype.km,ir.prototype.getKeyForNodeData=ir.prototype.wa,ir.prototype.updateTargetBindings=ir.prototype.La,ir.prototype.commit=ir.prototype.commit,ir.prototype.rollbackTransaction=ir.prototype.Kf,ir.prototype.commitTransaction=ir.prototype.eb,ir.prototype.startTransaction=ir.prototype.Ea,ir.prototype.raiseDataChanged=ir.prototype.Fs,ir.prototype.raiseChanged=ir.prototype.g,ir.prototype.raiseChangedEvent=ir.prototype.cb,ir.prototype.removeChangedListener=ir.prototype.ik,ir.prototype.addChangedListener=ir.prototype.Pe,ir.prototype.writeJsonValue=ir.prototype.sm,ir.prototype.replaceJsonObjects=ir.prototype.dm,ir.prototype.applyIncrementalJSON=ir.prototype.Ky,ir.prototype.applyIncrementalJson=ir.prototype.Zw,ir.prototype.toJSON=ir.prototype.toJSON,ir.prototype.toJson=ir.prototype.np,ir.prototype.toIncrementalJSON=ir.prototype.yA,ir.prototype.toIncrementalJson=ir.prototype.$x,ir.prototype.toIncrementalData=ir.prototype.xA,ir.prototype.clear=ir.prototype.clear;var kS=!1,kl={};ir.className="Model",ir.fromJSON=ir.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=an.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:jt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=fy(b)):(E=fy(b),E===null&&(E=an[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof ir?y=a:jt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ir.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ir.safePropertyValue=Co,ir.safePropertySet=ro,kl.Brush=ki,kl.ChangedEvent=oo,kl.Geometry=kn,kl.Margin=Ir,kl.Panel=Pn,kl.Point=lt,kl.Rect=Xt,kl.Size=ln,kl.Spot=qn,kl.Transaction=Uo,kl.UndoManager=ho;function Mo(a,y,x,b){Sr(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=MS,this.wk=null):(this.el=pg,this.wk=b),this.st=new yn}Mo.prototype.copy=function(){var a=new Mo;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},et=Mo.prototype,et.qb=function(a){a.classType===Mo&&(this.mode=a)},et.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},et.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},et.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function TS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}et.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==="")Cn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Co(y,b)),te!==void 0)if(E===null)x!==""&&ro(a,x,te);else try{if(x!==""){var ne=E(te,a);ro(a,x,ne)}else E(te,a)}catch(se){}}}},et.sp=function(a,y,x,b){if(this.el===pg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Co(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var se=b!==null?b.diagram:null,he=se!==null?se.model:null;if(te===null){if(x!=="")he!==null?he.setDataProperty(y,x,ne):ro(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var pe=b.itemIndex,ye=b.panel.itemArray;he.ov(ye,pe),he.ts(ye,pe,ne)}}else try{if(x!==""){var Te=te(ne,y,he);he!==null?he.setDataProperty(y,x,Te):ro(y,x,Te)}else{var Ge=te(ne,y,he);if(Ge!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Xe=b.itemIndex,Je=b.panel.itemArray;he.ov(Je,Xe),he.ts(Je,Xe,Ge)}}}catch(it){}}finally{this.st.remove(a)}}}},vn.Object.defineProperties(Mo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Wt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Wt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Wt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Wt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Wt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Wt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Wt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Wt(this),this.el=a}}}),Mo.prototype.updateSource=Mo.prototype.sp,Mo.prototype.updateTarget=Mo.prototype.Mv,Mo.prototype.ofModel=Mo.prototype.dA,Mo.prototype.ofObject=Mo.prototype.cp,Mo.prototype.makeTwoWay=Mo.prototype.Kx;var Ox="Binding",MS=new Yt(Mo,"OneWay",1),pg=new Yt(Mo,"TwoWay",2);Mo.className="Binding",Mo.parseEnum=function(a,y){return function(x){return x=vr(a,x),x===null?y:x}},Mo.toString=Ar,Mo.OneWay=MS,Mo.TwoWay=pg;function ti(a,y,x){ir.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new yn,this.wb=new Zt,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&&(_n(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}en(ti,ir),ti.constructGraphLinksModel=ir.constructGraphLinksModel,ti.prototype.cloneProtected=function(a){ir.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},et=ti.prototype,et.clear=function(){ir.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},et.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)+":"+Ar(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Us(this,E,!0)+"-->"+Us(this,E,!1)}return y},et.Qv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ir.prototype.Qv.call(this,a,y),b=this,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(b.Ac(ye)),y&&te.add(ye)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<pe.count&&(x===null&&(x={}),y?x.insertedLinkKeys=pe.Fa():x.removedLinkKeys=pe.Fa()),pe.clear(),he.clear(),x},et.rm=function(){var a=ir.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},et.gp=function(a){ir.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)},et.Rv=function(){var a=ir.prototype.Rv.call(this),y=`,
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},et.kv=function(a){ir.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 yn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];l0(a,y,E,E,x)}return x}et.Pv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ir.prototype.Pv.call(this,a,y),b=this,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(b.Ac(ye)),y&&te.add(ye)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Vv:this.Xv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&jt("applyIncrementalJson cannot change Model properties"),ir.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],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);jS(this,E,te)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},ti.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===no){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),ro(x,b,E);return}}else if(a.change===wo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Jt(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Jt(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}}ir.prototype.changeState.call(this,a,y)}},et=ti.prototype,et.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},et.yx=function(a){return Us(this,a,!0)},et.wv=function(a,y){Ud(this,a,y,!0)},et.Bx=function(a){return Us(this,a,!1)},et.Bv=function(a,y){Ud(this,a,y,!1)};function Us(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Co(y,a),a!==void 0))){if(lc(a))return a;jt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ud(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=Co(y,E);te!==x&&(_l(a,te,y),ro(y,E,x),a.hc(x)===null&&Rl(a,x,y),Ro(a,b?"linkFromKey":"linkToKey",no,E,y,te,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}et.zx=function(a){return h0(this,a,!0)},et.xv=function(a,y){Wd(this,a,y,!0)},et.Cx=function(a){return h0(this,a,!1)},et.Cv=function(a,y){Wd(this,a,y,!1)};function h0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Co(y,a),y===void 0?"":y)}function Wd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Co(y,E);te===void 0&&(te=""),te!==x&&(ro(y,E,x),Ro(a,b?"linkFromPortId":"linkToPortId",no,E,y,te,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}et.Ef=function(a){if(a===null)return c0;var y=this.je;return y===""?c0:(a=Co(a,y),a===void 0?c0:a)},et.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Co(a,x);if(b===void 0&&(b=c0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)_l(this,b[te],a);for(ro(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Rl(this,ne,a)}Ro(this,"linkLabelKeys",no,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ro(a,x,y)}},et.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(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&&Rl(this,y,a),Ro(this,"linkLabelKeys",wo,x,a,null,y,null,E)))}else jt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},et.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(_l(this,y,a),Ro(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&jt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},et.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for link data "+a+" is not a number or a string: "+y)}}},et.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b!==y&&this.jh(y)===null&&(ro(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ro(this,"linkKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},et.jh=function(a){return a===null&&jt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},et.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ro(a,y,x)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(li(a),this.Jc(a)||NS(this,a,!0))};function NS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&jt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ro(a,"linkDataArray",wo,"linkDataArray",a,null,y,null,b),dy(a,y)}et.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)},et.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ro(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=Us(a,y,!0),_l(a,x,y),x=Us(a,y,!1),_l(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],_l(a,x,y)}et.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)},et.Zz=function(a){if(this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&_n(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 te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var se=this.jh(ne);se!==te&&(se!==null?(this.Do(se,te),jS(this,te,se)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function dy(a,y){var x=Us(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Rl(a,x,y),x=Us(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Rl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&Rl(a,x,y)}et.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):u0(this,a,!0),Jt(a)&&(Sr(a),this.lf!==""&&ro(a,this.lf,void 0),this.mf!==""&&ro(a,this.mf,void 0),this.je!==""&&ro(a,this.je,[])),a},et.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Co(a,y)},et.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;jt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},et.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&(_l(this,b,a),ro(a,x,y),this.hc(y)===null&&Rl(this,y,a),Ro(this,"nodeGroupKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ti.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Co(a,this.Je)===void 0||ro(a,this.Je,void 0),a)},ti.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Ud(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ud(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Wd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Wd(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=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ti.prototype,et.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&&Co(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},et.jp=function(a,y){ir.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,te=y;if(Us(this,b,!0)===E){var ne=this.lf;ro(b,ne,te),Ro(this,"linkFromKey",no,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Us(this,b,!1)===E&&(ne=this.mf,ro(b,ne,te),Ro(this,"linkToKey",no,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,pe=0;pe<se;pe++)ne[pe]===E&&(ne[pe]=te,Ro(this,"linkLabelKeys",wo,he,b,E,te,pe,pe))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ro(a,b,x),Ro(this,"nodeGroupKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.Lv=function(){ir.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=Bn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ro(this,"nodeGroupKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Us(this,b,!0)===a&&(E=this.lf,Ro(this,"linkFromKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Us(this,b,!1)===a&&(E=this.mf,Ro(this,"linkToKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,se=0;se<te;se++)E[se]===a&&(Ro(this,"linkLabelKeys",wo,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)_l(this,a,x[y]);Un(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Rl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.lh(a);_l(this,y,a)},et.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForLinkData found a non-string category for "+a+": "+y)},ti.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ti.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"linkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ti.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=ti.prototype,et.lm=function(a,y){ir.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))}et.Wj=function(){return!0},et.ri=function(){return!0},et.xs=function(){return!0},et.Xj=function(){return!0},vn.Object.defineProperties(ti.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];Jt(E)||jt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),li(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new pn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new yn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ro(this,"linkDataArray",no,"linkDataArray",this,y,a),y=0;y<x;y++)dy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,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"}}}),ti.prototype.setCategoryForLinkData=ti.prototype.lp,ti.prototype.getCategoryForLinkData=ti.prototype.ps,ti.prototype.assignAllDataProperties=ti.prototype.Do,ti.prototype.setGroupKeyForNodeData=ti.prototype.mp,ti.prototype.getGroupKeyForNodeData=ti.prototype.lh,ti.prototype.isGroupForNodeData=ti.prototype.Yu,ti.prototype.copyLinkData=ti.prototype.Jo,ti.prototype.mergeLinkDataArray=ti.prototype.Zz,ti.prototype.removeLinkDataCollection=ti.prototype.lA,ti.prototype.removeLinkData=ti.prototype.bm,ti.prototype.addLinkDataCollection=ti.prototype.Ey,ti.prototype.addLinkData=ti.prototype.fi,ti.prototype.containsLinkData=ti.prototype.Jc,ti.prototype.makeLinkDataKeyUnique=ti.prototype.Bs,ti.prototype.findLinkDataForKey=ti.prototype.jh,ti.prototype.setKeyForLinkData=ti.prototype.Ks,ti.prototype.getKeyForLinkData=ti.prototype.Ac,ti.prototype.removeLabelKeyForLinkData=ti.prototype.Qx,ti.prototype.addLabelKeyForLinkData=ti.prototype.Bu,ti.prototype.setLabelKeysForLinkData=ti.prototype.Ls,ti.prototype.getLabelKeysForLinkData=ti.prototype.Ef,ti.prototype.setToPortIdForLinkData=ti.prototype.Cv,ti.prototype.getToPortIdForLinkData=ti.prototype.Cx,ti.prototype.setFromPortIdForLinkData=ti.prototype.xv,ti.prototype.getFromPortIdForLinkData=ti.prototype.zx,ti.prototype.setToKeyForLinkData=ti.prototype.Bv,ti.prototype.getToKeyForLinkData=ti.prototype.Bx,ti.prototype.setFromKeyForLinkData=ti.prototype.wv,ti.prototype.getFromKeyForLinkData=ti.prototype.yx,ti.prototype.clear=ti.prototype.clear;var c0=Object.freeze([]);ti.className="GraphLinksModel",kl.GraphLinksModel=ti,ir.constructGraphLinksModel=ir.constructGraphLinksModel=function(){return new ti},ir.initDiagramModel=cy=function(){return new ti};function ts(a,y){ir.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(_n(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}en(ts,ir),ts.constructGraphLinksModel=ir.constructGraphLinksModel,ts.prototype.cloneProtected=function(a){ir.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},et=ts.prototype,et.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)+":"+Ar(E)}}return y},et.rm=function(){var a=ir.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},et.gp=function(a){ir.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},et.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&jt("applyIncrementalJson cannot change Model properties"),ir.prototype.fp.call(this,a)},et.Vl=function(a){return a},et.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;jt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},et.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=Co(a,x);b!==y&&(_l(this,b,a),ro(a,x,y),this.hc(y)===null&&Rl(this,y,a),Ro(this,"nodeParentKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},et.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Co(a,y),y===void 0)?"":typeof y=="string"?y:(jt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ts.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ts.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"parentLinkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ts.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ts.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Co(a,this.Ke)===void 0||ro(a,this.Ke,void 0),a)},ts.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=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ts.prototype,et.jp=function(a,y){ir.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},et.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ro(a,b,x),Ro(this,"nodeParentKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=Bn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ro(this,"nodeParentKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)_l(this,a,x[y]);Un(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Rl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.mh(a);_l(this,y,a)},et.lm=function(a,y){ir.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},et.Tl=function(){return!0},et.xs=function(){return!0},vn.Object.defineProperties(ts.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"}}}),ts.prototype.setParentLinkCategoryForNodeData=ts.prototype.Ms,ts.prototype.getParentLinkCategoryForNodeData=ts.prototype.ss,ts.prototype.setParentKeyForNodeData=ts.prototype.qe,ts.prototype.getParentKeyForNodeData=ts.prototype.mh,ts.className="TreeModel",kl.TreeModel=ts;function fo(a){so.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Tl,this.Ti=0,this.Zv=new lt,this.Jp=this.me=0,this.Xr=new yg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Tl,this.K=ns,this.nd=Kd,this.hd=oy,this.tf=6,this.Nn=y0,a&&Object.assign(this,a)}en(fo,so),fo.prototype.cloneProtected=function(a){so.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},fo.prototype.qb=function(a){a.classType===fo?a===m0||a===v0||a===p0||a===g0||a===Kd?this.sorting=a:a===qc||a===Hd||a===ns||a===hc?this.direction=a:a===Th||a===uc||a===Tl||a===Ml?this.arrangement=a:(a===zf||a===y0)&&(this.nodeDiameterFormula=a):so.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Vd(this)},fo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new pn;y.addAll(a.iterator),a=new pn;var x=new pn,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,pe=this.radius;(!isFinite(pe)||0>=pe)&&(pe=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Te=this.startAngle;isFinite(Te)||(Te=0);var Ge=this.sweepAngle;if((!isFinite(Ge)||360<Ge||1>Ge)&&(Ge=360),y=this.spacing,isFinite(y)||(y=NaN),se===Ml&&he===zf?se=Tl:se===Ml&&he!==zf&&(se=this.arrangement),(this.direction===qc||this.direction===Hd)&&this.sorting!==Kd){for(he=0;!(he>=b.length)&&(a.add(b.M(he)),!(he+1>=b.length));he+=2)x.add(b.M(he+1));this.direction===qc?(this.arrangement===Ml&&a.reverse(),b=new pn,b.addAll(a),b.addAll(x)):(this.arrangement===Ml&&x.reverse(),b=new pn,b.addAll(x),b.addAll(a))}he=b.length;for(var Xe=te=E=0;Xe<b.length;Xe++){var Je=Te+Ge*te*(this.direction===ns?1:-1)/he,it=b.M(Xe).diameter;isNaN(it)&&(it=cc(b.M(Xe),Je)),360>Ge&&(Xe===0||Xe===b.length-1)&&(it/=2),E+=it,te++}if(isNaN(pe)||se===Ml){if(isNaN(y)&&(y=6),se!==Tl&&se!==Ml){for(te=-1/0,ne=0;ne<he;ne++)Xe=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Xe.diameter)&&cc(Xe,0),isNaN(E.diameter)&&cc(E,0),te=Math.max(te,(Xe.diameter+E.diameter)/2);ne=te+y,se===Th?pe=(te+y)/(2*Math.PI/he):pe=f0(this,ne*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180)}else pe=f0(this,E+(360<=Ge?he:he-1)*(se!==Ml?y:1.6*y),ye,Te*Math.PI/180,Ge*Math.PI/180);te=pe*ye}else if(te=pe*ye,Xe=py(this,pe,te,Te*Math.PI/180,Ge*Math.PI/180),isNaN(y))(se===Tl||se===Ml)&&(y=(Xe-E)/(360<=Ge?he:he-1));else if(se===Tl||se===Ml)Xe=(Xe-E)/(360<=Ge?he:he-1),Xe<y?(pe=f0(this,E+y*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180),te=pe*ye):y=Xe;else{for(ne=-1/0,E=0;E<he;E++)Je=b.M(E),it=b.M(E===he-1?0:E+1),isNaN(Je.diameter)&&cc(Je,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,(Je.diameter+it.diameter)/2);ne+=y,E=f0(this,ne*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180),E>pe?(pe=E,te=pe*ye):ne=Xe/(360<=Ge?he:he-1)}if(this.kw=se,this.lc=pe,this.Zm=ye,this.lw=Te,this.Wp=Ge,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,pe=this.lw,ye=this.Wp,Te=this.Ti,Ge=this.me,he=this.Jp,this.direction!==qc&&this.direction!==Hd||b!==Ml)if(this.direction===qc||this.direction===Hd){switch(ne=0,b){case uc:ne=180*d0(this,se,Ge,pe,he)/Math.PI;break;case Tl:he=y=0,ne=a.first(),ne!==null&&(y=cc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=cc(ne,Math.PI/2)),ne=180*d0(this,se,Ge,pe,Te+(y+he)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,pe,hc);break;case Tl:mg(this,a,pe,hc);break;case Th:gg(this,a,ye/2,pe,hc)}switch(b){case uc:vg(this,x,pe+ne,ns);break;case Tl:mg(this,x,pe+ne,ns);break;case Th:gg(this,x,ye/2,pe+ne,ns)}}else{switch(b){case uc:vg(this,x,pe,hc);break;case Tl:mg(this,x,pe,hc);break;case Th:gg(this,x,ye/2,pe,hc)}switch(b){case uc:vg(this,a,pe+ne,ns);break;case Tl:mg(this,a,pe+ne,ns);break;case Th:gg(this,a,ye/2,pe+ne,ns)}}}else switch(b){case uc:vg(this,y,pe,this.direction);break;case Tl:mg(this,y,pe,this.direction);break;case Th:gg(this,y,ye,pe,this.direction);break;case Ml:OS(this,y,ye,pe,this.direction)}else OS(this,y,ye,pe-ye/2,ns)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=b+(E===ns?he*x/(360<=te?se:se-1):-(he*x)/se),ye=y.M(he),Te=ne*Math.tan(pe)/a;Te=Math.sqrt((ne*ne+a*a*Te*Te)/(1+Te*Te)),ye.centerX=Te*Math.cos(pe),ye.centerY=Te*Math.sin(pe),ye.actualAngle=180*pe/Math.PI}}function mg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=y.M(he),ye=y.M(he===se-1?0:he+1),Te=te*Math.sin(x);pe.centerX=E*Math.cos(x),pe.centerY=Te,pe.actualAngle=180*x/Math.PI,isNaN(pe.diameter)&&cc(pe,0),isNaN(ye.diameter)&&cc(ye,0),pe=d0(a,E,te,b===ns?x:-x,(pe.diameter+ye.diameter)/2+ne),x+=b===ns?pe:-pe}}function vg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=y.M(he);pe.centerX=E*Math.cos(x),pe.centerY=te*Math.sin(x),pe.actualAngle=180*x/Math.PI,pe=d0(a,E,te,b===ns?x:-x,ne),x+=b===ns?pe:-pe}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new yg,360>x){for(te=b+(E===ns?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,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 te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),pe=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=te,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=te,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{te=lt.alloc();for(var Te=0;Te<ye.length&&(ye[Te].centerX=he,ye[Te].centerY=pe,!(Te>=ye.length-1));Te++)BS(a,he,pe,ye,Te,E,te)||IS(a,he,pe,ye,Te,E,te),he=te.x,pe=te.y;if(lt.free(te),a.mj++,!(23<a.mj)){he=ye[0].centerX,pe=ye[0].centerY,te=ye[ye.length-1].centerX,Te=ye[ye.length-1].centerY;var Ge=Math.abs(he-te)-((ye[0].width+ye[ye.length-1].width)/2+ne),Xe=Math.abs(pe-Te)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Xe)?Math.abs(he-te)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Xe?Xe:1>Math.abs(Ge)?0:Ge,he=Math.abs(te)>Math.abs(Te)?0<te!=pe>Te:0<Te!=he<te,(he=E===ns?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),pe=ne*Math.sin(b*Math.PI/180),ye=lt.alloc(),Te=y.Fa(),Ge=0;Ge<Te.length&&(Te[Ge].centerX=he,Te[Ge].centerY=pe,!(Ge>=Te.length-1));Ge++)BS(a,he,pe,Te,Ge,E,ye)||IS(a,he,pe,Te,Ge,E,ye),he=ye.x,pe=ye.y;if(lt.free(ye),a.mj++,!(23<a.mj)){if(he=Math.atan2(pe,he),he=E===ns?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Te.length;he++)ne.mk[he]=Te[he].bounds.x,ne.tm[he]=Te[he].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*se,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(te===ns)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=pe,!1;ye=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=pe,!1;ye=!0}return pe=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==ye&&(pe=-pe),Math.abs(x-pe)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=pe,!1):(ne.x=te,ne.y=pe,!0)}function IS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ns)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=pe,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=pe,ne.y=te;return}b=!0}pe=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(pe=-pe),ne.x=pe,ne.y=te}fo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},fo.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new lt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},fo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,pe=0;pe<=te;pe++){b!==void 0&&E!==void 0?he=b+pe*E/te:he=pe*Math.PI/(2*te);var ye=Math.sin(he);ne+=Math.sqrt(1-a*a*ye*ye)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function f0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function d0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}fo.prototype.sort=function(a){switch(this.sorting){case p0:break;case g0:a.reverse();break;case m0:a.sort(this.comparer);break;case v0:a.sort(this.comparer),a.reverse();break;case Kd:return this.ak(Fx(a));default:jt("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new pn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}fo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.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(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new pn;for(var he=0,pe=0;pe<y.length;pe++){var ye=y[pe].length;if(ye===1)b.push(pe);else if(ye===0)E.add(a.M(pe));else{if(he===0)x.push(pe);else{for(var Te=ye=1/0,Ge=-1,Xe=[],Je=0;Je<x.length;Je++)0>y[x[Je]].indexOf(x[Je===x.length-1?0:Je+1])&&Xe.push(Je===x.length-1?0:Je+1);if(Xe.length===0)for(Je=0;Je<x.length;Je++)Xe.push(Je);for(Je=0;Je<Xe.length;Je++){for(var it=Xe[Je],Mt=y[pe],bt=0,At=0;At<ne.length;At++){var Ft=te[ne[At]],Bt=te[se[At]];if(Ft<Bt){var _t=Ft;Ft=Bt}else _t=Bt;if(_t<it&&it<=Ft)for(Bt=0;Bt<Mt.length;Bt++){var Kt=Mt[Bt];0>x.indexOf(Kt)||_t<te[Kt]&&te[Kt]<Ft||_t===te[Kt]||Ft===te[Kt]||bt++}else for(Bt=0;Bt<Mt.length;Bt++)Kt=Mt[Bt],0>x.indexOf(Kt)||_t<te[Kt]&&te[Kt]<Ft&&_t!==te[Kt]&&Ft!==te[Kt]&&bt++}for(Mt=bt,At=bt=0;At<y[pe].length;At++)_t=x.indexOf(y[pe][At]),0<=_t&&(_t=Math.abs(it-(_t>=it?_t+1:_t)),bt+=_t<x.length+1-_t?_t:x.length+1-_t);for(At=0;At<ne.length;At++)_t=te[ne[At]],Ft=te[se[At]],_t>=it&&_t++,Ft>=it&&Ft++,_t>Ft&&(Bt=Ft,Ft=_t,_t=Bt),Ft-_t<(x.length+2)/2==(_t<it&&it<=Ft)&&bt++;(Mt<ye||Mt===ye&&bt<Te)&&(ye=Mt,Te=bt,Ge=it)}for(x.splice(Ge,0,pe),ye=0;ye<x.length;ye++)te[x[ye]]=ye;for(ye=0;ye<y[pe].length;ye++)Te=y[pe][ye],0<=x.indexOf(Te)&&(ne.push(pe),se.push(Te))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],pe=y[he][0],ye=x.indexOf(pe),0<=ye){for(Ge=Te=0;Ge<y[pe].length;Ge++)Xe=x.indexOf(y[pe][Ge]),0>Xe||Xe===ye||(Je=Xe>ye?Xe-ye:ye-Xe,Te+=Xe<ye!=Je>ne-Je?1:-1);x.splice(0>Te?ye:ye+1,0,he),b.splice(se,1),se--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},vn.Object.defineProperties(fo.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Ml&&a!==Tl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ns&&a!==hc&&a!==qc&&a!==Hd||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==p0&&a!==g0&&a!==m0&&!v0&&a!==Kd||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==y0&&a!==zf||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Tl=new Yt(fo,"ConstantSpacing",0),uc=new Yt(fo,"ConstantDistance",1),Th=new Yt(fo,"ConstantAngle",2),Ml=new Yt(fo,"Packed",3),ns=new Yt(fo,"Clockwise",4),hc=new Yt(fo,"Counterclockwise",5),qc=new Yt(fo,"BidirectionalLeft",6),Hd=new Yt(fo,"BidirectionalRight",7),p0=new Yt(fo,"Forwards",8),g0=new Yt(fo,"Reverse",9),m0=new Yt(fo,"Ascending",10),v0=new Yt(fo,"Descending",11),Kd=new Yt(fo,"Optimized",12),y0=new Yt(fo,"Pythagorean",13),zf=new Yt(fo,"Circular",14);fo.className="CircularLayout",fo.ConstantSpacing=Tl,fo.ConstantDistance=uc,fo.ConstantAngle=Th,fo.Packed=Ml,fo.Clockwise=ns,fo.Counterclockwise=hc,fo.BidirectionalLeft=qc,fo.BidirectionalRight=Hd,fo.Forwards=p0,fo.Reverse=g0,fo.Ascending=m0,fo.Descending=v0,fo.Optimized=Kd,fo.Pythagorean=y0,fo.Circular=zf;function yg(){this.Pl=-1/0,this.tm=this.mk=null}yg.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},yg.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},yg.className="VertexArrangement";function Vd(a){Xi.call(this,a)}en(Vd,Xi),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new S0(this)},Vd.className="CircularNetwork";function Sg(a){Ho.call(this,a),this.u=this.Si=NaN}en(Sg,Ho);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ml)if(x.nodeDiameterFormula===zf)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===zf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}vn.Object.defineProperties(Sg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),Sg.className="CircularVertex";function S0(a){Ms.call(this,a)}en(S0,Ms),S0.className="CircularEdge";function xa(a){so.call(this),this.ah=null,this.An=0,this.$d=new ln(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)}en(xa,so),xa.prototype.cloneProtected=function(a){so.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},xa.prototype.createNetwork=function(){return new Gf(this)},xa.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 te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var pe=Bn(),ye=0;ye<se+y.vertexes.count+2;ye++)pe[ye]=null;se=0,ne.reset();for(var Te=Xt.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Te),he)he=!1,E=Te.x+Te.width/2,te=Te.y+Te.height/2,pe[0]=new lt(Te.x+Te.width+b.width,Te.y),pe[1]=new lt(Te.x,Te.y+Te.height+b.height),se=2;else{var Ge=_S(pe,se,E,te,Te.width,Te.height,b),Xe=pe[Ge],Je=new lt(Xe.x+Te.width+b.width,Xe.y),it=new lt(Xe.x,Xe.y+Te.height+b.height);for(Ge+1<se&&pe.splice(Ge+1,0,null),pe[Ge]=Je,pe[Ge+1]=it,se++,Ge=Xe.x-Te.x,Xe=Xe.y-Te.y,ye=ye.vertexes.iterator;ye.next();)Je=ye.value,Je.centerX+=Ge,Je.centerY+=Xe}for(Xt.free(Te),ye=y.vertexes.iterator;ye.next();)ne=ye.value,Ge=ne.bounds,2>se?(E=Ge.x+Ge.width/2,te=Ge.y+Ge.height/2,pe[0]=new lt(Ge.x+Ge.width+b.width,Ge.y),pe[1]=new lt(Ge.x,Ge.y+Ge.height+b.height),se=2):(he=_S(pe,se,E,te,Ge.width,Ge.height,b),Te=pe[he],Xe=new lt(Te.x+Ge.width+b.width,Te.y),Ge=new lt(Te.x,Te.y+Ge.height+b.height),he+1<se&&pe.splice(he+1,0,null),pe[he]=Xe,pe[he+1]=Ge,se++,ne.centerX=Te.x+ne.width/2,ne.centerY=Te.y+ne.height/2);for(Un(pe),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},xa.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},xa.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),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,RS(a,y+1,x),GS(a,te),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Gf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new pn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new pn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new pn,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Gt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var pe=se=0,ye=he.count-ne;ye<he.count;ye++){var Te=he.M(ye),Ge=null;for(te=Te.edges.iterator;te.next();){var Xe=te.value;if(Xe.Ax(Te)===E){Ge=Xe;break}}Ge!==null&&(pe+=Ge.length,se+=Te.width*Te.height)}te=E.centerX,he=E.centerY,ye=E.width,Te=E.height,Ge=E.focus,Xe=ye*Te,1>Xe&&(Xe=1),se=Gt.sqrt((se+Xe+pe*pe*4/(ne*ne))/Xe),ne=(se-1)*ye/2,se=(se-1)*Te/2,E.bounds=new Xt(te-Ge.x-ne,he-Ge.y-se,ye+2*ne,Te+2*se),E.focus=new lt(Ge.x+ne,Ge.y+se)}}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 te=E.Sv,ne=E.Tv;b.bounds=new Xt(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new lt(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=Gt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,pe=0,ye=y.vertexes.iterator;ye.next();){var Te=ye.value;1>=Te.Vd?he++:(se=!0,pe++,ne+=Math.atan2(y.centerY-Te.centerY,y.centerX-Te.centerX))}if(he!==0){for(0<pe&&(ne/=pe),pe=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(pe=y/2),1<x.count&&x.sort(function(Xe,Je){return Xe===null||Je===null||Xe===Je?0:Je.width*Je.height-Xe.width*Xe.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(ye=null,Te=he.edges.iterator;Te.next();){ye=Te.value;break}Te=he.width;var Ge=he.height;Te=Gt.sqrt(Te*Te+Ge*Ge)/2,ye=te+ye.length+Te,Te=ne+(y*(se/2>>1)+pe)*(se%2===0?1:-1),he.centerX=b+ye*Math.cos(Te),he.centerY=E+ye*Math.sin(Te),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,pe=0;e:for(;pe<y;pe++){var ye=a[pe],Te=ye.x-x,Ge=ye.y-b;if(Te=Te*Te+Ge*Ge,Te<se){for(Ge=pe-1;0<=Ge;Ge--)if(a[Ge].y>ye.y&&a[Ge].x-ye.x<E+ne.width)continue e;for(Ge=pe+1;Ge<y;Ge++)if(a[Ge].x>ye.x&&a[Ge].y-ye.y<te+ne.height)continue e;he=pe,se=Te}}return he}xa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xa.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 te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;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 te=y.bounds,ne=te.x;y=te.y;var se=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,Gt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Gt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Gt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Gt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):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,te=x=x.centerY,ne=1;ne<y.length;ne++){var se=y[ne];se.forceX=0,se.forceY=0;var he=se.centerX;se=se.centerY,b=Math.min(b,he),E=Math.max(E,he),x=Math.min(x,se),te=Math.max(te,se)}(E=E-b>te-x)?y.sort(function(it,Mt){return it===null||Mt===null||it===Mt?0:it.centerX-Mt.centerX}):y.sort(function(it,Mt){return it===null||Mt===null||it===Mt?0:it.centerY-Mt.centerY}),x=a.Zf;var pe=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var ye=b.y+se.y;b=ne.charge*a.electricalFieldX(he,ye),pe=ne.charge*a.electricalFieldY(he,ye),b+=ne.mass*a.gravitationalFieldX(he,ye),pe+=ne.mass*a.gravitationalFieldY(he,ye),ne.forceX+=b,ne.forceY+=pe;for(var Te=te+1;Te<y.length;Te++){var Ge=y[Te];if(Ge!==ne){b=Ge.bounds,se=Ge.focus,pe=b.x+se.x;var Xe=b.y+se.y;if(he-pe>x||pe-he>x){if(E)break}else if(ye-Xe>x||Xe-ye>x){if(!E)break}else{var Je=zS(ne,Ge);1>Je?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new x0),Je=b.random(),se=b.random(),he>pe?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*Je):he<pe?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*Je):(b=Math.max(Ge.width,ne.width),b=(1+b)*Je-b/2),ye>Xe?(pe=Math.abs(Ge.bounds.bottom-ne.bounds.y),pe=(1+pe)*se):he<pe?(pe=Math.abs(Ge.bounds.y-ne.bounds.bottom),pe=-(1+pe)*se):(pe=Math.max(Ge.height,ne.height),pe=(1+pe)*se-pe/2)):(se=-(ne.charge*Ge.charge)/(Je*Je),b=(pe-he)/Je*se,pe=(Xe-ye)/Je*se),ne.forceX+=b,ne.forceY+=pe,Ge.forceX-=b,Ge.forceY-=pe}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,ye=te.bounds,Te=te.focus,he=ye.x+Te.x,ye=ye.y+Te.y,Te=zS(x,te),1>Te?(Te=a.randomNumberGenerator,Te===null&&(a.randomNumberGenerator=Te=new x0),se=Te.random(),Te=Te.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,pe=(ne>ye?1:-1)*(1+(te.height>x.height?te.height:x.height))*Te):(se=se.stiffness*(Te-se.length),b=(he-b)/Te*se,pe=(ye-ne)/Te*se),x.forceX+=b,x.forceY+=pe,te.forceX-=b,te.forceY-=pe;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}xa.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},xa.prototype.moveFixedVertex=function(){},xa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},xa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Zo,y.toSpot=Zo)}},xa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Xt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Xt.free(x)}x=Xt.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()}Xt.free(x)},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},xa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},xa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},xa.prototype.electricalFieldX=function(){return 0},xa.prototype.electricalFieldY=function(){return 0},xa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},xa.prototype.gravitationalFieldX=function(){return 0},xa.prototype.gravitationalFieldY=function(){return 0},xa.prototype.isFixed=function(a){return a.isFixed},vn.Object.defineProperties(xa.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&jt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),xa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Gf(a){Xi.call(this,a)}en(Gf,Xi),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Ho.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}en(xg,Ho),vn.Object.defineProperties(xg.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),xg.className="ForceDirectedVertex";function wg(a){Ms.call(this,a),this.j=this.o=NaN}en(wg,Ms),vn.Object.defineProperties(wg.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),wg.className="ForceDirectedEdge";function x0(){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()}x0.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},x0.className="RandomNumberGenerator";function Mi(a){so.call(this),this.kc=this.ie=25,this.K=0,this.Dk=E0,this.Zk=k0,this.Qk=T0,this.bj=4,this.rk=M0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new lt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}en(Mi,so),Mi.prototype.cloneProtected=function(a){so.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},Mi.prototype.qb=function(a){a.classType===Mi?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Mi.prototype.createNetwork=function(){return new Xd(this)},Mi.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!==bg&&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===bg&&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,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,se=0,he=0,pe=0;if(b.link!==null){if(se=b.link,se===null)continue;var ye=E.node;if(ne=te.node,ye===null||ne===null)continue;var Te=se.fromNode;he=se.toNode;for(var Ge=se.fromPort;Ge!==null&&!Ge.Ed();)Ge=Ge.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){pe=Te;var Xe=Ge;Te=he,Ge=se,he=pe,se=Xe}var Je=E.focus;pe=te.focus;var it=b.rev?te.bounds:E.bounds;Xe=lt.alloc(),ye!==Te?it.w()&&Te.isVisible()?Te.actualBounds.w()?(Ph(Te,Ge,Fr,Xe),Xe.x+=Te.actualBounds.x-it.x,Xe.y+=Te.actualBounds.y-it.y):(Ph(Te,Ge,Fr,Xe),Xe.w()||Xe.assign(Je)):Xe.assign(Je):it.w()?(Ph(Te,Ge,Fr,Xe),Xe.w()||Xe.assign(Je)):Xe.assign(Je),Te=b.rev?E.bounds:te.bounds,ye=lt.alloc(),ne!==he?Te.w()&&he.isVisible()?he.actualBounds.w()?(Ph(he,se,Fr,ye),ye.x+=he.actualBounds.x-Te.x,ye.y+=he.actualBounds.y-Te.y):(Ph(he,se,Fr,ye),ye.w()||ye.assign(pe)):ye.assign(pe):Te.w()?(Ph(he,se,Fr,ye),ye.w()||ye.assign(pe)):ye.assign(pe),this.K===90||this.K===270?(ne=Math.round((Xe.x-Je.x)/this.kc),he=Xe.x,se=Math.round((ye.x-pe.x)/this.kc),pe=ye.x):(ne=Math.round((Xe.y-Je.y)/this.kc),he=Xe.y,se=Math.round((ye.y-pe.y)/this.kc),pe=ye.y),lt.free(Xe),lt.free(ye),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=pe}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Xe=E.layer,ye=te.layer,Te=0,it=b.link,it!==null){var Mt=it.fromPort,bt=it.toPort;if(Mt!==null&&bt!==null){var At=it.fromNode;if(Ge=it.toNode,At!==null&&Ge!==null){var Ft=C0(this,!0),Bt=C0(this,!1),_t=this.setsPortSpots?Ft:it.computeSpot(!0,Mt);Je=this.setsPortSpots?Bt:it.computeSpot(!1,bt);var Kt=it.isOrthogonal;_t.$c()&&_t.Hf(Bt)&&Je.$c()&&Je.Hf(Ft)?Te=0:(Ft=it.getLinkPoint(At,Mt,_t,!0,Kt,Ge,bt,lt.alloc()),Bt=it.getLinkDirection(At,Mt,Ft,_t,!0,Kt,Ge,bt),lt.free(Ft),_t.ys()||Bt!==JS(this,b,!0)?this.setsPortSpots&&At!==null&&At.ports.count===1&&b.rev&&(Te+=1):Te+=1,_t=it.getLinkPoint(Ge,bt,Je,!1,Kt,At,Mt,lt.alloc()),it=it.getLinkDirection(Ge,bt,_t,Je,!1,Kt,At,Mt),lt.free(_t),Je.ys()||it!==JS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Te+=2):Te+=2)}}}if(Ge=Te,Te=Ge===1||Ge===3,(Ge=Ge===2||Ge===3)&&(Je=a.createVertex(),Je.node=null,Je.Dj=1,Je.layer=Xe,Je.near=E,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=Je),it=1,Te&&it--,Xe-ye>it&&0<Xe){for(b.valid=!1,Je=a.createVertex(),Je.node=null,Je.Dj=2,Je.layer=Xe-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ge?0:ne,E.portToColOffset=0,E.portFromPos=Ge?0:he,E.portToPos=0,E=Je,Xe--;Xe-ye>it&&0<Xe;)Je=a.createVertex(),Je.node=null,Je.Dj=3,Je.layer=Xe-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Je,Xe--;E=a.Zj(Je,te,b.link),E.valid=!Te,Te&&(Je.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=pe}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=fc(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),dc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Mi.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}Mi.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},Mi.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 cs(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 tl(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=fc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var se=0,he=b[ne],pe=he.near;if(pe!==null&&pe.layer===he.layer)if(he=pe.index,he>ne)for(var ye=ne+1;ye<he;ye++){var Te=b[ye];Te.near===pe&&Te.Dj===pe.Dj||se++}else for(ye=ne-1;ye>he;ye--)Te=b[ye],Te.near===pe&&Te.Dj===pe.Dj||se++;var Ge;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,pe=0;pe<he.length;pe++){var Xe=he[pe];if(Xe.valid&&Xe.fromVertex.layer!==y)for(Te=Xe.fromVertex.index,ye=Xe.portToPos,Xe=Xe.portFromPos,Ge=pe+1;Ge<he.length;Ge++){var Je=he[Ge];if(Je.valid&&Je.fromVertex.layer!==y){var it=Je.fromVertex.index,Mt=Je.portToPos;Je=Je.portFromPos,ye<Mt&&(Te>it||Te===it&&Xe>Je)&&se++,Mt<ye&&(it>Te||it===Te&&Je>Xe)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,pe=0;pe<he.length;pe++)if(Xe=he[pe],Xe.valid&&Xe.toVertex.layer!==y)for(Te=Xe.toVertex.index,ye=Xe.portToPos,Xe=Xe.portFromPos,Ge=pe+1;Ge<he.length;Ge++)Je=he[Ge],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Mt=Je.portToPos,Je=Je.portFromPos,Xe<Je&&(Te>it||Te===it&&ye>Mt)&&se++,Je<Xe&&(it>Te||it===Te&&Mt>ye)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var bt=0,At=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ft=b[he].sourceEdgesArrayAccess;for(pe=0;pe<se.length;pe++)if(Xe=se[pe],Xe.valid&&Xe.fromVertex.layer!==y)for(Te=Xe.fromVertex.index,Xe=Xe.portFromPos,Ge=0;Ge<Ft.length;Ge++)Je=Ft[Ge],Je.valid&&Je.fromVertex.layer!==y&&(it=Je.fromVertex.index,Je=Je.portFromPos,(Te<it||Te===it&&Xe<Je)&&At++,(it<Te||it===Te&&Je<Xe)&&bt++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ft=b[he].destinationEdgesArrayAccess,pe=0;pe<se.length;pe++)if(Xe=se[pe],Xe.valid&&Xe.toVertex.layer!==y)for(Te=Xe.toVertex.index,ye=Xe.portToPos,Ge=0;Ge<Ft.length;Ge++)Je=Ft[Ge],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Mt=Je.portToPos,(Te<it||Te===it&&ye<Mt)&&At++,(it<Te||it===Te&&Mt<ye)&&bt++)}te[ne*E+he]=bt,te[he*E+ne]=At}}return dc(a,y,b),te}Mi.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 te=E;te<b;te++)a+=x[E*b+te];return a};function w0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=fc(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var pe=te[he].destinationEdgesArrayAccess;if(pe!==null)for(var ye=0;ye<pe.length;ye++){var Te=pe[ye];if(Te.valid&&Te.toVertex.layer!==E){var Ge=Te.fromVertex.column+Te.portFromColOffset,Xe=Te.toVertex.column+Te.portToColOffset;se+=(Math.abs(Ge-Xe)+1)*gy(Te)}}}dc(b,E,te),y+=se}return y}Mi.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=0,Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(ye+=Ge.column-1,Te++),he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Xe=se.fromVertex;se.valid&&!se.rev&&Xe.layer!==y&&(ye+=Xe.column,Te++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(ye+=Ge.column,Te++);te[ne]=Te===0?-1:ye/Te}return dc(a,y,b),te}function HS(a,y,x){for(var b=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=[],Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Te[ye]=Ge.column-1,ye++),se=void 0,he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Xe=se.fromVertex;se.valid&&!se.rev&&Xe.layer!==y&&(Te[ye]=Xe.column+se.portFromColOffset,ye++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Te[ye]=Ge.column+se.portToColOffset,ye++);ye===0?te[ne]=-1:(Te.sort(function(Je,it){return Je-it}),pe=ye>>1,te[ne]=ye&1?Te[pe]:Te[pe-1]+Te[pe]>>1)}return dc(a,y,b),te}function Pg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,pe=y.layer-he.layer;se=a.linkMinLength(se),pe===se&&Pg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,pe=he.layer-y.layer,se=a.linkMinLength(se),pe===se&&Pg(a,he,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}Mi.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value;if(se.valid){for(var he=0,pe=se.destinationEdges;pe.next();)pe.value.toVertex.valid&&he++;pe=0;for(var ye=se.sourceEdges;ye.next();)ye.value.fromVertex.valid&&pe++;(E===null||te<he-pe)&&(E=se,te=he-pe)}}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 E0: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,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case bg: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(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Mi.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(this);break;case Py: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 k0: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&&$S(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,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,te)+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,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function $S(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)$S(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Pg(a,se,0,-1,!0,!1)}for(Pg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var pe=ne.value;if(pe.component===1){var ye=0,Te=!1,Ge=pe.sourceEdgesArrayAccess;E=Ge.length;for(var Xe=0;Xe<E;Xe++){var Je=Ge[Xe],it=Je.fromVertex;ye+=1,it.component!==1&&(te+=1,it=it.layer-pe.layer,Je=a.linkMinLength(Je),b=Math.min(b,it-Je))}for(Ge=pe.destinationEdgesArrayAccess,E=Ge.length,Xe=0;Xe<E;Xe++)Je=Ge[Xe].toVertex,--ye,Je.component!==1?--te:Te=!0;(he===null||ye<se)&&!Te&&(he=pe,se=ye)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Pg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(pe=0,ye=!1,Ge=ne.sourceEdgesArrayAccess,Te=Ge.length,Xe=0;Xe<Te;Xe++)Je=Ge[Xe].fromVertex,pe+=1,Je.component!==1?b+=1:ye=!0;for(Ge=ne.destinationEdgesArrayAccess,Te=Ge.length,Xe=0;Xe<Te;Xe++)Je=Ge[Xe],it=Je.toVertex,--pe,it.component!==1&&(--b,it=ne.layer-it.layer,Je=a.linkMinLength(Je),E=Math.min(E,it-Je));(se===null||pe>te)&&!ye&&(se=ne,te=pe)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function JS(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}Mi.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 T0: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&&QS(this,x);break;case by: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 QS(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],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(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],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,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))}Mi.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=cs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,1),pl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)P0(this,b,-1),pl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}for(tl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,0),pl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)P0(this,b,0),pl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}tl(this,y);var te,ne,se;switch(this.rk){case Ey:break;case ky:for(se=a+1;(b=this.countCrossings())<se;)for(se=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,-1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,0)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,0)||te;E>=a?tl(this,y):(a=E,y=cs(this))}break;default:case M0:for(x=this.Ia,ne=0,se=a+1;(b=this.countCrossings())<se;){for(se=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,-1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,0)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,0)||te;E>=a?tl(this,y):(a=E,y=cs(this))}}tl(this,y)};function P0(a,y,x){var b=fc(a,y),E=a.tc[y],te=HS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var se=!0,he;se;)for(se=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(se=!0,he=te[x],te[x]=te[x+1],te[x+1]=he,he=ne[x],ne[x]=ne[x+1],ne[x+1]=he,he=b[x],b[x]=b[x+1],b[x+1]=he);for(x=te=0;x<E;x++)he=b[x],he.index=x,te+=a.nodeMinColumnSpace(he,!0),he.column=te,te+=1,te+=a.nodeMinColumnSpace(he,!1);dc(a,y,b)}function pl(a,y,x){var b=fc(a,y),E=a.tc[y];x=WS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,pe=!0;pe;)for(pe=!1,te=0;te<E-1;te++){var ye=x[b[te].index*E+b[te+1].index],Te=x[b[te+1].index*E+b[te].index],Ge=0,Xe=0,Je=b[te].column,it=b[te+1].column,Mt=a.nodeMinColumnSpace(b[te],!0),bt=a.nodeMinColumnSpace(b[te],!1),At=a.nodeMinColumnSpace(b[te+1],!0),Ft=a.nodeMinColumnSpace(b[te+1],!1);Mt=Je-Mt+At,bt=it-bt+Ft;var Bt=b[te].sourceEdges.iterator;for(Bt.reset();Bt.next();)if(At=Bt.value,Ft=At.fromVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At<te&&(Ge+=2*(te-At),Xe+=2*(te+1-At)),At===te+1&&(Ge+=1),At>te+1&&(Ge+=4*(At-te),Xe+=4*(At-(te+1)))}for(Bt=b[te].destinationEdges.iterator,Bt.reset();Bt.next();)if(At=Bt.value,Ft=At.toVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At===te+1&&(Xe+=1)}for(Bt=b[te+1].sourceEdges.iterator,Bt.reset();Bt.next();)if(At=Bt.value,Ft=At.fromVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At<te&&(Ge+=2*(te+1-At),Xe+=2*(te-At)),At===te&&(Xe+=1),At>te+1&&(Ge+=4*(At-(te+1)),Xe+=4*(At-te))}for(Bt=b[te+1].destinationEdges.iterator,Bt.reset();Bt.next();)if(At=Bt.value,Ft=At.toVertex,At.valid&&Ft.layer===y){for(At=0;b[At]!==Ft;)At++;At===te&&(Ge+=1)}At=Ft=0,Bt=ne[b[te].index];var _t=se[b[te].index],Kt=ne[b[te+1].index],Rn=se[b[te+1].index];Bt!==-1&&(Ft+=Math.abs(Bt-Je),At+=Math.abs(Bt-bt)),_t!==-1&&(Ft+=Math.abs(_t-Je),At+=Math.abs(_t-bt)),Kt!==-1&&(Ft+=Math.abs(Kt-it),At+=Math.abs(Kt-Mt)),Rn!==-1&&(Ft+=Math.abs(Rn-it),At+=Math.abs(Rn-Mt)),(Xe<Ge-.5||Xe===Ge&&Te<ye-.5||Xe===Ge&&Te===ye&&At<Ft-.5)&&(pe=he=!0,b[te].column=bt,b[te+1].column=Mt,ye=b[te],b[te]=b[te+1],b[te+1]=ye)}for(te=0;te<E;te++)b[te].index=te;return dc(a,y,b),he}Mi.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 te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else 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=fc(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,pe=!0;pe;)for(pe=!1,b=0;b<te;b++){var ye=E[b].column,Te=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Xe=0;0>b-1||ye-E[b-1].column-1>Te+a.nodeMinColumnSpace(E[b-1],!1)?Xe=ye-1:Xe=ye,Te=b+1>=te||E[b+1].column-ye-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Je=Ge=0,it=0;if(0>=x)for(var Mt=E[b].sourceEdges.iterator;Mt.next();){var bt=Mt.value,At=bt.fromVertex;if(bt.valid&&At.layer!==y){var Ft=gy(bt),Bt=bt.portFromColOffset;bt=bt.portToColOffset,At=At.column,Ge+=(Math.abs(ye+bt-(At+Bt))+1)*Ft,Je+=(Math.abs(Xe+bt-(At+Bt))+1)*Ft,it+=(Math.abs(Te+bt-(At+Bt))+1)*Ft}}if(0<=x)for(Mt=E[b].destinationEdges.iterator;Mt.next();)bt=Mt.value,At=bt.toVertex,bt.valid&&At.layer!==y&&(Ft=gy(bt),Bt=bt.portFromColOffset,bt=bt.portToColOffset,At=At.column,Ge+=(Math.abs(ye+Bt-(At+bt))+1)*Ft,Je+=(Math.abs(Xe+Bt-(At+bt))+1)*Ft,it+=(Math.abs(Te+Bt-(At+bt))+1)*Ft);bt=Bt=Ft=0,Mt=ne[E[b].index],At=se[E[b].index],Mt!==-1&&(Ft+=Math.abs(Mt-ye),Bt+=Math.abs(Mt-Xe),bt+=Math.abs(Mt-Te)),At!==-1&&(Ft+=Math.abs(At-ye),Bt+=Math.abs(At-Xe),bt+=Math.abs(At-Te)),Je<Ge||Je===Ge&&Bt<Ft?(pe=he=!0,E[b].column=Xe):(it<Ge||it===Ge&&bt<Ft)&&(pe=he=!0,E[b].column=Te)}return dc(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=fc(a,y),E=a.tc[y],te=HS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),pe=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=se;else if(x===0){var Te=b[x+1].column;Te-se===pe+a.nodeMinColumnSpace(b[x+1],!0)?ye=se-1:ye=se}else x===E-1?(Te=b[x-1].column,ye=se-Te===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=(he+pe)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=Math.min(ne[x],pe)):x===E-1?(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,ye=Math.max(ne[x],he)):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,he<ne[x]&&ne[x]<pe?ye=ne[x]:he>=ne[x]?ye=he:pe<=ne[x]&&(ye=pe));ye!==se&&(te=!0,b[x].column=ye)}dc(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var se=b.column-a.nodeMinColumnSpace(b,!0),he=b.column+a.nodeMinColumnSpace(b,!1);se<=y&&he>=y&&(E[b.layer]=!0),se<=x&&he>=x&&(te[b.layer]=!0)}for(se=!0,x=!1,b=0;b<=a.Ia;b++)se=se&&!(E[b]&&te[b]);if(se)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=cs(a),te=w0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=w0(a);ne>te?tl(a,E):ne<te&&(te=ne,E=cs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=cs(a),te=w0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=w0(a),ne>te?tl(a,E):ne<te&&(te=ne,E=cs(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,se=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),he=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));se<=he;se++)E[ne*(a.Ra+1)+se]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(he=ne[ne.length-1],ne.pop(),E[he])for(E[he]=!1,te=0;te<a.le;te++)y[he*a.le+te]&&ne.splice(0,0,te);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=Bn(),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 yn,Kx(y,x);var te=null,ne=null,se=null,he=null,pe=(a.ve&1)!==0,ye=(a.ve&2)!==0,Te=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(pe&&(a.verticalAlignment(y,x,!0),te=b0(a,y,!0,!1)),y.reverse(),Te&&(a.verticalAlignment(y,x,!1),se=b0(a,y,!1,!1)),b=dr(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ge&&(a.verticalAlignment(y,x,!1),he=b0(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=b0(a,y,!0,!0)),Un(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Xe){var Je=Bn();pe&&Je.push(te.get(Xe)),ye&&Je.push(ne.get(Xe)),Te&&Je.push(se.get(Xe)),Ge&&Je.push(he.get(Xe)),Je.sort(function(Mt,bt){return Mt-bt});var it=Je.length;it=(Je[Math.floor((it-1)/2)]+Je[Math.ceil((it-1)/2)])/2,Un(Je),Xe.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var pe=se[he];e:{if(pe.node===null){var ye=Ty(pe);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Te=ye;if(he===se.length-1||Te){for(ye=ne.length-1,Te&&(ye=Ty(pe)[0].index);te<=he;){if(pe=se[te],!pe.bo){Te=[];for(var Ge=dr(pe.sourceEdgesArrayAccess),Xe=Ge.next();!Xe.done;Xe=Ge.next())Xe=Xe.value,Xe.valid&&Te.push(Xe);pe.bo=Te}for(pe=dr(pe.bo),Te=pe.next();!Te.done;Te=pe.next())Te=Te.value,Ge=Te.fromVertex.index,(Ge<E||Ge>ye)&&y.add(Te);te++}E=ye}}}Mi.prototype.verticalAlignment=function(a,y,x){Vx(a),a=dr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=dr(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ty(te):Yx(te),se=ne.length;if(0<se){ne.sort(function(Te,Ge){return Te.vi-Ge.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var pe=ne[se],ye=void 0;ye=x?L0(pe,te):L0(te,pe),!y.contains(ye)&&E<pe.vi&&(pe.align=te,te.root=pe.root,te.align=pe.root,E=pe.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function b0(a,y,x,b){for(var E=a.K===90||a.K===270,te=dr(y),ne=te.next();!ne.done;ne=te.next()){var se=dr(ne.value);for(ne=se.next();!ne.done;ne=se.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,te=dr(y),se=te.next();!se.done;se=te.next()){se=dr(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var pe=0,ye=he;ye.align!==he;){var Te=ye.align,Ge=ne?ye.width:ye.height,Xe=ne?Te.width:Te.height;if(x){var Je=L0(ye,Te),it=Je.portFromPos,Mt=Je.portToPos;Je.link!==null&&(ye.node&&ye.node!==Je.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==Je.link.toNode&&(Mt=ne?Te.focusX:Te.focusY))}else Je=L0(Te,ye),it=Je.portToPos,Mt=Je.portFromPos,Je.link!==null&&(ye.node&&ye.node!==Je.link.toNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==Je.link.fromNode&&(Mt=ne?Te.focusX:Te.focusY));Ge=b?ye.qg+(Ge-it)-(Xe-Mt):ye.qg+it-Mt,Te.qg=Ge,pe=Math.min(pe,Ge),ye=ye.align}ye=he;do ye.qg=ye.qg-pe,ye=ye.align;while(ye!==he)}}for(x=dr(y),ne=x.next();!ne.done;ne=x.next())for(te=dr(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,se=0;do{for(te=y[ne][se];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(se=rx(te,y),se.sd.shift=Math.min(se.sd.shift,te.sd.shift+te.zc+te.qg-(se.zc+se.qg+(E?se.width:se.height)+a.columnSpacing)));se=te.vi+1}while(ne<y.length&&se<y[ne].length&&te.sd===y[ne][se].sd)}for(a=new Zt,y=dr(y),ne=y.next();!ne.done;ne=y.next())for(x=dr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rx(a,y){var x=a.Tz;return a=a.vi,1>a&&jt("Could not determine previous vertex in layer"),y[x][a-1]}Mi.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Bn(),E=Bn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Zx(this,y[ne],b,E,ne);se<te&&(x=ne,te=se)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(he){return function(pe){pe.value+=he.delta}}(te)));Un(b),Un(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(se){var he=se.key;se=se.value,he=a.K===90||a.K===270?he.width:he.height,se<te&&(te=se),se+he>ne&&(ne=se+he)}),x[E]=te,b[E]=ne,ne-te}Mi.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=C0(this,!0),y=C0(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 C0(a,y){return a.K===270?y?Ca:ga:a.K===90?y?ga:Ca:a.K===180?y?Oa:aa:y?aa:Oa}Mi.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 te=1/0,ne=E=1/0,se=-1/0;a.next();){var he=a.value,pe=he.layer,ye=he.column|0;b?(ne=y.x+this.kc*ye,pe=this.Kd[pe]):(ne=this.Kd[pe],pe=y.y+this.kc*ye),he.centerX=ne,he.centerY=pe,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new lt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},Mi.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 Xt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Xt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Xt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Xt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Xt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Xt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Xt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Xt(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Mi.prototype.commitLayers=function(){},Mi.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,te=b.toNode,ne=b.fromPort,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var pe=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var ye=x.fromVertex,Te=x.toVertex;if(x.valid)y.curve===Gs&&y.pointsCount===4&&(ye.column===Te.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,pe,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&pe===Or&&(b=!0),se!==null&&he===Or&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(Fr),y.i(3),!0),he.w()||he.set(E.actualBounds.center),y.L(0,he.x,he.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,se,se.ga(Fr),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(ye.layer===Te.layer)y.zf();else{var Ge=!1,Xe=!1,Je=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){Xe=!0;var Mt=y.pointsCount;4<Mt&&y.points.removeRange(2,Mt-3)}else if(y.curve===Gs)Ge=!0,Mt=y.pointsCount,4<Mt&&y.points.removeRange(2,Mt-3),Mt===4&&(it=2);else{Mt=y.pointsCount;var bt=pe===Or,At=he===Or;2<Mt&&bt&&At?y.points.removeRange(1,Mt-2):3<Mt&&bt&&!At?y.points.removeRange(1,Mt-3):3<Mt&&!bt&&At?y.points.removeRange(2,Mt-2):4<Mt&&!bt&&!At&&y.points.removeRange(2,Mt-3)}if(x.rev){for(;Te!==null&&ye!==Te;){var Ft=Mt=null;for(bt=Te.sourceEdges.iterator;bt.next()&&(At=bt.value,At.link!==x.link||(Mt=At.fromVertex,Ft=At.toVertex,Mt.node!==null)););if(Mt===null)break;if(Mt!==ye){bt=y.i(it-1).x,At=y.i(it-1).y;var Bt=Mt.centerX,_t=Mt.centerY;if(Xe)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,bt,At),y.m(it++,bt,_t)):(Ft!==null?Ft.centerY:At)!==_t&&(Ft=this.Ta[Mt.layer-1]+this.Rf.x,y.m(it++,Ft,At),y.m(it++,Ft,_t)):it===y.firstPickIndex+1?(y.m(it++,bt,At),y.m(it++,Bt,At)):(Ft!==null?Ft.centerX:bt)!==Bt&&(Ft=this.Ta[Mt.layer-1]+this.Rf.y,y.m(it++,bt,Ft),y.m(it++,Bt,Ft));else if(it===y.firstPickIndex+1){Ft=Math.max(10,this.he[Te.layer]);var Kt=Math.max(10,this.Ld[Te.layer]);if(Ge)this.K===180?Bt<=Te.bounds.x?(Te=Te.bounds.x,y.m(it++,Te-Ft,_t),y.m(it++,Te,_t),y.m(it++,Te+Kt,_t)):(y.m(it++,Bt-Ft,_t),y.m(it++,Bt,_t),y.m(it++,Bt+Kt,_t)):this.K===90?_t>=Te.bounds.bottom?(Te=Te.bounds.y+Te.bounds.height,y.m(it++,Bt,Te+Kt),y.m(it++,Bt,Te),y.m(it++,Bt,Te-Ft)):(y.m(it++,Bt,_t+Kt),y.m(it++,Bt,_t),y.m(it++,Bt,_t-Ft)):this.K===270?_t<=Te.bounds.y?(Te=Te.bounds.y,y.m(it++,Bt,Te-Ft),y.m(it++,Bt,Te),y.m(it++,Bt,Te+Kt)):(y.m(it++,Bt,_t-Ft),y.m(it++,Bt,_t),y.m(it++,Bt,_t+Kt)):this.K===0&&(Bt>=Te.bounds.right?(Te=Te.bounds.x+Te.bounds.width,y.m(it++,Te+Kt,_t),y.m(it++,Te,_t),y.m(it++,Te-Ft,_t)):(y.m(it++,Bt+Kt,_t),y.m(it++,Bt,_t),y.m(it++,Bt-Ft,_t)));else{y.m(it++,bt,At);var Rn=0;this.K===180||this.K===0?((this.K===180?Bt>=Te.bounds.right:Bt<=Te.bounds.x)&&(Rn=(this.K===0?-Ft:Kt)/2),y.m(it++,bt+Rn,_t)):((this.K===270?_t>=Te.bounds.bottom:_t<=Te.bounds.y)&&(Rn=(this.K===90?-Ft:Kt)/2),y.m(it++,Bt,At+Rn)),y.m(it++,Bt,_t)}}else Ft=Math.max(10,this.he[Mt.layer]),Kt=Math.max(10,this.Ld[Mt.layer]),Ge?this.K===180?(y.m(it++,Bt-Ft-Je,_t),y.m(it++,Math.min(Bt-Ft+Je/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.max(Bt+Kt-Je/2,Bt),_t),y.m(it++,Bt+Kt+Je,_t)):this.K===90?(y.m(it++,Bt,_t+Kt+Je),y.m(it++,Bt,Math.max(_t+Kt-Je/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.min(_t-Ft+Je/2,_t)),y.m(it++,Bt,_t-Ft-Je)):this.K===270?(y.m(it++,Bt,_t-Ft-Je),y.m(it++,Bt,Math.min(_t-Ft+Je/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.max(_t+Kt-Je/2,_t)),y.m(it++,Bt,_t+Kt+Je)):(y.m(it++,Bt+Kt+Je,_t),y.m(it++,Math.max(Bt+Kt-Je/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.min(Bt-Ft+Je/2,Bt),_t),y.m(it++,Bt-Ft-Je,_t)):y.m(it++,Bt,_t)}Te=Mt}(se===null||pe!==Or||Xe)&&(bt=y.i(it-1).x,At=y.i(it-1).y,Bt=y.i(it).x,_t=y.i(it).y,Xe?(Je=this.Ld[ye.layer],this.K===180||this.K===0?(Xe=At,Xe>=ye.bounds.y&&Xe<=ye.bounds.bottom&&(this.K===180?Bt>=ye.bounds.x:Bt<=ye.bounds.right)&&(Te=ye.centerX+(this.K===180?-Je:Je),Xe<ye.bounds.y+ye.bounds.height/2?Xe=ye.bounds.y-this.kc/2:Xe=ye.bounds.bottom+this.kc/2,y.m(it++,Te,At),y.m(it++,Te,Xe)),y.m(it++,Bt,Xe)):(Xe=bt,Xe>=ye.bounds.x&&Xe<=ye.bounds.right&&(this.K===270?_t>=ye.bounds.y:_t<=ye.bounds.bottom)&&(Te=ye.centerY+(this.K===270?-Je:Je),Xe<ye.bounds.x+ye.bounds.width/2?Xe=ye.bounds.x-this.kc/2:Xe=ye.bounds.right+this.kc/2,y.m(it++,bt,Te),y.m(it++,Xe,Te)),y.m(it++,Xe,_t)),y.m(it++,Bt,_t)):Ge?(Ft=Math.max(10,this.he[ye.layer]),Kt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Bt>=ye.bounds.x?(Te=ye.bounds.x+ye.bounds.width,y.L(it-2,Te,At),y.L(it-1,Te+Kt,At)):this.K===90&&_t<=ye.bounds.bottom?(Te=ye.bounds.y,y.L(it-2,bt,Te),y.L(it-1,bt,Te-Ft)):this.K===270&&_t>=ye.bounds.y?(Te=ye.bounds.y+ye.bounds.height,y.L(it-2,bt,Te),y.L(it-1,bt,Te+Kt)):this.K===0&&Bt<=ye.bounds.right&&(Te=ye.bounds.x,y.L(it-2,Te,At),y.L(it-1,Te-Ft,At))):(Ft=Math.max(10,this.he[ye.layer]),Kt=Math.max(10,this.Ld[ye.layer]),Xe=0,this.K===180||this.K===0?((this.K===180?Bt<=ye.bounds.x:Bt>=ye.bounds.right)&&(Xe=(this.K===0?Kt:-Ft)/2),y.m(it++,Bt+Xe,At)):((this.K===270?_t<=ye.bounds.y:_t>=ye.bounds.bottom)&&(Xe=(this.K===90?Kt:-Ft)/2),y.m(it++,bt,_t+Xe)),y.m(it++,Bt,_t)))}else{for(;ye!==null&&ye!==Te;){for(Ft=Mt=null,ye=ye.destinationEdges.iterator;ye.next()&&(bt=ye.value,bt.link!==x.link||(Mt=bt.toVertex,Ft=bt.fromVertex,Ft.node!==null&&(Ft=null),Mt.node!==null)););if(Mt===null)break;Mt!==Te&&(bt=y.i(it-1).x,At=y.i(it-1).y,Bt=Mt.centerX,_t=Mt.centerY,Xe?this.K===180||this.K===0?(Ft!==null?Ft.centerY:At)!==_t&&(Ft=this.Ta[Mt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(Ft=this.K===0?Math.max(Ft,bt):Math.min(Ft,bt)),y.m(it++,Ft,At),y.m(it++,Ft,_t)):(Ft!==null?Ft.centerX:bt)!==Bt&&(Ft=this.Ta[Mt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(Ft=this.K===90?Math.max(Ft,At):Math.min(Ft,At)),y.m(it++,bt,Ft),y.m(it++,Bt,Ft)):(Ft=Math.max(10,this.he[Mt.layer]),Kt=Math.max(10,this.Ld[Mt.layer]),Ge?this.K===180?(y.m(it++,Bt+Kt+Je,_t),y.m(it++,Math.max(Bt+Kt-Je/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.min(Bt-Ft+Je/2,Bt),_t),y.m(it++,Bt-Ft-Je,_t)):this.K===90?(y.m(it++,Bt,_t-Ft-Je),y.m(it++,Bt,Math.min(_t-Ft+Je/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.max(_t+Kt-Je/2,_t)),y.m(it++,Bt,_t+Kt+Je)):this.K===270?(y.m(it++,Bt,_t+Kt+Je),y.m(it++,Bt,Math.max(_t+Kt-Je/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.min(_t-Ft+Je/2,_t)),y.m(it++,Bt,_t-Ft-Je)):(y.m(it++,Bt-Ft-Je,_t),y.m(it++,Math.min(Bt-Ft+Je/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.max(Bt+Kt-Je/2,Bt),_t),y.m(it++,Bt+Kt+Je,_t)):this.K===180?(y.m(it++,Bt+Kt,_t),y.m(it++,Bt-Ft,_t)):this.K===90?(y.m(it++,Bt,_t-Ft),y.m(it++,Bt,_t+Kt)):this.K===270?(y.m(it++,Bt,_t+Kt),y.m(it++,Bt,_t-Ft)):(y.m(it++,Bt-Ft,_t),y.m(it++,Bt+Kt,_t)))),ye=Mt}Xe&&(bt=y.i(it-1).x,At=y.i(it-1).y,Bt=y.i(it).x,_t=y.i(it).y,this.K===180||this.K===0?At!==_t&&(Ft=this.K===0?Math.min(Math.max((Bt+bt)/2,this.Ta[Te.layer]+this.Rf.x),Bt):Math.max(Math.min((Bt+bt)/2,this.Ta[Te.layer]+this.Rf.x),Bt),y.m(it++,Ft,At),y.m(it++,Ft,_t)):bt!==Bt&&(Ft=this.K===90?Math.min(Math.max((_t+At)/2,this.Ta[Te.layer]+this.Rf.y),_t):Math.max(Math.min((_t+At)/2,this.Ta[Te.layer]+this.Rf.y),_t),y.m(it++,bt,Ft),y.m(it++,Bt,Ft)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=pe===Or?y.getLinkPointFromPoint(E,ne,ne.ga(Fr),y.i(3),!0):y.i(0),pe===Or&&(pe=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+pe.x)/2,pe.y),y.L(2,b.x,(pe.y+b.y)/2)):(y.L(1,pe.x,(ne.y+pe.y)/2),y.L(2,(pe.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===Or?y.getLinkPointFromPoint(te,se,se.ga(Fr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===Or&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Mi.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new pn,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 te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new pc;se.layer=Math.floor(te.y/2);var he=b.i(0),pe=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=pe.x*pe.x+pe.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),pe=b.i(E+2);var ye=0;he.y<te.y?ye=pe.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(ye=pe.y>te.y?0:ne.x<te.x?2:1),se.j=ye}x.push(se)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);this.zi(x,this.Ux,te,te+ne);var Te=1;for(se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++){var Ge=x[Te];(he?Ge.first:Ge.jc)!==se&&(ye++,se=he?Ge.first:Ge.jc);var Xe=Ge.link;te=Xe.i(Ge.index),ne=Xe.i(Ge.index+1);var Je=this.linkSpacing*(ye-(pe-1)/2);y++,Xe.uh(),Xe.L(Ge.index,te.x,te.y+Je),Xe.L(Ge.index+1,ne.x,ne.y+Je),Xe.zf()}}te=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++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(se=new pc,se.layer=Math.floor(te.x/2),he=b.i(0),pe=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=pe.x+pe.y*pe.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),pe=b.i(E+2),ye=0,he.x<te.x?ye=pe.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(ye=pe.x>te.x?0:ne.y<te.y?2:1),se.j=ye),x.push(se));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);for(this.zi(x,this.Ux,te,te+ne),Te=1,se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++)Ge=x[Te],(he?Ge.first:Ge.jc)!==se&&(ye++,se=he?Ge.first:Ge.jc),Xe=Ge.link,te=Xe.i(Ge.index),ne=Xe.i(Ge.index+1),Je=this.linkSpacing*(ye-(pe-1)/2),y++,Xe.uh(),Xe.L(Ge.index,te.x+Je,te.y),Xe.L(Ge.index+1,ne.x+Je,ne.y),Xe.zf()}te=E}a=b}}}},et=Mi.prototype,et.Vx=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.Ux=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.Js=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.B=function(a,y){return a-=y,-1<a&&1>a},et.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&jt("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function fc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function dc(a,y,x){a.He[a.tc[y]]=x}vn.Object.defineProperties(Mi.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):jt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==E0&&a!==bg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==k0&&a!==wy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==T0&&a!==by&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==M0&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var E0=new Yt(Mi,"CycleDepthFirst",0),xy=new Yt(Mi,"CycleGreedy",1),bg=new Yt(Mi,"CycleFromLayers",2),k0=new Yt(Mi,"LayerOptimalLinkLength",0),wy=new Yt(Mi,"LayerLongestPathSink",1),Py=new Yt(Mi,"LayerLongestPathSource",2),T0=new Yt(Mi,"InitDepthFirstOut",0),by=new Yt(Mi,"InitDepthFirstIn",1),Cy=new Yt(Mi,"InitNaive",2),Ey=new Yt(Mi,"AggressiveNone",0),M0=new Yt(Mi,"AggressiveLess",1),ky=new Yt(Mi,"AggressiveMore",2),Xx=8;Mi.className="LayeredDigraphLayout",Mi.CycleDepthFirst=E0,Mi.CycleGreedy=xy,Mi.CycleFromLayers=bg,Mi.LayerOptimalLinkLength=k0,Mi.LayerLongestPathSink=wy,Mi.LayerLongestPathSource=Py,Mi.InitDepthFirstOut=T0,Mi.InitDepthFirstIn=by,Mi.InitNaive=Cy,Mi.AggressiveNone=Ey,Mi.AggressiveLess=M0,Mi.AggressiveMore=ky,Mi.PackNone=0,Mi.PackExpand=1,Mi.PackStraighten=2,Mi.PackMedian=4,Mi.PackAll=15,Mi.AlignNone=0,Mi.AlignUpperLeft=1,Mi.AlignUpperRight=2,Mi.AlignLowerLeft=4,Mi.AlignLowerRight=8,Mi.AlignAll=15;function pc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pc.className="SegInfo";function Xd(a){Xi.call(this,a)}en(Xd,Xi),Xd.prototype.createVertex=function(){return new nl(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function nl(a){Ho.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}en(nl,Ho);function ix(a,y){return a.index-y.index}function L0(a,y){if(!a.$n){for(var x=[],b=dr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=dr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;jt("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=dr(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=dr(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}nl.prototype.Cl=function(a){Ho.prototype.Cl.call(this,a),this.bo=this.co=null},nl.prototype.Kl=function(a){Ho.prototype.Kl.call(this,a),this.bo=this.co=null},nl.prototype.zl=function(a){Ho.prototype.zl.call(this,a),this.$n=this.ao=null},nl.prototype.Jl=function(a){Ho.prototype.Jl.call(this,a),this.$n=this.ao=null},vn.Object.defineProperties(nl.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)}}}),nl.prototype.deleteDestinationEdge=nl.prototype.Jl,nl.prototype.addDestinationEdge=nl.prototype.zl,nl.prototype.deleteSourceEdge=nl.prototype.Kl,nl.prototype.addSourceEdge=nl.prototype.Cl,nl.className="LayeredDigraphVertex";function Cg(a){Ms.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}en(Cg,Ms),vn.Object.defineProperties(Cg.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Cg.className="LayeredDigraphEdge";function Kr(a){so.call(this),this.Ub=new yn,this.Wn=O0,this.ud=Eu,this.vo=D0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=B0,this.$d=new ln(10,10).freeze();var y=new Kf(this);this.W=new gl(y),this.Y=new gl(y),this.ru=[],a&&Object.assign(this,a)}en(Kr,so),Kr.prototype.cloneProtected=function(a){so.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},Kr.prototype.qb=function(a){a.classType===Kr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Kr.prototype.createNetwork=function(){return new Kf(this)},Kr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Gn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Mn){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 Vt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Tr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Kr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==I0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Vt&&(y=a),this.path===O0&&y!==null?this.ud=y.isTreePathToChildren?Eu:Wf:this.ud=this.path===O0?Eu: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 yn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Gn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof gl&&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,My(this,y));for(y=this.network.vertexes,a=null;a=$x(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&ux(this,y);if(this.Cu(),this.layerStyle===R0){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 te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new yn,this.isValidLayout=!0};function $x(a){var y=new yn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Kr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Eu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Wf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:jt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case Eu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Wf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:jt("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case Eu:if(0<y.destinationEdges.count){for(var x=new pn,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 Wf:if(0<y.sourceEdges.count){for(x=new pn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:jt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(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}Kr.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 te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Mu&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,se=0;se<ne;se++){var he=te[se];sx(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Jx(a,y){switch(a.vo){default:case D0: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,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Kr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Mu){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])}}Kr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Mu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Kr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Mg:a.children.sort(a.comparer),a.children.reverse();break;default:jt("Unhandled sorting value "+a.sorting.toString())}},Kr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Kr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=gc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var pe=a.node.Mu();pe.next();){var ye=pe.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,ye.width),ne+=ye.height+Math.abs(se)):(te+=ye.width+Math.abs(se),ne=Math.max(ne,ye.height)),se=he)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=Xt.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Xt.free(E))};function gc(a){return a===Mh||a===Mu||a===Lh||a===Zu}function Eg(a){return a===Mh||a===Mu}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Lh)return!0}}return!1}Kr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=gc(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=Ly(a),he=0,pe=a.comments,ye=pe.length,Te=lt.alloc(),Ge=0;Ge<ye;Ge++){var Xe=pe[Ge],Je=Xe.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x-a.commentMargin-Je.width,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();){var it=Xe.value;it.fromSpot=Oa,it.toSpot=aa}else for(Te.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=aa,it.toSpot=Oa;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=aa,it.toSpot=Oa;else for(Te.h(a.bounds.x+a.commentMargin-Je.width,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Oa,it.toSpot=aa;he=0<=a.commentSpacing?he+(Je.height+a.commentSpacing):he+(a.commentSpacing-Je.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y-a.commentMargin-Je.height),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Ca,it.toSpot=ga;else for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=ga,it.toSpot=Ca;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=ga,it.toSpot=Ca;else for(Te.h(a.bounds.x+he,a.bounds.y+a.commentMargin-Je.height),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Ca,it.toSpot=ga;he=0<=a.commentSpacing?he+(Je.width+a.commentSpacing):he+(a.commentSpacing-Je.width)}}if(lt.free(Te),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===Eu)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)}},Kr.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 F0:hx(this,a);break;case Lg:if(a.alignment===Mu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(x)),b=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 te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===ku;var pe=he===Tu,ye=gc(he),Te=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Xe=this.computeNodeIndent(a),Je=a.rowSpacing,it=0;(b||pe||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Mt=a.height,bt=0,At=0,Ft=0,Bt=null,_t=null,Kt=0,Rn=0,Jn=0,Zn=0,Tn=0,hn=0,kr=0,wr=0;if(ye&&!Eg(he)&&135<E&&ne.reverse(),Eg(he))if(1<se)for(var mi=0;mi<se;mi++)mi%2===0&&mi!==se-1&&(wr=Math.max(wr,y?ne[mi].Da.width:ne[mi].Da.height));else se===1&&(wr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Mh:At=135>E?cx(this,a,ne,wr,bt,At):fx(this,a,ne,wr,bt,At),wr=At.x,bt=At.width,At=At.height;break;case Lh:for(Bt=0;Bt<se;Bt++)_t=ne[Bt],Te=_t.Da,Ft=hn===0?0:Je,y?(_t.S.h(te-Te.width,Zn+Ft),bt=Math.max(bt,Te.width),At=Math.max(At,Zn+Ft+Te.height),Zn+=Ft+Te.height):(_t.S.h(Jn+Ft,te-Te.height),bt=Math.max(bt,Jn+Ft+Te.width),At=Math.max(At,Te.height),Jn+=Ft+Te.width),hn++;break;case Zu:for(Bt=0;Bt<se;Bt++)_t=ne[Bt],te=_t.Da,Te=hn===0?0:Je,y?(_t.S.h(Ge/2+a.focus.x,Zn+Te),bt=Math.max(bt,te.width),At=Math.max(At,Zn+Te+te.height),Zn+=Te+te.height):(_t.S.h(Jn+Te,Ge/2+a.focus.y),bt=Math.max(bt,Jn+Te+te.width),At=Math.max(At,te.height),Jn+=Te+te.width),hn++}Bt=vs(this,2),_t=vs(this,2),y?(Bt[0].h(0,0),Bt[1].h(0,At),_t[0].h(bt,0)):(Bt[0].h(0,0),Bt[1].h(bt,0),_t[0].h(0,At)),_t[1].h(bt,At)}else for(mi=0;mi<se;mi++){var Ui=ne[mi],$o=Ui.Da;if(y){0<Te&&0<hn&&Jn+Ge+$o.width>Te&&(Jn<te&&ef(a,he,te-Jn,0,kr,mi-1),Tn++,hn=0,kr=mi,Ft=At,Jn=0,Zn=135<E?-At-Je:At+Je),A0(this,Ui,0,Zn);var ea=0;if(hn===0)Bt=Ui.Yo,_t=Ui.kp,Kt=$o.width,Rn=$o.height,(Bt===null||_t===null||E!==Ll(Ui))&&(Bt=vs(this,2),_t=vs(this,2),Bt[0].h(0,0),Bt[1].h(0,Rn),_t[0].h(Kt,0),_t[1].h(Kt,Rn));else{var Ra=Bn();Rn=dx(this,a,Ui,Bt,_t,Kt,Rn,Ra),ea=Rn.x,Bt=Ra[0],_t=Ra[1],Kt=Rn.width,Rn=Rn.height,Un(Ra),Jn<$o.width&&0>ea&&(Uf(a,-ea,0,kr,mi-1),j0(Bt,-ea,0),j0(_t,-ea,0),ea=0)}Ui.S.h(ea,Zn),bt=Math.max(bt,Kt),At=Math.max(At,Ft+(Tn===0?0:Je)+$o.height),Jn=Kt}else 0<Te&&0<hn&&Zn+Ge+$o.height>Te&&(Zn<te&&ef(a,he,0,te-Zn,kr,mi-1),Tn++,hn=0,kr=mi,Ft=bt,Zn=0,Jn=135<E?-bt-Je:bt+Je),A0(this,Ui,Jn,0),ea=0,hn===0?(Bt=Ui.Yo,_t=Ui.kp,Kt=$o.width,Rn=$o.height,(Bt===null||_t===null||E!==Ll(Ui))&&(Bt=vs(this,2),_t=vs(this,2),Bt[0].h(0,0),Bt[1].h(Kt,0),_t[0].h(0,Rn),_t[1].h(Kt,Rn))):(Ra=Bn(),Rn=dx(this,a,Ui,Bt,_t,Kt,Rn,Ra),ea=Rn.x,Bt=Ra[0],_t=Ra[1],Kt=Rn.width,Rn=Rn.height,Un(Ra),Zn<$o.height&&0>ea&&(Uf(a,0,-ea,kr,mi-1),j0(Bt,0,-ea),j0(_t,0,-ea),ea=0)),Ui.S.h(Jn,ea),At=Math.max(At,Rn),bt=Math.max(bt,Ft+(Tn===0?0:Je)+$o.width),Zn=Rn;hn++}switch(0<Tn&&(y?(At+=Math.max(0,x),Jn<bt&&ef(a,he,bt-Jn,0,kr,se-1),0<it&&(pe||Uf(a,it,0,0,se-1),bt+=it)):(bt+=Math.max(0,x),Zn<At&&ef(a,he,0,At-Zn,kr,se-1),0<it&&(pe||Uf(a,0,it,0,se-1),At+=it))),it=pe=0,he){case $d:y?pe+=bt/2-a.focus.x-Xe/2:it+=At/2-a.focus.y-Xe/2;break;case Hf:0<Tn?y?pe+=bt/2-a.focus.x-Xe/2:it+=At/2-a.focus.y-Xe/2:y?(wr=ne[0].S.x+ne[0].la.x,pe+=wr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-wr)/2-a.focus.x-Xe/2):(wr=ne[0].S.y+ne[0].la.y,it+=wr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-wr)/2-a.focus.y-Xe/2);break;case ku:y?(pe-=Xe,bt+=Xe):(it-=Xe,At+=Xe);break;case Tu:y?(pe+=bt-a.width+Xe,bt+=Xe):(it+=At-a.height+Xe,At+=Xe);break;case Mh:y?1<se?pe+=wr+Ge/2-a.focus.x:pe+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?it+=wr+Ge/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Lh:y?pe+=bt+Ge/2-a.focus.x:it+=At+Ge/2-a.focus.y;break;case Zu:break;default:At=this.customAlignment(a,pe,it,bt,At),pe=At[0],it=At[1],bt=At[2],At=At[3]}for(Xe=0;Xe<se;Xe++)wr=ne[Xe],y?wr.S.h(wr.S.x+wr.la.x-pe,wr.S.y+(135<E?(ye?-At:-wr.Da.height)+wr.la.y-x:Mt+x+wr.la.y)):wr.S.h(wr.S.x+(135<E?(ye?-bt:-wr.Da.width)+wr.la.x-x:b+x+wr.la.x),wr.S.y+wr.la.y-it);if(se=ne=0,ye?y?(bt=Ny(a,bt,pe),0>pe&&(pe=0),135<E&&(it+=At+x),At+=Mt+x,he===Zu&&(ne+=Ge/2+a.focus.x),se+=Mt+x):(135<E&&(pe+=bt+x),bt+=b+x,At=Ay(a,At,it),0>it&&(it=0),he===Zu&&(se+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>bt&&(bt=jy(he,b-bt,0),ne=bt.x,se=bt.y,bt=b,pe=0):bt=Ny(a,bt,pe),0>pe&&(ne-=pe,pe=0),135<E&&(it+=At+x),At=Math.max(Math.max(At,Mt),At+Mt+x),se+=Mt+x):(135<E&&(pe+=bt+x),bt=Math.max(Math.max(bt,b),bt+b+x),a.comments===null?Mt>At&&(At=jy(he,0,Mt-At),ne=At.x,se=At.y,At=Mt,it=0):At=Ay(a,At,it),0>it&&(se-=it,it=0),ne+=b+x),0<Tn)E=vs(this,4),Tn=vs(this,4),y?(E[2].h(0,Mt+x),E[3].h(E[2].x,At),Tn[2].h(bt,E[2].y),Tn[3].h(Tn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(bt,E[2].y),Tn[2].h(E[2].x,At),Tn[3].h(E[3].x,Tn[2].y));else{for(E=vs(this,Bt.length+2),Tn=vs(this,_t.length+2),he=0;he<Bt.length;he++)ye=Bt[he],E[he+2].h(ye.x+ne,ye.y+se);for(he=0;he<_t.length;he++)ye=_t[he],Tn[he+2].h(ye.x+ne,ye.y+se)}y?(E[0].h(pe,0),E[1].h(E[0].x,Mt),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])),Tn[0].h(pe+b,0),Tn[1].h(Tn[0].x,Mt),Tn[2].y<Tn[1].y&&(Tn[2].x<Tn[0].x?Tn[2].assign(Tn[1]):Tn[1].assign(Tn[2])),Tn[3].y<Tn[2].y&&(Tn[3].x<Tn[0].x?Tn[3].assign(Tn[2]):Tn[2].assign(Tn[3])),E[2].y-=x/2,Tn[2].y-=x/2):(E[0].h(0,it),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Tn[0].h(0,it+Mt),Tn[1].h(b,Tn[0].y),Tn[2].x<Tn[1].x&&(Tn[2].y<Tn[0].y?Tn[2].assign(Tn[1]):Tn[1].assign(Tn[2])),Tn[3].x<Tn[2].x&&(Tn[3].y<Tn[0].y?Tn[3].assign(Tn[2]):Tn[2].assign(Tn[3])),E[2].x-=x/2,Tn[2].x-=x/2),zl(this,Bt),zl(this,_t),a.Yo=E,a.kp=Tn,a.la.h(pe,it),a.Da.h(bt,At)}break;default:jt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=gc(x));var E=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 te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var pe=y.alignment,ye=pe===ku,Te=pe===Tu;se=gc(pe);var Ge=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Xe=y.nodeSpacing,Je=a.computeNodeIndent(y),it=ye||Te?0:Je/2,Mt=y.rowSpacing,bt=0;(ye||Te||y.hm||y.im&&y.maxGenerationCount===1)&&(bt=Math.max(0,y.rowIndent)),ye=y.width;var At=y.height,Ft=0,Bt=0,_t=0,Kt=0,Rn=0,Jn=0,Zn=0,Tn=0,hn=0,kr=0;if(se&&!Eg(pe)&&135<b&&E.reverse(),Eg(pe))if(1<ne)for(var wr=0;wr<ne;wr++){var mi=E[wr],Ui=mi.Da;wr%2===0&&wr!==ne-1?hn=Math.max(hn,(x?Ui.width:Ui.height)+a.computeBusNodeSpacing(mi)-Xe):wr%2!==0&&(kr=Math.max(kr,(x?Ui.width:Ui.height)+a.computeBusNodeSpacing(mi)-Xe))}else ne===1&&(hn=x?E[0].Da.width:E[0].Da.height);if(se)switch(pe){case Mh:case Mu:Bt=135>b?cx(a,y,E,hn,Ft,Bt):fx(a,y,E,hn,Ft,Bt),hn=Bt.x,Ft=Bt.width,Bt=Bt.height;break;case Lh:for(Ge=0;Ge<ne;Ge++)it=E[Ge],_t=it.Da,kr=Zn===0?0:Mt,x?(it.S.h(te-_t.width,Rn+kr),Ft=Math.max(Ft,_t.width),Bt=Math.max(Bt,Rn+kr+_t.height),Rn+=kr+_t.height):(it.S.h(Kt+kr,te-_t.height),Ft=Math.max(Ft,Kt+kr+_t.width),Bt=Math.max(Bt,_t.height),Kt+=kr+_t.width),Zn++;break;case Zu:for(te=0;te<ne;te++)Ge=E[te],it=Ge.Da,_t=Zn===0?0:Mt,x?(Ge.S.h(Xe/2+y.focus.x,Rn+_t),Ft=Math.max(Ft,it.width),Bt=Math.max(Bt,Rn+_t+it.height),Rn+=_t+it.height):(Ge.S.h(Kt+_t,Xe/2+y.focus.y),Ft=Math.max(Ft,Kt+_t+it.width),Bt=Math.max(Bt,it.height),Kt+=_t+it.width),Zn++}else for(kr=0;kr<ne;kr++)wr=E[kr],mi=wr.Da,x?(0<Ge&&0<Zn&&Kt+Xe+mi.width>Ge&&(Kt<te&&ef(y,pe,te-Kt,0,Tn,kr-1),Jn++,Zn=0,Tn=kr,_t=Bt,Kt=0,Rn=135<b?-Bt-Mt:Bt+Mt),Ui=Zn===0?it:Xe,A0(a,wr,0,Rn),wr.S.h(Kt+Ui,Rn),Ft=Math.max(Ft,Kt+Ui+mi.width),Bt=Math.max(Bt,_t+(Jn===0?0:Mt)+mi.height),Kt+=Ui+mi.width):(0<Ge&&0<Zn&&Rn+Xe+mi.height>Ge&&(Rn<te&&ef(y,pe,0,te-Rn,Tn,kr-1),Jn++,Zn=0,Tn=kr,_t=Ft,Rn=0,Kt=135<b?-Ft-Mt:Ft+Mt),Ui=Zn===0?it:Xe,A0(a,wr,Kt,0),wr.S.h(Kt,Rn+Ui),Bt=Math.max(Bt,Rn+Ui+mi.height),Ft=Math.max(Ft,_t+(Jn===0?0:Mt)+mi.width),Rn+=Ui+mi.height),Zn++;switch(0<Jn&&(x?(Bt+=Math.max(0,he),Kt<Ft&&ef(y,pe,Ft-Kt,0,Tn,ne-1),0<bt&&(Te||Uf(y,bt,0,0,ne-1),Ft+=bt)):(Ft+=Math.max(0,he),Rn<Bt&&ef(y,pe,0,Bt-Rn,Tn,ne-1),0<bt&&(Te||Uf(y,0,bt,0,ne-1),Bt+=bt))),bt=Te=0,pe){case $d:x?Te+=Ft/2-y.focus.x-Je/2:bt+=Bt/2-y.focus.y-Je/2;break;case Hf:0<Jn?x?Te+=Ft/2-y.focus.x-Je/2:bt+=Bt/2-y.focus.y-Je/2:x?(a=E[0].S.x+E[0].la.x,Te+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Je/2):(a=E[0].S.y+E[0].la.y,bt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Je/2);break;case ku:x?(Te-=Je,Ft+=Je):(bt-=Je,Bt+=Je);break;case Tu:x?(Te+=Ft-y.width+Je,Ft+=Je):(bt+=Bt-y.height+Je,Bt+=Je);break;case Mh:case Mu:x?1<ne?Te+=hn+Xe/2-y.focus.x:Te+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?bt+=hn+Xe/2-y.focus.y:bt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Lh:x?Te+=Ft+Xe/2-y.focus.x:bt+=Bt+Xe/2-y.focus.y;break;case Zu:break;default:a=a.customAlignment(y,Te,bt,Ft,Bt),Te=a[0],bt=a[1],Ft=a[2],Bt=a[3]}for(a=0;a<ne;a++)Je=E[a],x?Je.S.h(Je.S.x+Je.la.x-Te,Je.S.y+(135<b?(se?-Bt:-Je.Da.height)+Je.la.y-he:At+he+Je.la.y)):Je.S.h(Je.S.x+(135<b?(se?-Ft:-Je.Da.width)+Je.la.x-he:ye+he+Je.la.x),Je.S.y+Je.la.y-bt);x?(Ft=Ny(y,Ft,Te),0>Te&&(Te=0),135<b&&(bt+=Bt+he),Bt=Math.max(Math.max(Bt,At),Bt+At+he)):(135<b&&(Te+=Ft+he),Ft=Math.max(Math.max(Ft,ye),Ft+ye+he),Bt=Ay(y,Bt,bt),0>bt&&(bt=0)),y.la.h(Te,bt),y.Da.h(Ft,Bt)}}Kr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Xt(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Xt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=Ll(y)===90,ye=0,Te=0,Ge=0,Xe=0;Xe<ne;Xe++)if(!(Xe%2!==0||1<ne&&Xe===ne-1)){var Je=x[Xe],it=Je.Da,Mt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing(Je)-se;Je.S.h(b-(it.width+bt),Ge+Mt),E=Math.max(E,it.width+bt),te=Math.max(te,Ge+Mt+it.height),Ge+=Mt+it.height}else bt=a.computeBusNodeSpacing(Je)-se,Je.S.h(Te+Mt,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Te+Mt+it.width),Te+=Mt+it.width;ye++}for(ye=0,Je=Te,Xe=Ge,pe?(Te=b+se,Ge=0):(Te=0,Ge=b+se),it=0;it<ne;it++)if(it%2!==0){Mt=x[it],bt=Mt.Da;var At=ye===0?0:he;if(pe){var Ft=a.computeBusNodeSpacing(Mt)-se;Mt.S.h(Te+Ft,Ge+At),E=Math.max(E,Te+bt.width+Ft),te=Math.max(te,Ge+At+bt.height),Ge+=At+bt.height}else Ft=a.computeBusNodeSpacing(Mt)-se,Mt.S.h(Te+At,Ge+Ft),E=Math.max(E,Te+At+bt.width),te=Math.max(te,Ge+bt.height+Ft),Te+=At+bt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,pe?Math.max(Math.abs(Xe),Math.abs(Ge)):Math.max(Math.abs(Je),Math.abs(Te))),pe?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),pe=b+se/2-x.focus.x-x.la.x,E=Math.max(E,pe+ne.width),0>pe&&(E-=pe),te=Math.max(te,Math.max(Xe,Ge)+a+ne.height),0>x.S.x&&(b=N0(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Je,Te)+a+ne.width),Ge=b+se/2-x.focus.y-x.la.y,te=Math.max(te,Ge+ne.height),0>Ge&&(te-=Ge),0>x.S.y&&(b=N0(y,x.S.y,!0,b,se)))),new Xt(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Xt(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Xt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=Ll(y)===270,ye=0,Te=0,Ge=0,Xe=0;Xe<ne;Xe++)if(!(Xe%2!==0||1<ne&&Xe===ne-1)){var Je=x[Xe],it=Je.Da,Mt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing(Je)-se;Ge-=Mt+it.height,Je.S.h(b-(it.width+bt),Ge),E=Math.max(E,it.width+bt),te=Math.max(te,Math.abs(Ge))}else bt=a.computeBusNodeSpacing(Je)-se,Te-=Mt+it.width,Je.S.h(Te,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Math.abs(Te));ye++}for(ye=0,Je=Te,Xe=Ge,pe?(Te=b+se,Ge=0):(Te=0,Ge=b+se),it=0;it<ne;it++)if(it%2!==0){Mt=x[it],bt=Mt.Da;var At=ye===0?0:he;if(pe){var Ft=a.computeBusNodeSpacing(Mt)-se;Ge-=At+bt.height,Mt.S.h(Te+Ft,Ge),E=Math.max(E,Te+bt.width+Ft),te=Math.max(te,Math.abs(Ge))}else Ft=a.computeBusNodeSpacing(Mt)-se,Te-=At+bt.width,Mt.S.h(Te,Ge+Ft),te=Math.max(te,Ge+bt.height+Ft),E=Math.max(E,Math.abs(Te));ye++}for(1<ne&&ne%2===1&&(he=x[ne-1],ye=he.Da,a=a.computeBusLastRowSpacing(he,pe?Math.max(Math.abs(Xe),Math.abs(Ge)):Math.max(Math.abs(Je),Math.abs(Te))),pe?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-ye.height-a),Te=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Te+ye.width),0>Te&&(E-=Te),te=Math.max(te,Math.abs(Math.min(Xe,Ge))+a+ye.height),0>he.S.x&&(b=N0(y,he.S.x,!1,b,se))):(he.S.h(-E-ye.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(Je,Te))+a+ye.width),Ge=b+se/2-he.focus.y-he.la.y,te=Math.max(te,Ge+ye.height),0>Ge&&(te-=Ge),0>he.S.y&&(b=N0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],pe?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new Xt(b,0,E,te)}Kr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Kr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function N0(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ku:return a.width>y?a.width:y;case Tu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Mh:case Mu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Lh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Zu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ku:return a.height>y?a.height:y;case Tu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Mh:case Mu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Lh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Zu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case $d:y/=2,x/=2;break;case Hf:y/=2,x/=2;break;case ku:x=y=0;break;case Tu:break;default:jt("Unhandled alignment value "+a.toString())}return new lt(y,x)}function ef(a,y,x,b,E,te){y=jy(y,x,b),Uf(a,y.x,y.y,E,te)}function Uf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function A0(a,y,x,b){var E=y.parent;switch(a.ud){case Eu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Wf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:jt("Unhandled path value "+a.ud.toString())}}function j0(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,te,ne,se){var he=Ll(y),pe=he===90||he===270,ye=y.nodeSpacing;y=b;var Te=E;b=te;var Ge=ne,Xe=x.Yo,Je=x.kp;ne=x.Da;var it=pe?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Xe===null||he!==Ll(x))&&(Xe=vs(a,2),Je=vs(a,2),pe?(Xe[0].h(0,0),Xe[1].h(0,ne.height),Je[0].h(ne.width,0),Je[1].h(Je[0].x,Xe[1].y)):(Xe[0].h(0,0),Xe[1].h(ne.width,0),Je[0].h(0,ne.height),Je[1].h(Xe[1].x,Je[0].y))),pe){if(Ge=9999999,!(Te===null||2>Te.length||Xe===null||2>Xe.length))for(E=x=0;x<Te.length&&E<Xe.length;){te=Te[x];var Mt=Xe[E];he=Mt.x,pe=Mt.y,he+=b;var bt=te;x+1<Te.length&&(bt=Te[x+1]);var At=Mt;Mt=At.x,At=At.y,E+1<Xe.length&&(At=Xe[E+1],Mt=At.x,At=At.y,Mt+=b);var Ft=Ge;te.y===pe?Ft=he-te.x:te.y>pe&&te.y<At?Ft=he+(te.y-pe)/(At-pe)*(Mt-he)-te.x:pe>te.y&&pe<bt.y&&(Ft=he-(te.x+(pe-te.y)/(bt.y-te.y)*(bt.x-te.x))),Ft<Ge&&(Ge=Ft),bt.y<=te.y?x++:At<=pe?E++:(bt.y<=At&&x++,At<=bt.y&&E++)}if(Ge=b-Ge,Ge+=ye,x=Xe,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(x=vs(a,b),he=0;he<b;he++)x[he].assign(ye[he]);zl(a,ye),b=x}if(te=Je,he=Ge,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=vs(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].y<te[0].y;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x+he,bt.y);for(te=te[te.length-1].y;x<Te.length&&Te[x].y<=te;)x++;for(;x<Te.length&&Te[x].y>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=vs(a,E),x=0;x<E;x++)te[x].assign(ye[x]);zl(a,ye),E=te}return te=Math.max(0,Ge)+ne.width,ne=it,zl(a,y),zl(a,Xe),zl(a,Te),zl(a,Je),se[0]=b,se[1]=E,new Xt(Ge,0,te,ne)}if(b=9999999,!(Te===null||2>Te.length||Xe===null||2>Xe.length))for(E=x=0;x<Te.length&&E<Xe.length;)te=Te[x],Mt=Xe[E],he=Mt.x,pe=Mt.y,pe+=Ge,bt=te,x+1<Te.length&&(bt=Te[x+1]),At=Mt,Mt=At.x,At=At.y,E+1<Xe.length&&(At=Xe[E+1],Mt=At.x,At=At.y,At+=Ge),Ft=b,te.x===he?Ft=pe-te.y:te.x>he&&te.x<Mt?Ft=pe+(te.x-he)/(Mt-he)*(At-pe)-te.y:he>te.x&&he<bt.x&&(Ft=pe-(te.y+(he-te.x)/(bt.x-te.x)*(bt.y-te.y))),Ft<b&&(b=Ft),bt.x<=te.x?x++:Mt<=he?E++:(bt.x<=Mt&&x++,Mt<=bt.x&&E++);if(Ge-=b,Ge+=ye,x=Xe,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(x=vs(a,b),he=0;he<b;he++)x[he].assign(ye[he]);zl(a,ye),b=x}if(te=Je,he=Ge,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=vs(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].x<te[0].x;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x,bt.y+he);for(te=te[te.length-1].x;x<Te.length&&Te[x].x<=te;)x++;for(;x<Te.length&&Te[x].x>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=vs(a,E),x=0;x<E;x++)te[x].assign(ye[x]);zl(a,ye),E=te}return te=it,ne=Math.max(0,Ge)+ne.height,zl(a,y),zl(a,Xe),zl(a,Te),zl(a,Je),se[0]=b,se[1]=E,new Xt(Ge,0,te,ne)}function vs(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new lt;return a}function zl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Kr.prototype.arrangeTrees=function(){if(this.Rb===I0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof gl){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 gl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Mg:a.sort(this.comparer),a.reverse();break;default:jt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case B0:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:jt("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}Kr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Kr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Kr.prototype.Gu=function(){if(this.layerStyle===R0){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 te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new lt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new lt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var se=a[ne]+y[ne];this.angle===270?(te-=se,E.push(new Xt(0,te,x,se))):this.angle===90?(E.push(new Xt(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new Xt(te,0,se,x))):(E.push(new Xt(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Kr.prototype.commitLayers=function(){},Kr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Kr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof gl&&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])}}Kr.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===Eu,b=Ll(a);switch(b){case 0:var E=aa;break;case 90:E=ga;break;case 180:E=Oa;break;default:E=Ca}var te=a.children,ne=te.length;switch(y){case Mh:case Mu:for(y=0;y<ne;y++){var se=te[y];if(se=(x?se.sourceEdges:se.destinationEdges).first(),se!==null&&(se=se.link,se!==null)){var he=b===90||b===270?Oa:Ca;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Oa;break;case 90:he=Ca;break;case 180:he=aa;break;default:he=ga}else y%2===0&&(he=b===90||b===270?aa:ga);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case Lh:for(b=b===90||b===270?aa:ga,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case Zu:for(b=b===90||b===270?Oa:Ca,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=Ll(a),this.ud===Eu){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=aa;break;case 90:b.fromSpot=ga;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=Ca}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=Ca;break;case 180:b.toSpot=aa;break;default:b.toSpot=ga}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=aa;break;case 90:b.toSpot=ga;break;case 180:b.toSpot=Oa;break;default:b.toSpot=Ca}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=Ca;break;case 180:b.fromSpot=aa;break;default:b.fromSpot=ga}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}Kr.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},Kr.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)},vn.Object.defineProperties(Kr.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!==D0&&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!==R0||(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!==B0&&a!==Iy&&a!==I0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Yd&&a!==kg&&a!==Tg&&!Mg||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):jt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==F0&&a!==Lg||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Yd&&a!==kg&&a!==Tg&&!Mg||(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!==F0&&a!==Lg||(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 O0=new Yt(Kr,"PathDefault",-1),Eu=new Yt(Kr,"PathDestination",0),Wf=new Yt(Kr,"PathSource",1),Yd=new Yt(Kr,"SortingForwards",10),kg=new Yt(Kr,"SortingReverse",11),Tg=new Yt(Kr,"SortingAscending",12),Mg=new Yt(Kr,"SortingDescending",13),$d=new Yt(Kr,"AlignmentCenterSubtrees",20),Hf=new Yt(Kr,"AlignmentCenterChildren",21),ku=new Yt(Kr,"AlignmentStart",22),Tu=new Yt(Kr,"AlignmentEnd",23),Mh=new Yt(Kr,"AlignmentBus",24),Mu=new Yt(Kr,"AlignmentBusBranching",25),Lh=new Yt(Kr,"AlignmentTopLeftBus",26),Zu=new Yt(Kr,"AlignmentBottomRightBus",27),F0=new Yt(Kr,"CompactionNone",30),Lg=new Yt(Kr,"CompactionBlock",31),D0=new Yt(Kr,"StyleLayered",40),Fy=new Yt(Kr,"StyleLastParents",41),Dy=new Yt(Kr,"StyleAlternating",42),By=new Yt(Kr,"StyleRootOnly",43),B0=new Yt(Kr,"ArrangementVertical",50),Iy=new Yt(Kr,"ArrangementHorizontal",51),I0=new Yt(Kr,"ArrangementFixedRoots",52),Ry=new Yt(Kr,"LayerIndividual",60),_y=new Yt(Kr,"LayerSiblings",61),R0=new Yt(Kr,"LayerUniform",62);Kr.className="TreeLayout",Kr.PathDefault=O0,Kr.PathDestination=Eu,Kr.PathSource=Wf,Kr.SortingForwards=Yd,Kr.SortingReverse=kg,Kr.SortingAscending=Tg,Kr.SortingDescending=Mg,Kr.AlignmentCenterSubtrees=$d,Kr.AlignmentCenterChildren=Hf,Kr.AlignmentStart=ku,Kr.AlignmentEnd=Tu,Kr.AlignmentBus=Mh,Kr.AlignmentBusBranching=Mu,Kr.AlignmentTopLeftBus=Lh,Kr.AlignmentBottomRightBus=Zu,Kr.CompactionNone=F0,Kr.CompactionBlock=Lg,Kr.StyleLayered=D0,Kr.StyleLastParents=Fy,Kr.StyleAlternating=Dy,Kr.StyleRootOnly=By,Kr.ArrangementVertical=B0,Kr.ArrangementHorizontal=Iy,Kr.ArrangementFixedRoots=I0,Kr.LayerIndividual=Ry,Kr.LayerSiblings=_y,Kr.LayerUniform=R0;function Kf(a){Xi.call(this,a)}en(Kf,Xi),Kf.prototype.createVertex=function(){return new gl(this)},Kf.prototype.createEdge=function(){return new Jd(this)},Kf.className="TreeNetwork";function gl(a){Ho.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new lt(0,0),this.Da=new ln(0,0),this.la=new lt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Hf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Zo,this.wr=!0,this.Dp=Zo}en(gl,Ho),gl.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)},vn.Object.defineProperties(gl.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)}}}),gl.className="TreeVertex";function Jd(a){Ms.call(this,a),this.$t=new lt(0,0)}en(Jd,Ms),Jd.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 Eu:x=this.fromVertex,b=this.toVertex;break;case Wf:x=this.toVertex,b=this.fromVertex;break;default:jt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=Ll(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Gs,pe=a.isOrthogonal,ye;if(a.uh(),pe||he){for(ye=2;4<a.pointsCount;)a.pv(2);var Te=a.i(1),Ge=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Te=a.i(0),Ge=a.i(a.pointsCount-1)}var Xe=a.i(a.pointsCount-1);te===0?(x.alignment===Tu?(te=b.bottom+E.y,E.y===0&&Te.y>Xe.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.top+E.y,E.y===0&&Te.y<Xe.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Te.x,te),ye++,a.m(ye,b.right+ne,te),ye++,a.m(ye,b.right+ne+(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+2*(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+(E.x-se),te),ye++,a.m(ye,Ge.x,te)):(pe&&(a.m(ye,b.right+ne/2,Te.y),ye++),a.m(ye,b.right+ne/2,te),ye++,a.m(ye,b.right+ne+E.x-(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,Ge.y))):te===90?(x.alignment===Tu?(te=b.right+E.x,E.x===0&&Te.x>Xe.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.left+E.x,E.x===0&&Te.x<Xe.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Te.y),ye++,a.m(ye,te,b.bottom+ne),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+2*(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)),ye++,a.m(ye,te,Ge.y)):(pe&&(a.m(ye,Te.x,b.bottom+ne/2),ye++),a.m(ye,te,b.bottom+ne/2),ye++,a.m(ye,te,b.bottom+ne+E.y-(pe?se/2:se)),ye++,pe&&a.m(ye,Ge.x,a.i(ye-1).y))):te===180?(x.alignment===Tu?(te=b.bottom+E.y,E.y===0&&Te.y>Xe.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.top+E.y,E.y===0&&Te.y<Xe.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Te.x,te),ye++,a.m(ye,b.left-ne,te),ye++,a.m(ye,b.left-ne+(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+2*(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+(E.x+se),te),ye++,a.m(ye,Ge.x,te)):(pe&&(a.m(ye,b.left-ne/2,Te.y),ye++),a.m(ye,b.left-ne/2,te),ye++,a.m(ye,b.left-ne+E.x+(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,Ge.y))):te===270?(x.alignment===Tu?(te=b.right+E.x,E.x===0&&Te.x>Xe.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.left+E.x,E.x===0&&Te.x<Xe.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Te.y),ye++,a.m(ye,te,b.top-ne),ye++,a.m(ye,te,b.top-ne+(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+2*(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+(E.y+se)),ye++,a.m(ye,te,Ge.y)):(pe&&(a.m(ye,Te.x,b.top-ne/2),ye++),a.m(ye,te,b.top-ne/2),ye++,a.m(ye,te,b.top-ne+E.y+(pe?se/2:se)),ye++,pe&&a.m(ye,Ge.x,a.i(ye-1).y))):jt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ll(x),y!==Ll(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===Gs,E=a.isOrthogonal,b=gc(this.fromVertex.alignment),a.uh(),y===0?(y=se.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=se.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=se.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=se.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},vn.Object.defineProperties(Jd.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)}}}),Jd.className="TreeEdge",Qi.prototype.initializeStandardTools=function(){this.gb("Action",new ll,this.mouseDownTools),this.gb("Relinking",new Bs,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Va,this.mouseDownTools),this.gb("Resizing",new ba,this.mouseDownTools),this.gb("Linking",new Ka,this.mouseMoveTools),this.gb("Dragging",new lo,this.mouseMoveTools),this.gb("DragSelecting",new Ks,this.mouseMoveTools),this.gb("Panning",new va,this.mouseMoveTools),this.gb("ContextMenu",new Za,this.mouseUpTools),this.gb("TextEditing",new qi,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},ru("Horizontal",new dm),ru("Spot",new gm),ru("Table",new vm),ru("Viewbox",new xm),ru("TableRow",new ym),ru("TableColumn",new Sm),ru("Graduated",new Kp),ru("Grid",new Hp),xd.add("GraphLinksModel",qo),xd.add("TreeModel",el);var _0=an.go,zy={get licenseKey(){return Vt.licenseKey},set licenseKey(a){Vt.licenseKey=a},get version(){return Vt.version},Group:Tr,EnumValue:Yt,List:pn,Set:yn,Map:Zt,Point:lt,Size:ln,Rect:Xt,Margin:Ir,Spot:qn,Geometry:kn,PathFigure:Oo,PathSegment:fi,InputEvent:ma,DiagramEvent:hu,ChangedEvent:oo,Model:ir,GraphLinksModel:ti,TreeModel:ts,Binding:Mo,Transaction:Uo,UndoManager:ho,CommandHandler:Tt,Tool:ai,DraggingTool:lo,DraggingInfo:Gu,DraggingOptions:ce,LinkingBaseTool:yo,LinkingTool:Ka,RelinkingTool:Bs,LinkReshapingTool:ko,ResizingTool:ba,RotatingTool:Va,ClickSelectingTool:Uh,ActionTool:ll,ClickCreatingTool:uh,HTMLInfo:Ql,ContextMenuTool:Za,DragSelectingTool:Ks,PanningTool:va,TextEditingTool:qi,ToolManager:Qi,Animation:ya,AnimationManager:Es,AnimationTrigger:wl,Layer:ra,Diagram:Vt,Palette:Ee,Overview:Oe,Brush:ki,GraphObject:zt,Panel:Pn,RowColumnDefinition:Io,Shape:Dr,TextBlock:Zi,Picture:us,Part:hr,Adornment:di,Node:Gn,Link:Mn,Placeholder:Ja,Layout:so,LayoutNetwork:Xi,LayoutVertex:Ho,LayoutEdge:Ms,GridLayout:ha,PanelLayout:Wo,CircularLayout:fo,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:S0,ForceDirectedLayout:xa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Mi,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:nl,LayeredDigraphEdge:Cg,TreeLayout:Kr,TreeNetwork:Kf,TreeVertex:gl,TreeEdge:Jd};typeof _0=="object"&&_0.version&&Cn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _0?"debug ":"")+"version: "+_0.version+", replaced with version: "+zy.version),Vt.prototype.go=zy,an.go=zy,typeof gn.exports=="object"&&(gn.exports=typeof at.g!="undefined"?at.g.go:self.go)}();var ht=typeof at.g!="undefined"?at.g.go:self.go;const Dt=typeof at.g!="undefined"?at.g.go:self.go,oe=Dt.Group,ze=Dt.EnumValue,De=Dt.List,fe=Dt.Set,me=Dt.Map,ke=Dt.Point,Ce=Dt.Size,Se=Dt.Rect,Le=Dt.Margin,ve=Dt.Spot,we=Dt.Geometry,de=Dt.PathFigure,z=Dt.PathSegment,ee=Dt.InputEvent,ae=Dt.DiagramEvent,ie=Dt.ChangedEvent,le=Dt.Model,ue=Dt.GraphLinksModel,ge=Dt.TreeModel,Pe=Dt.Binding,je=Dt.Transaction,Be=Dt.UndoManager,Fe=Dt.CommandHandler,Ne=Dt.Tool,Ae=Dt.DraggingTool,Re=Dt.DraggingInfo,We=Dt.LinkingBaseTool,Ye=Dt.LinkingTool,Ue=Dt.RelinkingTool,Ve=Dt.LinkReshapingTool,ot=Dt.ResizingTool,st=Dt.RotatingTool,ct=Dt.ClickSelectingTool,Pt=Dt.ActionTool,$e=Dt.ClickCreatingTool,nt=Dt.HTMLInfo,yt=Dt.ContextMenuTool,xt=Dt.DragSelectingTool,wt=Dt.PanningTool,dt=Dt.TextEditingTool,ft=Dt.ToolManager,ut=Dt.Animation,Et=Dt.AnimationManager,mt=Dt.AnimationTrigger,vt=Dt.Layer,kt=Dt.Diagram,pt=Dt.Palette,Qe=Dt.Overview,Ke=Dt.Brush,xe=Dt.GraphObject,Me=Dt.Panel,Ze=Dt.RowColumnDefinition,tt=Dt.Shape,Ie=Dt.TextBlock,_e=Dt.TextBlockMetrics,He=Dt.Picture,rt=Dt.Part,St=Dt.Adornment,Ct=Dt.Node,Nt=Dt.Link,Ot=Dt.Placeholder,Rt=Dt.Layout,$t=Dt.LayoutNetwork,qt=Dt.LayoutVertex,rn=Dt.LayoutEdge,Ht=Dt.GridLayout,sn=Dt.PanelLayout,tn=Dt.CircularLayout,Ut=Dt.CircularNetwork,En=Dt.CircularVertex,bn=Dt.CircularEdge,Dn=Dt.ForceDirectedLayout,Qn=Dt.ForceDirectedNetwork,Pr=Dt.ForceDirectedVertex,Yn=Dt.ForceDirectedEdge,Mr=Dt.LayeredDigraphLayout,Ur=Dt.LayeredDigraphNetwork,_r=Dt.LayeredDigraphVertex,ni=Dt.LayeredDigraphEdge,Li=Dt.TreeLayout,_i=Dt.TreeNetwork,Di=Dt.TreeVertex,ui=Dt.TreeEdge,Wi=Dt.version},24334:function(gn,cn,at){var ht,Dt;(function(oe,ze){gn.exports=ze(oe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof at.g!="undefined"?at.g:this,function(oe){"use strict";oe=oe||{};var ze=oe.Base64,De="2.6.4",fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=function(Ue){for(var Ve={},ot=0,st=Ue.length;ot<st;ot++)Ve[Ue.charAt(ot)]=ot;return Ve}(fe),ke=String.fromCharCode,Ce=function(Ue){if(Ue.length<2){var Ve=Ue.charCodeAt(0);return Ve<128?Ue:Ve<2048?ke(192|Ve>>>6)+ke(128|Ve&63):ke(224|Ve>>>12&15)+ke(128|Ve>>>6&63)+ke(128|Ve&63)}else{var Ve=65536+(Ue.charCodeAt(0)-55296)*1024+(Ue.charCodeAt(1)-56320);return ke(240|Ve>>>18&7)+ke(128|Ve>>>12&63)+ke(128|Ve>>>6&63)+ke(128|Ve&63)}},Se=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Le=function(Ue){return Ue.replace(Se,Ce)},ve=function(Ue){var Ve=[0,2,1][Ue.length%3],ot=Ue.charCodeAt(0)<<16|(Ue.length>1?Ue.charCodeAt(1):0)<<8|(Ue.length>2?Ue.charCodeAt(2):0),st=[fe.charAt(ot>>>18),fe.charAt(ot>>>12&63),Ve>=2?"=":fe.charAt(ot>>>6&63),Ve>=1?"=":fe.charAt(ot&63)];return st.join("")},we=oe.btoa&&typeof oe.btoa=="function"?function(Ue){return oe.btoa(Ue)}:function(Ue){if(Ue.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ue.replace(/[\s\S]{1,3}/g,ve)},de=function(Ue){return we(Le(String(Ue)))},z=function(Ue){return Ue.replace(/[+\/]/g,function(Ve){return Ve=="+"?"-":"_"}).replace(/=/g,"")},ee=function(Ue,Ve){return Ve?z(de(Ue)):de(Ue)},ae=function(Ue){return ee(Ue,!0)},ie;oe.Uint8Array&&(ie=function(Ue,Ve){for(var ot="",st=0,ct=Ue.length;st<ct;st+=3){var Pt=Ue[st],$e=Ue[st+1],nt=Ue[st+2],yt=Pt<<16|$e<<8|nt;ot+=fe.charAt(yt>>>18)+fe.charAt(yt>>>12&63)+(typeof $e!="undefined"?fe.charAt(yt>>>6&63):"=")+(typeof nt!="undefined"?fe.charAt(yt&63):"=")}return Ve?z(ot):ot});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(Ue){switch(Ue.length){case 4:var Ve=(7&Ue.charCodeAt(0))<<18|(63&Ue.charCodeAt(1))<<12|(63&Ue.charCodeAt(2))<<6|63&Ue.charCodeAt(3),ot=Ve-65536;return ke((ot>>>10)+55296)+ke((ot&1023)+56320);case 3:return ke((15&Ue.charCodeAt(0))<<12|(63&Ue.charCodeAt(1))<<6|63&Ue.charCodeAt(2));default:return ke((31&Ue.charCodeAt(0))<<6|63&Ue.charCodeAt(1))}},ge=function(Ue){return Ue.replace(le,ue)},Pe=function(Ue){var Ve=Ue.length,ot=Ve%4,st=(Ve>0?me[Ue.charAt(0)]<<18:0)|(Ve>1?me[Ue.charAt(1)]<<12:0)|(Ve>2?me[Ue.charAt(2)]<<6:0)|(Ve>3?me[Ue.charAt(3)]:0),ct=[ke(st>>>16),ke(st>>>8&255),ke(st&255)];return ct.length-=[0,0,2,1][ot],ct.join("")},je=oe.atob&&typeof oe.atob=="function"?function(Ue){return oe.atob(Ue)}:function(Ue){return Ue.replace(/\S{1,4}/g,Pe)},Be=function(Ue){return je(String(Ue).replace(/[^A-Za-z0-9\+\/]/g,""))},Fe=function(Ue){return ge(je(Ue))},Ne=function(Ue){return String(Ue).replace(/[-_]/g,function(Ve){return Ve=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ae=function(Ue){return Fe(Ne(Ue))},Re;oe.Uint8Array&&(Re=function(Ue){return Uint8Array.from(Be(Ne(Ue)),function(Ve){return Ve.charCodeAt(0)})});var We=function(){var Ue=oe.Base64;return oe.Base64=ze,Ue};if(oe.Base64={VERSION:De,atob:Be,btoa:we,fromBase64:Ae,toBase64:ee,utob:Le,encode:ee,encodeURI:ae,btou:ge,decode:Ae,noConflict:We,fromUint8Array:ie,toUint8Array:Re},typeof Object.defineProperty=="function"){var Ye=function(Ue){return{value:Ue,enumerable:!1,writable:!0,configurable:!0}};oe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ye(function(){return Ae(this)})),Object.defineProperty(String.prototype,"toBase64",Ye(function(Ue){return ee(this,Ue)})),Object.defineProperty(String.prototype,"toBase64URI",Ye(function(){return ee(this,!0)}))}}return oe.Meteor&&(Base64=oe.Base64),gn.exports?gn.exports.Base64=oe.Base64:(ht=[],Dt=function(){return oe.Base64}.apply(cn,ht),Dt!==void 0&&(gn.exports=Dt)),{Base64:oe.Base64}})},2859:function(gn,cn,at){"use strict";at.d(cn,{hP:function(){return Qe}});var ht=function(Ke,xe){return(ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Me,Ze){Me.__proto__=Ze}||function(Me,Ze){for(var tt in Ze)Object.prototype.hasOwnProperty.call(Ze,tt)&&(Me[tt]=Ze[tt])})(Ke,xe)};function Dt(Ke,xe){function Me(){this.constructor=Ke}ht(Ke,xe),Ke.prototype=xe===null?Object.create(xe):(Me.prototype=xe.prototype,new Me)}function oe(Ke,xe,Me,Ze){return new(Me||(Me=Promise))(function(tt,Ie){function _e(St){try{rt(Ze.next(St))}catch(Ct){Ie(Ct)}}function He(St){try{rt(Ze.throw(St))}catch(Ct){Ie(Ct)}}function rt(St){var Ct;St.done?tt(St.value):(Ct=St.value,Ct instanceof Me?Ct:new Me(function(Nt){Nt(Ct)})).then(_e,He)}rt((Ze=Ze.apply(Ke,xe||[])).next())})}function ze(Ke,xe){var Me,Ze,tt,Ie,_e={label:0,sent:function(){if(1&tt[0])throw tt[1];return tt[1]},trys:[],ops:[]};return Ie={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function He(rt){return function(St){return function(Ct){if(Me)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Me=1,Ze&&(tt=2&Ct[0]?Ze.return:Ct[0]?Ze.throw||((tt=Ze.return)&&tt.call(Ze),0):Ze.next)&&!(tt=tt.call(Ze,Ct[1])).done)return tt;switch(Ze=0,tt&&(Ct=[2&Ct[0],tt.value]),Ct[0]){case 0:case 1:tt=Ct;break;case 4:return _e.label++,{value:Ct[1],done:!1};case 5:_e.label++,Ze=Ct[1],Ct=[0];continue;case 7:Ct=_e.ops.pop(),_e.trys.pop();continue;default:if(tt=_e.trys,!((tt=tt.length>0&&tt[tt.length-1])||Ct[0]!==6&&Ct[0]!==2)){_e=0;continue}if(Ct[0]===3&&(!tt||Ct[1]>tt[0]&&Ct[1]<tt[3])){_e.label=Ct[1];break}if(Ct[0]===6&&_e.label<tt[1]){_e.label=tt[1],tt=Ct;break}if(tt&&_e.label<tt[2]){_e.label=tt[2],_e.ops.push(Ct);break}tt[2]&&_e.ops.pop(),_e.trys.pop();continue}Ct=xe.call(Ke,_e)}catch(Nt){Ct=[6,Nt],Ze=0}finally{Me=tt=0}if(5&Ct[0])throw Ct[1];return{value:Ct[0]?Ct[1]:void 0,done:!0}}([rt,St])}}}function De(){for(var Ke=0,xe=0,Me=arguments.length;xe<Me;xe++)Ke+=arguments[xe].length;var Ze=Array(Ke),tt=0;for(xe=0;xe<Me;xe++)for(var Ie=arguments[xe],_e=0,He=Ie.length;_e<He;_e++,tt++)Ze[tt]=Ie[_e];return Ze}var fe=function(){function Ke(){}return Ke.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ke.setAttributes=function(xe,Me){for(var Ze=0,tt=Me;Ze<tt.length;Ze++){var Ie=tt[Ze],_e=Ie[0],He=Ie[1];xe.setAttribute(_e,He)}},Ke.createRect=function(xe,Me,Ze){var tt=document.createElementNS("http://www.w3.org/2000/svg","rect");return tt.setAttribute("width",xe.toString()),tt.setAttribute("height",Me.toString()),Ze&&Ke.setAttributes(tt,Ze),tt},Ke.createLine=function(xe,Me,Ze,tt,Ie){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",xe.toString()),_e.setAttribute("y1",Me.toString()),_e.setAttribute("x2",Ze.toString()),_e.setAttribute("y2",tt.toString()),Ie&&Ke.setAttributes(_e,Ie),_e},Ke.createPolygon=function(xe,Me){var Ze=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ze.setAttribute("points",xe),Me&&Ke.setAttributes(Ze,Me),Ze},Ke.createCircle=function(xe,Me){var Ze=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ze.setAttribute("cx",(xe/2).toString()),Ze.setAttribute("cy",(xe/2).toString()),Ze.setAttribute("r",xe.toString()),Me&&Ke.setAttributes(Ze,Me),Ze},Ke.createEllipse=function(xe,Me,Ze){var tt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return tt.setAttribute("cx",(xe/2).toString()),tt.setAttribute("cy",(Me/2).toString()),tt.setAttribute("rx",(xe/2).toString()),tt.setAttribute("ry",(Me/2).toString()),Ze&&Ke.setAttributes(tt,Ze),tt},Ke.createGroup=function(xe){var Me=document.createElementNS("http://www.w3.org/2000/svg","g");return xe&&Ke.setAttributes(Me,xe),Me},Ke.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ke.createMarker=function(xe,Me,Ze,tt,Ie,_e,He){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ke.setAttributes(rt,[["id",xe],["orient",Me],["markerWidth",Ze.toString()],["markerHeight",tt.toString()],["refX",Ie.toString()],["refY",_e.toString()]]),rt.appendChild(He),rt},Ke.createText=function(xe){var Me=document.createElementNS("http://www.w3.org/2000/svg","text");return Me.setAttribute("x","0"),Me.setAttribute("y","0"),xe&&Ke.setAttributes(Me,xe),Me},Ke.createTSpan=function(xe,Me){var Ze=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ze.textContent=xe,Me&&Ke.setAttributes(Ze,Me),Ze},Ke.createImage=function(xe){var Me=document.createElementNS("http://www.w3.org/2000/svg","image");return xe&&Ke.setAttributes(Me,xe),Me},Ke.createPoint=function(xe,Me){var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ze.x=xe,Ze.y=Me,Ze},Ke.createPath=function(xe,Me){var Ze=document.createElementNS("http://www.w3.org/2000/svg","path");return Ze.setAttribute("d",xe),Me&&Ke.setAttributes(Ze,Me),Ze},Ke}(),me=function(){function Ke(){}return Ke.addKey=function(xe){Ke.key=xe},Object.defineProperty(Ke,"isLicensed",{get:function(){return!!Ke.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ke.key)},enumerable:!1,configurable:!0}),Ke}(),ke=function(){function Ke(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ke.prototype.rasterize=function(xe,Me,Ze){var tt=this;return new Promise(function(Ie){var _e=Ze!==void 0?Ze:document.createElement("canvas");xe===null&&(tt.markersOnly=!0,tt.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",Me.width.baseVal.valueAsString),He.setAttribute("height",Me.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+Me.viewBox.baseVal.width.toString()+" "+Me.viewBox.baseVal.height.toString()),He.innerHTML=Me.innerHTML,tt.naturalSize===!0?(He.width.baseVal.value=xe.naturalWidth,He.height.baseVal.value=xe.naturalHeight):tt.width!==void 0&&tt.height!==void 0&&(He.width.baseVal.value=tt.width,He.height.baseVal.value=tt.height),_e.width=He.width.baseVal.value,_e.height=He.height.baseVal.value;var rt=He.outerHTML,St=_e.getContext("2d");tt.markersOnly!==!0&&St.drawImage(xe,0,0,_e.width,_e.height);var Ct=window.URL,Nt=new Image(_e.width,_e.height);Nt.setAttribute("crossOrigin","anonymous");var Ot=new Blob([rt],{type:"image/svg+xml"}),Rt=Ct.createObjectURL(Ot);Nt.onload=function(){St.drawImage(Nt,0,0),Ct.revokeObjectURL(Rt);var $t=_e.toDataURL(tt.imageType,tt.imageQuality);Ie($t)},Nt.src=Rt})},Ke}(),Ce=function(){},Se=function(){function Ke(xe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+xe+"_"}return Object.defineProperty(Ke.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.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(Ke.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ke.prototype.addClass=function(xe){return this.styleSheet===void 0&&this.addStyleSheet(),xe.name=""+this.classNamePrefix+xe.localName,this.classes.push(xe),this.styleSheet.sheet.insertRule("."+xe.name+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length),xe},Ke.prototype.addRule=function(xe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(xe),this.styleSheet.sheet.insertRule(xe.selector+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length)},Ke.prototype.addStyleSheet=function(){var xe;this.styleSheet=document.createElement("style"),((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).appendChild(this.styleSheet),this.addRule(new Le("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Le("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Le("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ve("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ve("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ke.prototype.removeStyleSheet=function(){var xe;this.styleSheet&&(((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ke}(),Le=function(Ke,xe){this.selector=Ke,this.style=xe},ve=function(Ke,xe){this.localName=Ke,this.style=xe},we=function(){function Ke(xe,Me,Ze,tt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=xe,this.displayMode=Me,this.markerItems=Ze,this.uiStyleSettings=tt,this.styles=Ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ke.prototype.show=function(xe){var Me=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ze=document.createElement("div");Ze.className=this.toolbarBlockStyleClass.name,Ze.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ze),this.addActionButton(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Ie){var _e=document.createElement("div");_e.className=""+Me.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Ie.typeName),_e.innerHTML=Ie.icon,_e.addEventListener("click",function(){Me.markerToolbarButtonClicked(_e,Ie)}),Me.buttons.push(_e),Me.markerButtons.push(_e)}),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 tt=document.createElement("div");tt.className=this.toolbarBlockStyleClass.name,tt.style.whiteSpace="nowrap",tt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(tt),this.addActionButton(tt,'<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(tt,'<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()},Ke.prototype.addButtonClickListener=function(xe){this.buttonClickListeners.push(xe)},Ke.prototype.removeButtonClickListener=function(xe){this.buttonClickListeners.indexOf(xe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(xe),1)},Ke.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ke.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var xe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Me=0;Me<this.markerButtons.length;Me++)Me<xe||Me===xe&&this.markerButtons.length-1===xe?this.markerButtonBlock.appendChild(this.markerButtons[Me]):(Me===xe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Me]))}},Ke.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")},Ke.prototype.resetButtonStyles=function(){var xe=this;this.buttons.forEach(function(Me){Me.className=Me.className.replace(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name,"").trim(),Me.className=Me.className.replace(xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:xe.toolbarActiveButtonStyleColorsClass.name,"").trim(),Me.className+=" "+(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name)})},Ke.prototype.addActionButton=function(xe,Me,Ze){var tt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Me,Ie.setAttribute("data-action",Ze),Ie.addEventListener("click",function(){tt.actionToolbarButtonClicked(Ie,Ze)}),Ze){case"select":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ie.style.fill=this.uiStyleSettings.closeButtonColor}xe.appendChild(Ie),this.buttons.push(Ie)},Ke.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var xe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
padding: `+xe+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Le("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Le("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ke.prototype.markerToolbarButtonClicked=function(xe,Me){this.setActiveButton(xe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ze){return Ze("marker",Me)}),this.markerButtonOverflowBlock.style.display="none"},Ke.prototype.actionToolbarButtonClicked=function(xe,Me){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ze){return Ze("action",Me)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ke.prototype.setActiveButton=function(xe){this.resetButtonStyles(),xe.className=xe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),xe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ke.prototype.setActiveMarkerButton=function(xe){var Me=this.markerButtons.find(function(Ze){return Ze.getAttribute("data-type-name")===xe});Me&&this.setActiveButton(Me)},Ke.prototype.setCurrentMarker=function(xe){var Me=this;this.currentMarker=xe,this.buttons.filter(function(Ze){return/delete|notes/.test(Ze.getAttribute("data-action"))}).forEach(function(Ze){Me.currentMarker===void 0?(Ze.style.fillOpacity="0.4",Ze.style.pointerEvents="none"):(Ze.style.fillOpacity="1",Ze.style.pointerEvents="all")})},Ke}(),de=function(){function Ke(xe,Me,Ze,tt){this.panels=[],this.panelButtons=[],this.markerjsContainer=xe,this.displayMode=Me,this.uiStyleSettings=Ze,this.styles=tt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ke.prototype.addStyles=function(){var xe;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Me=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
background-color: `+((xe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&xe!==void 0?xe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px;
padding: `+Me+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Le("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Le("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ke.prototype.show=function(xe){var Me;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Me=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Me!==void 0?Me:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ke.prototype.setPanelButtons=function(xe){var Me,Ze,tt=this;this.panels=xe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Me=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Me!==void 0?Me:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ze=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ze!==void 0?Ze:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ie){var _e;Ie.uiStyleSettings=tt.uiStyleSettings;var He=document.createElement("div");He.className=tt.toolboxButtonStyleClass.name+" "+((_e=tt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:tt.toolboxButtonStyleColorsClass.name),He.innerHTML=Ie.icon,He.title=Ie.title,He.addEventListener("click",function(){tt.panelButtonClick(Ie)}),tt.panelButtons.push(He),tt.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ke.prototype.panelButtonClick=function(xe){var Me=this,Ze=-1;if(xe!==this.activePanel){Ze=this.panels.indexOf(xe),this.panelRow.innerHTML="";var tt=xe.getUi();tt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(tt),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=xe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Me.displayMode==="inline"?Me.panelRow.style.display="none":Me.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ie,_e){var He,rt;Ie.className=Me.toolboxButtonStyleClass.name+" "+(_e===Ze?""+((He=Me.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:Me.toolboxActiveButtonStyleColorsClass.name):""+((rt=Me.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:Me.toolboxButtonStyleColorsClass.name))})},Ke}(),z=function(Ke,xe){this.title=Ke,this.icon=xe},ee=function(Ke){function xe(Me,Ze,tt,Ie){var _e=Ke.call(this,Me,Ie||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return _e.colors=[],_e.addTransparent=!1,_e.colorBoxes=[],_e.colors=Ze,_e.currentColor=tt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.whiteSpace="nowrap",this.colors.forEach(function(tt){var Ie=Me.getColorBox(tt);Ze.appendChild(Ie),Me.colorBoxes.push(Ie)}),Ze},xe.prototype.getColorBox=function(Me){var Ze=this,tt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-tt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Ie-2+"px",_e.style.height=Ie-2+"px",_e.style.padding="1px",_e.style.marginRight="2px",_e.style.marginBottom="2px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderRadius=(Ie+2)/2+"px",_e.style.borderColor=Me===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Ze.setCurrentColor(Me,_e)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=Ie-2+"px",He.style.height=Ie-2+"px",He.style.backgroundColor=Me,He.style.borderRadius=Ie/2+"px",Me==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.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>`),_e.appendChild(He),_e},xe.prototype.setCurrentColor=function(Me,Ze){var tt=this;this.currentColor=Me,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Me)},xe}(z),ae=function(){function Ke(xe,Me,Ze){this._state="new",this._isSelected=!1,this._container=xe,this._overlayContainer=Me,this.globalSettings=Ze,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ke.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ke.prototype.ownsTarget=function(xe){return!1},Object.defineProperty(Ke.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ke.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ke.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ke.prototype.pointerDown=function(xe,Me){},Ke.prototype.dblClick=function(xe,Me){},Ke.prototype.manipulate=function(xe){},Ke.prototype.pointerUp=function(xe){this.stateChanged()},Ke.prototype.dispose=function(){},Ke.prototype.addMarkerVisualToContainer=function(xe){this.container.childNodes.length>0?this.container.insertBefore(xe,this.container.childNodes[0]):this.container.appendChild(xe)},Ke.prototype.getState=function(){return{typeName:Ke.typeName,state:this.state,notes:this.notes}},Ke.prototype.restoreState=function(xe){this._state=xe.state,this.notes=xe.notes},Ke.prototype.scale=function(xe,Me){},Ke.prototype.colorChanged=function(xe){this.onColorChanged&&this.onColorChanged(xe),this.stateChanged()},Ke.prototype.fillColorChanged=function(xe){this.onFillColorChanged&&this.onFillColorChanged(xe),this.stateChanged()},Ke.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var xe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),xe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(xe)&&this.onStateChanged(this)}},Ke.typeName="MarkerBase",Ke}(),ie=function(){function Ke(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ke.prototype.findGripByVisual=function(xe){return this.topLeft.ownsTarget(xe)?this.topLeft:this.topCenter.ownsTarget(xe)?this.topCenter:this.topRight.ownsTarget(xe)?this.topRight:this.centerLeft.ownsTarget(xe)?this.centerLeft:this.centerRight.ownsTarget(xe)?this.centerRight:this.bottomLeft.ownsTarget(xe)?this.bottomLeft:this.bottomCenter.ownsTarget(xe)?this.bottomCenter:this.bottomRight.ownsTarget(xe)?this.bottomRight:void 0},Ke}(),le=function(){function Ke(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ke.prototype.ownsTarget=function(xe){return xe===this.visual||xe===this.visual.childNodes[0]||xe===this.visual.childNodes[1]},Ke}(),ue=function(){function Ke(){}return Ke.toITransformMatrix=function(xe){return{a:xe.a,b:xe.b,c:xe.c,d:xe.d,e:xe.e,f:xe.f}},Ke.toSVGMatrix=function(xe,Me){return xe.a=Me.a,xe.b=Me.b,xe.c=Me.c,xe.d=Me.d,xe.e=Me.e,xe.f=Me.f,xe},Ke}(),ge=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.left=0,Ie.top=0,Ie.width=0,Ie.height=0,Ie.defaultSize={x:50,y:20},Ie.offsetX=0,Ie.offsetY=0,Ie.rotationAngle=0,Ie.CB_DISTANCE=10,Ie._suppressMarkerCreateEvent=!1,Ie.container.transform.baseVal.appendItem(fe.createTransform()),Ie.setupControlBox(),Ie}return Dt(xe,Ke),Object.defineProperty(xe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"visual",{get:function(){return this._visual},set:function(Me){this._visual=Me;var Ze=fe.createTransform();this._visual.transform.baseVal.appendItem(Ze)},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Me){return!!Ke.prototype.ownsTarget.call(this,Me)||!!(this.controlGrips.findGripByVisual(Me)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Me))},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="new"&&(this.left=Me.x,this.top=Me.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var tt=this.unrotatePoint(Me);if(this.manipulationStartX=tt.x,this.manipulationStartY=tt.y,this.offsetX=tt.x-this.left,this.offsetY=tt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ze),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ze)){this.activeGrip=this.rotatorGrip;var Ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ie.x-this.width/2,this.top=Ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},xe.prototype.pointerUp=function(Me){var Ze=this.state;Ke.prototype.pointerUp.call(this,Me),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Me),this._state="select",Ze==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},xe.prototype.moveVisual=function(Me){this.visual.style.transform="translate("+Me.x+"px, "+Me.y+"px)"},xe.prototype.manipulate=function(Me){var Ze=this.unrotatePoint(Me);this.state==="creating"?this.resize(Me):this.state==="move"?(this.left=this.manipulationStartLeft+(Ze.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ze.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ze):this.state==="rotate"&&this.rotate(Me)},xe.prototype.resize=function(Me){var Ze=this.manipulationStartLeft,tt=this.manipulationStartWidth,Ie=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ze=this.manipulationStartLeft+Me.x-this.manipulationStartX,tt=this.manipulationStartWidth+this.manipulationStartLeft-Ze;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:tt=this.manipulationStartWidth+Me.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Me.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Me.y-this.manipulationStartY}tt>=0?(this.left=Ze,this.width=tt):(this.left=Ze+tt,this.width=-tt),_e>=0?(this.top=Ie,this.height=_e):(this.top=Ie+_e,this.height=-_e),this.setSize()},xe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},xe.prototype.rotate=function(Me){if(Math.abs(Me.x-this.centerX)>.1){var Ze=Math.sign(Me.x-this.centerX);this.rotationAngle=180*Math.atan((Me.y-this.centerY)/(Me.x-this.centerX))/Math.PI+90*Ze,this.applyRotation()}},xe.prototype.applyRotation=function(){var Me=this.container.transform.baseVal.getItem(0);Me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Me,0)},xe.prototype.rotatePoint=function(Me){if(this.rotationAngle===0)return Me;var Ze=this.container.getCTM(),tt=fe.createPoint(Me.x,Me.y);return{x:(tt=tt.matrixTransform(Ze)).x,y:tt.y}},xe.prototype.unrotatePoint=function(Me){if(this.rotationAngle===0)return Me;var Ze=this.container.getCTM();Ze=Ze.inverse();var tt=fe.createPoint(Me.x,Me.y);return{x:(tt=tt.matrixTransform(Ze)).x,y:tt.y}},xe.prototype.select=function(){Ke.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ke.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var Me=fe.createTransform();Me.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Me),this.container.appendChild(this.controlBox),this.controlRect=fe.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=fe.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ie,this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){var Me=this.controlBox.transform.baseVal.getItem(0);Me.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Me,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()},xe.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()},xe.prototype.createGrip=function(){var Me=new le;return Me.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Me.visual),Me},xe.prototype.positionGrips=function(){var Me=this.controlGrips.topLeft.GRIP_SIZE,Ze=-Me/2,tt=Ze,Ie=(this.width+this.CB_DISTANCE)/2-Me/2,_e=(this.height+this.CB_DISTANCE)/2-Me/2,He=this.height+this.CB_DISTANCE-Me/2,rt=this.width+this.CB_DISTANCE-Me/2;this.positionGrip(this.controlGrips.topLeft.visual,Ze,tt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,tt),this.positionGrip(this.controlGrips.topRight.visual,rt,tt),this.positionGrip(this.controlGrips.centerLeft.visual,Ze,_e),this.positionGrip(this.controlGrips.centerRight.visual,rt,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Ze,He),this.positionGrip(this.controlGrips.bottomCenter.visual,Ie,He),this.positionGrip(this.controlGrips.bottomRight.visual,rt,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,tt-3*this.CB_DISTANCE)},xe.prototype.positionGrip=function(Me,Ze,tt){var Ie=Me.transform.baseVal.getItem(0);Ie.setTranslate(Ze,tt),Me.transform.baseVal.replaceItem(Ie,0)},xe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},xe.prototype.showControlBox=function(){this.controlBox.style.display=""},xe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ue.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ue.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ke.prototype.getState.call(this))},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me);var Ze=Me;this.left=Ze.left,this.top=Ze.top,this.width=Ze.width,this.height=Ze.height,this.rotationAngle=Ze.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ze.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ze.containerTransformMatrix))},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze);var tt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:tt.x*Me,y:tt.y*Ze});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Me,this.height=this.height*Ze,this.adjustControlBox()},xe}(ae),Pe=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},xe.prototype.manipulate=function(Me){Ke.prototype.manipulate.call(this,Me)},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),this.setSize()},xe.prototype.setSize=function(){Ke.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Me){Ke.prototype.pointerUp.call(this,Me),this.setSize()},xe.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Me),this.stateChanged()},xe.prototype.setFillColor=function(Me){this.fillColor=Me,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},xe.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ke.prototype.getState.call(this))},xe.prototype.restoreState=function(Me){var Ze=Me;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.opacity=Ze.opacity,this.createVisual(),Ke.prototype.restoreState.call(this,Me),this.setSize()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.setSize()},xe.title="Rectangle marker",xe}(ge),je=function(Ke){function xe(Me,Ze,tt,Ie){var _e=Ke.call(this,Me,Ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _e.widths=[],_e.widthBoxes=[],_e.widths=Ze,_e.currentWidth=tt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.widths.forEach(function(tt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.flexGrow="2",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=tt===Me.currentWidth?Me.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Me.setCurrentWidth(tt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.innerText=tt.toString(),_e.style.marginRight="5px",Ie.appendChild(_e);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var rt=document.createElement("hr");rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop=tt+"px solid "+Me.uiStyleSettings.toolboxColor,rt.style.flexGrow="2",He.appendChild(rt),Ie.appendChild(He),Me.widthBoxes.push(Ie)}),Ze},xe.prototype.setCurrentWidth=function(Me,Ze){var tt=this;this.currentWidth=Me,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},xe}(z),Be=function(Ke){function xe(Me,Ze,tt,Ie){var _e=Ke.call(this,Me,Ie||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return _e.styles=[],_e.styleBoxes=[],_e.styles=Ze,_e.currentStyle=tt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.styles.forEach(function(tt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Me.styles.length-5+"%",Ie.style.borderColor=tt===Me.currentStyle?Me.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Me.setCurrentStyle(tt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var He=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Me.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(tt!==""?'stroke-dasharray="'+tt+'"':"")+` />
</svg>`;_e.innerHTML=He,Ie.appendChild(_e),Me.styleBoxes.push(Ie)}),Ze},xe.prototype.setCurrentStyle=function(Me,Ze){var tt=this;this.currentStyle=Me,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},xe}(z),Fe=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.strokeColor=tt.defaultColor,Ie.strokeWidth=tt.defaultStrokeWidth,Ie.strokeDasharray=tt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",tt.defaultColorSet,tt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ke),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Ke.prototype.getState.call(this);return Me.typeName=xe.typeName,Me},xe.typeName="FrameMarker",xe.title="Frame marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',xe}(Pe),Ne=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"},Ae=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.x1=0,Ie.y1=0,Ie.x2=0,Ie.y2=0,Ie.defaultLength=50,Ie.manipulationStartX=0,Ie.manipulationStartY=0,Ie.manipulationStartX1=0,Ie.manipulationStartY1=0,Ie.manipulationStartX2=0,Ie.manipulationStartY2=0,Ie.setupControlBox(),Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!!Ke.prototype.ownsTarget.call(this,Me)||!(!this.grip1.ownsTarget(Me)&&!this.grip2.ownsTarget(Me))},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.manipulationStartX=Me.x,this.manipulationStartY=Me.y,this.state==="new"&&(this.x1=Me.x,this.y1=Me.y,this.x2=Me.x,this.y2=Me.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(Ze)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ze)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},xe.prototype.pointerUp=function(Me){var Ze=this.state;Ke.prototype.pointerUp.call(this,Me),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(Me),this._state="select",Ze==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},xe.prototype.adjustVisual=function(){},xe.prototype.manipulate=function(Me){this.state==="creating"?this.resize(Me):this.state==="move"?(this.x1=this.manipulationStartX1+Me.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Me.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Me.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Me.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Me)},xe.prototype.resize=function(Me){switch(this.activeGrip){case this.grip1:this.x1=Me.x,this.y1=Me.y;break;case this.grip2:case void 0:this.x2=Me.x,this.y2=Me.y}this.adjustVisual(),this.adjustControlBox()},xe.prototype.select=function(){Ke.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ke.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){this.positionGrips()},xe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},xe.prototype.createGrip=function(){var Me=new le;return Me.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Me.visual),Me},xe.prototype.positionGrips=function(){var Me=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Me/2,this.y1-Me/2),this.positionGrip(this.grip2.visual,this.x2-Me/2,this.y2-Me/2)},xe.prototype.positionGrip=function(Me,Ze,tt){var Ie=Me.transform.baseVal.getItem(0);Ie.setTranslate(Ze,tt),Me.transform.baseVal.replaceItem(Ie,0)},xe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ke.prototype.getState.call(this))},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me);var Ze=Me;this.x1=Ze.x1,this.y1=Ze.y1,this.x2=Ze.x2,this.y2=Ze.y2},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.x1=this.x1*Me,this.y1=this.y1*Ze,this.x2=this.x2*Me,this.y2=this.y2*Ze,this.adjustVisual(),this.adjustControlBox()},xe}(ae),Re=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.strokeColor=tt.defaultColor,Ie.strokeWidth=tt.defaultStrokeWidth,Ie.strokeDasharray=tt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",tt.defaultColorSet,tt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.selectorLine&&Me!==this.visibleLine)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.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)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},xe.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()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.adjustVisual(),this.colorChanged(Me)},xe.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me);var Ze=Me;this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.createVisual(),this.adjustVisual()},xe.typeName="LineMarker",xe.title="Line marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',xe}(Ae),We=function(Ke){function xe(Me,Ze,tt,Ie){var _e=Ke.call(this,Me,Ie||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return _e.fonts=[],_e.fontBoxes=[],_e.fonts=Ze,_e.currentFont=tt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.fonts.forEach(function(tt){var Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Me.fonts.length-5+"%",Ie.style.borderColor=tt===Me.currentFont?Me.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Me.setCurrentFont(tt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=tt,_e.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(He),Ie.appendChild(_e),Me.fontBoxes.push(Ie)}),Ze},xe.prototype.setCurrentFont=function(Me,Ze){var tt=this;this.currentFont=Me,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},xe}(z),Ye=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.color="transparent",Ie.padding=5,Ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ie.text=Ie.DEFAULT_TEXT,Ie.isMoved=!1,Ie.color=tt.defaultColor,Ie.fontFamily=tt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setColor=Ie.setColor.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.renderText=Ie.renderText.bind(Ie),Ie.sizeText=Ie.sizeText.bind(Ie),Ie.textEditDivClicked=Ie.textEditDivClicked.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.setSize=Ie.setSize.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.colorPanel=new ee("Color",tt.defaultColorSet,tt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new We("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){if(Ke.prototype.ownsTarget.call(this,Me)||Me===this.visual||Me===this.textElement||Me===this.bgRectangle)return!0;var Ze=!1;return this.textElement.childNodes.forEach(function(tt){tt===Me&&(Ze=!0)}),Ze},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.isMoved=!1,this.pointerDownPoint=Me,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},xe.prototype.renderText=function(){var Me=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(Ze){Me.textElement.appendChild(fe.createTSpan(Ze.trim()===""?" ":Ze.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},xe.prototype.getTextScale=function(){var Me=this.textElement.getBBox(),Ze=1;if(Me.width>0&&Me.height>0){var tt=(1*this.width-this.width*this.padding*2/100)/Me.width,Ie=(1*this.height-this.height*this.padding*2/100)/Me.height;Ze=Math.min(tt,Ie)}return Ze},xe.prototype.getTextPosition=function(Me){var Ze=this.textElement.getBBox(),tt=0,Ie=0;return Ze.width>0&&Ze.height>0&&(tt=(this.width-Ze.width*Me)/2,Ie=this.height/2-Ze.height*Me/2),{x:tt,y:Ie}},xe.prototype.sizeText=function(){var Me=this.textElement.getBBox(),Ze=this.getTextScale(),tt=this.getTextPosition(Ze);tt.y-=Me.y*Ze,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+tt.x+"px, "+tt.y+"px) scale("+Ze+", "+Ze+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(tt.x,tt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ze,Ze))},xe.prototype.manipulate=function(Me){Ke.prototype.manipulate.call(this,Me),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Me.x-this.pointerDownPoint.x)>5||Math.abs(Me.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),this.isMoved=!0,this.setSize(),this.sizeText()},xe.prototype.setSize=function(){Ke.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},xe.prototype.pointerUp=function(Me){var Ze=this.state;Ze==="creating"&&(this._suppressMarkerCreateEvent=!0),Ke.prototype.pointerUp.call(this,Me),this.setSize(),(Ze==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.showTextEditor=function(){var Me=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(Ze){Ze.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ze=Number.parseFloat(Me.textEditor.style.fontSize);Me.textEditor.clientWidth>=Number.parseInt(Me.textEditor.style.maxWidth)&&Ze>.9;)Ze-=.1,Me.textEditor.style.fontSize=Math.max(Ze,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ze){Ze.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ze){if(Ze.clipboardData){var tt=Ze.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(tt)),Ze.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Me.textEditDivClicked(Me.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},xe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Me=this.getTextScale(),Ze=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),tt=this.textElement.getBBox(),Ie={x:tt.width*Me,y:tt.height*Me};Ze.x-=Ie.x/2,Ze.y-=Ie.y/2,this.textEditor.style.top=Ze.y+"px",this.textEditor.style.left=Ze.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ze.x+"px",this.textEditor.style.fontSize=Math.max(16*Me,12)+"px",this.textElement.style.display="none"}},xe.prototype.textEditDivClicked=function(Me){this.text=Me.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},xe.prototype.select=function(){Ke.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},xe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ke.prototype.deselect.call(this)},xe.prototype.dblClick=function(Me,Ze){Ke.prototype.dblClick.call(this,Me,Ze),this.showTextEditor()},xe.prototype.setColor=function(Me){this.textElement&&fe.setAttributes(this.textElement,[["fill",Me]]),this.color=Me,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Me)},xe.prototype.setFont=function(Me){this.textElement&&fe.setAttributes(this.textElement,[["font-family",Me]]),this.fontFamily=Me,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},xe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},xe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){var Ze=Me;this.color=Ze.color,this.fontFamily=Ze.fontFamily,this.padding=Ze.padding,this.text=Ze.text,this.createVisual(),Ke.prototype.restoreState.call(this,Me),this.setSize()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.setSize(),this.sizeText(),this.positionTextEditor()},xe.typeName="TextMarker",xe.title="Text marker",xe.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>',xe}(ge),Ue=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=tt.defaultColor,Ie.lineWidth=tt.defaultStrokeWidth,Ie.pixelRatio=tt.freehandPixelRatio,Ie.setColor=Ie.setColor.bind(Ie),Ie.addCanvas=Ie.addCanvas.bind(Ie),Ie.finishCreation=Ie.finishCreation.bind(Ie),Ie.setLineWidth=Ie.setLineWidth.bind(Ie),Ie.colorPanel=new ee("Color",tt.defaultColorSet,tt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.drawingImage)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var Me=fe.createTransform();this.visual.transform.baseVal.appendItem(Me),this.addMarkerVisualToContainer(this.visual)},xe.prototype.pointerDown=function(Me,Ze){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(Me.x,Me.y),this.drawing=!0):Ke.prototype.pointerDown.call(this,Me,Ze)},xe.prototype.manipulate=function(Me){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Me.x,Me.y),this.canvasContext.stroke()):Ke.prototype.manipulate.call(this,Me)},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Me){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ke.prototype.pointerUp.call(this,Me)},xe.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)},xe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ke.prototype.select.call(this)},xe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ke.prototype.deselect.call(this)},xe.prototype.finishCreation=function(){for(var Me=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ze=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],tt=Ze[0],Ie=Ze[1],_e=Ze[2],He=Ze[3],rt=!1,St=0;St<this.canvasElement.height;St++)for(var Ct=0;Ct<this.canvasElement.width;Ct++)Me.data[St*this.canvasElement.width*4+4*Ct+3]>0&&(rt=!0,St<Ie&&(Ie=St),Ct<tt&&(tt=Ct),St>He&&(He=St),Ct>_e&&(_e=Ct));if(rt){this.left=tt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(_e-tt)/this.pixelRatio,this.height=(He-Ie)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=_e-tt,Nt.height=He-Ie,Nt.getContext("2d").putImageData(this.canvasContext.getImageData(tt,Ie,_e-tt,He-Ie),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},xe.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},xe.prototype.setColor=function(Me){this.color=Me,this.colorChanged(Me)},xe.prototype.setLineWidth=function(Me){this.lineWidth=Me},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({drawingImgUrl:this.drawingImgUrl},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){this.createVisual(),Ke.prototype.restoreState.call(this,Me),this.drawingImgUrl=Me.drawingImgUrl,this.setDrawingImage()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.setDrawingImage()},xe.typeName="FreehandMarker",xe.title="Freehand marker",xe.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>',xe}(ge),Ve=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,tt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ie.typeBoxes=[],Ie.currentType=Ze,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2";for(var tt=function(He){var rt="both";switch(He){case 0:rt="both";break;case 1:rt="start";break;case 2:rt="end";break;case 3:rt="none"}var St=document.createElement("div");if(St.style.display="flex",St.style.flexGrow="2",St.style.alignItems="center",St.style.justifyContent="space-between",St.style.padding="5px",St.style.borderWidth="2px",St.style.borderStyle="solid",St.style.borderColor=rt===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",St.addEventListener("click",function(){Me.setCurrentType(rt,St)}),Ze.appendChild(St),rt==="both"||rt==="start"){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ct.style.marginLeft="5px",St.appendChild(Ct)}var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.style.flexGrow="2";var Ot=document.createElement("hr");if(Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),Ot.style.flexGrow="2",Nt.appendChild(Ot),St.appendChild(Nt),rt==="both"||rt==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Rt.style.marginRight="5px",St.appendChild(Rt)}Ie.typeBoxes.push(St)},Ie=this,_e=0;_e<4;_e++)tt(_e);return Ze},xe.prototype.setCurrentType=function(Me,Ze){var tt=this;this.currentType=Me,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings!==void 0?tt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},xe}(z),ot=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.arrowType="end",Ie.arrowBaseHeight=10,Ie.arrowBaseWidth=10,Ie.getArrowPoints=Ie.getArrowPoints.bind(Ie),Ie.setArrowType=Ie.setArrowType.bind(Ie),Ie.arrowTypePanel=new Ve("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.arrow1&&Me!==this.arrow2)},xe.prototype.getArrowPoints=function(Me,Ze){var tt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Me-tt/2+","+(Ze+Ie/2)+" "+Me+","+(Ze-Ie/2)+" "+(Me+tt/2)+","+(Ze+Ie/2)},xe.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ke.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",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Me=0;Math.abs(this.x1-this.x2)>.1&&(Me=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ze=this.arrow1.transform.baseVal.getItem(0);Ze.setRotate(Me,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ze,0);var tt=this.arrow2.transform.baseVal.getItem(0);tt.setRotate(Me+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(tt,0)}},xe.prototype.setArrowType=function(Me){this.arrowType=Me,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({arrowType:this.arrowType},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me);var Ze=Me;this.arrowType=Ze.arrowType,this.createTips(),this.adjustVisual()},xe.typeName="ArrowMarker",xe.title="Arrow marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',xe}(Re),st=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.fillColor=tt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new ee("Color",tt.defaultColorSet,tt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Dt(xe,Ke),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Ke.prototype.getState.call(this);return Me.typeName=xe.typeName,Me},xe.typeName="CoverMarker",xe.title="Cover marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',xe}(Pe),ct=function(Ke){function xe(Me,Ze,tt,Ie){var _e=Ke.call(this,Me,Ie||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return _e.opacities=[],_e.opacityBoxes=[],_e.opacities=Ze,_e.currentOpacity=tt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Dt(xe,Ke),xe.prototype.getUi=function(){var Me=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",Ze.style.justifyContent="space-between",this.opacities.forEach(function(tt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="center",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=tt===Me.currentOpacity?Me.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Me.setCurrentOpacity(tt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.innerText=100*tt+"%",Ie.appendChild(_e),Me.opacityBoxes.push(Ie)}),Ze},xe.prototype.setCurrentOpacity=function(Me,Ze){var tt=this;this.currentOpacity=Me,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?tt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},xe}(z),Pt=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=tt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=tt.defaultHighlightOpacity,Ie.fillPanel=new ee("Color",tt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new ct("Opacity",tt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Dt(xe,Ke),xe.prototype.setOpacity=function(Me){this.opacity=Me,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Ke.prototype.getState.call(this);return Me.typeName=xe.typeName,Me},xe.typeName="HighlightMarker",xe.title="Highlight marker",xe.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>',xe}(st),$e='<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>',nt='<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>',yt=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.bgColor="transparent",Ie.tipPosition={x:0,y:0},Ie.tipBase1Position={x:0,y:0},Ie.tipBase2Position={x:0,y:0},Ie.tipMoving=!1,Ie.color=tt.defaultStrokeColor,Ie.bgColor=tt.defaultFillColor,Ie.fontFamily=tt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setBgColor=Ie.setBgColor.bind(Ie),Ie.getTipPoints=Ie.getTipPoints.bind(Ie),Ie.positionTip=Ie.positionTip.bind(Ie),Ie.setTipPoints=Ie.setTipPoints.bind(Ie),Ie.colorPanel=new ee("Text color",tt.defaultColorSet,Ie.color,$e),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new ee("Fill color",tt.defaultColorSet,Ie.bgColor,nt),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new We("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.tipGrip=new le,Ie.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),Ie.controlBox.appendChild(Ie.tipGrip.visual),Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return Ke.prototype.ownsTarget.call(this,Me)||this.tipGrip.ownsTarget(Me)||this.tip===Me},xe.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},xe.prototype.pointerDown=function(Me,Ze){this.state==="new"&&Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ze)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ke.prototype.pointerDown.call(this,Me,Ze)},xe.prototype.pointerUp=function(Me){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ke.prototype.pointerUp.call(this,Me);else{var Ze=this.state==="creating";Ke.prototype.pointerUp.call(this,Me),this.setTipPoints(Ze),this.positionTip()}},xe.prototype.manipulate=function(Me){if(this.tipMoving){var Ze=this.unrotatePoint(Me);this.tipPosition={x:Ze.x-this.manipulationStartLeft,y:Ze.y-this.manipulationStartTop},this.positionTip()}else Ke.prototype.manipulate.call(this,Me)},xe.prototype.setBgColor=function(Me){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",Me]]),fe.setAttributes(this.tip,[["fill",Me]])),this.bgColor=Me,this.fillColorChanged(Me)},xe.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},xe.prototype.setTipPoints=function(Me){Me===void 0&&(Me=!1);var Ze=Math.min(this.height/2,15),tt=this.height/5;Me&&(this.tipPosition={x:Ze+tt/2,y:this.height+20});var Ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(tt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:0},this.tipBase2Position={x:Ze+tt,y:0}):(this.tipBase1Position={x:0,y:Ze},this.tipBase2Position={x:0,y:Ze+tt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(tt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-tt,y:0},this.tipBase2Position={x:this.width-Ze,y:0}):(this.tipBase1Position={x:this.width,y:Ze},this.tipBase2Position={x:this.width,y:Ze+tt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(tt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-tt,y:this.height},this.tipBase2Position={x:this.width-Ze,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ze-tt},this.tipBase2Position={x:this.width,y:this.height-Ze}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(tt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:this.height},this.tipBase2Position={x:Ze+tt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ze},this.tipBase2Position={x:0,y:this.height-Ze-tt})},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),this.positionTip()},xe.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Me=this.tipGrip.visual.transform.baseVal.getItem(0);Me.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Me,0)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.select=function(){this.positionTip(),Ke.prototype.select.call(this)},xe.prototype.getState=function(){var Me=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){var Ze=Me;this.bgColor=Ze.bgColor,this.tipPosition=Ze.tipPosition,Ke.prototype.restoreState.call(this,Me),this.createTip(),this.setTipPoints()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.tipPosition={x:this.tipPosition.x*Me,y:this.tipPosition.y*Ze},this.positionTip()},xe.typeName="CalloutMarker",xe.title="Callout marker",xe.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>',xe}(Ye),xt=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=tt.defaultColor,Ie.strokeWidth=tt.defaultStrokeWidth,Ie.strokeDasharray=tt.defaultStrokeDasharray,Ie.fillColor=tt.defaultFillColor,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.strokePanel=new ee("Line color",De(tt.defaultColorSet,["transparent"]),tt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(tt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new ct("Opacity",tt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},xe.prototype.manipulate=function(Me){Ke.prototype.manipulate.call(this,Me)},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),this.setSize()},xe.prototype.setSize=function(){Ke.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},xe.prototype.pointerUp=function(Me){Ke.prototype.pointerUp.call(this,Me),this.setSize()},xe.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Me),this.stateChanged()},xe.prototype.setFillColor=function(Me){this.fillColor=Me,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Me),this.stateChanged()},xe.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.setOpacity=function(Me){this.opacity=Me,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){var Ze=Me;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.opacity=Ze.opacity,this.createVisual(),Ke.prototype.restoreState.call(this,Me),this.setSize()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.setSize()},xe.typeName="EllipseMarker",xe.title="Ellipse marker",xe.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>',xe}(ge),wt=function(Ke){function xe(Me,Ze,tt){return Ke.call(this,Me,Ze,tt)||this}return Dt(xe,Ke),Object.defineProperty(xe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.tip1&&Me!==this.tip2)},xe.prototype.createTips=function(){this.tip1=fe.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(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.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(fe.createTransform()),this.visual.appendChild(this.tip2)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ke.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.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()]]),fe.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 Me=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ze=this.tip1.transform.baseVal.getItem(0);Ze.setRotate(Me,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ze,0);var tt=this.tip2.transform.baseVal.getItem(0);tt.setRotate(Me+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(tt,0)}},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Ke.prototype.getState.call(this);return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me),this.createTips(),this.adjustVisual()},xe.typeName="MeasurementMarker",xe.title="Measurement marker",xe.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>',xe}(Re),dt=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.strokePanel.colors=tt.defaultColorSet,Ie.fillColor="transparent",Ie}return Dt(xe,Ke),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Ke.prototype.getState.call(this);return Me.typeName=xe.typeName,Me},xe.typeName="EllipseFrameMarker",xe.title="Ellipse frame marker",xe.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>',xe}(xt),ft=function(){function Ke(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ke.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ke.prototype.addUndoStep=function(xe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(xe)||(this.undoStack.push(xe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(xe)&&this.redoStack.splice(0,this.redoStack.length))},Ke.prototype.replaceLastUndoStep=function(xe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=xe)},Ke.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ke.prototype.undo=function(){if(this.undoStack.length>1){var xe=this.undoStack.pop();return xe!==void 0&&this.redoStack.push(xe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ke.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ke}(),ut=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.curveX=0,Ie.curveY=0,Ie.manipulationStartCurveX=0,Ie.manipulationStartCurveY=0,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.positionGrips=Ie.positionGrips.bind(Ie),Ie.addControlGrips=Ie.addControlGrips.bind(Ie),Ie.adjustVisual=Ie.adjustVisual.bind(Ie),Ie.setupControlBox=Ie.setupControlBox.bind(Ie),Ie.resize=Ie.resize.bind(Ie),Ie.strokeColor=tt.defaultColor,Ie.strokeWidth=tt.defaultStrokeWidth,Ie.strokeDasharray=tt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",tt.defaultColorSet,tt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.selectorCurve&&Me!==this.visibleCurve&&!this.curveGrip.ownsTarget(Me))},xe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.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)},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Me.x,this.curveY=Me.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ze)&&(this.activeGrip=this.curveGrip,this._state="resize")},xe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setupControlBox=function(){Ke.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.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)},xe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ke.prototype.addControlGrips.call(this)},xe.prototype.positionGrips=function(){Ke.prototype.positionGrips.call(this);var Me=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Me/2,this.curveY-Me/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()))},xe.prototype.manipulate=function(Me){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Me.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Me.y-this.manipulationStartY),Ke.prototype.manipulate.call(this,Me)},xe.prototype.resize=function(Me){this.activeGrip===this.curveGrip&&(this.curveX=Me.x,this.curveY=Me.y),Ke.prototype.resize.call(this,Me),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},xe.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.adjustVisual(),this.colorChanged(Me)},xe.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.adjustVisual()},xe.prototype.scale=function(Me,Ze){this.curveX=this.curveX*Me,this.curveY=this.curveY*Ze,Ke.prototype.scale.call(this,Me,Ze)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ke.prototype.getState.call(this));return Me.typeName=xe.typeName,Me},xe.prototype.restoreState=function(Me){Ke.prototype.restoreState.call(this,Me);var Ze=Me;this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.curveX=Ze.curveX,this.curveY=Ze.curveY,this.createVisual(),this.adjustVisual()},xe.typeName="CurveMarker",xe.title="Curve marker",xe.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>',xe}(Ae),Et=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,Ze,tt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.textColor="transparent",Ie.fontSize="1rem",Ie.isMoved=!1,Ie.captionText="Caption",Ie.PADDING=5,Ie.captionBoxWidth=0,Ie.captionBoxHeight=0,Ie.strokeColor=tt.defaultColor,Ie.strokeWidth=tt.defaultStrokeWidth,Ie.strokeDasharray=tt.defaultStrokeDasharray,Ie.fillColor=tt.defaultFillColor,Ie.textColor=tt.defaultStrokeColor,Ie.fontFamily=tt.defaultFontFamily,Ie.fontSize=tt.defaultCaptionFontSize,Ie.captionText=tt.defaultCaptionText,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.sizeCaption=Ie.sizeCaption.bind(Ie),Ie.setCaptionText=Ie.setCaptionText.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.finishTextEditing=Ie.finishTextEditing.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.setTextColor=Ie.setTextColor.bind(Ie),Ie.strokePanel=new ee("Line color",De(tt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(tt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",tt.defaultStrokeWidths,tt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",tt.defaultStrokeDasharrays,tt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new We("Font",tt.defaultFontFamilies,tt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new ee("Text color",tt.defaultColorSet,Ie.textColor,$e),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Dt(xe,Ke),xe.prototype.ownsTarget=function(Me){return!(!Ke.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.frame&&Me!==this.captionBg&&Me!==this.captionElement)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=fe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=fe.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=fe.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()},xe.prototype.setCaptionText=function(Me){this.captionText=Me,this.captionElement.textContent=this.captionText,this.sizeCaption()},xe.prototype.pointerDown=function(Me,Ze){Ke.prototype.pointerDown.call(this,Me,Ze),this.isMoved=!1,this.pointerDownPoint=Me,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},xe.prototype.manipulate=function(Me){Ke.prototype.manipulate.call(this,Me),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Me.x-this.pointerDownPoint.x)>5||Math.abs(Me.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Me){Ke.prototype.resize.call(this,Me),this.setSize()},xe.prototype.sizeCaption=function(){var Me=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Me.width+2*this.PADDING,this.captionBoxHeight=Me.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),fe.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')"]]),fe.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')"]])},xe.prototype.showTextEditor=function(){var Me=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(Ze){Ze.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ze){Ze.key==="Enter"&&Me.finishTextEditing(Me.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ze){Ze.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Me.finishTextEditing(Me.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Me.finishTextEditing(Me.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},xe.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"))},xe.prototype.finishTextEditing=function(Me){this.setCaptionText(Me.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},xe.prototype.setFont=function(Me){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",Me]]),this.fontFamily=Me,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},xe.prototype.setTextColor=function(Me){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",Me]]),this.textColor=Me,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},xe.prototype.setSize=function(){Ke.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},xe.prototype.pointerUp=function(Me){Ke.prototype.pointerUp.call(this,Me),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.dblClick=function(Me,Ze){Ke.prototype.dblClick.call(this,Me,Ze),this.showTextEditor()},xe.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Me),this.stateChanged()},xe.prototype.setFillColor=function(Me){this.fillColor=Me,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Me),this.stateChanged()},xe.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Me=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},Ke.prototype.getState.call(this));return Me.typeName=this.typeName,Me},xe.prototype.restoreState=function(Me){var Ze=Me;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.textColor=Ze.textColor,this.fontFamily=Ze.fontFamily,this.captionText=Ze.captionText,this.fontSize=Ze.fontSize,this.createVisual(),Ke.prototype.restoreState.call(this,Me),this.setSize()},xe.prototype.scale=function(Me,Ze){Ke.prototype.scale.call(this,Me,Ze),this.setSize()},xe.typeName="CaptionFrameMarker",xe.title="Caption frame marker",xe.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>',xe}(ge),mt=function(){function Ke(xe,Me){Me===void 0&&(Me=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=xe,this.cancelable=Me}return Object.defineProperty(Ke.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ke.prototype.preventDefault=function(){this._defaultPrevented=!0},Ke}(),vt=function(Ke){function xe(Me,Ze,tt){var Ie=Ke.call(this,Me,!1)||this;return Ie.dataUrl=Ze,Ie.state=tt,Ie}return Dt(xe,Ke),xe}(mt),kt=function(Ke){function xe(Me,Ze,tt){tt===void 0&&(tt=!1);var Ie=Ke.call(this,Me,tt)||this;return Ie.marker=Ze,Ie}return Dt(xe,Ke),xe}(mt),pt=function(){function Ke(){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 Ke.prototype.addEventListener=function(xe,Me){this[xe].push(Me)},Ke.prototype.removeEventListener=function(xe,Me){var Ze=this[xe].indexOf(Me);Ze>-1&&this[xe].splice(Ze,1)},Ke}(),Qe=function(){function Ke(xe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new ft,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 pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ke.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=xe,this.targetRoot=document.body,this.width=xe.clientWidth,this.height=xe.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(Ke.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,dt,xt,Pt,yt,wt,st,Re,ut,Et]},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,xt,Pt,yt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,Pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(xe){var Me=this;this._availableMarkerTypes.splice(0),xe.forEach(function(Ze){if(typeof Ze=="string"){var tt=Me.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===Ze});tt!==void 0&&Me._availableMarkerTypes.push(tt)}else Me._availableMarkerTypes.push(Ze)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(xe){this._zoomLevel=xe,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(Ke.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ke.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ke.prototype.show=function(){var xe=this;this.styles.styleSheetRoot===void 0&&Ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Me){return Me(new mt(xe))})},Ke.prototype.render=function(){return oe(this,void 0,void 0,function(){var xe;return ze(this,function(Me){switch(Me.label){case 0:return this.setCurrentMarker(),(xe=new ke).naturalSize=this.renderAtNaturalSize,xe.imageType=this.renderImageType,xe.imageQuality=this.renderImageQuality,xe.markersOnly=this.renderMarkersOnly,xe.width=this.renderWidth,xe.height=this.renderHeight,[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Me.sent(),[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Me.sent()]}})})},Ke.prototype.close=function(xe){var Me=this;if(xe===void 0&&(xe=!1),this.isOpen){var Ze=!1;xe||this.eventListeners.beforeclose.forEach(function(tt){var Ie=new mt(Me,!0);tt(Ie),Ie.defaultPrevented&&(Ze=!0)}),Ze||(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(tt){return tt(new mt(Me))}),this.detachEvents(),this._isOpen=!1)}},Ke.prototype.addMarkersToToolbar=function(){for(var xe,Me=[],Ze=0;Ze<arguments.length;Ze++)Me[Ze]=arguments[Ze];(xe=this._availableMarkerTypes).push.apply(xe,Me)},Ke.prototype.addRenderEventListener=function(xe){this.addEventListener("render",function(Me){xe(Me.dataUrl,Me.state)})},Ke.prototype.removeRenderEventListener=function(xe){},Ke.prototype.addCloseEventListener=function(xe){this.addEventListener("close",function(){xe()})},Ke.prototype.removeCloseEventListener=function(xe){},Ke.prototype.setupResizeObserver=function(){var xe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){xe.resize(xe.target.clientWidth,xe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return xe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ke.prototype.onPopupTargetResize=function(){var xe=1*this.target.clientWidth/this.target.clientHeight,Me=this.editorCanvas.clientWidth/xe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*xe:this.editorCanvas.clientWidth,Ze=Me<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/xe;this.resize(Me,Ze)},Ke.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ke.prototype.resize=function(xe,Me){this._isResizing=!0;var Ze=xe/this.imageWidth,tt=Me/this.imageHeight;this.imageWidth=Math.round(xe),this.imageHeight=Math.round(Me),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(Ze,tt),this._isResizing=!1},Ke.prototype.scaleMarkers=function(xe,Me){var Ze,tt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(xe,Me):(Ze=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==tt._currentMarker&&Ie.scale(xe,Me)}),Ze!==void 0&&this.setCurrentMarker(Ze)},Ke.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"},Ke.prototype.setTopLeft=function(){var xe=this.editingTarget.getBoundingClientRect(),Me=this.editorCanvas.getBoundingClientRect();this.left=xe.left-Me.left,this.top=xe.top-Me.top},Ke.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)},Ke.prototype.addDefs=function(){for(var xe,Me=[],Ze=0;Ze<arguments.length;Ze++)Me[Ze]=arguments[Ze];this.defs=fe.createDefs(),this.addDefsToImage(),(xe=this.defs).append.apply(xe,Me)},Ke.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ke.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)},Ke.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ke.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ke.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)},Ke.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ke.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)},Ke.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 xe=document.createElement("a");xe.href="https://markerjs.com/",xe.target="_blank",xe.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>',xe.title="Powered by marker.js",xe.style.display="grid",xe.style.alignItems="center",xe.style.justifyItems="center",xe.style.padding="3px",xe.style.width="20px",xe.style.height="20px",this.logoUI.appendChild(xe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ke.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")},Ke.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"},Ke.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ke.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 xe=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=xe+"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 we(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 de(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ke.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ke.prototype.removeMarker=function(xe){this.markerImage.removeChild(xe.container),this.markers.indexOf(xe)>-1&&this.markers.splice(this.markers.indexOf(xe),1),xe.dispose()},Ke.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())},Ke.prototype.toolbarButtonClicked=function(xe,Me){if(xe==="marker"&&Me!==void 0)this.createNewMarker(Me);else if(xe==="action")switch(Me){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()}},Ke.prototype.deleteSelectedMarker=function(){var xe=this;if(this._currentMarker!==void 0){var Me=!1;if(this.eventListeners.markerbeforedelete.forEach(function(tt){var Ie=new kt(xe,xe._currentMarker,!0);tt(Ie),Ie.defaultPrevented&&(Me=!0)}),!Me){var Ze=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(tt){return tt(new kt(xe,Ze))})}}},Ke.prototype.clear=function(){var xe=this,Me=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var He=new kt(xe,void 0,!0);_e(He),He.defaultPrevented&&(Me=!0)}),!Me)){this.setCurrentMarker();for(var Ze=function(_e){var He=tt.markers[_e];tt.setCurrentMarker(tt.markers[_e]),tt._currentMarker.dispose(),tt.markerImage.removeChild(tt._currentMarker.container),tt.markers.splice(tt.markers.indexOf(tt._currentMarker),1),tt.eventListeners.markerdelete.forEach(function(rt){return rt(new kt(xe,He))})},tt=this,Ie=this.markers.length-1;Ie>=0;Ie--)Ze(Ie);this.addUndoStep()}},Object.defineProperty(Ke.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ke.prototype.showNotesEditor=function(){var xe;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=(xe=this._currentMarker.notes)!==null&&xe!==void 0?xe:"",this.overlayContainer.appendChild(this.notesArea))},Ke.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)},Ke.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ke.prototype.addUndoStep=function(){var xe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Me=this.getState(),Ze=this.undoRedoManager.getLastUndoStep();if(!Ze||Ze.width===Me.width&&Ze.height===Me.height){var tt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Me),tt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new mt(xe))})}else this.undoRedoManager.replaceLastUndoStep(Me),this.eventListeners.statechange.forEach(function(Ie){return Ie(new mt(xe))})}},Ke.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ke.prototype.undoStep=function(){var xe=this,Me=this.undoRedoManager.undo();Me!==void 0&&(this.restoreState(Me),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new mt(xe))}))},Ke.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ke.prototype.redoStep=function(){var xe=this,Me=this.undoRedoManager.redo();Me!==void 0&&(this.restoreState(Me),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new mt(xe))}))},Ke.prototype.stepZoom=function(){var xe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=xe<this.zoomSteps.length-1?this.zoomSteps[xe+1]:this.zoomSteps[0]},Ke.prototype.panTo=function(xe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-xe.x,top:this.prevPanPoint.y-xe.y}),this.prevPanPoint=xe},Ke.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var xe,Me,Ze=this;return ze(this,function(tt){switch(tt.label){case 0:return[4,this.render()];case 1:return xe=tt.sent(),Me=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new vt(Ze,xe,Me))}),this.close(!0),[2]}})})},Ke.prototype.getState=function(xe){xe===!0&&this.setCurrentMarker();var Me={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ze){return Me.markers.push(Ze.getState())}),Me},Ke.prototype.restoreState=function(xe){var Me=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);xe.markers.forEach(function(Ze){var tt=Me._availableMarkerTypes.find(function(_e){return _e.typeName===Ze.typeName});if(tt!==void 0){var Ie=Me.addNewMarker(tt);Ie.restoreState(Ze),Me.markers.push(Ie)}}),xe.width&&xe.height&&(xe.width!==this.imageWidth||xe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/xe.width,this.imageHeight/xe.height),this.eventListeners.restorestate.forEach(function(Ze){return Ze(new mt(Me))})},Ke.prototype.addNewMarker=function(xe){var Me=fe.createGroup();return this.markerImage.appendChild(Me),new xe(Me,this.overlayContainer,this.settings)},Ke.prototype.createNewMarker=function(xe){var Me,Ze=this;(Me=typeof xe=="string"?this._availableMarkerTypes.find(function(tt){return tt.typeName===xe}):xe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Me),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(Me.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(tt){return tt(new kt(Ze,Ze._currentMarker))}))},Ke.prototype.markerCreated=function(xe){var Me=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(xe),this.setCurrentMarker(xe),xe instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ze){return Ze(new kt(Me,Me._currentMarker))})},Ke.prototype.colorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=xe,this.settings.defaultStrokeColor=xe)},Ke.prototype.fillColorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=xe)},Ke.prototype.markerStateChanged=function(xe){var Me=this;this.eventListeners.markerchange.forEach(function(Ze){return Ze(new kt(Me,xe))})},Ke.prototype.setCurrentMarker=function(xe){var Me=this;this._currentMarker!==xe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ze){return Ze(new kt(Me,Me._currentMarker))})),this._currentMarker=xe,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(Ze){return Ze(new kt(Me,Me._currentMarker))}))},Ke.prototype.onPointerDown=function(xe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||xe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Me=this.markers.find(function(Ze){return Ze.ownsTarget(xe.target)});Me!==void 0?(this.setCurrentMarker(Me),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:xe.clientX,y:xe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY))},Ke.prototype.onDblClick=function(xe){if(this._isFocused||this.focus(),this.mode==="select"){var Me=this.markers.find(function(Ze){return Ze.ownsTarget(xe.target)});Me!==void 0&&Me!==this._currentMarker&&this.setCurrentMarker(Me),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target):this.setCurrentMarker()}},Ke.prototype.onPointerMove=function(xe){this.touchPoints!==1&&xe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||xe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(xe.clientX,xe.clientY)):this.zoomLevel>1&&this.panTo({x:xe.clientX,y:xe.clientY}))},Ke.prototype.onPointerUp=function(xe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(xe.clientX,xe.clientY)),this.isDragging=!1,this.addUndoStep()},Ke.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ke.prototype.onKeyUp=function(xe){this._currentMarker===void 0||this.notesArea!==void 0||xe.key!=="Delete"&&xe.key!=="Backspace"||this.deleteSelectedMarker()},Ke.prototype.clientToLocalCoordinates=function(xe,Me){var Ze=this.markerImage.getBoundingClientRect();return{x:(xe-Ze.left)/this.zoomLevel,y:(Me-Ze.top)/this.zoomLevel}},Ke.prototype.onWindowResize=function(){this.positionUI()},Ke.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var xe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=xe+"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()},Ke.prototype.addLicenseKey=function(xe){me.addKey(xe)},Ke.prototype.addEventListener=function(xe,Me){this.eventListeners.addEventListener(xe,Me)},Ke.prototype.removeEventListener=function(xe,Me){this.eventListeners.removeEventListener(xe,Me)},Ke.prototype.renderState=function(xe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(xe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ke.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ke.prototype.focus=function(){var xe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Me){return Me(new mt(xe))}))},Ke.prototype.blur=function(){var xe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Me){return Me(new mt(xe))}))},Ke.instanceCounter=0,Ke}()},98535:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{Panel:function(){return Ue},default:function(){return Ye}});var ht=at(67711),Dt=at(15142),oe=at(16886),ze=at(26420),De=at(92310),fe=at.n(De),me=at(18929),ke=at(48736),Ce=at(59301),Se=at(33346),Le=at(11592),ve=at(98506),we=at(52873),de=at(77900),z=at(10228),ee=Ce.forwardRef(function(Ve,ot){var st=Ve.prefixCls,ct=Ve.forceRender,Pt=Ve.className,$e=Ve.style,nt=Ve.children,yt=Ve.isActive,xt=Ve.role,wt=Ve.classNames,dt=Ve.styles,ft=Ce.useState(yt||ct),ut=(0,oe.Z)(ft,2),Et=ut[0],mt=ut[1];return Ce.useEffect(function(){(ct||yt)&&mt(!0)},[ct,yt]),Et?Ce.createElement("div",{ref:ot,className:fe()("".concat(st,"-content"),(0,we.Z)((0,we.Z)({},"".concat(st,"-content-active"),yt),"".concat(st,"-content-inactive"),!yt),Pt),style:$e,role:xt},Ce.createElement("div",{className:fe()("".concat(st,"-content-box"),wt==null?void 0:wt.body),style:dt==null?void 0:dt.body},nt)):null});ee.displayName="PanelContent";var ae=ee,ie=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=Ce.forwardRef(function(Ve,ot){var st=Ve.showArrow,ct=st===void 0?!0:st,Pt=Ve.headerClass,$e=Ve.isActive,nt=Ve.onItemClick,yt=Ve.forceRender,xt=Ve.className,wt=Ve.classNames,dt=wt===void 0?{}:wt,ft=Ve.styles,ut=ft===void 0?{}:ft,Et=Ve.prefixCls,mt=Ve.collapsible,vt=Ve.accordion,kt=Ve.panelKey,pt=Ve.extra,Qe=Ve.header,Ke=Ve.expandIcon,xe=Ve.openMotion,Me=Ve.destroyInactivePanel,Ze=Ve.children,tt=(0,Se.Z)(Ve,ie),Ie=mt==="disabled",_e=pt!=null&&typeof pt!="boolean",He=(0,we.Z)((0,we.Z)((0,we.Z)({onClick:function(){nt==null||nt(kt)},onKeyDown:function($t){($t.key==="Enter"||$t.keyCode===z.Z.ENTER||$t.which===z.Z.ENTER)&&(nt==null||nt(kt))},role:vt?"tab":"button"},"aria-expanded",$e),"aria-disabled",Ie),"tabIndex",Ie?-1:0),rt=typeof Ke=="function"?Ke(Ve):Ce.createElement("i",{className:"arrow"}),St=rt&&Ce.createElement("div",(0,ht.Z)({className:"".concat(Et,"-expand-icon")},["header","icon"].includes(mt)?He:{}),rt),Ct=fe()("".concat(Et,"-item"),(0,we.Z)((0,we.Z)({},"".concat(Et,"-item-active"),$e),"".concat(Et,"-item-disabled"),Ie),xt),Nt=fe()(Pt,"".concat(Et,"-header"),(0,we.Z)({},"".concat(Et,"-collapsible-").concat(mt),!!mt),dt.header),Ot=(0,ve.Z)({className:Nt,style:ut.header},["header","icon"].includes(mt)?{}:He);return Ce.createElement("div",(0,ht.Z)({},tt,{ref:ot,className:Ct}),Ce.createElement("div",Ot,ct&&St,Ce.createElement("span",(0,ht.Z)({className:"".concat(Et,"-header-text")},mt==="header"?He:{}),Qe),_e&&Ce.createElement("div",{className:"".concat(Et,"-extra")},pt)),Ce.createElement(de.default,(0,ht.Z)({visible:$e,leavedClassName:"".concat(Et,"-content-hidden")},xe,{forceRender:yt,removeOnLeave:Me}),function(Rt,$t){var qt=Rt.className,rn=Rt.style;return Ce.createElement(ae,{ref:$t,prefixCls:Et,className:qt,classNames:dt,style:rn,styles:ut,isActive:$e,forceRender:yt,role:vt?"tabpanel":void 0},Ze)}))}),ue=le,ge=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pe=function(ot,st){var ct=st.prefixCls,Pt=st.accordion,$e=st.collapsible,nt=st.destroyInactivePanel,yt=st.onItemClick,xt=st.activeKey,wt=st.openMotion,dt=st.expandIcon;return ot.map(function(ft,ut){var Et=ft.children,mt=ft.label,vt=ft.key,kt=ft.collapsible,pt=ft.onItemClick,Qe=ft.destroyInactivePanel,Ke=(0,Se.Z)(ft,ge),xe=String(vt!=null?vt:ut),Me=kt!=null?kt:$e,Ze=Qe!=null?Qe:nt,tt=function(He){Me!=="disabled"&&(yt(He),pt==null||pt(He))},Ie=!1;return Pt?Ie=xt[0]===xe:Ie=xt.indexOf(xe)>-1,Ce.createElement(ue,(0,ht.Z)({},Ke,{prefixCls:ct,key:xe,panelKey:xe,isActive:Ie,accordion:Pt,openMotion:wt,expandIcon:dt,header:mt,collapsible:Me,onItemClick:tt,destroyInactivePanel:Ze}),Et)})},je=function(ot,st,ct){if(!ot)return null;var Pt=ct.prefixCls,$e=ct.accordion,nt=ct.collapsible,yt=ct.destroyInactivePanel,xt=ct.onItemClick,wt=ct.activeKey,dt=ct.openMotion,ft=ct.expandIcon,ut=ot.key||String(st),Et=ot.props,mt=Et.header,vt=Et.headerClass,kt=Et.destroyInactivePanel,pt=Et.collapsible,Qe=Et.onItemClick,Ke=!1;$e?Ke=wt[0]===ut:Ke=wt.indexOf(ut)>-1;var xe=pt!=null?pt:nt,Me=function(Ie){xe!=="disabled"&&(xt(Ie),Qe==null||Qe(Ie))},Ze={key:ut,panelKey:ut,header:mt,headerClass:vt,isActive:Ke,prefixCls:Pt,destroyInactivePanel:kt!=null?kt:yt,openMotion:dt,accordion:$e,children:ot.props.children,onItemClick:Me,expandIcon:ft,collapsible:xe};return typeof ot.type=="string"?ot:(Object.keys(Ze).forEach(function(tt){typeof Ze[tt]=="undefined"&&delete Ze[tt]}),Ce.cloneElement(ot,Ze))};function Be(Ve,ot,st){return Array.isArray(Ve)?Pe(Ve,st):(0,Le.Z)(ot).map(function(ct,Pt){return je(ct,Pt,st)})}var Fe=Be,Ne=at(26112);function Ae(Ve){var ot=Ve;if(!Array.isArray(ot)){var st=(0,ze.Z)(ot);ot=st==="number"||st==="string"?[ot]:[]}return ot.map(function(ct){return String(ct)})}var Re=Ce.forwardRef(function(Ve,ot){var st=Ve.prefixCls,ct=st===void 0?"rc-collapse":st,Pt=Ve.destroyInactivePanel,$e=Pt===void 0?!1:Pt,nt=Ve.style,yt=Ve.accordion,xt=Ve.className,wt=Ve.children,dt=Ve.collapsible,ft=Ve.openMotion,ut=Ve.expandIcon,Et=Ve.activeKey,mt=Ve.defaultActiveKey,vt=Ve.onChange,kt=Ve.items,pt=fe()(ct,xt),Qe=(0,me.Z)([],{value:Et,onChange:function(_e){return vt==null?void 0:vt(_e)},defaultValue:mt,postState:Ae}),Ke=(0,oe.Z)(Qe,2),xe=Ke[0],Me=Ke[1],Ze=function(_e){return Me(function(){if(yt)return xe[0]===_e?[]:[_e];var He=xe.indexOf(_e),rt=He>-1;return rt?xe.filter(function(St){return St!==_e}):[].concat((0,Dt.Z)(xe),[_e])})};(0,ke.ZP)(!wt,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var tt=Fe(kt,wt,{prefixCls:ct,accordion:yt,openMotion:ft,expandIcon:ut,collapsible:dt,destroyInactivePanel:$e,onItemClick:Ze,activeKey:xe});return Ce.createElement("div",(0,ht.Z)({ref:ot,className:pt,style:nt,role:yt?"tablist":void 0},(0,Ne.Z)(Ve,{aria:!0,data:!0})),tt)}),We=Object.assign(Re,{Panel:ue}),Ye=We,Ue=We.Panel},66042:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Ye}});var ht=at(98506),Dt=at(16886),oe=at(43403),ze=at(34280),De=at(59301),fe=De.createContext(null),me=De.createContext({}),ke=fe,Ce=at(52873),Se=at(67711),Le=at(92310),ve=at.n(Le),we=at(77900),de=at(10228),z=at(26112),ee=at(33346),ae=at(8654),ie=["prefixCls","className","containerRef"],le=function(Ve){var ot=Ve.prefixCls,st=Ve.className,ct=Ve.containerRef,Pt=(0,ee.Z)(Ve,ie),$e=De.useContext(me),nt=$e.panel,yt=(0,ae.x1)(nt,ct);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(ot,"-content"),st),role:"dialog",ref:yt},(0,z.Z)(Ve,{aria:!0}),{"aria-modal":"true"},Pt))},ue=le,ge=at(48736);function Pe(Ue){return typeof Ue=="string"&&String(Number(Ue))===Ue?((0,ge.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ue)):Ue}function je(Ue){warning(!("wrapperClassName"in Ue),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ue.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Be={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Fe(Ue,Ve){var ot,st,ct,Pt=Ue.prefixCls,$e=Ue.open,nt=Ue.placement,yt=Ue.inline,xt=Ue.push,wt=Ue.forceRender,dt=Ue.autoFocus,ft=Ue.keyboard,ut=Ue.classNames,Et=Ue.rootClassName,mt=Ue.rootStyle,vt=Ue.zIndex,kt=Ue.className,pt=Ue.id,Qe=Ue.style,Ke=Ue.motion,xe=Ue.width,Me=Ue.height,Ze=Ue.children,tt=Ue.mask,Ie=Ue.maskClosable,_e=Ue.maskMotion,He=Ue.maskClassName,rt=Ue.maskStyle,St=Ue.afterOpenChange,Ct=Ue.onClose,Nt=Ue.onMouseEnter,Ot=Ue.onMouseOver,Rt=Ue.onMouseLeave,$t=Ue.onClick,qt=Ue.onKeyDown,rn=Ue.onKeyUp,Ht=Ue.styles,sn=Ue.drawerRender,tn=De.useRef(),Ut=De.useRef(),En=De.useRef();De.useImperativeHandle(Ve,function(){return tn.current});var bn=function(dr){var Ai=dr.keyCode,lr=dr.shiftKey;switch(Ai){case de.Z.TAB:{if(Ai===de.Z.TAB){if(!lr&&document.activeElement===En.current){var yr;(yr=Ut.current)===null||yr===void 0||yr.focus({preventScroll:!0})}else if(lr&&document.activeElement===Ut.current){var Lr;(Lr=En.current)===null||Lr===void 0||Lr.focus({preventScroll:!0})}}break}case de.Z.ESC:{Ct&&ft&&(dr.stopPropagation(),Ct(dr));break}}};De.useEffect(function(){if($e&&dt){var jr;(jr=tn.current)===null||jr===void 0||jr.focus({preventScroll:!0})}},[$e]);var Dn=De.useState(!1),Qn=(0,Dt.Z)(Dn,2),Pr=Qn[0],Yn=Qn[1],Mr=De.useContext(ke),Ur;typeof xt=="boolean"?Ur=xt?{}:{distance:0}:Ur=xt||{};var _r=(ot=(st=(ct=Ur)===null||ct===void 0?void 0:ct.distance)!==null&&st!==void 0?st:Mr==null?void 0:Mr.pushDistance)!==null&&ot!==void 0?ot:180,ni=De.useMemo(function(){return{pushDistance:_r,push:function(){Yn(!0)},pull:function(){Yn(!1)}}},[_r]);De.useEffect(function(){if($e){var jr;Mr==null||(jr=Mr.push)===null||jr===void 0||jr.call(Mr)}else{var dr;Mr==null||(dr=Mr.pull)===null||dr===void 0||dr.call(Mr)}},[$e]),De.useEffect(function(){return function(){var jr;Mr==null||(jr=Mr.pull)===null||jr===void 0||jr.call(Mr)}},[]);var Li=tt&&De.createElement(we.default,(0,Se.Z)({key:"mask"},_e,{visible:$e}),function(jr,dr){var Ai=jr.className,lr=jr.style;return De.createElement("div",{className:ve()("".concat(Pt,"-mask"),Ai,ut==null?void 0:ut.mask,He),style:(0,ht.Z)((0,ht.Z)((0,ht.Z)({},lr),rt),Ht==null?void 0:Ht.mask),onClick:Ie&&$e?Ct:void 0,ref:dr})}),_i=typeof Ke=="function"?Ke(nt):Ke,Di={};if(Pr&&_r)switch(nt){case"top":Di.transform="translateY(".concat(_r,"px)");break;case"bottom":Di.transform="translateY(".concat(-_r,"px)");break;case"left":Di.transform="translateX(".concat(_r,"px)");break;default:Di.transform="translateX(".concat(-_r,"px)");break}nt==="left"||nt==="right"?Di.width=Pe(xe):Di.height=Pe(Me);var ui={onMouseEnter:Nt,onMouseOver:Ot,onMouseLeave:Rt,onClick:$t,onKeyDown:qt,onKeyUp:rn},Wi=De.createElement(we.default,(0,Se.Z)({key:"panel"},_i,{visible:$e,forceRender:wt,onVisibleChanged:function(dr){St==null||St(dr)},removeOnLeave:!1,leavedClassName:"".concat(Pt,"-content-wrapper-hidden")}),function(jr,dr){var Ai=jr.className,lr=jr.style,yr=De.createElement(ue,(0,Se.Z)({id:pt,containerRef:dr,prefixCls:Pt,className:ve()(kt,ut==null?void 0:ut.content),style:(0,ht.Z)((0,ht.Z)({},Qe),Ht==null?void 0:Ht.content)},(0,z.Z)(Ue,{aria:!0}),ui),Ze);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(Pt,"-content-wrapper"),ut==null?void 0:ut.wrapper,Ai),style:(0,ht.Z)((0,ht.Z)((0,ht.Z)({},Di),lr),Ht==null?void 0:Ht.wrapper)},(0,z.Z)(Ue,{data:!0})),sn?sn(yr):yr)}),et=(0,ht.Z)({},mt);return vt&&(et.zIndex=vt),De.createElement(ke.Provider,{value:ni},De.createElement("div",{className:ve()(Pt,"".concat(Pt,"-").concat(nt),Et,(0,Ce.Z)((0,Ce.Z)({},"".concat(Pt,"-open"),$e),"".concat(Pt,"-inline"),yt)),style:et,tabIndex:-1,ref:tn,onKeyDown:bn},Li,De.createElement("div",{tabIndex:0,ref:Ut,style:Be,"aria-hidden":"true","data-sentinel":"start"}),Wi,De.createElement("div",{tabIndex:0,ref:En,style:Be,"aria-hidden":"true","data-sentinel":"end"})))}var Ne=De.forwardRef(Fe),Ae=Ne,Re=function(Ve){var ot=Ve.open,st=ot===void 0?!1:ot,ct=Ve.prefixCls,Pt=ct===void 0?"rc-drawer":ct,$e=Ve.placement,nt=$e===void 0?"right":$e,yt=Ve.autoFocus,xt=yt===void 0?!0:yt,wt=Ve.keyboard,dt=wt===void 0?!0:wt,ft=Ve.width,ut=ft===void 0?378:ft,Et=Ve.mask,mt=Et===void 0?!0:Et,vt=Ve.maskClosable,kt=vt===void 0?!0:vt,pt=Ve.getContainer,Qe=Ve.forceRender,Ke=Ve.afterOpenChange,xe=Ve.destroyOnClose,Me=Ve.onMouseEnter,Ze=Ve.onMouseOver,tt=Ve.onMouseLeave,Ie=Ve.onClick,_e=Ve.onKeyDown,He=Ve.onKeyUp,rt=Ve.panelRef,St=De.useState(!1),Ct=(0,Dt.Z)(St,2),Nt=Ct[0],Ot=Ct[1],Rt=De.useState(!1),$t=(0,Dt.Z)(Rt,2),qt=$t[0],rn=$t[1];(0,ze.Z)(function(){rn(!0)},[]);var Ht=qt?st:!1,sn=De.useRef(),tn=De.useRef();(0,ze.Z)(function(){Ht&&(tn.current=document.activeElement)},[Ht]);var Ut=function(Pr){var Yn;if(Ot(Pr),Ke==null||Ke(Pr),!Pr&&tn.current&&!((Yn=sn.current)!==null&&Yn!==void 0&&Yn.contains(tn.current))){var Mr;(Mr=tn.current)===null||Mr===void 0||Mr.focus({preventScroll:!0})}},En=De.useMemo(function(){return{panel:rt}},[rt]);if(!Qe&&!Nt&&!Ht&&xe)return null;var bn={onMouseEnter:Me,onMouseOver:Ze,onMouseLeave:tt,onClick:Ie,onKeyDown:_e,onKeyUp:He},Dn=(0,ht.Z)((0,ht.Z)({},Ve),{},{open:Ht,prefixCls:Pt,placement:nt,autoFocus:xt,keyboard:dt,width:ut,mask:mt,maskClosable:kt,inline:pt===!1,afterOpenChange:Ut,ref:sn},bn);return De.createElement(me.Provider,{value:En},De.createElement(oe.Z,{open:Ht||Qe||Nt,autoDestroy:!1,getContainer:pt,autoLock:mt&&(Ht||Nt)},De.createElement(Ae,Dn)))},We=Re,Ye=We},23425:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Be}});var ht=at(52873),Dt=at(67711),oe=at(26420),ze=at(98506),De=at(16886),fe=at(92310),me=at.n(fe),ke=at(18929),Ce=at(10228),Se=at(26112),Le=at(48736),ve=at(59301),we=at(17119),de=[10,20,50,100],z=function(Ne){var Ae=Ne.pageSizeOptions,Re=Ae===void 0?de:Ae,We=Ne.locale,Ye=Ne.changeSize,Ue=Ne.pageSize,Ve=Ne.goButton,ot=Ne.quickGo,st=Ne.rootPrefixCls,ct=Ne.disabled,Pt=Ne.buildOptionText,$e=Ne.showSizeChanger,nt=Ne.sizeChangerRender,yt=ve.useState(""),xt=(0,De.Z)(yt,2),wt=xt[0],dt=xt[1],ft=function(){return!wt||Number.isNaN(wt)?void 0:Number(wt)},ut=typeof Pt=="function"?Pt:function(Me){return"".concat(Me," ").concat(We.items_per_page)},Et=function(Ze){dt(Ze.target.value)},mt=function(Ze){Ve||wt===""||(dt(""),!(Ze.relatedTarget&&(Ze.relatedTarget.className.indexOf("".concat(st,"-item-link"))>=0||Ze.relatedTarget.className.indexOf("".concat(st,"-item"))>=0))&&(ot==null||ot(ft())))},vt=function(Ze){wt!==""&&(Ze.keyCode===Ce.Z.ENTER||Ze.type==="click")&&(dt(""),ot==null||ot(ft()))},kt=function(){return Re.some(function(Ze){return Ze.toString()===Ue.toString()})?Re:Re.concat([Ue]).sort(function(Ze,tt){var Ie=Number.isNaN(Number(Ze))?0:Number(Ze),_e=Number.isNaN(Number(tt))?0:Number(tt);return Ie-_e})},pt="".concat(st,"-options");if(!$e&&!ot)return null;var Qe=null,Ke=null,xe=null;return $e&&nt&&(Qe=nt({disabled:ct,size:Ue,onSizeChange:function(Ze){Ye==null||Ye(Number(Ze))},"aria-label":We.page_size,className:"".concat(pt,"-size-changer"),options:kt().map(function(Me){return{label:ut(Me),value:Me}})})),ot&&(Ve&&(xe=typeof Ve=="boolean"?ve.createElement("button",{type:"button",onClick:vt,onKeyUp:vt,disabled:ct,className:"".concat(pt,"-quick-jumper-button")},We.jump_to_confirm):ve.createElement("span",{onClick:vt,onKeyUp:vt},Ve)),Ke=ve.createElement("div",{className:"".concat(pt,"-quick-jumper")},We.jump_to,ve.createElement("input",{disabled:ct,type:"text",value:wt,onChange:Et,onKeyUp:vt,onBlur:mt,"aria-label":We.page}),We.page,xe)),ve.createElement("li",{className:pt},Qe,Ke)},ee=z,ae=function(Ne){var Ae=Ne.rootPrefixCls,Re=Ne.page,We=Ne.active,Ye=Ne.className,Ue=Ne.showTitle,Ve=Ne.onClick,ot=Ne.onKeyPress,st=Ne.itemRender,ct="".concat(Ae,"-item"),Pt=me()(ct,"".concat(ct,"-").concat(Re),(0,ht.Z)((0,ht.Z)({},"".concat(ct,"-active"),We),"".concat(ct,"-disabled"),!Re),Ye),$e=function(){Ve(Re)},nt=function(wt){ot(wt,Ve,Re)},yt=st(Re,"page",ve.createElement("a",{rel:"nofollow"},Re));return yt?ve.createElement("li",{title:Ue?String(Re):null,className:Pt,onClick:$e,onKeyDown:nt,tabIndex:0},yt):null},ie=ae,le=function(Ne,Ae,Re){return Re};function ue(){}function ge(Fe){var Ne=Number(Fe);return typeof Ne=="number"&&!Number.isNaN(Ne)&&isFinite(Ne)&&Math.floor(Ne)===Ne}function Pe(Fe,Ne,Ae){var Re=typeof Fe=="undefined"?Ne:Fe;return Math.floor((Ae-1)/Re)+1}var je=function(Ne){var Ae=Ne.prefixCls,Re=Ae===void 0?"rc-pagination":Ae,We=Ne.selectPrefixCls,Ye=We===void 0?"rc-select":We,Ue=Ne.className,Ve=Ne.current,ot=Ne.defaultCurrent,st=ot===void 0?1:ot,ct=Ne.total,Pt=ct===void 0?0:ct,$e=Ne.pageSize,nt=Ne.defaultPageSize,yt=nt===void 0?10:nt,xt=Ne.onChange,wt=xt===void 0?ue:xt,dt=Ne.hideOnSinglePage,ft=Ne.align,ut=Ne.showPrevNextJumpers,Et=ut===void 0?!0:ut,mt=Ne.showQuickJumper,vt=Ne.showLessItems,kt=Ne.showTitle,pt=kt===void 0?!0:kt,Qe=Ne.onShowSizeChange,Ke=Qe===void 0?ue:Qe,xe=Ne.locale,Me=xe===void 0?we.Z:xe,Ze=Ne.style,tt=Ne.totalBoundaryShowSizeChanger,Ie=tt===void 0?50:tt,_e=Ne.disabled,He=Ne.simple,rt=Ne.showTotal,St=Ne.showSizeChanger,Ct=St===void 0?Pt>Ie:St,Nt=Ne.sizeChangerRender,Ot=Ne.pageSizeOptions,Rt=Ne.itemRender,$t=Rt===void 0?le:Rt,qt=Ne.jumpPrevIcon,rn=Ne.jumpNextIcon,Ht=Ne.prevIcon,sn=Ne.nextIcon,tn=ve.useRef(null),Ut=(0,ke.Z)(10,{value:$e,defaultValue:yt}),En=(0,De.Z)(Ut,2),bn=En[0],Dn=En[1],Qn=(0,ke.Z)(1,{value:Ve,defaultValue:st,postState:function(li){return Math.max(1,Math.min(li,Pe(void 0,bn,Pt)))}}),Pr=(0,De.Z)(Qn,2),Yn=Pr[0],Mr=Pr[1],Ur=ve.useState(Yn),_r=(0,De.Z)(Ur,2),ni=_r[0],Li=_r[1];(0,ve.useEffect)(function(){Li(Yn)},[Yn]);var _i=wt!==ue,Di="current"in Ne,ui=Math.max(1,Yn-(vt?3:5)),Wi=Math.min(Pe(void 0,bn,Pt),Yn+(vt?3:5));function et(Sr,li){var Jr=Sr||ve.createElement("button",{type:"button","aria-label":li,className:"".concat(Re,"-item-link")});return typeof Sr=="function"&&(Jr=ve.createElement(Sr,(0,ze.Z)({},Ne))),Jr}function jr(Sr){var li=Sr.target.value,Jr=Pe(void 0,bn,Pt),Hi;return li===""?Hi=li:Number.isNaN(Number(li))?Hi=ni:li>=Jr?Hi=Jr:Hi=Number(li),Hi}function dr(Sr){return ge(Sr)&&Sr!==Yn&&ge(Pt)&&Pt>0}var Ai=Pt>bn?mt:!1;function lr(Sr){(Sr.keyCode===Ce.Z.UP||Sr.keyCode===Ce.Z.DOWN)&&Sr.preventDefault()}function yr(Sr){var li=jr(Sr);switch(li!==ni&&Li(li),Sr.keyCode){case Ce.Z.ENTER:on(li);break;case Ce.Z.UP:on(li-1);break;case Ce.Z.DOWN:on(li+1);break;default:break}}function Lr(Sr){on(jr(Sr))}function uo(Sr){var li=Pe(Sr,bn,Pt),Jr=Yn>li&&li!==0?li:Yn;Dn(Sr),Li(Jr),Ke==null||Ke(Yn,Sr),Mr(Jr),wt==null||wt(Jr,Sr)}function on(Sr){if(dr(Sr)&&!_e){var li=Pe(void 0,bn,Pt),Jr=Sr;return Sr>li?Jr=li:Sr<1&&(Jr=1),Jr!==ni&&Li(Jr),Mr(Jr),wt==null||wt(Jr,bn),Jr}return Yn}var dn=Yn>1,en=Yn<Pe(void 0,bn,Pt);function vn(){dn&&on(Yn-1)}function fr(){en&&on(Yn+1)}function cr(){on(ui)}function oi(){on(Wi)}function an(Sr,li){if(Sr.key==="Enter"||Sr.charCode===Ce.Z.ENTER||Sr.keyCode===Ce.Z.ENTER){for(var Jr=arguments.length,Hi=new Array(Jr>2?Jr-2:0),ci=2;ci<Jr;ci++)Hi[ci-2]=arguments[ci];li.apply(void 0,Hi)}}function Nn(Sr){an(Sr,vn)}function gr(Sr){an(Sr,fr)}function Zr(Sr){an(Sr,cr)}function Xn(Sr){an(Sr,oi)}function jt(Sr){var li=$t(Sr,"prev",et(Ht,"prev page"));return ve.isValidElement(li)?ve.cloneElement(li,{disabled:!dn}):li}function Wt(Sr){var li=$t(Sr,"next",et(sn,"next page"));return ve.isValidElement(li)?ve.cloneElement(li,{disabled:!en}):li}function jn(Sr){(Sr.type==="click"||Sr.keyCode===Ce.Z.ENTER)&&on(ni)}var Cn=null,Jt=(0,Se.Z)(Ne,{aria:!0,data:!0}),_n=rt&&ve.createElement("li",{className:"".concat(Re,"-total-text")},rt(Pt,[Pt===0?0:(Yn-1)*bn+1,Yn*bn>Pt?Pt:Yn*bn])),ur=null,ar=Pe(void 0,bn,Pt);if(dt&&Pt<=bn)return null;var mr=[],Bn={rootPrefixCls:Re,onClick:on,onKeyPress:an,showTitle:pt,itemRender:$t,page:-1},Un=Yn-1>0?Yn-1:0,er=Yn+1<ar?Yn+1:ar,Ar=mt&&mt.goButton,sr=(0,oe.Z)(He)==="object"?He.readOnly:!He,mn=Ar,tr=null;He&&(Ar&&(typeof Ar=="boolean"?mn=ve.createElement("button",{type:"button",onClick:jn,onKeyUp:jn},Me.jump_to_confirm):mn=ve.createElement("span",{onClick:jn,onKeyUp:jn},Ar),mn=ve.createElement("li",{title:pt?"".concat(Me.jump_to).concat(Yn,"/").concat(ar):null,className:"".concat(Re,"-simple-pager")},mn)),tr=ve.createElement("li",{title:pt?"".concat(Yn,"/").concat(ar):null,className:"".concat(Re,"-simple-pager")},sr?ni:ve.createElement("input",{type:"text","aria-label":Me.jump_to,value:ni,disabled:_e,onKeyDown:lr,onKeyUp:yr,onChange:yr,onBlur:Lr,size:3}),ve.createElement("span",{className:"".concat(Re,"-slash")},"/"),ar));var Vr=vt?1:2;if(ar<=3+Vr*2){ar||mr.push(ve.createElement(ie,(0,Dt.Z)({},Bn,{key:"noPager",page:1,className:"".concat(Re,"-item-disabled")})));for(var pi=1;pi<=ar;pi+=1)mr.push(ve.createElement(ie,(0,Dt.Z)({},Bn,{key:pi,page:pi,active:Yn===pi})))}else{var zi=vt?Me.prev_3:Me.prev_5,Yt=vt?Me.next_3:Me.next_5,vr=$t(ui,"jump-prev",et(qt,"prev page")),zr=$t(Wi,"jump-next",et(rn,"next page"));Et&&(Cn=vr?ve.createElement("li",{title:pt?zi:null,key:"prev",onClick:cr,tabIndex:0,onKeyDown:Zr,className:me()("".concat(Re,"-jump-prev"),(0,ht.Z)({},"".concat(Re,"-jump-prev-custom-icon"),!!qt))},vr):null,ur=zr?ve.createElement("li",{title:pt?Yt:null,key:"next",onClick:oi,tabIndex:0,onKeyDown:Xn,className:me()("".concat(Re,"-jump-next"),(0,ht.Z)({},"".concat(Re,"-jump-next-custom-icon"),!!rn))},zr):null);var nr=Math.max(1,Yn-Vr),vi=Math.min(Yn+Vr,ar);Yn-1<=Vr&&(vi=1+Vr*2),ar-Yn<=Vr&&(nr=ar-Vr*2);for(var Qr=nr;Qr<=vi;Qr+=1)mr.push(ve.createElement(ie,(0,Dt.Z)({},Bn,{key:Qr,page:Qr,active:Yn===Qr})));if(Yn-1>=Vr*2&&Yn!==3&&(mr[0]=ve.cloneElement(mr[0],{className:me()("".concat(Re,"-item-after-jump-prev"),mr[0].props.className)}),mr.unshift(Cn)),ar-Yn>=Vr*2&&Yn!==ar-2){var hi=mr[mr.length-1];mr[mr.length-1]=ve.cloneElement(hi,{className:me()("".concat(Re,"-item-before-jump-next"),hi.props.className)}),mr.push(ur)}nr!==1&&mr.unshift(ve.createElement(ie,(0,Dt.Z)({},Bn,{key:1,page:1}))),vi!==ar&&mr.push(ve.createElement(ie,(0,Dt.Z)({},Bn,{key:ar,page:ar})))}var $r=jt(Un);if($r){var si=!dn||!ar;$r=ve.createElement("li",{title:pt?Me.prev_page:null,onClick:vn,tabIndex:si?null:0,onKeyDown:Nn,className:me()("".concat(Re,"-prev"),(0,ht.Z)({},"".concat(Re,"-disabled"),si)),"aria-disabled":si},$r)}var bi=Wt(er);if(bi){var pn,Oi;He?(pn=!en,Oi=dn?0:null):(pn=!en||!ar,Oi=pn?null:0),bi=ve.createElement("li",{title:pt?Me.next_page:null,onClick:fr,tabIndex:Oi,onKeyDown:gr,className:me()("".concat(Re,"-next"),(0,ht.Z)({},"".concat(Re,"-disabled"),pn)),"aria-disabled":pn},bi)}var yn=me()(Re,Ue,(0,ht.Z)((0,ht.Z)((0,ht.Z)((0,ht.Z)((0,ht.Z)({},"".concat(Re,"-start"),ft==="start"),"".concat(Re,"-center"),ft==="center"),"".concat(Re,"-end"),ft==="end"),"".concat(Re,"-simple"),He),"".concat(Re,"-disabled"),_e));return ve.createElement("ul",(0,Dt.Z)({className:yn,style:Ze,ref:tn},Jt),_n,$r,He?tr:mr,bi,ve.createElement(ee,{locale:Me,rootPrefixCls:Re,disabled:_e,selectPrefixCls:Ye,changeSize:uo,pageSize:bn,pageSizeOptions:Ot,quickGo:Ai?on:null,goButton:mn,showSizeChanger:Ct,sizeChangerRender:Nt}))},Be=je},25930:function(gn,cn,at){"use strict";at.d(cn,{Cd:function(){return Re}});var ht=at(67711),Dt=at(98506),oe=at(33346),ze=at(59301),De=at(92310),fe=at.n(De),me={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ke=function(){var Ue=(0,ze.useRef)([]),Ve=(0,ze.useRef)(null);return(0,ze.useEffect)(function(){var ot=Date.now(),st=!1;Ue.current.forEach(function(ct){if(ct){st=!0;var Pt=ct.style;Pt.transitionDuration=".3s, .3s, .3s, .06s",Ve.current&&ot-Ve.current<100&&(Pt.transitionDuration="0s, 0s")}}),st&&(Ve.current=Date.now())}),Ue.current},Ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ue){var Ve=(0,Dt.Z)((0,Dt.Z)({},me),Ue),ot=Ve.className,st=Ve.percent,ct=Ve.prefixCls,Pt=Ve.strokeColor,$e=Ve.strokeLinecap,nt=Ve.strokeWidth,yt=Ve.style,xt=Ve.trailColor,wt=Ve.trailWidth,dt=Ve.transition,ft=(0,oe.Z)(Ve,Ce);delete ft.gapPosition;var ut=Array.isArray(st)?st:[st],Et=Array.isArray(Pt)?Pt:[Pt],mt=ke(),vt=nt/2,kt=100-nt/2,pt="M ".concat($e==="round"?vt:0,",").concat(vt,`
L `).concat($e==="round"?kt:100,",").concat(vt),Qe="0 0 100 ".concat(nt),Ke=0;return ze.createElement("svg",(0,ht.Z)({className:fe()("".concat(ct,"-line"),ot),viewBox:Qe,preserveAspectRatio:"none",style:yt},ft),ze.createElement("path",{className:"".concat(ct,"-line-trail"),d:pt,strokeLinecap:$e,stroke:xt,strokeWidth:wt||nt,fillOpacity:"0"}),ut.map(function(xe,Me){var Ze=1;switch($e){case"round":Ze=1-nt/100;break;case"square":Ze=1-nt/2/100;break;default:Ze=1;break}var tt={strokeDasharray:"".concat(xe*Ze,"px, 100px"),strokeDashoffset:"-".concat(Ke,"px"),transition:dt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Et[Me]||Et[Et.length-1];return Ke+=xe,ze.createElement("path",{key:Me,className:"".concat(ct,"-line-path"),d:pt,strokeLinecap:$e,stroke:Ie,strokeWidth:nt,fillOpacity:"0",ref:function(He){mt[Me]=He},style:tt})}))},Le=Se,ve=at(26420),we=at(16886),de=at(47273),z=0,ee=(0,de.Z)();function ae(){var Ye;return ee?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var Ue=ze.useState(),Ve=(0,we.Z)(Ue,2),ot=Ve[0],st=Ve[1];return ze.useEffect(function(){st("rc_progress_".concat(ae()))},[]),Ye||ot},le=function(Ue){var Ve=Ue.bg,ot=Ue.children;return ze.createElement("div",{style:{width:"100%",height:"100%",background:Ve}},ot)};function ue(Ye,Ue){return Object.keys(Ye).map(function(Ve){var ot=parseFloat(Ve),st="".concat(Math.floor(ot*Ue),"%");return"".concat(Ye[Ve]," ").concat(st)})}var ge=ze.forwardRef(function(Ye,Ue){var Ve=Ye.prefixCls,ot=Ye.color,st=Ye.gradientId,ct=Ye.radius,Pt=Ye.style,$e=Ye.ptg,nt=Ye.strokeLinecap,yt=Ye.strokeWidth,xt=Ye.size,wt=Ye.gapDegree,dt=ot&&(0,ve.Z)(ot)==="object",ft=dt?"#FFF":void 0,ut=xt/2,Et=ze.createElement("circle",{className:"".concat(Ve,"-circle-path"),r:ct,cx:ut,cy:ut,stroke:ft,strokeLinecap:nt,strokeWidth:yt,opacity:$e===0?0:1,style:Pt,ref:Ue});if(!dt)return Et;var mt="".concat(st,"-conic"),vt=wt?"".concat(180+wt/2,"deg"):"0deg",kt=ue(ot,(360-wt)/360),pt=ue(ot,1),Qe="conic-gradient(from ".concat(vt,", ").concat(kt.join(", "),")"),Ke="linear-gradient(to ".concat(wt?"bottom":"top",", ").concat(pt.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:mt},Et),ze.createElement("foreignObject",{x:0,y:0,width:xt,height:xt,mask:"url(#".concat(mt,")")},ze.createElement(le,{bg:Ke},ze.createElement(le,{bg:Qe}))))}),Pe=ge,je=100,Be=function(Ue,Ve,ot,st,ct,Pt,$e,nt,yt,xt){var wt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,dt=ot/100*360*((360-Pt)/360),ft=Pt===0?0:{bottom:0,top:180,left:90,right:-90}[$e],ut=(100-st)/100*Ve;yt==="round"&&st!==100&&(ut+=xt/2,ut>=Ve&&(ut=Ve-.01));var Et=je/2;return{stroke:typeof nt=="string"?nt:void 0,strokeDasharray:"".concat(Ve,"px ").concat(Ue),strokeDashoffset:ut+wt,transform:"rotate(".concat(ct+dt+ft,"deg)"),transformOrigin:"".concat(Et,"px ").concat(Et,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Fe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ne(Ye){var Ue=Ye!=null?Ye:[];return Array.isArray(Ue)?Ue:[Ue]}var Ae=function(Ue){var Ve=(0,Dt.Z)((0,Dt.Z)({},me),Ue),ot=Ve.id,st=Ve.prefixCls,ct=Ve.steps,Pt=Ve.strokeWidth,$e=Ve.trailWidth,nt=Ve.gapDegree,yt=nt===void 0?0:nt,xt=Ve.gapPosition,wt=Ve.trailColor,dt=Ve.strokeLinecap,ft=Ve.style,ut=Ve.className,Et=Ve.strokeColor,mt=Ve.percent,vt=(0,oe.Z)(Ve,Fe),kt=je/2,pt=ie(ot),Qe="".concat(pt,"-gradient"),Ke=kt-Pt/2,xe=Math.PI*2*Ke,Me=yt>0?90+yt/2:-90,Ze=xe*((360-yt)/360),tt=(0,ve.Z)(ct)==="object"?ct:{count:ct,gap:2},Ie=tt.count,_e=tt.gap,He=Ne(mt),rt=Ne(Et),St=rt.find(function(rn){return rn&&(0,ve.Z)(rn)==="object"}),Ct=St&&(0,ve.Z)(St)==="object",Nt=Ct?"butt":dt,Ot=Be(xe,Ze,0,100,Me,yt,xt,wt,Nt,Pt),Rt=ke(),$t=function(){var Ht=0;return He.map(function(sn,tn){var Ut=rt[tn]||rt[rt.length-1],En=Be(xe,Ze,Ht,sn,Me,yt,xt,Ut,Nt,Pt);return Ht+=sn,ze.createElement(Pe,{key:tn,color:Ut,ptg:sn,radius:Ke,prefixCls:st,gradientId:Qe,style:En,strokeLinecap:Nt,strokeWidth:Pt,gapDegree:yt,ref:function(Dn){Rt[tn]=Dn},size:je})}).reverse()},qt=function(){var Ht=Math.round(Ie*(He[0]/100)),sn=100/Ie,tn=0;return new Array(Ie).fill(null).map(function(Ut,En){var bn=En<=Ht-1?rt[0]:wt,Dn=bn&&(0,ve.Z)(bn)==="object"?"url(#".concat(Qe,")"):void 0,Qn=Be(xe,Ze,tn,sn,Me,yt,xt,bn,"butt",Pt,_e);return tn+=(Ze-Qn.strokeDashoffset+_e)*100/Ze,ze.createElement("circle",{key:En,className:"".concat(st,"-circle-path"),r:Ke,cx:kt,cy:kt,stroke:Dn,strokeWidth:Pt,opacity:1,style:Qn,ref:function(Yn){Rt[En]=Yn}})})};return ze.createElement("svg",(0,ht.Z)({className:fe()("".concat(st,"-circle"),ut),viewBox:"0 0 ".concat(je," ").concat(je),style:ft,id:ot,role:"presentation"},vt),!Ie&&ze.createElement("circle",{className:"".concat(st,"-circle-trail"),r:Ke,cx:kt,cy:kt,stroke:wt,strokeLinecap:Nt,strokeWidth:$e||Pt,style:Ot}),Ie?qt():$t())},Re=Ae,We={Line:Le,Circle:Re}},6551:function(gn,cn,at){"use strict";at.d(cn,{ZP:function(){return me}});var ht=at(16886),Dt=at(59301),oe=at(47273),ze=0,De=(0,oe.Z)();function fe(){var ke;return De?(ke=ze,ze+=1):ke="TEST_OR_SSR",ke}function me(ke){var Ce=Dt.useState(),Se=(0,ht.Z)(Ce,2),Le=Se[0],ve=Se[1];return Dt.useEffect(function(){ve("rc_select_".concat(fe()))},[]),ke||Le}},37463:function(gn,cn,at){"use strict";at.d(cn,{Ac:function(){return Ut},Xo:function(){return bn},Wx:function(){return Qn},ZP:function(){return Xn},lk:function(){return ue}});var ht=at(67711),Dt=at(15142),oe=at(52873),ze=at(98506),De=at(16886),fe=at(33346),me=at(26420),ke=at(18929),Ce=at(48736),Se=at(59301),Le=at(92310),ve=at.n(Le),we=at(34280),de=at(49658),z=at(8654),ee=function(Wt){var jn=Wt.className,Cn=Wt.customizeIcon,Jt=Wt.customizeIconProps,_n=Wt.children,ur=Wt.onMouseDown,ar=Wt.onClick,mr=typeof Cn=="function"?Cn(Jt):Cn;return Se.createElement("span",{className:jn,onMouseDown:function(Un){Un.preventDefault(),ur==null||ur(Un)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ar,"aria-hidden":!0},mr!==void 0?mr:Se.createElement("span",{className:ve()(jn.split(/\s+/).map(function(Bn){return"".concat(Bn,"-icon")}))},_n))},ae=ee,ie=function(Wt,jn,Cn,Jt,_n){var ur=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ar=arguments.length>6?arguments[6]:void 0,mr=arguments.length>7?arguments[7]:void 0,Bn=Se.useMemo(function(){if((0,me.Z)(Jt)==="object")return Jt.clearIcon;if(_n)return _n},[Jt,_n]),Un=Se.useMemo(function(){return!!(!ur&&Jt&&(Cn.length||ar)&&!(mr==="combobox"&&ar===""))},[Jt,ur,Cn.length,ar,mr]);return{allowClear:Un,clearIcon:Se.createElement(ae,{className:"".concat(Wt,"-clear"),onMouseDown:jn,customizeIcon:Bn},"\xD7")}},le=Se.createContext(null);function ue(){return Se.useContext(le)}function ge(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Wt=Se.useState(!1),jn=(0,De.Z)(Wt,2),Cn=jn[0],Jt=jn[1],_n=Se.useRef(null),ur=function(){window.clearTimeout(_n.current)};Se.useEffect(function(){return ur},[]);var ar=function(Bn,Un){ur(),_n.current=window.setTimeout(function(){Jt(Bn),Un&&Un()},jt)};return[Cn,ar,ur]}function Pe(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Wt=Se.useRef(null),jn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(jn.current)}},[]);function Cn(Jt){(Jt||Wt.current===null)&&(Wt.current=Jt),window.clearTimeout(jn.current),jn.current=window.setTimeout(function(){Wt.current=null},jt)}return[function(){return Wt.current},Cn]}function je(jt,Wt,jn,Cn){var Jt=Se.useRef(null);Jt.current={open:Wt,triggerOpen:jn,customizedTrigger:Cn},Se.useEffect(function(){function _n(ur){var ar;if(!((ar=Jt.current)!==null&&ar!==void 0&&ar.customizedTrigger)){var mr=ur.target;mr.shadowRoot&&ur.composed&&(mr=ur.composedPath()[0]||mr),Jt.current.open&&jt().filter(function(Bn){return Bn}).every(function(Bn){return!Bn.contains(mr)&&Bn!==mr})&&Jt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",_n),function(){return window.removeEventListener("mousedown",_n)}},[])}var Be=at(10228);function Fe(jt){return jt&&![Be.Z.ESC,Be.Z.SHIFT,Be.Z.BACKSPACE,Be.Z.TAB,Be.Z.WIN_KEY,Be.Z.ALT,Be.Z.META,Be.Z.WIN_KEY_RIGHT,Be.Z.CTRL,Be.Z.SEMICOLON,Be.Z.EQUALS,Be.Z.CAPS_LOCK,Be.Z.CONTEXT_MENU,Be.Z.F1,Be.Z.F2,Be.Z.F3,Be.Z.F4,Be.Z.F5,Be.Z.F6,Be.Z.F7,Be.Z.F8,Be.Z.F9,Be.Z.F10,Be.Z.F11,Be.Z.F12].includes(jt)}var Ne=at(26112),Ae=at(11780);function Re(jt,Wt,jn){var Cn=(0,ze.Z)((0,ze.Z)({},jt),jn?Wt:{});return Object.keys(Wt).forEach(function(Jt){var _n=Wt[Jt];typeof _n=="function"&&(Cn[Jt]=function(){for(var ur,ar=arguments.length,mr=new Array(ar),Bn=0;Bn<ar;Bn++)mr[Bn]=arguments[Bn];return _n.apply(void 0,mr),(ur=jt[Jt])===null||ur===void 0?void 0:ur.call.apply(ur,[jt].concat(mr))})}),Cn}var We=Re,Ye=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ue=function(Wt,jn){var Cn=Wt.prefixCls,Jt=Wt.id,_n=Wt.inputElement,ur=Wt.autoFocus,ar=Wt.autoComplete,mr=Wt.editable,Bn=Wt.activeDescendantId,Un=Wt.value,er=Wt.open,Ar=Wt.attrs,sr=(0,fe.Z)(Wt,Ye),mn=_n||Se.createElement("input",null),tr=mn,Vr=tr.ref,pi=tr.props;return(0,Ce.Kp)(!("maxLength"in mn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),mn=Se.cloneElement(mn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},We(sr,pi,!0)),{},{id:Jt,ref:(0,z.sQ)(jn,Vr),autoComplete:ar||"off",autoFocus:ur,className:ve()("".concat(Cn,"-selection-search-input"),pi==null?void 0:pi.className),role:"combobox","aria-expanded":er||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Jt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Jt,"_list"),"aria-activedescendant":er?Bn:void 0},Ar),{},{value:mr?Un:"",readOnly:!mr,unselectable:mr?null:"on",style:(0,ze.Z)((0,ze.Z)({},pi.style),{},{opacity:mr?null:0})})),mn},Ve=Se.forwardRef(Ue),ot=Ve;function st(jt){return Array.isArray(jt)?jt:jt!==void 0?[jt]:[]}var ct=typeof window!="undefined"&&window.document&&window.document.documentElement,Pt=ct;function $e(jt){return jt!=null}function nt(jt){return!jt&&jt!==0}function yt(jt){return["string","number"].includes((0,me.Z)(jt))}function xt(jt){var Wt=void 0;return jt&&(yt(jt.title)?Wt=jt.title.toString():yt(jt.label)&&(Wt=jt.label.toString())),Wt}function wt(jt,Wt){Pt?Se.useLayoutEffect(jt,Wt):Se.useEffect(jt,Wt)}function dt(jt){var Wt;return(Wt=jt.key)!==null&&Wt!==void 0?Wt:jt.value}var ft=function(Wt){Wt.preventDefault(),Wt.stopPropagation()},ut=function(Wt){var jn=Wt.id,Cn=Wt.prefixCls,Jt=Wt.values,_n=Wt.open,ur=Wt.searchValue,ar=Wt.autoClearSearchValue,mr=Wt.inputRef,Bn=Wt.placeholder,Un=Wt.disabled,er=Wt.mode,Ar=Wt.showSearch,sr=Wt.autoFocus,mn=Wt.autoComplete,tr=Wt.activeDescendantId,Vr=Wt.tabIndex,pi=Wt.removeIcon,zi=Wt.maxTagCount,Yt=Wt.maxTagTextLength,vr=Wt.maxTagPlaceholder,zr=vr===void 0?function(zn){return"+ ".concat(zn.length," ...")}:vr,nr=Wt.tagRender,vi=Wt.onToggleOpen,Qr=Wt.onRemove,hi=Wt.onInputChange,$r=Wt.onInputPaste,si=Wt.onInputKeyDown,bi=Wt.onInputMouseDown,pn=Wt.onInputCompositionStart,Oi=Wt.onInputCompositionEnd,yn=Wt.onInputBlur,Sr=Se.useRef(null),li=(0,Se.useState)(0),Jr=(0,De.Z)(li,2),Hi=Jr[0],ci=Jr[1],Hr=(0,Se.useState)(!1),Ki=(0,De.Z)(Hr,2),Qt=Ki[0],wn=Ki[1],Zt="".concat(Cn,"-selection"),lt=_n||er==="multiple"&&ar===!1||er==="tags"?ur:"",On=er==="tags"||er==="multiple"&&ar===!1||Ar&&(_n||Qt);wt(function(){ci(Sr.current.scrollWidth)},[lt]);var Sn=function(Ln,In,An,Vn,Wn){return Se.createElement("span",{title:xt(Ln),className:ve()("".concat(Zt,"-item"),(0,oe.Z)({},"".concat(Zt,"-item-disabled"),An))},Se.createElement("span",{className:"".concat(Zt,"-item-content")},In),Vn&&Se.createElement(ae,{className:"".concat(Zt,"-item-remove"),onMouseDown:ft,onClick:Wn,customizeIcon:pi},"\xD7"))},Hn=function(Ln,In,An,Vn,Wn,ln){var br=function(ri){ft(ri),vi(!_n)};return Se.createElement("span",{onMouseDown:br},nr({label:In,value:Ln,disabled:An,closable:Vn,onClose:Wn,isMaxTag:!!ln}))},$n=function(Ln){var In=Ln.disabled,An=Ln.label,Vn=Ln.value,Wn=!Un&&!In,ln=An;if(typeof Yt=="number"&&(typeof An=="string"||typeof An=="number")){var br=String(ln);br.length>Yt&&(ln="".concat(br.slice(0,Yt),"..."))}var Cr=function(Er){Er&&Er.stopPropagation(),Qr(Ln)};return typeof nr=="function"?Hn(Vn,ln,In,Wn,Cr):Sn(Ln,ln,In,Wn,Cr)},Kn=function(Ln){if(!Jt.length)return null;var In=typeof zr=="function"?zr(Ln):zr;return typeof nr=="function"?Hn(void 0,In,!1,!1,void 0,!0):Sn({title:In},In,!1)},un=Se.createElement("div",{className:"".concat(Zt,"-search"),style:{width:Hi},onFocus:function(){wn(!0)},onBlur:function(){wn(!1)}},Se.createElement(ot,{ref:mr,open:_n,prefixCls:Cn,id:jn,inputElement:null,disabled:Un,autoFocus:sr,autoComplete:mn,editable:On,activeDescendantId:tr,value:lt,onKeyDown:si,onMouseDown:bi,onChange:hi,onPaste:$r,onCompositionStart:pn,onCompositionEnd:Oi,onBlur:yn,tabIndex:Vr,attrs:(0,Ne.Z)(Wt,!0)}),Se.createElement("span",{ref:Sr,className:"".concat(Zt,"-search-mirror"),"aria-hidden":!0},lt,"\xA0")),Fn=Se.createElement(Ae.Z,{prefixCls:"".concat(Zt,"-overflow"),data:Jt,renderItem:$n,renderRest:Kn,suffix:un,itemKey:dt,maxCount:zi});return Se.createElement("span",{className:"".concat(Zt,"-wrap")},Fn,!Jt.length&&!lt&&Se.createElement("span",{className:"".concat(Zt,"-placeholder")},Bn))},Et=ut,mt=function(Wt){var jn=Wt.inputElement,Cn=Wt.prefixCls,Jt=Wt.id,_n=Wt.inputRef,ur=Wt.disabled,ar=Wt.autoFocus,mr=Wt.autoComplete,Bn=Wt.activeDescendantId,Un=Wt.mode,er=Wt.open,Ar=Wt.values,sr=Wt.placeholder,mn=Wt.tabIndex,tr=Wt.showSearch,Vr=Wt.searchValue,pi=Wt.activeValue,zi=Wt.maxLength,Yt=Wt.onInputKeyDown,vr=Wt.onInputMouseDown,zr=Wt.onInputChange,nr=Wt.onInputPaste,vi=Wt.onInputCompositionStart,Qr=Wt.onInputCompositionEnd,hi=Wt.onInputBlur,$r=Wt.title,si=Se.useState(!1),bi=(0,De.Z)(si,2),pn=bi[0],Oi=bi[1],yn=Un==="combobox",Sr=yn||tr,li=Ar[0],Jr=Vr||"";yn&&pi&&!pn&&(Jr=pi),Se.useEffect(function(){yn&&Oi(!1)},[yn,pi]);var Hi=Un!=="combobox"&&!er&&!tr?!1:!!Jr,ci=$r===void 0?xt(li):$r,Hr=Se.useMemo(function(){return li?null:Se.createElement("span",{className:"".concat(Cn,"-selection-placeholder"),style:Hi?{visibility:"hidden"}:void 0},sr)},[li,Hi,sr,Cn]);return Se.createElement("span",{className:"".concat(Cn,"-selection-wrap")},Se.createElement("span",{className:"".concat(Cn,"-selection-search")},Se.createElement(ot,{ref:_n,prefixCls:Cn,id:Jt,open:er,inputElement:jn,disabled:ur,autoFocus:ar,autoComplete:mr,editable:Sr,activeDescendantId:Bn,value:Jr,onKeyDown:Yt,onMouseDown:vr,onChange:function(Qt){Oi(!0),zr(Qt)},onPaste:nr,onCompositionStart:vi,onCompositionEnd:Qr,onBlur:hi,tabIndex:mn,attrs:(0,Ne.Z)(Wt,!0),maxLength:yn?zi:void 0})),!yn&&li?Se.createElement("span",{className:"".concat(Cn,"-selection-item"),title:ci,style:Hi?{visibility:"hidden"}:void 0},li.label):null,Hr)},vt=mt,kt=function(Wt,jn){var Cn=(0,Se.useRef)(null),Jt=(0,Se.useRef)(!1),_n=Wt.prefixCls,ur=Wt.open,ar=Wt.mode,mr=Wt.showSearch,Bn=Wt.tokenWithEnter,Un=Wt.disabled,er=Wt.prefix,Ar=Wt.autoClearSearchValue,sr=Wt.onSearch,mn=Wt.onSearchSubmit,tr=Wt.onToggleOpen,Vr=Wt.onInputKeyDown,pi=Wt.onInputBlur,zi=Wt.domRef;Se.useImperativeHandle(jn,function(){return{focus:function(ci){Cn.current.focus(ci)},blur:function(){Cn.current.blur()}}});var Yt=Pe(0),vr=(0,De.Z)(Yt,2),zr=vr[0],nr=vr[1],vi=function(ci){var Hr=ci.which,Ki=Cn.current instanceof HTMLTextAreaElement;!Ki&&ur&&(Hr===Be.Z.UP||Hr===Be.Z.DOWN)&&ci.preventDefault(),Vr&&Vr(ci),Hr===Be.Z.ENTER&&ar==="tags"&&!Jt.current&&!ur&&(mn==null||mn(ci.target.value)),!(Ki&&!ur&&~[Be.Z.UP,Be.Z.DOWN,Be.Z.LEFT,Be.Z.RIGHT].indexOf(Hr))&&Fe(Hr)&&tr(!0)},Qr=function(){nr(!0)},hi=(0,Se.useRef)(null),$r=function(ci){sr(ci,!0,Jt.current)!==!1&&tr(!0)},si=function(){Jt.current=!0},bi=function(ci){Jt.current=!1,ar!=="combobox"&&$r(ci.target.value)},pn=function(ci){var Hr=ci.target.value;if(Bn&&hi.current&&/[\r\n]/.test(hi.current)){var Ki=hi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Hr=Hr.replace(Ki,hi.current)}hi.current=null,$r(Hr)},Oi=function(ci){var Hr=ci.clipboardData,Ki=Hr==null?void 0:Hr.getData("text");hi.current=Ki||""},yn=function(ci){var Hr=ci.target;if(Hr!==Cn.current){var Ki=document.body.style.msTouchAction!==void 0;Ki?setTimeout(function(){Cn.current.focus()}):Cn.current.focus()}},Sr=function(ci){var Hr=zr();ci.target!==Cn.current&&!Hr&&!(ar==="combobox"&&Un)&&ci.preventDefault(),(ar!=="combobox"&&(!mr||!Hr)||!ur)&&(ur&&Ar!==!1&&sr("",!0,!1),tr())},li={inputRef:Cn,onInputKeyDown:vi,onInputMouseDown:Qr,onInputChange:pn,onInputPaste:Oi,onInputCompositionStart:si,onInputCompositionEnd:bi,onInputBlur:pi},Jr=ar==="multiple"||ar==="tags"?Se.createElement(Et,(0,ht.Z)({},Wt,li)):Se.createElement(vt,(0,ht.Z)({},Wt,li));return Se.createElement("div",{ref:zi,className:"".concat(_n,"-selector"),onClick:yn,onMouseDown:Sr},er&&Se.createElement("div",{className:"".concat(_n,"-prefix")},er),Jr)},pt=Se.forwardRef(kt),Qe=pt,Ke=at(65030),xe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Me=function(Wt){var jn=Wt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:jn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:jn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:jn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:jn,adjustY:1},htmlRegion:"scroll"}}},Ze=function(Wt,jn){var Cn=Wt.prefixCls,Jt=Wt.disabled,_n=Wt.visible,ur=Wt.children,ar=Wt.popupElement,mr=Wt.animation,Bn=Wt.transitionName,Un=Wt.dropdownStyle,er=Wt.dropdownClassName,Ar=Wt.direction,sr=Ar===void 0?"ltr":Ar,mn=Wt.placement,tr=Wt.builtinPlacements,Vr=Wt.dropdownMatchSelectWidth,pi=Wt.dropdownRender,zi=Wt.dropdownAlign,Yt=Wt.getPopupContainer,vr=Wt.empty,zr=Wt.getTriggerDOMNode,nr=Wt.onPopupVisibleChange,vi=Wt.onPopupMouseEnter,Qr=(0,fe.Z)(Wt,xe),hi="".concat(Cn,"-dropdown"),$r=ar;pi&&($r=pi(ar));var si=Se.useMemo(function(){return tr||Me(Vr)},[tr,Vr]),bi=mr?"".concat(hi,"-").concat(mr):Bn,pn=typeof Vr=="number",Oi=Se.useMemo(function(){return pn?null:Vr===!1?"minWidth":"width"},[Vr,pn]),yn=Un;pn&&(yn=(0,ze.Z)((0,ze.Z)({},yn),{},{width:Vr}));var Sr=Se.useRef(null);return Se.useImperativeHandle(jn,function(){return{getPopupElement:function(){var Jr;return(Jr=Sr.current)===null||Jr===void 0?void 0:Jr.popupElement}}}),Se.createElement(Ke.Z,(0,ht.Z)({},Qr,{showAction:nr?["click"]:[],hideAction:nr?["click"]:[],popupPlacement:mn||(sr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:si,prefixCls:hi,popupTransitionName:bi,popup:Se.createElement("div",{onMouseEnter:vi},$r),ref:Sr,stretch:Oi,popupAlign:zi,popupVisible:_n,getPopupContainer:Yt,popupClassName:ve()(er,(0,oe.Z)({},"".concat(hi,"-empty"),vr)),popupStyle:yn,getTriggerDOMNode:zr,onPopupVisibleChange:nr}),ur)},tt=Se.forwardRef(Ze),Ie=tt,_e=at(57879);function He(jt,Wt){var jn=jt.key,Cn;return"value"in jt&&(Cn=jt.value),jn!=null?jn:Cn!==void 0?Cn:"rc-index-key-".concat(Wt)}function rt(jt){return typeof jt!="undefined"&&!Number.isNaN(jt)}function St(jt,Wt){var jn=jt||{},Cn=jn.label,Jt=jn.value,_n=jn.options,ur=jn.groupLabel,ar=Cn||(Wt?"children":"label");return{label:ar,value:Jt||"value",options:_n||"options",groupLabel:ur||ar}}function Ct(jt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},jn=Wt.fieldNames,Cn=Wt.childrenAsData,Jt=[],_n=St(jn,!1),ur=_n.label,ar=_n.value,mr=_n.options,Bn=_n.groupLabel;function Un(er,Ar){Array.isArray(er)&&er.forEach(function(sr){if(Ar||!(mr in sr)){var mn=sr[ar];Jt.push({key:He(sr,Jt.length),groupOption:Ar,data:sr,label:sr[ur],value:mn})}else{var tr=sr[Bn];tr===void 0&&Cn&&(tr=sr.label),Jt.push({key:He(sr,Jt.length),group:!0,data:sr,label:tr}),Un(sr[mr],!0)}})}return Un(jt,!1),Jt}function Nt(jt){var Wt=(0,ze.Z)({},jt);return"props"in Wt||Object.defineProperty(Wt,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Wt}}),Wt}var Ot=function(Wt,jn,Cn){if(!jn||!jn.length)return null;var Jt=!1,_n=function ar(mr,Bn){var Un=(0,_e.Z)(Bn),er=Un[0],Ar=Un.slice(1);if(!er)return[mr];var sr=mr.split(er);return Jt=Jt||sr.length>1,sr.reduce(function(mn,tr){return[].concat((0,Dt.Z)(mn),(0,Dt.Z)(ar(tr,Ar)))},[]).filter(Boolean)},ur=_n(Wt,jn);return Jt?typeof Cn!="undefined"?ur.slice(0,Cn):ur:null},Rt=Se.createContext(null),$t=Rt;function qt(jt){var Wt=jt.visible,jn=jt.values;if(!Wt)return null;var Cn=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(jn.slice(0,Cn).map(function(Jt){var _n=Jt.label,ur=Jt.value;return["number","string"].includes((0,me.Z)(_n))?_n:ur}).join(", ")),jn.length>Cn?", ...":null)}var rn=["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"],Ht=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],sn=function(Wt){return Wt==="tags"||Wt==="multiple"},tn=Se.forwardRef(function(jt,Wt){var jn,Cn=jt.id,Jt=jt.prefixCls,_n=jt.className,ur=jt.showSearch,ar=jt.tagRender,mr=jt.direction,Bn=jt.omitDomProps,Un=jt.displayValues,er=jt.onDisplayValuesChange,Ar=jt.emptyOptions,sr=jt.notFoundContent,mn=sr===void 0?"Not Found":sr,tr=jt.onClear,Vr=jt.mode,pi=jt.disabled,zi=jt.loading,Yt=jt.getInputElement,vr=jt.getRawInputElement,zr=jt.open,nr=jt.defaultOpen,vi=jt.onDropdownVisibleChange,Qr=jt.activeValue,hi=jt.onActiveValueChange,$r=jt.activeDescendantId,si=jt.searchValue,bi=jt.autoClearSearchValue,pn=jt.onSearch,Oi=jt.onSearchSplit,yn=jt.tokenSeparators,Sr=jt.allowClear,li=jt.prefix,Jr=jt.suffixIcon,Hi=jt.clearIcon,ci=jt.OptionList,Hr=jt.animation,Ki=jt.transitionName,Qt=jt.dropdownStyle,wn=jt.dropdownClassName,Zt=jt.dropdownMatchSelectWidth,lt=jt.dropdownRender,On=jt.dropdownAlign,Sn=jt.placement,Hn=jt.builtinPlacements,$n=jt.getPopupContainer,Kn=jt.showAction,un=Kn===void 0?[]:Kn,Fn=jt.onFocus,zn=jt.onBlur,Ln=jt.onKeyUp,In=jt.onKeyDown,An=jt.onMouseDown,Vn=(0,fe.Z)(jt,rn),Wn=sn(Vr),ln=(ur!==void 0?ur:Wn)||Vr==="combobox",br=(0,ze.Z)({},Vn);Ht.forEach(function(io){delete br[io]}),Bn==null||Bn.forEach(function(io){delete br[io]});var Cr=Se.useState(!1),ri=(0,De.Z)(Cr,2),Er=ri[0],xi=ri[1];Se.useEffect(function(){xi((0,de.Z)())},[]);var gi=Se.useRef(null),Ci=Se.useRef(null),Si=Se.useRef(null),Bi=Se.useRef(null),Vi=Se.useRef(null),Xt=Se.useRef(!1),wi=ge(),qr=(0,De.Z)(wi,3),Wr=qr[0],Br=qr[1],Pi=qr[2];Se.useImperativeHandle(Wt,function(){var io,Ji;return{focus:(io=Bi.current)===null||io===void 0?void 0:io.focus,blur:(Ji=Bi.current)===null||Ji===void 0?void 0:Ji.blur,scrollTo:function(xr){var da;return(da=Vi.current)===null||da===void 0?void 0:da.scrollTo(xr)},nativeElement:gi.current||Ci.current}});var Ii=Se.useMemo(function(){var io;if(Vr!=="combobox")return si;var Ji=(io=Un[0])===null||io===void 0?void 0:io.value;return typeof Ji=="string"||typeof Ji=="number"?String(Ji):""},[si,Vr,Un]),Fi=Vr==="combobox"&&typeof Yt=="function"&&Yt()||null,ei=typeof vr=="function"&&vr(),$i=(0,z.x1)(Ci,ei==null||(jn=ei.props)===null||jn===void 0?void 0:jn.ref),_o=Se.useState(!1),fa=(0,De.Z)(_o,2),Ps=fa[0],wa=fa[1];(0,we.Z)(function(){wa(!0)},[]);var Ir=(0,ke.Z)(!1,{defaultValue:nr,value:zr}),Po=(0,De.Z)(Ir,2),bo=Po[0],ta=Po[1],Ao=Ps?bo:!1,Ko=!mn&&Ar;(pi||Ko&&Ao&&Vr==="combobox")&&(Ao=!1);var qn=Ko?!1:Ao,Or=Se.useCallback(function(io){var Ji=io!==void 0?io:!Ao;pi||(ta(Ji),Ao!==Ji&&(vi==null||vi(Ji)))},[pi,Ao,ta,vi]),Xr=Se.useMemo(function(){return(yn||[]).some(function(io){return[`
`,`\r
`].includes(io)})},[yn]),yi=Se.useContext($t)||{},Ei=yi.maxCount,to=yi.rawValues,Fr=function(Ji,sa,xr){if(!(Wn&&rt(Ei)&&(to==null?void 0:to.size)>=Ei)){var da=!0,Gt=Ji;hi==null||hi(null);var kn=Ot(Ji,yn,rt(Ei)?Ei-to.size:void 0),Hs=xr?null:kn;return Vr!=="combobox"&&Hs&&(Gt="",Oi==null||Oi(Hs),Or(!1),da=!1),pn&&Ii!==Gt&&pn(Gt,{source:sa?"typing":"effect"}),da}},Aa=function(Ji){!Ji||!Ji.trim()||pn(Ji,{source:"submit"})};Se.useEffect(function(){!Ao&&!Wn&&Vr!=="combobox"&&Fr("",!1,!1)},[Ao]),Se.useEffect(function(){bo&&pi&&ta(!1),pi&&!Xt.current&&Br(!1)},[pi]);var zo=Pe(),jo=(0,De.Z)(zo,2),Ni=jo[0],Vo=jo[1],ja=Se.useRef(!1),vo=function(Ji){var sa=Ni(),xr=Ji.key,da=xr==="Enter";if(da&&(Vr!=="combobox"&&Ji.preventDefault(),Ao||Or(!0)),Vo(!!Ii),xr==="Backspace"&&!sa&&Wn&&!Ii&&Un.length){for(var Gt=(0,Dt.Z)(Un),kn=null,Hs=Gt.length-1;Hs>=0;Hs-=1){var jl=Gt[Hs];if(!jl.disabled){Gt.splice(Hs,1),kn=jl;break}}kn&&er(Gt,{type:"remove",values:[kn]})}for(var Qo=arguments.length,Pa=new Array(Qo>1?Qo-1:0),Fs=1;Fs<Qo;Fs++)Pa[Fs-1]=arguments[Fs];if(Ao&&(!da||!ja.current)){var ol;da&&(ja.current=!0),(ol=Vi.current)===null||ol===void 0||ol.onKeyDown.apply(ol,[Ji].concat(Pa))}In==null||In.apply(void 0,[Ji].concat(Pa))},fs=function(Ji){for(var sa=arguments.length,xr=new Array(sa>1?sa-1:0),da=1;da<sa;da++)xr[da-1]=arguments[da];if(Ao){var Gt;(Gt=Vi.current)===null||Gt===void 0||Gt.onKeyUp.apply(Gt,[Ji].concat(xr))}Ji.key==="Enter"&&(ja.current=!1),Ln==null||Ln.apply(void 0,[Ji].concat(xr))},ds=function(Ji){var sa=Un.filter(function(xr){return xr!==Ji});er(sa,{type:"remove",values:[Ji]})},bs=function(){ja.current=!1},na=Se.useRef(!1),eh=function(){Br(!0),pi||(Fn&&!na.current&&Fn.apply(void 0,arguments),un.includes("focus")&&Or(!0)),na.current=!0},ju=function(){Xt.current=!0,Br(!1,function(){na.current=!1,Xt.current=!1,Or(!1)}),!pi&&(Ii&&(Vr==="tags"?pn(Ii,{source:"submit"}):Vr==="multiple"&&pn("",{source:"blur"})),zn&&zn.apply(void 0,arguments))},il=[];Se.useEffect(function(){return function(){il.forEach(function(io){return clearTimeout(io)}),il.splice(0,il.length)}},[]);var Sl=function(Ji){var sa,xr=Ji.target,da=(sa=Si.current)===null||sa===void 0?void 0:sa.getPopupElement();if(da&&da.contains(xr)){var Gt=setTimeout(function(){var Qo=il.indexOf(Gt);if(Qo!==-1&&il.splice(Qo,1),Pi(),!Er&&!da.contains(document.activeElement)){var Pa;(Pa=Bi.current)===null||Pa===void 0||Pa.focus()}});il.push(Gt)}for(var kn=arguments.length,Hs=new Array(kn>1?kn-1:0),jl=1;jl<kn;jl++)Hs[jl-1]=arguments[jl];An==null||An.apply(void 0,[Ji].concat(Hs))},Os=Se.useState({}),Vl=(0,De.Z)(Os,2),th=Vl[1];function nh(){th({})}var Zo;ei&&(Zo=function(Ji){Or(Ji)}),je(function(){var io;return[gi.current,(io=Si.current)===null||io===void 0?void 0:io.getPopupElement()]},qn,Or,!!ei);var Ou=Se.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},jt),{},{notFoundContent:mn,open:Ao,triggerOpen:qn,id:Cn,showSearch:ln,multiple:Wn,toggleOpen:Or})},[jt,mn,qn,Ao,Cn,ln,Wn,Or]),rh=!!Jr||zi,Zl;rh&&(Zl=Se.createElement(ae,{className:ve()("".concat(Jt,"-arrow"),(0,oe.Z)({},"".concat(Jt,"-arrow-loading"),zi)),customizeIcon:Jr,customizeIconProps:{loading:zi,searchValue:Ii,open:Ao,focused:Wr,showSearch:ln}}));var uu=function(){var Ji;tr==null||tr(),(Ji=Bi.current)===null||Ji===void 0||Ji.focus(),er([],{type:"clear",values:Un}),Fr("",!1,!1)},Ca=ie(Jt,uu,Un,Sr,Hi,pi,Ii,Vr),Oa=Ca.allowClear,aa=Ca.clearIcon,ga=Se.createElement(ci,{ref:Vi}),Xl=ve()(Jt,_n,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(Jt,"-focused"),Wr),"".concat(Jt,"-multiple"),Wn),"".concat(Jt,"-single"),!Wn),"".concat(Jt,"-allow-clear"),Sr),"".concat(Jt,"-show-arrow"),rh),"".concat(Jt,"-disabled"),pi),"".concat(Jt,"-loading"),zi),"".concat(Jt,"-open"),Ao),"".concat(Jt,"-customize-input"),Fi),"".concat(Jt,"-show-search"),ln)),Ga=Se.createElement(Ie,{ref:Si,disabled:pi,prefixCls:Jt,visible:qn,popupElement:ga,animation:Hr,transitionName:Ki,dropdownStyle:Qt,dropdownClassName:wn,direction:mr,dropdownMatchSelectWidth:Zt,dropdownRender:lt,dropdownAlign:On,placement:Sn,builtinPlacements:Hn,getPopupContainer:$n,empty:Ar,getTriggerDOMNode:function(Ji){return Ci.current||Ji},onPopupVisibleChange:Zo,onPopupMouseEnter:nh},ei?Se.cloneElement(ei,{ref:$i}):Se.createElement(Qe,(0,ht.Z)({},jt,{domRef:Ci,prefixCls:Jt,inputElement:Fi,ref:Bi,id:Cn,prefix:li,showSearch:ln,autoClearSearchValue:bi,mode:Vr,activeDescendantId:$r,tagRender:ar,values:Un,open:Ao,onToggleOpen:Or,activeValue:Qr,searchValue:Ii,onSearch:Fr,onSearchSubmit:Aa,onRemove:ds,tokenWithEnter:Xr,onInputBlur:bs}))),co;return ei?co=Ga:co=Se.createElement("div",(0,ht.Z)({className:Xl},br,{ref:gi,onMouseDown:Sl,onKeyDown:vo,onKeyUp:fs,onFocus:eh,onBlur:ju}),Se.createElement(qt,{visible:Wr&&!Ao,values:Un}),Ga,Zl,Oa&&aa),Se.createElement(le.Provider,{value:Ou},co)}),Ut=tn,En=function(){return null};En.isSelectOptGroup=!0;var bn=En,Dn=function(){return null};Dn.isSelectOption=!0;var Qn=Dn,Pr=at(80547),Yn=at(2738),Mr=at(6790);function Ur(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var _r=["disabled","title","children","style","className"];function ni(jt){return typeof jt=="string"||typeof jt=="number"}var Li=function(Wt,jn){var Cn=ue(),Jt=Cn.prefixCls,_n=Cn.id,ur=Cn.open,ar=Cn.multiple,mr=Cn.mode,Bn=Cn.searchValue,Un=Cn.toggleOpen,er=Cn.notFoundContent,Ar=Cn.onPopupScroll,sr=Se.useContext($t),mn=sr.maxCount,tr=sr.flattenOptions,Vr=sr.onActiveValue,pi=sr.defaultActiveFirstOption,zi=sr.onSelect,Yt=sr.menuItemSelectedIcon,vr=sr.rawValues,zr=sr.fieldNames,nr=sr.virtual,vi=sr.direction,Qr=sr.listHeight,hi=sr.listItemHeight,$r=sr.optionRender,si="".concat(Jt,"-item"),bi=(0,Pr.Z)(function(){return tr},[ur,tr],function(Kn,un){return un[0]&&Kn[1]!==un[1]}),pn=Se.useRef(null),Oi=Se.useMemo(function(){return ar&&rt(mn)&&(vr==null?void 0:vr.size)>=mn},[ar,mn,vr==null?void 0:vr.size]),yn=function(un){un.preventDefault()},Sr=function(un){var Fn;(Fn=pn.current)===null||Fn===void 0||Fn.scrollTo(typeof un=="number"?{index:un}:un)},li=Se.useCallback(function(Kn){return mr==="combobox"?!1:vr.has(Kn)},[mr,(0,Dt.Z)(vr).toString(),vr.size]),Jr=function(un){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,zn=bi.length,Ln=0;Ln<zn;Ln+=1){var In=(un+Ln*Fn+zn)%zn,An=bi[In]||{},Vn=An.group,Wn=An.data;if(!Vn&&!(Wn!=null&&Wn.disabled)&&(li(Wn.value)||!Oi))return In}return-1},Hi=Se.useState(function(){return Jr(0)}),ci=(0,De.Z)(Hi,2),Hr=ci[0],Ki=ci[1],Qt=function(un){var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ki(un);var zn={source:Fn?"keyboard":"mouse"},Ln=bi[un];if(!Ln){Vr(null,-1,zn);return}Vr(Ln.value,un,zn)};(0,Se.useEffect)(function(){Qt(pi!==!1?Jr(0):-1)},[bi.length,Bn]);var wn=Se.useCallback(function(Kn){return mr==="combobox"?String(Kn).toLowerCase()===Bn.toLowerCase():vr.has(Kn)},[mr,Bn,(0,Dt.Z)(vr).toString(),vr.size]);(0,Se.useEffect)(function(){var Kn=setTimeout(function(){if(!ar&&ur&&vr.size===1){var Fn=Array.from(vr)[0],zn=bi.findIndex(function(Ln){var In=Ln.data;return Bn?String(In.value).startsWith(Bn):In.value===Fn});zn!==-1&&(Qt(zn),Sr(zn))}});if(ur){var un;(un=pn.current)===null||un===void 0||un.scrollTo(void 0)}return function(){return clearTimeout(Kn)}},[ur,Bn]);var Zt=function(un){un!==void 0&&zi(un,{selected:!vr.has(un)}),ar||Un(!1)};if(Se.useImperativeHandle(jn,function(){return{onKeyDown:function(un){var Fn=un.which,zn=un.ctrlKey;switch(Fn){case Be.Z.N:case Be.Z.P:case Be.Z.UP:case Be.Z.DOWN:{var Ln=0;if(Fn===Be.Z.UP?Ln=-1:Fn===Be.Z.DOWN?Ln=1:Ur()&&zn&&(Fn===Be.Z.N?Ln=1:Fn===Be.Z.P&&(Ln=-1)),Ln!==0){var In=Jr(Hr+Ln,Ln);Sr(In),Qt(In,!0)}break}case Be.Z.TAB:case Be.Z.ENTER:{var An,Vn=bi[Hr];Vn&&!(Vn!=null&&(An=Vn.data)!==null&&An!==void 0&&An.disabled)&&!Oi?Zt(Vn.value):Zt(void 0),ur&&un.preventDefault();break}case Be.Z.ESC:Un(!1),ur&&un.stopPropagation()}},onKeyUp:function(){},scrollTo:function(un){Sr(un)}}}),bi.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(_n,"_list"),className:"".concat(si,"-empty"),onMouseDown:yn},er);var lt=Object.keys(zr).map(function(Kn){return zr[Kn]}),On=function(un){return un.label};function Sn(Kn,un){var Fn=Kn.group;return{role:Fn?"presentation":"option",id:"".concat(_n,"_list_").concat(un)}}var Hn=function(un){var Fn=bi[un];if(!Fn)return null;var zn=Fn.data||{},Ln=zn.value,In=Fn.group,An=(0,Ne.Z)(zn,!0),Vn=On(Fn);return Fn?Se.createElement("div",(0,ht.Z)({"aria-label":typeof Vn=="string"&&!In?Vn:null},An,{key:un},Sn(Fn,un),{"aria-selected":wn(Ln)}),Ln):null},$n={role:"listbox",id:"".concat(_n,"_list")};return Se.createElement(Se.Fragment,null,nr&&Se.createElement("div",(0,ht.Z)({},$n,{style:{height:0,width:0,overflow:"hidden"}}),Hn(Hr-1),Hn(Hr),Hn(Hr+1)),Se.createElement(Mr.Z,{itemKey:"key",ref:pn,data:bi,height:Qr,itemHeight:hi,fullHeight:!1,onMouseDown:yn,onScroll:Ar,virtual:nr,direction:vi,innerProps:nr?null:$n},function(Kn,un){var Fn=Kn.group,zn=Kn.groupOption,Ln=Kn.data,In=Kn.label,An=Kn.value,Vn=Ln.key;if(Fn){var Wn,ln=(Wn=Ln.title)!==null&&Wn!==void 0?Wn:ni(In)?In.toString():void 0;return Se.createElement("div",{className:ve()(si,"".concat(si,"-group"),Ln.className),title:ln},In!==void 0?In:Vn)}var br=Ln.disabled,Cr=Ln.title,ri=Ln.children,Er=Ln.style,xi=Ln.className,gi=(0,fe.Z)(Ln,_r),Ci=(0,Yn.Z)(gi,lt),Si=li(An),Bi=br||!Si&&Oi,Vi="".concat(si,"-option"),Xt=ve()(si,Vi,xi,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(Vi,"-grouped"),zn),"".concat(Vi,"-active"),Hr===un&&!Bi),"".concat(Vi,"-disabled"),Bi),"".concat(Vi,"-selected"),Si)),wi=On(Kn),qr=!Yt||typeof Yt=="function"||Si,Wr=typeof wi=="number"?wi:wi||An,Br=ni(Wr)?Wr.toString():void 0;return Cr!==void 0&&(Br=Cr),Se.createElement("div",(0,ht.Z)({},(0,Ne.Z)(Ci),nr?{}:Sn(Kn,un),{"aria-selected":wn(An),className:Xt,title:Br,onMouseMove:function(){Hr===un||Bi||Qt(un)},onClick:function(){Bi||Zt(An)},style:Er}),Se.createElement("div",{className:"".concat(Vi,"-content")},typeof $r=="function"?$r(Kn,{index:un}):Wr),Se.isValidElement(Yt)||Si,qr&&Se.createElement(ae,{className:"".concat(si,"-option-state"),customizeIcon:Yt,customizeIconProps:{value:An,disabled:Bi,isSelected:Si}},Si?"\u2713":null))}))},_i=Se.forwardRef(Li),Di=_i,ui=function(jt,Wt){var jn=Se.useRef({values:new Map,options:new Map}),Cn=Se.useMemo(function(){var _n=jn.current,ur=_n.values,ar=_n.options,mr=jt.map(function(er){if(er.label===void 0){var Ar;return(0,ze.Z)((0,ze.Z)({},er),{},{label:(Ar=ur.get(er.value))===null||Ar===void 0?void 0:Ar.label})}return er}),Bn=new Map,Un=new Map;return mr.forEach(function(er){Bn.set(er.value,er),Un.set(er.value,Wt.get(er.value)||ar.get(er.value))}),jn.current.values=Bn,jn.current.options=Un,mr},[jt,Wt]),Jt=Se.useCallback(function(_n){return Wt.get(_n)||jn.current.options.get(_n)},[Wt]);return[Cn,Jt]};function Wi(jt,Wt){return st(jt).join("").toUpperCase().includes(Wt)}var et=function(jt,Wt,jn,Cn,Jt){return Se.useMemo(function(){if(!jn||Cn===!1)return jt;var _n=Wt.options,ur=Wt.label,ar=Wt.value,mr=[],Bn=typeof Cn=="function",Un=jn.toUpperCase(),er=Bn?Cn:function(sr,mn){return Jt?Wi(mn[Jt],Un):mn[_n]?Wi(mn[ur!=="children"?ur:"label"],Un):Wi(mn[ar],Un)},Ar=Bn?function(sr){return Nt(sr)}:function(sr){return sr};return jt.forEach(function(sr){if(sr[_n]){var mn=er(jn,Ar(sr));if(mn)mr.push(sr);else{var tr=sr[_n].filter(function(Vr){return er(jn,Ar(Vr))});tr.length&&mr.push((0,ze.Z)((0,ze.Z)({},sr),{},(0,oe.Z)({},_n,tr)))}return}er(jn,Ar(sr))&&mr.push(sr)}),mr},[jt,Cn,Jt,jn,Wt])},jr=at(6551),dr=at(11592),Ai=["children","value"],lr=["children"];function yr(jt){var Wt=jt,jn=Wt.key,Cn=Wt.props,Jt=Cn.children,_n=Cn.value,ur=(0,fe.Z)(Cn,Ai);return(0,ze.Z)({key:jn,value:_n!==void 0?_n:jn,children:Jt},ur)}function Lr(jt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,dr.Z)(jt).map(function(jn,Cn){if(!Se.isValidElement(jn)||!jn.type)return null;var Jt=jn,_n=Jt.type.isSelectOptGroup,ur=Jt.key,ar=Jt.props,mr=ar.children,Bn=(0,fe.Z)(ar,lr);return Wt||!_n?yr(jn):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(ur===null?Cn:ur,"__"),label:ur},Bn),{},{options:Lr(mr)})}).filter(function(jn){return jn})}var uo=function(Wt,jn,Cn,Jt,_n){return Se.useMemo(function(){var ur=Wt,ar=!Wt;ar&&(ur=Lr(jn));var mr=new Map,Bn=new Map,Un=function(sr,mn,tr){tr&&typeof tr=="string"&&sr.set(mn[tr],mn)},er=function Ar(sr){for(var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tr=0;tr<sr.length;tr+=1){var Vr=sr[tr];!Vr[Cn.options]||mn?(mr.set(Vr[Cn.value],Vr),Un(Bn,Vr,Cn.label),Un(Bn,Vr,Jt),Un(Bn,Vr,_n)):Ar(Vr[Cn.options],!0)}};return er(ur),{options:ur,valueOptions:mr,labelOptions:Bn}},[Wt,jn,Cn,Jt,_n])},on=uo;function dn(jt){var Wt=Se.useRef();Wt.current=jt;var jn=Se.useCallback(function(){return Wt.current.apply(Wt,arguments)},[]);return jn}function en(jt){var Wt=jt.mode,jn=jt.options,Cn=jt.children,Jt=jt.backfill,_n=jt.allowClear,ur=jt.placeholder,ar=jt.getInputElement,mr=jt.showSearch,Bn=jt.onSearch,Un=jt.defaultOpen,er=jt.autoFocus,Ar=jt.labelInValue,sr=jt.value,mn=jt.inputValue,tr=jt.optionLabelProp,Vr=isMultiple(Wt),pi=mr!==void 0?mr:Vr||Wt==="combobox",zi=jn||convertChildrenToData(Cn);if(warning(Wt!=="tags"||zi.every(function(nr){return!nr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Wt==="tags"||Wt==="combobox"){var Yt=zi.some(function(nr){return nr.options?nr.options.some(function(vi){return typeof("value"in vi?vi.value:vi.key)=="number"}):typeof("value"in nr?nr.value:nr.key)=="number"});warning(!Yt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Wt!=="combobox"||!tr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Wt==="combobox"||!Jt,"`backfill` only works with `combobox` mode."),warning(Wt==="combobox"||!ar,"`getInputElement` only work with `combobox` mode."),noteOnce(Wt!=="combobox"||!ar||!_n||!ur,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Bn&&!pi&&Wt!=="combobox"&&Wt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Un||er,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),sr!=null){var vr=toArray(sr);warning(!Ar||vr.every(function(nr){return _typeof(nr)==="object"&&("key"in nr||"value"in nr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Vr||Array.isArray(sr),"`value` should be array when `mode` is `multiple` or `tags`")}if(Cn){var zr=null;toNodeArray(Cn).some(function(nr){if(!React.isValidElement(nr)||!nr.type)return!1;var vi=nr,Qr=vi.type;if(Qr.isSelectOption)return!1;if(Qr.isSelectOptGroup){var hi=toNodeArray(nr.props.children).every(function($r){return!React.isValidElement($r)||!nr.type||$r.type.isSelectOption?!0:(zr=$r.type,!1)});return!hi}return zr=Qr,!0}),zr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(zr.displayName||zr.name||zr,"`.")),warning(mn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function vn(jt,Wt){if(jt){var jn=function Cn(Jt){for(var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ur=0;ur<Jt.length;ur++){var ar=Jt[ur];if(ar[Wt==null?void 0:Wt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!_n&&Array.isArray(ar[Wt==null?void 0:Wt.options])&&Cn(ar[Wt==null?void 0:Wt.options],!0))break}};jn(jt)}}var fr=null,cr=["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"],oi=["inputValue"];function an(jt){return!jt||(0,me.Z)(jt)!=="object"}var Nn=Se.forwardRef(function(jt,Wt){var jn=jt.id,Cn=jt.mode,Jt=jt.prefixCls,_n=Jt===void 0?"rc-select":Jt,ur=jt.backfill,ar=jt.fieldNames,mr=jt.inputValue,Bn=jt.searchValue,Un=jt.onSearch,er=jt.autoClearSearchValue,Ar=er===void 0?!0:er,sr=jt.onSelect,mn=jt.onDeselect,tr=jt.dropdownMatchSelectWidth,Vr=tr===void 0?!0:tr,pi=jt.filterOption,zi=jt.filterSort,Yt=jt.optionFilterProp,vr=jt.optionLabelProp,zr=jt.options,nr=jt.optionRender,vi=jt.children,Qr=jt.defaultActiveFirstOption,hi=jt.menuItemSelectedIcon,$r=jt.virtual,si=jt.direction,bi=jt.listHeight,pn=bi===void 0?200:bi,Oi=jt.listItemHeight,yn=Oi===void 0?20:Oi,Sr=jt.labelRender,li=jt.value,Jr=jt.defaultValue,Hi=jt.labelInValue,ci=jt.onChange,Hr=jt.maxCount,Ki=(0,fe.Z)(jt,cr),Qt=(0,jr.ZP)(jn),wn=sn(Cn),Zt=!!(!zr&&vi),lt=Se.useMemo(function(){return pi===void 0&&Cn==="combobox"?!1:pi},[pi,Cn]),On=Se.useMemo(function(){return St(ar,Zt)},[JSON.stringify(ar),Zt]),Sn=(0,ke.Z)("",{value:Bn!==void 0?Bn:mr,postState:function(Xr){return Xr||""}}),Hn=(0,De.Z)(Sn,2),$n=Hn[0],Kn=Hn[1],un=on(zr,vi,On,Yt,vr),Fn=un.valueOptions,zn=un.labelOptions,Ln=un.options,In=Se.useCallback(function(Or){var Xr=st(Or);return Xr.map(function(yi){var Ei,to,Fr,Aa,zo;if(an(yi))Ei=yi;else{var jo;Fr=yi.key,to=yi.label,Ei=(jo=yi.value)!==null&&jo!==void 0?jo:Fr}var Ni=Fn.get(Ei);if(Ni){var Vo;if(to===void 0&&(to=Ni==null?void 0:Ni[vr||On.label]),Fr===void 0&&(Fr=(Vo=Ni==null?void 0:Ni.key)!==null&&Vo!==void 0?Vo:Ei),Aa=Ni==null?void 0:Ni.disabled,zo=Ni==null?void 0:Ni.title,0)var ja}return{label:to,value:Ei,key:Fr,disabled:Aa,title:zo}})},[On,vr,Fn]),An=(0,ke.Z)(Jr,{value:li}),Vn=(0,De.Z)(An,2),Wn=Vn[0],ln=Vn[1],br=Se.useMemo(function(){var Or,Xr=wn&&Wn===null?[]:Wn,yi=In(Xr);return Cn==="combobox"&&nt((Or=yi[0])===null||Or===void 0?void 0:Or.value)?[]:yi},[Wn,In,Cn,wn]),Cr=ui(br,Fn),ri=(0,De.Z)(Cr,2),Er=ri[0],xi=ri[1],gi=Se.useMemo(function(){if(!Cn&&Er.length===1){var Or=Er[0];if(Or.value===null&&(Or.label===null||Or.label===void 0))return[]}return Er.map(function(Xr){var yi;return(0,ze.Z)((0,ze.Z)({},Xr),{},{label:(yi=typeof Sr=="function"?Sr(Xr):Xr.label)!==null&&yi!==void 0?yi:Xr.value})})},[Cn,Er,Sr]),Ci=Se.useMemo(function(){return new Set(Er.map(function(Or){return Or.value}))},[Er]);Se.useEffect(function(){if(Cn==="combobox"){var Or,Xr=(Or=Er[0])===null||Or===void 0?void 0:Or.value;Kn($e(Xr)?String(Xr):"")}},[Er]);var Si=dn(function(Or,Xr){var yi=Xr!=null?Xr:Or;return(0,oe.Z)((0,oe.Z)({},On.value,Or),On.label,yi)}),Bi=Se.useMemo(function(){if(Cn!=="tags")return Ln;var Or=(0,Dt.Z)(Ln),Xr=function(Ei){return Fn.has(Ei)};return(0,Dt.Z)(Er).sort(function(yi,Ei){return yi.value<Ei.value?-1:1}).forEach(function(yi){var Ei=yi.value;Xr(Ei)||Or.push(Si(Ei,yi.label))}),Or},[Si,Ln,Fn,Er,Cn]),Vi=et(Bi,On,$n,lt,Yt),Xt=Se.useMemo(function(){return Cn!=="tags"||!$n||Vi.some(function(Or){return Or[Yt||"value"]===$n})||Vi.some(function(Or){return Or[On.value]===$n})?Vi:[Si($n)].concat((0,Dt.Z)(Vi))},[Si,Yt,Cn,Vi,$n,On]),wi=function Or(Xr){var yi=(0,Dt.Z)(Xr).sort(function(Ei,to){return zi(Ei,to,{searchValue:$n})});return yi.map(function(Ei){return Array.isArray(Ei.options)?(0,ze.Z)((0,ze.Z)({},Ei),{},{options:Ei.options.length>0?Or(Ei.options):Ei.options}):Ei})},qr=Se.useMemo(function(){return zi?wi(Xt):Xt},[Xt,zi,$n]),Wr=Se.useMemo(function(){return Ct(qr,{fieldNames:On,childrenAsData:Zt})},[qr,On,Zt]),Br=function(Xr){var yi=In(Xr);if(ln(yi),ci&&(yi.length!==Er.length||yi.some(function(Fr,Aa){var zo;return((zo=Er[Aa])===null||zo===void 0?void 0:zo.value)!==(Fr==null?void 0:Fr.value)}))){var Ei=Hi?yi:yi.map(function(Fr){return Fr.value}),to=yi.map(function(Fr){return Nt(xi(Fr.value))});ci(wn?Ei:Ei[0],wn?to:to[0])}},Pi=Se.useState(null),Ii=(0,De.Z)(Pi,2),Fi=Ii[0],ei=Ii[1],$i=Se.useState(0),_o=(0,De.Z)($i,2),fa=_o[0],Ps=_o[1],wa=Qr!==void 0?Qr:Cn!=="combobox",Ir=Se.useCallback(function(Or,Xr){var yi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ei=yi.source,to=Ei===void 0?"keyboard":Ei;Ps(Xr),ur&&Cn==="combobox"&&Or!==null&&to==="keyboard"&&ei(String(Or))},[ur,Cn]),Po=function(Xr,yi,Ei){var to=function(){var ds,bs=xi(Xr);return[Hi?{label:bs==null?void 0:bs[On.label],value:Xr,key:(ds=bs==null?void 0:bs.key)!==null&&ds!==void 0?ds:Xr}:Xr,Nt(bs)]};if(yi&&sr){var Fr=to(),Aa=(0,De.Z)(Fr,2),zo=Aa[0],jo=Aa[1];sr(zo,jo)}else if(!yi&&mn&&Ei!=="clear"){var Ni=to(),Vo=(0,De.Z)(Ni,2),ja=Vo[0],vo=Vo[1];mn(ja,vo)}},bo=dn(function(Or,Xr){var yi,Ei=wn?Xr.selected:!0;Ei?yi=wn?[].concat((0,Dt.Z)(Er),[Or]):[Or]:yi=Er.filter(function(to){return to.value!==Or}),Br(yi),Po(Or,Ei),Cn==="combobox"?ei(""):(!sn||Ar)&&(Kn(""),ei(""))}),ta=function(Xr,yi){Br(Xr);var Ei=yi.type,to=yi.values;(Ei==="remove"||Ei==="clear")&&to.forEach(function(Fr){Po(Fr.value,!1,Ei)})},Ao=function(Xr,yi){if(Kn(Xr),ei(null),yi.source==="submit"){var Ei=(Xr||"").trim();if(Ei){var to=Array.from(new Set([].concat((0,Dt.Z)(Ci),[Ei])));Br(to),Po(Ei,!0),Kn("")}return}yi.source!=="blur"&&(Cn==="combobox"&&Br(Xr),Un==null||Un(Xr))},Ko=function(Xr){var yi=Xr;Cn!=="tags"&&(yi=Xr.map(function(to){var Fr=zn.get(to);return Fr==null?void 0:Fr.value}).filter(function(to){return to!==void 0}));var Ei=Array.from(new Set([].concat((0,Dt.Z)(Ci),(0,Dt.Z)(yi))));Br(Ei),Ei.forEach(function(to){Po(to,!0)})},qn=Se.useMemo(function(){var Or=$r!==!1&&Vr!==!1;return(0,ze.Z)((0,ze.Z)({},un),{},{flattenOptions:Wr,onActiveValue:Ir,defaultActiveFirstOption:wa,onSelect:bo,menuItemSelectedIcon:hi,rawValues:Ci,fieldNames:On,virtual:Or,direction:si,listHeight:pn,listItemHeight:yn,childrenAsData:Zt,maxCount:Hr,optionRender:nr})},[Hr,un,Wr,Ir,wa,bo,hi,Ci,On,$r,Vr,si,pn,yn,Zt,nr]);return Se.createElement($t.Provider,{value:qn},Se.createElement(Ut,(0,ht.Z)({},Ki,{id:Qt,prefixCls:_n,ref:Wt,omitDomProps:oi,mode:Cn,displayValues:gi,onDisplayValuesChange:ta,direction:si,searchValue:$n,onSearch:Ao,autoClearSearchValue:Ar,onSearchSplit:Ko,dropdownMatchSelectWidth:Vr,OptionList:Di,emptyOptions:!Wr.length,activeValue:Fi,activeDescendantId:"".concat(Qt,"_list_").concat(fa)})))}),gr=Nn;gr.Option=Qn,gr.OptGroup=bn;var Zr=gr,Xn=Zr},63158:function(gn,cn,at){"use strict";var ht=at(67711),Dt=at(52873),oe=at(16886),ze=at(33346),De=at(59301),fe=at(92310),me=at.n(fe),ke=at(18929),Ce=at(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Le=De.forwardRef(function(ve,we){var de,z=ve.prefixCls,ee=z===void 0?"rc-switch":z,ae=ve.className,ie=ve.checked,le=ve.defaultChecked,ue=ve.disabled,ge=ve.loadingIcon,Pe=ve.checkedChildren,je=ve.unCheckedChildren,Be=ve.onClick,Fe=ve.onChange,Ne=ve.onKeyDown,Ae=(0,ze.Z)(ve,Se),Re=(0,ke.Z)(!1,{value:ie,defaultValue:le}),We=(0,oe.Z)(Re,2),Ye=We[0],Ue=We[1];function Ve(Pt,$e){var nt=Ye;return ue||(nt=Pt,Ue(nt),Fe==null||Fe(nt,$e)),nt}function ot(Pt){Pt.which===Ce.Z.LEFT?Ve(!1,Pt):Pt.which===Ce.Z.RIGHT&&Ve(!0,Pt),Ne==null||Ne(Pt)}function st(Pt){var $e=Ve(!Ye,Pt);Be==null||Be($e,Pt)}var ct=me()(ee,ae,(de={},(0,Dt.Z)(de,"".concat(ee,"-checked"),Ye),(0,Dt.Z)(de,"".concat(ee,"-disabled"),ue),de));return De.createElement("button",(0,ht.Z)({},Ae,{type:"button",role:"switch","aria-checked":Ye,disabled:ue,className:ct,ref:we,onKeyDown:ot,onClick:st}),ge,De.createElement("span",{className:"".concat(ee,"-inner")},De.createElement("span",{className:"".concat(ee,"-inner-checked")},Pe),De.createElement("span",{className:"".concat(ee,"-inner-unchecked")},je)))});Le.displayName="Switch",cn.Z=Le},86351:function(gn,cn,at){"use strict";at.d(cn,{R:function(){return Dt},w:function(){return ht}});var ht={},Dt="rc-table-internal-hook"},97347:function(gn,cn,at){"use strict";at.d(cn,{L:function(){return ee},Z:function(){return ge}});var ht=at(16886),Dt=at(52873),oe=at(15142),ze=at(26420),De=at(98506),fe=at(33346),me=at(11592),ke=at(48736),Ce=at(59301),Se=at(86351),Le=at(54451);function ve(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?Pe*parseFloat(je)/100:null}function we(Pe,je,Be){return Ce.useMemo(function(){if(je&&je>0){var Fe=0,Ne=0;Pe.forEach(function(st){var ct=ve(je,st.width);ct?Fe+=ct:Ne+=1});var Ae=Math.max(je,Be),Re=Math.max(Ae-Fe,Ne),We=Ne,Ye=Re/Ne,Ue=0,Ve=Pe.map(function(st){var ct=(0,De.Z)({},st),Pt=ve(je,ct.width);if(Pt)ct.width=Pt;else{var $e=Math.floor(Ye);ct.width=We===1?Re:$e,Re-=$e,We-=1}return Ue+=ct.width,ct});if(Ue<Ae){var ot=Ae/Ue;Re=Ae,Ve.forEach(function(st,ct){var Pt=Math.floor(st.width*ot);st.width=ct===Ve.length-1?Re:Pt,Re-=Pt})}return[Ve,Math.max(Ue,Ae)]}return[Pe,je]},[Pe,je,Be])}var de=["children"],z=["fixed"];function ee(Pe){return(0,me.Z)(Pe).filter(function(je){return Ce.isValidElement(je)}).map(function(je){var Be=je.key,Fe=je.props,Ne=Fe.children,Ae=(0,fe.Z)(Fe,de),Re=(0,De.Z)({key:Be},Ae);return Ne&&(Re.children=ee(Ne)),Re})}function ae(Pe){return Pe.filter(function(je){return je&&(0,ze.Z)(je)==="object"&&!je.hidden}).map(function(je){var Be=je.children;return Be&&Be.length>0?(0,De.Z)((0,De.Z)({},je),{},{children:ae(Be)}):je})}function ie(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Pe.filter(function(Be){return Be&&(0,ze.Z)(Be)==="object"}).reduce(function(Be,Fe,Ne){var Ae=Fe.fixed,Re=Ae===!0?"left":Ae,We="".concat(je,"-").concat(Ne),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(Be),(0,oe.Z)(ie(Ye,We).map(function(Ue){return(0,De.Z)({fixed:Re},Ue)}))):[].concat((0,oe.Z)(Be),[(0,De.Z)((0,De.Z)({key:We},Fe),{},{fixed:Re})])},[])}function le(Pe){return Pe.map(function(je){var Be=je.fixed,Fe=(0,fe.Z)(je,z),Ne=Be;return Be==="left"?Ne="right":Be==="right"&&(Ne="left"),(0,De.Z)({fixed:Ne},Fe)})}function ue(Pe,je){var Be=Pe.prefixCls,Fe=Pe.columns,Ne=Pe.children,Ae=Pe.expandable,Re=Pe.expandedKeys,We=Pe.columnTitle,Ye=Pe.getRowKey,Ue=Pe.onTriggerExpand,Ve=Pe.expandIcon,ot=Pe.rowExpandable,st=Pe.expandIconColumnIndex,ct=Pe.direction,Pt=Pe.expandRowByClick,$e=Pe.columnWidth,nt=Pe.fixed,yt=Pe.scrollWidth,xt=Pe.clientWidth,wt=Ce.useMemo(function(){var Qe=Fe||ee(Ne)||[];return ae(Qe.slice())},[Fe,Ne]),dt=Ce.useMemo(function(){if(Ae){var Qe=wt.slice();if(!Qe.includes(Se.w)){var Ke=st||0;Ke>=0&&(Ke||nt==="left"||!nt)&&Qe.splice(Ke,0,Se.w),nt==="right"&&Qe.splice(wt.length,0,Se.w)}var xe=Qe.indexOf(Se.w);Qe=Qe.filter(function(Ie,_e){return Ie!==Se.w||_e===xe});var Me=wt[xe],Ze;nt?Ze=nt:Ze=Me?Me.fixed:null;var tt=(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},Le.v,{className:"".concat(Be,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",We),"fixed",Ze),"className","".concat(Be,"-row-expand-icon-cell")),"width",$e),"render",function(_e,He,rt){var St=Ye(He,rt),Ct=Re.has(St),Nt=ot?ot(He):!0,Ot=Ve({prefixCls:Be,expanded:Ct,expandable:Nt,record:He,onExpand:Ue});return Pt?Ce.createElement("span",{onClick:function($t){return $t.stopPropagation()}},Ot):Ot});return Qe.map(function(Ie){return Ie===Se.w?tt:Ie})}return wt.filter(function(Ie){return Ie!==Se.w})},[Ae,wt,Ye,Re,Ve,ct]),ft=Ce.useMemo(function(){var Qe=dt;return je&&(Qe=je(Qe)),Qe.length||(Qe=[{render:function(){return null}}]),Qe},[je,dt,ct]),ut=Ce.useMemo(function(){return ct==="rtl"?le(ie(ft)):ie(ft)},[ft,ct,yt]),Et=Ce.useMemo(function(){for(var Qe=-1,Ke=ut.length-1;Ke>=0;Ke-=1){var xe=ut[Ke].fixed;if(xe==="left"||xe===!0){Qe=Ke;break}}if(Qe>=0)for(var Me=0;Me<=Qe;Me+=1){var Ze=ut[Me].fixed;if(Ze!=="left"&&Ze!==!0)return!0}var tt=ut.findIndex(function(He){var rt=He.fixed;return rt==="right"});if(tt>=0)for(var Ie=tt;Ie<ut.length;Ie+=1){var _e=ut[Ie].fixed;if(_e!=="right")return!0}return!1},[ut]),mt=we(ut,yt,xt),vt=(0,ht.Z)(mt,2),kt=vt[0],pt=vt[1];return[ft,kt,pt,Et]}var ge=ue},4030:function(gn,cn,at){"use strict";at.d(cn,{w2:function(){return ht.w},vP:function(){return ni.v},RQ:function(){return ht.R},ER:function(){return St},Q$:function(){return pi},TN:function(){return ci}});var ht=at(86351),Dt=at(16886),oe=at(6089),ze=at(34280),De=at(13697),fe=at(59301),me=at(4676);function ke(Qt){var wn=fe.createContext(void 0),Zt=function(On){var Sn=On.value,Hn=On.children,$n=fe.useRef(Sn);$n.current=Sn;var Kn=fe.useState(function(){return{getValue:function(){return $n.current},listeners:new Set}}),un=(0,Dt.Z)(Kn,1),Fn=un[0];return(0,ze.Z)(function(){(0,me.unstable_batchedUpdates)(function(){Fn.listeners.forEach(function(zn){zn(Sn)})})},[Sn]),fe.createElement(wn.Provider,{value:Fn},Hn)};return{Context:wn,Provider:Zt,defaultValue:Qt}}function Ce(Qt,wn){var Zt=(0,oe.Z)(typeof wn=="function"?wn:function(zn){if(wn===void 0)return zn;if(!Array.isArray(wn))return zn[wn];var Ln={};return wn.forEach(function(In){Ln[In]=zn[In]}),Ln}),lt=fe.useContext(Qt==null?void 0:Qt.Context),On=lt||{},Sn=On.listeners,Hn=On.getValue,$n=fe.useRef();$n.current=Zt(lt?Hn():Qt==null?void 0:Qt.defaultValue);var Kn=fe.useState({}),un=(0,Dt.Z)(Kn,2),Fn=un[1];return(0,ze.Z)(function(){if(!lt)return;function zn(Ln){var In=Zt(Ln);(0,De.Z)($n.current,In,!0)||Fn({})}return Sn.add(zn),function(){Sn.delete(zn)}},[lt]),$n.current}var Se=at(67711),Le=at(8654);function ve(){var Qt=fe.createContext(null);function wn(){return fe.useContext(Qt)}function Zt(On,Sn){var Hn=(0,Le.Yr)(On),$n=function(un,Fn){var zn=Hn?{ref:Fn}:{},Ln=fe.useRef(0),In=fe.useRef(un),An=wn();return An!==null?fe.createElement(On,(0,Se.Z)({},un,zn)):((!Sn||Sn(In.current,un))&&(Ln.current+=1),In.current=un,fe.createElement(Qt.Provider,{value:Ln.current},fe.createElement(On,(0,Se.Z)({},un,zn))))};return Hn?fe.forwardRef($n):$n}function lt(On,Sn){var Hn=(0,Le.Yr)(On),$n=function(un,Fn){var zn=Hn?{ref:Fn}:{};return wn(),fe.createElement(On,(0,Se.Z)({},un,zn))};return Hn?fe.memo(fe.forwardRef($n),Sn):fe.memo($n,Sn)}return{makeImmutable:Zt,responseImmutable:lt,useImmutableMark:wn}}var we=ve(),de=we.makeImmutable,z=we.responseImmutable,ee=we.useImmutableMark,ae=ve(),ie=ae.makeImmutable,le=ae.responseImmutable,ue=ae.useImmutableMark,ge=ke(),Pe=ge;function je(Qt,wn){var Zt=React.useRef(0);Zt.current+=1;var lt=React.useRef(Qt),On=[];Object.keys(Qt||{}).map(function(Hn){var $n;(Qt==null?void 0:Qt[Hn])!==(($n=lt.current)===null||$n===void 0?void 0:$n[Hn])&&On.push(Hn)}),lt.current=Qt;var Sn=React.useRef([]);return On.length&&(Sn.current=On),React.useDebugValue(Zt.current),React.useDebugValue(Sn.current.join(", ")),wn&&console.log("".concat(wn,":"),Zt.current,Sn.current),Zt.current}var Be=null,Fe=null,Ne=at(26420),Ae=at(98506),Re=at(52873),We=at(92310),Ye=at.n(We),Ue=at(80547),Ve=at(97938),ot=at(48736),st=fe.createContext({renderWithProps:!1}),ct=st,Pt="RC_TABLE_KEY";function $e(Qt){return Qt==null?[]:Array.isArray(Qt)?Qt:[Qt]}function nt(Qt){var wn=[],Zt={};return Qt.forEach(function(lt){for(var On=lt||{},Sn=On.key,Hn=On.dataIndex,$n=Sn||$e(Hn).join("-")||Pt;Zt[$n];)$n="".concat($n,"_next");Zt[$n]=!0,wn.push($n)}),wn}function yt(Qt){return Qt!=null}function xt(Qt){return typeof Qt=="number"&&!Number.isNaN(Qt)}function wt(Qt){return Qt&&(0,Ne.Z)(Qt)==="object"&&!Array.isArray(Qt)&&!fe.isValidElement(Qt)}function dt(Qt,wn,Zt,lt,On,Sn){var Hn=fe.useContext(ct),$n=ue(),Kn=(0,Ue.Z)(function(){if(yt(lt))return[lt];var un=wn==null||wn===""?[]:Array.isArray(wn)?wn:[wn],Fn=(0,Ve.Z)(Qt,un),zn=Fn,Ln=void 0;if(On){var In=On(Fn,Qt,Zt);wt(In)?(zn=In.children,Ln=In.props,Hn.renderWithProps=!0):zn=In}return[zn,Ln]},[$n,Qt,lt,wn,On,Zt],function(un,Fn){if(Sn){var zn=(0,Dt.Z)(un,2),Ln=zn[1],In=(0,Dt.Z)(Fn,2),An=In[1];return Sn(An,Ln)}return Hn.renderWithProps?!0:!(0,De.Z)(un,Fn,!0)});return Kn}function ft(Qt,wn,Zt,lt){var On=Qt+wn-1;return Qt<=lt&&On>=Zt}function ut(Qt,wn){return Ce(Pe,function(Zt){var lt=ft(Qt,wn||1,Zt.hoverStartRow,Zt.hoverEndRow);return[lt,Zt.onHover]})}var Et=at(70425),mt=function(wn){var Zt=wn.ellipsis,lt=wn.rowType,On=wn.children,Sn,Hn=Zt===!0?{showTitle:!0}:Zt;return Hn&&(Hn.showTitle||lt==="header")&&(typeof On=="string"||typeof On=="number"?Sn=On.toString():fe.isValidElement(On)&&typeof On.props.children=="string"&&(Sn=On.props.children)),Sn};function vt(Qt){var wn,Zt,lt,On,Sn,Hn,$n,Kn,un=Qt.component,Fn=Qt.children,zn=Qt.ellipsis,Ln=Qt.scope,In=Qt.prefixCls,An=Qt.className,Vn=Qt.align,Wn=Qt.record,ln=Qt.render,br=Qt.dataIndex,Cr=Qt.renderIndex,ri=Qt.shouldCellUpdate,Er=Qt.index,xi=Qt.rowType,gi=Qt.colSpan,Ci=Qt.rowSpan,Si=Qt.fixLeft,Bi=Qt.fixRight,Vi=Qt.firstFixLeft,Xt=Qt.lastFixLeft,wi=Qt.firstFixRight,qr=Qt.lastFixRight,Wr=Qt.appendNode,Br=Qt.additionalProps,Pi=Br===void 0?{}:Br,Ii=Qt.isSticky,Fi="".concat(In,"-cell"),ei=Ce(Pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),$i=ei.supportSticky,_o=ei.allColumnsFixedLeft,fa=ei.rowHoverable,Ps=dt(Wn,br,Cr,Fn,ln,ri),wa=(0,Dt.Z)(Ps,2),Ir=wa[0],Po=wa[1],bo={},ta=typeof Si=="number"&&$i,Ao=typeof Bi=="number"&&$i;ta&&(bo.position="sticky",bo.left=Si),Ao&&(bo.position="sticky",bo.right=Bi);var Ko=(wn=(Zt=(lt=Po==null?void 0:Po.colSpan)!==null&&lt!==void 0?lt:Pi.colSpan)!==null&&Zt!==void 0?Zt:gi)!==null&&wn!==void 0?wn:1,qn=(On=(Sn=(Hn=Po==null?void 0:Po.rowSpan)!==null&&Hn!==void 0?Hn:Pi.rowSpan)!==null&&Sn!==void 0?Sn:Ci)!==null&&On!==void 0?On:1,Or=ut(Er,qn),Xr=(0,Dt.Z)(Or,2),yi=Xr[0],Ei=Xr[1],to=(0,Et.zX)(function(ja){var vo;Wn&&Ei(Er,Er+qn-1),Pi==null||(vo=Pi.onMouseEnter)===null||vo===void 0||vo.call(Pi,ja)}),Fr=(0,Et.zX)(function(ja){var vo;Wn&&Ei(-1,-1),Pi==null||(vo=Pi.onMouseLeave)===null||vo===void 0||vo.call(Pi,ja)});if(Ko===0||qn===0)return null;var Aa=($n=Pi.title)!==null&&$n!==void 0?$n:mt({rowType:xi,ellipsis:zn,children:Ir}),zo=Ye()(Fi,An,(Kn={},(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)(Kn,"".concat(Fi,"-fix-left"),ta&&$i),"".concat(Fi,"-fix-left-first"),Vi&&$i),"".concat(Fi,"-fix-left-last"),Xt&&$i),"".concat(Fi,"-fix-left-all"),Xt&&_o&&$i),"".concat(Fi,"-fix-right"),Ao&&$i),"".concat(Fi,"-fix-right-first"),wi&&$i),"".concat(Fi,"-fix-right-last"),qr&&$i),"".concat(Fi,"-ellipsis"),zn),"".concat(Fi,"-with-append"),Wr),"".concat(Fi,"-fix-sticky"),(ta||Ao)&&Ii&&$i),(0,Re.Z)(Kn,"".concat(Fi,"-row-hover"),!Po&&yi)),Pi.className,Po==null?void 0:Po.className),jo={};Vn&&(jo.textAlign=Vn);var Ni=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Po==null?void 0:Po.style),bo),jo),Pi.style),Vo=Ir;return(0,Ne.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!fe.isValidElement(Vo)&&(Vo=null),zn&&(Xt||wi)&&(Vo=fe.createElement("span",{className:"".concat(Fi,"-content")},Vo)),fe.createElement(un,(0,Se.Z)({},Po,Pi,{className:zo,style:Ni,title:Aa,scope:Ln,onMouseEnter:fa?to:void 0,onMouseLeave:fa?Fr:void 0,colSpan:Ko!==1?Ko:null,rowSpan:qn!==1?qn:null}),Wr,Vo)}var kt=fe.memo(vt);function pt(Qt,wn,Zt,lt,On){var Sn=Zt[Qt]||{},Hn=Zt[wn]||{},$n,Kn;Sn.fixed==="left"?$n=lt.left[On==="rtl"?wn:Qt]:Hn.fixed==="right"&&(Kn=lt.right[On==="rtl"?Qt:wn]);var un=!1,Fn=!1,zn=!1,Ln=!1,In=Zt[wn+1],An=Zt[Qt-1],Vn=In&&!In.fixed||An&&!An.fixed||Zt.every(function(ri){return ri.fixed==="left"});if(On==="rtl"){if($n!==void 0){var Wn=An&&An.fixed==="left";Ln=!Wn&&Vn}else if(Kn!==void 0){var ln=In&&In.fixed==="right";zn=!ln&&Vn}}else if($n!==void 0){var br=In&&In.fixed==="left";un=!br&&Vn}else if(Kn!==void 0){var Cr=An&&An.fixed==="right";Fn=!Cr&&Vn}return{fixLeft:$n,fixRight:Kn,lastFixLeft:un,firstFixRight:Fn,lastFixRight:zn,firstFixLeft:Ln,isSticky:lt.isSticky}}var Qe=fe.createContext({}),Ke=Qe;function xe(Qt){var wn=Qt.className,Zt=Qt.index,lt=Qt.children,On=Qt.colSpan,Sn=On===void 0?1:On,Hn=Qt.rowSpan,$n=Qt.align,Kn=Ce(Pe,["prefixCls","direction"]),un=Kn.prefixCls,Fn=Kn.direction,zn=fe.useContext(Ke),Ln=zn.scrollColumnIndex,In=zn.stickyOffsets,An=zn.flattenColumns,Vn=Zt+Sn-1,Wn=Vn+1===Ln?Sn+1:Sn,ln=pt(Zt,Zt+Wn-1,An,In,Fn);return fe.createElement(kt,(0,Se.Z)({className:wn,index:Zt,component:"td",prefixCls:un,record:null,dataIndex:null,align:$n,colSpan:Wn,rowSpan:Hn,render:function(){return lt}},ln))}var Me=at(33346),Ze=["children"];function tt(Qt){var wn=Qt.children,Zt=(0,Me.Z)(Qt,Ze);return fe.createElement("tr",Zt,wn)}function Ie(Qt){var wn=Qt.children;return wn}Ie.Row=tt,Ie.Cell=xe;var _e=Ie;function He(Qt){var wn=Qt.children,Zt=Qt.stickyOffsets,lt=Qt.flattenColumns,On=Ce(Pe,"prefixCls"),Sn=lt.length-1,Hn=lt[Sn],$n=fe.useMemo(function(){return{stickyOffsets:Zt,flattenColumns:lt,scrollColumnIndex:Hn!=null&&Hn.scrollbar?Sn:null}},[Hn,lt,Sn,Zt]);return fe.createElement(Ke.Provider,{value:$n},fe.createElement("tfoot",{className:"".concat(On,"-summary")},wn))}var rt=le(He),St=_e,Ct=at(29301),Nt=at(24514),Ot=at(75152),Rt=at(26112);function $t(Qt,wn,Zt,lt,On,Sn,Hn){Qt.push({record:wn,indent:Zt,index:Hn});var $n=Sn(wn),Kn=On==null?void 0:On.has($n);if(wn&&Array.isArray(wn[lt])&&Kn)for(var un=0;un<wn[lt].length;un+=1)$t(Qt,wn[lt][un],Zt+1,lt,On,Sn,un)}function qt(Qt,wn,Zt,lt){var On=fe.useMemo(function(){if(Zt!=null&&Zt.size){for(var Sn=[],Hn=0;Hn<(Qt==null?void 0:Qt.length);Hn+=1){var $n=Qt[Hn];$t(Sn,$n,0,wn,Zt,lt,Hn)}return Sn}return Qt==null?void 0:Qt.map(function(Kn,un){return{record:Kn,indent:0,index:un}})},[Qt,wn,Zt,lt]);return On}function rn(Qt,wn,Zt,lt){var On=Ce(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Sn=On.flattenColumns,Hn=On.expandableType,$n=On.expandedKeys,Kn=On.childrenColumnName,un=On.onTriggerExpand,Fn=On.rowExpandable,zn=On.onRow,Ln=On.expandRowByClick,In=On.rowClassName,An=Hn==="nest",Vn=Hn==="row"&&(!Fn||Fn(Qt)),Wn=Vn||An,ln=$n&&$n.has(wn),br=Kn&&Qt&&Qt[Kn],Cr=(0,Et.zX)(un),ri=zn==null?void 0:zn(Qt,Zt),Er=ri==null?void 0:ri.onClick,xi=function(Bi){Ln&&Wn&&un(Qt,Bi);for(var Vi=arguments.length,Xt=new Array(Vi>1?Vi-1:0),wi=1;wi<Vi;wi++)Xt[wi-1]=arguments[wi];Er==null||Er.apply(void 0,[Bi].concat(Xt))},gi;typeof In=="string"?gi=In:typeof In=="function"&&(gi=In(Qt,Zt,lt));var Ci=nt(Sn);return(0,Ae.Z)((0,Ae.Z)({},On),{},{columnsKey:Ci,nestExpandable:An,expanded:ln,hasNestChildren:br,record:Qt,onTriggerExpand:Cr,rowSupportExpand:Vn,expandable:Wn,rowProps:(0,Ae.Z)((0,Ae.Z)({},ri),{},{className:Ye()(gi,ri==null?void 0:ri.className),onClick:xi})})}function Ht(Qt){var wn=Qt.prefixCls,Zt=Qt.children,lt=Qt.component,On=Qt.cellComponent,Sn=Qt.className,Hn=Qt.expanded,$n=Qt.colSpan,Kn=Qt.isEmpty,un=Ce(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Fn=un.scrollbarSize,zn=un.fixHeader,Ln=un.fixColumn,In=un.componentWidth,An=un.horizonScroll,Vn=Zt;return(Kn?An&&In:Ln)&&(Vn=fe.createElement("div",{style:{width:In-(zn&&!Kn?Fn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(wn,"-expanded-row-fixed")},Vn)),fe.createElement(lt,{className:Sn,style:{display:Hn?null:"none"}},fe.createElement(kt,{component:On,prefixCls:wn,colSpan:$n},Vn))}var sn=Ht;function tn(Qt){var wn=Qt.prefixCls,Zt=Qt.record,lt=Qt.onExpand,On=Qt.expanded,Sn=Qt.expandable,Hn="".concat(wn,"-row-expand-icon");if(!Sn)return fe.createElement("span",{className:Ye()(Hn,"".concat(wn,"-row-spaced"))});var $n=function(un){lt(Zt,un),un.stopPropagation()};return fe.createElement("span",{className:Ye()(Hn,(0,Re.Z)((0,Re.Z)({},"".concat(wn,"-row-expanded"),On),"".concat(wn,"-row-collapsed"),!On)),onClick:$n})}function Ut(Qt,wn,Zt){var lt=[];function On(Sn){(Sn||[]).forEach(function(Hn,$n){lt.push(wn(Hn,$n)),On(Hn[Zt])})}return On(Qt),lt}function En(Qt,wn,Zt,lt){return typeof Qt=="string"?Qt:typeof Qt=="function"?Qt(wn,Zt,lt):""}function bn(Qt,wn,Zt,lt,On){var Sn=Qt.record,Hn=Qt.prefixCls,$n=Qt.columnsKey,Kn=Qt.fixedInfoList,un=Qt.expandIconColumnIndex,Fn=Qt.nestExpandable,zn=Qt.indentSize,Ln=Qt.expandIcon,In=Qt.expanded,An=Qt.hasNestChildren,Vn=Qt.onTriggerExpand,Wn=$n[Zt],ln=Kn[Zt],br;Zt===(un||0)&&Fn&&(br=fe.createElement(fe.Fragment,null,fe.createElement("span",{style:{paddingLeft:"".concat(zn*lt,"px")},className:"".concat(Hn,"-row-indent indent-level-").concat(lt)}),Ln({prefixCls:Hn,expanded:In,expandable:An,record:Sn,onExpand:Vn})));var Cr;return wn.onCell&&(Cr=wn.onCell(Sn,On)),{key:Wn,fixedInfo:ln,appendCellNode:br,additionalCellProps:Cr||{}}}function Dn(Qt){var wn=Qt.className,Zt=Qt.style,lt=Qt.record,On=Qt.index,Sn=Qt.renderIndex,Hn=Qt.rowKey,$n=Qt.indent,Kn=$n===void 0?0:$n,un=Qt.rowComponent,Fn=Qt.cellComponent,zn=Qt.scopeCellComponent,Ln=rn(lt,Hn,On,Kn),In=Ln.prefixCls,An=Ln.flattenColumns,Vn=Ln.expandedRowClassName,Wn=Ln.expandedRowRender,ln=Ln.rowProps,br=Ln.expanded,Cr=Ln.rowSupportExpand,ri=fe.useRef(!1);ri.current||(ri.current=br);var Er=En(Vn,lt,On,Kn),xi=fe.createElement(un,(0,Se.Z)({},ln,{"data-row-key":Hn,className:Ye()(wn,"".concat(In,"-row"),"".concat(In,"-row-level-").concat(Kn),ln==null?void 0:ln.className,(0,Re.Z)({},Er,Kn>=1)),style:(0,Ae.Z)((0,Ae.Z)({},Zt),ln==null?void 0:ln.style)}),An.map(function(Si,Bi){var Vi=Si.render,Xt=Si.dataIndex,wi=Si.className,qr=bn(Ln,Si,Bi,Kn,On),Wr=qr.key,Br=qr.fixedInfo,Pi=qr.appendCellNode,Ii=qr.additionalCellProps;return fe.createElement(kt,(0,Se.Z)({className:wi,ellipsis:Si.ellipsis,align:Si.align,scope:Si.rowScope,component:Si.rowScope?zn:Fn,prefixCls:In,key:Wr,record:lt,index:On,renderIndex:Sn,dataIndex:Xt,render:Vi,shouldCellUpdate:Si.shouldCellUpdate},Br,{appendNode:Pi,additionalProps:Ii}))})),gi;if(Cr&&(ri.current||br)){var Ci=Wn(lt,On,Kn+1,br);gi=fe.createElement(sn,{expanded:br,className:Ye()("".concat(In,"-expanded-row"),"".concat(In,"-expanded-row-level-").concat(Kn+1),Er),prefixCls:In,component:un,cellComponent:Fn,colSpan:An.length,isEmpty:!1},Ci)}return fe.createElement(fe.Fragment,null,xi,gi)}var Qn=le(Dn);function Pr(Qt){var wn=Qt.columnKey,Zt=Qt.onColumnResize,lt=fe.useRef();return(0,ze.Z)(function(){lt.current&&Zt(wn,lt.current.offsetWidth)},[]),fe.createElement(Ct.Z,{data:wn},fe.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},fe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Yn=at(29194);function Mr(Qt){var wn=Qt.prefixCls,Zt=Qt.columnsKey,lt=Qt.onColumnResize,On=fe.useRef(null);return fe.createElement("tr",{"aria-hidden":"true",className:"".concat(wn,"-measure-row"),style:{height:0,fontSize:0},ref:On},fe.createElement(Ct.Z.Collection,{onBatchResize:function(Hn){(0,Yn.Z)(On.current)&&Hn.forEach(function($n){var Kn=$n.data,un=$n.size;lt(Kn,un.offsetWidth)})}},Zt.map(function(Sn){return fe.createElement(Pr,{key:Sn,columnKey:Sn,onColumnResize:lt})})))}function Ur(Qt){var wn=Qt.data,Zt=Qt.measureColumnWidth,lt=Ce(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),On=lt.prefixCls,Sn=lt.getComponent,Hn=lt.onColumnResize,$n=lt.flattenColumns,Kn=lt.getRowKey,un=lt.expandedKeys,Fn=lt.childrenColumnName,zn=lt.emptyNode,Ln=qt(wn,Fn,un,Kn),In=fe.useRef({renderWithProps:!1}),An=Sn(["body","wrapper"],"tbody"),Vn=Sn(["body","row"],"tr"),Wn=Sn(["body","cell"],"td"),ln=Sn(["body","cell"],"th"),br;wn.length?br=Ln.map(function(ri,Er){var xi=ri.record,gi=ri.indent,Ci=ri.index,Si=Kn(xi,Er);return fe.createElement(Qn,{key:Si,rowKey:Si,record:xi,index:Er,renderIndex:Ci,rowComponent:Vn,cellComponent:Wn,scopeCellComponent:ln,indent:gi})}):br=fe.createElement(sn,{expanded:!0,className:"".concat(On,"-placeholder"),prefixCls:On,component:Vn,cellComponent:Wn,colSpan:$n.length,isEmpty:!0},zn);var Cr=nt($n);return fe.createElement(ct.Provider,{value:In.current},fe.createElement(An,{className:"".concat(On,"-tbody")},Zt&&fe.createElement(Mr,{prefixCls:On,columnsKey:Cr,onColumnResize:Hn}),br))}var _r=le(Ur),ni=at(54451),Li=["columnType"];function _i(Qt){for(var wn=Qt.colWidths,Zt=Qt.columns,lt=Qt.columCount,On=Ce(Pe,["tableLayout"]),Sn=On.tableLayout,Hn=[],$n=lt||Zt.length,Kn=!1,un=$n-1;un>=0;un-=1){var Fn=wn[un],zn=Zt&&Zt[un],Ln=void 0,In=void 0;if(zn&&(Ln=zn[ni.v],Sn==="auto"&&(In=zn.minWidth)),Fn||In||Ln||Kn){var An=Ln||{},Vn=An.columnType,Wn=(0,Me.Z)(An,Li);Hn.unshift(fe.createElement("col",(0,Se.Z)({key:un,style:{width:Fn,minWidth:In}},Wn))),Kn=!0}}return fe.createElement("colgroup",null,Hn)}var Di=_i,ui=at(15142),Wi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(Qt,wn){return(0,fe.useMemo)(function(){for(var Zt=[],lt=0;lt<wn;lt+=1){var On=Qt[lt];if(On!==void 0)Zt[lt]=On;else return null}return Zt},[Qt.join("_"),wn])}var jr=fe.forwardRef(function(Qt,wn){var Zt=Qt.className,lt=Qt.noData,On=Qt.columns,Sn=Qt.flattenColumns,Hn=Qt.colWidths,$n=Qt.columCount,Kn=Qt.stickyOffsets,un=Qt.direction,Fn=Qt.fixHeader,zn=Qt.stickyTopOffset,Ln=Qt.stickyBottomOffset,In=Qt.stickyClassName,An=Qt.onScroll,Vn=Qt.maxContentScroll,Wn=Qt.children,ln=(0,Me.Z)(Qt,Wi),br=Ce(Pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Cr=br.prefixCls,ri=br.scrollbarSize,Er=br.isSticky,xi=br.getComponent,gi=xi(["header","table"],"table"),Ci=Er&&!Fn?0:ri,Si=fe.useRef(null),Bi=fe.useCallback(function(Ii){(0,Le.mH)(wn,Ii),(0,Le.mH)(Si,Ii)},[]);fe.useEffect(function(){var Ii;function Fi(ei){var $i=ei,_o=$i.currentTarget,fa=$i.deltaX;fa&&(An({currentTarget:_o,scrollLeft:_o.scrollLeft+fa}),ei.preventDefault())}return(Ii=Si.current)===null||Ii===void 0||Ii.addEventListener("wheel",Fi,{passive:!1}),function(){var ei;(ei=Si.current)===null||ei===void 0||ei.removeEventListener("wheel",Fi)}},[]);var Vi=fe.useMemo(function(){return Sn.every(function(Ii){return Ii.width})},[Sn]),Xt=Sn[Sn.length-1],wi={fixed:Xt?Xt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Cr,"-cell-scrollbar")}}},qr=(0,fe.useMemo)(function(){return Ci?[].concat((0,ui.Z)(On),[wi]):On},[Ci,On]),Wr=(0,fe.useMemo)(function(){return Ci?[].concat((0,ui.Z)(Sn),[wi]):Sn},[Ci,Sn]),Br=(0,fe.useMemo)(function(){var Ii=Kn.right,Fi=Kn.left;return(0,Ae.Z)((0,Ae.Z)({},Kn),{},{left:un==="rtl"?[].concat((0,ui.Z)(Fi.map(function(ei){return ei+Ci})),[0]):Fi,right:un==="rtl"?Ii:[].concat((0,ui.Z)(Ii.map(function(ei){return ei+Ci})),[0]),isSticky:Er})},[Ci,Kn,Er]),Pi=et(Hn,$n);return fe.createElement("div",{style:(0,Ae.Z)({overflow:"hidden"},Er?{top:zn,bottom:Ln}:{}),ref:Bi,className:Ye()(Zt,(0,Re.Z)({},In,!!In))},fe.createElement(gi,{style:{tableLayout:"fixed",visibility:lt||Pi?null:"hidden"}},(!lt||!Vn||Vi)&&fe.createElement(Di,{colWidths:Pi?[].concat((0,ui.Z)(Pi),[Ci]):[],columCount:$n+1,columns:Wr}),Wn((0,Ae.Z)((0,Ae.Z)({},ln),{},{stickyOffsets:Br,columns:qr,flattenColumns:Wr}))))}),dr=fe.memo(jr),Ai=function(wn){var Zt=wn.cells,lt=wn.stickyOffsets,On=wn.flattenColumns,Sn=wn.rowComponent,Hn=wn.cellComponent,$n=wn.onHeaderRow,Kn=wn.index,un=Ce(Pe,["prefixCls","direction"]),Fn=un.prefixCls,zn=un.direction,Ln;$n&&(Ln=$n(Zt.map(function(An){return An.column}),Kn));var In=nt(Zt.map(function(An){return An.column}));return fe.createElement(Sn,Ln,Zt.map(function(An,Vn){var Wn=An.column,ln=pt(An.colStart,An.colEnd,On,lt,zn),br;return Wn&&Wn.onHeaderCell&&(br=An.column.onHeaderCell(Wn)),fe.createElement(kt,(0,Se.Z)({},An,{scope:Wn.title?An.colSpan>1?"colgroup":"col":null,ellipsis:Wn.ellipsis,align:Wn.align,component:Hn,prefixCls:Fn,key:In[Vn]},ln,{additionalProps:br,rowType:"header"}))}))},lr=Ai;function yr(Qt){var wn=[];function Zt(Hn,$n){var Kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;wn[Kn]=wn[Kn]||[];var un=$n,Fn=Hn.filter(Boolean).map(function(zn){var Ln={key:zn.key,className:zn.className||"",children:zn.title,column:zn,colStart:un},In=1,An=zn.children;return An&&An.length>0&&(In=Zt(An,un,Kn+1).reduce(function(Vn,Wn){return Vn+Wn},0),Ln.hasSubColumns=!0),"colSpan"in zn&&(In=zn.colSpan),"rowSpan"in zn&&(Ln.rowSpan=zn.rowSpan),Ln.colSpan=In,Ln.colEnd=Ln.colStart+In-1,wn[Kn].push(Ln),un+=In,In});return Fn}Zt(Qt,0);for(var lt=wn.length,On=function($n){wn[$n].forEach(function(Kn){!("rowSpan"in Kn)&&!Kn.hasSubColumns&&(Kn.rowSpan=lt-$n)})},Sn=0;Sn<lt;Sn+=1)On(Sn);return wn}var Lr=function(wn){var Zt=wn.stickyOffsets,lt=wn.columns,On=wn.flattenColumns,Sn=wn.onHeaderRow,Hn=Ce(Pe,["prefixCls","getComponent"]),$n=Hn.prefixCls,Kn=Hn.getComponent,un=fe.useMemo(function(){return yr(lt)},[lt]),Fn=Kn(["header","wrapper"],"thead"),zn=Kn(["header","row"],"tr"),Ln=Kn(["header","cell"],"th");return fe.createElement(Fn,{className:"".concat($n,"-thead")},un.map(function(In,An){var Vn=fe.createElement(lr,{key:An,flattenColumns:On,cells:In,stickyOffsets:Zt,rowComponent:zn,cellComponent:Ln,onHeaderRow:Sn,index:An});return Vn}))},uo=le(Lr),on=at(97347);function dn(Qt,wn,Zt){var lt=(0,ni.g)(Qt),On=lt.expandIcon,Sn=lt.expandedRowKeys,Hn=lt.defaultExpandedRowKeys,$n=lt.defaultExpandAllRows,Kn=lt.expandedRowRender,un=lt.onExpand,Fn=lt.onExpandedRowsChange,zn=lt.childrenColumnName,Ln=On||tn,In=zn||"children",An=fe.useMemo(function(){return Kn?"row":Qt.expandable&&Qt.internalHooks===ht.R&&Qt.expandable.__PARENT_RENDER_ICON__||wn.some(function(Er){return Er&&(0,Ne.Z)(Er)==="object"&&Er[In]})?"nest":!1},[!!Kn,wn]),Vn=fe.useState(function(){return Hn||($n?Ut(wn,Zt,In):[])}),Wn=(0,Dt.Z)(Vn,2),ln=Wn[0],br=Wn[1],Cr=fe.useMemo(function(){return new Set(Sn||ln||[])},[Sn,ln]),ri=fe.useCallback(function(Er){var xi=Zt(Er,wn.indexOf(Er)),gi,Ci=Cr.has(xi);Ci?(Cr.delete(xi),gi=(0,ui.Z)(Cr)):gi=[].concat((0,ui.Z)(Cr),[xi]),br(gi),un&&un(!Ci,Er),Fn&&Fn(gi)},[Zt,Cr,wn,un,Fn]);return[lt,An,Cr,Ln,In,ri]}function en(Qt,wn,Zt){var lt=Qt.map(function(On,Sn){return pt(Sn,Sn,Qt,wn,Zt)});return(0,Ue.Z)(function(){return lt},[lt],function(On,Sn){return!(0,De.Z)(On,Sn)})}function vn(Qt){var wn=(0,fe.useRef)(Qt),Zt=(0,fe.useState)({}),lt=(0,Dt.Z)(Zt,2),On=lt[1],Sn=(0,fe.useRef)(null),Hn=(0,fe.useRef)([]);function $n(Kn){Hn.current.push(Kn);var un=Promise.resolve();Sn.current=un,un.then(function(){if(Sn.current===un){var Fn=Hn.current,zn=wn.current;Hn.current=[],Fn.forEach(function(Ln){wn.current=Ln(wn.current)}),Sn.current=null,zn!==wn.current&&On({})}})}return(0,fe.useEffect)(function(){return function(){Sn.current=null}},[]),[wn.current,$n]}function fr(Qt){var wn=(0,fe.useRef)(Qt||null),Zt=(0,fe.useRef)();function lt(){window.clearTimeout(Zt.current)}function On(Hn){wn.current=Hn,lt(),Zt.current=window.setTimeout(function(){wn.current=null,Zt.current=void 0},100)}function Sn(){return wn.current}return(0,fe.useEffect)(function(){return lt},[]),[On,Sn]}function cr(){var Qt=fe.useState(-1),wn=(0,Dt.Z)(Qt,2),Zt=wn[0],lt=wn[1],On=fe.useState(-1),Sn=(0,Dt.Z)(On,2),Hn=Sn[0],$n=Sn[1],Kn=fe.useCallback(function(un,Fn){lt(un),$n(Fn)},[]);return[Zt,Hn,Kn]}var oi=at(47273),an=(0,oi.Z)()?window:null;function Nn(Qt,wn){var Zt=(0,Ne.Z)(Qt)==="object"?Qt:{},lt=Zt.offsetHeader,On=lt===void 0?0:lt,Sn=Zt.offsetSummary,Hn=Sn===void 0?0:Sn,$n=Zt.offsetScroll,Kn=$n===void 0?0:$n,un=Zt.getContainer,Fn=un===void 0?function(){return an}:un,zn=Fn()||an,Ln=!!Qt;return fe.useMemo(function(){return{isSticky:Ln,stickyClassName:Ln?"".concat(wn,"-sticky-holder"):"",offsetHeader:On,offsetSummary:Hn,offsetScroll:Kn,container:zn}},[Ln,Kn,On,Hn,wn,zn])}function gr(Qt,wn,Zt){var lt=(0,fe.useMemo)(function(){var On=wn.length,Sn=function(un,Fn,zn){for(var Ln=[],In=0,An=un;An!==Fn;An+=zn)Ln.push(In),wn[An].fixed&&(In+=Qt[An]||0);return Ln},Hn=Sn(0,On,1),$n=Sn(On-1,-1,-1).reverse();return Zt==="rtl"?{left:$n,right:Hn}:{left:Hn,right:$n}},[Qt,wn,Zt]);return lt}var Zr=gr;function Xn(Qt){var wn=Qt.className,Zt=Qt.children;return fe.createElement("div",{className:wn},Zt)}var jt=Xn,Wt=at(8224),jn=at(16089),Cn=at(76846);function Jt(Qt){var wn=(0,Cn.bn)(Qt),Zt=wn.getBoundingClientRect(),lt=document.documentElement;return{left:Zt.left+(window.pageXOffset||lt.scrollLeft)-(lt.clientLeft||document.body.clientLeft||0),top:Zt.top+(window.pageYOffset||lt.scrollTop)-(lt.clientTop||document.body.clientTop||0)}}var _n=function(wn,Zt){var lt,On,Sn=wn.scrollBodyRef,Hn=wn.onScroll,$n=wn.offsetScroll,Kn=wn.container,un=wn.direction,Fn=Ce(Pe,"prefixCls"),zn=((lt=Sn.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,Ln=((On=Sn.current)===null||On===void 0?void 0:On.clientWidth)||0,In=zn&&Ln*(Ln/zn),An=fe.useRef(),Vn=vn({scrollLeft:0,isHiddenScrollBar:!0}),Wn=(0,Dt.Z)(Vn,2),ln=Wn[0],br=Wn[1],Cr=fe.useRef({delta:0,x:0}),ri=fe.useState(!1),Er=(0,Dt.Z)(ri,2),xi=Er[0],gi=Er[1],Ci=fe.useRef(null);fe.useEffect(function(){return function(){jn.Z.cancel(Ci.current)}},[]);var Si=function(){gi(!1)},Bi=function(Wr){Wr.persist(),Cr.current.delta=Wr.pageX-ln.scrollLeft,Cr.current.x=0,gi(!0),Wr.preventDefault()},Vi=function(Wr){var Br,Pi=Wr||((Br=window)===null||Br===void 0?void 0:Br.event),Ii=Pi.buttons;if(!xi||Ii===0){xi&&gi(!1);return}var Fi=Cr.current.x+Wr.pageX-Cr.current.x-Cr.current.delta,ei=un==="rtl";Fi=Math.max(ei?In-Ln:0,Math.min(ei?0:Ln-In,Fi));var $i=!ei||Math.abs(Fi)+Math.abs(In)<Ln;$i&&(Hn({scrollLeft:Fi/Ln*(zn+2)}),Cr.current.x=Wr.pageX)},Xt=function(){jn.Z.cancel(Ci.current),Ci.current=(0,jn.Z)(function(){if(Sn.current){var Wr=Jt(Sn.current).top,Br=Wr+Sn.current.offsetHeight,Pi=Kn===window?document.documentElement.scrollTop+window.innerHeight:Jt(Kn).top+Kn.clientHeight;Br-(0,Ot.Z)()<=Pi||Wr>=Pi-$n?br(function(Ii){return(0,Ae.Z)((0,Ae.Z)({},Ii),{},{isHiddenScrollBar:!0})}):br(function(Ii){return(0,Ae.Z)((0,Ae.Z)({},Ii),{},{isHiddenScrollBar:!1})})}})},wi=function(Wr){br(function(Br){return(0,Ae.Z)((0,Ae.Z)({},Br),{},{scrollLeft:Wr/zn*Ln||0})})};return fe.useImperativeHandle(Zt,function(){return{setScrollLeft:wi,checkScrollBarVisible:Xt}}),fe.useEffect(function(){var qr=(0,Wt.Z)(document.body,"mouseup",Si,!1),Wr=(0,Wt.Z)(document.body,"mousemove",Vi,!1);return Xt(),function(){qr.remove(),Wr.remove()}},[In,xi]),fe.useEffect(function(){if(Sn.current){for(var qr=[],Wr=(0,Cn.bn)(Sn.current);Wr;)qr.push(Wr),Wr=Wr.parentElement;return qr.forEach(function(Br){return Br.addEventListener("scroll",Xt,!1)}),window.addEventListener("resize",Xt,!1),window.addEventListener("scroll",Xt,!1),Kn.addEventListener("scroll",Xt,!1),function(){qr.forEach(function(Br){return Br.removeEventListener("scroll",Xt)}),window.removeEventListener("resize",Xt),window.removeEventListener("scroll",Xt),Kn.removeEventListener("scroll",Xt)}}},[Kn]),fe.useEffect(function(){ln.isHiddenScrollBar||br(function(qr){var Wr=Sn.current;return Wr?(0,Ae.Z)((0,Ae.Z)({},qr),{},{scrollLeft:Wr.scrollLeft/Wr.scrollWidth*Wr.clientWidth}):qr})},[ln.isHiddenScrollBar]),zn<=Ln||!In||ln.isHiddenScrollBar?null:fe.createElement("div",{style:{height:(0,Ot.Z)(),width:Ln,bottom:$n},className:"".concat(Fn,"-sticky-scroll")},fe.createElement("div",{onMouseDown:Bi,ref:An,className:Ye()("".concat(Fn,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(Fn,"-sticky-scroll-bar-active"),xi)),style:{width:"".concat(In,"px"),transform:"translate3d(".concat(ln.scrollLeft,"px, 0, 0)")}}))},ur=fe.forwardRef(_n);function ar(Qt){return null}var mr=ar;function Bn(Qt){return null}var Un=Bn,er="rc-table",Ar=[],sr={};function mn(){return"No Data"}function tr(Qt,wn){var Zt=(0,Ae.Z)({rowKey:"key",prefixCls:er,emptyText:mn},Qt),lt=Zt.prefixCls,On=Zt.className,Sn=Zt.rowClassName,Hn=Zt.style,$n=Zt.data,Kn=Zt.rowKey,un=Zt.scroll,Fn=Zt.tableLayout,zn=Zt.direction,Ln=Zt.title,In=Zt.footer,An=Zt.summary,Vn=Zt.caption,Wn=Zt.id,ln=Zt.showHeader,br=Zt.components,Cr=Zt.emptyText,ri=Zt.onRow,Er=Zt.onHeaderRow,xi=Zt.onScroll,gi=Zt.internalHooks,Ci=Zt.transformColumns,Si=Zt.internalRefs,Bi=Zt.tailor,Vi=Zt.getContainerWidth,Xt=Zt.sticky,wi=Zt.rowHoverable,qr=wi===void 0?!0:wi,Wr=$n||Ar,Br=!!Wr.length,Pi=gi===ht.R,Ii=fe.useCallback(function(Gi,ao){return(0,Ve.Z)(br,Gi)||ao},[br]),Fi=fe.useMemo(function(){return typeof Kn=="function"?Kn:function(Gi){var ao=Gi&&Gi[Kn];return ao}},[Kn]),ei=Ii(["body"]),$i=cr(),_o=(0,Dt.Z)($i,3),fa=_o[0],Ps=_o[1],wa=_o[2],Ir=dn(Zt,Wr,Fi),Po=(0,Dt.Z)(Ir,6),bo=Po[0],ta=Po[1],Ao=Po[2],Ko=Po[3],qn=Po[4],Or=Po[5],Xr=un==null?void 0:un.x,yi=fe.useState(0),Ei=(0,Dt.Z)(yi,2),to=Ei[0],Fr=Ei[1],Aa=(0,on.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Zt),bo),{},{expandable:!!bo.expandedRowRender,columnTitle:bo.columnTitle,expandedKeys:Ao,getRowKey:Fi,onTriggerExpand:Or,expandIcon:Ko,expandIconColumnIndex:bo.expandIconColumnIndex,direction:zn,scrollWidth:Pi&&Bi&&typeof Xr=="number"?Xr:null,clientWidth:to}),Pi?Ci:null),zo=(0,Dt.Z)(Aa,4),jo=zo[0],Ni=zo[1],Vo=zo[2],ja=zo[3],vo=Vo!=null?Vo:Xr,fs=fe.useMemo(function(){return{columns:jo,flattenColumns:Ni}},[jo,Ni]),ds=fe.useRef(),bs=fe.useRef(),na=fe.useRef(),eh=fe.useRef();fe.useImperativeHandle(wn,function(){return{nativeElement:ds.current,scrollTo:function(ao){var Xo;if(na.current instanceof HTMLElement){var Fa=ao.index,ka=ao.top,fu=ao.key;if(xt(ka)){var Jl;(Jl=na.current)===null||Jl===void 0||Jl.scrollTo({top:ka})}else{var du,sl=fu!=null?fu:Fi(Wr[Fa]);(du=na.current.querySelector('[data-row-key="'.concat(sl,'"]')))===null||du===void 0||du.scrollIntoView()}}else(Xo=na.current)!==null&&Xo!==void 0&&Xo.scrollTo&&na.current.scrollTo(ao)}}});var ju=fe.useRef(),il=fe.useState(!1),Sl=(0,Dt.Z)(il,2),Os=Sl[0],Vl=Sl[1],th=fe.useState(!1),nh=(0,Dt.Z)(th,2),Zo=nh[0],Ou=nh[1],rh=fe.useState(new Map),Zl=(0,Dt.Z)(rh,2),uu=Zl[0],Ca=Zl[1],Oa=nt(Ni),aa=Oa.map(function(Gi){return uu.get(Gi)}),ga=fe.useMemo(function(){return aa},[aa.join("_")]),Xl=Zr(ga,Ni,zn),Ga=un&&yt(un.y),co=un&&yt(vo)||!!bo.fixed,io=co&&Ni.some(function(Gi){var ao=Gi.fixed;return ao}),Ji=fe.useRef(),sa=Nn(Xt,lt),xr=sa.isSticky,da=sa.offsetHeader,Gt=sa.offsetSummary,kn=sa.offsetScroll,Hs=sa.stickyClassName,jl=sa.container,Qo=fe.useMemo(function(){return An==null?void 0:An(Wr)},[An,Wr]),Pa=(Ga||xr)&&fe.isValidElement(Qo)&&Qo.type===_e&&Qo.props.fixed,Fs,ol,Fu;Ga&&(ol={overflowY:Br?"scroll":"auto",maxHeight:un.y}),co&&(Fs={overflowX:"auto"},Ga||(ol={overflowY:"hidden"}),Fu={width:vo===!0?"auto":vo,minWidth:"100%"});var Oo=fe.useCallback(function(Gi,ao){Ca(function(Xo){if(Xo.get(Gi)!==ao){var Fa=new Map(Xo);return Fa.set(Gi,ao),Fa}return Xo})},[]),fi=fr(null),Ua=(0,Dt.Z)(fi,2),Ds=Ua[0],Fo=Ua[1];function Ri(Gi,ao){ao&&(typeof ao=="function"?ao(Gi):ao.scrollLeft!==Gi&&(ao.scrollLeft=Gi,ao.scrollLeft!==Gi&&setTimeout(function(){ao.scrollLeft=Gi},0)))}var Go=(0,oe.Z)(function(Gi){var ao=Gi.currentTarget,Xo=Gi.scrollLeft,Fa=zn==="rtl",ka=typeof Xo=="number"?Xo:ao.scrollLeft,fu=ao||sr;if(!Fo()||Fo()===fu){var Jl;Ds(fu),Ri(ka,bs.current),Ri(ka,na.current),Ri(ka,ju.current),Ri(ka,(Jl=Ji.current)===null||Jl===void 0?void 0:Jl.setScrollLeft)}var du=ao||bs.current;if(du){var sl=Pi&&Bi&&typeof vo=="number"?vo:du.scrollWidth,Fl=du.clientWidth;if(sl===Fl){Vl(!1),Ou(!1);return}Fa?(Vl(-ka<sl-Fl),Ou(-ka>0)):(Vl(ka>0),Ou(ka<sl-Fl))}}),ps=(0,oe.Z)(function(Gi){Go(Gi),xi==null||xi(Gi)}),xo=function(){if(co&&na.current){var ao;Go({currentTarget:(0,Cn.bn)(na.current),scrollLeft:(ao=na.current)===null||ao===void 0?void 0:ao.scrollLeft})}else Vl(!1),Ou(!1)},Cs=function(ao){var Xo,Fa=ao.width;(Xo=Ji.current)===null||Xo===void 0||Xo.checkScrollBarVisible();var ka=ds.current?ds.current.offsetWidth:Fa;Pi&&Vi&&ds.current&&(ka=Vi(ds.current,ka)||ka),ka!==to&&(xo(),Fr(ka))},ma=fe.useRef(!1);fe.useEffect(function(){ma.current&&xo()},[co,$n,jo.length]),fe.useEffect(function(){ma.current=!0},[]);var hu=fe.useState(0),oo=(0,Dt.Z)(hu,2),Ea=oo[0],no=oo[1],wo=fe.useState(!0),Eo=(0,Dt.Z)(wo,2),Uo=Eo[0],ho=Eo[1];(0,ze.Z)(function(){(!Bi||!Pi)&&(na.current instanceof Element?no((0,Ot.o)(na.current).width):no((0,Ot.o)(eh.current).width)),ho((0,Nt.G)("position","sticky"))},[]),fe.useEffect(function(){Pi&&Si&&(Si.body.current=na.current)});var Du=fe.useCallback(function(Gi){return fe.createElement(fe.Fragment,null,fe.createElement(uo,Gi),Pa==="top"&&fe.createElement(rt,Gi,Qo))},[Pa,Qo]),ai=fe.useCallback(function(Gi){return fe.createElement(rt,Gi,Qo)},[Qo]),uf=Ii(["table"],"table"),Qi=fe.useMemo(function(){return Fn||(io?vo==="max-content"?"auto":"fixed":Ga||xr||Ni.some(function(Gi){var ao=Gi.ellipsis;return ao})?"fixed":"auto")},[Ga,io,Ni,Fn,xr]),Cc,cu={colWidths:ga,columCount:Ni.length,stickyOffsets:Xl,onHeaderRow:Er,fixHeader:Ga,scroll:un},ih=fe.useMemo(function(){return Br?null:typeof Cr=="function"?Cr():Cr},[Br,Cr]),Ec=fe.createElement(_r,{data:Wr,measureColumnWidth:Ga||co||xr}),_h=fe.createElement(Di,{colWidths:Ni.map(function(Gi){var ao=Gi.width;return ao}),columns:Ni}),Ol=Vn!=null?fe.createElement("caption",{className:"".concat(lt,"-caption")},Vn):void 0,Bu=(0,Rt.Z)(Zt,{data:!0}),lo=(0,Rt.Z)(Zt,{aria:!0});if(Ga||xr){var al;typeof ei=="function"?(al=ei(Wr,{scrollbarSize:Ea,ref:na,onScroll:Go}),cu.colWidths=Ni.map(function(Gi,ao){var Xo=Gi.width,Fa=ao===Ni.length-1?Xo-Ea:Xo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):al=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Fs),ol),onScroll:ps,ref:na,className:Ye()("".concat(lt,"-body"))},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Fu),{},{tableLayout:Qi})},lo),Ol,_h,Ec,!Pa&&Qo&&fe.createElement(rt,{stickyOffsets:Xl,flattenColumns:Ni},Qo)));var zh=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({noData:!Wr.length,maxContentScroll:co&&vo==="max-content"},cu),fs),{},{direction:zn,stickyClassName:Hs,onScroll:Go});Cc=fe.createElement(fe.Fragment,null,ln!==!1&&fe.createElement(dr,(0,Se.Z)({},zh,{stickyTopOffset:da,className:"".concat(lt,"-header"),ref:bs}),Du),al,Pa&&Pa!=="top"&&fe.createElement(dr,(0,Se.Z)({},zh,{stickyBottomOffset:Gt,className:"".concat(lt,"-summary"),ref:ju}),ai),xr&&na.current&&na.current instanceof Element&&fe.createElement(ur,{ref:Ji,offsetScroll:kn,scrollBodyRef:na,onScroll:Go,container:jl,direction:zn}))}else Cc=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Fs),ol),className:Ye()("".concat(lt,"-content")),onScroll:Go,ref:na},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Fu),{},{tableLayout:Qi})},lo),Ol,_h,ln!==!1&&fe.createElement(uo,(0,Se.Z)({},cu,fs)),Ec,Qo&&fe.createElement(rt,{stickyOffsets:Xl,flattenColumns:Ni},Qo)));var Yl=fe.createElement("div",(0,Se.Z)({className:Ye()(lt,On,(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)({},"".concat(lt,"-rtl"),zn==="rtl"),"".concat(lt,"-ping-left"),Os),"".concat(lt,"-ping-right"),Zo),"".concat(lt,"-layout-fixed"),Fn==="fixed"),"".concat(lt,"-fixed-header"),Ga),"".concat(lt,"-fixed-column"),io),"".concat(lt,"-fixed-column-gapped"),io&&ja),"".concat(lt,"-scroll-horizontal"),co),"".concat(lt,"-has-fix-left"),Ni[0]&&Ni[0].fixed),"".concat(lt,"-has-fix-right"),Ni[Ni.length-1]&&Ni[Ni.length-1].fixed==="right")),style:Hn,id:Wn,ref:ds},Bu),Ln&&fe.createElement(jt,{className:"".concat(lt,"-title")},Ln(Wr)),fe.createElement("div",{ref:eh,className:"".concat(lt,"-container")},Cc),In&&fe.createElement(jt,{className:"".concat(lt,"-footer")},In(Wr)));co&&(Yl=fe.createElement(Ct.Z,{onResize:Cs},Yl));var kc=en(Ni,Xl,zn),$l=fe.useMemo(function(){return{scrollX:vo,prefixCls:lt,getComponent:Ii,scrollbarSize:Ea,direction:zn,fixedInfoList:kc,isSticky:xr,supportSticky:Uo,componentWidth:to,fixHeader:Ga,fixColumn:io,horizonScroll:co,tableLayout:Qi,rowClassName:Sn,expandedRowClassName:bo.expandedRowClassName,expandIcon:Ko,expandableType:ta,expandRowByClick:bo.expandRowByClick,expandedRowRender:bo.expandedRowRender,onTriggerExpand:Or,expandIconColumnIndex:bo.expandIconColumnIndex,indentSize:bo.indentSize,allColumnsFixedLeft:Ni.every(function(Gi){return Gi.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:Ni,onColumnResize:Oo,hoverStartRow:fa,hoverEndRow:Ps,onHover:wa,rowExpandable:bo.rowExpandable,onRow:ri,getRowKey:Fi,expandedKeys:Ao,childrenColumnName:qn,rowHoverable:qr}},[vo,lt,Ii,Ea,zn,kc,xr,Uo,to,Ga,io,co,Qi,Sn,bo.expandedRowClassName,Ko,ta,bo.expandRowByClick,bo.expandedRowRender,Or,bo.expandIconColumnIndex,bo.indentSize,ih,jo,Ni,Oo,fa,Ps,wa,bo.rowExpandable,ri,Fi,Ao,qn,qr]);return fe.createElement(Pe.Provider,{value:$l},Yl)}var Vr=fe.forwardRef(tr);function pi(Qt){return ie(Vr,Qt)}var zi=pi();zi.EXPAND_COLUMN=ht.w,zi.INTERNAL_HOOKS=ht.R,zi.Column=mr,zi.ColumnGroup=Un,zi.Summary=St;var Yt=zi,vr=at(6790),zr=ke(null),nr=ke(null);function vi(Qt,wn,Zt){var lt=wn||1;return Zt[Qt+lt]-(Zt[Qt]||0)}function Qr(Qt){var wn=Qt.rowInfo,Zt=Qt.column,lt=Qt.colIndex,On=Qt.indent,Sn=Qt.index,Hn=Qt.component,$n=Qt.renderIndex,Kn=Qt.record,un=Qt.style,Fn=Qt.className,zn=Qt.inverse,Ln=Qt.getHeight,In=Zt.render,An=Zt.dataIndex,Vn=Zt.className,Wn=Zt.width,ln=Ce(nr,["columnsOffset"]),br=ln.columnsOffset,Cr=bn(wn,Zt,lt,On,Sn),ri=Cr.key,Er=Cr.fixedInfo,xi=Cr.appendCellNode,gi=Cr.additionalCellProps,Ci=gi.style,Si=gi.colSpan,Bi=Si===void 0?1:Si,Vi=gi.rowSpan,Xt=Vi===void 0?1:Vi,wi=lt-1,qr=vi(wi,Bi,br),Wr=Bi>1?Wn-qr:0,Br=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Ci),un),{},{flex:"0 0 ".concat(qr,"px"),width:"".concat(qr,"px"),marginRight:Wr,pointerEvents:"auto"}),Pi=fe.useMemo(function(){return zn?Xt<=1:Bi===0||Xt===0||Xt>1},[Xt,Bi,zn]);Pi?Br.visibility="hidden":zn&&(Br.height=Ln==null?void 0:Ln(Xt));var Ii=Pi?function(){return null}:In,Fi={};return(Xt===0||Bi===0)&&(Fi.rowSpan=1,Fi.colSpan=1),fe.createElement(kt,(0,Se.Z)({className:Ye()(Vn,Fn),ellipsis:Zt.ellipsis,align:Zt.align,scope:Zt.rowScope,component:Hn,prefixCls:wn.prefixCls,key:ri,record:Kn,index:Sn,renderIndex:$n,dataIndex:An,render:Ii,shouldCellUpdate:Zt.shouldCellUpdate},Er,{appendNode:xi,additionalProps:(0,Ae.Z)((0,Ae.Z)({},gi),{},{style:Br},Fi)}))}var hi=Qr,$r=["data","index","className","rowKey","style","extra","getHeight"],si=fe.forwardRef(function(Qt,wn){var Zt=Qt.data,lt=Qt.index,On=Qt.className,Sn=Qt.rowKey,Hn=Qt.style,$n=Qt.extra,Kn=Qt.getHeight,un=(0,Me.Z)(Qt,$r),Fn=Zt.record,zn=Zt.indent,Ln=Zt.index,In=Ce(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),An=In.scrollX,Vn=In.flattenColumns,Wn=In.prefixCls,ln=In.fixColumn,br=In.componentWidth,Cr=Ce(zr,["getComponent"]),ri=Cr.getComponent,Er=rn(Fn,Sn,lt,zn),xi=ri(["body","row"],"div"),gi=ri(["body","cell"],"div"),Ci=Er.rowSupportExpand,Si=Er.expanded,Bi=Er.rowProps,Vi=Er.expandedRowRender,Xt=Er.expandedRowClassName,wi;if(Ci&&Si){var qr=Vi(Fn,lt,zn+1,Si),Wr=En(Xt,Fn,lt,zn),Br={};ln&&(Br={style:(0,Re.Z)({},"--virtual-width","".concat(br,"px"))});var Pi="".concat(Wn,"-expanded-row-cell");wi=fe.createElement(xi,{className:Ye()("".concat(Wn,"-expanded-row"),"".concat(Wn,"-expanded-row-level-").concat(zn+1),Wr)},fe.createElement(kt,{component:gi,prefixCls:Wn,className:Ye()(Pi,(0,Re.Z)({},"".concat(Pi,"-fixed"),ln)),additionalProps:Br},qr))}var Ii=(0,Ae.Z)((0,Ae.Z)({},Hn),{},{width:An});$n&&(Ii.position="absolute",Ii.pointerEvents="none");var Fi=fe.createElement(xi,(0,Se.Z)({},Bi,un,{"data-row-key":Sn,ref:Ci?null:wn,className:Ye()(On,"".concat(Wn,"-row"),Bi==null?void 0:Bi.className,(0,Re.Z)({},"".concat(Wn,"-row-extra"),$n)),style:(0,Ae.Z)((0,Ae.Z)({},Ii),Bi==null?void 0:Bi.style)}),Vn.map(function(ei,$i){return fe.createElement(hi,{key:$i,component:gi,rowInfo:Er,column:ei,colIndex:$i,indent:zn,index:lt,renderIndex:Ln,record:Fn,inverse:$n,getHeight:Kn})}));return Ci?fe.createElement("div",{ref:wn},Fi,wi):Fi}),bi=le(si),pn=bi,Oi=fe.forwardRef(function(Qt,wn){var Zt=Qt.data,lt=Qt.onScroll,On=Ce(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Sn=On.flattenColumns,Hn=On.onColumnResize,$n=On.getRowKey,Kn=On.expandedKeys,un=On.prefixCls,Fn=On.childrenColumnName,zn=On.scrollX,Ln=On.direction,In=Ce(zr),An=In.sticky,Vn=In.scrollY,Wn=In.listItemHeight,ln=In.getComponent,br=In.onScroll,Cr=fe.useRef(),ri=qt(Zt,Fn,Kn,$n),Er=fe.useMemo(function(){var wi=0;return Sn.map(function(qr){var Wr=qr.width,Br=qr.key;return wi+=Wr,[Br,Wr,wi]})},[Sn]),xi=fe.useMemo(function(){return Er.map(function(wi){return wi[2]})},[Er]);fe.useEffect(function(){Er.forEach(function(wi){var qr=(0,Dt.Z)(wi,2),Wr=qr[0],Br=qr[1];Hn(Wr,Br)})},[Er]),fe.useImperativeHandle(wn,function(){var wi,qr={scrollTo:function(Br){var Pi;(Pi=Cr.current)===null||Pi===void 0||Pi.scrollTo(Br)},nativeElement:(wi=Cr.current)===null||wi===void 0?void 0:wi.nativeElement};return Object.defineProperty(qr,"scrollLeft",{get:function(){var Br;return((Br=Cr.current)===null||Br===void 0?void 0:Br.getScrollInfo().x)||0},set:function(Br){var Pi;(Pi=Cr.current)===null||Pi===void 0||Pi.scrollTo({left:Br})}}),qr});var gi=function(qr,Wr){var Br,Pi=(Br=ri[Wr])===null||Br===void 0?void 0:Br.record,Ii=qr.onCell;if(Ii){var Fi,ei=Ii(Pi,Wr);return(Fi=ei==null?void 0:ei.rowSpan)!==null&&Fi!==void 0?Fi:1}return 1},Ci=function(qr){var Wr=qr.start,Br=qr.end,Pi=qr.getSize,Ii=qr.offsetY;if(Br<0)return null;for(var Fi=Sn.filter(function(Ko){return gi(Ko,Wr)===0}),ei=Wr,$i=function(qn){if(Fi=Fi.filter(function(Or){return gi(Or,qn)===0}),!Fi.length)return ei=qn,1},_o=Wr;_o>=0&&!$i(_o);_o-=1);for(var fa=Sn.filter(function(Ko){return gi(Ko,Br)!==1}),Ps=Br,wa=function(qn){if(fa=fa.filter(function(Or){return gi(Or,qn)!==1}),!fa.length)return Ps=Math.max(qn-1,Br),1},Ir=Br;Ir<ri.length&&!wa(Ir);Ir+=1);for(var Po=[],bo=function(qn){var Or=ri[qn];if(!Or)return 1;Sn.some(function(Xr){return gi(Xr,qn)>1})&&Po.push(qn)},ta=ei;ta<=Ps;ta+=1)bo(ta);var Ao=Po.map(function(Ko){var qn=ri[Ko],Or=$n(qn.record,Ko),Xr=function(to){var Fr=Ko+to-1,Aa=$n(ri[Fr].record,Fr),zo=Pi(Or,Aa);return zo.bottom-zo.top},yi=Pi(Or);return fe.createElement(pn,{key:Ko,data:qn,rowKey:Or,index:Ko,style:{top:-Ii+yi.top},extra:!0,getHeight:Xr})});return Ao},Si=fe.useMemo(function(){return{columnsOffset:xi}},[xi]),Bi="".concat(un,"-tbody"),Vi=ln(["body","wrapper"]),Xt={};return An&&(Xt.position="sticky",Xt.bottom=0,(0,Ne.Z)(An)==="object"&&An.offsetScroll&&(Xt.bottom=An.offsetScroll)),fe.createElement(nr.Provider,{value:Si},fe.createElement(vr.Z,{fullHeight:!1,ref:Cr,prefixCls:"".concat(Bi,"-virtual"),styles:{horizontalScrollBar:Xt},className:Bi,height:Vn,itemHeight:Wn||24,data:ri,itemKey:function(qr){return $n(qr.record)},component:Vi,scrollWidth:zn,direction:Ln,onVirtualScroll:function(qr){var Wr,Br=qr.x;lt({currentTarget:(Wr=Cr.current)===null||Wr===void 0?void 0:Wr.nativeElement,scrollLeft:Br})},onScroll:br,extraRender:Ci},function(wi,qr,Wr){var Br=$n(wi.record,qr);return fe.createElement(pn,{data:wi,rowKey:Br,index:qr,style:Wr.style})}))}),yn=le(Oi),Sr=yn,li=function(wn,Zt){var lt=Zt.ref,On=Zt.onScroll;return fe.createElement(Sr,{ref:lt,data:wn,onScroll:On})};function Jr(Qt,wn){var Zt=Qt.data,lt=Qt.columns,On=Qt.scroll,Sn=Qt.sticky,Hn=Qt.prefixCls,$n=Hn===void 0?er:Hn,Kn=Qt.className,un=Qt.listItemHeight,Fn=Qt.components,zn=Qt.onScroll,Ln=On||{},In=Ln.x,An=Ln.y;typeof In!="number"&&(In=1),typeof An!="number"&&(An=500);var Vn=(0,Et.zX)(function(br,Cr){return(0,Ve.Z)(Fn,br)||Cr}),Wn=(0,Et.zX)(zn),ln=fe.useMemo(function(){return{sticky:Sn,scrollY:An,listItemHeight:un,getComponent:Vn,onScroll:Wn}},[Sn,An,un,Vn,Wn]);return fe.createElement(zr.Provider,{value:ln},fe.createElement(Yt,(0,Se.Z)({},Qt,{className:Ye()(Kn,"".concat($n,"-virtual")),scroll:(0,Ae.Z)((0,Ae.Z)({},On),{},{x:In}),components:(0,Ae.Z)((0,Ae.Z)({},Fn),{},{body:Zt!=null&&Zt.length?li:void 0}),columns:lt,internalHooks:ht.R,tailor:!0,ref:wn})))}var Hi=fe.forwardRef(Jr);function ci(Qt){return ie(Hi,Qt)}var Hr=ci(),Ki=null},54451:function(gn,cn,at){"use strict";at.d(cn,{g:function(){return fe},v:function(){return De}});var ht=at(98506),Dt=at(33346),oe=at(48736),ze=["expandable"],De="RC_TABLE_INTERNAL_COL_DEFINE";function fe(me){var ke=me.expandable,Ce=(0,Dt.Z)(me,ze),Se;return"expandable"in me?Se=(0,ht.Z)((0,ht.Z)({},Ce),ke):Se=Ce,Se.showExpandColumn===!1&&(Se.expandIconColumnIndex=-1),Se}},22711:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{ResizableTextArea:function(){return We},default:function(){return ot}});var ht=at(67711),Dt=at(52873),oe=at(98506),ze=at(15142),De=at(16886),fe=at(33346),me=at(92310),ke=at.n(me),Ce=at(36901),Se=at(66003),Le=at(30292),ve=at(18929),we=at(59301),de=at(26420),z=at(29301),ee=at(34280),ae=at(16089),ie=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,le=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ue={},ge;function Pe(st){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pt=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(ct&&ue[Pt])return ue[Pt];var $e=window.getComputedStyle(st),nt=$e.getPropertyValue("box-sizing")||$e.getPropertyValue("-moz-box-sizing")||$e.getPropertyValue("-webkit-box-sizing"),yt=parseFloat($e.getPropertyValue("padding-bottom"))+parseFloat($e.getPropertyValue("padding-top")),xt=parseFloat($e.getPropertyValue("border-bottom-width"))+parseFloat($e.getPropertyValue("border-top-width")),wt=le.map(function(ft){return"".concat(ft,":").concat($e.getPropertyValue(ft))}).join(";"),dt={sizingStyle:wt,paddingSize:yt,borderSize:xt,boxSizing:nt};return ct&&Pt&&(ue[Pt]=dt),dt}function je(st){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ge||(ge=document.createElement("textarea"),ge.setAttribute("tab-index","-1"),ge.setAttribute("aria-hidden","true"),ge.setAttribute("name","hiddenTextarea"),document.body.appendChild(ge)),st.getAttribute("wrap")?ge.setAttribute("wrap",st.getAttribute("wrap")):ge.removeAttribute("wrap");var nt=Pe(st,ct),yt=nt.paddingSize,xt=nt.borderSize,wt=nt.boxSizing,dt=nt.sizingStyle;ge.setAttribute("style","".concat(dt,";").concat(ie)),ge.value=st.value||st.placeholder||"";var ft=void 0,ut=void 0,Et,mt=ge.scrollHeight;if(wt==="border-box"?mt+=xt:wt==="content-box"&&(mt-=yt),Pt!==null||$e!==null){ge.value=" ";var vt=ge.scrollHeight-yt;Pt!==null&&(ft=vt*Pt,wt==="border-box"&&(ft=ft+yt+xt),mt=Math.max(ft,mt)),$e!==null&&(ut=vt*$e,wt==="border-box"&&(ut=ut+yt+xt),Et=mt>ut?"":"hidden",mt=Math.min(ut,mt))}var kt={height:mt,overflowY:Et,resize:"none"};return ft&&(kt.minHeight=ft),ut&&(kt.maxHeight=ut),kt}var Be=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Ne=1,Ae=2,Re=we.forwardRef(function(st,ct){var Pt=st,$e=Pt.prefixCls,nt=Pt.defaultValue,yt=Pt.value,xt=Pt.autoSize,wt=Pt.onResize,dt=Pt.className,ft=Pt.style,ut=Pt.disabled,Et=Pt.onChange,mt=Pt.onInternalAutoSize,vt=(0,fe.Z)(Pt,Be),kt=(0,ve.Z)(nt,{value:yt,postState:function(Qn){return Qn!=null?Qn:""}}),pt=(0,De.Z)(kt,2),Qe=pt[0],Ke=pt[1],xe=function(Qn){Ke(Qn.target.value),Et==null||Et(Qn)},Me=we.useRef();we.useImperativeHandle(ct,function(){return{textArea:Me.current}});var Ze=we.useMemo(function(){return xt&&(0,de.Z)(xt)==="object"?[xt.minRows,xt.maxRows]:[]},[xt]),tt=(0,De.Z)(Ze,2),Ie=tt[0],_e=tt[1],He=!!xt,rt=function(){try{if(document.activeElement===Me.current){var Qn=Me.current,Pr=Qn.selectionStart,Yn=Qn.selectionEnd,Mr=Qn.scrollTop;Me.current.setSelectionRange(Pr,Yn),Me.current.scrollTop=Mr}}catch(Ur){}},St=we.useState(Ae),Ct=(0,De.Z)(St,2),Nt=Ct[0],Ot=Ct[1],Rt=we.useState(),$t=(0,De.Z)(Rt,2),qt=$t[0],rn=$t[1],Ht=function(){Ot(Fe)};(0,ee.Z)(function(){He&&Ht()},[yt,Ie,_e,He]),(0,ee.Z)(function(){if(Nt===Fe)Ot(Ne);else if(Nt===Ne){var Dn=je(Me.current,!1,Ie,_e);Ot(Ae),rn(Dn)}else rt()},[Nt]);var sn=we.useRef(),tn=function(){ae.Z.cancel(sn.current)},Ut=function(Qn){Nt===Ae&&(wt==null||wt(Qn),xt&&(tn(),sn.current=(0,ae.Z)(function(){Ht()})))};we.useEffect(function(){return tn},[]);var En=He?qt:null,bn=(0,oe.Z)((0,oe.Z)({},ft),En);return(Nt===Fe||Nt===Ne)&&(bn.overflowY="hidden",bn.overflowX="hidden"),we.createElement(z.Z,{onResize:Ut,disabled:!(xt||wt)},we.createElement("textarea",(0,ht.Z)({},vt,{ref:Me,style:bn,className:ke()($e,dt,(0,Dt.Z)({},"".concat($e,"-disabled"),ut)),disabled:ut,value:Qe,onChange:xe})))}),We=Re,Ye=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ue=we.forwardRef(function(st,ct){var Pt,$e=st.defaultValue,nt=st.value,yt=st.onFocus,xt=st.onBlur,wt=st.onChange,dt=st.allowClear,ft=st.maxLength,ut=st.onCompositionStart,Et=st.onCompositionEnd,mt=st.suffix,vt=st.prefixCls,kt=vt===void 0?"rc-textarea":vt,pt=st.showCount,Qe=st.count,Ke=st.className,xe=st.style,Me=st.disabled,Ze=st.hidden,tt=st.classNames,Ie=st.styles,_e=st.onResize,He=st.onClear,rt=st.onPressEnter,St=st.readOnly,Ct=st.autoSize,Nt=st.onKeyDown,Ot=(0,fe.Z)(st,Ye),Rt=(0,ve.Z)($e,{value:nt,defaultValue:$e}),$t=(0,De.Z)(Rt,2),qt=$t[0],rn=$t[1],Ht=qt==null?"":String(qt),sn=we.useState(!1),tn=(0,De.Z)(sn,2),Ut=tn[0],En=tn[1],bn=we.useRef(!1),Dn=we.useState(null),Qn=(0,De.Z)(Dn,2),Pr=Qn[0],Yn=Qn[1],Mr=(0,we.useRef)(null),Ur=(0,we.useRef)(null),_r=function(){var gr;return(gr=Ur.current)===null||gr===void 0?void 0:gr.textArea},ni=function(){_r().focus()};(0,we.useImperativeHandle)(ct,function(){var Nn;return{resizableTextArea:Ur.current,focus:ni,blur:function(){_r().blur()},nativeElement:((Nn=Mr.current)===null||Nn===void 0?void 0:Nn.nativeElement)||_r()}}),(0,we.useEffect)(function(){En(function(Nn){return!Me&&Nn})},[Me]);var Li=we.useState(null),_i=(0,De.Z)(Li,2),Di=_i[0],ui=_i[1];we.useEffect(function(){if(Di){var Nn;(Nn=_r()).setSelectionRange.apply(Nn,(0,ze.Z)(Di))}},[Di]);var Wi=(0,Se.Z)(Qe,pt),et=(Pt=Wi.max)!==null&&Pt!==void 0?Pt:ft,jr=Number(et)>0,dr=Wi.strategy(Ht),Ai=!!et&&dr>et,lr=function(gr,Zr){var Xn=Zr;!bn.current&&Wi.exceedFormatter&&Wi.max&&Wi.strategy(Zr)>Wi.max&&(Xn=Wi.exceedFormatter(Zr,{max:Wi.max}),Zr!==Xn&&ui([_r().selectionStart||0,_r().selectionEnd||0])),rn(Xn),(0,Le.rJ)(gr.currentTarget,gr,wt,Xn)},yr=function(gr){bn.current=!0,ut==null||ut(gr)},Lr=function(gr){bn.current=!1,lr(gr,gr.currentTarget.value),Et==null||Et(gr)},uo=function(gr){lr(gr,gr.target.value)},on=function(gr){gr.key==="Enter"&&rt&&rt(gr),Nt==null||Nt(gr)},dn=function(gr){En(!0),yt==null||yt(gr)},en=function(gr){En(!1),xt==null||xt(gr)},vn=function(gr){rn(""),ni(),(0,Le.rJ)(_r(),gr,wt)},fr=mt,cr;Wi.show&&(Wi.showFormatter?cr=Wi.showFormatter({value:Ht,count:dr,maxLength:et}):cr="".concat(dr).concat(jr?" / ".concat(et):""),fr=we.createElement(we.Fragment,null,fr,we.createElement("span",{className:ke()("".concat(kt,"-data-count"),tt==null?void 0:tt.count),style:Ie==null?void 0:Ie.count},cr)));var oi=function(gr){var Zr;_e==null||_e(gr),(Zr=_r())!==null&&Zr!==void 0&&Zr.style.height&&Yn(!0)},an=!Ct&&!pt&&!dt;return we.createElement(Ce.BaseInput,{ref:Mr,value:Ht,allowClear:dt,handleReset:vn,suffix:fr,prefixCls:kt,classNames:(0,oe.Z)((0,oe.Z)({},tt),{},{affixWrapper:ke()(tt==null?void 0:tt.affixWrapper,(0,Dt.Z)((0,Dt.Z)({},"".concat(kt,"-show-count"),pt),"".concat(kt,"-textarea-allow-clear"),dt))}),disabled:Me,focused:Ut,className:ke()(Ke,Ai&&"".concat(kt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},xe),Pr&&!an?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof cr=="string"?cr:void 0}},hidden:Ze,readOnly:St,onClear:He},we.createElement(We,(0,ht.Z)({},Ot,{autoSize:Ct,maxLength:ft,onKeyDown:on,onChange:uo,onFocus:dn,onBlur:en,onCompositionStart:yr,onCompositionEnd:Lr,className:ke()(tt==null?void 0:tt.textarea),style:(0,oe.Z)((0,oe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:xe==null?void 0:xe.resize}),disabled:Me,prefixCls:kt,onResize:oi,ref:Ur,readOnly:St})))}),Ve=Ue,ot=Ve},639:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var ht=at(67711),Dt=at(52873),oe=at(98506),ze=at(16886),De=at(33346),fe=at(59301),me=at(92310),ke=at.n(me),Ce=at(26112),Se=at(30699),Le=function(Pe){for(var je=Pe.prefixCls,Be=Pe.level,Fe=Pe.isStart,Ne=Pe.isEnd,Ae="".concat(je,"-indent-unit"),Re=[],We=0;We<Be;We+=1)Re.push(fe.createElement("span",{key:We,className:ke()(Ae,(0,Dt.Z)((0,Dt.Z)({},"".concat(Ae,"-start"),Fe[We]),"".concat(Ae,"-end"),Ne[We]))}));return fe.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Re)},ve=fe.memo(Le),we=at(65065),de=at(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ee="open",ae="close",ie="---",le=function(Pe){var je,Be,Fe,Ne=Pe.eventKey,Ae=Pe.className,Re=Pe.style,We=Pe.dragOver,Ye=Pe.dragOverGapTop,Ue=Pe.dragOverGapBottom,Ve=Pe.isLeaf,ot=Pe.isStart,st=Pe.isEnd,ct=Pe.expanded,Pt=Pe.selected,$e=Pe.checked,nt=Pe.halfChecked,yt=Pe.loading,xt=Pe.domRef,wt=Pe.active,dt=Pe.data,ft=Pe.onMouseMove,ut=Pe.selectable,Et=(0,De.Z)(Pe,z),mt=fe.useContext(Se.k),vt=fe.useContext(Se.y),kt=fe.useRef(null),pt=fe.useState(!1),Qe=(0,ze.Z)(pt,2),Ke=Qe[0],xe=Qe[1],Me=!!(mt.disabled||Pe.disabled||(je=vt.nodeDisabled)!==null&&je!==void 0&&je.call(vt,dt)),Ze=fe.useMemo(function(){return!mt.checkable||Pe.checkable===!1?!1:mt.checkable},[mt.checkable,Pe.checkable]),tt=function(dr){Me||mt.onNodeSelect(dr,(0,de.F)(Pe))},Ie=function(dr){Me||!Ze||Pe.disableCheckbox||mt.onNodeCheck(dr,(0,de.F)(Pe),!$e)},_e=fe.useMemo(function(){return typeof ut=="boolean"?ut:mt.selectable},[ut,mt.selectable]),He=function(dr){mt.onNodeClick(dr,(0,de.F)(Pe)),_e?tt(dr):Ie(dr)},rt=function(dr){mt.onNodeDoubleClick(dr,(0,de.F)(Pe))},St=function(dr){mt.onNodeMouseEnter(dr,(0,de.F)(Pe))},Ct=function(dr){mt.onNodeMouseLeave(dr,(0,de.F)(Pe))},Nt=function(dr){mt.onNodeContextMenu(dr,(0,de.F)(Pe))},Ot=fe.useMemo(function(){return!!(mt.draggable&&(!mt.draggable.nodeDraggable||mt.draggable.nodeDraggable(dt)))},[mt.draggable,dt]),Rt=function(dr){dr.stopPropagation(),xe(!0),mt.onNodeDragStart(dr,Pe);try{dr.dataTransfer.setData("text/plain","")}catch(Ai){}},$t=function(dr){dr.preventDefault(),dr.stopPropagation(),mt.onNodeDragEnter(dr,Pe)},qt=function(dr){dr.preventDefault(),dr.stopPropagation(),mt.onNodeDragOver(dr,Pe)},rn=function(dr){dr.stopPropagation(),mt.onNodeDragLeave(dr,Pe)},Ht=function(dr){dr.stopPropagation(),xe(!1),mt.onNodeDragEnd(dr,Pe)},sn=function(dr){dr.preventDefault(),dr.stopPropagation(),xe(!1),mt.onNodeDrop(dr,Pe)},tn=function(dr){yt||mt.onNodeExpand(dr,(0,de.F)(Pe))},Ut=fe.useMemo(function(){var jr=(0,we.Z)(mt.keyEntities,Ne)||{},dr=jr.children;return!!(dr||[]).length},[mt.keyEntities,Ne]),En=fe.useMemo(function(){return Ve===!1?!1:Ve||!mt.loadData&&!Ut||mt.loadData&&Pe.loaded&&!Ut},[Ve,mt.loadData,Ut,Pe.loaded]);fe.useEffect(function(){yt||typeof mt.loadData=="function"&&ct&&!En&&!Pe.loaded&&mt.onNodeLoad((0,de.F)(Pe))},[yt,mt.loadData,mt.onNodeLoad,ct,En,Pe]);var bn=fe.useMemo(function(){var jr;return(jr=mt.draggable)!==null&&jr!==void 0&&jr.icon?fe.createElement("span",{className:"".concat(mt.prefixCls,"-draggable-icon")},mt.draggable.icon):null},[mt.draggable]),Dn=function(dr){var Ai=Pe.switcherIcon||mt.switcherIcon;return typeof Ai=="function"?Ai((0,oe.Z)((0,oe.Z)({},Pe),{},{isLeaf:dr})):Ai},Qn=function(){if(En){var dr=Dn(!0);return dr!==!1?fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-switcher"),"".concat(mt.prefixCls,"-switcher-noop"))},dr):null}var Ai=Dn(!1);return Ai!==!1?fe.createElement("span",{onClick:tn,className:ke()("".concat(mt.prefixCls,"-switcher"),"".concat(mt.prefixCls,"-switcher_").concat(ct?ee:ae))},Ai):null},Pr=fe.useMemo(function(){if(!Ze)return null;var jr=typeof Ze!="boolean"?Ze:null;return fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-checkbox"),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},"".concat(mt.prefixCls,"-checkbox-checked"),$e),"".concat(mt.prefixCls,"-checkbox-indeterminate"),!$e&&nt),"".concat(mt.prefixCls,"-checkbox-disabled"),Me||Pe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":nt?"mixed":$e,"aria-disabled":Me||Pe.disableCheckbox,"aria-label":"Select ".concat(typeof Pe.title=="string"?Pe.title:"tree node")},jr)},[Ze,$e,nt,Me,Pe.disableCheckbox,Pe.title]),Yn=fe.useMemo(function(){return En?null:ct?ee:ae},[En,ct]),Mr=fe.useMemo(function(){return fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-iconEle"),"".concat(mt.prefixCls,"-icon__").concat(Yn||"docu"),(0,Dt.Z)({},"".concat(mt.prefixCls,"-icon_loading"),yt))})},[mt.prefixCls,Yn,yt]),Ur=fe.useMemo(function(){var jr=!!mt.draggable,dr=!Pe.disabled&&jr&&mt.dragOverNodeKey===Ne;return dr?mt.dropIndicatorRender({dropPosition:mt.dropPosition,dropLevelOffset:mt.dropLevelOffset,indent:mt.indent,prefixCls:mt.prefixCls,direction:mt.direction}):null},[mt.dropPosition,mt.dropLevelOffset,mt.indent,mt.prefixCls,mt.direction,mt.draggable,mt.dragOverNodeKey,mt.dropIndicatorRender]),_r=fe.useMemo(function(){var jr=Pe.title,dr=jr===void 0?ie:jr,Ai="".concat(mt.prefixCls,"-node-content-wrapper"),lr;if(mt.showIcon){var yr=Pe.icon||mt.icon;lr=yr?fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-iconEle"),"".concat(mt.prefixCls,"-icon__customize"))},typeof yr=="function"?yr(Pe):yr):Mr}else mt.loadData&&yt&&(lr=Mr);var Lr;return typeof dr=="function"?Lr=dr(dt):mt.titleRender?Lr=mt.titleRender(dt):Lr=dr,fe.createElement("span",{ref:kt,title:typeof dr=="string"?dr:"",className:ke()(Ai,"".concat(Ai,"-").concat(Yn||"normal"),(0,Dt.Z)({},"".concat(mt.prefixCls,"-node-selected"),!Me&&(Pt||Ke))),onMouseEnter:St,onMouseLeave:Ct,onContextMenu:Nt,onClick:He,onDoubleClick:rt},lr,fe.createElement("span",{className:"".concat(mt.prefixCls,"-title")},Lr),Ur)},[mt.prefixCls,mt.showIcon,Pe,mt.icon,Mr,mt.titleRender,dt,Yn,St,Ct,Nt,He,rt]),ni=(0,Ce.Z)(Et,{aria:!0,data:!0}),Li=(0,we.Z)(mt.keyEntities,Ne)||{},_i=Li.level,Di=st[st.length-1],ui=!Me&&Ot,Wi=mt.draggingNodeKey===Ne,et=ut!==void 0?{"aria-selected":!!ut}:void 0;return fe.createElement("div",(0,ht.Z)({ref:xt,role:"treeitem","aria-expanded":Ve?void 0:ct,className:ke()(Ae,"".concat(mt.prefixCls,"-treenode"),(Fe={},(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Fe,"".concat(mt.prefixCls,"-treenode-disabled"),Me),"".concat(mt.prefixCls,"-treenode-switcher-").concat(ct?"open":"close"),!Ve),"".concat(mt.prefixCls,"-treenode-checkbox-checked"),$e),"".concat(mt.prefixCls,"-treenode-checkbox-indeterminate"),nt),"".concat(mt.prefixCls,"-treenode-selected"),Pt),"".concat(mt.prefixCls,"-treenode-loading"),yt),"".concat(mt.prefixCls,"-treenode-active"),wt),"".concat(mt.prefixCls,"-treenode-leaf-last"),Di),"".concat(mt.prefixCls,"-treenode-draggable"),Ot),"dragging",Wi),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Fe,"drop-target",mt.dropTargetKey===Ne),"drop-container",mt.dropContainerKey===Ne),"drag-over",!Me&&We),"drag-over-gap-top",!Me&&Ye),"drag-over-gap-bottom",!Me&&Ue),"filter-node",(Be=mt.filterTreeNode)===null||Be===void 0?void 0:Be.call(mt,(0,de.F)(Pe))),"".concat(mt.prefixCls,"-treenode-leaf"),En))),style:Re,draggable:ui,onDragStart:ui?Rt:void 0,onDragEnter:Ot?$t:void 0,onDragOver:Ot?qt:void 0,onDragLeave:Ot?rn:void 0,onDrop:Ot?sn:void 0,onDragEnd:Ot?Ht:void 0,onMouseMove:ft},et,ni),fe.createElement(ve,{prefixCls:mt.prefixCls,level:_i,isStart:ot,isEnd:st}),bn,Qn(),Pr,_r)};le.isTreeNode=1;var ue=le},30699:function(gn,cn,at){"use strict";at.d(cn,{k:function(){return Dt},y:function(){return oe}});var ht=at(59301),Dt=ht.createContext(null),oe=ht.createContext({})},71598:function(gn,cn,at){"use strict";at.d(cn,{OF:function(){return Ne.Z},y6:function(){return ae.y},ZP:function(){return Me}});var ht=at(67711),Dt=at(26420),oe=at(98506),ze=at(15142),De=at(42573),fe=at(58698),me=at(62437),ke=at(74700),Ce=at(45080),Se=at(52873),Le=at(92310),ve=at.n(Le),we=at(10228),de=at(26112),z=at(48736),ee=at(59301),ae=at(30699),ie=function(tt){var Ie=tt.dropPosition,_e=tt.dropLevelOffset,He=tt.indent,rt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){case-1:rt.top=0,rt.left=-_e*He;break;case 1:rt.bottom=0,rt.left=-_e*He;break;case 0:rt.bottom=0,rt.left=He;break}return ee.createElement("div",{style:rt})},le=ie;function ue(Ze){if(Ze==null)throw new TypeError("Cannot destructure "+Ze)}var ge=at(16886),Pe=at(33346),je=at(34280),Be=at(6790),Fe=at(77900),Ne=at(639);function Ae(Ze,tt){var Ie=ee.useState(!1),_e=(0,ge.Z)(Ie,2),He=_e[0],rt=_e[1];(0,je.Z)(function(){if(He)return Ze(),function(){tt()}},[He]),(0,je.Z)(function(){return rt(!0),function(){rt(!1)}},[])}var Re=Ae,We=at(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ue=ee.forwardRef(function(Ze,tt){var Ie=Ze.className,_e=Ze.style,He=Ze.motion,rt=Ze.motionNodes,St=Ze.motionType,Ct=Ze.onMotionStart,Nt=Ze.onMotionEnd,Ot=Ze.active,Rt=Ze.treeNodeRequiredProps,$t=(0,Pe.Z)(Ze,Ye),qt=ee.useState(!0),rn=(0,ge.Z)(qt,2),Ht=rn[0],sn=rn[1],tn=ee.useContext(ae.k),Ut=tn.prefixCls,En=rt&&St!=="hide";(0,je.Z)(function(){rt&&En!==Ht&&sn(En)},[rt]);var bn=function(){rt&&Ct()},Dn=ee.useRef(!1),Qn=function(){rt&&!Dn.current&&(Dn.current=!0,Nt())};Re(bn,Qn);var Pr=function(Mr){En===Mr&&Qn()};return rt?ee.createElement(Fe.default,(0,ht.Z)({ref:tt,visible:Ht},He,{motionAppear:St==="show",onVisibleChanged:Pr}),function(Yn,Mr){var Ur=Yn.className,_r=Yn.style;return ee.createElement("div",{ref:Mr,className:ve()("".concat(Ut,"-treenode-motion"),Ur),style:_r},rt.map(function(ni){var Li=Object.assign({},(ue(ni.data),ni.data)),_i=ni.title,Di=ni.key,ui=ni.isStart,Wi=ni.isEnd;delete Li.children;var et=(0,We.H8)(Di,Rt);return ee.createElement(Ne.Z,(0,ht.Z)({},Li,et,{title:_i,active:Ot,data:ni.data,key:Di,isStart:ui,isEnd:Wi}))}))}):ee.createElement(Ne.Z,(0,ht.Z)({domRef:tt,className:Ie,style:_e},$t,{active:Ot}))}),Ve=Ue;function ot(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Ze.length,_e=tt.length;if(Math.abs(Ie-_e)!==1)return{add:!1,key:null};function He(rt,St){var Ct=new Map;rt.forEach(function(Ot){Ct.set(Ot,!0)});var Nt=St.filter(function(Ot){return!Ct.has(Ot)});return Nt.length===1?Nt[0]:null}return Ie<_e?{add:!0,key:He(Ze,tt)}:{add:!1,key:He(tt,Ze)}}function st(Ze,tt,Ie){var _e=Ze.findIndex(function(Ct){return Ct.key===Ie}),He=Ze[_e+1],rt=tt.findIndex(function(Ct){return Ct.key===Ie});if(He){var St=tt.findIndex(function(Ct){return Ct.key===He.key});return tt.slice(rt+1,St)}return tt.slice(rt+1)}var ct=["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"],Pt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},$e=function(){},nt="RC_TREE_MOTION_".concat(Math.random()),yt={key:nt},xt={key:nt,level:0,index:0,pos:"0",node:yt,nodes:[yt]},wt={parent:null,children:[],pos:xt.pos,data:yt,title:null,key:nt,isStart:[],isEnd:[]};function dt(Ze,tt,Ie,_e){return tt===!1||!Ie?Ze:Ze.slice(0,Math.ceil(Ie/_e)+1)}function ft(Ze){var tt=Ze.key,Ie=Ze.pos;return(0,We.km)(tt,Ie)}function ut(Ze){for(var tt=String(Ze.data.key),Ie=Ze;Ie.parent;)Ie=Ie.parent,tt="".concat(Ie.data.key," > ").concat(tt);return tt}var Et=ee.forwardRef(function(Ze,tt){var Ie=Ze.prefixCls,_e=Ze.data,He=Ze.selectable,rt=Ze.checkable,St=Ze.expandedKeys,Ct=Ze.selectedKeys,Nt=Ze.checkedKeys,Ot=Ze.loadedKeys,Rt=Ze.loadingKeys,$t=Ze.halfCheckedKeys,qt=Ze.keyEntities,rn=Ze.disabled,Ht=Ze.dragging,sn=Ze.dragOverNodeKey,tn=Ze.dropPosition,Ut=Ze.motion,En=Ze.height,bn=Ze.itemHeight,Dn=Ze.virtual,Qn=Ze.scrollWidth,Pr=Ze.focusable,Yn=Ze.activeItem,Mr=Ze.focused,Ur=Ze.tabIndex,_r=Ze.onKeyDown,ni=Ze.onFocus,Li=Ze.onBlur,_i=Ze.onActiveChange,Di=Ze.onListChangeStart,ui=Ze.onListChangeEnd,Wi=(0,Pe.Z)(Ze,ct),et=ee.useRef(null),jr=ee.useRef(null);ee.useImperativeHandle(tt,function(){return{scrollTo:function(ar){et.current.scrollTo(ar)},getIndentWidth:function(){return jr.current.offsetWidth}}});var dr=ee.useState(St),Ai=(0,ge.Z)(dr,2),lr=Ai[0],yr=Ai[1],Lr=ee.useState(_e),uo=(0,ge.Z)(Lr,2),on=uo[0],dn=uo[1],en=ee.useState(_e),vn=(0,ge.Z)(en,2),fr=vn[0],cr=vn[1],oi=ee.useState([]),an=(0,ge.Z)(oi,2),Nn=an[0],gr=an[1],Zr=ee.useState(null),Xn=(0,ge.Z)(Zr,2),jt=Xn[0],Wt=Xn[1],jn=ee.useRef(_e);jn.current=_e;function Cn(){var ur=jn.current;dn(ur),cr(ur),gr([]),Wt(null),ui()}(0,je.Z)(function(){yr(St);var ur=ot(lr,St);if(ur.key!==null)if(ur.add){var ar=on.findIndex(function(sr){var mn=sr.key;return mn===ur.key}),mr=dt(st(on,_e,ur.key),Dn,En,bn),Bn=on.slice();Bn.splice(ar+1,0,wt),cr(Bn),gr(mr),Wt("show")}else{var Un=_e.findIndex(function(sr){var mn=sr.key;return mn===ur.key}),er=dt(st(_e,on,ur.key),Dn,En,bn),Ar=_e.slice();Ar.splice(Un+1,0,wt),cr(Ar),gr(er),Wt("hide")}else on!==_e&&(dn(_e),cr(_e))},[St,_e]),ee.useEffect(function(){Ht||Cn()},[Ht]);var Jt=Ut?fr:_e,_n={expandedKeys:St,selectedKeys:Ct,loadedKeys:Ot,loadingKeys:Rt,checkedKeys:Nt,halfCheckedKeys:$t,dragOverNodeKey:sn,dropPosition:tn,keyEntities:qt};return ee.createElement(ee.Fragment,null,Mr&&Yn&&ee.createElement("span",{style:Pt,"aria-live":"assertive"},ut(Yn)),ee.createElement("div",null,ee.createElement("input",{style:Pt,disabled:Pr===!1||rn,tabIndex:Pr!==!1?Ur:null,onKeyDown:_r,onFocus:ni,onBlur:Li,value:"",onChange:$e,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ie,"-indent")},ee.createElement("div",{ref:jr,className:"".concat(Ie,"-indent-unit")}))),ee.createElement(Be.Z,(0,ht.Z)({},Wi,{data:Jt,itemKey:ft,height:En,fullHeight:!1,virtual:Dn,itemHeight:bn,scrollWidth:Qn,prefixCls:"".concat(Ie,"-list"),ref:et,role:"tree",onVisibleChange:function(ar){ar.every(function(mr){return ft(mr)!==nt})&&Cn()}}),function(ur){var ar=ur.pos,mr=Object.assign({},(ue(ur.data),ur.data)),Bn=ur.title,Un=ur.key,er=ur.isStart,Ar=ur.isEnd,sr=(0,We.km)(Un,ar);delete mr.key,delete mr.children;var mn=(0,We.H8)(sr,_n);return ee.createElement(Ve,(0,ht.Z)({},mr,mn,{title:Bn,active:!!Yn&&Un===Yn.key,pos:ar,data:ur.data,isStart:er,isEnd:Ar,motion:Ut,motionNodes:Un===nt?Nn:null,motionType:jt,onMotionStart:Di,onMotionEnd:Cn,treeNodeRequiredProps:_n,onMouseMove:function(){_i(null)}}))}))}),mt=Et,vt=at(82661),kt=at(34643),pt=at(65065),Qe=10,Ke=function(Ze){(0,ke.Z)(Ie,Ze);var tt=(0,Ce.Z)(Ie);function Ie(){var _e;(0,De.Z)(this,Ie);for(var He=arguments.length,rt=new Array(He),St=0;St<He;St++)rt[St]=arguments[St];return _e=tt.call.apply(tt,[this].concat(rt)),(0,Se.Z)((0,me.Z)(_e),"destroyed",!1),(0,Se.Z)((0,me.Z)(_e),"delayedDragEnterLogic",void 0),(0,Se.Z)((0,me.Z)(_e),"loadingRetryTimes",{}),(0,Se.Z)((0,me.Z)(_e),"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,We.w$)()}),(0,Se.Z)((0,me.Z)(_e),"dragStartMousePosition",null),(0,Se.Z)((0,me.Z)(_e),"dragNodeProps",null),(0,Se.Z)((0,me.Z)(_e),"currentMouseOverDroppableNodeKey",null),(0,Se.Z)((0,me.Z)(_e),"listRef",ee.createRef()),(0,Se.Z)((0,me.Z)(_e),"onNodeDragStart",function(Ct,Nt){var Ot=_e.state,Rt=Ot.expandedKeys,$t=Ot.keyEntities,qt=_e.props.onDragStart,rn=Nt.eventKey;_e.dragNodeProps=Nt,_e.dragStartMousePosition={x:Ct.clientX,y:Ct.clientY};var Ht=(0,vt._5)(Rt,rn);_e.setState({draggingNodeKey:rn,dragChildrenKeys:(0,vt.wA)(rn,$t),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Ht),window.addEventListener("dragend",_e.onWindowDragEnd),qt==null||qt({event:Ct,node:(0,We.F)(Nt)})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnter",function(Ct,Nt){var Ot=_e.state,Rt=Ot.expandedKeys,$t=Ot.keyEntities,qt=Ot.dragChildrenKeys,rn=Ot.flattenNodes,Ht=Ot.indent,sn=_e.props,tn=sn.onDragEnter,Ut=sn.onExpand,En=sn.allowDrop,bn=sn.direction,Dn=Nt.pos,Qn=Nt.eventKey;if(_e.currentMouseOverDroppableNodeKey!==Qn&&(_e.currentMouseOverDroppableNodeKey=Qn),!_e.dragNodeProps){_e.resetDragState();return}var Pr=(0,vt.OM)(Ct,_e.dragNodeProps,Nt,Ht,_e.dragStartMousePosition,En,rn,$t,Rt,bn),Yn=Pr.dropPosition,Mr=Pr.dropLevelOffset,Ur=Pr.dropTargetKey,_r=Pr.dropContainerKey,ni=Pr.dropTargetPos,Li=Pr.dropAllowed,_i=Pr.dragOverNodeKey;if(qt.includes(Ur)||!Li){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Di){clearTimeout(_e.delayedDragEnterLogic[Di])}),_e.dragNodeProps.eventKey!==Nt.eventKey&&(Ct.persist(),_e.delayedDragEnterLogic[Dn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Di=(0,ze.Z)(Rt),ui=(0,pt.Z)($t,Nt.eventKey);ui&&(ui.children||[]).length&&(Di=(0,vt.L0)(Rt,Nt.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Di),Ut==null||Ut(Di,{node:(0,We.F)(Nt),expanded:!0,nativeEvent:Ct.nativeEvent})}},800)),_e.dragNodeProps.eventKey===Ur&&Mr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:_i,dropPosition:Yn,dropLevelOffset:Mr,dropTargetKey:Ur,dropContainerKey:_r,dropTargetPos:ni,dropAllowed:Li}),tn==null||tn({event:Ct,node:(0,We.F)(Nt),expandedKeys:Rt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragOver",function(Ct,Nt){var Ot=_e.state,Rt=Ot.dragChildrenKeys,$t=Ot.flattenNodes,qt=Ot.keyEntities,rn=Ot.expandedKeys,Ht=Ot.indent,sn=_e.props,tn=sn.onDragOver,Ut=sn.allowDrop,En=sn.direction;if(_e.dragNodeProps){var bn=(0,vt.OM)(Ct,_e.dragNodeProps,Nt,Ht,_e.dragStartMousePosition,Ut,$t,qt,rn,En),Dn=bn.dropPosition,Qn=bn.dropLevelOffset,Pr=bn.dropTargetKey,Yn=bn.dropContainerKey,Mr=bn.dropTargetPos,Ur=bn.dropAllowed,_r=bn.dragOverNodeKey;Rt.includes(Pr)||!Ur||(_e.dragNodeProps.eventKey===Pr&&Qn===0?_e.state.dropPosition===null&&_e.state.dropLevelOffset===null&&_e.state.dropTargetKey===null&&_e.state.dropContainerKey===null&&_e.state.dropTargetPos===null&&_e.state.dropAllowed===!1&&_e.state.dragOverNodeKey===null||_e.resetDragState():Dn===_e.state.dropPosition&&Qn===_e.state.dropLevelOffset&&Pr===_e.state.dropTargetKey&&Yn===_e.state.dropContainerKey&&Mr===_e.state.dropTargetPos&&Ur===_e.state.dropAllowed&&_r===_e.state.dragOverNodeKey||_e.setState({dropPosition:Dn,dropLevelOffset:Qn,dropTargetKey:Pr,dropContainerKey:Yn,dropTargetPos:Mr,dropAllowed:Ur,dragOverNodeKey:_r}),tn==null||tn({event:Ct,node:(0,We.F)(Nt)}))}}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragLeave",function(Ct,Nt){_e.currentMouseOverDroppableNodeKey===Nt.eventKey&&!Ct.currentTarget.contains(Ct.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Ot=_e.props.onDragLeave;Ot==null||Ot({event:Ct,node:(0,We.F)(Nt)})}),(0,Se.Z)((0,me.Z)(_e),"onWindowDragEnd",function(Ct){_e.onNodeDragEnd(Ct,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnd",function(Ct,Nt){var Ot=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ot==null||Ot({event:Ct,node:(0,We.F)(Nt)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDrop",function(Ct,Nt){var Ot,Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=_e.state,qt=$t.dragChildrenKeys,rn=$t.dropPosition,Ht=$t.dropTargetKey,sn=$t.dropTargetPos,tn=$t.dropAllowed;if(tn){var Ut=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ht!==null){var En=(0,oe.Z)((0,oe.Z)({},(0,We.H8)(Ht,_e.getTreeNodeRequiredProps())),{},{active:((Ot=_e.getActiveItem())===null||Ot===void 0?void 0:Ot.key)===Ht,data:(0,pt.Z)(_e.state.keyEntities,Ht).node}),bn=qt.includes(Ht);(0,z.ZP)(!bn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Dn=(0,vt.yx)(sn),Qn={event:Ct,node:(0,We.F)(En),dragNode:_e.dragNodeProps?(0,We.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(qt),dropToGap:rn!==0,dropPosition:rn+Number(Dn[Dn.length-1])};Rt||Ut==null||Ut(Qn),_e.dragNodeProps=null}}}),(0,Se.Z)((0,me.Z)(_e),"cleanDragState",function(){var Ct=_e.state.draggingNodeKey;Ct!==null&&_e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_e.dragStartMousePosition=null,_e.currentMouseOverDroppableNodeKey=null}),(0,Se.Z)((0,me.Z)(_e),"triggerExpandActionExpand",function(Ct,Nt){var Ot=_e.state,Rt=Ot.expandedKeys,$t=Ot.flattenNodes,qt=Nt.expanded,rn=Nt.key,Ht=Nt.isLeaf;if(!(Ht||Ct.shiftKey||Ct.metaKey||Ct.ctrlKey)){var sn=$t.filter(function(Ut){return Ut.key===rn})[0],tn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)(rn,_e.getTreeNodeRequiredProps())),{},{data:sn.data}));_e.setExpandedKeys(qt?(0,vt._5)(Rt,rn):(0,vt.L0)(Rt,rn)),_e.onNodeExpand(Ct,tn)}}),(0,Se.Z)((0,me.Z)(_e),"onNodeClick",function(Ct,Nt){var Ot=_e.props,Rt=Ot.onClick,$t=Ot.expandAction;$t==="click"&&_e.triggerExpandActionExpand(Ct,Nt),Rt==null||Rt(Ct,Nt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDoubleClick",function(Ct,Nt){var Ot=_e.props,Rt=Ot.onDoubleClick,$t=Ot.expandAction;$t==="doubleClick"&&_e.triggerExpandActionExpand(Ct,Nt),Rt==null||Rt(Ct,Nt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeSelect",function(Ct,Nt){var Ot=_e.state.selectedKeys,Rt=_e.state,$t=Rt.keyEntities,qt=Rt.fieldNames,rn=_e.props,Ht=rn.onSelect,sn=rn.multiple,tn=Nt.selected,Ut=Nt[qt.key],En=!tn;En?sn?Ot=(0,vt.L0)(Ot,Ut):Ot=[Ut]:Ot=(0,vt._5)(Ot,Ut);var bn=Ot.map(function(Dn){var Qn=(0,pt.Z)($t,Dn);return Qn?Qn.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Ot}),Ht==null||Ht(Ot,{event:"select",selected:En,node:Nt,selectedNodes:bn,nativeEvent:Ct.nativeEvent})}),(0,Se.Z)((0,me.Z)(_e),"onNodeCheck",function(Ct,Nt,Ot){var Rt=_e.state,$t=Rt.keyEntities,qt=Rt.checkedKeys,rn=Rt.halfCheckedKeys,Ht=_e.props,sn=Ht.checkStrictly,tn=Ht.onCheck,Ut=Nt.key,En,bn={event:"check",node:Nt,checked:Ot,nativeEvent:Ct.nativeEvent};if(sn){var Dn=Ot?(0,vt.L0)(qt,Ut):(0,vt._5)(qt,Ut),Qn=(0,vt._5)(rn,Ut);En={checked:Dn,halfChecked:Qn},bn.checkedNodes=Dn.map(function(ni){return(0,pt.Z)($t,ni)}).filter(Boolean).map(function(ni){return ni.node}),_e.setUncontrolledState({checkedKeys:Dn})}else{var Pr=(0,kt.S)([].concat((0,ze.Z)(qt),[Ut]),!0,$t),Yn=Pr.checkedKeys,Mr=Pr.halfCheckedKeys;if(!Ot){var Ur=new Set(Yn);Ur.delete(Ut);var _r=(0,kt.S)(Array.from(Ur),{checked:!1,halfCheckedKeys:Mr},$t);Yn=_r.checkedKeys,Mr=_r.halfCheckedKeys}En=Yn,bn.checkedNodes=[],bn.checkedNodesPositions=[],bn.halfCheckedKeys=Mr,Yn.forEach(function(ni){var Li=(0,pt.Z)($t,ni);if(Li){var _i=Li.node,Di=Li.pos;bn.checkedNodes.push(_i),bn.checkedNodesPositions.push({node:_i,pos:Di})}}),_e.setUncontrolledState({checkedKeys:Yn},!1,{halfCheckedKeys:Mr})}tn==null||tn(En,bn)}),(0,Se.Z)((0,me.Z)(_e),"onNodeLoad",function(Ct){var Nt,Ot=Ct.key,Rt=_e.state.keyEntities,$t=(0,pt.Z)(Rt,Ot);if(!($t!=null&&(Nt=$t.children)!==null&&Nt!==void 0&&Nt.length)){var qt=new Promise(function(rn,Ht){_e.setState(function(sn){var tn=sn.loadedKeys,Ut=tn===void 0?[]:tn,En=sn.loadingKeys,bn=En===void 0?[]:En,Dn=_e.props,Qn=Dn.loadData,Pr=Dn.onLoad;if(!Qn||Ut.includes(Ot)||bn.includes(Ot))return null;var Yn=Qn(Ct);return Yn.then(function(){var Mr=_e.state.loadedKeys,Ur=(0,vt.L0)(Mr,Ot);Pr==null||Pr(Ur,{event:"load",node:Ct}),_e.setUncontrolledState({loadedKeys:Ur}),_e.setState(function(_r){return{loadingKeys:(0,vt._5)(_r.loadingKeys,Ot)}}),rn()}).catch(function(Mr){if(_e.setState(function(_r){return{loadingKeys:(0,vt._5)(_r.loadingKeys,Ot)}}),_e.loadingRetryTimes[Ot]=(_e.loadingRetryTimes[Ot]||0)+1,_e.loadingRetryTimes[Ot]>=Qe){var Ur=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,vt.L0)(Ur,Ot)}),rn()}Ht(Mr)}),{loadingKeys:(0,vt.L0)(bn,Ot)}})});return qt.catch(function(){}),qt}}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseEnter",function(Ct,Nt){var Ot=_e.props.onMouseEnter;Ot==null||Ot({event:Ct,node:Nt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseLeave",function(Ct,Nt){var Ot=_e.props.onMouseLeave;Ot==null||Ot({event:Ct,node:Nt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeContextMenu",function(Ct,Nt){var Ot=_e.props.onRightClick;Ot&&(Ct.preventDefault(),Ot({event:Ct,node:Nt}))}),(0,Se.Z)((0,me.Z)(_e),"onFocus",function(){var Ct=_e.props.onFocus;_e.setState({focused:!0});for(var Nt=arguments.length,Ot=new Array(Nt),Rt=0;Rt<Nt;Rt++)Ot[Rt]=arguments[Rt];Ct==null||Ct.apply(void 0,Ot)}),(0,Se.Z)((0,me.Z)(_e),"onBlur",function(){var Ct=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var Nt=arguments.length,Ot=new Array(Nt),Rt=0;Rt<Nt;Rt++)Ot[Rt]=arguments[Rt];Ct==null||Ct.apply(void 0,Ot)}),(0,Se.Z)((0,me.Z)(_e),"getTreeNodeRequiredProps",function(){var Ct=_e.state,Nt=Ct.expandedKeys,Ot=Ct.selectedKeys,Rt=Ct.loadedKeys,$t=Ct.loadingKeys,qt=Ct.checkedKeys,rn=Ct.halfCheckedKeys,Ht=Ct.dragOverNodeKey,sn=Ct.dropPosition,tn=Ct.keyEntities;return{expandedKeys:Nt||[],selectedKeys:Ot||[],loadedKeys:Rt||[],loadingKeys:$t||[],checkedKeys:qt||[],halfCheckedKeys:rn||[],dragOverNodeKey:Ht,dropPosition:sn,keyEntities:tn}}),(0,Se.Z)((0,me.Z)(_e),"setExpandedKeys",function(Ct){var Nt=_e.state,Ot=Nt.treeData,Rt=Nt.fieldNames,$t=(0,We.oH)(Ot,Ct,Rt);_e.setUncontrolledState({expandedKeys:Ct,flattenNodes:$t},!0)}),(0,Se.Z)((0,me.Z)(_e),"onNodeExpand",function(Ct,Nt){var Ot=_e.state.expandedKeys,Rt=_e.state,$t=Rt.listChanging,qt=Rt.fieldNames,rn=_e.props,Ht=rn.onExpand,sn=rn.loadData,tn=Nt.expanded,Ut=Nt[qt.key];if(!$t){var En=Ot.includes(Ut),bn=!tn;if((0,z.ZP)(tn&&En||!tn&&!En,"Expand state not sync with index check"),Ot=bn?(0,vt.L0)(Ot,Ut):(0,vt._5)(Ot,Ut),_e.setExpandedKeys(Ot),Ht==null||Ht(Ot,{node:Nt,expanded:bn,nativeEvent:Ct.nativeEvent}),bn&&sn){var Dn=_e.onNodeLoad(Nt);Dn&&Dn.then(function(){var Qn=(0,We.oH)(_e.state.treeData,Ot,qt);_e.setUncontrolledState({flattenNodes:Qn})}).catch(function(){var Qn=_e.state.expandedKeys,Pr=(0,vt._5)(Qn,Ut);_e.setExpandedKeys(Pr)})}}}),(0,Se.Z)((0,me.Z)(_e),"onListChangeStart",function(){_e.setUncontrolledState({listChanging:!0})}),(0,Se.Z)((0,me.Z)(_e),"onListChangeEnd",function(){setTimeout(function(){_e.setUncontrolledState({listChanging:!1})})}),(0,Se.Z)((0,me.Z)(_e),"onActiveChange",function(Ct){var Nt=_e.state.activeKey,Ot=_e.props,Rt=Ot.onActiveChange,$t=Ot.itemScrollOffset,qt=$t===void 0?0:$t;Nt!==Ct&&(_e.setState({activeKey:Ct}),Ct!==null&&_e.scrollTo({key:Ct,offset:qt}),Rt==null||Rt(Ct))}),(0,Se.Z)((0,me.Z)(_e),"getActiveItem",function(){var Ct=_e.state,Nt=Ct.activeKey,Ot=Ct.flattenNodes;return Nt===null?null:Ot.find(function(Rt){var $t=Rt.key;return $t===Nt})||null}),(0,Se.Z)((0,me.Z)(_e),"offsetActiveKey",function(Ct){var Nt=_e.state,Ot=Nt.flattenNodes,Rt=Nt.activeKey,$t=Ot.findIndex(function(Ht){var sn=Ht.key;return sn===Rt});$t===-1&&Ct<0&&($t=Ot.length),$t=($t+Ct+Ot.length)%Ot.length;var qt=Ot[$t];if(qt){var rn=qt.key;_e.onActiveChange(rn)}else _e.onActiveChange(null)}),(0,Se.Z)((0,me.Z)(_e),"onKeyDown",function(Ct){var Nt=_e.state,Ot=Nt.activeKey,Rt=Nt.expandedKeys,$t=Nt.checkedKeys,qt=Nt.fieldNames,rn=_e.props,Ht=rn.onKeyDown,sn=rn.checkable,tn=rn.selectable;switch(Ct.which){case we.Z.UP:{_e.offsetActiveKey(-1),Ct.preventDefault();break}case we.Z.DOWN:{_e.offsetActiveKey(1),Ct.preventDefault();break}}var Ut=_e.getActiveItem();if(Ut&&Ut.data){var En=_e.getTreeNodeRequiredProps(),bn=Ut.data.isLeaf===!1||!!(Ut.data[qt.children]||[]).length,Dn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)(Ot,En)),{},{data:Ut.data,active:!0}));switch(Ct.which){case we.Z.LEFT:{bn&&Rt.includes(Ot)?_e.onNodeExpand({},Dn):Ut.parent&&_e.onActiveChange(Ut.parent.key),Ct.preventDefault();break}case we.Z.RIGHT:{bn&&!Rt.includes(Ot)?_e.onNodeExpand({},Dn):Ut.children&&Ut.children.length&&_e.onActiveChange(Ut.children[0].key),Ct.preventDefault();break}case we.Z.ENTER:case we.Z.SPACE:{sn&&!Dn.disabled&&Dn.checkable!==!1&&!Dn.disableCheckbox?_e.onNodeCheck({},Dn,!$t.includes(Ot)):!sn&&tn&&!Dn.disabled&&Dn.selectable!==!1&&_e.onNodeSelect({},Dn);break}}}Ht==null||Ht(Ct)}),(0,Se.Z)((0,me.Z)(_e),"setUncontrolledState",function(Ct){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Rt=!1,$t=!0,qt={};Object.keys(Ct).forEach(function(rn){if(_e.props.hasOwnProperty(rn)){$t=!1;return}Rt=!0,qt[rn]=Ct[rn]}),Rt&&(!Nt||$t)&&_e.setState((0,oe.Z)((0,oe.Z)({},qt),Ot))}}),(0,Se.Z)((0,me.Z)(_e),"scrollTo",function(Ct){_e.listRef.current.scrollTo(Ct)}),_e}return(0,fe.Z)(Ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var He=this.props,rt=He.activeKey,St=He.itemScrollOffset,Ct=St===void 0?0:St;rt!==void 0&&rt!==this.state.activeKey&&(this.setState({activeKey:rt}),rt!==null&&this.scrollTo({key:rt,offset:Ct}))}},{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 He=this.state,rt=He.focused,St=He.flattenNodes,Ct=He.keyEntities,Nt=He.draggingNodeKey,Ot=He.activeKey,Rt=He.dropLevelOffset,$t=He.dropContainerKey,qt=He.dropTargetKey,rn=He.dropPosition,Ht=He.dragOverNodeKey,sn=He.indent,tn=this.props,Ut=tn.prefixCls,En=tn.className,bn=tn.style,Dn=tn.showLine,Qn=tn.focusable,Pr=tn.tabIndex,Yn=Pr===void 0?0:Pr,Mr=tn.selectable,Ur=tn.showIcon,_r=tn.icon,ni=tn.switcherIcon,Li=tn.draggable,_i=tn.checkable,Di=tn.checkStrictly,ui=tn.disabled,Wi=tn.motion,et=tn.loadData,jr=tn.filterTreeNode,dr=tn.height,Ai=tn.itemHeight,lr=tn.scrollWidth,yr=tn.virtual,Lr=tn.titleRender,uo=tn.dropIndicatorRender,on=tn.onContextMenu,dn=tn.onScroll,en=tn.direction,vn=tn.rootClassName,fr=tn.rootStyle,cr=(0,de.Z)(this.props,{aria:!0,data:!0}),oi;Li&&((0,Dt.Z)(Li)==="object"?oi=Li:typeof Li=="function"?oi={nodeDraggable:Li}:oi={});var an={prefixCls:Ut,selectable:Mr,showIcon:Ur,icon:_r,switcherIcon:ni,draggable:oi,draggingNodeKey:Nt,checkable:_i,checkStrictly:Di,disabled:ui,keyEntities:Ct,dropLevelOffset:Rt,dropContainerKey:$t,dropTargetKey:qt,dropPosition:rn,dragOverNodeKey:Ht,indent:sn,direction:en,dropIndicatorRender:uo,loadData:et,filterTreeNode:jr,titleRender:Lr,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 ee.createElement(ae.k.Provider,{value:an},ee.createElement("div",{className:ve()(Ut,En,vn,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Ut,"-show-line"),Dn),"".concat(Ut,"-focused"),rt),"".concat(Ut,"-active-focused"),Ot!==null)),style:fr},ee.createElement(mt,(0,ht.Z)({ref:this.listRef,prefixCls:Ut,style:bn,data:St,disabled:ui,selectable:Mr,checkable:!!_i,motion:Wi,dragging:Nt!==null,height:dr,itemHeight:Ai,virtual:yr,focusable:Qn,focused:rt,tabIndex:Yn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:on,onScroll:dn,scrollWidth:lr},this.getTreeNodeRequiredProps(),cr))))}}],[{key:"getDerivedStateFromProps",value:function(He,rt){var St=rt.prevProps,Ct={prevProps:He};function Nt(Yn){return!St&&He.hasOwnProperty(Yn)||St&&St[Yn]!==He[Yn]}var Ot,Rt=rt.fieldNames;if(Nt("fieldNames")&&(Rt=(0,We.w$)(He.fieldNames),Ct.fieldNames=Rt),Nt("treeData")?Ot=He.treeData:Nt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ot=(0,We.zn)(He.children)),Ot){Ct.treeData=Ot;var $t=(0,We.I8)(Ot,{fieldNames:Rt});Ct.keyEntities=(0,oe.Z)((0,Se.Z)({},nt,xt),$t.keyEntities)}var qt=Ct.keyEntities||rt.keyEntities;if(Nt("expandedKeys")||St&&Nt("autoExpandParent"))Ct.expandedKeys=He.autoExpandParent||!St&&He.defaultExpandParent?(0,vt.r7)(He.expandedKeys,qt):He.expandedKeys;else if(!St&&He.defaultExpandAll){var rn=(0,oe.Z)({},qt);delete rn[nt];var Ht=[];Object.keys(rn).forEach(function(Yn){var Mr=rn[Yn];Mr.children&&Mr.children.length&&Ht.push(Mr.key)}),Ct.expandedKeys=Ht}else!St&&He.defaultExpandedKeys&&(Ct.expandedKeys=He.autoExpandParent||He.defaultExpandParent?(0,vt.r7)(He.defaultExpandedKeys,qt):He.defaultExpandedKeys);if(Ct.expandedKeys||delete Ct.expandedKeys,Ot||Ct.expandedKeys){var sn=(0,We.oH)(Ot||rt.treeData,Ct.expandedKeys||rt.expandedKeys,Rt);Ct.flattenNodes=sn}if(He.selectable&&(Nt("selectedKeys")?Ct.selectedKeys=(0,vt.BT)(He.selectedKeys,He):!St&&He.defaultSelectedKeys&&(Ct.selectedKeys=(0,vt.BT)(He.defaultSelectedKeys,He))),He.checkable){var tn;if(Nt("checkedKeys")?tn=(0,vt.E6)(He.checkedKeys)||{}:!St&&He.defaultCheckedKeys?tn=(0,vt.E6)(He.defaultCheckedKeys)||{}:Ot&&(tn=(0,vt.E6)(He.checkedKeys)||{checkedKeys:rt.checkedKeys,halfCheckedKeys:rt.halfCheckedKeys}),tn){var Ut=tn,En=Ut.checkedKeys,bn=En===void 0?[]:En,Dn=Ut.halfCheckedKeys,Qn=Dn===void 0?[]:Dn;if(!He.checkStrictly){var Pr=(0,kt.S)(bn,!0,qt);bn=Pr.checkedKeys,Qn=Pr.halfCheckedKeys}Ct.checkedKeys=bn,Ct.halfCheckedKeys=Qn}}return Nt("loadedKeys")&&(Ct.loadedKeys=He.loadedKeys),Ct}}]),Ie}(ee.Component);(0,Se.Z)(Ke,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:le,allowDrop:function(){return!0},expandAction:!1}),(0,Se.Z)(Ke,"TreeNode",Ne.Z);var xe=Ke,Me=xe},82661:function(gn,cn,at){"use strict";at.d(cn,{BT:function(){return ee},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return Ce},r7:function(){return ue},wA:function(){return ve},yx:function(){return Le}});var ht=at(15142),Dt=at(26420),oe=at(48736),ze=at(59301),De=at(639),fe=at(65065),me=at(34061),ke=null;function Ce(ge,Pe){if(!ge)return[];var je=ge.slice(),Be=je.indexOf(Pe);return Be>=0&&je.splice(Be,1),je}function Se(ge,Pe){var je=(ge||[]).slice();return je.indexOf(Pe)===-1&&je.push(Pe),je}function Le(ge){return ge.split("-")}function ve(ge,Pe){var je=[],Be=(0,fe.Z)(Pe,ge);function Fe(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ne.forEach(function(Ae){var Re=Ae.key,We=Ae.children;je.push(Re),Fe(We)})}return Fe(Be.children),je}function we(ge){if(ge.parent){var Pe=Le(ge.pos);return Number(Pe[Pe.length-1])===ge.parent.children.length-1}return!1}function de(ge){var Pe=Le(ge.pos);return Number(Pe[Pe.length-1])===0}function z(ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye){var Ue,Ve=ge.clientX,ot=ge.clientY,st=ge.target.getBoundingClientRect(),ct=st.top,Pt=st.height,$e=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ve),nt=($e-12)/Be,yt=We.filter(function(Me){var Ze;return(Ze=Re[Me])===null||Ze===void 0||(Ze=Ze.children)===null||Ze===void 0?void 0:Ze.length}),xt=(0,fe.Z)(Re,je.eventKey);if(ot<ct+Pt/2){var wt=Ae.findIndex(function(Me){return Me.key===xt.key}),dt=wt<=0?0:wt-1,ft=Ae[dt].key;xt=(0,fe.Z)(Re,ft)}var ut=xt.key,Et=xt,mt=xt.key,vt=0,kt=0;if(!yt.includes(ut))for(var pt=0;pt<nt&&we(xt);pt+=1)xt=xt.parent,kt+=1;var Qe=Pe.data,Ke=xt.node,xe=!0;return de(xt)&&xt.level===0&&ot<ct+Pt/2&&Ne({dragNode:Qe,dropNode:Ke,dropPosition:-1})&&xt.key===je.eventKey?vt=-1:(Et.children||[]).length&&yt.includes(mt)?Ne({dragNode:Qe,dropNode:Ke,dropPosition:0})?vt=0:xe=!1:kt===0?nt>-1.5?Ne({dragNode:Qe,dropNode:Ke,dropPosition:1})?vt=1:xe=!1:Ne({dragNode:Qe,dropNode:Ke,dropPosition:0})?vt=0:Ne({dragNode:Qe,dropNode:Ke,dropPosition:1})?vt=1:xe=!1:Ne({dragNode:Qe,dropNode:Ke,dropPosition:1})?vt=1:xe=!1,{dropPosition:vt,dropLevelOffset:kt,dropTargetKey:xt.key,dropTargetPos:xt.pos,dragOverNodeKey:mt,dropContainerKey:vt===0?null:((Ue=xt.parent)===null||Ue===void 0?void 0:Ue.key)||null,dropAllowed:xe}}function ee(ge,Pe){if(ge){var je=Pe.multiple;return je?ge.slice():ge.length?[ge[0]]:ge}}var ae=function(Pe){return Pe};function ie(ge,Pe){if(!ge)return[];var je=Pe||{},Be=je.processProps,Fe=Be===void 0?ae:Be,Ne=Array.isArray(ge)?ge:[ge];return Ne.map(function(Ae){var Re=Ae.children,We=_objectWithoutProperties(Ae,ke),Ye=ie(Re,Pe);return React.createElement(TreeNode,_extends({key:We.key},Fe(We)),Ye)})}function le(ge){if(!ge)return null;var Pe;if(Array.isArray(ge))Pe={checkedKeys:ge,halfCheckedKeys:void 0};else if((0,Dt.Z)(ge)==="object")Pe={checkedKeys:ge.checked||void 0,halfCheckedKeys:ge.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Pe}function ue(ge,Pe){var je=new Set;function Be(Fe){if(!je.has(Fe)){var Ne=(0,fe.Z)(Pe,Fe);if(Ne){je.add(Fe);var Ae=Ne.parent,Re=Ne.node;Re.disabled||Ae&&Be(Ae.key)}}}return(ge||[]).forEach(function(Fe){Be(Fe)}),(0,ht.Z)(je)}},34643:function(gn,cn,at){"use strict";at.d(cn,{S:function(){return me}});var ht=at(48736),Dt=at(65065);function oe(ke,Ce){var Se=new Set;return ke.forEach(function(Le){Ce.has(Le)||Se.add(Le)}),Se}function ze(ke){var Ce=ke||{},Se=Ce.disabled,Le=Ce.disableCheckbox,ve=Ce.checkable;return!!(Se||Le)||ve===!1}function De(ke,Ce,Se,Le){for(var ve=new Set(ke),we=new Set,de=0;de<=Se;de+=1){var z=Ce.get(de)||new Set;z.forEach(function(le){var ue=le.key,ge=le.node,Pe=le.children,je=Pe===void 0?[]:Pe;ve.has(ue)&&!Le(ge)&&je.filter(function(Be){return!Le(Be.node)}).forEach(function(Be){ve.add(Be.key)})})}for(var ee=new Set,ae=Se;ae>=0;ae-=1){var ie=Ce.get(ae)||new Set;ie.forEach(function(le){var ue=le.parent,ge=le.node;if(!(Le(ge)||!le.parent||ee.has(le.parent.key))){if(Le(le.parent.node)){ee.add(ue.key);return}var Pe=!0,je=!1;(ue.children||[]).filter(function(Be){return!Le(Be.node)}).forEach(function(Be){var Fe=Be.key,Ne=ve.has(Fe);Pe&&!Ne&&(Pe=!1),!je&&(Ne||we.has(Fe))&&(je=!0)}),Pe&&ve.add(ue.key),je&&we.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(oe(we,ve))}}function fe(ke,Ce,Se,Le,ve){for(var we=new Set(ke),de=new Set(Ce),z=0;z<=Le;z+=1){var ee=Se.get(z)||new Set;ee.forEach(function(ue){var ge=ue.key,Pe=ue.node,je=ue.children,Be=je===void 0?[]:je;!we.has(ge)&&!de.has(ge)&&!ve(Pe)&&Be.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){we.delete(Fe.key)})})}de=new Set;for(var ae=new Set,ie=Le;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(ue){var ge=ue.parent,Pe=ue.node;if(!(ve(Pe)||!ue.parent||ae.has(ue.parent.key))){if(ve(ue.parent.node)){ae.add(ge.key);return}var je=!0,Be=!1;(ge.children||[]).filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){var Ne=Fe.key,Ae=we.has(Ne);je&&!Ae&&(je=!1),!Be&&(Ae||de.has(Ne))&&(Be=!0)}),je||we.delete(ge.key),Be&&de.add(ge.key),ae.add(ge.key)}})}return{checkedKeys:Array.from(we),halfCheckedKeys:Array.from(oe(de,we))}}function me(ke,Ce,Se,Le){var ve=[],we;Le?we=Le:we=ze;var de=new Set(ke.filter(function(ie){var le=!!(0,Dt.Z)(Se,ie);return le||ve.push(ie),le})),z=new Map,ee=0;Object.keys(Se).forEach(function(ie){var le=Se[ie],ue=le.level,ge=z.get(ue);ge||(ge=new Set,z.set(ue,ge)),ge.add(le),ee=Math.max(ee,ue)}),(0,ht.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var ae;return Ce===!0?ae=De(de,z,ee,we):ae=fe(de,Ce.halfCheckedKeys,z,ee,we),ae}},65065:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ht}});function ht(Dt,oe){return Dt[oe]}},34061:function(gn,cn,at){"use strict";at.d(cn,{F:function(){return ue},H8:function(){return le},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return we},zn:function(){return z}});var ht=at(26420),Dt=at(15142),oe=at(98506),ze=at(33346),De=at(11592),fe=at(2738),me=at(48736),ke=at(65065),Ce=["children"];function Se(ge,Pe){return"".concat(ge,"-").concat(Pe)}function Le(ge){return ge&&ge.type&&ge.type.isTreeNode}function ve(ge,Pe){return ge!=null?ge:Pe}function we(ge){var Pe=ge||{},je=Pe.title,Be=Pe._title,Fe=Pe.key,Ne=Pe.children,Ae=je||"title";return{title:Ae,_title:Be||[Ae],key:Fe||"key",children:Ne||"children"}}function de(ge,Pe){var je=new Map;function Be(Fe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Ae){var Re=Ae[Pe.key],We=Ae[Pe.children];warning(Re!=null,"Tree node must have a certain key: [".concat(Ne).concat(Re,"]"));var Ye=String(Re);warning(!je.has(Ye)||Re===null||Re===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),Be(We,"".concat(Ne).concat(Ye," > "))})}Be(ge)}function z(ge){function Pe(je){var Be=(0,De.Z)(je);return Be.map(function(Fe){if(!Le(Fe))return(0,me.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Ne=Fe.key,Ae=Fe.props,Re=Ae.children,We=(0,ze.Z)(Ae,Ce),Ye=(0,oe.Z)({key:Ne},We),Ue=Pe(Re);return Ue.length&&(Ye.children=Ue),Ye}).filter(function(Fe){return Fe})}return Pe(ge)}function ee(ge,Pe,je){var Be=we(je),Fe=Be._title,Ne=Be.key,Ae=Be.children,Re=new Set(Pe===!0?[]:Pe),We=[];function Ye(Ue){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ue.map(function(ot,st){for(var ct=Se(Ve?Ve.pos:"0",st),Pt=ve(ot[Ne],ct),$e,nt=0;nt<Fe.length;nt+=1){var yt=Fe[nt];if(ot[yt]!==void 0){$e=ot[yt];break}}var xt=Object.assign((0,fe.Z)(ot,[].concat((0,Dt.Z)(Fe),[Ne,Ae])),{title:$e,key:Pt,parent:Ve,pos:ct,children:null,data:ot,isStart:[].concat((0,Dt.Z)(Ve?Ve.isStart:[]),[st===0]),isEnd:[].concat((0,Dt.Z)(Ve?Ve.isEnd:[]),[st===Ue.length-1])});return We.push(xt),Pe===!0||Re.has(Pt)?xt.children=Ye(ot[Ae]||[],xt):xt.children=[],xt})}return Ye(ge),We}function ae(ge,Pe,je){var Be={};(0,ht.Z)(je)==="object"?Be=je:Be={externalGetKey:je},Be=Be||{};var Fe=Be,Ne=Fe.childrenPropName,Ae=Fe.externalGetKey,Re=Fe.fieldNames,We=we(Re),Ye=We.key,Ue=We.children,Ve=Ne||Ue,ot;Ae?typeof Ae=="string"?ot=function(Pt){return Pt[Ae]}:typeof Ae=="function"&&(ot=function(Pt){return Ae(Pt)}):ot=function(Pt,$e){return ve(Pt[Ye],$e)};function st(ct,Pt,$e,nt){var yt=ct?ct[Ve]:ge,xt=ct?Se($e.pos,Pt):"0",wt=ct?[].concat((0,Dt.Z)(nt),[ct]):[];if(ct){var dt=ot(ct,xt),ft={node:ct,index:Pt,pos:xt,key:dt,parentPos:$e.node?$e.pos:null,level:$e.level+1,nodes:wt};Pe(ft)}yt&&yt.forEach(function(ut,Et){st(ut,Et,{node:ct,pos:xt,level:$e?$e.level+1:-1},wt)})}st(null)}function ie(ge){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=Pe.initWrapper,Be=Pe.processEntity,Fe=Pe.onProcessFinished,Ne=Pe.externalGetKey,Ae=Pe.childrenPropName,Re=Pe.fieldNames,We=arguments.length>2?arguments[2]:void 0,Ye=Ne||We,Ue={},Ve={},ot={posEntities:Ue,keyEntities:Ve};return je&&(ot=je(ot)||ot),ae(ge,function(st){var ct=st.node,Pt=st.index,$e=st.pos,nt=st.key,yt=st.parentPos,xt=st.level,wt=st.nodes,dt={node:ct,nodes:wt,index:Pt,key:nt,pos:$e,level:xt},ft=ve(nt,$e);Ue[$e]=dt,Ve[ft]=dt,dt.parent=Ue[yt],dt.parent&&(dt.parent.children=dt.parent.children||[],dt.parent.children.push(dt)),Be&&Be(dt,ot)},{externalGetKey:Ye,childrenPropName:Ae,fieldNames:Re}),Fe&&Fe(ot),ot}function le(ge,Pe){var je=Pe.expandedKeys,Be=Pe.selectedKeys,Fe=Pe.loadedKeys,Ne=Pe.loadingKeys,Ae=Pe.checkedKeys,Re=Pe.halfCheckedKeys,We=Pe.dragOverNodeKey,Ye=Pe.dropPosition,Ue=Pe.keyEntities,Ve=(0,ke.Z)(Ue,ge),ot={eventKey:ge,expanded:je.indexOf(ge)!==-1,selected:Be.indexOf(ge)!==-1,loaded:Fe.indexOf(ge)!==-1,loading:Ne.indexOf(ge)!==-1,checked:Ae.indexOf(ge)!==-1,halfChecked:Re.indexOf(ge)!==-1,pos:String(Ve?Ve.pos:""),dragOver:We===ge&&Ye===0,dragOverGapTop:We===ge&&Ye===-1,dragOverGapBottom:We===ge&&Ye===1};return ot}function ue(ge){var Pe=ge.data,je=ge.expanded,Be=ge.selected,Fe=ge.checked,Ne=ge.loaded,Ae=ge.loading,Re=ge.halfChecked,We=ge.dragOver,Ye=ge.dragOverGapTop,Ue=ge.dragOverGapBottom,Ve=ge.pos,ot=ge.active,st=ge.eventKey,ct=(0,oe.Z)((0,oe.Z)({},Pe),{},{expanded:je,selected:Be,checked:Fe,loaded:Ne,loading:Ae,halfChecked:Re,dragOver:We,dragOverGapTop:Ye,dragOverGapBottom:Ue,pos:Ve,active:ot,key:st});return"props"in ct||Object.defineProperty(ct,"props",{get:function(){return(0,me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),ge}}),ct}},90472:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return st}});var ht=at(67711),Dt=at(42573),oe=at(58698),ze=at(62437),De=at(74700),fe=at(45080),me=at(52873),ke=at(59301),Ce=at(98506),Se=at(33346),Le=at(26420),ve=at(77910),we=at(51343),de=at(15142),z=at(92310),ee=at.n(z),ae=at(26112),ie=at(48736),le=function(ct,Pt){if(ct&&Pt){var $e=Array.isArray(Pt)?Pt:Pt.split(","),nt=ct.name||"",yt=ct.type||"",xt=yt.replace(/\/.*$/,"");return $e.some(function(wt){var dt=wt.trim();if(/^\*(\/\*)?$/.test(wt))return!0;if(dt.charAt(0)==="."){var ft=nt.toLowerCase(),ut=dt.toLowerCase(),Et=[ut];return(ut===".jpg"||ut===".jpeg")&&(Et=[".jpg",".jpeg"]),Et.some(function(mt){return ft.endsWith(mt)})}return/\/\*$/.test(dt)?xt===dt.replace(/\/.*$/,""):yt===dt?!0:/^\w+$/.test(dt)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(dt,"'.Skip for check.")),!0):!1})}return!0};function ue(ct,Pt){var $e="cannot ".concat(ct.method," ").concat(ct.action," ").concat(Pt.status,"'"),nt=new Error($e);return nt.status=Pt.status,nt.method=ct.method,nt.url=ct.action,nt}function ge(ct){var Pt=ct.responseText||ct.response;if(!Pt)return Pt;try{return JSON.parse(Pt)}catch($e){return Pt}}function Pe(ct){var Pt=new XMLHttpRequest;ct.onProgress&&Pt.upload&&(Pt.upload.onprogress=function(xt){xt.total>0&&(xt.percent=xt.loaded/xt.total*100),ct.onProgress(xt)});var $e=new FormData;ct.data&&Object.keys(ct.data).forEach(function(yt){var xt=ct.data[yt];if(Array.isArray(xt)){xt.forEach(function(wt){$e.append("".concat(yt,"[]"),wt)});return}$e.append(yt,xt)}),ct.file instanceof Blob?$e.append(ct.filename,ct.file,ct.file.name):$e.append(ct.filename,ct.file),Pt.onerror=function(xt){ct.onError(xt)},Pt.onload=function(){return Pt.status<200||Pt.status>=300?ct.onError(ue(ct,Pt),ge(Pt)):ct.onSuccess(ge(Pt),Pt)},Pt.open(ct.method,ct.action,!0),ct.withCredentials&&"withCredentials"in Pt&&(Pt.withCredentials=!0);var nt=ct.headers||{};return nt["X-Requested-With"]!==null&&Pt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(nt).forEach(function(yt){nt[yt]!==null&&Pt.setRequestHeader(yt,nt[yt])}),Pt.send($e),{abort:function(){Pt.abort()}}}var je=function(){var ct=(0,we.Z)((0,ve.Z)().mark(function Pt($e,nt){var yt,xt,wt,dt,ft,ut,Et,mt;return(0,ve.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:ut=function(){return ut=(0,we.Z)((0,ve.Z)().mark(function Qe(Ke){return(0,ve.Z)().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.abrupt("return",new Promise(function(Ze){Ke.file(function(tt){nt(tt)?(Ke.fullPath&&!tt.webkitRelativePath&&(Object.defineProperties(tt,{webkitRelativePath:{writable:!0}}),tt.webkitRelativePath=Ke.fullPath.replace(/^\//,""),Object.defineProperties(tt,{webkitRelativePath:{writable:!1}})),Ze(tt)):Ze(null)})}));case 1:case"end":return Me.stop()}},Qe)})),ut.apply(this,arguments)},ft=function(Qe){return ut.apply(this,arguments)},dt=function(){return dt=(0,we.Z)((0,ve.Z)().mark(function Qe(Ke){var xe,Me,Ze,tt,Ie;return(0,ve.Z)().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:xe=Ke.createReader(),Me=[];case 2:return He.next=5,new Promise(function(rt){xe.readEntries(rt,function(){return rt([])})});case 5:if(Ze=He.sent,tt=Ze.length,tt){He.next=9;break}return He.abrupt("break",12);case 9:for(Ie=0;Ie<tt;Ie++)Me.push(Ze[Ie]);He.next=2;break;case 12:return He.abrupt("return",Me);case 13:case"end":return He.stop()}},Qe)})),dt.apply(this,arguments)},wt=function(Qe){return dt.apply(this,arguments)},yt=[],xt=[],$e.forEach(function(pt){return xt.push(pt.webkitGetAsEntry())}),Et=function(){var pt=(0,we.Z)((0,ve.Z)().mark(function Qe(Ke,xe){var Me,Ze;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ke){Ie.next=2;break}return Ie.abrupt("return");case 2:if(Ke.path=xe||"",!Ke.isFile){Ie.next=10;break}return Ie.next=6,ft(Ke);case 6:Me=Ie.sent,Me&&yt.push(Me),Ie.next=15;break;case 10:if(!Ke.isDirectory){Ie.next=15;break}return Ie.next=13,wt(Ke);case 13:Ze=Ie.sent,xt.push.apply(xt,(0,de.Z)(Ze));case 15:case"end":return Ie.stop()}},Qe)}));return function(Ke,xe){return pt.apply(this,arguments)}}(),mt=0;case 9:if(!(mt<xt.length)){kt.next=15;break}return kt.next=12,Et(xt[mt]);case 12:mt++,kt.next=9;break;case 15:return kt.abrupt("return",yt);case 16:case"end":return kt.stop()}},Pt)}));return function($e,nt){return ct.apply(this,arguments)}}(),Be=je,Fe=+new Date,Ne=0;function Ae(){return"rc-upload-".concat(Fe,"-").concat(++Ne)}var Re=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],We=function(ct){(0,De.Z)($e,ct);var Pt=(0,fe.Z)($e);function $e(){var nt;(0,Dt.Z)(this,$e);for(var yt=arguments.length,xt=new Array(yt),wt=0;wt<yt;wt++)xt[wt]=arguments[wt];return nt=Pt.call.apply(Pt,[this].concat(xt)),(0,me.Z)((0,ze.Z)(nt),"state",{uid:Ae()}),(0,me.Z)((0,ze.Z)(nt),"reqs",{}),(0,me.Z)((0,ze.Z)(nt),"fileInput",void 0),(0,me.Z)((0,ze.Z)(nt),"_isMounted",void 0),(0,me.Z)((0,ze.Z)(nt),"onChange",function(dt){var ft=nt.props,ut=ft.accept,Et=ft.directory,mt=dt.target.files,vt=(0,de.Z)(mt).filter(function(kt){return!Et||le(kt,ut)});nt.uploadFiles(vt),nt.reset()}),(0,me.Z)((0,ze.Z)(nt),"onClick",function(dt){var ft=nt.fileInput;if(ft){var ut=dt.target,Et=nt.props.onClick;if(ut&&ut.tagName==="BUTTON"){var mt=ft.parentNode;mt.focus(),ut.blur()}ft.click(),Et&&Et(dt)}}),(0,me.Z)((0,ze.Z)(nt),"onKeyDown",function(dt){dt.key==="Enter"&&nt.onClick(dt)}),(0,me.Z)((0,ze.Z)(nt),"onFileDrop",function(){var dt=(0,we.Z)((0,ve.Z)().mark(function ft(ut){var Et,mt,vt;return(0,ve.Z)().wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(Et=nt.props.multiple,ut.preventDefault(),ut.type!=="dragover"){pt.next=4;break}return pt.abrupt("return");case 4:if(!nt.props.directory){pt.next=11;break}return pt.next=7,Be(Array.prototype.slice.call(ut.dataTransfer.items),function(Qe){return le(Qe,nt.props.accept)});case 7:mt=pt.sent,nt.uploadFiles(mt),pt.next=14;break;case 11:vt=(0,de.Z)(ut.dataTransfer.files).filter(function(Qe){return le(Qe,nt.props.accept)}),Et===!1&&(vt=vt.slice(0,1)),nt.uploadFiles(vt);case 14:case"end":return pt.stop()}},ft)}));return function(ft){return dt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(nt),"uploadFiles",function(dt){var ft=(0,de.Z)(dt),ut=ft.map(function(Et){return Et.uid=Ae(),nt.processFile(Et,ft)});Promise.all(ut).then(function(Et){var mt=nt.props.onBatchStart;mt==null||mt(Et.map(function(vt){var kt=vt.origin,pt=vt.parsedFile;return{file:kt,parsedFile:pt}})),Et.filter(function(vt){return vt.parsedFile!==null}).forEach(function(vt){nt.post(vt)})})}),(0,me.Z)((0,ze.Z)(nt),"processFile",function(){var dt=(0,we.Z)((0,ve.Z)().mark(function ft(ut,Et){var mt,vt,kt,pt,Qe,Ke,xe,Me,Ze;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(mt=nt.props.beforeUpload,vt=ut,!mt){Ie.next=14;break}return Ie.prev=3,Ie.next=6,mt(ut,Et);case 6:vt=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),vt=!1;case 12:if(vt!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:ut,parsedFile:null,action:null,data:null});case 14:if(kt=nt.props.action,typeof kt!="function"){Ie.next=21;break}return Ie.next=18,kt(ut);case 18:pt=Ie.sent,Ie.next=22;break;case 21:pt=kt;case 22:if(Qe=nt.props.data,typeof Qe!="function"){Ie.next=29;break}return Ie.next=26,Qe(ut);case 26:Ke=Ie.sent,Ie.next=30;break;case 29:Ke=Qe;case 30:return xe=((0,Le.Z)(vt)==="object"||typeof vt=="string")&&vt?vt:ut,xe instanceof File?Me=xe:Me=new File([xe],ut.name,{type:ut.type}),Ze=Me,Ze.uid=ut.uid,Ie.abrupt("return",{origin:ut,data:Ke,parsedFile:Ze,action:pt});case 35:case"end":return Ie.stop()}},ft,null,[[3,9]])}));return function(ft,ut){return dt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(nt),"saveFileInput",function(dt){nt.fileInput=dt}),nt}return(0,oe.Z)($e,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(yt){var xt=this,wt=yt.data,dt=yt.origin,ft=yt.action,ut=yt.parsedFile;if(this._isMounted){var Et=this.props,mt=Et.onStart,vt=Et.customRequest,kt=Et.name,pt=Et.headers,Qe=Et.withCredentials,Ke=Et.method,xe=dt.uid,Me=vt||Pe,Ze={action:ft,filename:kt,data:wt,file:ut,headers:pt,withCredentials:Qe,method:Ke||"post",onProgress:function(Ie){var _e=xt.props.onProgress;_e==null||_e(Ie,ut)},onSuccess:function(Ie,_e){var He=xt.props.onSuccess;He==null||He(Ie,ut,_e),delete xt.reqs[xe]},onError:function(Ie,_e){var He=xt.props.onError;He==null||He(Ie,_e,ut),delete xt.reqs[xe]}};mt(dt),this.reqs[xe]=Me(Ze)}}},{key:"reset",value:function(){this.setState({uid:Ae()})}},{key:"abort",value:function(yt){var xt=this.reqs;if(yt){var wt=yt.uid?yt.uid:yt;xt[wt]&&xt[wt].abort&&xt[wt].abort(),delete xt[wt]}else Object.keys(xt).forEach(function(dt){xt[dt]&&xt[dt].abort&&xt[dt].abort(),delete xt[dt]})}},{key:"render",value:function(){var yt=this.props,xt=yt.component,wt=yt.prefixCls,dt=yt.className,ft=yt.classNames,ut=ft===void 0?{}:ft,Et=yt.disabled,mt=yt.id,vt=yt.name,kt=yt.style,pt=yt.styles,Qe=pt===void 0?{}:pt,Ke=yt.multiple,xe=yt.accept,Me=yt.capture,Ze=yt.children,tt=yt.directory,Ie=yt.openFileDialogOnClick,_e=yt.onMouseEnter,He=yt.onMouseLeave,rt=yt.hasControlInside,St=(0,Se.Z)(yt,Re),Ct=ee()((0,me.Z)((0,me.Z)((0,me.Z)({},wt,!0),"".concat(wt,"-disabled"),Et),dt,dt)),Nt=tt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Ot=Et?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:He,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:rt?void 0:"0"};return ke.createElement(xt,(0,ht.Z)({},Ot,{className:Ct,role:rt?void 0:"button",style:kt}),ke.createElement("input",(0,ht.Z)({},(0,ae.Z)(St,{aria:!0,data:!0}),{id:mt,name:vt,disabled:Et,type:"file",ref:this.saveFileInput,onClick:function($t){return $t.stopPropagation()},key:this.state.uid,style:(0,Ce.Z)({display:"none"},Qe.input),className:ut.input,accept:xe},Nt,{multiple:Ke,onChange:this.onChange},Me!=null?{capture:Me}:{})),Ze)}}]),$e}(ke.Component),Ye=We;function Ue(){}var Ve=function(ct){(0,De.Z)($e,ct);var Pt=(0,fe.Z)($e);function $e(){var nt;(0,Dt.Z)(this,$e);for(var yt=arguments.length,xt=new Array(yt),wt=0;wt<yt;wt++)xt[wt]=arguments[wt];return nt=Pt.call.apply(Pt,[this].concat(xt)),(0,me.Z)((0,ze.Z)(nt),"uploader",void 0),(0,me.Z)((0,ze.Z)(nt),"saveUploader",function(dt){nt.uploader=dt}),nt}return(0,oe.Z)($e,[{key:"abort",value:function(yt){this.uploader.abort(yt)}},{key:"render",value:function(){return ke.createElement(Ye,(0,ht.Z)({},this.props,{ref:this.saveUploader}))}}]),$e}(ke.Component);(0,me.Z)(Ve,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ue,onError:Ue,onSuccess:Ue,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Ve,st=ot},8224:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Dt}});var ht=at(4676);function Dt(oe,ze,De,fe){var me=ht.unstable_batchedUpdates?function(Ce){ht.unstable_batchedUpdates(De,Ce)}:De;return oe!=null&&oe.addEventListener&&oe.addEventListener(ze,me,fe),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(ze,me,fe)}}}},24514:function(gn,cn,at){"use strict";at.d(cn,{G:function(){return ze}});var ht=at(47273),Dt=function(fe){if((0,ht.Z)()&&window.document.documentElement){var me=Array.isArray(fe)?fe:[fe],ke=window.document.documentElement;return me.some(function(Ce){return Ce in ke.style})}return!1},oe=function(fe,me){if(!Dt(fe))return!1;var ke=document.createElement("div"),Ce=ke.style[fe];return ke.style[fe]=me,ke.style[fe]!==Ce};function ze(De,fe){return!Array.isArray(De)&&fe!==void 0?oe(De,fe):Dt(De)}},6790:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Qe}});var ht=at(67711),Dt=at(26420),oe=at(98506),ze=at(52873),De=at(16886),fe=at(33346),me=at(92310),ke=at.n(me),Ce=at(29301),Se=at(70425),Le=at(34280),ve=at(59301),we=at(4676),de=ve.forwardRef(function(Ke,xe){var Me=Ke.height,Ze=Ke.offsetY,tt=Ke.offsetX,Ie=Ke.children,_e=Ke.prefixCls,He=Ke.onInnerResize,rt=Ke.innerProps,St=Ke.rtl,Ct=Ke.extra,Nt={},Ot={display:"flex",flexDirection:"column"};return Ze!==void 0&&(Nt={height:Me,position:"relative",overflow:"hidden"},Ot=(0,oe.Z)((0,oe.Z)({},Ot),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(Ze,"px)")},St?"marginRight":"marginLeft",-tt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Nt},ve.createElement(Ce.Z,{onResize:function($t){var qt=$t.offsetHeight;qt&&He&&He()}},ve.createElement("div",(0,ht.Z)({style:Ot,className:ke()((0,ze.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:xe},rt),Ie,Ct)))});de.displayName="Filler";var z=de;function ee(Ke){var xe=Ke.children,Me=Ke.setRef,Ze=ve.useCallback(function(tt){Me(tt)},[]);return ve.cloneElement(xe,{ref:Ze})}function ae(Ke,xe,Me,Ze,tt,Ie,_e,He){var rt=He.getKey;return Ke.slice(xe,Me+1).map(function(St,Ct){var Nt=xe+Ct,Ot=_e(St,Nt,{style:{width:Ze},offsetX:tt}),Rt=rt(St);return ve.createElement(ee,{key:Rt,setRef:function(qt){return Ie(St,qt)}},Ot)})}function ie(Ke,xe,Me,Ze){var tt=Me-Ke,Ie=xe-Me,_e=Math.min(tt,Ie)*2;if(Ze<=_e){var He=Math.floor(Ze/2);return Ze%2?Me+He+1:Me-He}return tt>Ie?Me-(Ze-Ie):Me+(Ze-tt)}function le(Ke,xe,Me){var Ze=Ke.length,tt=xe.length,Ie,_e;if(Ze===0&&tt===0)return null;Ze<tt?(Ie=Ke,_e=xe):(Ie=xe,_e=Ke);var He={__EMPTY_ITEM__:!0};function rt($t){return $t!==void 0?Me($t):He}for(var St=null,Ct=Math.abs(Ze-tt)!==1,Nt=0;Nt<_e.length;Nt+=1){var Ot=rt(Ie[Nt]),Rt=rt(_e[Nt]);if(Ot!==Rt){St=Nt,Ct=Ct||Ot!==rt(_e[Nt+1]);break}}return St===null?null:{index:St,multiple:Ct}}function ue(Ke,xe,Me){var Ze=ve.useState(Ke),tt=(0,De.Z)(Ze,2),Ie=tt[0],_e=tt[1],He=ve.useState(null),rt=(0,De.Z)(He,2),St=rt[0],Ct=rt[1];return ve.useEffect(function(){var Nt=le(Ie||[],Ke||[],xe);(Nt==null?void 0:Nt.index)!==void 0&&(Me==null||Me(Nt.index),Ct(Ke[Nt.index])),_e(Ke)},[Ke]),[St]}var ge=at(16089),Pe=(typeof navigator=="undefined"?"undefined":(0,Dt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=Pe,Be=function(Ke,xe,Me,Ze){var tt=(0,ve.useRef)(!1),Ie=(0,ve.useRef)(null);function _e(){clearTimeout(Ie.current),tt.current=!0,Ie.current=setTimeout(function(){tt.current=!1},50)}var He=(0,ve.useRef)({top:Ke,bottom:xe,left:Me,right:Ze});return He.current.top=Ke,He.current.bottom=xe,He.current.left=Me,He.current.right=Ze,function(rt,St){var Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Nt=rt?St<0&&He.current.left||St>0&&He.current.right:St<0&&He.current.top||St>0&&He.current.bottom;return Ct&&Nt?(clearTimeout(Ie.current),tt.current=!1):(!Nt||tt.current)&&_e(),!tt.current&&Nt}};function Fe(Ke,xe,Me,Ze,tt,Ie,_e){var He=(0,ve.useRef)(0),rt=(0,ve.useRef)(null),St=(0,ve.useRef)(null),Ct=(0,ve.useRef)(!1),Nt=Be(xe,Me,Ze,tt);function Ot(sn,tn){if(ge.Z.cancel(rt.current),!Nt(!1,tn)){var Ut=sn;if(!Ut._virtualHandled)Ut._virtualHandled=!0;else return;He.current+=tn,St.current=tn,je||Ut.preventDefault(),rt.current=(0,ge.Z)(function(){var En=Ct.current?10:1;_e(He.current*En,!1),He.current=0})}}function Rt(sn,tn){_e(tn,!0),je||sn.preventDefault()}var $t=(0,ve.useRef)(null),qt=(0,ve.useRef)(null);function rn(sn){if(Ke){ge.Z.cancel(qt.current),qt.current=(0,ge.Z)(function(){$t.current=null},2);var tn=sn.deltaX,Ut=sn.deltaY,En=sn.shiftKey,bn=tn,Dn=Ut;($t.current==="sx"||!$t.current&&En&&Ut&&!tn)&&(bn=Ut,Dn=0,$t.current="sx");var Qn=Math.abs(bn),Pr=Math.abs(Dn);$t.current===null&&($t.current=Ie&&Qn>Pr?"x":"y"),$t.current==="y"?Ot(sn,Dn):Rt(sn,bn)}}function Ht(sn){Ke&&(Ct.current=sn.detail===St.current)}return[rn,Ht]}function Ne(Ke,xe,Me,Ze){var tt=ve.useMemo(function(){return[new Map,[]]},[Ke,Me.id,Ze]),Ie=(0,De.Z)(tt,2),_e=Ie[0],He=Ie[1],rt=function(Ct){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct,Ot=_e.get(Ct),Rt=_e.get(Nt);if(Ot===void 0||Rt===void 0)for(var $t=Ke.length,qt=He.length;qt<$t;qt+=1){var rn,Ht=Ke[qt],sn=xe(Ht);_e.set(sn,qt);var tn=(rn=Me.get(sn))!==null&&rn!==void 0?rn:Ze;if(He[qt]=(He[qt-1]||0)+tn,sn===Ct&&(Ot=qt),sn===Nt&&(Rt=qt),Ot!==void 0&&Rt!==void 0)break}return{top:He[Ot-1]||0,bottom:He[Rt]}};return rt}var Ae=at(42573),Re=at(58698),We=function(){function Ke(){(0,Ae.Z)(this,Ke),(0,ze.Z)(this,"maps",void 0),(0,ze.Z)(this,"id",0),(0,ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Re.Z)(Ke,[{key:"set",value:function(Me,Ze){this.diffRecords.set(Me,this.maps[Me]),this.maps[Me]=Ze,this.id+=1}},{key:"get",value:function(Me){return this.maps[Me]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ke}(),Ye=We;function Ue(Ke){var xe=parseFloat(Ke);return isNaN(xe)?0:xe}function Ve(Ke,xe,Me){var Ze=ve.useState(0),tt=(0,De.Z)(Ze,2),Ie=tt[0],_e=tt[1],He=(0,ve.useRef)(new Map),rt=(0,ve.useRef)(new Ye),St=(0,ve.useRef)(0);function Ct(){St.current+=1}function Nt(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ct();var $t=function(){var Ht=!1;He.current.forEach(function(sn,tn){if(sn&&sn.offsetParent){var Ut=sn.offsetHeight,En=getComputedStyle(sn),bn=En.marginTop,Dn=En.marginBottom,Qn=Ue(bn),Pr=Ue(Dn),Yn=Ut+Qn+Pr;rt.current.get(tn)!==Yn&&(rt.current.set(tn,Yn),Ht=!0)}}),Ht&&_e(function(sn){return sn+1})};if(Rt)$t();else{St.current+=1;var qt=St.current;Promise.resolve().then(function(){qt===St.current&&$t()})}}function Ot(Rt,$t){var qt=Ke(Rt),rn=He.current.get(qt);$t?(He.current.set(qt,$t),Nt()):He.current.delete(qt),!rn!=!$t&&($t?xe==null||xe(Rt):Me==null||Me(Rt))}return(0,ve.useEffect)(function(){return Ct},[]),[Ot,Nt,rt.current,Ie]}var ot=14/15;function st(Ke,xe,Me){var Ze=(0,ve.useRef)(!1),tt=(0,ve.useRef)(0),Ie=(0,ve.useRef)(0),_e=(0,ve.useRef)(null),He=(0,ve.useRef)(null),rt,St=function(Rt){if(Ze.current){var $t=Math.ceil(Rt.touches[0].pageX),qt=Math.ceil(Rt.touches[0].pageY),rn=tt.current-$t,Ht=Ie.current-qt,sn=Math.abs(rn)>Math.abs(Ht);sn?tt.current=$t:Ie.current=qt;var tn=Me(sn,sn?rn:Ht,!1,Rt);tn&&Rt.preventDefault(),clearInterval(He.current),tn&&(He.current=setInterval(function(){sn?rn*=ot:Ht*=ot;var Ut=Math.floor(sn?rn:Ht);(!Me(sn,Ut,!0)||Math.abs(Ut)<=.1)&&clearInterval(He.current)},16))}},Ct=function(){Ze.current=!1,rt()},Nt=function(Rt){rt(),Rt.touches.length===1&&!Ze.current&&(Ze.current=!0,tt.current=Math.ceil(Rt.touches[0].pageX),Ie.current=Math.ceil(Rt.touches[0].pageY),_e.current=Rt.target,_e.current.addEventListener("touchmove",St,{passive:!1}),_e.current.addEventListener("touchend",Ct,{passive:!0}))};rt=function(){_e.current&&(_e.current.removeEventListener("touchmove",St),_e.current.removeEventListener("touchend",Ct))},(0,Le.Z)(function(){return Ke&&xe.current.addEventListener("touchstart",Nt,{passive:!0}),function(){var Ot;(Ot=xe.current)===null||Ot===void 0||Ot.removeEventListener("touchstart",Nt),rt(),clearInterval(He.current)}},[Ke])}function ct(Ke){return Math.floor(Math.pow(Ke,.5))}function Pt(Ke,xe){var Me="touches"in Ke?Ke.touches[0]:Ke;return Me[xe?"pageX":"pageY"]-window[xe?"scrollX":"scrollY"]}function $e(Ke,xe,Me){ve.useEffect(function(){var Ze=xe.current;if(Ke&&Ze){var tt=!1,Ie,_e,He=function(){ge.Z.cancel(Ie)},rt=function Ot(){He(),Ie=(0,ge.Z)(function(){Me(_e),Ot()})},St=function(Rt){if(!(Rt.target.draggable||Rt.button!==0)){var $t=Rt;$t._virtualHandled||($t._virtualHandled=!0,tt=!0)}},Ct=function(){tt=!1,He()},Nt=function(Rt){if(tt){var $t=Pt(Rt,!1),qt=Ze.getBoundingClientRect(),rn=qt.top,Ht=qt.bottom;if($t<=rn){var sn=rn-$t;_e=-ct(sn),rt()}else if($t>=Ht){var tn=$t-Ht;_e=ct(tn),rt()}else He()}};return Ze.addEventListener("mousedown",St),Ze.ownerDocument.addEventListener("mouseup",Ct),Ze.ownerDocument.addEventListener("mousemove",Nt),function(){Ze.removeEventListener("mousedown",St),Ze.ownerDocument.removeEventListener("mouseup",Ct),Ze.ownerDocument.removeEventListener("mousemove",Nt),He()}}},[Ke])}var nt=10;function yt(Ke,xe,Me,Ze,tt,Ie,_e,He){var rt=ve.useRef(),St=ve.useState(null),Ct=(0,De.Z)(St,2),Nt=Ct[0],Ot=Ct[1];return(0,Le.Z)(function(){if(Nt&&Nt.times<nt){if(!Ke.current){Ot(function(Wi){return(0,oe.Z)({},Wi)});return}Ie();var Rt=Nt.targetAlign,$t=Nt.originAlign,qt=Nt.index,rn=Nt.offset,Ht=Ke.current.clientHeight,sn=!1,tn=Rt,Ut=null;if(Ht){for(var En=Rt||$t,bn=0,Dn=0,Qn=0,Pr=Math.min(xe.length-1,qt),Yn=0;Yn<=Pr;Yn+=1){var Mr=tt(xe[Yn]);Dn=bn;var Ur=Me.get(Mr);Qn=Dn+(Ur===void 0?Ze:Ur),bn=Qn}for(var _r=En==="top"?rn:Ht-rn,ni=Pr;ni>=0;ni-=1){var Li=tt(xe[ni]),_i=Me.get(Li);if(_i===void 0){sn=!0;break}if(_r-=_i,_r<=0)break}switch(En){case"top":Ut=Dn-rn;break;case"bottom":Ut=Qn-Ht+rn;break;default:{var Di=Ke.current.scrollTop,ui=Di+Ht;Dn<Di?tn="top":Qn>ui&&(tn="bottom")}}Ut!==null&&_e(Ut),Ut!==Nt.lastTop&&(sn=!0)}sn&&Ot((0,oe.Z)((0,oe.Z)({},Nt),{},{times:Nt.times+1,targetAlign:tn,lastTop:Ut}))}},[Nt,Ke.current]),function(Rt){if(Rt==null){He();return}if(ge.Z.cancel(rt.current),typeof Rt=="number")_e(Rt);else if(Rt&&(0,Dt.Z)(Rt)==="object"){var $t,qt=Rt.align;"index"in Rt?$t=Rt.index:$t=xe.findIndex(function(sn){return tt(sn)===Rt.key});var rn=Rt.offset,Ht=rn===void 0?0:rn;Ot({times:0,index:$t,offset:Ht,originAlign:qt})}}}var xt=ve.forwardRef(function(Ke,xe){var Me=Ke.prefixCls,Ze=Ke.rtl,tt=Ke.scrollOffset,Ie=Ke.scrollRange,_e=Ke.onStartMove,He=Ke.onStopMove,rt=Ke.onScroll,St=Ke.horizontal,Ct=Ke.spinSize,Nt=Ke.containerSize,Ot=Ke.style,Rt=Ke.thumbStyle,$t=Ke.showScrollBar,qt=ve.useState(!1),rn=(0,De.Z)(qt,2),Ht=rn[0],sn=rn[1],tn=ve.useState(null),Ut=(0,De.Z)(tn,2),En=Ut[0],bn=Ut[1],Dn=ve.useState(null),Qn=(0,De.Z)(Dn,2),Pr=Qn[0],Yn=Qn[1],Mr=!Ze,Ur=ve.useRef(),_r=ve.useRef(),ni=ve.useState($t),Li=(0,De.Z)(ni,2),_i=Li[0],Di=Li[1],ui=ve.useRef(),Wi=function(){$t===!0||$t===!1||(clearTimeout(ui.current),Di(!0),ui.current=setTimeout(function(){Di(!1)},3e3))},et=Ie-Nt||0,jr=Nt-Ct||0,dr=ve.useMemo(function(){if(tt===0||et===0)return 0;var vn=tt/et;return vn*jr},[tt,et,jr]),Ai=function(fr){fr.stopPropagation(),fr.preventDefault()},lr=ve.useRef({top:dr,dragging:Ht,pageY:En,startTop:Pr});lr.current={top:dr,dragging:Ht,pageY:En,startTop:Pr};var yr=function(fr){sn(!0),bn(Pt(fr,St)),Yn(lr.current.top),_e(),fr.stopPropagation(),fr.preventDefault()};ve.useEffect(function(){var vn=function(an){an.preventDefault()},fr=Ur.current,cr=_r.current;return fr.addEventListener("touchstart",vn,{passive:!1}),cr.addEventListener("touchstart",yr,{passive:!1}),function(){fr.removeEventListener("touchstart",vn),cr.removeEventListener("touchstart",yr)}},[]);var Lr=ve.useRef();Lr.current=et;var uo=ve.useRef();uo.current=jr,ve.useEffect(function(){if(Ht){var vn,fr=function(an){var Nn=lr.current,gr=Nn.dragging,Zr=Nn.pageY,Xn=Nn.startTop;ge.Z.cancel(vn);var jt=Ur.current.getBoundingClientRect(),Wt=Nt/(St?jt.width:jt.height);if(gr){var jn=(Pt(an,St)-Zr)*Wt,Cn=Xn;!Mr&&St?Cn-=jn:Cn+=jn;var Jt=Lr.current,_n=uo.current,ur=_n?Cn/_n:0,ar=Math.ceil(ur*Jt);ar=Math.max(ar,0),ar=Math.min(ar,Jt),vn=(0,ge.Z)(function(){rt(ar,St)})}},cr=function(){sn(!1),He()};return window.addEventListener("mousemove",fr,{passive:!0}),window.addEventListener("touchmove",fr,{passive:!0}),window.addEventListener("mouseup",cr,{passive:!0}),window.addEventListener("touchend",cr,{passive:!0}),function(){window.removeEventListener("mousemove",fr),window.removeEventListener("touchmove",fr),window.removeEventListener("mouseup",cr),window.removeEventListener("touchend",cr),ge.Z.cancel(vn)}}},[Ht]),ve.useEffect(function(){return Wi(),function(){clearTimeout(ui.current)}},[tt]),ve.useImperativeHandle(xe,function(){return{delayHidden:Wi}});var on="".concat(Me,"-scrollbar"),dn={position:"absolute",visibility:_i?null:"hidden"},en={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return St?(Object.assign(dn,{height:8,left:0,right:0,bottom:0}),Object.assign(en,(0,ze.Z)({height:"100%",width:Ct},Mr?"left":"right",dr))):(Object.assign(dn,(0,ze.Z)({width:8,top:0,bottom:0},Mr?"right":"left",0)),Object.assign(en,{width:"100%",height:Ct,top:dr})),ve.createElement("div",{ref:Ur,className:ke()(on,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(on,"-horizontal"),St),"".concat(on,"-vertical"),!St),"".concat(on,"-visible"),_i)),style:(0,oe.Z)((0,oe.Z)({},dn),Ot),onMouseDown:Ai,onMouseMove:Wi},ve.createElement("div",{ref:_r,className:ke()("".concat(on,"-thumb"),(0,ze.Z)({},"".concat(on,"-thumb-moving"),Ht)),style:(0,oe.Z)((0,oe.Z)({},en),Rt),onMouseDown:yr}))}),wt=xt,dt=20;function ft(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Me=Ke/xe*Ke;return isNaN(Me)&&(Me=0),Me=Math.max(Me,dt),Math.floor(Me)}var ut=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Et=[],mt={overflowY:"auto",overflowAnchor:"none"};function vt(Ke,xe){var Me=Ke.prefixCls,Ze=Me===void 0?"rc-virtual-list":Me,tt=Ke.className,Ie=Ke.height,_e=Ke.itemHeight,He=Ke.fullHeight,rt=He===void 0?!0:He,St=Ke.style,Ct=Ke.data,Nt=Ke.children,Ot=Ke.itemKey,Rt=Ke.virtual,$t=Ke.direction,qt=Ke.scrollWidth,rn=Ke.component,Ht=rn===void 0?"div":rn,sn=Ke.onScroll,tn=Ke.onVirtualScroll,Ut=Ke.onVisibleChange,En=Ke.innerProps,bn=Ke.extraRender,Dn=Ke.styles,Qn=Ke.showScrollBar,Pr=Qn===void 0?"optional":Qn,Yn=(0,fe.Z)(Ke,ut),Mr=ve.useCallback(function(un){return typeof Ot=="function"?Ot(un):un==null?void 0:un[Ot]},[Ot]),Ur=Ve(Mr,null,null),_r=(0,De.Z)(Ur,4),ni=_r[0],Li=_r[1],_i=_r[2],Di=_r[3],ui=!!(Rt!==!1&&Ie&&_e),Wi=ve.useMemo(function(){return Object.values(_i.maps).reduce(function(un,Fn){return un+Fn},0)},[_i.id,_i.maps]),et=ui&&Ct&&(Math.max(_e*Ct.length,Wi)>Ie||!!qt),jr=$t==="rtl",dr=ke()(Ze,(0,ze.Z)({},"".concat(Ze,"-rtl"),jr),tt),Ai=Ct||Et,lr=(0,ve.useRef)(),yr=(0,ve.useRef)(),Lr=(0,ve.useRef)(),uo=(0,ve.useState)(0),on=(0,De.Z)(uo,2),dn=on[0],en=on[1],vn=(0,ve.useState)(0),fr=(0,De.Z)(vn,2),cr=fr[0],oi=fr[1],an=(0,ve.useState)(!1),Nn=(0,De.Z)(an,2),gr=Nn[0],Zr=Nn[1],Xn=function(){Zr(!0)},jt=function(){Zr(!1)},Wt={getKey:Mr};function jn(un){en(function(Fn){var zn;typeof un=="function"?zn=un(Fn):zn=un;var Ln=Qr(zn);return lr.current.scrollTop=Ln,Ln})}var Cn=(0,ve.useRef)({start:0,end:Ai.length}),Jt=(0,ve.useRef)(),_n=ue(Ai,Mr),ur=(0,De.Z)(_n,1),ar=ur[0];Jt.current=ar;var mr=ve.useMemo(function(){if(!ui)return{scrollHeight:void 0,start:0,end:Ai.length-1,offset:void 0};if(!et){var un;return{scrollHeight:((un=yr.current)===null||un===void 0?void 0:un.offsetHeight)||0,start:0,end:Ai.length-1,offset:void 0}}for(var Fn=0,zn,Ln,In,An=Ai.length,Vn=0;Vn<An;Vn+=1){var Wn=Ai[Vn],ln=Mr(Wn),br=_i.get(ln),Cr=Fn+(br===void 0?_e:br);Cr>=dn&&zn===void 0&&(zn=Vn,Ln=Fn),Cr>dn+Ie&&In===void 0&&(In=Vn),Fn=Cr}return zn===void 0&&(zn=0,Ln=0,In=Math.ceil(Ie/_e)),In===void 0&&(In=Ai.length-1),In=Math.min(In+1,Ai.length-1),{scrollHeight:Fn,start:zn,end:In,offset:Ln}},[et,ui,dn,Ai,Di,Ie]),Bn=mr.scrollHeight,Un=mr.start,er=mr.end,Ar=mr.offset;Cn.current.start=Un,Cn.current.end=er,ve.useLayoutEffect(function(){var un=_i.getRecord();if(un.size===1){var Fn=Array.from(un.keys())[0],zn=un.get(Fn),Ln=Ai[Un];if(Ln&&zn===void 0){var In=Mr(Ln);if(In===Fn){var An=_i.get(Fn),Vn=An-_e;jn(function(Wn){return Wn+Vn})}}}_i.resetRecord()},[Bn]);var sr=ve.useState({width:0,height:Ie}),mn=(0,De.Z)(sr,2),tr=mn[0],Vr=mn[1],pi=function(Fn){Vr({width:Fn.offsetWidth,height:Fn.offsetHeight})},zi=(0,ve.useRef)(),Yt=(0,ve.useRef)(),vr=ve.useMemo(function(){return ft(tr.width,qt)},[tr.width,qt]),zr=ve.useMemo(function(){return ft(tr.height,Bn)},[tr.height,Bn]),nr=Bn-Ie,vi=(0,ve.useRef)(nr);vi.current=nr;function Qr(un){var Fn=un;return Number.isNaN(vi.current)||(Fn=Math.min(Fn,vi.current)),Fn=Math.max(Fn,0),Fn}var hi=dn<=0,$r=dn>=nr,si=cr<=0,bi=cr>=qt,pn=Be(hi,$r,si,bi),Oi=function(){return{x:jr?-cr:cr,y:dn}},yn=(0,ve.useRef)(Oi()),Sr=(0,Se.zX)(function(un){if(tn){var Fn=(0,oe.Z)((0,oe.Z)({},Oi()),un);(yn.current.x!==Fn.x||yn.current.y!==Fn.y)&&(tn(Fn),yn.current=Fn)}});function li(un,Fn){var zn=un;Fn?((0,we.flushSync)(function(){oi(zn)}),Sr()):jn(zn)}function Jr(un){var Fn=un.currentTarget.scrollTop;Fn!==dn&&jn(Fn),sn==null||sn(un),Sr()}var Hi=function(Fn){var zn=Fn,Ln=qt?qt-tr.width:0;return zn=Math.max(zn,0),zn=Math.min(zn,Ln),zn},ci=(0,Se.zX)(function(un,Fn){Fn?((0,we.flushSync)(function(){oi(function(zn){var Ln=zn+(jr?-un:un);return Hi(Ln)})}),Sr()):jn(function(zn){var Ln=zn+un;return Ln})}),Hr=Fe(ui,hi,$r,si,bi,!!qt,ci),Ki=(0,De.Z)(Hr,2),Qt=Ki[0],wn=Ki[1];st(ui,lr,function(un,Fn,zn,Ln){var In=Ln;return pn(un,Fn,zn)?!1:!In||!In._virtualHandled?(In&&(In._virtualHandled=!0),Qt({preventDefault:function(){},deltaX:un?Fn:0,deltaY:un?0:Fn}),!0):!1}),$e(et,lr,function(un){jn(function(Fn){return Fn+un})}),(0,Le.Z)(function(){function un(zn){var Ln=hi&&zn.detail<0,In=$r&&zn.detail>0;ui&&!Ln&&!In&&zn.preventDefault()}var Fn=lr.current;return Fn.addEventListener("wheel",Qt,{passive:!1}),Fn.addEventListener("DOMMouseScroll",wn,{passive:!0}),Fn.addEventListener("MozMousePixelScroll",un,{passive:!1}),function(){Fn.removeEventListener("wheel",Qt),Fn.removeEventListener("DOMMouseScroll",wn),Fn.removeEventListener("MozMousePixelScroll",un)}},[ui,hi,$r]),(0,Le.Z)(function(){if(qt){var un=Hi(cr);oi(un),Sr({x:un})}},[tr.width,qt]);var Zt=function(){var Fn,zn;(Fn=zi.current)===null||Fn===void 0||Fn.delayHidden(),(zn=Yt.current)===null||zn===void 0||zn.delayHidden()},lt=yt(lr,Ai,_i,_e,Mr,function(){return Li(!0)},jn,Zt);ve.useImperativeHandle(xe,function(){return{nativeElement:Lr.current,getScrollInfo:Oi,scrollTo:function(Fn){function zn(Ln){return Ln&&(0,Dt.Z)(Ln)==="object"&&("left"in Ln||"top"in Ln)}zn(Fn)?(Fn.left!==void 0&&oi(Hi(Fn.left)),lt(Fn.top)):lt(Fn)}}}),(0,Le.Z)(function(){if(Ut){var un=Ai.slice(Un,er+1);Ut(un,Ai)}},[Un,er,Ai]);var On=Ne(Ai,Mr,_i,_e),Sn=bn==null?void 0:bn({start:Un,end:er,virtual:et,offsetX:cr,offsetY:Ar,rtl:jr,getSize:On}),Hn=ae(Ai,Un,er,qt,cr,ni,Nt,Wt),$n=null;Ie&&($n=(0,oe.Z)((0,ze.Z)({},rt?"height":"maxHeight",Ie),mt),ui&&($n.overflowY="hidden",qt&&($n.overflowX="hidden"),gr&&($n.pointerEvents="none")));var Kn={};return jr&&(Kn.dir="rtl"),ve.createElement("div",(0,ht.Z)({ref:Lr,style:(0,oe.Z)((0,oe.Z)({},St),{},{position:"relative"}),className:dr},Kn,Yn),ve.createElement(Ce.Z,{onResize:pi},ve.createElement(Ht,{className:"".concat(Ze,"-holder"),style:$n,ref:lr,onScroll:Jr,onMouseEnter:Zt},ve.createElement(z,{prefixCls:Ze,height:Bn,offsetX:cr,offsetY:Ar,scrollWidth:qt,onInnerResize:Li,ref:yr,innerProps:En,rtl:jr,extra:Sn},Hn))),et&&Bn>Ie&&ve.createElement(wt,{ref:zi,prefixCls:Ze,scrollOffset:dn,scrollRange:Bn,rtl:jr,onScroll:li,onStartMove:Xn,onStopMove:jt,spinSize:zr,containerSize:tr.height,style:Dn==null?void 0:Dn.verticalScrollBar,thumbStyle:Dn==null?void 0:Dn.verticalScrollBarThumb,showScrollBar:Pr}),et&&qt>tr.width&&ve.createElement(wt,{ref:Yt,prefixCls:Ze,scrollOffset:cr,scrollRange:qt,rtl:jr,onScroll:li,onStartMove:Xn,onStopMove:jt,spinSize:vr,containerSize:tr.width,horizontal:!0,style:Dn==null?void 0:Dn.horizontalScrollBar,thumbStyle:Dn==null?void 0:Dn.horizontalScrollBarThumb,showScrollBar:Pr}))}var kt=ve.forwardRef(vt);kt.displayName="List";var pt=kt,Qe=pt},7062:function(gn,cn,at){var ht=at(19637),Dt=at(97573),oe=[at(96627)];gn.exports=ht.createStore(Dt,oe)},96627:function(gn,cn,at){gn.exports=ht;function ht(){return at(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(gn){return gn<10?"0"+gn:gn}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(gn){return rx_escapable.lastIndex=0,rx_escapable.test(gn)?'"'+gn.replace(rx_escapable,function(cn){var at=meta[cn];return typeof at=="string"?at:"\\u"+("0000"+cn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+gn+'"'}function str(gn,cn){var at,ht,Dt,oe,ze=gap,De,fe=cn[gn];switch(fe&&typeof fe=="object"&&typeof fe.toJSON=="function"&&(fe=fe.toJSON(gn)),typeof rep=="function"&&(fe=rep.call(cn,gn,fe)),typeof fe){case"string":return quote(fe);case"number":return isFinite(fe)?String(fe):"null";case"boolean":case"null":return String(fe);case"object":if(!fe)return"null";if(gap+=indent,De=[],Object.prototype.toString.apply(fe)==="[object Array]"){for(oe=fe.length,at=0;at<oe;at+=1)De[at]=str(at,fe)||"null";return Dt=De.length===0?"[]":gap?`[
`+gap+De.join(`,
`+gap)+`
`+ze+"]":"["+De.join(",")+"]",gap=ze,Dt}if(rep&&typeof rep=="object")for(oe=rep.length,at=0;at<oe;at+=1)typeof rep[at]=="string"&&(ht=rep[at],Dt=str(ht,fe),Dt&&De.push(quote(ht)+(gap?": ":":")+Dt));else for(ht in fe)Object.prototype.hasOwnProperty.call(fe,ht)&&(Dt=str(ht,fe),Dt&&De.push(quote(ht)+(gap?": ":":")+Dt));return Dt=De.length===0?"{}":gap?`{
`+gap+De.join(`,
`+gap)+`
`+ze+"}":"{"+De.join(",")+"}",gap=ze,Dt}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(gn,cn,at){var ht;if(gap="",indent="",typeof at=="number")for(ht=0;ht<at;ht+=1)indent+=" ";else typeof at=="string"&&(indent=at);if(rep=cn,cn&&typeof cn!="function"&&(typeof cn!="object"||typeof cn.length!="number"))throw new Error("JSON.stringify");return str("",{"":gn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(gn,cn){var at,ht,Dt=gn[cn];if(Dt&&typeof Dt=="object")for(at in Dt)Object.prototype.hasOwnProperty.call(Dt,at)&&(ht=walk(Dt,at),ht!==void 0?Dt[at]=ht:delete Dt[at]);return reviver.call(gn,cn,Dt)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(gn){return"\\u"+("0000"+gn.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(gn,cn,at){var ht=at(67039),Dt=ht.slice,oe=ht.pluck,ze=ht.each,De=ht.bind,fe=ht.create,me=ht.isList,ke=ht.isFunction,Ce=ht.isObject;gn.exports={createStore:ve};var Se={version:"2.0.12",enabled:!1,get:function(we,de){var z=this.storage.read(this._namespacePrefix+we);return this._deserialize(z,de)},set:function(we,de){return de===void 0?this.remove(we):(this.storage.write(this._namespacePrefix+we,this._serialize(de)),de)},remove:function(we){this.storage.remove(this._namespacePrefix+we)},each:function(we){var de=this;this.storage.each(function(z,ee){we.call(de,de._deserialize(z),(ee||"").replace(de._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(we){return this._namespacePrefix=="__storejs_"+we+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(we){this._addPlugin(we)},namespace:function(we){return ve(this.storage,this.plugins,we)}};function Le(){var we=typeof console=="undefined"?null:console;if(we){var de=we.warn?we.warn:we.log;de.apply(we,arguments)}}function ve(we,de,z){z||(z=""),we&&!me(we)&&(we=[we]),de&&!me(de)&&(de=[de]);var ee=z?"__storejs_"+z+"_":"",ae=z?new RegExp("^"+ee):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var le={_namespacePrefix:ee,_namespaceRegexp:ae,_testStorage:function(ge){try{var Pe="__storejs__test__";ge.write(Pe,Pe);var je=ge.read(Pe)===Pe;return ge.remove(Pe),je}catch(Be){return!1}},_assignPluginFnProp:function(ge,Pe){var je=this[Pe];this[Pe]=function(){var Fe=Dt(arguments,0),Ne=this;function Ae(){if(je)return ze(arguments,function(We,Ye){Fe[Ye]=We}),je.apply(Ne,Fe)}var Re=[Ae].concat(Fe);return ge.apply(Ne,Re)}},_serialize:function(ge){return JSON.stringify(ge)},_deserialize:function(ge,Pe){if(!ge)return Pe;var je="";try{je=JSON.parse(ge)}catch(Be){je=ge}return je!==void 0?je:Pe},_addStorage:function(ge){this.enabled||this._testStorage(ge)&&(this.storage=ge,this.enabled=!0)},_addPlugin:function(ge){var Pe=this;if(me(ge)){ze(ge,function(Fe){Pe._addPlugin(Fe)});return}var je=oe(this.plugins,function(Fe){return ge===Fe});if(!je){if(this.plugins.push(ge),!ke(ge))throw new Error("Plugins must be function values that return objects");var Be=ge.call(this);if(!Ce(Be))throw new Error("Plugins must return an object of function properties");ze(Be,function(Fe,Ne){if(!ke(Fe))throw new Error("Bad plugin property: "+Ne+" from plugin "+ge.name+". Plugins should only return functions.");Pe._assignPluginFnProp(Fe,Ne)})}},addStorage:function(ge){Le("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ge)}},ue=fe(le,Se,{plugins:[]});return ue.raw={},ze(ue,function(ge,Pe){ke(ge)&&(ue.raw[Pe]=De(ue,ge))}),ze(we,function(ge){ue._addStorage(ge)}),ze(de,function(ge){ue._addPlugin(ge)}),ue}},67039:function(gn,cn,at){var ht=De(),Dt=fe(),oe=me(),ze=typeof window!="undefined"?window:at.g;gn.exports={assign:ht,create:Dt,trim:oe,bind:ke,slice:Ce,each:Se,map:Le,pluck:ve,isList:we,isFunction:de,isObject:z,Global:ze};function De(){return Object.assign?Object.assign:function(ae,ie,le,ue){for(var ge=1;ge<arguments.length;ge++)Se(Object(arguments[ge]),function(Pe,je){ae[je]=Pe});return ae}}function fe(){if(Object.create)return function(ie,le,ue,ge){var Pe=Ce(arguments,1);return ht.apply(this,[Object.create(ie)].concat(Pe))};{let ae=function(){};var ee=ae;return function(le,ue,ge,Pe){var je=Ce(arguments,1);return ae.prototype=le,ht.apply(this,[new ae].concat(je))}}}function me(){return String.prototype.trim?function(ae){return String.prototype.trim.call(ae)}:function(ae){return ae.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ke(ee,ae){return function(){return ae.apply(ee,Array.prototype.slice.call(arguments,0))}}function Ce(ee,ae){return Array.prototype.slice.call(ee,ae||0)}function Se(ee,ae){ve(ee,function(ie,le){return ae(ie,le),!1})}function Le(ee,ae){var ie=we(ee)?[]:{};return ve(ee,function(le,ue){return ie[ue]=ae(le,ue),!1}),ie}function ve(ee,ae){if(we(ee)){for(var ie=0;ie<ee.length;ie++)if(ae(ee[ie],ie))return ee[ie]}else for(var le in ee)if(ee.hasOwnProperty(le)&&ae(ee[le],le))return ee[le]}function we(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function de(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(gn,cn,at){gn.exports=[at(52496),at(16436),at(76673),at(35701),at(65578),at(65300)]},35701:function(gn,cn,at){var ht=at(67039),Dt=ht.Global,oe=ht.trim;gn.exports={name:"cookieStorage",read:De,write:me,each:fe,remove:ke,clearAll:Ce};var ze=Dt.document;function De(Le){if(!Le||!Se(Le))return null;var ve="(?:^|.*;\\s*)"+escape(Le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ze.cookie.replace(new RegExp(ve),"$1"))}function fe(Le){for(var ve=ze.cookie.split(/; ?/g),we=ve.length-1;we>=0;we--)if(oe(ve[we])){var de=ve[we].split("="),z=unescape(de[0]),ee=unescape(de[1]);Le(ee,z)}}function me(Le,ve){Le&&(ze.cookie=escape(Le)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ke(Le){!Le||!Se(Le)||(ze.cookie=escape(Le)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ce(){fe(function(Le,ve){ke(ve)})}function Se(Le){return new RegExp("(?:^|;\\s*)"+escape(Le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ze.cookie)}},52496:function(gn,cn,at){var ht=at(67039),Dt=ht.Global;gn.exports={name:"localStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Dt.localStorage}function ze(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Le=oe().key(Se);Ce(ze(Le),Le)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},65300:function(gn){gn.exports={name:"memoryStorage",read:at,write:ht,each:Dt,remove:oe,clearAll:ze};var cn={};function at(De){return cn[De]}function ht(De,fe){cn[De]=fe}function Dt(De){for(var fe in cn)cn.hasOwnProperty(fe)&&De(cn[fe],fe)}function oe(De){delete cn[De]}function ze(De){cn={}}},16436:function(gn,cn,at){var ht=at(67039),Dt=ht.Global;gn.exports={name:"oldFF-globalStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};var oe=Dt.globalStorage;function ze(Ce){return oe[Ce]}function De(Ce,Se){oe[Ce]=Se}function fe(Ce){for(var Se=oe.length-1;Se>=0;Se--){var Le=oe.key(Se);Ce(oe[Le],Le)}}function me(Ce){return oe.removeItem(Ce)}function ke(){fe(function(Ce,Se){delete oe[Ce]})}},76673:function(gn,cn,at){var ht=at(67039),Dt=ht.Global;gn.exports={name:"oldIE-userDataStorage",write:me,read:ke,each:Ce,remove:Se,clearAll:Le};var oe="storejs",ze=Dt.document,De=de(),fe=(Dt.navigator?Dt.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function me(z,ee){if(!fe){var ae=we(z);De(function(ie){ie.setAttribute(ae,ee),ie.save(oe)})}}function ke(z){if(!fe){var ee=we(z),ae=null;return De(function(ie){ae=ie.getAttribute(ee)}),ae}}function Ce(z){De(function(ee){for(var ae=ee.XMLDocument.documentElement.attributes,ie=ae.length-1;ie>=0;ie--){var le=ae[ie];z(ee.getAttribute(le.name),le.name)}})}function Se(z){var ee=we(z);De(function(ae){ae.removeAttribute(ee),ae.save(oe)})}function Le(){De(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(oe);for(var ae=ee.length-1;ae>=0;ae--)z.removeAttribute(ee[ae].name);z.save(oe)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function we(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function de(){if(!ze||!ze.documentElement||!ze.documentElement.addBehavior)return null;var z="script",ee,ae,ie;try{ae=new ActiveXObject("htmlfile"),ae.open(),ae.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),ae.close(),ee=ae.w.frames[0].document,ie=ee.createElement("div")}catch(le){ie=ze.createElement("div"),ee=ze.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(oe),le.apply(this,ue),ee.removeChild(ie)}}},65578:function(gn,cn,at){var ht=at(67039),Dt=ht.Global;gn.exports={name:"sessionStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Dt.sessionStorage}function ze(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Le=oe().key(Se);Ce(ze(Le),Le)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},93314:function(gn){"use strict";gn.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=="},16722:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});const ht=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,Dt=(Ce,Se)=>(!Se||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",oe=(Ce,Se)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const Le=getComputedStyle(Ce,null);return Dt(Le.overflowY,Se)||Dt(Le.overflowX,Se)||(ve=>{const we=(de=>{if(!de.ownerDocument||!de.ownerDocument.defaultView)return null;try{return de.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!we&&(we.clientHeight<ve.scrollHeight||we.clientWidth<ve.scrollWidth)})(Ce)}return!1},ze=(Ce,Se,Le,ve,we,de,z,ee)=>de<Ce&&z>Se||de>Ce&&z<Se?0:de<=Ce&&ee<=Le||z>=Se&&ee>=Le?de-Ce-ve:z>Se&&ee<Le||de<Ce&&ee>Le?z-Se+we:0,De=Ce=>{const Se=Ce.parentElement;return Se==null?Ce.getRootNode().host||null:Se},fe=(Ce,Se)=>{var Le,ve,we,de;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:ae,boundary:ie,skipOverflowHiddenElements:le}=Se,ue=typeof ie=="function"?ie:wt=>wt!==ie;if(!ht(Ce))throw new TypeError("Invalid target");const ge=document.scrollingElement||document.documentElement,Pe=[];let je=Ce;for(;ht(je)&&ue(je);){if(je=De(je),je===ge){Pe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&Pe.push(je)}const Be=(ve=(Le=window.visualViewport)==null?void 0:Le.width)!=null?ve:innerWidth,Fe=(de=(we=window.visualViewport)==null?void 0:we.height)!=null?de:innerHeight,{scrollX:Ne,scrollY:Ae}=window,{height:Re,width:We,top:Ye,right:Ue,bottom:Ve,left:ot}=Ce.getBoundingClientRect(),{top:st,right:ct,bottom:Pt,left:$e}=(wt=>{const dt=window.getComputedStyle(wt);return{top:parseFloat(dt.scrollMarginTop)||0,right:parseFloat(dt.scrollMarginRight)||0,bottom:parseFloat(dt.scrollMarginBottom)||0,left:parseFloat(dt.scrollMarginLeft)||0}})(Ce);let nt=ee==="start"||ee==="nearest"?Ye-st:ee==="end"?Ve+Pt:Ye+Re/2-st+Pt,yt=ae==="center"?ot+We/2-$e+ct:ae==="end"?Ue+ct:ot-$e;const xt=[];for(let wt=0;wt<Pe.length;wt++){const dt=Pe[wt],{height:ft,width:ut,top:Et,right:mt,bottom:vt,left:kt}=dt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ve<=Fe&&Ue<=Be&&(dt===ge&&!oe(dt)||Ye>=Et&&Ve<=vt&&ot>=kt&&Ue<=mt))return xt;const pt=getComputedStyle(dt),Qe=parseInt(pt.borderLeftWidth,10),Ke=parseInt(pt.borderTopWidth,10),xe=parseInt(pt.borderRightWidth,10),Me=parseInt(pt.borderBottomWidth,10);let Ze=0,tt=0;const Ie="offsetWidth"in dt?dt.offsetWidth-dt.clientWidth-Qe-xe:0,_e="offsetHeight"in dt?dt.offsetHeight-dt.clientHeight-Ke-Me:0,He="offsetWidth"in dt?dt.offsetWidth===0?0:ut/dt.offsetWidth:0,rt="offsetHeight"in dt?dt.offsetHeight===0?0:ft/dt.offsetHeight:0;if(ge===dt)Ze=ee==="start"?nt:ee==="end"?nt-Fe:ee==="nearest"?ze(Ae,Ae+Fe,Fe,Ke,Me,Ae+nt,Ae+nt+Re,Re):nt-Fe/2,tt=ae==="start"?yt:ae==="center"?yt-Be/2:ae==="end"?yt-Be:ze(Ne,Ne+Be,Be,Qe,xe,Ne+yt,Ne+yt+We,We),Ze=Math.max(0,Ze+Ae),tt=Math.max(0,tt+Ne);else{Ze=ee==="start"?nt-Et-Ke:ee==="end"?nt-vt+Me+_e:ee==="nearest"?ze(Et,vt,ft,Ke,Me+_e,nt,nt+Re,Re):nt-(Et+ft/2)+_e/2,tt=ae==="start"?yt-kt-Qe:ae==="center"?yt-(kt+ut/2)+Ie/2:ae==="end"?yt-mt+xe+Ie:ze(kt,mt,ut,Qe,xe+Ie,yt,yt+We,We);const{scrollLeft:St,scrollTop:Ct}=dt;Ze=rt===0?0:Math.max(0,Math.min(Ct+Ze/rt,dt.scrollHeight-ft/rt+_e)),tt=He===0?0:Math.max(0,Math.min(St+tt/He,dt.scrollWidth-ut/He+Ie)),nt+=Ct-Ze,yt+=St-tt}xt.push({el:dt,top:Ze,left:tt})}return xt},me=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(Se=>Se===Object(Se)&&Object.keys(Se).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function ke(Ce,Se){if(!Ce.isConnected||!(we=>{let de=we;for(;de&&de.parentNode;){if(de.parentNode===document)return!0;de=de.parentNode instanceof ShadowRoot?de.parentNode.host:de.parentNode}return!1})(Ce))return;const Le=(we=>{const de=window.getComputedStyle(we);return{top:parseFloat(de.scrollMarginTop)||0,right:parseFloat(de.scrollMarginRight)||0,bottom:parseFloat(de.scrollMarginBottom)||0,left:parseFloat(de.scrollMarginLeft)||0}})(Ce);if((we=>typeof we=="object"&&typeof we.behavior=="function")(Se))return Se.behavior(fe(Ce,Se));const ve=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:we,top:de,left:z}of fe(Ce,me(Se))){const ee=de-Le.top+Le.bottom,ae=z-Le.left+Le.right;we.scroll({top:ee,left:ae,behavior:ve})}}}}]);