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__Classrooms__Lists__Shixu...

1212 lines
2.3 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var sS=Object.defineProperty,aS=Object.defineProperties;var lS=Object.getOwnPropertyDescriptors;var bm=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,Sw=Object.prototype.propertyIsEnumerable;var yw=(gn,ze,Qt)=>ze in gn?sS(gn,ze,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):gn[ze]=Qt,af=(gn,ze)=>{for(var Qt in ze||(ze={}))ww.call(ze,Qt)&&yw(gn,Qt,ze[Qt]);if(bm)for(var Qt of bm(ze))Sw.call(ze,Qt)&&yw(gn,Qt,ze[Qt]);return gn},Ay=(gn,ze)=>aS(gn,lS(ze));var xw=(gn,ze)=>{var Qt={};for(var xt in gn)ww.call(gn,xt)&&ze.indexOf(xt)<0&&(Qt[xt]=gn[xt]);if(gn!=null&&bm)for(var xt of bm(gn))ze.indexOf(xt)<0&&Sw.call(gn,xt)&&(Qt[xt]=gn[xt]);return Qt};(self.webpackChunk=self.webpackChunk||[]).push([[342],{87922:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return jt}});var xt=Qt(87462),Yt=Qt(67294),he={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},xe=he,ge=Qt(17207),Ut=function(Ae,se){return Yt.createElement(ge.Z,(0,xt.Z)({},Ae,{ref:se,icon:xe}))},jt=Yt.forwardRef(Ut)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(gn,ze){"use strict";ze.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},18023:function(){"use strict";function gn(Dt,nt,et,ut){et===void 0&&(et=0),ut===void 0&&(ut=1/0),this._name=Dt,this._defaultValue=nt,this._minimum=et,this._maximum=ut}Object.defineProperty(gn.prototype,"name",{get:function(){return this._name},set:function(Dt){if(typeof Dt!="string"||Dt==="")throw new Error("Shape name must be a valid string.");this._name=Dt}}),Object.defineProperty(gn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("The default value must be a real number, not: "+Dt);this._defaultValue=Dt}}),Object.defineProperty(gn.prototype,"minimum",{get:function(){return this._minimum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Minimum must be a real number, not: "+Dt);this._minimum=Dt}}),Object.defineProperty(gn.prototype,"maximum",{get:function(){return this._maximum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Maximum must be a real number, not: "+Dt);this._maximum=Dt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Dt,nt){var et=go.Shape._FigureParameters[Dt];return et?et[nt]:null},go.Shape.setFigureParameter=function(Dt,nt,et){if(!(et instanceof gn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ut=go.Shape._FigureParameters[Dt];ut||(ut=[],go.Shape._FigureParameters[Dt]=ut),ut[nt]=et};var ze=[];function Qt(Dt,nt){var et=ze.pop();return et===void 0?new go.Point(Dt,nt):(et.x=Dt,et.y=nt,et)}function xt(){var Dt=ze.pop();return Dt===void 0?new go.Point:Dt}function Yt(Dt){ze.push(Dt)}function he(Dt,nt,et,ut,at,ht,pt,St,bt){bt||(bt=new go.Point);var Ot=Dt-et,Ht=at-pt,Wt=NaN,re=NaN;if(Ot===0)if(Ht===0)Dt===et&&(Wt=Dt,re=nt);else{var te=(ht-St)/Ht,Ce=ht-te*at;Wt=Dt,re=te*Wt+Ce}else if(Ht===0){var ce=(nt-ut)/Ot,Qe=nt-ce*Dt;Wt=at,re=ce*Wt+Qe}else{var ce=(nt-ut)/Ot,te=(ht-St)/Ht,Qe=nt-ce*Dt,Ce=ht-te*at;Wt=(Ce-Qe)/(ce-te),re=ce*Wt+Qe}return bt.x=Wt,bt.y=re,bt}function xe(Dt,nt,et,ut,at,ht,pt,St,bt,Ot,Ht,Wt,re,te){var Ce=1-bt,ce=bt,Qe=Dt*Ce+et*ce,je=nt*Ce+ut*ce,He=et*Ce+at*ce,Qn=ut*Ce+ht*ce,Gn=at*Ce+pt*ce,Yn=ht*Ce+St*ce,di=Qe*Ce+He*ce,ie=je*Ce+Qn*ce,zt=He*Ce+Gn*ce,We=Qn*Ce+Yn*ce,En=di*Ce+zt*ce,Xn=ie*Ce+We*ce;Ot.x=Qe,Ot.y=je,Ht.x=di,Ht.y=ie,Wt.x=En,Wt.y=Xn,re.x=zt,re.y=We,te.x=Gn,te.y=Yn}var ge=new go.Spot(.156,.156),Ut=new go.Spot(.844,.844),jt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new gn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=5),ut=Math.min(ut,nt/3),ut=Math.min(ut,et/3);var at=ut*jt,ht=new go.Geometry().add(new go.PathFigure(ut,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ut,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ut,nt-at,0,nt,at)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ut)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ut,et,nt,et-at,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,ut,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ut,at,et,0,et-at)).add(new go.PathSegment(go.PathSegment.Line,0,ut)).add(new go.PathSegment(go.PathSegment.Bezier,ut,0,0,at,at,0).close()));return at>1&&(ht.spot1=new go.Spot(0,0,at,at),ht.spot2=new go.Spot(1,1,-at,-at)),ht}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Dt,nt,et){var ut=new go.Geometry(go.Geometry.Line);return ut.startX=0,ut.startY=et/2,ut.endX=nt,ut.endY=et/2,ut}),go.Shape.defineFigureGenerator("LineV",function(Dt,nt,et){var ut=new go.Geometry(go.Geometry.Line);return ut.startX=nt/2,ut.startY=0,ut.endX=nt/2,ut.endY=et,ut}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Dt,nt,et){var ut=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ut*nt,(1-ut)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,ut*et)).add(new go.PathSegment(go.PathSegment.Move,ut*nt,ut*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,(1-ut)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(Dt,nt,et){var ut=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ut,ut,ut,ut).close()));return at.spot1=ge,at.spot2=Ut,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(Dt,nt,et){var ut=new go.Geometry(go.Geometry.Line);return ut.startX=0,ut.startY=0,ut.endX=nt,ut.endY=et,ut}),go.Shape.defineFigureGenerator("Line2",function(Dt,nt,et){var ut=new go.Geometry(go.Geometry.Line);return ut.startX=nt,ut.startY=0,ut.endX=0,ut.endY=et,ut}),go.Shape.defineFigureGenerator("Curve1",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,jt*nt,0,nt,(1-jt)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,jt*et,(1-jt)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,jt*et,jt*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-jt)*nt,0,0,(1-jt)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).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(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)?ut=.1:ut<-1?ut=-1:ut>1&&(ut=1);var at=Math.abs(ut)*nt;if(ut===0){var ht=new go.Geometry(go.Geometry.Rectangle);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}else{var ht=new go.Geometry;return ut>0?ht.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ht.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ht.setSpots(at/nt,0,(nt-at)/nt,1),ht}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)?ut=10:ut<-nt?ut=-nt:ut>nt&&(ut=nt);var at=Math.abs(ut);if(ut===0){var ht=new go.Geometry(go.Geometry.Rectangle);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}else{var ht=new go.Geometry;return ut>0?ht.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ht.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ht.setSpots(at/nt,0,(nt-at)/nt,1),ht}}),go.Shape.setFigureParameter("Trapezoid1",0,new gn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)?ut=.2:ut<.5?ut=-.5:ut>.5&&(ut=.5);var at=Math.abs(ut)*nt;if(ut===0){var ht=new go.Geometry(go.Geometry.Rectangle);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}else{var ht=new go.Geometry;return ut>0?ht.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ht.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ht.setSpots(at/nt,0,(nt-at)/nt,1),ht}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new gn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)?ut=20:ut<-nt?ut=-nt/2:ut>nt&&(ut=nt/2);var at=Math.abs(ut);if(ut===0){var ht=new go.Geometry(go.Geometry.Rectangle);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}else{var ht=new go.Geometry;return ut>0?ht.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):ht.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&ht.setSpots(at/nt,0,(nt-at)/nt,1),ht}}),go.Shape.setFigureParameter("ManualOperation",0,new gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)?ut=10:ut<-nt?ut=-nt/2:ut>nt&&(ut=nt/2);var at=Math.abs(ut);if(ut===0){var ht=new go.Geometry(go.Geometry.Rectangle);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}else{var ht=new go.Geometry;return ut>0?ht.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())):ht.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),at<nt/2&&ht.setSpots(at/nt,0,(nt-at)/nt,1),ht}});var ne=[];function Ae(){var Dt=ne.pop();return Dt===void 0?[]:Dt}function se(Dt){Dt.length=0,ne.push(Dt)}function ke(Dt){for(var nt=Ae(),et=.5,ut=.5,at=Math.PI*1.5,ht=0,pt=0;pt<Dt;pt++)ht=2*Math.PI/Dt*pt+at,nt[pt]=new go.Point(ut+et*Math.cos(ht),ut+et*Math.sin(ht));return nt.push(nt[0]),nt}function de(Dt){var nt=Ie(Dt),et=Ae();et[0]=nt[0];for(var ut=1,at=1;ut<nt.length;ut+=2,at+=3)et[at]=nt[ut],et[at+1]=nt[ut],et[at+2]=nt[ut+1];return se(nt),et}function Ie(Dt){for(var nt=ke(Dt),et=Ae(),ut=Math.floor(nt.length/2),at=nt.length-1,ht=Dt%2===0?2:1,pt=0;pt<at;pt++){var St=nt[pt],bt=nt[pt+1],Ot=nt[(ut+pt-1)%at],Ht=nt[(ut+pt+ht)%at];et[pt*2]=St,et[pt*2+1]=he(St.x,St.y,Ot.x,Ot.y,bt.x,bt.y,Ht.x,Ht.y,new go.Point)}return et[et.length]=et[0],se(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(Dt,nt,et){var ut=ke(5),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<5;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(Dt,nt,et){var ut=ke(6),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<6;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(Dt,nt,et){var ut=ke(7),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<7;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(Dt,nt,et){var ut=ke(8),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<8;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(Dt,nt,et){var ut=ke(9),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<9;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(Dt,nt,et){var ut=ke(10),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<10;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(Dt,nt,et){var ut=ke(12),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<12;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(Dt,nt,et){var ut=Ie(5),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<10;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(Dt,nt,et){var ut=Ie(6),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<12;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Dt,nt,et){var ut=Ie(7),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<14;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(Dt,nt,et){var ut=Ie(8),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<16;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(Dt,nt,et){var ut=Ie(9),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<18;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(Dt,nt,et){var ut=Ie(10),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<20;pt++)ht.add(new go.PathSegment(go.PathSegment.Line,ut[pt].x*nt,ut[pt].y*et));return ht.add(new go.PathSegment(go.PathSegment.Line,ut[0].x*nt,ut[0].y*et).close()),se(ut),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Dt,nt,et){var ut=de(5),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Dt,nt,et){var ut=de(6),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Dt,nt,et){var ut=de(7),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Dt,nt,et){var ut=de(8),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Dt,nt,et){var ut=de(9),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Dt,nt,et){var ut=de(10),at=new go.Geometry,ht=new go.PathFigure(ut[0].x*nt,ut[0].y*et,!0);at.add(ht);for(var pt=1;pt<ut.length;pt+=3)ht.add(new go.PathSegment(go.PathSegment.Bezier,ut[pt+2].x*nt,ut[pt+2].y*et,ut[pt].x*nt,ut[pt].y*et,ut[pt+1].x*nt,ut[pt+1].y*et));return ht.segments.last().close(),se(ut),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new gn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new gn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN,at=Dt?Dt.parameter2:NaN;isNaN(ut)&&(ut=8),isNaN(at)&&(at=8);var ht=new go.Geometry,pt=new go.PathFigure(0,0,!0);return ht.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut<nt/2&&at<et/2&&(pt.add(new go.PathSegment(go.PathSegment.Move,ut,at)),pt.add(new go.PathSegment(go.PathSegment.Line,ut,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-ut,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-ut,at).close())),ht.setSpots(0,0,1,1,ut,at,-ut,-at),ht}),go.Shape.setFigureParameter("Ring",0,new gn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=8);var at=nt/2,ht=new go.Geometry,pt=new go.PathFigure(nt,nt/2,!0);ht.add(pt),pt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var St=Math.max(at-ut,0);return St>0&&(pt.add(new go.PathSegment(go.PathSegment.Move,nt/2+St,nt/2)),pt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,St,St).close())),ht.spot1=ge,ht.spot2=Ut,ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Cloud",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Dt,nt,et){var ut=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ut*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ut*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ut)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ut*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ut)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ut*et).close())).setSpots(ut/2,ut/2,1-ut/2,1-ut/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(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN,at=Dt?Dt.parameter2:NaN;isNaN(ut)&&(ut=0),isNaN(at)&&(at=315);var ht=ut%360;ht<0&&(ht+=360);var pt=at%360,St=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(St,St).add(new go.PathSegment(go.PathSegment.Arc,ht,pt,St,St,St,St).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Dt,nt,et){var ut=jt/Math.SQRT2*.5,at=Math.SQRT2/2,ht=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,ht*et,nt,(1-ut)*et,(at+ut)*nt,(ht+ut)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=30);var at=Math.min(ut,nt)/2,ht=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ht-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ht+at,0)).add(new go.PathSegment(go.PathSegment.Line,ht+at,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ht+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ht+at,et)).add(new go.PathSegment(go.PathSegment.Line,ht-at,et)).add(new go.PathSegment(go.PathSegment.Line,ht-at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt-at)).add(new go.PathSegment(go.PathSegment.Line,ht-at,pt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=10);var at=Math.min(ut,nt)/2,ht=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ht-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ht+at,0)).add(new go.PathSegment(go.PathSegment.Line,ht+at,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ht+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ht+at,et)).add(new go.PathSegment(go.PathSegment.Line,ht-at,et)).add(new go.PathSegment(go.PathSegment.Line,ht-at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt-at)).add(new go.PathSegment(go.PathSegment.Line,ht-at,pt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;if((isNaN(ut)||ut<0)&&(ut=30),nt===0||et===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=nt,at.endY=et,at}else{var ht=nt/2,pt=et/2,St=Math.atan2(et,nt),bt=ut-Math.min(Math.cos(St)*ut/2,ht),Ot=ut-Math.min(Math.sin(St)*ut/2,pt),at=new go.Geometry,Ht=new go.PathFigure(bt,0,!0);return at.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,ht,.2*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-bt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,et-Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-bt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,ht,.8*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,bt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et-Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,Ot).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=10);var at=new go.Geometry,ht=new go.PathFigure(.1*nt,0,!0);return at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new gn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.2);var at=new go.Geometry,ht=new go.PathFigure(0,0,!0);return at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,ut*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(.5+ut/2)*nt,ut*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(.5+ut/2)*nt,(1-ut)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ut)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,(1-ut)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(.5-ut/2)*nt,(1-ut)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(.5-ut/2)*nt,ut*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,ut*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new gn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.5);var at=new go.Geometry,ht=new go.PathFigure(0,0,!0);return at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ut)*nt,.25*et,Math.abs(1-ut)*nt,.75*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ut*nt,.75*et,ut*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,jt*nt,0,nt,(.5-jt/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+jt/2)*et,jt*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var ht=.2,pt=.3,St=0,bt=ht*jt;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ht+St)*et,(.5-ht+pt)*nt,(.5+bt+St)*et,(.5-bt+pt)*nt,(.5+ht+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ht+pt)*nt,(.5+St)*et,(.5+bt+pt)*nt,(.5+ht+St)*et,(.5+ht+pt)*nt,(.5+bt+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ht+St)*et,(1-.5+ht+pt)*nt,(.5-bt+St)*et,(.5+bt+pt)*nt,(.5-ht+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-bt+pt)*nt,(.5-ht+St)*et,(.5-ht+pt+.05)*nt,(.5-bt+St-.02)*et)),ht=.2,pt=0,St=-.3,bt=ht*jt,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ht+pt)*nt,(.5+St)*et,(.5+bt+pt)*nt,(.5+ht+St)*et,(.5+ht+pt)*nt,(.5+bt+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ht+St)*et,(1-.5+ht+pt)*nt,(.5-bt+St)*et,(.5+bt+pt)*nt,(.5-ht+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ht+pt)*nt,(.5+St)*et,(.5-bt+pt)*nt,(.5-ht+St)*et,(.5-ht+pt)*nt,(.5-bt+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-bt+pt)*nt,(.5+ht+St)*et,(.5-ht+pt)*nt,(.5+bt+St)*et,(.5-bt+pt)*nt,(.5+ht+St)*et)),ht=.2,pt=-.3,St=0,bt=ht*jt,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ht+St)*et,(1-.5+ht+pt-.05)*nt,(.5-bt+St-.02)*et,(.5+bt+pt)*nt,(.5-ht+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ht+pt)*nt,(.5+St)*et,(.5-bt+pt)*nt,(.5-ht+St)*et,(.5-ht+pt)*nt,(.5-bt+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ht+St)*et,(.5-ht+pt)*nt,(.5+bt+St)*et,(.5-bt+pt)*nt,(.5+ht+St)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+bt+pt)*nt,(.5+ht+St)*et,(.5+ht+pt)*nt,(.5+bt+St)*et).close()),ut.setSpots(.06,.33,.93,.68),ut}),go.Shape.defineFigureGenerator("YinYang",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var ht=.1,pt=.5,St=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(pt+ht)*nt,St*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*pt,et*St,ht*nt,ht*nt).close()),at=new go.PathFigure(nt*.5,0,!1),ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),St=.75,at=new go.PathFigure((pt+ht)*nt,St*et,!0),ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*pt,et*St,ht*nt,ht*nt).close()),ut.defaultStretch=go.GraphObject.Uniform,ut}),go.Shape.defineFigureGenerator("Peace",function(Dt,nt,et){var ut=.8535533905932737,at=.5*nt,ht=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,ht,at,ht)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,ht)).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,ut*et)).add(new go.PathSegment(go.PathSegment.Move,at,ht)).add(new go.PathSegment(go.PathSegment.Line,ut*nt,ut*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=.5,pt=.5,St=.5,bt=new go.PathFigure(pt*nt,(St-ht)*et);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),ht=.4,at=jt*.4;var Ot=xt(),Ht=xt(),Wt=xt(),re=xt();xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.42,Ot,Ht,Wt,re,re);var te=xt(),Ce=xt(),ce=xt();xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.58,re,re,ce,te,Ce);var Qe=xt(),je=xt(),He=xt();xe(pt,St+ht,pt-at,St+ht,pt-ht,St+at,pt-ht,St,.42,Qe,je,He,re,re);var Qn=xt(),Gn=xt(),Yn=xt();return xe(pt,St+ht,pt-at,St+ht,pt-ht,St+at,pt-ht,St,.58,re,re,Yn,Qn,Gn),bt.add(new go.PathSegment(go.PathSegment.Move,Yn.x*nt,Yn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,Qn.x*nt,Qn.y*et,Gn.x*nt,Gn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*nt,Wt.y*et,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,Yn.x*nt,Yn.y*et).close()),bt.add(new go.PathSegment(go.PathSegment.Move,He.x*nt,He.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,ce.x*nt,ce.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,te.x*nt,te.y*et,Ce.x*nt,Ce.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,He.x*nt,He.y*et,Qe.x*nt,Qe.y*et,je.x*nt,je.y*et).close()),Yt(Ot),Yt(Ht),Yt(Wt),Yt(re),Yt(te),Yt(Ce),Yt(ce),Yt(Qe),Yt(je),Yt(He),Yt(Qn),Yt(Gn),Yt(Yn),ut.defaultStretch=go.GraphObject.Uniform,ut}),go.Shape.defineFigureGenerator("Fragile",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=30),ut>nt&&(ut=nt);var at=(nt-ut)/2,ht=at+ut;return new go.Geometry().add(new go.PathFigure(ht,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,at,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.4,ht=.4,pt=.5,St=.5,bt=xt(),Ot=xt(),Ht=xt(),Wt=xt(),re=new go.PathFigure((pt-ht)*nt,St*et,!1);ut.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et)),xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.44,Ht,Wt,Ot,bt,bt),re.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et,Wt.x*nt,Wt.y*et));var te=Qt(Ot.x,Ot.y);xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.56,bt,bt,Ot,Ht,Wt);var Ce=Qt(Ot.x,Ot.y);re.add(new go.PathSegment(go.PathSegment.Line,(te.x*.1+.95*.9)*nt,te.y*.1*et)),re.add(new go.PathSegment(go.PathSegment.Line,.85*nt,te.y*.1*et)),re.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),re.add(new go.PathSegment(go.PathSegment.Line,nt,0)),re.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),re.add(new go.PathSegment(go.PathSegment.Line,(Ce.x*.1+.9)*nt,.15*et)),re.add(new go.PathSegment(go.PathSegment.Line,(Ce.x*.1+.9)*nt,(Ce.y*.1+.05*.9)*et)),re.add(new go.PathSegment(go.PathSegment.Line,Ce.x*nt,Ce.y*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,Ht.x*nt,Ht.y*et,Wt.x*nt,Wt.y*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et)),ht=.35,at=jt*.35;var ce=new go.PathFigure(pt*nt,(St-ht)*et,!1);ut.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et));var Qe=new go.PathFigure((pt-ht)*nt,St*et,!1);return ut.add(Qe),Yt(bt),Yt(Ot),Yt(Ht),Yt(Wt),Yt(te),Yt(Ce),ut.spot1=new go.Spot(.202,.257),ut.spot2=new go.Spot(.792,.739),ut.defaultStretch=go.GraphObject.Uniform,ut}),go.Shape.defineFigureGenerator("GenderFemale",function(Dt,nt,et){var ut=new go.Geometry,at=.375,ht=0,pt=-.125,St=at*jt,bt=new go.PathFigure((.525+ht)*nt,(.5+at+pt)*et,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ht)*nt,(.5+pt)*et,(.5+St+ht)*nt,(.5+at+pt)*et,(.5+at+ht)*nt,(.5+St+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ht)*nt,(.5-at+pt)*et,(1-.5+at+ht)*nt,(.5-St+pt)*et,(.5+St+ht)*nt,(.5-at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ht)*nt,(.5+pt)*et,(.5-St+ht)*nt,(.5-at+pt)*et,(.5-at+ht)*nt,(.5-St+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ht)*nt,(.5+at+pt)*et,(.5-at+ht)*nt,(.5+St+pt)*et,(.5-St+ht)*nt,(.5+at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,ht=0,pt=-.125,St=at*jt;var bt=new go.PathFigure((1-.5+at+ht)*nt,(.5+pt)*et,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ht)*nt,(.5+at+pt)*et,(.5+at+ht)*nt,(.5+St+pt)*et,(.5+St+ht)*nt,(.5+at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ht)*nt,(.5+pt)*et,(.5-St+ht)*nt,(.5+at+pt)*et,(.5-at+ht)*nt,(.5+St+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ht)*nt,(.5-at+pt)*et,(.5-at+ht)*nt,(.5-St+pt)*et,(.5-St+ht)*nt,(.5-at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ht)*nt,(.5+pt)*et,(.5+St+ht)*nt,(.5-at+pt)*et,(1-.5+at+ht)*nt,(.5-St+pt)*et));var bt=new go.PathFigure((.525+ht)*nt,(.5+at+pt)*et,!1);return ut.add(bt),ut.spot1=new go.Spot(.232,.136),ut.spot2=new go.Spot(.682,.611),ut.defaultStretch=go.GraphObject.Uniform,ut}),go.Shape.defineFigureGenerator("LogicImplies",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;return isNaN(ut)&&(ut=.2),new go.Geometry().add(new go.PathFigure((1-ut)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;return isNaN(ut)&&(ut=.2),new go.Geometry().add(new go.PathFigure((1-ut)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ut)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ut*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ut*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Dt,nt,et){var ut=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ut.defaultStretch=go.GraphObject.Uniform,ut}),go.Shape.defineFigureGenerator("LogicTruth",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Dt,nt,et){var ut=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ut*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ut*nt,ut*et,ut*nt,ut*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Dt,nt,et){var ut=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ut*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ut*nt,ut*et,ut*nt,ut*et)).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(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.3);var at=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=.3);var ht=(1-ut)*nt,pt=(.5-at/2)*et,St=(.5+at/2)*et,bt=new go.Geometry,Ot=new go.PathFigure(0,pt,!0);bt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,St)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,St).close()),bt.spot1=new go.Spot(0,pt/et);var Ht=he(0,St/et,1,St/et,ht/nt,1,1,.5,xt());return bt.spot2=new go.Spot(Ht.x,Ht.y),Yt(Ht),bt}),go.Shape.setFigureParameter("Arrow2",0,new gn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new gn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=30),ut>nt&&(ut=nt);var at=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var ht=nt-ut,pt=(et-at)/2,St=pt+at,bt=new go.Geometry,Ot=new go.PathFigure(0,pt,!0);bt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ht,St)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,St).close()),bt.spot1=new go.Spot(0,pt/et);var Ht=he(0,St/et,1,St/et,ht/nt,1,1,.5,xt());return bt.spot2=new go.Spot(Ht.x,Ht.y),Yt(Ht),bt}),go.Shape.defineFigureGenerator("Chevron",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ut}),go.Shape.defineFigureGenerator("DoubleArrow",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ut}),go.Shape.setFigureParameter("DoubleEndArrow",0,new gn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.3);var at=(.5-ut/2)*et,ht=(.5+ut/2)*et,pt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);pt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),St.add(new go.PathSegment(go.PathSegment.Line,.3*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var bt=he(0,.5,.3,0,0,at/et,.1,at/et,xt());return pt.spot1=new go.Spot(bt.x,bt.y),bt=he(.7,1,1,.5,0,ht/et,1,ht/et,bt),pt.spot2=new go.Spot(bt.x,bt.y),Yt(bt),pt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new gn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new gn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=40);var at=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=100);var ht=(et-ut)/2,pt=ht+ut,St=(et-at)/2,bt=St+at;(ut>et||at>et)&&(at>ut?(ut=ut*et/at,ht=(et-ut)/2,pt=ht+ut,St=0,bt=et):(ht=0,pt=et,St=0,bt=et));var Ot=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);Ot.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ht)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St).close());var Wt=he(0,.5,.3,St/et,0,ht/et,1,ht/et,xt());return Ot.spot1=new go.Spot(Wt.x,Wt.y),Wt=he(.7,bt/et,1,.5,0,pt/et,1,pt/et,Wt),Ot.spot2=new go.Spot(Wt.x,Wt.y),Yt(Wt),Ot}),go.Shape.setFigureParameter("IBeamArrow",0,new gn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.3);var at=(.5-ut/2)*et,ht=(.5+ut/2)*et,pt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);pt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,0,et)),St.add(new go.PathSegment(go.PathSegment.Line,0,0)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(0,at/et);var bt=he(.7,1,1,.5,0,ht/et,1,ht/et,xt());return pt.spot2=new go.Spot(bt.x,bt.y),Yt(bt),pt}),go.Shape.setFigureParameter("IBeamArrow2",0,new gn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new gn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=40);var at=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=100);var ht=(et-ut)/2,pt=ht+ut,St=(et-at)/2,bt=St+at;(ut>et||at>et)&&(at>ut?(ut=ut*et/at,ht=(et-ut)/2,pt=ht+ut,St=0,bt=et):(ht=0,pt=et,St=0,bt=et));var Ot=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);Ot.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,St)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ht)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,St).close()),Ot.spot1=new go.Spot(0,ht/et);var Wt=he(.7,bt/et,1,.5,0,pt/et,1,pt/et,xt());return Ot.spot2=new go.Spot(Wt.x,Wt.y),Yt(Wt),Ot}),go.Shape.setFigureParameter("Pointer",0,new gn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.1);var at=new go.Geometry,ht=new go.PathFigure(nt,.5*et,!0);at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,ut*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(ut,.35);var pt=he(.2,.65,1,.65,0,1,1,.5,xt());return at.spot2=new go.Spot(pt.x,pt.y),Yt(pt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new gn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.3);var at=new go.Geometry,ht=new go.PathFigure(nt,.5*et,!0);at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ut*nt,.75*et,ut*nt,.25*et).close()),at.spot1=new go.Spot(ut,.35);var pt=he(0,.65,1,.65,0,1,1,.5,xt());return at.spot2=new go.Spot(pt.x,pt.y),Yt(pt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new gn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.4);var at=(.5-ut/2)*et,ht=(.5+ut/2)*et,pt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);pt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,0,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,0,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(.2,.3);var bt=he(.7,1,1,.5,0,ht/et,1,ht/et,xt());return pt.spot2=new go.Spot(bt.x,bt.y),Yt(bt),pt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new gn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=50);var at=(et-ut)/2,ht=at+ut;ut>et&&(at=0,ht=et);var pt=new go.Geometry,St=new go.PathFigure(nt,.5*et,!0);pt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ht)),St.add(new go.PathSegment(go.PathSegment.Line,0,ht)),St.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,0,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(.2,at/et);var bt=he(.7,1,1,.5,0,ht/et,1,ht/et,xt());return pt.spot2=new go.Spot(bt.x,bt.y),Yt(bt),pt}),go.Shape.setFigureParameter("SquareArrow",0,new gn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.7);var at=new go.Geometry,ht=new go.PathFigure(nt,.5*et,!0);return at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,ut*nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),ht.add(new go.PathSegment(go.PathSegment.Line,ut*nt,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(ut,1),at}),go.Shape.defineFigureGenerator("Cone1",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=jt*.1,pt=new go.PathFigure(0,.9*et,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ht)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ht)*et).close()),ut.spot1=new go.Spot(.25,.5),ut.spot2=new go.Spot(.75,.97),ut}),go.Shape.defineFigureGenerator("Cone2",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var ht=new go.PathFigure(0,.9*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ut.spot1=new go.Spot(.25,.5),ut.spot2=new go.Spot(.75,.82),ut}),go.Shape.defineFigureGenerator("Cube1",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var ht=new go.PathFigure(.5*nt,et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ut.spot1=new go.Spot(0,.3),ut.spot2=new go.Spot(.5,.85),ut}),go.Shape.defineFigureGenerator("Cube2",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var ht=new go.PathFigure(0,.3*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ut.spot1=new go.Spot(0,.3),ut.spot2=new go.Spot(.7,1),ut}),go.Shape.defineFigureGenerator("Cylinder1",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=5),ut=Math.min(ut,et/3);var at=new go.Geometry,ht=jt*.5,pt=new go.PathFigure(0,ut,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,jt*ut,(.5-ht)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ut,(.5+ht)*nt,0,1*nt,jt*ut)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ut)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-jt*ut,(.5+ht)*nt,1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ut,(.5-ht)*nt,1*et,0,et-jt*ut)),pt.add(new go.PathSegment(go.PathSegment.Line,0,ut));var St=new go.PathFigure(nt,ut,!1);return at.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ut,1*nt,2*ut-jt*ut,(.5+ht)*nt,2*ut)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,ut,(.5-ht)*nt,2*ut,0,2*ut-jt*ut)),at.spot1=new go.Spot(0,0,0,2*ut),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=5),ut=Math.min(ut,et/3);var at=new go.Geometry,ht=jt*.5,pt=new go.PathFigure(0,et-ut,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,ut)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,jt*ut,(.5-ht)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ut,(.5+ht)*nt,0,nt,jt*ut)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ut)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-jt*ut,(.5+ht)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ut,(.5-ht)*nt,et,0,et-jt*ut));var St=new go.PathFigure(0,et-ut,!1);return at.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ut,0,et-ut-jt*ut,(.5-ht)*nt,et-2*ut)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ut,(.5+ht)*nt,et-2*ut,nt,et-ut-jt*ut)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*ut),at}),go.Shape.defineFigureGenerator("Cylinder3",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=5),ut=Math.min(ut,nt/3);var at=new go.Geometry,ht=jt*.5,pt=new go.PathFigure(ut,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt-ut,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-jt*ut,0,nt,(.5-ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ut,et,nt,(.5+ht)*et,nt-jt*ut,et)),pt.add(new go.PathSegment(go.PathSegment.Line,ut,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,jt*ut,et,0,(.5+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ut,0,0,(.5-ht)*et,jt*ut,0));var St=new go.PathFigure(ut,0,!1);return at.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,2*ut,.5*et,ut+jt*ut,0,2*ut,(.5-ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,ut,et,2*ut,(.5+ht)*et,ut+jt*ut,et)),at.spot1=new go.Spot(0,0,2*ut,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=5),ut=Math.min(ut,nt/3);var at=new go.Geometry,ht=jt*.5,pt=new go.PathFigure(nt-ut,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-jt*ut,0,nt,(.5-ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ut,et,nt,(.5+ht)*et,nt-jt*ut,et)),pt.add(new go.PathSegment(go.PathSegment.Line,ut,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,jt*ut,et,0,(.5+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ut,0,0,(.5-ht)*et,jt*ut,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-ut,0));var St=new go.PathFigure(nt-ut,0,!1);return at.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ut,.5*et,nt-ut-jt*ut,0,nt-2*ut,(.5-ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-ut,et,nt-2*ut,(.5+ht)*et,nt-ut-jt*ut,et)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*ut,0),at}),go.Shape.defineFigureGenerator("Prism1",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ht=new go.PathFigure(.25*nt,.25*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ut.spot1=new go.Spot(.408,.172),ut.spot2=new go.Spot(.833,.662),ut}),go.Shape.defineFigureGenerator("Prism2",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ht=new go.PathFigure(0,et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ht.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ut.spot1=new go.Spot(.25,.5),ut.spot2=new go.Spot(.75,.75),ut}),go.Shape.defineFigureGenerator("Pyramid1",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var ht=new go.PathFigure(.5*nt,0,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ut.spot1=new go.Spot(.25,.367),ut.spot2=new go.Spot(.75,.875),ut}),go.Shape.defineFigureGenerator("Pyramid2",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var ht=new go.PathFigure(.5*nt,0,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ut.spot1=new go.Spot(.25,.367),ut.spot2=new go.Spot(.75,.875),ut}),go.Shape.defineFigureGenerator("Actor",function(Dt,nt,et){var ut=new go.Geometry,at=.2,ht=.1,pt=jt*at,St=jt*ht,bt=.5,Ot=.1,Ht=new go.PathFigure(bt*nt,(Ot+ht)*et,!0);ut.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(bt-at)*nt,Ot*et,(bt-pt)*nt,(Ot+ht)*et,(bt-at)*nt,(Ot+St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-ht)*et,(bt-at)*nt,(Ot-St)*et,(bt-pt)*nt,(Ot-ht)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(bt+at)*nt,Ot*et,(bt+pt)*nt,(Ot-ht)*et,(bt+at)*nt,(Ot-St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot+ht)*et,(bt+at)*nt,(Ot+St)*et,(bt+pt)*nt,(Ot+ht)*et));var Wt=.05,re=jt*Wt;bt=.05,Ot=.25;var te=new go.PathFigure(.5*nt,.2*et,!0);return ut.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),bt=.95,Ot=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,(bt+Wt)*nt,Ot*et,(bt+re)*nt,(Ot-Wt)*et,(bt+Wt)*nt,(Ot-re)*et)),te.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),Wt=.025,re=jt*Wt,bt=.825,Ot=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-Wt)*et,(bt+Wt)*nt,(Ot-re)*et,(bt+re)*nt,(Ot-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Ot*et,(bt-re)*nt,(Ot-Wt)*et,(bt-Wt)*nt,(Ot-re)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),Wt=.05,re=jt*Wt,bt=.5,Ot=.7,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-Wt)*et,(bt+Wt)*nt,(Ot-re)*et,(bt+re)*nt,(Ot-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Ot*et,(bt-re)*nt,(Ot-Wt)*et,(bt-Wt)*nt,(Ot-re)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),Wt=.025,re=jt*Wt,bt=.175,Ot=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-Wt)*et,(bt+Wt)*nt,(Ot-re)*et,(bt+re)*nt,(Ot-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Ot*et,(bt-re)*nt,(Ot-Wt)*et,(bt-Wt)*nt,(Ot-re)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),Wt=.05,re=jt*Wt,bt=.05,Ot=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-Wt)*et,(bt-Wt)*nt,(Ot-re)*et,(bt-re)*nt,(Ot-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ut.spot1=new go.Spot(.2,.2),ut.spot2=new go.Spot(.8,.65),ut}),go.Shape.setFigureParameter("Card",0,new gn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;isNaN(ut)&&(ut=.2);var at=new go.Geometry,ht=new go.PathFigure(nt,0,!0);return at.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,ut*et)),ht.add(new go.PathSegment(go.PathSegment.Line,ut*nt,0).close()),at.spot1=new go.Spot(0,ut),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var ht=new go.PathFigure(.5*nt,.5*et,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ut.spot1=new go.Spot(.25,0),ut.spot2=new go.Spot(.75,.25),ut}),go.Shape.defineFigureGenerator("CreateRequest",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.1);var ht=new go.PathFigure(0,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),pt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),ut}),go.Shape.defineFigureGenerator("Database",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=jt*.1,pt=new go.PathFigure(nt,.1*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ht)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ht)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ht)*et));var St=new go.PathFigure(nt,.1*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ht)*et,(.5+at)*nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ht)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ht)*et,(.5+at)*nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ht)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+ht)*et,(.5+at)*nt,.4*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+ht)*et)),ut.spot1=new go.Spot(0,.4),ut.spot2=new go.Spot(1,.9),ut}),go.Shape.defineFigureGenerator("DataStorage",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ut.spot1=new go.Spot(.226,0),ut.spot2=new go.Spot(.81,1),ut}),go.Shape.defineFigureGenerator("DiskStorage",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=jt*.1,pt=new go.PathFigure(nt,.1*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ht)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ht)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ht)*et));var St=new go.PathFigure(nt,.1*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ht)*et,(.5+at)*nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ht)*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ht)*et,(.5+at)*nt,.3*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ht)*et)),ut.spot1=new go.Spot(0,.3),ut.spot2=new go.Spot(1,.9),ut}),go.Shape.defineFigureGenerator("Display",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ut.spot1=new go.Spot(.25,0),ut.spot2=new go.Spot(.75,1),ut}),go.Shape.defineFigureGenerator("DividedEvent",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var ht=jt*.2,pt=new go.PathFigure(0,.2*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-ht)*et,(.2-ht)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+ht)*nt,0,nt,(.2-ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+ht)*et,(.8+ht)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-ht)*nt,et,0,(.8+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var St=new go.PathFigure(0,at*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),ut}),go.Shape.defineFigureGenerator("DividedProcess",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var ht=new go.PathFigure(0,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),ut}),go.Shape.defineFigureGenerator("Document",function(Dt,nt,et){var ut=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ut.spot1=go.Spot.TopLeft,ut.spot2=new go.Spot(1,.6),ut}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var ht=new go.PathFigure(0,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,at*et)),pt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),ut}),go.Shape.defineFigureGenerator("ExternalProcess",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var ht=new go.PathFigure(.1*nt,.4*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ut.spot1=new go.Spot(.25,.25),ut.spot2=new go.Spot(.75,.75),ut}),go.Shape.defineFigureGenerator("File",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ht=new go.PathFigure(.75*nt,0,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ut.spot1=new go.Spot(0,.25),ut.spot2=go.Spot.BottomRight,ut}),go.Shape.defineFigureGenerator("Interrupt",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var ht=new go.PathFigure(nt,.5*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et));var pt=new go.PathFigure(nt,.5*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(.5,.75),ut}),go.Shape.defineFigureGenerator("InternalStorage",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN,ht=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ht)&&(ht=.1);var pt=new go.PathFigure(0,0,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var St=new go.PathFigure(at*nt,0,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),St.add(new go.PathSegment(go.PathSegment.Move,0,ht*et)),St.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)),ut}),go.Shape.defineFigureGenerator("Junction",function(Dt,nt,et){var ut=new go.Geometry,at=1/Math.SQRT2,ht=(1-1/Math.SQRT2)/2,pt=jt*.5,St=.5,bt=new go.PathFigure(nt,St*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,et,nt,(St+pt)*et,(St+pt)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,St*et,(St-pt)*nt,et,0,(St+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,0,0,(St-pt)*et,(St-pt)*nt,0)),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,St*et,(St+pt)*nt,0,nt,(St-pt)*et));var Ot=new go.PathFigure((ht+at)*nt,(ht+at)*et,!1);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ht*nt,ht*et)),Ot.add(new go.PathSegment(go.PathSegment.Move,ht*nt,(ht+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,(ht+at)*nt,ht*et)),ut}),go.Shape.defineFigureGenerator("LinedDocument",function(Dt,nt,et){var ut=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var ht=new go.PathFigure(.1*nt,0,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ut.spot1=new go.Spot(.1,0),ut.spot2=new go.Spot(1,.6),ut}),go.Shape.defineFigureGenerator("LoopLimit",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ut.spot1=new go.Spot(0,.25),ut.spot2=go.Spot.BottomRight,ut}),go.Shape.defineFigureGenerator("MagneticTape",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=.5,pt=new go.PathFigure(.5*nt,et,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht*et,(ht-at)*nt,et,0,(ht+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ht*nt,0,0,(ht-at)*et,(ht-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht*et,(ht+at)*nt,0,nt,(ht-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(ht+.1)*nt,.9*et,nt,(ht+at)*et,(ht+at)*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ut.spot1=new go.Spot(.15,.15),ut.spot2=new go.Spot(.85,.8),ut}),go.Shape.defineFigureGenerator("ManualInput",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ut.spot1=new go.Spot(0,.25),ut.spot2=go.Spot.BottomRight,ut}),go.Shape.defineFigureGenerator("MessageFromUser",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.7);var ht=new go.PathFigure(0,0,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut.spot1=go.Spot.TopLeft,ut}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.25);var ht=new go.PathFigure(0,0,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut}),go.Shape.defineFigureGenerator("MicroformRecording",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(1,.75),ut}),go.Shape.defineFigureGenerator("MultiDocument",function(Dt,nt,et){var ut=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var ht=new go.PathFigure(.1*nt,.2*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(.8,.77),ut}),go.Shape.defineFigureGenerator("MultiProcess",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var ht=new go.PathFigure(.2*nt,.1*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ut.spot1=new go.Spot(0,.2),ut.spot2=new go.Spot(.8,1),ut}),go.Shape.defineFigureGenerator("OfflineStorage",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.1);var ht=1-at,pt=new go.PathFigure(0,0,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var St=new go.PathFigure(.5*at*nt,at*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*nt,at*et)),ut}),go.Shape.defineFigureGenerator("OffPageConnector",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut.spot1=go.Spot.TopLeft,ut.spot2=new go.Spot(.75,1),ut}),go.Shape.defineFigureGenerator("Or",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=.5,pt=new go.PathFigure(nt,ht*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ht*nt,et,nt,(ht+at)*et,(ht+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht*et,(ht-at)*nt,et,0,(ht+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ht*nt,0,0,(ht-at)*et,(ht-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht*et,(ht+at)*nt,0,nt,(ht-at)*et));var St=new go.PathFigure(nt,.5*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),St.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ut}),go.Shape.defineFigureGenerator("PaperTape",function(Dt,nt,et){var ut=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ut.spot1=new go.Spot(0,.49),ut.spot2=new go.Spot(1,.75),ut}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN,ht=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ht)&&(ht=.3);var pt=new go.PathFigure(0,0,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN,ht=Dt?Dt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ht)&&(ht=.3);var pt=new go.PathFigure(0,0,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut}),go.Shape.defineFigureGenerator("Procedure",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.1);var ht=new go.PathFigure(0,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure((1-at)*nt,0,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,at*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),ut}),go.Shape.defineFigureGenerator("Process",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.1);var ht=new go.PathFigure(0,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),ut.spot2=go.Spot.BottomRight,ut}),go.Shape.defineFigureGenerator("Sort",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var ht=new go.PathFigure(0,.5*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ut.spot1=new go.Spot(.25,.25),ut.spot2=new go.Spot(.75,.5),ut}),go.Shape.defineFigureGenerator("Start",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.25);var ht=new go.PathFigure(at*nt,0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var pt=new go.PathFigure(at*nt,0,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),ut.spot1=new go.Spot(at,0),ut.spot2=new go.Spot(1-at,1),ut}),go.Shape.defineFigureGenerator("Terminator",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ut.spot1=new go.Spot(.23,0),ut.spot2=new go.Spot(.77,1),ut}),go.Shape.defineFigureGenerator("TransmittalTape",function(Dt,nt,et){var ut=new go.Geometry,at=Dt?Dt.parameter1:NaN;isNaN(at)&&(at=.1);var ht=new go.PathFigure(0,0,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),ut.spot1=go.Spot.TopLeft,ut}),go.Shape.defineFigureGenerator("AndGate",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=new go.PathFigure(0,0,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut.spot1=go.Spot.TopLeft,ut.spot2=new go.Spot(.55,1),ut}),go.Shape.defineFigureGenerator("Buffer",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(.5,.75),ut}),go.Shape.defineFigureGenerator("Clock",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=.5,pt=new go.PathFigure(nt,ht*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ht*nt,et,nt,(ht+at)*et,(ht+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht*et,(ht-at)*nt,et,0,(ht+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ht*nt,0,0,(ht-at)*et,(ht-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht*et,(ht+at)*nt,0,nt,(ht-at)*et));var St=new go.PathFigure(nt,ht*et,!1);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et));var bt=new go.PathFigure(.8*nt,.75*et,!1);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ut}),go.Shape.defineFigureGenerator("Ground",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ut}),go.Shape.defineFigureGenerator("Inverter",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.1,ht=.1,pt=.9,St=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,0,et)),bt.add(new go.PathSegment(go.PathSegment.Line,0,0)),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Ot=new go.PathFigure((pt+ht)*nt,St*et,!0);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,(pt+at)*nt,(St-ht)*et,(pt+ht)*nt,(St-at)*et)),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(.4,.75),ut}),go.Shape.defineFigureGenerator("NandGate",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=jt*.4,pt=jt*.1,St=.1,bt=.9,Ot=.5,Ht=new go.PathFigure(.8*nt,.5*et,!0);ut.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+ht)*et,(.4+at)*nt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-ht)*et));var Wt=new go.PathFigure((bt+St)*nt,Ot*et,!0);return ut.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot+St)*et,(bt+St)*nt,(Ot+pt)*et,(bt+pt)*nt,(Ot+St)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St)*nt,Ot*et,(bt-pt)*nt,(Ot+St)*et,(bt-St)*nt,(Ot+pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-St)*et,(bt-St)*nt,(Ot-pt)*et,(bt-pt)*nt,(Ot-St)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St)*nt,Ot*et,(bt+pt)*nt,(Ot-St)*et,(bt+St)*nt,(Ot-pt)*et)),ut.spot1=new go.Spot(0,.05),ut.spot2=new go.Spot(.55,.95),ut}),go.Shape.defineFigureGenerator("NorGate",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*at,pt=0,St=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(pt+ht)*nt,(St-at)*et,.7*nt,(St-ht)*et)),at=.1,ht=jt*.1,pt=.9,St=.5;var Ot=new go.PathFigure((pt-at)*nt,St*et,!0);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et)),ut.spot1=new go.Spot(.2,.25),ut.spot2=new go.Spot(.6,.75),ut}),go.Shape.defineFigureGenerator("OrGate",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*at,pt=0,St=.5,bt=new go.PathFigure(0,0,!0);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ht+ht)*nt,(St-at)*et,.8*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(St+ht)*et,(pt+ht+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ut.spot1=new go.Spot(.2,.25),ut.spot2=new go.Spot(.75,.75),ut}),go.Shape.defineFigureGenerator("XnorGate",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*at,pt=.2,St=.5,bt=new go.PathFigure(.1*nt,0,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ot=new go.PathFigure(.8*nt,.5*et,!0);ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(pt+ht)*nt,(St-at)*et,.7*nt,(St-ht)*et)),at=.1,ht=jt*.1,pt=.9,St=.5;var Ht=new go.PathFigure((pt-at)*nt,St*et,!0);return ut.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et)),ut.spot1=new go.Spot(.4,.25),ut.spot2=new go.Spot(.65,.75),ut}),go.Shape.defineFigureGenerator("XorGate",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*at,pt=.2,St=.5,bt=new go.PathFigure(.1*nt,0,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ot=new go.PathFigure(.2*nt,0,!0);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ht)*nt,(St-at)*et,.9*nt,(St-ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ut.spot1=new go.Spot(.4,.25),ut.spot2=new go.Spot(.8,.75),ut}),go.Shape.defineFigureGenerator("Capacitor",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ut}),go.Shape.defineFigureGenerator("Resistor",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ut}),go.Shape.defineFigureGenerator("Inductor",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.1,ht=.1,pt=.1,St=.5,bt=new go.PathFigure((pt-at*.5)*nt,et,!1);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,0,(pt-at)*nt,et,(pt-ht)*nt,0)),pt=.3,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ht)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,0,(pt-at)*nt,et,(pt-ht)*nt,0)),pt=.5,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ht)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,0,(pt-at)*nt,et,(pt-ht)*nt,0)),pt=.7,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ht)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,0,(pt-at)*nt,et,(pt-ht)*nt,0)),pt=.9,bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at*.5)*nt,et,(pt+ht)*nt,0,(pt+at)*nt,et)),ut}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.5,ht=.5,pt=.5,St=.5,bt=new go.PathFigure((pt-ht)*nt,St*et,!1);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,(pt+at)*nt,(St-ht)*et,(pt+ht)*nt,(St-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Move,(pt-ht+.1)*nt,St*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht-.1)*nt,St*et,pt*nt,(St-ht)*et,pt*nt,(St+ht)*et)),ut}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ut}),go.Shape.defineFigureGenerator("Diode",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ut.spot1=new go.Spot(0,.25),ut.spot2=new go.Spot(.5,.75),ut}),go.Shape.defineFigureGenerator("Wifi",function(Dt,nt,et){var ut=new go.Geometry,at=nt,ht=et;nt=nt*.38,et=et*.6;var pt=jt*.8,St=.8,bt=0,Ot=.5,Ht=(at-nt)/2,Wt=(ht-et)/2,re=new go.PathFigure(bt*nt+Ht,(Ot+St)*et+Wt,!0);ut.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St)*nt+Ht,Ot*et+Wt,(bt-pt)*nt+Ht,(Ot+St)*et+Wt,(bt-St)*nt+Ht,(Ot+pt)*et+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot-St)*et+Wt,(bt-St)*nt+Ht,(Ot-pt)*et+Wt,(bt-pt)*nt+Ht,(Ot-St)*et+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St+pt*.5)*nt+Ht,Ot*et+Wt,bt*nt+Ht,(Ot-St)*et+Wt,(bt-St+pt*.5)*nt+Ht,(Ot-pt)*et+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot+St)*et+Wt,(bt-St+pt*.5)*nt+Ht,(Ot+pt)*et+Wt,bt*nt+Ht,(Ot+St)*et+Wt).close()),pt=jt*.4,St=.4,bt=.2,Ot=.5;var te=new go.PathFigure(bt*nt+Ht,(Ot+St)*et+Wt,!0);ut.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St)*nt+Ht,Ot*et+Wt,(bt-pt)*nt+Ht,(Ot+St)*et+Wt,(bt-St)*nt+Ht,(Ot+pt)*et+Wt)),te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot-St)*et+Wt,(bt-St)*nt+Ht,(Ot-pt)*et+Wt,(bt-pt)*nt+Ht,(Ot-St)*et+Wt)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St+pt*.5)*nt+Ht,Ot*et+Wt,bt*nt+Ht,(Ot-St)*et+Wt,(bt-St+pt*.5)*nt+Ht,(Ot-pt)*et+Wt)),te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot+St)*et+Wt,(bt-St+pt*.5)*nt+Ht,(Ot+pt)*et+Wt,bt*nt+Ht,(Ot+St)*et+Wt).close()),pt=jt*.2,St=.2,bt=.5,Ot=.5;var Ce=new go.PathFigure((bt-St)*nt+Ht,Ot*et+Wt,!0);ut.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot-St)*et+Wt,(bt-St)*nt+Ht,(Ot-pt)*et+Wt,(bt-pt)*nt+Ht,(Ot-St)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St)*nt+Ht,Ot*et+Wt,(bt+pt)*nt+Ht,(Ot-St)*et+Wt,(bt+St)*nt+Ht,(Ot-pt)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot+St)*et+Wt,(bt+St)*nt+Ht,(Ot+pt)*et+Wt,(bt+pt)*nt+Ht,(Ot+St)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt-St)*nt+Ht,Ot*et+Wt,(bt-pt)*nt+Ht,(Ot+St)*et+Wt,(bt-St)*nt+Ht,(Ot+pt)*et+Wt)),pt=jt*.4,St=.4,bt=.8,Ot=.5;var ce=new go.PathFigure(bt*nt+Ht,(Ot-St)*et+Wt,!0);ut.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St)*nt+Ht,Ot*et+Wt,(bt+pt)*nt+Ht,(Ot-St)*et+Wt,(bt+St)*nt+Ht,(Ot-pt)*et+Wt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot+St)*et+Wt,(bt+St)*nt+Ht,(Ot+pt)*et+Wt,(bt+pt)*nt+Ht,(Ot+St)*et+Wt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St-pt*.5)*nt+Ht,Ot*et+Wt,bt*nt+Ht,(Ot+St)*et+Wt,(bt+St-pt*.5)*nt+Ht,(Ot+pt)*et+Wt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot-St)*et+Wt,(bt+St-pt*.5)*nt+Ht,(Ot-pt)*et+Wt,bt*nt+Ht,(Ot-St)*et+Wt).close()),pt=jt*.8,St=.8,bt=1,Ot=.5;var Qe=new go.PathFigure(bt*nt+Ht,(Ot-St)*et+Wt,!0);return ut.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St)*nt+Ht,Ot*et+Wt,(bt+pt)*nt+Ht,(Ot-St)*et+Wt,(bt+St)*nt+Ht,(Ot-pt)*et+Wt)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot+St)*et+Wt,(bt+St)*nt+Ht,(Ot+pt)*et+Wt,(bt+pt)*nt+Ht,(Ot+St)*et+Wt)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+St-pt*.5)*nt+Ht,Ot*et+Wt,bt*nt+Ht,(Ot+St)*et+Wt,(bt+St-pt*.5)*nt+Ht,(Ot+pt)*et+Wt)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ht,(Ot-St)*et+Wt,(bt+St-pt*.5)*nt+Ht,(Ot-pt)*et+Wt,bt*nt+Ht,(Ot-St)*et+Wt).close()),ut}),go.Shape.defineFigureGenerator("Email",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ht=new go.PathFigure(0,0,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.add(new go.PathSegment(go.PathSegment.Move,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),ht.add(new go.PathSegment(go.PathSegment.Move,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ut}),go.Shape.defineFigureGenerator("Ethernet",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var ht=new go.PathFigure(.1*nt,et,!0,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var pt=new go.PathFigure(.6*nt,et,!0,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var St=new go.PathFigure(0,.5*et,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),St.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),St.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),St.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ut}),go.Shape.defineFigureGenerator("Power",function(Dt,nt,et){var ut=new go.Geometry,at=jt*.4,ht=.4,pt=.5,St=.5,bt=xt(),Ot=xt(),Ht=xt(),Wt=xt();xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.5,bt,bt,Ot,Ht,Wt);var re=Qt(Ot.x,Ot.y),te=new go.PathFigure(Ot.x*nt,Ot.y*et,!0);ut.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,Ht.x*nt,Ht.y*et,Wt.x*nt,Wt.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,(pt-at)*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et)),xe(pt-ht,St,pt-ht,St-at,pt-at,St-ht,pt,St-ht,.5,Ht,Wt,Ot,bt,bt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et,Wt.x*nt,Wt.y*et)),at=jt*.3,ht=.3,xe(pt-ht,St,pt-ht,St-at,pt-at,St-ht,pt,St-ht,.5,Ht,Wt,Ot,bt,bt),te.add(new go.PathSegment(go.PathSegment.Line,Ot.x*nt,Ot.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ht)*nt,St*et,Wt.x*nt,Wt.y*et,Ht.x*nt,Ht.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+ht)*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ht)*nt,St*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),xe(pt,St-ht,pt+at,St-ht,pt+ht,St-at,pt+ht,St,.5,bt,bt,Ot,Ht,Wt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,Wt.x*nt,Wt.y*et,Ht.x*nt,Ht.y*et).close());var te=new go.PathFigure(.45*nt,0,!0);return ut.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),Yt(bt),Yt(Ot),Yt(Ht),Yt(Wt),Yt(re),ut.spot1=new go.Spot(.25,.45),ut.spot2=new go.Spot(.75,.8),ut}),go.Shape.defineFigureGenerator("Fallout",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et/2,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function ht(pt,St,bt){pt.add(new go.PathSegment(go.PathSegment.Move,(.3+St)*nt,(.8+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+St)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.1+St)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.3+St)*nt,(.8+bt)*et).close())}return ht(at,0,0),ht(at,.4,0),ht(at,.2,-.3),ut}),go.Shape.defineFigureGenerator("IrritationHazard",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ut.spot1=new go.Spot(.3,.3),ut.spot2=new go.Spot(.7,.7),ut}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),at.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),at.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ut}),go.Shape.defineFigureGenerator("FireHazard",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ut.spot1=new go.Spot(.07,.445),ut.spot2=new go.Spot(.884,.958),ut}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=0,pt=0,St=at*jt,bt=.4*Math.SQRT2/2+.5,Ot=.5-.5*Math.SQRT2/2,Ht=1,Wt=.5,re=.5,te=0,Ce=new go.PathFigure(bt*nt,(1-Ot)*et,!1);return ut.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,Wt*et,Ht*nt,.7*et,Ht*nt,Wt*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(re+ht)*nt,(te+ht)*et,(.5+at+ht)*nt,(.5-St+ht)*et,(.5+St+ht)*nt,(.5-at+ht)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ht)*nt,(.5+pt)*et,(.5-St+ht)*nt,(.5-at+pt)*et,(.5-at+ht)*nt,(.5-St+pt)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ht)*nt,.9*et,(.5-at+ht)*nt,(.5+St+pt)*et,(.5-St+ht)*nt,.9*et)),Ce.add(new go.PathSegment(go.PathSegment.Move,(.25+ht)*nt,.8*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.35+ht)*nt,.9*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.2+ht)*nt,.95*et)),ut}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ut}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ut}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);ut.add(at);var ht=new go.PathFigure(nt,et,!1);ut.add(ht);var pt=new go.PathFigure(0,.5*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ut}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ut}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var at=new go.PathFigure(0,.2*et,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ut}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var ht=new go.PathFigure(.45*nt,.73*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ut}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);ut.add(at);var ht=new go.PathFigure(.335*nt,(1-.555)*et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var pt=.5-.285,St=.5,bt=pt,Ot=Math.PI/4,Ht=4*(1-Math.cos(Ot))/(3*Math.sin(Ot)),Wt=Ht*.5,re=pt,te=pt,Ce=Ht*re,ce=Ht*te;ht.add(new go.PathSegment(go.PathSegment.Bezier,(St-re)*nt,bt*et,(St-(Ce+re)/2)*nt,(bt+(te+ce)/2)*et,(St-re)*nt,(bt+ce)*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,St*nt,(bt-te)*et,(St-re)*nt,(bt-ce)*et,(St-Ce)*nt,(bt-te)*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(St+re)*nt,bt*et,(St+Ce)*nt,(bt-te)*et,(St+re)*nt,(bt-ce)*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(St+re)*nt,(bt+ce)*et,(St+(Ce+re)/2)*nt,(bt+(te+ce)/2)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Qe=new go.PathFigure(.2*nt,et,!1);ut.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var je=new go.PathFigure(.8*nt,et,!1);return ut.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ut}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var ht=new go.PathFigure(.2*nt,.2*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ut}),go.Shape.defineFigureGenerator("BpmnEventError",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ut}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);ut.add(at);var ht=new go.PathFigure(nt,et,!1);ut.add(ht);var pt=new go.PathFigure(.1*nt,et,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ut}),go.Shape.defineFigureGenerator("Caution",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var ht=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-ht)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,ht*nt,ht*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ut}),go.Shape.defineFigureGenerator("Recycle",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),at.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),at.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var ht=new go.PathFigure(.475*nt,.2*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var pt=new go.PathFigure(.675*nt,.575*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ut}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*.5,pt=new go.PathFigure(nt,at*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+ht)*et,(at+ht)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-ht)*nt,et,0,(at+ht)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-ht)*et,(at-ht)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+ht)*nt,0,nt,(at-ht)*et));var St=new go.PathFigure(at*nt,0,!1);return ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,at*nt,.15*et)),St.add(new go.PathSegment(go.PathSegment.Move,at*nt,et)),St.add(new go.PathSegment(go.PathSegment.Line,at*nt,.85*et)),St.add(new go.PathSegment(go.PathSegment.Move,0,at*et)),St.add(new go.PathSegment(go.PathSegment.Line,.15*nt,at*et)),St.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),St.add(new go.PathSegment(go.PathSegment.Line,.85*nt,at*et)),St.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),St.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),St.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),St.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ut}),go.Shape.defineFigureGenerator("Package",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var ht=new go.PathFigure(0,.15*et,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ut.spot1=new go.Spot(0,.1),ut.spot2=new go.Spot(1,1),ut}),go.Shape.defineFigureGenerator("Class",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ht=new go.PathFigure(0,.2*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(0,.5*et,!1);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ut}),go.Shape.defineFigureGenerator("Component",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var ht=new go.PathFigure(0,.2*et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var pt=new go.PathFigure(0,.6*et,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ut}),go.Shape.defineFigureGenerator("Boat Shipment",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var ht=new go.PathFigure(.15*nt,.6*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ut}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ut}),go.Shape.defineFigureGenerator("Workcell",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ut}),go.Shape.defineFigureGenerator("Supermarket",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),ut}),go.Shape.defineFigureGenerator("TruckShipment",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ht=new go.PathFigure(nt,.8*et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var pt=.1,St=jt*.1,bt=.2,Ot=.9,Ht=new go.PathFigure((bt-pt)*nt,Ot*et,!0);ut.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-pt)*et,(bt-pt)*nt,(Ot-St)*et,(bt-St)*nt,(Ot-pt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Ot*et,(bt+St)*nt,(Ot-pt)*et,(bt+pt)*nt,(Ot-St)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot+pt)*et,(bt+pt)*nt,(Ot+St)*et,(bt+St)*nt,(Ot+pt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Ot*et,(bt-St)*nt,(Ot+pt)*et,(bt-pt)*nt,(Ot+St)*et).close()),pt=.1,St=jt*.1,bt=.8,Ot=.9;var Wt=new go.PathFigure((bt-pt)*nt,Ot*et,!0);return ut.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot-pt)*et,(bt-pt)*nt,(Ot-St)*et,(bt-St)*nt,(Ot-pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Ot*et,(bt+St)*nt,(Ot-pt)*et,(bt+pt)*nt,(Ot-St)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ot+pt)*et,(bt+pt)*nt,(Ot+St)*et,(bt+St)*nt,(Ot+pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Ot*et,(bt-St)*nt,(Ot+pt)*et,(bt-pt)*nt,(Ot+St)*et).close()),ut}),go.Shape.defineFigureGenerator("KanbanPost",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ut}),go.Shape.defineFigureGenerator("Forklift",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var ht=new go.PathFigure(0,.5*et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var pt=new go.PathFigure(.5*nt,.8*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var St=new go.PathFigure(.5*nt,.7*et,!1);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var bt=.1,Ot=jt*.1,Ht=.1,Wt=.9,re=new go.PathFigure((Ht-bt)*nt,Wt*et,!0);ut.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Wt-bt)*et,(Ht-bt)*nt,(Wt-Ot)*et,(Ht-Ot)*nt,(Wt-bt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+bt)*nt,Wt*et,(Ht+Ot)*nt,(Wt-bt)*et,(Ht+bt)*nt,(Wt-Ot)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Wt+bt)*et,(Ht+bt)*nt,(Wt+Ot)*et,(Ht+Ot)*nt,(Wt+bt)*et)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-bt)*nt,Wt*et,(Ht-Ot)*nt,(Wt+bt)*et,(Ht-bt)*nt,(Wt+Ot)*et)),bt=.1,Ot=jt*.1,Ht=.4,Wt=.9;var te=new go.PathFigure((Ht-bt)*nt,Wt*et,!0);return ut.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Wt-bt)*et,(Ht-bt)*nt,(Wt-Ot)*et,(Ht-Ot)*nt,(Wt-bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+bt)*nt,Wt*et,(Ht+Ot)*nt,(Wt-bt)*et,(Ht+bt)*nt,(Wt-Ot)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Wt+bt)*et,(Ht+bt)*nt,(Wt+Ot)*et,(Ht+Ot)*nt,(Wt+bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-bt)*nt,Wt*et,(Ht-Ot)*nt,(Wt+bt)*et,(Ht-bt)*nt,(Wt+Ot)*et)),ut}),go.Shape.defineFigureGenerator("RailShipment",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var ht=new go.PathFigure(.45*nt,.7*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var pt=new go.PathFigure(.55*nt,.4*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Ht=.05,Wt=jt*.05,re=.175,te=.95,St=new go.PathFigure((re-Ht)*nt,te*et,!0);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te-Ht)*et,(re-Ht)*nt,(te-Wt)*et,(re-Wt)*nt,(te-Ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(re+Ht)*nt,te*et,(re+Wt)*nt,(te-Ht)*et,(re+Ht)*nt,(te-Wt)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te+Ht)*et,(re+Ht)*nt,(te+Wt)*et,(re+Wt)*nt,(te+Ht)*et)),St.add(new go.PathSegment(go.PathSegment.Bezier,(re-Ht)*nt,te*et,(re-Wt)*nt,(te+Ht)*et,(re-Ht)*nt,(te+Wt)*et));var Ht=.05,Wt=jt*.05,re=.375,te=.95,bt=new go.PathFigure((re-Ht)*nt,te*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te-Ht)*et,(re-Ht)*nt,(te-Wt)*et,(re-Wt)*nt,(te-Ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(re+Ht)*nt,te*et,(re+Wt)*nt,(te-Ht)*et,(re+Ht)*nt,(te-Wt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te+Ht)*et,(re+Ht)*nt,(te+Wt)*et,(re+Wt)*nt,(te+Ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(re-Ht)*nt,te*et,(re-Wt)*nt,(te+Ht)*et,(re-Ht)*nt,(te+Wt)*et));var Ht=.05,Wt=jt*.05,re=.625,te=.95,Ot=new go.PathFigure((re-Ht)*nt,te*et,!0);ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te-Ht)*et,(re-Ht)*nt,(te-Wt)*et,(re-Wt)*nt,(te-Ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(re+Ht)*nt,te*et,(re+Wt)*nt,(te-Ht)*et,(re+Ht)*nt,(te-Wt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te+Ht)*et,(re+Ht)*nt,(te+Wt)*et,(re+Wt)*nt,(te+Ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(re-Ht)*nt,te*et,(re-Wt)*nt,(te+Ht)*et,(re-Ht)*nt,(te+Wt)*et));var Ht=.05,Wt=jt*.05,re=.825,te=.95,Ce=new go.PathFigure((re-Ht)*nt,te*et,!0);ut.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te-Ht)*et,(re-Ht)*nt,(te-Wt)*et,(re-Wt)*nt,(te-Ht)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(re+Ht)*nt,te*et,(re+Wt)*nt,(te-Ht)*et,(re+Ht)*nt,(te-Wt)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,re*nt,(te+Ht)*et,(re+Ht)*nt,(te+Wt)*et,(re+Wt)*nt,(te+Ht)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(re-Ht)*nt,te*et,(re-Wt)*nt,(te+Ht)*et,(re-Ht)*nt,(te+Wt)*et).close());var ce=new go.PathFigure(0,et,!1);return ut.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ut}),go.Shape.defineFigureGenerator("Warehouse",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ht=new go.PathFigure(0,.2*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(.15*nt,et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var St=.05,bt=jt*.05,Ot=.35,Ht=.775,Wt=new go.PathFigure((Ot-St)*nt,Ht*et,!0);return ut.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Ht-St)*et,(Ot-St)*nt,(Ht-bt)*et,(Ot-bt)*nt,(Ht-St)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+St)*nt,Ht*et,(Ot+bt)*nt,(Ht-St)*et,(Ot+St)*nt,(Ht-bt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Ht+St)*et,(Ot+St)*nt,(Ht+bt)*et,(Ot+bt)*nt,(Ht+St)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-St)*nt,Ht*et,(Ot-bt)*nt,(Ht+St)*et,(Ot-St)*nt,(Ht+bt)*et).close()),ut}),go.Shape.defineFigureGenerator("ControlCenter",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ut}),go.Shape.defineFigureGenerator("Bluetooth",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ut}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ut}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ut}),go.Shape.defineFigureGenerator("Globe",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ut}),go.Shape.defineFigureGenerator("Wave",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ut}),go.Shape.defineFigureGenerator("Operator",function(Dt,nt,et){var ut=new go.Geometry,at=.3,ht=jt*.3,pt=.5,St=.7,bt=new go.PathFigure((pt-at)*nt,St*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et));var Ot=new go.PathFigure(0,.7*et,!1);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ut}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ut}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt,0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ut}),go.Shape.defineFigureGenerator("Battery",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var ht=new go.PathFigure(0,.6*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ut}),go.Shape.defineFigureGenerator("Delete",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*.5,pt=.5,St=.5,bt=new go.PathFigure((pt-at)*nt,St*et,!0);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et));var Ot=new go.PathFigure(.15*nt,.5*et,!1);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ut}),go.Shape.defineFigureGenerator("Flag",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ut}),go.Shape.defineFigureGenerator("Help",function(Dt,nt,et){var ut=new go.Geometry,at=.5,ht=jt*.5,pt=.5,St=.5,bt=new go.PathFigure((pt-at)*nt,St*et,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et).close()),at=.05,ht=jt*.05,pt=.5,St=.8;var Ot=new go.PathFigure((pt-at)*nt,St*et,!1);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St-at)*et,(pt-at)*nt,(St-ht)*et,(pt-ht)*nt,(St-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,St*et,(pt+ht)*nt,(St-at)*et,(pt+at)*nt,(St-ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(St+at)*et,(pt+at)*nt,(St+ht)*et,(pt+ht)*nt,(St+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,St*et,(pt-ht)*nt,(St+at)*et,(pt-at)*nt,(St+ht)*et).close()),Ot.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ut}),go.Shape.defineFigureGenerator("Location",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var ht=new go.PathFigure(.2*nt,.5*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ut}),go.Shape.defineFigureGenerator("Unlocked",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var ht=new go.PathFigure(.2*nt,.5*et,!1);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ut}),go.Shape.defineFigureGenerator("Gear",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ut}),go.Shape.defineFigureGenerator("Map",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ut}),go.Shape.defineFigureGenerator("Eject",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var ht=new go.PathFigure(0,et*.6,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ut}),go.Shape.defineFigureGenerator("Pencil",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var ht=new go.PathFigure(.126*nt,.85*et,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),ht.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var pt=new go.PathFigure(.402*nt,.85*et,!1);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var St=new go.PathFigure(.678*nt,.85*et,!1);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),St.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),St.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var bt=new go.PathFigure(.5*nt,.1*et,!1);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),bt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ut}),go.Shape.defineFigureGenerator("Staircase",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ut}),go.Shape.defineFigureGenerator("5Bars",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,et*1,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var ht=new go.PathFigure(nt*.204,et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var pt=new go.PathFigure(nt*.408,et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var St=new go.PathFigure(nt*.612,et,!0);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),St.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),St.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var bt=new go.PathFigure(nt*.816,et,!0);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ut}),go.Shape.defineFigureGenerator("PC",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var ht=new go.PathFigure(nt*.055,.07*et,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var pt=new go.PathFigure(nt*.055,.13*et,!0);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var St=new go.PathFigure(nt*.055,.18*et,!0);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var bt=new go.PathFigure(nt*1,0,!0);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ut}),go.Shape.defineFigureGenerator("Plane",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ut}),go.Shape.defineFigureGenerator("Key",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ut}),go.Shape.defineFigureGenerator("FilmTape",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(0,0,!1);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var ht=new go.PathFigure(0,0,!1);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),ht.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var pt=new go.PathFigure(nt*.11,et*.1,!1);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var St=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),St.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var bt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ut}),go.Shape.defineFigureGenerator("FloppyDisk",function(Dt,nt,et){var ut=new go.Geometry,at=8,ht=at*jt,pt=new go.PathFigure(at,0,!1);ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ht,nt-ht,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ht,et,0,et-ht)),pt.add(new go.PathSegment(go.PathSegment.Line,0,at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,ht,ht,0).close());var St=new go.PathFigure(nt*.83,0,!1);ut.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var bt=new go.PathFigure(nt*.83,et*1,!1);ut.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Ot=new go.PathFigure(nt*.78,et*.05,!1);return ut.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ut}),go.Shape.defineFigureGenerator("SpeechBubble",function(Dt,nt,et){var ut=Dt?Dt.parameter1:NaN;(isNaN(ut)||ut<0)&&(ut=15),ut=Math.min(ut,nt/3),ut=Math.min(ut,et/3);var at=ut*jt,ht=et*.8,pt=new go.Geometry,St=new go.PathFigure(ut,0,!0);return pt.add(St),St.add(new go.PathSegment(go.PathSegment.Line,nt-ut,0)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt,ut,nt-at,0,nt,at)),St.add(new go.PathSegment(go.PathSegment.Line,nt,ht-ut)),St.add(new go.PathSegment(go.PathSegment.Bezier,nt-ut,ht,nt,ht-at,nt-at,ht)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.7,ht)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),St.add(new go.PathSegment(go.PathSegment.Line,nt*.55,ht)),St.add(new go.PathSegment(go.PathSegment.Line,ut,ht)),St.add(new go.PathSegment(go.PathSegment.Bezier,0,ht-ut,at,ht,0,ht-at)),St.add(new go.PathSegment(go.PathSegment.Line,0,ut)),St.add(new go.PathSegment(go.PathSegment.Bezier,ut,0,0,at,at,0).close()),at>1?(pt.spot1=new go.Spot(0,0,at,at),pt.spot2=new go.Spot(1,.8,-at,-at)):(pt.spot1=go.Spot.TopLeft,pt.spot2=new go.Spot(1,.8)),pt}),go.Shape.defineFigureGenerator("Repeat",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var ht=new go.PathFigure(nt*1,et*.55,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ut}),go.Shape.defineFigureGenerator("Windows",function(Dt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var ht=new go.PathFigure(nt*.1,et*.2,!0);ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var pt=new go.PathFigure(nt*.28,et*.37,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ut}),go.Shape.defineFigureGenerator("Beaker",function(Dt,nt,et){var ut=new go.Geometry,at=15,ht=at*jt,pt=new go.PathFigure(nt*.62,et*.475,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ht,nt-ht,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ht,et,0,et-ht)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),ht>1?(ut.spot1=new go.Spot(0,0,ht,ht),ut.spot2=new go.Spot(1,1,-ht,-ht)):(ut.spot1=go.Spot.TopLeft,ut.spot2=go.Spot.BottomRight),ut}),go.Shape.defineFigureGenerator("Download",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ut.add(at);var ht=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ht)).close());var pt=new go.PathFigure(nt*.4,et*0,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ut}),go.Shape.defineFigureGenerator("Bin",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ut.add(at);var ht=.1/.3;return at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ht)).close()),ut}),go.Shape.defineFigureGenerator("Upload",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);ut.add(at);var ht=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ht))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-ht)).close());var pt=new go.PathFigure(nt*.5,et*0,!0);return ut.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ut}),go.Shape.defineFigureGenerator("EmptyDrink",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ut}),go.Shape.defineFigureGenerator("Drink",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var ht=new go.PathFigure(nt*.235,et*.28,!0);return ut.add(ht),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),ht.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ut}),go.Shape.defineFigureGenerator("4Arrows",function(Dt,nt,et){var ut=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return ut.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),ut}),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")},61016: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={},ze="5.0",Qt={},xt=null,Yt=!1,he=!1,xe=null,ge=!1,Ut=null,jt=null,ne=0;ne<arguments.length;ne++){var Ae=arguments[ne];if(Ae!==null)switch(typeof Ae){case"number":ze=Ae.toFixed(1);break;case"string":Ae.match(new RegExp("^[0-9]\\.[0-9]+$"))?ze=Ae:xe=Ae;break;case"object":typeof Ae.is3D!="undefined"?xt=Ae:Qt=Ae;break;case"boolean":Yt=Ae,he=!0;break}}xt===null&&(xt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Qt.material_id!==void 0&&!he&&(Yt=!0)),xe!==null&&Qt.id===void 0&&(Qt.id=xe);var se="",ke="",de=!1,Ie=null,Dt=null,nt=null,et=!1,ut=null,at=null,ht=null,pt=null,St=null;Qt.height!==void 0&&(Qt.height=Math.round(Qt.height)),Qt.width!==void 0&&(Qt.width=Math.round(Qt.width));var bt=function(Ve){return parseFloat(Ve)>4?parseFloat(Ve):5};gn.setHTML5Codebase=function(Ve,In){jt=Ve,We(Ve,In)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(Ve,In){var Hn=parseFloat(Ve);if(Hn!==NaN&&Hn<5){console.log("The GeoGebra HTML5 codebase version "+Hn+" is deprecated. Using version latest instead.");return}Ut=Ve,zt(Ve,In)},gn.getHTML5CodebaseVersion=function(){return Dt},gn.getParameters=function(){return Qt},gn.setFontsCSSURL=function(Ve){pt=Ve},gn.setGiacJSURL=function(Ve){},gn.setJNLPFile=function(Ve){se=Ve},gn.setJNLPBaseDir=function(Ve){},gn.inject=function(){function Ve(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var In="auto",Hn=Qt.id,li,tn=!1,Me=0;Me<arguments.length;Me++){var rn=arguments[Me];typeof rn=="string"?(rn=rn.toLowerCase(),rn.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?In=rn:Hn=arguments[Me]):typeof rn=="boolean"?tn=rn:rn instanceof HTMLElement&&(li=rn)}Dn();function Dn(){if(!ge){setTimeout(Dn,200);return}In=di(In);var sn=li||document.getElementById(Hn);if(!sn){console.log("possibly bug on ajax loading? ");return}if(gn.removeExistingApplet(sn,!1),Qt.width===void 0&&sn.clientWidth&&(Qt.width=sn.clientWidth),Qt.height===void 0&&sn.clientHeight&&(Qt.height=sn.clientHeight),!(Qt.width&&Qt.height)&&In==="html5"&&(delete Qt.width,delete Qt.height),Ie=In,In==="screenshot")je(sn,Qt);else{var Vt=!1;Qt.hasOwnProperty("playButton")&&Qt.playButton||Qt.hasOwnProperty("clickToLoad")&&Qt.clickToLoad?Vt=!0:Qt.hasOwnProperty("playButtonAutoDecide")&&Qt.playButtonAutoDecide&&(Vt=(!Ot()||Ve())&&Ht()),Vt?(Ie="screenshot",Qn(sn,Qt,tn,In)):Qe(sn,Qt,tn)}}};function Ot(){try{return window.self!==window.top}catch(Ve){return!0}}function Ht(){return Qt.hasOwnProperty("screenshotGenerator")&&Qt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return xt},gn.isJavaInstalled=function(){return!1};var Wt=function(Ve){var In=function(Me){var rn=JSON.parse(Me),Dn=function(Pt){return Pt.type=="G"||Pt.type=="E"},sn=rn.elements?rn.elements.filter(Dn)[0]:rn;if(!sn||!sn.url){Hn();return}Qt.fileName=sn.url,re(sn.settings||{}),xt.is3D=!0;var Vt="https://www.geogebra.org/images/";gn.setPreviewImage(ut||sn.previewUrl,Vt+"GeoGebra_loading.png",Vt+"applet_play.png"),Ve()},Hn=function(){Qt.onError&&Qt.onError(),En("Error: Fetching material (id "+Qt.material_id+") failed.",Qt)},li=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",tn="/materials/"+Qt.material_id+"?scope=basic";te("https://"+li+"/api/proxy.php?path="+encodeURIComponent(tn),In,Hn)};function re(Ve){var In=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Hn){Ve[Hn]=!!Ve[Hn]}),In.forEach(function(Hn){Qt[Hn]===void 0&&Ve[Hn]!==void 0&&(Qt[Hn]=Ve[Hn])}),Qt.showToolBarHelp===void 0&&(Qt.showToolBarHelp=Qt.showToolBar)}function te(Ve,In,Hn){var li=new XMLHttpRequest;li.open("GET",Ve),li.onload=function(){In(li.responseText)},li.onerror=Hn,li.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return Ie},gn.setPreviewImage=function(Ve,In,Hn){ut=Ve,at=In,ht=Hn},gn.removeExistingApplet=function(Ve,In){var Hn;typeof Ve=="string"&&(Ve=document.getElementById(Ve)),Ie=null;var li=null;for(Hn=0;Hn<Ve.childNodes.length;Hn++){var tn=Ve.childNodes[Hn],Me=tn.className;Me==="applet_screenshot"?In?(tn.style.display="block",Ie="screenshot"):tn.style.display="none":Me!=="applet_scaler prerender"&&(Ve.removeChild(tn),li=Me&&Me.indexOf("appletParameters")!=-1?tn.id:null,Hn--)}var rn=Qt.id!==void 0?Qt.id:li,Dn=window[rn];Dn&&typeof Dn.getBase64=="function"&&(Dn.remove(),window[rn]=null)},gn.refreshHitPoints=function(){if(bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ve=gn.getAppletObject();return Ve&&typeof Ve.recalculateEnvironments=="function"?(Ve.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var Ve=gn.getAppletObject();return Ve&&typeof Ve.startAnimation=="function"?(Ve.startAnimation(),!0):!1},gn.stopAnimation=function(){var Ve=gn.getAppletObject();return Ve&&typeof Ve.stopAnimation=="function"?(Ve.stopAnimation(),!0):!1},gn.getAppletObject=function(){var Ve=Qt.id!==void 0?Qt.id:"ggbApplet";return window[Ve]},gn.resize=function(){};var Ce=function(Ve,In,Hn){var li=document.createElement("param");li.setAttribute("name",In),li.setAttribute("value",Hn),Ve.appendChild(li)},ce=function(Ve){return Ve&&Ve!=="false"},Qe=function(Ve,In,Hn){bt(Dt)<=4.2&&(Hn=!0);var li=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Dt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(li=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var tn=document.createElement("div");tn.classList.add("appletParameters","notranslate");var Me=In.width,rn=In.height;if(In.disableAutoScale=In.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():In.disableAutoScale,In.width!==void 0)if(bt(Dt)<=4.4)ce(In.showToolBar)&&(In.height-=7),ce(In.showAlgebraInput)&&(In.height-=37),In.width<605&&ce(In.showToolBar)&&(In.width=605,Me=605);else{var Dn=100;(ce(In.showToolBar)||ce(In.showMenuBar))&&(In.hasOwnProperty("customToolBar")&&(In.customToolbar=In.customToolBar),Dn=ce(In.showMenuBar)?245:155),Me<Dn&&(In.width=Dn,Me=Dn)}tn.style.border="none",tn.style.display="inline-block";for(var sn in In)In.hasOwnProperty(sn)&&sn!=="appletOnLoad"&&tn.setAttribute("data-param-"+sn,In[sn]);pt&&tn.setAttribute("data-param-fontscssurl",pt),gn.resize=function(){GGBAppletUtils.responsiveResize(Ve,In)},window.addEventListener("resize",function(Re){gn.resize()});var Vt=typeof In.appletOnLoad=="function"?In.appletOnLoad:function(){};if(!Hn&&In.width!==void 0){In.hasOwnProperty("showSplash")||tn.setAttribute("data-param-showSplash","false");var Pt=Ve.querySelector(".applet_scaler.prerender"),mt=Pt!==null;if(mt)var vt=Pt.querySelector(".ggb_preview");else{var vt=Yn(Me,rn,In.borderColor,!1);Pt=document.createElement("div"),Pt.className="applet_scaler",Pt.style.position="relative",Pt.style.display="block",Pt.style.width=Me+"px",Pt.style.height=rn+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Pt,"66%"),bt(Dt)>=5?(In.appletOnLoad=function(Re){var Mn=Ve.querySelector(".ggb_preview");Mn&&Mn.parentNode.removeChild(Mn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Pt),window.GGBT_wsf_view&&$(window).trigger("resize"),Vt(Re)},mt||Pt.appendChild(vt)):tn.appendChild(vt),Pt.appendChild(tn),mt||Ve.appendChild(Pt),setTimeout(function(){gn.resize()},1)}else{var kt=document.createElement("div");kt.className="applet_scaler",kt.style.position="relative",kt.style.display="block",kt.appendChild(tn),Ve.appendChild(kt),In.appletOnLoad=function(Re){gn.resize(),Vt(Re)}}function Lt(Re,Mn){Mn&&typeof Mn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Re,Mn.appletOnLoad):renderGGBElement(Re),En("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Mn)}function _t(Re,Mn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Re,params:Mn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Kn){Lt(Kn.article,Kn.params)}),html5AppletsToProcess=null)},bt(Dt)<5&&(Re.className+=" geogebraweb")):Lt(Re,Mn)}if(li){scriptLoadStarted=!0;for(var De=0;De<tn.childNodes.length;De++){var on=tn.childNodes[De].tagName;on==="TABLE"&&(tn.removeChild(tn.childNodes[De]),De--)}if(ggbHTML5LoadedScript!==null){var mn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');mn!=null&&mn.parentNode.removeChild(mn)}var $e=document.createElement("script"),Bn=function(){_t(tn,In)};$e.src=ke+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=Dt,ggbHTML5LoadedScript=$e.src,En("GeoGebra HTML5 codebase loaded: '"+ke+"'.",In),!jt&&(!Ut||Ut=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Bn()):ke.requirejs?__webpack_require__.e(12).then(function(){var Re=[__webpack_require__(12)];Bn.apply(null,Re)}.bind(this)).catch(__webpack_require__.oe):($e.onload=Bn,Ve.appendChild($e))}else _t(tn,In);In.height=rn,In.width=Me},je=function(Ve,In,Hn){var li=Yn(In.width,In.height,In.borderColor,Hn),tn=document.createElement("div");tn.style.position="relative",tn.style.display="block",tn.style.width=In.width+"px",tn.style.height=In.height+"px",tn.className="applet_screenshot applet_scaler"+(Hn?" applet_screenshot_play":""),tn.appendChild(li);var Me=GGBAppletUtils.getScale(In,Ve,Hn);Hn?(Ve.appendChild(Gn()),window.GGBT_wsf_view||(Ve.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(tn,"66%"),Ve.appendChild(tn),Me!==1&&!isNaN(Me)&&(GGBAppletUtils.scaleElement(tn,Me),tn.style.width=In.width+"px",tn.style.height=In.height+"px",tn.parentNode.style.width=In.width*Me+"px",tn.parentNode.style.height=In.height*Me+"px"),gn.resize=function(){He(Ve,li,tn,Hn)},window.addEventListener("resize",function(rn){gn.resize()}),gn.resize()};function He(Ve,In,Hn,li){if(Ve.contains(In)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ve.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ve)}var tn=GGBAppletUtils.getScale(Qt,Ve,li);Hn.parentNode!==null&&(!isNaN(tn)&&tn!==1?(GGBAppletUtils.scaleElement(Hn,tn),Hn.parentNode.style.width=Qt.width*tn+"px",Hn.parentNode.style.height=Qt.height*tn+"px"):(GGBAppletUtils.scaleElement(Hn,1),Hn.parentNode.style.width=Qt.width+"px",Hn.parentNode.style.height=Qt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ve),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(Ve,In){In.appendChild(Ve)};var Qn=function(Ve,In,Hn,li){je(Ve,In,!0);for(var tn=function(){var Dn=[];for(rn=0;rn<Ve.childNodes.length;rn++)Dn.push(Ve.childNodes[rn]);if(window.GGBT_wsf_view){var sn=window.GGBT_wsf_view.renderFullScreen(Ve,In.id),Vt=document.getElementById("fullscreencontainer"),Pt=jQuery(Ve).find(".fullscreencontent");Pt.length>0?(sn.remove(),Pt.attr("id","fullscreencontent").show(),jQuery(Vt).append(Pt),window.dispatchEvent(new Event("resize"))):Qe(sn,In,!1),window.GGBT_wsf_view.launchFullScreen(Vt)}else Ie=li,Qe(Ve,In,!1);if(!window.GGBT_wsf_view)for(rn=0;rn<Dn.length;rn++)Ve.removeChild(Dn[rn])},Me=Ve.getElementsByClassName("ggb_preview_play"),rn=0;rn<Me.length;rn++)Me[rn].addEventListener("click",tn,!1),Me[rn].addEventListener("ontouchstart",tn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ve),Ht()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Gn=function(){var Ve=document.createElement("div");if(Ve.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var In='.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");}',Hn=document.createElement("style");Hn.styleSheet?Hn.styleSheet.cssText=In:Hn.appendChild(document.createTextNode(In)),document.getElementsByTagName("head")[0].appendChild(Hn)}return Ve},Yn=function(Ve,In,Hn,li){var tn=document.createElement("div");tn.className="ggb_preview",tn.style.position="absolute",tn.style.zIndex="90",tn.style.width=Ve-2+"px",tn.style.height=In-2+"px",tn.style.top="0px",tn.style.left="0px",tn.style.overflow="hidden",tn.style.backgroundColor="white";var Me="lightgrey";Hn!==void 0&&(Hn==="none"?Me="transparent":Me=Hn),tn.style.border="1px solid "+Me;var rn=document.createElement("img");if(rn.style.position="relative",rn.style.zIndex="1000",rn.style.top="-1px",rn.style.left="-1px",ut!==null&&rn.setAttribute("src",ut),rn.style.opacity=.7,at!==null){var Dn,sn,Vt;if(!li){Dn=document.createElement("img"),Dn.style.position="absolute",Dn.style.zIndex="1001",Dn.style.opacity=1,rn.style.opacity=.3,sn=360,sn>Ve/4*3&&(sn=Ve/4*3),Vt=sn/5.8,Dn.setAttribute("src",at),Dn.setAttribute("width",sn),Dn.setAttribute("height",Vt);var Pt=(Ve-sn)/2,mt=(In-Vt)/2;Dn.style.left=Pt+"px",Dn.style.top=mt+"px",tn.appendChild(Dn)}}return tn.appendChild(rn),tn},di=function(Ve){return Ve=Ve.toLowerCase(),Ve==="html5"||Ve==="screenshot"?Ve:"html5"},ie=["web","webSimple","web3d","tablet","tablet3d","phone"],zt=function(Ve,In){if(Dt=Ve,In){We(Dt,!0);return}var Hn=!Yt;if(Hn){var li=bt(Dt);!isNaN(li)&&li<4.4&&(Hn=!1)}var tn,Me;window.location.protocol.substr(0,4)==="http"?tn=window.location.protocol:tn="http:";var rn=Dt.indexOf("//");rn>0?Me=Dt:rn===0?Me=tn+Dt:Me="https://www.geogebra.org/apps/5.2.814.0/";for(var Dn in ie)if(Dt.slice(ie[Dn].length*-1)===ie[Dn]||Dt.slice((ie[Dn].length+1)*-1)===ie[Dn]+"/"){We(Me,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Hn&&!xt.is3D&&!xt.AV&&!xt.SV&&!xt.CV&&!xt.EV2&&!xt.CP&&!xt.PC&&!xt.DA&&!xt.FI&&!xt.PV&&!ce(Qt.showToolBar)&&!ce(Qt.showMenuBar)&&!ce(Qt.showAlgebraInput)&&!ce(Qt.enableRightClick)&&(!Qt.appName||Qt.appName=="classic")?Me+="webSimple/":Me+="web3d/",We(Me,!1)},We=function(Ve,In){if(Ve.requirejs){ke=Ve;return}Ve.slice(-1)!=="/"&&(Ve+="/"),ke=Ve,In===null&&(In=Ve.indexOf("http")===-1),de=In,nt="web.nocache.js",et=!1;var Hn=ke.split("/");Hn.length>1&&(!In&&Hn[Hn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):ie.indexOf(Hn[Hn.length-2])>=0&&(nt=Hn[Hn.length-2]+".nocache.js")),Hn=Ve.split("/"),Dt=Hn[Hn.length-3],Dt.substr(0,4)==="test"?Dt=Dt.substr(4,1)+"."+Dt.substr(5,1):(Dt.substr(0,3)==="war"||Dt.substr(0,4)==="beta")&&(Dt="5.0");var li=parseFloat(Dt);li!==NaN&&li<5&&Ve.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+li+" is deprecated. Using version latest instead."),zt("5.0",In))},En=function(Ve,In){window.console&&window.console.log&&(!In||typeof In.showLogging=="undefined"||In.showLogging&&In.showLogging!=="false")&&console.log(Ve)};Qt.material_id!==void 0?Wt(Xn):Xn();function Xn(){var Ve=ze;Ut!==null?Ve=Ut:parseFloat(Ve)<5&&(Ve="5.0"),zt(Ve,!1),jt!==null&&We(jt,de),ge=!0}return gn},GGBAppletUtils=function(){"use strict";function gn(){return window.GGBT_wsf_edit!==void 0}function ze(ge,Ut){Ut!=1?(ge.style.transformOrigin="0% 0% 0px",ge.style.webkitTransformOrigin="0% 0% 0px",ge.style.transform="scale("+Ut+","+Ut+")",ge.style.webkitTransform="scale("+Ut+","+Ut+")",ge.style.maxWidth="initial",ge.querySelector(".ggb_preview")!==null&&(ge.querySelector(".ggb_preview").style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ge.style.transform="none",ge.style.webkitTransform="none")}function Qt(ge,Ut,jt,ne,Ae,se){var ke=null;if(se!=null&&se!="")for(var de=ge.parentNode;de!=null;)if((" "+de.className+" ").indexOf(" "+se+" ")>-1){ke=de;break}else de=de.parentNode;var Ie=0,Dt=0,nt=0,et=0,ut=0,at=0,ht=0;if(ke)Ie=ke.offsetWidth,Dt=Math.max(ne?ke.offsetWidth:0,ke.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ie=Math.min(window.innerWidth,document.documentElement.clientWidth),Dt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Ie):(Ie=window.innerWidth,Dt=window.innerHeight,nt=window.innerWidth),ge){var pt=ge.getBoundingClientRect();pt.left>0&&pt.left<=Ie&&(Ae===void 0||!Ae)&&(document.dir==="rtl"?(ut=Ie-pt.width-pt.left,at=nt<=480?10:30):(at=pt.left,ut=nt<=480?10:30),et=at+ut)}if(ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var St=ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,ht=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,ht=40)}}return ge&&((jt===void 0||!jt)&&Ut>0&&Ut+et<Ie?Ie=Ut:Ie-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(jt===void 0||!jt)&&(Dt-=ht)),{width:Ie,height:Dt}}function xt(ge,Ut,jt,ne,Ae){if(ge.isScreenshoGenerator)return 1;var se=ne!==void 0&&ne,ke=ge.noScaleMargin!=null&&ge.noScaleMargin,de=function(St){return St&&St!=="false"},Ie=de(ge.autoHeight),Dt=Qt(Ut,ge.width,jt,Ie,se&&window.GGBT_wsf_view||ke,Ae),nt=parseInt(Dt.width),et=ge.width,ut=ge.height;if(et===void 0){var at=Ut.querySelector(".appletParameters");at&&(et=at.offsetWidth,ut=at.offsetHeight)}var ht=nt/et,pt=se?1:Dt.height/ut;return jt!==void 0&&!jt&&(ht=Math.min(1,ht),pt=Math.min(1,pt)),Math.min(ht,pt)}function Yt(ge,Ut,jt){var ne=1,Ae,se=!1;if(ge.hasOwnProperty("allowUpscale")&&(se=ge.allowUpscale),ge.hasOwnProperty("scale")&&(ne=parseFloat(ge.scale),(isNaN(ne)||ne===null||ne===0)&&(ne=1),ne>1&&(se=!0)),Ut&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(se=!0),!(ge.hasOwnProperty("disableAutoScale")&&ge.disableAutoScale))Ae=xt(ge,Ut,se,jt,ge.scaleContainerClass);else return ne;return se&&(!ge.hasOwnProperty("scale")||ne===1)?Ae:Math.min(ne,Ae)}function he(ge){var Ut=Math.min(window.innerWidth,document.documentElement.clientWidth),jt=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=ge.getBoundingClientRect(),Ae=(Ut-ne.width)/2,se=(jt-ne.height)/2;se<0&&(se=0),ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ae<40?ge.style.left="40px":ge.style.left=Ae+"px",ge.style.top=se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(se<40?ge.style.top="40px":ge.style.top=se+"px",ge.style.left=Ae+"px")}function xe(ge,Ut){var jt=ge.querySelector(".appletParameters");if(jt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ut.id!==jt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ge)}if(jt.parentElement&&/fullscreen/.test(jt.parentElement.className))return;var ne=Yt(Ut,ge);gn()&&jt.setAttribute("data-param-scale",ne);for(var Ae=null,se=0;se<ge.childNodes.length;se++)if(ge.childNodes[se].className!==void 0&&ge.childNodes[se].className.match(/^applet_scaler/)){Ae=ge.childNodes[se];break}if(Ae!==null&&Ae.querySelector(".noscale")!==null)return;var ke=Ut.id!==void 0?Ut.id:"ggbApplet",de=window[ke];(de==null||!de.recalculateEnvironments)&&Ae!==null&&!Ae.className.match(/fullscreen/)&&(Ae.parentNode.style.transform="",!isNaN(ne)&&ne!==1?(Ae.parentNode.style.width=Ut.width*ne+"px",Ae.parentNode.style.height=Ut.height*ne+"px",ze(Ae,ne)):(ze(Ae,1),Ae.parentNode.style.width=Ut.width+"px",Ae.parentNode.style.height=Ut.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&he(ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(jt).parents(".content-added-content"))}}return{responsiveResize:xe,isFlexibleWorksheetEditor:gn,positionCenter:he,getScale:Yt,scaleElement:ze}}();__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,ze){}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 ze=s[L].bindings;s[L].bindings=function(){for(var Qt=ze?ze():{},xt=gn[webModule.__softPermutationId],Yt=O;Yt<xt.length;Yt++){var he=xt[Yt];Qt[he[O]]=he[P]}return Qt}};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 ze=document.compatMode==U?V:W;t.write(ze+X),t.close()}}}function w(gn){function ze(xt){function Yt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var he=Yt();if(he){xt();return}function xe(){if(!he){if(!Yt())return;he=!0,xt(),o.removeEventListener&&o.removeEventListener(Z,xe,!1),ge&&clearInterval(ge)}}o.addEventListener&&o.addEventListener(Z,xe,!1);var ge=setInterval(function(){xe()},$)}function Qt(xt){var Yt=u(),he=Yt.body,xe=Yt.createElement(_);xe.language=ab,xe.crossOrigin=W,xe.src=xt,webModule.__errFn&&(xe.onerror=function(){webModule.__errFn(L,new Error(bb+xt))}),he.appendChild(xe)}ze(function(){Qt(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var ze=u(),Qt=ze.body,xt=ze.createElement(_);xt.language=ab,xt.text=gn,Qt.appendChild(xt),Qt.removeChild(xt)};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 ze=c[gn];return ze==null?null:ze},r=d,webModule.__errFn=e}function B(){function gn(ge){var Ut=ge.lastIndexOf(rb);Ut==-1&&(Ut=ge.length);var jt=ge.indexOf(sb);jt==-1&&(jt=ge.length);var ne=ge.lastIndexOf(tb,Math.min(jt,Ut));return ne>=O?ge.substring(O,ne+P):W}function ze(ge){if(!ge.match(/^\w+:\/\//)){var Ut=o.createElement(ub);Ut.src=ge+vb,ge=gn(Ut.src)}return ge}function Qt(){var ge=__gwt_getMetaProperty(wb);return ge!=null?ge:W}function xt(){for(var ge=o.getElementsByTagName(_),Ut=O;Ut<ge.length;++Ut)if(ge[Ut].src.indexOf(xb)!=-1)return gn(ge[Ut].src);return W}function Yt(){var ge=o.getElementsByTagName(yb);return ge.length>O?ge[ge.length-P].href:W}function he(){var ge=o.location;return ge.href==ge.protocol+zb+ge.host+ge.pathname+ge.search+ge.hash}var xe=Qt();return xe==W&&(xe=xt()),xe==W&&(xe=Yt()),xe==W&&he()&&(xe=gn(o.location.href)),xe=ze(xe),xe}function C(gn){return gn.match(/^\//)||gn.match(/^[a-zA-Z]+:\/\//)?gn:webModule.__moduleBase+gn}function D(){var gn=[],ze=O,Qt=[],xt=[];function Yt(ge){var Ut=xt[ge](),jt=Qt[ge];if(Ut in jt)return Ut;var ne=[];for(var Ae in jt)ne[jt[Ae]]=Ae;throw r&&r(ge,ne,Ut),null}if(__gwt_isKnownPropertyValue=function(ge,Ut){return Ut in Qt[ge]},webModule.__getPropMap=function(){var ge={};for(var Ut in Qt)Qt.hasOwnProperty(Ut)&&(ge[Ut]=Yt(Ut));return ge},webModule.__computePropValue=Yt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var he;try{he=Cb;var xe=he.indexOf(Db);xe!=-1&&(ze=parseInt(he.substring(xe+P),$),he=he.substring(O,xe))}catch(ge){}return webModule.__softPermutationId=ze,C(he+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})()},15476:function(gn,ze,Qt){"use strict";Qt.d(ze,{Ax:function(){return xe},Ds:function(){return ge},KI:function(){return jt},SI:function(){return he},f1:function(){return Yt}});var xt=Qt(11320);function Yt(ne){let Ae=!0;if(ne.length>0){for(let se=0;se<ne.length;se++)if(ne[se].compile_success==0||!ne[se].compile_success){Ae=!1;break}}else Ae=!1;return Ae}function he(ne,Ae=""){let se=[];for(let ke=0;ke<ne.length;ke++){let de=ne[ke],Ie=Ae?`${Ae}/${de.name}`:`${de.name}`;se.push({title:de.name,type:de.type,isLeaf:de.type!=="tree",key:Ie})}return se}function xe(ne,Ae,se){for(let ke=0;ke<ne.length;ke++){let de=ne[ke];if(de.key===Ae){de.children=se;break}de.children&&xe(de.children,Ae,se)}return ne}function ge(ne,Ae,se){let ke;return function(){let de=this,Ie=arguments,Dt=function(){ke=null,se||ne.apply(de,Ie)},nt=se&&!ke;clearTimeout(ke),ke=setTimeout(Dt,Ae),nt&&ne.apply(de,Ie)}}const Ut=!0,jt=xt.Z.API_SERVER},446:function(gn,ze,Qt){"use strict";Qt.d(ze,{ij:function(){return ht},_s:function(){return at},Uf:function(){return ut},ZP:function(){return St}});var xt=Qt(67294),Yt={flex_box_center:"flex_box_center___swvFl",flex_space_between:"flex_space_between___AqPFV",flex_box_vertical_center:"flex_box_vertical_center___XWInJ",flex_box_center_end:"flex_box_center_end___GB61t",flex_box_column:"flex_box_column___dJnz1",analysis:"analysis___xyV_c",title:"title___DQ3VK",itemWrap:"itemWrap___vFE5r",item:"item___NjeOt",list:"list___BbMrm",wrap:"wrap___UQTTb",img:"img___tNvUo",tips:"tips___Eu4wH",footer:"footer___ZbR9W",noData:"noData___mLlw0"},he=Qt(94184),xe=Qt.n(he),ge=Qt(50976),Ut=Qt(83062),jt=Qt(48054),ne=Qt(74330),Ae=Qt(26194),se=Qt(11320),ke=Object.defineProperty,de=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,nt=(bt,Ot,Ht)=>Ot in bt?ke(bt,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):bt[Ot]=Ht,et=(bt,Ot)=>{for(var Ht in Ot||(Ot={}))Ie.call(Ot,Ht)&&nt(bt,Ht,Ot[Ht]);if(de)for(var Ht of de(Ot))Dt.call(Ot,Ht)&&nt(bt,Ht,Ot[Ht]);return bt};const ut=(bt={})=>{var Ot,Ht,Wt,re;let te=(Ot=bt==null?void 0:bt.emotion)==null?void 0:Ot.map(je=>et({value:je==null?void 0:je.rate},je)),Ce=(Ht=bt==null?void 0:bt.focus)==null?void 0:Ht.map(je=>et({value:je==null?void 0:je.rate},je)),ce=(Wt=bt==null?void 0:bt.action)==null?void 0:Wt.map(je=>et({value:je==null?void 0:je.rate},je)),Qe=(re=bt==null?void 0:bt.intention)==null?void 0:re.map(je=>et({value:je==null?void 0:je.rate},je));return[{title:"\u8868\u60C5\u5360\u6BD4",color:["#f7ca2e","#4ccf71","#3791ee","#f9ac95","#4f74ee","#f0e999"],data:te||[]},{title:"\u4E13\u6CE8\u5EA6\u5360\u6BD4",color:["#4f74ee","#f9ac95","#9cb5fe","#eaa170","#3791ee","#a39bed"],data:Ce||[]},{title:"\u884C\u4E3A\u5360\u6BD4\u60C5\u51B5",color:["#5eca9c","#a39bed","#f68238","#f0e999","#eaa170","#f9ac95"],data:ce||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:Qe||[]}]},at=({className:bt,dataSource:Ot=[],col:Ht=4,right:Wt,bottom:re=23,precision:te=0,wrapWidth:Ce=1200})=>{const ce=(je="",He,Qn="--")=>je?(je==null?void 0:je.length)>He?(je==null?void 0:je.slice(0,He-1))+"...":je:Qn,Qe=Math.floor((Ce-(Ht-1)*Wt)/Ht);return xt.createElement("div",{className:xe()(Yt.list,bt)},!!(Ot!=null&&Ot.length)&&(Ot==null?void 0:Ot.map((je,He)=>{const{cover_pic:Qn,created_at:Gn,emotion:Yn,action:di,intention:ie,focus:zt}=je;return xt.createElement("div",{key:He,className:Yt.wrap,style:{width:Qe,marginRight:(1+He)%Ht===0?0:Wt+te,marginBottom:re}},xt.createElement("div",{className:Yt.img},xt.createElement("img",{src:`${se.Z.API_SERVER}${Qn}`}),xt.createElement("div",{className:Yt.tips},xt.createElement("div",null,xt.createElement("i",{className:"iconfont icon-paisheshijian mr5 font14"})," \u62CD\u6444\u65F6\u95F4"),xt.createElement("span",null,Gn))),xt.createElement("div",{className:Yt.footer},xt.createElement("ul",null,xt.createElement("li",null,xt.createElement("i",{className:"iconfont icon-biaoqing"}),xt.createElement("span",null,"\u8868\u60C5\uFF1A",xt.createElement(Ut.Z,{title:Yn},xt.createElement("span",{className:"c-grey-333"},ce(Yn,4))))),xt.createElement("li",null,xt.createElement("i",{className:"iconfont icon-hangwei"}),xt.createElement("span",null,"\u884C\u4E3A\uFF1A",xt.createElement(Ut.Z,{title:di},xt.createElement("span",{className:"c-grey-333"},ce(di,4)))))),xt.createElement("ul",null,xt.createElement("li",null,xt.createElement("i",{className:"iconfont icon-yitu"}),xt.createElement("span",null,"\u610F\u56FE\uFF1A",xt.createElement(Ut.Z,{title:ie},xt.createElement("span",{className:"c-grey-333"},ce(ie,4))))),xt.createElement("li",null,xt.createElement("i",{className:"iconfont icon-zhuangtai"}),xt.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",xt.createElement(Ut.Z,{title:zt},xt.createElement("span",{className:"c-grey-333"},ce(zt,3))))))))})))},ht=({className:bt,style:Ot,title:Ht,hideBar:Wt=!1,children:re,customText:te="",noDataText:Ce="",emptyData:ce=[],loading:Qe,actionAnalysis:je})=>{var He,Qn;const Gn=((He=ce==null?void 0:ce[0])==null?void 0:He.every(di=>{var ie;return!((ie=di==null?void 0:di.data)!=null&&ie.length)}))&&!((Qn=ce==null?void 0:ce[1])!=null&&Qn.length)||!je,Yn=je?Ce:te;return xt.createElement(jt.Z,{loading:Qe,active:!0},Gn&&xt.createElement("div",{className:xe()(Yt.noData,bt),style:Ot},!!Ht&&xt.createElement("div",{className:Yt.title},!Wt&&xt.createElement("b",null),xt.createElement("span",null,Ht)),xt.createElement("div",{className:Yt.itemWrap},xt.createElement(Ae.Z,{customText:Yn}))),!Gn&&re)};var St=({className:bt,style:Ot,data:Ht=[],title:Wt,hideBar:re=!1,loading:te=!1})=>xt.createElement("div",{className:xe()(Yt.analysis,bt),style:Ot},!!Wt&&xt.createElement("div",{className:Yt.title},!re&&xt.createElement("b",null),xt.createElement("span",null,Wt)),xt.createElement(ne.Z,{spinning:te},xt.createElement("div",{className:Yt.itemWrap},Ht==null?void 0:Ht.map((Ce,ce)=>xt.createElement("div",{className:Yt.item,key:ce},xt.createElement(ge.Z,{option:{tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c}%"},title:{left:"center",bottom:15,text:Ce==null?void 0:Ce.title},legend:{top:10,right:10,orient:"vertical",show:!0,align:"left",icon:"circle",itemWidth:10,itemHeight:10,formatter:function(Qe){for(let je in Ce==null?void 0:Ce.data)if(Qe==(Ce==null?void 0:Ce.data[je].name))return Qe+" "+(Ce==null?void 0:Ce.data[je].value)+"%"},textStyle:{color:"#767676",fontSize:12}},color:Ce==null?void 0:Ce.color,series:[{type:"pie",radius:["20%","35%"],center:["20%","40%"],avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},data:Ce==null?void 0:Ce.data}]},style:{height:145}}))))))},56243:function(gn,ze,Qt){"use strict";var xt=Qt(17187),Yt=Qt.n(xt),he=Object.defineProperty,xe=(ne,Ae,se)=>Ae in ne?he(ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[Ae]=se,ge=(ne,Ae,se)=>xe(ne,typeof Ae!="symbol"?Ae+"":Ae,se),Ut=(ne,Ae,se)=>new Promise((ke,de)=>{var Ie=et=>{try{nt(se.next(et))}catch(ut){de(ut)}},Dt=et=>{try{nt(se.throw(et))}catch(ut){de(ut)}},nt=et=>et.done?ke(et.value):Promise.resolve(et.value).then(Ie,Dt);nt((se=se.apply(ne,Ae)).next())});class jt extends xt.EventEmitter{constructor(Ae,se){super(),ge(this,"url"),ge(this,"body"),ge(this,"fullContent",""),ge(this,"controller",null),ge(this,"buffer",""),this.url=Ae,this.body=se}startStream(){return Ut(this,null,function*(){this.controller=new AbortController;const{signal:Ae}=this.controller;try{const se=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:Ae});if(!se.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${se.status}`);const ke=se.headers.get("content-type");if(!ke)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(ke.includes("application/json")){const Dt=yield se.json();this.emit("error",Dt);return}if(!ke.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const de=se.body.getReader(),Ie=new TextDecoder("utf-8");for(;;){const{done:Dt,value:nt}=yield de.read();if(Dt)break;const et=Ie.decode(nt,{stream:!0});this.buffer+=et;const ut=this.buffer.split(`
`);this.buffer=ut.pop()||"";for(const at of ut)if(at.startsWith("data:")){const ht=at.slice(5).trim();if(ht==="[DONE]")break;try{const pt=JSON.parse(ht);pt.data&&this.handleData(pt.data)}catch(pt){this.buffer=at+`
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",pt)}}}this.emit("done",this.fullContent)}catch(se){se.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",se.message)}})}handleData(Ae){Ae.content&&(this.fullContent+=Ae.content,this.emit("data",{chunk:Ae,full:this.fullContent}))}cancelRequest(){var Ae;(Ae=this.controller)==null||Ae.abort()}}ze.Z=jt},28812:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return nt}});var xt=Qt(67294),Yt={flex_box_center:"flex_box_center___A3pzf",flex_space_between:"flex_space_between___JBoa5",flex_box_vertical_center:"flex_box_vertical_center___MJuIO",flex_box_center_end:"flex_box_center_end___OcjUA",flex_box_column:"flex_box_column___zSH4A",list:"list___KhJas",middle:"middle___IjlYi",row:"row___GGtIx",title:"title___o_xqf",size:"size___OVRoL",download:"download___ZLcIH",preview:"preview___gi0kI",annotation:"annotation___KVSwj"},he=Qt(94184),xe=Qt.n(he),ge=Qt(20819),Ut=Qt(63205),jt=Qt(28706),ne=Qt(11320),Ae=Qt(33170),se=Qt(52262),ke=Qt(35973),de=Qt(2453),Ie=(et,ut,at)=>new Promise((ht,pt)=>{var St=Ht=>{try{Ot(at.next(Ht))}catch(Wt){pt(Wt)}},bt=Ht=>{try{Ot(at.throw(Ht))}catch(Wt){pt(Wt)}},Ot=Ht=>Ht.done?ht(Ht.value):Promise.resolve(Ht.value).then(St,bt);Ot((at=at.apply(et,ut)).next())});const Dt=({className:et,style:ut,dataSource:at=[],authority:ht=!1,callback:pt,showDimensions:St=!0,classroomList:bt})=>{var Ot;const[Ht,Wt]=(0,xt.useState)({content:"",type:""}),[re,te]=(0,xt.useState)({}),[Ce,ce]=(0,xt.useState)(!1),[Qe,je]=(0,xt.useState)({title:"",visible:!1,src:"",snapshotData:{}}),He=(0,xt.useRef)(),Qn=ie=>Ie(void 0,null,function*(){if(te(ie),ie.file_type==="txt"){const zt=yield(0,Ae.ZP)(ie.url,{method:"get",headers:{"Content-Type":"application/xml"}});He.current=zt}Wt({type:ie.file_type,content:ne.Z.API_SERVER+ie.url})}),Gn=ie=>{var zt;je({visible:!0,src:ne.Z.API_SERVER+ie.url,id:ie.id,title:ie.title,snapshotData:(zt=ie==null?void 0:ie.subitem)==null?void 0:zt.settings})},Yn=ie=>Ie(void 0,null,function*(){var zt;Wt({type:ie.file_type,content:ne.Z.API_SERVER+((zt=ie==null?void 0:ie.subitem)==null?void 0:zt.url)})}),di=()=>{pt(),je({visible:!1})};return at!=null&&at.length?xt.createElement(xt.Fragment,null,xt.createElement("div",{className:xe()(Yt.list,et),style:ut},at.map((ie,zt)=>{var We,En,Xn;return xt.createElement("div",{key:zt,className:Yt.row},xt.createElement("div",{className:Yt.title,onClick:()=>Qn(ie)},xt.createElement("i",{className:"iconfont icon-fujian1"}),xt.createElement("span",{title:ie.title},ie.title)),xt.createElement("div",{className:Yt.size},ie.filesize),xt.createElement("div",{className:Yt.download,onClick:()=>{var Ve,In;if((0,se.Rm)()&&!((Ve=bt.AssistantObject.normal)!=null&&Ve.can_download)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(0,jt.Nd)("",`${ne.Z.API_SERVER}${(In=ie.url)==null?void 0:In.replace("disposition=inline","")}`)}},xt.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D"),!["other","download"].includes(ie==null?void 0:ie.file_type)&&xt.createElement("div",{className:Yt.preview,onClick:()=>Qn(ie)},xt.createElement("i",{className:"iconfont icon-yulan"}),"\u9884\u89C8"),["image"].includes(ie==null?void 0:ie.file_type)&&St&&(ht?xt.createElement("div",{className:Yt.annotation,onClick:()=>Gn(ie)},xt.createElement("i",{className:"iconfont icon-pizhu"}),(We=ie.subitem)!=null&&We.id?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"):((En=ie.subitem)==null?void 0:En.id)&&xt.createElement("div",{className:Yt.annotation,onClick:()=>Yn(ie)},xt.createElement("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8")),["image"].includes(ie==null?void 0:ie.file_type)&&((Xn=ie.subitem)==null?void 0:Xn.id)&&xt.createElement("div",{className:Yt.download,style:{marginLeft:20},onClick:()=>{var Ve,In;(0,jt.Nd)("",`${ne.Z.API_SERVER}${(In=(Ve=ie==null?void 0:ie.subitem)==null?void 0:Ve.url)==null?void 0:In.replace("disposition=inline","")}`)}},xt.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D\u6279\u6CE8\u6587\u4EF6"),["office"].includes(ie==null?void 0:ie.file_type)&&(0,se.eB)()&&["xlsx","docx","pptx"].includes(ie==null?void 0:ie.file_sub)&&St&&xt.createElement("div",{className:Yt.annotation,onClick:()=>{ce(!0),Qn(ie)}},xt.createElement("i",{className:"iconfont icon-pizhu"}),ie.is_edit?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"),ie.is_edit&&(0,se.dE)()&&St&&xt.createElement("div",{className:Yt.annotation,onClick:()=>{Qn(ie)}},xt.createElement("i",{className:"iconfont icon-sousuo7"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8"))})),xt.createElement(ge.Z,{close:!0,data:Ht==null?void 0:Ht.content,type:Ht==null?void 0:Ht.type,hasMask:!0,disabledDownload:(0,se.Rm)()&&!((Ot=bt.AssistantObject.normal)!=null&&Ot.can_download),editOffice:Ce?"edit":"view",monacoEditor:{value:He.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:ht&&St&&Ht.type==="image"?()=>Gn(re):null,onClose:()=>{pt(),ce(!1),Wt({content:"",type:""})}}),xt.createElement(Ut.Z,{onOk:di,onClose:()=>je({visible:!1}),data:Qe,showFullTools:!0})):null};var nt=(0,ke.connect)(({classroomList:et})=>({classroomList:et}))(Dt)},63205:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ke}});var xt=Qt(67294),Yt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},he=Qt(94184),xe=Qt.n(he),ge=Qt(74330),Ut=Qt(15979),jt=Qt(33170),ne=Qt(28706),Ae=(de,Ie,Dt)=>new Promise((nt,et)=>{var ut=pt=>{try{ht(Dt.next(pt))}catch(St){et(St)}},at=pt=>{try{ht(Dt.throw(pt))}catch(St){et(St)}},ht=pt=>pt.done?nt(pt.value):Promise.resolve(pt.value).then(ut,at);ht((Dt=Dt.apply(de,Ie)).next())}),ke=({data:de,className:Ie,fullWidth:Dt,style:nt={},onClose:et,onOk:ut,showFullTools:at,noAssociationId:ht})=>{const pt=(0,xt.useRef)(null),St=(0,xt.useRef)(null),bt=(0,xt.useRef)(null),Ot=(0,xt.useRef)(null),[Ht,Wt]=(0,xt.useState)(!1),[re,te]=(0,xt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,xt.useEffect)(()=>(bt.current||(bt.current=document.createElement("style"),document.head.appendChild(bt.current)),de!=null&&de.visible?(document.body.setAttribute("data-custom","y-hidden"),bt.current.innerHTML=" html { overflow-y: hidden; }",de!=null&&de.src&&Ce()):(document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)),()=>{document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)}),[de==null?void 0:de.visible]);const Ce=()=>Ae(void 0,null,function*(){Wt(!0),te("\u6B63\u5728\u52A0\u8F7D\u4E2D");const He=yield(0,ne.ZJ)(de==null?void 0:de.src);pt.current.src="",pt.current.src=He,pt.current.onload=function(){je()},Wt(!1),te("")}),ce=He=>Ae(void 0,null,function*(){Wt(!0),te("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Qn=yield(0,jt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:de.title,file:He.dataUrl}});Qn!=null&&Qn.id&&!ht?(yield(0,jt.ZP)(`/api/attachments/${de.id}/add_subitem.json`,{method:"post",body:{subitem_id:Qn==null?void 0:Qn.id,settings:JSON.stringify(He.state)}})).status===0&&ut():Qn!=null&&Qn.id&&ut(Qn),Wt(!1),te("")}),Qe=()=>{const He=document.querySelector('a[href="https://markerjs.com/"]');He&&He.parentNode&&(He.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(Gn=>{const Yn=document.querySelector(Gn.name);Yn&&Yn.setAttribute("title",Gn.title)})},je=()=>{St.current=new Ut.hP(pt.current),St.current.targetRoot=Ot.current,St.current.addEventListener("render",ce),St.current.addEventListener("beforeclose",et),at&&(St.current.availableMarkerTypes=St.current.ALL_MARKER_TYPES,St.current.uiStyleSettings.redoButtonVisible=!0,St.current.uiStyleSettings.notesButtonVisible=!0,St.current.uiStyleSettings.zoomButtonVisible=!0,St.current.uiStyleSettings.zoomOutButtonVisible=!0,St.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=St.current.uiStyleSettings,St.current.show(),de!=null&&de.snapshotData&&St.current.restoreState(de.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Qe()},300)};return xt.createElement(xt.Fragment,null,(de==null?void 0:de.visible)&&xt.createElement(ge.Z,{spinning:Ht,tip:re,style:{position:"absolute",width:"100vw"}},xt.createElement("div",{ref:Ot,className:xe()(Yt.imageDimensions,Ie,Dt?Yt.fullWidth:""),style:nt},xt.createElement("img",{className:Yt.img,ref:pt}))))}},36527:function(gn,ze,Qt){"use strict";var xt=Qt(67294),Yt=Qt(71230),he=Qt(15746),xe=Qt(55238),ge=Qt(85804),Ut=Qt(65226),jt=Qt(71736),ne=Qt(84279),Ae=Qt(67294);const se=(0,xt.forwardRef)(({callback:ke,showSaveButton:de,value:Ie=""},Dt)=>{const nt=(0,xt.useRef)(),et=[{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 "}]}]}],ut=[{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}`}]}]}],at=St=>{nt.current.setValue(nt.current.getValue()+" "+St.value+" ")},ht=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ae.createElement(Yt.Z,{className:jt.Z.lists,gutter:[10,10]},et.map((St,bt)=>Ae.createElement(he.Z,{flex:"110px",className:jt.Z.item},Ae.createElement("div",null,Ae.createElement(Ut.Z,{value:`$$${St.value}$$`}),St.name),Ae.createElement("div",{className:jt.Z.children},St.children.map((Ot,Ht)=>Ae.createElement("div",{key:Ht},Ae.createElement("h1",null,Ot.name),Ae.createElement(Yt.Z,{gutter:[10,10]},Ot.data.map((Wt,re)=>Ae.createElement(he.Z,{key:re,onClick:()=>at(Wt),className:jt.Z.diamond},Ae.createElement(Ut.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ae.createElement(Yt.Z,{className:jt.Z.lists,gutter:[10,10]},ut.map((St,bt)=>Ae.createElement(he.Z,{flex:"110px",className:jt.Z.item},Ae.createElement("div",null,Ae.createElement(Ut.Z,{value:"`$$"+St.value+"$$`"}),St.name),Ae.createElement("div",{className:jt.Z.children},St.children.map((Ot,Ht)=>Ae.createElement("div",{key:Ht},Ot.name&&Ae.createElement("h1",null,Ot.name),Ae.createElement(Yt.Z,{gutter:[10,10]},Ot.data.map((Wt,re)=>Ae.createElement(he.Z,{key:re,onClick:()=>at(Wt),className:jt.Z.diamond},Ae.createElement(Ut.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))}],pt=()=>{var St=document.createElement("div");St.innerHTML=nt.current.getValue();var bt=St.innerText;return ke&&ke(bt),bt};return(0,xt.useImperativeHandle)(Dt,()=>({getData:pt})),Ae.createElement("div",{className:jt.Z.mathWrap},Ae.createElement(xe.default,{defaultActiveKey:"1",items:ht}),Ae.createElement("math-field",{locale:"zh_cn",className:jt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Ie||""),de&&Ae.createElement("div",{className:jt.Z.button},Ae.createElement(ge.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});ze.Z=se},26194:function(gn,ze,Qt){"use strict";var xt=Qt(67294),Yt=Qt(4977),he=Qt(85804),xe=Object.defineProperty,ge=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,se=(Dt,nt,et)=>nt in Dt?xe(Dt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Dt[nt]=et,ke=(Dt,nt)=>{for(var et in nt||(nt={}))ne.call(nt,et)&&se(Dt,et,nt[et]);if(jt)for(var et of jt(nt))Ae.call(nt,et)&&se(Dt,et,nt[et]);return Dt},de=(Dt,nt)=>ge(Dt,Ut(nt));const Ie=({img:Dt,buttonProps:nt={},styles:et={},customText:ut,ButtonText:at,ButtonClick:ht,Buttonclass:pt,ButtonTwo:St,imgStyles:bt,loading:Ot=!1,className:Ht=""})=>xt.createElement("section",{className:`tc animated fadeIn ${Ht}`,style:ke({color:"#999",margin:"100px auto",visibility:Ot?"hidden":"visible"},et)},xt.createElement("img",{src:Dt||Yt,style:de(ke({},bt),{pointerEvents:"none",userSelect:"none"})}),xt.createElement("p",{className:"mt20 font14"},ut||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&xt.createElement(he.ZP,ke({className:pt,onClick:ht},nt),at),St&&St);ze.Z=Ie},20819:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var xt=Qt(67294),Yt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},he=Qt(85804),xe=Qt(30153),ge=Qt(36295),Ut=Qt(83062),jt=Qt(28706),ne=Qt(15835),Ae=Qt(26194),se=Qt(11320),ke=Qt(66540),de=Qt(67294),Ie=Object.defineProperty,Dt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ut=(St,bt,Ot)=>bt in St?Ie(St,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):St[bt]=Ot,at=(St,bt)=>{for(var Ot in bt||(bt={}))nt.call(bt,Ot)&&ut(St,Ot,bt[Ot]);if(Dt)for(var Ot of Dt(bt))et.call(bt,Ot)&&ut(St,Ot,bt[Ot]);return St},ht=(St,bt,Ot)=>new Promise((Ht,Wt)=>{var re=ce=>{try{Ce(Ot.next(ce))}catch(Qe){Wt(Qe)}},te=ce=>{try{Ce(Ot.throw(ce))}catch(Qe){Wt(Qe)}},Ce=ce=>ce.done?Ht(ce.value):Promise.resolve(ce.value).then(re,te);Ce((Ot=Ot.apply(St,bt)).next())}),pt=({editOffice:St="view",data:bt,issaver:Ot,onSaver:Ht,theme:Wt,type:re,filename:te,monacoEditor:Ce,className:ce,style:Qe,close:je,onClose:He,hasMask:Qn,disabledDownload:Gn,onImgDimensions:Yn,showNodata:di,recordInfo:ie})=>{const[zt,We]=(0,xt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[En,Xn]=(0,xt.useState)(""),[Ve,In]=(0,xt.useState)(),Hn=window.ENV==="build"?"/react/build":"",li=location.host.startsWith("localhost")?se.Z.PROXY_SERVER:se.Z.API_SERVER,Me=10*(1024*1024),rn=(0,xt.useRef)();bt!=null&&bt.startsWith("/api")&&re!=="txt"&&(bt=se.Z.API_SERVER+bt);const Dn=vt=>vt.substring(vt.lastIndexOf("/")+1).split(".").pop();te&&Ce&&(Ce.filename=te),(0,xt.useEffect)(()=>{var vt,kt;const Lt=(kt=(vt=document.cookie)==null?void 0:vt.replace(/\s/g,""))==null?void 0:kt.split(";");Lt==null||Lt.map(_t=>{let De=_t.split("=");De[0]==="_educoder_session"&&Xn(De[1])})},[]),(0,xt.useEffect)(()=>{re==="office"&&(bt.indexOf("bigfilescdn.")>-1||bt.indexOf("bigfiles1")>-1?In({url:bt,fileType:Dn(bt),model:bt.indexOf("model=edit")?"edit":"view"}):Vt())},[re,bt]);function sn(vt){return ht(this,null,function*(){vt.data.type==="pdfdata"&&(Ht(vt.data.data),window.removeEventListener("message",sn,!1)),console.log("mess---:",vt.data)})}const Vt=()=>ht(void 0,null,function*(){console.log("data:",bt);let vt=bt;bt.startsWith("http")||(vt=location.origin+vt);let kt=new URL(vt).pathname.split("/").pop();const Lt=yield(0,ne.gJ)({attachment_id:kt});Lt.url=li+Lt.url,In(Lt)}),Pt=()=>{if(bt.startsWith("http")||bt.startsWith("blob:")){mt();return}(0,jt.Sv)(te||"educoder",bt,te)},mt=()=>{ie&&(0,ke.fc)({id:ie==null?void 0:ie.id,watch_type:1,course_id:ie==null?void 0:ie.course_id}),(0,jt.Nd)(te||"educoder",decodeURIComponent(bt))};return de.createElement("div",{style:at({},Qe||{}),className:`${Qn&&Yt.bgBlack} ${re?Yt.wrp:"hide"}`},je&&de.createElement("div",{className:Yt.close,ref:rn},!!Yn&&de.createElement(Ut.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>rn.current},de.createElement("span",{onClick:()=>{He(),Yn()}},de.createElement("i",{className:"icon-yulanpizhu"}))),!Gn&&de.createElement(Ut.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>rn.current},de.createElement("span",{onClick:mt},de.createElement("i",{className:"icon-quxiaozhiding"}))),Ot&&de.createElement(Ut.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>rn.current},de.createElement("span",{className:"",onClick:()=>{const vt=document.getElementById("pdfiframe");window.addEventListener("message",sn,!1),setTimeout(()=>{vt.contentWindow.postMessage("getData","*")},300)}},de.createElement("i",{className:"icon-baocun"}))),de.createElement(Ut.Z,{title:"\u5173\u95ED",getPopupContainer:()=>rn.current},de.createElement("span",{className:"",onClick:()=>{He()}},de.createElement("i",{className:"icon-guanbi1"})))),de.createElement("div",{className:`${Yt[ce]} ${ce} ${Yt.monaco} ${re==="txt"?"show":"hide"}`},re==="txt"&&de.createElement(de.Fragment,null,de.createElement(ge.ZP,at({},Ce)))),re==="audio"&&de.createElement("audio",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${bt}`,autoPlay:!0}),re==="video"&&de.createElement(de.Fragment,null,(bt==null?void 0:bt.indexOf("http"))>-1?de.createElement("video",{controls:!0,src:`${bt}`,autoPlay:!0}):de.createElement("video",{controls:!0,src:`data:video/mp4;base64,${bt}`,autoPlay:!0})),re==="office"&&Ve&&de.createElement("iframe",{src:`${Hn}/office.html?key=${Ve.key}&url=${btoa(Ve.url)}&callbackUrl=${li+(Ve.callbackUrl||"")}&fileType=${Ve.fileType}&title=${Ve.title||""}&model=${St}&officeServer=${se.Z.ONLYOFFICE}&disabledDownload=${!!Gn}`}),re==="html"&&de.createElement("iframe",{src:bt+"&disposition=inline"}),re==="pdf"&&de.createElement("iframe",{id:"pdfiframe",src:`${Hn}/js/pdfview/index.html?filename=${te||"educoder.pdf"}&url=${encodeURIComponent(bt)}&disabledDownload=${!!Gn}&model=${St}`}),re==="image"&&de.createElement("img",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${bt}`}),(re==="other"||re==="download")&&de.createElement(de.Fragment,null,di?de.createElement(Ae.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:de.createElement(he.ZP,{icon:de.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Pt,disabled:Gn},"\u4E0B\u8F7D")}):de.createElement(he.ZP,{type:"primary",size:"middle",onClick:Pt,disabled:Gn},de.createElement(xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(gn,ze,Qt){"use strict";Qt.d(ze,{z:function(){return re},Z:function(){return te}});var xt=Qt(67294),Yt=Qt(81897),he=Qt(51161),xe=Qt(11771),ge=Qt(67631),Ut=Qt.n(ge),jt=Qt(11320),ne=Qt(28706),Ae=Qt(20527),se=Qt(25934),ke=Qt(20819),de=Qt(67294),Dt=({html:Ce})=>{const ce=(0,xt.useRef)(null),Qe=(0,xt.useRef)(null),je=`.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,xt.useEffect)(()=>{const He=ce.current.attachShadow({mode:"open"});Qe.current=document.createElement("div"),Qe.current.className="markdown-body",Qe.current.innerHTML=Ce,He.appendChild(Qe.current);const Qn=document.createElement("style");return Qn.textContent=je,He.appendChild(Qn),()=>{He.innerHTML=""}},[]),(0,xt.useEffect)(()=>{Qe.current&&(Qe.current.innerHTML=Ce)},[Ce]),de.createElement("div",{ref:ce})};function nt(Ce){const ce=["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"],Qe=new RegExp(`\\b(${ce.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ce.replace(Qe,"").trim()}var et=Object.defineProperty,ut=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,pt=(Ce,ce,Qe)=>ce in Ce?et(Ce,ce,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Ce[ce]=Qe,St=(Ce,ce)=>{for(var Qe in ce||(ce={}))at.call(ce,Qe)&&pt(Ce,Qe,ce[Qe]);if(ut)for(var Qe of ut(ce))ht.call(ce,Qe)&&pt(Ce,Qe,ce[Qe]);return Ce};const bt="@\u2581\u2581@",Ot="@\u2581@",Ht=/<pre[^>]*>/g;function Wt(Ce){let ce=document.createElement("div");return ce.innerHTML=Ce,ce.childNodes.length===0?"":ce.childNodes[0].nodeValue}const re=(Ce,ce)=>{Ce=Ce||"";const Qe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,je=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Qn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ce?Ce.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Qe,(Gn,Yn,di,ie,zt,We,En)=>{const Xn=Yn||ie||We,Ve=di||zt||En||"?";return jt.Z.API_SERVER+"/api/attachments/"+Xn+Ve+"&t="+(0,ne.Jn)(Xn,Date.now())+(Gn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ce=Ce.replace(Qn,(Gn,Yn,di,ie,zt,We,En)=>{const Xn=Yn||ie||We,Ve=di||zt||En||"?";return jt.Z.API_SERVER+"/attachments/download/"+Xn+Ve+"&t="+(0,ne.Jn)(Xn,Date.now())+(Gn.indexOf(")")>-1?")":"&")}).replace(Qe,(Gn,Yn,di,ie,zt,We,En)=>{const Xn=Yn||ie||We,Ve=di||zt||En||"?";return jt.Z.API_SERVER+"/api/attachments/"+Xn+Ve+"&t="+(0,ne.Jn)(Xn,Date.now())+(Gn.indexOf(")")>-1?")":"&")}).replace(je,(Gn,Yn,di,ie,zt)=>{const We=Yn||ie,En=di||zt||"";return'"'+jt.Z.API_SERVER+"/api/attachments/"+We+En+We+En+"&t="+(0,ne.Jn)(We,Date.now())}).replace(He,(Gn,Yn,di,ie,zt)=>{const We=Yn||ie,En=di||zt||"";return"("+jt.Z.API_SERVER+"/files/uploads/"+We+En+We+En+"&t="+(0,ne.Jn)(We,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,`
`),Ce)};var te=({value:Ce="",className:ce,showTextOnly:Qe,showLines:je,style:He={},stylesPrev:Qn={},highlightKeywords:Gn,showProgramFill:Yn,isProgramFill:di,disabledFill:ie=!1,programFillValue:zt,onFillChange:We=Ve=>{},onFillBlur:En=()=>{},onFillFocus:Xn=()=>{}})=>{let Ve=nt(String(Ce||""));const[In,Hn]=(0,xt.useState)(""),[li,tn]=(0,xt.useState)("office"),[Me,rn]=(0,xt.useState)([]),Dn=(0,xt.useRef)("a"+(0,se.Z)()),sn={},Vt=Re=>/<style[\s\S]*?>/i.test(Re||""),Pt=(Re,Mn,Kn)=>{const Fi=document.createElement(Re===Ot?"input":"textarea");Fi.style.width="100%",Fi.style.height=Re===Ot?"40px":"151px",Fi.rows=5,Fi.spellcheck=!1,Fi.name="edu-program-fill",Fi.placeholder="\u8BF7\u8F93\u5165",Fi.dataset.id=Mn;const ti=Object.keys(sn).length;return sn[ti]=Fi,`<span class="edu-program-fill-wrap ${Re===Ot?"":"show"}" style="width:${Re===Ot?"600px":"100%"}" title=${Kn||""}><span>${Fi.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function mt(Re){return Re=Re.replace(/!\[.*?\]\(.*?\)/g,""),Re=Re.replace(/\[.*?\]\(.*?\)/g,""),Re=Re.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Re=Re.replace(/<embed.*?>/g,""),Re=Re.replace(/<img.*?>/g,""),Re=Re.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Re=Re.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Re=Re.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Re=Re.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Re}const vt=Re=>!Qe&&Vt(Ve)?Re:Re.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Mn,Kn){let Fi=Kn.replace(/(\n|\r)/g,"").split("}"),ti=[];return Fi.map(sr=>{sr!=""&&ti.push(`.${Dn.current} ${sr}`)}),`<style>${ti.join("}")}</style>`}),kt=(0,xt.useMemo)(()=>{try{const Fi=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ti=/\"\/api\/attachments\/|\"\/attachments\/download\//g,sr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,rr=/\(\/attachments\/download\//g;Ve=Ve.replace(rr,"("+jt.Z.API_SERVER+"/attachments/download/").replace(Fi,"("+jt.Z.API_SERVER+"/api/attachments/").replace(ti,'"'+jt.Z.API_SERVER+"/api/attachments/").replace(sr,'"'+jt.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(Fi){}if(Yn){let Fi=-1;return Ve=Ve.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(ti,sr,rr){var xi;return++Fi,Pt(ti,Fi,(xi=zt==null?void 0:zt[Fi])==null?void 0:xi.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${vt(Ve||"")}</pre>`}let Re=vt(Ve);Re=(0,he.ZP)(Re);const Mn=(0,he.ez)();Ve.match(/\[TOC\]/)&&(Re=Re.replace("<p>[TOC]</p>",(0,he.Qv)()),(0,he.Iy)()),Re=Re.replace(/(__special_katext_id_\d+__)/g,(Fi,ti)=>{const{type:sr,expression:rr}=Mn[ti];return(0,Ae.renderToString)(Wt(rr)||"",{displayMode:sr==="block",throwOnError:!1,output:"html"})}),Re=Re.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,he.AL)();const Kn=document.createElement("div");if(Kn.innerHTML=Re,Qe)return Kn.innerText;if(Gn){const Fi=Gn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return on(Kn,Fi),Kn.innerHTML}return setTimeout(()=>Bn(),500),Kn.innerHTML},[Ve,Gn]);(0,xt.useEffect)(()=>{mn.current&&mn.current.querySelectorAll(["input","textarea"]).forEach(Mn=>{Mn.oninput=Lt,Mn.onblur=_t,Mn.onfocus=De})},[Me]),(0,xt.useEffect)(()=>{var Re,Mn,Kn,Fi,ti;if(zt!=null&&zt.length)try{const sr=mn.current.querySelectorAll(".edu-program-fill-score"),rr=mn.current.querySelectorAll('[name="edu-program-fill"]');for(const[xi,wi]of rr.entries())wi.value=((Re=zt==null?void 0:zt[xi])==null?void 0:Re.value)||"",((Mn=zt==null?void 0:zt[xi])==null?void 0:Mn.type)==="warning"?wi.className="program-fill-warning":((Kn=zt==null?void 0:zt[xi])==null?void 0:Kn.type)==="success"?wi.className="program-fill-success":wi.className="";for(const[xi,wi]of sr.entries())wi.innerHTML=(Fi=zt==null?void 0:zt[xi])!=null&&Fi.score?`${(ti=zt==null?void 0:zt[xi])==null?void 0:ti.score}\u5206`:"";rn(zt)}catch(sr){console.log(sr,"error")}},[zt]);const Lt=Re=>{Me[Re.target.dataset.id]=Me[Re.target.dataset.id]||{},Me[Re.target.dataset.id].value=Re.target.value,rn([...Me]),We(Me,Re.target.dataset.id)},_t=Re=>{Me[Re.target.dataset.id]=Me[Re.target.dataset.id]||{},Me[Re.target.dataset.id].value=Re.target.value,rn([...Me]),En(Me,Re.target.dataset.id)},De=Re=>{Me[Re.target.dataset.id]=Me[Re.target.dataset.id]||{},Me[Re.target.dataset.id].value=Re.target.value,rn([...Me]),Xn(Me,Re.target.dataset.id)};function on(Re,Mn){return Re.childNodes.forEach(Kn=>{var Fi;if(Kn.childNodes.length>0)on(Kn,Mn);else if(Kn.nodeName!=="IMG")if(Kn.innerHTML)Kn.innerHTML=(Fi=Kn.innerHTML)==null?void 0:Fi.replace(new RegExp(Mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const ti=document.createElement("span");ti.innerHTML=Kn.textContent.replace(new RegExp(Mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Kn.replaceWith(ti)}})}const mn=(0,xt.useRef)();he.jb.WebkitLineClamp=je,je&&(He=St(St({},He),he.jb));function $e(Re){let Mn=Re.target;if(Mn.tagName.toUpperCase()==="A"){let Kn=Mn.getAttribute("href");if(Kn.indexOf("office")>-1)Re.preventDefault(),Hn(Kn),tn("office");else if(Kn.indexOf("application/pdf")>-1)Re.preventDefault(),Hn(Kn),tn("pdf");else if(Kn.indexOf("text/html")>-1)Re.preventDefault(),Hn(Kn),tn("html");else if(Kn.startsWith("#")){Re.preventDefault();let Fi=document.getElementById(Kn.replace("#",""));Fi&&Fi.scrollIntoView(!0)}}}const Bn=()=>{var Re;const Mn=(Re=mn.current)==null?void 0:Re.querySelectorAll("video");Mn==null||Mn.forEach(Kn=>{if(Kn.oncontextmenu=()=>!1,Kn.src.indexOf(".m3u8")>-1&&!Kn.canPlayType("application/vnd.apple.mpegurl")){if(Ut().isSupported()){var Fi=new(Ut());Fi.loadSource(Kn.src),Fi.attachMedia(Kn)}}})};return(0,xt.useEffect)(()=>{if(mn.current&&kt&&kt.match(Ht)&&window.PR.prettyPrint(),mn.current)return mn.current.addEventListener("click",$e),()=>{var Re;(Re=mn.current)==null||Re.removeEventListener("click",$e),(0,he.AL)(),(0,he.Iy)()}},[kt,mn.current,$e]),(0,xt.useEffect)(()=>{var Re;const Mn=Kn=>{Kn.preventDefault(),Kn.clipboardData.setData("text",window.getSelection().toString())};return(Re=mn.current)==null||Re.addEventListener("copy",Mn),()=>{var Kn;(Kn=mn.current)==null||Kn.removeEventListener("copy",Mn)}},[mn.current]),xt.createElement(xt.Fragment,null,Qe&&xt.createElement("div",{ref:mn},kt),!Qe&&!Vt(kt)&&xt.createElement("div",{ref:mn,style:St({},He),className:`${ce||""} ${ie?"disabled-fill":""} markdown-body ${Dn.current}`,dangerouslySetInnerHTML:{__html:kt}}),!Qe&&Vt(kt)&&xt.createElement(Dt,{html:kt}),xt.createElement(ke.Z,{close:!0,data:In,type:In!=null&&In.length?li:"",style:St({},Qn),onClose:()=>Hn("")}))}},1916:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Qe}});var xt=Qt(67294),Yt=Qt(35973),he=Qt(62844),xe=Qt(91773),ge=Qt(2453),Ut=Qt(74330),jt=Qt(51380),ne=Qt(71230),Ae=Qt(15746),se=Qt(83062),ke=Qt(28802),de={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},Ie=Qt(9343),Dt=Qt(65900),nt=Qt(26194),et=Qt(30001),ut=Object.defineProperty,at=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ot=(je,He,Qn)=>He in je?ut(je,He,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):je[He]=Qn,Ht=(je,He)=>{for(var Qn in He||(He={}))St.call(He,Qn)&&Ot(je,Qn,He[Qn]);if(pt)for(var Qn of pt(He))bt.call(He,Qn)&&Ot(je,Qn,He[Qn]);return je},Wt=(je,He)=>at(je,ht(He)),re=(je,He)=>{var Qn={};for(var Gn in je)St.call(je,Gn)&&He.indexOf(Gn)<0&&(Qn[Gn]=je[Gn]);if(je!=null&&pt)for(var Gn of pt(je))He.indexOf(Gn)<0&&bt.call(je,Gn)&&(Qn[Gn]=je[Gn]);return Qn},te=(je,He,Qn)=>new Promise((Gn,Yn)=>{var di=We=>{try{zt(Qn.next(We))}catch(En){Yn(En)}},ie=We=>{try{zt(Qn.throw(We))}catch(En){Yn(En)}},zt=We=>We.done?Gn(We.value):Promise.resolve(We.value).then(di,ie);zt((Qn=Qn.apply(je,He)).next())});const Ce=(je=[])=>je==null?void 0:je.map(He=>Wt(Ht({},He),{title:(He==null?void 0:He.value)||"",key:He==null?void 0:He.id,isLeaf:!0})),ce=je=>{var He=je,{user:Qn,children:Gn,isShowComponent:Yn=!0,ModalProps:di={},onDataSelect:ie}=He,zt=re(He,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[We,En]=he.default.useModal(),[Xn]=xe.default.useForm(),[Ve,In]=(0,xt.useState)([]),[Hn,li]=(0,xt.useState)(!1),[tn,Me]=(0,xt.useState)(!1),[,rn,Dn,sn]=(0,Ie.U)(Dt.qE,{page:1,limit:9999}),[,,Vt]=(0,Ie.U)(Dt.V8,{}),[,,Pt]=(0,Ie.U)(Dt.B$,{}),[,,mt]=(0,Ie.U)(Dt.DH,{}),[,,vt]=(0,Ie.U)(Dt.bJ,{}),kt=()=>{li(!1),Xn.resetFields(),Me(!1)},Lt=De=>te(void 0,null,function*(){const{node:on,dragNode:mn,event:$e}=De,Bn=De.node.pos.split("-"),Re=De.dropPosition-Number(Bn[Bn.length-1]);if(Re==0){ge.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Re==1&&(mn==null?void 0:mn.item_index)==(on==null?void 0:on.item_index)+1){ge.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const Mn=yield vt({id:mn==null?void 0:mn.key,position:Re==-1?1:(mn==null?void 0:mn.item_index)>(on==null?void 0:on.item_index)?(on==null?void 0:on.item_index)+1:on==null?void 0:on.item_index});(Mn==null?void 0:Mn.status)===0&&(ge.ZP.success("\u79FB\u52A8\u6210\u529F"),Dn({},!0))}),_t=De=>te(void 0,null,function*(){let on={};tn?on=yield Pt(Ht({},De)):on=yield mt(Ht({},De)),(on==null?void 0:on.status)==0&&(ge.ZP.success((on==null?void 0:on.message)||(tn?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),Dn({},!0),kt())});return(0,xt.useEffect)(()=>{di!=null&&di.open&&Dn({},!0)},[di==null?void 0:di.open]),(0,xt.useEffect)(()=>{var De;In(Ce((De=sn==null?void 0:sn.data)==null?void 0:De.list))},[sn]),Yn?xt.createElement(xt.Fragment,null,En,Gn,xt.createElement(he.default,Ht({},Ht({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},di)),xt.createElement(Ut.Z,{spinning:rn},(Ve==null?void 0:Ve.length)>0?xt.createElement(xt.Fragment,null,xt.createElement(jt.default.DirectoryTree,{height:500,className:de.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:ie,treeData:Ve,onDrop:Lt,titleRender:De=>xt.createElement(xt.Fragment,null,xt.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},De==null?void 0:De.title),xt.createElement("div",{className:`${de.EditDom}`},xt.createElement(ne.Z,{wrap:!1,align:"middle",gutter:16},xt.createElement(Ae.Z,null,xt.createElement(se.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},xt.createElement("i",{className:`iconfont icon-tuodong1 font12 ${de.currentPrimary}`}))),xt.createElement(Ae.Z,null,xt.createElement(se.Z,{title:"\u7F16\u8F91"},xt.createElement("i",{className:`iconfont icon-bianji11 font12 ${de.currentPrimary}`,onClick:on=>{on.stopPropagation(),Xn.setFieldsValue(Ht({},De)),li(!0)}}))),xt.createElement(Ae.Z,null,xt.createElement(se.Z,{title:"\u5220\u9664"},xt.createElement("i",{className:`iconfont icon-shanchu14 font12 ${de.currentDelete}`,onClick:on=>{on.stopPropagation(),We.confirm({icon:null,title:"\u5220\u9664\u5E38\u7528\u8BC4\u8BED",centered:!0,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u5E38\u7528\u8BC4\u8BED\u5417\uFF1F",onOk:()=>te(void 0,null,function*(){const mn=yield Vt({id:De==null?void 0:De.key});(mn==null?void 0:mn.status)==0&&(ge.ZP.success((mn==null?void 0:mn.message)||"\u5220\u9664\u6210\u529F"),Dn({},!0))})})}}))))))}),xt.createElement(et.op,{className:"ml20 mt20",icon:xt.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{Me(!0),li(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):xt.createElement(nt.Z,{styles:{margin:"30px auto"},customText:xt.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",xt.createElement("a",{onClick:()=>{Me(!0),li(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),xt.createElement(he.default,{title:tn?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:Hn,okText:tn?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{kt()},onOk:()=>{Xn.submit()}},xt.createElement(xe.default,{form:Xn,onFinish:_t},tn&&xt.createElement("span",{className:"font14",style:{color:"#191919"}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u4F60\u63D0\u9AD8\u8BC4\u9605\u4F5C\u4E1A\u7684\u6548\u7387"),xt.createElement(xe.default.Item,{hidden:!0,name:"id"}),xt.createElement(xe.default.Item,{className:"mt10",name:"value"},xt.createElement(ke.default.TextArea,{placeholder:"\u8F93\u5165\u5E38\u7528\u8BC4\u8BED\u3002\u4F8B\u5982\uFF1A\u4F60\u7684\u7F16\u7A0B\u4F5C\u4E1A\u6574\u4F53\u8868\u73B0\u826F\u597D\uFF0C\u4F46\u4ECD\u6709\u4E00\u4E9B\u5C0F\u7684\u6539\u8FDB\u7A7A\u95F4\u3002",autoSize:{minRows:8,maxRows:9},maxLength:100,showCount:!0}))))):null};var Qe=(0,Yt.connect)(({loading:je,user:He})=>({user:He,loading:je.effects}))(ce)},57444:function(gn,ze,Qt){"use strict";Qt.d(ze,{h:function(){return St}});var xt=Qt(67294),Yt=Qt(88044),he=Qt(91773),xe=Qt(85804),ge=Qt(4631),Ut=Qt.n(ge),jt=Qt(71749),ne=Qt(30483),Ae=Object.defineProperty,se=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,nt=(bt,Ot,Ht)=>Ot in bt?Ae(bt,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):bt[Ot]=Ht,et=(bt,Ot)=>{for(var Ht in Ot||(Ot={}))Ie.call(Ot,Ht)&&nt(bt,Ht,Ot[Ht]);if(de)for(var Ht of de(Ot))Dt.call(Ot,Ht)&&nt(bt,Ht,Ot[Ht]);return bt},ut=(bt,Ot)=>se(bt,ke(Ot));const at=Yt.default.Option,ht={labelCol:{span:4},wrapperCol:{span:20}},pt={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"]};ze.Z=({callback:bt,onCancel:Ot})=>{const[Ht,Wt]=(0,xt.useState)("python");function re(Ce){Wt(pt[Ce][1])}function te(Ce){bt(Ce)}return xt.createElement(he.default,ut(et({},ht),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:te,style:{width:500}}),xt.createElement(he.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},xt.createElement(Yt.default,{getPopupContainer:Ce=>Ce.parentNode,onChange:re},Object.keys(pt).map(Ce=>xt.createElement(at,{key:Ce,value:Ce},pt[Ce][0])))),xt.createElement(he.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},xt.createElement(St,{mode:Ht})),xt.createElement("div",{className:"flex-container flex-end"},xt.createElement(xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),xt.createElement(xe.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))};function St({value:bt,onChange:Ot,mode:Ht,options:Wt={}}){const re=(0,xt.useRef)(),[te,Ce]=(0,xt.useState)();return(0,xt.useEffect)(()=>{if(te){let ce=function(Qe){const je=Qe.getValue();Ot&&Ot(je)};return te.on("change",ce),()=>{te.off("change",ce)}}},[te,Ot]),(0,xt.useEffect)(()=>{te&&te.setOption("mode",Ht)},[te,Ht]),(0,xt.useEffect)(()=>{te&&(bt!==te.getValue()||bt==="")&&setTimeout(()=>{te.setValue(bt||"")},300)},[te,bt]),(0,xt.useEffect)(()=>{if(re.current&&!te){const ce=Ut().fromTextArea(re.current,et({mode:Ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Wt));Ce(ce)}},[re.current,te]),xt.createElement("div",{className:"my-codemirror-container"},xt.createElement("textarea",{ref:re}))}},35567:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Wi}});var xt=Qt(67294),Yt=Qt(4631),he=Qt.n(Yt),xe=Qt(91033),ge=Qt(71749),Ut=Qt(57341),jt=Qt(82801),ne=Qt(88386),Ae=Qt(49047),se=Qt(80785),ke=Qt(65226),de=({value:en="",className:Je,showTextOnly:be,showLines:un,style:fi={}})=>{const mi=(0,xt.useMemo)(()=>"",[en]);return xt.createElement(xt.Fragment,null,xt.createElement("div",{dangerouslySetInnerHTML:{__html:mi}}))},Ie=Object.defineProperty,Dt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ht=(en,Je,be)=>Je in en?Ie(en,Je,{enumerable:!0,configurable:!0,writable:!0,value:be}):en[Je]=be,pt=(en,Je)=>{for(var be in Je||(Je={}))ut.call(Je,be)&&ht(en,be,Je[be]);if(et)for(var be of et(Je))at.call(Je,be)&&ht(en,be,Je[be]);return en},St=(en,Je)=>Dt(en,nt(Je));let bt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ot({onActionCallback:en,title:Je,icon:be,actionName:un,className:fi="",children:mi}){function ri(){en(un)}return xt.createElement("a",{title:Je,className:fi,onClick:ri},xt.createElement("i",{className:`${be}`}),mi)}var Ht=({watch:en,showNullButton:Je,showNullProgramButton:be,onActionCallback:un,fullScreen:fi,insertTemp:mi,hidetoolBar:ri,extraUse:ee})=>{const Cn=[...bt,{title:`${en?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${en?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return xt.createElement("ul",{className:"markdown-toolbar-container"},!ri&&Cn.map((Ti,Xi)=>xt.createElement("li",{key:Xi},Ti.actionName?xt.createElement(Ot,St(pt({},Ti),{onActionCallback:un})):xt.createElement("span",{className:"v-line"}))),Je?xt.createElement("li",null,xt.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:un},xt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,be?xt.createElement(xt.Fragment,null,xt.createElement("li",null,xt.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:un},xt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),xt.createElement("li",null,xt.createElement(Ot,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:un},xt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,mi&&xt.createElement("li",null,xt.createElement(Ot,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mi}`,onActionCallback:un},xt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ee&&xt.createElement("li",null,ee),xt.createElement("li",{className:"btn-full-screen"},xt.createElement(Ot,{icon:`${fi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:un})))},Wt=Qt(76621),re=Qt(91773),te=Qt(28802),Ce=Qt(85804),ce=Object.defineProperty,Qe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,Yn=(en,Je,be)=>Je in en?ce(en,Je,{enumerable:!0,configurable:!0,writable:!0,value:be}):en[Je]=be,di=(en,Je)=>{for(var be in Je||(Je={}))Qn.call(Je,be)&&Yn(en,be,Je[be]);if(He)for(var be of He(Je))Gn.call(Je,be)&&Yn(en,be,Je[be]);return en},ie=(en,Je)=>Qe(en,je(Je));const zt={labelCol:{span:4},wrapperCol:{span:20}};var We=({callback:en,onCancel:Je})=>{function be(un){en(un)}return xt.createElement(re.default,ie(di({},zt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:be,style:{width:500}}),xt.createElement(re.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},xt.createElement(te.default,null)),xt.createElement(re.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},xt.createElement(te.default,null)),xt.createElement("div",{className:"flex-container flex-end"},xt.createElement(Ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),xt.createElement(Ce.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},En=Qt(57444),Xn=Qt(70859),Ve=Qt(62844),In=Qt(71230),Hn=Qt(63205),li=Qt(67294),tn=({callback:en,onCancel:Je})=>{const be=document.createElement("canvas"),un=be.getContext("2d");be.width=1e3,be.height=800,un.fillStyle="#ffffff",un.fillRect(0,0,be.width,be.height);const fi=be.toDataURL("image/png");return li.createElement(Ve.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},li.createElement(In.Z,{style:{height:"100vh"}},li.createElement(Hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fi,visible:!0,title:String(Date.now())},onOk:mi=>{en({src:mi.url})},onClose:Je})))},Me=Qt(23495);function rn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(rn,go.CommandHandler),rn.prototype.canAlignSelection=function(){var en=this.diagram;return!(en===null||en.isReadOnly||en.isModelReadOnly||en.selection.count<2)},rn.prototype.alignLeft=function(){var en=this.diagram;en.startTransaction("aligning left");var Je=1/0;en.selection.each(function(be){be instanceof go.Link||(Je=Math.min(be.position.x,Je))}),en.selection.each(function(be){be instanceof go.Link||be.move(new go.Point(Je,be.position.y))}),en.commitTransaction("aligning left")},rn.prototype.alignRight=function(){var en=this.diagram;en.startTransaction("aligning right");var Je=-1/0;en.selection.each(function(be){if(!(be instanceof go.Link)){var un=be.actualBounds.x+be.actualBounds.width;Je=Math.max(un,Je)}}),en.selection.each(function(be){be instanceof go.Link||be.move(new go.Point(Je-be.actualBounds.width,be.position.y))}),en.commitTransaction("aligning right")},rn.prototype.alignTop=function(){var en=this.diagram;en.startTransaction("alignTop");var Je=1/0;en.selection.each(function(be){be instanceof go.Link||(Je=Math.min(be.position.y,Je))}),en.selection.each(function(be){be instanceof go.Link||be.move(new go.Point(be.position.x,Je))}),en.commitTransaction("alignTop")},rn.prototype.alignBottom=function(){var en=this.diagram;en.startTransaction("aligning bottom");var Je=-1/0;en.selection.each(function(be){if(!(be instanceof go.Link)){var un=be.actualBounds.y+be.actualBounds.height;Je=Math.max(un,Je)}}),en.selection.each(function(be){be instanceof go.Link||be.move(new go.Point(be.actualBounds.x,Je-be.actualBounds.height))}),en.commitTransaction("aligning bottom")},rn.prototype.alignCenterX=function(){var en=this.diagram,Je=en.selection.first();if(Je){en.startTransaction("aligning Center X");var be=Je.actualBounds.x+Je.actualBounds.width/2;en.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(be-un.actualBounds.width/2,un.actualBounds.y))}),en.commitTransaction("aligning Center X")}},rn.prototype.alignCenterY=function(){var en=this.diagram,Je=en.selection.first();if(Je){en.startTransaction("aligning Center Y");var be=Je.actualBounds.y+Je.actualBounds.height/2;en.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(un.actualBounds.x,be-un.actualBounds.height/2))}),en.commitTransaction("aligning Center Y")}},rn.prototype.alignColumn=function(en){var Je=this.diagram;Je.startTransaction("align Column"),en===void 0&&(en=0),en=parseFloat(en);var be=new Array;Je.selection.each(function(ee){ee instanceof go.Link||be.push(ee)});for(var un=0;un<be.length-1;un++){var fi=be[un],mi=fi.actualBounds.y+fi.actualBounds.height+en,ri=be[un+1];ri.move(new go.Point(fi.actualBounds.x,mi))}Je.commitTransaction("align Column")},rn.prototype.alignRow=function(en){en===void 0&&(en=0),en=parseFloat(en);var Je=this.diagram;Je.startTransaction("align Row");var be=new Array;Je.selection.each(function(ee){ee instanceof go.Link||be.push(ee)});for(var un=0;un<be.length-1;un++){var fi=be[un],mi=fi.actualBounds.x+fi.actualBounds.width+en,ri=be[un+1];ri.move(new go.Point(mi,fi.actualBounds.y))}Je.commitTransaction("align Row")},rn.prototype.canRotate=function(en){var Je=this.diagram;return!(Je===null||Je.isReadOnly||Je.isModelReadOnly||Je.selection.count<1)},rn.prototype.rotate=function(en){en===void 0&&(en=90);var Je=this.diagram;Je.startTransaction("rotate "+en.toString());var Je=this.diagram;Je.selection.each(function(be){be instanceof go.Link||be instanceof go.Group||(be.angle+=en)}),Je.commitTransaction("rotate "+en.toString())},rn.prototype.pullToFront=function(){var en=this.diagram;en.startTransaction("pullToFront");var Je=new go.Map;en.selection.each(function(be){Je.set(be.layer,0)}),Je.iteratorKeys.each(function(be){var un=0;be.parts.each(function(fi){if(!fi.isSelected){var mi=fi.zOrder;isNaN(mi)?fi.zOrder=0:un=Math.max(un,mi)}}),Je.set(be,un)}),en.selection.each(function(be){rn._assignZOrder(be,Je.get(be.layer)+1)}),en.commitTransaction("pullToFront")},rn.prototype.pushToBack=function(){var en=this.diagram;en.startTransaction("pushToBack");var Je=new go.Map;en.selection.each(function(be){Je.set(be.layer,0)}),Je.iteratorKeys.each(function(be){var un=0;be.parts.each(function(fi){if(!fi.isSelected){var mi=fi.zOrder;isNaN(mi)?fi.zOrder=0:un=Math.min(un,mi)}}),Je.set(be,un)}),en.selection.each(function(be){rn._assignZOrder(be,Je.get(be.layer)-1-rn._findGroupDepth(be))}),en.commitTransaction("pushToBack")},rn._assignZOrder=function(en,Je,be){be===void 0&&(be=en),en.layer===be.layer&&(en.zOrder=Je),en instanceof go.Group&&en.memberParts.each(function(un){rn._assignZOrder(un,Je+1,be)})},rn._findGroupDepth=function(en){if(en instanceof go.Group){var Je=0;return en.memberParts.each(function(be){Je=Math.max(Je,rn._findGroupDepth(be))}),Je+1}else return 0},rn.prototype.doKeyDown=function(){var en=this.diagram;if(en!==null){var Je=en.lastInput;if(Je.key==="Up"||Je.key==="Down"||Je.key==="Left"||Je.key==="Right"){var be=this.arrowKeyBehavior;if(be==="none")return;if(be==="select"){this._arrowKeySelect();return}else if(be==="move"){this._arrowKeyMove();return}else if(be==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},rn.prototype._getAllParts=function(){var en=new Array;return this.diagram.nodes.each(function(Je){en.push(Je)}),this.diagram.parts.each(function(Je){en.push(Je)}),en},rn.prototype._arrowKeyMove=function(){var en=this.diagram,Je=en.lastInput,be=0,un=0;if(Je.control||Je.meta)be=1,un=1;else if(en.grid!==null){var fi=en.grid.gridCellSize;un=fi.width,be=fi.height}en.startTransaction("arrowKeyMove"),en.selection.each(function(mi){Je.key==="Up"?mi.move(new go.Point(mi.actualBounds.x,mi.actualBounds.y-be)):Je.key==="Down"?mi.move(new go.Point(mi.actualBounds.x,mi.actualBounds.y+be)):Je.key==="Left"?mi.move(new go.Point(mi.actualBounds.x-un,mi.actualBounds.y)):Je.key==="Right"&&mi.move(new go.Point(mi.actualBounds.x+un,mi.actualBounds.y))}),en.commitTransaction("arrowKeyMove")},rn.prototype._arrowKeySelect=function(){var en=this.diagram,Je=en.lastInput,be=null;Je.key==="Up"?be=this._findNearestPartTowards(270):Je.key==="Down"?be=this._findNearestPartTowards(90):Je.key==="Left"?be=this._findNearestPartTowards(180):Je.key==="Right"&&(be=this._findNearestPartTowards(0)),be!==null&&(Je.shift?be.isSelected=!0:Je.control||Je.meta?be.isSelected=!be.isSelected:en.select(be))},rn.prototype._findNearestPartTowards=function(en){var Je=this.diagram.selection.first();if(Je===null)return null;for(var be=Je.actualBounds.center,un=this._getAllParts(),fi=1/0,mi=Je,ri=0;ri<un.length;ri++){var ee=un[ri];if(ee!==Je&&ee.canSelect()){var Cn=ee.actualBounds.center,Ti=be.directionPoint(Cn),Xi=this._angleCloseness(Ti,en);if(Xi<=45){var On=be.distanceSquaredPoint(Cn);On*=1+Math.sin(Xi*Math.PI/180),On<fi&&(fi=On,mi=ee)}}}return mi},rn.prototype._angleCloseness=function(en,Je){return Math.min(Math.abs(Je-en),Math.min(Math.abs(Je+360-en),Math.abs(Je-360-en)))},rn.prototype._arrowKeyTree=function(){var en=this.diagram,Je=en.selection.first();if(Je instanceof go.Node){var be=en.lastInput;if(be.key==="Right"){if(!Je.isTreeLeaf)if(!Je.isTreeExpanded)en.commandHandler.canExpandTree(Je)&&en.commandHandler.expandTree(Je);else{var un=this._sortTreeChildrenByY(Je).first();un!==null&&en.select(un)}}else if(be.key==="Left")if(!Je.isTreeLeaf&&Je.isTreeExpanded)en.commandHandler.canCollapseTree(Je)&&en.commandHandler.collapseTree(Je);else{var fi=Je.findTreeParentNode();fi!==null&&en.select(fi)}else if(be.key==="Up"){var fi=Je.findTreeParentNode();if(fi!==null){var mi=this._sortTreeChildrenByY(fi),ri=mi.indexOf(Je);if(ri>0){for(var ee=mi.elt(ri-1);ee!==null&&ee.isTreeExpanded&&!ee.isTreeLeaf;){var Cn=this._sortTreeChildrenByY(ee);ee=Cn.last()}ee!==null&&en.select(ee)}else en.select(fi)}}else if(be.key==="Down")if(Je.isTreeExpanded&&!Je.isTreeLeaf){var un=this._sortTreeChildrenByY(Je).first();un!==null&&en.select(un)}else for(;Je!==null;){var fi=Je.findTreeParentNode();if(fi===null)break;var mi=this._sortTreeChildrenByY(fi),ri=mi.indexOf(Je);if(ri<mi.length-1){en.select(mi.elt(ri+1));break}else Je=fi}var Ti=en.selection.first();Ti!==null&&en.scrollToRect(Ti.actualBounds)}},rn.prototype._sortTreeChildrenByY=function(en){var Je=new go.List().addAll(en.findTreeChildrenNodes());return Je.sort(function(be,un){var fi=be.location,mi=un.location;return fi.y<mi.y?-1:fi.y>mi.y?1:fi.x<mi.x?-1:fi.x>mi.x?1:0}),Je},rn.prototype.copyToClipboard=function(en){go.CommandHandler.prototype.copyToClipboard.call(this,en),this._lastPasteOffset.set(this.pasteOffset)},rn.prototype.pasteFromClipboard=function(){var en=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(en,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),en},Object.defineProperty(rn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(en){if(en!=="move"&&en!=="select"&&en!=="scroll"&&en!=="tree"&&en!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+en);this._arrowKeyBehavior=en}}),Object.defineProperty(rn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(en){if(!(en instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+en);this._pasteOffset.set(en)}});var Dn=rn,sn=Qt(18023),Vt=Qt(15746),Pt=Qt(33170),mt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},vt=Qt(52262),kt=Qt(67294),Lt=(en,Je,be)=>new Promise((un,fi)=>{var mi=Cn=>{try{ee(be.next(Cn))}catch(Ti){fi(Ti)}},ri=Cn=>{try{ee(be.throw(Cn))}catch(Ti){fi(Ti)}},ee=Cn=>Cn.done?un(Cn.value):Promise.resolve(Cn.value).then(mi,ri);ee((be=be.apply(en,Je)).next())});function _t({onCancel:en,callback:Je}){let be=(0,xt.useRef)(),un=(0,xt.useRef)(),fi=(0,xt.useRef)(),mi=(0,xt.useRef)(!1);const ri=(0,xt.useRef)(!1),[ee,Cn]=(0,xt.useState)(0);function Ti(){const On=Me.bx.make,Ge={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"};be.current=new Me.S0(un.current,{padding:20,grid:On(Me.s_,"Grid",On(Me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),On(Me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Te=>{var Mi=Te.diagram.commandHandler.addTopLevelParts(Te.diagram.selection,!0);Mi||Te.diagram.currentTool.doCancel()},commandHandler:On(Dn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Te=>{var Mi=Te.subject;Mi.location=Mi.location.copy().snapToGridPoint(Te.diagram.grid.gridOrigin,Te.diagram.grid.gridCellSize),setTimeout(()=>{Te.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Te=>{var Mi=Te.subject;setTimeout(()=>{Te.diagram.commandHandler.editTextBlock()})},LinkRelinked:Te=>{var Mi=Te.parameter.part;Mi.invalidateConnectedLinks();var Ri=Te.subject;Te.diagram.toolManager.linkingTool.isForwards?Ri.toNode.invalidateConnectedLinks():Ri.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),be.current.nodeTemplate=On(Me.NB,"Auto",{locationSpot:Me.z6.Center,locationObjectName:"SHAPE",desiredSize:new Me.$u(120,60),minSize:new Me.$u(40,40),resizable:!0,resizeCellSize:new Me.$u(10,10),rotatable:!0},new Me.KX("location","loc",Me.E9.parse).makeTwoWay(Me.E9.stringify),new Me.KX("desiredSize","size",Me.$u.parse).makeTwoWay(Me.$u.stringify),On(Me.bn,{name:"SHAPE",fill:Ge.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Me.z6.AllSides,toSpot:Me.z6.AllSides},new Me.KX("figure"),new Me.KX("fill"),new Me.KX("stroke","borderColor"),new Me.KX("strokeWidth","thickness"),new Me.KX("strokeDashArray","dash")),On(Me.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),On(Me.al,{margin:1,textAlign:"center",overflow:Me.al.OverflowEllipsis,editable:!0},new Me.KX("text").makeTwoWay(),new Me.KX("stroke","color"))),be.current.nodeTemplate.toolTip=On("ToolTip",On(Me.s_,"Vertical",{maxSize:new Me.$u(200,NaN)},On(Me.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Me.KX("text")),On(Me.al,{font:"10pt sans-serif",textAlign:"center"},new Me.KX("text","details"))));function Si(Te,Mi){var Ri=(yi,Nr)=>{yi.handled=!0,yi.diagram.model.commit(qi=>{var ci=Nr.part.adornedPart,Bi=new Me.E9().setRectSpot(ci.actualBounds,Te);Bi.subtract(ci.location),Bi.scale(2,2),Bi.x+=Math.sign(Bi.x)*130,Bi.y+=Math.sign(Bi.y)*130,Bi.add(ci.location),Bi.snapToGridPoint(yi.diagram.grid.gridOrigin,yi.diagram.grid.gridCellSize);var Qi=qi.copyNodeData(ci.data);qi.setGroupKeyForNodeData(Qi,qi.getGroupKeyForNodeData(ci.data)),qi.addNodeData(Qi);var Ar={from:ci.key,to:qi.getKeyForNodeData(Qi)};qi.addLinkData(Ar);var cn=yi.diagram.findNodeForData(Qi);cn.location=Bi,yi.diagram.select(cn),setTimeout(()=>{yi.diagram.commandHandler.editTextBlock()},20)})};return On(Me.bn,{figure:Mi,alignment:Te,alignmentFocus:Te.opposite(),width:Te.equals(Me.z6.Top)||Te.equals(Me.z6.Bottom)?25:18,height:Te.equals(Me.z6.Top)||Te.equals(Me.z6.Bottom)?18:25,fill:"orange",stroke:Ge.white,strokeWidth:4,mouseEnter:(yi,Nr)=>Nr.fill="dodgerblue",mouseLeave:(yi,Nr)=>Nr.fill="orange",isActionable:!0,click:Ri,contextClick:Ri})}function Zi(Te){return On(Me.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Mi,Ri)=>Ri.fill="dodgerblue",mouseLeave:(Mi,Ri)=>Ri.fill="orange",click:(Mi,Ri)=>{Mi.diagram.commandHandler.showContextMenu(Ri.part.adornedPart)}},Te||{})}be.current.nodeTemplate.selectionAdornmentTemplate=On(Me.uz,"Spot",On(Me.Vm,{padding:10}),Si(Me.z6.Top,"TriangleUp"),Si(Me.z6.Left,"TriangleLeft"),Si(Me.z6.Right,"TriangleRight"),Si(Me.z6.Bottom,"TriangleDown"),Zi({alignment:new Me.z6(.75,0)}));function ur(Te,Mi){return(Ri,yi)=>{Ri.handled=!0,Ri.diagram.model.commit(Nr=>{Nr.set(yi.part.adornedPart.data,Te,Mi)})}}function Ln(Te,Mi){return Mi||(Mi="color"),On(Me.bn,{width:16,height:16,stroke:"lightgray",fill:Te,margin:1,background:"transparent",mouseEnter:(Ri,yi)=>yi.stroke="dodgerblue",mouseLeave:(Ri,yi)=>yi.stroke="lightgray",click:ur(Mi,Te),contextClick:ur(Mi,Te)})}function Ui(){return[On("ContextMenuButton",On(Me.s_,"Horizontal",Ln(Ge.white,"fill"),Ln(Ge.beige,"fill"),Ln(Ge.extralightblue,"fill"),Ln(Ge.extralightred,"fill"))),On("ContextMenuButton",On(Me.s_,"Horizontal",Ln(Ge.lightgray,"fill"),Ln(Ge.lightgreen,"fill"),Ln(Ge.lightblue,"fill"),Ln(Ge.lightred,"fill")))]}function pe(){return[On("ContextMenuButton",On(Me.s_,"Horizontal",Ln(Ge.black),Ln(Ge.green),Ln(Ge.blue),Ln(Ge.red))),On("ContextMenuButton",On(Me.s_,"Horizontal",Ln(Ge.white),Ln(Ge.magenta),Ln(Ge.purple),Ln(Ge.orange)))]}function Fe(Te,Mi){return Mi||(Mi="thickness"),On(Me.bn,"LineH",{width:16,height:16,strokeWidth:Te,margin:1,background:"transparent",mouseEnter:(Ri,yi)=>yi.background="dodgerblue",mouseLeave:(Ri,yi)=>yi.background="transparent",click:ur(Mi,Te),contextClick:ur(Mi,Te)})}function Ke(Te,Mi){return Mi||(Mi="dash"),On(Me.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Te,margin:1,background:"transparent",mouseEnter:(Ri,yi)=>yi.background="dodgerblue",mouseLeave:(Ri,yi)=>yi.background="transparent",click:ur(Mi,Te),contextClick:ur(Mi,Te)})}function ve(){return[On("ContextMenuButton",On(Me.s_,"Horizontal",Fe(1),Fe(2),Fe(3),Fe(4))),On("ContextMenuButton",On(Me.s_,"Horizontal",Ke(null),Ke([2,4]),Ke([4,4])))]}function Ee(Te,Mi){return Mi||(Mi="figure"),On(Me.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Te,margin:1,background:"transparent",mouseEnter:(Ri,yi)=>yi.fill="dodgerblue",mouseLeave:(Ri,yi)=>yi.fill="lightgray",click:ur(Mi,Te),contextClick:ur(Mi,Te)})}be.current.nodeTemplate.contextMenu=On("ContextMenu",On("ContextMenuButton",On(Me.s_,"Horizontal",Ee("Rectangle"),Ee("RoundedRectangle"),Ee("Ellipse"),Ee("Diamond"))),On("ContextMenuButton",On(Me.s_,"Horizontal",Ee("Parallelogram2"),Ee("ManualOperation"),Ee("Procedure"),Ee("Cylinder1"))),On("ContextMenuButton",On(Me.s_,"Horizontal",Ee("Terminator"),Ee("CreateRequest"),Ee("Document"),Ee("TriangleDown"))),Ui(),pe(),ve()),be.current.groupTemplate=On(Me.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Me.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Te,Mi)=>{var Ri=Mi.addMembers(Mi.diagram.selection,!0);Ri||Mi.diagram.currentTool.doCancel()},avoidable:!1},new Me.KX("location","loc",Me.E9.parse).makeTwoWay(Me.E9.stringify),On(Me.s_,"Auto",{name:"BODY"},On(Me.bn,{parameter1:10,fill:Ge.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Me.z6.AllSides,toSpot:Me.z6.AllSides},new Me.KX("fill"),new Me.KX("stroke","color"),new Me.KX("strokeWidth","thickness"),new Me.KX("strokeDashArray","dash")),On(Me.Vm,{background:"transparent",margin:20})),On(Me.al,{alignment:Me.z6.Top,alignmentFocus:Me.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Me.KX("text"),new Me.KX("stroke","color"))),be.current.groupTemplate.selectionAdornmentTemplate=On(Me.uz,"Spot",On(Me.s_,"Auto",On(Me.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),On(Me.Vm,{margin:1.5})),Zi({alignment:Me.z6.TopRight,alignmentFocus:Me.z6.BottomRight})),be.current.groupTemplate.contextMenu=On("ContextMenu",Ui(),pe(),ve()),be.current.linkTemplate=On(Me.rU,{layerName:"Foreground",routing:Me.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Me.KX("fromSpot","fromSpot",Me.z6.parse),new Me.KX("toSpot","toSpot",Me.z6.parse),new Me.KX("fromShortLength","dir",Te=>Te>=1?10:0),new Me.KX("toShortLength","dir",Te=>Te>=1?10:0),new Me.KX("points").makeTwoWay(),On(Me.bn,{strokeWidth:2},new Me.KX("stroke","color"),new Me.KX("strokeWidth","thickness"),new Me.KX("strokeDashArray","dash")),On(Me.bn,{segmentIndex:0,segmentOffset:new Me.E9(15,0),segmentOrientation:Me.rU.OrientAlong,alignmentFocus:Me.z6.Right,figure:"circle",width:10,strokeWidth:0},new Me.KX("fill","color"),new Me.KX("visible","dir",Te=>Te===1)),On(Me.bn,{segmentIndex:-1,segmentOffset:new Me.E9(-10,6),segmentOrientation:Me.rU.OrientPlus90,alignmentFocus:Me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Me.KX("fill","color"),new Me.KX("visible","dir",Te=>Te>=1),new Me.KX("width","thickness",Te=>7+3*Te),new Me.KX("height","thickness",Te=>7+3*Te),new Me.KX("segmentOffset","thickness",Te=>new Me.E9(-15,4+1.5*Te))),On(Me.bn,{segmentIndex:0,segmentOffset:new Me.E9(15,-6),segmentOrientation:Me.rU.OrientMinus90,alignmentFocus:Me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Me.KX("fill","color"),new Me.KX("visible","dir",Te=>Te===2),new Me.KX("width","thickness",Te=>7+3*Te),new Me.KX("height","thickness",Te=>7+3*Te),new Me.KX("segmentOffset","thickness",Te=>new Me.E9(-15,4+1.5*Te))),On(Me.al,{alignmentFocus:new Me.z6(0,1,-4,0),editable:!0},new Me.KX("text").makeTwoWay(),new Me.KX("stroke","color"))),be.current.linkTemplate.selectionAdornmentTemplate=On(Me.uz,On(Me.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:_e(2)},new Me.KX("pathPattern","thickness",_e)),Zi({alignmentFocus:new Me.z6(0,0,-6,-4)}));function _e(Te){return On(Me.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Te+4).toString()+" H3"})}function Sn(Te){var Mi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Te===0?Mi="M0 0 M16 16 M0 8 L16 8":Te===2&&(Mi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),On(Me.bn,{geometryString:Mi,margin:2,background:"transparent",mouseEnter:(Ri,yi)=>yi.background="dodgerblue",mouseLeave:(Ri,yi)=>yi.background="transparent",click:ur("dir",Te),contextClick:ur("dir",Te)})}function ei(Te){var Mi=(Ri,yi)=>{Ri.handled=!0,Ri.diagram.model.commit(Nr=>{var qi=yi.part.adornedPart;Nr.set(qi.data,Te?"toSpot":"fromSpot",Me.z6.stringify(Me.z6.AllSides)),(Te?qi.toNode:qi.fromNode).invalidateConnectedLinks()})};return On(Me.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ri,yi)=>yi.background="dodgerblue",mouseLeave:(Ri,yi)=>yi.background="transparent",click:Mi,contextClick:Mi})}function Xe(Te,Mi){var Ri=0,yi=Me.z6.RightSide;Te.equals(Me.z6.Top)?(Ri=270,yi=Me.z6.TopSide):Te.equals(Me.z6.Left)?(Ri=180,yi=Me.z6.LeftSide):Te.equals(Me.z6.Bottom)&&(Ri=90,yi=Me.z6.BottomSide),Mi||(Ri-=180);var Nr=(qi,ci)=>{qi.handled=!0,qi.diagram.model.commit(Bi=>{var Qi=ci.part.adornedPart;Bi.set(Qi.data,Mi?"toSpot":"fromSpot",Me.z6.stringify(yi)),(Mi?Qi.toNode:Qi.fromNode).invalidateConnectedLinks()})};return On(Me.bn,{alignment:Te,alignmentFocus:Te.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ri,background:"transparent",mouseEnter:(qi,ci)=>ci.background="dodgerblue",mouseLeave:(qi,ci)=>ci.background="transparent",click:Nr,contextClick:Nr})}be.current.linkTemplate.contextMenu=On("ContextMenu",pe(),ve(),On("ContextMenuButton",On(Me.s_,"Horizontal",Sn(0),Sn(1),Sn(2))),On("ContextMenuButton",On(Me.s_,"Horizontal",On(Me.s_,"Spot",ei(!1),Xe(Me.z6.Top,!1),Xe(Me.z6.Left,!1),Xe(Me.z6.Right,!1),Xe(Me.z6.Bottom,!1)),On(Me.s_,"Spot",{margin:new Me.Zt(0,0,0,2)},ei(!0),Xe(Me.z6.Top,!0),Xe(Me.z6.Left,!0),Xe(Me.z6.Right,!0),Xe(Me.z6.Bottom,!0)))));const Fn=`{ "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 si=["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 Gi(Te){return console.log("shapeName:",Te),si.indexOf(Te)>=0}var Ji=new Me.YI(fi.current,{maxSelectionCount:1,linkTemplate:On(Me.rU,{locationSpot:Me.z6.Center,selectionAdornmentTemplate:On(Me.uz,"Link",{locationSpot:Me.z6.Center},On(Me.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),On(Me.bn,{toArrow:"Standard",stroke:null}))},{routing:Me.rU.AvoidsNodes,curve:Me.rU.JumpOver,corner:5,toShortLength:4},new Me.KX("points"),On(Me.bn,{isPanelMain:!0,strokeWidth:2}),On(Me.bn,{toArrow:"Standard",stroke:null})),model:new Me.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Me.bn.getFigureGenerators().toArray().map(Te=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Te.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return be.current.addDiagramListener("TextEdited",function(Te){var Mi;const Ri=Te.subject.part;var yi=(Mi=document.activeElement)==null?void 0:Mi.value;typeof yi=="string"&&yi.trim()===""&&be.current.model.commit(function(Nr){Nr.set(Ri.data,"text","\u672A\u547D\u540D"),be.current.commandHandler.stopCommand()},"increment")}),Ji.nodeTemplate=On(Me.NB,"Auto",{locationSpot:Me.z6.Center},new Me.KX("location","location",Me.E9.parse).makeTwoWay(Me.E9.stringify),On(Me.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Me.KX("stroke").makeTwoWay(),new Me.KX("fill").makeTwoWay(),new Me.KX("figure")),On(Me.al,{margin:new Me.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Me.$u(16,16),maxSize:new Me.$u(10,NaN),textAlign:"center",editable:!0},new Me.KX("key").makeTwoWay())),setTimeout(()=>{be.current.grid=On(Me.s_,"Grid",On(Me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),On(Me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),be.current.grid.visible=!0,be.current.grid.gridCellStroke="darkgray",be.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=be.current,be.current}const Xi=()=>Lt(this,null,function*(){var On,Ge=be.current.makeImage();const Si=yield(0,Pt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ge.src,file_data:JSON.stringify({login:(On=(0,vt.eY)())==null?void 0:On.login,data:JSON.parse(be.current.model.toJson())})}});Je({src:Si.url})});return(0,xt.useEffect)(()=>(setTimeout(()=>{Ti()},500),Cn(ee+1),()=>{be.current=null}),[]),kt.createElement("div",{ref:ri,className:"body-overflow-initial"},kt.createElement(Ve.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ee,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:kt.createElement(In.Z,null,kt.createElement(Vt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),kt.createElement(Vt.Z,{onClick:()=>{var On,Ge,Si=be.current.selection.first();if(mi.current=!mi.current,document.activeElement&&Si){let Zi=(Ge=(On=document.activeElement)==null?void 0:On.value)==null?void 0:Ge.trim();typeof Zi=="string"&&be.current.model.commit(function(ur){ur.set(Si.data,"text",Zi||"\u672A\u547D\u540D"),be.current.commandHandler.stopCommand()},"increment")}Cn(ee+1)}},kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:en},kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:mi.current?"none":"block"},className:mt.flowChartWrp},kt.createElement("div",{style:{display:"flex",height:"100%"}},kt.createElement("div",{style:{width:"300px",height:"100%"}},kt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),kt.createElement("div",{style:{height:"calc(100% - 50px)"},className:mt.myPaletteDiv,ref:fi})),kt.createElement("div",{style:{flex:1,position:"relative"}},kt.createElement("div",{ref:un,style:{height:"80vh"}}))),kt.createElement("div",{className:"tr"},kt.createElement(Ce.ZP,{size:"large",onClick:Xi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var De=_t,on=Qt(98813),mn=Qt(37720);const $e=on.ZP.Group,Bn={margin:"0 8px"};var Re=({callback:en,onCancel:Je})=>{function be(un){en(un)}return xt.createElement(re.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:be},xt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},xt.createElement("span",{style:Bn},"\u5355\u5143\u683C\u6570\uFF1A"),xt.createElement("span",{style:Bn},"\u884C\u6570"),xt.createElement(re.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},xt.createElement(mn.Z,null)),xt.createElement("span",{style:Bn},"\u5217\u6570"),xt.createElement(re.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},xt.createElement(mn.Z,null))),xt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},xt.createElement("span",{style:Bn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),xt.createElement(re.default.Item,{name:"align"},xt.createElement($e,null,xt.createElement(on.ZP,{value:"default"},xt.createElement("i",{className:"fa fa-align-justify"})),xt.createElement(on.ZP,{value:"left"},xt.createElement("i",{className:"fa fa-align-left"})),xt.createElement(on.ZP,{value:"center"},xt.createElement("i",{className:"fa fa-align-center"})),xt.createElement(on.ZP,{value:"right"},xt.createElement("i",{className:"fa fa-align-right"}))))),xt.createElement("div",{className:"flex-container flex-end"},xt.createElement(Ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),xt.createElement(Ce.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},Mn=Qt(59637),Kn=Qt(61016),Fi=Qt.n(Kn),sr=(0,xt.forwardRef)(({use3d:en,width:Je,height:be,callback:un,showSaveButton:fi},mi)=>{const ri=(0,xt.useRef)(),ee=(0,xt.useRef)(),[Cn,Ti]=(0,xt.useState)(!1),Xi=(0,xt.useRef)({id:ri,appName:"graphing",width:Je||1e3,height:be||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,xt.useEffect)(()=>{ee.current=new(Fi())(Xi.current,!0),window.onload=function(){ee.current.inject("applet_container")}},[]);const On=()=>{var Ge=window.ggbApplet.getPNGBase64(1,!0,72);return un&&un(Ge),Ge};return(0,xt.useEffect)(()=>{Xi.current.appName=Cn?"3D":"graphing",ee.current.inject("applet_container")},[Cn]),(0,xt.useEffect)(()=>{Ti(en)},[en]),(0,xt.useImperativeHandle)(mi,()=>({getImgData:On})),xt.createElement(xt.Fragment,null,xt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ri}),xt.createElement(In.Z,{align:"middle"},xt.createElement(Vt.Z,{flex:1},xt.createElement(Mn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Cn,onChange:Ge=>Ti(Ge)})),xt.createElement(Vt.Z,null,xt.createElement(Ce.ZP,{size:"large",onClick:On,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),rr=Qt(36527),xi=Qt(2453);const wi="link",Ir="upload-image",ji="add-flowchart",yr="draw-image",xr="add-flowchart",Qr="code-block",Ii="add-table",br="------------",Sr={default:br,left:`:${br}`,center:`:${br}:`,right:`${br}:`};var Bo=Qt(99914);function er(){}let Lo=0;const ys=1e4,Mo="\u2581",Lr="@\u2581\u2581@",Pn="@\u2581@",Mt=`
**\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`,jn=["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 kn(en){return/^\d+$/.test(en)?`${en}px`:en}const Wn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",qn={[Wn+"-B"]:"bold",[Wn+"-I"]:"italic"},ui={[wi]:"\u6DFB\u52A0\u94FE\u63A5",[Qr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ir]:"\u6DFB\u52A0\u56FE\u7247",[yr]:"\u6DFB\u52A0\u753B\u56FE",[ji]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ii]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Wi=({defaultValue:en="",onChange:Je,width:be="100%",height:un=400,miniToolbar:fi=!1,isFocus:mi=!1,watch:ri,insertTemp:ee,mode:Cn="markdown",id:Ti="markdown-editor-id",showResizeBar:Xi=!1,noStorage:On=!1,showNullButton:Ge=!1,showNullProgramButton:Si=!1,hidetoolBar:Zi=!1,fullScreen:ur=!1,onBlur:Ln,onCMBeforeChange:Ui,onFullScreen:pe,className:Fe="",disablePaste:Ke=!1,disabled:ve=!1,disabledFill:Ee=!1,placeholder:_e="",values:Sn="",extraUse:ei})=>{const[Xe,Fn]=(0,xt.useState)(null),[si,Gi]=(0,xt.useState)(en),[Ji,Te]=(0,xt.useState)(ri),[Mi,Ri]=(0,xt.useState)(ur),[yi,Nr]=(0,xt.useState)(""),[qi,ci]=(0,xt.useState)(0),[Bi,Qi]=(0,xt.useState)(un),[Ar,cn]=(0,xt.useState)(!1),[$i,dn]=(0,xt.useState)(0),[or,is]=(0,xt.useState)(0),qr=(0,xt.useRef)(),rs=(0,xt.useRef)(),ro=(0,xt.useRef)(),Ur=(0,xt.useRef)();(0,xt.useEffect)(()=>{const Oi=window.scrollY||window.pageYOffset;Gi(Sn),Xe==null||Xe.setValue(Sn),window.scrollTo(0,Oi)},[Sn]),(0,xt.useEffect)(()=>{pe==null||pe(Mi)},[Mi]),(0,xt.useEffect)(()=>{if(qr.current){let Oi=function(hr,ln){var cr;if(Ke){ln.preventDefault();return}const Wr=ln.clipboardData;if(Wr){const Ko=Wr.types.toString(),Go=Wr.items;if(Ko==="Files"||Wr.types.indexOf("Files")>-1){if(ln.preventDefault(),Cn=="stex")return;try{let ws=Go[1];((cr=Go[0])==null?void 0:cr.kind)==="file"&&(ws=Go[0]);const Zs=ws.getAsFile(),Qa=Zs.name.split(".").pop();(0,Xn.I)(Zs,Na=>{var nl,Vl,nn;Na.id?((nl=Zs==null?void 0:Zs.type)==null?void 0:nl.indexOf("image"))>-1?bi.replaceSelection(`<img width="100%" src="/api/attachments/${Na.id}?type=${Na.content_type})" alt="" />`):((Vl=Zs==null?void 0:Zs.type)==null?void 0:Vl.indexOf("video"))>-1?bi.replaceSelection(`<video width="100%" controls src="/api/attachments/${Na.id}"></video>`):((nn=Zs==null?void 0:Zs.type)==null?void 0:nn.indexOf("pdf"))>-1?bi.replaceSelection(`<a href="/api/attachments/${Na.id}?type=${Zs.type}&disposition=inline" target="_blank">${Zs.name}</a>`):jn.includes(Qa)?bi.replaceSelection(`<a href="/api/attachments/${Na.id}?type=office&disposition=inline" target="_blank">${Zs.name}</a>`):bi.replaceSelection(`[${Zs.name}](/api/attachments/${Na.id}?type=${Na.content_type})`):(Na==null?void 0:Na.status)===401&&(document.location.href="/user/login")})}catch(ws){xi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const bi=he().fromTextArea(qr.current,{mode:Cn,lineNumbers:!fi,lineWrapping:!0,value:en,autoCloseTags:!0,autoCloseBrackets:!0});return bi.on("keyup",function(hr,ln){ln.keyCode===8&&(hr.getValue()==""?bi.setOption("placeholder",_e):bi.setOption("placeholder",null))}),bi.on("keydown",function(hr,ln){if(ln.keyCode===8){var cr=Wo(hr);cr&&ln.preventDefault()}}),mi&&bi.focus(),bi.on("paste",Oi),ve&&bi.on("beforeChange",function(hr,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),Fn(bi),()=>{bi.off("paste",Oi)}}},[]);const Or=(0,xt.useCallback)(()=>{if(rs.current)try{}catch(Oi){console.log(Oi,"---- to set md editor body height")}},[Bi,rs,Mi]);(0,xt.useEffect)(()=>{function Oi(){let bi=new xe.Z(hr=>{for(let ln of hr)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Or(),Xe.setSize("100%","100%"),Xe.refresh())});return bi.observe(qr.current.parentElement),bi}if(Xe){const bi=Oi();return()=>{var hr,ln;(hr=qr.current)!=null&&hr.parentElement&&bi.unobserve((ln=qr.current)==null?void 0:ln.parentElement)}}},[Xe,Or]),(0,xt.useEffect)(()=>{if(Xe){let Oi=[];for(const[bi,hr]of Object.entries(qn)){let ln={[bi]:()=>{oo(hr)}};Oi.push(ln),Xe.addKeyMap(ln)}return()=>{for(let bi of Oi)Xe.removeKeyMap(bi)}}},[Xe]),(0,xt.useEffect)(()=>{ur!==Mi&&Ri(ur)},[ur]),(0,Bo.Z)(()=>{if(!On&&qi>0){let Oi=new Date().getTime(),bi=window.sessionStorage.getItem(Ti);Oi>=qi+ys&&(!bi||bi!==si)&&(window.sessionStorage.setItem(Ti,si),cn(!0))}},ys),(0,xt.useEffect)(()=>{Te(ri)},[Xe,ri]),(0,xt.useEffect)(()=>{Xe&&mi&&Xe.focus()},[Xe,mi]),(0,xt.useEffect)(()=>{if(Ji&&Xe){let Oi=function(hr){let ln=hr.target;if(Ur.current){let cr=ln.scrollTop/ln.scrollHeight;Ur.current.scrollTop=Ur.current.scrollHeight*cr}};const bi=Xe.getScrollerElement();return bi.addEventListener("scroll",Oi),()=>{bi.removeEventListener("scroll",Oi)}}},[Xe,Ji]),(0,xt.useEffect)(()=>{if(Xe&&Ui){let Oi=function(bi,hr){Ui(bi,hr)};return Xe.on("beforeChange",Oi),()=>{Xe.off("beforeChange",Oi)}}},[Xe,Ui]),(0,xt.useEffect)(()=>{if(Xe&&Ln){let Oi=function(){Ln(Xe.getValue())};return Xe.on("blur",Oi),()=>{Xe.off("blur",Oi)}}},[Xe,Ln]);function Wo(Oi,bi){var hr=Oi.getDoc(),ln=hr.getCursor(),cr=hr.getLine(ln.line),Wr=cr.charAt(ln.ch-1),Ko=cr.lastIndexOf("@\u2581@",ln.ch),Go=cr.lastIndexOf("@\u2581\u2581@",ln.ch),ws=Ko>Go?Ko:Go,Zs=Ko>Go?3:4;if(Lr.indexOf(Wr)===-1)return null;if(console.log("change1:",bi,Oi,cr,ln,ws,Ko,Go,Wr),ws>=0&&ln.ch-ws<5){var Qa=ws+Zs;return hr.replaceRange("",{line:ln.line,ch:ws},{line:ln.line,ch:Qa}),{line:ln.line,ch:Qa}}return null}(0,xt.useEffect)(()=>{if(Xe){let Oi=function(bi,hr){const ln=bi.getValue();Gi(ln),ci(new Date().getTime()),bi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Je&&(Si?Je(ln,pa(ln)):Je(ln))};return Xe.on("change",Oi),()=>{Xe.off("change",Oi)}}},[Xe,Je]),(0,xt.useEffect)(()=>{if(Xe)if(en==null)Xe.setValue(""),Gi("");else{const Oi=window.scrollY||window.pageYOffset;en!==Xe.getValue()&&(Xe.setValue(en),Gi(en),Xe.setCursor(ve?1:Xe.lineCount(),0),window.scrollTo(0,Oi))}},[Xe,en]);const oo=(0,xt.useCallback)(Oi=>{const bi=Xe.getCursor(),hr=Xe.getSelection();let ln=hr.split(`
`);switch(Oi){case"bold":return Xe.replaceSelection("**"+hr+"**"),hr===""&&Xe.setCursor(bi.line,bi.ch+2),Xe.focus();case"italic":return Xe.replaceSelection("*"+hr+"*"),hr===""&&Xe.setCursor(bi.line,bi.ch+1),Xe.focus();case"code":return Xe.replaceSelection("`"+hr+"`"),hr===""&&Xe.setCursor(bi.line,bi.ch+1),Xe.focus();case"inline-latex":return Nr("inline-latex"),Xe.focus();case"latex":return Xe.replaceSelection("```latex\n"+hr+"\n```"),Xe.setCursor(bi.line+1,hr.length+1),Xe.focus();case"line-break":return Xe.replaceSelection(`<br/>
`),Xe.focus();case"list-ul":return hr===""?Xe.replaceSelection("- "+hr):Xe.replaceSelection(ln.map(cr=>cr===""?"":`- ${cr}`).join(`
`)),Xe.focus();case"list-ol":return hr===""?Xe.replaceSelection("1. "+hr):Xe.replaceSelection(ln.map((cr,Wr)=>cr===""?"":`${Wr+1}. ${cr}`).join(`
`)),Xe.focus();case"add-null-ch":return hr===""&&Xe.setCursor(bi.line,bi.ch),Xe.replaceSelection(Mo),Xe.focus();case"add-signal":return hr===""&&Xe.setCursor(bi.line,bi.ch),Xe.replaceSelection(Pn),Xe.focus();case"add-multiple":return hr===""&&Xe.setCursor(bi.line,bi.ch),Xe.replaceSelection(Lr),Xe.focus();case"inster-template-1":return hr===""&&Xe.setCursor(bi.line,bi.ch),Xe.replaceSelection(Mt),Xe.focus();case"eraser":return Xe.setValue(""),Xe.focus();case"trigger-watch":return Te(!Ji),Xe.focus();case"trigger-full-screen":return Ri(!Mi),Xe.focus();case wi:Nr(wi);return;case Qr:Nr(Qr);return;case Ir:Nr(Ir);return;case yr:Nr(yr);return;case"maths-latex":Nr("maths-latex");return;case ji:Nr(ji);return;case Ii:Nr(Ii);return;default:throw new Error}},[Xe,Ji,Mi]),hi=(0,xt.useCallback)((Oi,bi)=>{var hr,ln,cr,Wr,Ko,Go;switch(Nr(""),yi){case wi:const{title:nl,link:Vl}=Oi;return Xe.replaceSelection(`[${nl}](${Vl})`),Xe.focus();case Qr:const{language:nn,content:il}=Oi;return Xe.replaceSelection(["```"+nn,il,"```"].join(`
`)),Xe.focus();case"maths-latex":for(var ws=atob(Oi),Zs=new Uint8Array(ws.length),Qa=0;Qa<ws.length;Qa++)Zs[Qa]=ws.charCodeAt(Qa);var Na=new Blob([Zs],{type:"image/png"});(0,Xn.I)(Na,Vr=>{Vr.id?Xe.replaceSelection(`![,](/api/attachments/${Vr.id}?type=${Vr.content_type})`):(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Xe.replaceSelection("`$$"+Oi+"$$`");break;case Ir:case yr:case xr:const{src:au,alt:Xu}=Oi,Ps=bi,lu=(cr=(ln=(hr=Ps==null?void 0:Ps.name)==null?void 0:hr.split("."))==null?void 0:ln.pop)==null?void 0:cr.call(ln);return((Wr=Ps==null?void 0:Ps.type)==null?void 0:Wr.indexOf("image"))>-1||!(Ps!=null&&Ps.type)?Ps!=null&&Ps.align||Ps!=null&&Ps.width?Xe.replaceSelection(`<p style="text-align:${Ps.align||"initial"}"><img width="${Ps.width?Ps.width+"%":"initial"}" src="${au}" alt="${Xu||""}" /></p>`):Xe.replaceSelection(`<img width="100%" src="${au}" alt="${Xu||""}" />`):((Ko=Ps==null?void 0:Ps.type)==null?void 0:Ko.indexOf("video"))>-1?Xe.replaceSelection(`<video width="100%" controls src="${au}"></video>`):((Go=Ps==null?void 0:Ps.type)==null?void 0:Go.indexOf("pdf"))>-1?Xe.replaceSelection(`<a href="${au}?type=${Ps.type}&disposition=inline" target="_blank">${Ps.name}</a>`):jn.includes(lu)?Xe.replaceSelection(`<a href="${au}?type=office&disposition=inline" target="_blank">${Ps.name}</a>`):Xe.replaceSelection(`[${Ps.name}](${au})`),Xe.focus();case Ii:const{row:cA,col:Ju,align:us}=Oi;let Ys=`
`;for(let Vr=0;Vr<cA;Vr++){let So=[],os=[];for(let ks=0;ks<Ju;ks++)Vr===1&&os.push(Sr[us]),So.push(" ");Vr===1&&(Ys+=`| ${os.join(" | ")} |
`),Ys+=`| ${So.join(Ju===1?"":" | ")} |
`}return Xe.replaceSelection(Ys+`
`),Xe.focus();default:throw new Error}},[Xe,yi]),Xt=(0,xt.useMemo)(()=>{switch(yi){case wi:return xt.createElement(We,{callback:hi,onCancel:An});case Qr:return xt.createElement(En.Z,{callback:hi,onCancel:An});case Ir:return xt.createElement(Xn.Z,{callback:hi,onCancel:An});case ji:return xt.createElement(De,{callback:hi,onCancel:An});case Ii:return xt.createElement(Re,{callback:hi,onCancel:An});case"maths-latex":return xt.createElement(sr,{showSaveButton:!0,callback:hi});case"inline-latex":return xt.createElement(rr.Z,{showSaveButton:!0,callback:hi});default:return null}},[yi]);function An(){Nr("")}(0,xt.useEffect)(()=>{if(ro.current){let Oi=function(Ko){cr=!0,Wr=Ko.pageY},bi=function(){cr=!1},hr=function(Ko){if(cr){let Go=Ko.pageY-Wr;Go<0&&(Go=0),Go>300&&(Go=300);let ws=un+Go+"px";Qi(ws)}},ln=ro.current,cr=!1,Wr=0;return ln.addEventListener("mousedown",Oi),document.addEventListener("mousemove",hr),document.addEventListener("mouseup",bi),()=>{ln.removeEventListener("mousedown",Oi),document.removeEventListener("mousemove",hr),document.removeEventListener("mouseup",bi)}}},[Xe,ro]),(0,xt.useEffect)(()=>{Qi(un)},[un]);const _s=kn(be),xs=kn(Bi),Xo={width:_s,height:xs},Ms=(0,xt.useMemo)(()=>{if(qi){let Oi=new Date(qi),bi=Oi.getHours(),hr=Oi.getMinutes(),ln=Oi.getSeconds();return bi=bi<10?"0"+bi:bi,hr=hr<10?"0"+hr:hr,ln=ln<10?"0"+ln:ln,`${bi}:${hr}:${ln}`}return 0},[qi]),pa=Oi=>{const bi=[];if(Si){let hr=-1;Oi=Oi.replace(/(@▁▁@|@▁@)/g,function(ln,cr,Wr){bi.push({multiLine:ln!==Pn})})}return bi};function _a(){window.sessionStorage.removeItem(Ti),cn(!1),ci(0)}function ma(){cn(!1),ci(0),Xe.setValue(window.sessionStorage.getItem(Ti))}(0,xt.useEffect)(()=>{ui[yi]&&yi!==yr&&yi!==ji&&setTimeout(()=>{const Oi=document.getElementsByClassName("markdown-popup-form")[0],bi=window.innerWidth/2-Oi.offsetWidth/2,hr=window.innerHeight/2-Oi.offsetHeight/2;dn(bi),is(hr)},0)},[yi]);const ki=Oi=>{Oi.preventDefault();const bi=Oi.clientX-$i,hr=Oi.clientY-or;document.body.onmousemove=ln=>{let cr=ln.clientX-bi,Wr=ln.clientY-hr;const Ko=document.getElementsByClassName("markdown-popup-form")[0],Go=window.innerWidth-Ko.offsetWidth,ws=window.innerHeight-Ko.offsetHeight;cr=Math.max(0,Math.min(cr,Go)),Wr=Math.max(0,Math.min(Wr,ws)),Tr(ln.clientX,ln.clientY,bi,hr)&&(dn(cr),is(Wr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Tr=(Oi,bi,hr,ln)=>{const cr=document.body.clientHeight,Wr=document.body.clientWidth;return Oi<20&&hr>Oi||Oi>Wr-20&&hr<Oi||bi<20&&ln>bi||bi>cr-20&&ln<bi?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return xt.createElement(xt.Fragment,null,xt.createElement("div",{className:"markdown-editor-wrapper",ref:rs},xt.createElement("div",{className:`markdown-editor-container ${Fe} ${Ji?"on-preview":""} ${fi?"mini":""} ${Mi?"full-screen":""}`,style:Xo},xt.createElement(Ht,{insertTemp:ee,watch:Ji,fullScreen:Mi,showNullButton:Ge,showNullProgramButton:Si,onActionCallback:oo,hidetoolBar:Zi,extraUse:ei}),xt.createElement("div",{className:"markdown-editor-body"},xt.createElement("div",{className:"codemirror-container"},xt.createElement("textarea",{ref:qr,placeholder:_e})),Ji?xt.createElement("div",{ref:Ur,className:"preview-container"},Cn==="stex"&&xt.createElement(de,{value:si}),Cn!=="stex"&&xt.createElement(ke.Z,{disabledFill:Ee,showProgramFill:Si,value:si})):null))),Xi?xt.createElement("a",{ref:ro,className:"editor-resize"}):null,yi===yr&&xt.createElement(tn,{callback:hi,onCancel:An}),yi===ji&&xt.createElement(De,{callback:hi,onCancel:An}),xt.createElement(Wt.Z,null,ui[yi]&&yi!==yr&&yi!==ji?xt.createElement(Ve.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:$i,top:or},title:xt.createElement("div",{style:{cursor:"move"},onMouseDown:ki},ui[yi]),open:!0,onCancel:An,footer:null,destroyOnClose:!0,width:yi===ji?"1200px":null,height:yi===ji?"80vh":null,className:"markdown-popup-form"},Xt):null))}},70859:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ot},I:function(){return Wt}});var xt=Qt(91773),Yt=Qt(2453),he=Qt(28802),xe=Qt(78957),ge=Qt(37720),Ut=Qt(98813),jt=Qt(85804),ne=Qt(15476),Ae=Qt(67294),se=Qt(67294),ke=Object.defineProperty,de=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ut=(re,te,Ce)=>te in re?ke(re,te,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):re[te]=Ce,at=(re,te)=>{for(var Ce in te||(te={}))nt.call(te,Ce)&&ut(re,Ce,te[Ce]);if(Dt)for(var Ce of Dt(te))et.call(te,Ce)&&ut(re,Ce,te[Ce]);return re},ht=(re,te)=>de(re,Ie(te));const{useForm:pt}=xt.default,St={width:280,marginRight:10},bt={labelCol:{span:5},wrapperCol:{span:19}};var Ot=({callback:re,onCancel:te})=>{const[Ce]=pt();let ce=(0,Ae.useRef)();function Qe(Qn){ce.current.width=Ce.getFieldValue("width"),ce.current.align=Ce.getFieldValue("align"),re(Qn,ce.current)}function je(Qn,Gn){if(Qn.status===-1){Yt.ZP.error(Qn.message);return}Ce.setFieldsValue({src:`/api/attachments/${Qn.id}`,type:Gn.type})}function He(Qn){let Gn=Qn.target.files[0];ce.current=Gn,Wt(Gn,je)}return se.createElement(xt.default,ht(at({form:Ce},bt),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),se.createElement(xt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},se.createElement("div",{className:"flex-container"},se.createElement(xt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},se.createElement(he.default,{style:St})),se.createElement(Ht,{onFileChange:He}))),se.createElement(xt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},se.createElement(he.default,{style:{width:264}})),se.createElement(xt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},se.createElement(xe.Z,null,se.createElement(xt.default.Item,{name:"width",style:{margin:0}},se.createElement(ge.Z,{style:{width:264}})),se.createElement("span",{className:"ml8"},"%"))),se.createElement(xt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},se.createElement(Ut.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(xt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},se.createElement(jt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(jt.ZP,{type:"default",onClick:te},"\u53D6\u6D88"))))};function Ht({onFileChange:re}){return se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",se.createElement("input",{type:"file",onChange:re}))}function Wt(re,te){if(!re)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ce=new FormData;Ce.append("editormd-image-file",re),Ce.append("file_param_name","editormd-image-file"),Ce.append("byxhr","true");var ce=new window.XMLHttpRequest;ce.withCredentials=!0,ce.addEventListener("load",function(Qe){te(JSON.parse(Qe.target.responseText),re)},!1),ce.addEventListener("error",function(Qe){console.error(Qe)},!1),ce.open("POST",`${ne.KI}/api/attachments.json`),ce.send(Ce)}},76621:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return he}});var xt=Qt(67294),Yt=Qt(73935);class he extends xt.Component{constructor(ge){super(ge);const Ut=window.document;this.node=Ut.createElement("div"),Ut.body.appendChild(this.node)}render(){const{children:ge}=this.props;return(0,Yt.createPortal)(ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(gn,ze,Qt){"use strict";Qt.d(ze,{SV:function(){return Me},ZP:function(){return tn}});var xt=Qt(67294),Yt=Qt(91033);const he={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"]},xe={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"]},ge={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(`
`)}]},Ut={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(`
`)}]},jt={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 ne=Qt(84204),Ae=Qt.n(ne),se=(rn,Dn,sn)=>new Promise((Vt,Pt)=>{var mt=Lt=>{try{kt(sn.next(Lt))}catch(_t){Pt(_t)}},vt=Lt=>{try{kt(sn.throw(Lt))}catch(_t){Pt(_t)}},kt=Lt=>Lt.done?Vt(Lt.value):Promise.resolve(Lt.value).then(mt,vt);kt((sn=sn.apply(rn,Dn)).next())});const ke={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"]}},de=(rn,Dn,sn,Vt)=>{const Pt=Dn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:sn.lineNumber,endColumn:sn.column});return Array.from(new Set(Pt.match(/\b\w{2,}\b/g)||[])).map(vt=>({label:vt,kind:rn.languages.CompletionItemKind.Text,insertText:vt,range:Vt}))},Ie=(rn,Dn,sn,Vt)=>{rn.languages.registerCompletionItemProvider(Dn,{provideCompletionItems(Pt,mt){const vt=Pt.getWordUntilPosition(mt),kt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:vt.startColumn,endColumn:vt.endColumn},Lt=Pt.getLineContent(mt.lineNumber).substring(vt.startColumn-2,vt.endColumn);return{suggestions:[...de(rn,Pt,mt,kt),...sn.map(De=>({label:De,kind:rn.languages.CompletionItemKind.Keyword,documentation:De,insertText:De,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kt})),...Vt.map(De=>({label:De.label,kind:rn.languages.CompletionItemKind.Snippet,documentation:De.content,insertText:Lt.startsWith("#")?De.content.replace(/#/,""):De.content,insertTextRules:rn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kt}))]}}})};var Dt=rn=>{ke.languages.forEach(Dn=>{rn.languages.registerDocumentFormattingEditProvider(Dn,{provideDocumentFormattingEdits(sn){return se(this,null,function*(){const Vt=Ae()(sn.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:sn.getFullModelRange(),text:Vt}]})}})}),Ie(rn,"java",xe.keywords,xe.quickKey),Ie(rn,"cpp",ge.keywords,ge.quickKey),Ie(rn,"c",he.keywords,[]),Ie(rn,"python",Ut.keywords,Ut.quickKey),Ie(rn,"scala",jt.keywords,jt.quickKey)};const nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var et=Object.defineProperty,ut=(rn,Dn,sn)=>Dn in rn?et(rn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:sn}):rn[Dn]=sn,at=(rn,Dn,sn)=>ut(rn,typeof Dn!="symbol"?Dn+"":Dn,sn);const ht=class Bw{constructor(Dn,sn,Vt){this.placeholder=Dn,this.editor=sn,this.monaco=Vt,sn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Bw.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)}};at(ht,"ID","editor.widget.placeholderHint");var St=ht,bt=Qt(84144),Ot=Qt(2453),Ht=Qt(83062),Wt=Qt(96486),re=Qt(33054),te=Qt(74855),Ce=Object.defineProperty,ce=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable,Gn=(rn,Dn,sn)=>Dn in rn?Ce(rn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:sn}):rn[Dn]=sn,Yn=(rn,Dn)=>{for(var sn in Dn||(Dn={}))He.call(Dn,sn)&&Gn(rn,sn,Dn[sn]);if(je)for(var sn of je(Dn))Qn.call(Dn,sn)&&Gn(rn,sn,Dn[sn]);return rn},di=(rn,Dn)=>ce(rn,Qe(Dn)),ie=(rn,Dn)=>{var sn={};for(var Vt in rn)He.call(rn,Vt)&&Dn.indexOf(Vt)<0&&(sn[Vt]=rn[Vt]);if(rn!=null&&je)for(var Vt of je(rn))Dn.indexOf(Vt)<0&&Qn.call(rn,Vt)&&(sn[Vt]=rn[Vt]);return sn},zt=(rn,Dn,sn)=>new Promise((Vt,Pt)=>{var mt=Lt=>{try{kt(sn.next(Lt))}catch(_t){Pt(_t)}},vt=Lt=>{try{kt(sn.throw(Lt))}catch(_t){Pt(_t)}},kt=Lt=>Lt.done?Vt(Lt.value):Promise.resolve(Lt.value).then(mt,vt);kt((sn=sn.apply(rn,Dn)).next())});function We(rn){return/^\d+$/.test(rn)?`${rn}px`:rn}function En(){}let Xn=!1;const Ve={"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 In(rn=[]){let Dn=rn;if(Array.isArray(rn)){for(let sn=0;sn<rn.length;sn++){let Vt=Ve[rn[sn]];if(Vt)return Vt}return Dn[0]}return Ve[Dn]||Dn}let Hn=null;const li=()=>zt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(rn){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",rn)}});var tn=rn=>{var Dn=rn,{width:sn="100%",height:Vt="100%",value:Pt,language:mt="javascript",style:vt={},options:kt={},overrideServices:Lt={},theme:_t="vs-dark",onEditBlur:De,isCopy:on=!1,onSave:mn,autoHeight:$e=!1,forbidCopy:Bn=!1,onChange:Re=En,editorDidMount:Mn=En,onFocus:Kn=En,onBreakPoint:Fi=En,breakPointValue:ti=[],filename:sr="educoder.txt",errorLine:rr,errorContent:xi="",highlightLine:wi,openBreakPoint:Ir=!1,placeholder:ji="",showMiniMap:yr=!0}=Dn,xr=ie(Dn,["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 Qr=(0,xt.useRef)(),Ii=(0,xt.useRef)({}),br=(0,xt.useRef)(),Sr=(0,xt.useRef)(),Bo=(0,xt.useRef)([]),er=(0,xt.useRef)(!1),Lo=(0,xt.useRef)(),ys=(0,xt.useRef)(),Mo=(0,xt.useRef)(!1),[Lr,Pn]=(0,xt.useState)(!1);function Mt(){let ee;return Qr.current&&(ee=new Yt.Z(Cn=>{for(let Ti of Cn)(Ti.target.offsetHeight>0||Ti.target.offsetWidth>0)&&Ii.current.instance.layout()}),ee.observe(Qr.current)),ee}function jn(){Ot.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const kn=()=>{let ee=Ii.current.instance;if(Pt!=null&&ee&&Lr){const Cn=ee.getModel();Cn&&Pt!==Cn.getValue()&&(Xn=!0,Cn.setValue(Pt),ee.layout(),Xn=!1)}};(0,xt.useEffect)(()=>{const ee=re.Z.subscribe("formatDocument",Cn=>{var Ti;let Xi=Ii.current.instance;(Ti=Xi==null?void 0:Xi.getAction)==null||Ti.call(Xi,"editor.action.formatDocument").run()});return window.updateMonacoValue=Cn=>{Re(Cn)},ee},[]),(0,xt.useEffect)(()=>{var ee;let Cn=Ii.current.instance;Sr.current&&clearTimeout(Sr.current),Sr.current=setTimeout(()=>{kn()},500),Pt&&(Pt!=null&&Pt.length)&&((ee=Cn==null?void 0:Cn.updateOptions)==null||ee.call(Cn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pt,Lr,Ii.current]),(0,xt.useEffect)(()=>{if(rr&&Ii.current&&Ii.current.instance){let Cn=Ii.current.instance;Cn.changeViewZones(function(Ti){var Xi=document.createElement("div");Xi.style.padding="10px 20px",Xi.style.width="calc(100% - 20px)",Xi.className="my-error-line-wrp",Xi.innerHTML=xi,Ti.addZone({afterLineNumber:rr||11,heightInLines:3,domNode:Xi})});var ee={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}};Cn.addOverlayWidget(ee),Cn.revealPositionInCenter({lineNumber:20,column:1})}},[rr,Ii.current,Lr]);const _n=(ee="",Cn)=>{if(!ee||ee.trim()==="")return!0;const Xi=Ii.current.instance.getModel().getLineTokens(Cn);let On=!1;for(let Ge=0;Ge<2;Ge++)Xi.getStandardTokenType(Ge)===1&&(On=!0);return On};(0,xt.useEffect)(()=>{var ee;const Cn=(ee=Ii.current)==null?void 0:ee.instance;if(Cn&&Lr&&Bn){const Ti=Cn.onDidBlurEditorWidget(()=>{Mo.current=!1}),Xi=Cn.onDidFocusEditorText(()=>{Mo.current=!0});return()=>{Ti.dispose(),Xi.dispose()}}},[Ii.current,Lr,Bn]),(0,xt.useEffect)(()=>{var ee;if((ee=Ii.current)!=null&&ee.instance&&Lr&&Ir){let Cn=Ii.current.instance,Ti=Cn.getModel();if(!Ti)return;(()=>{var ve;let Ee=[],_e=[];const Sn=Ti.getAllDecorations();for(let Xe of Sn)Xe.options.className==="highlighted-line"&&(Ee.push((ve=Xe==null?void 0:Xe.range)==null?void 0:ve.startLineNumber),_e.push(Xe==null?void 0:Xe.id));if(wi===Ee[0])return;Ti.deltaDecorations(_e,[]);const ei=Ti.getLineCount();wi&&wi<=ei&&(Cn.deltaDecorations([],[{range:new Hn.Range(wi,1,wi,Ti.getLineMaxColumn(wi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Cn.revealLineInCenter(wi))})();const On=(ve=!1)=>{var Ee;let _e=[],Sn=[];const ei=Ti.getAllDecorations();for(let Xe of ei)Xe.options.linesDecorationsClassName==="breakpoints-select"&&(_e.push((Ee=Xe==null?void 0:Xe.range)==null?void 0:Ee.startLineNumber),Sn.push(Xe==null?void 0:Xe.id));if(ve)return{lines:_e,ids:Sn};Fi(_e)},Ge=ve=>zt(void 0,null,function*(){let Ee={range:new Hn.Range(ve,1,ve,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ti.deltaDecorations([],[Ee]),On()}),Si=ve=>zt(void 0,null,function*(){let Ee=[];const _e=Cn.getLineDecorations(ve);for(let Sn of _e)Sn.options.linesDecorationsClassName==="breakpoints-select"&&Ee.push(Sn.id);yield Ti.deltaDecorations(Ee,[]),On()}),Zi=ve=>{let Ee=Cn.getLineDecorations(ve);for(let _e of Ee)if(_e.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Wt.isEqual)(ti,On(!0).lines)){Ti.deltaDecorations(On(!0).ids,[]);const ve=ti.map(Ee=>({range:new Hn.Range(Ee,1,Ee,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ti.deltaDecorations([],ve)}const ur=Cn.onDidChangeModelContent(ve=>{let Ee=Cn.getPosition();if(Ee){let _e=Ee.lineNumber;clearTimeout(ys.current),ys.current=setTimeout(()=>{_n(Ti.getLineContent(_e),_e)?Si(_e):Zi(_e)?(Si(_e),Ge(_e)):On()},100)}}),Ln=Cn.onMouseDown(ve=>{var Ee,_e,Sn;if(ve.target.detail&&((Sn=(_e=(Ee=ve.target)==null?void 0:Ee.element)==null?void 0:_e.className)!=null&&Sn.includes("line-numbers"))){let ei=ve.target.position.lineNumber;if(_n(Ti.getLineContent(ei),ei))return;Zi(ei)?Si(ei):Ge(ei)}}),Ui=ve=>{let Ee={range:new Hn.Range(ve,1,ve,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Bo.current=Cn.deltaDecorations(Bo.current,[Ee])},pe=()=>{Bo.current=Cn.deltaDecorations(Bo.current,[])},Fe=Cn.onMouseMove(ve=>{var Ee,_e,Sn;if(pe(),ve.target.detail&&((Sn=(_e=(Ee=ve.target)==null?void 0:Ee.element)==null?void 0:_e.className)!=null&&Sn.includes("line-numbers"))){let ei=ve.target.position.lineNumber;if(_n(Ti.getLineContent(ei),ei))return;Ui(ei)}}),Ke=Cn.onMouseLeave(()=>{pe()});return()=>{ur.dispose(),Ln.dispose(),Fe.dispose(),Ke.dispose()}}},[Ii.current,Lr,ti,wi,Ir,mt]),(0,xt.useEffect)(()=>{var ee;(ee=Ii.current)!=null&&ee.instance&&Ir&&Ii.current.instance.setPosition({lineNumber:0,column:0})},[wi]);function Wn(){let ee=Ii.current.instance;if(ee){const Cn=ee.getSelection(),Ti=Ii.current.pastePos||{},Xi=new Hn.Range(Ti.startLineNumber||Cn.endLineNumber,Ti.startColumn||Cn.endColumn,Ti.endLineNumber||Cn.endLineNumber,Ti.endColumn||Cn.endColumn);setTimeout(()=>{ee.executeEdits("",[{range:Xi,text:""}])},300)}}function qn(ee){(window.navigator.platform.match("Mac")?ee.metaKey:ee.ctrlKey)&&ee.keyCode==83&&(ee.preventDefault(),mn())}const ui=()=>{if($e&&Ii.current.instance){const ee=Ii.current.instance.getContentHeight();mi(ee<Vt?Vt:ee)}else mi(Vt)};function Wi(ee){var Cn=document.createEvent("MouseEvents");Cn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ee.dispatchEvent(Cn)}const en=ee=>{if(!Mo.current)return;const{keyCode:Cn,ctrlKey:Ti,metaKey:Xi,target:On,type:Ge}=ee;return(Ge==="paste"||(Cn===67||Cn===86)&&(Xi||Ti))&&On.nodeName==="TEXTAREA"&&(jn(),ee.preventDefault()),!1};function Je(ee,Cn){var Ti=window.URL||window.webkitURL||window,Xi=new Blob([Cn]),On=document.createElementNS("http://www.w3.org/1999/xhtml","a");On.href=Ti.createObjectURL(Xi),On.download=ee,Wi(On)}(0,xt.useEffect)(()=>{ui()},[ui]),(0,xt.useEffect)(()=>{Qr.current&&!Lr&&Promise.all([Qt.e(5552),Qt.e(9651)]).then(Qt.bind(Qt,55826)).then(ee=>{try{Hn=ee,Ii.current.instance=Hn.editor.create(Qr.current,{value:Pt,language:In(mt),theme:_t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:yr||!1}},Lt);const Cn=Ii.current.instance;let On=[...bt.BH._menuItems].find(ur=>ur[0]._debugName=="EditorContext")[1],Ge=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Si=(ur,Ln)=>{var Ui,pe;let Fe=ur._first;do Ln.includes((pe=(Ui=Fe.element)==null?void 0:Ui.command)==null?void 0:pe.id)&&ur._remove(Fe);while(Fe=Fe.next)};if(Mn(Cn,Hn),setTimeout(()=>{ui(),Ii.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Je(sr||"educoder.txt",Cn.getValue())}})},500),Ii.current.subscription=Cn.onDidChangeModelContent(ur=>{er.current?clearTimeout(Lo.current):(ui(),Re(Cn.getValue(),ur)),Lo.current=setTimeout(()=>{er.current=!1},500)}),window.Monaco||Dt(Hn,In(mt)),Bn&&(Si(On,Ge),Qr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",en),window.removeEventListener("paste",en),window.addEventListener("keydown",en),window.addEventListener("paste",en)),window.Monaco=Hn,De&&Cn.onDidBlurEditorWidget(()=>{De(Cn.getValue())}),Kn&&Cn.onDidFocusEditorText(()=>{Bn&&li(),Kn(Cn.getValue())}),Bn){li();try{Cn.onDidPaste(ur=>{const Ln=Cn.getSelection(),Ui=Ii.current.pastePos||{},pe=new Hn.Range(Ui.startLineNumber||Ln.endLineNumber,Ui.startColumn||Ln.endColumn,Ui.endLineNumber||Ln.endLineNumber,Ui.endColumn||Ln.endColumn);Cn.executeEdits("",[{range:ur.range,text:""}])})}catch(ur){}}let Zi=Mt();return ji&&typeof ji=="string"&&new St(ji,Cn,Hn),Pn(!0),()=>{const ur=Ii.current.instance;ur.dispose();const Ln=ur.getModel();Ln&&Ln.dispose(),Ii.current.subscription&&Ii.current.subscription.dispose(),Zi.unobserve(Qr.current)}}catch(Cn){}})},[]),(0,xt.useEffect)(()=>{if(Ii.current.instance&&Lr)return document.addEventListener("keydown",qn,!1),()=>{document.removeEventListener("keydown",qn)}},[mn,Lr]),(0,xt.useEffect)(()=>{let ee=Ii.current.instance;if(ee&&Lr){let Cn=In(mt);Hn.editor.setModelLanguage(ee.getModel(),Cn)}},[mt,Lr]),(0,xt.useEffect)(()=>{Ii.current.instance&&Lr&&Hn.editor.setTheme(_t)},[_t,Lr]),(0,xt.useEffect)(()=>{let ee=Ii.current.instance;br.current=kt,ee&&Lr&&(ee.updateOptions(Yn({},kt)),setTimeout(()=>{ee.getModel().updateOptions(Yn({},kt))},200))},[JSON.stringify(kt),Lr]),(0,xt.useEffect)(()=>{let ee=Ii.current.instance;ee&&Lr&&ee.layout()},[sn,Vt,Lr]);const[be,un]=(0,xt.useState)(We(sn)),[fi,mi]=(0,xt.useState)(We(Vt)),ri=di(Yn({},vt),{width:be,height:fi,position:"relative"});return xt.createElement("div",{className:"my-monaco-editor",ref:Qr,style:ri},on&&xt.createElement(te.CopyToClipboard,{text:Pt,onCopy:()=>Ot.ZP.success("\u590D\u5236\u6210\u529F")},xt.createElement(Ht.Z,{title:"\u590D\u5236\u4EE3\u7801"},xt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},xt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Me({width:rn="100%",height:Dn="100%",original:sn,modified:Vt,language:Pt,options:mt={}}){const vt=(0,xt.useRef)(),[kt,Lt]=(0,xt.useState)(null);function _t($e){let Bn;return vt.current&&(Bn=new Yt.Z(Re=>{for(let Mn of Re)(Mn.target.offsetHeight>0||Mn.target.offsetWidth>0)&&$e.layout()}),Bn.observe(vt.current)),Bn}(0,xt.useEffect)(()=>(vt.current&&Promise.all([Qt.e(5552),Qt.e(9404)]).then(Qt.bind(Qt,50048)).then($e=>{Hn=$e;const Bn=Hn.editor.createDiffEditor(vt.current,di(Yn({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},mt),{wordWrap:!0}));Lt(Bn);let Re=_t(Bn);return()=>{Bn.dispose();const Mn=Bn.getModel();Mn&&Mn.dispose(),Re.unobserve(vt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,xt.useEffect)(()=>{kt&&kt.setModel({original:Hn.editor.createModel(sn,Pt),modified:Hn.editor.createModel(Vt,Pt)})},[sn,Vt,Pt,kt]);const De=We(rn),on=We(Dn),mn={width:De,height:on};return xt.createElement("div",{className:"my-diff-editor",ref:vt,style:mn})}},5476:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return de}});var xt={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},Yt=Qt(74330),he=Qt(83062),xe=Qt(26410),ge=Qt(94184),Ut=Qt.n(ge),jt=Qt(28706),ne=Qt(26194),Ae=Qt(52262),se=Qt(67294),de=({className:Ie,dataSource:Dt=[],col:nt=4,right:et,bottom:ut=23,precision:at=0,wrapWidth:ht=1200,trackEventItems:pt,loading:St,onRemove:bt=()=>{},isCurrent:Ot=!0,showProgress:Ht=!1,showAlias:Wt=!1})=>{const re=Math.floor((ht-(nt-1)*et)/nt),te=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return se.createElement(Yt.Z,{spinning:St},se.createElement("div",{className:Ut()(xt.list,Ie)},!!(Dt!=null&&Dt.length)&&(Dt==null?void 0:Dt.map((Ce,ce)=>{var Qe,je,He,Qn,Gn,Yn;const{name:di,id:ie,identifier:zt,featured:We,school_name:En,image_url:Xn,excellent:Ve,is_plan:In}=Ce;return se.createElement("div",{key:ie,className:Ot&&Ht?xt.wrapisCurrent:xt.wrap,style:{width:re,marginRight:(1+ce)%nt===0?0:et+at,marginBottom:ut}},se.createElement("a",{className:xt.li,onClick:Hn=>{Hn.preventDefault(),Hn.stopPropagation(),pt&&(0,jt.L9)([pt]),(0,jt.xg)(`/paths/${zt}`)}},se.createElement("div",{className:xt.img},se.createElement("img",{className:xt.cover,src:`${Xn}`}),Ot&&(0,Ae.bg)()&&(Ce==null?void 0:Ce.studying)&&se.createElement("div",{className:`${xt.movebq} user-path-items`,onClick:Hn=>{Hn.stopPropagation(),bt(Ce)}},se.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),se.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Qe=Ce==null?void 0:Ce.subject_tags)==null?void 0:Qe.map((Hn,li)=>{var tn,Me;if(li===0){const Dn=(tn=te.find(sn=>sn.name==Hn))==null?void 0:tn.swimg;return se.createElement("img",{className:xt.sign,src:Dn,style:{left:"-4px"}})}const rn=(Me=te.find(Dn=>Dn.name==Hn))==null?void 0:Me.ptimg;return se.createElement("img",{className:xt.sign,src:rn,style:{left:`${48+52*(li-1)+2*li}px`}})}),se.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Ce==null?void 0:Ce.excellent)&&se.createElement("div",{className:xt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),se.createElement("div",{className:xt.name},se.createElement(he.Z,{title:Wt&&(Ce!=null&&Ce.excellent_alias_name)?se.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${di}`,se.createElement("br",null),se.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Ce==null?void 0:Ce.excellent_alias_name}`)):di},se.createElement("span",{className:xt.e},Wt&&(Ce==null?void 0:Ce.excellent_alias_name)||di))),Ot&&Ht&&((je=Ce==null?void 0:Ce.progress)==null?void 0:je.all_score)!=0&&se.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},se.createElement(xe.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((He=Ce==null?void 0:Ce.progress)==null?void 0:He.my_score)/((Qn=Ce==null?void 0:Ce.progress)==null?void 0:Qn.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(Gn=Ce==null?void 0:Ce.progress)==null?void 0:Gn.my_score,"/",(Yn=Ce==null?void 0:Ce.progress)==null?void 0:Yn.all_score),(!Ot||!Ht)&&se.createElement(he.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${En}`},se.createElement("div",{className:xt.unit},se.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),En)),(!Ot||!Ht)&&se.createElement("div",{className:xt.tags},se.createElement("div",null,se.createElement(he.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},se.createElement("span",null,se.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),se.createElement("span",null,Ce.stages_count))),se.createElement(he.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},se.createElement("span",null,se.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),se.createElement("span",null,Ce.members_count)))))))})),!Dt.length&&se.createElement(ne.Z,null)))}},30001:function(gn,ze,Qt){"use strict";Qt.d(ze,{jL:function(){return ge},w9:function(){return We},QD:function(){return rr},cQ:function(){return Gn.Z},op:function(){return Re},O5:function(){return kn},_b:function(){return xr},t7:function(){return at},Gi:function(){return li},YG:function(){return In},qp:function(){return ke},vr:function(){return Ir},qE:function(){return Fi},Je:function(){return St},wb:function(){return Qn},cq:function(){return Vt},tp:function(){return Dt}});var xt=Qt(67294),Yt={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",ge=({dataSource:_n=[],img:Wn,imgWidth:qn=346,title:ui,sunTitle:Wi,bannerExtraContent:en})=>xt.createElement("div",{className:Yt.banner},xt.createElement("div",{className:Yt.content},xt.createElement("aside",null,xt.createElement("p",null,xt.createElement("b",null,ui),xt.createElement("span",null,Wi)),_n.length>0&&xt.createElement("div",{className:Yt.btns},_n.map((Je,be)=>xt.createElement("div",{key:be,onClick:Je.click},Je.name,Je.sign?xt.createElement("img",{src:he,width:39}):null))),en),Wn&&xt.createElement("img",{style:{marginTop:33,marginRight:38},src:Wn,width:qn}))),Ut={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},jt=Qt(94184),ne=Qt.n(jt),Ae=Qt(96486),ke=({dataSource:_n=[],value:Wn,onChange:qn,onTitleChange:ui,className:Wi,title:en,titleWidth:Je=41,style:be={},fontColor:un="#6A7283",showCount:fi})=>{const[mi,ri]=(0,xt.useState)(0),[ee,Cn]=(0,xt.useState)(!1),Ti=(0,xt.useRef)(null),Xi=(0,xt.useRef)(null);return(0,xt.useEffect)(()=>{var On;_n.length!==0&&(((On=Ti==null?void 0:Ti.current)==null?void 0:On.clientHeight)>97?ri(1):ri(0)),_n.length===0&&ri(0),Cn(!1)},[_n]),xt.createElement("div",{className:ne()(Ut.row,Wi),style:be},xt.createElement("div",{onClick:(0,Ae.throttle)(()=>ui==null?void 0:ui(),2e3),style:{width:Je,marginTop:ee?12:4},className:`${Ut.title} ${ui?"current":""}`},en),xt.createElement("div",{className:ee?`${Ut.tagsWrap} ${Ut.tagsBorderWrap}`:Ut.tagsWrap},xt.createElement("div",{className:Ut.bar,ref:Xi,style:mi>0?{height:mi===1?97:"auto",overflow:mi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},xt.createElement("div",{className:Ut.tag,ref:Ti},_n==null?void 0:_n.map(On=>xt.createElement("span",{onClick:()=>qn(On.id),key:On.id,style:{color:un},className:Wn===On.id?Ut.active:""},xt.createElement("span",{title:On.name,className:Ut.name},On.name),!!fi&&xt.createElement("span",{className:Ut.num},On.count))))),!!mi&&xt.createElement(xt.Fragment,null,mi===1?xt.createElement("div",{onClick:()=>{var On;ri(2),((On=Ti==null?void 0:Ti.current)==null?void 0:On.clientHeight)>245?Cn(!0):Cn(!1)},className:Ut.action},"\u5C55\u5F00",xt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):xt.createElement("div",{onClick:()=>{Xi.current.scrollTop=0,ri(1),Cn(!1)},className:Ut.action},"\u6536\u8D77",xt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},de={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Dt=({dataSource:_n=[],value:Wn,onChange:qn,className:ui,style:Wi={}})=>xt.createElement("div",{style:Wi,className:ne()(de.tabs,ui)},_n.map(en=>xt.createElement("span",{onClick:()=>qn(en.id),className:Wn===en.id?de.active:"",key:en.id},en.name))),nt={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},et=Qt(28802),at=({dataSource:_n=[],value:Wn="",onChange:qn,onInputChange:ui=()=>{},className:Wi,style:en={},placeholder:Je,allowClear:be=!1})=>{var un;const[fi,mi]=(0,xt.useState)(""),[ri,ee]=(0,xt.useState)("");(0,xt.useEffect)(()=>{var Xi;let On=Wn;(Xi=JSON.stringify(Wn))!=null&&Xi.includes("{")&&(mi(Wn.id),On=Wn.value||"");try{ee(decodeURIComponent(On||""))}catch(Ge){ee(decodeURIComponent(On||""))}},[Wn]);const Cn=()=>{qn(encodeURIComponent(ri),fi||null)},Ti=Xi=>{Xi!==fi&&(mi(Xi),qn(encodeURIComponent(ri),Xi))};return xt.createElement("div",{className:ne()(nt.input,Wi),style:en},!!_n.length&&xt.createElement("div",{className:nt.dropdown},xt.createElement("div",{className:nt.text},(un=_n.find(Xi=>Xi.id===fi))==null?void 0:un.name,xt.createElement("i",{className:"iconfont icon-zhankai4"}),xt.createElement("b",{className:nt.b1}),xt.createElement("b",{className:nt.b2})),xt.createElement("div",{className:nt.menu},_n.map((Xi,On)=>xt.createElement("div",{key:On,onClick:()=>Ti(Xi.id)},Xi.name)))),xt.createElement(et.default,{onPressEnter:Cn,value:ri,onChange:Xi=>{ee(Xi.target.value),ui(encodeURIComponent(Xi.target.value),fi||null)},bordered:!1,placeholder:Je}),xt.createElement("i",{onClick:Cn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ht={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},St=({value:_n,onChange:Wn,className:qn,total:ui,pageSize:Wi,style:en={}})=>{const Je=_n<2,be=_n>=Math.ceil(ui/Wi);return ui<=Wi?xt.createElement(xt.Fragment,null):xt.createElement("div",{className:ne()(ht.quickPager,qn),style:en},xt.createElement("div",{onClick:()=>{Je||Wn(_n-1,"prev")},className:Je?ht.disabled:""},"\u4E0A\u4E00\u9875"),xt.createElement("div",{onClick:()=>{be||Wn(_n+1,"next")},className:be?ht.disabled:""},"\u4E0B\u4E00\u9875"))},bt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Ot=Qt(74330),Ht=Qt(83062),Wt=Qt(57097),re=Qt(11320),te=Qt(28706),Ce=Qt(96908),ce=Qt(57177),Qe=Qt(81378),je=Qt(26194),Qn=({className:_n,dataSource:Wn=[],col:qn=4,right:ui,bottom:Wi=23,precision:en=0,wrapWidth:Je=1200,trackEventItems:be,loading:un})=>{const fi=Math.floor((Je-(qn-1)*ui)/qn);return xt.createElement(Ot.Z,{spinning:un},xt.createElement("div",{className:ne()(bt.list,_n)},!!Wn.length&&Wn.map((mi,ri)=>{const{name:ee,id:Cn,identifier:Ti,power:Xi,cover_image_id:On,pic:Ge}=mi;return xt.createElement("div",{className:bt.wrap,key:Cn,style:{width:fi,marginRight:(1+ri)%qn===0?0:ui+en,marginBottom:Wi}},xt.createElement("a",{target:"_blank",href:`/shixuns/${Ti}/challenges`,className:bt.li,onClick:Si=>{Si.preventDefault(),be&&(0,te.L9)([be]),Xi&&(0,te.xg)(`/shixuns/${Ti}/challenges`)}},xt.createElement("div",{className:bt.img},xt.createElement("img",{className:bt.cover,src:`${Ge}`}),mi.is_jupyter&&xt.createElement("img",{className:bt.sign,src:Ce}),mi.is_jupyter_lab&&xt.createElement("img",{className:bt.sign,src:ce}),mi.is_unity_3d&&xt.createElement("img",{className:bt.sign,src:Qe})),xt.createElement("div",{className:bt.name},xt.createElement(Ht.Z,{title:ee||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},xt.createElement("span",{className:bt.e},ee||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),xt.createElement("div",{className:bt.tags},xt.createElement(Ht.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},xt.createElement("span",null,xt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),xt.createElement("span",null,mi.challenges_count))),!!mi.myshixuns_count&&xt.createElement(Ht.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},xt.createElement("span",null,xt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),xt.createElement("span",null,mi.myshixuns_count))),xt.createElement(Ht.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},xt.createElement("span",null,xt.createElement("span",null,mi.level))),xt.createElement("div",{className:bt.rate},xt.createElement(Wt.Z,{allowHalf:!0,disabled:!0,defaultValue:mi.score_info}),xt.createElement("span",null,"\xA0",mi.score_info?`${mi.score_info}\u5206`:"5\u5206")))),!Xi&&xt.createElement("div",{className:bt.lockWrap},xt.createElement("img",{src:`${re.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),xt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Wn.length&&xt.createElement(je.Z,null)))},Gn=Qt(5476),Yn={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},di="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",ie=Qt(67294),We=({className:_n,dataSource:Wn=[],col:qn=4,right:ui,bottom:Wi=23,precision:en=0,wrapWidth:Je=1200,trackEventItems:be,loading:un,handleVery:fi=()=>!0})=>{const mi=Math.floor((Je-(qn-1)*ui)/qn);return ie.createElement(Ot.Z,{spinning:un},ie.createElement("div",{className:ne()(Yn.list,_n)},!!Wn.length&&Wn.map((ri,ee)=>{const{subject_identifier:Cn,id:Ti,identifier:Xi,power:On}=ri,Ge=ri.is_public!=0&&ri.is_public;return ie.createElement("div",{className:Yn.wrap,key:Ti,style:{width:mi,marginRight:(1+ee)%qn===0?0:ui+en,marginBottom:Wi}},ie.createElement("a",{className:Yn.li,onClick:Si=>{Si.preventDefault(),fi(ri==null?void 0:ri.first_category_url)&&(be&&(0,te.L9)([be]),(0,te.xg)(ri.first_category_url))}},ie.createElement("div",{className:Yn.top},ie.createElement(Ht.Z,{title:ri.name},ie.createElement("div",{className:Yn.name},ri.name)),ie.createElement("img",{className:Yn.img,src:re.Z.IMG_SERVER+"/images/"+ri.avatar_url}),ie.createElement("div",{className:Yn.text,title:ri.creator},ri.creator),Cn&&ie.createElement("div",{className:Yn.btns},ie.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ie.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ge&&ie.createElement("div",{className:Yn.sign},"\u516C\u5F00")),ie.createElement("div",{className:Yn.bottom},ri.visits>0&&ie.createElement(Ht.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-liulanyan"}),ie.createElement("span",null,ri.visits))),ri.course_members_count>0&&ie.createElement(Ht.Z,{title:"\u6210\u5458",placement:"bottom"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-chengyuan"}),ri.course_members_count)),ri.tasks_count>0&&ie.createElement(Ht.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-zuoye"}),ri.tasks_count)),ri.is_end?ie.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ie.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ri.is_accessible&&ie.createElement("div",{className:Yn.lockWrap},ie.createElement("img",{src:`${re.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ie.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Wn.length&&ie.createElement(je.Z,null)))},En={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Xn=Qt(35973),In=({dataSource:_n=[],value:Wn,onChange:qn,className:ui,style:Wi={},tabBarExtraContent:en})=>xt.createElement("div",{className:ne()(En.tabs,ui),style:Wi},xt.createElement("div",{className:En.tabsWrap},_n.map((Je,be)=>!(Je!=null&&Je.hide)&&xt.createElement("aside",{className:En.tab,onClick:()=>{qn(Je.id),Je.link&&Xn.history.push(Je.link)},key:be},xt.createElement("div",{className:Wn===Je.id?En.active:""},Je.name),(Je==null?void 0:Je.resetCount)==null&&(Je==null?void 0:Je.total)!==void 0&&xt.createElement("span",null,"\uFF08",Je==null?void 0:Je.total,"\uFF09"),(Je==null?void 0:Je.resetCount)!==void 0&&(Je==null?void 0:Je.total)!==void 0&&xt.createElement(Ht.Z,{title:(Je==null?void 0:Je.tip)!=null?Je==null?void 0:Je.tip:""},xt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",xt.createElement("span",{style:{color:"#000"}},Je==null?void 0:Je.resetCount),"/",xt.createElement("span",null,Je==null?void 0:Je.total),"\uFF09"))))),xt.createElement("div",{className:En.tabBar},en)),li=({className:_n,style:Wn={},children:qn})=>xt.createElement("div",{className:ne()(_n),style:Wn},qn),tn={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Me=Qt(85418),rn=Qt(50136);const Dn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Vt=({sortValue:_n,dropValue:Wn,className:qn,onSort:ui,onDrop:Wi,dataSource:en=Dn})=>{var Je;return xt.createElement("div",{className:ne()(tn.orderWrap,qn)},xt.createElement(Me.Z,{dropdownRender:()=>xt.createElement(rn.default,null,en.map((be,un)=>xt.createElement(rn.default.Item,{key:un,onClick:()=>Wi(be.id)},be.name)))},xt.createElement("span",{className:tn.orderTextWrap},(Je=en.find(be=>Wn===be.id))==null?void 0:Je.name)),xt.createElement("span",{className:tn.orderIconWrap},xt.createElement("span",{className:tn.orderAsc},xt.createElement("i",{className:_n==="asc"?`iconfont icon-sanjiaoxing-up font12 ${tn.cursorPointer} ${tn.active}`:`iconfont icon-sanjiaoxing-up font12 ${tn.cursorPointer}`,onClick:()=>ui(_n==="asc"?"desc":"asc")})),xt.createElement("span",{className:tn.orderDesc},xt.createElement("i",{className:_n==="desc"?`iconfont icon-sanjiaoxing-down font12 ${tn.cursorPointer} ${tn.active}`:`iconfont icon-sanjiaoxing-down font12 ${tn.cursorPointer}`,onClick:()=>ui(_n==="asc"?"desc":"asc")}))))},Pt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},mt=Qt(85804),vt=Object.defineProperty,kt=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,De=(_n,Wn,qn)=>Wn in _n?vt(_n,Wn,{enumerable:!0,configurable:!0,writable:!0,value:qn}):_n[Wn]=qn,on=(_n,Wn)=>{for(var qn in Wn||(Wn={}))Lt.call(Wn,qn)&&De(_n,qn,Wn[qn]);if(kt)for(var qn of kt(Wn))_t.call(Wn,qn)&&De(_n,qn,Wn[qn]);return _n},mn=(_n,Wn)=>{var qn={};for(var ui in _n)Lt.call(_n,ui)&&Wn.indexOf(ui)<0&&(qn[ui]=_n[ui]);if(_n!=null&&kt)for(var ui of kt(_n))Wn.indexOf(ui)<0&&_t.call(_n,ui)&&(qn[ui]=_n[ui]);return qn},$e=(_n,Wn,qn)=>new Promise((ui,Wi)=>{var en=un=>{try{be(qn.next(un))}catch(fi){Wi(fi)}},Je=un=>{try{be(qn.throw(un))}catch(fi){Wi(fi)}},be=un=>un.done?ui(un.value):Promise.resolve(un.value).then(en,Je);be((qn=qn.apply(_n,Wn)).next())}),Re=_n=>{var Wn=_n,{className:qn,style:ui,children:Wi,loading:en=!1,openLoading:Je,onClick:be=()=>{},size:un="middle",shape:fi="round"}=Wn,mi=mn(Wn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ri,ee]=(0,xt.useState)(!1);return xt.createElement(mt.ZP,on({onClick:(0,Ae.throttle)(Cn=>$e(void 0,null,function*(){Je&&ee(!0);try{yield be(Cn)}catch(Ti){console.log("error",Ti)}Je&&ee(!1)}),2e3,{leading:!0,trailing:!1}),className:ne()(Pt.btn,Pt[`${un}-${fi}`],qn),style:ui,size:un,shape:fi,loading:ri||en},mi),Wi)},Mn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Fi=({className:_n,style:Wn,children:qn=null,onClick:ui,title:Wi})=>xt.createElement("div",{className:ne()(Mn.head,_n),style:Wn},xt.createElement("span",{className:"primary-hover",onClick:ui},xt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),xt.createElement("b",{title:Wi},Wi),xt.createElement("div",{className:Mn.node},qn)),ti={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},rr=({confirmShow:_n=!0,confirmTitle:Wn,confirmClick:qn,cancelShow:ui=!0,cancelTitle:Wi,cancelClick:en,className:Je,style:be,confirmLoading:un=!1})=>xt.createElement("div",{className:ne()(ti.btns,Je),style:be},_n&&xt.createElement(mt.ZP,{loading:un,onClick:qn,type:"primary",className:ti.confirm},Wn),ui&&xt.createElement(mt.ZP,{onClick:en,className:ti.cancel},Wi)),xi={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Ir=({className:_n,style:Wn={},LeftContent:qn,children:ui,RightContent:Wi})=>xt.createElement("div",{className:ne()(xi.fixedBottom,_n),style:Wn},xt.createElement("div",{className:xi.wrap},xt.createElement("div",{className:xi.left},qn),xt.createElement("div",{className:xi.center},ui),xt.createElement("div",{className:xi.right},Wi))),ji={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},xr=({className:_n,style:Wn={},dataSource:qn=[]})=>xt.createElement("div",{className:ne()(ji.crumbs,_n),style:Wn},qn.map((ui,Wi)=>Wi<qn.length-1?xt.createElement(xt.Fragment,{key:Wi},ui.path||ui.onClick?xt.createElement("span",{className:ji.hover,onClick:ui!=null&&ui.onClick?ui.onClick:()=>Xn.history.push(ui.path)},ui.name):xt.createElement("span",null,ui.name),xt.createElement("span",null,"\xA0",">","\xA0")):xt.createElement("span",{key:Wi,style:{color:"#5F6368"}},ui.name))),Qr=Qt(55054),Ii=Object.defineProperty,br=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,Bo=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,Lo=Object.prototype.propertyIsEnumerable,ys=(_n,Wn,qn)=>Wn in _n?Ii(_n,Wn,{enumerable:!0,configurable:!0,writable:!0,value:qn}):_n[Wn]=qn,Mo=(_n,Wn)=>{for(var qn in Wn||(Wn={}))er.call(Wn,qn)&&ys(_n,qn,Wn[qn]);if(Bo)for(var qn of Bo(Wn))Lo.call(Wn,qn)&&ys(_n,qn,Wn[qn]);return _n},Lr=(_n,Wn)=>br(_n,Sr(Wn)),Pn=(_n,Wn)=>{var qn={};for(var ui in _n)er.call(_n,ui)&&Wn.indexOf(ui)<0&&(qn[ui]=_n[ui]);if(_n!=null&&Bo)for(var ui of Bo(_n))Wn.indexOf(ui)<0&&Lo.call(_n,ui)&&(qn[ui]=_n[ui]);return qn};const{Countdown:Mt}=Qr.default;var kn=_n=>{var Wn=_n,{onChange:qn}=Wn,ui=Pn(Wn,["onChange"]);const[Wi,en]=(0,xt.useState)(null);(0,xt.useEffect)(()=>{typeof Wi=="number"&&Wi>=0&&qn(Wi)},[Wi]);const Je=be=>{const un=Math.floor(be/1e3);en(un)};return xt.createElement(Mt,Lr(Mo({},ui),{onChange:Je}))}},99914:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Yt}});var xt=Qt(67294);function Yt(he,xe){const ge=(0,xt.useRef)();(0,xt.useEffect)(()=>{ge.current=he}),(0,xt.useEffect)(()=>{function Ut(){ge.current()}if(xe!==null){let jt=setInterval(Ut,xe);return()=>clearInterval(jt)}},[xe])}},3822:function(gn,ze,Qt){"use strict";Qt.r(ze),Qt.d(ze,{default:function(){return Ke}});var xt=Qt(67294),Yt=Qt(94699),he=Qt.n(Yt),xe=Qt(55733),ge=Qt.n(xe),Ut=Qt(33170),jt=Qt(35973),ne=Qt(62844),Ae=Qt(2453),se=Qt(48054),ke=Qt(85673),de=Qt(71230),Ie=Qt(15746),Dt=Qt(85804),nt=Qt(83062),et=Qt(96074),ut=Qt(28802),at=Qt(57399),ht=Qt(88044),pt=Qt(14845),St=Qt(52310),bt=Qt(87922),Ot=Qt(55304),Ht=Qt(84249),Wt=Qt(11320),re=Qt(52262),te=Qt(28706),Ce=Qt(50976),ce={flex_box_center:"flex_box_center___KJUhi",flex_space_between:"flex_space_between____N4uH",flex_box_vertical_center:"flex_box_vertical_center___yOdsz",flex_box_center_end:"flex_box_center_end___seJB9",flex_box_column:"flex_box_column___ihHC5",title:"title___JSmnB",score:"score___ERcuI",export:"export___pgR1H",title1_right:"title1_right___MdWJo",userPic:"userPic___UeG3e",userInfo:"userInfo___TNu6l",listItem:"listItem___wdbM_",rightInfo:"rightInfo___Swqk5",shixunTitle:"shixunTitle___L2Tc4",shixunWrp:"shixunWrp___ZoaTc",footerBar:"footerBar___QW5rq",footerBarStatic:"footerBarStatic___CRq8b",exitComment:"exitComment___u4Rqt",nextComment:"nextComment___lvaID",modal:"modal___g3B3L",footer:"footer___eJCnt",pingjia:"pingjia___X_ooM",pj_close:"pj_close___PHP4h",pj_save:"pj_save___COfQy"},Qe={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const je=({shixunHomeworks:ve,data:Ee,globalSetting:_e,loading:Sn,dispatch:ei})=>{var Xe;const{shixunWorkReport:Fn}=ve;let si=((Xe=Ee==null?void 0:Ee.efficiency_list)==null?void 0:Xe.length)-parseInt(Ee==null?void 0:Ee.myself_eff[0]);const Gi=()=>({title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(Te){return Te.name===Fn.username?"\u59D3\u540D\uFF1A"+Fn.username+"<br/>\u5B66\u53F7\uFF1A "+Fn.user_id+"<br/>\u6548\u7387\uFF1A"+(Ee==null?void 0:Ee.myself_eff[1]):Te.name+":"+Te.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:Ee==null?void 0:Ee.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:Fn.username,xAxis:si,yAxis:Ee==null?void 0:Ee.myself_eff[1],value:Ee==null?void 0:Ee.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),Ji=()=>({title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Te){var Mi=Te.value;if(Te.name===Fn.username)return"\u59D3\u540D\uFF1A"+Fn.username+"<br/>\u5B66\u53F7\uFF1A "+Fn.user_id+"<br/>\u5F97\u5206\uFF1A"+(Ee==null?void 0:Ee.myself_object[1])}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Qe,data:Ee==null?void 0:Ee.consume_list,symbolSize:function(Te){return Math.round(Te[2])},markPoint:{data:[{name:Fn.username,xAxis:Ee==null?void 0:Ee.myself_object[0],yAxis:Ee==null?void 0:Ee.myself_object[1],value:Ee==null?void 0:Ee.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return xt.createElement(xt.Fragment,null,xt.createElement("aside",{className:"ml60 pr30"},xt.createElement(de.Z,null,xt.createElement(Ie.Z,{flex:"800px"},xt.createElement(Ce.Z,{style:{width:750,height:580},option:Gi()})),xt.createElement(Ie.Z,{flex:"1"},xt.createElement("aside",{className:ce.rightInfo},xt.createElement("ul",null,xt.createElement("li",null,xt.createElement("span",null,"\u59D3\u540D")," ",xt.createElement("span",{className:"ml30"},Fn.username)),xt.createElement("li",null,xt.createElement("span",null,"\u5B66\u53F7")," ",xt.createElement("span",{className:"ml30"},Fn.student_id||"--")),xt.createElement("li",null,xt.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",xt.createElement("span",{className:"ml30 c-orange"},Ee==null?void 0:Ee.myself_eff[1])),xt.createElement("li",null,xt.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",xt.createElement("span",{className:"ml30 c-orange"},Ee==null?void 0:Ee.myself_eff[0]))),xt.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",xt.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",xt.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",xt.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),xt.createElement("aside",{className:"ml60 pr30"},xt.createElement(de.Z,null,xt.createElement(Ie.Z,{flex:"800px"},xt.createElement(Ce.Z,{style:{width:750,height:580},option:Ji()})),xt.createElement(Ie.Z,{flex:"1"},xt.createElement("aside",{className:ce.rightInfo},xt.createElement("ul",null,xt.createElement("li",null,xt.createElement("span",null,"\u59D3\u540D")," ",xt.createElement("span",{className:"ml30"},Fn.username)),xt.createElement("li",null,xt.createElement("span",null,"\u5B66\u53F7")," ",xt.createElement("span",{className:"ml30"},Fn.student_id||"--")),xt.createElement("li",null,xt.createElement("span",null,"\u80FD\u529B")," ",xt.createElement("span",{className:"ml30 c-orange"},Ee==null?void 0:Ee.myself_object[1]))),xt.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",xt.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",xt.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",xt.createElement("br",null)))))))};var He=(0,jt.connect)(({shixunHomeworks:ve,loading:Ee,globalSetting:_e})=>({shixunHomeworks:ve,globalSetting:_e,loading:Ee.effects}))(je),Qn=Qt(36295),Gn=Qt(37720),Yn=({defaultValue:ve,onBlur:Ee,max:_e,className:Sn="game-score"})=>{const[ei,Xe]=(0,xt.useState)(ve);(0,xt.useEffect)(()=>{Xe(ve)},[ve]);function Fn(Gi){Xe(Gi)}function si(){ei!==ve&&Ee(ei>_e?_e:ei)}return xt.createElement(Gn.Z,{max:_e,min:0,className:Sn,value:ei,onChange:Fn,onBlur:si})},di=Qt(35567),ie={md:"md___TEmcT"},zt=Qt(67294),We=Object.defineProperty,En=Object.defineProperties,Xn=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable,li=(ve,Ee,_e)=>Ee in ve?We(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ve[Ee]=_e,tn=(ve,Ee)=>{for(var _e in Ee||(Ee={}))In.call(Ee,_e)&&li(ve,_e,Ee[_e]);if(Ve)for(var _e of Ve(Ee))Hn.call(Ee,_e)&&li(ve,_e,Ee[_e]);return ve},Me=(ve,Ee)=>En(ve,Xn(Ee));const rn=ht.default.Option,Dn={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var sn=(ve=>(ve[ve.SET_PATH=0]="SET_PATH",ve[ve.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",ve))(sn||{});function Vt(ve,Ee){switch(Ee.type){case 0:return Me(tn({},ve),{selectedPath:Ee.payload});case 1:return Me(tn({},ve),{passedContent:Ee.payload});default:throw new Error}}var Pt=({path:ve,game_id:Ee,onPathChange:_e,autoHeight:Sn,diff_code_count:ei,data:Xe,game_codes_cn:Fn})=>{var si,Gi,Ji,Te;const Mi=ve.split("\uFF1B").filter(Qi=>!!Qi),[Ri,yi]=(0,xt.useReducer)(Vt,{selectedPath:Mi[0],passedContent:{language:"python",content:""}}),{selectedPath:Nr,passedContent:qi}=Ri;function ci(Qi){yi({type:0,payload:Qi})}const Bi={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u65B0\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return zt.createElement(zt.Fragment,null,zt.createElement("h2",null," ",zt.createElement("span",null,Fn,zt.createElement(nt.Z,{title:zt.createElement("div",null,zt.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),zt.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),zt.createElement("div",null," 2.\u82E5\u6709\u591A\u4E2A\u6700\u9AD8\u5206\u7248\u672C\uFF0C\u5C55\u793A\u63D0\u4EA4\u65F6\u95F4\u6700\u665A\u7684\u7248\u672C\u3002"),zt.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},zt.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),ei&&zt.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ei),zt.createElement("span",null,zt.createElement(ht.default,{style:{width:200},value:Nr,onChange:ci}," ",Mi.map(Qi=>zt.createElement(rn,{key:Qi,value:Qi},Qi))," "))," "),(Nr==null?void 0:Nr.split(".")[1])==="md"&&zt.createElement(di.Z,{height:300,autoHeight:Sn,defaultValue:((Gi=(si=Xe==null?void 0:Xe.filter(Qi=>Qi.path===Nr))==null?void 0:si[0])==null?void 0:Gi.content)||"",className:ie.md}),(Nr==null?void 0:Nr.split(".")[1])!=="md"&&zt.createElement(Qn.ZP,{height:300,language:qi.language,value:((Te=(Ji=Xe==null?void 0:Xe.filter(Qi=>Qi.path===Nr))==null?void 0:Ji[0])==null?void 0:Te.content)||"",autoHeight:Sn,theme:"default",isCopy:!0,options:Dn}))},mt=Qt(89779),vt=Qt(61193),kt=Qt.n(vt),Lt=Object.defineProperty,_t=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,mn=(ve,Ee,_e)=>Ee in ve?Lt(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ve[Ee]=_e,$e=(ve,Ee)=>{for(var _e in Ee||(Ee={}))De.call(Ee,_e)&&mn(ve,_e,Ee[_e]);if(_t)for(var _e of _t(Ee))on.call(Ee,_e)&&mn(ve,_e,Ee[_e]);return ve};const Bn=ve=>React.createElement("svg",$e({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},ve),React.createElement("path",{d:"M512 327.68c245.76 0 445.44 153.6 445.44 348.16C957.44 870.4 757.76 1024 512 1024c-245.76-5.12-445.44-153.6-445.44-348.16 0-194.56 199.68-348.16 445.44-348.16z",fill:"#DBDCFF"}),React.createElement("path",{d:"M645.12 947.2c117.76-10.24 158.72-143.36 163.84-266.24 0-128-128-174.08-291.84-174.08-163.84 0-291.84 46.08-291.84 174.08 0 112.64 35.84 240.64 143.36 261.12 30.72 5.12 261.12 10.24 276.48 5.12z",fill:"#111ACC"}),React.createElement("path",{d:"M404.48 686.08c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c-5.12-10.24 10.24-25.6 25.6-25.6zm220.16 0c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c0-10.24 10.24-25.6 25.6-25.6z",fill:"#FFF"}),React.createElement("path",{d:"M916.48 527.36c56.32 0 107.52 71.68 107.52 153.6 0 87.04-61.44 153.6-117.76 153.6 0 0 51.2-76.8 51.2-158.72s-40.96-148.48-40.96-148.48zm-808.96 5.12-5.12 5.12c-10.24 20.48-35.84 76.8-35.84 138.24 0 76.8 35.84 138.24 51.2 158.72C61.44 834.56 0 768 0 680.96c0-81.92 51.2-148.48 107.52-148.48z",fill:"#8187FF"}),React.createElement("path",{d:"M512 0c20.48 0 30.72 15.36 30.72 30.72v220.16c0 20.48-15.36 30.72-30.72 30.72s-30.72-10.24-30.72-30.72V30.72C481.28 15.36 496.64 0 512 0z",fill:"#701CDC"}),React.createElement("path",{d:"M384 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-35.84-15.36-35.84-30.72V76.8c0-20.48 15.36-30.72 35.84-30.72z",fill:"#371CDC"}),React.createElement("path",{d:"M645.12 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72V76.8c0-20.48 15.36-30.72 30.72-30.72z",fill:"#AB2FF0"}),React.createElement("path",{d:"M250.88 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-35.84-10.24-35.84-30.72v-40.96c0-20.48 15.36-35.84 35.84-35.84z",fill:"#6D57F2"}),React.createElement("path",{d:"M778.24 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72v-40.96c0-20.48 15.36-35.84 30.72-35.84z",fill:"#C86FFA"}));var Re="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",Mn=Qt(56243),Kn=Qt(65226),Fi=Object.defineProperty,ti=Object.defineProperties,sr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,Ir=(ve,Ee,_e)=>Ee in ve?Fi(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ve[Ee]=_e,ji=(ve,Ee)=>{for(var _e in Ee||(Ee={}))xi.call(Ee,_e)&&Ir(ve,_e,Ee[_e]);if(rr)for(var _e of rr(Ee))wi.call(Ee,_e)&&Ir(ve,_e,Ee[_e]);return ve},yr=(ve,Ee)=>ti(ve,sr(Ee)),xr=(ve,Ee,_e)=>new Promise((Sn,ei)=>{var Xe=Gi=>{try{si(_e.next(Gi))}catch(Ji){ei(Ji)}},Fn=Gi=>{try{si(_e.throw(Gi))}catch(Ji){ei(Ji)}},si=Gi=>Gi.done?Sn(Gi.value):Promise.resolve(Gi.value).then(Xe,Fn);si((_e=_e.apply(ve,Ee)).next())});const Qr=({shixunHomeworks:ve,autoHeight:Ee,classroomList:_e,dispatch:Sn})=>{var ei,Xe,Fn,si,Gi,Ji,Te,Mi;const{shixunWorkReport:Ri}=ve,{stage_list:yi,work_id:Nr,ai_code_evaluation_promote:qi}=Ri,[ci,Bi]=(0,xt.useState)(!1),[Qi,Ar]=(0,xt.useState)(!0),[cn,$i]=(0,xt.useState)({left:0,top:0,bottom:0,right:0}),dn=(0,xt.useRef)(null),[or,is]=(0,xt.useState)(!1),[qr,rs]=(0,xt.useState)(""),ro=(0,xt.useRef)(null),Ur=(ki,Tr)=>{var Oi;const{clientWidth:bi,clientHeight:hr}=window.document.documentElement,ln=(Oi=dn.current)==null?void 0:Oi.getBoundingClientRect();ln&&$i({left:-ln.left+Tr.x,right:bi-(ln.right-Tr.x),top:-ln.top+Tr.y,bottom:hr-(ln.bottom-Tr.y)})},Or=(0,jt.useParams)(),Wo=(0,re.GJ)(),oo={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,xt.useEffect)(()=>{console.log(Or)},[]);const hi=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(ki,Tr,Oi)=>xt.createElement("div",null,ki,Tr.is_work_end_evaluate&&xt.createElement(te.vA,{status:5}))},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time",width:"130px"},{title:"\u5185\u5B58\u6D88\u8017(MB)",width:"150px",dataIndex:"ts_mem"},{title:"\u8BC4\u6D4B\u65F6\u95F4",width:"170px",dataIndex:"created_at",render:ki=>he()(ki).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(ki,Tr)=>xt.createElement("span",{className:"c-blue current",onClick:()=>xr(void 0,null,function*(){var Oi,bi;const hr=yield(0,mt.Lk)(Tr.game_identifier,{path:(bi=(Oi=Tr.path)==null?void 0:Oi.replace(/\/g,";"))==null?void 0:bi.split(";")[0],query_index:Tr.query_index,homework_common_id:Or.categoryId});(hr==null?void 0:hr.status)===0&&(is(hr),Bi(!0))})},Tr.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],Xt=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(ki,Tr)=>{var Oi;return xt.createElement("span",null,xt.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Wt.Z.IMG_SERVER+"/images/"+((Oi=Tr==null?void 0:Tr.user)==null?void 0:Oi.image_url)}),ki)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:ki=>xt.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",ki,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:ki=>xt.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",ki,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:ki=>xt.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",ki?he()(ki).format("YYYY-MM-DD HH:mm"):"--")}];function An(ki,Tr){return xr(this,null,function*(){const{challenge_id:Oi}=yi[ki],bi=yield Sn({type:"shixunHomeworks/changeScore",payload:{categoryId:Or.homeworkId,type:"report",score:Tr,challenge_id:Oi}});yield Sn({type:"shixunHomeworks/getShixunWorkReport",payload:ji({},Or)}),bi.status===0&&Ae.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function _s(ki,Tr){return(0,Ut.U2)(`student_works/${Nr}/rep_passed_content.json`,{path:Tr,game_id:ki})}const[xs,Xo]=(0,xt.useState)((ei=Ri==null?void 0:Ri.shixun_detail)==null?void 0:ei.map(ki=>yr(ji({},ki),{commentEdit:!1}))),Ms=ki=>ki.replace(/\\\(([\s\S]*?)\\\)/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/\\\[([\s\S]*?)\\\]/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/`(\$\$.*?\$\$)`/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/_{2,}/g,"`$&`"),[pa,_a]=(0,xt.useState)(!1),ma=(ki,Tr)=>xr(void 0,null,function*(){var Oi,bi;_a(!0),ro.current=new Mn.Z(Wt.Z.API_SERVER+"/api/stream/intelligent_imports/chat_messages.json",{response_mode:"streaming",model:"qwen-max",scene_awareness:!1,thinking_enabled:!1,image_generator:!1,file_ids:[],history:[],prompt:qi,shixun_id:Ri==null?void 0:Ri.myshixun_identifier,game_id:ki==null?void 0:ki.id,source:"shixun",is_chat:!1,type:9,description:ki==null?void 0:ki.challenge_description,query:(bi=(Oi=ki==null?void 0:ki.game_codes)==null?void 0:Oi[0])==null?void 0:bi.content,homework_common_id:Or.categoryId}),yield new Promise((hr,ln)=>{ro.current.on("data",cr=>{const Wr=[...xs];Wr[Tr].comment=Ms(cr==null?void 0:cr.full),Xo(Wr)}),ro.current.on("done",()=>xr(void 0,null,function*(){var cr;_a(!1);const Wr=[...xs],Ko=yield(0,Ut.ZP)(`/api/student_works/${Or==null?void 0:Or.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:ki==null?void 0:ki.challenge_id,comment:Wr[Tr].comment}});if((Ko==null?void 0:Ko.status)==0){Ae.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Go=[...xs];Go[Tr].comment_updated_at=(cr=Ko==null?void 0:Ko.data)==null?void 0:cr.comment_updated_at,Xo(Go)}})),ro.current.startStream()})});return xt.createElement(xt.Fragment,null,xs==null?void 0:xs.map(function(ki,Tr){var Oi,bi;return xt.createElement("div",{key:Tr},xt.createElement("aside",{className:"pl30 pr30",key:Tr},xt.createElement("div",{className:`${ce.shixunTitle} mt10`},xt.createElement("div",null,xt.createElement("span",{className:"fa fa-code "}),xt.createElement("strong",{className:"c-black"},"\u7B2C",Tr+1,"\u5173 ",xt.createElement(jt.Link,{className:"c-black",target:"_blank",to:`/tasks/${Or.coursesId}/${Or.categoryId}/${ki.game_identifier}`},ki.subject))),Wo?xt.createElement("span",null,"\u8C03\u5206\uFF1A",xt.createElement(Yn,{className:"game-score",max:yi[Tr].game_score_full,defaultValue:yi[Tr].game_score,onBlur:hr=>{var ln;if((0,re.Rm)()&&!((ln=_e.AssistantObject.practice)!=null&&ln.can_appraise)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}An(Tr,hr)}})):null),xt.createElement("div",{className:"font16 mt10"},ki.st===0&&(ki.path?typeof(ki==null?void 0:ki.game_codes_cn)=="string"?xt.createElement("aside",{className:ce.shixunWrp},xt.createElement(Pt,{game_codes_cn:ki==null?void 0:ki.game_codes_cn,autoHeight:Ee,path:ki.path,game_id:ki.id,data:ki.game_codes,diff_code_count:ki.diff_code_count,onPathChange:_s})):xt.createElement("div",{className:"font14",style:{border:"1px solid #d9d9d9",padding:"6px 10px"}}," \u63D0\u793A\uFF1A\u7EAF\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u7684\u5B9E\u8BAD\u4E0D\u5C55\u793A\u901A\u5173\u4EE3\u7801\uFF0C\u5982\u9700\u67E5\u770B\u5B66\u751F\u4EE3\u7801\u8BF7\u524D\u5F80\u4F5C\u4E1A\u5217\u8868\u5BFC\u51FA\u5B9E\u9A8C\u6587\u4EF6\u3002"):"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD"),ki.st===1&&(ki.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD")),xt.createElement("aside",{className:"mt10 font16"},(Oi=ki.outputs)!=null&&Oi.length?xt.createElement(at.default,{columns:hi,pagination:{hideOnSinglePage:!0},dataSource:ki.outputs.map(hr=>ji(ji({},ki),hr))}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"),xt.createElement("aside",{className:"mt10"},xt.createElement("div",null,xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("strong",{className:"c-black font14"},"\u4EE3\u7801\u8BC4\u4EF7"),!(ki!=null&&ki.commentEdit)&&!(0,re.dE)()&&(ki!=null&&ki.comment?xt.createElement(xt.Fragment,null,xt.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",ki!=null&&ki.comment_updated_at?he()(ki==null?void 0:ki.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),xt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>xr(this,null,function*(){pa?Ae.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):ne.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u662F\u5426\u91CD\u65B0\u751F\u6210\u8BC4\u8BBA\uFF1F",okText:"\u786E\u8BA4",icon:null,cancelText:"\u53D6\u6D88",onOk:()=>xr(this,null,function*(){ma(ki,Tr)})})})},xt.createElement("i",{className:"iconfont icon-zhongxinshengcheng1 mr8 font14"}),"\u91CD\u65B0\u751F\u6210")):xt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"auto",cursor:"pointer"},onClick:()=>xr(this,null,function*(){pa?Ae.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):ma(ki,Tr)})},xt.createElement("img",{src:Re,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(ki!=null&&ki.commentEdit)&&!(0,re.dE)()&&xt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const hr=[...xs];hr[Tr].commentEdit=!0,Xo(hr),rs(ki==null?void 0:ki.comment)}},xt.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(ki==null?void 0:ki.commentEdit)&&xt.createElement(xt.Fragment,null,xt.createElement("div",{className:ce.pj_close,onClick:()=>{const hr=[...xs];hr[Tr].commentEdit=!1,Xo(hr)}},"\u53D6\u6D88"),xt.createElement("div",{className:ce.pj_save,onClick:()=>xr(this,null,function*(){var hr;const ln=yield(0,Ut.ZP)(`/api/student_works/${Or==null?void 0:Or.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:ki==null?void 0:ki.challenge_id,comment:qr}});if((ln==null?void 0:ln.status)==0){Ae.ZP.success("\u8BC4\u4EF7\u6210\u529F");const cr=[...xs];cr[Tr].commentEdit=!1,cr[Tr].comment=qr,cr[Tr].comment_updated_at=(hr=ln==null?void 0:ln.data)==null?void 0:hr.comment_updated_at,Xo(cr)}})},"\u4FDD\u5B58"))),!(ki!=null&&ki.commentEdit)&&xt.createElement("div",{className:ce.pingjia},ki!=null&&ki.comment?xt.createElement(Kn.Z,{value:ki==null?void 0:ki.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(ki==null?void 0:ki.commentEdit)&&xt.createElement(ut.default.TextArea,{defaultValue:qr,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:hr=>rs(hr.target.value)}))),xt.createElement("aside",{className:"mt10 font16"},((bi=ki==null?void 0:ki.adjust_review_score_list)==null?void 0:bi.length)>0&&(0,re.GJ)()&&xt.createElement("div",null,xt.createElement("strong",{className:"c-black font14"},"\u8C03\u5206\u8BB0\u5F55"),xt.createElement(at.default,{columns:Xt,pagination:{hideOnSinglePage:!0},dataSource:ki.adjust_review_score_list,showHeader:!1})))))}),xt.createElement(ne.default,{open:ci,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{is({}),Bi(!1)},onCancel:()=>{is({}),Bi(!1)},title:xt.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{Qi&&Ar(!1)},onMouseOut:()=>{Ar(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:ki=>xt.createElement(kt(),{disabled:Qi,bounds:cn,nodeRef:dn,onStart:(Tr,Oi)=>Ur(Tr,Oi)},xt.createElement("div",{ref:dn},ki))},xt.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},xt.createElement("div",{style:{display:"flex",alignItems:"center"}},((Xe=or==null?void 0:or.data)==null?void 0:Xe.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?xt.createElement("i",{style:{color:"#0B9953",fontSize:18,marginRight:10},className:"iconfont icon-duigou1"}):xt.createElement("i",{style:{color:"#E21010",fontSize:18,marginRight:10},className:"iconfont icon-jinggao1"}),xt.createElement("div",{style:{color:((Fn=or==null?void 0:or.data)==null?void 0:Fn.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(si=or==null?void 0:or.data)==null?void 0:si.output_detail)),xt.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:20}},xt.createElement("div",null,xt.createElement("span",{style:{color:"#6A7283"}},"\u8BC4\u6D4B\u65F6\u95F4"),xt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},he()((Gi=or==null?void 0:or.data)==null?void 0:Gi.created_at).format("YYYY-MM-DD HH:mm:ss"))),xt.createElement("div",null,xt.createElement("span",{style:{color:"#6A7283"}},"\u7528\u65F6"),xt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(Ji=or==null?void 0:or.data)==null?void 0:Ji.ts_time,"s")),xt.createElement("div",null,xt.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),xt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(Te=or==null?void 0:or.data)==null?void 0:Te.ts_mem,"mb")),xt.createElement("div",null,xt.createElement("span",{style:{color:"#6A7283"}},"\u7528\u4F8B\u901A\u8FC7\u7387"),xt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},((Mi=or==null?void 0:or.data)==null?void 0:Mi.test_set_passed_rate)*100,"%")))),xt.createElement(Qn.ZP,{height:500,autoHeight:Ee,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((or==null?void 0:or.content)||""))),options:oo})))};var Ii=(0,jt.connect)(({shixunHomeworks:ve,loading:Ee,globalSetting:_e,classroomList:Sn})=>({shixunHomeworks:ve,globalSetting:_e,loading:Ee.effects,classroomList:Sn}))(Qr),br=Qt(91773),Sr={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},Bo=Qt(1916),er=Qt(67294),Lo=Object.defineProperty,ys=Object.getOwnPropertySymbols,Mo=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,Pn=(ve,Ee,_e)=>Ee in ve?Lo(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ve[Ee]=_e,Mt=(ve,Ee)=>{for(var _e in Ee||(Ee={}))Mo.call(Ee,_e)&&Pn(ve,_e,Ee[_e]);if(ys)for(var _e of ys(Ee))Lr.call(Ee,_e)&&Pn(ve,_e,Ee[_e]);return ve},jn=(ve,Ee,_e)=>new Promise((Sn,ei)=>{var Xe=Gi=>{try{si(_e.next(Gi))}catch(Ji){ei(Ji)}},Fn=Gi=>{try{si(_e.throw(Gi))}catch(Ji){ei(Ji)}},si=Gi=>Gi.done?Sn(Gi.value):Promise.resolve(Gi.value).then(Xe,Fn);si((_e=_e.apply(ve,Ee)).next())});const kn=({shixunHomeworks:ve,dispatch:Ee,classroomList:_e})=>{const{shixunWorkReport:Sn}=ve,ei=(0,jt.useParams)(),[Xe,Fn]=(0,xt.useState)(!1),[si]=br.default.useForm(),[Gi,Ji]=ne.default.useModal(),[Te,Mi]=(0,xt.useState)(!1),[Ri,yi]=(0,xt.useState)(!1);(0,xt.useEffect)(()=>{var ci,Bi,Qi,Ar;ve.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&si.setFieldsValue({comment:(Bi=(ci=ve.actionTabs.selectArrs)==null?void 0:ci.data)==null?void 0:Bi.work_comment,hidden_comment:(Ar=(Qi=ve.actionTabs.selectArrs)==null?void 0:Qi.data)==null?void 0:Ar.work_comment_hidden})},[ve.actionTabs.key]);const Nr=()=>jn(void 0,null,function*(){const ci=si.getFieldsValue();(yield(0,Ut.ZP)(`/api/student_works/${ei.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:ci.hidden_comment,comment:ci.comment}})).status===0&&(Ae.ZP.success("\u8BC4\u9605\u6210\u529F"),si.resetFields(),Ee({type:"shixunHomeworks/setActionTabs",payload:{}}),Ee({type:"shixunHomeworks/getShixunWorkReport",payload:Mt({},ei)}))}),qi=[{title:"\u5173\u5361",dataIndex:"name",render:(ci,Bi,Qi)=>Qi+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(ci,Bi,Qi)=>er.createElement("div",null,ci,Bi.complete_status===4&&er.createElement(te.vA,{status:Bi.complete_status}))},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"open_time"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",align:"center"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",align:"center",render:ci=>ci?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(ci,Bi)=>er.createElement("div",null,er.createElement("span",{style:{color:parseFloat(Bi.game_score_full)!==parseFloat(ci)?"#E30000":"#53C41B"}},ci),"/",Bi.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(ci,Bi)=>(0,re.GJ)()?er.createElement(Yn,{max:Bi.game_score_full,defaultValue:parseFloat(ci),onBlur:Qi=>jn(void 0,null,function*(){var Ar,cn;if((0,re.Rm)()&&!((Ar=_e.AssistantObject.practice)!=null&&Ar.can_appraise)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const $i=yield Ee({type:"shixunHomeworks/changeScore",payload:{categoryId:ei.homeworkId,type:"report",score:Qi,challenge_id:Bi.challenge_id}});(cn=ve==null?void 0:ve.actionTabs)==null||cn.fn(),yield Ee({type:"shixunHomeworks/getShixunWorkReport",payload:Mt({},ei)}),$i.status===0&&Ae.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):ci}];return er.createElement(er.Fragment,null,Ji,er.createElement(ne.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:ve.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>jn(void 0,null,function*(){var ci;if((0,re.Rm)()&&!((ci=_e.AssistantObject.practice)!=null&&ci.can_appraise)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Bi=si.getFieldsValue();JSON.stringify(Bi)==="{}"||Bi.hidden_comment===""&&Bi.comment===""?Fn(!0):Nr()}),onCancel:()=>{Ee({type:"shixunHomeworks/setActionTabs",payload:{}})}},er.createElement(de.Z,{justify:"space-between",className:Sr.info},er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u59D3\u540D"),er.createElement("span",{className:Sr.blackContent},Sn==null?void 0:Sn.username)),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u5B66\u53F7"),er.createElement("span",{className:Sr.blackContent},(Sn==null?void 0:Sn.student_id)||"--")),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u73ED\u7EA7"),er.createElement("span",{className:Sr.blackContent},(Sn==null?void 0:Sn.group_name)||"--")),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u5173\u5361\u5F97\u5206"),er.createElement("span",{className:Sr.orangeContent},(Sn==null?void 0:Sn.challenge_score)||"--")),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u6548\u7387\u5206"),er.createElement("span",{className:Sr.orangeContent},(Sn==null?void 0:Sn.eff_score)||"--")),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u8865\u4EA4\u6263\u5206"),er.createElement("span",{className:Sr.orangeContent},(Sn==null?void 0:Sn.late_penalty)||"--")),er.createElement(Ie.Z,null,er.createElement("span",{className:`${Sr.label} ${Sr.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),er.createElement("span",{className:Sr.orangeContent},(Sn==null?void 0:Sn.work_score)||"--"))),er.createElement(br.default,{form:si,onChange:()=>{Xe&&Fn(!1)}},er.createElement(de.Z,{wrap:!1,align:"middle",justify:"space-between"},er.createElement(Ie.Z,null,er.createElement("div",{className:`${Sr.inputLabel} ${Sr.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),er.createElement(Ie.Z,null,er.createElement(Bo.Z,{isShowComponent:(0,re.G5)(),ModalProps:{open:Te,onCancel:()=>{Mi(!1)}},onDataSelect:(ci,Bi)=>jn(void 0,[ci,Bi],function*(Qi,{node:Ar}){const cn=()=>{si.setFieldsValue({comment:Ar==null?void 0:Ar.value}),Mi(!1)};if(si.getFieldValue("comment")){Gi.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:cn});return}cn()})},er.createElement(Dt.ZP,{style:{padding:0,height:"auto"},icon:er.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:ci=>{Mi(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),er.createElement(br.default.Item,{name:"comment"},er.createElement(ut.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),er.createElement(de.Z,{wrap:!1,align:"middle",justify:"space-between"},er.createElement(Ie.Z,null,er.createElement("div",{className:`${Sr.inputLabel} ${Sr.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),er.createElement(Ie.Z,null,er.createElement(Bo.Z,{isShowComponent:(0,re.G5)(),ModalProps:{open:Ri,onCancel:()=>{yi(!1)}},onDataSelect:(ci,Bi)=>jn(void 0,[ci,Bi],function*(Qi,{node:Ar}){const cn=()=>{si.setFieldsValue({hidden_comment:Ar==null?void 0:Ar.value}),yi(!1)};if(si.getFieldValue("hidden_comment")){Gi.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:cn});return}cn()})},er.createElement(Dt.ZP,{style:{padding:0,height:"auto"},icon:er.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:ci=>{yi(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),er.createElement(br.default.Item,{name:"hidden_comment"},er.createElement(ut.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),Xe&&er.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),er.createElement("div",{className:Sr.tableTitle},"\u5173\u5361\u6210\u7EE9"),er.createElement(at.default,{className:Sr.scoreTable,dataSource:Sn.stage_list,rowKey:"challenge_id",pagination:!1,columns:qi,scroll:{x:"max-content"}})))};var _n=(0,jt.connect)(({shixunHomeworks:ve,classroomList:Ee})=>({shixunHomeworks:ve,classroomList:Ee}))(kn),Wn=Qt(16151),qn=Qt(86763),ui=Qt(80599),Wi=Qt.n(ui),en={wrap:"wrap___LZOi9",line:"line___oju0L"},Je=Qt(446),un=({detailData:ve})=>{var Ee;return xt.createElement("div",{className:en.wrap},xt.createElement(Je.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,Je.Uf)(ve),(ve==null?void 0:ve.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},xt.createElement(Je.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,Je.Uf)(ve)}),!!((Ee=ve==null?void 0:ve.photos)!=null&&Ee.length)&&xt.createElement(xt.Fragment,null,xt.createElement("div",{className:en.line}),xt.createElement(Je._s,{dataSource:ve==null?void 0:ve.photos,right:21,col:4,wrapWidth:1140}))))},fi=Qt(98769),mi=Qt(28812),ri=Qt(26194),ee=Qt(67294),Cn=Object.defineProperty,Ti=Object.defineProperties,Xi=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,Zi=(ve,Ee,_e)=>Ee in ve?Cn(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ve[Ee]=_e,ur=(ve,Ee)=>{for(var _e in Ee||(Ee={}))Ge.call(Ee,_e)&&Zi(ve,_e,Ee[_e]);if(On)for(var _e of On(Ee))Si.call(Ee,_e)&&Zi(ve,_e,Ee[_e]);return ve},Ln=(ve,Ee)=>Ti(ve,Xi(Ee)),Ui=(ve,Ee)=>{var _e={};for(var Sn in ve)Ge.call(ve,Sn)&&Ee.indexOf(Sn)<0&&(_e[Sn]=ve[Sn]);if(ve!=null&&On)for(var Sn of On(ve))Ee.indexOf(Sn)<0&&Si.call(ve,Sn)&&(_e[Sn]=ve[Sn]);return _e},pe=(ve,Ee,_e)=>new Promise((Sn,ei)=>{var Xe=Gi=>{try{si(_e.next(Gi))}catch(Ji){ei(Ji)}},Fn=Gi=>{try{si(_e.throw(Gi))}catch(Ji){ei(Ji)}},si=Gi=>Gi.done?Sn(Gi.value):Promise.resolve(Gi.value).then(Xe,Fn);si((_e=_e.apply(ve,Ee)).next())});const Fe=ve=>{var Ee=ve,{shixunHomeworks:_e,classroomList:Sn,globalSetting:ei,loading:Xe,user:Fn,dispatch:si}=Ee,Gi=Ui(Ee,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Ji,Te,Mi,Ri,yi,Nr,qi;const[ci,Bi]=(0,xt.useState)(ur({},(0,jt.useParams)())),Qi=(0,jt.useParams)(),[Ar,cn]=(0,xt.useState)({page:1,page_size:10}),$i=(0,jt.useLocation)(),[]=(0,xt.useState)([]),[dn,or]=(0,xt.useState)(),is=(0,xt.useRef)(),qr=(0,xt.useRef)(),[rs,ro]=(0,xt.useState)(!1),[Ur,Or]=(0,xt.useState)(!0),[Wo,oo]=(0,xt.useState)(!1),[hi,Xt]=(0,xt.useState)(!1),{shixunWorkReport:An}=_e,[_s,xs]=(0,xt.useState)(),[Xo,Ms]=(0,xt.useState)([]),[pa,_a]=(0,xt.useState)(),[ma,ki]=(0,xt.useState)("all"),Tr=(0,re.GJ)(),[Oi,bi]=(0,xt.useState)(new(ge())),[hr,ln]=(0,xt.useState)(0),[cr,Wr]=(0,xt.useState)(!1),[Ko,Go]=(0,xt.useState)(!1),[ws,Zs]=(0,xt.useState)(!1),[Qa,Na]=(0,xt.useState)(""),[nl,Vl]=(0,xt.useState)(!1),[nn,il]=(0,xt.useState)(!0),[au,Xu]=(0,xt.useState)(0),Ps=(0,xt.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),lu=(0,xt.useRef)(),[cA,Ju]=(0,xt.useState)(!1),[us,Ys]=(0,xt.useState)(!1),Vr=(0,xt.useRef)(null),So=()=>pe(void 0,null,function*(){(Fn.userInfo.is_teacher||Fn.userInfo.admin)&&(Vl(!0),il(!1))});(0,xt.useEffect)(()=>{var zi;(0,re.Rm)()&&Sn.AssistantObject.practice&&!((zi=Sn.AssistantObject.practice)!=null&&zi.can_view)&&jt.history.replace("/403")},[(Ji=Sn.AssistantObject.practice)==null?void 0:Ji.can_view]),(0,xt.useEffect)(()=>{So(),console.log("\u6253\u5370\u7684------",An),lu.current=An==null?void 0:An.next_student_work_id,Na(An.repeat_minus_score)},[An,Fn]),(0,xt.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",An.work_score),Xu(An.work_score)},[An.work_score,Qa]),(0,xt.useEffect)(()=>(si({type:"globalSetting/footerToggle",payload:!1}),()=>{si({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,xt.useEffect)(()=>{setTimeout(()=>{Vr.current&&Vr.current.clientHeight>=500&&Ys(!0)},500)},[(Te=An==null?void 0:An.student_work_test_result_info)==null?void 0:Te.content,Vr.current]),(0,xt.useEffect)(()=>{var zi;if(An){let $r=[];(zi=An==null?void 0:An.target_test_sets)==null||zi.map((Po,Ka)=>{var Da;(Da=Po==null?void 0:Po.targets)==null||Da.map((Xs,va)=>{var Ks;Xs.name=Po==null?void 0:Po.name,Xs.total_target_score=Po==null?void 0:Po.total_target_score,Xs.actual_target_score=Po==null?void 0:Po.actual_target_score,Xs.rowSpan=va===0?(Ks=Po==null?void 0:Po.targets)==null?void 0:Ks.length:0,Xs.order=Ka+1,$r.push(Xs)})}),xs($r),(0,re.Rm)()&&si({type:"classroomList/getAssistantPermissions",payload:{course_id:ci.coursesId}})}},[An]),(0,xt.useEffect)(()=>{_e.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(An==null?void 0:An.students_count)>0&&!Ur&&setTimeout(()=>{Uu("all")},800)},[An==null?void 0:An.homework_common_id,Ur]),(0,xt.useEffect)(()=>{Bi(ur({},Qi))},[$i.pathname]);const os=()=>{document.body.scrollIntoView()},ks=zi=>{Ar.page=zi,cn(ur({},Ar)),nr(Ar,ma)},nr=(zi,$r)=>pe(void 0,null,function*(){oo(!0);const Po=yield(0,Ut.ZP)(`/api/student_works/${ci==null?void 0:ci.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:Ln(ur({},zi),{challenge_id:$r=="all"?null:$r})});(Po==null?void 0:Po.status)===0&&(Ms(Po==null?void 0:Po.list),_a(Po==null?void 0:Po.count)),oo(!1)});function gh(){return pe(this,null,function*(){Ps.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const qu=()=>{document.querySelectorAll("canvas").forEach(zi=>{(!zi.clientWidth||!zi.clientHeight)&&zi.remove()})},ml=()=>{is.current.offsetHeight>62e3?Xt(!1):Xt(!0)},ph=zi=>pe(void 0,null,function*(){const $r=yield(0,qn.t1)({homeworkId:zi||ci.homeworkId});or($r==null?void 0:$r.data)}),Uu=zi=>pe(void 0,null,function*(){var $r,Po,Ka,Da;Ju(!0);let Xs=0,va;va=ne.default.info({width:460,title:ee.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",ee.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:ee.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",ee.createElement("span",{className:"c-blue"},Xs+1),"/",zi!=="all"?1:An==null?void 0:An.students_count,ee.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:ce.modal,onOk:()=>{}});const Ks={margin:[0,0],filename:`${An!=null&&An.student_id&&(An==null?void 0:An.student_id)!="--"?An==null?void 0:An.student_id:""}${An.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},mh=Oi.folder(An==null?void 0:An.shixun_name);function Ia(Qu){return pe(this,null,function*(){yield ph(Qu||lu.current);const Zo=yield si({type:"shixunHomeworks/getShixunWorkReport",payload:ur({homeworkId:Qu||lu.current},Ps.current||{})});lu.current=Zo==null?void 0:Zo.next_student_work_id,os(),Xs++,setTimeout(()=>pe(this,null,function*(){var Wl,As,xa,Ga;qu();const dA=mh.folder(`${Zo==null?void 0:Zo.group_name}`).folder(`${Zo!=null&&Zo.student_id&&(Zo==null?void 0:Zo.student_id)!="--"?Zo.student_id+"+":""}${Zo==null?void 0:Zo.username}`),Es=document.querySelector("#export-all").children;let vh=Wi()();for(let hl=0;hl<Es.length;hl++)yield vh.set(Ks).from(Es[hl]).toContainer().toCanvas().toPdf().get("pdf").then(ea=>pe(this,null,function*(){hl<Es.length-1&&(yield ea.addPage())}));if(dA.file(`${Zo!=null&&Zo.student_id&&(Zo==null?void 0:Zo.student_id)!="--"?Zo.student_id+"+":""}${Zo==null?void 0:Zo.username}.pdf`,vh.output("blob")),((Wl=Zo==null?void 0:Zo.shixun_detail)==null?void 0:Wl.length)>0&&((xa=(As=Zo==null?void 0:Zo.shixun_detail)==null?void 0:As.filter(hl=>{var ea;return((ea=hl==null?void 0:hl.game_codes)==null?void 0:ea.length)>0}))==null?void 0:xa.length)>0){const hl=dA.folder("\u4EE3\u7801\u6587\u4EF6");(Ga=Zo==null?void 0:Zo.shixun_detail)==null||Ga.map((ea,Ml)=>{var na,ps;if(((na=ea==null?void 0:ea.game_codes)==null?void 0:na.length)>0){const Ds=hl.folder(`\u7B2C${Ml+1}\u5173-${ea.subject}-${ea.id}`);(ps=ea==null?void 0:ea.game_codes)==null||ps.map(Ba=>{Ds.file(`${Ba.filename}.txt`,Ba==null?void 0:Ba.content)})}})}va.update({content:ee.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",ee.createElement("span",{className:"c-blue"},Xs),"/",Zo==null?void 0:Zo.students_count,ee.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),Xs==(Zo==null?void 0:Zo.students_count)?(va.destroy(),Ei()):Ia()}),2200)})}if(zi!=="all"||(An==null?void 0:An.students_count)<2){qu(),os();const Qu=qr.current.children;let Zo=Wi()();const As=mh.folder(`${An==null?void 0:An.group_name}`).folder(`${An!=null&&An.student_id&&(An==null?void 0:An.student_id)!="--"?(An==null?void 0:An.student_id)+"+":""}${An==null?void 0:An.username}`);for(let xa=0;xa<Qu.length;xa++)yield Zo.set(Ks).from(Qu[xa]).toContainer().toCanvas().toPdf().get("pdf").then(Ga=>pe(void 0,null,function*(){xa<Qu.length-1&&(yield Ga.addPage())}));if(ro(!1),As.file(`${An!=null&&An.student_id&&(An==null?void 0:An.student_id)!="--"?(An==null?void 0:An.student_id)+"+":""}${An.username}.pdf`,Zo.output("blob"),{base64:!1}),(($r=An==null?void 0:An.shixun_detail)==null?void 0:$r.length)>0&&((Ka=(Po=An==null?void 0:An.shixun_detail)==null?void 0:Po.filter(xa=>{var Ga;return((Ga=xa==null?void 0:xa.game_codes)==null?void 0:Ga.length)>0}))==null?void 0:Ka.length)>0){const xa=As.folder("\u4EE3\u7801\u6587\u4EF6");(Da=An==null?void 0:An.shixun_detail)==null||Da.map((Ga,YA)=>{var dA,Es;if(((dA=Ga==null?void 0:Ga.game_codes)==null?void 0:dA.length)>0){const vh=xa.folder(`\u7B2C${YA+1}\u5173-${Ga.subject}-${Ga.id}`);(Es=Ga==null?void 0:Ga.game_codes)==null||Es.map(hl=>{vh.file(`${hl.filename}.txt`,hl==null?void 0:hl.content)})}})}va.destroy(),Ei();return}else Ia(An==null?void 0:An.first_student_work_id)}),Ei=()=>{Oi.generateAsync({type:"blob"}).then(function(zi){console.log(An,"shixunWorkReport");const $r=document.createElement("a");$r.href=window.URL.createObjectURL(zi),$r.download=(An==null?void 0:An.shixun_name)+".zip",document.body.appendChild($r);const Po=document.createEvent("MouseEvents");Po.initEvent("click",!1,!1),$r.dispatchEvent(Po),document.body.removeChild($r),bi(new(ge()))}),Xt(!1)};(0,xt.useEffect)(()=>{Aa()},[ci.homeworkId]);const Aa=()=>pe(void 0,null,function*(){Or(!0),yield si({type:"shixunHomeworks/getShixunWorkReport",payload:ur(ur({},ci),Ps.current||{})}),ph(),(0,re.GJ)()&&gh(),Or(!1)}),ta=[{title:"\u5173\u5361",dataIndex:"name",render:(zi,$r,Po)=>Po+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(zi,$r,Po)=>ee.createElement("div",null,zi,$r.complete_status===4&&ee.createElement(te.vA,{status:$r.complete_status}))},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:(zi,$r,Po)=>zi||"- -"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:zi=>zi?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(zi,$r)=>ee.createElement("div",null,ee.createElement("span",{style:{color:parseFloat($r.myself_experience)!==parseFloat(zi)?"red":"green"}},$r.myself_experience),"/",zi)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(zi,$r)=>ee.createElement("div",null,ee.createElement("span",{style:{color:parseFloat($r.game_score_full)!==parseFloat(zi)?"red":"green"}},zi),"/",$r.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(zi,$r)=>Tr?ee.createElement(Yn,{max:$r.game_score_full,defaultValue:parseFloat(zi),onBlur:Po=>pe(void 0,null,function*(){var Ka;if((0,re.Rm)()&&!((Ka=Sn.AssistantObject.practice)!=null&&Ka.can_appraise)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Da=yield si({type:"shixunHomeworks/changeScore",payload:{categoryId:ci.homeworkId,type:"report",score:Po,challenge_id:$r.challenge_id}});nr({page:1,page_size:10},"all"),yield si({type:"shixunHomeworks/getShixunWorkReport",payload:ur(ur({},ci),Ps.current||{})}),Da.status===0&&Ae.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):zi}];let uu=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(zi,$r,Po)=>({children:zi,props:{rowSpan:$r.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(zi,$r,Po)=>({children:zi,props:{rowSpan:$r.rowSpan}})},{title:"\u6307\u6807\u540D\u79F0",dataIndex:"target_name",key:"target_name"},{title:"\u6307\u6807\u9884\u671F\u7ED3\u679C",dataIndex:"output",key:"output"},{title:"\u6307\u6807\u5B9E\u9645\u7ED3\u679C",dataIndex:"actual_output",key:"actual_output"},{title:"\u6307\u6807\u5F97\u5206",dataIndex:"test_score",key:"test_score",render:(zi,$r,Po)=>ee.createElement("div",null,ee.createElement("span",{style:{color:parseFloat($r.actual_test_score)!==parseFloat(zi)?"red":"green"}},$r.actual_test_score),"/",zi)},{title:"\u6307\u6807\u603B\u5206",render:(zi,$r,Po)=>({children:ee.createElement("div",null,ee.createElement("span",{style:{color:parseFloat($r.actual_target_score)!==parseFloat(zi)?"red":"green"}},$r.actual_target_score),"/",zi),props:{rowSpan:$r.rowSpan}}),dataIndex:"total_target_score",key:"total_target_score"}];const ZA=[{title:"\u5173\u5361",dataIndex:"challenge_num",width:220},{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"]},{title:"\u8C03\u5206\u524D",dataIndex:"old_score"},{title:"\u8C03\u5206\u540E",dataIndex:"score"},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",render:zi=>ee.createElement("span",null,zi?he()(zi).format("YYYY-MM-DD HH:mm"):"--")}],Bu=zi=>{si({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{zi==="next"?jt.history.push(`/classrooms/${ci.coursesId}/shixun_homework/${ci.categoryId}/${An==null?void 0:An.next_student_work_id}/comment`):jt.history.push(`/classrooms/${ci.coursesId}/shixun_homework/${ci.categoryId}/${An==null?void 0:An.pre_student_work_id}/comment`)},200)},Zr=zi=>{Na(""),zi.target.value&&(console.log("\u8FDB\u6765",An),zi.target.value=zi.target.value>An.repeat_setting_score?An.repeat_setting_score:zi.target.value,Na(zi.target.value))},Fs=()=>pe(void 0,null,function*(){const zi=yield(0,Ut.ZP)(`/api/student_works/${An==null?void 0:An.work_id}/update_repeat_score`,{method:"put",body:{score:Qa}});yield si({type:"shixunHomeworks/getShixunWorkReport",payload:ur(ur({},ci),Ps.current||{})}),zi.status===0&&Ae.ZP.info("\u64CD\u4F5C\u6210\u529F")});return ee.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},ee.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},ee.createElement(se.Z,{loading:Xe["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},ee.createElement("div",{className:"edu-container"},An.course_id&&ee.createElement("section",{className:"animated fadeIn"},ee.createElement("aside",{className:""},An.category&&ee.createElement(ke.Z,{separator:">"},ee.createElement(ke.Z.Item,null,ee.createElement(jt.Link,{to:`/classrooms/${An.course_id}/shixun_homework`},An.course_name)),ee.createElement(ke.Z.Item,null,ee.createElement(jt.Link,{to:`/classrooms/${An.course_id}/shixun_homework/${An.category.main?"":An.category.category_id}`},An.category.category_name)),ee.createElement(ke.Z.Item,null,ee.createElement(jt.Link,{to:`/classrooms/${An.course_id}/shixun_homework/${An.homework_common_id}/detail${(0,re.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),ee.createElement(ke.Z.Item,null,An.username))),ee.createElement("aside",{className:[ce.title1,"mt20"].join(" ")},ee.createElement(de.Z,{align:"middle"},ee.createElement(Ie.Z,{flex:1},ee.createElement(jt.Link,{to:`/classrooms/${An.course_id}/shixun_homework/${An.homework_common_id}/detail`},ee.createElement(St.Z,{className:"font16 c-black"})),ee.createElement("strong",{className:"font20 ml5"},An==null?void 0:An.homework_name),ee.createElement(te.VV,{temporary:!0,status:An.homework_status})),ee.createElement(Ie.Z,{className:ce.title1_right},An.view_tpi&&ee.createElement(Dt.ZP,{onClick:()=>{var zi,$r;(0,te.xg)(`/tasks/${An==null?void 0:An.course_id}/${An==null?void 0:An.homework_common_id}/${($r=(zi=An==null?void 0:An.shixun_detail)==null?void 0:zi[0])==null?void 0:$r.game_identifier}`)}},ee.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,re.GJ)()&&An.homework_end===!1&&!!An.myshixun_id&&ee.createElement(Dt.ZP,{className:"ml10",onClick:()=>pe(void 0,null,function*(){yield si({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:An.myshixun_identifier},homework_common_id:Qi.categoryId}})})},ee.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),ee.createElement(Dt.ZP,{className:"ml10",onClick:()=>{var zi;if((0,re.Rm)()&&!((zi=Sn.AssistantObject.practice)!=null&&zi.can_download)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Uu("")},loading:rs},ee.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,re.GJ)()&&(An==null?void 0:An.students_count)>1&&ee.createElement(Dt.ZP,{className:"ml10",onClick:()=>{var zi;if((0,re.Rm)()&&!((zi=Sn.AssistantObject.practice)!=null&&zi.can_download)){Ae.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ne.default.confirm({title:"\u9009\u62E9\u5BFC\u51FA\u65B9\u5F0F",closable:!0,icon:null,centered:!0,okText:ee.createElement(nt.Z,{title:"\u5BFC\u51FA\u65F6\u4E0D\u80FD\u9000\u51FA\u6216\u5173\u95ED\u5BFC\u51FA\u9875\u9762\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u524D\u7AEF\u5BFC\u51FA"),cancelText:ee.createElement(nt.Z,{title:"\u751F\u6210\u5BFC\u51FA\u4EFB\u52A1\u540E\u53EF\u5173\u95ED\u9875\u9762\uFF0C\u540E\u53F0\u5BFC\u51FA\u6210\u529F\u540E\u5728\u5386\u53F2\u5BFC\u51FA\u9875\u9762\u81EA\u884C\u4E0B\u8F7D\uFF0C\u4E0D\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u540E\u53F0\u5BFC\u51FA"),onOk:()=>{Uu("all")},onCancel:()=>{},cancelButtonProps:{onClick:()=>{(0,fi.jj)({categoryId:ci.categoryId,coursesId:ci.coursesId},"shixun_report")}}})}},ee.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),ee.createElement("aside",{className:"mt30 relative"})),ee.createElement("aside",{className:"edu-container bg-white",ref:is},ee.createElement("div",{id:"export-all",ref:qr},ee.createElement("div",{id:"export-all-1"},ee.createElement("div",{className:ce.title},ee.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),ee.createElement("div",null,(0,re.GJ)()&&ee.createElement(Dt.ZP,{className:"mr20",type:"primary",onClick:()=>{si({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:An.user_id,data:ur({},An)},fn:()=>nr({page:1,page_size:10},"all")}})}},ee.createElement(bt.Z,null),An.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),ee.createElement(et.Z,{style:{marginTop:0}}),ee.createElement(de.Z,{className:"pl30 pr30"},ee.createElement(Ie.Z,null,ee.createElement("img",{className:ce.userPic,src:`${Wt.Z.IMG_SERVER}/images/${An.image_url}`,alt:An.username})),ee.createElement(Ie.Z,null,ee.createElement("span",{className:"font16 ml40"},An.username),ee.createElement(te.vA,{status:An.compelete_status}),ee.createElement("ul",{className:ce.userInfo},ee.createElement("li",null,"\u5B66\u53F7\uFF1A",An.student_id||"--"),ee.createElement("li",null,"\u5206\u73ED\uFF1A",An.group_name||"--"),ee.createElement("br",null),ee.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",ee.createElement("span",{className:"c-red"},An.complete_count),"/",ee.createElement("span",{className:"c-red"},An.challenges_count)),ee.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",ee.createElement("span",{className:"c-red"},An.current_complete_count||"-"),"/",ee.createElement("span",{className:"c-red"},An.challenges_count)),ee.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",An&&An.efficiency===null?"--":An&&An.efficiency),ee.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",An&&An.max_efficiency===null?"--":An&&An.max_efficiency))),ee.createElement("ul",{className:[ce.listItem,"mt10"].join(" ")},ee.createElement("li",null,ee.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),ee.createElement("div",{className:"c-light-black mt20"},An&&An.passed_time===null||An&&An.passed_time==="--"?"--":he()(An&&An.passed_time).format("YYYY-MM-DD HH:mm"))),ee.createElement("li",null,ee.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",ee.createElement("i",{onClick:zi=>{zi.stopPropagation(),zi.preventDefault(),Wr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),ee.createElement("div",{className:"c-light-black mt20"},An==null?void 0:An.human_training_time_rules)),ee.createElement("li",null,ee.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",ee.createElement("i",{onClick:zi=>{zi.stopPropagation(),zi.preventDefault(),Go(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),ee.createElement("div",{className:"c-light-black mt20"},An.time_consuming)),ee.createElement("li",null,ee.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),ee.createElement("div",{className:"mt20"},An.evaluate_count)),(An==null?void 0:An.eff_score_full)&&ee.createElement(ee.Fragment,null,ee.createElement("li",null,ee.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),ee.createElement("div",{className:"mt20"},ee.createElement("span",{className:"c-orange"},An.challenge_score),"/",ee.createElement("span",{className:"c-light-black"},An.challenge_score_full))),ee.createElement("li",null,ee.createElement("strong",null,"\u6548\u7387\u5206"),ee.createElement("div",{className:"mt20"},ee.createElement("span",{className:"c-orange"},An.eff_score),"/",ee.createElement("span",{className:"c-light-black"},An.eff_score_full)))),(An==null?void 0:An.have_repeat)&&(An==null?void 0:An.repeat_minus_score)!==0&&ee.createElement("li",{style:{position:"relative"}},ee.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},ee.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),ee.createElement("div",{style:{position:"absolute",fontSize:"10px",color:"white",left:"57px",width:"46px",bottom:"72px"}},An!=null&&An.review_rate?ee.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(An!=null&&An.review_id&&nl)localStorage.setItem("studentDetial",window.location.pathname),jt.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${ci.categoryId}/review_detail/${An==null?void 0:An.review_id}`});else return}},An.review_rate.toFixed(1),"%"):ee.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),nl?ee.createElement("div",{className:"mt20"},ee.createElement(ut.default,{style:{width:"45px",height:"22px"},value:Qa,onChange:zi=>{Zr(zi)},onBlur:Fs,disabled:nn})," / ",An==null?void 0:An.repeat_setting_score):ee.createElement("div",{className:"mt20"},An==null?void 0:An.repeat_minus_score," / ",An==null?void 0:An.repeat_setting_score)),console.log("sssssssssssssssssssssss",An==null?void 0:An.have_repeat,An==null?void 0:An.repeat_minus_score),(An==null?void 0:An.have_repeat)&&(An==null?void 0:An.repeat_minus_score)===0&&ee.createElement("li",null,ee.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),ee.createElement("div",{className:"mt20"}," - -")),!(An!=null&&An.have_repeat)&&ee.createElement("li",null,ee.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),ee.createElement("div",{className:"mt20"}," - -")),ee.createElement("li",null,ee.createElement("strong",null,"\u8865\u4EA4\u6263\u5206"),ee.createElement("div",{className:"mt20"},ee.createElement("span",null,An.late_penalty||"- -"))),ee.createElement("li",null,ee.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),ee.createElement("div",{className:"mt20"},ee.createElement("span",{className:"c-orange"},au),"/",ee.createElement("span",{className:"c-light-black"},An.all_work_score))),ee.createElement("li",null,ee.createElement("strong",null,"\u603B\u8BC4"),ee.createElement("div",{className:"mt20"},ee.createElement("span",{className:"c-orange"},An.overall_appraisal))))),ee.createElement(et.Z,{style:{margin:0}}),(An.work_comment_hidden||An.work_comment)&&ee.createElement("div",null,ee.createElement(de.Z,{align:"middle"},ee.createElement(Ie.Z,{flex:1},ee.createElement("h1",{className:ce.title},"\u70B9\u8BC4\u5185\u5BB9")),ee.createElement(Ie.Z,{className:"pr30"},(0,re.GJ)()&&ee.createElement(Dt.ZP,{onClick:()=>pe(void 0,null,function*(){ne.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:ee.createElement(Ot.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return pe(this,null,function*(){(yield(0,qn.gZ)({comment_id:An.comment_id,homeworkId:ci.homeworkId})).status===0&&(Ae.ZP.success("\u5220\u9664\u6210\u529F"),si({type:"shixunHomeworks/getShixunWorkReport",payload:ur(ur({},ci),Ps.current||{})}))})}})})},ee.createElement(Ht.Z,null),"\u5220\u9664"))),ee.createElement(et.Z,{style:{margin:0}}),An.work_comment&&ee.createElement("aside",{className:"pl30 pr30 mt20"},ee.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),ee.createElement("br",null),ee.createElement(Kn.Z,{value:An.work_comment})),An.work_comment_hidden&&ee.createElement("aside",{className:"pl30 pr30 mt20"},ee.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),ee.createElement("br",null),ee.createElement(Kn.Z,{value:An.work_comment_hidden}))),(An==null?void 0:An.action_analysis)&&ee.createElement(un,{detailData:An}),ee.createElement("div",{className:ce.score},ee.createElement("h1",{className:ce.title},"\u9636\u6BB5\u6210\u7EE9"),(An==null?void 0:An.adjust_review_score_count)>0&&(0,re.GJ)()&&ee.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{Zs(!0),nr({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",An==null?void 0:An.adjust_review_score_count,"\u6B21\uFF09")),ee.createElement("aside",{className:"pl30 pr30"},ee.createElement(at.default,{dataSource:An.stage_list,rowKey:zi=>zi==null?void 0:zi.challenge_id,pagination:!1,columns:ta})),((Mi=An==null?void 0:An.target_test_sets)==null?void 0:Mi.length)>0&&ee.createElement("div",null,ee.createElement("h1",{className:ce.title},"\u6307\u6807\u6210\u7EE9"),ee.createElement("aside",{className:"pl30 pr30"},ee.createElement(at.default,{dataSource:_s,rowKey:zi=>zi==null?void 0:zi.challenge_id,pagination:!1,bordered:!0,columns:uu}))),(An==null?void 0:An.work_description)&&ee.createElement(ee.Fragment,null,ee.createElement("h1",{className:ce.title},"\u4E2A\u4EBA\u603B\u7ED3"),ee.createElement("aside",{className:"pl30 pr30"},ee.createElement(Kn.Z,{value:An==null?void 0:An.work_description}))),ee.createElement("h1",{className:ce.title},"\u56FE\u5F62\u7EDF\u8BA1"),ee.createElement(He,{data:dn}),(An==null?void 0:An.is_open_submit_test_result)&&ee.createElement(ee.Fragment,null,ee.createElement("h1",{className:ce.title},"\u5B9E\u9A8C\u7ED3\u679C"),(Ri=An==null?void 0:An.student_work_test_result_info)!=null&&Ri.is_submit_test_result?ee.createElement("div",{className:"px-30px"},ee.createElement("div",{className:"py-20px px-36px",style:{background:"#F6F7F9"}},ee.createElement("div",{ref:Vr,style:{maxHeight:!cA&&"500px",overflow:"hidden"}},ee.createElement(Kn.Z,{value:(yi=An==null?void 0:An.student_work_test_result_info)==null?void 0:yi.content})),us&&ee.createElement("div",{className:"w-full current",onClick:()=>{Ju(!cA)}},ee.createElement(et.Z,{variant:"dashed",style:{borderColor:"#3061D0",marginBottom:"0px"},dashed:!0},ee.createElement("span",{style:{color:"#3061D0"}},cA?"\u6536\u8D77":"\u5C55\u5F00")))),ee.createElement(mi.Z,{className:"px-36px",showDimensions:!1,dataSource:(Nr=An==null?void 0:An.student_work_test_result_info)==null?void 0:Nr.test_result_files,callback:()=>{}})):ee.createElement(ri.Z,{customText:"\u5B66\u751F\u672A\u63D0\u4EA4\u5B9E\u9A8C\u7ED3\u679C"})),ee.createElement("h1",{className:ce.title},"\u5B9E\u8BAD\u8BE6\u60C5")),ee.createElement(Ii,{autoHeight:hi}))),(0,re.GJ)()&&ee.createElement("aside",{className:`${ce.footerBar} ${rs?ce.footerBarStatic:""}`},ee.createElement("aside",{className:"edu-container"},ee.createElement(de.Z,{align:"middle"},ee.createElement(Ie.Z,{flex:"1"},ee.createElement(jt.Link,{className:ce.exitComment,to:`/classrooms/${ci.coursesId}/shixun_homework/${ci.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),ee.createElement(Ie.Z,{flex:"1",className:"tr"},ee.createElement(Dt.ZP,{type:"default",disabled:!(An!=null&&An.pre_student_work_id),onClick:()=>Bu()},"\u4E0A\u4E00\u4E2A"),ee.createElement(Dt.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(An!=null&&An.next_student_work_id),onClick:()=>Bu("next")},"\u4E0B\u4E00\u4E2A"),(0,re.GJ)()&&ee.createElement(Dt.ZP,{type:"primary",onClick:()=>pe(void 0,null,function*(){si({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:An.user_id,data:ur({},An)},fn:()=>nr({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),ee.createElement(_n,null),ee.createElement(Wn.Z,null),ee.createElement(ne.default,{open:cr,width:860,centered:!0,onCancel:()=>{Wr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},ee.createElement("div",{style:{color:"#333333",fontWeight:400}},ee.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),ee.createElement("br",null),ee.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),ee.createElement("br",null),ee.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),ee.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),ee.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),ee.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},ee.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),ee.createElement("br",null),ee.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),ee.createElement("br",null),ee.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),ee.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),ee.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),ee.createElement("br",null),ee.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),ee.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},ee.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),ee.createElement("br",null),ee.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),ee.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},ee.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),ee.createElement("br",null),ee.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),ee.createElement(ne.default,{open:Ko,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Go(!1)},width:600},ee.createElement("div",{style:{fontWeight:400,color:"#333333"}},ee.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",ee.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),ee.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",ee.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),ee.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",ee.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))),ee.createElement(ne.default,{open:ws,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{ki("all"),Zs(!1)},destroyOnClose:!0,width:900},ee.createElement("div",{style:{fontWeight:400,color:"#333333"}},ee.createElement("div",null,ee.createElement("span",null,"\u5173\u5361\uFF1A"),ee.createElement(ht.default,{style:{width:300},value:ma,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:zi=>pe(void 0,null,function*(){ki(zi),nr({page:1,page_size:10},zi)})},ee.createElement(ht.default.Option,{value:"all"}," \u5168\u90E8 "),(qi=An==null?void 0:An.stage_list)==null?void 0:qi.map((zi,$r)=>ee.createElement(ht.default.Option,{key:$r,value:zi==null?void 0:zi.challenge_id},"\u7B2C",(0,te.EM)($r+1),"\u5173")))),ee.createElement("div",{className:"mt20"},ee.createElement(at.default,{dataSource:Xo,rowKey:zi=>zi==null?void 0:zi.id,pagination:!1,columns:ZA,loading:Wo})),ee.createElement("div",{className:ce.footer},ee.createElement("div",null,ee.createElement("span",{style:{color:"#656F87"}},"\u5171",ee.createElement("span",{className:"c-light-primary"},pa),"\u6761\u6570\u636E")),ee.createElement(pt.Z,{defaultCurrent:1,defaultPageSize:10,current:(Ar==null?void 0:Ar.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:pa,onChange:ks})))))};var Ke=(0,jt.connect)(({shixunHomeworks:ve,classroomList:Ee,loading:_e,globalSetting:Sn,user:ei})=>({shixunHomeworks:ve,classroomList:Ee,globalSetting:Sn,loading:_e.effects,user:ei}))(Fe)},16151:function(gn,ze,Qt){"use strict";var xt=Qt(62844),Yt=Qt(2453),he=Qt(33170),xe=Qt(35973),ge=Qt(52262),Ut=Qt(67294),jt=(Ae,se,ke)=>new Promise((de,Ie)=>{var Dt=ut=>{try{et(ke.next(ut))}catch(at){Ie(at)}},nt=ut=>{try{et(ke.throw(ut))}catch(at){Ie(at)}},et=ut=>ut.done?de(ut.value):Promise.resolve(ut.value).then(Dt,nt);et((ke=ke.apply(Ae,se)).next())});const ne=({shixunHomeworks:Ae,classroomList:se,dispatch:ke})=>{const de=(0,xe.useParams)();return Ut.createElement(xt.default,{centered:!0,title:"\u63D0\u793A",open:Ae.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>jt(void 0,null,function*(){var Ie,Dt,nt,et;if((0,ge.Rm)()&&!((Ie=se.AssistantObject.practice)!=null&&Ie.can_redo)){Yt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const ut=yield(0,he.ZP)(`/api/myshixuns/${Ae.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,{method:"GET",params:{course_id:de.coursesId,homework_common_id:Ae.actionTabs.homework_common_id}});if(ut.shixun_identifier){Yt.ZP.success("\u64CD\u4F5C\u6210\u529F"),ke({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(Dt=ut==null?void 0:ut.new_works)==null?void 0:Dt.find(ht=>`${ht.homework_common_id}`===de.categoryId))==null?void 0:nt.id;if((0,ge.Rm)()&&!((et=se.AssistantObject.practice)!=null&&et.can_view))return;xe.history.replace(`/classrooms/${de.coursesId}/shixun_homework/${de.categoryId}/${at}/comment`)}}),onCancel:()=>{ke({type:"shixunHomeworks/setActionTabs",payload:{}})}},Ut.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),Ut.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};ze.Z=(0,xe.connect)(({shixunHomeworks:Ae,classroomList:se})=>({shixunHomeworks:Ae,classroomList:se}))(ne)},98769:function(gn,ze,Qt){"use strict";Qt.d(ze,{AD:function(){return He},D9:function(){return We},Hp:function(){return Ot},IM:function(){return Xn},Iy:function(){return Wt},KM:function(){return Vt},MJ:function(){return Ht},Ne:function(){return En},ON:function(){return tn},Uj:function(){return Dn},VY:function(){return Hn},YO:function(){return rn},YX:function(){return Me},Zn:function(){return nt},_g:function(){return pt},_k:function(){return ie},c6:function(){return Qe},cr:function(){return et},eV:function(){return je},fi:function(){return ut},gh:function(){return Ce},hS:function(){return Ve},iA:function(){return at},j6:function(){return St},je:function(){return Yn},jj:function(){return bt},kS:function(){return li},lS:function(){return di},o6:function(){return ce},pO:function(){return sn},rQ:function(){return Qn},sA:function(){return te},xm:function(){return zt},xo:function(){return In},y8:function(){return Gn},yd:function(){return ht}});var xt=Qt(89779),Yt=Qt(35973),he=Qt(28706),xe=Qt(2453),ge=Qt(11320),Ut=Object.defineProperty,jt=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,se=(Pt,mt,vt)=>mt in Pt?Ut(Pt,mt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Pt[mt]=vt,ke=(Pt,mt)=>{for(var vt in mt||(mt={}))ne.call(mt,vt)&&se(Pt,vt,mt[vt]);if(jt)for(var vt of jt(mt))Ae.call(mt,vt)&&se(Pt,vt,mt[vt]);return Pt},de=(Pt,mt,vt)=>new Promise((kt,Lt)=>{var _t=mn=>{try{on(vt.next(mn))}catch($e){Lt($e)}},De=mn=>{try{on(vt.throw(mn))}catch($e){Lt($e)}},on=mn=>mn.done?kt(mn.value):Promise.resolve(mn.value).then(_t,De);on((vt=vt.apply(Pt,mt)).next())});const Ie=()=>{(0,Yt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},Dt=()=>{(0,Yt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Pt=>de(void 0,null,function*(){Ie(),(yield(0,xt.YR)(ke({},Pt))).status===0&&(yield(0,he.QH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt.coursesId}/export_couser_info.json`,query:Pt}))),Dt()}),et=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.yS)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_member_act_score`);else{if(mt.status===-2)return mt;mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_member_act_score`))}}),ut=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.W0)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_score`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_score`))}}),at=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.Nl)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_exercise_and_other`))}}),ht=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.IU)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/export_star_user`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/export_star_user`))}}),pt=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.td)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-2)return mt;if(mt.status===-3)(0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_exercise_and_other`);else if(mt.status===-4)return mt}}),St=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.QX)(ke({},Pt));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_homework`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/course_total_homework`))}}),bt=(Pt,mt)=>de(void 0,null,function*(){const vt=yield(0,xt.o_)(ke({},Pt));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`))}),Ot=(Pt,mt)=>de(void 0,null,function*(){const vt=yield(0,xt.ZL)(ke({},Pt));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`))}),Ht=(Pt,mt)=>de(void 0,null,function*(){const vt=yield(0,xt.vV)(ke({},Pt));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`))}),Wt=(Pt,mt)=>de(void 0,null,function*(){const vt=yield(0,xt.aP)(ke({},Pt));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/${mt}`))}),re=Pt=>de(void 0,null,function*(){Ie(),(yield exportCourseWorkListAppendix(ke({},Pt))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Pt.categoryId}/works_list.zip`,query:Pt}))),Dt()}),te=Pt=>de(void 0,null,function*(){Ie(),yield(0,he.QH)("",ge.Z.API_SERVER+`/api/polls/${Pt.categoryId}/commit_result.xlsx`),Dt()}),Ce=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt.coursesId}/attendances/export_xlsx_data.xlsx`,query:Pt}))}),ce=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt.coursesId}/video_study_statics.xlsx`,query:Pt}))}),Qe=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt.coursesId}/export_video_study.xlsx`,query:Pt}))}),je=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt.coursesId}/export_course_students_info.xlsx`,query:Pt}))}),He=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Pt}))}),Qn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Pt}))}),Gn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Pt}))}),Yn=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.Uy)(ke({},Pt));mt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/exercise_score,export_exercise_users`)):mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/exercise_score,export_exercise_users`))}),di=Pt=>de(void 0,null,function*(){const mt=yield(0,xt.tg)(ke({},Pt));mt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/exercise_score,export_exercise_report`)):mt.status===-3&&((0,Yt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Yt.history.push(`/classrooms/${Pt.coursesId}/exportlist/exercise_score,export_exercise_report`))}),ie=Pt=>de(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/export_records/${Pt.id}.xlsx`,query:Pt}))}),zt=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:Pt}))}),We=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/courses/${Pt==null?void 0:Pt.coursesId}/${Pt.menuKey}_statistic.xlsx?${Pt.checkedList.map(mt=>`course_group_id[]=${mt}`).join("&")}`,query:Pt}))}),En=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/ec_years/${Pt==null?void 0:Pt.ec_year_id}/ec_training_objectives.xlsx`,query:Pt}))}),Xn=Pt=>de(void 0,null,function*(){yield(0,he.FH)(Pt==null?void 0:Pt.name,(0,he.NY)({url:ge.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Pt}))}),Ve=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/ec_years/${Pt==null?void 0:Pt.ec_year_id}/ec_courses.xlsx`,query:Pt}))}),In=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/ec_years/${Pt==null?void 0:Pt.ec_year_id}/ec_graduation_requirements.xlsx`,query:Pt}))}),Hn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Pt}))}),li=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Pt}))}),tn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/examination_banks/${Pt.id}.json`,query:Pt}))}),Me=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/exercises/${Pt.categoryId}.json`,query:Pt}))}),rn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/polls/${Pt==null?void 0:Pt.id}/commit_result.json`,query:Pt}))}),Dn=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Pt}))}),sn=(Pt,mt)=>de(void 0,null,function*(){yield(0,he.FH)(mt||"",(0,he.NY)({url:ge.Z.API_SERVER+`/api/exercises/${Pt==null?void 0:Pt.exercise_id}/consult_exercise.json`,query:Pt}))}),Vt=Pt=>de(void 0,null,function*(){yield(0,he.FH)("",(0,he.NY)({url:ge.Z.API_SERVER+`/api/competitions/${Pt==null?void 0:Pt.identifier}/competition_commit_records/member_works.xlsx`,query:Pt}))})},9343:function(gn,ze,Qt){"use strict";Qt.d(ze,{U:function(){return Ae}});var xt=Qt(67294),Yt=Object.defineProperty,he=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,Ut=(se,ke,de)=>ke in se?Yt(se,ke,{enumerable:!0,configurable:!0,writable:!0,value:de}):se[ke]=de,jt=(se,ke)=>{for(var de in ke||(ke={}))xe.call(ke,de)&&Ut(se,de,ke[de]);if(he)for(var de of he(ke))ge.call(ke,de)&&Ut(se,de,ke[de]);return se},ne=(se,ke,de)=>new Promise((Ie,Dt)=>{var nt=at=>{try{ut(de.next(at))}catch(ht){Dt(ht)}},et=at=>{try{ut(de.throw(at))}catch(ht){Dt(ht)}},ut=at=>at.done?Ie(at.value):Promise.resolve(at.value).then(nt,et);ut((de=de.apply(se,ke)).next())});function Ae(se,ke){const[de,Ie]=(0,xt.useState)(ke),[Dt,nt]=(0,xt.useState)(!1),[et,ut]=(0,xt.useState)();return[de,Dt,(ht,pt=!1)=>ne(this,null,function*(){const St=pt?ke:jt(jt({},de),ht);nt(!0),Ie(St);const bt=yield se(St);return nt(!1),ut(bt),bt}),et,ut]}},51161:function(gn,ze,Qt){"use strict";Qt.d(ze,{AL:function(){return St},Iy:function(){return ke},Qv:function(){return Dt},ez:function(){return pt},jb:function(){return de}});var xt=Qt(47084),Yt=Qt.n(xt),he=Qt(90621),xe=Qt.n(he);let ge=1;function Ut(re,te){const Ce=re.match(/^(\s+)(?:```)/);if(Ce===null)return te;const ce=Ce[1];return te.split(`
`).map(Qe=>{const je=Qe.match(/^\s+/);if(je===null)return Qe;const[He]=je;return He.length>=ce.length?Qe.slice(ce.length):Qe}).join(`
`)}let jt=[],ne=["<ul>"];const Ae=new(Yt()).Renderer,se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ke(){jt.length=0,ne=["<ul>"]}const de={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ie(re,te,Ce,ce){if(te>=re.length||re[te].level<=Ce)return te;var Qe=re[te];ce.push("<li><a href='#"+ge+Qe.anchor+"'>"+Qe.text+"</a>"),te++;var je=[];return te=Ie(re,te,Qe.level,je),je.length>0&&(ce.push("<ul>"),je.forEach(function(He){ce.push(He)}),ce.push("</ul>")),ce.push("</li>"),te=Ie(re,te,Ce,ce),te}function Dt(){return Ie(jt,0,0,ne),ne.push("</ul>"),ne.join("")}const nt={heading(re){const te=se.exec(re);if(ge+=1,te)return{type:"heading",raw:te[0],depth:te[1].length,text:te[2]}},fences(re){const te=this.rules.block.fences.exec(re);if(te){const Ce=te[0];let ce=Ut(Ce,te[3]||"");const Qe=te[2]?te[2].trim():te[2];if(["latex","katex","math"].indexOf(Qe)>=0){const je=at(),He=ce;ce=je,ht[je]={type:"block",expression:He}}return{type:"code",raw:Ce,lang:Qe,text:ce}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ut=0;const at=()=>`__special_katext_id_${ut++}__`;let ht={};function pt(){return ht}function St(){ut=0,ht={}}function bt(re){return re=re.replace(et,(te,Ce)=>{const ce=at();return ht[ce]={type:"inline",expression:Ce},ce}),re}const Ot=Ae.listitem;Ae.listitem=function(re){return Ot(bt(re))};const Ht=Ae.paragraph;Ae.paragraph=function(re){return Ht(bt(re))};const Wt=Ae.tablecell;Ae.tablecell=function(re,te){return Wt(bt(re),te)},Ae.code=function(re,te,Ce){const ce=(te||"").match(/\S*/)[0];return ce?["latex","katex","math"].indexOf(ce)>=0?`<p class='editormd-tex'>${re}</p>`:`<pre class="prettyprint linenums"><code class="language-${te}">${Ce?re:(0,he.escape)(re,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ce?re:(0,he.escape)(re,!0))+"</code></pre>"},Ae.heading=function(re,te,Ce){let ce=this.options.headerPrefix+Ce.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return jt.push({anchor:ce,level:te,text:re}),"<h"+te+' id="'+ge+ce+'">'+re+"</h"+te+">"},Yt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Yt().use({tokenizer:nt,renderer:Ae}),ze.ZP=Yt()},80258:function(gn,ze){"use strict";ze.byteLength=jt,ze.toByteArray=Ae,ze.fromByteArray=de;for(var Qt=[],xt=[],Yt=typeof Uint8Array!="undefined"?Uint8Array:Array,he="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xe=0,ge=he.length;xe<ge;++xe)Qt[xe]=he[xe],xt[he.charCodeAt(xe)]=xe;xt[45]=62,xt[95]=63;function Ut(Ie){var Dt=Ie.length;if(Dt%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=Ie.indexOf("=");nt===-1&&(nt=Dt);var et=nt===Dt?0:4-nt%4;return[nt,et]}function jt(Ie){var Dt=Ut(Ie),nt=Dt[0],et=Dt[1];return(nt+et)*3/4-et}function ne(Ie,Dt,nt){return(Dt+nt)*3/4-nt}function Ae(Ie){var Dt,nt=Ut(Ie),et=nt[0],ut=nt[1],at=new Yt(ne(Ie,et,ut)),ht=0,pt=ut>0?et-4:et,St;for(St=0;St<pt;St+=4)Dt=xt[Ie.charCodeAt(St)]<<18|xt[Ie.charCodeAt(St+1)]<<12|xt[Ie.charCodeAt(St+2)]<<6|xt[Ie.charCodeAt(St+3)],at[ht++]=Dt>>16&255,at[ht++]=Dt>>8&255,at[ht++]=Dt&255;return ut===2&&(Dt=xt[Ie.charCodeAt(St)]<<2|xt[Ie.charCodeAt(St+1)]>>4,at[ht++]=Dt&255),ut===1&&(Dt=xt[Ie.charCodeAt(St)]<<10|xt[Ie.charCodeAt(St+1)]<<4|xt[Ie.charCodeAt(St+2)]>>2,at[ht++]=Dt>>8&255,at[ht++]=Dt&255),at}function se(Ie){return Qt[Ie>>18&63]+Qt[Ie>>12&63]+Qt[Ie>>6&63]+Qt[Ie&63]}function ke(Ie,Dt,nt){for(var et,ut=[],at=Dt;at<nt;at+=3)et=(Ie[at]<<16&16711680)+(Ie[at+1]<<8&65280)+(Ie[at+2]&255),ut.push(se(et));return ut.join("")}function de(Ie){for(var Dt,nt=Ie.length,et=nt%3,ut=[],at=16383,ht=0,pt=nt-et;ht<pt;ht+=at)ut.push(ke(Ie,ht,ht+at>pt?pt:ht+at));return et===1?(Dt=Ie[nt-1],ut.push(Qt[Dt>>2]+Qt[Dt<<4&63]+"==")):et===2&&(Dt=(Ie[nt-2]<<8)+Ie[nt-1],ut.push(Qt[Dt>>10]+Qt[Dt>>4&63]+Qt[Dt<<2&63]+"=")),ut.join("")}},48764:function(gn,ze,Qt){"use strict";var xt;var Yt=Qt(80258),he=Qt(80645),xe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.lW=ne,xt=ht,ze.h2=50;var ge=2147483647;xt=ge,ne.TYPED_ARRAY_SUPPORT=Ut(),!ne.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 Ut(){try{var mt=new Uint8Array(1),vt={foo:function(){return 42}};return Object.setPrototypeOf(vt,Uint8Array.prototype),Object.setPrototypeOf(mt,vt),mt.foo()===42}catch(kt){return!1}}Object.defineProperty(ne.prototype,"parent",{enumerable:!0,get:function(){if(ne.isBuffer(this))return this.buffer}}),Object.defineProperty(ne.prototype,"offset",{enumerable:!0,get:function(){if(ne.isBuffer(this))return this.byteOffset}});function jt(mt){if(mt>ge)throw new RangeError('The value "'+mt+'" is invalid for option "size"');var vt=new Uint8Array(mt);return Object.setPrototypeOf(vt,ne.prototype),vt}function ne(mt,vt,kt){if(typeof mt=="number"){if(typeof vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return de(mt)}return Ae(mt,vt,kt)}ne.poolSize=8192;function Ae(mt,vt,kt){if(typeof mt=="string")return Ie(mt,vt);if(ArrayBuffer.isView(mt))return nt(mt);if(mt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt);if(sn(mt,ArrayBuffer)||mt&&sn(mt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(sn(mt,SharedArrayBuffer)||mt&&sn(mt.buffer,SharedArrayBuffer)))return et(mt,vt,kt);if(typeof mt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Lt=mt.valueOf&&mt.valueOf();if(Lt!=null&&Lt!==mt)return ne.from(Lt,vt,kt);var _t=ut(mt);if(_t)return _t;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof mt[Symbol.toPrimitive]=="function")return ne.from(mt[Symbol.toPrimitive]("string"),vt,kt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt)}ne.from=function(mt,vt,kt){return Ae(mt,vt,kt)},Object.setPrototypeOf(ne.prototype,Uint8Array.prototype),Object.setPrototypeOf(ne,Uint8Array);function se(mt){if(typeof mt!="number")throw new TypeError('"size" argument must be of type number');if(mt<0)throw new RangeError('The value "'+mt+'" is invalid for option "size"')}function ke(mt,vt,kt){return se(mt),mt<=0?jt(mt):vt!==void 0?typeof kt=="string"?jt(mt).fill(vt,kt):jt(mt).fill(vt):jt(mt)}ne.alloc=function(mt,vt,kt){return ke(mt,vt,kt)};function de(mt){return se(mt),jt(mt<0?0:at(mt)|0)}ne.allocUnsafe=function(mt){return de(mt)},ne.allocUnsafeSlow=function(mt){return de(mt)};function Ie(mt,vt){if((typeof vt!="string"||vt==="")&&(vt="utf8"),!ne.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);var kt=pt(mt,vt)|0,Lt=jt(kt),_t=Lt.write(mt,vt);return _t!==kt&&(Lt=Lt.slice(0,_t)),Lt}function Dt(mt){for(var vt=mt.length<0?0:at(mt.length)|0,kt=jt(vt),Lt=0;Lt<vt;Lt+=1)kt[Lt]=mt[Lt]&255;return kt}function nt(mt){if(sn(mt,Uint8Array)){var vt=new Uint8Array(mt);return et(vt.buffer,vt.byteOffset,vt.byteLength)}return Dt(mt)}function et(mt,vt,kt){if(vt<0||mt.byteLength<vt)throw new RangeError('"offset" is outside of buffer bounds');if(mt.byteLength<vt+(kt||0))throw new RangeError('"length" is outside of buffer bounds');var Lt;return vt===void 0&&kt===void 0?Lt=new Uint8Array(mt):kt===void 0?Lt=new Uint8Array(mt,vt):Lt=new Uint8Array(mt,vt,kt),Object.setPrototypeOf(Lt,ne.prototype),Lt}function ut(mt){if(ne.isBuffer(mt)){var vt=at(mt.length)|0,kt=jt(vt);return kt.length===0||mt.copy(kt,0,0,vt),kt}if(mt.length!==void 0)return typeof mt.length!="number"||Vt(mt.length)?jt(0):Dt(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return Dt(mt.data)}function at(mt){if(mt>=ge)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ge.toString(16)+" bytes");return mt|0}function ht(mt){return+mt!=mt&&(mt=0),ne.alloc(+mt)}ne.isBuffer=function(vt){return vt!=null&&vt._isBuffer===!0&&vt!==ne.prototype},ne.compare=function(vt,kt){if(sn(vt,Uint8Array)&&(vt=ne.from(vt,vt.offset,vt.byteLength)),sn(kt,Uint8Array)&&(kt=ne.from(kt,kt.offset,kt.byteLength)),!ne.isBuffer(vt)||!ne.isBuffer(kt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(vt===kt)return 0;for(var Lt=vt.length,_t=kt.length,De=0,on=Math.min(Lt,_t);De<on;++De)if(vt[De]!==kt[De]){Lt=vt[De],_t=kt[De];break}return Lt<_t?-1:_t<Lt?1:0},ne.isEncoding=function(vt){switch(String(vt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ne.concat=function(vt,kt){if(!Array.isArray(vt))throw new TypeError('"list" argument must be an Array of Buffers');if(vt.length===0)return ne.alloc(0);var Lt;if(kt===void 0)for(kt=0,Lt=0;Lt<vt.length;++Lt)kt+=vt[Lt].length;var _t=ne.allocUnsafe(kt),De=0;for(Lt=0;Lt<vt.length;++Lt){var on=vt[Lt];if(sn(on,Uint8Array))De+on.length>_t.length?ne.from(on).copy(_t,De):Uint8Array.prototype.set.call(_t,on,De);else if(ne.isBuffer(on))on.copy(_t,De);else throw new TypeError('"list" argument must be an Array of Buffers');De+=on.length}return _t};function pt(mt,vt){if(ne.isBuffer(mt))return mt.length;if(ArrayBuffer.isView(mt)||sn(mt,ArrayBuffer))return mt.byteLength;if(typeof mt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof mt);var kt=mt.length,Lt=arguments.length>2&&arguments[2]===!0;if(!Lt&&kt===0)return 0;for(var _t=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return kt;case"utf8":case"utf-8":return li(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt*2;case"hex":return kt>>>1;case"base64":return rn(mt).length;default:if(_t)return Lt?-1:li(mt).length;vt=(""+vt).toLowerCase(),_t=!0}}ne.byteLength=pt;function St(mt,vt,kt){var Lt=!1;if((vt===void 0||vt<0)&&(vt=0),vt>this.length||((kt===void 0||kt>this.length)&&(kt=this.length),kt<=0)||(kt>>>=0,vt>>>=0,kt<=vt))return"";for(mt||(mt="utf8");;)switch(mt){case"hex":return di(this,vt,kt);case"utf8":case"utf-8":return je(this,vt,kt);case"ascii":return Gn(this,vt,kt);case"latin1":case"binary":return Yn(this,vt,kt);case"base64":return Qe(this,vt,kt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,vt,kt);default:if(Lt)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Lt=!0}}ne.prototype._isBuffer=!0;function bt(mt,vt,kt){var Lt=mt[vt];mt[vt]=mt[kt],mt[kt]=Lt}ne.prototype.swap16=function(){var vt=this.length;if(vt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var kt=0;kt<vt;kt+=2)bt(this,kt,kt+1);return this},ne.prototype.swap32=function(){var vt=this.length;if(vt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var kt=0;kt<vt;kt+=4)bt(this,kt,kt+3),bt(this,kt+1,kt+2);return this},ne.prototype.swap64=function(){var vt=this.length;if(vt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var kt=0;kt<vt;kt+=8)bt(this,kt,kt+7),bt(this,kt+1,kt+6),bt(this,kt+2,kt+5),bt(this,kt+3,kt+4);return this},ne.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?je(this,0,vt):St.apply(this,arguments)},ne.prototype.toLocaleString=ne.prototype.toString,ne.prototype.equals=function(vt){if(!ne.isBuffer(vt))throw new TypeError("Argument must be a Buffer");return this===vt?!0:ne.compare(this,vt)===0},ne.prototype.inspect=function(){var vt="",kt=ze.h2;return vt=this.toString("hex",0,kt).replace(/(.{2})/g,"$1 ").trim(),this.length>kt&&(vt+=" ... "),"<Buffer "+vt+">"},xe&&(ne.prototype[xe]=ne.prototype.inspect),ne.prototype.compare=function(vt,kt,Lt,_t,De){if(sn(vt,Uint8Array)&&(vt=ne.from(vt,vt.offset,vt.byteLength)),!ne.isBuffer(vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof vt);if(kt===void 0&&(kt=0),Lt===void 0&&(Lt=vt?vt.length:0),_t===void 0&&(_t=0),De===void 0&&(De=this.length),kt<0||Lt>vt.length||_t<0||De>this.length)throw new RangeError("out of range index");if(_t>=De&&kt>=Lt)return 0;if(_t>=De)return-1;if(kt>=Lt)return 1;if(kt>>>=0,Lt>>>=0,_t>>>=0,De>>>=0,this===vt)return 0;for(var on=De-_t,mn=Lt-kt,$e=Math.min(on,mn),Bn=this.slice(_t,De),Re=vt.slice(kt,Lt),Mn=0;Mn<$e;++Mn)if(Bn[Mn]!==Re[Mn]){on=Bn[Mn],mn=Re[Mn];break}return on<mn?-1:mn<on?1:0};function Ot(mt,vt,kt,Lt,_t){if(mt.length===0)return-1;if(typeof kt=="string"?(Lt=kt,kt=0):kt>2147483647?kt=2147483647:kt<-2147483648&&(kt=-2147483648),kt=+kt,Vt(kt)&&(kt=_t?0:mt.length-1),kt<0&&(kt=mt.length+kt),kt>=mt.length){if(_t)return-1;kt=mt.length-1}else if(kt<0)if(_t)kt=0;else return-1;if(typeof vt=="string"&&(vt=ne.from(vt,Lt)),ne.isBuffer(vt))return vt.length===0?-1:Ht(mt,vt,kt,Lt,_t);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?_t?Uint8Array.prototype.indexOf.call(mt,vt,kt):Uint8Array.prototype.lastIndexOf.call(mt,vt,kt):Ht(mt,[vt],kt,Lt,_t);throw new TypeError("val must be string, number or Buffer")}function Ht(mt,vt,kt,Lt,_t){var De=1,on=mt.length,mn=vt.length;if(Lt!==void 0&&(Lt=String(Lt).toLowerCase(),Lt==="ucs2"||Lt==="ucs-2"||Lt==="utf16le"||Lt==="utf-16le")){if(mt.length<2||vt.length<2)return-1;De=2,on/=2,mn/=2,kt/=2}function $e(Fi,ti){return De===1?Fi[ti]:Fi.readUInt16BE(ti*De)}var Bn;if(_t){var Re=-1;for(Bn=kt;Bn<on;Bn++)if($e(mt,Bn)===$e(vt,Re===-1?0:Bn-Re)){if(Re===-1&&(Re=Bn),Bn-Re+1===mn)return Re*De}else Re!==-1&&(Bn-=Bn-Re),Re=-1}else for(kt+mn>on&&(kt=on-mn),Bn=kt;Bn>=0;Bn--){for(var Mn=!0,Kn=0;Kn<mn;Kn++)if($e(mt,Bn+Kn)!==$e(vt,Kn)){Mn=!1;break}if(Mn)return Bn}return-1}ne.prototype.includes=function(vt,kt,Lt){return this.indexOf(vt,kt,Lt)!==-1},ne.prototype.indexOf=function(vt,kt,Lt){return Ot(this,vt,kt,Lt,!0)},ne.prototype.lastIndexOf=function(vt,kt,Lt){return Ot(this,vt,kt,Lt,!1)};function Wt(mt,vt,kt,Lt){kt=Number(kt)||0;var _t=mt.length-kt;Lt?(Lt=Number(Lt),Lt>_t&&(Lt=_t)):Lt=_t;var De=vt.length;Lt>De/2&&(Lt=De/2);for(var on=0;on<Lt;++on){var mn=parseInt(vt.substr(on*2,2),16);if(Vt(mn))return on;mt[kt+on]=mn}return on}function re(mt,vt,kt,Lt){return Dn(li(vt,mt.length-kt),mt,kt,Lt)}function te(mt,vt,kt,Lt){return Dn(tn(vt),mt,kt,Lt)}function Ce(mt,vt,kt,Lt){return Dn(rn(vt),mt,kt,Lt)}function ce(mt,vt,kt,Lt){return Dn(Me(vt,mt.length-kt),mt,kt,Lt)}ne.prototype.write=function(vt,kt,Lt,_t){if(kt===void 0)_t="utf8",Lt=this.length,kt=0;else if(Lt===void 0&&typeof kt=="string")_t=kt,Lt=this.length,kt=0;else if(isFinite(kt))kt=kt>>>0,isFinite(Lt)?(Lt=Lt>>>0,_t===void 0&&(_t="utf8")):(_t=Lt,Lt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var De=this.length-kt;if((Lt===void 0||Lt>De)&&(Lt=De),vt.length>0&&(Lt<0||kt<0)||kt>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");for(var on=!1;;)switch(_t){case"hex":return Wt(this,vt,kt,Lt);case"utf8":case"utf-8":return re(this,vt,kt,Lt);case"ascii":case"latin1":case"binary":return te(this,vt,kt,Lt);case"base64":return Ce(this,vt,kt,Lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,vt,kt,Lt);default:if(on)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),on=!0}},ne.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Qe(mt,vt,kt){return vt===0&&kt===mt.length?Yt.fromByteArray(mt):Yt.fromByteArray(mt.slice(vt,kt))}function je(mt,vt,kt){kt=Math.min(mt.length,kt);for(var Lt=[],_t=vt;_t<kt;){var De=mt[_t],on=null,mn=De>239?4:De>223?3:De>191?2:1;if(_t+mn<=kt){var $e,Bn,Re,Mn;switch(mn){case 1:De<128&&(on=De);break;case 2:$e=mt[_t+1],($e&192)===128&&(Mn=(De&31)<<6|$e&63,Mn>127&&(on=Mn));break;case 3:$e=mt[_t+1],Bn=mt[_t+2],($e&192)===128&&(Bn&192)===128&&(Mn=(De&15)<<12|($e&63)<<6|Bn&63,Mn>2047&&(Mn<55296||Mn>57343)&&(on=Mn));break;case 4:$e=mt[_t+1],Bn=mt[_t+2],Re=mt[_t+3],($e&192)===128&&(Bn&192)===128&&(Re&192)===128&&(Mn=(De&15)<<18|($e&63)<<12|(Bn&63)<<6|Re&63,Mn>65535&&Mn<1114112&&(on=Mn))}}on===null?(on=65533,mn=1):on>65535&&(on-=65536,Lt.push(on>>>10&1023|55296),on=56320|on&1023),Lt.push(on),_t+=mn}return Qn(Lt)}var He=4096;function Qn(mt){var vt=mt.length;if(vt<=He)return String.fromCharCode.apply(String,mt);for(var kt="",Lt=0;Lt<vt;)kt+=String.fromCharCode.apply(String,mt.slice(Lt,Lt+=He));return kt}function Gn(mt,vt,kt){var Lt="";kt=Math.min(mt.length,kt);for(var _t=vt;_t<kt;++_t)Lt+=String.fromCharCode(mt[_t]&127);return Lt}function Yn(mt,vt,kt){var Lt="";kt=Math.min(mt.length,kt);for(var _t=vt;_t<kt;++_t)Lt+=String.fromCharCode(mt[_t]);return Lt}function di(mt,vt,kt){var Lt=mt.length;(!vt||vt<0)&&(vt=0),(!kt||kt<0||kt>Lt)&&(kt=Lt);for(var _t="",De=vt;De<kt;++De)_t+=Pt[mt[De]];return _t}function ie(mt,vt,kt){for(var Lt=mt.slice(vt,kt),_t="",De=0;De<Lt.length-1;De+=2)_t+=String.fromCharCode(Lt[De]+Lt[De+1]*256);return _t}ne.prototype.slice=function(vt,kt){var Lt=this.length;vt=~~vt,kt=kt===void 0?Lt:~~kt,vt<0?(vt+=Lt,vt<0&&(vt=0)):vt>Lt&&(vt=Lt),kt<0?(kt+=Lt,kt<0&&(kt=0)):kt>Lt&&(kt=Lt),kt<vt&&(kt=vt);var _t=this.subarray(vt,kt);return Object.setPrototypeOf(_t,ne.prototype),_t};function zt(mt,vt,kt){if(mt%1!==0||mt<0)throw new RangeError("offset is not uint");if(mt+vt>kt)throw new RangeError("Trying to access beyond buffer length")}ne.prototype.readUintLE=ne.prototype.readUIntLE=function(vt,kt,Lt){vt=vt>>>0,kt=kt>>>0,Lt||zt(vt,kt,this.length);for(var _t=this[vt],De=1,on=0;++on<kt&&(De*=256);)_t+=this[vt+on]*De;return _t},ne.prototype.readUintBE=ne.prototype.readUIntBE=function(vt,kt,Lt){vt=vt>>>0,kt=kt>>>0,Lt||zt(vt,kt,this.length);for(var _t=this[vt+--kt],De=1;kt>0&&(De*=256);)_t+=this[vt+--kt]*De;return _t},ne.prototype.readUint8=ne.prototype.readUInt8=function(vt,kt){return vt=vt>>>0,kt||zt(vt,1,this.length),this[vt]},ne.prototype.readUint16LE=ne.prototype.readUInt16LE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,2,this.length),this[vt]|this[vt+1]<<8},ne.prototype.readUint16BE=ne.prototype.readUInt16BE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,2,this.length),this[vt]<<8|this[vt+1]},ne.prototype.readUint32LE=ne.prototype.readUInt32LE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),(this[vt]|this[vt+1]<<8|this[vt+2]<<16)+this[vt+3]*16777216},ne.prototype.readUint32BE=ne.prototype.readUInt32BE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),this[vt]*16777216+(this[vt+1]<<16|this[vt+2]<<8|this[vt+3])},ne.prototype.readIntLE=function(vt,kt,Lt){vt=vt>>>0,kt=kt>>>0,Lt||zt(vt,kt,this.length);for(var _t=this[vt],De=1,on=0;++on<kt&&(De*=256);)_t+=this[vt+on]*De;return De*=128,_t>=De&&(_t-=Math.pow(2,8*kt)),_t},ne.prototype.readIntBE=function(vt,kt,Lt){vt=vt>>>0,kt=kt>>>0,Lt||zt(vt,kt,this.length);for(var _t=kt,De=1,on=this[vt+--_t];_t>0&&(De*=256);)on+=this[vt+--_t]*De;return De*=128,on>=De&&(on-=Math.pow(2,8*kt)),on},ne.prototype.readInt8=function(vt,kt){return vt=vt>>>0,kt||zt(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},ne.prototype.readInt16LE=function(vt,kt){vt=vt>>>0,kt||zt(vt,2,this.length);var Lt=this[vt]|this[vt+1]<<8;return Lt&32768?Lt|4294901760:Lt},ne.prototype.readInt16BE=function(vt,kt){vt=vt>>>0,kt||zt(vt,2,this.length);var Lt=this[vt+1]|this[vt]<<8;return Lt&32768?Lt|4294901760:Lt},ne.prototype.readInt32LE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),this[vt]|this[vt+1]<<8|this[vt+2]<<16|this[vt+3]<<24},ne.prototype.readInt32BE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),this[vt]<<24|this[vt+1]<<16|this[vt+2]<<8|this[vt+3]},ne.prototype.readFloatLE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),he.read(this,vt,!0,23,4)},ne.prototype.readFloatBE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,4,this.length),he.read(this,vt,!1,23,4)},ne.prototype.readDoubleLE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,8,this.length),he.read(this,vt,!0,52,8)},ne.prototype.readDoubleBE=function(vt,kt){return vt=vt>>>0,kt||zt(vt,8,this.length),he.read(this,vt,!1,52,8)};function We(mt,vt,kt,Lt,_t,De){if(!ne.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>_t||vt<De)throw new RangeError('"value" argument is out of bounds');if(kt+Lt>mt.length)throw new RangeError("Index out of range")}ne.prototype.writeUintLE=ne.prototype.writeUIntLE=function(vt,kt,Lt,_t){if(vt=+vt,kt=kt>>>0,Lt=Lt>>>0,!_t){var De=Math.pow(2,8*Lt)-1;We(this,vt,kt,Lt,De,0)}var on=1,mn=0;for(this[kt]=vt&255;++mn<Lt&&(on*=256);)this[kt+mn]=vt/on&255;return kt+Lt},ne.prototype.writeUintBE=ne.prototype.writeUIntBE=function(vt,kt,Lt,_t){if(vt=+vt,kt=kt>>>0,Lt=Lt>>>0,!_t){var De=Math.pow(2,8*Lt)-1;We(this,vt,kt,Lt,De,0)}var on=Lt-1,mn=1;for(this[kt+on]=vt&255;--on>=0&&(mn*=256);)this[kt+on]=vt/mn&255;return kt+Lt},ne.prototype.writeUint8=ne.prototype.writeUInt8=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,1,255,0),this[kt]=vt&255,kt+1},ne.prototype.writeUint16LE=ne.prototype.writeUInt16LE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,2,65535,0),this[kt]=vt&255,this[kt+1]=vt>>>8,kt+2},ne.prototype.writeUint16BE=ne.prototype.writeUInt16BE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,2,65535,0),this[kt]=vt>>>8,this[kt+1]=vt&255,kt+2},ne.prototype.writeUint32LE=ne.prototype.writeUInt32LE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,4,4294967295,0),this[kt+3]=vt>>>24,this[kt+2]=vt>>>16,this[kt+1]=vt>>>8,this[kt]=vt&255,kt+4},ne.prototype.writeUint32BE=ne.prototype.writeUInt32BE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,4,4294967295,0),this[kt]=vt>>>24,this[kt+1]=vt>>>16,this[kt+2]=vt>>>8,this[kt+3]=vt&255,kt+4},ne.prototype.writeIntLE=function(vt,kt,Lt,_t){if(vt=+vt,kt=kt>>>0,!_t){var De=Math.pow(2,8*Lt-1);We(this,vt,kt,Lt,De-1,-De)}var on=0,mn=1,$e=0;for(this[kt]=vt&255;++on<Lt&&(mn*=256);)vt<0&&$e===0&&this[kt+on-1]!==0&&($e=1),this[kt+on]=(vt/mn>>0)-$e&255;return kt+Lt},ne.prototype.writeIntBE=function(vt,kt,Lt,_t){if(vt=+vt,kt=kt>>>0,!_t){var De=Math.pow(2,8*Lt-1);We(this,vt,kt,Lt,De-1,-De)}var on=Lt-1,mn=1,$e=0;for(this[kt+on]=vt&255;--on>=0&&(mn*=256);)vt<0&&$e===0&&this[kt+on+1]!==0&&($e=1),this[kt+on]=(vt/mn>>0)-$e&255;return kt+Lt},ne.prototype.writeInt8=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,1,127,-128),vt<0&&(vt=255+vt+1),this[kt]=vt&255,kt+1},ne.prototype.writeInt16LE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,2,32767,-32768),this[kt]=vt&255,this[kt+1]=vt>>>8,kt+2},ne.prototype.writeInt16BE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,2,32767,-32768),this[kt]=vt>>>8,this[kt+1]=vt&255,kt+2},ne.prototype.writeInt32LE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,4,2147483647,-2147483648),this[kt]=vt&255,this[kt+1]=vt>>>8,this[kt+2]=vt>>>16,this[kt+3]=vt>>>24,kt+4},ne.prototype.writeInt32BE=function(vt,kt,Lt){return vt=+vt,kt=kt>>>0,Lt||We(this,vt,kt,4,2147483647,-2147483648),vt<0&&(vt=4294967295+vt+1),this[kt]=vt>>>24,this[kt+1]=vt>>>16,this[kt+2]=vt>>>8,this[kt+3]=vt&255,kt+4};function En(mt,vt,kt,Lt,_t,De){if(kt+Lt>mt.length)throw new RangeError("Index out of range");if(kt<0)throw new RangeError("Index out of range")}function Xn(mt,vt,kt,Lt,_t){return vt=+vt,kt=kt>>>0,_t||En(mt,vt,kt,4,34028234663852886e22,-34028234663852886e22),he.write(mt,vt,kt,Lt,23,4),kt+4}ne.prototype.writeFloatLE=function(vt,kt,Lt){return Xn(this,vt,kt,!0,Lt)},ne.prototype.writeFloatBE=function(vt,kt,Lt){return Xn(this,vt,kt,!1,Lt)};function Ve(mt,vt,kt,Lt,_t){return vt=+vt,kt=kt>>>0,_t||En(mt,vt,kt,8,17976931348623157e292,-17976931348623157e292),he.write(mt,vt,kt,Lt,52,8),kt+8}ne.prototype.writeDoubleLE=function(vt,kt,Lt){return Ve(this,vt,kt,!0,Lt)},ne.prototype.writeDoubleBE=function(vt,kt,Lt){return Ve(this,vt,kt,!1,Lt)},ne.prototype.copy=function(vt,kt,Lt,_t){if(!ne.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Lt||(Lt=0),!_t&&_t!==0&&(_t=this.length),kt>=vt.length&&(kt=vt.length),kt||(kt=0),_t>0&&_t<Lt&&(_t=Lt),_t===Lt||vt.length===0||this.length===0)return 0;if(kt<0)throw new RangeError("targetStart out of bounds");if(Lt<0||Lt>=this.length)throw new RangeError("Index out of range");if(_t<0)throw new RangeError("sourceEnd out of bounds");_t>this.length&&(_t=this.length),vt.length-kt<_t-Lt&&(_t=vt.length-kt+Lt);var De=_t-Lt;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(kt,Lt,_t):Uint8Array.prototype.set.call(vt,this.subarray(Lt,_t),kt),De},ne.prototype.fill=function(vt,kt,Lt,_t){if(typeof vt=="string"){if(typeof kt=="string"?(_t=kt,kt=0,Lt=this.length):typeof Lt=="string"&&(_t=Lt,Lt=this.length),_t!==void 0&&typeof _t!="string")throw new TypeError("encoding must be a string");if(typeof _t=="string"&&!ne.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(vt.length===1){var De=vt.charCodeAt(0);(_t==="utf8"&&De<128||_t==="latin1")&&(vt=De)}}else typeof vt=="number"?vt=vt&255:typeof vt=="boolean"&&(vt=Number(vt));if(kt<0||this.length<kt||this.length<Lt)throw new RangeError("Out of range index");if(Lt<=kt)return this;kt=kt>>>0,Lt=Lt===void 0?this.length:Lt>>>0,vt||(vt=0);var on;if(typeof vt=="number")for(on=kt;on<Lt;++on)this[on]=vt;else{var mn=ne.isBuffer(vt)?vt:ne.from(vt,_t),$e=mn.length;if($e===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(on=0;on<Lt-kt;++on)this[on+kt]=mn[on%$e]}return this};var In=/[^+/0-9A-Za-z-_]/g;function Hn(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(In,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function li(mt,vt){vt=vt||1/0;for(var kt,Lt=mt.length,_t=null,De=[],on=0;on<Lt;++on){if(kt=mt.charCodeAt(on),kt>55295&&kt<57344){if(!_t){if(kt>56319){(vt-=3)>-1&&De.push(239,191,189);continue}else if(on+1===Lt){(vt-=3)>-1&&De.push(239,191,189);continue}_t=kt;continue}if(kt<56320){(vt-=3)>-1&&De.push(239,191,189),_t=kt;continue}kt=(_t-55296<<10|kt-56320)+65536}else _t&&(vt-=3)>-1&&De.push(239,191,189);if(_t=null,kt<128){if((vt-=1)<0)break;De.push(kt)}else if(kt<2048){if((vt-=2)<0)break;De.push(kt>>6|192,kt&63|128)}else if(kt<65536){if((vt-=3)<0)break;De.push(kt>>12|224,kt>>6&63|128,kt&63|128)}else if(kt<1114112){if((vt-=4)<0)break;De.push(kt>>18|240,kt>>12&63|128,kt>>6&63|128,kt&63|128)}else throw new Error("Invalid code point")}return De}function tn(mt){for(var vt=[],kt=0;kt<mt.length;++kt)vt.push(mt.charCodeAt(kt)&255);return vt}function Me(mt,vt){for(var kt,Lt,_t,De=[],on=0;on<mt.length&&!((vt-=2)<0);++on)kt=mt.charCodeAt(on),Lt=kt>>8,_t=kt%256,De.push(_t),De.push(Lt);return De}function rn(mt){return Yt.toByteArray(Hn(mt))}function Dn(mt,vt,kt,Lt){for(var _t=0;_t<Lt&&!(_t+kt>=vt.length||_t>=mt.length);++_t)vt[_t+kt]=mt[_t];return _t}function sn(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function Vt(mt){return mt!==mt}var Pt=function(){for(var mt="0123456789abcdef",vt=new Array(256),kt=0;kt<16;++kt)for(var Lt=kt*16,_t=0;_t<16;++_t)vt[Lt+_t]=mt[kt]+mt[_t];return vt}()},86010:function(gn,ze,Qt){"use strict";Qt.r(ze),Qt.d(ze,{clsx:function(){return Yt}});function xt(he){var xe,ge,Ut="";if(typeof he=="string"||typeof he=="number")Ut+=he;else if(typeof he=="object")if(Array.isArray(he))for(xe=0;xe<he.length;xe++)he[xe]&&(ge=xt(he[xe]))&&(Ut&&(Ut+=" "),Ut+=ge);else for(xe in he)he[xe]&&(Ut&&(Ut+=" "),Ut+=xe);return Ut}function Yt(){for(var he,xe,ge=0,Ut="";ge<arguments.length;)(he=arguments[ge++])&&(xe=xt(he))&&(Ut&&(Ut+=" "),Ut+=xe);return Ut}ze.default=Yt},88386:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){xt.defineOption("placeholder","",function(ne,Ae,se){var ke=se&&se!=xt.Init;if(Ae&&!ke)ne.on("blur",ge),ne.on("change",Ut),ne.on("swapDoc",Ut),xt.on(ne.getInputField(),"compositionupdate",ne.state.placeholderCompose=function(){xe(ne)}),Ut(ne);else if(!Ae&&ke){ne.off("blur",ge),ne.off("change",Ut),ne.off("swapDoc",Ut),xt.off(ne.getInputField(),"compositionupdate",ne.state.placeholderCompose),Yt(ne);var de=ne.getWrapperElement();de.className=de.className.replace(" CodeMirror-empty","")}Ae&&!ne.hasFocus()&&ge(ne)});function Yt(ne){ne.state.placeholder&&(ne.state.placeholder.parentNode.removeChild(ne.state.placeholder),ne.state.placeholder=null)}function he(ne){Yt(ne);var Ae=ne.state.placeholder=document.createElement("pre");Ae.style.cssText="height: 0; overflow: visible",Ae.style.direction=ne.getOption("direction"),Ae.className="CodeMirror-placeholder CodeMirror-line-like";var se=ne.getOption("placeholder");typeof se=="string"&&(se=document.createTextNode(se)),Ae.appendChild(se),ne.display.lineSpace.insertBefore(Ae,ne.display.lineSpace.firstChild)}function xe(ne){setTimeout(function(){var Ae=!1,se=ne.getInputField();se.nodeName=="TEXTAREA"?Ae=!se.value:ne.lineCount()==1&&(Ae=!/[^\u200b]/.test(se.querySelector(".CodeMirror-line").textContent)),Ae?he(ne):Yt(ne)},20)}function ge(ne){jt(ne)&&he(ne)}function Ut(ne){var Ae=ne.getWrapperElement(),se=jt(ne);Ae.className=Ae.className.replace(" CodeMirror-empty","")+(se?" CodeMirror-empty":""),se?he(ne):Yt(ne)}function jt(ne){return ne.lineCount()===1&&ne.getLine(0)===""}})},82801:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){var Yt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},he=xt.Pos;xt.defineOption("autoCloseBrackets",!1,function(nt,et,ut){ut&&ut!=xt.Init&&(nt.removeKeyMap(ge),nt.state.closeBrackets=null),et&&(Ut(xe(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(ge))});function xe(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:Yt[et]}var ge={Backspace:Ae,Enter:se};function Ut(nt){for(var et=0;et<nt.length;et++){var ut=nt.charAt(et),at="'"+ut+"'";ge[at]||(ge[at]=jt(ut))}}Ut(Yt.pairs+"`");function jt(nt){return function(et){return de(et,nt)}}function ne(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var ut=nt.getModeAt(nt.getCursor());return ut.closeBrackets||et}function Ae(nt){var et=ne(nt);if(!et||nt.getOption("disableInput"))return xt.Pass;for(var ut=xe(et,"pairs"),at=nt.listSelections(),ht=0;ht<at.length;ht++){if(!at[ht].empty())return xt.Pass;var pt=Ie(nt,at[ht].head);if(!pt||ut.indexOf(pt)%2!=0)return xt.Pass}for(var ht=at.length-1;ht>=0;ht--){var St=at[ht].head;nt.replaceRange("",he(St.line,St.ch-1),he(St.line,St.ch+1),"+delete")}}function se(nt){var et=ne(nt),ut=et&&xe(et,"explode");if(!ut||nt.getOption("disableInput"))return xt.Pass;for(var at=nt.listSelections(),ht=0;ht<at.length;ht++){if(!at[ht].empty())return xt.Pass;var pt=Ie(nt,at[ht].head);if(!pt||ut.indexOf(pt)%2!=0)return xt.Pass}nt.operation(function(){var St=nt.lineSeparator()||`
`;nt.replaceSelection(St+St,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var bt=0;bt<at.length;bt++){var Ot=at[bt].head.line;nt.indentLine(Ot,null,!0),nt.indentLine(Ot+1,null,!0)}})}function ke(nt){var et=xt.cmpPos(nt.anchor,nt.head)>0;return{anchor:new he(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new he(nt.head.line,nt.head.ch+(et?1:-1))}}function de(nt,et){var ut=ne(nt);if(!ut||nt.getOption("disableInput"))return xt.Pass;var at=xe(ut,"pairs"),ht=at.indexOf(et);if(ht==-1)return xt.Pass;for(var pt=xe(ut,"closeBefore"),St=xe(ut,"triples"),bt=at.charAt(ht+1)==et,Ot=nt.listSelections(),Ht=ht%2==0,Wt,re=0;re<Ot.length;re++){var te=Ot[re],Ce=te.head,ce,Qe=nt.getRange(Ce,he(Ce.line,Ce.ch+1));if(Ht&&!te.empty())ce="surround";else if((bt||!Ht)&&Qe==et)bt&&Dt(nt,Ce)?ce="both":St.indexOf(et)>=0&&nt.getRange(Ce,he(Ce.line,Ce.ch+3))==et+et+et?ce="skipThree":ce="skip";else if(bt&&Ce.ch>1&&St.indexOf(et)>=0&&nt.getRange(he(Ce.line,Ce.ch-2),Ce)==et+et){if(Ce.ch>2&&/\bstring/.test(nt.getTokenTypeAt(he(Ce.line,Ce.ch-2))))return xt.Pass;ce="addFour"}else if(bt){var je=Ce.ch==0?" ":nt.getRange(he(Ce.line,Ce.ch-1),Ce);if(!xt.isWordChar(Qe)&&je!=et&&!xt.isWordChar(je))ce="both";else return xt.Pass}else if(Ht&&(Qe.length===0||/\s/.test(Qe)||pt.indexOf(Qe)>-1))ce="both";else return xt.Pass;if(!Wt)Wt=ce;else if(Wt!=ce)return xt.Pass}var He=ht%2?at.charAt(ht-1):et,Qn=ht%2?et:at.charAt(ht+1);nt.operation(function(){if(Wt=="skip")nt.execCommand("goCharRight");else if(Wt=="skipThree")for(var Gn=0;Gn<3;Gn++)nt.execCommand("goCharRight");else if(Wt=="surround"){for(var Yn=nt.getSelections(),Gn=0;Gn<Yn.length;Gn++)Yn[Gn]=He+Yn[Gn]+Qn;nt.replaceSelections(Yn,"around"),Yn=nt.listSelections().slice();for(var Gn=0;Gn<Yn.length;Gn++)Yn[Gn]=ke(Yn[Gn]);nt.setSelections(Yn)}else Wt=="both"?(nt.replaceSelection(He+Qn,null),nt.triggerElectric(He+Qn),nt.execCommand("goCharLeft")):Wt=="addFour"&&(nt.replaceSelection(He+He+He+He,"before"),nt.execCommand("goCharRight"))})}function Ie(nt,et){var ut=nt.getRange(he(et.line,et.ch-1),he(et.line,et.ch+1));return ut.length==2?ut:null}function Dt(nt,et){var ut=nt.getTokenAt(he(et.line,et.ch+1));return/\bstring/.test(ut.type)&&ut.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},57341:function(gn,ze,Qt){(function(xt){xt(Qt(4631),Qt(4786))})(function(xt){xt.defineOption("autoCloseTags",!1,function(Ae,se,ke){if(ke!=xt.Init&&ke&&Ae.removeKeyMap("autoCloseTags"),!!se){var de={name:"autoCloseTags"};(typeof se!="object"||se.whenClosing!==!1)&&(de["'/'"]=function(Ie){return Ut(Ie)}),(typeof se!="object"||se.whenOpening!==!1)&&(de["'>'"]=function(Ie){return xe(Ie)}),Ae.addKeyMap(de)}});var Yt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],he=["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 xe(Ae){if(Ae.getOption("disableInput"))return xt.Pass;for(var se=Ae.listSelections(),ke=[],de=Ae.getOption("autoCloseTags"),Ie=0;Ie<se.length;Ie++){if(!se[Ie].empty())return xt.Pass;var Dt=se[Ie].head,nt=Ae.getTokenAt(Dt),et=xt.innerMode(Ae.getMode(),nt.state),ut=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ut),ht=at&&at.name;if(!ht)return xt.Pass;var pt=et.mode.configuration=="html",St=typeof de=="object"&&de.dontCloseTags||pt&&Yt,bt=typeof de=="object"&&de.indentTags||pt&&he;nt.end>Dt.ch&&(ht=ht.slice(0,ht.length-nt.end+Dt.ch));var Ot=ht.toLowerCase();if(!ht||nt.type=="string"&&(nt.end!=Dt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==Dt.ch-nt.start-1||St&&jt(St,Ot)>-1||ne(Ae,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ut)||[],ht,Dt,!0))return xt.Pass;var Ht=typeof de=="object"&&de.emptyTags;if(Ht&&jt(Ht,ht)>-1){ke[Ie]={text:"/>",newPos:xt.Pos(Dt.line,Dt.ch+2)};continue}var Wt=bt&&jt(bt,Ot)>-1;ke[Ie]={indent:Wt,text:">"+(Wt?`
`:"")+"</"+ht+">",newPos:Wt?xt.Pos(Dt.line+1,0):xt.Pos(Dt.line,Dt.ch+1)}}for(var re=typeof de=="object"&&de.dontIndentOnAutoClose,Ie=se.length-1;Ie>=0;Ie--){var te=ke[Ie];Ae.replaceRange(te.text,se[Ie].head,se[Ie].anchor,"+insert");var Ce=Ae.listSelections().slice(0);Ce[Ie]={head:te.newPos,anchor:te.newPos},Ae.setSelections(Ce),!re&&te.indent&&(Ae.indentLine(te.newPos.line,null,!0),Ae.indentLine(te.newPos.line+1,null,!0))}}function ge(Ae,se){for(var ke=Ae.listSelections(),de=[],Ie=se?"/":"</",Dt=Ae.getOption("autoCloseTags"),nt=typeof Dt=="object"&&Dt.dontIndentOnSlash,et=0;et<ke.length;et++){if(!ke[et].empty())return xt.Pass;var ut=ke[et].head,at=Ae.getTokenAt(ut),ht=xt.innerMode(Ae.getMode(),at.state),pt=ht.state;if(se&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=ut.ch-1))return xt.Pass;var St,bt=ht.mode.name!="xml"&&Ae.getMode().name=="htmlmixed";if(bt&&ht.mode.name=="javascript")St=Ie+"script";else if(bt&&ht.mode.name=="css")St=Ie+"style";else{var Ot=ht.mode.xmlCurrentContext&&ht.mode.xmlCurrentContext(pt);if(!Ot||Ot.length&&ne(Ae,Ot,Ot[Ot.length-1],ut))return xt.Pass;St=Ie+Ot[Ot.length-1]}Ae.getLine(ut.line).charAt(at.end)!=">"&&(St+=">"),de[et]=St}if(Ae.replaceSelections(de),ke=Ae.listSelections(),!nt)for(var et=0;et<ke.length;et++)(et==ke.length-1||ke[et].head.line<ke[et+1].head.line)&&Ae.indentLine(ke[et].head.line)}function Ut(Ae){return Ae.getOption("disableInput")?xt.Pass:ge(Ae,!0)}xt.commands.closeTag=function(Ae){return ge(Ae)};function jt(Ae,se){if(Ae.indexOf)return Ae.indexOf(se);for(var ke=0,de=Ae.length;ke<de;++ke)if(Ae[ke]==se)return ke;return-1}function ne(Ae,se,ke,de,Ie){if(!xt.scanForClosingTag)return!1;var Dt=Math.min(Ae.lastLine()+1,de.line+500),nt=xt.scanForClosingTag(Ae,de,null,Dt);if(!nt||nt.tag!=ke)return!1;for(var et=Ie?1:0,ut=se.length-1;ut>=0&&se[ut]==ke;ut--)++et;de=nt.to;for(var ut=1;ut<et;ut++){var at=xt.scanForClosingTag(Ae,de,null,Dt);if(!at||at.tag!=ke)return!1;de=at.to}return!0}})},4786:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){"use strict";var Yt=xt.Pos;function he(ut,at){return ut.line-at.line||ut.ch-at.ch}var xe="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",ge=xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ut=new RegExp("<(/?)(["+xe+"]["+ge+"]*)","g");function jt(ut,at,ht,pt){this.line=at,this.ch=ht,this.cm=ut,this.text=ut.getLine(at),this.min=pt?Math.max(pt.from,ut.firstLine()):ut.firstLine(),this.max=pt?Math.min(pt.to-1,ut.lastLine()):ut.lastLine()}function ne(ut,at){var ht=ut.cm.getTokenTypeAt(Yt(ut.line,at));return ht&&/\btag\b/.test(ht)}function Ae(ut){if(!(ut.line>=ut.max))return ut.ch=0,ut.text=ut.cm.getLine(++ut.line),!0}function se(ut){if(!(ut.line<=ut.min))return ut.text=ut.cm.getLine(--ut.line),ut.ch=ut.text.length,!0}function ke(ut){for(;;){var at=ut.text.indexOf(">",ut.ch);if(at==-1){if(Ae(ut))continue;return}if(!ne(ut,at+1)){ut.ch=at+1;continue}var ht=ut.text.lastIndexOf("/",at),pt=ht>-1&&!/\S/.test(ut.text.slice(ht+1,at));return ut.ch=at+1,pt?"selfClose":"regular"}}function de(ut){for(;;){var at=ut.ch?ut.text.lastIndexOf("<",ut.ch-1):-1;if(at==-1){if(se(ut))continue;return}if(!ne(ut,at+1)){ut.ch=at;continue}Ut.lastIndex=at,ut.ch=at;var ht=Ut.exec(ut.text);if(ht&&ht.index==at)return ht}}function Ie(ut){for(;;){Ut.lastIndex=ut.ch;var at=Ut.exec(ut.text);if(!at){if(Ae(ut))continue;return}if(!ne(ut,at.index+1)){ut.ch=at.index+1;continue}return ut.ch=at.index+at[0].length,at}}function Dt(ut){for(;;){var at=ut.ch?ut.text.lastIndexOf(">",ut.ch-1):-1;if(at==-1){if(se(ut))continue;return}if(!ne(ut,at+1)){ut.ch=at;continue}var ht=ut.text.lastIndexOf("/",at),pt=ht>-1&&!/\S/.test(ut.text.slice(ht+1,at));return ut.ch=at+1,pt?"selfClose":"regular"}}function nt(ut,at){for(var ht=[];;){var pt=Ie(ut),St,bt=ut.line,Ot=ut.ch-(pt?pt[0].length:0);if(!pt||!(St=ke(ut)))return;if(St!="selfClose")if(pt[1]){for(var Ht=ht.length-1;Ht>=0;--Ht)if(ht[Ht]==pt[2]){ht.length=Ht;break}if(Ht<0&&(!at||at==pt[2]))return{tag:pt[2],from:Yt(bt,Ot),to:Yt(ut.line,ut.ch)}}else ht.push(pt[2])}}function et(ut,at){for(var ht=[];;){var pt=Dt(ut);if(!pt)return;if(pt=="selfClose"){de(ut);continue}var St=ut.line,bt=ut.ch,Ot=de(ut);if(!Ot)return;if(Ot[1])ht.push(Ot[2]);else{for(var Ht=ht.length-1;Ht>=0;--Ht)if(ht[Ht]==Ot[2]){ht.length=Ht;break}if(Ht<0&&(!at||at==Ot[2]))return{tag:Ot[2],from:Yt(ut.line,ut.ch),to:Yt(St,bt)}}}}xt.registerHelper("fold","xml",function(ut,at){for(var ht=new jt(ut,at.line,0);;){var pt=Ie(ht);if(!pt||ht.line!=at.line)return;var St=ke(ht);if(!St)return;if(!pt[1]&&St!="selfClose"){var bt=Yt(ht.line,ht.ch),Ot=nt(ht,pt[2]);return Ot&&he(Ot.from,bt)>0?{from:bt,to:Ot.from}:null}}}),xt.findMatchingTag=function(ut,at,ht){var pt=new jt(ut,at.line,at.ch,ht);if(!(pt.text.indexOf(">")==-1&&pt.text.indexOf("<")==-1)){var St=ke(pt),bt=St&&Yt(pt.line,pt.ch),Ot=St&&de(pt);if(!(!St||!Ot||he(pt,at)>0)){var Ht={from:Yt(pt.line,pt.ch),to:bt,tag:Ot[2]};return St=="selfClose"?{open:Ht,close:null,at:"open"}:Ot[1]?{open:et(pt,Ot[2]),close:Ht,at:"close"}:(pt=new jt(ut,bt.line,bt.ch,ht),{open:Ht,close:nt(pt,Ot[2]),at:"open"})}}},xt.findEnclosingTag=function(ut,at,ht,pt){for(var St=new jt(ut,at.line,at.ch,ht);;){var bt=et(St,pt);if(!bt)break;var Ot=new jt(ut,at.line,at.ch,ht),Ht=nt(Ot,bt.tag);if(Ht)return{open:bt,close:Ht}}},xt.scanForClosingTag=function(ut,at,ht,pt){var St=new jt(ut,at.line,at.ch,pt?{from:0,to:pt}:null);return nt(St,ht)}})},4631:function(gn){(function(ze,Qt){gn.exports=Qt()})(this,function(){"use strict";var ze=navigator.userAgent,Qt=navigator.platform,xt=/gecko\/\d/i.test(ze),Yt=/MSIE \d/.test(ze),he=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ze),xe=/Edge\/(\d+)/.exec(ze),ge=Yt||he||xe,Ut=ge&&(Yt?document.documentMode||6:+(xe||he)[1]),jt=!xe&&/WebKit\//.test(ze),ne=jt&&/Qt\/\d+\.\d+/.test(ze),Ae=!xe&&/Chrome\//.test(ze),se=/Opera\//.test(ze),ke=/Apple Computer/.test(navigator.vendor),de=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ze),Ie=/PhantomJS/.test(ze),Dt=!xe&&/AppleWebKit/.test(ze)&&/Mobile\/\w+/.test(ze),nt=/Android/.test(ze),et=Dt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ze),ut=Dt||/Mac/.test(Qt),at=/\bCrOS\b/.test(ze),ht=/win/i.test(Qt),pt=se&&ze.match(/Version\/(\d*\.\d*)/);pt&&(pt=Number(pt[1])),pt&&pt>=15&&(se=!1,jt=!0);var St=ut&&(ne||se&&(pt==null||pt<12.11)),bt=xt||ge&&Ut>=9;function Ot(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ht=function(it,st){var dt=it.className,ct=Ot(st).exec(dt);if(ct){var gt=dt.slice(ct.index+ct[0].length);it.className=dt.slice(0,ct.index)+(gt?ct[1]+gt:"")}};function Wt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function re(it,st){return Wt(it).appendChild(st)}function te(it,st,dt,ct){var gt=document.createElement(it);if(dt&&(gt.className=dt),ct&&(gt.style.cssText=ct),typeof st=="string")gt.appendChild(document.createTextNode(st));else if(st)for(var Nt=0;Nt<st.length;++Nt)gt.appendChild(st[Nt]);return gt}function Ce(it,st,dt,ct){var gt=te(it,st,dt,ct);return gt.setAttribute("role","presentation"),gt}var ce;document.createRange?ce=function(it,st,dt,ct){var gt=document.createRange();return gt.setEnd(ct||it,dt),gt.setStart(it,st),gt}:ce=function(it,st,dt){var ct=document.body.createTextRange();try{ct.moveToElementText(it.parentNode)}catch(gt){return ct}return ct.collapse(!0),ct.moveEnd("character",dt),ct.moveStart("character",st),ct};function Qe(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function je(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function He(it,st){var dt=it.className;Ot(st).test(dt)||(it.className+=(dt?" ":"")+st)}function Qn(it,st){for(var dt=it.split(" "),ct=0;ct<dt.length;ct++)dt[ct]&&!Ot(dt[ct]).test(st)&&(st+=" "+dt[ct]);return st}var Gn=function(it){it.select()};Dt?Gn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:ge&&(Gn=function(it){try{it.select()}catch(st){}});function Yn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function di(it,st,dt){st||(st={});for(var ct in it)it.hasOwnProperty(ct)&&(dt!==!1||!st.hasOwnProperty(ct))&&(st[ct]=it[ct]);return st}function ie(it,st,dt,ct,gt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ct||0,Rt=gt||0;;){var $t=it.indexOf(" ",Nt);if($t<0||$t>=st)return Rt+(st-Nt);Rt+=$t-Nt,Rt+=dt-Rt%dt,Nt=$t+1}}var zt=function(){this.id=null,this.f=null,this.time=0,this.handler=Yn(this.onTimeout,this)};zt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},zt.prototype.set=function(it,st){this.f=st;var dt=+new Date+it;(!this.id||dt<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=dt)};function We(it,st){for(var dt=0;dt<it.length;++dt)if(it[dt]==st)return dt;return-1}var En=50,Xn={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},In={origin:"*mouse"},Hn={origin:"+move"};function li(it,st,dt){for(var ct=0,gt=0;;){var Nt=it.indexOf(" ",ct);Nt==-1&&(Nt=it.length);var Rt=Nt-ct;if(Nt==it.length||gt+Rt>=st)return ct+Math.min(Rt,st-gt);if(gt+=Nt-ct,gt+=dt-gt%dt,ct=Nt+1,gt>=st)return ct}}var tn=[""];function Me(it){for(;tn.length<=it;)tn.push(rn(tn)+" ");return tn[it]}function rn(it){return it[it.length-1]}function Dn(it,st){for(var dt=[],ct=0;ct<it.length;ct++)dt[ct]=st(it[ct],ct);return dt}function sn(it,st,dt){for(var ct=0,gt=dt(st);ct<it.length&&dt(it[ct])<=gt;)ct++;it.splice(ct,0,st)}function Vt(){}function Pt(it,st){var dt;return Object.create?dt=Object.create(it):(Vt.prototype=it,dt=new Vt),st&&di(st,dt),dt}var mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function vt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||mt.test(it))}function kt(it,st){return st?st.source.indexOf("\\w")>-1&&vt(it)?!0:st.test(it):vt(it)}function Lt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var _t=/[\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 De(it){return it.charCodeAt(0)>=768&&_t.test(it)}function on(it,st,dt){for(;(dt<0?st>0:st<it.length)&&De(it.charAt(st));)st+=dt;return st}function mn(it,st,dt){for(var ct=st>dt?-1:1;;){if(st==dt)return st;var gt=(st+dt)/2,Nt=ct<0?Math.ceil(gt):Math.floor(gt);if(Nt==st)return it(Nt)?st:dt;it(Nt)?dt=Nt:st=Nt+ct}}function $e(it,st,dt,ct){if(!it)return ct(st,dt,"ltr",0);for(var gt=!1,Nt=0;Nt<it.length;++Nt){var Rt=it[Nt];(Rt.from<dt&&Rt.to>st||st==dt&&Rt.to==st)&&(ct(Math.max(Rt.from,st),Math.min(Rt.to,dt),Rt.level==1?"rtl":"ltr",Nt),gt=!0)}gt||ct(st,dt,"ltr")}var Bn=null;function Re(it,st,dt){var ct;Bn=null;for(var gt=0;gt<it.length;++gt){var Nt=it[gt];if(Nt.from<st&&Nt.to>st)return gt;Nt.to==st&&(Nt.from!=Nt.to&&dt=="before"?ct=gt:Bn=gt),Nt.from==st&&(Nt.from!=Nt.to&&dt!="before"?ct=gt:Bn=gt)}return ct!=null?ct:Bn}var Mn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(fe){return fe<=247?it.charAt(fe):1424<=fe&&fe<=1524?"R":1536<=fe&&fe<=1785?st.charAt(fe-1536):1774<=fe&&fe<=2220?"r":8192<=fe&&fe<=8203?"w":fe==8204?"b":"L"}var ct=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,gt=/[stwN]/,Nt=/[LRr]/,Rt=/[Lb1n]/,$t=/[1n]/;function Jt(fe,qe,we){this.level=fe,this.from=qe,this.to=we}return function(fe,qe){var we=qe=="ltr"?"L":"R";if(fe.length==0||qe=="ltr"&&!ct.test(fe))return!1;for(var yn=fe.length,pn=[],Ai=0;Ai<yn;++Ai)pn.push(dt(fe.charCodeAt(Ai)));for(var vi=0,Di=we;vi<yn;++vi){var Yi=pn[vi];Yi=="m"?pn[vi]=Di:Di=Yi}for(var Fr=0,mr=we;Fr<yn;++Fr){var Hr=pn[Fr];Hr=="1"&&mr=="r"?pn[Fr]="n":Nt.test(Hr)&&(mr=Hr,Hr=="r"&&(pn[Fr]="R"))}for(var vo=1,pr=pn[0];vo<yn-1;++vo){var Qo=pn[vo];Qo=="+"&&pr=="1"&&pn[vo+1]=="1"?pn[vo]="1":Qo==","&&pr==pn[vo+1]&&(pr=="1"||pr=="n")&&(pn[vo]=pr),pr=Qo}for(var ca=0;ca<yn;++ca){var ll=pn[ca];if(ll==",")pn[ca]="N";else if(ll=="%"){var Pa=void 0;for(Pa=ca+1;Pa<yn&&pn[Pa]=="%";++Pa);for(var fu=ca&&pn[ca-1]=="!"||Pa<yn&&pn[Pa]=="1"?"1":"N",gl=ca;gl<Pa;++gl)pn[gl]=fu;ca=Pa-1}}for(var $a=0,eu=we;$a<yn;++$a){var Bl=pn[$a];eu=="L"&&Bl=="1"?pn[$a]="L":Nt.test(Bl)&&(eu=Bl)}for(var dr=0;dr<yn;++dr)if(gt.test(pn[dr])){var ls=void 0;for(ls=dr+1;ls<yn&&gt.test(pn[ls]);++ls);for(var da=(dr?pn[dr-1]:we)=="L",$s=(ls<yn?pn[ls]:we)=="L",Cl=da==$s?da?"L":"R":we,fs=dr;fs<ls;++fs)pn[fs]=Cl;dr=ls-1}for(var Do=[],gu,Ua=0;Ua<yn;)if(Rt.test(pn[Ua])){var tc=Ua;for(++Ua;Ua<yn&&Rt.test(pn[Ua]);++Ua);Do.push(new Jt(0,tc,Ua))}else{var ju=Ua,Ul=Do.length,pu=qe=="rtl"?1:0;for(++Ua;Ua<yn&&pn[Ua]!="L";++Ua);for(var js=ju;js<Ua;)if($t.test(pn[js])){ju<js&&(Do.splice(Ul,0,new Jt(1,ju,js)),Ul+=pu);var ul=js;for(++js;js<Ua&&$t.test(pn[js]);++js);Do.splice(Ul,0,new Jt(2,ul,js)),Ul+=pu,ju=js}else++js;ju<Ua&&Do.splice(Ul,0,new Jt(1,ju,Ua))}return qe=="ltr"&&(Do[0].level==1&&(gu=fe.match(/^\s+/))&&(Do[0].from=gu[0].length,Do.unshift(new Jt(0,0,gu[0].length))),rn(Do).level==1&&(gu=fe.match(/\s+$/))&&(rn(Do).to-=gu[0].length,Do.push(new Jt(0,yn-gu[0].length,yn)))),qe=="rtl"?Do.reverse():Do}}();function Kn(it,st){var dt=it.order;return dt==null&&(dt=it.order=Mn(it.text,st)),dt}var Fi=[],ti=function(it,st,dt){if(it.addEventListener)it.addEventListener(st,dt,!1);else if(it.attachEvent)it.attachEvent("on"+st,dt);else{var ct=it._handlers||(it._handlers={});ct[st]=(ct[st]||Fi).concat(dt)}};function sr(it,st){return it._handlers&&it._handlers[st]||Fi}function rr(it,st,dt){if(it.removeEventListener)it.removeEventListener(st,dt,!1);else if(it.detachEvent)it.detachEvent("on"+st,dt);else{var ct=it._handlers,gt=ct&&ct[st];if(gt){var Nt=We(gt,dt);Nt>-1&&(ct[st]=gt.slice(0,Nt).concat(gt.slice(Nt+1)))}}}function xi(it,st){var dt=sr(it,st);if(dt.length)for(var ct=Array.prototype.slice.call(arguments,2),gt=0;gt<dt.length;++gt)dt[gt].apply(null,ct)}function wi(it,st,dt){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),xi(it,dt||st.type,it,st),Ii(st)||st.codemirrorIgnore}function Ir(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var dt=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ct=0;ct<st.length;++ct)We(dt,st[ct])==-1&&dt.push(st[ct])}function ji(it,st){return sr(it,st).length>0}function yr(it){it.prototype.on=function(st,dt){ti(this,st,dt)},it.prototype.off=function(st,dt){rr(this,st,dt)}}function xr(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Qr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Ii(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function br(it){xr(it),Qr(it)}function Sr(it){return it.target||it.srcElement}function Bo(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ut&&it.ctrlKey&&st==1&&(st=3),st}var er=function(){if(ge&&Ut<9)return!1;var it=te("div");return"draggable"in it||"dragDrop"in it}(),Lo;function ys(it){if(Lo==null){var st=te("span","\u200B");re(it,te("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Lo=st.offsetWidth<=1&&st.offsetHeight>2&&!(ge&&Ut<8))}var dt=Lo?te("span","\u200B"):te("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Mo;function Lr(it){if(Mo!=null)return Mo;var st=re(it,document.createTextNode("A\u062EA")),dt=ce(st,0,1).getBoundingClientRect(),ct=ce(st,1,2).getBoundingClientRect();return Wt(it),!dt||dt.left==dt.right?!1:Mo=ct.right-dt.right<3}var Pn=`
b`.split(/\n/).length!=3?function(it){for(var st=0,dt=[],ct=it.length;st<=ct;){var gt=it.indexOf(`
`,st);gt==-1&&(gt=it.length);var Nt=it.slice(st,it.charAt(gt-1)=="\r"?gt-1:gt),Rt=Nt.indexOf("\r");Rt!=-1?(dt.push(Nt.slice(0,Rt)),st+=Rt+1):(dt.push(Nt),st=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Mt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(dt){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},jn=function(){var it=te("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),kn=null;function _n(it){if(kn!=null)return kn;var st=re(it,te("span","x")),dt=st.getBoundingClientRect(),ct=ce(st,0,1).getBoundingClientRect();return kn=Math.abs(dt.left-ct.left)>1}var Wn={},qn={};function ui(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Wn[it]=st}function Wi(it,st){qn[it]=st}function en(it){if(typeof it=="string"&&qn.hasOwnProperty(it))it=qn[it];else if(it&&typeof it.name=="string"&&qn.hasOwnProperty(it.name)){var st=qn[it.name];typeof st=="string"&&(st={name:st}),it=Pt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return en("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return en("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Je(it,st){st=en(st);var dt=Wn[st.name];if(!dt)return Je(it,"text/plain");var ct=dt(it,st);if(be.hasOwnProperty(st.name)){var gt=be[st.name];for(var Nt in gt)gt.hasOwnProperty(Nt)&&(ct.hasOwnProperty(Nt)&&(ct["_"+Nt]=ct[Nt]),ct[Nt]=gt[Nt])}if(ct.name=st.name,st.helperType&&(ct.helperType=st.helperType),st.modeProps)for(var Rt in st.modeProps)ct[Rt]=st.modeProps[Rt];return ct}var be={};function un(it,st){var dt=be.hasOwnProperty(it)?be[it]:be[it]={};di(st,dt)}function fi(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var dt={};for(var ct in st){var gt=st[ct];gt instanceof Array&&(gt=gt.concat([])),dt[ct]=gt}return dt}function mi(it,st){for(var dt;it.innerMode&&(dt=it.innerMode(st),!(!dt||dt.mode==it));)st=dt.state,it=dt.mode;return dt||{mode:it,state:st}}function ri(it,st,dt){return it.startState?it.startState(st,dt):!0}var ee=function(it,st,dt){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=dt};ee.prototype.eol=function(){return this.pos>=this.string.length},ee.prototype.sol=function(){return this.pos==this.lineStart},ee.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ee.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ee.prototype.eat=function(it){var st=this.string.charAt(this.pos),dt;if(typeof it=="string"?dt=st==it:dt=st&&(it.test?it.test(st):it(st)),dt)return++this.pos,st},ee.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},ee.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ee.prototype.skipToEnd=function(){this.pos=this.string.length},ee.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},ee.prototype.backUp=function(it){this.pos-=it},ee.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ie(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},ee.prototype.indentation=function(){return ie(this.string,null,this.tabSize)-(this.lineStart?ie(this.string,this.lineStart,this.tabSize):0)},ee.prototype.match=function(it,st,dt){if(typeof it=="string"){var ct=function(Rt){return dt?Rt.toLowerCase():Rt},gt=this.string.substr(this.pos,it.length);if(ct(gt)==ct(it))return st!==!1&&(this.pos+=it.length),!0}else{var Nt=this.string.slice(this.pos).match(it);return Nt&&Nt.index>0?null:(Nt&&st!==!1&&(this.pos+=Nt[0].length),Nt)}},ee.prototype.current=function(){return this.string.slice(this.start,this.pos)},ee.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},ee.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},ee.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Cn(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var dt=it;!dt.lines;)for(var ct=0;;++ct){var gt=dt.children[ct],Nt=gt.chunkSize();if(st<Nt){dt=gt;break}st-=Nt}return dt.lines[st]}function Ti(it,st,dt){var ct=[],gt=st.line;return it.iter(st.line,dt.line+1,function(Nt){var Rt=Nt.text;gt==dt.line&&(Rt=Rt.slice(0,dt.ch)),gt==st.line&&(Rt=Rt.slice(st.ch)),ct.push(Rt),++gt}),ct}function Xi(it,st,dt){var ct=[];return it.iter(st,dt,function(gt){ct.push(gt.text)}),ct}function On(it,st){var dt=st-it.height;if(dt)for(var ct=it;ct;ct=ct.parent)ct.height+=dt}function Ge(it){if(it.parent==null)return null;for(var st=it.parent,dt=We(st.lines,it),ct=st.parent;ct;st=ct,ct=ct.parent)for(var gt=0;ct.children[gt]!=st;++gt)dt+=ct.children[gt].chunkSize();return dt+st.first}function Si(it,st){var dt=it.first;t:do{for(var ct=0;ct<it.children.length;++ct){var gt=it.children[ct],Nt=gt.height;if(st<Nt){it=gt;continue t}st-=Nt,dt+=gt.chunkSize()}return dt}while(!it.lines);for(var Rt=0;Rt<it.lines.length;++Rt){var $t=it.lines[Rt],Jt=$t.height;if(st<Jt)break;st-=Jt}return dt+Rt}function Zi(it,st){return st>=it.first&&st<it.first+it.size}function ur(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ln(it,st,dt){if(dt===void 0&&(dt=null),!(this instanceof Ln))return new Ln(it,st,dt);this.line=it,this.ch=st,this.sticky=dt}function Ui(it,st){return it.line-st.line||it.ch-st.ch}function pe(it,st){return it.sticky==st.sticky&&Ui(it,st)==0}function Fe(it){return Ln(it.line,it.ch)}function Ke(it,st){return Ui(it,st)<0?st:it}function ve(it,st){return Ui(it,st)<0?it:st}function Ee(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function _e(it,st){if(st.line<it.first)return Ln(it.first,0);var dt=it.first+it.size-1;return st.line>dt?Ln(dt,Cn(it,dt).text.length):Sn(st,Cn(it,st.line).text.length)}function Sn(it,st){var dt=it.ch;return dt==null||dt>st?Ln(it.line,st):dt<0?Ln(it.line,0):it}function ei(it,st){for(var dt=[],ct=0;ct<st.length;ct++)dt[ct]=_e(it,st[ct]);return dt}var Xe=function(it,st){this.state=it,this.lookAhead=st},Fn=function(it,st,dt,ct){this.state=st,this.doc=it,this.line=dt,this.maxLookAhead=ct||0,this.baseTokens=null,this.baseTokenPos=1};Fn.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Fn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Fn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Fn.fromSaved=function(it,st,dt){return st instanceof Xe?new Fn(it,fi(it.mode,st.state),dt,st.lookAhead):new Fn(it,fi(it.mode,st),dt)},Fn.prototype.save=function(it){var st=it!==!1?fi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xe(st,this.maxLookAhead):st};function si(it,st,dt,ct){var gt=[it.state.modeGen],Nt={};ci(it,st.text,it.doc.mode,dt,function(fe,qe){return gt.push(fe,qe)},Nt,ct);for(var Rt=dt.state,$t=function(fe){dt.baseTokens=gt;var qe=it.state.overlays[fe],we=1,yn=0;dt.state=!0,ci(it,st.text,qe.mode,dt,function(pn,Ai){for(var vi=we;yn<pn;){var Di=gt[we];Di>pn&&gt.splice(we,1,pn,gt[we+1],Di),we+=2,yn=Math.min(pn,Di)}if(Ai)if(qe.opaque)gt.splice(vi,we-vi,pn,"overlay "+Ai),we=vi+2;else for(;vi<we;vi+=2){var Yi=gt[vi+1];gt[vi+1]=(Yi?Yi+" ":"")+"overlay "+Ai}},Nt),dt.state=Rt,dt.baseTokens=null,dt.baseTokenPos=1},Jt=0;Jt<it.state.overlays.length;++Jt)$t(Jt);return{styles:gt,classes:Nt.bgClass||Nt.textClass?Nt:null}}function Gi(it,st,dt){if(!st.styles||st.styles[0]!=it.state.modeGen){var ct=Ji(it,Ge(st)),gt=st.text.length>it.options.maxHighlightLength&&fi(it.doc.mode,ct.state),Nt=si(it,st,ct);gt&&(ct.state=gt),st.stateAfter=ct.save(!gt),st.styles=Nt.styles,Nt.classes?st.styleClasses=Nt.classes:st.styleClasses&&(st.styleClasses=null),dt===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function Ji(it,st,dt){var ct=it.doc,gt=it.display;if(!ct.mode.startState)return new Fn(ct,!0,st);var Nt=Bi(it,st,dt),Rt=Nt>ct.first&&Cn(ct,Nt-1).stateAfter,$t=Rt?Fn.fromSaved(ct,Rt,Nt):new Fn(ct,ri(ct.mode),Nt);return ct.iter(Nt,st,function(Jt){Te(it,Jt.text,$t);var fe=$t.line;Jt.stateAfter=fe==st-1||fe%5==0||fe>=gt.viewFrom&&fe<gt.viewTo?$t.save():null,$t.nextLine()}),dt&&(ct.modeFrontier=$t.line),$t}function Te(it,st,dt,ct){var gt=it.doc.mode,Nt=new ee(st,it.options.tabSize,dt);for(Nt.start=Nt.pos=ct||0,st==""&&Mi(gt,dt.state);!Nt.eol();)Ri(gt,Nt,dt.state),Nt.start=Nt.pos}function Mi(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var dt=mi(it,st);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function Ri(it,st,dt,ct){for(var gt=0;gt<10;gt++){ct&&(ct[0]=mi(it,dt).mode);var Nt=it.token(st,dt);if(st.pos>st.start)return Nt}throw new Error("Mode "+it.name+" failed to advance stream.")}var yi=function(it,st,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=dt};function Nr(it,st,dt,ct){var gt=it.doc,Nt=gt.mode,Rt;st=_e(gt,st);var $t=Cn(gt,st.line),Jt=Ji(it,st.line,dt),fe=new ee($t.text,it.options.tabSize,Jt),qe;for(ct&&(qe=[]);(ct||fe.pos<st.ch)&&!fe.eol();)fe.start=fe.pos,Rt=Ri(Nt,fe,Jt.state),ct&&qe.push(new yi(fe,Rt,fi(gt.mode,Jt.state)));return ct?qe:new yi(fe,Rt,Jt.state)}function qi(it,st){if(it)for(;;){var dt=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!dt)break;it=it.slice(0,dt.index)+it.slice(dt.index+dt[0].length);var ct=dt[1]?"bgClass":"textClass";st[ct]==null?st[ct]=dt[2]:new RegExp("(?:^|\\s)"+dt[2]+"(?:$|\\s)").test(st[ct])||(st[ct]+=" "+dt[2])}return it}function ci(it,st,dt,ct,gt,Nt,Rt){var $t=dt.flattenSpans;$t==null&&($t=it.options.flattenSpans);var Jt=0,fe=null,qe=new ee(st,it.options.tabSize,ct),we,yn=it.options.addModeClass&&[null];for(st==""&&qi(Mi(dt,ct.state),Nt);!qe.eol();){if(qe.pos>it.options.maxHighlightLength?($t=!1,Rt&&Te(it,st,ct,qe.pos),qe.pos=st.length,we=null):we=qi(Ri(dt,qe,ct.state,yn),Nt),yn){var pn=yn[0].name;pn&&(we="m-"+(we?pn+" "+we:pn))}if(!$t||fe!=we){for(;Jt<qe.start;)Jt=Math.min(qe.start,Jt+5e3),gt(Jt,fe);fe=we}qe.start=qe.pos}for(;Jt<qe.pos;){var Ai=Math.min(qe.pos,Jt+5e3);gt(Ai,fe),Jt=Ai}}function Bi(it,st,dt){for(var ct,gt,Nt=it.doc,Rt=dt?-1:st-(it.doc.mode.innerMode?1e3:100),$t=st;$t>Rt;--$t){if($t<=Nt.first)return Nt.first;var Jt=Cn(Nt,$t-1),fe=Jt.stateAfter;if(fe&&(!dt||$t+(fe instanceof Xe?fe.lookAhead:0)<=Nt.modeFrontier))return $t;var qe=ie(Jt.text,null,it.options.tabSize);(gt==null||ct>qe)&&(gt=$t-1,ct=qe)}return gt}function Qi(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var dt=it.first,ct=st-1;ct>dt;ct--){var gt=Cn(it,ct).stateAfter;if(gt&&(!(gt instanceof Xe)||ct+gt.lookAhead<st)){dt=ct+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,dt)}}var Ar=!1,cn=!1;function $i(){Ar=!0}function dn(){cn=!0}function or(it,st,dt){this.marker=it,this.from=st,this.to=dt}function is(it,st){if(it)for(var dt=0;dt<it.length;++dt){var ct=it[dt];if(ct.marker==st)return ct}}function qr(it,st){for(var dt,ct=0;ct<it.length;++ct)it[ct]!=st&&(dt||(dt=[])).push(it[ct]);return dt}function rs(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function ro(it,st,dt){var ct;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Rt=Nt.marker,$t=Nt.from==null||(Rt.inclusiveLeft?Nt.from<=st:Nt.from<st);if($t||Nt.from==st&&Rt.type=="bookmark"&&(!dt||!Nt.marker.insertLeft)){var Jt=Nt.to==null||(Rt.inclusiveRight?Nt.to>=st:Nt.to>st);(ct||(ct=[])).push(new or(Rt,Nt.from,Jt?null:Nt.to))}}return ct}function Ur(it,st,dt){var ct;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Rt=Nt.marker,$t=Nt.to==null||(Rt.inclusiveRight?Nt.to>=st:Nt.to>st);if($t||Nt.from==st&&Rt.type=="bookmark"&&(!dt||Nt.marker.insertLeft)){var Jt=Nt.from==null||(Rt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ct||(ct=[])).push(new or(Rt,Jt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ct}function Or(it,st){if(st.full)return null;var dt=Zi(it,st.from.line)&&Cn(it,st.from.line).markedSpans,ct=Zi(it,st.to.line)&&Cn(it,st.to.line).markedSpans;if(!dt&&!ct)return null;var gt=st.from.ch,Nt=st.to.ch,Rt=Ui(st.from,st.to)==0,$t=ro(dt,gt,Rt),Jt=Ur(ct,Nt,Rt),fe=st.text.length==1,qe=rn(st.text).length+(fe?gt:0);if($t)for(var we=0;we<$t.length;++we){var yn=$t[we];if(yn.to==null){var pn=is(Jt,yn.marker);pn?fe&&(yn.to=pn.to==null?null:pn.to+qe):yn.to=gt}}if(Jt)for(var Ai=0;Ai<Jt.length;++Ai){var vi=Jt[Ai];if(vi.to!=null&&(vi.to+=qe),vi.from==null){var Di=is($t,vi.marker);Di||(vi.from=qe,fe&&($t||($t=[])).push(vi))}else vi.from+=qe,fe&&($t||($t=[])).push(vi)}$t&&($t=Wo($t)),Jt&&Jt!=$t&&(Jt=Wo(Jt));var Yi=[$t];if(!fe){var Fr=st.text.length-2,mr;if(Fr>0&&$t)for(var Hr=0;Hr<$t.length;++Hr)$t[Hr].to==null&&(mr||(mr=[])).push(new or($t[Hr].marker,null,null));for(var vo=0;vo<Fr;++vo)Yi.push(mr);Yi.push(Jt)}return Yi}function Wo(it){for(var st=0;st<it.length;++st){var dt=it[st];dt.from!=null&&dt.from==dt.to&&dt.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function oo(it,st,dt){var ct=null;if(it.iter(st.line,dt.line+1,function(pn){if(pn.markedSpans)for(var Ai=0;Ai<pn.markedSpans.length;++Ai){var vi=pn.markedSpans[Ai].marker;vi.readOnly&&(!ct||We(ct,vi)==-1)&&(ct||(ct=[])).push(vi)}}),!ct)return null;for(var gt=[{from:st,to:dt}],Nt=0;Nt<ct.length;++Nt)for(var Rt=ct[Nt],$t=Rt.find(0),Jt=0;Jt<gt.length;++Jt){var fe=gt[Jt];if(!(Ui(fe.to,$t.from)<0||Ui(fe.from,$t.to)>0)){var qe=[Jt,1],we=Ui(fe.from,$t.from),yn=Ui(fe.to,$t.to);(we<0||!Rt.inclusiveLeft&&!we)&&qe.push({from:fe.from,to:$t.from}),(yn>0||!Rt.inclusiveRight&&!yn)&&qe.push({from:$t.to,to:fe.to}),gt.splice.apply(gt,qe),Jt+=qe.length-3}}return gt}function hi(it){var st=it.markedSpans;if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.detachLine(it);it.markedSpans=null}}function Xt(it,st){if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.attachLine(it);it.markedSpans=st}}function An(it){return it.inclusiveLeft?-1:0}function _s(it){return it.inclusiveRight?1:0}function xs(it,st){var dt=it.lines.length-st.lines.length;if(dt!=0)return dt;var ct=it.find(),gt=st.find(),Nt=Ui(ct.from,gt.from)||An(it)-An(st);if(Nt)return-Nt;var Rt=Ui(ct.to,gt.to)||_s(it)-_s(st);return Rt||st.id-it.id}function Xo(it,st){var dt=cn&&it.markedSpans,ct;if(dt)for(var gt=void 0,Nt=0;Nt<dt.length;++Nt)gt=dt[Nt],gt.marker.collapsed&&(st?gt.from:gt.to)==null&&(!ct||xs(ct,gt.marker)<0)&&(ct=gt.marker);return ct}function Ms(it){return Xo(it,!0)}function pa(it){return Xo(it,!1)}function _a(it,st){var dt=cn&&it.markedSpans,ct;if(dt)for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt];Nt.marker.collapsed&&(Nt.from==null||Nt.from<st)&&(Nt.to==null||Nt.to>st)&&(!ct||xs(ct,Nt.marker)<0)&&(ct=Nt.marker)}return ct}function ma(it,st,dt,ct,gt){var Nt=Cn(it,st),Rt=cn&&Nt.markedSpans;if(Rt)for(var $t=0;$t<Rt.length;++$t){var Jt=Rt[$t];if(Jt.marker.collapsed){var fe=Jt.marker.find(0),qe=Ui(fe.from,dt)||An(Jt.marker)-An(gt),we=Ui(fe.to,ct)||_s(Jt.marker)-_s(gt);if(!(qe>=0&&we<=0||qe<=0&&we>=0)&&(qe<=0&&(Jt.marker.inclusiveRight&&gt.inclusiveLeft?Ui(fe.to,dt)>=0:Ui(fe.to,dt)>0)||qe>=0&&(Jt.marker.inclusiveRight&&gt.inclusiveLeft?Ui(fe.from,ct)<=0:Ui(fe.from,ct)<0)))return!0}}}function ki(it){for(var st;st=Ms(it);)it=st.find(-1,!0).line;return it}function Tr(it){for(var st;st=pa(it);)it=st.find(1,!0).line;return it}function Oi(it){for(var st,dt;st=pa(it);)it=st.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function bi(it,st){var dt=Cn(it,st),ct=ki(dt);return dt==ct?st:Ge(ct)}function hr(it,st){if(st>it.lastLine())return st;var dt=Cn(it,st),ct;if(!ln(it,dt))return st;for(;ct=pa(dt);)dt=ct.find(1,!0).line;return Ge(dt)+1}function ln(it,st){var dt=cn&&st.markedSpans;if(dt){for(var ct=void 0,gt=0;gt<dt.length;++gt)if(ct=dt[gt],!!ct.marker.collapsed){if(ct.from==null)return!0;if(!ct.marker.widgetNode&&ct.from==0&&ct.marker.inclusiveLeft&&cr(it,st,ct))return!0}}}function cr(it,st,dt){if(dt.to==null){var ct=dt.marker.find(1,!0);return cr(it,ct.line,is(ct.line.markedSpans,dt.marker))}if(dt.marker.inclusiveRight&&dt.to==st.text.length)return!0;for(var gt=void 0,Nt=0;Nt<st.markedSpans.length;++Nt)if(gt=st.markedSpans[Nt],gt.marker.collapsed&&!gt.marker.widgetNode&&gt.from==dt.to&&(gt.to==null||gt.to!=dt.from)&&(gt.marker.inclusiveLeft||dt.marker.inclusiveRight)&&cr(it,st,gt))return!0}function Wr(it){it=ki(it);for(var st=0,dt=it.parent,ct=0;ct<dt.lines.length;++ct){var gt=dt.lines[ct];if(gt==it)break;st+=gt.height}for(var Nt=dt.parent;Nt;dt=Nt,Nt=dt.parent)for(var Rt=0;Rt<Nt.children.length;++Rt){var $t=Nt.children[Rt];if($t==dt)break;st+=$t.height}return st}function Ko(it){if(it.height==0)return 0;for(var st=it.text.length,dt,ct=it;dt=Ms(ct);){var gt=dt.find(0,!0);ct=gt.from.line,st+=gt.from.ch-gt.to.ch}for(ct=it;dt=pa(ct);){var Nt=dt.find(0,!0);st-=ct.text.length-Nt.from.ch,ct=Nt.to.line,st+=ct.text.length-Nt.to.ch}return st}function Go(it){var st=it.display,dt=it.doc;st.maxLine=Cn(dt,dt.first),st.maxLineLength=Ko(st.maxLine),st.maxLineChanged=!0,dt.iter(function(ct){var gt=Ko(ct);gt>st.maxLineLength&&(st.maxLineLength=gt,st.maxLine=ct)})}var ws=function(it,st,dt){this.text=it,Xt(this,st),this.height=dt?dt(this):1};ws.prototype.lineNo=function(){return Ge(this)},yr(ws);function Zs(it,st,dt,ct){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),hi(it),Xt(it,dt);var gt=ct?ct(it):1;gt!=it.height&&On(it,gt)}function Qa(it){it.parent=null,hi(it)}var Na={},nl={};function Vl(it,st){if(!it||/^\s*$/.test(it))return null;var dt=st.addModeClass?nl:Na;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function nn(it,st){var dt=Ce("span",null,null,jt?"padding-right: .1px":null),ct={pre:Ce("pre",[dt],"CodeMirror-line"),content:dt,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var gt=0;gt<=(st.rest?st.rest.length:0);gt++){var Nt=gt?st.rest[gt-1]:st.line,Rt=void 0;ct.pos=0,ct.addToken=au,Lr(it.display.measure)&&(Rt=Kn(Nt,it.doc.direction))&&(ct.addToken=Ps(ct.addToken,Rt)),ct.map=[];var $t=st!=it.display.externalMeasured&&Ge(Nt);cA(Nt,ct,Gi(it,Nt,$t)),Nt.styleClasses&&(Nt.styleClasses.bgClass&&(ct.bgClass=Qn(Nt.styleClasses.bgClass,ct.bgClass||"")),Nt.styleClasses.textClass&&(ct.textClass=Qn(Nt.styleClasses.textClass,ct.textClass||""))),ct.map.length==0&&ct.map.push(0,0,ct.content.appendChild(ys(it.display.measure))),gt==0?(st.measure.map=ct.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ct.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(jt){var Jt=ct.content.lastChild;(/\bcm-tab\b/.test(Jt.className)||Jt.querySelector&&Jt.querySelector(".cm-tab"))&&(ct.content.className="cm-tab-wrap-hack")}return xi(it,"renderLine",it,st.line,ct.pre),ct.pre.className&&(ct.textClass=Qn(ct.pre.className,ct.textClass||"")),ct}function il(it){var st=te("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function au(it,st,dt,ct,gt,Nt,Rt){if(st){var $t=it.splitSpaces?Xu(st,it.trailingSpace):st,Jt=it.cm.state.specialChars,fe=!1,qe;if(!Jt.test(st))it.col+=st.length,qe=document.createTextNode($t),it.map.push(it.pos,it.pos+st.length,qe),ge&&Ut<9&&(fe=!0),it.pos+=st.length;else{qe=document.createDocumentFragment();for(var we=0;;){Jt.lastIndex=we;var yn=Jt.exec(st),pn=yn?yn.index-we:st.length-we;if(pn){var Ai=document.createTextNode($t.slice(we,we+pn));ge&&Ut<9?qe.appendChild(te("span",[Ai])):qe.appendChild(Ai),it.map.push(it.pos,it.pos+pn,Ai),it.col+=pn,it.pos+=pn}if(!yn)break;we+=pn+1;var vi=void 0;if(yn[0]==" "){var Di=it.cm.options.tabSize,Yi=Di-it.col%Di;vi=qe.appendChild(te("span",Me(Yi),"cm-tab")),vi.setAttribute("role","presentation"),vi.setAttribute("cm-text"," "),it.col+=Yi}else yn[0]=="\r"||yn[0]==`
`?(vi=qe.appendChild(te("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),vi.setAttribute("cm-text",yn[0]),it.col+=1):(vi=it.cm.options.specialCharPlaceholder(yn[0]),vi.setAttribute("cm-text",yn[0]),ge&&Ut<9?qe.appendChild(te("span",[vi])):qe.appendChild(vi),it.col+=1);it.map.push(it.pos,it.pos+1,vi),it.pos++}}if(it.trailingSpace=$t.charCodeAt(st.length-1)==32,dt||ct||gt||fe||Nt||Rt){var Fr=dt||"";ct&&(Fr+=ct),gt&&(Fr+=gt);var mr=te("span",[qe],Fr,Nt);if(Rt)for(var Hr in Rt)Rt.hasOwnProperty(Hr)&&Hr!="style"&&Hr!="class"&&mr.setAttribute(Hr,Rt[Hr]);return it.content.appendChild(mr)}it.content.appendChild(qe)}}function Xu(it,st){if(it.length>1&&!/ /.test(it))return it;for(var dt=st,ct="",gt=0;gt<it.length;gt++){var Nt=it.charAt(gt);Nt==" "&&dt&&(gt==it.length-1||it.charCodeAt(gt+1)==32)&&(Nt="\xA0"),ct+=Nt,dt=Nt==" "}return ct}function Ps(it,st){return function(dt,ct,gt,Nt,Rt,$t,Jt){gt=gt?gt+" cm-force-border":"cm-force-border";for(var fe=dt.pos,qe=fe+ct.length;;){for(var we=void 0,yn=0;yn<st.length&&(we=st[yn],!(we.to>fe&&we.from<=fe));yn++);if(we.to>=qe)return it(dt,ct,gt,Nt,Rt,$t,Jt);it(dt,ct.slice(0,we.to-fe),gt,Nt,null,$t,Jt),Nt=null,ct=ct.slice(we.to-fe),fe=we.to}}}function lu(it,st,dt,ct){var gt=!ct&&dt.widgetNode;gt&&it.map.push(it.pos,it.pos+st,gt),!ct&&it.cm.display.input.needsContentAttribute&&(gt||(gt=it.content.appendChild(document.createElement("span"))),gt.setAttribute("cm-marker",dt.id)),gt&&(it.cm.display.input.setUneditable(gt),it.content.appendChild(gt)),it.pos+=st,it.trailingSpace=!1}function cA(it,st,dt){var ct=it.markedSpans,gt=it.text,Nt=0;if(!ct){for(var Rt=1;Rt<dt.length;Rt+=2)st.addToken(st,gt.slice(Nt,Nt=dt[Rt]),Vl(dt[Rt+1],st.cm.options));return}for(var $t=gt.length,Jt=0,fe=1,qe="",we,yn,pn=0,Ai,vi,Di,Yi,Fr;;){if(pn==Jt){Ai=vi=Di=yn="",Fr=null,Yi=null,pn=1/0;for(var mr=[],Hr=void 0,vo=0;vo<ct.length;++vo){var pr=ct[vo],Qo=pr.marker;if(Qo.type=="bookmark"&&pr.from==Jt&&Qo.widgetNode)mr.push(Qo);else if(pr.from<=Jt&&(pr.to==null||pr.to>Jt||Qo.collapsed&&pr.to==Jt&&pr.from==Jt)){if(pr.to!=null&&pr.to!=Jt&&pn>pr.to&&(pn=pr.to,vi=""),Qo.className&&(Ai+=" "+Qo.className),Qo.css&&(yn=(yn?yn+";":"")+Qo.css),Qo.startStyle&&pr.from==Jt&&(Di+=" "+Qo.startStyle),Qo.endStyle&&pr.to==pn&&(Hr||(Hr=[])).push(Qo.endStyle,pr.to),Qo.title&&((Fr||(Fr={})).title=Qo.title),Qo.attributes)for(var ca in Qo.attributes)(Fr||(Fr={}))[ca]=Qo.attributes[ca];Qo.collapsed&&(!Yi||xs(Yi.marker,Qo)<0)&&(Yi=pr)}else pr.from>Jt&&pn>pr.from&&(pn=pr.from)}if(Hr)for(var ll=0;ll<Hr.length;ll+=2)Hr[ll+1]==pn&&(vi+=" "+Hr[ll]);if(!Yi||Yi.from==Jt)for(var Pa=0;Pa<mr.length;++Pa)lu(st,0,mr[Pa]);if(Yi&&(Yi.from||0)==Jt){if(lu(st,(Yi.to==null?$t+1:Yi.to)-Jt,Yi.marker,Yi.from==null),Yi.to==null)return;Yi.to==Jt&&(Yi=!1)}}if(Jt>=$t)break;for(var fu=Math.min($t,pn);;){if(qe){var gl=Jt+qe.length;if(!Yi){var $a=gl>fu?qe.slice(0,fu-Jt):qe;st.addToken(st,$a,we?we+Ai:Ai,Di,Jt+$a.length==pn?vi:"",yn,Fr)}if(gl>=fu){qe=qe.slice(fu-Jt),Jt=fu;break}Jt=gl,Di=""}qe=gt.slice(Nt,Nt=dt[fe++]),we=Vl(dt[fe++],st.cm.options)}}}function Ju(it,st,dt){this.line=st,this.rest=Oi(st),this.size=this.rest?Ge(rn(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=ln(it,st)}function us(it,st,dt){for(var ct=[],gt,Nt=st;Nt<dt;Nt=gt){var Rt=new Ju(it.doc,Cn(it.doc,Nt),Nt);gt=Nt+Rt.size,ct.push(Rt)}return ct}var Ys=null;function Vr(it){Ys?Ys.ops.push(it):it.ownsGroup=Ys={ops:[it],delayedCallbacks:[]}}function So(it){var st=it.delayedCallbacks,dt=0;do{for(;dt<st.length;dt++)st[dt].call(null);for(var ct=0;ct<it.ops.length;ct++){var gt=it.ops[ct];if(gt.cursorActivityHandlers)for(;gt.cursorActivityCalled<gt.cursorActivityHandlers.length;)gt.cursorActivityHandlers[gt.cursorActivityCalled++].call(null,gt.cm)}}while(dt<st.length)}function os(it,st){var dt=it.ownsGroup;if(dt)try{So(dt)}finally{Ys=null,st(dt)}}var ks=null;function nr(it,st){var dt=sr(it,st);if(dt.length){var ct=Array.prototype.slice.call(arguments,2),gt;Ys?gt=Ys.delayedCallbacks:ks?gt=ks:(gt=ks=[],setTimeout(gh,0));for(var Nt=function($t){gt.push(function(){return dt[$t].apply(null,ct)})},Rt=0;Rt<dt.length;++Rt)Nt(Rt)}}function gh(){var it=ks;ks=null;for(var st=0;st<it.length;++st)it[st]()}function qu(it,st,dt,ct){for(var gt=0;gt<st.changes.length;gt++){var Nt=st.changes[gt];Nt=="text"?Ei(it,st):Nt=="gutter"?ta(it,st,dt,ct):Nt=="class"?Aa(it,st):Nt=="widget"&&uu(it,st,ct)}st.changes=null}function ml(it){return it.node==it.text&&(it.node=te("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),ge&&Ut<8&&(it.node.style.zIndex=2)),it.node}function ph(it,st){var dt=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(dt&&(dt+=" CodeMirror-linebackground"),st.background)dt?st.background.className=dt:(st.background.parentNode.removeChild(st.background),st.background=null);else if(dt){var ct=ml(st);st.background=ct.insertBefore(te("div",null,dt),ct.firstChild),it.display.input.setUneditable(st.background)}}function Uu(it,st){var dt=it.display.externalMeasured;return dt&&dt.line==st.line?(it.display.externalMeasured=null,st.measure=dt.measure,dt.built):nn(it,st)}function Ei(it,st){var dt=st.text.className,ct=Uu(it,st);st.text==st.node&&(st.node=ct.pre),st.text.parentNode.replaceChild(ct.pre,st.text),st.text=ct.pre,ct.bgClass!=st.bgClass||ct.textClass!=st.textClass?(st.bgClass=ct.bgClass,st.textClass=ct.textClass,Aa(it,st)):dt&&(st.text.className=dt)}function Aa(it,st){ph(it,st),st.line.wrapClass?ml(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var dt=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=dt||""}function ta(it,st,dt,ct){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var gt=ml(st);st.gutterBackground=te("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ct.fixedPos:-ct.gutterTotalWidth)+"px; width: "+ct.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),gt.insertBefore(st.gutterBackground,st.text)}var Nt=st.line.gutterMarkers;if(it.options.lineNumbers||Nt){var Rt=ml(st),$t=st.gutter=te("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ct.fixedPos:-ct.gutterTotalWidth)+"px");if(it.display.input.setUneditable($t),Rt.insertBefore($t,st.text),st.line.gutterClass&&($t.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=$t.appendChild(te("div",ur(it.options,dt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ct.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Nt)for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var fe=it.display.gutterSpecs[Jt].className,qe=Nt.hasOwnProperty(fe)&&Nt[fe];qe&&$t.appendChild(te("div",[qe],"CodeMirror-gutter-elt","left: "+ct.gutterLeft[fe]+"px; width: "+ct.gutterWidth[fe]+"px"))}}}function uu(it,st,dt){st.alignable&&(st.alignable=null);for(var ct=Ot("CodeMirror-linewidget"),gt=st.node.firstChild,Nt=void 0;gt;gt=Nt)Nt=gt.nextSibling,ct.test(gt.className)&&st.node.removeChild(gt);Bu(it,st,dt)}function ZA(it,st,dt,ct){var gt=Uu(it,st);return st.text=st.node=gt.pre,gt.bgClass&&(st.bgClass=gt.bgClass),gt.textClass&&(st.textClass=gt.textClass),Aa(it,st),ta(it,st,dt,ct),Bu(it,st,ct),st.node}function Bu(it,st,dt){if(Zr(it,st.line,st,dt,!0),st.rest)for(var ct=0;ct<st.rest.length;ct++)Zr(it,st.rest[ct],st,dt,!1)}function Zr(it,st,dt,ct,gt){if(st.widgets)for(var Nt=ml(dt),Rt=0,$t=st.widgets;Rt<$t.length;++Rt){var Jt=$t[Rt],fe=te("div",[Jt.node],"CodeMirror-linewidget"+(Jt.className?" "+Jt.className:""));Jt.handleMouseEvents||fe.setAttribute("cm-ignore-events","true"),Fs(Jt,fe,dt,ct),it.display.input.setUneditable(fe),gt&&Jt.above?Nt.insertBefore(fe,dt.gutter||dt.text):Nt.appendChild(fe),nr(Jt,"redraw")}}function Fs(it,st,dt,ct){if(it.noHScroll){(dt.alignable||(dt.alignable=[])).push(st);var gt=ct.wrapperWidth;st.style.left=ct.fixedPos+"px",it.coverGutter||(gt-=ct.gutterTotalWidth,st.style.paddingLeft=ct.gutterTotalWidth+"px"),st.style.width=gt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ct.gutterTotalWidth+"px"))}function zi(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Qe(document.body,it.node)){var dt="position: relative;";it.coverGutter&&(dt+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(dt+="width: "+st.display.wrapper.clientWidth+"px;"),re(st.display.measure,te("div",[it.node],null,dt))}return it.height=it.node.parentNode.offsetHeight}function $r(it,st){for(var dt=Sr(st);dt!=it.wrapper;dt=dt.parentNode)if(!dt||dt.nodeType==1&&dt.getAttribute("cm-ignore-events")=="true"||dt.parentNode==it.sizer&&dt!=it.mover)return!0}function Po(it){return it.lineSpace.offsetTop}function Ka(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Da(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=re(it.measure,te("pre","x","CodeMirror-line-like")),dt=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ct={left:parseInt(dt.paddingLeft),right:parseInt(dt.paddingRight)};return!isNaN(ct.left)&&!isNaN(ct.right)&&(it.cachedPaddingH=ct),ct}function Xs(it){return En-it.display.nativeBarWidth}function va(it){return it.display.scroller.clientWidth-Xs(it)-it.display.barWidth}function Ks(it){return it.display.scroller.clientHeight-Xs(it)-it.display.barHeight}function mh(it,st,dt){var ct=it.options.lineWrapping,gt=ct&&va(it);if(!st.measure.heights||ct&&st.measure.width!=gt){var Nt=st.measure.heights=[];if(ct){st.measure.width=gt;for(var Rt=st.text.firstChild.getClientRects(),$t=0;$t<Rt.length-1;$t++){var Jt=Rt[$t],fe=Rt[$t+1];Math.abs(Jt.bottom-fe.bottom)>2&&Nt.push((Jt.bottom+fe.top)/2-dt.top)}}Nt.push(dt.bottom-dt.top)}}function Ia(it,st,dt){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ct=0;ct<it.rest.length;ct++)if(it.rest[ct]==st)return{map:it.measure.maps[ct],cache:it.measure.caches[ct]};for(var gt=0;gt<it.rest.length;gt++)if(Ge(it.rest[gt])>dt)return{map:it.measure.maps[gt],cache:it.measure.caches[gt],before:!0}}function Qu(it,st){st=ki(st);var dt=Ge(st),ct=it.display.externalMeasured=new Ju(it.doc,st,dt);ct.lineN=dt;var gt=ct.built=nn(it,ct);return ct.text=gt.pre,re(it.display.lineMeasure,gt.pre),ct}function Zo(it,st,dt,ct){return xa(it,As(it,st),dt,ct)}function Wl(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[Zl(it,st)];var dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size)return dt}function As(it,st){var dt=Ge(st),ct=Wl(it,dt);ct&&!ct.text?ct=null:ct&&ct.changes&&(qu(it,ct,dt,mc(it)),it.curOp.forceUpdate=!0),ct||(ct=Qu(it,st));var gt=Ia(ct,st,dt);return{line:st,view:ct,rect:null,map:gt.map,cache:gt.cache,before:gt.before,hasHeights:!1}}function xa(it,st,dt,ct,gt){st.before&&(dt=-1);var Nt=dt+(ct||""),Rt;return st.cache.hasOwnProperty(Nt)?Rt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(mh(it,st.view,st.rect),st.hasHeights=!0),Rt=Es(it,st,dt,ct),Rt.bogus||(st.cache[Nt]=Rt)),{left:Rt.left,right:Rt.right,top:gt?Rt.rtop:Rt.top,bottom:gt?Rt.rbottom:Rt.bottom}}var Ga={left:0,right:0,top:0,bottom:0};function YA(it,st,dt){for(var ct,gt,Nt,Rt,$t,Jt,fe=0;fe<it.length;fe+=3)if($t=it[fe],Jt=it[fe+1],st<$t?(gt=0,Nt=1,Rt="left"):st<Jt?(gt=st-$t,Nt=gt+1):(fe==it.length-3||st==Jt&&it[fe+3]>st)&&(Nt=Jt-$t,gt=Nt-1,st>=Jt&&(Rt="right")),gt!=null){if(ct=it[fe+2],$t==Jt&&dt==(ct.insertLeft?"left":"right")&&(Rt=dt),dt=="left"&&gt==0)for(;fe&&it[fe-2]==it[fe-3]&&it[fe-1].insertLeft;)ct=it[(fe-=3)+2],Rt="left";if(dt=="right"&&gt==Jt-$t)for(;fe<it.length-3&&it[fe+3]==it[fe+4]&&!it[fe+5].insertLeft;)ct=it[(fe+=3)+2],Rt="right";break}return{node:ct,start:gt,end:Nt,collapse:Rt,coverStart:$t,coverEnd:Jt}}function dA(it,st){var dt=Ga;if(st=="left")for(var ct=0;ct<it.length&&(dt=it[ct]).left==dt.right;ct++);else for(var gt=it.length-1;gt>=0&&(dt=it[gt]).left==dt.right;gt--);return dt}function Es(it,st,dt,ct){var gt=YA(st.map,dt,ct),Nt=gt.node,Rt=gt.start,$t=gt.end,Jt=gt.collapse,fe;if(Nt.nodeType==3){for(var qe=0;qe<4;qe++){for(;Rt&&De(st.line.text.charAt(gt.coverStart+Rt));)--Rt;for(;gt.coverStart+$t<gt.coverEnd&&De(st.line.text.charAt(gt.coverStart+$t));)++$t;if(ge&&Ut<9&&Rt==0&&$t==gt.coverEnd-gt.coverStart?fe=Nt.parentNode.getBoundingClientRect():fe=dA(ce(Nt,Rt,$t).getClientRects(),ct),fe.left||fe.right||Rt==0)break;$t=Rt,Rt=Rt-1,Jt="right"}ge&&Ut<11&&(fe=vh(it.display.measure,fe))}else{Rt>0&&(Jt=ct="right");var we;it.options.lineWrapping&&(we=Nt.getClientRects()).length>1?fe=we[ct=="right"?we.length-1:0]:fe=Nt.getBoundingClientRect()}if(ge&&Ut<9&&!Rt&&(!fe||!fe.left&&!fe.right)){var yn=Nt.parentNode.getClientRects()[0];yn?fe={left:yn.left,right:yn.left+yh(it.display),top:yn.top,bottom:yn.bottom}:fe=Ga}for(var pn=fe.top-st.rect.top,Ai=fe.bottom-st.rect.top,vi=(pn+Ai)/2,Di=st.view.measure.heights,Yi=0;Yi<Di.length-1&&!(vi<Di[Yi]);Yi++);var Fr=Yi?Di[Yi-1]:0,mr=Di[Yi],Hr={left:(Jt=="right"?fe.right:fe.left)-st.rect.left,right:(Jt=="left"?fe.left:fe.right)-st.rect.left,top:Fr,bottom:mr};return!fe.left&&!fe.right&&(Hr.bogus=!0),it.options.singleCursorHeightPerLine||(Hr.rtop=pn,Hr.rbottom=Ai),Hr}function vh(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!_n(it))return st;var dt=screen.logicalXDPI/screen.deviceXDPI,ct=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*dt,right:st.right*dt,top:st.top*ct,bottom:st.bottom*ct}}function hl(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function ea(it){it.display.externalMeasure=null,Wt(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)hl(it.display.view[st])}function Ml(it){ea(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function na(){return Ae&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ps(){return Ae&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ds(it){var st=0;if(it.widgets)for(var dt=0;dt<it.widgets.length;++dt)it.widgets[dt].above&&(st+=zi(it.widgets[dt]));return st}function Ba(it,st,dt,ct,gt){if(!gt){var Nt=Ds(st);dt.top+=Nt,dt.bottom+=Nt}if(ct=="line")return dt;ct||(ct="local");var Rt=Wr(st);if(ct=="local"?Rt+=Po(it.display):Rt-=it.display.viewOffset,ct=="page"||ct=="window"){var $t=it.display.lineSpace.getBoundingClientRect();Rt+=$t.top+(ct=="window"?0:ps());var Jt=$t.left+(ct=="window"?0:na());dt.left+=Jt,dt.right+=Jt}return dt.top+=Rt,dt.bottom+=Rt,dt}function Gh(it,st,dt){if(dt=="div")return st;var ct=st.left,gt=st.top;if(dt=="page")ct-=na(),gt-=ps();else if(dt=="local"||!dt){var Nt=it.display.sizer.getBoundingClientRect();ct+=Nt.left,gt+=Nt.top}var Rt=it.display.lineSpace.getBoundingClientRect();return{left:ct-Rt.left,top:gt-Rt.top}}function kl(it,st,dt,ct,gt){return ct||(ct=Cn(it.doc,st.line)),Ba(it,ct,Zo(it,ct,st.ch,gt),dt)}function ia(it,st,dt,ct,gt,Nt){ct=ct||Cn(it.doc,st.line),gt||(gt=As(it,ct));function Rt(Ai,vi){var Di=xa(it,gt,Ai,vi?"right":"left",Nt);return vi?Di.left=Di.right:Di.right=Di.left,Ba(it,ct,Di,dt)}var $t=Kn(ct,it.doc.direction),Jt=st.ch,fe=st.sticky;if(Jt>=ct.text.length?(Jt=ct.text.length,fe="before"):Jt<=0&&(Jt=0,fe="after"),!$t)return Rt(fe=="before"?Jt-1:Jt,fe=="before");function qe(Ai,vi,Di){var Yi=$t[vi],Fr=Yi.level==1;return Rt(Di?Ai-1:Ai,Fr!=Di)}var we=Re($t,Jt,fe),yn=Bn,pn=qe(Jt,we,fe=="before");return yn!=null&&(pn.other=qe(Jt,yn,fe!="before")),pn}function pc(it,st){var dt=0;st=_e(it.doc,st),it.options.lineWrapping||(dt=yh(it.display)*st.ch);var ct=Cn(it.doc,st.line),gt=Wr(ct)+Po(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ct.height}}function LA(it,st,dt,ct,gt){var Nt=Ln(it,st,dt);return Nt.xRel=gt,ct&&(Nt.outside=ct),Nt}function Ou(it,st,dt){var ct=it.doc;if(dt+=it.display.viewOffset,dt<0)return LA(ct.first,0,null,-1,-1);var gt=Si(ct,dt),Nt=ct.first+ct.size-1;if(gt>Nt)return LA(ct.first+ct.size-1,Cn(ct,Nt).text.length,null,1,1);st<0&&(st=0);for(var Rt=Cn(ct,gt);;){var $t=Un(it,Rt,gt,st,dt),Jt=_a(Rt,$t.ch+($t.xRel>0||$t.outside>0?1:0));if(!Jt)return $t;var fe=Jt.find(1);if(fe.line==gt)return fe;Rt=Cn(ct,gt=fe.line)}}function vr(it,st,dt,ct){ct-=Ds(st);var gt=st.text.length,Nt=mn(function(Rt){return xa(it,dt,Rt-1).bottom<=ct},gt,0);return gt=mn(function(Rt){return xa(it,dt,Rt).top>ct},Nt,gt),{begin:Nt,end:gt}}function Pd(it,st,dt,ct){dt||(dt=As(it,st));var gt=Ba(it,st,xa(it,dt,ct),"line").top;return vr(it,st,dt,gt)}function Pe(it,st,dt,ct){return it.bottom<=dt?!1:it.top>dt?!0:(ct?it.left:it.right)>st}function Un(it,st,dt,ct,gt){gt-=Wr(st);var Nt=As(it,st),Rt=Ds(st),$t=0,Jt=st.text.length,fe=!0,qe=Kn(st,it.doc.direction);if(qe){var we=(it.options.lineWrapping?Fd:lf)(it,st,dt,Nt,qe,ct,gt);fe=we.level!=1,$t=fe?we.from:we.to-1,Jt=fe?we.to:we.from-1}var yn=null,pn=null,Ai=mn(function(vo){var pr=xa(it,Nt,vo);return pr.top+=Rt,pr.bottom+=Rt,Pe(pr,ct,gt,!1)?(pr.top<=gt&&pr.left<=ct&&(yn=vo,pn=pr),!0):!1},$t,Jt),vi,Di,Yi=!1;if(pn){var Fr=ct-pn.left<pn.right-ct,mr=Fr==fe;Ai=yn+(mr?0:1),Di=mr?"after":"before",vi=Fr?pn.left:pn.right}else{!fe&&(Ai==Jt||Ai==$t)&&Ai++,Di=Ai==0?"after":Ai==st.text.length?"before":xa(it,Nt,Ai-(fe?1:0)).bottom+Rt<=gt==fe?"after":"before";var Hr=ia(it,Ln(dt,Ai,Di),"line",st,Nt);vi=Hr.left,Yi=gt<Hr.top?-1:gt>=Hr.bottom?1:0}return Ai=on(st.text,Ai,1),LA(dt,Ai,Di,Yi,ct-vi)}function lf(it,st,dt,ct,gt,Nt,Rt){var $t=mn(function(we){var yn=gt[we],pn=yn.level!=1;return Pe(ia(it,Ln(dt,pn?yn.to:yn.from,pn?"before":"after"),"line",st,ct),Nt,Rt,!0)},0,gt.length-1),Jt=gt[$t];if($t>0){var fe=Jt.level!=1,qe=ia(it,Ln(dt,fe?Jt.from:Jt.to,fe?"after":"before"),"line",st,ct);Pe(qe,Nt,Rt,!0)&&qe.top>Rt&&(Jt=gt[$t-1])}return Jt}function Fd(it,st,dt,ct,gt,Nt,Rt){var $t=vr(it,st,ct,Rt),Jt=$t.begin,fe=$t.end;/\s/.test(st.text.charAt(fe-1))&&fe--;for(var qe=null,we=null,yn=0;yn<gt.length;yn++){var pn=gt[yn];if(!(pn.from>=fe||pn.to<=Jt)){var Ai=pn.level!=1,vi=xa(it,ct,Ai?Math.min(fe,pn.to)-1:Math.max(Jt,pn.from)).right,Di=vi<Nt?Nt-vi+1e9:vi-Nt;(!qe||we>Di)&&(qe=pn,we=Di)}}return qe||(qe=gt[gt.length-1]),qe.from<Jt&&(qe={from:Jt,to:qe.to,level:qe.level}),qe.to>fe&&(qe={from:qe.from,to:fe,level:qe.level}),qe}var rl;function $u(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(rl==null){rl=te("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)rl.appendChild(document.createTextNode("x")),rl.appendChild(te("br"));rl.appendChild(document.createTextNode("x"))}re(it.measure,rl);var dt=rl.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),Wt(it.measure),dt||1}function yh(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=te("span","xxxxxxxxxx"),dt=te("pre",[st],"CodeMirror-line-like");re(it.measure,dt);var ct=st.getBoundingClientRect(),gt=(ct.right-ct.left)/10;return gt>2&&(it.cachedCharWidth=gt),gt||10}function mc(it){for(var st=it.display,dt={},ct={},gt=st.gutters.clientLeft,Nt=st.gutters.firstChild,Rt=0;Nt;Nt=Nt.nextSibling,++Rt){var $t=it.display.gutterSpecs[Rt].className;dt[$t]=Nt.offsetLeft+Nt.clientLeft+gt,ct[$t]=Nt.clientWidth}return{fixedPos:fA(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ct,wrapperWidth:st.wrapper.clientWidth}}function fA(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Js(it){var st=$u(it.display),dt=it.options.lineWrapping,ct=dt&&Math.max(5,it.display.scroller.clientWidth/yh(it.display)-3);return function(gt){if(ln(it.doc,gt))return 0;var Nt=0;if(gt.widgets)for(var Rt=0;Rt<gt.widgets.length;Rt++)gt.widgets[Rt].height&&(Nt+=gt.widgets[Rt].height);return dt?Nt+(Math.ceil(gt.text.length/ct)||1)*st:Nt+st}}function Gr(it){var st=it.doc,dt=Js(it);st.iter(function(ct){var gt=dt(ct);gt!=ct.height&&On(ct,gt)})}function cl(it,st,dt,ct){var gt=it.display;if(!dt&&Sr(st).getAttribute("cm-not-content")=="true")return null;var Nt,Rt,$t=gt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-$t.left,Rt=st.clientY-$t.top}catch(we){return null}var Jt=Ou(it,Nt,Rt),fe;if(ct&&Jt.xRel>0&&(fe=Cn(it.doc,Jt.line).text).length==Jt.ch){var qe=ie(fe,fe.length,it.options.tabSize)-fe.length;Jt=Ln(Jt.line,Math.max(0,Math.round((Nt-Da(it.display).left)/yh(it.display))-qe))}return Jt}function Zl(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var dt=it.display.view,ct=0;ct<dt.length;ct++)if(st-=dt[ct].size,st<0)return ct}function Us(it,st,dt,ct){st==null&&(st=it.doc.first),dt==null&&(dt=it.doc.first+it.doc.size),ct||(ct=0);var gt=it.display;if(ct&&dt<gt.viewTo&&(gt.updateLineNumbers==null||gt.updateLineNumbers>st)&&(gt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=gt.viewTo)cn&&bi(it.doc,st)<gt.viewTo&&ya(it);else if(dt<=gt.viewFrom)cn&&hr(it.doc,dt+ct)>gt.viewFrom?ya(it):(gt.viewFrom+=ct,gt.viewTo+=ct);else if(st<=gt.viewFrom&&dt>=gt.viewTo)ya(it);else if(st<=gt.viewFrom){var Nt=vl(it,dt,dt+ct,1);Nt?(gt.view=gt.view.slice(Nt.index),gt.viewFrom=Nt.lineN,gt.viewTo+=ct):ya(it)}else if(dt>=gt.viewTo){var Rt=vl(it,st,st,-1);Rt?(gt.view=gt.view.slice(0,Rt.index),gt.viewTo=Rt.lineN):ya(it)}else{var $t=vl(it,st,st,-1),Jt=vl(it,dt,dt+ct,1);$t&&Jt?(gt.view=gt.view.slice(0,$t.index).concat(us(it,$t.lineN,Jt.lineN)).concat(gt.view.slice(Jt.index)),gt.viewTo+=ct):ya(it)}var fe=gt.externalMeasured;fe&&(dt<fe.lineN?fe.lineN+=ct:st<fe.lineN+fe.size&&(gt.externalMeasured=null))}function Fo(it,st,dt){it.curOp.viewChanged=!0;var ct=it.display,gt=it.display.externalMeasured;if(gt&&st>=gt.lineN&&st<gt.lineN+gt.size&&(ct.externalMeasured=null),!(st<ct.viewFrom||st>=ct.viewTo)){var Nt=ct.view[Zl(it,st)];if(Nt.node!=null){var Rt=Nt.changes||(Nt.changes=[]);We(Rt,dt)==-1&&Rt.push(dt)}}}function ya(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function vl(it,st,dt,ct){var gt=Zl(it,st),Nt,Rt=it.display.view;if(!cn||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var $t=it.display.viewFrom,Jt=0;Jt<gt;Jt++)$t+=Rt[Jt].size;if($t!=st){if(ct>0){if(gt==Rt.length-1)return null;Nt=$t+Rt[gt].size-st,gt++}else Nt=$t-st;st+=Nt,dt+=Nt}for(;bi(it.doc,dt)!=dt;){if(gt==(ct<0?0:Rt.length-1))return null;dt+=ct*Rt[gt-(ct<0?1:0)].size,gt+=ct}return{index:gt,lineN:dt}}function Ls(it,st,dt){var ct=it.display,gt=ct.view;gt.length==0||st>=ct.viewTo||dt<=ct.viewFrom?(ct.view=us(it,st,dt),ct.viewFrom=st):(ct.viewFrom>st?ct.view=us(it,st,ct.viewFrom).concat(ct.view):ct.viewFrom<st&&(ct.view=ct.view.slice(Zl(it,st))),ct.viewFrom=st,ct.viewTo<dt?ct.view=ct.view.concat(us(it,ct.viewTo,dt)):ct.viewTo>dt&&(ct.view=ct.view.slice(0,Zl(it,dt)))),ct.viewTo=dt}function Yl(it){for(var st=it.display.view,dt=0,ct=0;ct<st.length;ct++){var gt=st[ct];!gt.hidden&&(!gt.node||gt.changes)&&++dt}return dt}function La(it){it.display.input.showSelection(it.display.input.prepareSelection())}function MA(it,st){st===void 0&&(st=!0);for(var dt=it.doc,ct={},gt=ct.cursors=document.createDocumentFragment(),Nt=ct.selection=document.createDocumentFragment(),Rt=0;Rt<dt.sel.ranges.length;Rt++)if(!(!st&&Rt==dt.sel.primIndex)){var $t=dt.sel.ranges[Rt];if(!($t.from().line>=it.display.viewTo||$t.to().line<it.display.viewFrom)){var Jt=$t.empty();(Jt||it.options.showCursorWhenSelecting)&&Jo(it,$t.head,gt),Jt||Oo(it,$t,Nt)}}return ct}function Jo(it,st,dt){var ct=ia(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),gt=dt.appendChild(te("div","\xA0","CodeMirror-cursor"));if(gt.style.left=ct.left+"px",gt.style.top=ct.top+"px",gt.style.height=Math.max(0,ct.bottom-ct.top)*it.options.cursorHeight+"px",ct.other){var Nt=dt.appendChild(te("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Nt.style.display="",Nt.style.left=ct.other.left+"px",Nt.style.top=ct.other.top+"px",Nt.style.height=(ct.other.bottom-ct.other.top)*.85+"px"}}function ol(it,st){return it.top-st.top||it.left-st.left}function Oo(it,st,dt){var ct=it.display,gt=it.doc,Nt=document.createDocumentFragment(),Rt=Da(it.display),$t=Rt.left,Jt=Math.max(ct.sizerWidth,va(it)-ct.sizer.offsetLeft)-Rt.right,fe=gt.direction=="ltr";function qe(mr,Hr,vo,pr){Hr<0&&(Hr=0),Hr=Math.round(Hr),pr=Math.round(pr),Nt.appendChild(te("div",null,"CodeMirror-selected","position: absolute; left: "+mr+`px;
top: `+Hr+"px; width: "+(vo==null?Jt-mr:vo)+`px;
height: `+(pr-Hr)+"px"))}function we(mr,Hr,vo){var pr=Cn(gt,mr),Qo=pr.text.length,ca,ll;function Pa($a,eu){return kl(it,Ln(mr,$a),"div",pr,eu)}function fu($a,eu,Bl){var dr=Pd(it,pr,null,$a),ls=eu=="ltr"==(Bl=="after")?"left":"right",da=Bl=="after"?dr.begin:dr.end-(/\s/.test(pr.text.charAt(dr.end-1))?2:1);return Pa(da,ls)[ls]}var gl=Kn(pr,gt.direction);return $e(gl,Hr||0,vo==null?Qo:vo,function($a,eu,Bl,dr){var ls=Bl=="ltr",da=Pa($a,ls?"left":"right"),$s=Pa(eu-1,ls?"right":"left"),Cl=Hr==null&&$a==0,fs=vo==null&&eu==Qo,Do=dr==0,gu=!gl||dr==gl.length-1;if($s.top-da.top<=3){var Ua=(fe?Cl:fs)&&Do,tc=(fe?fs:Cl)&&gu,ju=Ua?$t:(ls?da:$s).left,Ul=tc?Jt:(ls?$s:da).right;qe(ju,da.top,Ul-ju,da.bottom)}else{var pu,js,ul,rh;ls?(pu=fe&&Cl&&Do?$t:da.left,js=fe?Jt:fu($a,Bl,"before"),ul=fe?$t:fu(eu,Bl,"after"),rh=fe&&fs&&gu?Jt:$s.right):(pu=fe?fu($a,Bl,"before"):$t,js=!fe&&Cl&&Do?Jt:da.right,ul=!fe&&fs&&gu?$t:$s.left,rh=fe?fu(eu,Bl,"after"):Jt),qe(pu,da.top,js-pu,da.bottom),da.bottom<$s.top&&qe($t,da.bottom,null,$s.top),qe(ul,$s.top,rh-ul,$s.bottom)}(!ca||ol(da,ca)<0)&&(ca=da),ol($s,ca)<0&&(ca=$s),(!ll||ol(da,ll)<0)&&(ll=da),ol($s,ll)<0&&(ll=$s)}),{start:ca,end:ll}}var yn=st.from(),pn=st.to();if(yn.line==pn.line)we(yn.line,yn.ch,pn.ch);else{var Ai=Cn(gt,yn.line),vi=Cn(gt,pn.line),Di=ki(Ai)==ki(vi),Yi=we(yn.line,yn.ch,Di?Ai.text.length+1:null).end,Fr=we(pn.line,Di?0:null,pn.ch).start;Di&&(Yi.top<Fr.top-2?(qe(Yi.right,Yi.top,null,Yi.bottom),qe($t,Fr.top,Fr.left,Fr.bottom)):qe(Yi.right,Yi.top,Fr.left-Yi.right,Yi.bottom)),Yi.bottom<Fr.top&&qe($t,Yi.bottom,null,Fr.top)}dt.appendChild(Nt)}function Bs(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var dt=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||wh(it),st.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function Qs(it){it.state.focused||(it.display.input.focus(),ts(it))}function ra(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,wh(it))},100)}function ts(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(xi(it,"focus",it,st),it.state.focused=!0,He(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),jt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Bs(it))}function wh(it,st){it.state.delayingBlurEvent||(it.state.focused&&(xi(it,"blur",it,st),it.state.focused=!1,Ht(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function _r(it){for(var st=it.display,dt=st.lineDiv.offsetTop,ct=0;ct<st.view.length;ct++){var gt=st.view[ct],Nt=it.options.lineWrapping,Rt=void 0,$t=0;if(!gt.hidden){if(ge&&Ut<8){var Jt=gt.node.offsetTop+gt.node.offsetHeight;Rt=Jt-dt,dt=Jt}else{var fe=gt.node.getBoundingClientRect();Rt=fe.bottom-fe.top,!Nt&&gt.text.firstChild&&($t=gt.text.firstChild.getBoundingClientRect().right-fe.left-1)}var qe=gt.line.height-Rt;if((qe>.005||qe<-.005)&&(On(gt.line,Rt),Sh(gt.line),gt.rest))for(var we=0;we<gt.rest.length;we++)Sh(gt.rest[we]);if($t>it.display.sizerWidth){var yn=Math.ceil($t/yh(it.display));yn>it.display.maxLineLength&&(it.display.maxLineLength=yn,it.display.maxLine=gt.line,it.display.maxLineChanged=!0)}}}}function Sh(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var dt=it.widgets[st],ct=dt.node.parentNode;ct&&(dt.height=ct.offsetHeight)}}function Ho(it,st,dt){var ct=dt&&dt.top!=null?Math.max(0,dt.top):it.scroller.scrollTop;ct=Math.floor(ct-Po(it));var gt=dt&&dt.bottom!=null?dt.bottom:ct+it.wrapper.clientHeight,Nt=Si(st,ct),Rt=Si(st,gt);if(dt&&dt.ensure){var $t=dt.ensure.from.line,Jt=dt.ensure.to.line;$t<Nt?(Nt=$t,Rt=Si(st,Wr(Cn(st,$t))+it.wrapper.clientHeight)):Math.min(Jt,st.lastLine())>=Rt&&(Nt=Si(st,Wr(Cn(st,Jt))-it.wrapper.clientHeight),Rt=Jt)}return{from:Nt,to:Math.max(Rt,Nt+1)}}function uf(it,st){if(!wi(it,"scrollCursorIntoView")){var dt=it.display,ct=dt.sizer.getBoundingClientRect(),gt=null;if(st.top+ct.top<0?gt=!0:st.bottom+ct.top>(window.innerHeight||document.documentElement.clientHeight)&&(gt=!1),gt!=null&&!Ie){var Nt=te("div","\u200B",null,`position: absolute;
top: `+(st.top-dt.viewOffset-Po(it.display))+`px;
height: `+(st.bottom-st.top+Xs(it)+dt.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Nt),Nt.scrollIntoView(gt),it.display.lineSpace.removeChild(Nt)}}}function kA(it,st,dt,ct){ct==null&&(ct=0);var gt;!it.options.lineWrapping&&st==dt&&(st=st.ch?Ln(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,dt=st.sticky=="before"?Ln(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Rt=!1,$t=ia(it,st),Jt=!dt||dt==st?$t:ia(it,dt);gt={left:Math.min($t.left,Jt.left),top:Math.min($t.top,Jt.top)-ct,right:Math.max($t.left,Jt.left),bottom:Math.max($t.bottom,Jt.bottom)+ct};var fe=Ed(it,gt),qe=it.doc.scrollTop,we=it.doc.scrollLeft;if(fe.scrollTop!=null&&(me(it,fe.scrollTop),Math.abs(it.doc.scrollTop-qe)>1&&(Rt=!0)),fe.scrollLeft!=null&&(Be(it,fe.scrollLeft),Math.abs(it.doc.scrollLeft-we)>1&&(Rt=!0)),!Rt)break}return gt}function vc(it,st){var dt=Ed(it,st);dt.scrollTop!=null&&me(it,dt.scrollTop),dt.scrollLeft!=null&&Be(it,dt.scrollLeft)}function Ed(it,st){var dt=it.display,ct=$u(it.display);st.top<0&&(st.top=0);var gt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Nt=Ks(it),Rt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var $t=it.doc.height+Ka(dt),Jt=st.top<ct,fe=st.bottom>$t-ct;if(st.top<gt)Rt.scrollTop=Jt?0:st.top;else if(st.bottom>gt+Nt){var qe=Math.min(st.top,(fe?$t:st.bottom)-Nt);qe!=gt&&(Rt.scrollTop=qe)}var we=it.options.fixedGutter?0:dt.gutters.offsetWidth,yn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-we,pn=va(it)-dt.gutters.offsetWidth,Ai=st.right-st.left>pn;return Ai&&(st.right=st.left+pn),st.left<10?Rt.scrollLeft=0:st.left<yn?Rt.scrollLeft=Math.max(0,st.left+we-(Ai?0:10)):st.right>pn+yn-3&&(Rt.scrollLeft=st.right+(Ai?0:10)-pn),Rt}function Qc(it,st){st!=null&&(TA(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function bA(it){TA(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function tA(it,st,dt){(st!=null||dt!=null)&&TA(it),st!=null&&(it.curOp.scrollLeft=st),dt!=null&&(it.curOp.scrollTop=dt)}function ss(it,st){TA(it),it.curOp.scrollToPos=st}function TA(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var dt=pc(it,st.from),ct=pc(it,st.to);Zt(it,dt,ct,st.margin)}}function Zt(it,st,dt,ct){var gt=Ed(it,{left:Math.min(st.left,dt.left),top:Math.min(st.top,dt.top)-ct,right:Math.max(st.right,dt.right),bottom:Math.max(st.bottom,dt.bottom)+ct});tA(it,gt.scrollLeft,gt.scrollTop)}function me(it,st){Math.abs(it.doc.scrollTop-st)<2||(xt||Pr(it,{top:st}),Se(it,st,!0),xt&&Pr(it),xo(it,100))}function Se(it,st,dt){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!dt)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function Be(it,st,dt,ct){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((dt?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ct)&&(it.doc.scrollLeft=st,jo(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function Ze(it){var st=it.display,dt=st.gutters.offsetWidth,ct=Math.round(it.doc.height+Ka(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?dt:0,docHeight:ct,scrollHeight:ct+Xs(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:dt}}var an=function(it,st,dt){this.cm=dt;var ct=this.vert=te("div",[te("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),gt=this.horiz=te("div",[te("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ct.tabIndex=gt.tabIndex=-1,it(ct),it(gt),ti(ct,"scroll",function(){ct.clientHeight&&st(ct.scrollTop,"vertical")}),ti(gt,"scroll",function(){gt.clientWidth&&st(gt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ge&&Ut<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};an.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ct=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=st?ct+"px":"0";var gt=it.viewHeight-(st?ct:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+gt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=dt?ct+"px":"0",this.horiz.style.left=it.barLeft+"px";var Nt=it.viewWidth-it.barLeft-(dt?ct:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Nt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ct==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:dt?ct:0,bottom:st?ct:0}},an.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},an.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},an.prototype.zeroWidthHack=function(){var it=ut&&!de?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new zt,this.disableVert=new zt},an.prototype.enableZeroWidthBar=function(it,st,dt){it.style.pointerEvents="auto";function ct(){var gt=it.getBoundingClientRect(),Nt=dt=="vert"?document.elementFromPoint(gt.right-1,(gt.top+gt.bottom)/2):document.elementFromPoint((gt.right+gt.left)/2,gt.bottom-1);Nt!=it?it.style.pointerEvents="none":st.set(1e3,ct)}st.set(1e3,ct)},an.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var hn=function(){};hn.prototype.update=function(){return{bottom:0,right:0}},hn.prototype.setScrollLeft=function(){},hn.prototype.setScrollTop=function(){},hn.prototype.clear=function(){};function xn(it,st){st||(st=Ze(it));var dt=it.display.barWidth,ct=it.display.barHeight;Zn(it,st);for(var gt=0;gt<4&&dt!=it.display.barWidth||ct!=it.display.barHeight;gt++)dt!=it.display.barWidth&&it.options.lineWrapping&&_r(it),Zn(it,Ze(it)),dt=it.display.barWidth,ct=it.display.barHeight}function Zn(it,st){var dt=it.display,ct=dt.scrollbars.update(st);dt.sizer.style.paddingRight=(dt.barWidth=ct.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ct.bottom)+"px",dt.heightForcer.style.borderBottom=ct.bottom+"px solid transparent",ct.right&&ct.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ct.bottom+"px",dt.scrollbarFiller.style.width=ct.right+"px"):dt.scrollbarFiller.style.display="",ct.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ct.bottom+"px",dt.gutterFiller.style.width=st.gutterWidth+"px"):dt.gutterFiller.style.display=""}var Rn={native:an,null:hn};function gi(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ht(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Rn[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),ti(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,dt){dt=="horizontal"?Be(it,st):me(it,st)},it),it.display.scrollbars.addClass&&He(it.display.wrapper,it.display.scrollbars.addClass)}var zn=0;function oi(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.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:++zn},Vr(it.curOp)}function ni(it){var st=it.curOp;st&&os(st,function(dt){for(var ct=0;ct<dt.ops.length;ct++)dt.ops[ct].cm.curOp=null;Ci(dt)})}function Ci(it){for(var st=it.ops,dt=0;dt<st.length;dt++)Vi(st[dt]);for(var ct=0;ct<st.length;ct++)gr(st[ct]);for(var gt=0;gt<st.length;gt++)Mr(st[gt]);for(var Nt=0;Nt<st.length;Nt++)Ni(st[Nt]);for(var Rt=0;Rt<st.length;Rt++)ar(st[Rt])}function Vi(it){var st=it.cm,dt=st.display;Cs(st),it.updateMaxLine&&Go(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<dt.viewFrom||it.scrollToPos.to.line>=dt.viewTo)||dt.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new ko(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function gr(it){it.updatedDisplay=it.mustUpdate&&no(it.cm,it.update)}function Mr(it){var st=it.cm,dt=st.display;it.updatedDisplay&&_r(st),it.barMeasure=Ze(st),dt.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Zo(st,dt.maxLine,dt.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(dt.scroller.clientWidth,dt.sizer.offsetLeft+it.adjustWidthTo+Xs(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-va(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Ni(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&Be(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var dt=it.focus&&it.focus==je();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,dt),(it.updatedDisplay||it.startHeight!=st.doc.height)&&xn(st,it.barMeasure),it.updatedDisplay&&ho(st,it.barMeasure),it.selectionChanged&&Bs(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),dt&&Qs(it.cm)}function ar(it){var st=it.cm,dt=st.display,ct=st.doc;if(it.updatedDisplay&&Hi(st,it.update),dt.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(dt.wheelStartX=dt.wheelStartY=null),it.scrollTop!=null&&Se(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Be(st,it.scrollLeft,!0,!0),it.scrollToPos){var gt=kA(st,_e(ct,it.scrollToPos.from),_e(ct,it.scrollToPos.to),it.scrollToPos.margin);uf(st,gt)}var Nt=it.maybeHiddenMarkers,Rt=it.maybeUnhiddenMarkers;if(Nt)for(var $t=0;$t<Nt.length;++$t)Nt[$t].lines.length||xi(Nt[$t],"hide");if(Rt)for(var Jt=0;Jt<Rt.length;++Jt)Rt[Jt].lines.length&&xi(Rt[Jt],"unhide");dt.wrapper.offsetHeight&&(ct.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&xi(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function _i(it,st){if(it.curOp)return st();oi(it);try{return st()}finally{ni(it)}}function Cr(it,st){return function(){if(it.curOp)return st.apply(it,arguments);oi(it);try{return st.apply(it,arguments)}finally{ni(it)}}}function eo(it){return function(){if(this.curOp)return it.apply(this,arguments);oi(this);try{return it.apply(this,arguments)}finally{ni(this)}}}function Br(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);oi(st);try{return it.apply(this,arguments)}finally{ni(st)}}}function xo(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Yn(Yr,it))}function Yr(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ct=Ji(it,st.highlightFrontier),gt=[];st.iter(ct.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Nt){if(ct.line>=it.display.viewFrom){var Rt=Nt.styles,$t=Nt.text.length>it.options.maxHighlightLength?fi(st.mode,ct.state):null,Jt=si(it,Nt,ct,!0);$t&&(ct.state=$t),Nt.styles=Jt.styles;var fe=Nt.styleClasses,qe=Jt.classes;qe?Nt.styleClasses=qe:fe&&(Nt.styleClasses=null);for(var we=!Rt||Rt.length!=Nt.styles.length||fe!=qe&&(!fe||!qe||fe.bgClass!=qe.bgClass||fe.textClass!=qe.textClass),yn=0;!we&&yn<Rt.length;++yn)we=Rt[yn]!=Nt.styles[yn];we&&gt.push(ct.line),Nt.stateAfter=ct.save(),ct.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&Te(it,Nt.text,ct),Nt.stateAfter=ct.line%5==0?ct.save():null,ct.nextLine();if(+new Date>dt)return xo(it,it.options.workDelay),!0}),st.highlightFrontier=ct.line,st.modeFrontier=Math.max(st.modeFrontier,ct.line),gt.length&&_i(it,function(){for(var Nt=0;Nt<gt.length;Nt++)Fo(it,gt[Nt],"text")})}}var ko=function(it,st,dt){var ct=it.display;this.viewport=st,this.visible=Ho(ct,it.doc,st),this.editorIsHidden=!ct.wrapper.offsetWidth,this.wrapperHeight=ct.wrapper.clientHeight,this.wrapperWidth=ct.wrapper.clientWidth,this.oldDisplayWidth=va(it),this.force=dt,this.dims=mc(it),this.events=[]};ko.prototype.signal=function(it,st){ji(it,st)&&this.events.push(arguments)},ko.prototype.finish=function(){for(var it=0;it<this.events.length;it++)xi.apply(null,this.events[it])};function Cs(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=Xs(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Xs(it)+"px",st.scrollbarsClipped=!0)}function To(it){if(it.hasFocus())return null;var st=je();if(!st||!Qe(it.display.lineDiv,st))return null;var dt={activeElt:st};if(window.getSelection){var ct=window.getSelection();ct.anchorNode&&ct.extend&&Qe(it.display.lineDiv,ct.anchorNode)&&(dt.anchorNode=ct.anchorNode,dt.anchorOffset=ct.anchorOffset,dt.focusNode=ct.focusNode,dt.focusOffset=ct.focusOffset)}return dt}function to(it){if(!(!it||!it.activeElt||it.activeElt==je())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Qe(document.body,it.anchorNode)&&Qe(document.body,it.focusNode))){var st=window.getSelection(),dt=document.createRange();dt.setEnd(it.anchorNode,it.anchorOffset),dt.collapse(!1),st.removeAllRanges(),st.addRange(dt),st.extend(it.focusNode,it.focusOffset)}}function no(it,st){var dt=it.display,ct=it.doc;if(st.editorIsHidden)return ya(it),!1;if(!st.force&&st.visible.from>=dt.viewFrom&&st.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&Yl(it)==0)return!1;mo(it)&&(ya(it),st.dims=mc(it));var gt=ct.first+ct.size,Nt=Math.max(st.visible.from-it.options.viewportMargin,ct.first),Rt=Math.min(gt,st.visible.to+it.options.viewportMargin);dt.viewFrom<Nt&&Nt-dt.viewFrom<20&&(Nt=Math.max(ct.first,dt.viewFrom)),dt.viewTo>Rt&&dt.viewTo-Rt<20&&(Rt=Math.min(gt,dt.viewTo)),cn&&(Nt=bi(it.doc,Nt),Rt=hr(it.doc,Rt));var $t=Nt!=dt.viewFrom||Rt!=dt.viewTo||dt.lastWrapHeight!=st.wrapperHeight||dt.lastWrapWidth!=st.wrapperWidth;Ls(it,Nt,Rt),dt.viewOffset=Wr(Cn(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Jt=Yl(it);if(!$t&&Jt==0&&!st.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var fe=To(it);return Jt>4&&(dt.lineDiv.style.display="none"),lo(it,dt.updateLineNumbers,st.dims),Jt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,to(fe),Wt(dt.cursorDiv),Wt(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,$t&&(dt.lastWrapHeight=st.wrapperHeight,dt.lastWrapWidth=st.wrapperWidth,xo(it,400)),dt.updateLineNumbers=null,!0}function Hi(it,st){for(var dt=st.viewport,ct=!0;;ct=!1){if(!ct||!it.options.lineWrapping||st.oldDisplayWidth==va(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Ka(it.display)-Ks(it),dt.top)}),st.visible=Ho(it.display,it.doc,dt),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ct&&(st.visible=Ho(it.display,it.doc,dt));if(!no(it,st))break;_r(it);var gt=Ze(it);La(it),xn(it,gt),ho(it,gt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Pr(it,st){var dt=new ko(it,st);if(no(it,dt)){_r(it),Hi(it,dt);var ct=Ze(it);La(it),xn(it,ct),ho(it,ct),dt.finish()}}function lo(it,st,dt){var ct=it.display,gt=it.options.lineNumbers,Nt=ct.lineDiv,Rt=Nt.firstChild;function $t(Ai){var vi=Ai.nextSibling;return jt&&ut&&it.display.currentWheelTarget==Ai?Ai.style.display="none":Ai.parentNode.removeChild(Ai),vi}for(var Jt=ct.view,fe=ct.viewFrom,qe=0;qe<Jt.length;qe++){var we=Jt[qe];if(!we.hidden)if(!we.node||we.node.parentNode!=Nt){var yn=ZA(it,we,fe,dt);Nt.insertBefore(yn,Rt)}else{for(;Rt!=we.node;)Rt=$t(Rt);var pn=gt&&st!=null&&st<=fe&&we.lineNumber;we.changes&&(We(we.changes,"gutter")>-1&&(pn=!1),qu(it,we,fe,dt)),pn&&(Wt(we.lineNumber),we.lineNumber.appendChild(document.createTextNode(ur(it.options,fe)))),Rt=we.node.nextSibling}fe+=we.size}for(;Rt;)Rt=$t(Rt)}function Ao(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function ho(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+Xs(it)+"px"}function jo(it){var st=it.display,dt=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ct=fA(st)-st.scroller.scrollLeft+it.doc.scrollLeft,gt=st.gutters.offsetWidth,Nt=ct+"px",Rt=0;Rt<dt.length;Rt++)if(!dt[Rt].hidden){it.options.fixedGutter&&(dt[Rt].gutter&&(dt[Rt].gutter.style.left=Nt),dt[Rt].gutterBackground&&(dt[Rt].gutterBackground.style.left=Nt));var $t=dt[Rt].alignable;if($t)for(var Jt=0;Jt<$t.length;Jt++)$t[Jt].style.left=Nt}it.options.fixedGutter&&(st.gutters.style.left=ct+gt+"px")}}function mo(it){if(!it.options.lineNumbers)return!1;var st=it.doc,dt=ur(it.options,st.first+st.size-1),ct=it.display;if(dt.length!=ct.lineNumChars){var gt=ct.measure.appendChild(te("div",[te("div",dt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Nt=gt.firstChild.offsetWidth,Rt=gt.offsetWidth-Nt;return ct.lineGutter.style.width="",ct.lineNumInnerWidth=Math.max(Nt,ct.lineGutter.offsetWidth-Rt)+1,ct.lineNumWidth=ct.lineNumInnerWidth+Rt,ct.lineNumChars=ct.lineNumInnerWidth?dt.length:-1,ct.lineGutter.style.width=ct.lineNumWidth+"px",Ao(it.display),!0}return!1}function hs(it,st){for(var dt=[],ct=!1,gt=0;gt<it.length;gt++){var Nt=it[gt],Rt=null;if(typeof Nt!="string"&&(Rt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ct=!0;else continue;dt.push({className:Nt,style:Rt})}return st&&!ct&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function Ss(it){var st=it.gutters,dt=it.gutterSpecs;Wt(st),it.lineGutter=null;for(var ct=0;ct<dt.length;++ct){var gt=dt[ct],Nt=gt.className,Rt=gt.style,$t=st.appendChild(te("div",null,"CodeMirror-gutter "+Nt));Rt&&($t.style.cssText=Rt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=$t,$t.style.width=(it.lineNumWidth||1)+"px")}st.style.display=dt.length?"":"none",Ao(it)}function Os(it){Ss(it.display),Us(it),jo(it)}function ja(it,st,dt,ct){var gt=this;this.input=dt,gt.scrollbarFiller=te("div",null,"CodeMirror-scrollbar-filler"),gt.scrollbarFiller.setAttribute("cm-not-content","true"),gt.gutterFiller=te("div",null,"CodeMirror-gutter-filler"),gt.gutterFiller.setAttribute("cm-not-content","true"),gt.lineDiv=Ce("div",null,"CodeMirror-code"),gt.selectionDiv=te("div",null,null,"position: relative; z-index: 1"),gt.cursorDiv=te("div",null,"CodeMirror-cursors"),gt.measure=te("div",null,"CodeMirror-measure"),gt.lineMeasure=te("div",null,"CodeMirror-measure"),gt.lineSpace=Ce("div",[gt.measure,gt.lineMeasure,gt.selectionDiv,gt.cursorDiv,gt.lineDiv],null,"position: relative; outline: none");var Nt=Ce("div",[gt.lineSpace],"CodeMirror-lines");gt.mover=te("div",[Nt],null,"position: relative"),gt.sizer=te("div",[gt.mover],"CodeMirror-sizer"),gt.sizerWidth=null,gt.heightForcer=te("div",null,null,"position: absolute; height: "+En+"px; width: 1px;"),gt.gutters=te("div",null,"CodeMirror-gutters"),gt.lineGutter=null,gt.scroller=te("div",[gt.sizer,gt.heightForcer,gt.gutters],"CodeMirror-scroll"),gt.scroller.setAttribute("tabIndex","-1"),gt.wrapper=te("div",[gt.scrollbarFiller,gt.gutterFiller,gt.scroller],"CodeMirror"),ge&&Ut<8&&(gt.gutters.style.zIndex=-1,gt.scroller.style.paddingRight=0),!jt&&!(xt&&et)&&(gt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(gt.wrapper):it(gt.wrapper)),gt.viewFrom=gt.viewTo=st.first,gt.reportedViewFrom=gt.reportedViewTo=st.first,gt.view=[],gt.renderedView=null,gt.externalMeasured=null,gt.viewOffset=0,gt.lastWrapHeight=gt.lastWrapWidth=0,gt.updateLineNumbers=null,gt.nativeBarWidth=gt.barHeight=gt.barWidth=0,gt.scrollbarsClipped=!1,gt.lineNumWidth=gt.lineNumInnerWidth=gt.lineNumChars=null,gt.alignWidgets=!1,gt.cachedCharWidth=gt.cachedTextHeight=gt.cachedPaddingH=null,gt.maxLine=null,gt.maxLineLength=0,gt.maxLineChanged=!1,gt.wheelDX=gt.wheelDY=gt.wheelStartX=gt.wheelStartY=null,gt.shift=!1,gt.selForContextMenu=null,gt.activeTouch=null,gt.gutterSpecs=hs(ct.gutters,ct.lineNumbers),Ss(gt),dt.init(gt)}var oa=0,Co=null;ge?Co=-.53:xt?Co=15:Ae?Co=-.7:ke&&(Co=-1/3);function zo(it){var st=it.wheelDeltaX,dt=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),dt==null&&it.detail&&it.axis==it.VERTICAL_AXIS?dt=it.detail:dt==null&&(dt=it.wheelDelta),{x:st,y:dt}}function Yo(it){var st=zo(it);return st.x*=Co,st.y*=Co,st}function cs(it,st){var dt=zo(st),ct=dt.x,gt=dt.y,Nt=it.display,Rt=Nt.scroller,$t=Rt.scrollWidth>Rt.clientWidth,Jt=Rt.scrollHeight>Rt.clientHeight;if(ct&&$t||gt&&Jt){if(gt&&ut&&jt){t:for(var fe=st.target,qe=Nt.view;fe!=Rt;fe=fe.parentNode)for(var we=0;we<qe.length;we++)if(qe[we].node==fe){it.display.currentWheelTarget=fe;break t}}if(ct&&!xt&&!se&&Co!=null){gt&&Jt&&me(it,Math.max(0,Rt.scrollTop+gt*Co)),Be(it,Math.max(0,Rt.scrollLeft+ct*Co)),(!gt||gt&&Jt)&&xr(st),Nt.wheelStartX=null;return}if(gt&&Co!=null){var yn=gt*Co,pn=it.doc.scrollTop,Ai=pn+Nt.wrapper.clientHeight;yn<0?pn=Math.max(0,pn+yn-50):Ai=Math.min(it.doc.height,Ai+yn+50),Pr(it,{top:pn,bottom:Ai})}oa<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Rt.scrollLeft,Nt.wheelStartY=Rt.scrollTop,Nt.wheelDX=ct,Nt.wheelDY=gt,setTimeout(function(){if(Nt.wheelStartX!=null){var vi=Rt.scrollLeft-Nt.wheelStartX,Di=Rt.scrollTop-Nt.wheelStartY,Yi=Di&&Nt.wheelDY&&Di/Nt.wheelDY||vi&&Nt.wheelDX&&vi/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,Yi&&(Co=(Co*oa+Yi)/(oa+1),++oa)}},200)):(Nt.wheelDX+=ct,Nt.wheelDY+=gt))}}var Ro=function(it,st){this.ranges=it,this.primIndex=st};Ro.prototype.primary=function(){return this.ranges[this.primIndex]},Ro.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var dt=this.ranges[st],ct=it.ranges[st];if(!pe(dt.anchor,ct.anchor)||!pe(dt.head,ct.head))return!1}return!0},Ro.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Kr(Fe(this.ranges[st].anchor),Fe(this.ranges[st].head));return new Ro(it,this.primIndex)},Ro.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Ro.prototype.contains=function(it,st){st||(st=it);for(var dt=0;dt<this.ranges.length;dt++){var ct=this.ranges[dt];if(Ui(st,ct.from())>=0&&Ui(it,ct.to())<=0)return dt}return-1};var Kr=function(it,st){this.anchor=it,this.head=st};Kr.prototype.from=function(){return ve(this.anchor,this.head)},Kr.prototype.to=function(){return Ke(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function No(it,st,dt){var ct=it&&it.options.selectionsMayTouch,gt=st[dt];st.sort(function(yn,pn){return Ui(yn.from(),pn.from())}),dt=We(st,gt);for(var Nt=1;Nt<st.length;Nt++){var Rt=st[Nt],$t=st[Nt-1],Jt=Ui($t.to(),Rt.from());if(ct&&!Rt.empty()?Jt>0:Jt>=0){var fe=ve($t.from(),Rt.from()),qe=Ke($t.to(),Rt.to()),we=$t.empty()?Rt.from()==Rt.head:$t.from()==$t.head;Nt<=dt&&--dt,st.splice(--Nt,2,new Kr(we?qe:fe,we?fe:qe))}}return new Ro(st,dt)}function wa(it,st){return new Ro([new Kr(it,st||it)],0)}function dl(it){return it.text?Ln(it.from.line+it.text.length-1,rn(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Ya(it,st){if(Ui(it,st.from)<0)return it;if(Ui(it,st.to)<=0)return dl(st);var dt=it.line+st.text.length-(st.to.line-st.from.line)-1,ct=it.ch;return it.line==st.to.line&&(ct+=dl(st).ch-st.to.ch),Ln(dt,ct)}function bl(it,st){for(var dt=[],ct=0;ct<it.sel.ranges.length;ct++){var gt=it.sel.ranges[ct];dt.push(new Kr(Ya(gt.anchor,st),Ya(gt.head,st)))}return No(it.cm,dt,it.sel.primIndex)}function Tl(it,st,dt){return it.line==st.line?Ln(dt.line,it.ch-st.ch+dt.ch):Ln(dt.line+(it.line-st.line),it.ch)}function Au(it,st,dt){for(var ct=[],gt=Ln(it.first,0),Nt=gt,Rt=0;Rt<st.length;Rt++){var $t=st[Rt],Jt=Tl($t.from,gt,Nt),fe=Tl(dl($t),gt,Nt);if(gt=$t.to,Nt=fe,dt=="around"){var qe=it.sel.ranges[Rt],we=Ui(qe.head,qe.anchor)<0;ct[Rt]=new Kr(we?fe:Jt,we?Jt:fe)}else ct[Rt]=new Kr(Jt,Jt)}return new Ro(ct,it.sel.primIndex)}function so(it){it.doc.mode=Je(it.options,it.doc.modeOption),Nl(it)}function Nl(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,xo(it,100),it.state.modeGen++,it.curOp&&Us(it)}function ms(it,st){return st.from.ch==0&&st.to.ch==0&&rn(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function za(it,st,dt,ct){function gt(Fr){return dt?dt[Fr]:null}function Nt(Fr,mr,Hr){Zs(Fr,mr,Hr,ct),nr(Fr,"change",Fr,st)}function Rt(Fr,mr){for(var Hr=[],vo=Fr;vo<mr;++vo)Hr.push(new ws(fe[vo],gt(vo),ct));return Hr}var $t=st.from,Jt=st.to,fe=st.text,qe=Cn(it,$t.line),we=Cn(it,Jt.line),yn=rn(fe),pn=gt(fe.length-1),Ai=Jt.line-$t.line;if(st.full)it.insert(0,Rt(0,fe.length)),it.remove(fe.length,it.size-fe.length);else if(ms(it,st)){var vi=Rt(0,fe.length-1);Nt(we,we.text,pn),Ai&&it.remove($t.line,Ai),vi.length&&it.insert($t.line,vi)}else if(qe==we)if(fe.length==1)Nt(qe,qe.text.slice(0,$t.ch)+yn+qe.text.slice(Jt.ch),pn);else{var Di=Rt(1,fe.length-1);Di.push(new ws(yn+qe.text.slice(Jt.ch),pn,ct)),Nt(qe,qe.text.slice(0,$t.ch)+fe[0],gt(0)),it.insert($t.line+1,Di)}else if(fe.length==1)Nt(qe,qe.text.slice(0,$t.ch)+fe[0]+we.text.slice(Jt.ch),gt(0)),it.remove($t.line+1,Ai);else{Nt(qe,qe.text.slice(0,$t.ch)+fe[0],gt(0)),Nt(we,yn+we.text.slice(Jt.ch),pn);var Yi=Rt(1,fe.length-1);Ai>1&&it.remove($t.line+1,Ai-1),it.insert($t.line+1,Yi)}nr(it,"change",it,st)}function Xa(it,st,dt){function ct(gt,Nt,Rt){if(gt.linked)for(var $t=0;$t<gt.linked.length;++$t){var Jt=gt.linked[$t];if(Jt.doc!=Nt){var fe=Rt&&Jt.sharedHist;dt&&!fe||(st(Jt.doc,fe),ct(Jt.doc,gt,fe))}}}ct(it,null,!0)}function qo(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,Gr(it),so(it),gA(it),it.options.lineWrapping||Go(it),it.options.mode=st.modeOption,Us(it)}function gA(it){(it.doc.direction=="rtl"?He:Ht)(it.display.lineDiv,"CodeMirror-rtl")}function Xl(it){_i(it,function(){gA(it),Us(it)})}function Cu(it){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=it||1}function qs(it,st){var dt={from:Fe(st.from),to:dl(st),text:Ti(it,st.from,st.to)};return pA(it,dt,st.from.line,st.to.line+1),Xa(it,function(ct){return pA(ct,dt,st.from.line,st.to.line+1)},!0),dt}function hu(it){for(;it.length;){var st=rn(it);if(st.ranges)it.pop();else break}}function Pu(it,st){if(st)return hu(it.done),rn(it.done);if(it.done.length&&!rn(it.done).ranges)return rn(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),rn(it.done)}function XA(it,st,dt,ct){var gt=it.history;gt.undone.length=0;var Nt=+new Date,Rt,$t;if((gt.lastOp==ct||gt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&gt.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Rt=Pu(gt,gt.lastOp==ct)))$t=rn(Rt.changes),Ui(st.from,st.to)==0&&Ui(st.from,$t.to)==0?$t.to=dl(st):Rt.changes.push(qs(it,st));else{var Jt=rn(gt.done);for((!Jt||!Jt.ranges)&&sl(it.sel,gt.done),Rt={changes:[qs(it,st)],generation:gt.generation},gt.done.push(Rt);gt.done.length>gt.undoDepth;)gt.done.shift(),gt.done[0].ranges||gt.done.shift()}gt.done.push(dt),gt.generation=++gt.maxGeneration,gt.lastModTime=gt.lastSelTime=Nt,gt.lastOp=gt.lastSelOp=ct,gt.lastOrigin=gt.lastSelOrigin=st.origin,$t||xi(it,"historyAdded")}function jh(it,st,dt,ct){var gt=st.charAt(0);return gt=="*"||gt=="+"&&dt.ranges.length==ct.ranges.length&&dt.somethingSelected()==ct.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function JA(it,st,dt,ct){var gt=it.history,Nt=ct&&ct.origin;dt==gt.lastSelOp||Nt&&gt.lastSelOrigin==Nt&&(gt.lastModTime==gt.lastSelTime&&gt.lastOrigin==Nt||jh(it,Nt,rn(gt.done),st))?gt.done[gt.done.length-1]=st:sl(st,gt.done),gt.lastSelTime=+new Date,gt.lastSelOrigin=Nt,gt.lastSelOp=dt,ct&&ct.clearRedo!==!1&&hu(gt.undone)}function sl(it,st){var dt=rn(st);dt&&dt.ranges&&dt.equals(it)||st.push(it)}function pA(it,st,dt,ct){var gt=st["spans_"+it.id],Nt=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ct),function(Rt){Rt.markedSpans&&((gt||(gt=st["spans_"+it.id]={}))[Nt]=Rt.markedSpans),++Nt})}function Ja(it){if(!it)return null;for(var st,dt=0;dt<it.length;++dt)it[dt].marker.explicitlyCleared?st||(st=it.slice(0,dt)):st&&st.push(it[dt]);return st?st.length?st:null:it}function cu(it,st){var dt=st["spans_"+it.id];if(!dt)return null;for(var ct=[],gt=0;gt<st.text.length;++gt)ct.push(Ja(dt[gt]));return ct}function kr(it,st){var dt=cu(it,st),ct=Or(it,st);if(!dt)return ct;if(!ct)return dt;for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt],Rt=ct[gt];if(Nt&&Rt)t:for(var $t=0;$t<Rt.length;++$t){for(var Jt=Rt[$t],fe=0;fe<Nt.length;++fe)if(Nt[fe].marker==Jt.marker)continue t;Nt.push(Jt)}else Rt&&(dt[gt]=Rt)}return dt}function eA(it,st,dt){for(var ct=[],gt=0;gt<it.length;++gt){var Nt=it[gt];if(Nt.ranges){ct.push(dt?Ro.prototype.deepCopy.call(Nt):Nt);continue}var Rt=Nt.changes,$t=[];ct.push({changes:$t});for(var Jt=0;Jt<Rt.length;++Jt){var fe=Rt[Jt],qe=void 0;if($t.push({from:fe.from,to:fe.to,text:fe.text}),st)for(var we in fe)(qe=we.match(/^spans_(\d+)$/))&&We(st,Number(qe[1]))>-1&&(rn($t)[we]=fe[we],delete fe[we])}}return ct}function xh(it,st,dt,ct){if(ct){var gt=it.anchor;if(dt){var Nt=Ui(st,gt)<0;Nt!=Ui(dt,gt)<0?(gt=st,st=dt):Nt!=Ui(st,dt)<0&&(st=dt)}return new Kr(gt,st)}else return new Kr(dt||st,st)}function mA(it,st,dt,ct,gt){gt==null&&(gt=it.cm&&(it.cm.display.shift||it.extend)),Hs(it,new Ro([xh(it.sel.primary(),st,dt,gt)],0),ct)}function Jl(it,st,dt){for(var ct=[],gt=it.cm&&(it.cm.display.shift||it.extend),Nt=0;Nt<it.sel.ranges.length;Nt++)ct[Nt]=xh(it.sel.ranges[Nt],st[Nt],null,gt);var Rt=No(it.cm,ct,it.sel.primIndex);Hs(it,Rt,dt)}function vA(it,st,dt,ct){var gt=it.sel.ranges.slice(0);gt[st]=dt,Hs(it,No(it.cm,gt,it.sel.primIndex),ct)}function du(it,st,dt,ct){Hs(it,wa(st,dt),ct)}function Hu(it,st,dt){var ct={ranges:st.ranges,update:function(gt){this.ranges=[];for(var Nt=0;Nt<gt.length;Nt++)this.ranges[Nt]=new Kr(_e(it,gt[Nt].anchor),_e(it,gt[Nt].head))},origin:dt&&dt.origin};return xi(it,"beforeSelectionChange",it,ct),it.cm&&xi(it.cm,"beforeSelectionChange",it.cm,ct),ct.ranges!=st.ranges?No(it.cm,ct.ranges,ct.ranges.length-1):st}function Fu(it,st,dt){var ct=it.history.done,gt=rn(ct);gt&&gt.ranges?(ct[ct.length-1]=st,fl(it,st,dt)):Hs(it,st,dt)}function Hs(it,st,dt){fl(it,st,dt),JA(it,it.sel,it.cm?it.cm.curOp.id:NaN,dt)}function fl(it,st,dt){(ji(it,"beforeSelectionChange")||it.cm&&ji(it.cm,"beforeSelectionChange"))&&(st=Hu(it,st,dt));var ct=dt&&dt.bias||(Ui(st.primary().head,it.sel.primary().head)<0?-1:1);Ru(it,wl(it,st,ct,!0)),!(dt&&dt.scroll===!1)&&it.cm&&bA(it.cm)}function Ru(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Ir(it.cm)),nr(it,"cursorActivity",it))}function yl(it){Ru(it,wl(it,it.sel,null,!1))}function wl(it,st,dt,ct){for(var gt,Nt=0;Nt<st.ranges.length;Nt++){var Rt=st.ranges[Nt],$t=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Jt=Bh(it,Rt.anchor,$t&&$t.anchor,dt,ct),fe=Bh(it,Rt.head,$t&&$t.head,dt,ct);(gt||Jt!=Rt.anchor||fe!=Rt.head)&&(gt||(gt=st.ranges.slice(0,Nt)),gt[Nt]=new Kr(Jt,fe))}return gt?No(it.cm,gt,st.primIndex):st}function Va(it,st,dt,ct,gt){var Nt=Cn(it,st.line);if(Nt.markedSpans)for(var Rt=0;Rt<Nt.markedSpans.length;++Rt){var $t=Nt.markedSpans[Rt],Jt=$t.marker,fe="selectLeft"in Jt?!Jt.selectLeft:Jt.inclusiveLeft,qe="selectRight"in Jt?!Jt.selectRight:Jt.inclusiveRight;if(($t.from==null||(fe?$t.from<=st.ch:$t.from<st.ch))&&($t.to==null||(qe?$t.to>=st.ch:$t.to>st.ch))){if(gt&&(xi(Jt,"beforeCursorEnter"),Jt.explicitlyCleared))if(Nt.markedSpans){--Rt;continue}else break;if(!Jt.atomic)continue;if(dt){var we=Jt.find(ct<0?1:-1),yn=void 0;if((ct<0?qe:fe)&&(we=qA(it,we,-ct,we&&we.line==st.line?Nt:null)),we&&we.line==st.line&&(yn=Ui(we,dt))&&(ct<0?yn<0:yn>0))return Va(it,we,st,ct,gt)}var pn=Jt.find(ct<0?-1:1);return(ct<0?fe:qe)&&(pn=qA(it,pn,ct,pn.line==st.line?Nt:null)),pn?Va(it,pn,st,ct,gt):null}}return st}function Bh(it,st,dt,ct,gt){var Nt=ct||1,Rt=Va(it,st,dt,Nt,gt)||!gt&&Va(it,st,dt,Nt,!0)||Va(it,st,dt,-Nt,gt)||!gt&&Va(it,st,dt,-Nt,!0);return Rt||(it.cantEdit=!0,Ln(it.first,0))}function qA(it,st,dt,ct){return dt<0&&st.ch==0?st.line>it.first?_e(it,Ln(st.line-1)):null:dt>0&&st.ch==(ct||Cn(it,st.line)).text.length?st.line<it.first+it.size-1?Ln(st.line+1,0):null:new Ln(st.line,st.ch+dt)}function Sa(it){it.setSelection(Ln(it.firstLine(),0),Ln(it.lastLine()),Ve)}function NA(it,st,dt){var ct={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ct.canceled=!0}};return dt&&(ct.update=function(gt,Nt,Rt,$t){gt&&(ct.from=_e(it,gt)),Nt&&(ct.to=_e(it,Nt)),Rt&&(ct.text=Rt),$t!==void 0&&(ct.origin=$t)}),xi(it,"beforeChange",it,ct),it.cm&&xi(it.cm,"beforeChange",it.cm,ct),ct.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ct.from,to:ct.to,text:ct.text,origin:ct.origin}}function nA(it,st,dt){if(it.cm){if(!it.cm.curOp)return Cr(it.cm,nA)(it,st,dt);if(it.cm.state.suppressEdits)return}if(!((ji(it,"beforeChange")||it.cm&&ji(it.cm,"beforeChange"))&&(st=NA(it,st,!0),!st))){var ct=Ar&&!dt&&oo(it,st.from,st.to);if(ct)for(var gt=ct.length-1;gt>=0;--gt)Wa(it,{from:ct[gt].from,to:ct[gt].to,text:gt?[""]:st.text,origin:st.origin});else Wa(it,st)}}function Wa(it,st){if(!(st.text.length==1&&st.text[0]==""&&Ui(st.from,st.to)==0)){var dt=bl(it,st);XA(it,st,dt,it.cm?it.cm.curOp.id:NaN),Ku(it,st,dt,Or(it,st));var ct=[];Xa(it,function(gt,Nt){!Nt&&We(ct,gt.history)==-1&&(Vh(gt.history,st),ct.push(gt.history)),Ku(gt,st,null,Or(gt,st))})}}function _u(it,st,dt){var ct=it.cm&&it.cm.state.suppressEdits;if(!(ct&&!dt)){for(var gt=it.history,Nt,Rt=it.sel,$t=st=="undo"?gt.done:gt.undone,Jt=st=="undo"?gt.undone:gt.done,fe=0;fe<$t.length&&(Nt=$t[fe],!(dt?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));fe++);if(fe!=$t.length){for(gt.lastOrigin=gt.lastSelOrigin=null;;)if(Nt=$t.pop(),Nt.ranges){if(sl(Nt,Jt),dt&&!Nt.equals(it.sel)){Hs(it,Nt,{clearRedo:!1});return}Rt=Nt}else if(ct){$t.push(Nt);return}else break;var qe=[];sl(Rt,Jt),Jt.push({changes:qe,generation:gt.generation}),gt.generation=Nt.generation||++gt.maxGeneration;for(var we=ji(it,"beforeChange")||it.cm&&ji(it.cm,"beforeChange"),yn=function(vi){var Di=Nt.changes[vi];if(Di.origin=st,we&&!NA(it,Di,!1))return $t.length=0,{};qe.push(qs(it,Di));var Yi=vi?bl(it,Di):rn($t);Ku(it,Di,Yi,kr(it,Di)),!vi&&it.cm&&it.cm.scrollIntoView({from:Di.from,to:dl(Di)});var Fr=[];Xa(it,function(mr,Hr){!Hr&&We(Fr,mr.history)==-1&&(Vh(mr.history,Di),Fr.push(mr.history)),Ku(mr,Di,null,kr(mr,Di))})},pn=Nt.changes.length-1;pn>=0;--pn){var Ai=yn(pn);if(Ai)return Ai.v}}}}function $A(it,st){if(st!=0&&(it.first+=st,it.sel=new Ro(Dn(it.sel.ranges,function(gt){return new Kr(Ln(gt.anchor.line+st,gt.anchor.ch),Ln(gt.head.line+st,gt.head.ch))}),it.sel.primIndex),it.cm)){Us(it.cm,it.first,it.first-st,st);for(var dt=it.cm.display,ct=dt.viewFrom;ct<dt.viewTo;ct++)Fo(it.cm,ct,"gutter")}}function Ku(it,st,dt,ct){if(it.cm&&!it.cm.curOp)return Cr(it.cm,Ku)(it,st,dt,ct);if(st.to.line<it.first){$A(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var gt=st.text.length-1-(it.first-st.from.line);$A(it,gt),st={from:Ln(it.first,0),to:Ln(st.to.line+gt,st.to.ch),text:[rn(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:Ln(Nt,Cn(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Ti(it,st.from,st.to),dt||(dt=bl(it,st)),it.cm?zh(it.cm,st,ct):za(it,st,ct),fl(it,dt,Ve),it.cantEdit&&Bh(it,Ln(it.firstLine(),0))&&(it.cantEdit=!1)}}function zh(it,st,dt){var ct=it.doc,gt=it.display,Nt=st.from,Rt=st.to,$t=!1,Jt=Nt.line;it.options.lineWrapping||(Jt=Ge(ki(Cn(ct,Nt.line))),ct.iter(Jt,Rt.line+1,function(pn){if(pn==gt.maxLine)return $t=!0,!0})),ct.sel.contains(st.from,st.to)>-1&&Ir(it),za(ct,st,dt,Js(it)),it.options.lineWrapping||(ct.iter(Jt,Nt.line+st.text.length,function(pn){var Ai=Ko(pn);Ai>gt.maxLineLength&&(gt.maxLine=pn,gt.maxLineLength=Ai,gt.maxLineChanged=!0,$t=!1)}),$t&&(it.curOp.updateMaxLine=!0)),Qi(ct,Nt.line),xo(it,400);var fe=st.text.length-(Rt.line-Nt.line)-1;st.full?Us(it):Nt.line==Rt.line&&st.text.length==1&&!ms(it.doc,st)?Fo(it,Nt.line,"text"):Us(it,Nt.line,Rt.line+1,fe);var qe=ji(it,"changes"),we=ji(it,"change");if(we||qe){var yn={from:Nt,to:Rt,text:st.text,removed:st.removed,origin:st.origin};we&&nr(it,"change",it,yn),qe&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(yn)}it.display.selForContextMenu=null}function yA(it,st,dt,ct,gt){var Nt;ct||(ct=dt),Ui(ct,dt)<0&&(Nt=[ct,dt],dt=Nt[0],ct=Nt[1]),typeof st=="string"&&(st=it.splitLines(st)),nA(it,{from:dt,to:ct,text:st,origin:gt})}function ql(it,st,dt,ct){dt<it.line?it.line+=ct:st<it.line&&(it.line=st,it.ch=0)}function wA(it,st,dt,ct){for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Rt=!0;if(Nt.ranges){Nt.copied||(Nt=it[gt]=Nt.deepCopy(),Nt.copied=!0);for(var $t=0;$t<Nt.ranges.length;$t++)ql(Nt.ranges[$t].anchor,st,dt,ct),ql(Nt.ranges[$t].head,st,dt,ct);continue}for(var Jt=0;Jt<Nt.changes.length;++Jt){var fe=Nt.changes[Jt];if(dt<fe.from.line)fe.from=Ln(fe.from.line+ct,fe.from.ch),fe.to=Ln(fe.to.line+ct,fe.to.ch);else if(st<=fe.to.line){Rt=!1;break}}Rt||(it.splice(0,gt+1),gt=0)}}function Vh(it,st){var dt=st.from.line,ct=st.to.line,gt=st.text.length-(ct-dt)-1;wA(it.done,dt,ct,gt),wA(it.undone,dt,ct,gt)}function co(it,st,dt,ct){var gt=st,Nt=st;return typeof st=="number"?Nt=Cn(it,Ee(it,st)):gt=Ge(st),gt==null?null:(ct(Nt,gt)&&it.cm&&Fo(it.cm,gt,dt),Nt)}function Jr(it){this.lines=it,this.parent=null;for(var st=0,dt=0;dt<it.length;++dt)it[dt].parent=this,st+=it[dt].height;this.height=st}Jr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var dt=it,ct=it+st;dt<ct;++dt){var gt=this.lines[dt];this.height-=gt.height,Qa(gt),nr(gt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,dt){this.height+=dt,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ct=0;ct<st.length;++ct)st[ct].parent=this},iterN:function(it,st,dt){for(var ct=it+st;it<ct;++it)if(dt(this.lines[it]))return!0}};function jr(it){this.children=it;for(var st=0,dt=0,ct=0;ct<it.length;++ct){var gt=it[ct];st+=gt.chunkSize(),dt+=gt.height,gt.parent=this}this.size=st,this.height=dt,this.parent=null}jr.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var dt=0;dt<this.children.length;++dt){var ct=this.children[dt],gt=ct.chunkSize();if(it<gt){var Nt=Math.min(st,gt-it),Rt=ct.height;if(ct.removeInner(it,Nt),this.height-=Rt-ct.height,gt==Nt&&(this.children.splice(dt--,1),ct.parent=null),(st-=Nt)==0)break;it=0}else it-=gt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Jr))){var $t=[];this.collapse($t),this.children=[new Jr($t)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,dt){this.size+=st.length,this.height+=dt;for(var ct=0;ct<this.children.length;++ct){var gt=this.children[ct],Nt=gt.chunkSize();if(it<=Nt){if(gt.insertInner(it,st,dt),gt.lines&&gt.lines.length>50){for(var Rt=gt.lines.length%25+25,$t=Rt;$t<gt.lines.length;){var Jt=new Jr(gt.lines.slice($t,$t+=25));gt.height-=Jt.height,this.children.splice(++ct,0,Jt),Jt.parent=this}gt.lines=gt.lines.slice(0,Rt),this.maybeSpill()}break}it-=Nt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),dt=new jr(st);if(it.parent){it.size-=dt.size,it.height-=dt.height;var gt=We(it.parent.children,it);it.parent.children.splice(gt+1,0,dt)}else{var ct=new jr(it.children);ct.parent=it,it.children=[ct,dt],it=ct}dt.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,dt){for(var ct=0;ct<this.children.length;++ct){var gt=this.children[ct],Nt=gt.chunkSize();if(it<Nt){var Rt=Math.min(st,Nt-it);if(gt.iterN(it,Rt,dt))return!0;if((st-=Rt)==0)break;it=0}else it-=Nt}}};var bs=function(it,st,dt){if(dt)for(var ct in dt)dt.hasOwnProperty(ct)&&(this[ct]=dt[ct]);this.doc=it,this.node=st};bs.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,dt=this.line,ct=Ge(dt);if(!(ct==null||!st)){for(var gt=0;gt<st.length;++gt)st[gt]==this&&st.splice(gt--,1);st.length||(dt.widgets=null);var Nt=zi(this);On(dt,Math.max(0,dt.height-Nt)),it&&(_i(it,function(){Ma(it,dt,-Nt),Fo(it,ct,"widget")}),nr(it,"lineWidgetCleared",it,this,ct))}},bs.prototype.changed=function(){var it=this,st=this.height,dt=this.doc.cm,ct=this.line;this.height=null;var gt=zi(this)-st;gt&&(ln(this.doc,ct)||On(ct,ct.height+gt),dt&&_i(dt,function(){dt.curOp.forceUpdate=!0,Ma(dt,ct,gt),nr(dt,"lineWidgetChanged",dt,it,Ge(ct))}))},yr(bs);function Ma(it,st,dt){Wr(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Qc(it,dt)}function DA(it,st,dt,ct){var gt=new bs(it,dt,ct),Nt=it.cm;return Nt&&gt.noHScroll&&(Nt.display.alignWidgets=!0),co(it,st,"widget",function(Rt){var $t=Rt.widgets||(Rt.widgets=[]);if(gt.insertAt==null?$t.push(gt):$t.splice(Math.min($t.length-1,Math.max(0,gt.insertAt)),0,gt),gt.line=Rt,Nt&&!ln(it,Rt)){var Jt=Wr(Rt)<it.scrollTop;On(Rt,Rt.height+zi(gt)),Jt&&Qc(Nt,gt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&nr(Nt,"lineWidgetAdded",Nt,gt,typeof st=="number"?st:Ge(st)),gt}var Eu=0,Ue=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Eu};Ue.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&oi(it),ji(this,"clear")){var dt=this.find();dt&&nr(this,"clear",dt.from,dt.to)}for(var ct=null,gt=null,Nt=0;Nt<this.lines.length;++Nt){var Rt=this.lines[Nt],$t=is(Rt.markedSpans,this);it&&!this.collapsed?Fo(it,Ge(Rt),"text"):it&&($t.to!=null&&(gt=Ge(Rt)),$t.from!=null&&(ct=Ge(Rt))),Rt.markedSpans=qr(Rt.markedSpans,$t),$t.from==null&&this.collapsed&&!ln(this.doc,Rt)&&it&&On(Rt,$u(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Jt=0;Jt<this.lines.length;++Jt){var fe=ki(this.lines[Jt]),qe=Ko(fe);qe>it.display.maxLineLength&&(it.display.maxLine=fe,it.display.maxLineLength=qe,it.display.maxLineChanged=!0)}ct!=null&&it&&this.collapsed&&Us(it,ct,gt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&yl(it.doc)),it&&nr(it,"markerCleared",it,this,ct,gt),st&&ni(it),this.parent&&this.parent.clear()}},Ue.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ct,gt=0;gt<this.lines.length;++gt){var Nt=this.lines[gt],Rt=is(Nt.markedSpans,this);if(Rt.from!=null&&(dt=Ln(st?Nt:Ge(Nt),Rt.from),it==-1))return dt;if(Rt.to!=null&&(ct=Ln(st?Nt:Ge(Nt),Rt.to),it==1))return ct}return dt&&{from:dt,to:ct}},Ue.prototype.changed=function(){var it=this,st=this.find(-1,!0),dt=this,ct=this.doc.cm;!st||!ct||_i(ct,function(){var gt=st.line,Nt=Ge(st.line),Rt=Wl(ct,Nt);if(Rt&&(hl(Rt),ct.curOp.selectionChanged=ct.curOp.forceUpdate=!0),ct.curOp.updateMaxLine=!0,!ln(dt.doc,gt)&&dt.height!=null){var $t=dt.height;dt.height=null;var Jt=zi(dt)-$t;Jt&&On(gt,gt.height+Jt)}nr(ct,"markerChanged",ct,it)})},Ue.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||We(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Ue.prototype.detachLine=function(it){if(this.lines.splice(We(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},yr(Ue);function iA(it,st,dt,ct,gt){if(ct&&ct.shared)return Ch(it,st,dt,ct,gt);if(it.cm&&!it.cm.curOp)return Cr(it.cm,iA)(it,st,dt,ct,gt);var Nt=new Ue(it,gt),Rt=Ui(st,dt);if(ct&&di(ct,Nt,!1),Rt>0||Rt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=Ce("span",[Nt.replacedWith],"CodeMirror-widget"),ct.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ct.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(ma(it,st.line,st,dt,Nt)||st.line!=dt.line&&ma(it,dt.line,st,dt,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");dn()}Nt.addToHistory&&XA(it,{from:st,to:dt,origin:"markText"},it.sel,NaN);var $t=st.line,Jt=it.cm,fe;if(it.iter($t,dt.line+1,function(we){Jt&&Nt.collapsed&&!Jt.options.lineWrapping&&ki(we)==Jt.display.maxLine&&(fe=!0),Nt.collapsed&&$t!=st.line&&On(we,0),rs(we,new or(Nt,$t==st.line?st.ch:null,$t==dt.line?dt.ch:null)),++$t}),Nt.collapsed&&it.iter(st.line,dt.line+1,function(we){ln(it,we)&&On(we,0)}),Nt.clearOnEnter&&ti(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&($i(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Nt.collapsed&&(Nt.id=++Eu,Nt.atomic=!0),Jt){if(fe&&(Jt.curOp.updateMaxLine=!0),Nt.collapsed)Us(Jt,st.line,dt.line+1);else if(Nt.className||Nt.startStyle||Nt.endStyle||Nt.css||Nt.attributes||Nt.title)for(var qe=st.line;qe<=dt.line;qe++)Fo(Jt,qe,"text");Nt.atomic&&yl(Jt.doc),nr(Jt,"markerAdded",Jt,Nt)}return Nt}var Sl=function(it,st){this.markers=it,this.primary=st;for(var dt=0;dt<it.length;++dt)it[dt].parent=this};Sl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();nr(this,"clear")}},Sl.prototype.find=function(it,st){return this.primary.find(it,st)},yr(Sl);function Ch(it,st,dt,ct,gt){ct=di(ct),ct.shared=!1;var Nt=[iA(it,st,dt,ct,gt)],Rt=Nt[0],$t=ct.widgetNode;return Xa(it,function(Jt){$t&&(ct.widgetNode=$t.cloneNode(!0)),Nt.push(iA(Jt,_e(Jt,st),_e(Jt,dt),ct,gt));for(var fe=0;fe<Jt.linked.length;++fe)if(Jt.linked[fe].isParent)return;Rt=rn(Nt)}),new Sl(Nt,Rt)}function Oc(it){return it.findMarks(Ln(it.first,0),it.clipPos(Ln(it.lastLine())),function(st){return st.parent})}function yc(it,st){for(var dt=0;dt<st.length;dt++){var ct=st[dt],gt=ct.find(),Nt=it.clipPos(gt.from),Rt=it.clipPos(gt.to);if(Ui(Nt,Rt)){var $t=iA(it,Nt,Rt,ct.primary,ct.primary.type);ct.markers.push($t),$t.parent=ct}}}function Wh(it){for(var st=function(ct){var gt=it[ct],Nt=[gt.primary.doc];Xa(gt.primary.doc,function(Jt){return Nt.push(Jt)});for(var Rt=0;Rt<gt.markers.length;Rt++){var $t=gt.markers[Rt];We(Nt,$t.doc)==-1&&($t.parent=null,gt.markers.splice(Rt--,1))}},dt=0;dt<it.length;dt++)st(dt)}var Af=0,qa=function(it,st,dt,ct,gt){if(!(this instanceof qa))return new qa(it,st,dt,ct,gt);dt==null&&(dt=0),jr.call(this,[new Jr([new ws("",null)])]),this.first=dt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=dt;var Nt=Ln(dt,0);this.sel=wa(Nt),this.history=new Cu(null),this.id=++Af,this.modeOption=st,this.lineSep=ct,this.direction=gt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),za(this,{from:Nt,to:Nt,text:it}),Hs(this,wa(Nt),Ve)};qa.prototype=Pt(jr.prototype,{constructor:qa,iter:function(it,st,dt){dt?this.iterN(it-this.first,st-it,dt):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var dt=0,ct=0;ct<st.length;++ct)dt+=st[ct].height;this.insertInner(it-this.first,st,dt)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=Xi(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Br(function(it){var st=Ln(this.first,0),dt=this.first+this.size-1;nA(this,{from:st,to:Ln(dt,Cn(this,dt).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&tA(this.cm,0,0),Hs(this,wa(st),Ve)}),replaceRange:function(it,st,dt,ct){st=_e(this,st),dt=dt?_e(this,dt):st,yA(this,it,st,dt,ct)},getRange:function(it,st,dt){var ct=Ti(this,_e(this,it),_e(this,st));return dt===!1?ct:ct.join(dt||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(Zi(this,it))return Cn(this,it)},getLineNumber:function(it){return Ge(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Cn(this,it)),ki(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return _e(this,it)},getCursor:function(it){var st=this.sel.primary(),dt;return it==null||it=="head"?dt=st.head:it=="anchor"?dt=st.anchor:it=="end"||it=="to"||it===!1?dt=st.to():dt=st.from(),dt},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Br(function(it,st,dt){du(this,_e(this,typeof it=="number"?Ln(it,st||0):it),null,dt)}),setSelection:Br(function(it,st,dt){du(this,_e(this,it),_e(this,st||it),dt)}),extendSelection:Br(function(it,st,dt){mA(this,_e(this,it),st&&_e(this,st),dt)}),extendSelections:Br(function(it,st){Jl(this,ei(this,it),st)}),extendSelectionsBy:Br(function(it,st){var dt=Dn(this.sel.ranges,it);Jl(this,ei(this,dt),st)}),setSelections:Br(function(it,st,dt){if(it.length){for(var ct=[],gt=0;gt<it.length;gt++)ct[gt]=new Kr(_e(this,it[gt].anchor),_e(this,it[gt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Hs(this,No(this.cm,ct,st),dt)}}),addSelection:Br(function(it,st,dt){var ct=this.sel.ranges.slice(0);ct.push(new Kr(_e(this,it),_e(this,st||it))),Hs(this,No(this.cm,ct,ct.length-1),dt)}),getSelection:function(it){for(var st=this.sel.ranges,dt,ct=0;ct<st.length;ct++){var gt=Ti(this,st[ct].from(),st[ct].to());dt=dt?dt.concat(gt):gt}return it===!1?dt:dt.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],dt=this.sel.ranges,ct=0;ct<dt.length;ct++){var gt=Ti(this,dt[ct].from(),dt[ct].to());it!==!1&&(gt=gt.join(it||this.lineSeparator())),st[ct]=gt}return st},replaceSelection:function(it,st,dt){for(var ct=[],gt=0;gt<this.sel.ranges.length;gt++)ct[gt]=it;this.replaceSelections(ct,st,dt||"+input")},replaceSelections:Br(function(it,st,dt){for(var ct=[],gt=this.sel,Nt=0;Nt<gt.ranges.length;Nt++){var Rt=gt.ranges[Nt];ct[Nt]={from:Rt.from(),to:Rt.to(),text:this.splitLines(it[Nt]),origin:dt}}for(var $t=st&&st!="end"&&Au(this,ct,st),Jt=ct.length-1;Jt>=0;Jt--)nA(this,ct[Jt]);$t?Fu(this,$t):this.cm&&bA(this.cm)}),undo:Br(function(){_u(this,"undo")}),redo:Br(function(){_u(this,"redo")}),undoSelection:Br(function(){_u(this,"undo",!0)}),redoSelection:Br(function(){_u(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,dt=0,ct=0;ct<it.done.length;ct++)it.done[ct].ranges||++st;for(var gt=0;gt<it.undone.length;gt++)it.undone[gt].ranges||++dt;return{undo:st,redo:dt}},clearHistory:function(){var it=this;this.history=new Cu(this.history.maxGeneration),Xa(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:eA(this.history.done),undone:eA(this.history.undone)}},setHistory:function(it){var st=this.history=new Cu(this.history.maxGeneration);st.done=eA(it.done.slice(0),null,!0),st.undone=eA(it.undone.slice(0),null,!0)},setGutterMarker:Br(function(it,st,dt){return co(this,it,"gutter",function(ct){var gt=ct.gutterMarkers||(ct.gutterMarkers={});return gt[st]=dt,!dt&&Lt(gt)&&(ct.gutterMarkers=null),!0})}),clearGutter:Br(function(it){var st=this;this.iter(function(dt){dt.gutterMarkers&&dt.gutterMarkers[it]&&co(st,dt,"gutter",function(){return dt.gutterMarkers[it]=null,Lt(dt.gutterMarkers)&&(dt.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Zi(this,it)||(st=it,it=Cn(this,it),!it))return null}else if(st=Ge(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Br(function(it,st,dt){return co(this,it,st=="gutter"?"gutter":"class",function(ct){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ct[gt])ct[gt]=dt;else{if(Ot(dt).test(ct[gt]))return!1;ct[gt]+=" "+dt}return!0})}),removeLineClass:Br(function(it,st,dt){return co(this,it,st=="gutter"?"gutter":"class",function(ct){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Nt=ct[gt];if(Nt)if(dt==null)ct[gt]=null;else{var Rt=Nt.match(Ot(dt));if(!Rt)return!1;var $t=Rt.index+Rt[0].length;ct[gt]=Nt.slice(0,Rt.index)+(!Rt.index||$t==Nt.length?"":" ")+Nt.slice($t)||null}else return!1;return!0})}),addLineWidget:Br(function(it,st,dt){return DA(this,it,st,dt)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,dt){return iA(this,_e(this,it),_e(this,st),dt,dt&&dt.type||"range")},setBookmark:function(it,st){var dt={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=_e(this,it),iA(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=_e(this,it);var st=[],dt=Cn(this,it.line).markedSpans;if(dt)for(var ct=0;ct<dt.length;++ct){var gt=dt[ct];(gt.from==null||gt.from<=it.ch)&&(gt.to==null||gt.to>=it.ch)&&st.push(gt.marker.parent||gt.marker)}return st},findMarks:function(it,st,dt){it=_e(this,it),st=_e(this,st);var ct=[],gt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Rt=Nt.markedSpans;if(Rt)for(var $t=0;$t<Rt.length;$t++){var Jt=Rt[$t];!(Jt.to!=null&&gt==it.line&&it.ch>=Jt.to||Jt.from==null&&gt!=it.line||Jt.from!=null&&gt==st.line&&Jt.from>=st.ch)&&(!dt||dt(Jt.marker))&&ct.push(Jt.marker.parent||Jt.marker)}++gt}),ct},getAllMarks:function(){var it=[];return this.iter(function(st){var dt=st.markedSpans;if(dt)for(var ct=0;ct<dt.length;++ct)dt[ct].from!=null&&it.push(dt[ct].marker)}),it},posFromIndex:function(it){var st,dt=this.first,ct=this.lineSeparator().length;return this.iter(function(gt){var Nt=gt.text.length+ct;if(Nt>it)return st=it,!0;it-=Nt,++dt}),_e(this,Ln(dt,st))},indexFromPos:function(it){it=_e(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var dt=this.lineSeparator().length;return this.iter(this.first,it.line,function(ct){st+=ct.text.length+dt}),st},copy:function(it){var st=new qa(Xi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,dt=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<dt&&(dt=it.to);var ct=new qa(Xi(this,st,dt),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ct.history=this.history),(this.linked||(this.linked=[])).push({doc:ct,sharedHist:it.sharedHist}),ct.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],yc(ct,Oc(this)),ct},unlinkDoc:function(it){if(it instanceof ds&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var dt=this.linked[st];if(dt.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Wh(Oc(this));break}}if(it.history==this.history){var ct=[it.id];Xa(it,function(gt){return ct.push(gt.id)},!0),it.history=new Cu(null),it.history.done=eA(this.history.done,ct),it.history.undone=eA(this.history.undone,ct)}},iterLinkedDocs:function(it){Xa(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Pn(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Br(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&Xl(this.cm))})}),qa.prototype.eachLine=qa.prototype.iter;var Zh=0;function wc(it){var st=this;if(Rc(st),!(wi(st,it)||$r(st.display,it))){xr(it),ge&&(Zh=+new Date);var dt=cl(st,it,!0),ct=it.dataTransfer.files;if(!(!dt||st.isReadOnly()))if(ct&&ct.length&&window.FileReader&&window.File)for(var gt=ct.length,Nt=Array(gt),Rt=0,$t=function(){++Rt==gt&&Cr(st,function(){dt=_e(st.doc,dt);var pn={from:dt,to:dt,text:st.doc.splitLines(Nt.filter(function(Ai){return Ai!=null}).join(st.doc.lineSeparator())),origin:"paste"};nA(st.doc,pn),Fu(st.doc,wa(_e(st.doc,dt),_e(st.doc,dl(pn))))})()},Jt=function(pn,Ai){if(st.options.allowDropFileTypes&&We(st.options.allowDropFileTypes,pn.type)==-1){$t();return}var vi=new FileReader;vi.onerror=function(){return $t()},vi.onload=function(){var Di=vi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Di)){$t();return}Nt[Ai]=Di,$t()},vi.readAsText(pn)},fe=0;fe<ct.length;fe++)Jt(ct[fe],fe);else{if(st.state.draggingText&&st.doc.sel.contains(dt)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var qe=it.dataTransfer.getData("Text");if(qe){var we;if(st.state.draggingText&&!st.state.draggingText.copy&&(we=st.listSelections()),fl(st.doc,wa(dt,dt)),we)for(var yn=0;yn<we.length;++yn)yA(st.doc,"",we[yn].anchor,we[yn].head,"drag");st.replaceSelection(qe,"around","paste"),st.display.input.focus()}}catch(pn){}}}}function Ph(it,st){if(ge&&(!it.state.draggingText||+new Date-Zh<100)){br(st);return}if(!(wi(it,st)||$r(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!ke)){var dt=te("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",se&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),st.dataTransfer.setDragImage(dt,0,0),se&&dt.parentNode.removeChild(dt)}}function Hc(it,st){var dt=cl(it,st);if(dt){var ct=document.createDocumentFragment();Jo(it,dt,ct),it.display.dragCursor||(it.display.dragCursor=te("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),re(it.display.dragCursor,ct)}}function Rc(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function Ld(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),dt=[],ct=0;ct<st.length;ct++){var gt=st[ct].CodeMirror;gt&&dt.push(gt)}dt.length&&dt[0].operation(function(){for(var Nt=0;Nt<dt.length;Nt++)it(dt[Nt])})}}var $l=!1;function xl(){$l||(Fh(),$l=!0)}function Fh(){var it;ti(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,Ld(Md)},100))}),ti(window,"blur",function(){return Ld(wh)})}function Md(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var rA={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"},Eh=0;Eh<10;Eh++)rA[Eh+48]=rA[Eh+96]=String(Eh);for(var Sc=65;Sc<=90;Sc++)rA[Sc]=String.fromCharCode(Sc);for(var Lh=1;Lh<=12;Lh++)rA[Lh+111]=rA[Lh+63235]="F"+Lh;var Dl={};Dl.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"},Dl.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"},Dl.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"},Dl.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"]},Dl.default=ut?Dl.macDefault:Dl.pcDefault;function kd(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var dt,ct,gt,Nt,Rt=0;Rt<st.length-1;Rt++){var $t=st[Rt];if(/^(cmd|meta|m)$/i.test($t))Nt=!0;else if(/^a(lt)?$/i.test($t))dt=!0;else if(/^(c|ctrl|control)$/i.test($t))ct=!0;else if(/^s(hift)?$/i.test($t))gt=!0;else throw new Error("Unrecognized modifier name: "+$t)}return dt&&(it="Alt-"+it),ct&&(it="Ctrl-"+it),Nt&&(it="Cmd-"+it),gt&&(it="Shift-"+it),it}function as(it){var st={};for(var dt in it)if(it.hasOwnProperty(dt)){var ct=it[dt];if(/^(name|fallthrough|(de|at)tach)$/.test(dt))continue;if(ct=="..."){delete it[dt];continue}for(var gt=Dn(dt.split(" "),kd),Nt=0;Nt<gt.length;Nt++){var Rt=void 0,$t=void 0;Nt==gt.length-1?($t=gt.join(" "),Rt=ct):($t=gt.slice(0,Nt+1).join(" "),Rt="...");var Jt=st[$t];if(!Jt)st[$t]=Rt;else if(Jt!=Rt)throw new Error("Inconsistent bindings for "+$t)}delete it[dt]}for(var fe in st)it[fe]=st[fe];return it}function Eo(it,st,dt,ct){st=sa(st);var gt=st.call?st.call(it,ct):st[it];if(gt===!1)return"nothing";if(gt==="...")return"multi";if(gt!=null&&dt(gt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Eo(it,st.fallthrough,dt,ct);for(var Nt=0;Nt<st.fallthrough.length;Nt++){var Rt=Eo(it,st.fallthrough[Nt],dt,ct);if(Rt)return Rt}}}function Oa(it){var st=typeof it=="string"?it:rA[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Il(it,st,dt){var ct=it;return st.altKey&&ct!="Alt"&&(it="Alt-"+it),(St?st.metaKey:st.ctrlKey)&&ct!="Ctrl"&&(it="Ctrl-"+it),(St?st.ctrlKey:st.metaKey)&&ct!="Mod"&&(it="Cmd-"+it),!dt&&st.shiftKey&&ct!="Shift"&&(it="Shift-"+it),it}function al(it,st){if(se&&it.keyCode==34&&it.char)return!1;var dt=rA[it.keyCode];return dt==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(dt=it.code),Il(dt,it,st))}function sa(it){return typeof it=="string"?Dl[it]:it}function Ca(it,st){for(var dt=it.doc.sel.ranges,ct=[],gt=0;gt<dt.length;gt++){for(var Nt=st(dt[gt]);ct.length&&Ui(Nt.from,rn(ct).to)<=0;){var Rt=ct.pop();if(Ui(Rt.from,Nt.from)<0){Nt.from=Rt.from;break}}ct.push(Nt)}_i(it,function(){for(var $t=ct.length-1;$t>=0;$t--)yA(it.doc,"",ct[$t].from,ct[$t].to,"+delete");bA(it)})}function IA(it,st,dt){var ct=on(it.text,st+dt,dt);return ct<0||ct>it.text.length?null:ct}function aa(it,st,dt){var ct=IA(it,st.ch,dt);return ct==null?null:new Ln(st.line,ct,dt<0?"after":"before")}function th(it,st,dt,ct,gt){if(it){st.doc.direction=="rtl"&&(gt=-gt);var Nt=Kn(dt,st.doc.direction);if(Nt){var Rt=gt<0?rn(Nt):Nt[0],$t=gt<0==(Rt.level==1),Jt=$t?"after":"before",fe;if(Rt.level>0||st.doc.direction=="rtl"){var qe=As(st,dt);fe=gt<0?dt.text.length-1:0;var we=xa(st,qe,fe).top;fe=mn(function(yn){return xa(st,qe,yn).top==we},gt<0==(Rt.level==1)?Rt.from:Rt.to-1,fe),Jt=="before"&&(fe=IA(dt,fe,1))}else fe=gt<0?Rt.to:Rt.from;return new Ln(ct,fe,Jt)}}return new Ln(ct,gt<0?dt.text.length:0,gt<0?"before":"after")}function _c(it,st,dt,ct){var gt=Kn(st,it.doc.direction);if(!gt)return aa(st,dt,ct);dt.ch>=st.text.length?(dt.ch=st.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Nt=Re(gt,dt.ch,dt.sticky),Rt=gt[Nt];if(it.doc.direction=="ltr"&&Rt.level%2==0&&(ct>0?Rt.to>dt.ch:Rt.from<dt.ch))return aa(st,dt,ct);var $t=function(Yi,Fr){return IA(st,Yi instanceof Ln?Yi.ch:Yi,Fr)},Jt,fe=function(Yi){return it.options.lineWrapping?(Jt=Jt||As(it,st),Pd(it,st,Jt,Yi)):{begin:0,end:st.text.length}},qe=fe(dt.sticky=="before"?$t(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Rt.level==1){var we=Rt.level==1==ct<0,yn=$t(dt,we?1:-1);if(yn!=null&&(we?yn<=Rt.to&&yn<=qe.end:yn>=Rt.from&&yn>=qe.begin)){var pn=we?"before":"after";return new Ln(dt.line,yn,pn)}}var Ai=function(Yi,Fr,mr){for(var Hr=function(ca,ll){return ll?new Ln(dt.line,$t(ca,1),"before"):new Ln(dt.line,ca,"after")};Yi>=0&&Yi<gt.length;Yi+=Fr){var vo=gt[Yi],pr=Fr>0==(vo.level!=1),Qo=pr?mr.begin:$t(mr.end,-1);if(vo.from<=Qo&&Qo<vo.to||(Qo=pr?vo.from:$t(vo.to,-1),mr.begin<=Qo&&Qo<mr.end))return Hr(Qo,pr)}},vi=Ai(Nt+ct,ct,qe);if(vi)return vi;var Di=ct>0?qe.end:$t(qe.begin,-1);return Di!=null&&!(ct>0&&Di==st.text.length)&&(vi=Ai(ct>0?0:gt.length-1,ct,fe(Di)),vi)?vi:null}var Yh={selectAll:Sa,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ve)},killLine:function(it){return Ca(it,function(st){if(st.empty()){var dt=Cn(it.doc,st.head.line).text.length;return st.head.ch==dt&&st.head.line<it.lastLine()?{from:st.head,to:Ln(st.head.line+1,0)}:{from:st.head,to:Ln(st.head.line,dt)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Ca(it,function(st){return{from:Ln(st.from().line,0),to:_e(it.doc,Ln(st.to().line+1,0))}})},delLineLeft:function(it){return Ca(it,function(st){return{from:Ln(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Ca(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ct=it.coordsChar({left:0,top:dt},"div");return{from:ct,to:st.from()}})},delWrappedLineRight:function(it){return Ca(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ct=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div");return{from:st.from(),to:ct}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Ln(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ln(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return Kc(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Qf(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return Gc(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div")},Hn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:dt},"div")},Hn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5,ct=it.coordsChar({left:0,top:dt},"div");return ct.ch<it.getLine(ct.line).search(/\S/)?Qf(it,st.head):ct},Hn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],dt=it.listSelections(),ct=it.options.tabSize,gt=0;gt<dt.length;gt++){var Nt=dt[gt].from(),Rt=ie(it.getLine(Nt.line),Nt.ch,ct);st.push(Me(ct-Rt%ct))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return _i(it,function(){for(var st=it.listSelections(),dt=[],ct=0;ct<st.length;ct++)if(st[ct].empty()){var gt=st[ct].head,Nt=Cn(it.doc,gt.line).text;if(Nt){if(gt.ch==Nt.length&&(gt=new Ln(gt.line,gt.ch-1)),gt.ch>0)gt=new Ln(gt.line,gt.ch+1),it.replaceRange(Nt.charAt(gt.ch-1)+Nt.charAt(gt.ch-2),Ln(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Rt=Cn(it.doc,gt.line-1).text;Rt&&(gt=new Ln(gt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Rt.charAt(Rt.length-1),Ln(gt.line-1,Rt.length-1),gt,"+transpose"))}}dt.push(new Kr(gt,gt))}it.setSelections(dt)})},newlineAndIndent:function(it){return _i(it,function(){for(var st=it.listSelections(),dt=st.length-1;dt>=0;dt--)it.replaceRange(it.doc.lineSeparator(),st[dt].anchor,st[dt].head,"+input");st=it.listSelections();for(var ct=0;ct<st.length;ct++)it.indentLine(st[ct].from().line,null,!0);bA(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function Kc(it,st){var dt=Cn(it.doc,st),ct=ki(dt);return ct!=dt&&(st=Ge(ct)),th(!0,it,ct,st,1)}function Gc(it,st){var dt=Cn(it.doc,st),ct=Tr(dt);return ct!=dt&&(st=Ge(ct)),th(!0,it,dt,st,-1)}function Qf(it,st){var dt=Kc(it,st.line),ct=Cn(it.doc,dt.line),gt=Kn(ct,it.doc.direction);if(!gt||gt[0].level==0){var Nt=Math.max(dt.ch,ct.text.search(/\S/)),Rt=st.line==dt.line&&st.ch<=Nt&&st.ch;return Ln(dt.line,Rt?0:Nt,dt.sticky)}return dt}function jc(it,st,dt){if(typeof st=="string"&&(st=Yh[st],!st))return!1;it.display.input.ensurePolled();var ct=it.display.shift,gt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),dt&&(it.display.shift=!1),gt=st(it)!=Xn}finally{it.display.shift=ct,it.state.suppressEdits=!1}return gt}function Of(it,st,dt){for(var ct=0;ct<it.state.keyMaps.length;ct++){var gt=Eo(st,it.state.keyMaps[ct],dt,it);if(gt)return gt}return it.options.extraKeys&&Eo(st,it.options.extraKeys,dt,it)||Eo(st,it.options.keyMap,dt,it)}var eh=new zt;function xc(it,st,dt,ct){var gt=it.state.keySeq;if(gt){if(Oa(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:eh.set(50,function(){it.state.keySeq==gt&&(it.state.keySeq=null,it.display.input.reset())}),bd(it,gt+" "+st,dt,ct))return!0}return bd(it,st,dt,ct)}function bd(it,st,dt,ct){var gt=Of(it,st,ct);return gt=="multi"&&(it.state.keySeq=st),gt=="handled"&&nr(it,"keyHandled",it,st,dt),(gt=="handled"||gt=="multi")&&(xr(dt),Bs(it)),!!gt}function Td(it,st){var dt=al(st,!0);return dt?st.shiftKey&&!it.state.keySeq?xc(it,"Shift-"+dt,st,function(ct){return jc(it,ct,!0)})||xc(it,dt,st,function(ct){if(typeof ct=="string"?/^go[A-Z]/.test(ct):ct.motion)return jc(it,ct)}):xc(it,dt,st,function(ct){return jc(it,ct)}):!1}function Nd(it,st,dt){return xc(it,"'"+dt+"'",st,function(ct){return jc(it,ct,!0)})}var Xh=null;function Dd(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=je(),!wi(st,it))){ge&&Ut<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;st.display.shift=dt==16||it.shiftKey;var ct=Td(st,it);se&&(Xh=ct?dt:null,!ct&&dt==88&&!jn&&(ut?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),xt&&!ut&&!ct&&dt==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),dt==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Hf(st)}}function Hf(it){var st=it.display.lineDiv;He(st,"CodeMirror-crosshair");function dt(ct){(ct.keyCode==18||!ct.altKey)&&(Ht(st,"CodeMirror-crosshair"),rr(document,"keyup",dt),rr(document,"mouseover",dt))}ti(document,"keyup",dt),ti(document,"mouseover",dt)}function Rf(it){it.keyCode==16&&(this.doc.sel.shift=!1),wi(this,it)}function UA(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!($r(st.display,it)||wi(st,it)||it.ctrlKey&&!it.altKey||ut&&it.metaKey)){var dt=it.keyCode,ct=it.charCode;if(se&&dt==Xh){Xh=null,xr(it);return}if(!(se&&(!it.which||it.which<10)&&Td(st,it))){var gt=String.fromCharCode(ct==null?dt:ct);gt!="\b"&&(Nd(st,it,gt)||st.display.input.onKeyPress(it))}}}var yg=400,zc=function(it,st,dt){this.time=it,this.pos=st,this.button=dt};zc.prototype.compare=function(it,st,dt){return this.time+yg>it&&Ui(st,this.pos)==0&&dt==this.button};var Mh,Bc;function hf(it,st){var dt=+new Date;return Bc&&Bc.compare(dt,it,st)?(Mh=Bc=null,"triple"):Mh&&Mh.compare(dt,it,st)?(Bc=new zc(dt,it,st),Mh=null,"double"):(Mh=new zc(dt,it,st),Bc=null,"single")}function oA(it){var st=this,dt=st.display;if(!(wi(st,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,$r(dt,it)){jt||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!ff(st,it)){var ct=cl(st,it),gt=Bo(it),Nt=ct?hf(ct,gt):"single";window.focus(),gt==1&&st.state.selectingText&&st.state.selectingText(it),!(ct&&cf(st,gt,ct,Nt,it))&&(gt==1?ct?_f(st,ct,Nt,it):Sr(it)==dt.scroller&&xr(it):gt==2?(ct&&mA(st.doc,ct),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(bt?st.display.input.onContextMenu(it):ra(st)))}}}function cf(it,st,dt,ct,gt){var Nt="Click";return ct=="double"?Nt="Double"+Nt:ct=="triple"&&(Nt="Triple"+Nt),Nt=(st==1?"Left":st==2?"Middle":"Right")+Nt,xc(it,Il(Nt,gt),gt,function(Rt){if(typeof Rt=="string"&&(Rt=Yh[Rt]),!Rt)return!1;var $t=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),$t=Rt(it,dt)!=Xn}finally{it.state.suppressEdits=!1}return $t})}function Id(it,st,dt){var ct=it.getOption("configureMouse"),gt=ct?ct(it,st,dt):{};if(gt.unit==null){var Nt=at?dt.shiftKey&&dt.metaKey:dt.altKey;gt.unit=Nt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(gt.extend==null||it.doc.extend)&&(gt.extend=it.doc.extend||dt.shiftKey),gt.addNew==null&&(gt.addNew=ut?dt.metaKey:dt.ctrlKey),gt.moveOnDrag==null&&(gt.moveOnDrag=!(ut?dt.altKey:dt.ctrlKey)),gt}function _f(it,st,dt,ct){ge?setTimeout(Yn(Qs,it),0):it.curOp.focus=je();var gt=Id(it,dt,ct),Nt=it.doc.sel,Rt;it.options.dragDrop&&er&&!it.isReadOnly()&&dt=="single"&&(Rt=Nt.contains(st))>-1&&(Ui((Rt=Nt.ranges[Rt]).from(),st)<0||st.xRel>0)&&(Ui(Rt.to(),st)>0||st.xRel<0)?Kf(it,ct,st,gt):wg(it,ct,st,gt)}function Kf(it,st,dt,ct){var gt=it.display,Nt=!1,Rt=Cr(it,function(fe){jt&&(gt.scroller.draggable=!1),it.state.draggingText=!1,rr(gt.wrapper.ownerDocument,"mouseup",Rt),rr(gt.wrapper.ownerDocument,"mousemove",$t),rr(gt.scroller,"dragstart",Jt),rr(gt.scroller,"drop",Rt),Nt||(xr(fe),ct.addNew||mA(it.doc,dt,null,null,ct.extend),jt&&!ke||ge&&Ut==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),$t=function(fe){Nt=Nt||Math.abs(st.clientX-fe.clientX)+Math.abs(st.clientY-fe.clientY)>=10},Jt=function(){return Nt=!0};jt&&(gt.scroller.draggable=!0),it.state.draggingText=Rt,Rt.copy=!ct.moveOnDrag,gt.scroller.dragDrop&&gt.scroller.dragDrop(),ti(gt.wrapper.ownerDocument,"mouseup",Rt),ti(gt.wrapper.ownerDocument,"mousemove",$t),ti(gt.scroller,"dragstart",Jt),ti(gt.scroller,"drop",Rt),ra(it),setTimeout(function(){return gt.input.focus()},20)}function Vc(it,st,dt){if(dt=="char")return new Kr(st,st);if(dt=="word")return it.findWordAt(st);if(dt=="line")return new Kr(Ln(st.line,0),_e(it.doc,Ln(st.line+1,0)));var ct=dt(it,st);return new Kr(ct.from,ct.to)}function wg(it,st,dt,ct){var gt=it.display,Nt=it.doc;xr(st);var Rt,$t,Jt=Nt.sel,fe=Jt.ranges;if(ct.addNew&&!ct.extend?($t=Nt.sel.contains(dt),$t>-1?Rt=fe[$t]:Rt=new Kr(dt,dt)):(Rt=Nt.sel.primary(),$t=Nt.sel.primIndex),ct.unit=="rectangle")ct.addNew||(Rt=new Kr(dt,dt)),dt=cl(it,st,!0,!0),$t=-1;else{var qe=Vc(it,dt,ct.unit);ct.extend?Rt=xh(Rt,qe.anchor,qe.head,ct.extend):Rt=qe}ct.addNew?$t==-1?($t=fe.length,Hs(Nt,No(it,fe.concat([Rt]),$t),{scroll:!1,origin:"*mouse"})):fe.length>1&&fe[$t].empty()&&ct.unit=="char"&&!ct.extend?(Hs(Nt,No(it,fe.slice(0,$t).concat(fe.slice($t+1)),0),{scroll:!1,origin:"*mouse"}),Jt=Nt.sel):vA(Nt,$t,Rt,In):($t=0,Hs(Nt,new Ro([Rt],0),In),Jt=Nt.sel);var we=dt;function yn(mr){if(Ui(we,mr)!=0)if(we=mr,ct.unit=="rectangle"){for(var Hr=[],vo=it.options.tabSize,pr=ie(Cn(Nt,dt.line).text,dt.ch,vo),Qo=ie(Cn(Nt,mr.line).text,mr.ch,vo),ca=Math.min(pr,Qo),ll=Math.max(pr,Qo),Pa=Math.min(dt.line,mr.line),fu=Math.min(it.lastLine(),Math.max(dt.line,mr.line));Pa<=fu;Pa++){var gl=Cn(Nt,Pa).text,$a=li(gl,ca,vo);ca==ll?Hr.push(new Kr(Ln(Pa,$a),Ln(Pa,$a))):gl.length>$a&&Hr.push(new Kr(Ln(Pa,$a),Ln(Pa,li(gl,ll,vo))))}Hr.length||Hr.push(new Kr(dt,dt)),Hs(Nt,No(it,Jt.ranges.slice(0,$t).concat(Hr),$t),{origin:"*mouse",scroll:!1}),it.scrollIntoView(mr)}else{var eu=Rt,Bl=Vc(it,mr,ct.unit),dr=eu.anchor,ls;Ui(Bl.anchor,dr)>0?(ls=Bl.head,dr=ve(eu.from(),Bl.anchor)):(ls=Bl.anchor,dr=Ke(eu.to(),Bl.head));var da=Jt.ranges.slice(0);da[$t]=Gf(it,new Kr(_e(Nt,dr),ls)),Hs(Nt,No(it,da,$t),In)}}var pn=gt.wrapper.getBoundingClientRect(),Ai=0;function vi(mr){var Hr=++Ai,vo=cl(it,mr,!0,ct.unit=="rectangle");if(vo)if(Ui(vo,we)!=0){it.curOp.focus=je(),yn(vo);var pr=Ho(gt,Nt);(vo.line>=pr.to||vo.line<pr.from)&&setTimeout(Cr(it,function(){Ai==Hr&&vi(mr)}),150)}else{var Qo=mr.clientY<pn.top?-20:mr.clientY>pn.bottom?20:0;Qo&&setTimeout(Cr(it,function(){Ai==Hr&&(gt.scroller.scrollTop+=Qo,vi(mr))}),50)}}function Di(mr){it.state.selectingText=!1,Ai=1/0,mr&&(xr(mr),gt.input.focus()),rr(gt.wrapper.ownerDocument,"mousemove",Yi),rr(gt.wrapper.ownerDocument,"mouseup",Fr),Nt.history.lastSelOrigin=null}var Yi=Cr(it,function(mr){mr.buttons===0||!Bo(mr)?Di(mr):vi(mr)}),Fr=Cr(it,Di);it.state.selectingText=Fr,ti(gt.wrapper.ownerDocument,"mousemove",Yi),ti(gt.wrapper.ownerDocument,"mouseup",Fr)}function Gf(it,st){var dt=st.anchor,ct=st.head,gt=Cn(it.doc,dt.line);if(Ui(dt,ct)==0&&dt.sticky==ct.sticky)return st;var Nt=Kn(gt);if(!Nt)return st;var Rt=Re(Nt,dt.ch,dt.sticky),$t=Nt[Rt];if($t.from!=dt.ch&&$t.to!=dt.ch)return st;var Jt=Rt+($t.from==dt.ch==($t.level!=1)?0:1);if(Jt==0||Jt==Nt.length)return st;var fe;if(ct.line!=dt.line)fe=(ct.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var qe=Re(Nt,ct.ch,ct.sticky),we=qe-Rt||(ct.ch-dt.ch)*($t.level==1?-1:1);qe==Jt-1||qe==Jt?fe=we<0:fe=we>0}var yn=Nt[Jt+(fe?-1:0)],pn=fe==(yn.level==1),Ai=pn?yn.from:yn.to,vi=pn?"after":"before";return dt.ch==Ai&&dt.sticky==vi?st:new Kr(new Ln(dt.line,Ai,vi),ct)}function df(it,st,dt,ct){var gt,Nt;if(st.touches)gt=st.touches[0].clientX,Nt=st.touches[0].clientY;else try{gt=st.clientX,Nt=st.clientY}catch(yn){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ct&&xr(st);var Rt=it.display,$t=Rt.lineDiv.getBoundingClientRect();if(Nt>$t.bottom||!ji(it,dt))return Ii(st);Nt-=$t.top-Rt.viewOffset;for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var fe=Rt.gutters.childNodes[Jt];if(fe&&fe.getBoundingClientRect().right>=gt){var qe=Si(it.doc,Nt),we=it.display.gutterSpecs[Jt];return xi(it,dt,it,qe,we.className,st),Ii(st)}}}function ff(it,st){return df(it,st,"gutterClick",!0)}function Ud(it,st){$r(it.display,st)||Cc(it,st)||wi(it,st,"contextmenu")||bt||it.display.input.onContextMenu(st)}function Cc(it,st){return ji(it,"gutterContextMenu")?df(it,st,"gutterContextMenu",!1):!1}function Wc(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ml(it)}var QA={toString:function(){return"CodeMirror.Init"}},jf={},Qd={};function Sg(it){var st=it.optionHandlers;function dt(ct,gt,Nt,Rt){it.defaults[ct]=gt,Nt&&(st[ct]=Rt?function($t,Jt,fe){fe!=QA&&Nt($t,Jt,fe)}:Nt)}it.defineOption=dt,it.Init=QA,dt("value","",function(ct,gt){return ct.setValue(gt)},!0),dt("mode",null,function(ct,gt){ct.doc.modeOption=gt,so(ct)},!0),dt("indentUnit",2,so,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ct){Nl(ct),Ml(ct),Us(ct)},!0),dt("lineSeparator",null,function(ct,gt){if(ct.doc.lineSep=gt,!!gt){var Nt=[],Rt=ct.doc.first;ct.doc.iter(function(Jt){for(var fe=0;;){var qe=Jt.text.indexOf(gt,fe);if(qe==-1)break;fe=qe+gt.length,Nt.push(Ln(Rt,qe))}Rt++});for(var $t=Nt.length-1;$t>=0;$t--)yA(ct.doc,gt,Nt[$t],Ln(Nt[$t].line,Nt[$t].ch+gt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ct,gt,Nt){ct.state.specialChars=new RegExp(gt.source+(gt.test(" ")?"":"| "),"g"),Nt!=QA&&ct.refresh()}),dt("specialCharPlaceholder",il,function(ct){return ct.refresh()},!0),dt("electricChars",!0),dt("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),dt("spellcheck",!1,function(ct,gt){return ct.getInputField().spellcheck=gt},!0),dt("autocorrect",!1,function(ct,gt){return ct.getInputField().autocorrect=gt},!0),dt("autocapitalize",!1,function(ct,gt){return ct.getInputField().autocapitalize=gt},!0),dt("rtlMoveVisually",!ht),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ct){Wc(ct),Os(ct)},!0),dt("keyMap","default",function(ct,gt,Nt){var Rt=sa(gt),$t=Nt!=QA&&sa(Nt);$t&&$t.detach&&$t.detach(ct,Rt),Rt.attach&&Rt.attach(ct,$t||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,zf,!0),dt("gutters",[],function(ct,gt){ct.display.gutterSpecs=hs(gt,ct.options.lineNumbers),Os(ct)},!0),dt("fixedGutter",!0,function(ct,gt){ct.display.gutters.style.left=gt?fA(ct.display)+"px":"0",ct.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ct){return xn(ct)},!0),dt("scrollbarStyle","native",function(ct){gi(ct),xn(ct),ct.display.scrollbars.setScrollTop(ct.doc.scrollTop),ct.display.scrollbars.setScrollLeft(ct.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ct,gt){ct.display.gutterSpecs=hs(ct.options.gutters,gt),Os(ct)},!0),dt("firstLineNumber",1,Os,!0),dt("lineNumberFormatter",function(ct){return ct},Os,!0),dt("showCursorWhenSelecting",!1,La,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ct,gt){gt=="nocursor"&&(wh(ct),ct.display.input.blur()),ct.display.input.readOnlyChanged(gt)}),dt("screenReaderLabel",null,function(ct,gt){gt=gt===""?null:gt,ct.display.input.screenReaderLabelChanged(gt)}),dt("disableInput",!1,function(ct,gt){gt||ct.display.input.reset()},!0),dt("dragDrop",!0,gf),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,La,!0),dt("singleCursorHeightPerLine",!0,La,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,Nl,!0),dt("addModeClass",!1,Nl,!0),dt("pollInterval",100),dt("undoDepth",200,function(ct,gt){return ct.doc.history.undoDepth=gt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ct){return ct.refresh()},!0),dt("maxHighlightLength",1e4,Nl,!0),dt("moveInputWithCursor",!0,function(ct,gt){gt||ct.display.input.resetPosition()}),dt("tabindex",null,function(ct,gt){return ct.display.input.getField().tabIndex=gt||""}),dt("autofocus",null),dt("direction","ltr",function(ct,gt){return ct.doc.setDirection(gt)},!0),dt("phrases",null)}function gf(it,st,dt){var ct=dt&&dt!=QA;if(!st!=!ct){var gt=it.display.dragFunctions,Nt=st?ti:rr;Nt(it.display.scroller,"dragstart",gt.start),Nt(it.display.scroller,"dragenter",gt.enter),Nt(it.display.scroller,"dragover",gt.over),Nt(it.display.scroller,"dragleave",gt.leave),Nt(it.display.scroller,"drop",gt.drop)}}function zf(it){it.options.lineWrapping?(He(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ht(it.display.wrapper,"CodeMirror-wrap"),Go(it)),Gr(it),Us(it),Ml(it),setTimeout(function(){return xn(it)},100)}function ds(it,st){var dt=this;if(!(this instanceof ds))return new ds(it,st);this.options=st=st?di(st):{},di(jf,st,!1);var ct=st.value;typeof ct=="string"?ct=new qa(ct,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ct.modeOption=st.mode),this.doc=ct;var gt=new ds.inputStyles[st.inputStyle](this),Nt=this.display=new ja(it,ct,gt,st);Nt.wrapper.CodeMirror=this,Wc(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),gi(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 zt,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),ge&&Ut<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Pc(this),xl(),oi(this),this.curOp.forceUpdate=!0,qo(this,ct),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&ts(dt)},20):wh(this);for(var Rt in Qd)Qd.hasOwnProperty(Rt)&&Qd[Rt](this,st[Rt],QA);mo(this),st.finishInit&&st.finishInit(this);for(var $t=0;$t<Jh.length;++$t)Jh[$t](this);ni(this),jt&&st.lineWrapping&&getComputedStyle(Nt.lineDiv).textRendering=="optimizelegibility"&&(Nt.lineDiv.style.textRendering="auto")}ds.defaults=jf,ds.optionHandlers=Qd;function Pc(it){var st=it.display;ti(st.scroller,"mousedown",Cr(it,oA)),ge&&Ut<11?ti(st.scroller,"dblclick",Cr(it,function(Jt){if(!wi(it,Jt)){var fe=cl(it,Jt);if(!(!fe||ff(it,Jt)||$r(it.display,Jt))){xr(Jt);var qe=it.findWordAt(fe);mA(it.doc,qe.anchor,qe.head)}}})):ti(st.scroller,"dblclick",function(Jt){return wi(it,Jt)||xr(Jt)}),ti(st.scroller,"contextmenu",function(Jt){return Ud(it,Jt)}),ti(st.input.getField(),"contextmenu",function(Jt){st.scroller.contains(Jt.target)||Ud(it,Jt)});var dt,ct={end:0};function gt(){st.activeTouch&&(dt=setTimeout(function(){return st.activeTouch=null},1e3),ct=st.activeTouch,ct.end=+new Date)}function Nt(Jt){if(Jt.touches.length!=1)return!1;var fe=Jt.touches[0];return fe.radiusX<=1&&fe.radiusY<=1}function Rt(Jt,fe){if(fe.left==null)return!0;var qe=fe.left-Jt.left,we=fe.top-Jt.top;return qe*qe+we*we>20*20}ti(st.scroller,"touchstart",function(Jt){if(!wi(it,Jt)&&!Nt(Jt)&&!ff(it,Jt)){st.input.ensurePolled(),clearTimeout(dt);var fe=+new Date;st.activeTouch={start:fe,moved:!1,prev:fe-ct.end<=300?ct:null},Jt.touches.length==1&&(st.activeTouch.left=Jt.touches[0].pageX,st.activeTouch.top=Jt.touches[0].pageY)}}),ti(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),ti(st.scroller,"touchend",function(Jt){var fe=st.activeTouch;if(fe&&!$r(st,Jt)&&fe.left!=null&&!fe.moved&&new Date-fe.start<300){var qe=it.coordsChar(st.activeTouch,"page"),we;!fe.prev||Rt(fe,fe.prev)?we=new Kr(qe,qe):!fe.prev.prev||Rt(fe,fe.prev.prev)?we=it.findWordAt(qe):we=new Kr(Ln(qe.line,0),_e(it.doc,Ln(qe.line+1,0))),it.setSelection(we.anchor,we.head),it.focus(),xr(Jt)}gt()}),ti(st.scroller,"touchcancel",gt),ti(st.scroller,"scroll",function(){st.scroller.clientHeight&&(me(it,st.scroller.scrollTop),Be(it,st.scroller.scrollLeft,!0),xi(it,"scroll",it))}),ti(st.scroller,"mousewheel",function(Jt){return cs(it,Jt)}),ti(st.scroller,"DOMMouseScroll",function(Jt){return cs(it,Jt)}),ti(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Jt){wi(it,Jt)||br(Jt)},over:function(Jt){wi(it,Jt)||(Hc(it,Jt),br(Jt))},start:function(Jt){return Ph(it,Jt)},drop:Cr(it,wc),leave:function(Jt){wi(it,Jt)||Rc(it)}};var $t=st.input.getField();ti($t,"keyup",function(Jt){return Rf.call(it,Jt)}),ti($t,"keydown",Cr(it,Dd)),ti($t,"keypress",Cr(it,UA)),ti($t,"focus",function(Jt){return ts(it,Jt)}),ti($t,"blur",function(Jt){return wh(it,Jt)})}var Jh=[];ds.defineInitHook=function(it){return Jh.push(it)};function Za(it,st,dt,ct){var gt=it.doc,Nt;dt==null&&(dt="add"),dt=="smart"&&(gt.mode.indent?Nt=Ji(it,st).state:dt="prev");var Rt=it.options.tabSize,$t=Cn(gt,st),Jt=ie($t.text,null,Rt);$t.stateAfter&&($t.stateAfter=null);var fe=$t.text.match(/^\s*/)[0],qe;if(!ct&&!/\S/.test($t.text))qe=0,dt="not";else if(dt=="smart"&&(qe=gt.mode.indent(Nt,$t.text.slice(fe.length),$t.text),qe==Xn||qe>150)){if(!ct)return;dt="prev"}dt=="prev"?st>gt.first?qe=ie(Cn(gt,st-1).text,null,Rt):qe=0:dt=="add"?qe=Jt+it.options.indentUnit:dt=="subtract"?qe=Jt-it.options.indentUnit:typeof dt=="number"&&(qe=Jt+dt),qe=Math.max(0,qe);var we="",yn=0;if(it.options.indentWithTabs)for(var pn=Math.floor(qe/Rt);pn;--pn)yn+=Rt,we+=" ";if(yn<qe&&(we+=Me(qe-yn)),we!=fe)return yA(gt,we,Ln(st,0),Ln(st,fe.length),"+input"),$t.stateAfter=null,!0;for(var Ai=0;Ai<gt.sel.ranges.length;Ai++){var vi=gt.sel.ranges[Ai];if(vi.head.line==st&&vi.head.ch<fe.length){var Di=Ln(st,fe.length);vA(gt,Ai,new Kr(Di,Di));break}}}var tu=null;function qh(it){tu=it}function Od(it,st,dt,ct,gt){var Nt=it.doc;it.display.shift=!1,ct||(ct=Nt.sel);var Rt=+new Date-200,$t=gt=="paste"||it.state.pasteIncoming>Rt,Jt=Pn(st),fe=null;if($t&&ct.ranges.length>1)if(tu&&tu.text.join(`
`)==st){if(ct.ranges.length%tu.text.length==0){fe=[];for(var qe=0;qe<tu.text.length;qe++)fe.push(Nt.splitLines(tu.text[qe]))}}else Jt.length==ct.ranges.length&&it.options.pasteLinesPerSelection&&(fe=Dn(Jt,function(Yi){return[Yi]}));for(var we=it.curOp.updateInput,yn=ct.ranges.length-1;yn>=0;yn--){var pn=ct.ranges[yn],Ai=pn.from(),vi=pn.to();pn.empty()&&(dt&&dt>0?Ai=Ln(Ai.line,Ai.ch-dt):it.state.overwrite&&!$t?vi=Ln(vi.line,Math.min(Cn(Nt,vi.line).text.length,vi.ch+rn(Jt).length)):$t&&tu&&tu.lineWise&&tu.text.join(`
`)==Jt.join(`
`)&&(Ai=vi=Ln(Ai.line,0)));var Di={from:Ai,to:vi,text:fe?fe[yn%fe.length]:Jt,origin:gt||($t?"paste":it.state.cutIncoming>Rt?"cut":"+input")};nA(it.doc,Di),nr(it,"inputRead",it,Di)}st&&!$t&&Yc(it,st),bA(it),it.curOp.updateInput<2&&(it.curOp.updateInput=we),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Zc(it,st){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&_i(st,function(){return Od(st,dt,0,null,"paste")}),!0}function Yc(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ct=dt.ranges.length-1;ct>=0;ct--){var gt=dt.ranges[ct];if(!(gt.head.ch>100||ct&&dt.ranges[ct-1].head.line==gt.head.line)){var Nt=it.getModeAt(gt.head),Rt=!1;if(Nt.electricChars){for(var $t=0;$t<Nt.electricChars.length;$t++)if(st.indexOf(Nt.electricChars.charAt($t))>-1){Rt=Za(it,gt.head.line,"smart");break}}else Nt.electricInput&&Nt.electricInput.test(Cn(it.doc,gt.head.line).text.slice(0,gt.head.ch))&&(Rt=Za(it,gt.head.line,"smart"));Rt&&nr(it,"electricInput",it,gt.head.line)}}}function pf(it){for(var st=[],dt=[],ct=0;ct<it.doc.sel.ranges.length;ct++){var gt=it.doc.sel.ranges[ct].head.line,Nt={anchor:Ln(gt,0),head:Ln(gt+1,0)};dt.push(Nt),st.push(it.getRange(Nt.anchor,Nt.head))}return{text:st,ranges:dt}}function mf(it,st,dt,ct){it.setAttribute("autocorrect",dt?"":"off"),it.setAttribute("autocapitalize",ct?"":"off"),it.setAttribute("spellcheck",!!st)}function Vf(){var it=te("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=te("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return jt?it.style.width="1000px":it.setAttribute("wrap","off"),Dt&&(it.style.border="1px solid black"),mf(it),st}function kh(it){var st=it.optionHandlers,dt=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ct,gt){var Nt=this.options,Rt=Nt[ct];Nt[ct]==gt&&ct!="mode"||(Nt[ct]=gt,st.hasOwnProperty(ct)&&Cr(this,st[ct])(this,gt,Rt),xi(this,"optionChange",this,ct))},getOption:function(ct){return this.options[ct]},getDoc:function(){return this.doc},addKeyMap:function(ct,gt){this.state.keyMaps[gt?"push":"unshift"](sa(ct))},removeKeyMap:function(ct){for(var gt=this.state.keyMaps,Nt=0;Nt<gt.length;++Nt)if(gt[Nt]==ct||gt[Nt].name==ct)return gt.splice(Nt,1),!0},addOverlay:eo(function(ct,gt){var Nt=ct.token?ct:it.getMode(this.options,ct);if(Nt.startState)throw new Error("Overlays may not be stateful.");sn(this.state.overlays,{mode:Nt,modeSpec:ct,opaque:gt&&gt.opaque,priority:gt&&gt.priority||0},function(Rt){return Rt.priority}),this.state.modeGen++,Us(this)}),removeOverlay:eo(function(ct){for(var gt=this.state.overlays,Nt=0;Nt<gt.length;++Nt){var Rt=gt[Nt].modeSpec;if(Rt==ct||typeof ct=="string"&&Rt.name==ct){gt.splice(Nt,1),this.state.modeGen++,Us(this);return}}}),indentLine:eo(function(ct,gt,Nt){typeof gt!="string"&&typeof gt!="number"&&(gt==null?gt=this.options.smartIndent?"smart":"prev":gt=gt?"add":"subtract"),Zi(this.doc,ct)&&Za(this,ct,gt,Nt)}),indentSelection:eo(function(ct){for(var gt=this.doc.sel.ranges,Nt=-1,Rt=0;Rt<gt.length;Rt++){var $t=gt[Rt];if($t.empty())$t.head.line>Nt&&(Za(this,$t.head.line,ct,!0),Nt=$t.head.line,Rt==this.doc.sel.primIndex&&bA(this));else{var Jt=$t.from(),fe=$t.to(),qe=Math.max(Nt,Jt.line);Nt=Math.min(this.lastLine(),fe.line-(fe.ch?0:1))+1;for(var we=qe;we<Nt;++we)Za(this,we,ct);var yn=this.doc.sel.ranges;Jt.ch==0&&gt.length==yn.length&&yn[Rt].from().ch>0&&vA(this.doc,Rt,new Kr(Jt,yn[Rt].to()),Ve)}}}),getTokenAt:function(ct,gt){return Nr(this,ct,gt)},getLineTokens:function(ct,gt){return Nr(this,Ln(ct),gt,!0)},getTokenTypeAt:function(ct){ct=_e(this.doc,ct);var gt=Gi(this,Cn(this.doc,ct.line)),Nt=0,Rt=(gt.length-1)/2,$t=ct.ch,Jt;if($t==0)Jt=gt[2];else for(;;){var fe=Nt+Rt>>1;if((fe?gt[fe*2-1]:0)>=$t)Rt=fe;else if(gt[fe*2+1]<$t)Nt=fe+1;else{Jt=gt[fe*2+2];break}}var qe=Jt?Jt.indexOf("overlay "):-1;return qe<0?Jt:qe==0?null:Jt.slice(0,qe-1)},getModeAt:function(ct){var gt=this.doc.mode;return gt.innerMode?it.innerMode(gt,this.getTokenAt(ct).state).mode:gt},getHelper:function(ct,gt){return this.getHelpers(ct,gt)[0]},getHelpers:function(ct,gt){var Nt=[];if(!dt.hasOwnProperty(gt))return Nt;var Rt=dt[gt],$t=this.getModeAt(ct);if(typeof $t[gt]=="string")Rt[$t[gt]]&&Nt.push(Rt[$t[gt]]);else if($t[gt])for(var Jt=0;Jt<$t[gt].length;Jt++){var fe=Rt[$t[gt][Jt]];fe&&Nt.push(fe)}else $t.helperType&&Rt[$t.helperType]?Nt.push(Rt[$t.helperType]):Rt[$t.name]&&Nt.push(Rt[$t.name]);for(var qe=0;qe<Rt._global.length;qe++){var we=Rt._global[qe];we.pred($t,this)&&We(Nt,we.val)==-1&&Nt.push(we.val)}return Nt},getStateAfter:function(ct,gt){var Nt=this.doc;return ct=Ee(Nt,ct==null?Nt.first+Nt.size-1:ct),Ji(this,ct+1,gt).state},cursorCoords:function(ct,gt){var Nt,Rt=this.doc.sel.primary();return ct==null?Nt=Rt.head:typeof ct=="object"?Nt=_e(this.doc,ct):Nt=ct?Rt.from():Rt.to(),ia(this,Nt,gt||"page")},charCoords:function(ct,gt){return kl(this,_e(this.doc,ct),gt||"page")},coordsChar:function(ct,gt){return ct=Gh(this,ct,gt||"page"),Ou(this,ct.left,ct.top)},lineAtHeight:function(ct,gt){return ct=Gh(this,{top:ct,left:0},gt||"page").top,Si(this.doc,ct+this.display.viewOffset)},heightAtLine:function(ct,gt,Nt){var Rt=!1,$t;if(typeof ct=="number"){var Jt=this.doc.first+this.doc.size-1;ct<this.doc.first?ct=this.doc.first:ct>Jt&&(ct=Jt,Rt=!0),$t=Cn(this.doc,ct)}else $t=ct;return Ba(this,$t,{top:0,left:0},gt||"page",Nt||Rt).top+(Rt?this.doc.height-Wr($t):0)},defaultTextHeight:function(){return $u(this.display)},defaultCharWidth:function(){return yh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ct,gt,Nt,Rt,$t){var Jt=this.display;ct=ia(this,_e(this.doc,ct));var fe=ct.bottom,qe=ct.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Jt.sizer.appendChild(gt),Rt=="over")fe=ct.top;else if(Rt=="above"||Rt=="near"){var we=Math.max(Jt.wrapper.clientHeight,this.doc.height),yn=Math.max(Jt.sizer.clientWidth,Jt.lineSpace.clientWidth);(Rt=="above"||ct.bottom+gt.offsetHeight>we)&&ct.top>gt.offsetHeight?fe=ct.top-gt.offsetHeight:ct.bottom+gt.offsetHeight<=we&&(fe=ct.bottom),qe+gt.offsetWidth>yn&&(qe=yn-gt.offsetWidth)}gt.style.top=fe+"px",gt.style.left=gt.style.right="",$t=="right"?(qe=Jt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):($t=="left"?qe=0:$t=="middle"&&(qe=(Jt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=qe+"px"),Nt&&vc(this,{left:qe,top:fe,right:qe+gt.offsetWidth,bottom:fe+gt.offsetHeight})},triggerOnKeyDown:eo(Dd),triggerOnKeyPress:eo(UA),triggerOnKeyUp:Rf,triggerOnMouseDown:eo(oA),execCommand:function(ct){if(Yh.hasOwnProperty(ct))return Yh[ct].call(null,this)},triggerElectric:eo(function(ct){Yc(this,ct)}),findPosH:function(ct,gt,Nt,Rt){var $t=1;gt<0&&($t=-1,gt=-gt);for(var Jt=_e(this.doc,ct),fe=0;fe<gt&&(Jt=Xc(this.doc,Jt,$t,Nt,Rt),!Jt.hitSide);++fe);return Jt},moveH:eo(function(ct,gt){var Nt=this;this.extendSelectionsBy(function(Rt){return Nt.display.shift||Nt.doc.extend||Rt.empty()?Xc(Nt.doc,Rt.head,ct,gt,Nt.options.rtlMoveVisually):ct<0?Rt.from():Rt.to()},Hn)}),deleteH:eo(function(ct,gt){var Nt=this.doc.sel,Rt=this.doc;Nt.somethingSelected()?Rt.replaceSelection("",null,"+delete"):Ca(this,function($t){var Jt=Xc(Rt,$t.head,ct,gt,!1);return ct<0?{from:Jt,to:$t.head}:{from:$t.head,to:Jt}})}),findPosV:function(ct,gt,Nt,Rt){var $t=1,Jt=Rt;gt<0&&($t=-1,gt=-gt);for(var fe=_e(this.doc,ct),qe=0;qe<gt;++qe){var we=ia(this,fe,"div");if(Jt==null?Jt=we.left:we.left=Jt,fe=$h(this,we,$t,Nt),fe.hitSide)break}return fe},moveV:eo(function(ct,gt){var Nt=this,Rt=this.doc,$t=[],Jt=!this.display.shift&&!Rt.extend&&Rt.sel.somethingSelected();if(Rt.extendSelectionsBy(function(qe){if(Jt)return ct<0?qe.from():qe.to();var we=ia(Nt,qe.head,"div");qe.goalColumn!=null&&(we.left=qe.goalColumn),$t.push(we.left);var yn=$h(Nt,we,ct,gt);return gt=="page"&&qe==Rt.sel.primary()&&Qc(Nt,kl(Nt,yn,"div").top-we.top),yn},Hn),$t.length)for(var fe=0;fe<Rt.sel.ranges.length;fe++)Rt.sel.ranges[fe].goalColumn=$t[fe]}),findWordAt:function(ct){var gt=this.doc,Nt=Cn(gt,ct.line).text,Rt=ct.ch,$t=ct.ch;if(Nt){var Jt=this.getHelper(ct,"wordChars");(ct.sticky=="before"||$t==Nt.length)&&Rt?--Rt:++$t;for(var fe=Nt.charAt(Rt),qe=kt(fe,Jt)?function(we){return kt(we,Jt)}:/\s/.test(fe)?function(we){return/\s/.test(we)}:function(we){return!/\s/.test(we)&&!kt(we)};Rt>0&&qe(Nt.charAt(Rt-1));)--Rt;for(;$t<Nt.length&&qe(Nt.charAt($t));)++$t}return new Kr(Ln(ct.line,Rt),Ln(ct.line,$t))},toggleOverwrite:function(ct){ct!=null&&ct==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?He(this.display.cursorDiv,"CodeMirror-overwrite"):Ht(this.display.cursorDiv,"CodeMirror-overwrite"),xi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==je()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:eo(function(ct,gt){tA(this,ct,gt)}),getScrollInfo:function(){var ct=this.display.scroller;return{left:ct.scrollLeft,top:ct.scrollTop,height:ct.scrollHeight-Xs(this)-this.display.barHeight,width:ct.scrollWidth-Xs(this)-this.display.barWidth,clientHeight:Ks(this),clientWidth:va(this)}},scrollIntoView:eo(function(ct,gt){ct==null?(ct={from:this.doc.sel.primary().head,to:null},gt==null&&(gt=this.options.cursorScrollMargin)):typeof ct=="number"?ct={from:Ln(ct,0),to:null}:ct.from==null&&(ct={from:ct,to:null}),ct.to||(ct.to=ct.from),ct.margin=gt||0,ct.from.line!=null?ss(this,ct):Zt(this,ct.from,ct.to,ct.margin)}),setSize:eo(function(ct,gt){var Nt=this,Rt=function(Jt){return typeof Jt=="number"||/^\d+$/.test(String(Jt))?Jt+"px":Jt};ct!=null&&(this.display.wrapper.style.width=Rt(ct)),gt!=null&&(this.display.wrapper.style.height=Rt(gt)),this.options.lineWrapping&&ea(this);var $t=this.display.viewFrom;this.doc.iter($t,this.display.viewTo,function(Jt){if(Jt.widgets){for(var fe=0;fe<Jt.widgets.length;fe++)if(Jt.widgets[fe].noHScroll){Fo(Nt,$t,"widget");break}}++$t}),this.curOp.forceUpdate=!0,xi(this,"refresh",this)}),operation:function(ct){return _i(this,ct)},startOperation:function(){return oi(this)},endOperation:function(){return ni(this)},refresh:eo(function(){var ct=this.display.cachedTextHeight;Us(this),this.curOp.forceUpdate=!0,Ml(this),tA(this,this.doc.scrollLeft,this.doc.scrollTop),Ao(this.display),(ct==null||Math.abs(ct-$u(this.display))>.5||this.options.lineWrapping)&&Gr(this),xi(this,"refresh",this)}),swapDoc:eo(function(ct){var gt=this.doc;return gt.cm=null,this.state.selectingText&&this.state.selectingText(),qo(this,ct),Ml(this),this.display.input.reset(),tA(this,ct.scrollLeft,ct.scrollTop),this.curOp.forceScroll=!0,nr(this,"swapDoc",this,gt),gt}),phrase:function(ct){var gt=this.options.phrases;return gt&&Object.prototype.hasOwnProperty.call(gt,ct)?gt[ct]:ct},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yr(it),it.registerHelper=function(ct,gt,Nt){dt.hasOwnProperty(ct)||(dt[ct]=it[ct]={_global:[]}),dt[ct][gt]=Nt},it.registerGlobalHelper=function(ct,gt,Nt,Rt){it.registerHelper(ct,gt,Rt),dt[ct]._global.push({pred:Nt,val:Rt})}}function Xc(it,st,dt,ct,gt){var Nt=st,Rt=dt,$t=Cn(it,st.line),Jt=gt&&it.direction=="rtl"?-dt:dt;function fe(){var Fr=st.line+Jt;return Fr<it.first||Fr>=it.first+it.size?!1:(st=new Ln(Fr,st.ch,st.sticky),$t=Cn(it,Fr))}function qe(Fr){var mr;if(ct=="codepoint"){var Hr=$t.text.charCodeAt(st.ch+(ct>0?0:-1));isNaN(Hr)?mr=null:mr=new Ln(st.line,Math.max(0,Math.min($t.text.length,st.ch+dt*(Hr>=55296&&Hr<56320?2:1))),-dt)}else gt?mr=_c(it.cm,$t,st,dt):mr=aa($t,st,dt);if(mr==null)if(!Fr&&fe())st=th(gt,it.cm,$t,st.line,Jt);else return!1;else st=mr;return!0}if(ct=="char"||ct=="codepoint")qe();else if(ct=="column")qe(!0);else if(ct=="word"||ct=="group")for(var we=null,yn=ct=="group",pn=it.cm&&it.cm.getHelper(st,"wordChars"),Ai=!0;!(dt<0&&!qe(!Ai));Ai=!1){var vi=$t.text.charAt(st.ch)||`
`,Di=kt(vi,pn)?"w":yn&&vi==`
`?"n":!yn||/\s/.test(vi)?null:"p";if(yn&&!Ai&&!Di&&(Di="s"),we&&we!=Di){dt<0&&(dt=1,qe(),st.sticky="after");break}if(Di&&(we=Di),dt>0&&!qe(!Ai))break}var Yi=Bh(it,st,Nt,Rt,!0);return pe(Nt,Yi)&&(Yi.hitSide=!0),Yi}function $h(it,st,dt,ct){var gt=it.doc,Nt=st.left,Rt;if(ct=="page"){var $t=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Jt=Math.max($t-.5*$u(it.display),3);Rt=(dt>0?st.bottom:st.top)+dt*Jt}else ct=="line"&&(Rt=dt>0?st.bottom+3:st.top-3);for(var fe;fe=Ou(it,Nt,Rt),!!fe.outside;){if(dt<0?Rt<=0:Rt>=gt.height){fe.hitSide=!0;break}Rt+=dt*5}return fe}var Gs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new zt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gs.prototype.init=function(it){var st=this,dt=this,ct=dt.cm,gt=dt.div=it.lineDiv;mf(gt,ct.options.spellcheck,ct.options.autocorrect,ct.options.autocapitalize);function Nt($t){for(var Jt=$t.target;Jt;Jt=Jt.parentNode){if(Jt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Jt.className))break}return!1}ti(gt,"paste",function($t){!Nt($t)||wi(ct,$t)||Zc($t,ct)||Ut<=11&&setTimeout(Cr(ct,function(){return st.updateFromDOM()}),20)}),ti(gt,"compositionstart",function($t){st.composing={data:$t.data,done:!1}}),ti(gt,"compositionupdate",function($t){st.composing||(st.composing={data:$t.data,done:!1})}),ti(gt,"compositionend",function($t){st.composing&&($t.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),ti(gt,"touchstart",function(){return dt.forceCompositionEnd()}),ti(gt,"input",function(){st.composing||st.readFromDOMSoon()});function Rt($t){if(!(!Nt($t)||wi(ct,$t))){if(ct.somethingSelected())qh({lineWise:!1,text:ct.getSelections()}),$t.type=="cut"&&ct.replaceSelection("",null,"cut");else if(ct.options.lineWiseCopyCut){var Jt=pf(ct);qh({lineWise:!0,text:Jt.text}),$t.type=="cut"&&ct.operation(function(){ct.setSelections(Jt.ranges,0,Ve),ct.replaceSelection("",null,"cut")})}else return;if($t.clipboardData){$t.clipboardData.clearData();var fe=tu.text.join(`
`);if($t.clipboardData.setData("Text",fe),$t.clipboardData.getData("Text")==fe){$t.preventDefault();return}}var qe=Vf(),we=qe.firstChild;ct.display.lineSpace.insertBefore(qe,ct.display.lineSpace.firstChild),we.value=tu.text.join(`
`);var yn=document.activeElement;Gn(we),setTimeout(function(){ct.display.lineSpace.removeChild(qe),yn.focus(),yn==gt&&dt.showPrimarySelection()},50)}}ti(gt,"copy",Rt),ti(gt,"cut",Rt)},Gs.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Gs.prototype.prepareSelection=function(){var it=MA(this.cm,!1);return it.focus=document.activeElement==this.div,it},Gs.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Gs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gs.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,dt=st.doc.sel.primary(),ct=dt.from(),gt=dt.to();if(st.display.viewTo==st.display.viewFrom||ct.line>=st.display.viewTo||gt.line<st.display.viewFrom){it.removeAllRanges();return}var Nt=nh(st,it.anchorNode,it.anchorOffset),Rt=nh(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Rt&&!Rt.bad&&Ui(ve(Nt,Rt),ct)==0&&Ui(Ke(Nt,Rt),gt)==0)){var $t=st.display.view,Jt=ct.line>=st.display.viewFrom&&bh(st,ct)||{node:$t[0].measure.map[2],offset:0},fe=gt.line<st.display.viewTo&&bh(st,gt);if(!fe){var qe=$t[$t.length-1].measure,we=qe.maps?qe.maps[qe.maps.length-1]:qe.map;fe={node:we[we.length-1],offset:we[we.length-2]-we[we.length-3]}}if(!Jt||!fe){it.removeAllRanges();return}var yn=it.rangeCount&&it.getRangeAt(0),pn;try{pn=ce(Jt.node,Jt.offset,fe.offset,fe.node)}catch(Ai){}pn&&(!xt&&st.state.focused?(it.collapse(Jt.node,Jt.offset),pn.collapsed||(it.removeAllRanges(),it.addRange(pn))):(it.removeAllRanges(),it.addRange(pn)),yn&&it.anchorNode==null?it.addRange(yn):xt&&this.startGracePeriod()),this.rememberSelection()}},Gs.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Gs.prototype.showMultipleSelections=function(it){re(this.cm.display.cursorDiv,it.cursors),re(this.cm.display.selectionDiv,it.selection)},Gs.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Gs.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Qe(this.div,st)},Gs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gs.prototype.blur=function(){this.div.blur()},Gs.prototype.getField=function(){return this.div},Gs.prototype.supportsTouch=function(){return!0},Gs.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():_i(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Gs.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Gs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&Ae&&this.cm.display.gutterSpecs.length&&vf(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var dt=nh(st,it.anchorNode,it.anchorOffset),ct=nh(st,it.focusNode,it.focusOffset);dt&&ct&&_i(st,function(){Hs(st.doc,wa(dt,ct),Ve),(dt.bad||ct.bad)&&(st.curOp.selectionChanged=!0)})}}},Gs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,dt=it.doc.sel.primary(),ct=dt.from(),gt=dt.to();if(ct.ch==0&&ct.line>it.firstLine()&&(ct=Ln(ct.line-1,Cn(it.doc,ct.line-1).length)),gt.ch==Cn(it.doc,gt.line).text.length&&gt.line<it.lastLine()&&(gt=Ln(gt.line+1,0)),ct.line<st.viewFrom||gt.line>st.viewTo-1)return!1;var Nt,Rt,$t;ct.line==st.viewFrom||(Nt=Zl(it,ct.line))==0?(Rt=Ge(st.view[0].line),$t=st.view[0].node):(Rt=Ge(st.view[Nt].line),$t=st.view[Nt-1].node.nextSibling);var Jt=Zl(it,gt.line),fe,qe;if(Jt==st.view.length-1?(fe=st.viewTo-1,qe=st.lineDiv.lastChild):(fe=Ge(st.view[Jt+1].line)-1,qe=st.view[Jt+1].node.previousSibling),!$t)return!1;for(var we=it.doc.splitLines(SA(it,$t,qe,Rt,fe)),yn=Ti(it.doc,Ln(Rt,0),Ln(fe,Cn(it.doc,fe).text.length));we.length>1&&yn.length>1;)if(rn(we)==rn(yn))we.pop(),yn.pop(),fe--;else if(we[0]==yn[0])we.shift(),yn.shift(),Rt++;else break;for(var pn=0,Ai=0,vi=we[0],Di=yn[0],Yi=Math.min(vi.length,Di.length);pn<Yi&&vi.charCodeAt(pn)==Di.charCodeAt(pn);)++pn;for(var Fr=rn(we),mr=rn(yn),Hr=Math.min(Fr.length-(we.length==1?pn:0),mr.length-(yn.length==1?pn:0));Ai<Hr&&Fr.charCodeAt(Fr.length-Ai-1)==mr.charCodeAt(mr.length-Ai-1);)++Ai;if(we.length==1&&yn.length==1&&Rt==ct.line)for(;pn&&pn>ct.ch&&Fr.charCodeAt(Fr.length-Ai-1)==mr.charCodeAt(mr.length-Ai-1);)pn--,Ai++;we[we.length-1]=Fr.slice(0,Fr.length-Ai).replace(/^\u200b+/,""),we[0]=we[0].slice(pn).replace(/\u200b+$/,"");var vo=Ln(Rt,pn),pr=Ln(fe,yn.length?rn(yn).length-Ai:0);if(we.length>1||we[0]||Ui(vo,pr))return yA(it.doc,we,vo,pr,"+input"),!0},Gs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gs.prototype.reset=function(){this.forceCompositionEnd()},Gs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Gs.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Gs.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&_i(this.cm,function(){return Us(it.cm)})},Gs.prototype.setUneditable=function(it){it.contentEditable="false"},Gs.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Cr(this.cm,Od)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Gs.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Gs.prototype.onContextMenu=function(){},Gs.prototype.resetPosition=function(){},Gs.prototype.needsContentAttribute=!0;function bh(it,st){var dt=Wl(it,st.line);if(!dt||dt.hidden)return null;var ct=Cn(it.doc,st.line),gt=Ia(dt,ct,st.line),Nt=Kn(ct,it.doc.direction),Rt="left";if(Nt){var $t=Re(Nt,st.ch);Rt=$t%2?"right":"left"}var Jt=YA(gt.map,st.ch,Rt);return Jt.offset=Jt.collapse=="right"?Jt.end:Jt.start,Jt}function vf(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function ka(it,st){return st&&(it.bad=!0),it}function SA(it,st,dt,ct,gt){var Nt="",Rt=!1,$t=it.doc.lineSeparator(),Jt=!1;function fe(pn){return function(Ai){return Ai.id==pn}}function qe(){Rt&&(Nt+=$t,Jt&&(Nt+=$t),Rt=Jt=!1)}function we(pn){pn&&(qe(),Nt+=pn)}function yn(pn){if(pn.nodeType==1){var Ai=pn.getAttribute("cm-text");if(Ai){we(Ai);return}var vi=pn.getAttribute("cm-marker"),Di;if(vi){var Yi=it.findMarks(Ln(ct,0),Ln(gt+1,0),fe(+vi));Yi.length&&(Di=Yi[0].find(0))&&we(Ti(it.doc,Di.from,Di.to).join($t));return}if(pn.getAttribute("contenteditable")=="false")return;var Fr=/^(pre|div|p|li|table|br)$/i.test(pn.nodeName);if(!/^br$/i.test(pn.nodeName)&&pn.textContent.length==0)return;Fr&&qe();for(var mr=0;mr<pn.childNodes.length;mr++)yn(pn.childNodes[mr]);/^(pre|p)$/i.test(pn.nodeName)&&(Jt=!0),Fr&&(Rt=!0)}else pn.nodeType==3&&we(pn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(st),st!=dt;)st=st.nextSibling,Jt=!1;return Nt}function nh(it,st,dt){var ct;if(st==it.display.lineDiv){if(ct=it.display.lineDiv.childNodes[dt],!ct)return ka(it.clipPos(Ln(it.display.viewTo-1)),!0);st=null,dt=0}else for(ct=st;;ct=ct.parentNode){if(!ct||ct==it.display.lineDiv)return null;if(ct.parentNode&&ct.parentNode==it.display.lineDiv)break}for(var gt=0;gt<it.display.view.length;gt++){var Nt=it.display.view[gt];if(Nt.node==ct)return Th(Nt,st,dt)}}function Th(it,st,dt){var ct=it.text.firstChild,gt=!1;if(!st||!Qe(ct,st))return ka(Ln(Ge(it.line),0),!0);if(st==ct&&(gt=!0,st=ct.childNodes[dt],dt=0,!st)){var Nt=it.rest?rn(it.rest):it.line;return ka(Ln(Ge(Nt),Nt.text.length),gt)}var Rt=st.nodeType==3?st:null,$t=st;for(!Rt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Rt=st.firstChild,dt&&(dt=Rt.nodeValue.length));$t.parentNode!=ct;)$t=$t.parentNode;var Jt=it.measure,fe=Jt.maps;function qe(Di,Yi,Fr){for(var mr=-1;mr<(fe?fe.length:0);mr++)for(var Hr=mr<0?Jt.map:fe[mr],vo=0;vo<Hr.length;vo+=3){var pr=Hr[vo+2];if(pr==Di||pr==Yi){var Qo=Ge(mr<0?it.line:it.rest[mr]),ca=Hr[vo]+Fr;return(Fr<0||pr!=Di)&&(ca=Hr[vo+(Fr?1:0)]),Ln(Qo,ca)}}}var we=qe(Rt,$t,dt);if(we)return ka(we,gt);for(var yn=$t.nextSibling,pn=Rt?Rt.nodeValue.length-dt:0;yn;yn=yn.nextSibling){if(we=qe(yn,yn.firstChild,0),we)return ka(Ln(we.line,we.ch-pn),gt);pn+=yn.textContent.length}for(var Ai=$t.previousSibling,vi=dt;Ai;Ai=Ai.previousSibling){if(we=qe(Ai,Ai.firstChild,-1),we)return ka(Ln(we.line,we.ch+vi),gt);vi+=Ai.textContent.length}}var ha=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new zt,this.hasSelection=!1,this.composing=null};ha.prototype.init=function(it){var st=this,dt=this,ct=this.cm;this.createField(it);var gt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Dt&&(gt.style.width="0px"),ti(gt,"input",function(){ge&&Ut>=9&&st.hasSelection&&(st.hasSelection=null),dt.poll()}),ti(gt,"paste",function(Rt){wi(ct,Rt)||Zc(Rt,ct)||(ct.state.pasteIncoming=+new Date,dt.fastPoll())});function Nt(Rt){if(!wi(ct,Rt)){if(ct.somethingSelected())qh({lineWise:!1,text:ct.getSelections()});else if(ct.options.lineWiseCopyCut){var $t=pf(ct);qh({lineWise:!0,text:$t.text}),Rt.type=="cut"?ct.setSelections($t.ranges,null,Ve):(dt.prevInput="",gt.value=$t.text.join(`
`),Gn(gt))}else return;Rt.type=="cut"&&(ct.state.cutIncoming=+new Date)}}ti(gt,"cut",Nt),ti(gt,"copy",Nt),ti(it.scroller,"paste",function(Rt){if(!($r(it,Rt)||wi(ct,Rt))){if(!gt.dispatchEvent){ct.state.pasteIncoming=+new Date,dt.focus();return}var $t=new Event("paste");$t.clipboardData=Rt.clipboardData,gt.dispatchEvent($t)}}),ti(it.lineSpace,"selectstart",function(Rt){$r(it,Rt)||xr(Rt)}),ti(gt,"compositionstart",function(){var Rt=ct.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Rt,range:ct.markText(Rt,ct.getCursor("to"),{className:"CodeMirror-composing"})}}),ti(gt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},ha.prototype.createField=function(it){this.wrapper=Vf(),this.textarea=this.wrapper.firstChild},ha.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},ha.prototype.prepareSelection=function(){var it=this.cm,st=it.display,dt=it.doc,ct=MA(it);if(it.options.moveInputWithCursor){var gt=ia(it,dt.sel.primary().head,"div"),Nt=st.wrapper.getBoundingClientRect(),Rt=st.lineDiv.getBoundingClientRect();ct.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,gt.top+Rt.top-Nt.top)),ct.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,gt.left+Rt.left-Nt.left))}return ct},ha.prototype.showSelection=function(it){var st=this.cm,dt=st.display;re(dt.cursorDiv,it.cursors),re(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},ha.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var dt=st.getSelection();this.textarea.value=dt,st.state.focused&&Gn(this.textarea),ge&&Ut>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",ge&&Ut>=9&&(this.hasSelection=null))}},ha.prototype.getField=function(){return this.textarea},ha.prototype.supportsTouch=function(){return!1},ha.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||je()!=this.textarea))try{this.textarea.focus()}catch(it){}},ha.prototype.blur=function(){this.textarea.blur()},ha.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ha.prototype.receivedFocus=function(){this.slowPoll()},ha.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},ha.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function dt(){var ct=st.poll();!ct&&!it?(it=!0,st.polling.set(60,dt)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,dt)},ha.prototype.poll=function(){var it=this,st=this.cm,dt=this.textarea,ct=this.prevInput;if(this.contextMenuPending||!st.state.focused||Mt(dt)&&!ct&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var gt=dt.value;if(gt==ct&&!st.somethingSelected())return!1;if(ge&&Ut>=9&&this.hasSelection===gt||ut&&/[\uf700-\uf7ff]/.test(gt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Nt=gt.charCodeAt(0);if(Nt==8203&&!ct&&(ct="\u200B"),Nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Rt=0,$t=Math.min(ct.length,gt.length);Rt<$t&&ct.charCodeAt(Rt)==gt.charCodeAt(Rt);)++Rt;return _i(st,function(){Od(st,gt.slice(Rt),ct.length-Rt,null,it.composing?"*compose":null),gt.length>1e3||gt.indexOf(`
`)>-1?dt.value=it.prevInput="":it.prevInput=gt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ha.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ha.prototype.onKeyPress=function(){ge&&Ut>=9&&(this.hasSelection=null),this.fastPoll()},ha.prototype.onContextMenu=function(it){var st=this,dt=st.cm,ct=dt.display,gt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Nt=cl(dt,it),Rt=ct.scroller.scrollTop;if(!Nt||se)return;var $t=dt.options.resetSelectionOnContextMenu;$t&&dt.doc.sel.contains(Nt)==-1&&Cr(dt,Hs)(dt.doc,wa(Nt),Ve);var Jt=gt.style.cssText,fe=st.wrapper.style.cssText,qe=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-qe.top-5)+"px; left: "+(it.clientX-qe.left-5)+`px;
z-index: 1000; background: `+(ge?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var we;jt&&(we=window.scrollY),ct.input.focus(),jt&&window.scrollTo(null,we),ct.input.reset(),dt.somethingSelected()||(gt.value=st.prevInput=" "),st.contextMenuPending=pn,ct.selForContextMenu=dt.doc.sel,clearTimeout(ct.detectingSelectAll);function yn(){if(gt.selectionStart!=null){var vi=dt.somethingSelected(),Di="\u200B"+(vi?gt.value:"");gt.value="\u21DA",gt.value=Di,st.prevInput=vi?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=Di.length,ct.selForContextMenu=dt.doc.sel}}function pn(){if(st.contextMenuPending==pn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=fe,gt.style.cssText=Jt,ge&&Ut<9&&ct.scrollbars.setScrollTop(ct.scroller.scrollTop=Rt),gt.selectionStart!=null)){(!ge||ge&&Ut<9)&&yn();var vi=0,Di=function(){ct.selForContextMenu==dt.doc.sel&&gt.selectionStart==0&&gt.selectionEnd>0&&st.prevInput=="\u200B"?Cr(dt,Sa)(dt):vi++<10?ct.detectingSelectAll=setTimeout(Di,500):(ct.selForContextMenu=null,ct.input.reset())};ct.detectingSelectAll=setTimeout(Di,200)}}if(ge&&Ut>=9&&yn(),bt){br(it);var Ai=function(){rr(window,"mouseup",Ai),setTimeout(pn,20)};ti(window,"mouseup",Ai)}else setTimeout(pn,50)},ha.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},ha.prototype.setUneditable=function(){},ha.prototype.needsContentAttribute=!1;function Jc(it,st){if(st=st?di(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var dt=je();st.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ct(){it.value=$t.getValue()}var gt;if(it.form&&(ti(it.form,"submit",ct),!st.leaveSubmitMethodAlone)){var Nt=it.form;gt=Nt.submit;try{var Rt=Nt.submit=function(){ct(),Nt.submit=gt,Nt.submit(),Nt.submit=Rt}}catch(Jt){}}st.finishInit=function(Jt){Jt.save=ct,Jt.getTextArea=function(){return it},Jt.toTextArea=function(){Jt.toTextArea=isNaN,ct(),it.parentNode.removeChild(Jt.getWrapperElement()),it.style.display="",it.form&&(rr(it.form,"submit",ct),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var $t=ds(function(Jt){return it.parentNode.insertBefore(Jt,it.nextSibling)},st);return $t}function Gu(it){it.off=rr,it.on=ti,it.wheelEventPixels=Yo,it.Doc=qa,it.splitLines=Pn,it.countColumn=ie,it.findColumn=li,it.isWordChar=vt,it.Pass=Xn,it.signal=xi,it.Line=ws,it.changeEnd=dl,it.scrollbarModel=Rn,it.Pos=Ln,it.cmpPos=Ui,it.modes=Wn,it.mimeModes=qn,it.resolveMode=en,it.getMode=Je,it.modeExtensions=be,it.extendMode=un,it.copyState=fi,it.startState=ri,it.innerMode=mi,it.commands=Yh,it.keyMap=Dl,it.keyName=al,it.isModifierKey=Oa,it.lookupKey=Eo,it.normalizeKeyMap=as,it.StringStream=ee,it.SharedTextMarker=Sl,it.TextMarker=Ue,it.LineWidget=bs,it.e_preventDefault=xr,it.e_stopPropagation=Qr,it.e_stop=br,it.addClass=He,it.contains=Qe,it.rmClass=Ht,it.keyNames=rA}Sg(ds),kh(ds);var ih="iter insert remove copy getEditor constructor".split(" ");for(var qc in qa.prototype)qa.prototype.hasOwnProperty(qc)&&We(ih,qc)<0&&(ds.prototype[qc]=function(it){return function(){return it.apply(this.doc,arguments)}}(qa.prototype[qc]));return yr(qa),ds.inputStyles={textarea:ha,contenteditable:Gs},ds.defineMode=function(it){!ds.defaults.mode&&it!="null"&&(ds.defaults.mode=it),ui.apply(this,arguments)},ds.defineMIME=Wi,ds.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),ds.defineMIME("text/plain","null"),ds.defineExtension=function(it,st){ds.prototype[it]=st},ds.defineDocExtension=function(it,st){qa.prototype[it]=st},ds.fromTextArea=Jc,Gu(ds),ds.version="5.58.2",ds})},49047:function(gn,ze,Qt){(function(xt){xt(Qt(4631),Qt(29589),Qt(52539))})(function(xt){"use strict";xt.defineMode("markdown",function(Yt,he){var xe=xt.getMode(Yt,"text/html"),ge=xe.name=="null";function Ut(ie){if(xt.findModeByName){var zt=xt.findModeByName(ie);zt&&(ie=zt.mime||zt.mimes[0])}var We=xt.getMode(Yt,ie);return We.name=="null"?null:We}he.highlightFormatting===void 0&&(he.highlightFormatting=!1),he.maxBlockquoteDepth===void 0&&(he.maxBlockquoteDepth=0),he.taskLists===void 0&&(he.taskLists=!1),he.strikethrough===void 0&&(he.strikethrough=!1),he.emoji===void 0&&(he.emoji=!1),he.fencedCodeBlockHighlighting===void 0&&(he.fencedCodeBlockHighlighting=!0),he.fencedCodeBlockDefaultMode===void 0&&(he.fencedCodeBlockDefaultMode="text/plain"),he.xml===void 0&&(he.xml=!0),he.tokenTypeOverrides===void 0&&(he.tokenTypeOverrides={});var jt={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 ne in jt)jt.hasOwnProperty(ne)&&he.tokenTypeOverrides[ne]&&(jt[ne]=he.tokenTypeOverrides[ne]);var Ae=/^([*\-_])(?:\s*\1){2,}\s*$/,se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ke=/^\[(x| )\](?=\s)/i,de=he.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ie=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Dt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ut=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,at=" ";function ht(ie,zt,We){return zt.f=zt.inline=We,We(ie,zt)}function pt(ie,zt,We){return zt.f=zt.block=We,We(ie,zt)}function St(ie){return!ie||!/\S/.test(ie.string)}function bt(ie){if(ie.linkTitle=!1,ie.linkHref=!1,ie.linkText=!1,ie.em=!1,ie.strong=!1,ie.strikethrough=!1,ie.quote=0,ie.indentedCode=!1,ie.f==Ht){var zt=ge;if(!zt){var We=xt.innerMode(xe,ie.htmlState);zt=We.mode.name=="xml"&&We.state.tagStart===null&&!We.state.context&&We.state.tokenize.isInText}zt&&(ie.f=Ce,ie.block=Ot,ie.htmlState=null)}return ie.trailingSpace=0,ie.trailingSpaceNewLine=!1,ie.prevLine=ie.thisLine,ie.thisLine={stream:null},null}function Ot(ie,zt){var We=ie.column()===zt.indentation,En=St(zt.prevLine.stream),Xn=zt.indentedCode,Ve=zt.prevLine.hr,In=zt.list!==!1,Hn=(zt.listStack[zt.listStack.length-1]||0)+3;zt.indentedCode=!1;var li=zt.indentation;if(zt.indentationDiff===null&&(zt.indentationDiff=zt.indentation,In)){for(zt.list=null;li<zt.listStack[zt.listStack.length-1];)zt.listStack.pop(),zt.listStack.length?zt.indentation=zt.listStack[zt.listStack.length-1]:zt.list=!1;zt.list!==!1&&(zt.indentationDiff=li-zt.listStack[zt.listStack.length-1])}var tn=!En&&!Ve&&!zt.prevLine.header&&(!In||!Xn)&&!zt.prevLine.fencedCodeEnd,Me=(zt.list===!1||Ve||En)&&zt.indentation<=Hn&&ie.match(Ae),rn=null;if(zt.indentationDiff>=4&&(Xn||zt.prevLine.fencedCodeEnd||zt.prevLine.header||En))return ie.skipToEnd(),zt.indentedCode=!0,jt.code;if(ie.eatSpace())return null;if(We&&zt.indentation<=Hn&&(rn=ie.match(de))&&rn[1].length<=6)return zt.quote=0,zt.header=rn[1].length,zt.thisLine.header=!0,he.highlightFormatting&&(zt.formatting="header"),zt.f=zt.inline,re(zt);if(zt.indentation<=Hn&&ie.eat(">"))return zt.quote=We?1:zt.quote+1,he.highlightFormatting&&(zt.formatting="quote"),ie.eatSpace(),re(zt);if(!Me&&!zt.setext&&We&&zt.indentation<=Hn&&(rn=ie.match(se))){var Dn=rn[1]?"ol":"ul";return zt.indentation=li+ie.current().length,zt.list=!0,zt.quote=0,zt.listStack.push(zt.indentation),zt.em=!1,zt.strong=!1,zt.code=!1,zt.strikethrough=!1,he.taskLists&&ie.match(ke,!1)&&(zt.taskList=!0),zt.f=zt.inline,he.highlightFormatting&&(zt.formatting=["list","list-"+Dn]),re(zt)}else{if(We&&zt.indentation<=Hn&&(rn=ie.match(nt,!0)))return zt.quote=0,zt.fencedEndRE=new RegExp(rn[1]+"+ *$"),zt.localMode=he.fencedCodeBlockHighlighting&&Ut(rn[2]||he.fencedCodeBlockDefaultMode),zt.localMode&&(zt.localState=xt.startState(zt.localMode)),zt.f=zt.block=Wt,he.highlightFormatting&&(zt.formatting="code-block"),zt.code=-1,re(zt);if(zt.setext||(!tn||!In)&&!zt.quote&&zt.list===!1&&!zt.code&&!Me&&!et.test(ie.string)&&(rn=ie.lookAhead(1))&&(rn=rn.match(Ie)))return zt.setext?(zt.header=zt.setext,zt.setext=0,ie.skipToEnd(),he.highlightFormatting&&(zt.formatting="header")):(zt.header=rn[0].charAt(0)=="="?1:2,zt.setext=zt.header),zt.thisLine.header=!0,zt.f=zt.inline,re(zt);if(Me)return ie.skipToEnd(),zt.hr=!0,zt.thisLine.hr=!0,jt.hr;if(ie.peek()==="[")return ht(ie,zt,Qn)}return ht(ie,zt,zt.inline)}function Ht(ie,zt){var We=xe.token(ie,zt.htmlState);if(!ge){var En=xt.innerMode(xe,zt.htmlState);(En.mode.name=="xml"&&En.state.tagStart===null&&!En.state.context&&En.state.tokenize.isInText||zt.md_inside&&ie.current().indexOf(">")>-1)&&(zt.f=Ce,zt.block=Ot,zt.htmlState=null)}return We}function Wt(ie,zt){var We=zt.listStack[zt.listStack.length-1]||0,En=zt.indentation<We,Xn=We+3;if(zt.fencedEndRE&&zt.indentation<=Xn&&(En||ie.match(zt.fencedEndRE))){he.highlightFormatting&&(zt.formatting="code-block");var Ve;return En||(Ve=re(zt)),zt.localMode=zt.localState=null,zt.block=Ot,zt.f=Ce,zt.fencedEndRE=null,zt.code=0,zt.thisLine.fencedCodeEnd=!0,En?pt(ie,zt,zt.block):Ve}else return zt.localMode?zt.localMode.token(ie,zt.localState):(ie.skipToEnd(),jt.code)}function re(ie){var zt=[];if(ie.formatting){zt.push(jt.formatting),typeof ie.formatting=="string"&&(ie.formatting=[ie.formatting]);for(var We=0;We<ie.formatting.length;We++)zt.push(jt.formatting+"-"+ie.formatting[We]),ie.formatting[We]==="header"&&zt.push(jt.formatting+"-"+ie.formatting[We]+"-"+ie.header),ie.formatting[We]==="quote"&&(!he.maxBlockquoteDepth||he.maxBlockquoteDepth>=ie.quote?zt.push(jt.formatting+"-"+ie.formatting[We]+"-"+ie.quote):zt.push("error"))}if(ie.taskOpen)return zt.push("meta"),zt.length?zt.join(" "):null;if(ie.taskClosed)return zt.push("property"),zt.length?zt.join(" "):null;if(ie.linkHref?zt.push(jt.linkHref,"url"):(ie.strong&&zt.push(jt.strong),ie.em&&zt.push(jt.em),ie.strikethrough&&zt.push(jt.strikethrough),ie.emoji&&zt.push(jt.emoji),ie.linkText&&zt.push(jt.linkText),ie.code&&zt.push(jt.code),ie.image&&zt.push(jt.image),ie.imageAltText&&zt.push(jt.imageAltText,"link"),ie.imageMarker&&zt.push(jt.imageMarker)),ie.header&&zt.push(jt.header,jt.header+"-"+ie.header),ie.quote&&(zt.push(jt.quote),!he.maxBlockquoteDepth||he.maxBlockquoteDepth>=ie.quote?zt.push(jt.quote+"-"+ie.quote):zt.push(jt.quote+"-"+he.maxBlockquoteDepth)),ie.list!==!1){var En=(ie.listStack.length-1)%3;En?En===1?zt.push(jt.list2):zt.push(jt.list3):zt.push(jt.list1)}return ie.trailingSpaceNewLine?zt.push("trailing-space-new-line"):ie.trailingSpace&&zt.push("trailing-space-"+(ie.trailingSpace%2?"a":"b")),zt.length?zt.join(" "):null}function te(ie,zt){if(ie.match(Dt,!0))return re(zt)}function Ce(ie,zt){var We=zt.text(ie,zt);if(typeof We!="undefined")return We;if(zt.list)return zt.list=null,re(zt);if(zt.taskList){var En=ie.match(ke,!0)[1]===" ";return En?zt.taskOpen=!0:zt.taskClosed=!0,he.highlightFormatting&&(zt.formatting="task"),zt.taskList=!1,re(zt)}if(zt.taskOpen=!1,zt.taskClosed=!1,zt.header&&ie.match(/^#+$/,!0))return he.highlightFormatting&&(zt.formatting="header"),re(zt);var Xn=ie.next();if(zt.linkTitle){zt.linkTitle=!1;var Ve=Xn;Xn==="("&&(Ve=")"),Ve=(Ve+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var In="^\\s*(?:[^"+Ve+"\\\\]+|\\\\\\\\|\\\\.)"+Ve;if(ie.match(new RegExp(In),!0))return jt.linkHref}if(Xn==="`"){var Hn=zt.formatting;he.highlightFormatting&&(zt.formatting="code"),ie.eatWhile("`");var li=ie.current().length;if(zt.code==0&&(!zt.quote||li==1))return zt.code=li,re(zt);if(li==zt.code){var tn=re(zt);return zt.code=0,tn}else return zt.formatting=Hn,re(zt)}else if(zt.code)return re(zt);if(Xn==="\\"&&(ie.next(),he.highlightFormatting)){var Me=re(zt),rn=jt.formatting+"-escape";return Me?Me+" "+rn:rn}if(Xn==="!"&&ie.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return zt.imageMarker=!0,zt.image=!0,he.highlightFormatting&&(zt.formatting="image"),re(zt);if(Xn==="["&&zt.imageMarker&&ie.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return zt.imageMarker=!1,zt.imageAltText=!0,he.highlightFormatting&&(zt.formatting="image"),re(zt);if(Xn==="]"&&zt.imageAltText){he.highlightFormatting&&(zt.formatting="image");var Me=re(zt);return zt.imageAltText=!1,zt.image=!1,zt.inline=zt.f=Qe,Me}if(Xn==="["&&!zt.image)return zt.linkText&&ie.match(/^.*?\]/)||(zt.linkText=!0,he.highlightFormatting&&(zt.formatting="link")),re(zt);if(Xn==="]"&&zt.linkText){he.highlightFormatting&&(zt.formatting="link");var Me=re(zt);return zt.linkText=!1,zt.inline=zt.f=ie.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:Ce,Me}if(Xn==="<"&&ie.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){zt.f=zt.inline=ce,he.highlightFormatting&&(zt.formatting="link");var Me=re(zt);return Me?Me+=" ":Me="",Me+jt.linkInline}if(Xn==="<"&&ie.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){zt.f=zt.inline=ce,he.highlightFormatting&&(zt.formatting="link");var Me=re(zt);return Me?Me+=" ":Me="",Me+jt.linkEmail}if(he.xml&&Xn==="<"&&ie.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Dn=ie.string.indexOf(">",ie.pos);if(Dn!=-1){var sn=ie.string.substring(ie.start,Dn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(sn)&&(zt.md_inside=!0)}return ie.backUp(1),zt.htmlState=xt.startState(xe),pt(ie,zt,Ht)}if(he.xml&&Xn==="<"&&ie.match(/^\/\w*?>/))return zt.md_inside=!1,"tag";if(Xn==="*"||Xn==="_"){for(var Vt=1,Pt=ie.pos==1?" ":ie.string.charAt(ie.pos-2);Vt<3&&ie.eat(Xn);)Vt++;var mt=ie.peek()||" ",vt=!/\s/.test(mt)&&(!ut.test(mt)||/\s/.test(Pt)||ut.test(Pt)),kt=!/\s/.test(Pt)&&(!ut.test(Pt)||/\s/.test(mt)||ut.test(mt)),Lt=null,_t=null;if(Vt%2&&(!zt.em&&vt&&(Xn==="*"||!kt||ut.test(Pt))?Lt=!0:zt.em==Xn&&kt&&(Xn==="*"||!vt||ut.test(mt))&&(Lt=!1)),Vt>1&&(!zt.strong&&vt&&(Xn==="*"||!kt||ut.test(Pt))?_t=!0:zt.strong==Xn&&kt&&(Xn==="*"||!vt||ut.test(mt))&&(_t=!1)),_t!=null||Lt!=null){he.highlightFormatting&&(zt.formatting=Lt==null?"strong":_t==null?"em":"strong em"),Lt===!0&&(zt.em=Xn),_t===!0&&(zt.strong=Xn);var tn=re(zt);return Lt===!1&&(zt.em=!1),_t===!1&&(zt.strong=!1),tn}}else if(Xn===" "&&(ie.eat("*")||ie.eat("_"))){if(ie.peek()===" ")return re(zt);ie.backUp(1)}if(he.strikethrough){if(Xn==="~"&&ie.eatWhile(Xn)){if(zt.strikethrough){he.highlightFormatting&&(zt.formatting="strikethrough");var tn=re(zt);return zt.strikethrough=!1,tn}else if(ie.match(/^[^\s]/,!1))return zt.strikethrough=!0,he.highlightFormatting&&(zt.formatting="strikethrough"),re(zt)}else if(Xn===" "&&ie.match(/^~~/,!0)){if(ie.peek()===" ")return re(zt);ie.backUp(2)}}if(he.emoji&&Xn===":"&&ie.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){zt.emoji=!0,he.highlightFormatting&&(zt.formatting="emoji");var De=re(zt);return zt.emoji=!1,De}return Xn===" "&&(ie.match(/^ +$/,!1)?zt.trailingSpace++:zt.trailingSpace&&(zt.trailingSpaceNewLine=!0)),re(zt)}function ce(ie,zt){var We=ie.next();if(We===">"){zt.f=zt.inline=Ce,he.highlightFormatting&&(zt.formatting="link");var En=re(zt);return En?En+=" ":En="",En+jt.linkInline}return ie.match(/^[^>]+/,!0),jt.linkInline}function Qe(ie,zt){if(ie.eatSpace())return null;var We=ie.next();return We==="("||We==="["?(zt.f=zt.inline=He(We==="("?")":"]"),he.highlightFormatting&&(zt.formatting="link-string"),zt.linkHref=!0,re(zt)):"error"}var je={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function He(ie){return function(zt,We){var En=zt.next();if(En===ie){We.f=We.inline=Ce,he.highlightFormatting&&(We.formatting="link-string");var Xn=re(We);return We.linkHref=!1,Xn}return zt.match(je[ie]),We.linkHref=!0,re(We)}}function Qn(ie,zt){return ie.match(/^([^\]\\]|\\.)*\]:/,!1)?(zt.f=Gn,ie.next(),he.highlightFormatting&&(zt.formatting="link"),zt.linkText=!0,re(zt)):ht(ie,zt,Ce)}function Gn(ie,zt){if(ie.match(/^\]:/,!0)){zt.f=zt.inline=Yn,he.highlightFormatting&&(zt.formatting="link");var We=re(zt);return zt.linkText=!1,We}return ie.match(/^([^\]\\]|\\.)+/,!0),jt.linkText}function Yn(ie,zt){return ie.eatSpace()?null:(ie.match(/^[^\s]+/,!0),ie.peek()===void 0?zt.linkTitle=!0:ie.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),zt.f=zt.inline=Ce,jt.linkHref+" url")}var di={startState:function(){return{f:Ot,prevLine:{stream:null},thisLine:{stream:null},block:Ot,htmlState:null,indentation:0,inline:Ce,text:te,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(ie){return{f:ie.f,prevLine:ie.prevLine,thisLine:ie.thisLine,block:ie.block,htmlState:ie.htmlState&&xt.copyState(xe,ie.htmlState),indentation:ie.indentation,localMode:ie.localMode,localState:ie.localMode?xt.copyState(ie.localMode,ie.localState):null,inline:ie.inline,text:ie.text,formatting:!1,linkText:ie.linkText,linkTitle:ie.linkTitle,linkHref:ie.linkHref,code:ie.code,em:ie.em,strong:ie.strong,strikethrough:ie.strikethrough,emoji:ie.emoji,header:ie.header,setext:ie.setext,hr:ie.hr,taskList:ie.taskList,list:ie.list,listStack:ie.listStack.slice(0),quote:ie.quote,indentedCode:ie.indentedCode,trailingSpace:ie.trailingSpace,trailingSpaceNewLine:ie.trailingSpaceNewLine,md_inside:ie.md_inside,fencedEndRE:ie.fencedEndRE}},token:function(ie,zt){if(zt.formatting=!1,ie!=zt.thisLine.stream){if(zt.header=0,zt.hr=!1,ie.match(/^\s*$/,!0))return bt(zt),null;if(zt.prevLine=zt.thisLine,zt.thisLine={stream:ie},zt.taskList=!1,zt.trailingSpace=0,zt.trailingSpaceNewLine=!1,!zt.localState&&(zt.f=zt.block,zt.f!=Ht)){var We=ie.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(zt.indentation=We,zt.indentationDiff=null,We>0)return null}}return zt.f(ie,zt)},innerMode:function(ie){return ie.block==Ht?{state:ie.htmlState,mode:xe}:ie.localState?{state:ie.localState,mode:ie.localMode}:{state:ie,mode:di}},indent:function(ie,zt,We){return ie.block==Ht&&xe.indent?xe.indent(ie.htmlState,zt,We):ie.localState&&ie.localMode.indent?ie.localMode.indent(ie.localState,zt,We):xt.Pass},blankLine:bt,getType:re,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return di},"xml"),xt.defineMIME("text/markdown","markdown"),xt.defineMIME("text/x-markdown","markdown")})},52539:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){"use strict";xt.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 Yt=0;Yt<xt.modeInfo.length;Yt++){var he=xt.modeInfo[Yt];he.mimes&&(he.mime=he.mimes[0])}xt.findModeByMIME=function(xe){xe=xe.toLowerCase();for(var ge=0;ge<xt.modeInfo.length;ge++){var Ut=xt.modeInfo[ge];if(Ut.mime==xe)return Ut;if(Ut.mimes){for(var jt=0;jt<Ut.mimes.length;jt++)if(Ut.mimes[jt]==xe)return Ut}}if(/\+xml$/.test(xe))return xt.findModeByMIME("application/xml");if(/\+json$/.test(xe))return xt.findModeByMIME("application/json")},xt.findModeByExtension=function(xe){xe=xe.toLowerCase();for(var ge=0;ge<xt.modeInfo.length;ge++){var Ut=xt.modeInfo[ge];if(Ut.ext){for(var jt=0;jt<Ut.ext.length;jt++)if(Ut.ext[jt]==xe)return Ut}}},xt.findModeByFileName=function(xe){for(var ge=0;ge<xt.modeInfo.length;ge++){var Ut=xt.modeInfo[ge];if(Ut.file&&Ut.file.test(xe))return Ut}var jt=xe.lastIndexOf("."),ne=jt>-1&&xe.substring(jt+1,xe.length);if(ne)return xt.findModeByExtension(ne)},xt.findModeByName=function(xe){xe=xe.toLowerCase();for(var ge=0;ge<xt.modeInfo.length;ge++){var Ut=xt.modeInfo[ge];if(Ut.name.toLowerCase()==xe)return Ut;if(Ut.alias){for(var jt=0;jt<Ut.alias.length;jt++)if(Ut.alias[jt].toLowerCase()==xe)return Ut}}}})},80785:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){"use strict";xt.defineMode("stex",function(Yt,he){"use strict";function xe(Dt,nt){Dt.cmdState.push(nt)}function ge(Dt){return Dt.cmdState.length>0?Dt.cmdState[Dt.cmdState.length-1]:null}function Ut(Dt){var nt=Dt.cmdState.pop();nt&&nt.closeBracket()}function jt(Dt){for(var nt=Dt.cmdState,et=nt.length-1;et>=0;et--){var ut=nt[et];if(ut.name!="DEFAULT")return ut}return{styleIdentifier:function(){return null}}}function ne(Dt,nt,et){return function(){this.name=Dt,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ae={};Ae.importmodule=ne("importmodule","tag",["string","builtin"]),Ae.documentclass=ne("documentclass","tag",["","atom"]),Ae.usepackage=ne("usepackage","tag",["atom"]),Ae.begin=ne("begin","tag",["atom"]),Ae.end=ne("end","tag",["atom"]),Ae.label=ne("label","tag",["atom"]),Ae.ref=ne("ref","tag",["atom"]),Ae.eqref=ne("eqref","tag",["atom"]),Ae.cite=ne("cite","tag",["atom"]),Ae.bibitem=ne("bibitem","tag",["atom"]),Ae.Bibitem=ne("Bibitem","tag",["atom"]),Ae.RBibitem=ne("RBibitem","tag",["atom"]),Ae.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function se(Dt,nt){Dt.f=nt}function ke(Dt,nt){var et;if(Dt.match(/^\\[a-zA-Z@]+/)){var ut=Dt.current().slice(1);return et=Ae.hasOwnProperty(ut)?Ae[ut]:Ae.DEFAULT,et=new et,xe(nt,et),se(nt,Ie),et.style}if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/\\]/))return"tag";if(Dt.match("\\["))return se(nt,function(ht,pt){return de(ht,pt,"\\]")}),"keyword";if(Dt.match("\\("))return se(nt,function(ht,pt){return de(ht,pt,"\\)")}),"keyword";if(Dt.match("$$"))return se(nt,function(ht,pt){return de(ht,pt,"$$")}),"keyword";if(Dt.match("$"))return se(nt,function(ht,pt){return de(ht,pt,"$")}),"keyword";var at=Dt.next();if(at=="%")return Dt.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=ge(nt),et)et.closeBracket(at),se(nt,Ie);else return"error";return"bracket"}else return at=="{"||at=="["?(et=Ae.DEFAULT,et=new et,xe(nt,et),"bracket"):/\d/.test(at)?(Dt.eatWhile(/[\w.%]/),"atom"):(Dt.eatWhile(/[\w\-_]/),et=jt(nt),et.name=="begin"&&(et.argument=Dt.current()),et.styleIdentifier())}function de(Dt,nt,et){if(Dt.eatSpace())return null;if(et&&Dt.match(et))return se(nt,ke),"keyword";if(Dt.match(/^\\[a-zA-Z@]+/))return"tag";if(Dt.match(/^[a-zA-Z]+/))return"variable-2";if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/]/)||Dt.match(/^[\^_&]/))return"tag";if(Dt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Dt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ut=Dt.next();return ut=="{"||ut=="}"||ut=="["||ut=="]"||ut=="("||ut==")"?"bracket":ut=="%"?(Dt.skipToEnd(),"comment"):"error"}function Ie(Dt,nt){var et=Dt.peek(),ut;return et=="{"||et=="["?(ut=ge(nt),ut.openBracket(et),Dt.eat(et),se(nt,ke),"bracket"):/[ \t\r]/.test(et)?(Dt.eat(et),null):(se(nt,ke),Ut(nt),ke(Dt,nt))}return{startState:function(){var Dt=he.inMathMode?function(nt,et){return de(nt,et)}:ke;return{cmdState:[],f:Dt}},copyState:function(Dt){return{cmdState:Dt.cmdState.slice(),f:Dt.f}},token:function(Dt,nt){return nt.f(Dt,nt)},blankLine:function(Dt){Dt.f=ke,Dt.cmdState.length=0},lineComment:"%"}}),xt.defineMIME("text/x-stex","stex"),xt.defineMIME("text/x-latex","stex")})},29589:function(gn,ze,Qt){(function(xt){xt(Qt(4631))})(function(xt){"use strict";var Yt={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},he={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};xt.defineMode("xml",function(xe,ge){var Ut=xe.indentUnit,jt={},ne=ge.htmlMode?Yt:he;for(var Ae in ne)jt[Ae]=ne[Ae];for(var Ae in ge)jt[Ae]=ge[Ae];var se,ke;function de(ce,Qe){function je(Gn){return Qe.tokenize=Gn,Gn(ce,Qe)}var He=ce.next();if(He=="<")return ce.eat("!")?ce.eat("[")?ce.match("CDATA[")?je(nt("atom","]]>")):null:ce.match("--")?je(nt("comment","-->")):ce.match("DOCTYPE",!0,!0)?(ce.eatWhile(/[\w\._\-]/),je(et(1))):null:ce.eat("?")?(ce.eatWhile(/[\w\._\-]/),Qe.tokenize=nt("meta","?>"),"meta"):(se=ce.eat("/")?"closeTag":"openTag",Qe.tokenize=Ie,"tag bracket");if(He=="&"){var Qn;return ce.eat("#")?ce.eat("x")?Qn=ce.eatWhile(/[a-fA-F\d]/)&&ce.eat(";"):Qn=ce.eatWhile(/[\d]/)&&ce.eat(";"):Qn=ce.eatWhile(/[\w\.\-:]/)&&ce.eat(";"),Qn?"atom":"error"}else return ce.eatWhile(/[^&<]/),null}de.isInText=!0;function Ie(ce,Qe){var je=ce.next();if(je==">"||je=="/"&&ce.eat(">"))return Qe.tokenize=de,se=je==">"?"endTag":"selfcloseTag","tag bracket";if(je=="=")return se="equals",null;if(je=="<"){Qe.tokenize=de,Qe.state=pt,Qe.tagName=Qe.tagStart=null;var He=Qe.tokenize(ce,Qe);return He?He+" tag error":"tag error"}else return/[\'\"]/.test(je)?(Qe.tokenize=Dt(je),Qe.stringStartCol=ce.column(),Qe.tokenize(ce,Qe)):(ce.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Dt(ce){var Qe=function(je,He){for(;!je.eol();)if(je.next()==ce){He.tokenize=Ie;break}return"string"};return Qe.isInAttribute=!0,Qe}function nt(ce,Qe){return function(je,He){for(;!je.eol();){if(je.match(Qe)){He.tokenize=de;break}je.next()}return ce}}function et(ce){return function(Qe,je){for(var He;(He=Qe.next())!=null;){if(He=="<")return je.tokenize=et(ce+1),je.tokenize(Qe,je);if(He==">")if(ce==1){je.tokenize=de;break}else return je.tokenize=et(ce-1),je.tokenize(Qe,je)}return"meta"}}function ut(ce,Qe,je){this.prev=ce.context,this.tagName=Qe,this.indent=ce.indented,this.startOfLine=je,(jt.doNotIndent.hasOwnProperty(Qe)||ce.context&&ce.context.noIndent)&&(this.noIndent=!0)}function at(ce){ce.context&&(ce.context=ce.context.prev)}function ht(ce,Qe){for(var je;;){if(!ce.context||(je=ce.context.tagName,!jt.contextGrabbers.hasOwnProperty(je)||!jt.contextGrabbers[je].hasOwnProperty(Qe)))return;at(ce)}}function pt(ce,Qe,je){return ce=="openTag"?(je.tagStart=Qe.column(),St):ce=="closeTag"?bt:pt}function St(ce,Qe,je){return ce=="word"?(je.tagName=Qe.current(),ke="tag",Wt):jt.allowMissingTagName&&ce=="endTag"?(ke="tag bracket",Wt(ce,Qe,je)):(ke="error",St)}function bt(ce,Qe,je){if(ce=="word"){var He=Qe.current();return je.context&&je.context.tagName!=He&&jt.implicitlyClosed.hasOwnProperty(je.context.tagName)&&at(je),je.context&&je.context.tagName==He||jt.matchClosing===!1?(ke="tag",Ot):(ke="tag error",Ht)}else return jt.allowMissingTagName&&ce=="endTag"?(ke="tag bracket",Ot(ce,Qe,je)):(ke="error",Ht)}function Ot(ce,Qe,je){return ce!="endTag"?(ke="error",Ot):(at(je),pt)}function Ht(ce,Qe,je){return ke="error",Ot(ce,Qe,je)}function Wt(ce,Qe,je){if(ce=="word")return ke="attribute",re;if(ce=="endTag"||ce=="selfcloseTag"){var He=je.tagName,Qn=je.tagStart;return je.tagName=je.tagStart=null,ce=="selfcloseTag"||jt.autoSelfClosers.hasOwnProperty(He)?ht(je,He):(ht(je,He),je.context=new ut(je,He,Qn==je.indented)),pt}return ke="error",Wt}function re(ce,Qe,je){return ce=="equals"?te:(jt.allowMissing||(ke="error"),Wt(ce,Qe,je))}function te(ce,Qe,je){return ce=="string"?Ce:ce=="word"&&jt.allowUnquoted?(ke="string",Wt):(ke="error",Wt(ce,Qe,je))}function Ce(ce,Qe,je){return ce=="string"?Ce:Wt(ce,Qe,je)}return{startState:function(ce){var Qe={tokenize:de,state:pt,indented:ce||0,tagName:null,tagStart:null,context:null};return ce!=null&&(Qe.baseIndent=ce),Qe},token:function(ce,Qe){if(!Qe.tagName&&ce.sol()&&(Qe.indented=ce.indentation()),ce.eatSpace())return null;se=null;var je=Qe.tokenize(ce,Qe);return(je||se)&&je!="comment"&&(ke=null,Qe.state=Qe.state(se||je,ce,Qe),ke&&(je=ke=="error"?je+" error":ke)),je},indent:function(ce,Qe,je){var He=ce.context;if(ce.tokenize.isInAttribute)return ce.tagStart==ce.indented?ce.stringStartCol+1:ce.indented+Ut;if(He&&He.noIndent)return xt.Pass;if(ce.tokenize!=Ie&&ce.tokenize!=de)return je?je.match(/^(\s*)/)[0].length:0;if(ce.tagName)return jt.multilineTagIndentPastTag!==!1?ce.tagStart+ce.tagName.length+2:ce.tagStart+Ut*(jt.multilineTagIndentFactor||1);if(jt.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var Qn=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(Qn&&Qn[1])for(;He;)if(He.tagName==Qn[2]){He=He.prev;break}else if(jt.implicitlyClosed.hasOwnProperty(He.tagName))He=He.prev;else break;else if(Qn)for(;He;){var Gn=jt.contextGrabbers[He.tagName];if(Gn&&Gn.hasOwnProperty(Qn[2]))He=He.prev;else break}for(;He&&He.prev&&!He.startOfLine;)He=He.prev;return He?He.indent+Ut:ce.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:jt.htmlMode?"html":"xml",helperType:jt.htmlMode?"html":"xml",skipAttribute:function(ce){ce.state==te&&(ce.state=Wt)},xmlCurrentTag:function(ce){return ce.tagName?{name:ce.tagName,close:ce.type=="closeTag"}:null},xmlCurrentContext:function(ce){for(var Qe=[],je=ce.context;je;je=je.prev)je.tagName&&Qe.push(je.tagName);return Qe.reverse()}}}),xt.defineMIME("text/xml","xml"),xt.defineMIME("application/xml","xml"),xt.mimeModes.hasOwnProperty("text/html")||xt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},87155:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var xt=Object.assign||function(et){for(var ut=1;ut<arguments.length;ut++){var at=arguments[ut];for(var ht in at)Object.prototype.hasOwnProperty.call(at,ht)&&(et[ht]=at[ht])}return et},Yt=function(){function et(ut,at){for(var ht=0;ht<at.length;ht++){var pt=at[ht];pt.enumerable=pt.enumerable||!1,pt.configurable=!0,"value"in pt&&(pt.writable=!0),Object.defineProperty(ut,pt.key,pt)}}return function(ut,at,ht){return at&&et(ut.prototype,at),ht&&et(ut,ht),ut}}(),he=Qt(67294),xe=ke(he),ge=Qt(45697),Ut=ke(ge),jt=Qt(72984),ne=ke(jt),Ae=Qt(18587),se=Qt(52211);function ke(et){return et&&et.__esModule?et:{default:et}}function de(et,ut){if(!(et instanceof ut))throw new TypeError("Cannot call a class as a function")}function Ie(et,ut){if(!et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ut&&(typeof ut=="object"||typeof ut=="function")?ut:et}function Dt(et,ut){if(typeof ut!="function"&&ut!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ut);et.prototype=Object.create(ut&&ut.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),ut&&(Object.setPrototypeOf?Object.setPrototypeOf(et,ut):et.__proto__=ut)}var nt=function(et){Dt(ut,et);function ut(at){de(this,ut);var ht=Ie(this,(ut.__proto__||Object.getPrototypeOf(ut)).call(this,at));return ht.getEchartsInstance=function(){return ht.echartsLib.getInstanceByDom(ht.echartsElement)||ht.echartsLib.init(ht.echartsElement,ht.props.theme,ht.props.opts)},ht.dispose=function(){if(ht.echartsElement){try{(0,Ae.clear)(ht.echartsElement)}catch(pt){console.warn(pt)}ht.echartsLib.dispose(ht.echartsElement)}},ht.rerender=function(){var pt=ht.props,St=pt.onEvents,bt=pt.onChartReady,Ot=ht.renderEchartDom();ht.bindEvents(Ot,St||{}),typeof bt=="function"&&ht.props.onChartReady(Ot),ht.echartsElement&&(0,Ae.bind)(ht.echartsElement,function(){try{Ot.resize()}catch(Ht){console.warn(Ht)}})},ht.bindEvents=function(pt,St){var bt=function(Wt,re){typeof Wt=="string"&&typeof re=="function"&&pt.on(Wt,function(te){re(te,pt)})};for(var Ot in St)Object.prototype.hasOwnProperty.call(St,Ot)&&bt(Ot,St[Ot])},ht.renderEchartDom=function(){var pt=ht.getEchartsInstance();return pt.setOption(ht.props.option,ht.props.notMerge||!1,ht.props.lazyUpdate||!1),ht.props.showLoading?pt.showLoading(ht.props.loadingOption||null):pt.hideLoading(),pt},ht.echartsLib=at.echarts,ht.echartsElement=null,ht}return Yt(ut,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(ht){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(ht,this.props))){if(!(0,ne.default)(ht.theme,this.props.theme)||!(0,ne.default)(ht.opts,this.props.opts)||!(0,ne.default)(ht.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var pt=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,ne.default)((0,se.pick)(this.props,pt),(0,se.pick)(ht,pt))){var St=this.renderEchartDom();if(!(0,ne.default)(ht.style,this.props.style)||!(0,ne.default)(ht.className,this.props.className))try{St.resize()}catch(bt){console.warn(bt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var ht=this,pt=this.props,St=pt.style,bt=pt.className,Ot=xt({height:300},St);return xe.default.createElement("div",{ref:function(Wt){ht.echartsElement=Wt},style:Ot,className:"echarts-for-react "+bt})}}]),ut}(he.Component);ze.default=nt,nt.propTypes={option:Ut.default.object.isRequired,echarts:Ut.default.object,notMerge:Ut.default.bool,lazyUpdate:Ut.default.bool,style:Ut.default.object,className:Ut.default.string,theme:Ut.default.oneOfType([Ut.default.string,Ut.default.object]),onChartReady:Ut.default.func,showLoading:Ut.default.bool,loadingOption:Ut.default.object,onEvents:Ut.default.object,opts:Ut.default.shape({devicePixelRatio:Ut.default.number,renderer:Ut.default.oneOf(["canvas","svg"]),width:Ut.default.oneOfType([Ut.default.number,Ut.default.oneOf([null,void 0,"auto"])]),height:Ut.default.oneOfType([Ut.default.number,Ut.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:Ut.default.func},nt.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},50976:function(gn,ze,Qt){"use strict";var xt;xt={value:!0},ze.Z=void 0;var Yt=Qt(70596),he=Ut(Yt),xe=Qt(87155),ge=Ut(xe);function Ut(ke){return ke&&ke.__esModule?ke:{default:ke}}function jt(ke,de){if(!(ke instanceof de))throw new TypeError("Cannot call a class as a function")}function ne(ke,de){if(!ke)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return de&&(typeof de=="object"||typeof de=="function")?de:ke}function Ae(ke,de){if(typeof de!="function"&&de!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof de);ke.prototype=Object.create(de&&de.prototype,{constructor:{value:ke,enumerable:!1,writable:!0,configurable:!0}}),de&&(Object.setPrototypeOf?Object.setPrototypeOf(ke,de):ke.__proto__=de)}var se=function(ke){Ae(de,ke);function de(Ie){jt(this,de);var Dt=ne(this,(de.__proto__||Object.getPrototypeOf(de)).call(this,Ie));return Dt.echartsLib=he.default,Dt}return de}(ge.default);ze.Z=se},52211:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0});var Qt=ze.pick=function(Yt,he){var xe={};return he.forEach(function(ge){xe[ge]=Yt[ge]}),xe}},72984:function(gn){"use strict";var ze=Array.isArray,Qt=Object.keys,xt=Object.prototype.hasOwnProperty;gn.exports=function Yt(he,xe){if(he===xe)return!0;if(he&&xe&&typeof he=="object"&&typeof xe=="object"){var ge=ze(he),Ut=ze(xe),jt,ne,Ae;if(ge&&Ut){if(ne=he.length,ne!=xe.length)return!1;for(jt=ne;jt--!==0;)if(!Yt(he[jt],xe[jt]))return!1;return!0}if(ge!=Ut)return!1;var se=he instanceof Date,ke=xe instanceof Date;if(se!=ke)return!1;if(se&&ke)return he.getTime()==xe.getTime();var de=he instanceof RegExp,Ie=xe instanceof RegExp;if(de!=Ie)return!1;if(de&&Ie)return he.toString()==xe.toString();var Dt=Qt(he);if(ne=Dt.length,ne!==Qt(xe).length)return!1;for(jt=ne;jt--!==0;)if(!xt.call(xe,Dt[jt]))return!1;for(jt=ne;jt--!==0;)if(Ae=Dt[jt],!Yt(he[Ae],xe[Ae]))return!1;return!0}return he!==he&&xe!==xe}},17187:function(gn){"use strict";var ze=typeof Reflect=="object"?Reflect:null,Qt=ze&&typeof ze.apply=="function"?ze.apply:function(pt,St,bt){return Function.prototype.apply.call(pt,St,bt)},xt;ze&&typeof ze.ownKeys=="function"?xt=ze.ownKeys:Object.getOwnPropertySymbols?xt=function(pt){return Object.getOwnPropertyNames(pt).concat(Object.getOwnPropertySymbols(pt))}:xt=function(pt){return Object.getOwnPropertyNames(pt)};function Yt(ht){console&&console.warn&&console.warn(ht)}var he=Number.isNaN||function(pt){return pt!==pt};function xe(){xe.init.call(this)}gn.exports=xe,gn.exports.once=et,xe.EventEmitter=xe,xe.prototype._events=void 0,xe.prototype._eventsCount=0,xe.prototype._maxListeners=void 0;var ge=10;function Ut(ht){if(typeof ht!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ht)}Object.defineProperty(xe,"defaultMaxListeners",{enumerable:!0,get:function(){return ge},set:function(ht){if(typeof ht!="number"||ht<0||he(ht))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ht+".");ge=ht}}),xe.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},xe.prototype.setMaxListeners=function(pt){if(typeof pt!="number"||pt<0||he(pt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+pt+".");return this._maxListeners=pt,this};function jt(ht){return ht._maxListeners===void 0?xe.defaultMaxListeners:ht._maxListeners}xe.prototype.getMaxListeners=function(){return jt(this)},xe.prototype.emit=function(pt){for(var St=[],bt=1;bt<arguments.length;bt++)St.push(arguments[bt]);var Ot=pt==="error",Ht=this._events;if(Ht!==void 0)Ot=Ot&&Ht.error===void 0;else if(!Ot)return!1;if(Ot){var Wt;if(St.length>0&&(Wt=St[0]),Wt instanceof Error)throw Wt;var re=new Error("Unhandled error."+(Wt?" ("+Wt.message+")":""));throw re.context=Wt,re}var te=Ht[pt];if(te===void 0)return!1;if(typeof te=="function")Qt(te,this,St);else for(var Ce=te.length,ce=Ie(te,Ce),bt=0;bt<Ce;++bt)Qt(ce[bt],this,St);return!0};function ne(ht,pt,St,bt){var Ot,Ht,Wt;if(Ut(St),Ht=ht._events,Ht===void 0?(Ht=ht._events=Object.create(null),ht._eventsCount=0):(Ht.newListener!==void 0&&(ht.emit("newListener",pt,St.listener?St.listener:St),Ht=ht._events),Wt=Ht[pt]),Wt===void 0)Wt=Ht[pt]=St,++ht._eventsCount;else if(typeof Wt=="function"?Wt=Ht[pt]=bt?[St,Wt]:[Wt,St]:bt?Wt.unshift(St):Wt.push(St),Ot=jt(ht),Ot>0&&Wt.length>Ot&&!Wt.warned){Wt.warned=!0;var re=new Error("Possible EventEmitter memory leak detected. "+Wt.length+" "+String(pt)+" listeners added. Use emitter.setMaxListeners() to increase limit");re.name="MaxListenersExceededWarning",re.emitter=ht,re.type=pt,re.count=Wt.length,Yt(re)}return ht}xe.prototype.addListener=function(pt,St){return ne(this,pt,St,!1)},xe.prototype.on=xe.prototype.addListener,xe.prototype.prependListener=function(pt,St){return ne(this,pt,St,!0)};function Ae(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function se(ht,pt,St){var bt={fired:!1,wrapFn:void 0,target:ht,type:pt,listener:St},Ot=Ae.bind(bt);return Ot.listener=St,bt.wrapFn=Ot,Ot}xe.prototype.once=function(pt,St){return Ut(St),this.on(pt,se(this,pt,St)),this},xe.prototype.prependOnceListener=function(pt,St){return Ut(St),this.prependListener(pt,se(this,pt,St)),this},xe.prototype.removeListener=function(pt,St){var bt,Ot,Ht,Wt,re;if(Ut(St),Ot=this._events,Ot===void 0)return this;if(bt=Ot[pt],bt===void 0)return this;if(bt===St||bt.listener===St)--this._eventsCount===0?this._events=Object.create(null):(delete Ot[pt],Ot.removeListener&&this.emit("removeListener",pt,bt.listener||St));else if(typeof bt!="function"){for(Ht=-1,Wt=bt.length-1;Wt>=0;Wt--)if(bt[Wt]===St||bt[Wt].listener===St){re=bt[Wt].listener,Ht=Wt;break}if(Ht<0)return this;Ht===0?bt.shift():Dt(bt,Ht),bt.length===1&&(Ot[pt]=bt[0]),Ot.removeListener!==void 0&&this.emit("removeListener",pt,re||St)}return this},xe.prototype.off=xe.prototype.removeListener,xe.prototype.removeAllListeners=function(pt){var St,bt,Ot;if(bt=this._events,bt===void 0)return this;if(bt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):bt[pt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete bt[pt]),this;if(arguments.length===0){var Ht=Object.keys(bt),Wt;for(Ot=0;Ot<Ht.length;++Ot)Wt=Ht[Ot],Wt!=="removeListener"&&this.removeAllListeners(Wt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(St=bt[pt],typeof St=="function")this.removeListener(pt,St);else if(St!==void 0)for(Ot=St.length-1;Ot>=0;Ot--)this.removeListener(pt,St[Ot]);return this};function ke(ht,pt,St){var bt=ht._events;if(bt===void 0)return[];var Ot=bt[pt];return Ot===void 0?[]:typeof Ot=="function"?St?[Ot.listener||Ot]:[Ot]:St?nt(Ot):Ie(Ot,Ot.length)}xe.prototype.listeners=function(pt){return ke(this,pt,!0)},xe.prototype.rawListeners=function(pt){return ke(this,pt,!1)},xe.listenerCount=function(ht,pt){return typeof ht.listenerCount=="function"?ht.listenerCount(pt):de.call(ht,pt)},xe.prototype.listenerCount=de;function de(ht){var pt=this._events;if(pt!==void 0){var St=pt[ht];if(typeof St=="function")return 1;if(St!==void 0)return St.length}return 0}xe.prototype.eventNames=function(){return this._eventsCount>0?xt(this._events):[]};function Ie(ht,pt){for(var St=new Array(pt),bt=0;bt<pt;++bt)St[bt]=ht[bt];return St}function Dt(ht,pt){for(;pt+1<ht.length;pt++)ht[pt]=ht[pt+1];ht.pop()}function nt(ht){for(var pt=new Array(ht.length),St=0;St<pt.length;++St)pt[St]=ht[St].listener||ht[St];return pt}function et(ht,pt){return new Promise(function(St,bt){function Ot(Wt){ht.removeListener(pt,Ht),bt(Wt)}function Ht(){typeof ht.removeListener=="function"&&ht.removeListener("error",Ot),St([].slice.call(arguments))}at(ht,pt,Ht,{once:!0}),pt!=="error"&&ut(ht,Ot,{once:!0})})}function ut(ht,pt,St){typeof ht.on=="function"&&at(ht,"error",pt,St)}function at(ht,pt,St,bt){if(typeof ht.on=="function")bt.once?ht.once(pt,St):ht.on(pt,St);else if(typeof ht.addEventListener=="function")ht.addEventListener(pt,function Ot(Ht){bt.once&&ht.removeEventListener(pt,Ot),St(Ht)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ht)}},93778:function(gn,ze,Qt){"use strict";Qt.d(ze,{HT:function(){return Je},iZ:function(){return qn}});var xt={},Yt=function(pe,Fe,Ke,ve,Ee){var _e=xt[Fe]||(xt[Fe]=URL.createObjectURL(new Blob([pe],{type:"text/javascript"}))),Sn=new Worker(_e);return Sn.onerror=function(ei){return Ee(ei.error,null)},Sn.onmessage=function(ei){return Ee(null,ei.data)},Sn.postMessage(Ke,ve),Sn},he=Uint8Array,xe=Uint16Array,ge=Uint32Array,Ut=new he([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jt=new he([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ne=new he([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ae=function(pe,Fe){for(var Ke=new xe(31),ve=0;ve<31;++ve)Ke[ve]=Fe+=1<<pe[ve-1];for(var Ee=new ge(Ke[30]),ve=1;ve<30;++ve)for(var _e=Ke[ve];_e<Ke[ve+1];++_e)Ee[_e]=_e-Ke[ve]<<5|ve;return[Ke,Ee]},se=Ae(Ut,2),ke=se[0],de=se[1];ke[28]=258,de[258]=28;for(var Ie=Ae(jt,0),Dt=Ie[0],nt=Ie[1],et=new xe(32768),ut=0;ut<32768;++ut){var at=(ut&43690)>>>1|(ut&21845)<<1;at=(at&52428)>>>2|(at&13107)<<2,at=(at&61680)>>>4|(at&3855)<<4,et[ut]=((at&65280)>>>8|(at&255)<<8)>>>1}for(var ht=function(pe,Fe,Ke){for(var ve=pe.length,Ee=0,_e=new xe(Fe);Ee<ve;++Ee)++_e[pe[Ee]-1];var Sn=new xe(Fe);for(Ee=0;Ee<Fe;++Ee)Sn[Ee]=Sn[Ee-1]+_e[Ee-1]<<1;var ei;if(Ke){ei=new xe(1<<Fe);var Xe=15-Fe;for(Ee=0;Ee<ve;++Ee)if(pe[Ee])for(var Fn=Ee<<4|pe[Ee],si=Fe-pe[Ee],Gi=Sn[pe[Ee]-1]++<<si,Ji=Gi|(1<<si)-1;Gi<=Ji;++Gi)ei[et[Gi]>>>Xe]=Fn}else for(ei=new xe(ve),Ee=0;Ee<ve;++Ee)ei[Ee]=et[Sn[pe[Ee]-1]++]>>>15-pe[Ee];return ei},pt=new he(288),ut=0;ut<144;++ut)pt[ut]=8;for(var ut=144;ut<256;++ut)pt[ut]=9;for(var ut=256;ut<280;++ut)pt[ut]=7;for(var ut=280;ut<288;++ut)pt[ut]=8;for(var St=new he(32),ut=0;ut<32;++ut)St[ut]=5;var bt=ht(pt,9,0),Ot=ht(pt,9,1),Ht=ht(St,5,0),Wt=ht(St,5,1),re=function(pe){for(var Fe=pe[0],Ke=1;Ke<pe.length;++Ke)pe[Ke]>Fe&&(Fe=pe[Ke]);return Fe},te=function(pe,Fe,Ke){var ve=Fe/8>>0;return(pe[ve]|pe[ve+1]<<8)>>>(Fe&7)&Ke},Ce=function(pe,Fe){var Ke=Fe/8>>0;return(pe[Ke]|pe[Ke+1]<<8|pe[Ke+2]<<16)>>>(Fe&7)},ce=function(pe){return(pe/8>>0)+(pe&7&&1)},Qe=function(pe,Fe,Ke){(Fe==null||Fe<0)&&(Fe=0),(Ke==null||Ke>pe.length)&&(Ke=pe.length);var ve=new(pe instanceof xe?xe:pe instanceof ge?ge:he)(Ke-Fe);return ve.set(pe.subarray(Fe,Ke)),ve},je=function(pe,Fe,Ke){var ve=pe.length,Ee=!Fe||Ke,_e=!Ke||Ke.i;Ke||(Ke={}),Fe||(Fe=new he(ve*3));var Sn=function(pa){var _a=Fe.length;if(pa>_a){var ma=new he(Math.max(_a*2,pa));ma.set(Fe),Fe=ma}},ei=Ke.f||0,Xe=Ke.p||0,Fn=Ke.b||0,si=Ke.l,Gi=Ke.d,Ji=Ke.m,Te=Ke.n,Mi=ve*8;do{if(!si){Ke.f=ei=te(pe,Xe,1);var Ri=te(pe,Xe+1,3);if(Xe+=3,Ri)if(Ri==1)si=Ot,Gi=Wt,Ji=9,Te=5;else if(Ri==2){var ci=te(pe,Xe,31)+257,Bi=te(pe,Xe+10,15)+4,Qi=ci+te(pe,Xe+5,31)+1;Xe+=14;for(var Ar=new he(Qi),cn=new he(19),$i=0;$i<Bi;++$i)cn[ne[$i]]=te(pe,Xe+$i*3,7);Xe+=Bi*3;var dn=re(cn),or=(1<<dn)-1;if(!_e&&Xe+Qi*(dn+7)>Mi)break;for(var is=ht(cn,dn,1),$i=0;$i<Qi;){var qr=is[te(pe,Xe,or)];Xe+=qr&15;var yi=qr>>>4;if(yi<16)Ar[$i++]=yi;else{var rs=0,ro=0;for(yi==16?(ro=3+te(pe,Xe,3),Xe+=2,rs=Ar[$i-1]):yi==17?(ro=3+te(pe,Xe,7),Xe+=3):yi==18&&(ro=11+te(pe,Xe,127),Xe+=7);ro--;)Ar[$i++]=rs}}var Ur=Ar.subarray(0,ci),Or=Ar.subarray(ci);Ji=re(Ur),Te=re(Or),si=ht(Ur,Ji,1),Gi=ht(Or,Te,1)}else throw"invalid block type";else{var yi=ce(Xe)+4,Nr=pe[yi-4]|pe[yi-3]<<8,qi=yi+Nr;if(qi>ve){if(_e)throw"unexpected EOF";break}Ee&&Sn(Fn+Nr),Fe.set(pe.subarray(yi,qi),Fn),Ke.b=Fn+=Nr,Ke.p=Xe=qi*8;continue}if(Xe>Mi)throw"unexpected EOF"}Ee&&Sn(Fn+131072);for(var Wo=(1<<Ji)-1,oo=(1<<Te)-1,hi=Ji+Te+18;_e||Xe+hi<Mi;){var rs=si[Ce(pe,Xe)&Wo],Xt=rs>>>4;if(Xe+=rs&15,Xe>Mi)throw"unexpected EOF";if(!rs)throw"invalid length/literal";if(Xt<256)Fe[Fn++]=Xt;else if(Xt==256){si=null;break}else{var An=Xt-254;if(Xt>264){var $i=Xt-257,_s=Ut[$i];An=te(pe,Xe,(1<<_s)-1)+ke[$i],Xe+=_s}var xs=Gi[Ce(pe,Xe)&oo],Xo=xs>>>4;if(!xs)throw"invalid distance";Xe+=xs&15;var Or=Dt[Xo];if(Xo>3){var _s=jt[Xo];Or+=Ce(pe,Xe)&(1<<_s)-1,Xe+=_s}if(Xe>Mi)throw"unexpected EOF";Ee&&Sn(Fn+131072);for(var Ms=Fn+An;Fn<Ms;Fn+=4)Fe[Fn]=Fe[Fn-Or],Fe[Fn+1]=Fe[Fn+1-Or],Fe[Fn+2]=Fe[Fn+2-Or],Fe[Fn+3]=Fe[Fn+3-Or];Fn=Ms}}Ke.l=si,Ke.p=Xe,Ke.b=Fn,si&&(ei=1,Ke.m=Ji,Ke.d=Gi,Ke.n=Te)}while(!ei);return Fn==Fe.length?Fe:Qe(Fe,0,Fn)},He=function(pe,Fe,Ke){Ke<<=Fe&7;var ve=Fe/8>>0;pe[ve]|=Ke,pe[ve+1]|=Ke>>>8},Qn=function(pe,Fe,Ke){Ke<<=Fe&7;var ve=Fe/8>>0;pe[ve]|=Ke,pe[ve+1]|=Ke>>>8,pe[ve+2]|=Ke>>>16},Gn=function(pe,Fe){for(var Ke=[],ve=0;ve<pe.length;++ve)pe[ve]&&Ke.push({s:ve,f:pe[ve]});var Ee=Ke.length,_e=Ke.slice();if(!Ee)return[new he(0),0];if(Ee==1){var Sn=new he(Ke[0].s+1);return Sn[Ke[0].s]=1,[Sn,1]}Ke.sort(function(Qi,Ar){return Qi.f-Ar.f}),Ke.push({s:-1,f:25001});var ei=Ke[0],Xe=Ke[1],Fn=0,si=1,Gi=2;for(Ke[0]={s:-1,f:ei.f+Xe.f,l:ei,r:Xe};si!=Ee-1;)ei=Ke[Ke[Fn].f<Ke[Gi].f?Fn++:Gi++],Xe=Ke[Fn!=si&&Ke[Fn].f<Ke[Gi].f?Fn++:Gi++],Ke[si++]={s:-1,f:ei.f+Xe.f,l:ei,r:Xe};for(var Ji=_e[0].s,ve=1;ve<Ee;++ve)_e[ve].s>Ji&&(Ji=_e[ve].s);var Te=new xe(Ji+1),Mi=Yn(Ke[si-1],Te,0);if(Mi>Fe){var ve=0,Ri=0,yi=Mi-Fe,Nr=1<<yi;for(_e.sort(function(Ar,cn){return Te[cn.s]-Te[Ar.s]||Ar.f-cn.f});ve<Ee;++ve){var qi=_e[ve].s;if(Te[qi]>Fe)Ri+=Nr-(1<<Mi-Te[qi]),Te[qi]=Fe;else break}for(Ri>>>=yi;Ri>0;){var ci=_e[ve].s;Te[ci]<Fe?Ri-=1<<Fe-Te[ci]++-1:++ve}for(;ve>=0&&Ri;--ve){var Bi=_e[ve].s;Te[Bi]==Fe&&(--Te[Bi],++Ri)}Mi=Fe}return[new he(Te),Mi]},Yn=function(pe,Fe,Ke){return pe.s==-1?Math.max(Yn(pe.l,Fe,Ke+1),Yn(pe.r,Fe,Ke+1)):Fe[pe.s]=Ke},di=function(pe){for(var Fe=pe.length;Fe&&!pe[--Fe];);for(var Ke=new xe(++Fe),ve=0,Ee=pe[0],_e=1,Sn=function(Xe){Ke[ve++]=Xe},ei=1;ei<=Fe;++ei)if(pe[ei]==Ee&&ei!=Fe)++_e;else{if(!Ee&&_e>2){for(;_e>138;_e-=138)Sn(32754);_e>2&&(Sn(_e>10?_e-11<<5|28690:_e-3<<5|12305),_e=0)}else if(_e>3){for(Sn(Ee),--_e;_e>6;_e-=6)Sn(8304);_e>2&&(Sn(_e-3<<5|8208),_e=0)}for(;_e--;)Sn(Ee);_e=1,Ee=pe[ei]}return[Ke.subarray(0,ve),Fe]},ie=function(pe,Fe){for(var Ke=0,ve=0;ve<Fe.length;++ve)Ke+=pe[ve]*Fe[ve];return Ke},zt=function(pe,Fe,Ke){var ve=Ke.length,Ee=ce(Fe+2);pe[Ee]=ve&255,pe[Ee+1]=ve>>>8,pe[Ee+2]=pe[Ee]^255,pe[Ee+3]=pe[Ee+1]^255;for(var _e=0;_e<ve;++_e)pe[Ee+_e+4]=Ke[_e];return(Ee+4+ve)*8},We=function(pe,Fe,Ke,ve,Ee,_e,Sn,ei,Xe,Fn,si){He(Fe,si++,Ke),++Ee[256];for(var Gi=Gn(Ee,15),Ji=Gi[0],Te=Gi[1],Mi=Gn(_e,15),Ri=Mi[0],yi=Mi[1],Nr=di(Ji),qi=Nr[0],ci=Nr[1],Bi=di(Ri),Qi=Bi[0],Ar=Bi[1],cn=new xe(19),$i=0;$i<qi.length;++$i)cn[qi[$i]&31]++;for(var $i=0;$i<Qi.length;++$i)cn[Qi[$i]&31]++;for(var dn=Gn(cn,7),or=dn[0],is=dn[1],qr=19;qr>4&&!or[ne[qr-1]];--qr);var rs=Fn+5<<3,ro=ie(Ee,pt)+ie(_e,St)+Sn,Ur=ie(Ee,Ji)+ie(_e,Ri)+Sn+14+3*qr+ie(cn,or)+(2*cn[16]+3*cn[17]+7*cn[18]);if(rs<=ro&&rs<=Ur)return zt(Fe,si,pe.subarray(Xe,Xe+Fn));var Or,Wo,oo,hi;if(He(Fe,si,1+(Ur<ro)),si+=2,Ur<ro){Or=ht(Ji,Te,0),Wo=Ji,oo=ht(Ri,yi,0),hi=Ri;var Xt=ht(or,is,0);He(Fe,si,ci-257),He(Fe,si+5,Ar-1),He(Fe,si+10,qr-4),si+=14;for(var $i=0;$i<qr;++$i)He(Fe,si+3*$i,or[ne[$i]]);si+=3*qr;for(var An=[qi,Qi],_s=0;_s<2;++_s)for(var xs=An[_s],$i=0;$i<xs.length;++$i){var Xo=xs[$i]&31;He(Fe,si,Xt[Xo]),si+=or[Xo],Xo>15&&(He(Fe,si,xs[$i]>>>5&127),si+=xs[$i]>>>12)}}else Or=bt,Wo=pt,oo=Ht,hi=St;for(var $i=0;$i<ei;++$i)if(ve[$i]>255){var Xo=ve[$i]>>>18&31;Qn(Fe,si,Or[Xo+257]),si+=Wo[Xo+257],Xo>7&&(He(Fe,si,ve[$i]>>>23&31),si+=Ut[Xo]);var Ms=ve[$i]&31;Qn(Fe,si,oo[Ms]),si+=hi[Ms],Ms>3&&(Qn(Fe,si,ve[$i]>>>5&8191),si+=jt[Ms])}else Qn(Fe,si,Or[ve[$i]]),si+=Wo[ve[$i]];return Qn(Fe,si,Or[256]),si+Wo[256]},En=new ge([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Xn=new he(0),Ve=function(pe,Fe,Ke,ve,Ee,_e){var Sn=pe.length,ei=new he(ve+Sn+5*(1+Math.floor(Sn/7e3))+Ee),Xe=ei.subarray(ve,ei.length-Ee),Fn=0;if(!Fe||Sn<8)for(var si=0;si<=Sn;si+=65535){var Gi=si+65535;Gi<Sn?Fn=zt(Xe,Fn,pe.subarray(si,Gi)):(Xe[si]=_e,Fn=zt(Xe,Fn,pe.subarray(si,Sn)))}else{for(var Ji=En[Fe-1],Te=Ji>>>13,Mi=Ji&8191,Ri=(1<<Ke)-1,yi=new xe(32768),Nr=new xe(Ri+1),qi=Math.ceil(Ke/3),ci=2*qi,Bi=function(ln){return(pe[ln]^pe[ln+1]<<qi^pe[ln+2]<<ci)&Ri},Qi=new ge(25e3),Ar=new xe(288),cn=new xe(32),$i=0,dn=0,si=0,or=0,is=0,qr=0;si<Sn;++si){var rs=Bi(si),ro=si&32767,Ur=Nr[rs];if(yi[ro]=Ur,Nr[rs]=ro,is<=si){var Or=Sn-si;if(($i>7e3||or>24576)&&Or>423){Fn=We(pe,Xe,0,Qi,Ar,cn,dn,or,qr,si-qr,Fn),or=$i=dn=0,qr=si;for(var Wo=0;Wo<286;++Wo)Ar[Wo]=0;for(var Wo=0;Wo<30;++Wo)cn[Wo]=0}var oo=2,hi=0,Xt=Mi,An=ro-Ur&32767;if(Or>2&&rs==Bi(si-An))for(var _s=Math.min(Te,Or)-1,xs=Math.min(32767,si),Xo=Math.min(258,Or);An<=xs&&--Xt&&ro!=Ur;){if(pe[si+oo]==pe[si+oo-An]){for(var Ms=0;Ms<Xo&&pe[si+Ms]==pe[si+Ms-An];++Ms);if(Ms>oo){if(oo=Ms,hi=An,Ms>_s)break;for(var pa=Math.min(An,Ms-2),_a=0,Wo=0;Wo<pa;++Wo){var ma=si-An+Wo+32768&32767,ki=yi[ma],Tr=ma-ki+32768&32767;Tr>_a&&(_a=Tr,Ur=ma)}}}ro=Ur,Ur=yi[ro],An+=ro-Ur+32768&32767}if(hi){Qi[or++]=268435456|de[oo]<<18|nt[hi];var Oi=de[oo]&31,bi=nt[hi]&31;dn+=Ut[Oi]+jt[bi],++Ar[257+Oi],++cn[bi],is=si+oo,++$i}else Qi[or++]=pe[si],++Ar[pe[si]]}}Fn=We(pe,Xe,_e,Qi,Ar,cn,dn,or,qr,si-qr,Fn),_e||(Fn=zt(Xe,Fn,Xn))}return Qe(ei,0,ve+ce(Fn)+Ee)},In=null,Hn=function(){var pe=4294967295;return{p:function(Fe){for(var Ke=pe,ve=0;ve<Fe.length;++ve)Ke=In[Ke&255^Fe[ve]]^Ke>>>8;pe=Ke},d:function(){return pe^4294967295}}},li=function(){var pe=1,Fe=0;return{p:function(Ke){for(var ve=pe,Ee=Fe,_e=Ke.length,Sn=0;Sn!=_e;){for(var ei=Math.min(Sn+5552,_e);Sn<ei;++Sn)ve+=Ke[Sn],Ee+=ve;ve%=65521,Ee%=65521}pe=ve,Fe=Ee},d:function(){return(pe>>>8<<16|(Fe&255)<<8|Fe>>>8)+((pe&255)<<23)*2}}},tn=function(pe,Fe,Ke,ve,Ee){return Ve(pe,Fe.level==null?6:Fe.level,Fe.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(pe.length)))*1.5):12+Fe.mem,Ke,ve,!Ee)},Me=function(pe,Fe){var Ke={};for(var ve in pe)Ke[ve]=pe[ve];for(var ve in Fe)Ke[ve]=Fe[ve];return Ke},rn=function(pe,Fe,Ke){for(var ve=pe(),Ee=pe.toString(),_e=Ee.slice(Ee.indexOf("[")+1,Ee.lastIndexOf("]")).replace(/ /g,"").split(","),Sn=0;Sn<ve.length;++Sn){var ei=ve[Sn],Xe=_e[Sn];if(typeof ei=="function"){Fe+=";"+Xe+"=";var Fn=ei.toString();if(ei.prototype)if(Fn.indexOf("[native code]")!=-1){var si=Fn.indexOf(" ",8)+1;Fe+=Fn.slice(si,Fn.indexOf("(",si))}else{Fe+=Fn;for(var Gi in ei.prototype)Fe+=";"+Xe+".prototype."+Gi+"="+ei.prototype[Gi].toString()}else Fe+=Fn}else Ke[Xe]=ei}return[Fe,Ke]},Dn=null,sn=function(pe){var Fe=[];for(var Ke in pe)(pe[Ke]instanceof he||pe[Ke]instanceof xe||pe[Ke]instanceof ge)&&Fe.push((pe[Ke]=new pe[Ke].constructor(pe[Ke])).buffer);return Fe},Vt=function(pe,Fe,Ke,ve){var Ee;if(!Dn[Ke]){for(var _e="",Sn={},ei=pe.length-1,Xe=0;Xe<ei;++Xe)Ee=rn(pe[Xe],_e,Sn),_e=Ee[0],Sn=Ee[1];Dn[Ke]=rn(pe[ei],_e,Sn)}var Fn=Me({},Dn[Ke][1]);return Yt(Dn[Ke][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+Fe.toString()+"}",Ke,Fn,sn(Fn),ve)},Pt=function(){return[he,xe,ge,Ut,jt,ne,ke,Dt,Ot,Wt,et,ht,re,te,Ce,ce,Qe,je,Bo,De,on]},mt=function(){return[he,xe,ge,Ut,jt,ne,de,nt,bt,pt,Ht,St,et,En,Xn,ht,He,Qn,Gn,Yn,di,ie,zt,We,ce,Qe,Ve,tn,Qr,De]},vt=function(){return[Fi,rr,Kn,Hn,In]},kt=function(){return[ti,sr]},Lt=function(){return[xi,Kn,li]},_t=function(){return[wi]},De=function(pe){return postMessage(pe,[pe.buffer])},on=function(pe){return pe&&pe.size&&new he(pe.size)},mn=function(pe,Fe,Ke,ve,Ee,_e){var Sn=Vt(Ke,ve,Ee,function(ei,Xe){Sn.terminate(),_e(ei,Xe)});return Fe.consume||(pe=new he(pe)),Sn.postMessage([pe,Fe],[pe.buffer]),function(){Sn.terminate()}},$e=function(pe){return pe.ondata=function(Fe,Ke){return postMessage([Fe,Ke],[Fe.buffer])},function(Fe){return pe.push(Fe.data[0],Fe.data[1])}},Bn=function(pe,Fe,Ke,ve,Ee){var _e,Sn=Vt(pe,ve,Ee,function(ei,Xe){ei?(Sn.terminate(),Fe.ondata.call(Fe,ei)):(Xe[1]&&Sn.terminate(),Fe.ondata.call(Fe,ei,Xe[0],Xe[1]))});Sn.postMessage(Ke),Fe.push=function(ei,Xe){if(_e)throw"stream finished";if(!Fe.ondata)throw"no stream handler";Sn.postMessage([ei,_e=Xe],[ei.buffer])},Fe.terminate=function(){Sn.terminate()}},Re=function(pe,Fe){return pe[Fe]|pe[Fe+1]<<8},Mn=function(pe,Fe){return(pe[Fe]|pe[Fe+1]<<8|pe[Fe+2]<<16)+(pe[Fe+3]<<23)*2},Kn=function(pe,Fe,Ke){for(;Ke;++Fe)pe[Fe]=Ke,Ke>>>=8},Fi=function(pe,Fe){var Ke=Fe.filename;if(pe[0]=31,pe[1]=139,pe[2]=8,pe[8]=Fe.level<2?4:Fe.level==9?2:0,pe[9]=3,Fe.mtime!=0&&Kn(pe,4,Math.floor(new Date(Fe.mtime||Date.now())/1e3)),Ke){pe[3]=8;for(var ve=0;ve<=Ke.length;++ve)pe[ve+10]=Ke.charCodeAt(ve)}},ti=function(pe){if(pe[0]!=31||pe[1]!=139||pe[2]!=8)throw"invalid gzip data";var Fe=pe[3],Ke=10;Fe&4&&(Ke+=pe[10]|(pe[11]<<8)+2);for(var ve=(Fe>>3&1)+(Fe>>4&1);ve>0;ve-=!pe[Ke++]);return Ke+(Fe&2)},sr=function(pe){var Fe=pe.length;return(pe[Fe-4]|pe[Fe-3]<<8|pe[Fe-2]<<16)+2*(pe[Fe-1]<<23)},rr=function(pe){return 10+(pe.filename&&pe.filename.length+1||0)},xi=function(pe,Fe){var Ke=Fe.level,ve=Ke==0?0:Ke<6?1:Ke==9?3:2;pe[0]=120,pe[1]=ve<<6|(ve?32-2*ve:1)},wi=function(pe){if((pe[0]&15)!=8||pe[0]>>>4>7||(pe[0]<<8|pe[1])%31)throw"invalid zlib data";if(pe[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ir(pe,Fe){return!Fe&&typeof pe=="function"&&(Fe=pe,pe={}),this.ondata=Fe,pe}var ji=null,yr=null;function xr(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[mt],function(ve){return De(Qr(ve.data[0],ve.data[1]))},0,Ke)}function Qr(pe,Fe){return Fe===void 0&&(Fe={}),tn(pe,Fe,0,0)}var Ii=null,br=null;function Sr(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[Pt],function(ve){return De(Bo(ve.data[0],on(ve.data[1])))},1,Ke)}function Bo(pe,Fe){return je(pe,Fe)}var er=null,Lo=null;function ys(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[mt,vt,function(){return[Mo]}],function(ve){return De(Mo(ve.data[0],ve.data[1]))},2,Ke)}function Mo(pe,Fe){Fe===void 0&&(Fe={});var Ke=Hn(),ve=pe.length;Ke.p(pe);var Ee=tn(pe,Fe,rr(Fe),8),_e=Ee.length;return Fi(Ee,Fe),Kn(Ee,_e-8,Ke.d()),Kn(Ee,_e-4,ve),Ee}var Lr=null,Pn=null;function Mt(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[Pt,kt,function(){return[jn]}],function(ve){return De(jn(ve.data[0]))},3,Ke)}function jn(pe,Fe){return je(pe.subarray(ti(pe),-8),Fe||new he(sr(pe)))}var kn=null,_n=null;function Wn(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[mt,Lt,function(){return[qn]}],function(ve){return De(qn(ve.data[0],ve.data[1]))},4,Ke)}function qn(pe,Fe){Fe===void 0&&(Fe={});var Ke=li();Ke.p(pe);var ve=tn(pe,Fe,2,4);return xi(ve,Fe),Kn(ve,ve.length-4,Ke.d()),ve}var ui=null,Wi=null;function en(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return mn(pe,Fe,[Pt,_t,function(){return[Je]}],function(ve){return De(Je(ve.data[0],on(ve.data[1])))},5,Ke)}function Je(pe,Fe){return je((wi(pe),pe.subarray(2,-4)),Fe)}var be=null,un=null;function fi(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";return pe[0]==31&&pe[1]==139&&pe[2]==8?Mt(pe,Fe,Ke):(pe[0]&15)!=8||pe[0]>>4>7||(pe[0]<<8|pe[1])%31?Sr(pe,Fe,Ke):en(pe,Fe,Ke)}function mi(pe,Fe){return pe[0]==31&&pe[1]==139&&pe[2]==8?jn(pe,Fe):(pe[0]&15)!=8||pe[0]>>4>7||(pe[0]<<8|pe[1])%31?Bo(pe,Fe):Je(pe,Fe)}var ri=function(pe,Fe,Ke,ve){for(var Ee in pe){var _e=pe[Ee],Sn=Fe+Ee;_e instanceof he?Ke[Sn]=[_e,ve]:Array.isArray(_e)?Ke[Sn]=[_e[0],Me(ve,_e[1])]:ri(_e,Sn+"/",Ke,ve)}};function ee(pe,Fe){var Ke=pe.length;if(!Fe&&typeof TextEncoder!="undefined")return new TextEncoder().encode(pe);for(var ve=new he(pe.length+(pe.length>>>1)),Ee=0,_e=function(Fn){ve[Ee++]=Fn},Sn=0;Sn<Ke;++Sn){if(Ee+5>ve.length){var ei=new he(Ee+8+(Ke-Sn<<1));ei.set(ve),ve=ei}var Xe=pe.charCodeAt(Sn);Xe<128||Fe?_e(Xe):Xe<2048?(_e(192|Xe>>>6),_e(128|Xe&63)):Xe>55295&&Xe<57344?(Xe=65536+(Xe&1047552)|pe.charCodeAt(++Sn)&1023,_e(240|Xe>>>18),_e(128|Xe>>>12&63),_e(128|Xe>>>6&63),_e(128|Xe&63)):(_e(224|Xe>>>12),_e(128|Xe>>>6&63),_e(128|Xe&63))}return Qe(ve,0,Ee)}function Cn(pe,Fe){var Ke="";if(!Fe&&typeof TextDecoder!="undefined")return new TextDecoder().decode(pe);for(var ve=0;ve<pe.length;){var Ee=pe[ve++];Ee<128||Fe?Ke+=String.fromCharCode(Ee):Ee<224?Ke+=String.fromCharCode((Ee&31)<<6|pe[ve++]&63):Ee<240?Ke+=String.fromCharCode((Ee&15)<<12|(pe[ve++]&63)<<6|pe[ve++]&63):(Ee=((Ee&15)<<18|(pe[ve++]&63)<<12|(pe[ve++]&63)<<6|pe[ve++]&63)-65536,Ke+=String.fromCharCode(55296|Ee>>10,56320|Ee&1023))}return Ke}var Ti=function(pe,Fe){return Fe+30+Re(pe,Fe+26)+Re(pe,Fe+28)},Xi=function(pe,Fe,Ke){var ve=Re(pe,Fe+28),Ee=Cn(pe.subarray(Fe+46,Fe+46+ve),!(Re(pe,Fe+8)&2048)),_e=Fe+46+ve,Sn=Ke?On(pe,_e):[Mn(pe,Fe+20),Mn(pe,Fe+24),Mn(pe,Fe+42)],ei=Sn[0],Xe=Sn[1],Fn=Sn[2];return[Re(pe,Fe+10),ei,Xe,Ee,_e+Re(pe,Fe+30)+Re(pe,Fe+32),Fn]},On=function(pe,Fe){for(;Re(pe,Fe)!=1;Fe+=4+Re(pe,Fe+2));return[Mn(pe,Fe+12),Mn(pe,Fe+4),Mn(pe,Fe+20)]},Ge=function(pe,Fe,Ke,ve,Ee,_e,Sn,ei,Xe,Fn){var si=_e.length,Gi=ve.length;Kn(pe,Fe,Xe!=null?33639248:67324752),Fe+=4,Xe!=null&&(pe[Fe]=20,Fe+=2),pe[Fe]=20,Fe+=2,pe[Fe++]=Fn==8&&(ei.level==1?6:ei.level<6?4:ei.level==9?2:0),pe[Fe++]=Sn&&8,pe[Fe]=Fn,Fe+=2;var Ji=new Date(ei.mtime||Date.now()),Te=Ji.getFullYear()-1980;if(Te<0||Te>119)throw"date not in range 1980-2099";Kn(pe,Fe,(Te<<24)*2|Ji.getMonth()+1<<21|Ji.getDate()<<16|Ji.getHours()<<11|Ji.getMinutes()<<5|Ji.getSeconds()>>>1),Fe+=4,Kn(pe,Fe,Ke),Kn(pe,Fe+4,Gi),Kn(pe,Fe+8,Ee),Kn(pe,Fe+12,si),Fe+=16,Xe!=null&&(Kn(pe,Fe+=10,Xe),Fe+=4),pe.set(_e,Fe),Fe+=si,Xe==null&&pe.set(ve,Fe)},Si=function(pe,Fe,Ke,ve,Ee){Kn(pe,Fe,101010256),Kn(pe,Fe+8,Ke),Kn(pe,Fe+10,Ke),Kn(pe,Fe+12,ve),Kn(pe,Fe+16,Ee)};function Zi(pe,Fe,Ke){if(Ke||(Ke=Fe,Fe={}),typeof Ke!="function")throw"no callback";var ve={};ri(pe,"",ve,Fe);var Ee=Object.keys(ve),_e=Ee.length,Sn=0,ei=0,Xe=_e,Fn=new Array(_e),si=[],Gi=function(){for(var Ri=0;Ri<si.length;++Ri)si[Ri]()},Ji=function(){var Ri=new he(ei+22),yi=Sn,Nr=ei-Sn;ei=0;for(var qi=0;qi<Xe;++qi){var ci=Fn[qi];try{Ge(Ri,ei,ci.c,ci.d,ci.m,ci.n,ci.u,ci.p,null,ci.t),Ge(Ri,Sn,ci.c,ci.d,ci.m,ci.n,ci.u,ci.p,ei,ci.t),Sn+=46+ci.n.length,ei+=30+ci.n.length+ci.d.length}catch(Bi){return Ke(Bi,null)}}Si(Ri,Sn,Fn.length,Nr,yi),Ke(null,Ri)};_e||Ji();for(var Te=function(Ri){var yi=Ee[Ri],Nr=ve[yi],qi=Nr[0],ci=Nr[1],Bi=Hn(),Qi=qi.length;Bi.p(qi);var Ar=ee(yi),cn=Ar.length,$i=ci.level==0?0:8,dn=function(or,is){if(or)Gi(),Ke(or,null);else{var qr=is.length;Fn[Ri]={t:$i,d:is,m:Qi,c:Bi.d(),u:yi.length!=qr,n:Ar,p:ci},Sn+=30+cn+qr,ei+=76+2*cn+qr,--_e||Ji()}};if(Ar.length>65535&&dn("filename too long",null),!$i)dn(null,qi);else if(Qi<16e4)try{dn(null,Qr(qi,ci))}catch(or){dn(or,null)}else si.push(xr(qi,ci,dn))},Mi=0;Mi<Xe;++Mi)Te(Mi);return Gi}function ur(pe,Fe){Fe===void 0&&(Fe={});var Ke={},ve=[];ri(pe,"",Ke,Fe);var Ee=0,_e=0;for(var Sn in Ke){var ei=Ke[Sn],Xe=ei[0],Fn=ei[1],si=Fn.level==0?0:8,Gi=ee(Sn),Ji=Gi.length;if(Gi.length>65535)throw"filename too long";var Te=si?Qr(Xe,Fn):Xe,Mi=Te.length,Ri=Hn();Ri.p(Xe),ve.push({t:si,d:Te,m:Xe.length,c:Ri.d(),u:Sn.length!=Ji,n:Gi,o:Ee,p:Fn}),Ee+=30+Ji+Mi,_e+=76+2*Ji+Mi}for(var yi=new he(_e+22),Nr=Ee,qi=_e-Ee,ci=0;ci<ve.length;++ci){var Bi=ve[ci];Ge(yi,Bi.o,Bi.c,Bi.d,Bi.m,Bi.n,Bi.u,Bi.p,null,Bi.t),Ge(yi,Ee,Bi.c,Bi.d,Bi.m,Bi.n,Bi.u,Bi.p,Bi.o,Bi.t),Ee+=46+Bi.n.length}return Si(yi,Ee,ve.length,qi,Nr),yi}function Ln(pe,Fe){if(typeof Fe!="function")throw"no callback";for(var Ke=[],ve=function(){for(var Ji=0;Ji<Ke.length;++Ji)Ke[Ji]()},Ee={},_e=pe.length-22;Mn(pe,_e)!=101010256;--_e)if(!_e||pe.length-_e>65558){Fe("invalid zip file",null);return}var Sn=Re(pe,_e+8);Sn||Fe(null,{});var ei=Sn,Xe=Mn(pe,_e+16),Fn=Xe==4294967295;if(Fn){if(_e=Mn(pe,_e-12),Mn(pe,_e)!=101075792)throw"invalid zip file";ei=Sn=Mn(pe,_e+32),Xe=Mn(pe,_e+48)}for(var si=function(Ji){var Te=Xi(pe,Xe,Fn),Mi=Te[0],Ri=Te[1],yi=Te[2],Nr=Te[3],qi=Te[4],ci=Te[5],Bi=Ti(pe,ci);Xe=qi;var Qi=function(cn,$i){cn?(ve(),Fe(cn,null)):(Ee[Nr]=$i,--Sn||Fe(null,Ee))};if(!Mi)Qi(null,Qe(pe,Bi,Bi+Ri));else if(Mi==8){var Ar=pe.subarray(Bi,Bi+Ri);if(Ri<32e4)try{Qi(null,Bo(Ar,new he(yi)))}catch(cn){Qi(cn,null)}else Ke.push(Sr(Ar,{size:yi},Qi))}else Qi("unknown compression type "+Mi,null)},Gi=0;Gi<ei;++Gi)si(Gi);return ve}function Ui(pe){for(var Fe={},Ke=pe.length-22;Mn(pe,Ke)!=101010256;--Ke)if(!Ke||pe.length-Ke>65558)throw"invalid zip file";var ve=Re(pe,Ke+8);if(!ve)return{};var Ee=Mn(pe,Ke+16),_e=Ee==4294967295;if(_e){if(Ke=Mn(pe,Ke-12),Mn(pe,Ke)!=101075792)throw"invalid zip file";ve=Mn(pe,Ke+32),Ee=Mn(pe,Ke+48)}for(var Sn=0;Sn<ve;++Sn){var ei=Xi(pe,Ee,_e),Xe=ei[0],Fn=ei[1],si=ei[2],Gi=ei[3],Ji=ei[4],Te=ei[5],Mi=Ti(pe,Te);if(Ee=Ji,!Xe)Fe[Gi]=Qe(pe,Mi,Mi+Fn);else if(Xe==8)Fe[Gi]=Bo(pe.subarray(Mi,Mi+Fn),new he(si));else throw"unknown compression type "+Xe}return Fe}},23495:function(gn,ze,Qt){"use strict";Qt.d(ze,{$u:function(){return Ae},BD:function(){return Vt},E9:function(){return ne},FF:function(){return Lo},FJ:function(){return pt},Hn:function(){return ht},KX:function(){return bt},NB:function(){return $e},S0:function(){return rn},UL:function(){return se},Vk:function(){return at},Vm:function(){return Re},YI:function(){return Dn},ZA:function(){return he},Zt:function(){return ke},al:function(){return Lt},bn:function(){return kt},bx:function(){return Pt},g2:function(){return sn},h1:function(){return te},hD:function(){return yr},l4:function(){return Ut},rU:function(){return Bn},s_:function(){return mt},uz:function(){return mn},z6:function(){return de}}),gn=Qt.hmd(gn),function(){var Mt;function jn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function kn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:jn(a)}}function _n(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Wn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},qn;if(typeof Object.setPrototypeOf=="function")qn=Object.setPrototypeOf;else{var ui;t:{var Wi={a:!0},en={};try{en.__proto__=Wi,ui=en.a;break t}catch(a){}ui=!1}qn=ui?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Je=qn;function be(a,y){if(a.prototype=Wn(y.prototype),a.prototype.constructor=a,Je)Je(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var un=typeof Qt.g!="undefined"&&Qt.g!=null?Qt.g:self,fi=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},mi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ri(a,y){if(y){var x=un;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&mi(x,a,{writable:!0,value:y})}}ri("Object.assign",function(a){return a||fi}),ri("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var ee=typeof globalThis=="object"&&globalThis||typeof Qt.g=="object"&&Qt.g.global===Qt.g&&Qt.g||typeof self=="object"&&self.self===self&&self||{};ee.requestAnimationFrame===void 0&&(ee.setImmediate===void 0?ee.requestAnimationFrame=function(a){ee.setTimeout(a,0)}:ee.requestAnimationFrame=ee.setImmediate);function Cn(){}function Ti(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ee.clearTimeout(x),x=Xi(function(){x=-1,a.apply(E,b)},y)}}function Xi(a,y){return ee.setTimeout(a,y)}function On(a){return ee.document.createElement(a)}function Ge(a){throw Error(a)}function Si(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ge(a)}function Zi(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),Ge(x+" is not in the range "+y+": "+a)}function ur(a){ee.console&&ee.console.log(a)}function Ln(a){return typeof a=="object"&&a!==null}function Ui(a){return Array.isArray(a)||ee.NodeList&&a instanceof ee.NodeList||ee.HTMLCollection&&a instanceof ee.HTMLCollection}function pe(a){return Array.prototype.slice.call(a)}function Fe(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ge("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ke(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ge("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ve(){var a=Ji.pop();return a===void 0?[]:a}function Ee(a){a.length=0,Ji.push(a)}function _e(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(Ln(a)&&a.constructor)return _e(a.constructor);return typeof a}function Sn(a){var y=a;return Ln(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 ei(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 Xe(a,y,x){Object.defineProperty(Ho.prototype,a,{get:y,set:x})}function Fn(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 E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var si=ee.navigator!==void 0&&0<ee.navigator.userAgent.indexOf("Trident/7"),Gi=ee.navigator!==void 0&&ee.navigator.platform!==void 0&&ee.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ji=[];Object.freeze([]),Cn.className="Util",Cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Cn.adym="gojs.net",Cn.vfo="28e645fdb266",Cn.className="Util";function Te(a,y,x){or(this),this.j=a,this.xa=y,this.o=x}Te.prototype.toString=function(){return"EnumValue."+this.xa};function Mi(a,y){return y==null||y===""?null:a[y]}un.Object.defineProperties(Te.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Te.className="EnumValue";function Ri(){this.ew=[]}Ri.prototype.toString=function(){return this.ew.join("")},Ri.prototype.add=function(a){a!==""&&this.ew.push(a)},Ri.className="StringBuilder";function yi(){}yi.className="PropertyCollection";var Nr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ee.console&&ee.console.log(a)},HA:function(a,y,x,E){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(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function qi(){}qi.prototype.reset=function(){},qi.prototype.next=function(){return!1},qi.prototype.Ad=function(){return!1},qi.prototype.first=function(){return null},qi.prototype.any=function(){return!1},qi.prototype.all=function(){return!0},qi.prototype.each=function(){return this},qi.prototype.map=function(){return this},qi.prototype.filter=function(){return this},qi.prototype.de=function(){},qi.prototype.toString=function(){return"EmptyIterator"},un.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset;var ci=null;qi.className="EmptyIterator",ci=new qi;function Bi(a){this.key=-1,this.value=a}Bi.prototype.reset=function(){this.key=-1},Bi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Bi.prototype.Ad=function(){return this.next()},Bi.prototype.first=function(){return this.key=0,this.value},Bi.prototype.any=function(a){return this.key=-1,a(this.value)},Bi.prototype.all=function(a){return this.key=-1,a(this.value)},Bi.prototype.each=function(a){return this.key=-1,a(this.value),this},Bi.prototype.map=function(a){return new Bi(a(this.value))},Bi.prototype.filter=function(a){return a(this.value)?new Bi(this.value):ci},Bi.prototype.de=function(){this.value=null},Bi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},un.Object.defineProperties(Bi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function Qi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Qi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Qi.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,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Qi.prototype.Ad=function(){return this.next()},Qi.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 E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Qi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},Qi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},Qi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},Qi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new cn,a.s=x,a.xb(),a.iterator},Qi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new cn,a.s=x,a.xb(),a.iterator},Qi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Qi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},un.Object.defineProperties(Qi.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,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset,Qi.className="ListIterator";function Ar(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Ar.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Ar.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)},Ar.prototype.Ad=function(){return this.next()},Ar.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},Ar.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},Ar.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},Ar.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},Ar.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new cn,a.s=x,a.xb(),a.iterator},Ar.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new cn,a.s=x,a.xb(),a.iterator},Ar.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Ar.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},un.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset,Ar.className="ListIteratorBackwards";function cn(a){or(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ge("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=cn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"List()#"+qr(this)},Mt.add=function(a){return a===null?this:(this._isFrozen&&Si(this,a),this.s.push(a),this.xb(),this)},Mt.push=function(a){this.add(a)},Mt.addAll=function(a){if(a===null)return this;this._isFrozen&&Si(this);var y=this.s;if(Ui(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Mt.clear=function(){this._isFrozen&&Si(this),this.s.length=0,this.xb()},Mt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Mt.has=function(a){return this.contains(a)},Mt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Mt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Zi(a,"0 <= i < length",cn,"elt:i"),y[a]},Mt.get=function(a){return this.M(a)},Mt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Zi(a,"0 <= i < length",cn,"setElt:i"),this._isFrozen&&Si(this,a),x[a]=y},Mt.set=function(a,y){this.cd(a,y)},Mt.first=function(){var a=this.s;return a.length===0?null:a[0]},Mt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Mt.pop=function(){this._isFrozen&&Si(this);var a=this.s;return 0<a.length?a.pop():null},cn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},cn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},cn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},cn.prototype.map=function(a){for(var y=new cn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},cn.prototype.filter=function(a){for(var y=new cn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Mt=cn.prototype,Mt.Gb=function(a,y){0>a&&Zi(a,">= 0",cn,"insertAt:i"),this._isFrozen&&Si(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(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)},Mt.delete=function(a){return this.remove(a)},Mt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Zi(a,"0 <= i < length",cn,"removeAt:i"),this._isFrozen&&Si(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Mt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&Si(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},cn.prototype.copy=function(){var a=new cn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Mt=cn.prototype,Mt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Mt.Iv=function(){for(var a=new dn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Mt.sort=function(a){return this._isFrozen&&Si(this),this.s.sort(a),this.xb(),this},Mt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Si(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Zi(y,"0 <= from < length",cn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Mt.reverse=function(){return this._isFrozen&&Si(this),this.s.reverse(),this.xb(),this},un.Object.defineProperties(cn.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 ci;var a=this.Sa;return a!==null?(a.reset(),a):new Qi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ci;var a=this.Hg;return a!==null?(a.reset(),a):new Ar(this)}}}),cn.prototype.reverse=cn.prototype.reverse,cn.prototype.sortRange=cn.prototype.zi,cn.prototype.sort=cn.prototype.sort,cn.prototype.toSet=cn.prototype.Iv,cn.prototype.toArray=cn.prototype.Fa,cn.prototype.removeRange=cn.prototype.removeRange,cn.prototype.removeAt=cn.prototype.mb,cn.prototype.delete=cn.prototype.delete,cn.prototype.remove=cn.prototype.remove,cn.prototype.insertAt=cn.prototype.Gb,cn.prototype.pop=cn.prototype.pop,cn.prototype.last=cn.prototype.jc,cn.prototype.first=cn.prototype.first,cn.prototype.set=cn.prototype.set,cn.prototype.setElt=cn.prototype.cd,cn.prototype.get=cn.prototype.get,cn.prototype.elt=cn.prototype.M,cn.prototype.indexOf=cn.prototype.indexOf,cn.prototype.has=cn.prototype.has,cn.prototype.contains=cn.prototype.contains,cn.prototype.clear=cn.prototype.clear,cn.prototype.addAll=cn.prototype.addAll,cn.prototype.push=cn.prototype.push,cn.prototype.add=cn.prototype.add,cn.prototype.thaw=cn.prototype.ka,cn.prototype.freeze=cn.prototype.freeze,cn.className="List";function $i(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}$i.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},$i.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)},$i.prototype.Ad=function(){return this.next()},$i.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},$i.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},$i.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},$i.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},$i.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},$i.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},$i.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},$i.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},un.Object.defineProperties($i.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),$i.prototype.first=$i.prototype.first,$i.prototype.hasNext=$i.prototype.Ad,$i.prototype.next=$i.prototype.next,$i.prototype.reset=$i.prototype.reset,$i.className="SetIterator";function dn(a){or(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ge("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=dn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Set()#"+qr(this)},Mt.add=function(a){if(a===null)return this;this._isFrozen&&Si(this,a);var y=a;return Ln(a)&&(y=is(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Wo(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},Mt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Si(this),Ui(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},Mt.contains=function(a){if(a===null)return!1;var y=a;return Ln(a)&&(y=qr(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Mt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Mt.first=function(){var a=this.ea;return a===null?null:a.value},dn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},dn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},dn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},dn.prototype.map=function(a){for(var y=new dn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},dn.prototype.filter=function(a){for(var y=new dn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Mt=dn.prototype,Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(this,a);var y=a;if(Ln(a)&&(y=qr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Mt.delete=function(a){return this.remove(a)},Mt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Si(this),Ui(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},Mt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Si(this);var y=new dn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Mt.clear=function(){this._isFrozen&&Si(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},dn.prototype.copy=function(){var a=new dn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},dn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},dn.prototype.Hv=function(){var a=new cn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function or(a){a.__gohashid=rs++}function is(a){var y=a.__gohashid;return y===void 0&&(y=rs++,a.__gohashid=y),y}function qr(a){return a.__gohashid}un.Object.defineProperties(dn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ci;var a=this.Sa;return a!==null?(a.reset(),a):new $i(this)}}}),dn.prototype.toList=dn.prototype.Hv,dn.prototype.toArray=dn.prototype.Fa,dn.prototype.clear=dn.prototype.clear,dn.prototype.retainAll=dn.prototype.pA,dn.prototype.removeAll=dn.prototype.hp,dn.prototype.delete=dn.prototype.delete,dn.prototype.remove=dn.prototype.remove,dn.prototype.first=dn.prototype.first,dn.prototype.containsAny=dn.prototype.Ty,dn.prototype.containsAll=dn.prototype.Sy,dn.prototype.has=dn.prototype.has,dn.prototype.contains=dn.prototype.contains,dn.prototype.addAll=dn.prototype.addAll,dn.prototype.add=dn.prototype.add,dn.prototype.thaw=dn.prototype.ka,dn.prototype.freeze=dn.prototype.freeze;var rs=1;dn.className="Set",dn.uniqueHash=or,dn.hashIdUnique=is,dn.hashId=qr;function ro(a){this.ma=a,this.qa=a.Ja,this.sa=null}ro.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ro.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)},ro.prototype.Ad=function(){return this.next()},ro.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},ro.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},ro.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},ro.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},ro.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ro.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},ro.prototype.de=function(){this.value=this.key=null,this.qa=-1},ro.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},un.Object.defineProperties(ro.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ro.prototype.first=ro.prototype.first,ro.prototype.hasNext=ro.prototype.Ad,ro.prototype.next=ro.prototype.next,ro.prototype.reset=ro.prototype.reset,ro.className="MapKeySetIterator";function Ur(a){dn.call(this),or(this),this._isFrozen=!0,this.ma=a}be(Ur,dn),Mt=Ur.prototype,Mt.freeze=function(){return this},Mt.ka=function(){return this},Mt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Mt.add=function(){Ge("This Set is read-only: "+this.toString())},Mt.contains=function(a){return this.ma.contains(a)},Mt.has=function(a){return this.contains(a)},Mt.remove=function(){Ge("This Set is read-only: "+this.toString())},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){Ge("This Set is read-only: "+this.toString())},Mt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ur.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ur.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ur.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ur.prototype.map=function(a){for(var y=new dn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ur.prototype.filter=function(a){for(var y=new dn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Ur.prototype.copy=function(){return new Ur(this.ma)},Ur.prototype.Iv=function(){var a=new dn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ur.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Ur.prototype.Hv=function(){var a=new cn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},un.Object.defineProperties(Ur.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ci:new ro(this.ma)}}}),Ur.prototype.toList=Ur.prototype.Hv,Ur.prototype.toArray=Ur.prototype.Fa,Ur.prototype.toSet=Ur.prototype.Iv,Ur.prototype.first=Ur.prototype.first,Ur.prototype.clear=Ur.prototype.clear,Ur.prototype.delete=Ur.prototype.delete,Ur.prototype.remove=Ur.prototype.remove,Ur.prototype.has=Ur.prototype.has,Ur.prototype.contains=Ur.prototype.contains,Ur.prototype.add=Ur.prototype.add,Ur.prototype.thaw=Ur.prototype.ka,Ur.prototype.freeze=Ur.prototype.freeze,Ur.className="MapKeySet";function Or(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Or.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Or.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)},Or.prototype.Ad=function(){return this.next()},Or.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},Or.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},Or.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},Or.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},Or.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Or.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new cn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Or.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Or.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},un.Object.defineProperties(Or.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Or.prototype.first=Or.prototype.first,Or.prototype.hasNext=Or.prototype.Ad,Or.prototype.next=Or.prototype.next,Or.prototype.reset=Or.prototype.reset,Or.className="MapValueSetIterator";function Wo(a,y){this.key=a,this.value=y,this.ll=this.va=null}Wo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Wo.className="KeyValuePair";function oo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},oo.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)},oo.prototype.Ad=function(){return this.next()},oo.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},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new cn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},oo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},un.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="MapIterator";function hi(a){or(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"&&Ge("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=hi.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Map()#"+qr(this)},Mt.add=function(a,y){this._isFrozen&&Si(this,a);var x=a;Ln(a)&&(x=is(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Wo(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()):E.value=y,this},Mt.set=function(a,y){return this.add(a,y)},Mt.addAll=function(a){if(a===null)return this;if(Ui(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof hi)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},Mt.first=function(){return this.ea},hi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},hi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},hi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},hi.prototype.map=function(a){for(var y=new hi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},hi.prototype.filter=function(a){for(var y=new hi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Mt=hi.prototype,Mt.contains=function(a){var y=a;return Ln(a)&&(y=qr(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.I=function(a){var y=a;return Ln(a)&&(y=qr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Mt.get=function(a){return this.I(a)},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(this,a);var y=a;if(Ln(a)&&(y=qr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){this._isFrozen&&Si(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()},hi.prototype.copy=function(){var a=new hi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},hi.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Wo(b.key,b.value),x++}return y},hi.prototype.Lf=function(){return new Ur(this)},un.Object.defineProperties(hi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ci;var a=this.Sa;return a!==null?(a.reset(),a):new oo(this)}},iteratorKeys:{get:function(){return 0>=this.count?ci:new ro(this)}},iteratorValues:{get:function(){if(0>=this.count)return ci;var a=this.jf;return a!==null?(a.reset(),a):new Or(this)}}}),hi.prototype.toKeySet=hi.prototype.Lf,hi.prototype.toArray=hi.prototype.Fa,hi.prototype.clear=hi.prototype.clear,hi.prototype.delete=hi.prototype.delete,hi.prototype.remove=hi.prototype.remove,hi.prototype.get=hi.prototype.get,hi.prototype.getValue=hi.prototype.I,hi.prototype.has=hi.prototype.has,hi.prototype.contains=hi.prototype.contains,hi.prototype.first=hi.prototype.first,hi.prototype.addAll=hi.prototype.addAll,hi.prototype.set=hi.prototype.set,hi.prototype.add=hi.prototype.add,hi.prototype.thaw=hi.prototype.ka,hi.prototype.freeze=hi.prototype.freeze,hi.className="Map";function Xt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ge("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var An,_s,xs,Xo,Ms;Xt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Xt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Xt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Xt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Xt.prototype.copy=function(){var a=new Xt;return a.x=this.x,a.y=this.y,a},Mt=Xt.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this};function pa(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Xt(x,b)}return new Xt}function _a(a){return a.x.toString()+" "+a.y.toString()}Mt.toString=function(){return"Point("+this.x+","+this.y+")"},Mt.D=function(a){return a instanceof Xt?this.x===a.x&&this.y===a.y:!1},Mt.hi=function(a,y){return this.x===a&&this.y===y},Mt.Xa=function(a){return Pe.B(this.x,a.x)&&Pe.B(this.y,a.y)},Mt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Mt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Xt.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Mt=Xt.prototype,Mt.scale=function(a,y){return this.x*=a,this.y*=y,this},Mt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Mt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Mt.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},Mt.ab=function(a){return ma(a.x-this.x,a.y-this.y)},Mt.direction=function(a,y){return ma(a-this.x,y-this.y)};function ma(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}Mt.Ry=function(a,y){return Pe.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Mt.fA=function(a,y,x,E){return Pe.qh(a,y,x,E,this.x,this.y,this),this},Mt.gA=function(a,y){return Pe.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Mt.uA=function(a,y,x,E){return Pe.No(this.x,this.y,a,y,x,E,this),this},Mt.vA=function(a,y){return Pe.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Mt.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},Mt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Mt.transform=function(a){return a.Ga(this),this};function ki(a,y){return y.Cd(a),a}function Tr(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var lt=-x*tt-E*rt;return 0>=lt||lt>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Oi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function bi(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Xt.alloc=function(){var a=hr.pop();return a===void 0?new Xt:a},Xt.allocAt=function(a,y){var x=hr.pop();return x===void 0?new Xt(a,y):(x.x=a,x.y=y,x)},Xt.free=function(a){hr.push(a)},Xt.prototype.isReal=Xt.prototype.w,Xt.prototype.setSpot=Xt.prototype.yi,Xt.prototype.setRectSpot=Xt.prototype.xi,Xt.prototype.snapToGridPoint=Xt.prototype.vA,Xt.prototype.snapToGrid=Xt.prototype.uA,Xt.prototype.projectOntoLineSegmentPoint=Xt.prototype.gA,Xt.prototype.projectOntoLineSegment=Xt.prototype.fA,Xt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return Pe.Rl(a,y,x,E,b,z,tt,rt)},Xt.prototype.compareWithLineSegmentPoint=Xt.prototype.Ry,Xt.compareWithLineSegment=function(a,y,x,E,b,z){return Pe.Fl(a,y,x,E,b,z)},Xt.prototype.direction=Xt.prototype.direction,Xt.prototype.directionPoint=Xt.prototype.ab,Xt.prototype.normalize=Xt.prototype.normalize,Xt.prototype.distanceSquared=Xt.prototype.zd,Xt.prototype.distanceSquaredPoint=Xt.prototype.Bf,Xt.prototype.scale=Xt.prototype.scale,Xt.prototype.rotate=Xt.prototype.rotate,Xt.prototype.offset=Xt.prototype.offset,Xt.prototype.subtract=Xt.prototype.re,Xt.prototype.add=Xt.prototype.add,Xt.prototype.equalsApprox=Xt.prototype.Xa,Xt.prototype.equalTo=Xt.prototype.hi,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.set=Xt.prototype.set,Xt.prototype.setTo=Xt.prototype.sg;var hr=[];Xt.className="Point",Xt.parse=pa,Xt.stringify=_a,Xt.distanceLineSegmentSquared=Tr,Xt.distanceSquared=Oi,Xt.direction=bi,Xt.Origin=An=new Xt(0,0).ja(),Xt.InfiniteTopLeft=_s=new Xt(-1/0,-1/0).ja(),Xt.InfiniteBottomRight=xs=new Xt(1/0,1/0).ja(),Xt.SixPoint=Xo=new Xt(6,6).ja(),Xt.NoPoint=Ms=new Xt(NaN,NaN).ja(),Xt.parse=pa,Xt.stringify=_a,Xt.distanceLineSegmentSquared=Tr,Xt.distanceSquared=Oi,Xt.direction=bi;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):Ge("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var cr,Wr,Ko,Go,ws,Zs,Qa;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},Mt=ln.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this};function Na(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new ln(x,b)}return new ln}function nl(a){return a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Size("+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof ln?this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y){return this.width===a&&this.height===y},Mt.Xa=function(a){return Pe.B(this.width,a.width)&&Pe.B(this.height,a.height)},Mt.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},Mt.w=function(){return isFinite(this.width)&&isFinite(this.height)},ln.alloc=function(){var a=Vl.pop();return a===void 0?new ln:a},ln.free=function(a){Vl.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 Vl=[];ln.className="Size",ln.parse=Na,ln.stringify=nl,ln.ZeroSize=cr=new ln(0,0).ja(),ln.OneSize=Wr=new ln(1,1).ja(),ln.SixSize=Ko=new ln(6,6).ja(),ln.EightSize=Go=new ln(8,8).ja(),ln.TenSize=ws=new ln(10,10).ja(),ln.InfiniteSize=Zs=new ln(1/0,1/0).ja(),ln.NoSize=Qa=new ln(NaN,NaN).ja(),ln.parse=Na,ln.stringify=nl;function nn(a,y,x,E){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 E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Xt?(x=a.x,a=a.y,y instanceof Xt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof ln?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ge("Incorrect second argument supplied to Rect constructor "+y)):Ge("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Mt=nn.prototype,Mt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function il(a,y,x){a.width=y,a.height=x}Mt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Mt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.dd=function(a){return this.x=a.x,this.y=a.y,this},Mt.tA=function(a){return this.width=a.width,this.height=a.height,this},nn.prototype.copy=function(){var a=new nn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Mt=nn.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this};function au(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new nn(x,b,z,tt)}return new nn}function Xu(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof nn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Mt.Xa=function(a){return Pe.B(this.x,a.x)&&Pe.B(this.y,a.y)&&Pe.B(this.width,a.width)&&Pe.B(this.height,a.height)};function Ps(a,y){return Pe.$(a.x,y.x)&&Pe.$(a.y,y.y)&&Pe.$(a.width,y.width)&&Pe.$(a.height,y.height)}Mt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Mt.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},Mt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.Bc=function(a,y){return lu(this,y,a,y,a)},Mt.Co=function(a){return lu(this,a.top,a.right,a.bottom,a.left)},Mt.Fv=function(a){return lu(this,-a.top,-a.right,-a.bottom,-a.left)},Mt.Hz=function(a,y,x,E){return lu(this,a,y,x,E)};function lu(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Mt.Ex=function(a){return cA(this,a.x,a.y,a.width,a.height)},Mt.Uu=function(a,y,x,E){return cA(this,a,y,x,E)};function cA(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Mt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Mt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Ju(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Mt.Ye=function(a){return us(this,a.x,a.y,0,0)},Mt.ed=function(a){return us(this,a.x,a.y,a.width,a.height)},Mt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),us(this,a,y,x,E)};function us(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Mt.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 Ys(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function Vr(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Mt.Mz=function(){return this.width===0&&this.height===0},nn.alloc=function(){var a=ks.pop();return a===void 0?new nn:a},nn.allocAt=function(a,y,x,E){var b=ks.pop();return b===void 0?new nn(a,y,x,E):b.h(a,y,x,E)},nn.free=function(a){ks.push(a)},un.Object.defineProperties(nn.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 Xt(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 Xt(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}}}),nn.prototype.isEmpty=nn.prototype.Mz,nn.prototype.isReal=nn.prototype.w,nn.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return Pe.Fx(a,y,x,E,b,z,tt,rt)},nn.prototype.setSpot=nn.prototype.yi,nn.prototype.union=nn.prototype.Kv,nn.prototype.unionRect=nn.prototype.ed,nn.prototype.unionPoint=nn.prototype.Ye,nn.prototype.intersects=nn.prototype.Vu,nn.prototype.intersectsRect=nn.prototype.Yc,nn.prototype.intersect=nn.prototype.Uu,nn.prototype.intersectRect=nn.prototype.Ex,nn.prototype.grow=nn.prototype.Hz,nn.prototype.subtractMargin=nn.prototype.Fv,nn.prototype.addMargin=nn.prototype.Co,nn.prototype.inflate=nn.prototype.Bc,nn.prototype.offset=nn.prototype.offset,nn.prototype.contains=nn.prototype.contains,nn.prototype.containsRect=nn.prototype.Re,nn.prototype.containsPoint=nn.prototype.ca,nn.prototype.equalsApprox=nn.prototype.Xa,nn.prototype.equalTo=nn.prototype.hi,nn.prototype.equals=nn.prototype.D,nn.prototype.setSize=nn.prototype.tA,nn.prototype.setPoint=nn.prototype.dd,nn.prototype.set=nn.prototype.set,nn.prototype.setTo=nn.prototype.sg;var So=null,os=null,ks=[];nn.className="Rect",nn.parse=au,nn.stringify=Xu,nn.contains=Ys,nn.intersects=Vr,nn.ZeroRect=So=new nn(0,0,0,0).ja(),nn.NoRect=os=new nn(NaN,NaN,NaN,NaN).ja(),nn.parse=au,nn.stringify=Xu,nn.contains=Ys,nn.intersects=Vr;function nr(a,y,x,E){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):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):Ge("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}nr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},nr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},nr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},nr.prototype.copy=function(){var a=new nr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Mt=nr.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this};function gh(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new nr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new nr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new nr(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new nr(x,b):new nr(x,b,z,tt)}return new nr}function qu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Mt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Mt.D=function(a){return a instanceof nr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Mt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Mt.Xa=function(a){return Pe.B(this.top,a.top)&&Pe.B(this.right,a.right)&&Pe.B(this.bottom,a.bottom)&&Pe.B(this.left,a.left)},Mt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},nr.alloc=function(){var a=Uu.pop();return a===void 0?new nr:a},nr.free=function(a){Uu.push(a)},nr.prototype.isReal=nr.prototype.w,nr.prototype.equalsApprox=nr.prototype.Xa,nr.prototype.equalTo=nr.prototype.hi,nr.prototype.equals=nr.prototype.D,nr.prototype.set=nr.prototype.set,nr.prototype.setTo=nr.prototype.sg;var ml=null,ph=null,Uu=[];nr.className="Margin",nr.parse=gh,nr.stringify=qu,nr.ZeroMargin=ml=new nr(0,0,0,0).ja(),nr.TwoMargin=ph=new nr(2,2,2,2).ja(),nr.parse=gh,nr.stringify=qu;function Ei(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Aa,ta,uu,ZA,Bu,Zr,Fs,zi,$r,Po,Ka,Da,Xs,va,Ks,mh,Ia,Qu,Zo,Wl,As,xa,Ga,YA,dA,Es,vh,hl,ea,Ml,na,ps,Ds,Ba,Gh,kl;Ei.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ei.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Ei.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ei.prototype.copy=function(){var a=new Ei;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Mt=Ei.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this};function ia(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function pc(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Aa;if(a==="TopLeft")return ta;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return uu;if(a==="TopRight")return ZA;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Bu;if(a==="Center")return Zr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Fs;if(a==="BottomLeft")return zi;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return $r;if(a==="BottomRight")return Po;if(a==="TopSide")return Ka;if(a==="LeftSide")return Da;if(a==="RightSide")return Xs;if(a==="BottomSide")return va;if(a==="TopBottomSides")return Ks;if(a==="LeftRightSides")return mh;if(a==="TopLeftSides")return Ia;if(a==="TopRightSides")return Qu;if(a==="BottomLeftSides")return Zo;if(a==="BottomRightSides")return Wl;if(a==="NotTopSide")return As;if(a==="NotLeftSide")return xa;if(a==="NotRightSide")return Ga;if(a==="NotBottomSide")return YA;if(a==="AllSides")return dA;if(a==="Default")return Es;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new Ei(x,b,z,tt)}return new Ei}function LA(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Mt.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(Aa)?"None":this.D(ta)?"TopLeft":this.D(uu)?"Top":this.D(ZA)?"TopRight":this.D(Bu)?"Left":this.D(Zr)?"Center":this.D(Fs)?"Right":this.D(zi)?"BottomLeft":this.D($r)?"Bottom":this.D(Po)?"BottomRight":this.D(Ka)?"TopSide":this.D(Da)?"LeftSide":this.D(Xs)?"RightSide":this.D(va)?"BottomSide":this.D(Ks)?"TopBottomSides":this.D(mh)?"LeftRightSides":this.D(Ia)?"TopLeftSides":this.D(Qu)?"TopRightSides":this.D(Zo)?"BottomLeftSides":this.D(Wl)?"BottomRightSides":this.D(As)?"NotTopSide":this.D(xa)?"NotLeftSide":this.D(Ga)?"NotRightSide":this.D(YA)?"NotBottomSide":this.D(dA)?"AllSides":this.D(Es)?"Default":"None"},Mt.D=function(a){return a instanceof Ei?(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},Mt.gv=function(){return new Ei(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Mt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(vh))a=Da;else if(a.D(hl))a=Xs;else if(a.D(ea))a=Ka;else if(a.D(Ml))a=va;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Mt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Mt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Mt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Mt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Mt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ei.alloc=function(){var a=Ou.pop();return a===void 0?new Ei:a},Ei.free=function(a){Ou.push(a)},Ei.prototype.isDefault=Ei.prototype.Xb,Ei.prototype.isNone=Ei.prototype.ys,Ei.prototype.isSide=Ei.prototype.$c,Ei.prototype.isNoSpot=Ei.prototype.Mc,Ei.prototype.isSpot=Ei.prototype.sb,Ei.prototype.includesSide=Ei.prototype.Hf,Ei.prototype.opposite=Ei.prototype.gv,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.set=Ei.prototype.set,Ei.prototype.setTo=Ei.prototype.sg;var Ou=[];Ei.className="Spot",Ei.parse=pc,Ei.stringify=LA,Ei.None=Aa=ia(new Ei(0,0,0,0),0).ja(),Ei.Default=Es=ia(new Ei(0,0,-1,0),-1).ja(),Ei.TopLeft=ta=new Ei(0,0,0,0).ja(),Ei.TopCenter=uu=new Ei(.5,0,0,0).ja(),Ei.TopRight=ZA=new Ei(1,0,0,0).ja(),Ei.LeftCenter=Bu=new Ei(0,.5,0,0).ja(),Ei.Center=Zr=new Ei(.5,.5,0,0).ja(),Ei.RightCenter=Fs=new Ei(1,.5,0,0).ja(),Ei.BottomLeft=zi=new Ei(0,1,0,0).ja(),Ei.BottomCenter=$r=new Ei(.5,1,0,0).ja(),Ei.BottomRight=Po=new Ei(1,1,0,0).ja(),Ei.MiddleTop=na=uu,Ei.MiddleLeft=ps=Bu,Ei.MiddleRight=Ds=Fs,Ei.MiddleBottom=Ba=$r,Ei.Top=ea=uu,Ei.Left=vh=Bu,Ei.Right=hl=Fs,Ei.Bottom=Ml=$r,Ei.TopSide=Ka=ia(new Ei(0,0,1,1),1).ja(),Ei.LeftSide=Da=ia(new Ei(0,0,1,2),1).ja(),Ei.RightSide=Xs=ia(new Ei(0,0,1,4),1).ja(),Ei.BottomSide=va=ia(new Ei(0,0,1,8),1).ja(),Ei.TopBottomSides=Ks=ia(new Ei(0,0,1,9),1).ja(),Ei.LeftRightSides=mh=ia(new Ei(0,0,1,6),1).ja(),Ei.TopLeftSides=Ia=ia(new Ei(0,0,1,3),1).ja(),Ei.TopRightSides=Qu=ia(new Ei(0,0,1,5),1).ja(),Ei.BottomLeftSides=Zo=ia(new Ei(0,0,1,10),1).ja(),Ei.BottomRightSides=Wl=ia(new Ei(0,0,1,12),1).ja(),Ei.NotTopSide=As=ia(new Ei(0,0,1,14),1).ja(),Ei.NotLeftSide=xa=ia(new Ei(0,0,1,13),1).ja(),Ei.NotRightSide=Ga=ia(new Ei(0,0,1,11),1).ja(),Ei.NotBottomSide=YA=ia(new Ei(0,0,1,7),1).ja(),Ei.AllSides=dA=ia(new Ei(0,0,1,15),1).ja(),Gh=new Ei(.156,.156).ja(),kl=new Ei(.844,.844).ja(),Ei.parse=pc,Ei.stringify=LA;function vr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}vr.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},vr.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},vr.prototype.copy=function(){var a=new vr;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},vr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},vr.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},vr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},vr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},vr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=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=E,this.m22=b,this},vr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=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*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},vr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},vr.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Mt=vr.prototype,Mt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Mt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Mt.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)},Mt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Mt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Mt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,lt=this.dx,At=this.dy,ft=y*z+x*rt+lt,yt=y*tt+x*ot+At,Et=E*z+x*rt+lt,Tt=E*tt+x*ot+At;return x=y*z+b*rt+lt,y=y*tt+b*ot+At,z=E*z+b*rt+lt,E=E*tt+b*ot+At,b=Math.min(ft,Et),ft=Math.max(ft,Et),Et=Math.min(yt,Tt),yt=Math.max(yt,Tt),b=Math.min(b,x),ft=Math.max(ft,x),Et=Math.min(Et,y),yt=Math.max(yt,y),b=Math.min(b,z),ft=Math.max(ft,z),Et=Math.min(Et,E),yt=Math.max(yt,E),a.h(b,Et,ft-b,yt-Et),a},vr.alloc=function(){var a=Pd.pop();return a===void 0?new vr:a},vr.free=function(a){Pd.push(a)},vr.prototype.transformRect=vr.prototype.pp,vr.prototype.transformPoint=vr.prototype.Ga,vr.prototype.scale=vr.prototype.scale,vr.prototype.translate=vr.prototype.translate,vr.prototype.rotate=vr.prototype.rotate,vr.prototype.invert=vr.prototype.Vj,vr.prototype.multiplyInverted=vr.prototype.bv,vr.prototype.multiply=vr.prototype.multiply,vr.prototype.reset=vr.prototype.reset,vr.prototype.isIdentity=vr.prototype.ws,vr.prototype.equals=vr.prototype.D,vr.prototype.setTransform=vr.prototype.setTransform,vr.prototype.set=vr.prototype.set;var Pd=[];vr.className="Transform",vr.xF="54a702f3e53909c447824c6706603faf4c";var Pe={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Pe.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Pe.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,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var lt=y,At=E;else lt=E,At=y;if(a===x)return lt<=tt&&tt<=At&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(At+=b,lt-=b,lt<=tt&&tt<=At))if(ot-rt>At-lt)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,lt,At,ft){if(Pe.Yb(a,y,tt,rt,ft,x,E)&&Pe.Yb(a,y,tt,rt,ft,b,z))return Pe.Yb(a,y,tt,rt,ft,lt,At);var yt=(a+x)/2,Et=(y+E)/2,Tt=(x+b)/2,It=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+Tt)/2,x=(Et+It)/2,Tt=(Tt+b)/2,It=(It+z)/2;var qt=(E+Tt)/2,Gt=(x+It)/2;return Pe.cs(a,y,yt,Et,E,x,qt,Gt,ot,lt,At,ft)||Pe.cs(qt,Gt,Tt,It,b,z,tt,rt,ot,lt,At,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var lt=(x+b)/2,At=(E+z)/2;return ot.h((((a+x)/2+lt)/2+(lt+(b+tt)/2)/2)/2,(((y+E)/2+At)/2+(At+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,lt=(E+z)/2;return bi(((a+x)/2+ot)/2,((y+E)/2+lt)/2,(ot+(b+tt)/2)/2,(lt+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Pe.Yb(a,y,tt,rt,ot,x,E)&&Pe.Yb(a,y,tt,rt,ot,b,z))us(lt,a,y,0,0),us(lt,tt,rt,0,0);else{var At=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var Tt=(E+yt)/2,It=(x+Et)/2;Pe.Dl(a,y,At,ft,E,x,Tt,It,ot,lt),Pe.Dl(Tt,It,yt,Et,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Pe.Yb(a,y,tt,rt,ot,x,E)&&Pe.Yb(a,y,tt,rt,ot,b,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(rt);else{var At=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var Tt=(E+yt)/2,It=(x+Et)/2;Pe.Qe(a,y,At,ft,E,x,Tt,It,ot,lt),Pe.Qe(Tt,It,yt,Et,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Pe.Yb(a,y,b,z,lt,x,E))return Pe.Yb(a,y,b,z,lt,rt,ot);var At=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var yt=(At+x)/2,Et=(ft+E)/2;return Pe.jv(a,y,At,ft,yt,Et,tt,rt,ot,lt)||Pe.jv(yt,Et,x,E,b,z,tt,rt,ot,lt)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(Pe.Yb(a,y,b,z,tt,x,E))us(rt,a,y,0,0),us(rt,b,z,0,0);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(lt+E)/2;Pe.iv(a,y,ot,lt,At,ft,tt,rt),Pe.iv(At,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(Pe.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(lt+E)/2;Pe.ep(a,y,ot,lt,At,ft,tt,rt),Pe.ep(At,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,lt,At,ft,yt,Et){if(Pe.Yb(a,y,tt,rt,yt,x,E)&&Pe.Yb(a,y,tt,rt,yt,b,z))return!Pe.Rl(a,y,tt,rt,ot,lt,At,ft)||(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-At),yt===0)?!1:(Et.h(((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-lt*At))/yt,((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*At))/yt),!0);var Tt=(a+x)/2,It=(y+E)/2,qt=(x+b)/2,Gt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+qt)/2,x=(It+Gt)/2,qt=(qt+b)/2,Gt=(Gt+z)/2;var oe=(E+qt)/2,le=(x+Gt)/2,ue=1/0,ye=!1,Oe=0,Vn=0;return Pe.Eo(a,y,Tt,It,E,x,oe,le,ot,lt,At,ft,yt,Et)&&(a=(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt),a<ue&&(ue=a,ye=!0,Oe=Et.x,Vn=Et.y)),Pe.Eo(oe,le,qt,Gt,b,z,tt,rt,ot,lt,At,ft,yt,Et)&&(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt)<ue&&(ye=!0,Oe=Et.x,Vn=Et.y),ye&&(Et.x=Oe,Et.y=Vn),ye},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,At,ft,yt){var Et=0;if(Pe.Yb(a,y,tt,rt,yt,x,E)&&Pe.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-At),yt===0)return Et;var Tt=((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-lt*At))/yt,It=((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*At))/yt;if(Tt>=At)return Et;if((ot>At?ot-At:At-ot)<(lt>ft?lt-ft:ft-lt)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),It<ot||It>a)return Et}else if(a<tt?(ot=a,a=tt):ot=tt,Tt<ot||Tt>a)return Et;0<yt?Et++:0>yt&&Et--}else{Tt=(a+x)/2,It=(y+E)/2;var qt=(x+b)/2,Gt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+qt)/2,x=(It+Gt)/2,qt=(qt+b)/2,Gt=(Gt+z)/2;var oe=(E+qt)/2,le=(x+Gt)/2;Et+=Pe.Fo(a,y,Tt,It,E,x,oe,le,ot,lt,At,ft,yt),Et+=Pe.Fo(oe,le,qt,Gt,b,z,tt,rt,ot,lt,At,ft,yt)}return Et},qh:function(a,y,x,E,b,z,tt){return Pe.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):Pe.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return Pe.B(a,x)&&Pe.B(y,E)?(ot.h(a,y),!1):Pe.$(b,tt)?Pe.$(a,x)?(Pe.qh(a,y,x,E,b,z,ot),!1):Pe.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),Pe.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),Pe.$(rt,tt)?(Pe.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),Pe.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):Pe.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return Pe.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,lt){function At(qt,Gt){var oe=(qt-a)*(qt-a)+(Gt-y)*(Gt-y);oe<ft&&(ft=oe,ot.h(qt,Gt))}var ft=1/0;At(ot.x,ot.y);var yt=0,Et=0,Tt=0,It=0;if(b<tt?(yt=b,Et=tt):(yt=tt,Et=b),z<rt?(Tt=b,It=tt):(Tt=tt,It=b),yt=(Et-yt)/2+lt,lt=(It-Tt)/2+lt,b=(b+tt)/2,z=(z+rt)/2,yt===0||lt===0)return ot;if(.5>(x>a?x-a:a-x)){if(yt=1-(x-b)*(x-b)/(yt*yt),0>yt)return ot;yt=Math.sqrt(yt),E=-lt*yt+z,At(x,lt*yt+z),At(x,E)}else{if(x=(E-y)/(x-a),E=1/(yt*yt)+x*x/(lt*lt),rt=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*b/(yt*yt),yt=rt*rt-4*E*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+b*b/(yt*yt)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>yt)return ot;yt=Math.sqrt(yt),lt=(-rt+yt)/(2*E),At(lt,x*lt-x*a+y),yt=(-rt-yt)/(2*E),At(yt,x*yt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var lt=1e21,At=a,ft=y;if(Pe.Ve(a,y,a,E,b,z,tt,rt,ot)){var yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);yt<lt&&(lt=yt,At=ot.x,ft=ot.y)}return Pe.Ve(x,y,x,E,b,z,tt,rt,ot)&&(yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),yt<lt&&(lt=yt,At=ot.x,ft=ot.y)),Pe.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<lt&&(lt=y,At=ot.x,ft=ot.y)),Pe.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<lt&&(lt=a,At=ot.x,ft=ot.y)),ot.h(At,ft),1e21>lt},us:function(a,y,x){return Pe.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,lt=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=lt&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=lt&&rt<=ot&&b>=a):!!(Ys(a,y,x,E,b,z)||Ys(a,y,x,E,tt,rt)||Pe.Rl(a,y,ot,y,b,z,tt,rt)||Pe.Rl(ot,y,ot,lt,b,z,tt,rt)||Pe.Rl(ot,lt,a,lt,b,z,tt,rt)||Pe.Rl(a,lt,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=Pe.Fl(a,y,x,E,b,z)*Pe.Fl(a,y,x,E,tt,rt)&&0>=Pe.Fl(b,z,tt,rt,a,y)*Pe.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,lt=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=lt+rt*Math.min(E,ot),rt=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(lt+y)/2,z.push([rt,lt,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=lt+rt*Math.min(E,ot),z.push(Pe.Vy(x,lt,b,a,y)),E-=Math.abs(b-lt),lt=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,lt=tt*tt+ot*ot,At=lt+tt*tt+ot*rt;return lt=4/3*(Math.sqrt(2*lt*At)-At)/(tt*rt-ot*tt),rt=tt-lt*ot,tt=ot+lt*tt,ot=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*lt,b+rt*lt+tt*z,E+rt*z-ot*lt,b+rt*lt+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,lt=tt===0?x:E;return(tt===0?b:z)&&(lt=-lt),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),Pe.az(ot,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var lt=0;9999999999>lt&&(y=.5*(rt+ot),!(y===rt||y===ot));++lt){var At=a/(y+b),ft=tt/(y+z);if(At=At*At+ft*ft-1,0<At)rt=y;else if(0>At)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new yi,um:new yi,Mf:new yi,Nf:0,vm:100};Pe.za=Pe.AA;function Un(a){or(this),this.l=2,a===void 0&&(a=Un.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Un.o?this.ee=new cn:(Un.V===null&&(Un.V=new cn().freeze()),this.ee=Un.V),this.aq=this.ee.Ja,this.Ip=new nn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ta,this.gg=Po,this.Rk=this.Sk=NaN,this.Uf=yn}Un.prototype.copy=function(){var a=new Un;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===Un.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].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},Un.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Un.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Un.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},Un.prototype.ka=function(){if(Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Un.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},Un.prototype.Xa=function(a){if(!(a instanceof Un))return!1;if(this.type!==a.type)return this.type===Un.j&&a.type===Un.o?lf(this,a):a.type===Un.j&&this.type===Un.o?lf(a,this):!1;if(this.type===Un.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return Pe.B(this.startX,a.startX)&&Pe.B(this.startY,a.startY)&&Pe.B(this.endX,a.endX)&&Pe.B(this.endY,a.endY)};function lf(a,y){return a.type!==Un.j||y.type!==Un.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Pe.B(a.startX,y.startX)&&Pe.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Fo&&Pe.B(a.endX,y.endX)&&Pe.B(a.endY,y.endY))))}Un.ia=function(a){return a.toString()},Un.prototype.qb=function(a){a.classType===Un&&(this.type=a)},Un.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Un.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 Un.u:var y=new nn(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 Un.F:if(y=new nn(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 Un.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Un.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},Un.parse=function(a,y){function x(){return It>=ue-1?!0:lt[It+1].match(ye)!==null}function E(){return It++,lt[It]}function b(tr){var Ki=parseFloat(E()),io=parseFloat(E());qt===qt.toLowerCase()&&(Ki=le.x+Ki,io=le.y+io),tr.h(Ki,io)}function z(){return b(le),le}function tt(){return b(oe),oe}function rt(){var tr=Gt.toLowerCase();return tr!=="c"&&tr!=="s"&&tr!=="q"&&tr!=="t"?le:new Xt(2*le.x-oe.x,2*le.y-oe.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$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 lt=a.split(" ");for(a=0;a<lt.length;a++){var At=lt[a];if(At.match(/(\.[0-9]*)(\.)/gm)!==null){ot=ve();for(var ft="",yt=!1,Et=0;Et<At.length;Et++){var Tt=At[Et];Tt!=="."||yt?Tt==="."?(ot.push(ft),ft="."):ft+=Tt:(yt=!0,ft+=Tt)}for(ot.push(ft),lt.splice(a,1),At=0;At<ot.length;At++)lt.splice(a+At,0,ot[At]);a+=ot.length-1,Ee(ot)}}var It=-1,qt="",Gt="";ot=new Xt(0,0);var oe=new Xt(0,0),le=new Xt(0,0),ue=lt.length;a=Dy(null),yt=ft=At=!1,Et=!0,Tt=null;for(var ye=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(It>=ue-1);)if(Gt=qt,qt=E(),qt!=="")switch(qt.toUpperCase()){case"X":Et=!0,ft=At=!1;break;case"M":for(Tt=z(),a.mc===null||Et===!0?(Mg(a,Tt.x,Tt.y,At,!ft,yt),Et=!1):a.moveTo(Tt.x,Tt.y),ot.assign(le);!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"L":for(;!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"H":for(;!x();)le=new Xt((qt===qt.toLowerCase()?le.x:0)+parseFloat(E()),le.y),a.lineTo(le.x,le.y);break;case"V":for(;!x();)le=new Xt(le.x,(qt===qt.toLowerCase()?le.y:0)+parseFloat(E())),a.lineTo(le.x,le.y);break;case"C":for(;!x();){Tt=new Xt,b(Tt);var Oe=tt(),Vn=z();ad(a,Tt.x,Tt.y,Oe.x,Oe.y,Vn.x,Vn.y)}break;case"S":for(;!x();)Tt=rt(),Oe=tt(),Vn=z(),ad(a,Tt.x,Tt.y,Oe.x,Oe.y,Vn.x,Vn.y);break;case"Q":for(;!x();)Tt=tt(),Oe=z(),m0(a,Tt.x,Tt.y,Oe.x,Oe.y);break;case"T":for(;!x();)oe=Tt=rt(),Oe=z(),m0(a,Tt.x,Tt.y,Oe.x,Oe.y);break;case"B":for(;!x();){Tt=parseFloat(E()),Oe=parseFloat(E()),Vn=parseFloat(E());var ai=parseFloat(E()),ii=parseFloat(E()),Tn=ii,fn=!1;x()||(Tn=parseFloat(E()),x()||(fn=parseFloat(E())!==0)),qt===qt.toLowerCase()&&(Vn+=le.x,ai+=le.y),a.arcTo(Tt,Oe,Vn,ai,ii,Tn,fn)}break;case"A":for(;!x();)Tt=Math.abs(parseFloat(E())),Oe=Math.abs(parseFloat(E())),Vn=parseFloat(E()),ii=ai=!1,fn=Tn=0,Tn=E(),Tn.length===1?(ai=!!parseFloat(Tn),ii=!!parseFloat(E()),Tn=parseFloat(E())):Tn.length===2?(ai=!!parseFloat(Tn[0]),ii=!!parseFloat(Tn[1]),Tn=parseFloat(E())):(ai=!!parseFloat(Tn[0]),ii=!!parseFloat(Tn[1]),Tn=parseFloat(Tn.slice(2))),fn=parseFloat(E()),qt===qt.toLowerCase()&&(Tn=le.x+Tn,fn=le.y+fn),le.h(Tn,fn),Mw(a,Tt,Oe,Vn,ai,ii,Tn,fn);break;case"Z":Lw(a),le.assign(ot);break;case"F":for(Tt="",Oe=1;lt[It+Oe];)if(lt[It+Oe]==="0")yt=!0,Oe++;else if(lt[It+Oe].match(/[Uu]/)!==null)Oe++;else if(lt[It+Oe].match(ye)===null)Oe++;else{Tt=lt[It+Oe];break}Tt.match(/[Mm]/)?At=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Tt="",Oe=1;lt[It+Oe];)if(lt[It+Oe].match(/[Ff]/)!==null)Oe++;else if(lt[It+Oe].match(ye)===null)Oe++;else{Tt=lt[It+Oe];break}Tt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,v0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},Un.Ha=function(a,y){for(var x=a.length,E=Xt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Xt.free(E)},Un.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Un.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},Un.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Un.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.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),Fd(this,a,!1),us(a,0,0,0,0),a.freeze()},Un.prototype.ix=function(){var a=new nn;return Fd(this,a,!0),a};function Fd(a,y,x){switch(a.type){case Un.j:case Un.u:case Un.F:x?y.h(a.od,a.pd,0,0):us(y,a.od,a.pd,0,0),us(y,a.Dc,a.Ec,0,0);break;case Un.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):us(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,lt=z.startY,At=0;At<rt;At++){var ft=tt[At];switch(ft.type){case Fo:case Us:ot=ft.endX,lt=ft.endY,us(y,ot,lt,0,0);break;case ya:Pe.Dl(ot,lt,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case vl:Pe.iv(ot,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case Ls:case Yl:var yt=ft.type===Ls?cl(ft,z):Zl(ft,z,ot,lt),Et=yt.length;if(Et===0){ot=ft.type===Ls?ft.centerX:ft.endX,lt=ft.type===Ls?ft.centerY:ft.endY,us(y,ot,lt,0,0);break}ft=null;for(var Tt=0;Tt<Et;Tt++)ft=yt[Tt],Pe.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],lt=ft[7]);break;default:Ge("Unknown Segment type: "+ft.type)}}}break;default:Ge("Unknown Geometry type: "+a.type)}}Un.prototype.normalize=function(){this._isFrozen&&Si(this);var a=this.ix();return this.offset(-a.x,-a.y),new Xt(-a.x,-a.y)},Un.prototype.offset=function(a,y){return this._isFrozen&&Si(this),this.transform(1,0,0,1,a,y),this},Un.prototype.scale=function(a,y){return this._isFrozen&&Si(this),this.transform(a,0,0,y,0,0),this},Un.prototype.rotate=function(a,y,x){this._isFrozen&&Si(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=vr.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),vr.free(E),this},Mt=Un.prototype,Mt.transform=function(a,y,x,E,b,z){switch(this.type){case Un.j:case Un.u:case Un.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case Un.o:for(var ot=this.figures.s,lt=ot.length,At=0;At<lt;At++){var ft=ot[At];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var yt=ft.length,Et=0;Et<yt;Et++){var Tt=ft[Et];switch(Tt.type){case Fo:case Us:tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case ya:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.point2X,rt=Tt.point2Y,Tt.point2X=tt*a+rt*x+b,Tt.point2Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case vl:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case Ls:tt=Tt.centerX,rt=Tt.centerY,Tt.centerX=tt*a+rt*x+b,Tt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.startAngle+=tt),0>a&&(Tt.startAngle=180-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),0>E&&(Tt.startAngle=-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY!==void 0&&(Tt.radiusY*=Math.sqrt(y*y+E*E));break;case Yl:if(tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z,Tt.radiusX===0||Tt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.xAxisRotation+=tt),0>a&&(Tt.xAxisRotation=180-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),0>E&&(Tt.xAxisRotation=-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY*=Math.sqrt(y*y+E*E);break;default:Ge("Unknown Segment type: "+Tt.type)}}}}return this._isInvalidBounds=!0,this},Mt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case Un.j:return Pe.Yb(x,E,b,z,y,a.x,a.y);case Un.u:var tt=nn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),nn.free(tt),a;case Un.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case Un.o:return rl(this,a,y,!0,!1);default:return!1}};function rl(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,lt,At,ft,yt=a.figures.s,Et=yt.length,Tt=0;Tt<Et;Tt++){var It=yt[Tt],qt=!It.isEvenOdd;if(It.isFilled){if(E&&It.ca(z,y,x))return!0;var Gt=It.segments;ot=It.startX,lt=It.startY;for(var oe=ot,le=lt,ue=Gt.s,ye=0;ye<=Gt.length;ye++){var Oe=void 0;if(ye!==Gt.length){Oe=ue[ye];var Vn=Oe.type;a=Oe.endX,ft=Oe.endY}else Vn=Fo,a=oe,ft=le;switch(Vn){case Us:if(oe=$u(z,y,tt,y,ot,lt,oe,le),isNaN(oe))return!0;rt+=oe,oe=a,le=ft;break;case Fo:if(ot=$u(z,y,tt,y,ot,lt,a,ft),isNaN(ot))return!0;rt+=ot;break;case ya:At=Pe.Fo(ot,lt,Oe.point1X,Oe.point1Y,Oe.point2X,Oe.point2Y,a,ft,tt,y,z,y,.5),rt+=At;break;case vl:At=Pe.Fo(ot,lt,(ot+2*Oe.point1X)/3,(lt+2*Oe.point1Y)/3,(2*Oe.point1X+a)/3,(2*Oe.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=At;break;case Ls:case Yl:Vn=Oe.type===Ls?cl(Oe,It):Zl(Oe,It,ot,lt);var ai=Vn.length;if(ai===0){if(ot=$u(z,y,tt,y,ot,lt,Oe.type===Ls?Oe.centerX:Oe.endX,Oe.type===Ls?Oe.centerY:Oe.endY),isNaN(ot))return!0;rt+=ot;break}Oe=null;for(var ii=0;ii<ai;ii++){if(Oe=Vn[ii],ii===0){if(At=$u(z,y,tt,y,ot,lt,Oe[0],Oe[1]),isNaN(At))return!0;rt+=At}At=Pe.Fo(Oe[0],Oe[1],Oe[2],Oe[3],Oe[4],Oe[5],Oe[6],Oe[7],tt,y,z,y,.5),rt+=At}Oe!==null&&(a=Oe[6],ft=Oe[7]);break;default:Ge("Unknown Segment type: "+Oe.type)}ot=a,lt=ft}if(qt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(It.ca(z,y,b?x:x+2))return!0}return!1}function $u(a,y,x,E,b,z,tt,rt){if(Pe.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var lt=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,lt>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(lt<b||lt>tt)return 0}else if(lt<tt||lt>b)return 0;return 0<ot?1:-1}function yh(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Mt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Xt),this.type===Un.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=At}}return y},Mt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Un.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var lt=rt[a];if(z+lt>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=lt}}return NaN},Mt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Un.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,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,At=x[rt],x=At[2*a],rt=At[2*a+1],b=At[2*a+2],a=At[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=At}}return y},Mt.xx=function(a){if(this.type===Un.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Xt.alloc();return Pe.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Xt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Un.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var lt=Math.min(tt,ot,rt,b);if(lt===rt)return E/z;if(lt===ot)return(y+a)/z;if(lt===b)return(2*y+x-E)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Xt.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var At=lt=0,ft=0;ft<ot;ft++)for(var yt=y[ft],Et=x[ft],Tt=yt.length,It=0;It<Tt;It+=2){var qt=yt[It],Gt=yt[It+1];if(It!==0){Pe.qh(lt,At,qt,Gt,a.x,a.y,E);var oe=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);oe<b&&(b=oe,tt=rt,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-At)*(E.y-At))),rt+=Et[(It-2)/2]}lt=qt,At=Gt}return Xt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function mc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===Un.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===Un.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===Un.F){var z=new Js;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Gr(Ls);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=cl(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];Pe.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(fA(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var lt=b.segments.s,At=lt.length,ft=0;ft<At;ft++){var yt=lt[ft];switch(yt.type){case Us:4<=E.length&&(y.push(E),x.push(fA(E))),E=[],E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY,rt=tt,ot=z;break;case Fo:E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY;break;case ya:Pe.Qe(tt,z,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case vl:Pe.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case Ls:var Et=cl(yt,b),Tt=Et.length;if(Tt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var It=0;It<Tt;It++){var qt=Et[It];Pe.Qe(tt,z,qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],.5,E),tt=qt[6],z=qt[7]}break;case Yl:if(Et=Zl(yt,b,tt,z),Tt=Et.length,It=yt.endX,qt=yt.endY,Tt===0){E.push(It),E.push(qt),tt=It,z=qt;break}for(It=0;It<Tt;It++)qt=Et[It],Pe.Qe(tt,z,qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],.5,E),tt=qt[6],z=qt[7];break;default:Ge("Segment not of valid type: "+yt.type)}yt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(fA(E)))}}}function fA(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Oi(x,E,tt,rt))),x=tt,E=rt}return y}Mt.add=function(a){return this.ee.add(a),this},Mt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&Si(this),this.fg=new Ei(a,y,b,z).freeze(),this.gg=new Ei(x,E,tt,rt).freeze(),this},un.Object.defineProperties(Un.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 mc(this),this.tk}},flattenedLengths:{get:function(){return mc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Un.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===Un.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,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Si(this,a),this.na=a,a===Un.o?this.ee=new cn:(Un.V===null&&(Un.V=new cn().freeze()),this.ee=Un.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Si(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Si(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Si(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Si(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Si(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Si(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Si(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Si(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Un.prototype.setSpots=Un.prototype.pm,Un.prototype.add=Un.prototype.add,Un.prototype.getFractionForPoint=Un.prototype.xx,Un.prototype.getPointAndAngleAlongPath=Un.prototype.Qu,Un.prototype.getAngleAlongPath=Un.prototype.wx,Un.prototype.getPointAlongPath=Un.prototype.Pu,Un.prototype.containsPoint=Un.prototype.ca,Un.prototype.transform=Un.prototype.transform,Un.prototype.rotate=Un.prototype.rotate,Un.prototype.scale=Un.prototype.scale,Un.prototype.offset=Un.prototype.offset,Un.prototype.normalize=Un.prototype.normalize,Un.prototype.computeBoundsWithoutOrigin=Un.prototype.ix,Un.prototype.equalsApprox=Un.prototype.Xa,Un.className="Geometry",Un.j=new Te(Un,"Line",0),Un.u=new Te(Un,"Rectangle",1),Un.F=new Te(Un,"Ellipse",2),Un.o=new Te(Un,"Path",3),Un.V=null,Un.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Un.className="Geometry",Un.stringify=Un.ia,Un.fillPath=Un.nb,Un.parse=Un.parse,Un.Line=Un.j,Un.Rectangle=Un.u,Un.Ellipse=Un.F,Un.Path=Un.o;function Js(a,y,x,E,b){or(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new cn,this.sr=this.pl.Ja,this.fw=null}Js.prototype.copy=function(){var a=new Js;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Mt=Js.prototype,Mt.Xa=function(a){if(!(a instanceof Js&&Pe.B(this.startX,a.startX)&&Pe.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 E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Mt.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,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Mt.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},Mt.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},Mt.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},Mt.add=function(a){return this.pl.add(a),this},Mt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,lt=0;lt<ot;lt++){var At=rt[lt];switch(At.type){case Us:z=At.endX,tt=At.endY,E=At.endX,b=At.endY;break;case Fo:if(Pe.Yb(E,b,At.endX,At.endY,x,a,y))return!0;E=At.endX,b=At.endY;break;case ya:if(Pe.cs(E,b,At.point1X,At.point1Y,At.point2X,At.point2Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case vl:if(Pe.jv(E,b,At.point1X,At.point1Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case Ls:case Yl:var ft=At.type===Ls?cl(At,this):Zl(At,this,E,b),yt=ft.length,Et=At.type===Ls?At.centerX:At.endX,Tt=At.type===Ls?At.centerY:At.endY;if(yt===0){if(Pe.Yb(E,b,Et,Tt,x,a,y))return!0;E=Et,b=Tt;break}for(Et=null,Tt=0;Tt<yt;Tt++)if(Et=ft[Tt],Tt===0&&Pe.Yb(E,b,Et[0],Et[1],x,a,y)||Pe.cs(Et[0],Et[1],Et[2],Et[3],Et[4],Et[5],Et[6],Et[7],.5,a,y,x))return!0;Et!==null&&(E=Et[6],b=Et[7]);break;default:Ge("Unknown Segment type: "+At.type)}if(At.isClosed&&(E!==z||b!==tt)&&Pe.Yb(E,b,z,tt,x,a,y))return!0}return!1},un.Object.defineProperties(Js.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&&Si(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Si(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Si(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Si(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Si(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Si(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Js.prototype.add=Js.prototype.add,Js.prototype.equalsApprox=Js.prototype.Xa,Js.className="PathFigure";function Gr(a,y,x,E,b,z,tt,rt){or(this),a===void 0&&(a=Fo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Yl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Ls&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Ls&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Gr.prototype.copy=function(){var a=new Gr;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},Mt=Gr.prototype,Mt.Xa=function(a){if(!(a instanceof Gr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Us:case Fo:return Pe.B(this.endX,a.endX)&&Pe.B(this.endY,a.endY);case ya:return Pe.B(this.endX,a.endX)&&Pe.B(this.endY,a.endY)&&Pe.B(this.point1X,a.point1X)&&Pe.B(this.point1Y,a.point1Y)&&Pe.B(this.point2X,a.point2X)&&Pe.B(this.point2Y,a.point2Y);case vl:return Pe.B(this.endX,a.endX)&&Pe.B(this.endY,a.endY)&&Pe.B(this.point1X,a.point1X)&&Pe.B(this.point1Y,a.point1Y);case Ls:return Pe.B(this.startAngle,a.startAngle)&&Pe.B(this.sweepAngle,a.sweepAngle)&&Pe.B(this.centerX,a.centerX)&&Pe.B(this.centerY,a.centerY)&&Pe.B(this.radiusX,a.radiusX)&&Pe.B(this.radiusY,a.radiusY);case Yl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Pe.B(this.xAxisRotation,a.xAxisRotation)&&Pe.B(this.endX,a.endX)&&Pe.B(this.endY,a.endY)&&Pe.B(this.radiusX,a.radiusX)&&Pe.B(this.radiusY,a.radiusY);default:return!1}},Mt.qb=function(a){a.classType===Gr&&(this.type=a)},Mt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Us:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Fo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ya: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 vl: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 Ls: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 Yl: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":"")},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.close=function(){return this.isClosed=!0,this};function cl(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Pe.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=vr.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),Un.Ha(z,tt),vr.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function Zl(a,y,x,E){function b(It,qt,Gt,oe){return(It*oe<qt*Gt?-1:1)*Math.acos((It*Gt+qt*oe)/(Math.sqrt(It*It+qt*qt)*Math.sqrt(Gt*Gt+oe*oe)))}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 z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,lt=a.Dc,At=a.Ec,ft=Math.cos(tt),yt=Math.sin(tt),Et=ft*(x-lt)/2+yt*(E-At)/2;tt=-yt*(x-lt)/2+ft*(E-At)/2;var Tt=Et*Et/(y*y)+tt*tt/(z*z);return 1<Tt&&(y*=Math.sqrt(Tt),z*=Math.sqrt(Tt)),Tt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Et*Et)/(y*y*tt*tt+z*z*Et*Et)),isNaN(Tt)&&(Tt=0),rt=Tt*y*tt/z,Tt=Tt*-z*Et/y,isNaN(rt)&&(rt=0),isNaN(Tt)&&(Tt=0),x=(x+lt)/2+ft*rt-yt*Tt,E=(E+At)/2+yt*rt+ft*Tt,At=b(1,0,(Et-rt)/y,(tt-Tt)/z),ft=(Et-rt)/y,lt=(tt-Tt)/z,Et=(-Et-rt)/y,rt=(-tt-Tt)/z,tt=b(ft,lt,Et,rt),Et=(ft*Et+lt*rt)/(Math.sqrt(ft*ft+lt*lt)*Math.sqrt(Et*Et+rt*rt)),-1>=Et?tt=Math.PI:1<=Et&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,Et=y>z?z/y:1,y=Pe.jx(0,0,y>z?y:z,At,At+tt,!0),z=vr.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Et),Un.Ha(y,z),vr.free(z),a.ae=y,a.ae}un.Object.defineProperties(Gr.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&&Si(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Si(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Si(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Si(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Si(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Si(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Si(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Si(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Si(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Zi(a,">= zero",Gr,"radiusX"),this._isFrozen&&Si(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Zi(a,">= zero",Gr,"radiusY"),this._isFrozen&&Si(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Si(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&&Si(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&&Si(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&&Si(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&&Si(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Gr.prototype.equalsApprox=Gr.prototype.Xa;var Us=new Te(Gr,"Move",0),Fo=new Te(Gr,"Line",1),ya=new Te(Gr,"Bezier",2),vl=new Te(Gr,"QuadraticBezier",3),Ls=new Te(Gr,"Arc",4),Yl=new Te(Gr,"SvgArc",4);Gr.className="PathSegment",Gr.Move=Us,Gr.Line=Fo,Gr.Bezier=ya,Gr.QuadraticBezier=vl,Gr.Arc=Ls,Gr.SvgArc=Yl;function La(){this.H=null,this.xu=new Xt(0,0).freeze(),this.mt=new Xt(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}La.prototype.copy=function(){var a=new La;return this.clone(a)},La.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},La.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},La.prototype.So=function(a,y){var x=this.diagram;return x===null||Il(x,a,y),y},La.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Il(x,a,y),y.assign(x.Ps(y))),y},un.Object.defineProperties(La.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}}}),La.prototype.getMultiTouchDocumentPoint=La.prototype.Bz,La.prototype.getMultiTouchViewPoint=La.prototype.So,La.className="InputEvent";function MA(){this.H=null,this.xa="",this.ar=this.Lr=null}MA.prototype.copy=function(){var a=new MA;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},MA.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},un.Object.defineProperties(MA.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}}}),MA.className="DiagramEvent";function Jo(){this.Fm=Oo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Jo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Jo.prototype.copy=function(){var a=new Jo;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=Ln(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ln(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ln(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ln(y)&&typeof y.J=="function"?y.J():y,a},Jo.prototype.qb=function(a){a.classType===Jo&&(this.change=a)},Jo.prototype.toString=function(){var a="";return a=this.change===ol?a+"* ":this.change===Oo?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===ol?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Sn(this.object)),this.oldValue!==null&&(a+=" old: "+Sn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Sn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Jo.prototype.I=function(a){return a?this.oldValue:this.newValue},Jo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Jo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Jo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Jo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Jo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},un.Object.defineProperties(Jo.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===ol&&(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}}}),Jo.prototype.redo=Jo.prototype.redo,Jo.prototype.canRedo=Jo.prototype.canRedo,Jo.prototype.undo=Jo.prototype.undo,Jo.prototype.canUndo=Jo.prototype.canUndo,Jo.prototype.getParam=Jo.prototype.Dz,Jo.prototype.getValue=Jo.prototype.I,Jo.prototype.clear=Jo.prototype.clear;var ol=new Te(Jo,"Transaction",-1),Oo=new Te(Jo,"Property",0),Bs=new Te(Jo,"Insert",1),Qs=new Te(Jo,"Remove",2);Jo.className="ChangedEvent",Jo.Transaction=ol,Jo.Property=Oo,Jo.Insert=Bs,Jo.Remove=Qs;function ra(){this.o=new cn().freeze(),this.xa="",this.j=!1}ra.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 E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},ra.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()},ra.prototype.canUndo=function(){return this.isComplete},ra.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()}},ra.prototype.canRedo=function(){return this.isComplete},ra.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()}},ra.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new hi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Oo&&E.object){var b=y.get(E.object);b||(b=new hi,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},un.Object.defineProperties(ra.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}}}),ra.prototype.optimize=ra.prototype.ak,ra.prototype.redo=ra.prototype.redo,ra.prototype.canRedo=ra.prototype.canRedo,ra.prototype.undo=ra.prototype.undo,ra.prototype.canUndo=ra.prototype.canUndo,ra.prototype.clear=ra.prototype.clear,ra.className="Transaction";function ts(){this.Pt=new dn,this.Jd=!1,this.u=new cn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new cn().freeze(),this.hl=new cn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ts.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},ts.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},ts.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Mt=ts.prototype,Mt.Xw=function(a){this.Pt.add(a)},Mt.Rx=function(a){this.Pt.remove(a)},Mt.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},Mt.eb=function(a){return a===void 0&&(a=""),wh(this,!0,a)},Mt.Kf=function(){return wh(this,!1,"")};function wh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ur("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Mt.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()}},ts.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ts.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){ur("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ts.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ts.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){ur("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ts.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Jo;for(E.change=ol,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},ts.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new ra);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||ur("Change not within a transaction: "+x.toString()))}},ts.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},un.Object.defineProperties(ts.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}}}),ts.prototype.handleChanged=ts.prototype.Tu,ts.prototype.redo=ts.prototype.redo,ts.prototype.undo=ts.prototype.undo,ts.prototype.canUndo=ts.prototype.canUndo,ts.prototype.discardHistoryAfterIndex=ts.prototype.lx,ts.prototype.rollbackTransaction=ts.prototype.Kf,ts.prototype.commitTransaction=ts.prototype.eb,ts.prototype.startTransaction=ts.prototype.Ea,ts.prototype.removeModel=ts.prototype.Rx,ts.prototype.addModel=ts.prototype.Xw,ts.prototype.clear=ts.prototype.clear,ts.className="UndoManager";function _r(){or(this),this.H=Sl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new La,this.Zr=-1}_r.prototype.toString=function(){return this.name!==""?this.name+" Tool":_e(this.constructor)},_r.prototype.updateAdornments=function(){},_r.prototype.canStart=function(){return this.isEnabled},_r.prototype.doStart=function(){},_r.prototype.doActivate=function(){this.isActive=!0},_r.prototype.doDeactivate=function(){this.isActive=!1},_r.prototype.doStop=function(){},_r.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},_r.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},_r.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},_r.prototype.doMouseMove=function(){},_r.prototype.doMouseUp=function(){this.stopTool()},_r.prototype.doMouseWheel=function(){},_r.prototype.canStartMultiTouch=function(){return!0},_r.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Xt.allocAt(NaN,NaN)),E=y.So(1,Xt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Xt.free(x),Xt.free(E)},_r.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Xt.allocAt(NaN,NaN)),E=y.So(1,Xt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Xt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Xt.free(x),Xt.free(E)},_r.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},_r.prototype.doKeyUp=function(){},_r.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},_r.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},_r.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Gi?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||(Gi?y.meta:y.control)||y.shift||a.clearSelection()}},_r.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Sh(a,E,x),E.handled};function Sh(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){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,E){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)}}}_r.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},_r.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},_r.prototype.doCurrentObjectChanged=function(){},_r.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===vc&&!y.shift||b===kA&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===vc&&y.shift||b===kA&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},_r.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},_r.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Xi(function(){x.doWaitAfter(E)},a)},_r.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ee.clearTimeout(this.Zr),this.Zr=-1},_r.prototype.doWaitAfter=function(){},_r.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Xr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},_r.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},un.Object.defineProperties(_r.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Ue&&(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}}}),_r.prototype.startTransaction=_r.prototype.Ea,_r.className="Tool";function Ho(){_r.call(this),this.name="ToolManager",this.hb=new cn,this.ob=new cn,this.Hb=new cn,this.F=this.V=850,this.o=new ln(2,2).ja(),this.Ha=5e3,this.ia=kA,this.u=Qc,this.Mp=this.j=null,this.zj=-1}be(Ho,_r),Ho.prototype.initializeStandardTools=function(){},Ho.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Xr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ho.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===bA&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===tA){y.bubbles=!0;return}if(this.gestureBehavior===bA)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===kA?this.mouseWheelBehavior=vc:this.mouseWheelBehavior===vc&&(this.mouseWheelBehavior=kA)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ho.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===tA){y.bubbles=!0;return}if(this.gestureBehavior===bA)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}uf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function uf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ho.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Xr&&(y===a||y.rg(a))||this.hideToolTip()},Ho.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()))},Ho.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)},Ho.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Xr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Ho.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Xr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof zo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ee.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Xi(function(){b.hideToolTip()},a)}},Ho.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Ho.prototype.hideToolTip=function(){this.zj!==-1&&(ee.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Xr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof zo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ho.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Ho.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ho.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ho.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ho.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Ho.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Ho.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)},un.Object.defineProperties(Ho.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Xr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),Ho.prototype.replaceStandardTool=Ho.prototype.gb;var kA=new Te(Ho,"WheelScroll",0),vc=new Te(Ho,"WheelZoom",1),Ed=new Te(Ho,"WheelNone",2),Qc=new Te(Ho,"GestureZoom",3),bA=new Te(Ho,"GestureCancel",4),tA=new Te(Ho,"GestureNone",5);Ho.className="ToolManager",Ho.WheelScroll=kA,Ho.WheelZoom=vc,Ho.WheelNone=Ed,Ho.GestureZoom=Qc,Ho.GestureCancel=bA,Ho.GestureNone=tA;function ss(){_r.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 Xt(NaN,NaN),this.Fr=new Xt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new dn().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var TA;be(ss,_r),ss.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},ss.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},ss.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,(Gi?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},ss.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),Ni=null,this.isActive=!0,this.tl.set(a.position),Zt(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&&qa(a),Nd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ni=this,ar=this.diagram,this.doSimulatedDragOut()))};function Zt(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Nn?(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 to,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}ss.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},ss.prototype.Pd=function(a){return a===void 0?new ih(An):this.isGridSnapEnabled?new ih(new Xt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ih(a.copy())},ss.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),me(this),Xh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<TA.count){for(var y=TA,x=y.length,E=0;E<x;E++){var b=y.M(E);an(b),Ze(b),me(b),b.diagram.ug()}y.clear()}an(this),this.tl.h(NaN,NaN),ar!==null&&(ar.currentCursor=""),Ni=ar=null,Ze(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Zh(a,!0)},ss.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function me(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Rn(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Se(){var a=Ni;Ze(a),xn(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}ss.prototype.doCancel=function(){Ze(this),xn(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},ss.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},ss.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Be(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):xn(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 hi,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Nn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Zt(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ad(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ze(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 Nn&&(x.value.point=new Xt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function an(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 hn(a,y,x){var E=a.diagram,b=a.startPoint,z=Xt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Xt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(qa(E),E.hk())}ss.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&xc(E,a,y,this.dragOptions,x)};function xn(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Nn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Ad(E,-b.x,-b.y)}y.bd()}}function Zn(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),oi(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=Rn(a,b,E),!a.isActive&&Ni===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof ir)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Ni===null||(a.doDragOver(y,E),!a.isActive&&Ni===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}ss.prototype.findDragOverObject=function(a){var y=this;return rA(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Xr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},ss.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 Rn(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Ni===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=gi(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function gi(a){var y=a.panel;return y!==null?y:a instanceof Li&&!(a instanceof ir)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function zn(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(lt){return E.findValidLinkablePort(lt,x)});a=Xt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(Zr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Xt.free(a),tt}function oi(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=zn(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=zn(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):no(b,tt,z,ot,rt):no(b,null,null,null,null)}}}}ss.prototype.doDragOver=function(){};function ni(a,y){var x=a.diagram;a.dragsLink&&oi(a,!0),me(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;Ci(a,b,z),z=gi(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Ni!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Jn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Ni!==null){for(a=nn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Jn&&Vi(x,E,a);nn.free(a)}}}function Ci(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ir||(x=a.mouseDrop,x!==null&&x(y))}function Vi(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Nn},!0,function(b){return b instanceof Nn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}ss.prototype.doDropOnto=function(){},ss.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()?(Be(this,!1),Nd(a,this.copiedParts),hn(this,this.copiedParts,!1),Xh(a,this.copiedParts)):this.mayMove()?(Ze(this),hn(this,this.draggedParts,!0)):this.mayDragOut()?(Be(this,!1),hn(this,this.copiedParts,!1)):Ze(this),Zn(this,a.lastInput.documentPoint))}},ss.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?(Ze(this),Be(this,!0),Nd(a,this.copiedParts),hn(this,this.copiedParts,!1),Xh(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,Ze(this),this.mayMove()&&(hn(this,this.draggedParts,!0),Zn(this,a.lastInput.documentPoint))),this.Ym=!0,ni(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&gr(this),a.Ya(),Xh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},ss.prototype.simulatedMouseMove=function(a,y,x){if(Ni===null)return!1;var E=Ni.diagram;x instanceof Ue||(x=null);var b=ar;return x!==b&&(b!==null&&b!==E&&(b.ug(),Ni.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),ar=x,x!==null&&x!==E&&(Se(),b=x.toolManager.findTool("Dragging"),b!==null&&(TA.contains(b)||TA.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==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,E.doSimulatedDragOver()),!0)},ss.prototype.simulatedMouseUp=function(a,y,x){if(Ni===null)return!1;var E=ar,b=Ni.diagram;if(x===null)return Ni.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Ni.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;ar=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Se(),TA.contains(E)||TA.add(E),E.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 Xt),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=Ni,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function gr(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Jn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}ss.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Gi?!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())},ss.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())},ss.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())},ss.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},ss.prototype.Az=function(){return Ni},ss.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ni;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},ss.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ca(a),a.animationManager.Cc(),a=Ni,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},ss.prototype.doSimulatedDragLeave=function(){var a=Ni;a!==null&&a.doSimulatedDragOut(),this.doCancel()},ss.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ni;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Mr(this,y.draggedParts.Lf(),!1,a.firstInput),hn(this,this.copiedParts,!1),Zn(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},ss.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ni;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ze(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Mr(this,y.draggedParts.Lf(),!0,a.lastInput),hn(this,this.copiedParts,!1);var E=new dn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),ni(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Mr(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=nn.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var lt=ot.value;if(lt.isVisible()){var At=lt.location;lt=At.x,At=At.y,isNaN(lt)||isNaN(At)||(lt<E&&(E=lt),At<b&&(b=At),lt>tt&&(tt=lt),At>rt&&(rt=At))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,nn.free(z),z=a.Fr,tt=new hi,rt=Xt.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof Nn&&lt.canCopy()&&(At=x.I(lt),At!==null&&(At.points=lt.points,Ad(At,z.x-E,z.y-b),At.suspendsRouting=!0,tt.add(At,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&&lt.canCopy()&&(ot=x.I(lt),ot!==null&&(lt=lt.location,rt.h(z.x-(E-lt.x),z.y-(b-lt.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Xt.free(rt),a.copiedParts=tt,Zt(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ad(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}ss.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},ss.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Xt},un.Object.defineProperties(ss.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}}}),ss.prototype.getDraggingSource=ss.prototype.Az;var Ni=null,ar=null;ss.className="DraggingTool",TA=new cn,Xe("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ho.prototype.doCancel=function(){Ni!==null&&Ni.doCancel(),_r.prototype.doCancel.call(this)};function _i(){_r.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Nn,y=new fr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new fr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Jn,y=new fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Wr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Jn,y=new fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Wr,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 hi,this.Of=this.gj=this.Pf=null}be(_i,_r),_i.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},_i.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=ln.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,ln.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Zr,z=Xt.alloc(),x.location=y.ga(Zr,z),Xt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},_i.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Wr,y.fromSpot=Aa,y.toSpot=Aa),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},_i.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},_i.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Jn){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)}},_i.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Jn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Jn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},_i.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof Jn){var ot=tt.ga(Zr,Xt.alloc()),lt=x.x-ot.x,At=x.y-ot.y;Xt.free(ot),ot=lt*lt+At*At,ot<E&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof Jn&&(x.layer===null||x.layer.allowLink))?y:null},_i.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},_i.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},_i.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},_i.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Jn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Jn))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},_i.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||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 b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},_i.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 E=new dn;return E.add(a),Cr(this,x,y,E)};function Cr(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Cr(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Cr(a,y.labeledLink,x,E))))}_i.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Od){if(E===mf){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!eo(this,a,y,x,!0)}if(E===Vf){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!eo(this,a,y,x,!0)}if(E===Zc)return a===y?a=!0:(E=new dn,E.add(y),a=Br(this,E,a,y,x)),!a;if(E===Yc)return!eo(this,a,y,x,!1);if(E===pf)return a===y?a=!0:(E=new dn,E.add(y),a=xo(this,E,a,y,x)),!a}return!0};function eo(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&eo(a,tt,x,E,b)))return!0}return!1}function Br(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Br(a,y,tt,E,b)))return!0}return!1}function xo(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&xo(a,y,rt,E,b))return!0}}return!1}un.Object.defineProperties(_i.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}}}),_i.className="LinkingBaseTool";function Yr(){_i.call(this),this.name="Linking",this.V={},this.F=null,this.K=ko,this.Xd=null}be(Yr,_i),Yr.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},Yr.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 Jn)))return null;var x=this.direction;if(x===ko||x===Cs){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===ko||x===To)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Yr.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 Jn&&(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 Jn&&(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)},Yr.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()},Yr.prototype.doStop=function(){_i.prototype.doStop.call(this),this.startObject=null},Yr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof Jn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Yr.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Nn)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)},Yr.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Yr.prototype.doNoLink=function(){},un.Object.defineProperties(Yr.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 ko=new Te(Yr,"Either",0),Cs=new Te(Yr,"ForwardsOnly",0),To=new Te(Yr,"BackwardsOnly",0);Yr.className="LinkingTool",Yr.Either=ko,Yr.ForwardsOnly=Cs,Yr.BackwardsOnly=To;function to(){_i.call(this),this.name="Relinking";var a=new fr;a.figure="Diamond",a.desiredSize=Go,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new fr,a.figure="Diamond",a.desiredSize=Go,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new nn}be(to,_i),to.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Nn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},to.prototype.makeAdornment=function(a,y){var x=new Xr;return x.type=vn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},to.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},to.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Xr&&x.adornedPart instanceof Nn))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=cr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=cr),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},to.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Tg||x===hd)&&(x=Hl),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}},to.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()},to.prototype.doStop=function(){_i.prototype.doStop.call(this),this.handle=null},to.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof Jn&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},to.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},to.prototype.doNoRelink=function(){};function no(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}un.Object.defineProperties(to.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),to.className="RelinkingTool",Xe("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Xe("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Hi(){_r.call(this),this.name="LinkReshaping";var a=new fr;a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new fr,a.figure="Diamond",a.desiredSize=Go,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Xt,this.Yq=new cn}be(Hi,_r),Hi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lo},Hi.prototype.om=function(a,y){a.reshapingBehavior=y},Hi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Nn){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)}},Hi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Xr,b.type=vn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Wu)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var lt=y.i(x+1);Pe.B(ot.x,lt.x)&&Pe.B(ot.y,lt.y)&&(lt=y.i(x-1)),Pe.B(ot.x,lt.x)?(this.om(rt,ho),rt.cursor="n-resize"):Pe.B(ot.y,lt.y)&&(this.om(rt,Ao),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),lt=y.i(z),Pe.B(ot.x,lt.x)&&Pe.B(ot.y,lt.y)&&(ot=y.i(z+1)),Pe.B(ot.x,lt.x)?(this.om(rt,ho),rt.cursor="n-resize"):Pe.B(ot.y,lt.y)&&(this.om(rt,Ao),rt.cursor="w-resize")):tt!==z&&(this.om(rt,jo),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},Hi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Hi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Hi.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},Hi.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 Nn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),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}}},Hi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Hi.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Hi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Hi.prototype.getResegmentingPoint=function(){return this.handle.ga(Zr)},Hi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Hi.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,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Pr(this,tt,E,b,z,!0)||Pr(this,tt,E,b,z,!1))){var rt=y.points.copy();Pr(this,tt,E,b,z,!0)?(rt.cd(x-2,new Xt(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Xt(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Xt((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Xt((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Pr(this,E,b,z,tt,!0)||Pr(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Pr(this,E,b,z,tt,!0)?(rt.cd(x-1,new Xt(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Xt(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Xt((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Xt((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Xt.alloc(),Pe.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Xt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Pr(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}Hi.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===ho?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===Ao&&(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,E===ho?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===Ao&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);Pe.B(z.x,b.x)&&Pe.B(b.y,tt.y)?(Pe.B(z.x,y.i(E-2).x)&&!Pe.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Pe.B(tt.y,y.i(E+2).y)&&!Pe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):Pe.B(z.y,b.y)&&Pe.B(b.x,tt.x)?(Pe.B(z.y,y.i(E-2).y)&&!Pe.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Pe.B(tt.x,y.i(E+2).x)&&!Pe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Pe.B(z.x,b.x)&&Pe.B(b.x,tt.x)?(Pe.B(z.x,y.i(E-2).x)&&!Pe.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Pe.B(tt.x,y.i(E+2).x)&&!Pe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Pe.B(z.y,b.y)&&Pe.B(b.y,tt.y)&&(Pe.B(z.y,y.i(E-2).y)&&!Pe.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Pe.B(tt.y,y.i(E+2).y)&&!Pe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Zr,Xt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Xt.alloc()),y.L(0,E.x,E.y),Xt.free(z),Xt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Zr,Xt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Xt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Xt.free(x),Xt.free(a));y.zf()},Hi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case jo:return a;case ho:return new Xt(y.i(x).x,a.y);case Ao:return new Xt(a.x,y.i(x).y);default:case lo:return y.i(x)}},un.Object.defineProperties(Hi.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),Hi.prototype.setReshapingBehavior=Hi.prototype.om,Hi.prototype.getReshapingBehavior=Hi.prototype.Ru;var lo=new Te(Hi,"None",0),Ao=new Te(Hi,"Horizontal",1),ho=new Te(Hi,"Vertical",2),jo=new Te(Hi,"All",3);Hi.className="LinkReshapingTool",Hi.None=lo,Hi.Horizontal=Ao,Hi.Vertical=ho,Hi.All=jo,Xe("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function mo(){_r.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 fr;a.alignmentFocus=Zr,a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Xt,this.Dw=new ln,this.Tn=new Xt,this.rt=new ln(0,0),this.qt=new ln(1/0,1/0),this.pt=new ln(1,1)}be(mo,_r),mo.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Nn)){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(),Rd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},mo.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Xr,y.type=vn.Spot,y.locationSpot=Zr;var x=new Ol;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ta)),y.add(this.makeHandle(a,ZA)),y.add(this.makeHandle(a,Po)),y.add(this.makeHandle(a,zi)),y.add(this.makeHandle(a,na)),y.add(this.makeHandle(a,Ds)),y.add(this.makeHandle(a,Ba)),y.add(this.makeHandle(a,ps))}else if(xA(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},mo.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},mo.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Zr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof vn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},mo.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},mo.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))},mo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},mo.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},mo.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},mo.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Xt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Xt.free(b)}},mo.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Xt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Xt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},mo.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof ir){var E=new cn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},mo.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Zr);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width,At=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var yt=tt.height;0>=ft&&(ft=1),0>=yt&&(yt=1),ft=yt/ft}return yt=Xt.alloc(),Pe.No(a.x,a.y,rt,ot,b.width,b.height,yt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(yt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width,a.y=At-a.height)):1<=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width)):(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(At-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.y=Math.max(yt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=At-a.height)):1<=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(At-ot-a.height))):0>=y.y?(a.y=Math.max(yt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=At-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))),Xt.free(yt),a},mo.prototype.computeReshape=function(){var a=pn;return this.adornedObject instanceof fr&&(a=_m(this.adornedObject)),!(a===Ai||this.diagram.lastInput.shift)},mo.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},mo.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},mo.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},un.Object.defineProperties(mo.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Xr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),mo.className="ResizingTool",Xe("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function hs(){_r.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Xt,this.ue=null;var a=new fr;a.figure="Ellipse",a.desiredSize=Go,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Xt(NaN,NaN),this.u=0,this.F=50}be(hs,_r),hs.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)}},hs.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Xr,y.type=vn.Position,y.locationSpot=Zr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(xA(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},hs.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},hs.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)},hs.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(Zr)},hs.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 E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},hs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Xt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},hs.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},hs.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},hs.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},hs.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()},hs.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},hs.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},un.Object.defineProperties(hs.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Xr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),hs.className="RotatingTool",Xe("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Ss(){_r.call(this),this.name="ClickSelecting"}be(Ss,_r),Ss.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Ss.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Ss.className="ClickSelectingTool";function Os(){_r.call(this),this.name="Action",this.pk=null}be(Os,_r),Os.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Os.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()},Os.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))}},Os.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()},Os.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())},Os.prototype.doStop=function(){this.pk=null},Os.className="ActionTool";function ja(){_r.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Xt(0,0)}be(ja,_r),ja.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)},ja.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ja.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Li)x.Zc()&&(xA(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ln(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Xt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Td(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Xt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},un.Object.defineProperties(ja.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}}}),ja.className="ClickCreatingTool";function oa(){_r.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Li;a.layerName="Tool",a.selectable=!1;var y=new fr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}be(oa,_r),oa.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))},oa.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},oa.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},oa.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 E=ln.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),ln.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},oa.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()},oa.prototype.computeBoxBounds=function(){var a=this.diagram;return new nn(a.firstInput.documentPoint,a.lastInput.documentPoint)},oa.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Gi?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 cn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},un.Object.defineProperties(oa.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}}}),oa.className="DragSelectingTool";function Co(){_r.call(this),this.name="Panning",this.Xt=new Xt,this.xy=new Xt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ee.document,"scroll",a.Kw,!1),a.stopTool()}}be(Co,_r),Co.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())},Co.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ee.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Co.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Co.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Co.prototype.doMouseMove=function(){this.move()},Co.prototype.doMouseUp=function(){this.move(),this.stopTool()},Co.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,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},un.Object.defineProperties(Co.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Co.className="PanningTool",Xe("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Xe("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Xe("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Xe("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Xe("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function zo(){this.F=this.u=this.j=this.o=null}un.Object.defineProperties(zo.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}}}),zo.className="HTMLInfo";function Yo(a,y,x){this.text=a,this.hx=y,this.visible=x}Yo.className="ContextMenuButtonInfo";function cs(){_r.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Xt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}be(cs,_r);function Ro(a){var y=new zo;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Ya=y,a.tu=function(){a.stopTool()},y=On("div");var x=On("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 E=On("style");ee.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",Kr,!1),E.addEventListener(y,"selectstart",Kr,!1),E.addEventListener(x,"contextmenu",Kr,!1)),y.className="goCXforeground",x.className="goCXbackground",ee.document.body&&(ee.document.body.appendChild(y),ee.document.body.appendChild(x)),Au=y,Tl=x,bl=!0}function Kr(a){return a.preventDefault(),!1}cs.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)},cs.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},cs.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},cs.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Ue||(a instanceof we?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},cs.prototype.doActivate=function(){},cs.prototype.doMouseDown=function(){if(_r.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&No(this)},cs.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}No(this)};function No(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof zo||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(wa(a,!0),a.isActive||a.stopTool())}cs.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function wa(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=Ya,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof we?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Xr&&!a.currentContextMenu.visible&&a.stopTool()}}cs.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},cs.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Xr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof zo&&a.show(y,x,this);this.currentContextMenu=a},cs.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},cs.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Xr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof zo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function dl(a){var y=new cn;return y.add(new Yo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Yo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Yo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Yo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Yo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Yo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Yo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Yo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Yo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Yo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Yo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Yo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Yo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}cs.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=dl(this)),Au.innerHTML="",Tl.addEventListener("pointerdown",this.tu,!1);var y=this,x=On("ul");x.className="goCXul",Au.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=On("li"),z.className="goCXli";var tt=On("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}Au.style.display="block",Tl.style.display="block"},cs.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Ya){Au.style.display="none",Tl.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Tl,"pointerdown",this.tu,!1),this.currentContextMenu=null}},un.Object.defineProperties(cs.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Xr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return bl===!1&&Ya===null&&ds&&Ro(this),Ya},set:function(a){a===null&&(bl=!0),Ya=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Ya=null,bl=!1,Tl=null,Au=null;cs.className="ContextMenuTool",Xe("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function so(){_r.call(this),this.name="TextEditing",this.Zh=new Io,this.ia=null,this.V=Cu,this.vj=null,this.qa=hu,this.u=1,this.F=!0,this.o=null,this.j=new zo,this.kt=null,Nl(this,this.j)}be(so,_r);function Nl(a,y){if(ds){var x=On("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(gA)):b==="Tab"?(a.acceptText(qo),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==hu){var E=a.kt;a.qa===Pu&&(a.qa=XA),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==hu){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Io&&z instanceof so)if(z.state===JA)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Zr),rt=b.position,ot=b.scale,lt=E.Df()*ot;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var At=E.naturalBounds.width*lt+6,ft=E.naturalBounds.height*lt+2,yt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*lt,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*lt+"%",x.style.lineHeight="normal",x.style.width=At+"px",x.style.left=(yt-At/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.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=E.lineCount,x.wA=lt,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}so.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||pA&&pA!==this&&(pA.acceptText(Xa),pA&&pA!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Io&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Cu&&!y.isSelected||this.starting===qs&&2>a.lastInput.clickCount)):!1},so.prototype.doStart=function(){pA=this,this.textBlock!==null&&this.doActivate()},so.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 Io&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Pu;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new nn(this.textBlock.ga(ta),this.textBlock.ga(Po));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},so.prototype.doCancel=function(){this.stopTool()},so.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},so.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xa)},so.prototype.acceptText=function(a){switch(a){case Xa:this.qa===sl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Pu||this.qa===JA||this.qa===XA)&&(this.qa=jh,ms(this));break;case za:case gA:case qo:(gA!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Pu||this.qa===JA||this.qa===XA)&&(this.qa=jh,ms(this))}};function ms(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=sl,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=JA,a.doError(b,z))}}so.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)},so.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},so.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=hu,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},so.prototype.doStop=function(){pA=null},so.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},so.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},un.Object.defineProperties(so.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)}}}),so.prototype.measureTemporaryTextBlock=so.prototype.Lx;var za=new Te(so,"LostFocus",0),Xa=new Te(so,"MouseDown",1),qo=new Te(so,"Tab",2),gA=new Te(so,"Enter",3),Xl=new Te(so,"SingleClick",0),Cu=new Te(so,"SingleClickSelected",1),qs=new Te(so,"DoubleClick",2),hu=new Te(so,"StateNone",0),Pu=new Te(so,"StateActive",1),XA=new Te(so,"StateEditing",2),jh=new Te(so,"StateValidating",3),JA=new Te(so,"StateInvalid",4),sl=new Te(so,"StateValidated",5),pA=null;so.className="TextEditingTool",so.LostFocus=za,so.MouseDown=Xa,so.Tab=qo,so.Enter=gA,so.SingleClick=Xl,so.SingleClickSelected=Cu,so.DoubleClick=qs,so.StateNone=hu,so.StateActive=Pu,so.StateEditing=XA,so.StateValidating=jh,so.StateInvalid=JA,so.StateValidated=sl,Xe("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ja(a){wl||(Ru(),wl=!0),this.H=Sl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Va,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new dn,this.ce=new Sa,this.ce.Yd=this,this.Ei=new dn,this.pu=new dn,this.Sr=new dn,this.pr=new dn,a&&Object.assign(this,a)}Ja.prototype.Xe=function(a){this.H=a},Ja.prototype.canStart=function(){return!0};function cu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),aa(a.H),a.zb=!0)}function kr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Va?(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===qA&&y.vc.clear(),a.Qw=!!(a.Pk===Bh&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),NA(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Za&&E!==null&&(delete E.start.scale,delete E.end.scale),ee.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&qa(x),wc(x),a.zb=!1,y.start(),y.bc&&(vA(a),x.Ya(),$A(y,0),Ca(x,!0),du(a),x.R("AnimationStarting",a)))}))}}function eA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function xh(a,y,x,E){a.isTicking||eA(a)||y instanceof Nn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Mt=Ja.prototype,Mt.fv=function(a){return this.ce.fv(a)},Mt.Xu=function(a){return this.ce.Xu(a)};function mA(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof we&&ot.diagram!==null||ot instanceof Ue){rt=!0;break t}}rt=!1}rt?_u(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(vA(b),Ca(b.H),du(b)),ee.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ee.requestAnimationFrame(function(){x()}))}function Jl(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function vA(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 du(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Mt.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(),NA(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),NA(y,this.H)},Mt.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))},Mt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Hs(this,a))},Mt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),nA(this.ce,y,"position",y.position,y.position),Hs(this,a))};function Hu(a,y,x){!a.zb||y.D(x)||eA(a)||(a.H.pi||(y=x.copy()),nA(a.ce,a.H,"position",y,x))}function Fu(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Hs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function fl(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],lt=y[1],At=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=lt):(At===0||At===100)&&(ot=z,lt=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,lt-tt,E),rt=b(x,rt,At-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function Ru(){function a(x,E,b,z,tt,rt){x.position=new Xt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new hi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Xt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Xt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Xt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,lt=b.actualBounds;b=lt.x+lt.width/2-ot.width/2,ot=lt.y+lt.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Xt(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new nn(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=fl(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=fl(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=fl(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=fl(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),yl=y}un.Object.defineProperties(Ja.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&&Zi(a,">= 1",Ja,"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}}}),Ja.prototype.stopAnimation=Ja.prototype.Cc;var yl=null,wl=!1,Va=new Te(Ja,"Default",1),Bh=new Te(Ja,"AnimateLocations",2),qA=new Te(Ja,"None",3);Ja.className="AnimationManager",Ja.defineAnimationEffect=function(a,y){wl||(Ru(),wl=!0),yl.add(a,y)},Ja.Default=Va,Ja.AnimateLocations=Bh,Ja.None=qA;function Sa(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=Ku,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=An,this.vc=new hi,this.Tt=new hi,this.yl=new dn,this.Ut=new dn,this.dw=kh,a&&Object.assign(this,a)}Sa.prototype.suspend=function(){this.Xk=!0},Sa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,_u(this,!0),vA(this.Yd),Ca(this.H),du(this.Yd),this.H.redraw()};function NA(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}Mt=Sa.prototype,Mt.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 Ue?a=x:x instanceof we&&(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===Va&&this===y.defaultAnimation&&(this.Lp=zh,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Xc),vA(y),this.yl.each(function(E){E.data=null,a.add(E)}),du(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,mA(y,this),this)},Mt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Mt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Ue?this.H=a:a instanceof we&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Li){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return nA(this,a,y,x,E,b),this};function nA(a,y,x,E,b,z){var tt=a.vc;if(y instanceof Ue&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Dh(E),ip(),E=[wn.j,wn.u,wn.o,wn.F],Dh(b),ip(),b=[wn.j,wn.u,wn.o,wn.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,lt=rt.end;ot[x]===void 0&&(ot[x]=Wa(E)),lt[x]=Wa(b)}else ot={},lt={},ot[x]=Wa(E),lt[x]=Wa(b),rt=ot.position,y instanceof we&&rt instanceof Xt&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(lt.position),rt=new yA(ot,lt,z),tt.add(y,rt);tt=ot[x],tt instanceof Xt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Li?rt.Ku.location=Wa(y.location):z&&(rt.Ku[x]=Wa(E))}function Wa(a){return a instanceof Xt||a instanceof ln?a.copy():a}Mt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Mt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function _u(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),vA(x),$A(a,b),Ca(a.H,!0),du(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function $A(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof we&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=yl,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(lt)===null||ot.get(lt)(z,rt[lt],tt[lt],a.Lp,y,x,a)}}}Mt.stop=function(){return this.bc?(this.Ml(!0),this):this},Mt.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,vA(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=yl;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,lt=b?rt.start:rt.end,At=rt.Ku,ft;for(ft in lt)if(z.get(ft)!==null){var yt=ft;!rt.Hu||yt!=="position:nodeCollapse"&&yt!=="position:placeholder"||(yt="position"),z.get(yt)(tt,ot[ft],At[ft]!==void 0?At[ft]:rt.Hu?ot[ft]:lt[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&At.location!==void 0&&tt instanceof Li&&(tt.location=At.location),rt.nv&&tt instanceof Li&&tt.Zb(!1)}if(y.As.clear(),Zh(y,!1),y.Ya(),y.N(),Ca(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ca(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),du(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),NA(this,null),x.Ml(this),y.$b())}},Mt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof ir&&(E=y.placeholder),E!==null?(x=E.ga(ta),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Xt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Cj(E,y)},Mt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ir&&(x=y.placeholder),x!==null){var E=x.ga(ta);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Aj(E,y)}},Mt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},un.Object.defineProperties(Sa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Zi(a,">= 1",Sa,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:Ge("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),Sa.prototype.getTemporaryState=Sa.prototype.Ez,Sa.prototype.stop=Sa.prototype.stop,Sa.prototype.add=Sa.prototype.add,Sa.prototype.addTemporaryPart=Sa.prototype.Iy;function Ku(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function zh(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Sa.className="Animation",Sa.EaseLinear=function(a,y,x,E){return x*a/E+y},Sa.EaseInOutQuad=Ku,Sa.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Sa.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Sa.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Sa.EaseOutExpo=zh;function yA(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}yA.className="AnimationState";function ql(a,y,x){this.xd=null,this.rf=a,this.so=x||Vh,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=co))}ql.prototype.copy=function(){var a=new ql(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 wA(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))}un.Object.defineProperties(ql.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 Vh=new Te(ql,"Default",1),co=new Te(ql,"Immediate",2),Jr=new Te(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=Vh,ql.Immediate=co,ql.Bundled=Jr;function jr(a){or(this),this.H=null,this.Pa=new cn,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)}Mt=jr.prototype,Mt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,dr(x)}a.clear(),this.Zq.length=0},Mt.Xe=function(a){this.H=a},Mt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof ir?b++:ot instanceof Jn?E++:ot instanceof Nn?z++:ot instanceof Xr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
`+x.toString(),E=x.data,E!==null&&qr(E)&&(rt+=" #"+qr(E)),x instanceof Jn?rt+=" "+Sn(E):x instanceof Nn&&(rt+=" "+Sn(x.fromNode)+" "+Sn(x.toNode));return y+" "+this.Pa.count+": "+rt},Mt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Xt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||Rd(rt)!==!1)&&rt.isVisible()&&(b.assign(a),ki(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Xt.free(b),rt}return Xt.free(b),null},Mt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof cn||E instanceof dn||(E=new dn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Xt.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||Rd(ot)!==!1)&&ot.isVisible()){z.assign(a),ki(z,ot.oe);var lt=ot;ot.ji(z,y,x,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return Xt.free(z),E},Mt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof dn||(b=new dn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||Rd(ot)!==!1)&&ot.isVisible()){var lt=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return b},Mt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var lt=rt[ot];if((tt!==!0||Rd(lt)!==!1)&&z(lt)&&lt.isVisible()){var At=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(At=y(At)),At===null||x!==null&&!x(At)||b.add(At))}}return b},Mt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof dn)&&(z=b),b=!0),z instanceof cn||z instanceof dn||(z=new dn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Xt.alloc(),ot=Xt.alloc(),lt=this.Pa.s,At=lt.length;At--;){var ft=lt[At];if((tt!==!0||Rd(ft)!==!1)&&ft.isVisible()){rt.assign(a),ki(rt,ft.oe),ot.h(a.x+y,a.y),ki(ot,ft.oe);var yt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(yt=x(yt)),yt===null||E!==null&&!E(yt)||z.add(yt))}}return Xt.free(rt),Xt.free(ot),z},Mt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=ve();for(var b=ve(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Nn){if(tt.fd===!1)continue}else if(tt instanceof Xr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Ju(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],qm(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)qm(b[y]);Ee(a),Ee(b)}}};function bs(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Mt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=bs(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=nn.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(nn.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Ma(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=bs(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,lt=nn.alloc(),At=0;At<z;At++){var ft=b[At];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}nn.free(lt),y.globalAlpha=tt}}}Mt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!Rd(y))a.Hs(y);else{if(E!==null&&y instanceof Nn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Ql?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ls(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(ls(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ls(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.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)))))),E&&(a.restore(),a.Vc(!0))}},Mt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Oo,a,this,y,x,E,b)},Mt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&dr(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),DA(this,a,y),a},Mt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,dr(y),a};function DA(a,y,x){if(y=Eu(a,y,x),x instanceof ir&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&DA(a,-1,y)}x.svg!==null&&x.svg.remove()}function Eu(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}un.Object.defineProperties(jr.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===""&&Ge("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ge("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)&&Zi(a,"0 <= value <= 1",jr,"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))}}}),jr.prototype.findObjectsNear=jr.prototype.og,jr.prototype.findObjectsIn=jr.prototype.Cf,jr.prototype.findObjectsAt=jr.prototype.ji,jr.prototype.findObjectAt=jr.prototype.ic,jr.className="Layer";function Ue(a,y){if(Th||(ha(),Th=!0),or(this),Sl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ds){var x=this,E=function(){x.removeEventListener(ee.document,"DOMContentLoaded",E,!1),x.setRTL()};ee.document.body!==null?this.setRTL():x.addEventListener(ee.document,"DOMContentLoaded",E,!1)}this.ol=null,gf.add("Model",yo);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===Oo&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ch(this),this.model=Ev(),this.Wg=!0,Ph(this),this.layout=new ns,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 Jc,a!==void 0&&(typeof a=="string"||ee.Element&&a instanceof Element?Wh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var iA,Sl;function Ch(a){a.Yd=new Ja,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new cn,a.pj=new hi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Xt(NaN,NaN).freeze(),a.du=new Xt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Xt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new vr,a.zu=new Xt(NaN,NaN).freeze(),a.ut=new nn(NaN,NaN,NaN,NaN).freeze(),a.rj=new nr(0,0,0,0).freeze(),a.sj=kh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Za,a.zk=Es,a.Fg=Za,a.pq=Es,a.yt=ta,a.Bt=ta,a.Fc=!0,a.pn=!1,a.De=new dn,a.Eh=new hi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new nr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new La,a.bq.diagram=a,a.Qg=new La,a.Qg.diagram=a,a.cj=new La,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,wg(a),a.ai=new dn,a.Ht=!0,a.uu=$h,a.pw=!1,a.wu=Od,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 hi,a.Xn=new cn,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 nr(5).freeze(),a.Hw=new dn().freeze(),a.Nt=999999999,a.nw=new dn().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 dn,a.ow=new dn,a.Xh=null,a.aw=new ln(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Xt,bounds:new nn,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 nn(NaN,NaN,NaN,NaN).freeze(),a.wo=new ln(NaN,NaN).freeze(),a.Sp=new nn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new hi;var y=new Jn,x=new Io;x.bind(new zs("text","",Sn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Jn,x=new Io,x.stroke="brown",x.bind(new zs("text","",Sn)),y.add(x),a.Lg.add("Comment",y),y=new Jn,y.selectable=!1,y.avoidable=!1,x=new fr,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 hi,y=new ir,y.selectionObjectName="GROUPPANEL",y.type=vn.Vertical,x=new Io,x.font="bold 12pt sans-serif",x.bind(new zs("text","",Sn)),y.add(x),x=new vn(vn.Auto),x.name="GROUPPANEL";var E=new fr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Ol,E.padding=new nr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new hi,y=new Nn,x=new fr,x.isPanelMain=!0,y.add(x),x=new fr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Nn,x=new fr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Xr,y.type=vn.Auto,x=new fr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ol,x.margin=new nr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Xr,y.type=vn.Link,x=new fr,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 yo,a.toolManager=new Ho,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=yc(),a.eq=null,a.fq=Ms,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 Xt,a.zy=500,a.wp=new Xt,a.wq=!1}Ue.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Pc=null,Jh="",Oc(this,!1),this.Xn.clear(),Eg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Oc(a,y){a.animationManager.Cc(!0),a.Hw=new dn().freeze(),a.nw=new dn().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;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(),Eg(),a.Og.clear(),Ji=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function yc(){return null}Ue.prototype.reset=function(){this.clear(),this.vb=!0,Ch(this),oA(this),this.Wg=!0,Ph(this),this.layout=new ns,this.Wg=!1,this.model=Ev(),this.model.undoManager=new ts,this.vb=this.rn=!1,this.N()},Ue.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ee.document.body);var y=On("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},Ue.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ee.document.body);var y=0;if(ds){var x=zf;y=iA,x===null&&(x=zf=On("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=iA=On("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 E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Gi||(y=11)}this.Db=y,this.Gw=!0},Ue.prototype.qb=function(a){a.classType===Ue&&(this.autoScale=a)},Ue.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 Wh(a,y){if(ds){if(y!=null||Ge("Diagram setup requires an argument DIV."),a.Ka!==null&&Ge("Diagram has already completed setup."),typeof y=="string"?a.Ka=ee.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ge("No DIV or DIV id supplied: "+y),a.Ka===null&&Ge("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ge("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ee.ResizeObserver){var x=Ti(function(){a.$b()},250);a.ol=new ee.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ee.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=ee.go;var b=new zu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ee.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Qf(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new zu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,ds){b=On("div");var z=On("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Rc,b.addEventListener("pointerdown",Ld),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Ti(function(){a.Yh=null,a.N()},300),a.Ov=Ti(function(){wc(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Dl(a,tt,!0);rt.bubbles=!0;var ot=0,lt=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Eo(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Dl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var lt=ot;ot=as(a,tt,!0,!1,!0,lt),Oa(a,tt,ot),ot.targetDiagram=kd(tt,tt.target),ot.targetObject=null,lt||ot.clone(a.bq),lt=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>rt||Math.abs(lt.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Eo(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=as(a,tt,!1,!1,!1,rt[1]!==null);var ot=ee.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,At=tt;ot&&ot.H&&(At=tt,lt=ot.H),rt.targetDiagram=lt,Oa(a,At,rt),rt.targetObject=null,a.doMouseMove(),Eo(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=as(a,tt,!1,!0,!0,!1);var lt=ee.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&&lt.shadowRoot!==void 0&&lt.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&&lt.H instanceof Ue&&lt.H!==a&&Oa(lt.H,tt,ot),lt===null&&(lt=tt.target),Oa(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=kd(tt,lt),ot.targetObject=null,a.doMouseUp(),Eo(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+qc[1]+qc[2]+"wI"+SA.slice(1,5)]["b"+Hw.slice(1,y)](E.Z,nh,y,y),E.Vc(!0),Af(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Ue.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Ue.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Af(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(ee,"resize",a.Ov,!1)}function qa(a){30<a.Sq&&(a.Yh=1)}function Zh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Nr&&Nr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Ue.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ee.devicePixelRatio||1},Ue.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ue.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ue.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ue.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ue.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ue.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ue.prototype.doFocus=function(){this.focus()},Ue.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ee.scrollX||ee.pageXOffset,y=ee.scrollY||ee.pageYOffset;this.ta.focus(),ee.scrollTo(a,y)}},Ue.prototype.Oy=function(){this.H.R("GainedFocus")},Ue.prototype.Ny=function(){this.H.R("LostFocus")};function wc(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,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Za&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Ph(a){var y=new jr;y.name="Background",a.Al(y),y=new jr,y.name="",a.Al(y),y=new jr,y.name="Foreground",a.Al(y),y=new jr,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new jr,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new jr,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Hc(a){var y=new vn(vn.Grid);y.name="GRID";var x=new fr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new fr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Li,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 Rc(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):jc(this.H)}function Ld(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):jc(this.H)}Ue.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,lt=E.height+z.top+z.bottom,At=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var yt=b.width,Et=b.height,Tt=b.right,It=b.bottom;b=this.scale;var qt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":qt=qt+a.scrollWidth-a.clientWidth;break;case"reverse":qt=a.scrollWidth-qt-a.clientWidth}var Gt=qt;yt<ot||Et<lt?(qt=Xt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Gt&&(qt.x=Gt/b+tt,this.ju=Gt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(qt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=qt,Xt.free(qt),this.Ee=this.qr=!1):(qt=Xt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=qt.h(Gt+tt,this.position.y)),At>Tt&&(this.position=qt.h(-(y.scrollWidth-this.Aa)+Gt-this.Aa/b+At,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=qt.h(this.position.x,a.scrollTop+rt)),z>It&&(this.position=qt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Xt.free(qt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,At=E.right,Tt=b.right,z=E.bottom,It=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,yt>=ot&&tt>=ft&&At<=Tt&&(x.style.width="1px"),Et>=lt&&rt>=E&&z<=It&&(x.style.height="1px"))}},Ue.prototype.computeBounds=function(a){return a===void 0&&(a=new nn),aa(this),$l(this,a)};function $l(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];lt.isInDocumentBounds&&lt.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Ue.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Ui(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Nn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Nn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new nn(NaN,NaN,0,0):x};function xl(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=Xt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=nn.allocAt(0,0,E.width,E.height);var b=Xt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,nn.free(E),Xt.free(b),Xt.free(x)}x=a.yh,y&&a.Fg!==Za&&(x=a.Fg);var z=x!==Za?Fh(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?Zr:ot),Md(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Pe.B(z.x,x)&&Pe.B(z.y,E)&&Pe.B(z.width,b)&&Pe.B(z.height,tt)||a.onViewportBoundsChanged(new nn(x,E,b,tt),z,y,!1)}}function Fh(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===tu?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===qh?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Ue.prototype.zoomToFit=function(){var a=this.sj;this.sj=kh,this.scale=Fh(this,tu),a!==kh&&(xl(this,!1),Md(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Mt=Ue.prototype,Mt.BA=function(a,y){y===void 0&&(y=tu);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===tu||y===qh)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===qh?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Xt(a.x,a.y)}},Mt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Xt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Mt.zz=function(a){if(a instanceof we){this.eq=a;var y=Xt.alloc();this.fq=this.op(a.ga(ta,y)),Xt.free(y)}else this.eq=null,this.fq=Ms};function Md(a,y,x,E,b,z){var tt=Xt.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=Xt.alloc();lt=a.eq.ga(ta,lt),rt=lt.x-a.fq.x/a.scale,ot=lt.y-a.fq.y/a.scale,b=Aa,Xt.free(lt)}(z||a.scrollMode===kh)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Hu(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),oA(a),Xt.free(tt)}Mt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=rA(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Li)return a}else if(a=rA(this,a,function(x){return x.part}),a instanceof Li)return a;return null},Mt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),aa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function rA(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),aa(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Mt.lz=function(a,y,x){return y===void 0&&(y=!0),Eh(this,a,function(E){return E.part},y?function(E){return E instanceof Li&&E.canSelect()}:null,x)};function Eh(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof cn||b instanceof dn||(b=new dn),aa(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Mt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof cn||E instanceof dn||(E=new dn),aa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Mt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Sc(this,a,function(b){return b instanceof Li&&(!x||b.canSelect())},y,E)},Mt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof dn||(b=new dn),aa(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Mt.Nu=function(a,y,x,E,b,z){var tt=new dn;aa(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function Sc(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof cn||b instanceof dn||(b=new dn),aa(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Mt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Lh(this,a,y,function(z){return z instanceof Li&&(!E||z.canSelect())},x,b)},Mt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof dn)&&(z=b),b=!0),z instanceof cn||z instanceof dn||(z=new dn),aa(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Lh(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof cn||b instanceof dn)&&(z=b),b=!0),z instanceof cn||z instanceof dn||(z=new dn),aa(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}Ue.prototype.acceptEvent=function(a){return Dl(this,a,a instanceof MouseEvent)};function Dl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Oa(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Gi&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=kd(y,y.target),E.targetObject=null,E}function kd(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 as(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Gi&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Eo(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Ue.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Dl(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(),Eo(x,a)},Ue.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(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(),Eo(x,a)},Ue.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Eo(x,a)},Ue.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Eo(x,a)},Ue.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Xt(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?ki(new Xt(y,a),this.Ab):new Xt(y,a)};function Oa(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Xt.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Xt.free(y)):x.documentPoint.h(tt,rt)}function Il(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}Ue.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function al(a){a.ld||aa(a),a.Va()}Ue.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Mt=Ue.prototype,Mt.Pz=function(){return this.kg},Mt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ca(this),this.hf=!1,this.du=new Xt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Xi(function(){E.ld=!1,cu(y,"Model"),a(E)},1)},Mt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ee.requestAnimationFrame(function(){y.kg&&y.bd()})}},Mt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ca(this))};function sa(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||jc(a)||(y&&aa(a),x&&xl(a,!1))}function Ca(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];js(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||wc(a),sa(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(UA(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),aa(a),z=!1,(!a.hf||a.xh)&&(a.hf?Kf(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Kf(a,!1)),z=!0),a.Jk=!1,aa(a),a.ou||al(a),sa(a,!0,!1),tt=!1,z?(x=nn.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,IA(a)),a.R("LayoutCompleted"),sa(a,!0,!1),nn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Za?a.scale=Fh(a,a.Fg):a.yh!==Za?a.scale=Fh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),xl(a,!0)),z&&tt&&a.eb("Initial Layout"),aa(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function IA(a){if(a.Fg!==Za)a.scale=Fh(a,a.Fg);else if(a.yh!==Za)a.scale=Fh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}xl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),UA(a)}function aa(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 dn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ir&&E.U&65536&&(E.U=E.U^65536)})}}Mt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ir||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ir&&x.isVisible()&&th(this,x);for(a.reset();a.next();)x=a.value,x instanceof Nn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Xr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function th(a,y){for(var x=ve(),E=ve(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ir?(pu(z)||ul(z)||Hd(z))&&th(a,z):z instanceof Nn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Ee(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Ee(E)}Mt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Mt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ge("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Gc(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Yf(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),Yh(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<E;y++)x[y].gc(a,this);a=!1,this.Yf?Gu(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(vr.prototype.Cd=vr.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Gc(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,lt=Math.round(rt.x*ot)/ot,At=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-lt,-At),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Yh(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Gu(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(vr.prototype.Cd=vr.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Nr&&Nr.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function _c(a,y,x,E,b,z,tt,rt,ot,lt){if(a.Ka!==null){a.ta===null&&Ge("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),lt===void 0&&(lt=!1),Gc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var At=a.Ca;a.Ca=b;var ft=a.Wa.s,yt=ft.length;try{var Et=new nn(z.x,z.y,E.width/b,E.height/b),Tt=Et.copy();Tt.Co(x),UA(a,Tt),aa(a),a.Fd(ft,yt,a,Et),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var It=a.Mb;y.scale(It,It);var qt=vr.alloc();qt.reset(),qt.translate(x.left,x.top),qt.scale(b),z.x===0&&z.y===0||qt.translate(-z.x,-z.y),y.setTransform(qt.m11,qt.m12,qt.m21,qt.m22,qt.dx,qt.dy),y.yc(),y instanceof Ql&&Yf(y,qt.m11,qt.m12,qt.m21,qt.m22,qt.dx,qt.dy),vr.free(qt),Yh(a,y),y.globalAlpha=a.pb;var Gt=a.Qj("Grid");if(tt){var oe=new dn,le=tt.iterator;for(le.reset();le.next();){var ue=le.value;ue instanceof Li&&(lt||ue.layer!==Gt)&&(ue.Gj(),oe.add(ue))}for(lt=0;lt<yt;lt++)Ma(ft[lt],y,a,oe,ot);oe.each(function(Oe){return Oe.Gj()})}else for(oe=0;oe<yt;oe++){var ye=ft[oe];ye===Gt?lt&&ye.gc(y,a,!0):ye.gc(y,a,ot)}a.$i=!1,a.Yf&&Gu(a.Yf,a)&&a.Vp()}finally{a.Ca=At,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),UA(a),a.ib instanceof Ql&&(a.ib.Nj.PA(),a.redraw())}}}Mt.Gf=function(a){return this.Rg[a]},Mt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Mt.Tx=function(){this.Rg=new yi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Gi||si),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Yh(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Mt.Ql=function(a){return this.on[a]},Mt.sA=function(a,y){this.on[a]=y},Mt.Sx=function(){this.on=new yi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return this.nm(a)},Mt.nm=function(a){return Kc(this,a),this};function Kc(a,y){var x=a instanceof vn,E=a instanceof Ue,b;for(b in y){b===""&&Ge("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),Ln(z)?tt=b.substr(rt+1):Ge("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!ei(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&ei(a.toolManager,tt))z=a.toolManager;else if(E&&Gf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof pi&&tt==="Changed"){a.Pe(y[tt]);continue}else Ge('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof we&&z.Vw(tt)}}Mt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new hi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Mt.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")},Ue.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!==Xc&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=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))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=nn.alloc(),cf(this,this.computeBounds(E)),nn.free(E)),E=this.ta,E===null||E instanceof tl)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var lt=70*tt,At=Math.max(z,0),ft=Math.max(y,0),yt=Math.floor(b-At),Et=Math.floor(rt-ft);a.drawImage(E.Oa,At,ft,yt,Et,0,0,yt,Et),Gu(this.Yf,this)&&a.clearRect(0,0,ot,lt),E=ve(),a=ve(),Et=Math.abs(z),yt=Math.abs(y);var Tt=At===0?0:b-Et;At=Xt.allocAt(Tt,0),Et=Xt.allocAt(Et+Tt,rt),a.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y)));var It=this.Ab;if(It.reset(),It.scale(tt,tt),this.Ca!==1&&It.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&It.translate(-tt.x,-tt.y),ki(At,It),ki(Et,It),E.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y))),Tt=ft===0?0:rt-yt,At.h(0,Tt),Et.h(b,yt+Tt),a.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y))),ki(At,It),ki(Et,It),E.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y))),Gu(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,At.h(b,rt),Et.h(ot+b,lt+rt),a.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y))),ki(At,It),ki(Et,It),E.push(new nn(Math.min(At.x,Et.x),Math.min(At.y,Et.y),Math.abs(At.x-Et.x),Math.abs(At.y-Et.y)))),Xt.free(At),Xt.free(Et),sa(this,!1,!0),this.Ka===null&&Ge("No div specified"),this.ta===null&&Ge("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Gc(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-lt),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Yh(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){lt=bs(tt,b),ft=tt.Zq,ft.length=0,At=this.scale,yt=nn.alloc(),Et=tt.Pa.s,It=Et.length,Tt=ot.length;for(var qt=0;qt<It;qt++){var Gt=Et[qt],oe=Pf(Gt,Gt.actualBounds);t:{for(var le=2/At,ue=4/At,ye=0;ye<Tt;ye++){var Oe=ot[ye];if(Oe.width!==0&&Oe.height!==0&&oe.Vu(Oe.x-le,Oe.y-le,Oe.width+ue,Oe.height+ue)){oe=!0;break t}}oe=!1}oe&&tt.Oj(b,Gt,this,ft,At,yt,!0)}nn.free(yt),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&Gu(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Ee(E),Ee(a),this.ld=!1}}else this.bd();x&&(qa(this),this.bd(),Zh(this,!0))}else x?(qa(this),this.bd(),Zh(this,!0)):this.bd()}};function Gc(a){a.pn!==!1&&(a.pn=!1,Qf(a,a.Aa,a.ya))}function Qf(a,y,x){oA(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function jc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,lt=b.clientHeight||E+rt,At=a.viewportBounds;b=At.x;var ft=At.y,yt=At.width,Et=At.height;if((ot!==x+tt||lt!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=lt,z=a.pn=!0,oA(a)),!a.hf||!a.viewportBounds.w())return!0;var Tt=a.ku,It=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var qt=a.documentBounds,Gt=0,oe=0,le=0,ue=0,ye=At.width,Oe=At.height,Vn=a.rj;a.contentAlignment.sb()?(qt.width>ye&&(Gt=Vn.left,oe=Vn.right),qt.height>Oe&&(le=Vn.top,ue=Vn.bottom)):(Gt=Vn.left,oe=Vn.right,le=Vn.top,ue=Vn.bottom);var ai=qt.width+Gt+oe,ii=qt.height+le+ue;Vn=a.scale;var Tn=ai>ot/Vn,fn=ii>lt/Vn;if(!(z||a.gf||a.Be||Tn||fn))return!0;Gt=qt.x-Gt,ot=At.x,oe=qt.right+oe,lt=At.right+tt,le=qt.y-le;var tr=At.y;qt=qt.bottom+ue,At=At.bottom+rt;var Ki="1px";if(ue="1px",a.scrollMode===kh&&(Tn||fn)&&(Tn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Tn=1,Gt+1<ot&&(Tn=Math.max((ot-Gt)*Vn+a.Aa,Tn)),oe>lt+1&&(Tn=Math.max((oe-lt)*Vn+a.Aa,Tn)),ye+tt+1<ai&&(Tn=Math.max((ai-ye)*Vn+a.Aa,Tn)),Ki=Tn.toString()+"px"),fn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Tn=1,le+1<tr&&(Tn=Math.max((tr-le)*Vn+a.ya,Tn)),qt>At+1&&(Tn=Math.max((qt-At)*Vn+a.ya,Tn)),Oe+rt+1<ii&&(Tn=Math.max((ii-Oe)*Vn+a.ya,Tn)),ue=Tn.toString()+"px")),Tn=Ki!=="1px",fn=ue!=="1px",Tn&&fn||!Tn&&!fn||(fn&&(lt-=a.Db),Tn&&(At-=a.Db),ai<ye+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Gt+1<ot&&(tt=Math.max((ot-Gt)*Vn+a.Aa,tt)),oe>lt+1&&(tt=Math.max((oe-lt)*Vn+a.Aa,tt)),ye+1<ai&&(tt=Math.max((ai-ye)*Vn+a.Aa,tt)),Ki=tt.toString()+"px"),Tn=Ki!=="1px",tt=a.ya,Tn!==a.Be&&(tt=Tn?a.ya-a.Db:a.ya+a.Db),ii<Oe+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,le+1<tr&&(rt=Math.max((tr-le)*Vn+tt,rt)),qt>At+1&&(rt=Math.max((qt-At)*Vn+tt,rt)),Oe+1<ii&&(rt=Math.max((ii-Oe)*Vn+tt,rt)),ue=rt.toString()+"px"),fn=ue!=="1px"),a.qr&&Tn===a.Be&&fn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Tn!==a.Be&&(Ki==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Tn,It.style.width=Ki,fn!==a.gf&&(ue==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Xt.alloc(),fn?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Xt.free(rt))),z&&oA(a),a.gf=fn,It.style.height=ue,a.gu=!0,z&&(a.pn=!0),y=Tt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ye+1<ai?y=(a.position.x-Gt)*Vn:Gt+1<ot?y=Tt.scrollWidth-Tt.clientWidth:oe>lt+1&&(y=a.position.x*Vn)),a.tn)switch(a.bu){case"negative":y=-(Tt.scrollWidth-y-Tt.clientWidth);break;case"reverse":y=Tt.scrollWidth-y-Tt.clientWidth}return Tt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Oe+1<ii?Tt.scrollTop=(a.position.y-le)*Vn:le+1<tr?Tt.scrollTop=Tt.scrollHeight-Tt.clientHeight:qt>At+1&&(Tt.scrollTop=a.position.y*Vn)),ot=a.Aa,lt=a.ya,Tt.style.width=ot+(a.gf?a.Db:0)+"px",Tt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=nn.allocAt(b,ft,yt,Et),a.onViewportBoundsChanged(x,a.viewportBounds,Vn,z),nn.free(x),!1):!0}Mt=Ue.prototype,Mt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ge("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&&Ge('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(Bs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Mt.oi=function(a){this.partManager.oi(a);var y=this;HA(a,function(x){Mh(y,x)}),(a instanceof Xr||a instanceof ir&&a.placeholder!==null)&&a.v(),a.data!==null&&HA(a,function(x){Cv(y.partManager,x)}),ul(a)!==!0&&Hd(a)!==!0||this.De.add(a),_y(a,!0,this),Gy(a)?(a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.$b()},Mt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&HA(a,function(x){Pv(y.partManager,x,y)}),this.De.remove(a),Gy(a)?(a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.$b()},Mt.remove=function(a){Of(this,a,!0)};function Of(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Qs,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Mt.Is=function(a,y){if(y===void 0&&(y=!1),Ui(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new dn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Mt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Ue.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=bd(this)),this.toolManager!==null){var b=new hi;if(a!==null)if(Ui(a))for(var z=0;z<a.length;z++)eh(this,b,a[z],x,E);else for(a=a.iterator;a.next();)eh(this,b,a.value,x,E);else{for(a=this.parts;a.next();)eh(this,b,a.value,x,E);for(a=this.nodes;a.next();)eh(this,b,a.value,x,E);for(a=this.links;a.next();)eh(this,b,a.value,x,E)}xc(this,b,y,E,x)}};function eh(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=bd(a)),x instanceof Jn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof ir&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)eh(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&eh(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)eh(a,y,x.value,E,b)}else if(x instanceof Nn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)eh(a,y,x.value,E,b);else x instanceof Xr||y.add(x,a.Pd(b,x,x.location))}function xc(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Xt.alloc(),tt=Xt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||Nd(a,y);for(var rt=ve(),ot=ve(),lt=y.iterator,At=Xt.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Et=Dd(a,ft,y);Et!==null?rt.push(new it(ft,yt,Et)):(!b||ft.canMove())&&(Et=yt.point,z.assign(Et),a.computeMove(ft,z.add(tt),E,At),ft.location=At,yt.shifted===void 0&&(yt.shifted=new Xt),yt.shifted.assign(At.re(Et)))}else lt.key instanceof Nn&&ot.push(lt.sa)}for(Xt.free(At),b=rt.length,lt=0;lt<b;lt++)ft=rt[lt],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Xt),ft.node.location=z.add(ft.Su.shifted);for(b=Xt.alloc(),lt=Xt.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var Tt=ot[yt];if(Et=Tt.key,Et instanceof Nn)if(Et.suspendsRouting){Et.Tg=null,At=Et.fromNode;var It=Et.toNode;if(a.draggedLink!==null&&E.dragsLink)if(It=Tt.value.point,Et.dragComputation===null)y.add(Et,a.Pd(E,Et,tt)),Ad(Et,tt.x-It.x,tt.y-It.y);else{Tt=Xt.allocAt(0,0),(At=Et.i(0))&&At.w()&&Tt.assign(At);var qt=At=Xt.alloc().assign(Tt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(qt=Xt.alloc(),Td(a,Et,At,qt,E)),At.assign(Et.dragComputation(Et,At,qt)).re(Tt),y.add(Et,a.Pd(E,Et,At)),Ad(Et,At.x-It.x,At.y-It.y),Xt.free(Tt),Xt.free(At),qt!==At&&Xt.free(qt)}else At!==null&&(b.assign(At.location),qt=y.I(At),qt!==null&&b.re(qt.point)),It!==null&&(lt.assign(It.location),qt=y.I(It),qt!==null&&lt.re(qt.point)),At!==null&&It!==null?b.Xa(lt)?(At=Tt.value.point,It=z,It.assign(b),It.re(At),y.add(Et,a.Pd(E,Et,b)),Ad(Et,It.x,It.y)):(Et.suspendsRouting=!1,Et.bb()):(Tt=Tt.value.point,At=At!==null?b:It!==null?lt:tt,y.add(Et,a.Pd(E,Et,At)),Ad(Et,At.x-Tt.x,At.y-Tt.y))}else(Et.fromNode===null||Et.toNode===null)&&(At=Tt.value.point,y.add(Et,a.Pd(E,Et,tt)),Ad(Et,tt.x-At.x,tt.y-At.y))}Xt.free(z),Xt.free(tt),Xt.free(b),Xt.free(lt),Ee(rt),Ee(ot),x||(aa(a),Xh(a,y))}}Ue.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Xt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Xt.alloc(),Td(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,lt=ot.x;return isNaN(lt)&&(lt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,lt)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Xt.free(b),E};function bd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Td(a,y,x,E,b){if(b===void 0&&(b=bd(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Xt.allocAt(0,0),z.yi(0,0,a,y,b),Pe.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Xt.free(z)}}function Nd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Nn&&(y.suspendsRouting=!0)}function Xh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Nn&&(x.suspendsRouting=!1,Av(x)&&x.bb())}a.Mr=!1}}function Dd(a,y,x){return y=y.containingGroup,y!==null&&(a=Dd(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Mt=Ue.prototype,Mt.Pd=function(a,y,x){if(x===void 0)return new ih(An);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new ih(new Xt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new ih(x.copy())};function Hf(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Ge("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ge("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ge("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ge("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&Ge("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Mt.Al=function(a){Hf(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(Bs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Mt.Ww=function(a,y){Hf(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Qs,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Bs,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Mt.Cy=function(a,y){Hf(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Qs,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Bs,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Mt.kA=function(a){if(a.diagram!==this&&Ge("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 E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Qs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Mt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Mt.Yw=function(a){return this.pf===null&&(this.pf=new cn),this.pf.add(a),this.model.Pe(a),this},Mt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Mt.Pe=function(a){return this.zg===null&&(this.zg=new cn),this.zg.add(a),this},Mt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Mt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ol&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Mt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Jo;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Mt.g=function(a,y,x,E,b){this.cb(Oo,a,this,y,x,E,b)},Ue.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Oo){var b=a.object;if($o(b,a.propertyName,a.I(y)),b instanceof we){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Bs){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof vn)if(typeof rt=="number"&&ot instanceof we){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&&lt.Wb()}else typeof rt=="number"&&ot instanceof la&&(ot.isRow?fy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof jr){var At=a.oldParam===!0;typeof rt=="number"&&ot instanceof Li&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(At?rt:-1,ot,At)):tt.oi(rt,ot,At))}else tt instanceof Ue?typeof rt=="number"&&ot instanceof jr&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):Ge("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Qs){var ft=a.object,yt=a.oldParam,Et=a.oldValue;if(ft instanceof vn)typeof yt=="number"&&Et instanceof we?y?ft.Gb(yt,Et):ft.pc(yt):typeof yt=="number"&&Et instanceof la&&(Et.isRow?fy(ft,yt,y?Et:void 0):gy(ft,yt,y?Et:void 0));else if(ft instanceof jr){var Tt=a.newParam===!0;typeof yt=="number"&&Et instanceof Li&&(y?0>ft.Pa.indexOf(Et)&&ft.oi(yt,Et,Tt):(Et.isSelected=!1,Et.isHighlighted=!1,Et.Wb(),ft.pc(Tt?yt:-1,Et,Tt)))}else ft instanceof Ue?typeof yt=="number"&&Et instanceof jr&&(y?(Et.Xe(this),this.Wa.Gb(yt,Et)):this.Wa.mb(yt)):Ge("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==ol&&Ge("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Ue.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ue.prototype.eb=function(a){return this.undoManager.eb(a)},Ue.prototype.Kf=function(){return this.undoManager.Kf()},Ue.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ue.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Ue.prototype.rp=function(){this.partManager.rp()};function Rf(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,oA(a),a.N(),a.Ee=!0,E.zb&&(eA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,oA(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,lt=a.contentAlignment;isNaN(rt)&&(lt.$c()?lt.Hf(Da)?rt=0:lt.Hf(Xs)&&(rt=z-1):rt=lt.sb()?lt.x*(z-1):z/2),isNaN(ot)&&(lt.$c()?lt.Hf(Ka)?ot=0:lt.Hf(va)&&(ot=tt-1):ot=lt.sb()?lt.y*(tt-1):tt/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),z=Xt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Xt.free(z),a.Ca=x,oA(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),xl(a,!1),E.zb&&(eA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Ue.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==Za||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Ho&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),uf(b,this)),this.vb||this.invalidateViewport(a,y),UA(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=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function UA(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=ln.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot],At=Math.abs(lt.interval);2>At||(Lc(lt.figure)?z=z*At/Pe.vx(z,At):b=b*At/Pe.vx(b,At))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=nn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){nn.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,nn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Xt.alloc(),Pe.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),ln.free(E),x.part.location=y,Xt.free(y)}}Ue.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(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Ue.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))},Ue.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Ui(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Li||Ge("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Li||Ge("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Ue.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Mt=Ue.prototype,Mt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Mt.Jz=function(a){a=new dn().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 Li||Ge("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Mt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Xt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Xt.free(z);return}Ge("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):Ge("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Xt.free(z)},Mt.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)},Mt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Mt.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)},Mt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,lt=y.m22,At=y.dx,ft=y.dy,yt=x*tt+E*ot+At;y=x*rt+E*lt+ft;var Et=b*tt+E*ot+At;return a=b*rt+E*lt+ft,E=x*tt+z*ot+At,x=x*rt+z*lt+ft,tt=b*tt+z*ot+At,b=b*rt+z*lt+ft,z=Math.min(yt,Et),yt=Math.max(yt,Et),Et=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),yt=Math.max(yt,E),Et=Math.min(Et,x),y=Math.max(y,x),z=Math.min(z,tt),yt=Math.max(yt,tt),Et=Math.min(Et,b),y=Math.max(y,b),new nn(z,Et,yt-z,y-Et)},Mt.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),ki(a.copy(),this.Ab)};function yg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function zc(a){return a=gf.get(a),a!==null?new a:new yo}Ue.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===ol&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===ol){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),aa(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||kr(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(yg(this),this.As.clear(),Jl(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;Xi(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function Mh(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Bc(a,y[E])}function Bc(a,y){if(y instanceof ru){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof dn&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function hf(a,y){if(y instanceof ru){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof dn&&x.Bg.remove(a),Eg(E));break}}}}}Ue.prototype.Wd=function(){this.partManager.Wd()},Ue.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Ue.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Ue.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Ue.prototype.Vb=function(a){return this.partManager.Vb(a)},Ue.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Mt=Ue.prototype,Mt.Lc=function(a){return this.partManager.Lc(a)},Mt.ii=function(a){return this.partManager.ii(a)},Mt.Kc=function(a){return this.partManager.Kc(a)},Mt.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:_n(kn(y)))},Mt.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:_n(kn(y)))};function oA(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 cf(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),xl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Mt.Va=function(){if(this.Zi){var a=nn.alloc();cf(this,this.computeBounds(a)),nn.free(a)}},Mt.rz=function(){for(var a=new dn,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},Mt.qz=function(){return this.ai.iterator},Mt.Uz=function(a){aa(this),a&&Id(this,!0),this.ld?Kf(this,!1):(this.Jk=!0,Ca(this))};function Id(a,y){for(var x=a.ai.iterator;x.next();)_f(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function _f(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)_f(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Kf(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||cu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Vc(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),aa(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||kr(z),a.aa=x}}}function Vc(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Vc(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),th(a,y),b.isValidLayout=!0):a.xh=!0)}}Mt.yz=function(){for(var a=new cn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function wg(a){function y(b){var z=b.toLowerCase(),tt=new cn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new hi,E=new hi;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=E}function Gf(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function df(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Ge("Unknown DiagramEvent name: "+y)}Mt.Bj=function(a,y){return a=df(this,a),a!==null&&a.add(y),this},Mt.am=function(a,y){a=df(this,a),a!==null&&a.remove(y)},Mt.R=function(a,y,x){var E=df(this,a),b=new MA;if(b.diagram=this,a=Gf(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function ff(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Mt.Yj=function(a,y){return Ud(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Ue.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?$l(this,a):a.assign(this.documentBounds)};function Ud(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new xp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=Cc(a,x)),x===null){y=nn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&Wc(a,tt,E,y)}nn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=nn.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Jn&&Wc(a,tt,E,y);nn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&l1(b);return b}function Cc(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?Cc(a,y.containingGroup):null}function Wc(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(Ng(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(cd,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=cd}else if(y instanceof ir)for(y=y.memberParts;y.next();)b=y.value,b instanceof Jn&&Wc(a,b,x,E)}}function QA(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Ue.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():jf(this)};function jf(a){a.vk===-1&&(a.vk=Xi(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=nn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),cf(a,y),nn.free(y),a.Fc=!0,a.bd(),jf(a))}},a.vp))}Ue.prototype.ug=function(){this.vk!==-1&&(ee.clearTimeout(this.vk),this.vk=-1)},Ue.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 E=this.viewportBounds,b=this.scale;E=nn.allocAt(0,0,E.width*b,E.height*b);var z=Xt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(An)||(y=new Xt(y.x+z.x/b,y.y+z.y/b)),nn.free(E),Xt.free(z),y},Mt=Ue.prototype,Mt.Cs=function(){return null},Mt.av=function(){return null},Mt.bs=function(a,y){this.pj.add(a,y)},Mt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ir&&(y.$p=null)})};function Qd(a,y,x){function E(){var At=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||At-lt>ot?y(x,b,rt):ee.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,lt=+new Date;return ee.requestAnimationFrame(function(){E()}),null}Mt.Wz=function(a){return ds?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Mt.Jx=function(a){return a===void 0&&(a={}),Qd(this,this.Xz,a)},Mt.Xz=function(a,y,x){var E=Sg(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case SA+"data":b=E.getImageData(0,0,x.width,x.height);break;case SA:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Ge('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:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function Sg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Ge("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new ln(1/0,1/0):new ln(2e3,2e3));var rt=y.position||null,ot=y.parts||null,lt=y.padding===void 0?1:y.padding,At=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var yt=y.document||document,Et=y.elementFinished||null,Tt=y.showTemporary;Tt===void 0&&(Tt=!ft),y=y.showGrid,y===void 0&&(y=Tt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new nr(lt):lt instanceof nr||Ge("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),ft=new zu(null,yt,void 0,!0);var It=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(lt.left+lt.right),ft.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Et,_c(a,E.context,lt,new ln(ft.width,ft.height),a.Ca,a.pa,ot,At,Tt,y),E.context):(a.Xm=!1,_c(a,It,lt,new ln(ft.width,ft.height),a.Ca,a.pa,ot,At,Tt,y),a.Xm=!0,ft.context);var qt=a.Pp,Gt=a.documentBounds.copy();if(Gt.Fv(a.yb),Tt)for(var oe=a.Wa.s,le=oe.length,ue=0;ue<le;ue++){var ye=oe[ue];if(ye.visible&&ye.isTemporary){ye=ye.Pa.s;for(var Oe=ye.length,Vn=0;Vn<Oe;Vn++){var ai=ye[Vn];ai.isInDocumentBounds&&ai.isVisible()&&(ai=ai.actualBounds,ai.w()&&Gt.ed(ai))}}}if(oe=new Xt(Gt.x,Gt.y),ot!==null){for(le=new nn(0,0,0,0),ue=!0,ye=ot.iterator,ye.reset();ye.next();)Oe=ye.value,Oe instanceof Li&&(Vn=Oe.layer,Vn!==null&&!Vn.visible||Vn!==null&&!Tt&&Vn.isTemporary||!Oe.isVisible()||(Oe=Oe.actualBounds,Oe.w()&&(ue?(ue=!1,le.assign(Oe)):le.ed(Oe))));Gt.width=le.width,Gt.height=le.height,oe.x=le.x,oe.y=le.y}return rt!==null&&rt.w()&&(oe=rt,z||(z=qt)),le=rt=0,lt!==null&&(rt=lt.left+lt.right,le=lt.top+lt.bottom),ue=ye=0,b!==null&&(ye=b.width,ue=b.height,isFinite(ye)&&(ye=Math.max(0,ye-rt)),isFinite(ue)&&(ue=Math.max(0,ue-le))),b!==null&&z!==null?(z==="NaN"&&(z=qt),b.w()?(b=ye,Gt=ue):isNaN(ue)?(b=ye,Gt=Gt.height*z):(b=Gt.width*z,Gt=ue)):b!==null?b.w()?(z=Math.min(ye/Gt.width,ue/Gt.height),b=ye,Gt=ue):isNaN(ue)?(z=ye/Gt.width,b=ye,Gt=Gt.height*z):(z=ue/Gt.height,b=Gt.width*z,Gt=ue):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Gt.width,(tt.height-le)/Gt.height),z>qt?(z=qt,b=Gt.width,Gt=Gt.height):(b=tt.width,Gt=tt.height)):(b=Gt.width*z,Gt=Gt.height*z):(z=qt,b=Gt.width,Gt=Gt.height),lt!==null?(b+=rt,Gt+=le):lt=new nr(0),tt!==null&&(qt=tt.width,tt=tt.height,isNaN(qt)&&(qt=2e3),isNaN(tt)&&(tt=2e3),isFinite(qt)&&(b=Math.min(b,qt)),isFinite(tt)&&(Gt=Math.min(Gt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Gt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Et,_c(a,E.context,lt,new ln(Math.ceil(b),Math.ceil(Gt)),z,oe,ot,At,Tt,y),E.context):(a.Xm=!1,_c(a,It,lt,new ln(Math.ceil(b),Math.ceil(Gt)),z,oe,ot,At,Tt,y),a.Xm=!0,ft.context)}un.Object.defineProperties(Ue.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof gt||(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 tl(this,ee.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 tl(this,ee.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(ee,"resize",this.Ov,!1),this.removeEventListener(ee,"wheel",this.$j,!0),Sl===this&&(Sl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Wh(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)&&Zi(a,"0 <= value <= 1",Ue,"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),xl(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),xl(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),xl(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),xl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Zi(a,">= 0",Ue,"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&&Zi(a,">= 0",Ue,"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 E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(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 Zi(a,">= 0",Ue,"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||yg(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&&Ge("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Oc(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,cu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=zc(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,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(ee,"pointermove",this.dk,!0),this.addEventListener(ee,"pointerdown",this.ui,!0),this.addEventListener(ee,"pointerup",this.fk,!0),this.addEventListener(ee,"pointerout",this.ek,!0),this.addEventListener(ee,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ee,"wheel",this.$j,!0),this.addEventListener(ee,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ee,"pointermove",this.dk,!0),this.removeEventListener(ee,"pointerdown",this.ui,!0),this.removeEventListener(ee,"pointerup",this.fk,!0),this.removeEventListener(ee,"pointerout",this.ek,!0),this.removeEventListener(ee,"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(ee,"wheel",this.$j,!0),this.removeEventListener(ee,"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=Xt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Hu(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?oA(this):(this.vb=!0,a=this.scale,Md(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)}Xt.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=Hc(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Hc(this)),a.type!==vn.Grid&&Ge("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),UA(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),oA(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||Ge("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 nr(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===kh&&xl(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,xl(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,Rf(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&&Rf(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!==Za&&xl(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()||Ge("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()||Ge("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)):Zi(a,"> 0",Ue,"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)):Zi(a,"> 0",Ue,"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),xl(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 nr(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&&Ge("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();)cp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==$h&&a!==Gs&&a!==bh&&Ge("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 nr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),un.Object.defineProperties(Ue,{licenseKey:{get:function(){return vf.jc()},set:function(a){vf.add(a.replace(/\s/g,""))}},version:{get:function(){return ka}}}),Ue.prototype.makeImageData=Ue.prototype.Jx,Ue.prototype.makeImage=Ue.prototype.Wz,Ue.prototype.cacheGroupExternalLinks=Ue.prototype.Fu,Ue.prototype.addRenderer=Ue.prototype.bs,Ue.prototype.makeSVG=Ue.prototype.av,Ue.prototype.makeSvg=Ue.prototype.Cs,Ue.prototype.stopAutoScroll=Ue.prototype.ug,Ue.prototype.doAutoScroll=Ue.prototype.gs,Ue.prototype.isUnoccupied=Ue.prototype.Yj,Ue.prototype.raiseDiagramEvent=Ue.prototype.R,Ue.prototype.removeDiagramListener=Ue.prototype.am,Ue.prototype.addDiagramListener=Ue.prototype.Bj,Ue.prototype.findTreeRoots=Ue.prototype.yz,Ue.prototype.layoutDiagram=Ue.prototype.Uz,Ue.prototype.findTopLevelGroups=Ue.prototype.qz,Ue.prototype.findTopLevelNodesAndLinks=Ue.prototype.rz,Ue.prototype.ensureBounds=Ue.prototype.Va,Ue.prototype.findLinksByExample=Ue.prototype.ls,Ue.prototype.findNodesByExample=Ue.prototype.ms,Ue.prototype.findLinkForData=Ue.prototype.Kc,Ue.prototype.findNodeForData=Ue.prototype.ii,Ue.prototype.findPartForData=Ue.prototype.Lc,Ue.prototype.findLinkForKey=Ue.prototype.findLinkForKey,Ue.prototype.findNodeForKey=Ue.prototype.Vb,Ue.prototype.findPartForKey=Ue.prototype.findPartForKey,Ue.prototype.rebuildParts=Ue.prototype.Wd,Ue.prototype.transformViewToDoc=Ue.prototype.Ps,Ue.prototype.transformRectDocToView=Ue.prototype.zA,Ue.prototype.transformDocToView=Ue.prototype.op,Ue.prototype.centerRect=Ue.prototype.es,Ue.prototype.scrollToRect=Ue.prototype.tv,Ue.prototype.scroll=Ue.prototype.scroll,Ue.prototype.highlightCollection=Ue.prototype.Jz,Ue.prototype.highlight=Ue.prototype.Iz,Ue.prototype.selectCollection=Ue.prototype.rA,Ue.prototype.select=Ue.prototype.select,Ue.prototype.updateAllRelationshipsFromData=Ue.prototype.rp,Ue.prototype.updateAllTargetBindings=Ue.prototype.updateAllTargetBindings,Ue.prototype.commit=Ue.prototype.commit,Ue.prototype.rollbackTransaction=Ue.prototype.Kf,Ue.prototype.commitTransaction=Ue.prototype.eb,Ue.prototype.startTransaction=Ue.prototype.Ea,Ue.prototype.raiseChanged=Ue.prototype.g,Ue.prototype.raiseChangedEvent=Ue.prototype.cb,Ue.prototype.removeChangedListener=Ue.prototype.ik,Ue.prototype.addChangedListener=Ue.prototype.Pe,Ue.prototype.removeModelChangedListener=Ue.prototype.mA,Ue.prototype.addModelChangedListener=Ue.prototype.Yw,Ue.prototype.findLayer=Ue.prototype.Qj,Ue.prototype.removeLayer=Ue.prototype.kA,Ue.prototype.addLayerAfter=Ue.prototype.Cy,Ue.prototype.addLayerBefore=Ue.prototype.Ww,Ue.prototype.addLayer=Ue.prototype.Al,Ue.prototype.moveParts=Ue.prototype.moveParts,Ue.prototype.copyParts=Ue.prototype.Kj,Ue.prototype.removeParts=Ue.prototype.Is,Ue.prototype.remove=Ue.prototype.remove,Ue.prototype.add=Ue.prototype.add,Ue.prototype.clearDelayedGeometries=Ue.prototype.bx,Ue.prototype.setProperties=Ue.prototype.nm,Ue.prototype.attach=Ue.prototype.Du,Ue.prototype.set=Ue.prototype.set,Ue.prototype.resetInputOptions=Ue.prototype.Sx,Ue.prototype.setInputOption=Ue.prototype.sA,Ue.prototype.getInputOption=Ue.prototype.Ql,Ue.prototype.resetRenderingHints=Ue.prototype.Tx,Ue.prototype.setRenderingHint=Ue.prototype.Xx,Ue.prototype.getRenderingHint=Ue.prototype.Gf,Ue.prototype.maybeUpdate=Ue.prototype.bd,Ue.prototype.requestUpdate=Ue.prototype.$b,Ue.prototype.delayInitialization=Ue.prototype.Xy,Ue.prototype.isUpdateRequested=Ue.prototype.Pz,Ue.prototype.invalidateDocumentBounds=Ue.prototype.Ya,Ue.prototype.findObjectsNear=Ue.prototype.og,Ue.prototype.findPartsNear=Ue.prototype.mz,Ue.prototype.findObjectsIn=Ue.prototype.Cf,Ue.prototype.findPartsIn=Ue.prototype.ux,Ue.prototype.findObjectsAt=Ue.prototype.ji,Ue.prototype.findPartsAt=Ue.prototype.lz,Ue.prototype.findObjectAt=Ue.prototype.ic,Ue.prototype.findPartAt=Ue.prototype.Ol,Ue.prototype.focusObject=Ue.prototype.zz,Ue.prototype.alignDocument=Ue.prototype.Jy,Ue.prototype.zoomToRect=Ue.prototype.BA,Ue.prototype.zoomToFit=Ue.prototype.zoomToFit,Ue.prototype.diagramScroll=Ue.prototype.kx,Ue.prototype.focus=Ue.prototype.focus;var gf=new hi,zf=null,ds=ee.document!==void 0,Pc=null,Jh="",Za=new Te(Ue,"None",0),tu=new Te(Ue,"Uniform",1),qh=new Te(Ue,"UniformToFill",2),Od=new Te(Ue,"CycleAll",10),Zc=new Te(Ue,"CycleNotDirected",11),Yc=new Te(Ue,"CycleNotDirectedFast",12),pf=new Te(Ue,"CycleNotUndirected",13),mf=new Te(Ue,"CycleDestinationTree",14),Vf=new Te(Ue,"CycleSourceTree",15),kh=new Te(Ue,"DocumentScroll",1),Xc=new Te(Ue,"InfiniteScroll",2),$h=new Te(Ue,"TreeParentCollapsed",21),Gs=new Te(Ue,"AllParentsCollapsed",22),bh=new Te(Ue,"AnyParentsCollapsed",23),vf=new cn,ka="2.3.10",SA="image",nh=null,Th=!1;function ha(){if(ds){var a=ee.document.createElement("canvas"),y=a.getContext("2d"),x=Fn("7ca11abfd022028846");y[x]=Fn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",vr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Pe.za],b=1;5>b;b++)y[Fn("7ca11abfd7330390")](Fn(E[b-1]),10,15*b);for(y[x]=Fn("39f046ebb36e4b"),x=1;5>x;x++)y[Fn("7ca11abfd7330390")](Fn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(vr.prototype.Cd=vr.prototype.Eu),nh=a}}Ue.className="Diagram",Ue.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ee.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Ue?y.H:null},Ue.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},Ue.useDOM=function(a){ds=a?ee.document!==void 0:!1},Ue.isUsingDOM=function(){return ds},Ue.None=Za,Ue.Uniform=tu,Ue.UniformToFill=qh,Ue.CycleAll=Od,Ue.CycleNotDirected=Zc,Ue.CycleNotDirectedFast=Yc,Ue.CycleNotUndirected=pf,Ue.CycleDestinationTree=mf,Ue.CycleSourceTree=Vf,Ue.DocumentScroll=kh,Ue.InfiniteScroll=Xc,Ue.TreeParentCollapsed=$h,Ue.AllParentsCollapsed=Gs,Ue.AnyParentsCollapsed=bh;function Jc(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Gu(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=ee[Fn("76a715b2f73f148a")][Fn("72ba13b5")]||"";if(a.Rc=!0,ds){var E=Ue[Fn("76a115b6ed251eaf4692")];if(E)for(var b=vf.iterator;b.next()&&(E=b.value,E=Fn(E).split(Fn("39e9")),!(6>E.length));){var z=Fn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Fn(Cn[Fn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=ee[Fn("74a900bae4370f8b51")][Fn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Fn("73a612b6fb191d")](Fn("3aad1ab6e022098b4dc4")),z=Fn(E[2]),-1<tt&&(rt=rt[Fn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Fn("76ad18b4f73e")],rt=x[Fn("73a612b6fb191d")](Fn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Fn("73a612b6fb191d")](z),0>tt&&z!==Fn("7da71ca0ad381e90")&&(tt=y[Fn("73a612b6fb191d")](Fn("76a715b2ef3e149757"))),0>tt&&(tt=y[Fn("73a612b6fb191d")](Fn("76a715b2ef3e149757"))),0>tt&&(tt=y[Fn("73a612b6fb191d")](Fn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Fn("73a612b6fb191d")](Fn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Fn("73a612b6fb191d")](Fn("35"))||y[Fn("73a612b6fb191d")](Fn("35"))===-1),!a.Rc||x[Fn("73a612b6fb191d")](Fn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Fn("73a612b6fb191d")](z)),!a.Rc)||(tt=ee[Fn("76a715b2f73f148a")][Fn("69ad17a1e03e")],rt=tt[Fn("73a612b6fb191d")](Fn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Fn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=ee.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[Fn("79a417a0f0181a8946")]=E,ee.document[Fn("78a712aa")]){ee.document[Fn("78a712aa")][Fn("7bb806b6ed32388c4a875b")](tt),ot=ee.getComputedStyle(tt).getPropertyValue(Fn("78a704b7e62456904c9b12701b6532a8"));var lt=ee.getComputedStyle(tt).getPropertyValue(Fn("75b817b0ea2202"));if(ee.document[Fn("78a712aa")][Fn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=ee[Fn("77a902b0eb1b1e804a8a")],lt==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(Fn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var At in tt)if(E===tt[At].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(At=x[Fn("76ad18b4f73e")],b=x[Fn("73a612b6fb191d")](Fn("35e7"))+2;b<At;b++)y+=x[b];x=y[Fn("73a612b6fb191d")](Fn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Fn("73a612b6fb191d")](Fn("35")))}}}return 0<a.Rc&&a!==a.wy}Jc.className="DiagramHelper";function ih(a){this.j=a===void 0?new Xt:a,this.o=new Xt}un.Object.defineProperties(ih.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 qc="DraggingInfo";ih.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new ln(NaN,NaN).freeze(),this.gridSnapCellSpot=ta,this.gridSnapOrigin=new Xt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function dt(a,y){if(typeof a=="string"||ee.Element&&a instanceof Element)var x=Ue.call(this,a)||this;else x=Ue.call(this)||this,y=a;return ct(x),y&&x.nm(y),x}be(dt,Ue);function ct(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=uu,a.layout=new Ha}dt.prototype.reset=function(){Ue.prototype.reset.call(this),ct(this)},dt.className="Palette";function gt(a,y){if(typeof a=="string"||ee.Element&&a instanceof Element)var x=Ue.call(this,a)||this;else x=Ue.call(this)||this,y=a;var E=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 Li;var b=new fr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new nr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new $t,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Xt(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Rt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Rt(E)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}be(gt,Ue),gt.prototype.computePixelRatio=function(){return 1},gt.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(Gc(this),this.ql===null){var x=new zu(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),Nt(this)}finally{this.ta=a,this.ib=y}}}Ue.prototype.redraw.call(this)},gt.prototype.gc=function(){if(this.Ka===null&&Ge("No div specified"),this.ta===null&&Ge("No canvas specified"),!(this.ta instanceof tl)&&(qm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Gc(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?Nt(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,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Nt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=nn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),UA(y,b),nn.free(b),aa(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var lt=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&lt.layer===rt&&(rt=bs(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var At=bs(rt,b),ft=ot.scale,yt=nn.alloc(),Et=rt.Pa.s,Tt=Et.length,It=0;It<Tt;It++){var qt=Et[It];(E||qt!==lt)&&rt.Oj(b,qt,ot,null,ft,yt,!1)}nn.free(yt),b.globalAlpha=At}}}}}function Rt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=ln.alloc();b.h(x.width,x.height),E.desiredSize=b,ln.free(b),a=2/a.scale,E instanceof fr&&(E.strokeWidth=a),y.location=new Xt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}gt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return So;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},gt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},gt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Rt(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=E,this.R("ViewportBoundsChanged",this.fc,a))},un.Object.defineProperties(gt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof gt&&Ge("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,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Rt(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),Rt(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)}}}),gt.className="Overview";function $t(){ss.call(this),this.j=null}be($t,ss),$t.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 Xt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Xt(a.x-this.j.x,a.y-this.j.y)),!0)},$t.prototype.doActivate=function(){this.j=null,ss.prototype.doActivate.call(this)},$t.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},$t.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 E=a.firstInput.documentPoint;x=x.location,this.j=new Xt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Xt(a.x-this.j.x,a.y-this.j.y)}}},$t.className="OverviewDraggingTool";function Jt(){or(this),this.H=Sl,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=So,this.hb=!0,this.cg=null,this.ob=200}Jt.prototype.toString=function(){return"CommandHandler"},Jt.prototype.Xe=function(a){this.H=a},Jt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Gi?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Jt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Jt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ho&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Jt.prototype.canStopCommand=function(){return!0},Jt.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 E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Jt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Jt.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 dn,x=a.selection.iterator;x.next();)_d(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Jt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Jt.prototype.copySelection=function(){var a=this.diagram,y=new dn;for(a=a.selection.iterator;a.next();)_d(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Jt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Jt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Pc=null,Jh="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new cn,x.addAll(z),Pc=x,Jh=y.model.dataFormat}}y.R("ClipboardChanged",x)},Jt.prototype.pasteFromClipboard=function(){var a=new dn,y=Pc;if(y===null)return a;var x=this.diagram;if(Jh!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Jt.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 E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);xc(y,z,new Xt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Jt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Pc===null||Pc.count===0||Jh!==a.model.dataFormat)},Jt.prototype.undo=function(){this.diagram.undoManager.undo()},Jt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Jt.prototype.redo=function(){this.diagram.undoManager.redo()},Jt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Jt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Za&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Za?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Za&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Za?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Jt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Jt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;cu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=So):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),kr(y)},Jt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Jt.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(ot){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;cu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=fe(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof Jn&&ot.isTreeExpanded&&(!(ot instanceof ir)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Li&&y.tv(ot.actualBounds),ot instanceof Jn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof ir&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Li&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Xi(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function fe(a,y,x){if(y.isVisible())return x;if(y instanceof Xr)fe(a,y.adornedPart,x);else if(y instanceof Nn){var E=y.fromNode;E!==null&&fe(a,E,x),y=y.toNode,y!==null&&fe(a,y,x)}else y instanceof Jn&&(E=y.labeledLink,E!==null&&fe(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),fe(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),fe(a,y,x));return x}Jt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Li)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Jt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),cu(y.animationManager,"Collapse Tree");var x=new cn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Jn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Jt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Jn&&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 Jn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),cu(y.animationManager,"Expand Tree");var x=new cn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Jn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Jt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Jn)||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 Jn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new cn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new cn,ot=b.iterator;ot.next();){var lt=ot.value;z=!1;for(var At=b.iterator;At.next();)if(lt.Td(At.value)){z=!0;break}z||rt.add(lt)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var yt=rt.iterator;yt.next();)if(!yt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof ir)xA(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Et=y.copyNodeData(x);Ln(Et)&&(y.xf(Et),E=a.ii(Et))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Tt=rt.iterator;Tt.next();){var It=Tt.value;this.isValidMember(E,It)&&(It.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Jt.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 qe(a){var y=ve();for(a=a.iterator;a.next();){var x=a.value;x instanceof Nn||y.push(x)}a=new dn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return Ee(y),a}Jt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Nn)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},Jt.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 E=new cn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof ir&&z.canUngroup()&&E.add(z)}var tt=new cn;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var lt=ot.containingGroup,At=lt!==null&&lt.data!==null?x.wa(lt.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var yt=ft.value;if(yt.isSelected=!0,!(yt instanceof Nn)){var Et=yt.data;Et!==null?x.mp(Et,At):yt.containingGroup=lt}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Jt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof ir))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.canUngroup())return!0;return!1},Jt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=qe(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Jt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),cu(y.animationManager,"Collapse SubGraph");var x=new cn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ir&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Jt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ir&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.isSubGraphExpanded)return!0;return!1},Jt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),cu(y.animationManager,"Expand SubGraph");var x=new cn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ir&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Jt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ir&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&!y.isSubGraphExpanded)return!0;return!1},Jt.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 E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Io&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Jt.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 Io))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 Io&&x.editable}),a!==null))return!0;return!1},Jt.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 E=y.lastInput,b=null;a instanceof we?b=a.ga(Zr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Xt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,wa(x,!1,a)}},Jt.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)},Jt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new hi,a===null)return E;for(var z=a.iterator;z.next();)eh(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Nn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},un.Object.defineProperties(Jt.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||Ge("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}}}),Jt.className="CommandHandler",yc=function(){return new Jt};function we(){or(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Xt(NaN,NaN).freeze(),this.jd=Qa,this.Ab=new vr,this.wh=new vr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ml,this.uc=new nn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new nn(NaN,NaN,NaN,NaN).freeze(),this.dc=new nn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Es,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var yn,pn,Ai,vi,Di,Yi,Fr,mr,Hr,vo;we.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=pe(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},we.prototype.Vw=function(a){var y=this.Dh;if(Ui(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},we.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},we.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},we.prototype.copy=function(){return this.clone()},Mt=we.prototype,Mt.qb=function(a){a.classType===Nn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ge("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===we&&(this.stretch=a)},Mt.toString=function(){return _e(this.constructor)+"#"+qr(this)},Mt.th=function(){this.A!==null&&(this.A.nc=!0)};function pr(a){a.A===null?a.A=new $c:a.A.nc&&(a.A=a.A.copy())}Mt.Xc=function(){if(this.ba===null){var a=new Zf;a.Xi=Aa,a.yj=Aa,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Mt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===Oo&&Ua(this)&&Qo(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new hi),tt=z.undoManager.transactionLevel===0,a.startCondition===co?tt=!0:a.startCondition===Jr&&(tt=!1),tt?(z=new Sa,wA(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(cu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof vn&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof vn&&HA(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function Qo(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=k1(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Mt.ks=function(a){return this.bindingId===a?this:null},Mt.g=function(a,y,x){this.cb(Oo,a,this,y,x)},Mt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new vr);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function ca(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Mt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Tr(a.x,a.y,0,0,0,E.height)<=y||Tr(a.x,a.y,0,E.height,E.width,E.height)<=y||Tr(a.x,a.y,E.width,E.height,E.width,0)<=y||Tr(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Mt.se=function(){return!0},Mt.ca=function(a){var y=Xt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Xt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=Ys(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Xt.free(y),a}return b=!1,(this instanceof Xr||this instanceof fr?Ys(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)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Xt.free(y),b},Mt.gh=function(a){var y=this.naturalBounds;return Ys(0,0,y.width,y.height,a.x,a.y)},Mt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=nn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Xt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Xt.free(b),nn.free(y),E},Mt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Xt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Xt.free(b),E},Mt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Xt.allocAt(0,0),b=Xt.allocAt(0,x.height),z=Xt.allocAt(x.width,x.height),tt=Xt.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=nn.allocAt(0,0,x.width,x.height);var ot=Xt.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Xt.free(ot),nn.free(x),!rt&&(Pe.us(a,E,b)||Pe.us(a,b,z)||Pe.us(a,z,tt)||Pe.us(a,tt,E))&&(rt=!0)}return Xt.free(E),Xt.free(b),Xt.free(z),Xt.free(tt),rt},Mt.ga=function(a,y){if(y===void 0&&(y=new Xt),a instanceof Ei){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},Mt.mi=function(a){a===void 0&&(a=new nn);var y=this.naturalBounds,x=this.oe,E=Xt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),us(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),us(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),us(a,E.x,E.y,0,0),Xt.free(E),a},Mt.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},Mt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Mt.qs=function(a,y){return y===void 0&&(y=new Xt),y.assign(a),this.oe.Cd(y),y},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Pe.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*lt+ft,a=a*ot+y*At+yt,y=x*rt+E*lt+ft,x=x*ot+E*At+yt,b.h(0,0),E=this.naturalBounds,x=Pe.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},we.prototype.measure=function(a,y,x,E){if(pu(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof vn;switch(Cl(this,!0)){case pn:tt=b=0,rt&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case vi:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case Di:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||Ge("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),js(this,!1)}},we.prototype.Wl=function(){},we.prototype.Dd=function(){return!1},we.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=nn.alloc();z.assign(this.Ib),this.Ib.ka(),ul(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&sd(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Io&&(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()||Ge("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),rh(this,!1),nn.free(z)},Mt=we.prototype,Mt.eh=function(){};function ll(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=Cl(a,!0),x===E&&z===b&&(y=pn),y){case pn:(x>E||z>b)&&(js(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case yn:js(a,!0),a.measure(E,b,0,0);break;case vi:js(a,!0),a.measure(E,z,0,0);break;case Di:js(a,!0),a.measure(x,b,0,0)}}}Mt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||ev(x,!0),this.N(),Ps(a,y)||(x.oh(),this.Pn(x)))},Mt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof Jn&&Wy(a,this))},Mt.gc=function(a,y){if(!eu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof vn&&sd(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,lt=this.areaBackground,At=this.Ma;lt===null&&At===null||a.yc(),lt!==null&&(ls(this,a,lt,!0,!0,ot,rt),lt instanceof fo&&lt.type===wr?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(lt)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),At!==null&&(ls(this,a,At,!0,!1,ot,rt),At instanceof fo&&At.type===wr?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(At)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&da(this),lt=this.part,ot=!1;var ft=0;lt&&y.Gf("drawShadows")&&(ot=lt.isShadowed)&&(At=lt.shadowOffset,ft=Math.max(At.y,At.x)*y.scale*y.Mb),At=this.Dd();var yt;if(!(yt=y.$i||!At)){var Et=this.naturalBounds;yt=this.wh;var Tt=yt.m11,It=yt.m21,qt=yt.dx,Gt=yt.m12,oe=yt.m22,le=yt.dy,ue,ye=ue=0;yt=ue*Tt+ye*It+qt;var Oe=ue*Gt+ye*oe+le;ue=Et.width+ft,ye=0;var Vn=ue*Tt+ye*It+qt;ue=ue*Gt+ye*oe+le,ye=Math.min(yt,Vn);var ai=Math.min(Oe,ue),ii=Math.max(yt+0,Vn)-ye,Tn=Math.max(Oe+0,ue)-ai;yt=ye,Oe=ai,ue=Et.width+ft,ye=Et.height+ft,Vn=ue*Tt+ye*It+qt,ue=ue*Gt+ye*oe+le,ye=Math.min(yt,Vn),ai=Math.min(Oe,ue),ii=Math.max(yt+ii,Vn)-ye,Tn=Math.max(Oe+Tn,ue)-ai,yt=ye,Oe=ai,ue=0,ye=Et.height+ft,Vn=ue*Tt+ye*It+qt,ue=ue*Gt+ye*oe+le,ye=Math.min(yt,Vn),ai=Math.min(Oe,ue),ii=Math.max(yt+ii,Vn)-ye,Tn=Math.max(Oe+Tn,ue)-ai,yt=ye,Oe=ai,ft=y.viewportBounds,Et=ft.x,Tt=ft.y,yt=!(yt>ft.width+Et||Et>ii+yt||Oe>ft.height+Tt||Tt>Tn+Oe)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Io&&(a.font=this.font),yt){if(Oe=rt.se()?rt.naturalBounds:rt.actualBounds,ii=Math.max(tt.x,Oe.x),Tn=Math.max(tt.y,Oe.y),ft=Math.min(tt.right,Oe.right)-ii,Et=Math.min(tt.bottom,Oe.bottom)-Tn,Tt=this.tb,Tt!==null&&(ii=Tt.x,Tn=Tt.y,ft=Tt.width,Et=Tt.height),ii>tt.width+tt.x||tt.x>Oe.width+Oe.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(ii,Tn,ft,Et),a.clip()}if(At){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(Oe=lt.shadowOffset,a.Ev(Oe.x*y.scale*this.scale*y.Mb,Oe.y*y.scale*this.scale*y.Mb,lt.shadowBlur),Nh(a),a.shadowColor=lt.shadowColor)}ot&&this.shadowVisible===!0?Nh(a):ot&&this.shadowVisible===!1&&OA(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),fu(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Pa(this,rt)&&this.shadowVisible===null&&OA(a),this.Ma!==null&&(a.yc(),gl(this,a,lt,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Pa(this,rt))?(gu(this,!0),this.shadowVisible===null&&OA(a)):gu(this,!1),this.hh(a,y),ot&&this.l&512&&Nh(a),At&&ot&&OA(a),yt&&(a.restore(),a.Vc(this instanceof vn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Pa(a,y){return y===null?!1:(sd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===vn.Auto||y.type===vn.Spot)&&y.Pb()!==a)}Mt.Dv=function(){};function fu(a,y,x,E){ls(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof fo&&a.areaBackground.type===wr?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function gl(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;ls(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof fo&&a.Ma.type===wr?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function $a(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===vn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function eu(a,y,x){if(!(y instanceof Ql))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 E=a.panel,b=a.nk(y);if(a.kk(y,x,b))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):E&&$a(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Nh(y),y.shadowColor=a.shadowColor}a instanceof Io&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof vn;var rt=a instanceof vn?sd(a):!1;a.l&4096&&da(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Jf(y,1,0,0,1,0,0),a.svg=y.ad):z?(Jf(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Jf(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],fu(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),gl(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],gl(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&Nh(y),rt&&a.shadowVisible===!0?Nh(y):rt&&a.shadowVisible===!1&&OA(y),b=a.panel,rt&&Pa(a,b)&&a.shadowVisible===null&&OA(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),rt&&(a.Ma!==null||a.areaBackground!==null||Pa(a,b))?(gu(a,!0),a.shadowVisible===null&&OA(y)):gu(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,lt=a.svg,!z&&lt!==null&&rt!==lt&&lt.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),Bl(y,lt),!0):(a.svg=rt,tt!==null&&rt===null&&(Bg(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&Nh(y),a.Dd()&&OA(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&$a(a,E,rt),tt!==null&&tt(a,rt)),!0)}Mt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+rs++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof vn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Bl(a,E)};function Bl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function dr(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=kn(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Mt.hh=function(){},Mt.lv=function(){this.Uc=!0},Mt.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 E=this.transform,b=this instanceof vn?sd(this):!1;if(!(this instanceof vn&&b))if(this instanceof ru){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&$p(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",t0(a)):y.setAttributeNS(null,"transform",t0(a))}else if(!x||this instanceof vn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof fr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],fu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&qf(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(qf(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof vn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),gl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(qf(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),z&&qf(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Mt.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 ls(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Dr)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=lt,ot+=lt),(z=y instanceof rd)&&x.xe&&(x.type===es||x.yk===rt&&x.ft===ot))var At=x.xe;else{var ft=0,yt=0,Et=0,Tt=0,It=0,qt=0;if(qt=It=0,b?(It=tt.x,qt=tt.y):E||(It-=lt/2,qt-=lt/2),ft=x.start.x*rt+x.start.offsetX,yt=x.start.y*ot+x.start.offsetY,Et=x.end.x*rt+x.end.offsetX,Tt=x.end.y*ot+x.end.offsetY,ft+=It,Et+=It,yt+=qt,Tt+=qt,x.type===lr)At=y.createLinearGradient(ft,yt,Et,Tt);else if(x.type===wr)qt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(It=0,qt=Math.max(rt,ot)/2):It=x.startRadius,At=y.createRadialGradient(ft,yt,It,Et,Tt,qt);else if(x.type===es)try{At=y.createPattern(x.pattern,"repeat")}catch(oe){At=null}if(x.type!==es&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)At.addColorStop(b.key,b.value);if(z&&(x.xe=At,At!==null&&(x.yk=rt,x.ft=ot),At===null&&x.type===es&&x.yk!==-1)){x.yk=-1;var Gt=a.diagram;Gt!==null&&x.yk===-1&&Xi(function(){Gt.redraw()},600)}}E?y.fillStyle=At:y.strokeStyle=At}}}Mt.rg=function(a){if(a instanceof vn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Mt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Mt.If=function(){for(var a=this instanceof vn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function da(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){ju(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)}ju(a,!1),Ul(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ul(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,Ul(a,!1)))}Mt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Xt.alloc();z.yi(y,x,E,b,Zr),a.rotate(this.Kb,z.x,z.y),Xt.free(z)}},Mt.v=function(a){if(!pu(this)){a===void 0&&(a=!1),js(this,!0),rh(this,!0);var y=this.panel;y===null||a||y.v()}},Mt.Uj=function(){pu(this)||(js(this,!0),rh(this,!0))};function $s(a){if(!ul(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Jn&&a.Bd(),y.$b())),rh(a,!0)}}Mt.Uk=function(){!(this.l&2048)&&(ju(this,!0),Ul(this,!0))},Mt.Wu=function(){Ul(this,!0)},Mt.N=function(){var a=this.part;a!==null&&a.N()};function Cl(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===vn.Table?fs(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===vn.Auto&&E.Pb()===a?Do(a,yn,y):x===Yi?E!==null?E.type===vn.Spot&&E.Pb()===a?Do(a,yn,y):(x=E.defaultStretch,x===Yi?Do(a,pn,y):Do(a,x,y)):Do(a,pn,y):Do(a,x,y)}function fs(a,y,x,E){var b=a.stretch;if(b!==Yi)return Do(a,b,E);var z=b=null;switch(y.stretch){case Di:z=!0;break;case yn:z=!0}switch(x.stretch){case vi:b=!0;break;case yn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===vi||y===yn),z===null&&(z=y===Di||y===yn),b===!0&&z===!0?Do(a,yn,E):b===!0?Do(a,vi,E):z===!0?Do(a,Di,E):Do(a,pn,E)}function Do(a,y,x){if(x)return y;if(y===pn||(x=a.desiredSize,x.w()))return pn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===vi)return pn;if(y===yn)return Di}else{if(y===Di)return pn;if(y===yn)return vi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Di)return pn;if(y===yn)return vi}else{if(y===vi)return pn;if(y===yn)return Di}return y}function gu(a,y){a.l=y?a.l|512:a.l&-513}function Ua(a){return(a.l&1024)!==0}function tc(a,y){a.l=y?a.l|1024:a.l&-1025}function ju(a,y){a.l=y?a.l|2048:a.l&-2049}function Ul(a,y){a.l=y?a.l|4096:a.l&-4097}function pu(a){return(a.l&8192)!==0}function js(a,y){a.l=y?a.l|8192:a.l&-8193}function ul(a){return(a.l&16384)!==0}function rh(a,y){a.l=y?a.l|16384:a.l&-16385}Mt.Gj=function(){this.svg=null},Mt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Mt.Av=function(){},Mt.zv=function(a){return this.pa=a,$s(this),!0},Mt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Mt.kq=function(){return 0};function Fc(a){var y=a.part;if(y instanceof Jn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Wy(y,a)}}function qp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof vn?a instanceof Jn?a.Bd():a.qm(a,function(x){Fc(x)}):Fc(a))}Mt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new zs(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&py(a)&&Ge("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new cn),this.localBindings.add(b),this},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return xg(this,a),this},Mt.apply=function(a){return a(this),this},Mt.nm=function(a){return Kc(this,a),this},Mt.pz=function(){return this.ih()},Mt.ih=function(){for(var a=this instanceof vn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Mt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new hi),this.animationTriggers.add(a.propertyName,a),this};function mu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=yf.I(a);typeof z=="function"?(x=pe(arguments),E=z(x),Ln(E)||Ge('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ee.go[a]}if(E===null&&(b!=null&&b.constructor||Ge("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof Ue&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Wh(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Ge("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):xg(E,z);return E}function xg(a,y){if(typeof y=="string")if(a instanceof Io)a.text=y;else if(a instanceof fr)a.figure=y;else if(a instanceof ru)a.source=y;else if(a instanceof vn)y=RA.I(y),y!==null&&(a.type=y);else if(a instanceof fo){var x=Mi(fo,y);x!==null?a.type=x:Ge("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Un?(y=Mi(Un,y),y!==null&&(a.type=y)):a instanceof Gr&&(y=Mi(Gr,y),y!==null&&(a.type=y));else if(y instanceof we)a instanceof vn||Ge("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof la){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof la?s0(E,y):Ge("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Te)typeof a.qb=="function"&&a.qb(y);else if(y instanceof po)a.type=y;else if(y instanceof zs)a instanceof we||a instanceof la?a.bind(y):Ge("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ql)a instanceof we?a.Jv(y):Ge("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Js)a instanceof Un&&a.type===Un.o?a.figures.add(y):Ge("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Gr)a instanceof Js?a.segments.add(y):Ge("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ns)a instanceof Ue||a instanceof ir?a.layout=y:Ge("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++)xg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof fo){x=new yi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);Kc(a,x)}else if(a instanceof la){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Ge("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&Ge("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new yi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);Kc(a,b)}else Kc(a,y);else Ge('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function oh(a,y){yf.add(a,y)}function Wf(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}un.Object.defineProperties(we.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new $c),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 $c),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 $c),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(pr(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&&(pr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Hl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Ec),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Hl&&(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 Ec),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 Ec),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:An},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Ec),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Yi},set:function(a){var y=this.stretch;y!==a&&(pr(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&&(pr(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)&&Zi(a,"0 <= value <= 1",we,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Pf(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(Pf(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(),qp(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&&Ft(a,"GraphObject.areaBackground"),a instanceof fo&&a.freeze(),pr(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&&Ft(a,"GraphObject.background"),a instanceof fo&&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 Li)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,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Xt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Ge("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,qp(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof fr&&this.qc(),this.g("desiredSize",E,a),Ua(this)&&(a=this.part,a!==null&&(Qo(this,a,"width"),Qo(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 fr&&this.qc(),this.g("desiredSize",y,a),Ua(this)&&(a=this.part,a!==null&&Qo(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 fr&&this.qc(),this.g("desiredSize",y,a),Ua(this)&&(a=this.part,a!==null&&Qo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:cr},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(),pr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Zs},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(),pr(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 nr(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&&da(this),this.Ab}},oe:{get:function(){return this.l&4096&&da(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(pr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:pn},set:function(a){this.reshapingBehavior!==a&&(pr(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()&&Ge("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),$s(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&&Zi(a,">= 0",we,"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&&Zi(a,">= 1",we,"columnSpan"),pr(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&&Zi(a,">= 0",we,"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&&Zi(a,">= 1",we,"rowSpan"),pr(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&&(pr(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 Jn||Ge("Cannot set portID on a Link: "+a),y!==null&&x!==null&&ov(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Xy(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Aa},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Fc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Zi(a,">= 0",we,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Fc(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),Fc(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&&Zi(a,">= 0",we,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Aa},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Fc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Zi(a,">= 0",we,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Fc(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),Fc(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&&Zi(a,">= 0",we,"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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(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&&(pr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),we.prototype.trigger=we.prototype.Jv,we.prototype.findBindingPanel=we.prototype.ih,we.prototype.findTemplateBinder=we.prototype.pz,we.prototype.setProperties=we.prototype.nm,we.prototype.apply=we.prototype.apply,we.prototype.attach=we.prototype.Du,we.prototype.set=we.prototype.set,we.prototype.isEnabledObject=we.prototype.If,we.prototype.isVisibleObject=we.prototype.Ed,we.prototype.isContainedBy=we.prototype.rg,we.prototype.getNearestIntersectionPoint=we.prototype.rs,we.prototype.getLocalPoint=we.prototype.qs,we.prototype.getDocumentScale=we.prototype.Df,we.prototype.getDocumentAngle=we.prototype.li,we.prototype.getDocumentBounds=we.prototype.mi,we.prototype.getDocumentPoint=we.prototype.ga,we.prototype.intersectsRect=we.prototype.Yc,we.prototype.containedInRect=we.prototype.fh,we.prototype.containsRect=we.prototype.Re,we.prototype.containsPoint=we.prototype.ca,we.prototype.raiseChanged=we.prototype.g,we.prototype.raiseChangedEvent=we.prototype.cb,we.prototype.addCopyProperty=we.prototype.Vw;var yf=null;we.className="GraphObject",yf=new hi,oh("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=mu(vn,vn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof vn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},mu(fr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ei(0,0,2.76142374915397,2.761423749153969),spot2:new Ei(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof vn&&(x=E.fb("ButtonBorder"),x instanceof fr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof vn&&(x=E.fb("ButtonBorder"),x instanceof fr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof vn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof fr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof vn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof fr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof vn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof fr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof vn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof fr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),oh("TreeExpanderButton",function(){var a=mu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},mu(fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Go},new zs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new zs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Xr&&(x=x.adornedPart),x instanceof Jn){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),oh("SubGraphExpanderButton",function(){var a=mu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},mu(fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Go},new zs("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Xr&&(x=x.adornedPart),x instanceof ir){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),oh("ToolTip",function(){return mu(Xr,vn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Xt(0,3),shadowBlur:5},mu(fr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ei(0,0,4,6),spot2:new Ei(1,1,-4,-4)}))}),oh("ContextMenu",function(){return mu(Xr,vn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Xt(0,3),shadowBlur:5},new zs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),oh("ContextMenuButton",function(){var a=mu("Button");a.stretch=vi;var y=a.fb("ButtonBorder");return y instanceof fr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ei(0,0,2,3),y.spot2=new Ei(1,1,-2,-2)),a}),oh("PanelExpanderButton",function(a){var y=Wf(a,"COLLAPSIBLE"),x=mu("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},mu(fr,{name:"ButtonIcon",strokeWidth:2},new zs("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof fr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),oh("CheckBoxButton",function(a){var y=Wf(a);return a=mu("Button",{desiredSize:new ln(14,14)},mu(fr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:Ai,visible:!1},y!==""?new zs("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof vn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),oh("CheckBox",function(a){a=Wf(a),a=mu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new nr(0,1,0,0)});var y=mu(vn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new nr(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}),we.None=pn=new Te(we,"None",0),we.Default=Yi=new Te(we,"Default",0),we.Vertical=Di=new Te(we,"Vertical",4),we.Horizontal=vi=new Te(we,"Horizontal",5),we.Fill=yn=new Te(we,"Fill",3),we.Uniform=Ai=new Te(we,"Uniform",1),we.UniformToFill=Fr=new Te(we,"UniformToFill",2),we.FlipVertical=mr=new Te(we,"FlipVertical",1),we.FlipHorizontal=Hr=new Te(we,"FlipHorizontal",2),we.FlipBoth=vo=new Te(we,"FlipBoth",3),we.make=mu,we.getBuilders=function(){var a=new hi,y;for(y in yf)if(y!==y.toLowerCase()){var x=yf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},we.defineBuilder=oh,we.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=yf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof we))return y&&E.set(y),E;Ge('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},we.takeBuilderArgument=Wf;function $c(){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=cr,this.o=Zs,this.hg=Yi,this.ob=this.Bi=1,this.Pf=pn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}$c.prototype.copy=function(){var a=new $c;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 Ec(){this.u=-1/0,this.o=0,this.F=An,this.rr=Hl,this.j=this.V="None"}Ec.prototype.copy=function(){var a=new Ec;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},Ec.className="LinkElementSettings";function Zf(){this.yj=this.Xi=Es,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Zf.prototype.copy=function(){var a=new Zf;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},Zf.className="LinkSettings";function td(){this.ha=[1,0,0,1,0,0]}td.prototype.copy=function(){var a=new td;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},td.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},td.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},td.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},td.className="STransform";function ec(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ec.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ec.className="SGradient";function tl(a,y,x){this.ownerDocument=a=y===void 0?ee.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 Ql(this,x)}tl.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},tl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ln(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},tl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},tl.prototype.focus=function(){this.Oa.focus()},tl.prototype.mx=function(){this.ownerDocument=null},un.Object.defineProperties(tl.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}}}),tl.className="SVGSurface";function Ql(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 td,this.j=Bg(this),this.Nj=Bg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=rs++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yf(a,y,x,E,b,z,tt){a.Nj===void 0?Jf(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Mt=Ql.prototype,Mt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,lt=ot-1e-6,At=x*Math.cos(E),ft=x*Math.sin(E),yt=a+At,Et=y+ft,Tt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-yt)||1e-6<Math.abs(rt-Et))&&this.path.push(["L",yt,+Et]),0>E&&(E=E%ot+ot),E>lt?(this.path.push(["A",x,x,0,1,Tt,a-At,y-ft]),this.path.push(["A",x,x,0,1,Tt,yt,Et])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Tt,a+x*Math.cos(b),y+x*Math.sin(b)])},Mt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Mt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Mt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Mt.clearRect=function(){},Mt.clip=function(){this.Yl.clipPath=!0},Mt.closePath=function(){this.path.push(["z"])},Mt.createLinearGradient=function(a,y,x,E){var b=new ec("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Mt.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 E="PATTERN"+rs++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(SA,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Mt.createRadialGradient=function(a,y,x,E,b,z){var tt=new ec("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function $p(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Mt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var At=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=At,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,$p(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:At||E,height:a||b,href:lt},Pe.$(E,rt)&&Pe.$(b,ot)?lt.toLowerCase().indexOf(".svg")===-1&&lt.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==At||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ed(this,SA,z,this.rb),this.addElement(SA,z)},Mt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),nd(this,this.Yl)},Mt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Mt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},ed(this,"fill",a,this.rb),this.addElement("rect",a)},Mt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ed(this,"fill",a,this.rb),nd(this,a),this.svg.prepend(this.Ud("rect",a))},Mt.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},ed(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Mt.lineTo=function(a,y){this.path.push(["L",a,y])},Mt.moveTo=function(a,y){this.path.push(["M",a,y])},Mt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Mt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Mt.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},Mt.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())},Mt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Jf(this,a,y,x,E,b,z)};function t0(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Mt.scale=function(a,y){this.rb.scale(a,y)},Mt.translate=function(a,y){this.rb.translate(a,y)},Mt.transform=function(){},Mt.yc=function(){},Mt.stroke=function(){e0(this,this.Yl)},Mt.jk=function(){this.clipInsteadOfFill||this.stroke()},Mt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Mt.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 ed(a,y,x,E){y==="fill"?nd(a,x):y==="stroke"&&e0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function nd(a,y){a.fillStyle instanceof ec?y.fill=id(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 Xf(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof ec?y.setAttributeNS(null,"fill",id(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 e0(a,y){if(a.strokeStyle instanceof ec)y.stroke=id(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 id(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+rs++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,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:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(lt,At){return lt.offset>At.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Mt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=pe(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,ed(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Jf(a,y,x,E,b,z,tt){var rt=new td;rt.ha=[y,x,E,b,z,tt],y={},ed(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function Bg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function OA(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Nh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Mt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Mt.fs=function(){this.Ct=!1},Mt.Vc=function(){},Mt.Wx=function(){},Ql.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ql.prototype.getImageData=function(){return null},Ql.prototype.measureText=function(){return null};function qf(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()))}Ql.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ql.className="SVGContext",Ue.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new tl(this,ee.document));var y=new tl(this,ee.document,!0);a===void 0&&(a=new yi);var x=this;return Qd(this,function(E,b){return E=Sg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Ue.prototype.makeSvg=Ue.prototype.Cs,Ue.prototype.av=function(a){return this.Cs(a)},Ue.prototype.makeSVG=Ue.prototype.av;function zu(a,y,x,E){this.ownerDocument=y=y===void 0?ee.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new rd(y,x,E),y.H=a}zu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},zu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},zu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},zu.prototype.focus=function(){this.Oa.focus()},zu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},un.Object.defineProperties(zu.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}}}),zu.className="CanvasSurface";function rd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Ge("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 vr,this.isTemporary=!!x}Mt=rd.prototype,Mt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Mt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Mt.beginPath=function(){this.Z.beginPath()},Mt.Se=function(){},Mt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Mt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Mt.clip=function(){this.Z.clip()},Mt.closePath=function(){this.Z.closePath()},Mt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Mt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Mt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Mt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Mt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Mt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Mt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Mt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Mt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Mt.lineTo=function(a,y){this.Z.lineTo(a,y)},Mt.measureText=function(a){return this.Z.measureText(a)},Mt.moveTo=function(a,y){this.Z.moveTo(a,y)},Mt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Mt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Mt.restore=function(){this.Z.restore()},Mt.save=function(){this.yc(),this.Z.save()},rd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Mt=rd.prototype,Mt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Mt.scale=function(a,y){this.El.scale(a,y)},Mt.translate=function(a,y){this.El.translate(a,y)},Mt.stroke=function(){this.Z.stroke()},Mt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Mt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Mt.ng=function(a,y){if(a instanceof fo&&a.type===wr){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)},Mt.jk=function(){this.Hm||this.stroke()},Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Mt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Mt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},Mt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Mt.Hs=function(){},un.Object.defineProperties(rd.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 Tm=Object.freeze([]);rd.className="CanvasSurfaceContext";function $f(){this.F=this.o=this.u=this.j=0}$f.className="ColorNumbers";function fo(a,y){Pi||(Ct(),Pi=!0),or(this),this._isFrozen=!1,a===void 0?(this.na=Dr,this.xk="black"):typeof a=="string"?(this.na=Dr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===lr?(this.Qd=uu,this.Lk=$r):this.Lk=a===wr?this.Qd=Zr:this.Qd=Aa,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}fo.prototype.copy=function(){var a=new fo;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},Mt=fo.prototype,Mt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Mt.ka=function(){return Object.isFrozen(this)&&Ge("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Mt.qb=function(a){a.classType===fo&&(this.type=a)},Mt.toString=function(){var a="Brush(";if(this.type===Dr)a+=this.color;else if(a=this.type===lr?a+"Linear ":this.type===wr?a+"Radial ":this.type===es?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+")"},Mt.addColorStop=function(a,y){return this._isFrozen&&Si(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Zi(a,"0 <= loc <= 1",fo,"addColorStop:loc"),this.we===null&&(this.we=new hi),this.we.add(a,y),this.na===Dr&&(this.type=lr),this.xe=null,this},Mt.Vz=function(a,y){if(this._isFrozen&&Si(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ao:y,this.type===Dr)Dh(this.color),this.color=Sf(a,y);else if((this.type===lr||this.type===wr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Dh(x.value),this.addColorStop(x.key,Sf(a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ao:x,Dh(a),Sf(y,x)}Mt.Wy=function(a,y){if(this._isFrozen&&Si(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ao:y,this.type===Dr)Dh(this.color),this.color=Sf(-a,y);else if((this.type===lr||this.type===wr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Dh(x.value),this.addColorStop(x.key,Sf(-a,y));return this};function i0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ao:x,Dh(a),Sf(-y,x)}function np(a,y,x){Dh(a),a=Ne.j;var E=Ne.u,b=Ne.o,z=Ne.F;return Dh(y),x===void 0&&(x=.5),"rgba("+Math.round((Ne.j-a)*x+a)+", "+Math.round((Ne.u-E)*x+E)+", "+Math.round((Ne.o-b)*x+b)+", "+Math.round((Ne.F-z)*x+z)+")"}Mt.Gx=function(){if(this.type===Dr)return wf(this.color);if((this.type===lr||this.type===wr)&&this.colorStops!==null){var a=this.colorStops;if(this.type===wr)return wf(a.first().value);if(a.get(.5)!==null)return wf(a.get(.5));if(a.count===2)return a=a.Fa(),wf(np(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,wf(np(a.get(x),a.get(E),1-z/b))}return!1};function wf(a){return a?a instanceof fo?a.Gx():(Dh(a),128>(299*Ne.j+587*Ne.u+114*Ne.o)/1e3):!1}function Sf(a,y){switch(y){case ao:y=100*rp(Ne.j);var x=100*rp(Ne.u),E=100*rp(Ne.o);return bn.j=.4124564*y+.3575761*x+.1804375*E,bn.u=.2126729*y+.7151522*x+.072175*E,bn.o=.0193339*y+.119192*x+.9503041*E,bn.F=Ne.F,y=Bt(bn.j/Le[0]),x=Bt(bn.u/Le[1]),E=Bt(bn.o/Le[2]),$n.j=116*x-16,$n.u=500*(y-x),$n.o=200*(x-E),$n.F=bn.F,$n.j=Math.min(100,Math.max(0,$n.j+100*a)),a=($n.j+16)/116,y=a-$n.o/200,bn.j=Le[0]*wt($n.u/500+a),bn.u=Le[1]*($n.j>ae*Kt?Math.pow(a,3):$n.j/ae),bn.o=Le[2]*wt(y),bn.F=$n.F,a=-.969266*bn.j+1.8760108*bn.u+.041556*bn.o,y=.0556434*bn.j+-.2040259*bn.u+1.0572252*bn.o,Ne.j=255*op((3.2404542*bn.j+-1.5371385*bn.u+-.4985314*bn.o)/100),Ne.u=255*op(a/100),Ne.o=255*op(y/100),Ne.F=bn.F,Ne.j=Math.round(Ne.j),255<Ne.j?Ne.j=255:0>Ne.j&&(Ne.j=0),Ne.u=Math.round(Ne.u),255<Ne.u?Ne.u=255:0>Ne.u&&(Ne.u=0),Ne.o=Math.round(Ne.o),255<Ne.o?Ne.o=255:0>Ne.o&&(Ne.o=0),"rgba("+Ne.j+", "+Ne.u+", "+Ne.o+", "+Ne.F+")";case uo:return ip(),wn.o=Math.min(100,Math.max(0,wn.o+100*a)),"hsla("+wn.j+", "+wn.u+"%, "+wn.o+"%, "+wn.F+")";default:Ge("Unknown color space: "+y)}}function Dh(a){Pi||(Ct(),Pi=!0);var y=Ye;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,Ne.j=a[0],Ne.u=a[1],Ne.o=a[2],Ne.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ne.j=0,Ne.u=0,Ne.o=0,Ne.F=1)}}function ip(){var a=Ne.j/255,y=Ne.u/255,x=Ne.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}wn.j=Math.round(tt),wn.u=Math.round(100*a),wn.o=Math.round(100*b),wn.F=Ne.F}function rp(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Bt(a){return a>Kt?Math.pow(a,1/3):(ae*a+16)/116}function wt(a){var y=a*a*a;return y>Kt?y:(116*a-16)/ae}function Ft(a,y){typeof a!="string"&&(a instanceof fo||Ge("Value for "+y+" must be a color string or a Brush, not "+a))}function Ct(){Ye=ds?new zu(null,void 0,{willReadFrequently:!0}).context:null}un.Object.defineProperties(fo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Si(this,a),this.na=a,this.start.Mc()&&(a===lr?this.start=uu:a===wr&&(this.start=Zr)),this.end.Mc()&&(a===lr?this.end=$r:a===wr&&(this.end=Zr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Si(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Si(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Si(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Si(this,a),0>a&&Zi(a,">= zero",fo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Si(this,a),0>a&&Zi(a,">= zero",fo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Si(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Si(this,a),this.cr=a,this.xe=null}}}),fo.prototype.isDark=fo.prototype.Gx,fo.prototype.darkenBy=fo.prototype.Wy,fo.prototype.lightenBy=fo.prototype.Vz,fo.prototype.addColorStop=fo.prototype.addColorStop;var Kt=216/24389,ae=24389/27,Le=[95.047,100,108.883],Ye=null,Ne=new $f,wn=new $f,bn=new $f,$n=new $f,Pi=!1;fo.className="Brush";var Dr;fo.Solid=Dr=new Te(fo,"Solid",0);var lr;fo.Linear=lr=new Te(fo,"Linear",1);var wr;fo.Radial=wr=new Te(fo,"Radial",2);var es;fo.Pattern=es=new Te(fo,"Pattern",4);var ao;fo.Lab=ao=new Te(fo,"Lab",5);var uo;fo.HSL=uo=new Te(fo,"HSL",6),fo.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 E=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>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},fo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Pi||(Ct(),Pi=!0);var y=Ye;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)},fo.lighten=function(a){return n0(a)},fo.lightenBy=n0,fo.darken=function(a){return i0(a)},fo.darkenBy=i0,fo.mix=np,fo.isDark=wf;function po(){this.xa="Base"}po.prototype.measure=function(){},po.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},po.prototype.arrange=function(){},po.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},po.prototype.iA=function(a){a.Uj()},po.prototype.gc=function(){},un.Object.defineProperties(po.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return vn}}}),po.prototype.remeasureObject=po.prototype.iA,po.prototype.arrangeElement=po.prototype.Ly,po.prototype.measureElement=po.prototype.Yz,po.className="PanelLayout";function gs(){this.xa="Base"}be(gs,po),gs.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=nu(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===a){var At=lt.margin,ft=At.right+At.left;At=At.top+At.bottom,lt.measure(y,x,z,tt);var yt=lt.measuredBounds;ft=Math.max(yt.width+ft,0),At=Math.max(yt.height+At,0),yt=lt.position.x;var Et=lt.position.y;isFinite(yt)||(yt=0),isFinite(Et)||(Et=0),lt instanceof fr&&lt.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Et-=lt),us(b,yt,Et,ft,At)}}},gs.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,lt=z.position.y;if(ot=isNaN(ot)?-a:ot-a,lt=isNaN(lt)?-x:lt-x,z instanceof fr&&z.isGeometryPositioned){var At=z.strokeWidth/2;ot-=At,lt-=At}z.visible&&z.arrange(ot+rt.left,lt+rt.top,tt.width,tt.height)}};function _o(){this.xa="Base"}be(_o,po),_o.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=ve(),z=nu(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===z){var At=Cl(lt,!1);if(At!==pn&&At!==vi)y.push(lt);else{lt.measure(1/0,x,0,tt),At=lt.margin,lt=lt.measuredBounds;var ft=Math.max(lt.height+At.top+At.bottom,0);b.width+=Math.max(lt.width+At.right+At.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(At=ot.margin,rt=At.right+At.left,At=At.top+At.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,At=Math.max(ot.height+At,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,At));Ee(y)},_o.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var lt=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,yt=At.margin,Et=yt.top+yt.bottom,Tt=z+b.bottom,It=ft.height,qt=Cl(At,!1);(isNaN(At.desiredSize.height)&&qt===yn||qt===Di)&&(It=Math.max(x.height-Et-Tt,0)),Et=It+Et+Tt,Tt=At.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=Zr),tt&&(rt-=ft.width+yt.left+yt.right),At.arrange(rt+Tt.offsetX+yt.left,lt+Tt.offsetY+yt.top+(x.height*Tt.y-Et*Tt.y),ft.width,It),tt||(rt+=ft.width+yt.left+yt.right)}}};function zr(){this.xa="Base"}be(zr,po),zr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=ve();for(var rt=nu(a),ot=0;ot<tt;ot++){var lt=E[ot];if(lt.visible||lt===rt){var At=Cl(lt,!1);if(At!==pn&&At!==Di)x.push(lt);else{var ft=lt.margin;At=ft.right+ft.left,ft=ft.top+ft.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,il(b,Math.max(b.width,Math.max(lt.width+At,0)),b.height+Math.max(lt.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(lt=ot.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,lt=Math.max(ot.height+lt,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=lt);Ee(x)}},zr.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var lt=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,yt=At.margin,Et=yt.left+yt.right,Tt=z+b.right,It=ft.width,qt=Cl(At,!1);(isNaN(At.desiredSize.width)&&qt===yn||qt===vi)&&(It=Math.max(x.width-Et-Tt,0)),Et=It+Et+Tt,Tt=At.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=Zr),tt&&(rt-=ft.height+yt.bottom+yt.top),At.arrange(lt+Tt.offsetX+yt.left+(x.width*Tt.x-Et*Tt.x),rt+Tt.offsetY+yt.top,It,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function Ts(){this.xa="Base"}be(Ts,po),Ts.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,At=lt.right+lt.left,ft=lt.top+lt.bottom;ot.measure(y,x,z,tt);var yt=ot.measuredBounds;z=yt.width,tt=yt.height;var Et=Math.max(z+At,0),Tt=Math.max(tt+ft,0),It=a.isClipping,qt=nn.allocAt(-lt.left,-lt.top,Et,Tt),Gt=nn.allocAt(0,0,z,tt);Is(ot,Gt,!0),z=Gt.width,tt=Gt.height;for(var oe=!0,le=nu(a),ue=0;ue<rt;ue++){var ye=E[ue];yt=y;var Oe=x;if(ye!==ot&&(ye.visible||ye===le)){lt=ye.margin;var Vn=lt.left,ai=lt.top;switch(Et=lt.right+lt.left,Tt=lt.top+lt.bottom,lt=Cl(ye,!1),lt){case yn:yt=z,Oe=tt,ai=Vn=Tt=Et=0;break;case vi:yt=z,Vn=Et=0;break;case Di:Oe=tt,ai=Tt=0}ye.measure(yt,Oe,0,0),yt=ye.measuredBounds,Et=Math.max(yt.width+Et,0),Tt=Math.max(yt.height+Tt,0),lt=ye.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=Zr);var ii=ye.alignmentFocus;if(ii.Xb()&&(ii=Zr),Oe=null,ye instanceof vn&&ye.$e!==""&&(Oe=ye.fb(ye.$e),Oe===ye&&(Oe=null)),Vn=Gt.x-Vn,ai=Gt.y-ai,Oe!==null){for(ye.arrange(0,0,yt.width,yt.height),yt=Oe.actualBounds,yt=Xt.allocAt(yt.x+(ii.x*yt.width-ii.offsetX),yt.y+(ii.y*yt.height-ii.offsetY)),Oe=Oe.panel;Oe!==ye;)Oe.transform.Ga(yt),Oe=Oe.panel;Vn+=lt.x*z+lt.offsetX-yt.x,ai+=lt.y*tt+lt.offsetY-yt.y,Xt.free(yt)}else Vn+=lt.x*z+lt.offsetX-(ii.x*yt.width+ii.offsetX),ai+=lt.y*tt+lt.offsetY-(ii.y*yt.height+ii.offsetY);oe?(oe=!1,b.h(Vn,ai,Et,Tt)):us(b,Vn,ai,Et,Tt)}}switch(oe?b.assign(qt):It?b.Uu(Gt.x,Gt.y,Gt.width,Gt.height):us(b,qt.x,qt.y,qt.width,qt.height),nn.free(qt),nn.free(Gt),lt=ot.stretch,lt===Yi&&(lt=Cl(ot,!1)),lt){case pn:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case vi:if(!isFinite(y))return;break;case Di:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Et=Math.max(z+At,0),Tt=Math.max(tt+ft,0),lt=ot.margin,Gt=nn.allocAt(-lt.left,-lt.top,Et,Tt),Is(ot,Gt,!0),z=Gt.width,tt=Gt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==le||(lt=x.margin,Et=lt.right+lt.left,Tt=lt.top+lt.bottom,yt=x.measuredBounds,Et=Math.max(yt.width+Et,0),Tt=Math.max(yt.height+Tt,0),At=x.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Zr),x=x.alignmentFocus,x.Xb()&&(x=Zr),oe?(oe=!1,b.h(At.x*z+At.offsetX-(x.x*yt.width+x.offsetX)-lt.left,At.y*tt+At.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Et,Tt)):us(b,At.x*z+At.offsetX-(x.x*yt.width+x.offsetX)-lt.left,At.y*tt+At.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Et,Tt));oe?b.assign(qt):It?b.Uu(Gt.x,Gt.y,Gt.width,Gt.height):us(b,qt.x,qt.y,qt.width,qt.height),nn.free(Gt)},Ts.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var lt=z-x.x,At=ot-x.y;for(b.arrange(lt,At,tt,rt),tt=nn.allocAt(0,0,tt,rt),Is(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){lt=ft.measuredBounds;var yt=lt.width,Et=lt.height;At=ft.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Zr);var Tt=ft.alignmentFocus;if(Tt.Xb()&&(Tt=Zr),lt=null,ft instanceof vn&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var It=lt.actualBounds;for(Tt=Xt.allocAt(It.x+(Tt.x*It.width-Tt.offsetX),It.y+(Tt.y*It.height-Tt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(Tt),lt=lt.panel;lt=At.x*tt.width+At.offsetX-Tt.x,At=At.y*tt.height+At.offsetY-Tt.y,Xt.free(Tt)}else lt=At.x*tt.width+At.offsetX-(Tt.x*yt+Tt.offsetX),At=At.y*tt.height+At.offsetY-(Tt.y*Et+Tt.offsetY);lt+=tt.x-x.x,At+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+At,yt,Et)}}nn.free(tt)};function Is(a,y,x){var E=null;if(a instanceof vn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Vo(){this.xa="Base"}be(Vo,po),Vo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,At=y,ft=x,yt=lt.right+lt.left,Et=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var Tt=0,It=null;ot instanceof fr&&(It=ot,Tt=It.strokeWidth*It.scale);var qt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Et,0);var Gt=Dm(ot),oe=Gt.x*qt+Gt.offsetX;Gt=Gt.y*lt+Gt.offsetY;var le=Im(ot),ue=le.x*qt+le.offsetX;for(le=le.y*lt+le.offsetY,isFinite(y)&&(At=Math.max(Math.abs(oe-ue)-Tt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Gt-le)-Tt,0)),Tt=ln.alloc(),Tt.h(0,0),a=nu(a),le=0;le<rt;le++)Gt=E[le],Gt===ot||!Gt.visible&&Gt!==a||(lt=Gt.margin,qt=lt.right+lt.left,oe=lt.top+lt.bottom,Gt.measure(At,ft,0,0),lt=Gt.measuredBounds,qt=Math.max(lt.width+qt,0),lt=Math.max(lt.height+oe,0),Tt.h(Math.max(qt,Tt.width),Math.max(lt,Tt.height)));if(rt===1)b.width=qt,b.height=lt,ln.free(Tt);else{switch(Gt=Dm(ot),le=Im(ot),rt=E=0,le.x!==Gt.x&&le.y!==Gt.y&&(E=Tt.width/Math.abs(le.x-Gt.x),rt=Tt.height/Math.abs(le.y-Gt.y)),ln.free(Tt),Tt=0,It!==null&&(Tt=It.strokeWidth*It.scale,_m(It)===Ai&&(E=rt=Math.max(E,rt))),E+=Math.abs(Gt.offsetX)+Math.abs(le.offsetX)+Tt,rt+=Math.abs(Gt.offsetY)+Math.abs(le.offsetY)+Tt,It=ot.stretch,It===Yi&&(It=Cl(ot,!1)),It){case pn:tt=z=0;break;case yn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case vi:isFinite(y)&&(E=y),tt=0;break;case Di:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+yt,b.height=ot.measuredBounds.height+Et}},Vo.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=nn.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,lt=ot.left;ot=ot.top,E.arrange(lt+rt,ot+tt,b.width,b.height);var At=Dm(E),ft=Im(E),yt=At.y*b.height+At.offsetY,Et=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=At.x*b.width+At.offsetX,z.y=yt,us(z,Et,ft,0,0),z.x+=rt+lt,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(lt=rt.measuredBounds,tt=rt.margin,ot=Math.max(lt.width+tt.right+tt.left,0),At=Math.max(lt.height+tt.top+tt.bottom,0),yt=rt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Zr),ot=z.width*yt.x+yt.offsetX-ot*yt.x+tt.left+z.x,tt=z.height*yt.y+yt.offsetY-At*yt.y+tt.top+z.y,rt.visible&&(Ys(z.x,z.y,z.width,z.height,ot,tt,lt.width,lt.height)?rt.arrange(ot,tt,lt.width,lt.height):rt.arrange(ot,tt,lt.width,lt.height,new nn(z.x,z.y,z.width,z.height))));nn.free(z)};function Al(){this.xa="Base",this.name="Table"}be(Al,po),Al.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=ve(),rt=ve(),ot=0;ot<z;ot++){var lt=E[ot],At=lt instanceof vn?lt:null;if(At!==null&&sd(At)&&lt.visible){rt.push(At);for(var ft=At.O.s,yt=ft.length,Et=0;Et<yt;Et++){var Tt=ft[Et];At.type===vn.TableRow?Tt.row=lt.row:At.type===vn.TableColumn&&(Tt.column=lt.column),tt.push(Tt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var It=[],qt=0;qt<z;qt++){var Gt=tt[qt];Gt.visible&&(js(Gt,!0),rh(Gt,!0),It[Gt.row]||(It[Gt.row]=[]),It[Gt.row][Gt.column]||(It[Gt.row][Gt.column]=[]),It[Gt.row][Gt.column].push(Gt))}Ee(tt);var oe=ve(),le=ve(),ue=ve(),ye={count:0},Oe={count:0},Vn=y,ai=x,ii=a.rowDefs,Tn=a.colDefs,fn=null;z=ii.length;for(var tr=0;tr<z;tr++)fn=ii[tr],fn!==void 0&&(fn.actual=0);z=Tn.length;for(var Ki=0;Ki<z;Ki++)fn=Tn[Ki],fn!==void 0&&(fn.actual=0);for(var io=It.length,bo=0,Fa=0;Fa<io;Fa++)It[Fa]&&(bo=Math.max(bo,It[Fa].length));var Ta=Math.min(a.topIndex,io-1),Fl=Math.min(a.leftIndex,bo-1),Ea=0;io=It.length;for(var pd=nu(a),Vs=0;Vs<io;Vs++)if(It[Vs]){bo=It[Vs].length;var Ah=a.Fb(Vs);Ah.actual=0;for(var El=Ah.oc=0;El<bo;El++)if(It[Vs][El]){var md=a.Eb(El);oe[El]===void 0&&(md.actual=0,md.oc=0,oe[El]=!0);for(var Yu=It[Vs][El],PA=Yu.length,Tu=0;Tu<PA;Tu++){var yu=Yu[Tu];if(yu.visible||yu===pd){var qd=1<yu.rowSpan||1<yu.columnSpan;qd&&(Vs<Ta||El<Fl||le.push(yu));var hh=yu.margin,Vg=hh.right+hh.left,Nu=hh.top+hh.bottom,Ll=fs(yu,Ah,md,!1),jp=yu.desiredSize,hg=!isNaN(jp.height),Hh=!isNaN(jp.width)&&hg;if(qd||Ll===pn||Hh||Vs<Ta||El<Fl||(ye[El]!==void 0||Ll!==yn&&Ll!==vi||(ye[El]=-1,ye.count++),Oe[Vs]!==void 0||Ll!==yn&&Ll!==Di||(Oe[Vs]=-1,Oe.count++),ue.push(yu)),yu.measure(1/0,1/0,0,0),!(Vs<Ta||El<Fl)){var wu=yu.measuredBounds,kf=Math.max(wu.width+Vg,0),Du=Math.max(wu.height+Nu,0);if(yu.rowSpan===1&&(Ll===pn||Ll===vi)){fn=a.Fb(Vs);var $d=fn.Wc();Ea=Math.max(Du-fn.actual,0),Ea+$d>ai&&(Ea=Math.max(ai-$d,0));var wm=fn.oa===0;fn.oc=fn.oc+Ea,fn.actual=fn.oa+Ea,ai=Math.max(ai-(Ea+(wm?$d:0)),0)}if(yu.columnSpan===1&&(Ll===pn||Ll===Di)){fn=a.Eb(El);var zp=fn.Wc();Ea=Math.max(kf-fn.actual,0),Ea+zp>Vn&&(Ea=Math.max(Vn-zp,0));var iy=fn.oa===0;fn.oc=fn.oc+Ea,fn.actual=fn.oa+Ea,Vn=Math.max(Vn-(Ea+(iy?zp:0)),0)}qd&&yu.Uj()}}}}}Ee(oe);var dc=0,bc=0;z=a.columnCount;for(var cg=0;cg<z;cg++){var tf=Tn[cg];tf!==void 0&&(dc+=isNaN(tf.Hc)?tf.oc:tf.Hc,tf.oc!==0&&(dc+=tf.Wc()))}z=a.rowCount;for(var Wg=0;Wg<z;Wg++){var ef=ii[Wg];ef!==void 0&&(bc+=isNaN(ef.Hc)?ef.oc:ef.Hc,ef.oc!==0&&(bc+=ef.Wc()))}Vn=Math.max(y-dc,0);var fc=ai=Math.max(x-bc,0),vd=Vn;z=ue.length;for(var Su=0;Su<z;Su++){var Rh=ue[Su],Sm=a.Fb(Rh.row),Tc=a.Eb(Rh.column),Zg=Rh.measuredBounds,ch=Rh.margin,bf=ch.right+ch.left,_h=ch.top+ch.bottom;ye[Rh.column]=Tc.oc===0&&ye[Rh.column]!==void 0?Math.max(Zg.width+bf,ye[Rh.column]):null,Oe[Rh.row]=Sm.oc===0&&Oe[Rh.row]!==void 0?Math.max(Zg.height+_h,Oe[Rh.row]):null}var dg=0,Yg=0,VA;for(VA in Oe)VA!=="count"&&(dg+=Oe[VA]);for(VA in ye)VA!=="count"&&(Yg+=ye[VA]);for(var Ra=ln.alloc(),Vp=0;Vp<z;Vp++){var jl=ue[Vp];if(jl.visible||jl===pd){var Ws=a.Fb(jl.row),zl=a.Eb(jl.column),Nc=0;isFinite(zl.width)?Nc=zl.width:(isFinite(Vn)&&ye[jl.column]!==null?Yg===0?Nc=zl.actual+Vn:Nc=ye[jl.column]/Yg*vd:ye[jl.column]!==null?Nc=Vn:Nc=zl.actual||Vn,Nc=Math.max(0,Nc-zl.Wc()));var yd=0;switch(isFinite(Ws.height)?yd=Ws.height:(isFinite(ai)&&Oe[jl.row]!==null?dg===0?yd=Ws.actual+ai:yd=Oe[jl.row]/dg*fc:Oe[jl.row]!==null?yd=ai:yd=Ws.actual||ai,yd=Math.max(0,yd-Ws.Wc())),Ra.h(Math.max(zl.minimum,Math.min(Nc,zl.maximum)),Math.max(Ws.minimum,Math.min(yd,Ws.maximum))),Ll=fs(jl,Ws,zl,!1),Ll){case vi:Ra.height=Math.max(Ra.height,Ws.actual+ai);break;case Di:Ra.width=Math.max(Ra.width,zl.actual+Vn)}var Tf=jl.margin,ry=Tf.right+Tf.left,xm=Tf.top+Tf.bottom;jl.Uj(),jl.measure(Ra.width,Ra.height,zl.minimum,Ws.minimum);var Xg=jl.measuredBounds,Nf=Math.max(Xg.width+ry,0),fg=Math.max(Xg.height+xm,0);isFinite(Vn)&&(Nf=Math.min(Nf,Ra.width)),isFinite(ai)&&(fg=Math.min(fg,Ra.height));var xu=0;xu=Ws.actual,Ws.actual=Math.max(Ws.actual,fg),Ws.oc=Math.max(Ws.oc,fg),Ea=Ws.actual-xu,ai=Math.max(ai-Ea,0),Oe[jl.row]===null&&(fc=Math.max(fc-Ea,0)),xu=zl.actual,zl.actual=Math.max(zl.actual,Nf),zl.oc=Math.max(zl.oc,Nf),Ea=zl.actual-xu,Vn=Math.max(Vn-Ea,0),ye[jl.column]===null&&(vd=Math.max(vd-Ea,0))}}Ee(ue);var Dc=ln.alloc(),dh=ve(),hA=ve();if(z=le.length,z!==0){for(var nf=0;nf<io;nf++)if(It[nf]){bo=It[nf].length;var Jg=a.Fb(nf);dh[nf]=Jg.actual;for(var rf=0;rf<bo;rf++)if(It[nf][rf]){var Bm=a.Eb(rf);hA[rf]=Bm.actual}}}for(var qg=0;qg<z;qg++){var Ns=le[qg];if(Ns.visible||Ns===pd){var WA=a.Fb(Ns.row),FA=a.Eb(Ns.column);switch(Ra.h(Math.max(FA.minimum,Math.min(y,FA.maximum)),Math.max(WA.minimum,Math.min(x,WA.maximum))),Ll=fs(Ns,WA,FA,!1),Ll){case yn:hA[FA.index]!==0&&(Ra.width=Math.min(Ra.width,hA[FA.index])),dh[WA.index]!==0&&(Ra.height=Math.min(Ra.height,dh[WA.index]));break;case vi:hA[FA.index]!==0&&(Ra.width=Math.min(Ra.width,hA[FA.index]));break;case Di:dh[WA.index]!==0&&(Ra.height=Math.min(Ra.height,dh[WA.index]))}isFinite(FA.width)&&(Ra.width=FA.width),isFinite(WA.height)&&(Ra.height=WA.height),Dc.h(0,0);for(var Cm=FA.minimum,Iu=WA.minimum,wd=1;wd<Ns.rowSpan&&!(Ns.row+wd>=a.rowCount);wd++)fn=a.Fb(Ns.row+wd),Ea=0,Ea=Ll===yn||Ll===Di?Math.max(fn.minimum,dh[Ns.row+wd]===0?fn.maximum:Math.min(dh[Ns.row+wd],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),Dc.height+=Ea,Iu+=fn.minimum;for(var EA=1;EA<Ns.columnSpan&&!(Ns.column+EA>=a.columnCount);EA++)fn=a.Eb(Ns.column+EA),Ea=0,Ea=Ll===yn||Ll===vi?Math.max(fn.minimum,hA[Ns.column+EA]===0?fn.maximum:Math.min(hA[Ns.column+EA],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),Dc.width+=Ea,Cm+=fn.minimum;Ra.width+=Dc.width,Ra.height+=Dc.height;var $g=Ns.margin,of=$g.right+$g.left,Wp=$g.top+$g.bottom;Ns.measure(Ra.width,Ra.height,Cm,Iu);for(var tp=Ns.measuredBounds,Kh=Math.max(tp.width+of,0),Df=Math.max(tp.height+Wp,0),sf=0,ep=0;ep<Ns.rowSpan&&!(Ns.row+ep>=a.rowCount);ep++)fn=a.Fb(Ns.row+ep),sf+=fn.total||0;if(sf<Df){var Sd=Df-sf,gc=Df-sf;if(Ns.spanAllocation!==null)for(var xd=Ns.spanAllocation,Ic=0;Ic<Ns.rowSpan&&!(0>=Sd)&&!(Ns.row+Ic>=a.rowCount);Ic++){fn=a.Fb(Ns.row+Ic);var Bd=fn.oa||0,If=xd(Ns,fn,gc);fn.actual=Math.min(fn.maximum,Bd+If),fn.oa!==Bd&&(Sd-=fn.oa-Bd)}for(;0<Sd;){var fh=fn.oa||0;if(isNaN(fn.height)&&fn.maximum>fh&&(fn.actual=Math.min(fn.maximum,fh+Sd),fn.oa!==fh&&(Sd-=fn.oa-fh)),fn.index===0)break;fn=a.Fb(fn.index-1)}}for(var gg=0,Cd=0;Cd<Ns.columnSpan&&!(Ns.column+Cd>=a.columnCount);Cd++)fn=a.Eb(Ns.column+Cd),gg+=fn.total||0;if(gg<Kh){var pg=Kh-gg,oy=Kh-gg;if(Ns.spanAllocation!==null)for(var Uc=Ns.spanAllocation,Uf=0;Uf<Ns.columnSpan&&!(0>=pg)&&!(Ns.column+Uf>=a.columnCount);Uf++){fn=a.Eb(Ns.column+Uf);var Zp=fn.oa||0,sy=Uc(Ns,fn,oy);fn.actual=Math.min(fn.maximum,Zp+sy),fn.oa!==Zp&&(pg-=fn.oa-Zp)}for(;0<pg;){var Pm=fn.oa||0;if(isNaN(fn.width)&&fn.maximum>Pm&&(fn.actual=Math.min(fn.maximum,Pm+pg),fn.oa!==Pm&&(pg-=fn.oa-Pm)),fn.index===0)break;fn=a.Eb(fn.index-1)}}}}Ee(le),ln.free(Dc),ln.free(Ra),dh!==void 0&&Ee(dh),hA!==void 0&&Ee(hA);var mg=0,vg=0,Fm=a.desiredSize,vw=a.maxSize;Ll=Cl(a,!0);var Yp=bc=dc=0,Xp=0;z=a.columnCount;for(var Em=0;Em<z;Em++)Tn[Em]!==void 0&&(fn=a.Eb(Em),isFinite(fn.width)?(Yp+=fn.width,Yp+=fn.Wc()):a0(fn)===ap?(Yp+=fn.oa,Yp+=fn.Wc()):fn.oa!==0&&(dc+=fn.oa,dc+=fn.Wc()));isFinite(Fm.width)?mg=Math.min(Fm.width,vw.width):mg=Ll!==pn&&isFinite(y)?y:dc,mg=Math.max(mg,a.minSize.width),mg=Math.max(mg-Yp,0);for(var rS=dc===0?1:Math.max(mg/dc,1),Lm=0;Lm<z;Lm++)Tn[Lm]!==void 0&&(fn=a.Eb(Lm),isFinite(fn.width)||a0(fn)===ap||(fn.actual=fn.oa*rS),fn.position=b.width,fn.oa!==0&&(b.width+=fn.oa,b.width+=fn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)ii[Mm]!==void 0&&(fn=a.Fb(Mm),isFinite(fn.height)?(Xp+=fn.height,Xp+=fn.Wc()):a0(fn)===ap?(Xp+=fn.oa,Xp+=fn.Wc()):fn.oa!==0&&(bc+=fn.oa,bc+=fn.Wc()));isFinite(Fm.height)?vg=Math.min(Fm.height,vw.height):vg=Ll!==pn&&isFinite(x)?x:bc,vg=Math.max(vg,a.minSize.height),vg=Math.max(vg-Xp,0);for(var oS=bc===0?1:Math.max(vg/bc,1),km=0;km<z;km++)ii[km]!==void 0&&(fn=a.Fb(km),isFinite(fn.height)||a0(fn)===ap||(fn.actual=fn.oa*oS),fn.position=b.height,fn.oa!==0&&(b.height+=fn.oa,b.height+=fn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===vn.TableRow?(ly=b.width,fn=a.Fb(Jp.row),uy=fn.actual):(fn=a.Eb(Jp.column),ly=fn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),js(Jp,!1)}Ee(rt),a.inRowsCols=It},Al.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,lt=tt.length,At=0,ft=0;ft<lt;ft++)tt[ft]&&(At=Math.max(At,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var yt=ft=0,Et=Math.min(a.topIndex,lt-1);if(0<ot.length){for(;Et!==lt&&(ot[Et]===void 0||ot[Et].oa===0);)Et++;Et=Math.max(Math.min(Et,lt-1),0),ft=-ot[Et].position}var Tt=Math.min(a.leftIndex,At-1);if(0<rt.length){for(;Tt!==At&&(rt[Tt]===void 0||rt[Tt].oa===0);)Tt++;Tt=Math.max(Math.min(Tt,At-1),0),yt=-rt[Tt].position}for(var It=0,qt=0;It!==lt&&ot[It]===void 0;)It++;for(;qt!==lt&&rt[qt]===void 0;)qt++;At=a.part,a.Fb(It),a.Eb(qt);for(var Gt=0;Gt<y.length;Gt++){var oe=y[Gt];if(oe instanceof vn&&oe.visible&&sd(oe)){if(oe.type===vn.TableRow){rt=a.Fb(oe.row);var le=a.Eb(qt)}else rt=a.Fb(It),le=a.Eb(oe.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(It,Et))),rt=le.position+yt+z,le.oa!==0&&(rt+=le.Io(Math.max(qt,Tt))),le=oe.measuredBounds,oe.Uk(),oe.actualBounds.ka();var ue=oe.actualBounds,ye=nn.allocAt(ue.x,ue.y,ue.width,ue.height);ue.x=oe.type===vn.TableRow?z:rt,ue.y=oe.type===vn.TableColumn?b:ot,ue.width=le.width,ue.height=le.height,oe.actualBounds.freeze(),rh(oe,!1),Ps(ye,ue)||At===null||(At.oh(),oe.Pn(At)),nn.free(ye)}}for(Gt=ln.alloc(),oe=0;oe<lt;oe++)if(tt[oe]){for(At=tt[oe].length,le=a.Fb(oe),ot=le.position+ft+b,le.oa!==0&&(ot+=le.Io(Math.max(It,Et))),ue=0;ue<At;ue++)if(tt[oe][ue]){ye=a.Eb(ue),rt=ye.position+yt+z,ye.oa!==0&&(rt+=ye.Io(Math.max(qt,Tt)));for(var Oe=tt[oe][ue],Vn=Oe.length,ai=0;ai<Vn;ai++){var ii=Oe[ai],Tn=ii.measuredBounds;Gt.h(0,0);for(var fn=1;fn<ii.rowSpan&&!(oe+fn>=a.rowCount);fn++){var tr=a.Fb(oe+fn);tr.oa!==0&&(Gt.height+=tr.total)}for(fn=1;fn<ii.columnSpan&&!(ue+fn>=a.columnCount);fn++)tr=a.Eb(ue+fn),tr.oa!==0&&(Gt.width+=tr.total);var Ki=ye.oa+Gt.width,io=le.oa+Gt.height;fn=rt,tr=ot;var bo=Ki,Fa=io,Ta=rt,Fl=ot,Ea=Ki,pd=io;rt+Ki>x.width&&(Ea=Math.max(x.width-rt,0)),ot+io>x.height&&(pd=Math.max(x.height-ot,0));var Vs=ii.alignment;if(Vs.Xb()){Vs=a.defaultAlignment,Vs.sb()||(Vs=Zr);var Ah=Vs.x,El=Vs.y,md=Vs.offsetX;Vs=Vs.offsetY;var Yu=ye.alignment,PA=le.alignment;Yu.sb()&&(Ah=Yu.x,md=Yu.offsetX),PA.sb()&&(El=PA.y,Vs=PA.offsetY)}else Ah=Vs.x,El=Vs.y,md=Vs.offsetX,Vs=Vs.offsetY;(isNaN(Ah)||isNaN(El))&&(El=Ah=.5,Vs=md=0),Yu=Tn.width,PA=Tn.height;var Tu=ii.margin,yu=Tu.left+Tu.right,qd=Tu.top+Tu.bottom,hh=fs(ii,le,ye,!1);!isNaN(ii.desiredSize.width)||hh!==yn&&hh!==vi||(Yu=Math.max(Ki-yu,0)),!isNaN(ii.desiredSize.height)||hh!==yn&&hh!==Di||(PA=Math.max(io-qd,0)),Ki=ii.maxSize,io=ii.minSize,Yu=Math.min(Ki.width,Yu),PA=Math.min(Ki.height,PA),Yu=Math.max(io.width,Yu),PA=Math.max(io.height,PA),Ki=PA+qd,fn+=bo*Ah-(Yu+yu)*Ah+md+Tu.left,tr+=Fa*El-Ki*El+Vs+Tu.top,ii.visible&&(Ys(Ta,Fl,Ea,pd,fn,tr,Tn.width,Tn.height)?ii.arrange(fn,tr,Yu,PA):ii.arrange(fn,tr,Yu,PA,new nn(Ta,Fl,Ea,pd)))}}}for(ln.free(Gt),a=0;a<E;a++)x=y[a],z=x instanceof vn?x:null,z!==null&&sd(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Lu(){this.xa="Base"}be(Lu,po),Lu.prototype.measure=function(){},Lu.prototype.arrange=function(){};function Vu(){this.xa="Base"}be(Vu,po),Vu.prototype.measure=function(){},Vu.prototype.arrange=function(){};function fa(){this.xa="Base"}be(fa,po),fa.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&Ge("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,lt=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var At=E.scale,ft=rt.width;rt=rt.height;var yt=Math.max(y-lt,0),Et=Math.max(x-ot,0),Tt=1;a.viewboxStretch===Ai?ft!==0&&rt!==0&&(Tt=Math.min(yt/ft,Et/rt)):ft!==0&&rt!==0&&(Tt=Math.max(yt/ft,Et/rt)),Tt===0&&(Tt=1e-4),E.Ca*=Tt,At!==E.scale&&(js(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+lt,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},fa.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=Zr),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Pl(){this.xa="Base"}be(Pl,po),Pl.prototype.measure=function(){},Pl.prototype.arrange=function(){},Pl.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,lt=Math.ceil(rt/b),At=Math.ceil(ot/E),ft=a.gridOrigin,yt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var Et=[],Tt=a.O.s,It=Tt.length,qt=0;qt<It;qt++){var Gt=Tt[qt],oe=[];if(Et.push(oe),Gt.visible){var le=Gt.interval;if(!(0>le)){Gt=Lc(Gt.figure);for(var ue=0;ue<It;ue++)if(ue!==qt){var ye=Tt[ue];ye.visible&&Lc(ye.figure)===Gt&&(ye=ye.interval,ye>le&&oe.push(ye))}}}}for(Tt=a.O.s,It=Tt.length,qt=0;qt<It;qt++){var Oe=Tt[qt];if(Oe.visible&&(oe=Oe.interval||1,Gt=Math.abs(oe),!(2>b*Gt*x))){if(le=Oe.segmentIndex,(!isFinite(le)||isNaN(le))&&(le=0),0>le&&(le=Gt-Math.min(-le,Gt)),le=Math.round(le%Gt),Gt=Oe.opacity,ue=1,Gt!==1){if(Gt===0)continue;ue=y.globalAlpha,y.globalAlpha=ue*Gt}ye=Et[qt];var Vn=!1,ai=Oe.strokeDashArray;if(ai!==null&&(Vn=!0,y.js(ai,Oe.strokeDashOffset)),Oe.figure==="LineV"&&Oe.stroke!==null&&0<Oe.strokeWidth){for(y.lineWidth=Oe.strokeWidth,ls(a,y,Oe.stroke,!1,!1,z,tt),y.beginPath(),ai=Oe=Math.floor((yt-b)/b);ai<=Oe+lt;ai++){var ii=ai*b+yt;0<=ii&&ii<=rt&&Ih(ai,oe,le,ye)&&(y.moveTo(ii,0),y.lineTo(ii,ot))}y.stroke(),y.Se()}else if(Oe.figure==="LineH"&&Oe.stroke!==null&&0<Oe.strokeWidth){for(y.lineWidth=Oe.strokeWidth,ls(a,y,Oe.stroke,!1,!1,z,tt),y.beginPath(),ai=Oe=Math.floor((ft-E)/E);ai<=Oe+At;ai++)ii=ai*E+ft,0<=ii&&ii<=ot&&Ih(ai,oe,le,ye)&&(y.moveTo(0,ii),y.lineTo(rt,ii));y.stroke(),y.Se()}else if(Oe.figure==="BarV"&&Oe.fill!==null)for(ls(a,y,Oe.fill,!0,!1,z,tt),Oe=Oe.width,isNaN(Oe)&&(Oe=b),ii=ai=Math.floor((yt-b)/b);ii<=ai+lt;ii++){var Tn=ii*b+yt;0<=Tn+Oe&&Tn<=rt&&Ih(ii,oe,le,ye)&&y.fillRect(Tn,0,Oe,ot)}else if(Oe.figure==="BarH"&&Oe.fill!==null)for(ls(a,y,Oe.fill,!0,!1,z,tt),Oe=Oe.height,isNaN(Oe)&&(Oe=E),ii=ai=Math.floor((ft-E)/E);ii<=ai+At;ii++)Tn=ii*E+ft,0<=Tn+Oe&&Tn<=ot&&Ih(ii,oe,le,ye)&&y.fillRect(0,Tn,rt,Oe);Vn&&y.fs(),Gt!==1&&(y.globalAlpha=ue)}}y.restore(),y.Vc(!1)};function Ih(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Mu(){this.xa="Base"}be(Mu,po),Mu.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Xr||a instanceof Nn){var tt=null,rt=null;if(a instanceof Nn&&(tt=a),a instanceof Xr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Nn){var ot=tt;if(z===0)il(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Xr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var At=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var yt=y.height,Et=a.j;if(Et.length=0,lt!==null){sA(a,rt,yt,lt);var Tt=lt.measuredBounds;x.ed(Tt),Et.push(Tt)}Tt=vr.alloc();for(var It=Xt.alloc(),qt=Xt.alloc(),Gt=0;Gt<z;Gt++){var oe=E[Gt];if(oe!==lt)if(oe.isPanelMain&&oe instanceof fr){sA(a,rt,yt,oe);var le=oe.measuredBounds;x.ed(le),Et.push(le)}else if(2>ft)oe.measure(1/0,1/0,0,0),le=oe.measuredBounds,x.ed(le),Et.push(le);else{var ue=oe.segmentIndex,ye=oe.segmentFraction,Oe=oe.alignmentFocus;Oe.Mc()&&(Oe=Zr);var Vn=oe.segmentOrientation,ai=oe.segmentOffset;if(isNaN(ue)){var ii=ot.ua;le=ve(),ii.Qu(ye,le);var Tn=Xt.allocAt(le[0],le[1]);if(Tn.add(ot.i(0)),ii.type===Un.j?Tn.offset(-ii.startX,-ii.startY):(ii=ii.figures.first(),ii!==null&&Tn.offset(-ii.startX,-ii.startY)),ii=le[2],Vn!==Hl){var fn=ot.computeAngle(oe,Vn,ii);oe.Kb=fn}fn=Tn.x-y.x;var tr=Tn.y-y.y;Xt.free(Tn),Ee(le)}else if(ue<-ft||ue>=ft)le=Xt.alloc(),ot.vg(),ot.computeMidPoint(le),ii=ot.midAngle,Vn!==Hl&&(fn=ot.computeAngle(oe,Vn,ii),oe.Kb=fn),fn=le.x-y.x,tr=le.y-y.y,Xt.free(le);else{if(fn=0,0<=ue?(tr=At.M(ue),le=ue<ft-1?At.M(ue+1):tr):(fn=ft+ue,tr=At.M(fn),le=0<fn?At.M(fn-1):tr),tr.Xa(le)){0<=ue?(ii=0<ue?At.M(ue-1):tr,fn=ue<ft-2?At.M(ue+2):le):(ii=fn<ft-1?At.M(fn+1):tr,fn=1<fn?At.M(fn-2):le),Tn=ii.Bf(tr);var Ki=le.Bf(fn);ii=Tn>Ki+10?0<=ue?ii.ab(tr):tr.ab(ii):Ki>Tn+10?0<=ue?le.ab(fn):fn.ab(le):0<=ue?ii.ab(fn):fn.ab(ii)}else ii=0<=ue?tr.ab(le):le.ab(tr);Vn!==Hl&&(fn=ot.computeAngle(oe,Vn,ii),oe.Kb=fn),fn=tr.x+(le.x-tr.x)*ye-y.x,tr=tr.y+(le.y-tr.y)*ye-y.y}oe.measure(1/0,1/0,0,0),le=oe.measuredBounds,Tn=oe.naturalBounds;var io=0;oe instanceof fr&&(io=oe.strokeWidth),Ki=Tn.width+io;var bo=Tn.height+io;Tt.reset(),Tt.translate(-le.x,-le.y),Tt.scale(oe.scale,oe.scale),Tt.rotate(Vn===Hl?oe.angle:ii,Ki/2,bo/2),Vn!==mp&&Vn!==yp||Tt.rotate(90,Ki/2,bo/2),Vn!==vp&&Vn!==wp||Tt.rotate(-90,Ki/2,bo/2),Vn===T0&&(45<ii&&135>ii||225<ii&&315>ii)&&Tt.rotate(-ii,Ki/2,bo/2),Tn=new nn(0,0,Ki,bo),It.xi(Tn,Oe),Tt.Ga(It),Oe=-It.x+io/2*oe.scale,oe=-It.y+io/2*oe.scale,qt.assign(ai),io=isNaN(ai.x);var Fa=isNaN(ai.y);if(io||Fa){Ki=Ki/2+3,bo=bo/2+3;var Ta=45<=ii&&135>=ii,Fl=225<=ii&&315>=ii;Vn===Hl&&(Ta||Fl)?(qt.x=Fa?Ki:ai.y,qt.y=io?bo:ai.x,Ta?0<=ue||isNaN(ue)&&.5>ye||!io||(qt.y=-bo):Fl&&((0<=ue||isNaN(ue)&&.5>ye)&&io&&(qt.y=-bo),Fa&&(qt.x=-Ki))):(io&&(qt.x=0<=ue||isNaN(ue)&&.5>ye?Ki:-Ki),Fa&&(qt.y=-bo),qt.rotate(ii))}else qt.rotate(ii);fn+=qt.x,tr+=qt.y,Tn.set(le),Tn.h(fn+Oe,tr+oe,le.width,le.height),Et.push(Tn),x.ed(Tn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),il(b,x.width||0,x.height||0),vr.free(Tt),Xt.free(It),Xt.free(qt)}}}},Mu.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Xr||a instanceof Nn){var E=a,b=null;a instanceof Xr&&(b=a,E=b.adornedPart);var z=a instanceof Xr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var lt=y[ot];if(lt!==z&&rt<tt.length){var At=tt[rt];rt++,lt.arrange(At.x-a.jg.x,At.y-a.jg.y,At.width,At.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Nn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var yt=tt.alignmentFocus;if(lt=tt.segmentOrientation,At=tt.segmentOffset,isNaN(rt)){var Et=ft.ua,Tt=ve();Et.Qu(ot,Tt);var It=Xt.allocAt(Tt[0],Tt[1]);It.add(ft.i(0)),Et.type===Un.j||(Et=Et.figures.first()),It.offset(-Et.startX,-Et.startY),Et=Tt[2],lt!==Hl&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=It.x;var qt=It.y;Xt.free(It),Ee(Tt)}else if(rt<-x||rt>=x)Tt=Xt.alloc(),Et=ft,qt=Tt,Et.vg(),Et.computeMidPoint(qt),Et=ft.midAngle,lt!==Hl&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Tt.x,qt=Tt.y,Xt.free(Tt);else{if(It=0,0<=rt?(Tt=y.s[rt],qt=rt<x-1?y.s[rt+1]:Tt):(It=x+rt,Tt=y.s[It],qt=0<It?y.s[It-1]:Tt),Tt.Xa(qt)){0<=rt?(Et=0<rt?y.s[rt-1]:Tt,It=rt<x-2?y.s[rt+2]:qt):(Et=It<x-1?y.s[It+1]:Tt,It=1<It?y.s[It-2]:qt);var Gt=Et.Bf(Tt),oe=qt.Bf(It);Et=Gt>oe+10?0<=rt?Et.ab(Tt):Tt.ab(Et):oe>Gt+10?0<=rt?qt.ab(It):It.ab(qt):0<=rt?Et.ab(It):It.ab(Et)}else Et=0<=rt?Tt.ab(qt):qt.ab(Tt);lt!==Hl&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Tt.x+(qt.x-Tt.x)*ot,qt=Tt.y+(qt.y-Tt.y)*ot}if(yt.ys())tt.location=new Xt(ft,qt);else{yt.Mc()&&(yt=Zr),Tt=vr.alloc(),Tt.reset(),Tt.scale(tt.scale,tt.scale),Tt.rotate(tt.angle,0,0);var le=tt.naturalBounds;It=nn.allocAt(0,0,le.width,le.height),Gt=Xt.alloc(),Gt.xi(It,yt),Tt.Ga(Gt),yt=-Gt.x,oe=-Gt.y;var ue=le.width,ye=le.height;le=Xt.alloc(),le.assign(At);var Oe=isNaN(At.x),Vn=isNaN(At.y);if(Oe||Vn){ue=ue/2+3,ye=ye/2+3;var ai=45<=Et&&135>=Et,ii=225<=Et&&315>=Et;lt===Hl&&(ai||ii)?(le.x=Vn?ue:At.y,le.y=Oe?ye:At.x,ai?0<=rt||isNaN(rt)&&.5>ot||!Oe||(le.y=-ye):ii&&((0<=rt||isNaN(rt)&&.5>ot)&&Oe&&(le.y=-ye),Vn&&(le.x=-ue))):(Oe&&(le.x=0<=rt||isNaN(rt)&&.5>ot?ue:-ue),Vn&&(le.y=-ye),le.rotate(Et))}else le.rotate(Et);ft+=le.x,qt+=le.y,Tt.pp(It),yt+=It.x,oe+=It.y,rt=Xt.allocAt(ft+yt,qt+oe),tt.move(rt),Xt.free(rt),Xt.free(le),Xt.free(Gt),nn.free(It),vr.free(Tt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Xt.free(E)}};function sA(a,y,x,E){if(pu(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Xr&&a.type===vn.Link&&a.adornedObject instanceof fr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Nn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Xr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),js(E,!1)}}function Uh(){this.xa="Base"}be(Uh,po),Uh.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,lt=ot.right+ot.left,At=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,yt=new nn(-ot.left,-ot.top,Math.max(ft.width+lt,0),Math.max(ft.height+At,0));a.graduatedBounds.push(yt),b.assign(yt);for(var Et=rt.geometry,Tt=rt.strokeWidth,It=Et.flattenedSegments,qt=Et.flattenedLengths,Gt=Et.flattenedTotalLength,oe=It.length,le=0,ue=0,ye=ve(),Oe=0;Oe<oe;Oe++){var Vn=It[Oe],ai=[];ue=le=0;for(var ii=Vn.length,Tn=0;Tn<ii;Tn+=2){var fn=Vn[Tn],tr=Vn[Tn+1];if(Tn!==0){var Ki=180*Math.atan2(tr-ue,fn-le)/Math.PI;0>Ki&&(Ki+=360),ai.push(Ki)}le=fn,ue=tr}ye.push(ai)}if(a.graduatedIntervals===null){for(var io=[],bo=a.O.s,Fa=bo.length,Ta=0;Ta<Fa;Ta++){var Fl=bo[Ta],Ea=[];if(io.push(Ea),Fl.visible){var pd=Fl.interval;if(!(0>pd)){for(var Vs=0;Vs<Fa;Vs++)if(Vs!==Ta){var Ah=bo[Vs];if(Ah.visible&&Fl.constructor===Ah.constructor){var El=Ah.interval;El>pd&&Ea.push(El)}}}}}a.graduatedIntervals=io}var md=a.graduatedIntervals,Yu=a.O.s,PA=Yu.length,Tu=0,yu=0,qd=Gt;a.graduatedMarks=[];for(var hh,Vg=0;Vg<PA;Vg++){var Nu=Yu[Vg];if(hh=[],Nu.visible&&Nu!==rt){var Ll=Math.abs(Nu.interval),jp=a.graduatedTickUnit;if(!(2>jp*Ll*Gt/a.graduatedRange&&Nu.graduatedSkip===null)){var hg=qt[0][0],Hh=0,wu=0;yu=Gt*Nu.graduatedStart-1e-4,qd=Gt*Nu.graduatedEnd+1e-4;var kf=jp*Ll,Du=a.graduatedTickBase;if(Du<a.graduatedMin){var $d=(a.graduatedMin-Du)/kf;$d=$d%1===0?$d:Math.floor($d+1),Du+=$d*kf}else Du>a.graduatedMin+kf&&(Du-=Math.floor((Du-a.graduatedMin)/kf)*kf);for(var wm=md[Vg],zp=Du,iy=1e-6*a.graduatedMax,dc=1;Du<=a.graduatedMax+iy;dc++){t:{for(var bc=wm.length,cg=0;cg<bc;cg++){var tf=(Du-a.graduatedTickBase)%(wm[cg]*a.graduatedTickUnit),Wg=1e-6*a.graduatedTickUnit;if(tf<Wg&&tf>-Wg){var ef=!1;break t}}ef=!0}if(ef&&(Du>a.graduatedMax&&(Du=a.graduatedMax),Nu.graduatedSkip===null||Nu instanceof Io&&!Nu.graduatedSkip(Du,Nu)||Nu instanceof fr&&!Nu.graduatedSkip(Du,Nu))&&(Tu=(Du-a.graduatedMin)*Gt/a.graduatedRange,Tu>Gt&&(Tu=Gt),yu<=Tu&&Tu<=qd)){for(var fc=ye[Hh][wu],vd=qt[Hh][wu];Hh<qt.length;){for(;Tu>hg&&wu<qt[Hh].length-1;)wu++,fc=ye[Hh][wu],vd=qt[Hh][wu],hg+=vd;if(Tu<=hg)break;Hh++,wu=0,fc=ye[Hh][wu],vd=qt[Hh][wu],hg+=vd}var Su=It[Hh],Rh=Su[2*wu],Sm=Su[2*wu+1],Tc=(Tu-(hg-vd))/vd,Zg=new Xt(Rh+(Su[2*wu+2]-Rh)*Tc+Tt/2-Et.bounds.x,Sm+(Su[2*wu+3]-Sm)*Tc+Tt/2-Et.bounds.y);Zg.scale(rt.scale,rt.scale);t:{var ch=fc,bf=ye[Hh];if(!(.5005>Tc&&.4995<Tc)){var _h=ch;if(.5>Tc?0<wu?_h=bf[wu-1]:Pe.$(Su[0],Su[Su.length-2])&&Pe.$(Su[1],Su[Su.length-1])&&(_h=bf[bf.length-1]):.5<Tc&&(wu+1<bf.length?_h=bf[wu+1]:Pe.$(Su[0],Su[Su.length-2])&&Pe.$(Su[1],Su[Su.length-1])&&(_h=bf[0])),ch!==_h){var dg=Math.abs(ch-_h);if(180<dg&&(ch<_h?ch+=360:_h+=360,dg=Math.abs(ch-_h)),5e-4>Tc||.9995<Tc){fc=(ch+_h)/2%360;break t}if(10>dg){var Yg=1-Math.abs(.5-Tc);fc=(ch*Yg+_h*(1-Yg))%360;break t}}}fc=ch}if(Nu instanceof Io){var VA="";Nu.graduatedFunction!==null?(VA=Nu.graduatedFunction(Du,Nu),VA=VA!=null?VA.toString():""):VA=(+Du.toFixed(2)).toString(),VA!==""&&hh.push({$l:Zg,angle:fc,text:VA})}else hh.push({$l:Zg,angle:fc})}Du=zp+dc*kf}}}a.graduatedMarks.push(hh)}Ee(ye);var Ra=a.graduatedMarks;if(Ra!==null)for(var Vp=E.length,jl=0;jl<Vp;jl++){var Ws=E[jl],zl=Ra[jl];if(Ws.visible&&Ws!==rt&&zl.length!==0){if(Ws instanceof fr){var Nc=a,yd=b,Tf=Ws.alignmentFocus;Tf.Mc()&&(Tf=uu);var ry=Ws.angle;Ws.Kb=0,Ws.measure(1/0,1/0,0,0),Ws.Kb=ry;var xm=Ws.measuredBounds,Xg=xm.width,Nf=xm.height,fg=nn.allocAt(0,0,Xg,Nf),xu=Xt.alloc();xu.xi(fg,Tf),nn.free(fg);for(var Dc=-xu.x,dh=-xu.y,hA=new nn,nf=zl.length,Jg=0;Jg<nf;Jg++)for(var rf=zl[Jg],Bm=rf.$l.x,qg=rf.$l.y,Ns=rf.angle,WA=0;4>WA;WA++){switch(WA){case 0:xu.h(Dc,dh);break;case 1:xu.h(Dc+Xg,dh);break;case 2:xu.h(Dc,dh+Nf);break;case 3:xu.h(Dc+Xg,dh+Nf)}xu.rotate(Ns+Ws.angle),xu.offset(Bm,qg),Jg===0&&WA===0?hA.h(xu.x,xu.y,0,0):hA.Ye(xu),xu.offset(-Bm,-qg),xu.rotate(-Ns-Ws.angle)}Xt.free(xu),Nc.graduatedBounds!==null&&Nc.graduatedBounds.push(hA),us(yd,hA.x,hA.y,hA.width,hA.height)}else if(Ws instanceof Io){var FA=a,Cm=b;FA.temporaryTextBlock===null&&(FA.temporaryTextBlock=new Io);var Iu=FA.temporaryTextBlock;xy(Iu,Ws);var wd=Ws.alignmentFocus;wd.Mc()&&(wd=uu);for(var EA=Ws.segmentOrientation,$g=Ws.segmentOffset,of=new nn,Wp=0,tp=0,Kh=0,Df=0,sf=0,ep=zl.length,Sd=0;Sd<ep;Sd++){var gc=zl[Sd];Wp=gc.$l.x,tp=gc.$l.y,Kh=gc.angle,sf=Df=Ws.angle,EA!==Hl&&(sf=EA===pp||EA===b0?Kh+Ws.angle:Kh,Df=Nn.computeAngle(EA,sf)),Iu.Kb=Df,Iu.text=gc.text||"",Iu.measure(1/0,1/0,0,0);var xd=Iu.measuredBounds,Ic=Iu.naturalBounds,Bd=Ic.width,If=Ic.height,fh=vr.alloc();fh.reset(),fh.translate(-xd.x,-xd.y),fh.scale(Iu.scale,Iu.scale),fh.rotate(sf,Bd/2,If/2),EA!==mp&&EA!==yp||fh.rotate(90,Bd/2,If/2),EA!==vp&&EA!==wp||fh.rotate(-90,Bd/2,If/2),EA===T0&&(45<Kh&&135>Kh||225<Kh&&315>Kh)&&fh.rotate(-Kh,Bd/2,If/2);var gg=nn.allocAt(0,0,Bd,If),Cd=Xt.alloc();Cd.xi(gg,wd),fh.Ga(Cd);var pg=-Cd.x,oy=-Cd.y,Uc=Xt.alloc();Uc.assign($g),isNaN(Uc.x)&&(Uc.x=Bd/2+3),isNaN(Uc.y)&&(Uc.y=-(If/2+3)),Uc.rotate(Kh),Wp+=Uc.x+pg,tp+=Uc.y+oy;var Uf=new nn(Wp,tp,xd.width,xd.height),Zp=new nn(xd.x,xd.y,xd.width,xd.height),sy=new nn(Ic.x,Ic.y,Ic.width,Ic.height);gc.Sz=Df,gc.lineCount=Iu.lineCount,gc.lines=[Iu.Cb,Iu.Ih,Iu.df,Iu.Le,Iu.Qc,Iu.Qb,Iu.ze],gc.actualBounds=Uf,gc.measuredBounds=Zp,gc.naturalBounds=sy,Sd===0?of.assign(Uf):of.ed(Uf),Xt.free(Uc),Xt.free(Cd),nn.free(gg),vr.free(fh)}FA.graduatedBounds!==null&&FA.graduatedBounds.push(of),us(Cm,of.x,of.y,of.width,of.height)}js(Ws,!1)}}},Uh.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,lt=0;lt<ot;lt++){var At=y[lt];rt=b[lt],At.visible&&At!==E&&rt.length!==0&&(rt=z[tt],tt++,At.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},Uh.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Ql,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,lt=a.graduatedMarks,At=ot.length,ft=0;ft<At;ft++){var yt=ot[ft],Et=lt[ft],Tt=Et.length;if(yt.visible&&yt!==z&&Et.length!==0){if(yt instanceof fr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var It=yt.measuredBounds,qt=yt.strokeWidth*yt.scale,Gt=yt.alignmentFocus;Gt.Mc()&&(Gt=uu);for(var oe=0;oe<Tt;oe++){var le=Et[oe].$l,ue=Et[oe].angle,ye=Gt,Oe=yt.Ab;Oe.reset(),Oe.translate(le.x+rt.x,le.y+rt.y),Oe.rotate(ue+yt.angle,0,0),Oe.translate(-It.width*ye.x+ye.offsetX+qt/2,-It.height*ye.y+ye.offsetY+qt/2),Oe.scale(yt.scale,yt.scale),ju(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,Ul(yt,!1),yt.gc(y,x),b&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Io)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Io),It=a.temporaryTextBlock,xy(It,yt),qt=0;qt<Tt;qt++)Gt=Et[qt],Gt.actualBounds&&Gt.measuredBounds&&Gt.naturalBounds&&(It.ec=Gt.text||"",It.Kb=Gt.Sz||0,It.Gc=Gt.lineCount||0,oe=Gt.lines,oe!==void 0&&(It.Cb=oe[0],It.Ih=oe[1],It.df=oe[2],It.Le=oe[3],It.Qc=oe[4],It.Qb=oe[5],It.ze=oe[6]),Gt.naturalBounds&&(It.dc=Gt.naturalBounds),Gt.actualBounds&&(oe=Gt.actualBounds,It.arrange(oe.x,oe.y,oe.width,oe.height)),oe=Gt.actualBounds,It.arrange(oe.x,oe.y,oe.width,oe.height),le=Gt.measuredBounds,Gt=Gt.naturalBounds,ue=It.Ab,ue.reset(),ue.translate(oe.x+rt.x,oe.y+rt.y),ue.translate(-le.x,-le.y),It.no(ue,Gt.x,Gt.y,Gt.width,Gt.height),ju(It,!1),It.wh.set(It.Ab),It.Kk=It.scale,Ul(It,!1),It.Ng=yt.part,It.Me=yt.panel,It.gc(y,x),It.Me=null,It.Ng=null,b&&(a.svg.appendChild(It.svg),It.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function vn(a,y){if(we.call(this),this.na=null,a===void 0)this.na=vn.Position;else if(typeof a=="string"){var x=RA.I(a);x!==null&&(this.na=x)}else a instanceof po?this.na=a:a&&(this.na=vn.Position,y=a);this.na===null&&Ge("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===vn.Grid?1048576:0),this.O=new cn,this.yb=ml,this.Tm=Es,this.Uf=Yi,this.$g=null,this.$e="",this.jg=new nn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Ai,this.jn=ws,this.kn=An,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}be(vn,we),vn.prototype.cloneProtected=function(a){we.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},vn.prototype.Af=function(a){we.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},vn.prototype.copy=function(){var a=we.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Jn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Bs,"elements",a,null,b,null,tt)}}return a}return null},Mt=vn.prototype,Mt.toString=function(){return"Panel("+this.type.name+")#"+qr(this)},Mt.Pn=function(a){we.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Mt.hh=function(a,y){if(this.na===vn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===vn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===vn.Table)if(a.yc(),a instanceof Ql){var x=a.yd;a.yd=Bg(a,"gojs-ts"),nc(this,a),a.nh.pop(),a.yd=x}else nc(this,a);(x=this.isClipping&&this.na===vn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function nc(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&ic(a,y,!0,x,!0),E!==null&&ic(a,y,!1,E,!0),x!==null&&od(a,y,!0,x),E!==null&&od(a,y,!1,E),x!==null&&ic(a,y,!0,x,!1),E!==null&&ic(a,y,!1,E,!1)}function od(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var lt=E[ot];if(lt!==void 0&&lt.actual!==0)if(rt)rt=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var At=lt.separatorStrokeWidth;isNaN(At)&&(At=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),At!==0&&ft!==null){ls(a,y,ft,!1,!1,tt,z),ft=!1;var yt=lt.separatorDashArray;yt===null&&(yt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),yt!==null&&(ft=!0,y.js(yt,0)),y.beginPath(),yt=lt.position+At,x?yt>tt.height&&(At-=yt-tt.height):yt>tt.width&&(At-=yt-tt.width),lt=lt.position+At/2,y.lineWidth=At,At=a.yb,x?(lt+=At.top,yt=tt.width-At.right,y.moveTo(At.left,lt),y.lineTo(yt,lt)):(lt+=At.left,yt=tt.height-At.bottom,y.moveTo(lt,At.top),y.lineTo(lt,yt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function ic(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=rc(a,!0),lt=rc(a,!1),At=0;At<z;At++){var ft=E[At];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var yt=x?tt.height:tt.width;if(!(ft.position>yt)){var Et=ft.Wc(),Tt=ft.separatorStrokeWidth;isNaN(Tt)&&(Tt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var It=ft.separatorStroke;It===null&&(It=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(It===null||ft.index===(x?ot:lt))&&(Tt=0),Et-=Tt,Tt=ft.position+Tt,Et+=ft.actual,Tt+Et>yt&&(Et=yt-Tt),0>=Et||(yt=a.yb,ls(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,Tt+yt.top,tt.width-(yt.left+yt.right),Et):y.fillRect(Tt+yt.left,yt.top,Et,tt.height-(yt.top+yt.bottom)))}}}}function rc(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function Lc(a){return a==="LineV"||a==="BarV"}Mt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Mt.kk=function(a,y,x){if(!we.prototype.kk.call(this,a,y,x))return!1;if(this.type===vn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,nc(this,a),a.yd=null;else if(this.na===vn.Grid||this.na===vn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Mt.nk=function(){return!0},Mt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else we.prototype.$o.call(this,a,y,x,E)},Mt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,lt=-tt.m12*rt,At=-tt.m21*rt,ft=tt.m11*rt,yt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),Et=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,Pe.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*At+yt,rt=a*lt+y*ft+Et,a=x*ot+E*At+yt,ot=x*lt+E*ft+Et,b.h(0,0),x=this.naturalBounds,z=Pe.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,At=lt=0,ft=1,Et=yt=0),rt=a*ot+y*At+yt,a=a*lt+y*ft+Et,ot=x*ot+E*At+yt,x=x*lt+E*ft+Et,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),lt=!1,ft=this.O.s,Et=ft.length,At=Xt.alloc(),yt=null,y=1/0;var Tt=null,It=this.isClipping&&this.na===vn.Spot;It&&(Tt=Xt.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,Tt))&&(y=(rt-Tt.x)*(rt-Tt.x)+(a-Tt.y)*(a-Tt.y)));for(var qt=0;qt<Et;qt++){var Gt=ft[qt];Gt.visible&&Gt!==yt&&Gt.Sj(rt,a,ot,x,At)&&(lt=!0,Gt=(rt-At.x)*(rt-At.x)+(a-At.y)*(a-At.y),Gt<E&&(E=Gt,b.set(At)))}return It&&(y>E&&b.set(Tt),Xt.free(Tt)),Xt.free(At),z&&b.transform(tt),lt},Mt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();we.prototype.Gj.call(this)},Mt.v=function(a){if(!pu(this)){we.prototype.v.call(this,a),a=null,(this.na===vn.Auto||this.na===vn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Cl(b,!1);(b instanceof Ol||b instanceof vn||b instanceof Io||z!==pn)&&b.v(!0)}}}},Mt.Uj=function(){if(!pu(this)){js(this,!0),rh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Mt.Uk=function(){if(!(this.l&2048)){ju(this,!0),Ul(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Mt.Wu=function(){Ul(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Mt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),il(b,a,ot),il(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Mt.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 E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function nu(a){return a.part!==null?a.part.locationObject:null}Mt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Cl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=pn),a){case pn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case yn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case vi:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case Di:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Mt.gh=function(a){var y=this.naturalBounds,x=nu(this);if(Ys(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Xt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(ki(b.set(a),z.transform),z.ca(b)))return Xt.free(b),!0}return Xt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Mt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Mt.qm=function(a,y){if(y(this,a),a instanceof vn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function HA(a,y){xf(a,a,y)}function xf(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof vn&&xf(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof vn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}Mt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof vn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=cy(a,y[b],x);if(z!==null)return z}}return null}Mt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=sp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof vn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function dy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof vn?x=Math.max(x,dy(b)):b instanceof fr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Mt.se=function(){return!(this.type===vn.TableRow||this.type===vn.TableColumn)};function sd(a){return a.type===vn.TableRow||a.type===vn.TableColumn}Mt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),ul(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:ki(Xt.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),Ys(-(lt*b),-(lt*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var At=b.length;if(rt=Xt.alloc(),lt=(ot=this.isClipping&&this.na===vn.Spot)?this.Pb():null,ot&&(lt.se()?ki(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return Xt.free(rt),z||Xt.free(tt),null;for(var ft=nu(this);At--;){var yt=b[At];if((yt.visible||yt===ft)&&(yt.se()?ki(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Et=null;if(yt instanceof vn?Et=yt.ic(rt,y,x):yt.pickable===!0&&yt.ca(rt)&&(Et=yt),Et!==null&&(y!==null&&(Et=y(Et)),Et!==null&&(x===null||x(Et))))return Xt.free(rt),z||Xt.free(tt),Et}}Xt.free(rt)}return this.background===null&&this.areaBackground===null?(z||Xt.free(tt),null):(a=Ys(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Xt.free(tt),a)}return z||Xt.free(tt),null},Mt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:ki(Xt.allocAt(a.x,a.y),this.transform);if(b=Ys(0,0,b.width,b.height,tt.x,tt.y),sd(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,lt=Xt.alloc(),At=nu(this);ot--;){var ft=rt[ot];if(ft.visible||ft===At){ft.se()?ki(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof vn?ft:null,(ft!==null?ft.ji(lt,y,x,E):yt.ca(lt))&&yt.pickable!==!1&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||E.add(yt))}}Xt.free(lt)}return z||Xt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Xt.free(tt),!1},Mt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=vr.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&vr.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=nu(this),ot=this.O.s,lt=ot.length;lt--;){var At=ot[lt];if(At.visible||At===rt){var ft=At.actualBounds,yt=this.naturalBounds;ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=At,At=At instanceof vn?At:null,yt=vr.alloc(),yt.set(tt),(At!==null?At.Cf(a,y,x,E,b,yt):ca(ft,a,E,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),vr.free(yt))}}return z===void 0&&vr.free(tt),E}return z===void 0&&vr.free(tt),!1};function Nm(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof vn&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Mt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:ki(Xt.allocAt(a.x,a.y),this.transform),lt=rt?y:ki(Xt.allocAt(y.x,y.y),this.transform),At=ot.Bf(lt),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||Tr(ot.x,ot.y,0,0,0,tt.height)<=At||Tr(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=At||Tr(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=At||Tr(ot.x,ot.y,tt.width,0,0,0)<=At;if(tt=ot.zd(0,0)<=At&&ot.zd(0,tt.height)<=At&&ot.zd(tt.width,0)<=At&&ot.zd(tt.width,tt.height)<=At,rt||(Xt.free(ot),Xt.free(lt)),ft){if(!this.isAtomic){ot=Xt.alloc(),lt=Xt.alloc(),At=nu(this);for(var yt=this.O.s,Et=yt.length;Et--;){var Tt=yt[Et];if(Tt.visible||Tt===At){var It=Tt.actualBounds,qt=this.naturalBounds;(!rt||!(It.x>qt.width||It.y>qt.height||0>It.x+It.width||0>It.y+It.height))&&(Tt.se()?(It=Tt.transform,ki(ot.set(a),It),ki(lt.set(y),It)):(ot.set(a),lt.set(y)),It=Tt,Tt=Tt instanceof vn?Tt:null,(Tt!==null?Tt.og(ot,lt,x,E,b,z):It.tx(ot,lt,b))&&(x!==null&&(It=x(It)),It===null||E!==null&&!E(It)||z.add(It)))}}Xt.free(ot),Xt.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof fr&&(y=a.spot1,y===Es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ta),y}function Im(a){var y=null;return a instanceof fr&&(y=a.spot2,y===Es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Po),y}Mt.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},Mt.M=function(a){return this.O.M(a)},Mt.Gb=function(a,y){y instanceof Li&&Ge("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ge("Cannot make a Panel contain itself: "+this.toString()),Ge("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ge("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==vn.Grid||y instanceof fr||Ge("Can only add Shapes to a Grid Panel, not: "+y),this.na!==vn.Graduated||y instanceof fr||y instanceof Io||Ge("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new hi),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else Ge("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),pu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof vn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||o0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Jn&&(x.Te=!0),x.Te&&x instanceof Jn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Qs,"elements",this,y,null,E,null),x.cb(Bs,"elements",this,null,y,null,a)))};function Um(a,y){a.l=y?a.l|16777216:a.l&-16777217}Mt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Mt.mb=function(a){0<=a&&this.pc(a,!0)},Mt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),js(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Jn&&(E instanceof vn?E.qm(E,function(tt,rt){ov(z,rt,y)}):ov(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Qs,"elements",this,E,null,a,null))},Mt.Fb=function(a){0>a&&Zi(a,">= 0",vn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new la;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Bs,"rowdefs",this,null,x,null,a)}return y[a]},Mt.oA=function(a){if(0>a&&Zi(a,">= 0",vn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Qs,"rowdefs",this,x,null,a,null),this.v()}}};function fy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof la?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Mt.Eb=function(a){0>a&&Zi(a,">= 0",vn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new la;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Bs,"coldefs",this,null,x,null,a)}return y[a]},Mt.jA=function(a){if(0>a&&Zi(a,">= 0",vn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Qs,"coldefs",this,x,null,a,null),this.v()}}};function gy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof la?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Mt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&s0(y,a),this},Mt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new la(y)),this},Mt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new la(y)),this},Mt.nz=function(a){if(0>a||this.type!==vn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Mt.fz=function(a){if(0>a||this.type!==vn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Mt.Fz=function(a,y){if(y===void 0&&(y=new Xt(NaN,NaN)),this.type!==vn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Mt.Gz=function(a){if(this.type!==vn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function py(a){return a=a.allBindings,a!==null&&a._isFrozen}function xA(a){var y=a.allBindings;if(y===null)a.data!==null&&Ge("Template cannot have .data be non-null: "+a),a.allBindings=y=new cn;else if(y._isFrozen)return;var x=new cn;Um(a,!1),a.qm(a,function(lt,At){At.th();var ft=At.localBindings;if(ft!==null)for(tc(At,!1),ft=ft.iterator;ft.next();){var yt=ft.value;yt.mode===Lp&&tc(At,!0);var Et=yt.sourceName;Et!==null&&(Et==="/"&&Um(lt,!0),Et=k1(yt,lt,At),Et!==null&&(x.add(Et),Et.srcBindings===null&&(Et.srcBindings=new cn),Et.srcBindings.add(yt))),y.add(yt)}if(At instanceof vn&&At.type===vn.Table){if(0<At.rowCount){for(lt=At.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Et=lt[yt],Et!==void 0&&Et.be!==null)for(var Tt=Et.be.iterator;Tt.next();){var It=Tt.value;It.xd=Et,It.to=2,It.wl=Et.index,y.add(It)}}if(0<At.columnCount){for(At=At.colDefs,lt=At.length,ft=0;ft<lt;ft++)if(yt=At[ft],yt!==void 0&&yt.be!==null)for(Et=yt.be.iterator;Et.next();)Tt=Et.value,Tt.xd=yt,Tt.to=1,Tt.wl=yt.index,y.add(Tt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){tc(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new cn),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof vn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):ur('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof la?(tt=qr(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof we?(tt=qr(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):Ge("Unknown type of binding target: "+z)}y.freeze(),a instanceof Li&&a.Zc()&&a.Va()}Mt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof vn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&xA(y),y},Mt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof vn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Mt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Pw(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof vn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof vn)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===vn.Spot||a.type===vn.Auto)return Math.min(a.O.length,1);if(a.type===vn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof fr&&E.isPanelMain))break}return x}return a.type===vn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof vn&&sd(a))?1:0}Mt.mv=function(){for(var a=sp(this);this.O.length>a;)this.pc(this.O.length-1,!1);my(this,this.itemArray)};function my(a,y){var x=sp(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 E=0;E<x;E++)r0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof vn){if(tt.data!==z){var rt=Om(a,tt.data),ot=Om(a,z),lt=ot!==rt;lt||(rt=Hm(a,rt),lt=Hm(a,ot)!==rt),lt?(a.pc(E,!1),r0(a,z,b,!1)):tt.data=z}}else r0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Qm(a,x,0),pu(a)||a.v(),a.graduatedIntervals=null,a.If()||o0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Jn&&(y.Te=!0),y.Te&&y instanceof Jn&&(y.wc=null))}}function r0(a,y,x,E){if(!(y==null||0>x)){var b=Om(a,y);if(b=Hm(a,b),b!==null){if(xA(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Um(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new hi),a.ge.add(y,b)),z=x+sp(a),a.Gb(z,b),E&&(b.ub=y,Qm(a,z,x),b.ub=null),b.data=y}}}function Qm(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof vn){var b=y,z=x;E.type===vn.TableRow?E.row=b:E.type===vn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Om(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=Rs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ge("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Hm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(vy||(vy=!0,ur('No item template Panel found for category "'+y+'" on '+a),ur(" Using default item template."),a=new vn,y=new Io,y.bind(new zs("text","",Sn)),a.add(y),yy=a),E=yy)),E}function o0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof vn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof vn&&!z.isEnabled||o0(a,z,x)}}}function Qh(a,y){y.name=a,RA.add(a,y)}un.Object.defineProperties(vn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===vn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Zi(a,">= 0",vn,"padding"),a=new nr(a)):(0>a.left&&Zi(a.left,">= 0",vn,"padding:value.left"),0>a.right&&Zi(a.right,">= 0",vn,"padding:value.right"),0>a.top&&Zi(a.top,">= 0",vn,"padding:value.top"),0>a.bottom&&Zi(a.bottom,">= 0",vn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:ml},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new aA),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 fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new aA),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 aA),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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Ge("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new aA),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 fo)&&(a instanceof fo&&a.freeze(),this.T===null&&(this.T=new aA),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 aA),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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Ge("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new aA),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 aA),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||Ge("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&UA(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()||Ge("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&UA(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 Mc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ua(this)&&(a=this.part,a!==null&&Qo(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 Mc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ua(this)&&(a=this.part,a!==null&&Qo(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 Mc),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 Mc),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 Mc,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 Mc,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 Mc,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 Mc,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 aA),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new aA),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:l0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new aA),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:l0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new aA),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)&&Ge("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new aA),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)&&Ge("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new aA),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 Li&&!(this instanceof Xr);xA(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Nn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Li&&(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),E!==null&&E.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 $c),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Pw(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Pv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&Cv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||my(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 hi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Li||a.isPanelMain)&&Ge("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(););pr(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&&(pr(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof ir&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&o0(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))}}}),un.Object.defineProperties(vn,{Position:{get:function(){return RA.I("Position")}},Horizontal:{get:function(){return RA.I("Horizontal")}},Vertical:{get:function(){return RA.I("Vertical")}},Spot:{get:function(){return RA.I("Spot")}},Auto:{get:function(){return RA.I("Auto")}},Table:{get:function(){return RA.I("Table")}},Viewbox:{get:function(){return RA.I("Viewbox")}},TableRow:{get:function(){return RA.I("TableRow")}},TableColumn:{get:function(){return RA.I("TableColumn")}},Link:{get:function(){return RA.I("Link")}},Grid:{get:function(){return RA.I("Grid")}},Graduated:{get:function(){return RA.I("Graduated")}}}),vn.prototype.rebuildItemElements=vn.prototype.mv,vn.prototype.findItemPanelForData=vn.prototype.sx,vn.prototype.updateTargetBindings=vn.prototype.La,vn.prototype.copyTemplate=vn.prototype.Uy,vn.prototype.graduatedValueForPoint=vn.prototype.Gz,vn.prototype.graduatedPointForValue=vn.prototype.Fz,vn.prototype.findColumnForLocalX=vn.prototype.fz,vn.prototype.findRowForLocalY=vn.prototype.nz,vn.prototype.addColumnDefinition=vn.prototype.By,vn.prototype.addRowDefinition=vn.prototype.Hy,vn.prototype.addRowColumnDefinition=vn.prototype.Gy,vn.prototype.removeColumnDefinition=vn.prototype.jA,vn.prototype.getColumnDefinition=vn.prototype.Eb,vn.prototype.removeRowDefinition=vn.prototype.oA,vn.prototype.getRowDefinition=vn.prototype.Fb,vn.prototype.removeAt=vn.prototype.mb,vn.prototype.remove=vn.prototype.remove,vn.prototype.insertAt=vn.prototype.Gb,vn.prototype.elt=vn.prototype.M,vn.prototype.add=vn.prototype.add,vn.prototype.findObject=vn.prototype.fb,vn.prototype.findInVisualTree=vn.prototype.Nl,vn.prototype.walkVisualTreeFrom=vn.prototype.qm,vn.prototype.findMainElement=vn.prototype.Pb;var vy=!1,yy=null,RA=new hi;vn.className="Panel",vn.definePanelLayout=Qh,Qh("Position",new gs),Qh("Vertical",new zr),Qh("Auto",new Vo),Qh("Link",new Mu);function Mc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Mc.prototype.copy=function(){var a=new Mc;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},Mc.className="GradPanelSettings";function aA(){this.Pc=[],this.Oc=[],this.j=this.ob=l0,this.hb=this.Hb=0,this.Qp=ml,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}aA.prototype.copy=function(a){for(var y=new aA,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);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},aA.className="TablePanelSettings";function la(a){or(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Es,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Rm,this.hg=Yi,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))}la.prototype.copy=function(){var a=new la;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=pe(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function s0(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=pe(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Mt=la.prototype,Mt.qb=function(a){a.classType===la&&(this.sizing=a)},Mt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+qr(this)},Mt.wi=function(a){this.Me=a},Mt.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)},Mt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===vn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Mt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Oo,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function a0(a){if(a.sizing===Rm){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Mt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new zs(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&py(y)&&Ge("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new cn),this.be.add(b),this},un.Object.defineProperties(la.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&&Zi(a,">= 0",la,"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&&Zi(a,">= 0",la,"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))&&Zi(a,">= 0",la,"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&&Zi(a,">= 0",la,"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 nr(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&&Ft(a,"RowColumnDefinition.separatorStroke"),a instanceof fo&&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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Ge("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===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&&Ft(a,"RowColumnDefinition.background"),a instanceof fo&&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}}}),la.prototype.computeEffectiveSpacing=la.prototype.Wc,la.prototype.computeEffectiveSpacingTop=la.prototype.Io;var Rm=new Te(la,"Default",0),ap=new Te(la,"None",1),l0=new Te(la,"ProportionalExtra",2);la.className="RowColumnDefinition",la.Default=Rm,la.None=ap,la.ProportionalExtra=l0;function fr(a,y){we.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)}be(fr,we),fr.prototype.cloneProtected=function(a){we.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=pe(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 Bf(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Mt=fr.prototype,Mt.th=function(){we.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Mt.qb=function(a){a===pn||a===Ai||a===Fr||a===Yi?this.geometryStretch=a:we.prototype.qb.call(this,a)},Mt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+qr(this)};function Cg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],lt,At,ft,yt,Et,Tt,It=0,qt=ve(),Gt=2;Gt<b;Gt+=2)lt=x[Gt],At=x[Gt+1],ft=lt-rt,rt=At-ot,ft===0&&(ft=.001),yt=rt/ft,Et=Math.atan2(rt,ft),Tt=Math.sqrt(ft*ft+rt*rt),qt.push([ft,Et,yt,Tt]),It+=Tt,rt=lt,ot=At;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof fr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,At=lt!==0,Gt=0,Tt=qt[Gt],ft=Tt[0],Et=Tt[1],yt=Tt[2],Tt=Tt[3];for(var oe=0;.1<=It;){if(oe===0&&(At?(b=x,b-=lt,It-=lt,At=!1):b=x,b===0&&(b=1)),b>It){Ee(qt);return}b>Tt?(oe=b-Tt,b=Tt):oe=0;var le=Math.sqrt(b*b/(1+yt*yt));if(0>ft&&(le=-le),rt+=le,ot+=yt*le,a.translate(rt,ot),a.rotate(Et),a.translate(-(tt/2),-(z/2)),oe===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Et),a.translate(-rt,-ot),It-=b,Tt-=b,oe!==0){if(Gt++,Gt===qt.length){Ee(qt);return}Tt=qt[Gt],ft=Tt[0],Et=Tt[1],yt=Tt[2],Tt=Tt[3],b=oe}}Ee(qt)}}Mt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&ls(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===vn.Link&&rt instanceof Xr&&rt.category==="Selection"&&rt.adornedObject instanceof fr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(ls(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===Un.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===Un.u){var lt=b.startX;ot=b.startY;var At=b.endX,ft=b.endY;b=Math.min(lt,At);var yt=Math.min(ot,ft);lt=Math.abs(At-lt),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,yt,lt,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&OA(a),a.jk(),rt&&z&&Nh(a)),a.Se()}else if(b.type===Un.F)lt=b.startX,ot=b.startY,At=b.endX,ft=b.endY,b=Math.abs(At-lt)/2,yt=Math.abs(ft-ot)/2,lt=Math.min(lt,At)+b,ot=Math.min(ot,ft)+yt,a.beginPath(),a.moveTo(lt,ot-yt),a.bezierCurveTo(lt+Pe.wg*b,ot-yt,lt+b,ot-Pe.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+Pe.wg*yt,lt+Pe.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-Pe.wg*b,ot+yt,lt-b,ot+Pe.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-Pe.wg*yt,lt-Pe.wg*b,ot-yt,lt,ot-yt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&OA(a),a.jk(),rt&&z&&Nh(a)),a.Se();else if(b.type===Un.o)for(b=b.figures,ot=b.length,yt=0;yt<ot;yt++){lt=b.s[yt],a.beginPath(),a.moveTo(lt.startX,lt.startY),At=lt.segments.s,ft=At.length;for(var Et=null,Tt=0;Tt<ft;Tt++){var It=At[Tt];switch(It.type){case Us:a.moveTo(It.endX,It.endY);break;case Fo:a.lineTo(It.endX,It.endY);break;case ya:a.bezierCurveTo(It.point1X,It.point1Y,It.point2X,It.point2Y,It.endX,It.endY);break;case vl:a.quadraticCurveTo(It.point1X,It.point1Y,It.endX,It.endY);break;case Ls:if(It.radiusX===It.radiusY){var qt=Math.PI/180;a.arc(It.point1X,It.point1Y,It.radiusX,It.startAngle*qt,(It.startAngle+It.sweepAngle)*qt,0>It.sweepAngle,Et!==null?Et.endX:lt.startX,Et!==null?Et.endY:lt.startY)}else if(Et=cl(It,lt),qt=Et.length,qt===0)a.lineTo(It.centerX,It.centerY);else for(var Gt=0;Gt<qt;Gt++){var oe=Et[Gt];Gt===0&&a.lineTo(oe[0],oe[1]),a.bezierCurveTo(oe[2],oe[3],oe[4],oe[5],oe[6],oe[7])}break;case Yl:if(Gt=qt=0,Et!==null&&Et.type===Ls){if(Et=cl(Et,lt),oe=Et.length,oe===0){a.lineTo(It.endX,It.endY);break}Et=Et[oe-1]||null,Et!==null&&(qt=Et[6],Gt=Et[7])}else qt=Et!==null?Et.endX:lt.startX,Gt=Et!==null?Et.endY:lt.startY;if(Et=Zl(It,lt,qt,Gt),qt=Et.length,qt===0){a.lineTo(It.endX,It.endY);break}for(Gt=0;Gt<qt;Gt++)oe=Et[Gt],a.bezierCurveTo(oe[2],oe[3],oe[4],oe[5],oe[6],oe[7]);break;default:Ge("Segment not of valid type: "+It.type)}It.isClosed&&a.closePath(),Et=It}At=lt.isFilled,z?lt.isShadowed?(At===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(At&&rt&&OA(a),a.jk(),At&&rt&&Nh(a))):(OA(a),At&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk(),Nh(a)):(At&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk()),a.Se(yt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=ve(),z.type===Un.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),Cg(a,y,E,x);else if(z.type===Un.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,yt=b,lt=rt.segments.s,At=lt.length,ft=0;ft<At;ft++){switch(Tt=lt[ft],Tt.type){case Us:Cg(a,y,E,x),E.length=0,E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY,ot=tt,yt=b;break;case Fo:E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break;case ya:Pe.Qe(tt,b,Tt.point1X,Tt.point1Y,Tt.point2X,Tt.point2Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case vl:Pe.ep(tt,b,Tt.point1X,Tt.point1Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case Ls:if(It=cl(Tt,rt),Et=It.length,Et===0){E.push(Tt.centerX),E.push(Tt.centerY),tt=Tt.centerX,b=Tt.centerY;break}for(qt=0;qt<Et;qt++)Gt=It[qt],Pe.Qe(tt,b,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],b=Gt[7];break;case Yl:if(It=Zl(Tt,rt,tt,b),Et=It.length,Et===0){E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break}for(qt=0;qt<Et;qt++)Gt=It[qt],Pe.Qe(tt,b,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],b=Gt[7];break;default:Ge("Segment not of valid type: "+Tt.type)}Tt.isClosed&&(E.push(ot),E.push(yt),Cg(a,y,E,x))}Cg(a,y,E,x)}else if(z.type===Un.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),Cg(a,y,E,x);else if(z.type===Un.F){if(b=new Js,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Gr(Ls),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=cl(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)yt=z[ot],Pe.Qe(tt,b,yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,E),tt=yt[6],b=yt[7];Cg(a,y,E,x)}Ee(E),a.restore(),a.Vc(!1)}}}},Mt.kk=function(a,y,x){return!we.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)},Mt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:we.prototype.nk.call(this,a)},Mt.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)}},Mt.ga=function(a,y){if(y===void 0&&(y=new Xt),a instanceof Ei){a.Mc()&&Ge("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Mt.mi=function(a){a===void 0&&(a=new nn);var y=this.naturalBounds,x=this.oe;y=nn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Xt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),us(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),us(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),us(a,E.x,E.y,0,0),nn.free(y),Xt.free(E),a},Mt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==Un.j||y||(b+=2);var z=nn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return nn.free(z),!1;if(E=b+1e-4,x.type===Un.j)return this.stroke===null||(E=(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>E)?!1:(nn.free(z),Pe.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Un.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return nn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),nn.free(z),a}if(x.type===Un.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return nn.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),nn.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===Un.o)return nn.free(z),this.fill===null?yh(x,a.x,a.y,b):rl(x,a,b,1<this.strokeWidth,y);Ge("Unknown Geometry type: "+x.type)},Mt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Km[rt];if(ot===void 0){var lt=Pe.Ze[rt];typeof lt=="string"&&(lt=Pe.Ze[lt]),typeof lt=="function"?(ot=lt(null,100,100),Km[rt]=ot):Ge("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,lt=tt.width;var At=tt.height;switch(Cl(this,!0)){case pn:E=x=0;break;case yn:lt=Math.max(a-z,0),At=Math.max(y-z,0);break;case vi:lt=Math.max(a-z,0),E=0;break;case Di:x=0,At=Math.max(y-z,0)}isFinite(b.width)&&(lt=b.width),isFinite(b.height)&&(At=b.height);var ft=this.maxSize,yt=this.minSize;switch(x=Math.max(x-z,yt.width),E=Math.max(E-z,yt.height),lt=Math.min(ft.width,lt),At=Math.min(ft.height,At),lt=isFinite(lt)?Math.max(x,lt):Math.max(rt,x),At=isFinite(At)?Math.max(E,At):Math.max(ot,E),x=_m(this),x){case pn:break;case yn:rt=lt,ot=At;break;case Ai:x=Math.min(lt/rt,At/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:Ge(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&Pe.$(this.ua.Sk,a-z)&&Pe.$(this.ua.Rk,y-z)||(this.ua=fr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,At+z),b.w()?(lt=b.width,At=b.height,lt=Math.min(ft.width,lt),At=Math.min(ft.height,At),lt=Math.max(yt.width,lt),At=Math.max(yt.height,At),this.dc.h(0,0,lt,At)):this.dc.assign(tt)};function _m(a){var y=a.geometryStretch;return a.Rd!==null?y===Yi?yn:y:y===Yi?Km[a.figure].defaultStretch:y}Mt.eh=function(a,y,x,E){ll(this,a,y,x,E)},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*lt+ft,tt=a*ot+y*At+yt,rt=x*rt+E*lt+ft,ot=x*ot+E*At+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Et=lt.bounds;if(At=!1,lt.type===Un.j)if(1.5>=this.strokeWidth)At=Pe.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,rt,ot,b);else{if(lt.startX===lt.endX?(E=ft,At=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),At=ft/Math.sqrt(1+y*y),E=At*y),y=ve(),a=new Xt,Pe.Ve(lt.startX+E,lt.startY+At,lt.endX+E,lt.endY+At,z,tt,rt,ot,a)&&y.push(a),a=new Xt,Pe.Ve(lt.startX-E,lt.startY-At,lt.endX-E,lt.endY-At,z,tt,rt,ot,a)&&y.push(a),a=new Xt,Pe.Ve(lt.startX+E,lt.startY+At,lt.startX-E,lt.startY-At,z,tt,rt,ot,a)&&y.push(a),a=new Xt,Pe.Ve(lt.endX+E,lt.endY+At,lt.endX-E,lt.endY-At,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Ee(y),!1;for(At=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);Ee(y)}else if(lt.type===Un.u)At=Pe.Ff(Et.x-ft,Et.y-ft,Et.x+Et.width+ft,Et.y+Et.height+ft,z,tt,rt,ot,b);else if(lt.type===Un.F){y=nn.allocAt(Et.x,Et.y,Et.width,Et.height).Bc(ft,ft);t:if(y.width===0)At=Pe.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)At=Pe.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,lt=y.height/2,E=y.x+a,At=y.y+lt,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-At-x*(z-E),0>a*a*x*x+lt*lt-ot*ot){b.x=NaN,b.y=NaN,At=!1;break t}ft=Math.sqrt(a*a*x*x+lt*lt-ot*ot),rt=(-(a*a*x*ot)+a*lt*ft)/(lt*lt+a*a*x*x)+E,a=(-(a*a*x*ot)-a*lt*ft)/(lt*lt+a*a*x*x)+E,lt=x*(rt-E)+ot+At,ot=x*(a-E)+ot+At,Math.abs((z-rt)*(z-rt))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=lt):(b.x=a,b.y=ot)}else{if(rt=lt*lt,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,At=!1;break t}ot=Math.sqrt(rt),rt=At+ot,ot=At-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}At=!0}nn.free(y)}else if(lt.type===Un.o){yt=Xt.alloc();var Tt=rt-z,It=ot-tt,qt=Tt*Tt+It*It,Gt=z,oe=tt;if(0<qt&&Et.contains(Gt,oe)&&(yt.x=Gt,yt.y=oe,this.ca(yt)))for(Tt!==0&&.5>Math.abs(Tt)?(It*=.5/Tt,Tt=.5):It!==0&&.5>Math.abs(It)&&(Tt*=.5/It,It=.5),Gt-=Tt,oe-=It;Et.contains(Gt,oe);)Gt-=Tt,oe-=It;for(b.x=rt,b.y=ot,It=0;It<lt.figures.count;It++){var le=lt.figures.s[It],ue=le.isFilled?Gt:z,ye=le.isFilled?oe:tt,Oe=le.segments;Et=le.startX,Tt=le.startY;for(var Vn=Et,ai=Tt,ii=0;ii<Oe.count;ii++){var Tn=Oe.s[ii],fn=Tn.type,tr=Tn.endX,Ki=Tn.endY,io=!1;switch(fn){case Us:Vn=tr,ai=Ki;break;case Fo:io=A0(Et,Tt,tr,Ki,ue,ye,rt,ot,yt);break;case ya:io=Pe.Eo(Et,Tt,Tn.point1X,Tn.point1Y,Tn.point2X,Tn.point2Y,tr,Ki,ue,ye,rt,ot,.6,yt);break;case vl:io=Pe.Eo(Et,Tt,Et+2/3*(Tn.point1X-Et),Tt+2/3*(Tn.point1Y-Tt),tr+2/3*(Tn.point1X-tr),Ki+2/3*(Tn.point1Y-Ki),tr,Ki,ue,ye,rt,ot,.6,yt);break;case Ls:case Yl:fn=Tn.type===Ls?cl(Tn,le):Zl(Tn,le,Et,Tt);var bo=fn.length;if(bo===0){io=A0(Et,Tt,Tn.type===Ls?Tn.centerX:Tn.endX,Tn.type===Ls?Tn.centerY:Tn.endY,ue,ye,rt,ot,yt);break}for(Ki=null,tr=0;tr<bo;tr++){if(Ki=fn[tr],tr===0&&A0(Et,Tt,Ki[0],Ki[1],ue,ye,rt,ot,yt)){var Fa=u0(ue,ye,yt,qt,b);Fa<qt&&(qt=Fa,At=!0)}Pe.Eo(Ki[0],Ki[1],Ki[2],Ki[3],Ki[4],Ki[5],Ki[6],Ki[7],ue,ye,rt,ot,.6,yt)&&(Fa=u0(ue,ye,yt,qt,b),Fa<qt&&(qt=Fa,At=!0))}tr=Ki[6],Ki=Ki[7];break;default:Ge("Unknown Segment type: "+fn)}Et=tr,Tt=Ki,io&&(io=u0(ue,ye,yt,qt,b),io<qt&&(qt=io,At=!0)),Tn.isClosed&&(tr=Vn,Ki=ai,A0(Et,Tt,tr,Ki,ue,ye,rt,ot,yt)&&(Tn=u0(ue,ye,yt,qt,b),Tn<qt&&(qt=Tn,At=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Xt.free(yt)}else Ge("Unknown Geometry type: "+lt.type);return At?(this.transform.Ga(b),!0):!1};function u0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function A0(a,y,x,E,b,z,tt,rt,ot){if(Pe.$(a,x)&&Pe.$(y,E)||Pe.$(b,tt)&&Pe.$(z,rt))return!1;var lt=!1,At=(b-tt)*(y-E)-(z-rt)*(a-x);return At===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/At,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/At,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||Pe.$(ot.y,a))&&(ot.y<y||Pe.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||Pe.$(ot.x,y))&&(ot.x<a||Pe.$(ot.x,a))&&(lt=!0)),lt)}Mt.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 E=this.strokeWidth/2,b=!1,z=Xt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Xt.free(z),b},Mt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=vr.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Xt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Xt.free(tt),!0;var rt=Xt.alloc(),ot=Xt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Cf(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Cf(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Cf(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Cf(this,tt,rt,ot)&&(y=!0)))),Xt.free(tt),vr.free(x),Xt.free(rt),Xt.free(ot),y};function Cf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Mt.tx=function(a,y,x){function E(qt,Gt){for(var oe=qt.length,le=0;le<oe;le+=2)if(Gt.zd(qt[le],qt[le+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width;if(tt=tt.y+tt.height,Oi(a.x,a.y,rt,ot)<=b&&Oi(a.x,a.y,lt,ot)<=b&&Oi(a.x,a.y,rt,tt)<=b&&Oi(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===Un.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),Tr(a.x,a.y,rt,ot,lt,tt)<=(0<=(lt-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===Un.u)return y=!1,x&&(y=Tr(a.x,a.y,rt,ot,rt,tt)<=b||Tr(a.x,a.y,rt,ot,lt,ot)<=b||Tr(a.x,a.y,lt,ot,lt,tt)<=b||Tr(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===Un.F){y=a.x-(rt+lt)/2,z=a.y-(ot+tt)/2;var At=Math.abs(lt-rt)/2,ft=Math.abs(tt-ot)/2;if(At===0||ft===0)return Tr(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=Pe.$y(At,ft,y,z),a*a<=b)return!0}else return!(Oi(y,z,-At,0)>=b||Oi(y,z,0,-ft)>=b||Oi(y,z,0,ft)>=b||Oi(y,z,At,0)>=b)}else if(y.type===Un.o){if(lt=y.bounds,z=lt.x,rt=lt.y,ot=lt.x+lt.width,lt=lt.y+lt.height,a.x>ot&&a.x<z&&a.y>lt&&a.y<rt&&Tr(a.x,a.y,z,rt,z,lt)>b&&Tr(a.x,a.y,z,rt,ot,rt)>b&&Tr(a.x,a.y,ot,lt,z,lt)>b&&Tr(a.x,a.y,ot,lt,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?yh(y,a.x,a.y,z):rl(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,At=z.startY,a.zd(tt,At)>b)return!1;for(rt=z.segments.s,ot=rt.length,lt=0;lt<ot;lt++)switch(ft=rt[lt],ft.type){case Us:case Fo:if(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b)return!1;break;case ya:var yt=ve();if(Pe.Qe(tt,At,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Ee(yt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case vl:if(yt=ve(),Pe.ep(tt,At,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Ee(yt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case Ls:case Yl:yt=ft.type===Ls?cl(ft,z):Zl(ft,z,tt,At);var Et=yt.length;if(Et===0){if(tt=ft.type===Ls?ft.centerX:ft.endX,At=ft.type===Ls?ft.centerY:ft.endY,a.zd(tt,At)>b)return!1;break}ft=null;for(var Tt=ve(),It=0;It<Et;It++)if(ft=yt[It],Tt.length=0,Pe.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Tt),E(Tt,a))return Ee(Tt),!1;Ee(Tt),ft!==null&&(tt=ft[6],At=ft[7]);break;default:Ge("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Mt.qc=function(){this.ua=null},Mt.kq=function(){return this.ig};function wy(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=pp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Ds):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ei(1-Ds.x,Ds.y)))}fr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=oc[a.toArrow];else a.fromArrow!=="None"?E=oc[a.fromArrow]:(E=Pe.Ze[a.figure],typeof E=="string"&&(E=Pe.Ze[E]),E===void 0&&Ge("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=Pe.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function Sy(a){var y=oc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=oc[x],y===void 0){var E=null,b;for(b in Pe.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Un.parse(Pe.um[E],!1),oc[E]=a,x!==E&&(oc[x]=E),E}}return typeof y=="string"?y:y instanceof Un?a:null}un.Object.defineProperties(fr.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 E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),Ua(this)&&(a=this.part,a!==null&&Qo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Un.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Xt.allocAt(-y.x,-y.y),Xt.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&&Ft(a,"Shape.fill"),a instanceof fo&&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&&Ft(a,"Shape.stroke"),a instanceof fo&&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 Zi(a,"value >= 0",fr,"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"?Zi(a,'"butt", "round", or "square"',fr,"strokeCap"):(Bf(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"?Zi(a,'"miter", "bevel", or "round"',fr,"strokeJoin"):(Bf(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){Bf(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,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||Ge("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===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&&(Bf(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=Pe.Ze[a];typeof x=="function"?x=a:(x=Pe.Ze[a.toLowerCase()])||Ge("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=Sy(a);x===null?Ge("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ec),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),wy(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=Sy(a);x===null?Ge("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ec),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),wy(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Es},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Bf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Es},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Bf(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&&(Bf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Yi},set:function(a){var y=this.geometryStretch;y!==a&&(Bf(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 sc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&UA(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 sc),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 sc),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 sc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),fr.prototype.intersectsRect=fr.prototype.Yc,fr.prototype.containedInRect=fr.prototype.fh,fr.prototype.getNearestIntersectionPoint=fr.prototype.rs,fr.prototype.getDocumentBounds=fr.prototype.mi,fr.prototype.getDocumentPoint=fr.prototype.ga;var oc=new yi,Km=new yi;fr.className="Shape",fr.getFigureGenerators=function(){var a=new hi,y;for(y in Pe.Ze)y!==y.toLowerCase()&&a.add(y,Pe.Ze[y]);return a.freeze(),a},fr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=Pe.Ze;E[a]=y,E[x]=a},fr.getArrowheadGeometries=function(){var a=new hi;for(E in Pe.um)if(oc[E]===void 0){var y=Un.parse(Pe.um[E],!1);oc[E]=y,y=E.toLowerCase(),y!==E&&(oc[y]=E)}for(var x in oc)if(x!==x.toLowerCase()){var E=oc[x];E instanceof Un&&a.add(x,E)}return a.freeze(),a},fr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Un.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ge("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=oc;E[a]=x,E[y]=a};function Gm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Yi,this.gg=this.fg=Es}Gm.prototype.copy=function(){var a=new Gm;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 Io(a,y){return we.call(this),g0||(iu=ds?new zu(null).context:null,g0=!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}be(Io,we),Io.prototype.cloneProtected=function(a){we.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 Oh(a){a.da===null?a.da=new Xm:a.da.nc&&(a.da=a.da.copy())}Mt=Io.prototype,Mt.th=function(){we.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function xy(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}Mt.qb=function(a){a.classType===Io?this.wrap=a:we.prototype.qb.call(this,a)},Mt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Mt.v=function(){we.prototype.v.call(this)},Mt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=up(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var lt=this.isStrikethrough;ls(this,a,this.xc,!0,!1,x,E),(ot||lt)&&ls(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var At=this.oe,ft=At.dx-(tt*At.m21+At.dx);At=At.dy-(tt*At.m22+At.dy);var yt=y.scale;switch(8>(ft*ft+At*At)*yt*yt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ql&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Hr:a.translate(b,0),a.scale(-1,1);break;case mr:a.translate(0,z),a.scale(1,-1);break;case vo:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),At=this.Gc,yt=(y+tt+ft)*At,z>yt&&(E=this.verticalAlignment,E=E.y*z-E.y*yt+E.offsetY),At===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,lt);else if(this.Qc!==null&&this.Qb!==null)for(yt=0;yt<At;yt++){var Et=this.Qc[yt];Et>b&&(Et=b),E+=y,this.Oj(this.Qb[yt],a,0,E,b,tt,Et,x,rt,ot,lt),E+=tt+ft}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-b,0);break;case mr:a.scale(1,-1),a.translate(0,-z);break;case vo:a.scale(-1,-1),a.translate(-b,-z)}}},Mt.Oj=function(a,y,x,E,b,z,tt,rt,ot,lt,At){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=h0!==null?h0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),lt){rt=c0!==null?c0(this,z):.8*z,ot=x+ft,lt=E+rt,b=x+ft+tt,rt=E+rt;var yt=a;y.beginPath(),y.lineWidth=yt,y.moveTo(ot,lt),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Ql&&y.ad.classList.add("gojs-td")}At&&(At=E+z-z/2.2|0,a%2!==0&&(At+=.5),E=x+ft,z=At,x=x+ft+tt,tt=At,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ql&&y.ad.classList.add("gojs-td"))}},Mt.kk=function(a,y,x){if(!we.prototype.kk.call(this,a,y,x))return!1;if(ls(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++)Xf(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Xf(a,y,!0);return!0},Mt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:we.prototype.nk.call(this,a)},Mt.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)}},Mt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;iu!==null&&My!==z&&(My=iu.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var lt=z.indexOf(`
`,rt);lt===-1&&(lt=z.length,ot=!0),rt=z.substr(rt,lt-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,_A(rt)),rt=lt+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=_A(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Cy(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===d0&&(y=this.Ae,y=this.overflow===d0?By(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,up(this)+lt),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/lt+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[ot],y=Math.max(1,a-y);_A(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=hp,y=_A(lt),this.Qb[ot]=lt,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+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===Py||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),il(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Mt.eh=function(a,y,x,E){ll(this,a,y,x,E)};function lp(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 jm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,up(a)+rt);var ot=a.overflow===d0?By(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===zm){a.Le=1;var lt=_A(y);if(ot===0||lt<=x)a.Cb=Math.max(a.Cb,lt),lp(a,y,a.Cb),E!==null&&E.h(lt,rt);else{for(z=Pg(a,tt),tt=tt.substr(z.length),y=Pg(a,tt),lt=_A(z+y);0<y.length&&lt<=x;)z+=y,tt=tt.substr(y.length),y=Pg(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=_A(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);_A(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=hp;var At=_A(z);a.Cb=At,lp(a,z,At),E!==null&&E.h(At,rt)}}else{for(ot=0,tt.length===0&&(ot=1,lp(a,tt,0));0<tt.length;){for(y=Pg(a,tt),tt=tt.substr(y.length);_A(y)>x;){var ft=1;for(lt=_A(y.substr(0,ft)),At=0;lt<=x;)ft++,At=lt,lt=_A(y.substr(0,ft));if(ft===1){var yt=lt;z=Math.max(z,lt)}else yt=At,z=Math.max(z,At);if(ft--,1>ft&&(ft=1),lp(a,y.substr(0,ft),yt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(At=Pg(a,tt),lt=_A(y+At);0<At.length&&lt<=x;)y+=At,tt=tt.substr(At.length),At=Pg(a,tt),lt=y+At,b&&(lt=lt.trim()),lt=_A(lt);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),At.length===0?(ft=lt,z=Math.max(z,lt)):(ft=At=_A(y),z=Math.max(z,At)),lp(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function Pg(a,y){if(a.wrap===Fy)return y.substr(0,1);for(var x=y.length,E=0,b=Fw;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Ey&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function _A(a){return iu===null?8*a.length:iu.measureText(a).width}function up(a){if(a.df!==null)return a.df;var y=a.Ae;if(iu===null){var x=16;return a.df=x}return Zm[y]!==void 0&&5e3>Ly?x=Zm[y]:(x=1.3*iu.measureText("M").width,Zm[y]=x,Ly++),a.df=x}function By(a){if(iu===null)return 6;if(f0[a]!==void 0&&5e3>Ym)var y=f0[a];else y=iu.measureText(hp).width,f0[a]=y,Ym++;return y}function Cy(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,up(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==zm){a.Le=0;var ot=ln.alloc();jm(a,z,y,ot),b+=ot.height,ln.free(ot),a.Gc+=a.Le}else jm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}un.Object.defineProperties(Io.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"||(Oh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:pn},set:function(a){var y=this.flip;y!==a&&(Oh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ea},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Oh(this),this.da.Yr=a,$s(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=ln.alloc();jm(this,this.ec,999999,a);var y=a.width;ln.free(a),a=Cy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),il(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:Vm},set:function(a){var y=this.wrap;y!==a&&(Oh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Wm},set:function(a){var y=this.overflow;y!==a&&(Oh(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&&Ft(a,"TextBlock.stroke"),a instanceof fo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return up(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&&(Oh(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&&(Oh(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 sc),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 sc),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 sc),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 sc),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 sc),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&&(Oh(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&&(Oh(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&&(Oh(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&&(Oh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(Oh(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&&Zi(a,"> 0",Io,"maxLines"),Oh(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 h0=null,c0=null,zm=new Te(Io,"None",0),Py=new Te(Io,"WrapFit",1),Vm=new Te(Io,"WrapDesiredSize",2),Fy=new Te(Io,"WrapBreakAll",3),Wm=new Te(Io,"OverflowClip",0),d0=new Te(Io,"OverflowEllipsis",1),Ap=new Te(Io,"FormatTrim",0),Ey=new Te(Io,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Zm=new yi,Ly=0,f0=new yi,Ym=0,hp="...",My="",iu=null,g0=!1;Io.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=pn,this.gq=Ap,this.Jq=1/0,this.$q=Wm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ea,this.$r=Vm}Xm.prototype.copy=function(){var a=new Xm;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},Io.getEllipsis=function(){return hp},Io.setEllipsis=function(a){hp=a,f0=new yi,Ym=0},Io.getBaseline=function(){return h0},Io.setBaseline=function(a){h0=a},Io.getUnderline=function(){return c0},Io.setUnderline=function(a){c0=a},Io.isValidFont=function(a){if(g0||(iu=ds?new zu(null).context:null,g0=!0),iu===null)return!0;var y=iu.font;if(a===y||a==="10px sans-serif")return!0;iu.font="10px sans-serif",iu.font=a;var x=iu.font;if(x!=="10px sans-serif")return iu.font=y,!0;iu.font="19px serif";var E=iu.font;return iu.font=a,x=iu.font,iu.font=y,x!==E},Io.FormatNone=Ey,Io.FormatTrim=Ap,Io.None=zm,Io.OverflowClip=Wm,Io.OverflowEllipsis=d0,Io.WrapBreakAll=Fy,Io.WrapDesiredSize=Vm,Io.WrapFit=Py;function sc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}sc.prototype.copy=function(){var a=new sc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},sc.className="GradElementSettings";function ru(a,y){we.call(this),this.Eg=null,this.qo="",this.Xg=os,this.Nk=yn,this.Zg=this.Hd=null,this.Mk=Zr,this.Xf=pn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var Fg;be(ru,we),ru.prototype.cloneProtected=function(a){we.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},ru.prototype.qb=function(a){a===pn||a===Ai||a===Fr?this.imageStretch=a:we.prototype.qb.call(this,a)},ru.prototype.toString=function(){return"Picture("+this.source+")#"+qr(this)};function Eg(a){a===void 0&&(a=""),a!==""?Fg[a]&&(delete Fg[a],p0--):(Fg=new yi,p0=0)}function ky(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(js(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=ve();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);Ee(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ru.prototype.hA=function(){if(this.source!==""){Eg(this.source);var a=this.source;this.source="",this.source=a}},ru.prototype.redraw=function(){this.N(),this.Uc=!0},ru.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof rd)){var b=a instanceof Ql;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var lt=ot,At=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,yt=rt,Et=this.Nk,Tt=this.Mk;switch(Et){case pn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)),yt>=E.height&&(tt=tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case yn:ft=E.width,yt=E.height;break;case Ai:case Fr:Et===Ai?(Et=Math.min(E.height/yt,E.width/ft),ft*=Et,yt*=Et):Et===Fr&&(Et=Math.max(E.height/yt,E.width/ft),ft*=Et,yt*=Et,ft>=E.width&&(z=(z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)/ft)*ot),yt>=E.height&&(tt=(tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)/yt)*rt),ot*=1/(ft/E.width),rt*=1/(yt/E.height),ft=E.width,yt=E.height)}Et=this.Df()*y.scale;var It=ft*Et*yt*Et,qt=ot*rt/It,Gt=x.__goCache;Et=null;var oe=Ew;if(!b){if(x.sq&&Gt!==void 0&&4<It&&qt>oe*oe)for(Gt.gi===null&&(Ty(Gt,4,lt,At,x),Ty(Gt,16,lt,At,x)),b=Gt.gi,lt=b.length,At=0;At<lt&&b[At].ratio*b[At].ratio<qt;At++)Et=b[At];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new zu(null).context;try{b.drawImage(this.Eg,0,0)}catch(le){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(le){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Tt.offsetX+(E.width*Tt.x-ft*Tt.x):0,Tt=yt<E.height?Tt.offsetY+(E.height*Tt.y-yt*Tt.y):0,this.flip){case Hr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case mr:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case vo:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Gt!==void 0&&Et!==null&&Et.ratio!==1){a.save(),y=Et.ratio;try{a.drawImage(Et.source,z/y,tt/y,Math.min(Et.source.width,ot/y),Math.min(Et.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Ql&&(this.bt=[z/y,tt/y,Math.min(Et.source.width,ot/y),Math.min(Et.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(le){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Ql&&(this.bt=[z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(le){this.en=!1}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case mr:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case vo:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,yt))}}}}},ru.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Cl(this,!0),tt=this.Eg,rt=this.qn,ot=0,lt=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,lt=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===yn||z===vi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===yn||z===Di?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),il(this.dc,a,y),this.Ge(0,0,a,y)},ru.prototype.eh=function(a,y,x,E){ll(this,a,y,x,E)},un.Object.defineProperties(ru.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||Ge("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&hf(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new dn),E!==null&&x&&Bc(E,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()||(js(this,!1),this.v())):x&&ky(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=Fg;if(ds){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<p0&&(Eg(),x=Fg),E=On("img"),E.hn=!0,ky(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,p0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new by),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}}}),ru.prototype.redraw=ru.prototype.redraw,ru.prototype.reloadSource=ru.prototype.hA;var p0=0,Ew=4;ru.className="Picture",Fg=new yi,ru.clearCache=Eg;function by(){this.gi=null}function Ty(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new zu(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new Ny(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}by.className="PictureCacheArray";function Ny(a,y){this.source=a,this.ratio=y}Ny.className="PictureCacheInstance";function Lg(){this.os=new Un,this.mc=null}Lg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Un,this.mc=null};function Mg(a,y,x,E,b,z){a.mc=new Js,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Lw(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Lg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Gr(Us);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Lg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Gr(Fo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function ad(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Gr(ya);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function m0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Gr(vl);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Lg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Gr(Ls);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function Mw(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Gr(Yl,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function Dy(a){var y=v0;return y!==null?(v0=null,y.reset(a),y):(y=new Lg,y.reset(a),y)}var v0=null;Lg.className="StreamGeometryContext";function pl(a,y){var x=a.toLowerCase(),E=Pe.Ze;E[a]=y,E[x]=a}pl("Rectangle",function(a,y,x){a="r"+y+","+x;var E=Pe.Mf[a];return E!==void 0||(E=new Un(Un.u),E.endX=y,E.endY=x,Pe.Nf<Pe.vm&&(Pe.Mf[a]=E,Pe.Nf++)),E}),pl("Square",function(a,y,x){a="s"+y+","+x;var E=Pe.Mf[a];return E!==void 0||(E=new Un(Un.u),E.endX=y,E.endY=x,E.defaultStretch=Ai,Pe.Nf<Pe.vm&&(Pe.Mf[a]=E,Pe.Nf++)),E}),pl("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 E="rr"+y+","+x+","+a,b=Pe.Mf[E];if(b!==void 0)return b;var z=a*Pe.wg;return b=new Un().add(new Js(a,0,!0).add(new Gr(Fo,y-a,0)).add(new Gr(ya,y,a,y-z,0,y,z)).add(new Gr(Fo,y,x-a)).add(new Gr(ya,y-a,x,y,x-z,y-z,x)).add(new Gr(Fo,a,x)).add(new Gr(ya,0,x-a,z,x,0,x-z)).add(new Gr(Fo,0,a)).add(new Gr(ya,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Ei(0,0,z,z),b.spot2=new Ei(1,1,-z,-z)),Pe.Nf<Pe.vm&&(Pe.Mf[E]=b,Pe.Nf++),b}),pl("Border","RoundedRectangle"),pl("Ellipse",function(a,y,x){a="e"+y+","+x;var E=Pe.Mf[a];return E!==void 0||(E=new Un(Un.F),E.endX=y,E.endY=x,E.spot1=Gh,E.spot2=kl,Pe.Nf<Pe.vm&&(Pe.Mf[a]=E,Pe.Nf++)),E}),pl("Circle",function(a,y,x){a="c"+y+","+x;var E=Pe.Mf[a];return E!==void 0||(E=new Un(Un.F),E.endX=y,E.endY=x,E.spot1=Gh,E.spot2=kl,E.defaultStretch=Ai,Pe.Nf<Pe.vm&&(Pe.Mf[a]=E,Pe.Nf++)),E}),pl("TriangleRight",function(a,y,x){return new Un().add(new Js(0,0).add(new Gr(Fo,y,.5*x)).add(new Gr(Fo,0,x).close())).pm(0,.25,.5,.75)}),pl("TriangleDown",function(a,y,x){return new Un().add(new Js(0,0).add(new Gr(Fo,y,0)).add(new Gr(Fo,.5*y,x).close())).pm(.25,0,.75,.5)}),pl("TriangleLeft",function(a,y,x){return new Un().add(new Js(y,x).add(new Gr(Fo,0,.5*x)).add(new Gr(Fo,y,0).close())).pm(.5,.25,1,.75)}),pl("TriangleUp",function(a,y,x){return new Un().add(new Js(y,x).add(new Gr(Fo,0,x)).add(new Gr(Fo,.5*y,0).close())).pm(.25,.5,.75,1)}),pl("Triangle","TriangleUp"),pl("Diamond",function(a,y,x){return new Un().add(new Js(.5*y,0).add(new Gr(Fo,0,.5*x)).add(new Gr(Fo,.5*y,x)).add(new Gr(Fo,y,.5*x).close())).pm(.25,.25,.75,.75)}),pl("LineH",function(a,y,x){return a=new Un(Un.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),pl("LineV",function(a,y,x){return a=new Un(Un.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),pl("None","Rectangle"),pl("BarH","Rectangle"),pl("BarV","Rectangle"),pl("MinusLine","LineH"),pl("PlusLine",function(a,y,x){return new Un().add(new Js(0,x/2,!1).add(new Gr(Fo,y,x/2)).add(new Gr(Us,y/2,0)).add(new Gr(Fo,y/2,x)))}),pl("XLine",function(a,y,x){return new Un().add(new Js(0,x,!1).add(new Gr(Fo,y,0)).add(new Gr(Us,0,0)).add(new Gr(Fo,y,x)))}),pl("LineRight",function(a,y,x){return new Un().add(new Js(.25*y,0,!1).add(new Gr(Fo,.75*y,.5*x)).add(new Gr(Fo,.25*y,x)))}),pl("LineDown",function(a,y,x){return new Un().add(new Js(0,.25*x,!1).add(new Gr(Fo,.5*y,.75*x)).add(new Gr(Fo,y,.25*x)))}),pl("LineLeft",function(a,y,x){return new Un().add(new Js(.75*y,0,!1).add(new Gr(Fo,.25*y,.5*x)).add(new Gr(Fo,.75*y,x)))}),pl("LineUp",function(a,y,x){return new Un().add(new Js(0,.75*x,!1).add(new Gr(Fo,.5*y,.25*x)).add(new Gr(Fo,y,.75*x)))}),Pe.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 Jm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Qa,this.ir=null,this.jr="",this.lr=Es,this.Gq="",this.Hq=ta,this.Pq=_s,this.Kq=xs,this.Up=null,this.Cq=127,this.zr=Xo,this.yr="gray",this.Vg=4}Jm.prototype.copy=function(){var a=new Jm;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 Li(a,y){a===void 0||a instanceof po||typeof a=="string"?vn.call(this,a):(vn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Xt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new nn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}be(Li,vn),Li.prototype.cloneProtected=function(a){vn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Mt=Li.prototype,Mt.Af=function(a){vn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Mt.toString=function(){var a=_e(this.constructor)+"#"+qr(this);return this.data!==null&&(a+="("+Sn(this.data)+")"),a};function ou(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}Mt.th=function(){vn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Mt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===Bs&&y==="elements"?b instanceof vn?HA(b,function(ot){Cv(rt.partManager,ot),Mh(rt,ot)}):Bc(rt,b):a===Qs&&y==="elements"&&(b instanceof vn?HA(b,function(ot){Pv(rt.partManager,ot,rt)}):hf(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Mt.La=function(a){if(vn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof vn&&HA(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Li.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Li.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Li.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new hi),y.Tf!==a&&(y.category=a),E.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)))}}},Li.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Li.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=ve();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Ee(y)}},Li.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof ir?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Xr))break t;xA(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=vn.Link),x.adornedObject=y)}if(x!==null){x.type===vn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(kw(this,a),y=this.adornments;y.next();)y.value.La()}},Li.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function qm(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function kw(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function y0(a){if(Hd(a)===!1){tv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Iy(a){if(a.G|=2097152,Hd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Oy(a,y,x),x=a.Ib;var E=nn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),nn.free(E),tv(a,!1)}}Li.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new vr);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Li.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Zr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Xt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Xt.free(tt)}},Li.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Li.prototype.moveTo=function(a,y,x){a=Xt.allocAt(a,y),this.move(a,x),Xt.free(a)},Li.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())},Li.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())},Li.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new hi),y.I(a)!==null)return y.I(a);var x=vn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ld(a,y,x,E){E===void 0&&(E=new Xt),x=x.Mc()?Zr:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Li.prototype.mi=function(a){return a===void 0&&(a=new nn),a.assign(this.actualBounds)},Li.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=Xt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof fr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/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 Pf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=dy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Li.prototype.arrange=function(){if(ul(this)===!1)Iy(this);else{rh(this,!1);var a=this.Ib,y=nn.alloc();y.assign(a);var x=Rd(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Oy(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Pe.B(y.width,a.width)&&Pe.B(y.height,a.height)||0<=this.vw&&this.C(16),nn.free(y),tv(this,!1)}},Mt=Li.prototype,Mt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=nn.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),nn.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||Ps(a,y)||(this instanceof Jn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Mt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Qy(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Xt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Hd(this)===!1&&ul(this)===!1&&(y0(this),Iy(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof Xr||(y=y.animationManager,y.zb&&xh(y,a,new Xt(E,b),x))}Mt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Hd(this)||ul(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}y0(this)},Mt.Av=function(){this.G&=-2097153,y0(this)};function Oy(a,y,x){var E=Uy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Hy(a,y,x,b,E):Ry(a,y,x,b,E):z?Hy(a,y,x,b,E):tt&&Ry(a,y,x,b,E),a.G|=2097152,Xt.free(E),a.Uk()}function Hy(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Xr||xh(x,a,new Xt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Xt(z,tt),y.copy()))}function Ry(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function _y(a,y,x){ev(a,!1),a instanceof Jn&&QA(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?Rd(a)?(Ju(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Mt.si=function(){return!0},Mt.Zc=function(){return!0},Mt.ph=function(){return!1},Mt.Dd=function(){return!0};function $m(a,y,x,E){y.constructor===a.constructor||jy||(jy=!0,ur('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),ur(" Old class: "+_e(a.constructor)+", new class: "+_e(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,lt=!1;a instanceof Jn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,lt=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Jn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=lt?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Li.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},Li.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},Li.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},Li.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},Li.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},Li.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},Li.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},Li.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},Li.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 Hd(a){return(a.G&32768)!==0}function tv(a,y){a.G=y?a.G|32768:a.G&-32769}function ev(a,y){a.G=y?a.G|65536:a.G&-65537}function Rd(a){return(a.G&131072)!==0}Mt=Li.prototype,Mt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function w0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Mt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Mt.N=function(){var a=this.diagram;a!==null&&!ul(this)&&!Hd(this)&&this.isVisible()&&this.Ib.w()&&a.N(Pf(this,this.Ib))},Mt.v=function(){vn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Jn&&this.labeledLink!==null&&$s(this.labeledLink),a.$b(!0))},Mt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},Mt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},Mt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Mt.oz=function(){return nv(this,this)};function nv(a,y){var x=y.containingGroup;return x!==null?1+nv(a,x):y instanceof Jn&&(y=y.labeledLink,y!==null)?nv(a,y):0}Mt.sz=function(){return Ky(this,this)};function Ky(a,y){var x=y.containingGroup;return x!==null||y instanceof Jn&&(x=y.labeledLink,x!==null)?Ky(a,x):y}Mt.Td=function(a){return a instanceof ir?iv(this,this,a):!1};function iv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!iv(a,E,x)?y instanceof Jn&&(y=y.labeledLink,y!==null)?iv(a,y,x):!1:!0}Mt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ir&&w0(y,!0),y instanceof Jn){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 Jn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ir&&w0(y,!1),y instanceof Jn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Li.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Jn&&this.isLinkLabel)},Li.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 Jn&&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 Gy(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function _d(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Xr)){if(a.add(y),y instanceof Jn){if(x&&y instanceof ir)for(var tt=y.memberParts;tt.next();)_d(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,lt=rt.toNode;ot=ot===null||a.contains(ot),lt=lt===null||a.contains(lt),(b?ot&&lt:ot||lt)&&_d(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)_d(a,y.value,x,E-1,b,z)}else if(y instanceof Nn)for(y=y.labelNodes;y.next();)_d(a,y.value,x,E,b,z)}}un.Object.defineProperties(Li.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ci: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 E=y.pc(-1,this,!0);if(0<=E&&x.cb(Qs,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Bs,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(ou(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&&DA(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Xr?this.type!==vn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:_s},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),ou(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:xs},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),ou(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&&(ou(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:ta},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),ou(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,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,ul(this)===!1&&(y0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),Qy(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,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,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Xr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Xr?this instanceof Xr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(xA(x),x=x.copy(),x!==null&&$m(this,x,y,a))):(z!==null&&z.jm(E,a),x=g1(x.partManager,E,a),x!==null&&(xA(x),x=x.copy(),x===null||x instanceof Nn||(E=this.location.copy(),$m(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){$m(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 E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},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&&(ou(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&&(ou(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&&(ou(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 Nn?(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&&(ou(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&&(ou(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&&(ou(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:Qa},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(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:Es},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ou(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&&Ge("Cannot make a Group a member of itself: "+this.toString()),Ge("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?lv(y,this):this instanceof ir&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?av(a,this):this instanceof ir&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof ir){for(x=new dn,_d(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Jn)for(E=E.linksConnected;E.next();)kg(E.value)}if(this instanceof Jn){for(x=this.linksConnected;x.next();)kg(x.value);x=this.labeledLink,x!==null&&kg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&DA(y,-1,a))}}else Ge("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&&(ou(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Jn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ou(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&&(ou(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Xo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Li.prototype.invalidateLayout=Li.prototype.C,Li.prototype.findCommonContainingGroup=Li.prototype.px,Li.prototype.isMemberOf=Li.prototype.Td,Li.prototype.findTopLevelPart=Li.prototype.sz,Li.prototype.findSubGraphLevel=Li.prototype.oz,Li.prototype.ensureBounds=Li.prototype.Va,Li.prototype.getDocumentBounds=Li.prototype.mi,Li.prototype.findObject=Li.prototype.fb,Li.prototype.moveTo=Li.prototype.moveTo,Li.prototype.invalidateAdornments=Li.prototype.Wb,Li.prototype.clearAdornments=Li.prototype.Ej,Li.prototype.removeAdornment=Li.prototype.Jf,Li.prototype.addAdornment=Li.prototype.bh,Li.prototype.findAdornment=Li.prototype.Pj,Li.prototype.updateTargetBindings=Li.prototype.La;var jy=!1;Li.className="Part",Li.LayoutNone=0,Li.LayoutAdded=1,Li.LayoutRemoved=2,Li.LayoutShown=4,Li.LayoutHidden=8,Li.LayoutNodeSized=16,Li.LayoutGroupLayout=32,Li.LayoutNodeReplaced=64,Li.LayoutStandard=127,Li.LayoutAll=16777215;function Xr(a,y){a===void 0||a instanceof po||typeof a=="string"?Li.call(this,a):(Li.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)}be(Xr,Li),Xr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Xr.prototype.updateRelationshipsFromData=function(){},Xr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Nn&&y instanceof fr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof fr&&(b.ua=a)}}},Xr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ul(a))},Xr.prototype.Zc=function(){return!1},Xr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Bs&&y==="elements"){if(b instanceof Ol)this.$a===null&&(this.$a=b);else if(b instanceof vn){var rt=b.Nl(function(ot){return ot instanceof Ol});rt instanceof Ol&&this.$a===null&&(this.$a=rt)}}else a===Qs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof vn&&this.$a.rg(E)&&(this.$a=null));Li.prototype.gk.call(this,a,y,x,E,b,z,tt)},Xr.prototype.updateAdornments=function(){},Xr.prototype.Lj=function(){},un.Object.defineProperties(Xr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Xr.className="Adornment";function rv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=ph,this.er=B0,this.Kr=this.ij=this.Nq=this.Mq=null}rv.prototype.copy=function(){var a=new rv;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 Jn(a,y){a===void 0||a instanceof po||typeof a=="string"?Li.call(this,a):(Li.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new cn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}be(Jn,Li),Jn.prototype.cloneProtected=function(a){Li.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Mt=Jn.prototype,Mt.Af=function(a){Li.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function ud(a){a.Ba===null?a.Ba=new rv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Mt.th=function(){Li.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function zy(a,y){y!==null&&(a.af===null&&(a.af=new dn),a.af.add(y))}function Vy(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Mt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},Mt.gk=function(a,y,x,E,b,z,tt){a===Bs&&y==="elements"?this.wc=null:a===Qs&&y==="elements"&&(this.wc=null),Li.prototype.gk.call(this,a,y,x,E,b,z,tt)},Mt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(ku(x.fromPort),ku(x.toPort),x.bb())}};function Wy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ku(x.fromPort),ku(x.toPort),x.bb())}}function ku(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ku(y.port)}}Mt.si=function(){return!0},Jn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Jn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Jn.prototype.isVisible=function(){if(!Li.prototype.isVisible.call(this))return!1;var a=!0,y=$h,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===$h){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Gs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===bh&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Jn.prototype.Zb=function(a){Li.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Jn.prototype.qx=function(){var a=new dn,y=new dn;return Zy(this,this,a,y),y.iterator};function Zy(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&Zy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}Jn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Qi(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Mt=Jn.prototype,Mt.Mo=function(a){a===void 0&&(a=null);var y=new Qi(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Mt.Sd=function(a){a===void 0&&(a=null);var y=new Qi(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Mt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new dn,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new dn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Bi(x):ci},Mt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new dn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Bi(x):ci},Mt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new dn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Bi(x):ci},Mt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Qi(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Mt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Qi(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function S0(a,y,x){ku(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function x0(a,y,x){ku(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.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,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):cp(y)))}function cp(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 E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Jn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Mt=Jn.prototype,Mt.Vo=function(a){Li.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},Mt.Wo=function(a){Li.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Mt.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 E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Li.prototype.Lj.call(this)},Mt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Yy(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Yy(a){a.wc===null?a.wc=new hi:a.wc.clear(),a.qm(a,function(y,x){Xy(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Xy(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function ov(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=ve()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Ee(x)}}}Mt.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 E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Mt.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 E=x.value;if(E.isTreeLink&&(a=E.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()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Mt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)w0(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;)w0(y,!1),y=y.pg();return x},Mt.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},Mt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Jn)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},Mt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new dn;return a(this,y),y},Mt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}Mt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Qi(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Mt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new cn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new cn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Bi(x):ci},Mt.wz=function(a){a===void 0&&(a=1/0);var y=new dn;return _d(y,this,!1,a,!0),y},Jn.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 dn;x.add(this),qy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===$h),y.Ue=!1}};function qy(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),qy(ot,y,x,E-1,b,z,tt)))}else $y(a,y,x,b,z,tt)}function $y(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var lt=rt.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&&lt!==a)){var At=y.contains(lt);if(At||y.add(lt),tt){var ft=x?lt.Oo():lt.Po();ot.uv=a,ft.all(function(yt){return function(Et){return Et===yt.uv||!Et.isTreeExpanded}}(ot))&&E.Aj(lt,b),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,At||$y(lt,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}Jn.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 dn;x.add(this),t1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===$h),y.Ue=!1}};function t1(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),lt={};ot.next();){var At=ot.value;if(At.isTreeLink&&(rt||At.fd||At.bb(),At=At.To(a),At!==null&&At!==a&&!y.contains(At))){if(y.add(At),!rt){At.Zb(!0),At.oh();var ft=x?At.Oo():At.Po();lt.vv=a,ft.all(function(yt){return function(Et){return Et===yt.vv||!Et.isTreeExpanded}}(lt))&&b.Cj(At,z)}(2<E||At.wasTreeExpanded)&&(At.wasTreeExpanded=!1,t1(At,y,x,E-1,b,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}un.Object.defineProperties(Jn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:B0},set:function(a){var y=this.portSpreading;y!==a&&(ud(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&&QA(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:ph},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),ud(this),this.Ba.yp=a;var x=this.diagram;x!==null&&QA(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&&(ud(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&&(ud(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&&(ud(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,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(i1(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),$s(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Yy(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}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&&(ud(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))}}}),Jn.prototype.expandTree=Jn.prototype.expandTree,Jn.prototype.collapseTree=Jn.prototype.collapseTree,Jn.prototype.findTreeParts=Jn.prototype.wz,Jn.prototype.findTreeChildrenNodes=Jn.prototype.Ou,Jn.prototype.findTreeChildrenLinks=Jn.prototype.Qo,Jn.prototype.findTreeLevel=Jn.prototype.uz,Jn.prototype.findTreeParentChain=Jn.prototype.vz,Jn.prototype.findTreeParentNode=Jn.prototype.pg,Jn.prototype.findTreeParentLink=Jn.prototype.kh,Jn.prototype.findCommonTreeParent=Jn.prototype.gz,Jn.prototype.findTreeRoot=Jn.prototype.xz,Jn.prototype.isInTreeOf=Jn.prototype.Nz,Jn.prototype.findPort=Jn.prototype.ns,Jn.prototype.findLinksTo=Jn.prototype.kz,Jn.prototype.findLinksBetween=Jn.prototype.jz,Jn.prototype.findNodesInto=Jn.prototype.Oo,Jn.prototype.findNodesOutOf=Jn.prototype.Po,Jn.prototype.findNodesConnected=Jn.prototype.Mu,Jn.prototype.findLinksInto=Jn.prototype.Sd,Jn.prototype.findLinksOutOf=Jn.prototype.Mo,Jn.prototype.findExternalTreeLinksConnected=Jn.prototype.qx,Jn.prototype.invalidateConnectedLinks=Jn.prototype.Bd,Jn.prototype.invalidateLinkBundle=Jn.prototype.Lz;var bw=new Te(Jn,"SpreadingNone",10),B0=new Te(Jn,"SpreadingEvenly",11),sv=new Te(Jn,"SpreadingPacked",12);Jn.className="Node",Jn.SpreadingNone=bw,Jn.SpreadingEvenly=B0,Jn.SpreadingPacked=sv;function ir(a,y){a===void 0||a instanceof po||typeof a=="string"?Jn.call(this,a):(Jn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new dn,this.$a=null,this.Sc=new ns,this.Sc.group=this,this.gl=new dn,this.tb=this.$p=null,y&&Object.assign(this,y)}be(ir,Jn),ir.prototype.cloneProtected=function(a){Jn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ol});y instanceof Ol?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())},Mt=ir.prototype,Mt.Af=function(a){Jn.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 Jn)x.Bd(y);else if(x instanceof Nn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Mt.gk=function(a,y,x,E,b,z,tt){if(a===Bs&&y==="elements"){if(b instanceof Ol)this.$a===null?this.$a=b:this.$a!==b&&Ge("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof vn){var rt=b.Nl(function(ot){return ot instanceof Ol});rt instanceof Ol&&(this.$a===null?this.$a=rt:this.$a!==rt&&Ge("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Qs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof vn&&this.$a.rg(E)&&(this.$a=null));Jn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Mt.Xl=function(a,y){Jn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==vn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof vn&&(a=a.Pb()),this.tb===null&&(this.tb=new nn),a.mi(this.tb),a instanceof fr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Mt.eh=function(a,y,x,E){this.nf=this.$a,Jn.prototype.eh.call(this,a,y,x,E)},Mt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Nn||y.Va()}),Jn.prototype.Va.call(this)},Mt.si=function(){if(!Jn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Jn){if(y.isVisible()&&ul(y))return!1}else if(y instanceof Nn&&y.isVisible()&&ul(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function av(a,y){if(a.Gn.add(y)){y instanceof ir&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Nn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function lv(a,y){if(a.Gn.remove(y)){y instanceof ir&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Nn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Mt.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)}Jn.prototype.Lj.call(this)},ir.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=qe(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ir.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=qe(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},ir.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Mt=ir.prototype,Mt.Bd=function(a){var y=(this.U&65536)!==0;if(Jn.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 E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(ku(x.fromPort),ku(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(ku(x.fromPort),ku(x.toPort),x.bb()))}}},Mt.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 dn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Jn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Mt.iz=function(){var a=this.Rj();a.add(this);for(var y=new dn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Jn)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Mt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new dn;return a(this,y),y},Mt.Rj=function(){var a=new dn;return _d(a,this,!0,0,!0),a.remove(this),a},Mt.Zb=function(a){Jn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ir.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();e1(this,y,a,this),a.Ue=!1}};function e1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof ir&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,e1(z,y,x,E)),z instanceof Jn)z.Bd(y),x.Aj(z,E);else if(z instanceof Nn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}ir.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();n1(this,y,a,this),a.Ue=!1}};function n1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof ir&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,n1(z,y,x,E)),z instanceof Jn)z.Bd(y),x.Cj(z,E);else if(z instanceof Nn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}ir.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Xt.alloc(),Jn.prototype.move.call(this,a,y),a=new dn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Nn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof Jn&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Nn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Av(b)&&b.bb());Xt.free(z)}},un.Object.defineProperties(ir.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Ge("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&&(ud(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&&(ud(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&&(ud(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.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&&(ud(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),ir.prototype.expandSubGraph=ir.prototype.expandSubGraph,ir.prototype.collapseSubGraph=ir.prototype.collapseSubGraph,ir.prototype.findSubGraphParts=ir.prototype.Rj,ir.prototype.findContainingGroupChain=ir.prototype.hz,ir.prototype.findExternalNodesConnected=ir.prototype.iz,ir.prototype.findExternalLinksConnected=ir.prototype.Lu,ir.prototype.ensureBounds=ir.prototype.Va,ir.className="Group";function Ol(a){we.call(this),this.yb=ml,this.ko=new nn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}be(Ol,we),Ol.prototype.cloneProtected=function(a){we.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ol.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ys(0,0,y.width,y.height,a.x,a.y)},Ol.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ir||a instanceof Xr)||Ge("Placeholder is not inside a Group or Adornment."),a instanceof ir){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(il(E,(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,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Xt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Xt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof fr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==vn.Link&&(rt=z.ga(a.category==="Selection"?ta:a.locationSpot,Xt.alloc()),a.location=rt,Xt.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(ta,Xt.alloc()),lt=nn.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(Po,a)),lt.Ye(z.ga(ZA,a)),lt.Ye(z.ga(zi,a)),il(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Xt.free(a),nn.free(lt)):(il(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ol.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ol.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ir&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=nn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof ir&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),nn.free(x),E&&y instanceof ir&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ol.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ir))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof Nn&&(!y.computesBoundsIncludingLinks||pu(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},un.Object.defineProperties(Ol.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new nr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ol.className="Placeholder";function Nn(a){Li.call(this,vn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Hl,this.Om=0,this.Qm=Hl,this.Rm=NaN,this.qj=dv,this.po=.5,this.wd=null,this.Nb=new cn().freeze(),this.Tg=this.Mg=null,this.ml=new nn,this.ua=new Un,this.u=this.o=this.Sf=this.Wf=null,this.su=new Xt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}be(Nn,Li),Nn.prototype.cloneProtected=function(a){Li.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())},Mt=Nn.prototype,Mt.Af=function(a){Li.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&&ku(y),a=a.toPort,a!==null&&ku(a)},Mt.qb=function(a){a.classType===Nn?(a.value&2)===2?this.routing=a:a===Wu||a===hd||a===Tg?this.curve=a:a===gp||a===M0||a===k0?this.adjusting=a:a!==dv&&a!==Hl&&Ge("Unknown Link enum value for a Link property: "+a):Li.prototype.qb.call(this,a)},Mt.Xc=function(){this.ba===null&&(this.ba=new Zf)},Mt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ul(a)||Hd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ul(a)||Hd(a)))},Mt.zv=function(){return!1},Mt.Av=function(){},Mt.Zc=function(){return!1},Nn.prototype.computeAngle=function(a,y,x){return Nn.computeAngle(y,x)},Nn.computeAngle=function(a,y){switch(a){default:case Hl:a=0;break;case pp:a=y;break;case mp:a=y+90;break;case vp:a=y-90;break;case fv:a=y+180;break;case b0:a=Pe.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=Pe.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=Pe.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=Pe.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Pe.bp(a)};function kg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&lv(x,a),a.Ah=y,y!==null&&av(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Mt=Nn.prototype,Mt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Li.prototype.oh.call(this)},Mt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Mt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new dn),a.wd.add(y),a.v()}Mt.Vo=function(a){if(Li.prototype.Vo.call(this,a),Ff(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}dp(this)}},Mt.Wo=function(a){if(Li.prototype.Wo.call(this,a),Ff(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,x0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||x0(x,this,E)}fp(this)}},Mt.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))},Nn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Nn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Li.prototype.move.call(this,a,!1):(a=Xt.allocAt(x.x+E,x.y+b),Li.prototype.move.call(this,a,!1),Xt.free(a)),Ad(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Nn.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},Nn.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},Nn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ms),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Wu))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()===Wu){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Pe.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Pe.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Nn.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()===Wu))return this.ua.wx(.5);if(this.computeCurve()===Wu&&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 E=this.i(x+2);return x=this.i(x+3),Pe.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Mt=Nn.prototype,Mt.i=function(a){return this.Nb.s[a]},Mt.dd=function(a,y){this.Nb.cd(a,y)},Mt.L=function(a,y,x){this.Nb.cd(a,new Xt(y,x))},Mt.Kz=function(a,y){this.Nb.Gb(a,y)},Mt.m=function(a,y,x){this.Nb.Gb(a,new Xt(y,x))},Mt.ne=function(a){this.Nb.add(a)},Mt.yf=function(a,y){this.Nb.add(new Xt(a,y))},Mt.pv=function(a){this.Nb.mb(a)},Mt.Fj=function(){this.Nb.clear()};function Ad(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 E=a.fd,b=new cn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Xt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.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),$s(a)),E?C0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Fu(tt.animationManager,a,b),a.g("points",z,b)}}Mt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Mt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,lt=ot.length,At=0;At<lt;At++){var ft=ot[At];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(At=b[z],ft=ot[z],At.x-x!==ft.x-tt||At.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Fu(x.animationManager,this,y),C0(this),this.g("points",a,y)}},Mt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function C0(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),L0(a,!1))}Mt.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())}},Mt.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()}}},Nn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(ng||(ng=new Jn,ng.desiredSize=cr,ng.Va()),this.defaultFromPoint&&(ng.location=this.defaultFromPoint,ng.Va(),y=a=ng)):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 E=this.toNode,b=null;if(E===null?(ig||(ig=new Jn,ig.desiredSize=cr,ig.Va()),this.defaultToPoint&&(ig.location=this.defaultToPoint,ig.Va(),b=E=ig)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=bg(tt),ot=bg(x),lt=y===b&&y!==null,At=this.isOrthogonal,ft=this.curve===Wu;this.Wf=lt&&!At?ft=!0:!1;var yt=this.computeAdjusting()===Hl||lt;if(!At&&!lt&&rt&&ot){if(rt=!1,!yt&&3<=z&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,yt,z-1,ot))&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,yt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),yt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=yt.x-z.x,ot=yt.y-z.y,lt=this.computeCurviness(),ft=At=0;var Et=z.x+rt/3,Tt=z.y+ot/3,It=Et,qt=Tt;Pe.B(ot,0)?qt=0<rt?qt-lt:qt+lt:(At=-rt/ot,ft=Math.sqrt(lt*lt/(At*At+1)),0>lt&&(ft=-ft),It=(0>ot?-1:1)*ft+Et,qt=At*(It-Et)+Tt),Et=z.x+2*rt/3,Tt=z.y+2*ot/3;var Gt=Et,oe=Tt;Pe.B(ot,0)?oe=0<rt?oe-lt:oe+lt:(Gt=(0>ot?-1:1)*ft+Et,oe=At*(Gt-Et)+Tt),this.Fj(),this.ne(z),this.yf(It,qt),this.yf(Gt,oe),this.ne(yt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,yt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,yt),b=this.getLinkPoint(z,yt,x,!1,!1,a,y),this.hasCurviness()?(yt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+yt/2,y=E.y+x/2,z=a,rt=y,Pe.B(x,0)?rt=0<yt?rt-tt:rt+tt:(yt=-yt/x,z=Math.sqrt(tt*tt/(yt*yt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=yt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=nn.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new Xt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new Xt),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),nn.free(rt))}else{ft=this.isAvoiding,yt&&(At&&ft||lt)&&this.Fj();var le=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,At,E,b),Et=It=Tt=0,(At||!rt||lt)&&(qt=this.computeEndSegmentLength(a,y,tt,!0),Et=this.getLinkDirection(a,y,ft,tt,!0,At,E,b),lt&&(rt||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(Et-=At?90:30,0>le&&(Et-=180)),0>Et?Et+=360:360<=Et&&(Et-=360),lt&&(qt+=Math.abs(le)*(At?1:2)),Et===0?Tt=qt:Et===90?It=qt:Et===180?Tt=-qt:Et===270?It=-qt:(Tt=qt*Math.cos(Et*Math.PI/180),It=qt*Math.sin(Et*Math.PI/180)),tt.Mc()&&lt&&(qt=y.ga(Zr,Xt.alloc()),Gt=Xt.allocAt(qt.x+1e3*Tt,qt.y+1e3*It),this.getLinkPointFromPoint(a,y,qt,Gt,!0,ft),Xt.free(qt),Xt.free(Gt))),qt=this.getLinkPoint(E,b,x,!1,At,a,y);var ue=oe=Gt=0;if(At||!ot||lt){var ye=this.computeEndSegmentLength(E,b,x,!1);ue=this.getLinkDirection(E,b,qt,x,!1,At,a,y),lt&&(ot||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(ue+=At?0:30,0>le&&(ue+=180)),0>ue?ue+=360:360<=ue&&(ue-=360),lt&&(ye+=Math.abs(le)*(At?1:2)),ue===0?Gt=ye:ue===90?oe=ye:ue===180?Gt=-ye:ue===270?oe=-ye:(Gt=ye*Math.cos(ue*Math.PI/180),oe=ye*Math.sin(ue*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(Zr,Xt.alloc()),tt=Xt.allocAt(x.x+1e3*Gt,x.y+1e3*oe),this.getLinkPointFromPoint(E,b,x,tt,!1,qt),Xt.free(x),Xt.free(tt))}x=ft,(At||!rt||lt)&&(x=new Xt(ft.x+Tt,ft.y+It)),tt=qt,(At||!ot||lt)&&(tt=new Xt(qt.x+Gt,qt.y+oe)),!yt&&!At&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,qt):!yt&&!At&&ot&&3<z&&this.adjustPoints(1,x,z-1,qt)?this.dd(0,ft):!yt&&(At?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,qt)):(this.Fj(),this.ne(ft),(At||!rt||lt)&&this.ne(x),At&&this.addOrthoPoints(x,Et,tt,ue,a,E),(At||!ot||lt)&&this.ne(tt),this.ne(qt))}return!0};function uv(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}Nn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Xt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,lt=a.m11*b,At=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+At,E=E.x*rt+E.y*lt+ft,tt=x.x*tt+x.y*ot+At,x=x.x*rt+x.y*lt+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function P0(a,y){var x=y.Zn;return x===null&&(x=new rg,x.port=y,x.node=y.part,y.Zn=x),h1(x,a)}Nn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Xt),x.sb()&&!bg(x))return y.ga(x,rt),rt;if(x.$c()){var ot=P0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===o1){var lt=P0(this,tt);if(lt!==null&&ot.Gl<lt.Gl){ot=Xt.alloc(),lt=Xt.alloc();var At=new nn(y.ga(ta,ot),y.ga(Po,lt)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,lt),(x.Hf(Da)||x.Hf(Xs))&&a.y>=At.y&&a.y<=At.y+At.height?rt.y=a.y:(x.Hf(Ka)||x.Hf(va))&&a.x>=At.x&&a.x<=At.x+At.width&&(rt.x=a.x),Xt.free(ot),Xt.free(lt)}}return rt}}return x=y.ga(F0(x),Xt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=uv(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Xt.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),Xt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Xt.free(x),rt},Nn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=P0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(Zr,Xt.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=Xt.alloc(),rt=rt.ga(Zr,x),Xt.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Xt.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),bg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},Nn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=P0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Nn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Zr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Es?Aa:y)):(a=y||this.toPort,a===null?a=Zr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Es?Aa:y)),a};function bg(a){return a===Aa||a.x===.5&&a.y===.5}function F0(a){return a.x===.5&&a.y===.5?a:Zr}Nn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Hl&&4<this.pointsCount?this.computeMidPoint(new Xt):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(Zr))},Nn.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},Nn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=vr.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&vr.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,lt=ot.length;lt--;){var At=ot[lt];if(At.visible||At===this.locationObject){var ft=At.actualBounds,yt=this.naturalBounds;if(!(ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=vr.alloc(),ft.set(tt),At instanceof vn)rt=At.Cf(a,y,x,E,b,ft);else if(this.path===At){if(At instanceof fr)if(rt=a,yt=E,At.pickable===!1)rt=!1;else if(ft.multiply(At.transform),yt)t:{var Et=rt,Tt=ft;if(At.fh(Et,Tt))rt=!0;else{if(Tt===void 0&&(Tt=At.transform,Et.Re(At.actualBounds))){rt=!0;break t}rt=Et.left,yt=Et.right;var It=Et.top;Et=Et.bottom;var qt=Xt.alloc(),Gt=Xt.alloc(),oe=Xt.alloc(),le=vr.alloc();le.set(Tt),le.bv(At.transform),le.Vj(),Gt.x=yt,Gt.y=It,Gt.transform(le),qt.x=rt,qt.y=It,qt.transform(le),Tt=!1,Cf(At,qt,Gt,oe)?Tt=!0:(qt.x=yt,qt.y=Et,qt.transform(le),Cf(At,qt,Gt,oe)?Tt=!0:(Gt.x=rt,Gt.y=Et,Gt.transform(le),Cf(At,qt,Gt,oe)?Tt=!0:(qt.x=rt,qt.y=It,qt.transform(le),Cf(At,qt,Gt,oe)&&(Tt=!0)))),vr.free(le),Xt.free(qt),Xt.free(Gt),Xt.free(oe),rt=Tt}}else rt=At.fh(rt,ft)}else rt=ca(At,a,E,ft);rt&&(yt=At,y!==null&&(yt=y(At)),yt&&(x===null||x(yt))&&b.add(yt)),vr.free(ft)}}}return z===void 0&&vr.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&vr.free(tt),!1},Nn.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?Wu:this.curve},Nn.prototype.computeCorner=function(){if(this.curve===Wu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Nn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Nn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=a1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===pp||E===b0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(Zr).ab(x.ga(Zr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Wu&&(a*=1.333)}}return a},Nn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Hl&&x.bb()}},Nn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=ve(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Ee(x)}}return a},Nn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Nn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Nn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===k0&&(b=gp)}switch(b){case M0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,lt=Math.sqrt(rt*rt+ot*ot);if(!Pe.$(lt,0)){if(Pe.$(rt,0))var At=0>ot?-Math.PI/2:Math.PI/2;else At=Math.atan(ot/Math.abs(rt)),0>rt&&(At=Math.PI-At);tt=y.x;var ft=y.y;rt=E.x-tt;var yt=E.y-ft;for(ot=Math.sqrt(rt*rt+yt*yt),Pe.$(rt,0)?yt=0>yt?-Math.PI/2:Math.PI/2:(yt=Math.atan(yt/Math.abs(rt)),0>rt&&(yt=Math.PI-yt)),lt=ot/lt,At=yt-At,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),Pe.$(y,0)||(Pe.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+At,y*=lt,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case k0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,lt=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,At=y.y,ot=E.x,yt=E.y;var Et=1;if(ot-rt!==0){var Tt=(yt-At)/(ot-rt);Et=Math.sqrt(1+1/(Tt*Tt))}else Tt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var It=y.x,qt=y.y,Gt=.5;lt!==0&&(Gt=((b-It)*(b-tt)+(z-qt)*(z-ft))/lt);var oe=b+Gt*(tt-b),le=z+Gt*(ft-z);y=Math.sqrt((It-oe)*(It-oe)+(qt-le)*(qt-le)),qt<Tt*(It-oe)+le&&(y=-y),0<Tt&&(y=-y),It=rt+Gt*(ot-rt),Gt=At+Gt*(yt-At),Tt!==0?(y=It+y/Et,this.L(a,y,Gt-(y-It)/Tt)):this.L(a,It,Gt+y)}this.dd(x,E)}return!0;case gp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,At=z.y,ft=rt,lt=At,Pe.B(b.y,z.y)?Pe.B(z.x,tt.x)?At=y.y:Pe.B(z.y,tt.y)&&(rt=y.x):Pe.B(b.x,z.x)&&(Pe.B(z.y,tt.y)?rt=y.x:Pe.B(z.x,tt.x)&&(At=y.y)),this.L(a+1,rt,At),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,At=z.y,ot=rt,yt=At,Pe.B(b.y,z.y)?Pe.B(z.x,tt.x)?At=E.y:Pe.B(z.y,tt.y)&&(rt=E.x):Pe.B(b.x,z.x)&&(Pe.B(z.y,tt.y)?rt=E.x:Pe.B(z.x,tt.x)&&(At=E.y)),this.L(x-1,rt,At),Av(this))){this.L(a+1,ft,lt),this.L(x-1,ot,yt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Nn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(Sp,Sp),ot.Bc(Sp,Sp),rt.Ye(a),ot.Ye(x);var lt=Xt.alloc(),At=Xt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(lt.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=lt.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,At.x=lt.x,At.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=lt.y)):(lt.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),At.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=lt.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(lt.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=lt.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,At.x=lt.x,At.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=lt.y)):(lt.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),At.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=lt.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(lt.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(lt.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,At.x=x.x,At.y=lt.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,At.x=lt.x)):(lt.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=lt.x,At.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),At.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),At.x=lt.x,At.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(lt.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(lt.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,At.x=x.x,At.y=lt.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,At.x=lt.x)):(lt.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=lt.x,At.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),At.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),At.x=lt.x,At.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||b===z||this.layer.isTemporary||!ff(yt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var Et=Ud(yt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Et.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&Et.Yj(Math.min(lt.x,At.x),Math.min(lt.y,At.y),Math.abs(lt.x-At.x),Math.abs(lt.y-At.y))&&Et.Yj(Math.min(At.x,ft.x),Math.min(At.y,ft.y),Math.abs(At.x-ft.x),Math.abs(At.y-ft.y)))y=!1;else{b=a,z=ft;var Tt=x=null;if(yt.isVirtualized){yt=Et.bounds.copy(),yt.Bc(-Et.Ho,-Et.Go);var It=Xt.alloc();Ng(Et,a.x,a.y)||(Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,a.x,a.y,lt.x,lt.y,It)?(x=a=It.copy(),y=It.ab(lt)):Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,At.x,At.y,It)?(x=a=It.copy(),y=It.ab(At)):Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,At.x,At.y,ft.x,ft.y,It)&&(x=a=It.copy(),y=It.ab(ft))),Ng(Et,ft.x,ft.y)||(Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,At.x,At.y,It)?(Tt=ft=It.copy(),E=At.ab(It)):Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,At.x,At.y,lt.x,lt.y,It)?(Tt=ft=It.copy(),E=lt.ab(It)):Pe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,It)&&(Tt=ft=It.copy(),E=a.ab(It))),Xt.free(It)}rt=rt.copy().ed(ot),rt.Bc(Et.Ho*Et.Os,Et.Go*Et.Os),u1(Et,a,y,ft,E,rt,!0),ot=ac(Et,ft.x,ft.y),!Et.abort&&ot>=Dg&&(l1(Et),rt.Bc(Et.Ho*Et.Hx,Et.Go*Et.Ix),u1(Et,a,y,ft,E,rt,!1),ot=ac(Et,ft.x,ft.y)),!Et.abort&&ot<Dg&&ac(Et,ft.x,ft.y)!==cd?(hv(this,Et,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?Pe.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):Pe.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=Et.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(Pe.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):Pe.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=Et.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Tt!==null&&(E===0||E===180?this.yf(z.x,Tt.y):this.yf(Tt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(At.copy())),Xt.free(lt),Xt.free(At)}},Nn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Av(a){if(a.diagram===null||!a.isAvoiding||!ff(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Ud(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function hv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,lt=ac(y,x,E),At=x,ft=E;for(b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,b!==tt&&lt>Ef&&ac(y,At,ft)!==lt-1&&(ac(y,x-rt,E)===lt-1?(b=180,At=x-rt,ft=E):ac(y,x+rt,E)===lt-1?(b=0,At=x+rt,ft=E):ac(y,x,E-ot)===lt-1?(b=270,At=x,ft=E-ot):ac(y,x,E+ot)===lt-1&&(b=90,At=x,ft=E+ot));lt>Ef&&ac(y,At,ft)===lt-1;)x=At,E=ft,b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,--lt;z?lt>Ef&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),lt>Ef&&(z=b,tt=x,At=E,b===0?(z=90,At+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,At-=ot):b===270&&(z=0,tt+=rt),ac(y,tt,At)===lt-1?hv(a,y,tt,At,z,!1,z):(tt=x,At=E,b===0?(z=270,At-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,At+=ot):b===270&&(z=180,tt-=rt),ac(y,tt,At)===lt-1&&hv(a,y,tt,At,z,!1,z))),a.yf(x,E)}Nn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Tr(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=Tr(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Nn.prototype.qc=function(){this.lk=!1,this.v()},Nn.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,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof fr&&(b.ua=this.ua)}}},Nn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Ff(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===Wu&&3<=y&&!Pe.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||Ff(this)){if(a.type=Un.o,rt=Dy(a),this.computeShortLength(!0)!==0&&(b=tg(this,b,!0,z)),Mg(rt,b.x,b.y,!1),tt===Wu&&3<=y&&!Pe.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=tg(this,b,!1,z)),ad(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Xt.allocAt(E,ot),x=Xt.alloc(),x.assign(this.i(1)),z=Xt.allocAt(E,ot),b=Xt.allocAt(E,ot),tt=this.i(0);for(var lt,At=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){lt=this.i(ft);var yt=tt,Et=lt,Tt=this.i(cv(this,lt,ft,!1));if((!Pe.$(yt.x,Et.x)||!Pe.$(Et.x,Tt.x))&&(!Pe.$(yt.y,Et.y)||!Pe.$(Et.y,Tt.y))){var It=At;isNaN(It)&&(It=this.smoothness/3);var qt=yt.x;yt=yt.y;var Gt=Et.x;Et=Et.y;var oe=Tt.x;Tt=Tt.y;var le=It*E0(qt,yt,Gt,Et);It*=E0(Gt,Et,oe,Tt),Pe.$(yt,Et)&&Pe.$(Gt,oe)&&(Gt>qt?Tt>Et?(z.x=Gt-le,z.y=Et-le,b.x=Gt+It,b.y=Et+It):(z.x=Gt-le,z.y=Et+le,b.x=Gt+It,b.y=Et-It):Tt>Et?(z.x=Gt+le,z.y=Et-le,b.x=Gt-It,b.y=Et+It):(z.x=Gt+le,z.y=Et+le,b.x=Gt-It,b.y=Et-It)),Pe.$(qt,Gt)&&Pe.$(Et,Tt)&&(Et>yt?(oe>Gt?(z.x=Gt-le,z.y=Et-le,b.x=Gt+It):(z.x=Gt+le,z.y=Et-le,b.x=Gt-It),b.y=Et+It):(oe>Gt?(z.x=Gt-le,z.y=Et+le,b.x=Gt+It):(z.x=Gt+le,z.y=Et+le,b.x=Gt-It),b.y=Et-It)),(Pe.$(qt,Gt)&&Pe.$(Gt,oe)||Pe.$(yt,Et)&&Pe.$(Et,Tt))&&(qt=.5*(qt+oe),yt=.5*(yt+Tt),z.x=qt,z.y=yt,b.x=qt,b.y=yt),(ft===1||ft===2&&Pe.$(tt.x,this.i(0).x)&&Pe.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),ad(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,lt.x-E,lt.y-ot),y.set(z),x.set(b),tt=lt}}lt=tt.x,tt=tt.y,At=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(At=tg(this,At.copy(),!1,An)),lt=.5*(lt+At.x),tt=.5*(tt+At.y),ad(rt,b.x-E,b.y-ot,lt-E,tt-ot,At.x-E,At.y-ot),Xt.free(y),Xt.free(x),Xt.free(z),Xt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=tg(this,tt.copy(),!1,An)),ad(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Xt.alloc(),z.assign(this.i(0)),b=Xt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,lt=0;ft<y;){if(ft=cv(this,z,ft,1<ft),At=this.i(ft),ft>=y-1){if(!z.D(At))this.computeShortLength(!1)!==0&&(At=tg(this,At.copy(),!1,An)),eg(this,rt,-E,-ot,z,At,x);else if(lt===0)for(ft=1;ft<y;)b.assign(z),At=this.i(ft++),eg(this,rt,-E,-ot,z,At,x),z.assign(At);break}if(lt=cv(this,At,ft+1,ft<y-3),ft=-E,qt=-ot,yt=At,Gt=this.i(lt),It=x,Pe.B(z.y,yt.y)&&Pe.B(yt.x,Gt.x))if(Tt=Math.min(tt,Math.abs(yt.x-b.x)/2),Tt=le=Math.min(Tt,Math.abs(Gt.y-yt.y)/2),Pe.B(Tt,0))eg(this,rt,ft,qt,z,yt,It),z.assign(yt);else{var ue=yt.x,ye=yt.y;Et=ue,oe=ye,yt.x>z.x?ue=yt.x-Tt:ue=yt.x+Tt,Gt.y>yt.y?oe=yt.y+le:oe=yt.y-le,Gt=Xt.allocAt(ue,ye),eg(this,rt,ft,qt,z,Gt,It),Xt.free(Gt),m0(rt,yt.x+ft,yt.y+qt,Et+ft,oe+qt),z.h(Et,oe)}else Pe.B(z.x,yt.x)&&Pe.B(yt.y,Gt.y)?(Tt=Math.min(tt,Math.abs(yt.y-b.y)/2),Tt=le=Math.min(Tt,Math.abs(Gt.x-yt.x)/2),Pe.B(le,0)?(eg(this,rt,ft,qt,z,yt,It),z.assign(yt)):(ue=yt.x,ye=yt.y,Et=ue,oe=ye,yt.y>z.y?ye=yt.y-Tt:ye=yt.y+Tt,Gt.x>yt.x?Et=yt.x+le:Et=yt.x-le,Gt=Xt.allocAt(ue,ye),eg(this,rt,ft,qt,z,Gt,It),Xt.free(Gt),m0(rt,yt.x+ft,yt.y+qt,Et+ft,oe+qt),z.h(Et,oe))):(eg(this,rt,ft,qt,z,yt,It),z.assign(yt));b.assign(At),ft=lt}Xt.free(z)}v0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=tg(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=tg(this,rt,!1,z)),a.type=Un.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function E0(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Pe.$(a,0)?y:Pe.$(y,0)?a:Math.sqrt(a*a+y*y)))}function tg(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=E0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=E0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function cv(a,y,x,E){for(var b=a.pointsCount,z=y;Pe.$(y.x,z.x)&&Pe.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Pe.$(y.x,z.x)&&!Pe.$(y.y,z.y))return x-1;for(var tt=z;Pe.$(y.x,z.x)&&Pe.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Pe.$(y.y,z.y)&&Pe.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Nn.prototype.computeJumpLength=function(){return 10};function eg(a,y,x,E,b,z,tt){if(!tt&&Ff(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],lt=0;if(a.isVisible()&&(lt=Tw(a,b,z,ot)),0<lt){if(Pe.B(b.y,z.y))if(b.x<z.x)for(var At=0;At<lt;){var ft=Math.max(b.x,Math.min(ot[At++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var yt=ft+x,Et=Math.min(ft+tt,z.x);At<lt&&(ft=ot[At],ft<Et+tt);)At++,Et=Math.min(ft+rt,z.x);ft=z.y-tt+E,Et+=x;var Tt=z.y+E;a.curve===hd?Mg(y,Et,Tt,!1):ad(y,yt,ft,Et,ft,Et,Tt)}else for(--lt;0<=lt;){for(At=Math.min(b.x,Math.max(ot[lt--]+rt,z.x+tt)),y.lineTo(At+x,z.y+E),yt=At+x,ft=Math.max(At-tt,z.x);0<=lt&&(At=ot[lt],At>ft-tt);)lt--,ft=Math.max(At-rt,z.x);At=z.y-tt+E,ft+=x,Et=z.y+E,a.curve===hd?Mg(y,ft,Et,!1):ad(y,yt,At,ft,At,ft,Et)}else if(Pe.B(b.x,z.x))if(b.y<z.y)for(At=0;At<lt;){for(ft=Math.max(b.y,Math.min(ot[At++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),yt=ft+E,ft=Math.min(ft+tt,z.y);At<lt&&(Et=ot[At],Et<ft+tt);)At++,ft=Math.min(Et+rt,z.y);Et=z.x-tt+x,Tt=z.x+x,ft+=E,a.curve===hd?Mg(y,Tt,ft,!1):ad(y,Et,yt,Et,ft,Tt,ft)}else for(--lt;0<=lt;){for(At=Math.min(b.y,Math.max(ot[lt--]+rt,z.y+tt)),y.lineTo(z.x+x,At+E),yt=At+E,At=Math.max(At-tt,z.y);0<=lt&&(ft=ot[lt],ft>At-tt);)lt--,At=Math.max(ft-rt,z.y);ft=z.x-tt+x,Et=z.x+x,At+=E,a.curve===hd?Mg(y,Et,At,!1):ad(y,ft,yt,ft,At,Et,At)}}}y.lineTo(z.x+x,z.y+E)}function Tw(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof Nn){if(ot===a)return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length;if(ot.isVisible()&&Ff(ot)){var lt=ot.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(ot)&&(lt=ot.path,lt!==null&&lt.Ed()&&Nw(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length}function Nw(a,y,x,E){for(var b=Pe.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Xt.alloc(),ot=1;ot<z;ot++){var lt=E.i(ot);if(ot<z-1){var At=E.i(ot+1);if(tt.y===lt.y&&lt.y===At.y){if(lt.x>tt.x&&At.x>=lt.x||lt.x<tt.x&&At.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===At.x&&(lt.y>tt.y&&At.y>=lt.y||lt.y<tt.y&&At.y<=lt.y))continue}t:{At=a.x;var ft=a.y,yt=y.x,Et=y.y,Tt=tt.x;tt=tt.y;var It=lt.x,qt=lt.y;if(Pe.B(At,yt)){if(!Pe.B(ft,Et)&&Pe.B(tt,qt)&&Math.min(ft,Et)<tt&&Math.max(ft,Et)>tt&&Math.min(Tt,It)<At&&Math.max(Tt,It)>At&&!Pe.B(Tt,It)){rt.x=At,rt.y=tt,At=!0;break t}}else if(Pe.B(ft,Et)&&Pe.B(Tt,It)&&Math.min(At,yt)<Tt&&Math.max(At,yt)>Tt&&Math.min(tt,qt)<ft&&Math.max(tt,qt)>ft&&!Pe.B(tt,qt)){rt.x=Tt,rt.y=ft,At=!0;break t}rt.x=0,rt.y=0,At=!1}At&&(b?x.push(rt.x):x.push(rt.y)),tt=lt}Xt.free(rt)}function Ff(a){return a=a.curve,a===Tg||a===hd}function L0(a,y){(y||Ff(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()))}Nn.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 E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof Nn&&(ot===this?z=!0:z&&r1(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof Nn&&r1(this,rt,a)}}}}};function r1(a,y,x){if(y!==null&&y.lk&&y.fd&&Ff(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Nn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Nn.prototype.isVisible=function(){if(!Li.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 E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.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},Nn.prototype.Zb=function(a){if(Li.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Nn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?gp:this.qk};function dp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];(lt.ef===y&&lt.ff===E&&lt.uf===x&&lt.vf===b||lt.ef===x&&lt.ff===b&&lt.uf===y&&lt.vf===E)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=Vy(y,x,E,b),z===null&&(z=new N0(y,E,x,b),zy(y,z),zy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Ke(y.links,a),y.Sl()))}Nn.prototype.ph=function(){return!0},un.Object.defineProperties(Nn.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&&x0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&S0(a,this,b),dp(this),this.C(1)),this.g("fromNode",y,a),kg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&ku(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&ku(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(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&&x0(y,this,x),fp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&S0(a,this,b),dp(this),this.C(1)),this.g("toNode",y,a),kg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&ku(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&ku(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(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:Es},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&&ku(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&&Zi(a,">= 0",Nn,"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:Es},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&&ku(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&&Zi(a,">= 0",Nn,"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?ci: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&&cp(this.fromNode),this.toNode!==null&&cp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof fr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===Wu&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),Pe.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);Pe.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Xt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||C0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);Pe.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):Pe.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];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 E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new cn,E=0;E<a.length/2;E++)b=new Xt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!Ln(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new cn,E=0;E<a.length;E++)b=a[E],x.add(new Xt(b.x,b.y).freeze())}}else if(a instanceof cn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ge("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),C0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Fu(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||!bg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!bg(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(),L0(this,y===hd||y===Tg||a===hd||a===Tg),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(),L0(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)}}}),Nn.prototype.invalidateOtherJumpOvers=Nn.prototype.Xo,Nn.prototype.findClosestSegment=Nn.prototype.ez,Nn.prototype.updateRoute=Nn.prototype.vg,Nn.prototype.invalidateRoute=Nn.prototype.bb,Nn.prototype.rollbackRoute=Nn.prototype.rv,Nn.prototype.commitRoute=Nn.prototype.zf,Nn.prototype.startRoute=Nn.prototype.uh,Nn.prototype.clearPoints=Nn.prototype.Fj,Nn.prototype.removePoint=Nn.prototype.pv,Nn.prototype.addPointAt=Nn.prototype.yf,Nn.prototype.addPoint=Nn.prototype.ne,Nn.prototype.insertPointAt=Nn.prototype.m,Nn.prototype.insertPoint=Nn.prototype.Kz,Nn.prototype.setPointAt=Nn.prototype.L,Nn.prototype.setPoint=Nn.prototype.dd,Nn.prototype.getPoint=Nn.prototype.i,Nn.prototype.getOtherPort=Nn.prototype.Cz,Nn.prototype.getOtherNode=Nn.prototype.To;var ng=null,ig=null,dv=new Te(Nn,"Normal",1),Dw=new Te(Nn,"Orthogonal",2),Iw=new Te(Nn,"AvoidsNodes",6),o1=new Te(Nn,"AvoidsNodesStraight",7),Hl=new Te(Nn,"None",0),Wu=new Te(Nn,"Bezier",9),hd=new Te(Nn,"JumpGap",10),Tg=new Te(Nn,"JumpOver",11),gp=new Te(Nn,"End",17),M0=new Te(Nn,"Scale",18),k0=new Te(Nn,"Stretch",19),pp=new Te(Nn,"OrientAlong",21),mp=new Te(Nn,"OrientPlus90",22),vp=new Te(Nn,"OrientMinus90",23),fv=new Te(Nn,"OrientOpposite",24),b0=new Te(Nn,"OrientUpright",25),yp=new Te(Nn,"OrientPlus90Upright",26),wp=new Te(Nn,"OrientMinus90Upright",27),T0=new Te(Nn,"OrientUpright45",28),s1=16,a1=14,Sp=8;Nn.className="Link",Nn.Normal=dv,Nn.Orthogonal=Dw,Nn.AvoidsNodes=Iw,Nn.AvoidsNodesStraight=o1,Nn.None=Hl,Nn.Bezier=Wu,Nn.JumpGap=hd,Nn.JumpOver=Tg,Nn.End=gp,Nn.Scale=M0,Nn.Stretch=k0,Nn.OrientAlong=pp,Nn.OrientPlus90=mp,Nn.OrientMinus90=vp,Nn.OrientOpposite=fv,Nn.OrientUpright=b0,Nn.OrientPlus90Upright=yp,Nn.OrientMinus90Upright=wp,Nn.OrientUpright45=T0,Nn.EndSegmentStep=8,Nn.CurvinessStart=s1,Nn.SpacingMin=a1,Nn.OrthoShortCut=Sp;function N0(a,y,x,E){or(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}N0.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},N0.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))}},N0.className="LinkBundle";function xp(a){or(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}xp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=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((E+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=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=gv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Ng(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ac(a,y,x){return Ng(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):gv}function l1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=Ef&&(x[E]=gv)}xp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<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 b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===cd)return!1}return!0};function lc(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var lt=y|0,At=x|0,ft=a.ac[lt][At];if(ft>=Ef&&ft<Dg)for(b?At+=E:lt+=E,ft+=1;z<=lt&&lt<=tt&&rt<=At&&At<=ot&&!(ft>=a.ac[lt][At]);)a.ac[lt][At]=ft,ft+=1,b?At+=E:lt+=E;if(lt=b?At:lt,b)if(0<E)for(x+=E;x<lt;x+=E)lc(a,y,x,1,!b,z,tt,rt,ot),lc(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>lt;x+=E)lc(a,y,x,1,!b,z,tt,rt,ot),lc(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<lt;y+=E)lc(a,y,x,1,!b,z,tt,rt,ot),lc(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>lt;y+=E)lc(a,y,x,1,!b,z,tt,rt,ot),lc(a,y,x,-1,!b,z,tt,rt,ot)}}function D0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=cd,At=Ef;for(a.ac[y][x]=At;lt===cd&&y>z&&y<tt&&x>rt&&x<ot;)At+=1,a.ac[y][x]=At,b?x+=E:y+=E,lt=a.ac[y][x]}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=cd,At=Dg;for(a.ac[y][x]=At;lt===cd&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=At,b?x+=E:y+=E,lt=a.ac[y][x]}function u1(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Ng(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var lt=E.x,At=E.y;if(Ng(a,lt,At))if(lt-=a.Nd,lt/=a.rc,At-=a.Od,At/=a.sc,1>=Math.abs(rt-lt)&&1>=Math.abs(ot-At))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var yt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,yt-=a.Od,yt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),yt=Math.min(a.ei,Math.max(0,yt|0)),E=a.ac,rt|=0,ot|=0,lt|=0,At|=0;var Et=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===cd?(D0(a,rt,ot,Et,x,z,y,ft,yt),D0(a,rt,ot,1,!x,z,y,ft,yt),D0(a,rt,ot,-1,!x,z,y,ft,yt)):D0(a,rt,ot,Et,x,rt,ot,rt,ot),E[lt][At]===cd?(I0(a,lt,At,b===0||b===90?1:-1,b===90||b===270,z,y,ft,yt),I0(a,lt,At,1,!(b===90||b===270),z,y,ft,yt),I0(a,lt,At,-1,!(b===90||b===270),z,y,ft,yt)):I0(a,lt,At,Et,x,lt,At,lt,At),x=ve(),tt&&A1(a,lt,At,b,rt,ot,x))for((x[0]!==lt||x[1]!==At)&&(x.unshift(At),x.unshift(lt)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=Ef,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>b?b++:y<b?b--:lt>tt?tt++:lt<tt&&tt--,E[b][tt]=a++,b!==y||tt!==lt;);else lc(a,rt,ot,1,!1,z,y,ft,yt),lc(a,rt,ot,-1,!1,z,y,ft,yt),lc(a,rt,ot,1,!0,z,y,ft,yt),lc(a,rt,ot,-1,!0,z,y,ft,yt);Ee(x)}}}}function A1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,lt=x;;){if(ot===b&&lt===z)return!0;var At=ot,ft=lt;if(E===0)if(At<b)At++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(At>b)At--;else break;else if(ft>z)ft--;else break;var yt=rt[At][ft];if(yt===0||yt===pv)break;ot=At,lt=ft}for(;;){if(At=E,ft=ot,yt=lt,E===0?yt<z?(At=90,yt++):yt>z&&(At=270,yt--):E===90?ft<b?(At=0,ft++):ft>b&&(At=180,ft--):E===180?yt<z?(At=90,yt++):yt>z&&(At=270,yt--):ft<b?(At=0,ft++):ft>b&&(At=180,ft--),ft=rt[ft][yt],At!==E&&ft!==0&&ft!==pv){if(tt.push(ot),tt.push(lt),A1(a,ot,lt,At,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][lt]=pv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(lt===x)return!1;lt--}else if(E===180){if(ot===y)return!1;ot++}else{if(lt===x)return!1;lt++}}}un.Object.defineProperties(xp.prototype,{bounds:{get:function(){return new nn(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 cd=0,Ef=1,Dg=999999,gv=Dg+1,pv=Dg+2;xp.className="PositionArray";function rg(){or(this),this.port=this.node=null,this.pe=[],this.ap=!1}rg.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function Uw(a,y,x,E){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 E&&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}rg.prototype.Sl=function(){this.pe.length=0};function h1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof ir?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(ta,Xt.alloc()),ot=a.port.ga(Po,Xt.alloc());for(b=nn.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Xt.free(rt),Xt.free(ot),rt=Xt.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&&lt.fromPort!==lt.toPort){var At=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),ft=lt.computeSpot(At,a.port);if(ft.$c()&&(At=At?lt.toPort:lt.fromPort,At!==null)){var yt=At.part;if(yt!==null){var Et=yt.findVisibleNode();Et!==null&&Et!==yt&&(yt=Et,At=yt.port),At=lt.computeOtherPoint(yt,At),yt=rt.ab(At),yt-=ot,0>yt?yt+=360:360<=yt&&(yt-=360),ft=Uw(b,ft,yt,lt.isOrthogonal),ft===0?(ft=4,180<yt&&(yt-=360)):ft===90?(ft=8,270<yt&&(yt-=360)):ft===180?ft=2:(ft=1,90>yt&&(yt+=360)),Et=a.pe[z],Et===void 0?(Et=new mv(lt,yt,ft),a.pe[z]=Et):(Et.link=lt,Et.angle=yt,Et.Nc=ft),Et.hv.set(At),z++}}}}for(Xt.free(rt),a.pe.sort(rg.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Xt.alloc(),ot=Xt.alloc(),tt=Xt.alloc(),lt=Xt.alloc(),ft.ga(ta,rt),ft.ga(ZA,ot),ft.ga(Po,tt),ft.ga(zi,lt),Et=yt=At=ft=0,E===sv)for(var Tt=0;Tt<z.length;Tt++){var It=z[Tt];if(It!==null){var qt=It.link.computeThickness();switch(It.Nc){case 8:yt+=qt;break;case 2:Et+=qt;break;case 1:ft+=qt;break;default:case 4:At+=qt}}}var Gt=Tt=0,oe=1,le=It=0;for(qt=0;qt<z.length;qt++){var ue=z[qt];if(ue!==null){if(Tt!==ue.Nc){switch(Tt=ue.Nc,Tt){case 8:var ye=tt;Gt=lt;break;case 2:ye=lt,Gt=rt;break;case 1:ye=rt,Gt=ot;break;default:case 4:ye=ot,Gt=tt}switch(It=Gt.x-ye.x,le=Gt.y-ye.y,Tt){case 8:yt>Math.abs(It)?(oe=Math.abs(It)/yt,yt=Math.abs(It)):oe=1;break;case 2:Et>Math.abs(le)?(oe=Math.abs(le)/Et,Et=Math.abs(le)):oe=1;break;case 1:ft>Math.abs(It)?(oe=Math.abs(It)/ft,ft=Math.abs(It)):oe=1;break;default:case 4:At>Math.abs(le)?(oe=Math.abs(le)/At,At=Math.abs(le)):oe=1}Gt=0}var Oe=ue.Zo;if(E===sv){switch(ue=ue.link.computeThickness(),ue*=oe,Oe.set(ye),Tt){case 8:Oe.x=ye.x+It/2+yt/2-Gt-ue/2;break;case 2:Oe.y=ye.y+le/2+Et/2-Gt-ue/2;break;case 1:Oe.x=ye.x+It/2-ft/2+Gt+ue/2;break;default:case 4:Oe.y=ye.y+le/2-At/2+Gt+ue/2}Gt+=ue}else{var Vn=.5;E===B0&&(Vn=(ue.Uo+1)/(ue.Gl+1)),Oe.x=ye.x+It*Vn,Oe.y=ye.y+le*Vn}}}for(Xt.free(rt),Xt.free(ot),Xt.free(tt),Xt.free(lt),ye=a.pe,z=0;z<ye.length;z++)E=ye[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,nn.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}rg.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},rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Aa,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},rg.className="Knot";function mv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Xt,this.Gl=this.Uo=0,this.Zo=new Xt,this.Ju=0}mv.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()},mv.className="LinkInfo";function ns(a){or(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Xt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ns.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},ns.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ns.prototype.qb=function(){},ns.prototype.toString=function(){var a=_e(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ns.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())}}},ns.prototype.createNetwork=function(){return new Uo(this)},ns.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Ue?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ir?y.lg(a.memberParts):y.lg(a.iterator),y},ns.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")}},ns.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()}},ns.prototype.doLayout=function(a){var y=new dn;a instanceof Ue?(Kd(this,y,a.nodes,!0,this.rh,!0,!1,!0),Kd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ir?Kd(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},ns.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;Bp(rt);var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof ir&&(rt.rh=!1),E+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},ns.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,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof Nn)&&(Bp(rt),this.rh(rt))){var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof ir&&(rt.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},ns.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ir&&a.rh)};function Kd(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof Jn?ot.isLinkLabel||(ot instanceof ir&&ot.layout===null?Kd(a,y,ot.memberParts,!1,b,z,tt,rt):(Bp(ot),y.add(ot))):tt&&ot instanceof Nn?y.add(ot):!rt||!ot.Zc()||ot instanceof Jn||(Bp(ot),y.add(ot)))}}function Bp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ns.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new nn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ns.prototype.ex=function(a){var y=new dn;return a instanceof Ue?(Kd(this,y,a.nodes,!0,null,!0,!0,!0),Kd(this,y,a.links,!0,null,!0,!0,!0),Kd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ir?Kd(this,y,a.memberParts,!1,null,!0,!0,!0):Kd(this,y,a.iterator,!1,null,!0,!0,!0),y},ns.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(ta),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},un.Object.defineProperties(ns.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())}}}),ns.prototype.collectParts=ns.prototype.ex,ns.prototype.getLayoutBounds=ns.prototype.ni,ns.prototype.invalidateLayout=ns.prototype.C,ns.className="Layout";function Uo(a){or(this),this.Sc=a,this.wf=new dn,this.ye=new dn,this.Es=new hi,this.zs=new hi}Uo.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 dn,this.ye=new dn,this.Es=new hi,this.zs=new hi},Uo.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},Uo.prototype.createVertex=function(){return new ga(this)},Uo.prototype.createEdge=function(){return new bu(this)},Uo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof Jn)return!tt.isLinkLabel;if(tt instanceof Nn){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Jn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof ir&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Nn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},Uo.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},Mt=Uo.prototype,Mt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Mt.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},Mt.Iu=function(a){if(a!==null&&c1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function c1(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}Mt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Mt.ki=function(a){return a===null?null:this.Es.I(a)},Mt.Bo=function(a){if(a!==null){vv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function vv(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}}Mt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Mt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),yv(this,a)}};function yv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Mt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Mt.Lo=function(a){return a===null?null:this.zs.I(a)},Mt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Mt.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))}},Mt.Ko=function(){for(var a=ve(),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]);Ee(a)},Uo.prototype.deleteArtificialVertexes=function(){for(var a=ve(),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=ve(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Ee(a),Ee(y)};function Qw(a){for(var y=ve(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Ee(y)}Uo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Qw(this),this.Ko()),a=new cn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),wv(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function wv(a,y,x){if(x!==null&&x.network!==y){c1(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(yv(a,b),vv(y,b),wv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(yv(a,x),vv(y,x),wv(a,y,x.toVertex))}}Uo.prototype.dz=function(){for(var a=new dn,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},un.Object.defineProperties(Uo.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}}}),Uo.prototype.findAllParts=Uo.prototype.dz,Uo.prototype.splitIntoSubNetworks=Uo.prototype.Zx,Uo.prototype.deleteSelfEdges=Uo.prototype.Ko,Uo.prototype.reverseEdge=Uo.prototype.gm,Uo.prototype.linkVertexes=Uo.prototype.Zj,Uo.prototype.findEdge=Uo.prototype.Lo,Uo.prototype.deleteLink=Uo.prototype.Yy,Uo.prototype.deleteEdge=Uo.prototype.Mj,Uo.prototype.addLink=Uo.prototype.Dy,Uo.prototype.addEdge=Uo.prototype.Bo,Uo.prototype.findVertex=Uo.prototype.ki,Uo.prototype.deleteNode=Uo.prototype.Zy,Uo.prototype.deleteVertex=Uo.prototype.Iu,Uo.prototype.addNode=Uo.prototype.Bl,Uo.prototype.addVertex=Uo.prototype.dh,Uo.prototype.addParts=Uo.prototype.lg,Uo.className="LayoutNetwork";function ga(a){or(this),this.ob=a,this.j=new nn(0,0,10,10).freeze(),this.o=new Xt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new cn,this.mg=new cn}ga.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new cn,this.mg=new cn},ga.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+qr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},ga.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ln(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof ir)){x=nn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Zr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),nn.free(x);return}nn.free(x)}a.moveTo(y.x,y.y)}},ga.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ga.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ga.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ga.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function Sv(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}un.Object.defineProperties(ga.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,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,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=nn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),nn.free(x),!(a instanceof ir)&&(a=a.locationObject.ga(Zr),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/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 dn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new dn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new dn,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 cn,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}}}),ga.prototype.deleteDestinationEdge=ga.prototype.Jl,ga.prototype.addDestinationEdge=ga.prototype.zl,ga.prototype.deleteSourceEdge=ga.prototype.Kl,ga.prototype.addSourceEdge=ga.prototype.Cl,ga.className="LayoutVertex",ga.standardComparer=Sv,ga.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 E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}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 bu(a){or(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}bu.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},bu.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+qr(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},bu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},bu.prototype.commit=function(){},bu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},un.Object.defineProperties(bu.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)}}}),bu.prototype.getOtherVertex=bu.prototype.Ax,bu.className="LayoutEdge";function Ha(a){ns.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=Cp,this.Rb=Q0,this.nd=Pp,this.hd=d1,a&&Object.assign(this,a)}be(Ha,ns),Ha.prototype.cloneProtected=function(a){ns.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===Pp||a===H0||a===xv||a===O0?this.sorting=a:a===Q0||a===sh?this.arrangement=a:a===Cp||a===U0?this.alignment=a:Ge("Unknown enum value: "+a):ns.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 E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof ir)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case O0:b.reverse();break;case Pp:b.sort(this.comparer);break;case H0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case U0:var rt=y,ot=x,lt=nn.alloc(),At=Math.max(this.cellSize.width,1);if(!isFinite(At))for(var ft=At=0;ft<b.length;ft++){var yt=this.ni(b[ft],lt);At=Math.max(At,yt.width)}if(At=Math.max(At+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(yt=ft=0;yt<b.length;yt++){var Et=this.ni(b[yt],lt);ft=Math.max(ft,Et.height)}ft=Math.max(ft+ot,1),yt=this.arrangement;for(var Tt=Et=this.arrangementOrigin.x,It=this.arrangementOrigin.y,qt=0,Gt=0,oe=0;oe<b.length;oe++){var le=b[oe],ue=this.ni(le,lt),ye=Math.ceil((ue.width+rt)/At)*At,Oe=Math.ceil((ue.height+ot)/ft)*ft;switch(yt){case sh:var Vn=Math.abs(Tt-ue.width);break;default:Vn=Tt+ue.width}switch((0<z&&qt>z-1||0<tt&&0<qt&&Vn-Et>tt)&&(E.push(new nn(0,It,tt+rt,Gt)),qt=0,Tt=Et,It+=Gt,Gt=0),Gt=Math.max(Gt,Oe),yt){case sh:ue=-ue.width;break;default:ue=0}switch(le.moveTo(Tt+ue,It),yt){case sh:Tt-=ye;break;default:Tt+=ye}qt++}E.push(new nn(0,It,tt+rt,Gt)),nn.free(lt);break;case Cp:for(ot=tt,At=z,ft=y,yt=x,tt=nn.alloc(),Et=Math.max(this.cellSize.width,1),z=It=lt=0,rt=Xt.alloc(),Tt=0;Tt<b.length;Tt++)Gt=b[Tt],qt=this.ni(Gt,tt),Gt=ld(Gt,Gt.locationObject,Gt.locationSpot,rt),lt=Math.max(lt,Gt.x),It=Math.max(It,qt.width-Gt.x),z=Math.max(z,Gt.y);switch(Tt=this.arrangement,Tt){case sh:lt+=ft;break;default:It+=ft}Et=isFinite(Et)?Math.max(Et+ft,1):Math.max(lt+It,1);var ai=Gt=this.arrangementOrigin.x;for(oe=this.arrangementOrigin.y,It=0,ot>=lt&&(ot-=lt),lt=le=0,ye=Math.max(this.cellSize.height,1),ue=z=0,Oe=!0,qt=Xt.alloc(),Vn=0;Vn<b.length;Vn++){var ii=b[Vn],Tn=this.ni(ii,tt),fn=ld(ii,ii.locationObject,ii.locationSpot,rt);if(0<It)switch(Tt){case sh:ai=(ai-Gt-(Tn.width-fn.x))/Et,ai=Pe.$(Math.round(ai),ai)?Math.round(ai):Math.floor(ai),ai=ai*Et+Gt;break;default:ai=(ai-Gt+fn.x)/Et,ai=Pe.$(Math.round(ai),ai)?Math.round(ai):Math.ceil(ai),ai=ai*Et+Gt}else switch(Tt){case sh:le=ai+fn.x+Tn.width;break;default:le=ai-fn.x}switch(Tt){case sh:var tr=-(ai+fn.x)+le;break;default:tr=ai+Tn.width-fn.x-le}if(0<At&&It>At-1||0<ot&&0<It&&tr>ot){for(E.push(new nn(0,Oe?oe-z:oe,ot+ft,ue+z+yt)),ai=0;ai<It&&Vn!==It;ai++){tr=b[Vn-It+ai];var Ki=ld(tr,tr.locationObject,tr.locationSpot,qt);tr.moveTo(tr.position.x,tr.position.y+z-Ki.y)}ue+=yt,oe=Oe?oe+ue:oe+(ue+z),It=ue=z=0,ai=Gt,Oe=!1}switch(ai===Gt&&(lt=Tt===sh?Math.max(lt,Tn.width-fn.x):Math.min(lt,-fn.x)),z=Math.max(z,fn.y),ue=Math.max(ue,Tn.height-fn.y),isFinite(ye)&&(ue=Math.max(ue,Math.max(Tn.height,ye)-fn.y)),Oe?ii.moveTo(ai-fn.x,oe-fn.y):ii.moveTo(ai-fn.x,oe),Tt){case sh:ai-=fn.x+ft;break;default:ai+=Tn.width-fn.x+ft}It++}if(E.push(new nn(0,oe,ot+ft,(Oe?ue:ue+z)+yt)),b.length!==It)for(ot=0;ot<It;ot++)At=b[b.length-It+ot],ft=ld(At,At.locationObject,At.locationSpot,rt),At.moveTo(At.position.x,At.position.y+z-ft.y);if(Xt.free(rt),Xt.free(qt),Tt===sh)for(b=0;b<E.length;b++)z=E[b],z.width+=lt,z.x-=lt;else for(b=0;b<E.length;b++)z=E[b],z.x>lt&&(z.width+=z.x-lt,z.x=lt);nn.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===sh?this.commitLayers(E,new Xt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Xt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ha.prototype.commitLayers=function(){};function d1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}un.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!==Cp&&a!==U0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Q0&&a!==sh||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==xv&&a!==O0&&a!==Pp&&a!==H0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var U0=new Te(Ha,"Position",0),Cp=new Te(Ha,"Location",1),Q0=new Te(Ha,"LeftToRight",2),sh=new Te(Ha,"RightToLeft",3),xv=new Te(Ha,"Forward",4),O0=new Te(Ha,"Reverse",5),Pp=new Te(Ha,"Ascending",6),H0=new Te(Ha,"Descending",7);Ha.className="GridLayout",Ha.standardComparer=d1,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 E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Ha.Position=U0,Ha.Location=Cp,Ha.LeftToRight=Q0,Ha.RightToLeft=sh,Ha.Forward=xv,Ha.Reverse=O0,Ha.Ascending=Pp,Ha.Descending=H0;function yo(){this.On=new dn,this.Dn=new dn,this.Pa=new dn,this.cf=new hi,this.bf=new hi,this.aj=new hi,this.H=null,this.tp=!1}Mt=yo.prototype,Mt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Mt.Xe=function(a){this.H=a},Mt.oi=function(a){if(a instanceof Jn){if(this.On.add(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof Nn?this.Dn.add(a):a instanceof Xr||this.Pa.add(a);y=a.data,y===null||a instanceof Xr||(a instanceof Nn?this.bf.add(y,a):this.cf.add(y,a))},Mt.pc=function(a){if(a.Ej(),a instanceof Jn){if(this.On.remove(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof Nn?this.Dn.remove(a):a instanceof Xr||this.Pa.remove(a);y=a.data,y===null||a instanceof Xr||(a instanceof Nn?this.bf.remove(y):this.cf.remove(y))},Mt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof ir)&&Ge('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof ir||Ge('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Nn||Ge('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=ve(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=ve(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=ve(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Ee(y),Ee(x),Ee(a)}},yo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},yo.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&f1(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Id(this.diagram,!1)};function f1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=g1(a,y,E);if(b!==null&&(xA(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}yo.prototype.insertLink=function(){return null},yo.prototype.resolveReferencesForData=function(){},yo.prototype.Ro=function(a){return this.H.model.Ro(a)};function g1(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(v1||(v1=!0,ur('No Group template found for category "'+x+'"'),ur(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,ur('No Node template found for category "'+x+'"'),ur(" Using default node template")),y=a.ny))),y}yo.prototype.getLinkCategoryForData=function(){return""},yo.prototype.setLinkCategoryForData=function(){},yo.prototype.setFromNodeForLink=function(){},yo.prototype.setToNodeForLink=function(){},yo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(y1||(y1=!0,ur('No Link template found for category "'+a+'"'),ur(" Using default link template")),x=y.my)),x},yo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},yo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},yo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Of(this.diagram,a,!1),this.unresolveReferencesForPart(a))},yo.prototype.unresolveReferencesForPart=function(){},yo.prototype.removeDataForLink=function(){},yo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},yo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Jn?a:null)},yo.prototype.findLinkForKey=function(){return null},Mt=yo.prototype,Mt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Mt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Jn?a:null)},Mt.Kc=function(a){return a===null?null:this.bf.I(a)},Mt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new dn;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ln(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},Mt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new dn;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ln(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator};function Bv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Ui(z)){if(!Ui(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!p1(a,b[tt],rt))return!1}}else if(!p1(a,b,z))return!1}return!0}function p1(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(Ln(y)&&Ln(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}yo.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 E=a.modelChange;if(E!=="")if(x===Oo){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Bs){var tt=a.newValue;E==="nodeDataArray"&&Ln(tt)&&f1(this,tt),y.isModified=!0}else if(x===Qs){var rt=a.oldValue;E==="nodeDataArray"&&Ln(rt)&&this.ip(rt),y.isModified=!0}else x===ol&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Oo){var ot=a.propertyName,lt=a.object;lt===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,ot),y.isModified=!0}else if(x===Bs||x===Qs){var At=a.change===Bs,ft=At?a.newParam:a.oldParam,yt=At?a.newValue:a.oldValue,Et=this.aj.I(a.object);if(Array.isArray(Et))for(a=0;a<Et.length;a++){var Tt=Et[a];if(At)r0(Tt,yt,ft,!0);else if(!(0>ft)){var It=ft+sp(Tt);Tt.pc(It,!0),Qm(Tt,It,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},yo.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)},yo.prototype.rp=function(){for(var a=this.H.model,y=new dn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){L1(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&E1(a,z,!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()},yo.prototype.refreshDataBoundLinks=function(){},yo.prototype.updateRelationshipsFromData=function(){},yo.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 E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=ve()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Ee(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(Ui(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function Pv(a,y,x){HA(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)hf(x,tt[ot])});var E=y.Hh;if(Ui(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}yo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new hi;if(Ui(a))for(var b=0;b<a.length;b++)R0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)R0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new dn;for(var z=new hi,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Nn)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof Jn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var lt=rt.pg();lt!==null&&(lt=E.I(lt),lt!==null?(x.qe(ot.data,x.wa(lt.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var At=new hi;E.each(function(ft){ft.key.data!==null&&At.add(ft.key.data,ft.value.data)}),x(At,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function R0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Li))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Jn){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof ir&&z instanceof ir)for(y=y.memberParts;y.next();)tt=R0(a,y.value,x,E,b),tt instanceof Nn||tt===null||(tt.containingGroup=z)}else if(y instanceof Nn&&z instanceof Nn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=R0(a,y.value,x,E,b),tt!==null&&tt instanceof Jn&&(tt.labeledLink=z);return z}yo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Nn||(E=b.copyNodeData(E),Ln(E)&&(b.xf(E),x=y.Lc(E)))}else xA(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Nn||(b=y.copyNodeData(E)),Ln(b)&&(x.data=b)));return x},un.Object.defineProperties(yo.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}}}),yo.prototype.updateAllRelationshipsFromData=yo.prototype.rp,yo.prototype.findLinksByExample=yo.prototype.ls,yo.prototype.findNodesByExample=yo.prototype.ms,yo.prototype.findLinkForData=yo.prototype.Kc,yo.prototype.findNodeForData=yo.prototype.ii,yo.prototype.findPartForData=yo.prototype.Lc,yo.prototype.findNodeForKey=yo.prototype.Vb,yo.prototype.removeModeledPart=yo.prototype.ip,yo.prototype.removeModeledParts=yo.prototype.Gs,yo.prototype.rebuildParts=yo.prototype.Wd;var m1=!1,v1=!1,y1=!1;yo.className="PartManager";function ba(a){yo.apply(this,arguments)}be(ba,yo),ba.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},ba.prototype.addModeledParts=function(a){for(yo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)kg(a.value);Id(this.diagram,!1)};function w1(a,y){y.forEach(function(x){S1(a,x)}),Id(a.diagram,!1)}function S1(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){xA(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=j0(x,y,!0);z!==""&&(b.fromPortId=z),z=Zu(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Jn&&(b.fromNode=z)),z=j0(x,y,!1),z!==""&&(b.toPortId=z),z=Zu(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Jn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}ba.prototype.removeAllModeledParts=function(){var a=this.diagram.model;x1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function x1(a,y){y.forEach(function(x){a.ip(x)})}ba.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ba.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ba.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ba.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ba.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ba.prototype.findPartForKey=function(a){var y=yo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ba.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ba.prototype.doModelChanged=function(a){var y=this;if(yo.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Oo){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var At=a.newValue;typeof At=="string"&&(lt.fromPortId=At)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var yt=a.newValue;typeof yt=="string"&&(ft.toPortId=yt)}}else if(b==="nodeGroupKey"){var Et=this.Lc(a.object);if(Et!==null){var Tt=a.newValue;if(Tt!==void 0){var It=this.Vb(Tt);It instanceof ir?Et.containingGroup=It:Et.containingGroup=null}else Et.containingGroup=null}}else if(b==="linkLabelKeys"){var qt=this.Kc(a.object);if(qt!==null){var Gt=a.oldValue,oe=a.newValue;Array.isArray(Gt)&&Gt.forEach(function(fn){0<=oe.indexOf(fn)||(fn=y.Vb(fn),fn!==null&&(fn.labeledLink=null))}),Array.isArray(oe)&&oe.forEach(function(fn){fn=y.Vb(fn),fn!==null&&(fn.labeledLink=qt)})}}else if(b==="linkCategory"){var le=this.Kc(a.object),ue=a.newValue;le!==null&&typeof ue=="string"&&(le.category=ue)}else b==="linkDataArray"&&(x1(this,a.oldValue),w1(this,a.newValue));x.isModified=!0}else if(E===Bs){var ye=a.newValue;if(b==="linkDataArray"&&typeof ye=="object"&&ye!==null)S1(this,ye);else if(b==="linkLabelKeys"&&jd(ye)){var Oe=this.Kc(a.object),Vn=this.Vb(ye);Oe!==null&&Vn!==null&&(Vn.labeledLink=Oe)}x.isModified=!0}else if(E===Qs){var ai=a.oldValue;if(b==="linkDataArray"&&typeof ai=="object"&&ai!==null)this.ip(ai);else if(b==="linkLabelKeys"&&jd(ai)){var ii=this.Vb(ai);ii!==null&&(ii.labeledLink=null)}x.isModified=!0}}else if(E===Oo){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}}}}},ba.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new dn,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){D1(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&N1(y,z,!1)})},ba.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Nn){var b=Zu(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=Zu(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new dn().addAll(y);var tt=new dn;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Xr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof ir)&&(a.containingGroup=y)}}},ba.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof ir&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Jn&&(Zu(y,tt,!0)===x&&(z.link.fromNode=b),Zu(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}lh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ir&&(b.containingGroup=a))}},ba.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Jn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)ah(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&ah(y,x,E.data)),a instanceof ir)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&ah(y,x,E)}}},ba.prototype.copyPartData=function(a,y){var x=yo.prototype.copyPartData.call(this,a,y);if(a instanceof Nn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.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},ba.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof Nn){if(xA(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof Jn&&(xA(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&Ug(z,E,z.wa(a.data),!0),Qg(z,E,rt,!0),x!==null&&Ug(z,E,z.wa(x.data),!1),Qg(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof Jn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},ba.prototype.findLinkForKey=ba.prototype.findLinkForKey,ba.prototype.findPartForKey=ba.prototype.findPartForKey,ba.prototype.removeAllModeledParts=ba.prototype.removeAllModeledParts,ba.prototype.addModeledParts=ba.prototype.addModeledParts,ba.prototype.addAllModeledParts=ba.prototype.addAllModeledParts,ba.className="GraphLinksPartManager";function lA(){yo.apply(this,arguments),this.Sg=null}be(lA,yo);function _0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!eo(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(xA(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}lA.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},lA.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},lA.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},lA.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},lA.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},lA.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},lA.prototype.doModelChanged=function(a){if(yo.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 E=a.modelChange;if(E!==""){if(x===Oo){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:_0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),lt=a.newValue;if(ot!==null&&typeof lt=="string"){var At=ot.kh();At!==null&&(At.category=lt)}}y.isModified=!0}}else if(x===Oo){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},lA.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Jn&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:_0(this,y,a):E!==null&&Of(x,E,!1)))}}},lA.prototype.updateDataBindings=function(a,y){yo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},lA.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof Jn&&y.mh(z)===x&&_0(this,b,this.ii(z))}lh(y,x)}a=y.mh(a),a!==void 0&&b instanceof Jn&&(a=this.Vb(a),_0(this,a,b))}},lA.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Jn){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Qs,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&ah(y,x,b)}},lA.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},lA.prototype.findLinkForKey=lA.prototype.findLinkForKey,lA.className="TreePartManager";function pi(a,y){this.kl=new dn,this.il=new dn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,or(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new hi,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 hi,this.Lt=new cn,this.Wg=!1,this.o=null,this.undoManager=new ts,a!==void 0&&(Ui(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}pi.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},pi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},pi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},pi.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sn(b)}}return y},pi.prototype.xA=function(a){a.change!==ol&&Ge("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof ra?(C1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},pi.prototype.Qv=function(a,y){var x=this,E=!1,b=new dn,z=new dn,tt=new dn,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Bs?b.add(ft.newValue):ft.change===Qs&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Oo||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(yt){x.lb(yt)&&z.add(yt)}):ft.object instanceof pi||x.ri()&&x.Jc(ft.object)||P1(x,ft.object).each(function(yt){z.add(yt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var lt=this.kl;lt.clear(),tt.each(function(ft){lt.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var At=null;return E&&(At===null&&(At={}),At.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(At===null&&(At={}),y?At.removedNodeKeys=ot.Fa():At.insertedNodeKeys=ot.Fa()),0<a.length&&(At===null&&(At={}),At.modifiedNodeData=a),0<lt.count&&(At===null&&(At={}),y?At.insertedNodeKeys=lt.Fa():At.removedNodeKeys=lt.Fa()),lt.clear(),ot.clear(),At},pi.prototype.cloneDeep=function(a){return Ig(this,a,!0)};function Ig(a,y,x,E,b,z){function tt(ft,yt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,yt)):(ft=rs++,E.set(ft,yt),b.set(ft,y))}if(!Ln(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new hi),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new hi),ot=b.iterator;ot.next();){var lt=ot.key;if(ot.value===y&&(lt=E.get(lt)))return lt}if(Array.isArray(y)){ot=[],tt(y,ot);for(var At=0;At<y.length;At++)ot.push(Ig(a,y[At],!1,E,b,z))}else if(y instanceof Xt||y instanceof ln||y instanceof nn||y instanceof nr||y instanceof Ei)ot=y.copy(),tt(y,ot);else{if(y instanceof fo||y instanceof Un||y instanceof Te)return y;if(y instanceof cn)ot=new cn().addAll(Ig(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof dn)ot=new dn().addAll(Ig(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof hi)ot=new hi().addAll(Ig(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(At in ot={},tt(y,ot),y)At!=="__gohashid"&&(ot[At]=Ig(a,y[At],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Mt=pi.prototype,Mt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Mt.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},Mt.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 B1(a,y){y=y.modelData,Ln(y)&&(a.dm(y),a.modelData=y)}Mt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!F1(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Fv(this,this.modelData)),a+`,
"nodeDataArray": `+Gd(this,this.nodeDataArray,!0)},Mt.kv=function(a){B1(this,a),a=a.nodeDataArray,Ui(a)&&(this.dm(a),this.nodeDataArray=a)};function C1(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new dn,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new hi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Oo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Bs||z===Qs)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new dn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];K0(a,y,b,b,x)}return x}function K0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}else if(Ln(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}return!1}Mt.Pv=function(a,y){var x=this,E=!1,b=new dn,z=new dn,tt=new dn,rt=this.vh;a.changes.each(function(At){At.model===x&&(At.modelChange==="nodeDataArray"?At.change===Bs?b.add(At.newValue):At.change===Qs&&tt.add(At.oldValue):x.lb(At.object)?z.add(At.object):At.change!==Oo||x.modelData!==At.object&&At.propertyName!=="modelData"?At.object!==null&&(rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){x.lb(ft)&&z.add(ft)}):At.object instanceof pi||x.ri()&&x.Jc(At.object)||P1(x,At.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(At){ot.add(x.wa(At)),y||z.add(At)});var lt=this.kl;return lt.clear(),tt.each(function(At){lt.add(x.wa(At)),y&&z.add(At)}),a="",E&&(a+=`,
"modelData": `+Fv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+Gd(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+Gd(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+Gd(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Mt.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)&&Ge("applyIncrementalJson cannot change Model properties"),B1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new hi;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Mt.$x=function(a,y){a.change!==ol&&Ge("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof ra?(y===void 0&&(y=Ep(this,this)),C1(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 }'},Mt.yA=function(a,y){return this.$x(a,y)},Mt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Mt.toJSON=function(a){return this.np(a)},Mt.Zw=function(a){var y=null;if(typeof a=="string")try{y=ee.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Ge("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ge("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Mt.Ky=function(a){return this.Zw(a)},pi.constructGraphLinksModel=function(){return new pi},Mt=pi.prototype,Mt.dm=function(a){if(Ui(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ln(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Ge("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ln(a)){for(y in a)if(x=a[y],Ln(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new cn,E=0;E<x.length/2;E++)b.add(new Xt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},Mt.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()):Ui(a)?Gd(this,a):Ln(a)?Fv(this,a):typeof a=="function"?"null":a.toString()};function Gd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Ri;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function F1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Rl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Fv(a,y){var x=y;if(x instanceof Xt)y={class:"go.Point",x:Rl(x.x),y:Rl(x.y)};else if(x instanceof ln)y={class:"go.Size",width:Rl(x.width),height:Rl(x.height)};else if(x instanceof nn)y={class:"go.Rect",x:Rl(x.x),y:Rl(x.y),width:Rl(x.width),height:Rl(x.height)};else if(x instanceof nr)y={class:"go.Margin",top:Rl(x.top),right:Rl(x.right),bottom:Rl(x.bottom),left:Rl(x.left)};else if(x instanceof Ei)x.sb()?y={class:"go.Spot",x:Rl(x.x),y:Rl(x.y),offsetX:Rl(x.offsetX),offsetY:Rl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof fo){if(y={class:"go.Brush",type:x.type.name},x.type===Dr?y.color=x.color:(x.type===lr||x.type===wr)&&(y.start=x.start,y.end=x.end,x.type===wr&&(x.startRadius!==0&&(y.startRadius=Rl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Rl(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof Un?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Rl(x.startX)),x.startY!==0&&(y.startY=Rl(x.startY)),x.endX!==0&&(y.endX=Rl(x.endX)),x.endY!==0&&(y.endY=Rl(x.endY)),x.spot1.D(ta)||(y.spot1=x.spot1),x.spot2.D(Po)||(y.spot2=x.spot2),x.type===Un.o&&(y.path=Un.ia(x))):x instanceof Te&&(y={class:"go.EnumValue",classType:Ep(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Rs(y,b);if(!F1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof cn){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function _l(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ow(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 Xt(_l(a.x),_l(a.y));else if(y==="Size")x=new ln(_l(a.width),_l(a.height));else if(y==="Rect")x=new nn(_l(a.x),_l(a.y),_l(a.width),_l(a.height));else if(y==="Margin")x=new nr(_l(a.top),_l(a.right),_l(a.bottom),_l(a.left));else if(y==="Spot")typeof a.enum=="string"?x=pc(a.enum):x=new Ei(_l(a.x),_l(a.y),_l(a.offsetX),_l(a.offsetY));else if(y==="Brush"){if(x=new fo,x.type=Mi(fo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ei&&(x.start=a.start),a.end instanceof Ei&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=_l(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=_l(a.endRadius)),a=a.colorStops,Ln(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Un.parse(a.path):x=new Un,x.type=Mi(Un,a.type),typeof a.startX=="number"&&(x.startX=_l(a.startX)),typeof a.startY=="number"&&(x.startY=_l(a.startY)),typeof a.endX=="number"&&(x.endX=_l(a.endX)),typeof a.endY=="number"&&(x.endY=_l(a.endY)),a.spot1 instanceof Ei&&(x.spot1=a.spot1),a.spot2 instanceof Ei&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=Mi(E,a.name)));return x}Mt.Pe=function(a){return this.Lt.add(a),this},Mt.ik=function(a){this.Lt.remove(a)},Mt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Mt.cb=function(a,y,x,E,b,z,tt){ua(this,"",a,y,x,E,b,z,tt)},Mt.g=function(a,y,x,E,b){ua(this,"",Oo,a,this,y,x,E,b)},Mt.Fs=function(a,y,x,E,b,z){ua(this,"",Oo,y,a,x,E,b,z)};function ua(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var lt=new Jo;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=E,lt.object=b,lt.oldValue=z,lt.oldParam=rt,lt.newValue=tt,lt.newParam=ot,a.ds(lt)}pi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Oo){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),$o(x,E,b)}else a.change===Bs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ln(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Ke(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Fe(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Ui(E)&&a.propertyName&&(E=Rs(a.object,a.propertyName)),Ui(E)&&typeof x=="number"&&(a=a.newValue,y?Ke(E,x):Fe(E,x,a))):Ge("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Qs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ln(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Fe(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Ke(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Ui(E)&&a.propertyName&&(E=Rs(a.object,a.propertyName)),Ui(E)&&typeof x=="number"&&(a=a.oldValue,y?Fe(E,x,a):Ke(E,x))):Ge("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ol&&Ge("unknown ChangedEvent: "+a.toString())},pi.prototype.Ea=function(a){return this.undoManager.Ea(a)},pi.prototype.eb=function(a){return this.undoManager.eb(a)},pi.prototype.Kf=function(){return this.undoManager.Kf()},pi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Mt=pi.prototype,Mt.La=function(a,y){y===void 0&&(y=""),ua(this,"SourceChanged",ol,y,a,null,null)},Mt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Rs(a,y),y!==void 0)){if(jd(y))return y;Ge("Key value for node data "+a+" is not a number or a string: "+y)}}},Mt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Rs(a,x);E!==y&&this.hc(y)===null&&($o(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),ua(this,"nodeKey",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else $o(a,x,y)}};function jd(a){return typeof a=="number"||typeof a=="string"}Mt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Mt.hc=function(a){return a===null&&Ge("Model.findNodeDataForKey:key must not be null"),a!==void 0&&jd(a)?this.kb.I(a):null},Mt.$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 E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;$o(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;$o(a,y,x)}}}}},Mt.xf=function(a){a!==null&&(is(a),this.lb(a)||E1(this,a,!0))};function E1(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&Ge("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Fe(a.Tc,E,y)),ua(a,"nodeDataArray",Bs,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Mt.Fy=function(a){if(Ui(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)},Mt.cm=function(a){a!==null&&L1(this,a,!0)};function L1(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Ke(a.Tc,E)}ua(a,"nodeDataArray",Qs,"nodeDataArray",a,y,null,E,null),a.qp(y)}Mt.nA=function(a){if(Ui(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)},Mt.$z=function(a){if(a!==this.nodeDataArray&&Ui(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Mt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof dn&&this.Vf.add(y,a))},Mt.Lv=function(){},Mt.fm=function(){},Mt.em=function(){},Mt.qp=function(){};function ah(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new dn,a.Vf.add(y,E)),E.add(x)}}function lh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof dn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Fp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof dn?a:null)}Mt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},pi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):G0(this,a,!0),Ln(a)&&or(a),a};function G0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=G0(a,y[x],a.copiesArrayObjects);E.push(b)}return or(E),E}if(x&&Ln(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Rs(y,E),tt=Ep(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof pi||z instanceof ts||z instanceof ra||z instanceof Jo||(z=G0(a,z,!1)),$o(x,E,z)}return or(x),x}return y instanceof Xt||y instanceof ln||y instanceof nn||y instanceof Ei||y instanceof nr?y.copy():y}pi.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!M1&&a instanceof we&&(M1=!0,ur('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ur(" Is that really your intent?"));var E=Rs(a,y);E!==x&&($o(a,y,x),this.Fs(a,y,E,x))},Mt=pi.prototype,Mt.set=function(a,y,x){this.setDataProperty(a,y,x)},Mt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Mt.Ay=function(a,y){this.ts(a,-1,y)},Mt.ts=function(a,y,x){0>y&&(y=a.length),Fe(a,y,x),ua(this,"",Bs,"",a,null,x,null,y)},Mt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ge("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ke(a,y),ua(this,"",Qs,"",a,x,null,y,null)},Mt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Rs(a,y),y===void 0))return"";if(typeof y=="string")return y;Ge("getCategoryForNodeData found a non-string category for "+a+": "+y)},Mt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Rs(a,x);E===void 0&&(E=""),E!==y&&($o(a,x,y),ua(this,"nodeCategory",Oo,x,a,E,y))}else $o(a,x,y)}},Mt.lm=function(a,y){this.jm(y,this.Ro(a))},Mt.Tl=function(){return!1},Mt.Wj=function(){return!1},Mt.ri=function(){return!1},Mt.xs=function(){return!1},Mt.Xj=function(){return!1};function Ev(){return new pi}function Ep(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 Ep(a,y.constructor);return typeof y}function Lv(a){return KA[a]?KA[a]:ee.go!==void 0&&ee.go[a]?ee.go[a]:null}function Rs(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(E){}return x}function $o(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(E){}}un.Object.defineProperties(pi.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===""&&Ge("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ge("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,E=0;E<x;E++){var b=a[E];Ln(b)||Ge("Model.nodeDataArray must only contain Objects, not: "+b),is(b)}for(this.Tc=a,E=new cn,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(ua(this,"nodeDataArray",Oo,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);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"}}}),pi.prototype.setCategoryForNodeData=pi.prototype.jm,pi.prototype.getCategoryForNodeData=pi.prototype.Ro,pi.prototype.removeArrayItem=pi.prototype.ov,pi.prototype.insertArrayItem=pi.prototype.ts,pi.prototype.addArrayItem=pi.prototype.Ay,pi.prototype.assignAllDataProperties=pi.prototype.Do,pi.prototype.set=pi.prototype.set,pi.prototype.clearUnresolvedReferences=pi.prototype.Qy,pi.prototype.mergeNodeDataArray=pi.prototype.$z,pi.prototype.removeNodeDataCollection=pi.prototype.nA,pi.prototype.removeNodeData=pi.prototype.cm,pi.prototype.addNodeDataCollection=pi.prototype.Fy,pi.prototype.addNodeData=pi.prototype.xf,pi.prototype.makeNodeDataKeyUnique=pi.prototype.$u,pi.prototype.findNodeDataForKey=pi.prototype.hc,pi.prototype.containsNodeData=pi.prototype.lb,pi.prototype.setKeyForNodeData=pi.prototype.km,pi.prototype.getKeyForNodeData=pi.prototype.wa,pi.prototype.updateTargetBindings=pi.prototype.La,pi.prototype.commit=pi.prototype.commit,pi.prototype.rollbackTransaction=pi.prototype.Kf,pi.prototype.commitTransaction=pi.prototype.eb,pi.prototype.startTransaction=pi.prototype.Ea,pi.prototype.raiseDataChanged=pi.prototype.Fs,pi.prototype.raiseChanged=pi.prototype.g,pi.prototype.raiseChangedEvent=pi.prototype.cb,pi.prototype.removeChangedListener=pi.prototype.ik,pi.prototype.addChangedListener=pi.prototype.Pe,pi.prototype.writeJsonValue=pi.prototype.sm,pi.prototype.replaceJsonObjects=pi.prototype.dm,pi.prototype.applyIncrementalJSON=pi.prototype.Ky,pi.prototype.applyIncrementalJson=pi.prototype.Zw,pi.prototype.toJSON=pi.prototype.toJSON,pi.prototype.toJson=pi.prototype.np,pi.prototype.toIncrementalJSON=pi.prototype.yA,pi.prototype.toIncrementalJson=pi.prototype.$x,pi.prototype.toIncrementalData=pi.prototype.xA,pi.prototype.clear=pi.prototype.clear;var M1=!1,KA={};pi.className="Model",pi.fromJSON=pi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ee.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Ge("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Lv(E)):(b=Lv(E),b===null&&(b=ee[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof pi?y=a:Ge("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=pi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},pi.safePropertyValue=Rs,pi.safePropertySet=$o,KA.Brush=fo,KA.ChangedEvent=Jo,KA.Geometry=Un,KA.Margin=nr,KA.Panel=vn,KA.Point=Xt,KA.Rect=nn,KA.Size=ln,KA.Spot=Ei,KA.Transaction=ra,KA.UndoManager=ts;function zs(a,y,x,E){or(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,E===void 0?(this.el=b1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new dn}zs.prototype.copy=function(){var a=new zs;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},Mt=zs.prototype,Mt.qb=function(a){a.classType===zs&&(this.mode=a)},Mt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Mt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Mt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function k1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Mt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")ur("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Rs(y,E)),z!==void 0)if(b===null)x!==""&&$o(a,x,z);else try{if(x!==""){var tt=b(z,a);$o(a,x,tt)}else b(z,a)}catch(rt){}}}},Mt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=Rs(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):$o(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var lt=E.itemIndex,At=E.panel.itemArray;ot.ov(At,lt),ot.ts(At,lt,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):$o(y,x,ft)}else{var yt=z(tt,y,ot);if(yt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Et=E.itemIndex,Tt=E.panel.itemArray;ot.ov(Tt,Et),ot.ts(Tt,Et,yt)}}}catch(It){}}finally{this.st.remove(a)}}}},un.Object.defineProperties(zs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Si(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Si(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Si(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Si(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Si(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Si(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Si(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Si(this),this.el=a}}}),zs.prototype.updateSource=zs.prototype.sp,zs.prototype.updateTarget=zs.prototype.Mv,zs.prototype.ofModel=zs.prototype.dA,zs.prototype.ofObject=zs.prototype.cp,zs.prototype.makeTwoWay=zs.prototype.Kx;var Hw="Binding",b1=new Te(zs,"OneWay",1),Lp=new Te(zs,"TwoWay",2);zs.className="Binding",zs.parseEnum=function(a,y){return function(x){return x=Mi(a,x),x===null?y:x}},zs.toString=Sn,zs.OneWay=b1,zs.TwoWay=Lp;function Rr(a,y,x){pi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new dn,this.wb=new hi,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&&(Ui(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}be(Rr,pi),Rr.constructGraphLinksModel=pi.constructGraphLinksModel,Rr.prototype.cloneProtected=function(a){pi.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},Mt=Rr.prototype,Mt.clear=function(){pi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Mt.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,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sn(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+Zu(this,b,!0)+"-->"+Zu(this,b,!1)}return y},Mt.Qv=function(a,y){this.linkKeyProperty===""&&Ge("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=pi.prototype.Qv.call(this,a,y),E=this,b=new dn,z=new dn,tt=new dn,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Bs?b.add(At.newValue):At.change===Qs&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof pi||E.lb(At.object)||T1(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var lt=this.kl;return lt.clear(),tt.each(function(At){lt.add(E.Ac(At)),y&&z.add(At)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),ot.clear(),x},Mt.rm=function(){var a=pi.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},Mt.gp=function(a){pi.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)},Mt.Rv=function(){var a=pi.prototype.Rv.call(this),y=`,
"linkDataArray": `+Gd(this,this.linkDataArray,!0);return a+y},Mt.kv=function(a){pi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function T1(a,y){for(var x=new dn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}Mt.Pv=function(a,y){this.linkKeyProperty===""&&Ge("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=pi.prototype.Pv.call(this,a,y),E=this,b=new dn,z=new dn,tt=new dn,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Bs?b.add(At.newValue):At.change===Qs&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof pi||E.lb(At.object)||T1(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var lt=this.kl;return lt.clear(),tt.each(function(At){lt.add(E.Ac(At)),y&&z.add(At)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+Gd(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+Gd(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+Gd(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Mt.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)&&Ge("applyIncrementalJson cannot change Model properties"),pi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);I1(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Rr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Oo){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),$o(x,E,b);return}}else if(a.change===Bs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ln(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Qs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ln(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}pi.prototype.changeState.call(this,a,y)}},Mt=Rr.prototype,Mt.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),$o(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Mt.yx=function(a){return Zu(this,a,!0)},Mt.wv=function(a,y){Ug(this,a,y,!0)},Mt.Bx=function(a){return Zu(this,a,!1)},Mt.Bv=function(a,y){Ug(this,a,y,!1)};function Zu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Rs(y,a),a!==void 0))){if(jd(a))return a;Ge((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ug(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Rs(y,b);z!==x&&(lh(a,z,y),$o(y,b,x),a.hc(x)===null&&ah(a,x,y),ua(a,E?"linkFromKey":"linkToKey",Oo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else $o(y,b,x)}}Mt.zx=function(a){return j0(this,a,!0)},Mt.xv=function(a,y){Qg(this,a,y,!0)},Mt.Cx=function(a){return j0(this,a,!1)},Mt.Cv=function(a,y){Qg(this,a,y,!1)};function j0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Rs(y,a),y===void 0?"":y)}function Qg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Rs(y,b);z===void 0&&(z=""),z!==x&&($o(y,b,x),ua(a,E?"linkFromPortId":"linkToPortId",Oo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else $o(y,b,x)}}Mt.Ef=function(a){if(a===null)return z0;var y=this.je;return y===""?z0:(a=Rs(a,y),a===void 0?z0:a)},Mt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Rs(a,x);if(E===void 0&&(E=z0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)lh(this,E[z],a);for($o(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&ah(this,tt,a)}ua(this,"linkLabelKeys",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},Mt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Rs(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&ah(this,y,a),ua(this,"linkLabelKeys",Bs,x,a,null,y,null,b)))}else Ge(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Mt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Rs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(lh(this,y,a),ua(this,"linkLabelKeys",Qs,x,a,y,null,b,null)))}else E!==void 0&&Ge(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Mt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Rs(a,y),y!==void 0)){if(jd(y))return y;Ge("Key value for link data "+a+" is not a number or a string: "+y)}}},Mt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Rs(a,x);E!==y&&this.jh(y)===null&&($o(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),ua(this,"linkKey",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},Mt.jh=function(a){return a===null&&Ge("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&jd(a)?this.wb.I(a):null},Mt.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 E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;$o(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;$o(a,y,x)}}}}},Mt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Mt.fi=function(a){a!==null&&(is(a),this.Jc(a)||N1(this,a,!0))};function N1(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&Ge("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),ua(a,"linkDataArray",Bs,"linkDataArray",a,null,y,null,E),Mv(a,y)}Mt.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)},Mt.bm=function(a){a!==null&&D1(this,a,!0)};function D1(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(ua(a,"linkDataArray",Qs,"linkDataArray",a,y,null,E,null),x=Zu(a,y,!0),lh(a,x,y),x=Zu(a,y,!1),lh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],lh(a,x,y)}Mt.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)},Mt.Zz=function(a){if(this.linkKeyProperty===""&&Ge("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Ui(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),I1(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function Mv(a,y){var x=Zu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&ah(a,x,y),x=Zu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&ah(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&ah(a,x,y)}Mt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):G0(this,a,!0),Ln(a)&&(or(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},Mt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Rs(a,y)},Mt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Rs(a,y),y!==void 0)){if(jd(y))return y;Ge("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Rs(a,x);E!==y&&(lh(this,E,a),$o(a,x,y),this.hc(y)===null&&ah(this,y,a),ua(this,"nodeGroupKey",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},Rr.prototype.copyNodeData=function(a){return a===null?null:(a=pi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Rs(a,this.Je)===void 0||$o(a,this.Je,void 0),a)},Rr.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){Ug(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ug(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Qg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Qg(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 E=Rs(a,y);E!==x&&($o(a,y,x),this.Fs(a,y,E,x))},Mt=Rr.prototype,Mt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&Rs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Mt.jp=function(a,y){pi.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 E=x.value,b=a,z=y;if(Zu(this,E,!0)===b){var tt=this.lf;$o(E,tt,z),ua(this,"linkFromKey",Oo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(Zu(this,E,!1)===b&&(tt=this.mf,$o(E,tt,z),ua(this,"linkToKey",Oo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,lt=0;lt<rt;lt++)tt[lt]===b&&(tt[lt]=z,ua(this,"linkLabelKeys",Bs,ot,E,b,z,lt,lt))}},Mt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;$o(a,E,x),ua(this,"nodeGroupKey",Oo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Mt.Lv=function(){pi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},Mt.fm=function(a){pi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=ve();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;ua(this,"nodeGroupKey",Oo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(Zu(this,E,!0)===a&&(b=this.lf,ua(this,"linkFromKey",Oo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),Zu(this,E,!1)===a&&(b=this.mf,ua(this,"linkToKey",Oo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(ua(this,"linkLabelKeys",Bs,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)lh(this,a,x[y]);Ee(x)}},Mt.em=function(a){pi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&ah(this,y,a)},Mt.qp=function(a){pi.prototype.qp.call(this,a);var y=this.lh(a);lh(this,y,a)},Mt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Rs(a,y),y===void 0))return"";if(typeof y=="string")return y;Ge("getCategoryForLinkData found a non-string category for "+a+": "+y)},Rr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Rr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Rs(a,x);E===void 0&&(E=""),E!==y&&($o(a,x,y),ua(this,"linkCategory",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},Rr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Mt=Rr.prototype,Mt.lm=function(a,y){pi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function I1(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))}Mt.Wj=function(){return!0},Mt.ri=function(){return!0},Mt.xs=function(){return!0},Mt.Xj=function(){return!0},un.Object.defineProperties(Rr.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,E=0;E<x;E++){var b=a[E];Ln(b)||Ge("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),is(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new cn,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new dn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,ua(this,"linkDataArray",Oo,"linkDataArray",this,y,a),y=0;y<x;y++)Mv(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,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}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"}}}),Rr.prototype.setCategoryForLinkData=Rr.prototype.lp,Rr.prototype.getCategoryForLinkData=Rr.prototype.ps,Rr.prototype.assignAllDataProperties=Rr.prototype.Do,Rr.prototype.setGroupKeyForNodeData=Rr.prototype.mp,Rr.prototype.getGroupKeyForNodeData=Rr.prototype.lh,Rr.prototype.isGroupForNodeData=Rr.prototype.Yu,Rr.prototype.copyLinkData=Rr.prototype.Jo,Rr.prototype.mergeLinkDataArray=Rr.prototype.Zz,Rr.prototype.removeLinkDataCollection=Rr.prototype.lA,Rr.prototype.removeLinkData=Rr.prototype.bm,Rr.prototype.addLinkDataCollection=Rr.prototype.Ey,Rr.prototype.addLinkData=Rr.prototype.fi,Rr.prototype.containsLinkData=Rr.prototype.Jc,Rr.prototype.makeLinkDataKeyUnique=Rr.prototype.Bs,Rr.prototype.findLinkDataForKey=Rr.prototype.jh,Rr.prototype.setKeyForLinkData=Rr.prototype.Ks,Rr.prototype.getKeyForLinkData=Rr.prototype.Ac,Rr.prototype.removeLabelKeyForLinkData=Rr.prototype.Qx,Rr.prototype.addLabelKeyForLinkData=Rr.prototype.Bu,Rr.prototype.setLabelKeysForLinkData=Rr.prototype.Ls,Rr.prototype.getLabelKeysForLinkData=Rr.prototype.Ef,Rr.prototype.setToPortIdForLinkData=Rr.prototype.Cv,Rr.prototype.getToPortIdForLinkData=Rr.prototype.Cx,Rr.prototype.setFromPortIdForLinkData=Rr.prototype.xv,Rr.prototype.getFromPortIdForLinkData=Rr.prototype.zx,Rr.prototype.setToKeyForLinkData=Rr.prototype.Bv,Rr.prototype.getToKeyForLinkData=Rr.prototype.Bx,Rr.prototype.setFromKeyForLinkData=Rr.prototype.wv,Rr.prototype.getFromKeyForLinkData=Rr.prototype.yx,Rr.prototype.clear=Rr.prototype.clear;var z0=Object.freeze([]);Rr.className="GraphLinksModel",KA.GraphLinksModel=Rr,pi.constructGraphLinksModel=pi.constructGraphLinksModel=function(){return new Rr},pi.initDiagramModel=Ev=function(){return new Rr};function Kl(a,y){pi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Ui(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}be(Kl,pi),Kl.constructGraphLinksModel=pi.constructGraphLinksModel,Kl.prototype.cloneProtected=function(a){pi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Mt=Kl.prototype,Mt.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Sn(b)}}return y},Mt.rm=function(){var a=pi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Mt.gp=function(a){pi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Mt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ge("applyIncrementalJson cannot change Model properties"),pi.prototype.fp.call(this,a)},Mt.Vl=function(a){return a},Mt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Rs(a,y),y!==void 0)){if(jd(y))return y;Ge("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.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 E=Rs(a,x);E!==y&&(lh(this,E,a),$o(a,x,y),this.hc(y)===null&&ah(this,y,a),ua(this,"nodeParentKey",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},Mt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Rs(a,y),y===void 0)?"":typeof y=="string"?y:(Ge("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Kl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Kl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Rs(a,x);E===void 0&&(E=""),E!==y&&($o(a,x,y),ua(this,"parentLinkCategory",Oo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},Kl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Kl.prototype.copyNodeData=function(a){return a===null?null:(a=pi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Rs(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},Kl.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 E=Rs(a,y);E!==x&&($o(a,y,x),this.Fs(a,y,E,x))},Mt=Kl.prototype,Mt.jp=function(a,y){pi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Mt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;$o(a,E,x),ua(this,"nodeParentKey",Oo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Mt.fm=function(a){pi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=ve();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;ua(this,"nodeParentKey",Oo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)lh(this,a,x[y]);Ee(x)}},Mt.em=function(a){pi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&ah(this,y,a)},Mt.qp=function(a){pi.prototype.qp.call(this,a);var y=this.mh(a);lh(this,y,a)},Mt.lm=function(a,y){pi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Mt.Tl=function(){return!0},Mt.xs=function(){return!0},un.Object.defineProperties(Kl.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"}}}),Kl.prototype.setParentLinkCategoryForNodeData=Kl.prototype.Ms,Kl.prototype.getParentLinkCategoryForNodeData=Kl.prototype.ss,Kl.prototype.setParentKeyForNodeData=Kl.prototype.qe,Kl.prototype.getParentKeyForNodeData=Kl.prototype.mh,Kl.className="TreeModel",KA.TreeModel=Kl;function vs(a){ns.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=GA,this.Ti=0,this.Zv=new Xt,this.Jp=this.me=0,this.Xr=new Tp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=GA,this.K=Gl,this.nd=Hg,this.hd=Sv,this.tf=6,this.Nn=q0,a&&Object.assign(this,a)}be(vs,ns),vs.prototype.cloneProtected=function(a){ns.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},vs.prototype.qb=function(a){a.classType===vs?a===X0||a===J0||a===Z0||a===Y0||a===Hg?this.sorting=a:a===Lf||a===Og||a===Gl||a===Vd?this.direction=a:a===dd||a===zd||a===GA||a===jA?this.arrangement=a:(a===og||a===q0)&&(this.nodeDiameterFormula=a):ns.prototype.qb.call(this,a)},vs.prototype.createNetwork=function(){return new Rg(this)},vs.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 cn;y.addAll(a.iterator),a=new cn;var x=new cn,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var At=this.aspectRatio;(!isFinite(At)||0>=At)&&(At=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var yt=this.sweepAngle;if((!isFinite(yt)||360<yt||1>yt)&&(yt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===jA&&ot===og?rt=GA:rt===jA&&ot!==og&&(rt=this.arrangement),(this.direction===Lf||this.direction===Og)&&this.sorting!==Hg){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===Lf?(this.arrangement===jA&&a.reverse(),E=new cn,E.addAll(a),E.addAll(x)):(this.arrangement===jA&&x.reverse(),E=new cn,E.addAll(x),E.addAll(a))}ot=E.length;for(var Et=z=b=0;Et<E.length;Et++){var Tt=ft+yt*z*(this.direction===Gl?1:-1)/ot,It=E.M(Et).diameter;isNaN(It)&&(It=Wd(E.M(Et),Tt)),360>yt&&(Et===0||Et===E.length-1)&&(It/=2),b+=It,z++}if(isNaN(lt)||rt===jA){if(isNaN(y)&&(y=6),rt!==GA&&rt!==jA){for(z=-1/0,tt=0;tt<ot;tt++)Et=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(Et.diameter)&&Wd(Et,0),isNaN(b.diameter)&&Wd(b,0),z=Math.max(z,(Et.diameter+b.diameter)/2);tt=z+y,rt===dd?lt=(z+y)/(2*Math.PI/ot):lt=V0(this,tt*(360<=yt?ot:ot-1),At,ft*Math.PI/180,yt*Math.PI/180)}else lt=V0(this,b+(360<=yt?ot:ot-1)*(rt!==jA?y:1.6*y),At,ft*Math.PI/180,yt*Math.PI/180);z=lt*At}else if(z=lt*At,Et=kv(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(rt===GA||rt===jA)&&(y=(Et-b)/(360<=yt?ot:ot-1));else if(rt===GA||rt===jA)Et=(Et-b)/(360<=yt?ot:ot-1),Et<y?(lt=V0(this,b+y*(360<=yt?ot:ot-1),At,ft*Math.PI/180,yt*Math.PI/180),z=lt*At):y=Et;else{for(tt=-1/0,b=0;b<ot;b++)Tt=E.M(b),It=E.M(b===ot-1?0:b+1),isNaN(Tt.diameter)&&Wd(Tt,0),isNaN(It.diameter)&&Wd(It,0),tt=Math.max(tt,(Tt.diameter+It.diameter)/2);tt+=y,b=V0(this,tt*(360<=yt?ot:ot-1),At,ft*Math.PI/180,yt*Math.PI/180),b>lt?(lt=b,z=lt*At):tt=Et/(360<=yt?ot:ot-1)}if(this.kw=rt,this.lc=lt,this.Zm=At,this.lw=ft,this.Wp=yt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,lt=this.lw,At=this.Wp,ft=this.Ti,yt=this.me,ot=this.Jp,this.direction!==Lf&&this.direction!==Og||E!==jA)if(this.direction===Lf||this.direction===Og){switch(tt=0,E){case zd:tt=180*W0(this,rt,yt,lt,ot)/Math.PI;break;case GA:ot=y=0,tt=a.first(),tt!==null&&(y=Wd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=Wd(tt,Math.PI/2)),tt=180*W0(this,rt,yt,lt,ft+(y+ot)/2)/Math.PI;break;case dd:tt=At/y.length}if(this.direction===Lf){switch(E){case zd:bp(this,a,lt,Vd);break;case GA:kp(this,a,lt,Vd);break;case dd:Mp(this,a,At/2,lt,Vd)}switch(E){case zd:bp(this,x,lt+tt,Gl);break;case GA:kp(this,x,lt+tt,Gl);break;case dd:Mp(this,x,At/2,lt+tt,Gl)}}else{switch(E){case zd:bp(this,x,lt,Vd);break;case GA:kp(this,x,lt,Vd);break;case dd:Mp(this,x,At/2,lt,Vd)}switch(E){case zd:bp(this,a,lt+tt,Gl);break;case GA:kp(this,a,lt+tt,Gl);break;case dd:Mp(this,a,At/2,lt+tt,Gl)}}}else switch(E){case zd:bp(this,y,lt,this.direction);break;case GA:kp(this,y,lt,this.direction);break;case dd:Mp(this,y,At,lt,this.direction);break;case jA:U1(this,y,At,lt,this.direction)}else U1(this,y,At,lt-At/2,Gl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Mp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=E+(b===Gl?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),At=y.M(ot),ft=tt*Math.tan(lt)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),At.centerX=ft*Math.cos(lt),At.centerY=ft*Math.sin(lt),At.actualAngle=180*lt/Math.PI}}function kp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot),At=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);lt.centerX=b*Math.cos(x),lt.centerY=ft,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&Wd(lt,0),isNaN(At.diameter)&&Wd(At,0),lt=W0(a,b,z,E===Gl?x:-x,(lt.diameter+At.diameter)/2+tt),x+=E===Gl?lt:-lt}}function bp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot);lt.centerX=b*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=W0(a,b,z,E===Gl?x:-x,tt),x+=E===Gl?lt:-lt}}function U1(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new Tp,360>x){for(z=E+(b===Gl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,O1(a,y,x,E,b)}else Q1(a,y,x,E,b);a.Xr.commit(y)}function Q1(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=a.me*Math.sin(E*Math.PI/180),At=y.Fa();if(At.length===3)At[0].centerX=z,At[0].centerY=0,At[1].centerX=At[0].centerX-At[0].width/2-At[1].width/2-tt,At[1].y=At[0].y,At[2].centerX=(At[0].centerX+At[1].centerX)/2,At[2].y=At[0].y-At[2].height-tt;else if(At.length===4)At[0].centerX=z,At[0].centerY=0,At[2].centerX=-At[0].centerX,At[2].centerY=At[0].centerY,At[1].centerX=0,At[1].y=Math.min(At[0].y,At[2].y)-At[1].height-tt,At[3].centerX=0,At[3].y=Math.max(At[0].y+At[0].height+tt,At[2].y+At[2].height+tt);else{z=Xt.alloc();for(var ft=0;ft<At.length&&(At[ft].centerX=ot,At[ft].centerY=lt,!(ft>=At.length-1));ft++)H1(a,ot,lt,At,ft,b,z)||R1(a,ot,lt,At,ft,b,z),ot=z.x,lt=z.y;if(Xt.free(z),a.mj++,!(23<a.mj)){ot=At[0].centerX,lt=At[0].centerY,z=At[At.length-1].centerX,ft=At[At.length-1].centerY;var yt=Math.abs(ot-z)-((At[0].width+At[At.length-1].width)/2+tt),Et=Math.abs(lt-ft)-((At[0].height+At[At.length-1].height)/2+tt);tt=0,1>Math.abs(Et)?Math.abs(ot-z)<(At[0].width+At[At.length-1].width)/2&&(tt=0):tt=0<Et?Et:1>Math.abs(yt)?0:yt,ot=Math.abs(z)>Math.abs(ft)?0<z!=lt>ft:0<ft!=ot<z,(ot=b===Gl?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-At[At.length-1].width),tt=Math.min(tt,-At[At.length-1].height)),a.Xr.compare(tt,At),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>At.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Q1(a,y,x,E,b))}}}function O1(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=tt*Math.sin(E*Math.PI/180),At=Xt.alloc(),ft=y.Fa(),yt=0;yt<ft.length&&(ft[yt].centerX=ot,ft[yt].centerY=lt,!(yt>=ft.length-1));yt++)H1(a,ot,lt,ft,yt,b,At)||R1(a,ot,lt,ft,yt,b,At),ot=At.x,lt=At.y;if(Xt.free(At),a.mj++,!(23<a.mj)){if(ot=Math.atan2(lt,ot),ot=b===Gl?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,O1(a,y,x,E,b))}}function H1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var At=!1;if(0<=x!=(z===Gl)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=lt,!1;At=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=lt,!1;At=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==At&&(lt=-lt),Math.abs(x-lt)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function R1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Gl)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=lt,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=lt,tt.y=z;return}E=!0}lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(lt=-lt),tt.x=lt,tt.y=z}vs.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},vs.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 Xt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.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))},vs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function kv(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,lt=0;lt<=z;lt++){E!==void 0&&b!==void 0?ot=E+lt*b/z:ot=lt*Math.PI/(2*z);var At=Math.sin(ot);tt+=Math.sqrt(1-a*a*At*At)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function V0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?kv(a,1,x,E,b):kv(a,1,x))}function W0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}vs.prototype.sort=function(a){switch(this.sorting){case Z0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case J0:a.sort(this.comparer),a.reverse();break;case Hg:return this.ak(Rw(a));default:Ge("Invalid sorting type.")}return a};function Rw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new cn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}vs.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new cn;for(var ot=0,lt=0;lt<y.length;lt++){var At=y[lt].length;if(At===1)E.push(lt);else if(At===0)b.add(a.M(lt));else{if(ot===0)x.push(lt);else{for(var ft=At=1/0,yt=-1,Et=[],Tt=0;Tt<x.length;Tt++)0>y[x[Tt]].indexOf(x[Tt===x.length-1?0:Tt+1])&&Et.push(Tt===x.length-1?0:Tt+1);if(Et.length===0)for(Tt=0;Tt<x.length;Tt++)Et.push(Tt);for(Tt=0;Tt<Et.length;Tt++){for(var It=Et[Tt],qt=y[lt],Gt=0,oe=0;oe<tt.length;oe++){var le=z[tt[oe]],ue=z[rt[oe]];if(le<ue){var ye=le;le=ue}else ye=ue;if(ye<It&&It<=le)for(ue=0;ue<qt.length;ue++){var Oe=qt[ue];0>x.indexOf(Oe)||ye<z[Oe]&&z[Oe]<le||ye===z[Oe]||le===z[Oe]||Gt++}else for(ue=0;ue<qt.length;ue++)Oe=qt[ue],0>x.indexOf(Oe)||ye<z[Oe]&&z[Oe]<le&&ye!==z[Oe]&&le!==z[Oe]&&Gt++}for(qt=Gt,oe=Gt=0;oe<y[lt].length;oe++)ye=x.indexOf(y[lt][oe]),0<=ye&&(ye=Math.abs(It-(ye>=It?ye+1:ye)),Gt+=ye<x.length+1-ye?ye:x.length+1-ye);for(oe=0;oe<tt.length;oe++)ye=z[tt[oe]],le=z[rt[oe]],ye>=It&&ye++,le>=It&&le++,ye>le&&(ue=le,le=ye,ye=ue),le-ye<(x.length+2)/2==(ye<It&&It<=le)&&Gt++;(qt<At||qt===At&&Gt<ft)&&(At=qt,ft=Gt,yt=It)}for(x.splice(yt,0,lt),At=0;At<x.length;At++)z[x[At]]=At;for(At=0;At<y[lt].length;At++)ft=y[lt][At],0<=x.indexOf(ft)&&(tt.push(lt),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],lt=y[ot][0],At=x.indexOf(lt),0<=At){for(yt=ft=0;yt<y[lt].length;yt++)Et=x.indexOf(y[lt][yt]),0>Et||Et===At||(Tt=Et>At?Et-At:At-Et,ft+=Et<At!=Tt>tt-Tt?1:-1);x.splice(0>ft?At:At+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},un.Object.defineProperties(vs.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!==jA&&a!==GA&&a!==zd&&a!==dd||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Gl&&a!==Vd&&a!==Lf&&a!==Og||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Z0&&a!==Y0&&a!==X0&&!J0&&a!==Hg||(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!==q0&&a!==og||(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 GA=new Te(vs,"ConstantSpacing",0),zd=new Te(vs,"ConstantDistance",1),dd=new Te(vs,"ConstantAngle",2),jA=new Te(vs,"Packed",3),Gl=new Te(vs,"Clockwise",4),Vd=new Te(vs,"Counterclockwise",5),Lf=new Te(vs,"BidirectionalLeft",6),Og=new Te(vs,"BidirectionalRight",7),Z0=new Te(vs,"Forwards",8),Y0=new Te(vs,"Reverse",9),X0=new Te(vs,"Ascending",10),J0=new Te(vs,"Descending",11),Hg=new Te(vs,"Optimized",12),q0=new Te(vs,"Pythagorean",13),og=new Te(vs,"Circular",14);vs.className="CircularLayout",vs.ConstantSpacing=GA,vs.ConstantDistance=zd,vs.ConstantAngle=dd,vs.Packed=jA,vs.Clockwise=Gl,vs.Counterclockwise=Vd,vs.BidirectionalLeft=Lf,vs.BidirectionalRight=Og,vs.Forwards=Z0,vs.Reverse=Y0,vs.Ascending=X0,vs.Descending=J0,vs.Optimized=Hg,vs.Pythagorean=q0,vs.Circular=og;function Tp(){this.Pl=-1/0,this.tm=this.mk=null}Tp.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},Tp.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]}},Tp.className="VertexArrangement";function Rg(a){Uo.call(this,a)}be(Rg,Uo),Rg.prototype.createVertex=function(){return new Np(this)},Rg.prototype.createEdge=function(){return new $0(this)},Rg.className="CircularNetwork";function Np(a){ga.call(this,a),this.u=this.Si=NaN}be(Np,ga);function Wd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===jA)if(x.nodeDiameterFormula===og)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===og?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}un.Object.defineProperties(Np.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)}}}),Np.className="CircularVertex";function $0(a){bu.call(this,a)}be($0,bu),$0.className="CircularEdge";function el(a){ns.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)}be(el,ns),el.prototype.cloneProtected=function(a){ns.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},el.prototype.createNetwork=function(){return new sg(this)},el.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 E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}_1(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var lt=ve(),At=0;At<rt+y.vertexes.count+2;At++)lt[At]=null;rt=0,tt.reset();for(var ft=nn.alloc();tt.next();)if(At=tt.value,this.computeBounds(At,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,lt[0]=new Xt(ft.x+ft.width+E.width,ft.y),lt[1]=new Xt(ft.x,ft.y+ft.height+E.height),rt=2;else{var yt=K1(lt,rt,b,z,ft.width,ft.height,E),Et=lt[yt],Tt=new Xt(Et.x+ft.width+E.width,Et.y),It=new Xt(Et.x,Et.y+ft.height+E.height);for(yt+1<rt&&lt.splice(yt+1,0,null),lt[yt]=Tt,lt[yt+1]=It,rt++,yt=Et.x-ft.x,Et=Et.y-ft.y,At=At.vertexes.iterator;At.next();)Tt=At.value,Tt.centerX+=yt,Tt.centerY+=Et}for(nn.free(ft),At=y.vertexes.iterator;At.next();)tt=At.value,yt=tt.bounds,2>rt?(b=yt.x+yt.width/2,z=yt.y+yt.height/2,lt[0]=new Xt(yt.x+yt.width+E.width,yt.y),lt[1]=new Xt(yt.x,yt.y+yt.height+E.height),rt=2):(ot=K1(lt,rt,b,z,yt.width,yt.height,E),ft=lt[ot],Et=new Xt(ft.x+yt.width+E.width,ft.y),yt=new Xt(ft.x,ft.y+yt.height+E.height),ot+1<rt&&lt.splice(ot+1,0,null),lt[ot]=Et,lt[ot+1]=yt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Ee(lt),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}j1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},el.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},el.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function _1(a,y,x){if(_w(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Kw(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_1(a,y+1,x),j1(a,z),Gw(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)jw(a,y[x]);a.Zf=E}}function _w(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,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Kw(a,y){for(var x=a.network,E=new sg(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new z1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new cn),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new cn,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new cn,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,Pe.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var lt=rt=0,At=ot.count-tt;At<ot.count;At++){var ft=ot.M(At),yt=null;for(z=ft.edges.iterator;z.next();){var Et=z.value;if(Et.Ax(ft)===b){yt=Et;break}}yt!==null&&(lt+=yt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,At=b.width,ft=b.height,yt=b.focus,Et=At*ft,1>Et&&(Et=1),rt=Pe.sqrt((rt+Et+lt*lt*4/(tt*tt))/Et),tt=(rt-1)*At/2,rt=(rt-1)*ft/2,b.bounds=new nn(z-yt.x-tt,ot-yt.y-rt,At+2*tt,ft+2*rt),b.focus=new Xt(yt.x+tt,yt.y+rt)}}return a.network=E,x}function Gw(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new nn(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Xt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function jw(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=Pe.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,lt=0,At=y.vertexes.iterator;At.next();){var ft=At.value;1>=ft.Vd?ot++:(rt=!0,lt++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<lt&&(tt/=lt),lt=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(lt=y/2),1<x.count&&x.sort(function(Et,Tt){return Et===null||Tt===null||Et===Tt?0:Tt.width*Tt.height-Et.width*Et.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(At=null,ft=ot.edges.iterator;ft.next();){At=ft.value;break}ft=ot.width;var yt=ot.height;ft=Pe.sqrt(ft*ft+yt*yt)/2,At=z+At.length+ft,ft=tt+(y*(rt/2>>1)+lt)*(rt%2===0?1:-1),ot.centerX=E+At*Math.cos(ft),ot.centerY=b+At*Math.sin(ft),rt++}}}}function K1(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,lt=0;t:for(;lt<y;lt++){var At=a[lt],ft=At.x-x,yt=At.y-E;if(ft=ft*ft+yt*yt,ft<rt){for(yt=lt-1;0<=yt;yt--)if(a[yt].y>At.y&&a[yt].x-At.x<b+tt.width)continue t;for(yt=lt+1;yt<y;yt++)if(a[yt].x>At.x&&a[yt].y-At.y<z+tt.height)continue t;ot=lt,rt=ft}}return ot}el.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},el.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 E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function G1(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,Pe.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,Pe.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,Pe.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,Pe.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function j1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,zw(a)););a.ah=null}function zw(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 E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(It,qt){return It===null||qt===null||It===qt?0:It.centerX-qt.centerX}):y.sort(function(It,qt){return It===null||qt===null||It===qt?0:It.centerY-qt.centerY}),x=a.Zf;var lt=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var At=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,At),lt=tt.charge*a.electricalFieldY(ot,At),E+=tt.mass*a.gravitationalFieldX(ot,At),lt+=tt.mass*a.gravitationalFieldY(ot,At),tt.forceX+=E,tt.forceY+=lt;for(var ft=z+1;ft<y.length;ft++){var yt=y[ft];if(yt!==tt){E=yt.bounds,rt=yt.focus,lt=E.x+rt.x;var Et=E.y+rt.y;if(ot-lt>x||lt-ot>x){if(b)break}else if(At-Et>x||Et-At>x){if(!b)break}else{var Tt=G1(tt,yt);1>Tt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),Tt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*Tt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*Tt):(E=Math.max(yt.width,tt.width),E=(1+E)*Tt-E/2),At>Et?(lt=Math.abs(yt.bounds.bottom-tt.bounds.y),lt=(1+lt)*rt):ot<lt?(lt=Math.abs(yt.bounds.y-tt.bounds.bottom),lt=-(1+lt)*rt):(lt=Math.max(yt.height,tt.height),lt=(1+lt)*rt-lt/2)):(rt=-(tt.charge*yt.charge)/(Tt*Tt),E=(lt-ot)/Tt*rt,lt=(Et-At)/Tt*rt),tt.forceX+=E,tt.forceY+=lt,yt.forceX-=E,yt.forceY-=lt}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,At=z.bounds,ft=z.focus,ot=At.x+ft.x,At=At.y+ft.y,ft=G1(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new tm),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,lt=(tt>At?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,lt=(At-tt)/ft*rt),x.forceX+=E,x.forceY+=lt,z.forceX-=E,z.forceY-=lt;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}el.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},el.prototype.moveFixedVertex=function(){},el.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},el.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Es,y.toSpot=Es)}},el.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=nn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,nn.free(x)}x=nn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}nn.free(x)},el.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},el.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},el.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},el.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},el.prototype.electricalFieldX=function(){return 0},el.prototype.electricalFieldY=function(){return 0},el.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},el.prototype.gravitationalFieldX=function(){return 0},el.prototype.gravitationalFieldY=function(){return 0},el.prototype.isFixed=function(a){return a.isFixed},un.Object.defineProperties(el.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"&&Ge('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())}}}),el.className="ForceDirectedLayout";function z1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}z1.className="ForceDirectedSubnet";function sg(a){Uo.call(this,a)}be(sg,Uo),sg.prototype.createVertex=function(){return new Dp(this)},sg.prototype.createEdge=function(){return new Ip(this)},sg.className="ForceDirectedNetwork";function Dp(a){ga.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}be(Dp,ga),un.Object.defineProperties(Dp.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)}}}),Dp.className="ForceDirectedVertex";function Ip(a){bu.call(this,a),this.j=this.o=NaN}be(Ip,bu),un.Object.defineProperties(Ip.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)}}}),Ip.className="ForceDirectedEdge";function tm(){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()}tm.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},tm.className="RandomNumberGenerator";function wo(a){ns.call(this),this.kc=this.ie=25,this.K=0,this.Dk=om,this.Zk=sm,this.Qk=am,this.bj=4,this.rk=lm,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 Xt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}be(wo,ns),wo.prototype.cloneProtected=function(a){ns.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},wo.prototype.qb=function(a){a.classType===wo?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:Ge("Unknown enum value: "+a):ns.prototype.qb.call(this,a)},wo.prototype.createNetwork=function(){return new Kg(this)},wo.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!==Qp&&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===Qp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,lt=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var At=b.node;if(tt=z.node,At===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var yt=rt.fromPort;yt!==null&&!yt.Ed();)yt=yt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){lt=ft;var Et=yt;ft=ot,yt=rt,ot=lt,rt=Et}var Tt=b.focus;lt=z.focus;var It=E.rev?z.bounds:b.bounds;Et=Xt.alloc(),At!==ft?It.w()&&ft.isVisible()?ft.actualBounds.w()?(ld(ft,yt,Zr,Et),Et.x+=ft.actualBounds.x-It.x,Et.y+=ft.actualBounds.y-It.y):(ld(ft,yt,Zr,Et),Et.w()||Et.assign(Tt)):Et.assign(Tt):It.w()?(ld(ft,yt,Zr,Et),Et.w()||Et.assign(Tt)):Et.assign(Tt),ft=E.rev?b.bounds:z.bounds,At=Xt.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(ld(ot,rt,Zr,At),At.x+=ot.actualBounds.x-ft.x,At.y+=ot.actualBounds.y-ft.y):(ld(ot,rt,Zr,At),At.w()||At.assign(lt)):At.assign(lt):ft.w()?(ld(ot,rt,Zr,At),At.w()||At.assign(lt)):At.assign(lt),this.K===90||this.K===270?(tt=Math.round((Et.x-Tt.x)/this.kc),ot=Et.x,rt=Math.round((At.x-lt.x)/this.kc),lt=At.x):(tt=Math.round((Et.y-Tt.y)/this.kc),ot=Et.y,rt=Math.round((At.y-lt.y)/this.kc),lt=At.y),Xt.free(Et),Xt.free(At),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=lt}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Et=b.layer,At=z.layer,ft=0,It=E.link,It!==null){var qt=It.fromPort,Gt=It.toPort;if(qt!==null&&Gt!==null){var oe=It.fromNode;if(yt=It.toNode,oe!==null&&yt!==null){var le=rm(this,!0),ue=rm(this,!1),ye=this.setsPortSpots?le:It.computeSpot(!0,qt);Tt=this.setsPortSpots?ue:It.computeSpot(!1,Gt);var Oe=It.isOrthogonal;ye.$c()&&ye.Hf(ue)&&Tt.$c()&&Tt.Hf(le)?ft=0:(le=It.getLinkPoint(oe,qt,ye,!0,Oe,yt,Gt,Xt.alloc()),ue=It.getLinkDirection(oe,qt,le,ye,!0,Oe,yt,Gt),Xt.free(le),ye.ys()||ue!==tw(this,E,!0)?this.setsPortSpots&&oe!==null&&oe.ports.count===1&&E.rev&&(ft+=1):ft+=1,ye=It.getLinkPoint(yt,Gt,Tt,!1,Oe,oe,qt,Xt.alloc()),It=It.getLinkDirection(yt,Gt,ye,Tt,!1,Oe,oe,qt),Xt.free(ye),Tt.ys()||It!==tw(this,E,!1)?this.setsPortSpots&&yt!==null&&yt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(yt=ft,ft=yt===1||yt===3,(yt=yt===2||yt===3)&&(Tt=a.createVertex(),Tt.node=null,Tt.Dj=1,Tt.layer=Et,Tt.near=b,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Tt),It=1,ft&&It--,Et-At>It&&0<Et){for(E.valid=!1,Tt=a.createVertex(),Tt.node=null,Tt.Dj=2,Tt.layer=Et-1,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=yt?0:tt,b.portToColOffset=0,b.portFromPos=yt?0:ot,b.portToPos=0,b=Tt,Et--;Et-At>It&&0<Et;)Tt=a.createVertex(),Tt.node=null,Tt.Dj=3,Tt.layer=Et-1,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Tt,Et--;b=a.Zj(Tt,z,E.link),b.valid=!ft,ft&&(Tt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=lt}else E.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=Zd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Yd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},wo.prototype.linkMinLength=function(){return 1};function bv(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}wo.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},wo.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 su(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function uA(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function V1(a,y,x){var E=Zd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],lt=ot.near;if(lt!==null&&lt.layer===ot.layer)if(ot=lt.index,ot>tt)for(var At=tt+1;At<ot;At++){var ft=E[At];ft.near===lt&&ft.Dj===lt.Dj||rt++}else for(At=tt-1;At>ot;At--)ft=E[At],ft.near===lt&&ft.Dj===lt.Dj||rt++;var yt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,lt=0;lt<ot.length;lt++){var Et=ot[lt];if(Et.valid&&Et.fromVertex.layer!==y)for(ft=Et.fromVertex.index,At=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++){var Tt=ot[yt];if(Tt.valid&&Tt.fromVertex.layer!==y){var It=Tt.fromVertex.index,qt=Tt.portToPos;Tt=Tt.portFromPos,At<qt&&(ft>It||ft===It&&Et>Tt)&&rt++,qt<At&&(It>ft||It===ft&&Tt>Et)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Et=ot[lt],Et.valid&&Et.toVertex.layer!==y)for(ft=Et.toVertex.index,At=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++)Tt=ot[yt],Tt.valid&&Tt.toVertex.layer!==y&&(It=Tt.toVertex.index,qt=Tt.portToPos,Tt=Tt.portFromPos,Et<Tt&&(ft>It||ft===It&&At>qt)&&rt++,Tt<Et&&(It>ft||It===ft&&qt>At)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Gt=0,oe=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var le=E[ot].sourceEdgesArrayAccess;for(lt=0;lt<rt.length;lt++)if(Et=rt[lt],Et.valid&&Et.fromVertex.layer!==y)for(ft=Et.fromVertex.index,Et=Et.portFromPos,yt=0;yt<le.length;yt++)Tt=le[yt],Tt.valid&&Tt.fromVertex.layer!==y&&(It=Tt.fromVertex.index,Tt=Tt.portFromPos,(ft<It||ft===It&&Et<Tt)&&oe++,(It<ft||It===ft&&Tt<Et)&&Gt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,le=E[ot].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Et=rt[lt],Et.valid&&Et.toVertex.layer!==y)for(ft=Et.toVertex.index,At=Et.portToPos,yt=0;yt<le.length;yt++)Tt=le[yt],Tt.valid&&Tt.toVertex.layer!==y&&(It=Tt.toVertex.index,qt=Tt.portToPos,(ft<It||ft===It&&At<qt)&&oe++,(It<ft||It===ft&&qt<At)&&Gt++)}z[tt*b+ot]=Gt,z[ot*b+tt]=oe}}return Yd(a,y,E),z}wo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=V1(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function em(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Zd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var lt=z[ot].destinationEdgesArrayAccess;if(lt!==null)for(var At=0;At<lt.length;At++){var ft=lt[At];if(ft.valid&&ft.toVertex.layer!==b){var yt=ft.fromVertex.column+ft.portFromColOffset,Et=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(yt-Et)+1)*bv(ft)}}}Yd(E,b,z),y+=rt}return y}wo.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 Tv(a,y,x){for(var E=Zd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var At=0,ft=0,yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(At+=yt.column-1,ft++),ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Et=rt.fromVertex;rt.valid&&!rt.rev&&Et.layer!==y&&(At+=Et.column,ft++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(At+=yt.column,ft++);z[tt]=ft===0?-1:At/ft}return Yd(a,y,E),z}function W1(a,y,x){for(var E=Zd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var At=0,ft=[],yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ft[At]=yt.column-1,At++),rt=void 0,ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Et=rt.fromVertex;rt.valid&&!rt.rev&&Et.layer!==y&&(ft[At]=Et.column+rt.portFromColOffset,At++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ft[At]=yt.column+rt.portToColOffset,At++);At===0?z[tt]=-1:(ft.sort(function(Tt,It){return Tt-It}),lt=At>>1,z[tt]=At&1?ft[lt]:ft[lt-1]+ft[lt]>>1)}return Yd(a,y,E),z}function Up(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,lt=y.layer-ot.layer;rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,lt=ot.layer-y.layer,rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}}function Nv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)Nv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Nv(a,y.value.fromVertex,x,E,b,z)}}wo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Uv:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;Vw(a)!==null;){for(b=Z1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Z1(a);for(b=Y1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Y1(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,lt=rt.destinationEdges;lt.next();)lt.value.toVertex.valid&&ot++;lt=0;for(var At=rt.sourceEdges;At.next();)At.value.fromVertex.valid&&lt++;(b===null||z<ot-lt)&&(b=rt,z=ot-lt)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case om:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&Dv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Dv(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Qp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function Z1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Y1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function Dv(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,Dv(a,b))}y.finish=a.Kn,a.Kn++}wo.prototype.assignLayers=function(){switch(this.Zk){case Qv:X1(this);break;case Ov:for(var a,y=this.network.vertexes.iterator;y.next();)a=q1(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 sm:for(X1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&$1(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 X1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=J1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function J1(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,J1(a,z)+b)}y.layer=x}else x=y.layer;return x}function q1(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,q1(a,z)+b)}y.layer=x}else x=y.layer;return x}function $1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)$1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Up(a,rt,0,-1,!0,!1)}for(Up(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var lt=tt.value;if(lt.component===1){var At=0,ft=!1,yt=lt.sourceEdgesArrayAccess;b=yt.length;for(var Et=0;Et<b;Et++){var Tt=yt[Et],It=Tt.fromVertex;At+=1,It.component!==1&&(z+=1,It=It.layer-lt.layer,Tt=a.linkMinLength(Tt),E=Math.min(E,It-Tt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Et=0;Et<b;Et++)Tt=yt[Et].toVertex,--At,Tt.component!==1?--z:ft=!0;(ot===null||At<rt)&&!ft&&(ot=lt,rt=At)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Up(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(lt=0,At=!1,yt=tt.sourceEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)Tt=yt[Et].fromVertex,lt+=1,Tt.component!==1?E+=1:At=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)Tt=yt[Et],It=Tt.toVertex,--lt,It.component!==1&&(--E,It=tt.layer-It.layer,Tt=a.linkMinLength(Tt),b=Math.min(b,It-Tt));(rt===null||lt>z)&&!At&&(rt=tt,z=lt)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function tw(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}wo.prototype.initializeIndices=function(){switch(this.Qk){default:case Rv: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 am: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&&ew(this,x);break;case Hv: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&&nw(this,x)}};function ew(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 E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&ew(a,E))}function nw(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&nw(a,E))}wo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=su(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,1),BA(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=su(this)),E=this.Ia;0<=E;E--)nm(this,E,-1),BA(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=su(this))}for(uA(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,0),BA(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=su(this)),E=this.Ia;0<=E;E--)nm(this,E,0),BA(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=su(this))}uA(this,y);var z,tt,rt;switch(this.rk){case _v:break;case Kv:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,-1)||z;for(b=this.countCrossings(),b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,1)||z;for(b=this.countCrossings(),b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,1)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,-1)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,0)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,0)||z;b>=a?uA(this,y):(a=b,y=su(this))}break;default:case lm:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,-1)||z;for(b=this.countCrossings(),b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,1)||z;for(b=this.countCrossings(),b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,1)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,-1)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=BA(this,E,0)||z;for(b>=a?uA(this,y):(a=b,y=su(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=BA(this,E,0)||z;b>=a?uA(this,y):(a=b,y=su(this))}}uA(this,y)};function nm(a,y,x){var E=Zd(a,y),b=a.tc[y],z=W1(a,y,x),tt=Tv(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);Yd(a,y,E)}function BA(a,y,x){var E=Zd(a,y),b=a.tc[y];x=V1(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,z=0;z<b-1;z++){var At=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],yt=0,Et=0,Tt=E[z].column,It=E[z+1].column,qt=a.nodeMinColumnSpace(E[z],!0),Gt=a.nodeMinColumnSpace(E[z],!1),oe=a.nodeMinColumnSpace(E[z+1],!0),le=a.nodeMinColumnSpace(E[z+1],!1);qt=Tt-qt+oe,Gt=It-Gt+le;var ue=E[z].sourceEdges.iterator;for(ue.reset();ue.next();)if(oe=ue.value,le=oe.fromVertex,oe.valid&&le.layer===y){for(oe=0;E[oe]!==le;)oe++;oe<z&&(yt+=2*(z-oe),Et+=2*(z+1-oe)),oe===z+1&&(yt+=1),oe>z+1&&(yt+=4*(oe-z),Et+=4*(oe-(z+1)))}for(ue=E[z].destinationEdges.iterator,ue.reset();ue.next();)if(oe=ue.value,le=oe.toVertex,oe.valid&&le.layer===y){for(oe=0;E[oe]!==le;)oe++;oe===z+1&&(Et+=1)}for(ue=E[z+1].sourceEdges.iterator,ue.reset();ue.next();)if(oe=ue.value,le=oe.fromVertex,oe.valid&&le.layer===y){for(oe=0;E[oe]!==le;)oe++;oe<z&&(yt+=2*(z+1-oe),Et+=2*(z-oe)),oe===z&&(Et+=1),oe>z+1&&(yt+=4*(oe-(z+1)),Et+=4*(oe-z))}for(ue=E[z+1].destinationEdges.iterator,ue.reset();ue.next();)if(oe=ue.value,le=oe.toVertex,oe.valid&&le.layer===y){for(oe=0;E[oe]!==le;)oe++;oe===z&&(yt+=1)}oe=le=0,ue=tt[E[z].index];var ye=rt[E[z].index],Oe=tt[E[z+1].index],Vn=rt[E[z+1].index];ue!==-1&&(le+=Math.abs(ue-Tt),oe+=Math.abs(ue-Gt)),ye!==-1&&(le+=Math.abs(ye-Tt),oe+=Math.abs(ye-Gt)),Oe!==-1&&(le+=Math.abs(Oe-It),oe+=Math.abs(Oe-qt)),Vn!==-1&&(le+=Math.abs(Vn-It),oe+=Math.abs(Vn-qt)),(Et<yt-.5||Et===yt&&ft<At-.5||Et===yt&&ft===At&&oe<le-.5)&&(lt=ot=!0,E[z].column=Gt,E[z+1].column=qt,At=E[z],E[z]=E[z+1],E[z+1]=At)}for(z=0;z<b;z++)E[z].index=z;return Yd(a,y,E),ot}wo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&tS)!==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 E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=_g(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=_g(this,y,-1)||x;x=_g(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Iv(this,y,1);for(y=this.Md-1;0<=y;y--)Iv(this,y,-1);Iv(this,this.Md,0)}if(a&&(iw(this,-1),iw(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=_g(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=_g(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=_g(this,y,0)||x}}else Xw(this)};function _g(a,y,x){for(var E=!1;Ww(a,y,x);)E=!0;return E}function Ww(a,y,x){var E,b=Zd(a,y),z=a.tc[y],tt=Tv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=Tv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,E=0;E<z;E++){var At=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),yt=a.nodeMinColumnSpace(b[E],!1),Et=0;0>E-1||At-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?Et=At-1:Et=At,ft=E+1>=z||b[E+1].column-At-1>yt+a.nodeMinColumnSpace(b[E+1],!0)?At+1:At;var Tt=yt=0,It=0;if(0>=x)for(var qt=b[E].sourceEdges.iterator;qt.next();){var Gt=qt.value,oe=Gt.fromVertex;if(Gt.valid&&oe.layer!==y){var le=bv(Gt),ue=Gt.portFromColOffset;Gt=Gt.portToColOffset,oe=oe.column,yt+=(Math.abs(At+Gt-(oe+ue))+1)*le,Tt+=(Math.abs(Et+Gt-(oe+ue))+1)*le,It+=(Math.abs(ft+Gt-(oe+ue))+1)*le}}if(0<=x)for(qt=b[E].destinationEdges.iterator;qt.next();)Gt=qt.value,oe=Gt.toVertex,Gt.valid&&oe.layer!==y&&(le=bv(Gt),ue=Gt.portFromColOffset,Gt=Gt.portToColOffset,oe=oe.column,yt+=(Math.abs(At+ue-(oe+Gt))+1)*le,Tt+=(Math.abs(Et+ue-(oe+Gt))+1)*le,It+=(Math.abs(ft+ue-(oe+Gt))+1)*le);Gt=ue=le=0,qt=tt[b[E].index],oe=rt[b[E].index],qt!==-1&&(le+=Math.abs(qt-At),ue+=Math.abs(qt-Et),Gt+=Math.abs(qt-ft)),oe!==-1&&(le+=Math.abs(oe-At),ue+=Math.abs(oe-Et),Gt+=Math.abs(oe-ft)),Tt<yt||Tt===yt&&ue<le?(lt=ot=!0,b[E].column=Et):(It<yt||It===yt&&Gt<le)&&(lt=ot=!0,b[E].column=ft)}return Yd(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=Zd(a,y),b=a.tc[y],z=W1(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),lt=a.nodeMinColumnSpace(E[x],!1),At=0;if(tt[x]===-1)if(x===0&&x===b-1)At=rt;else if(x===0){var ft=E[x+1].column;ft-rt===lt+a.nodeMinColumnSpace(E[x+1],!0)?At=rt-1:At=rt}else x===b-1?(ft=E[x-1].column,At=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,At=(ot+lt)/2|0);else x===0&&x===b-1?At=tt[x]:x===0?(ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,At=Math.min(tt[x],lt)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,At=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ot<tt[x]&&tt[x]<lt?At=tt[x]:ot>=tt[x]?At=ot:lt<=tt[x]&&(At=lt));At!==rt&&(z=!0,E[x].column=At)}Yd(a,y,E),a.normalize()}function Zw(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Yw(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function iw(a,y){for(var x=0;x<=a.Ra;x++)for(;Zw(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Yw(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=su(a),z=em(a);for(E=z+1;z<E;){E=z,rw(a,x,1);var tt=em(a);tt>z?uA(a,b):tt<z&&(z=tt,b=su(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=su(a),z=em(a),E=z+1;z<E;)E=z,rw(a,x,-1),tt=em(a),tt>z?uA(a,b):tt<z&&(z=tt,b=su(a));a.normalize()}function rw(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(Nv(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Xw(a){for(var y=ve(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new dn,Jw(y,x);var z=null,tt=null,rt=null,ot=null,lt=(a.ve&1)!==0,At=(a.ve&2)!==0,ft=(a.ve&4)!==0,yt=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=im(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=im(a,y,!1,!1)),E=kn(y),b=E.next();!b.done;b=E.next())b.value.reverse();yt&&(a.verticalAlignment(y,x,!1),ot=im(a,y,!1,!0)),y.reverse(),At&&(a.verticalAlignment(y,x,!0),tt=im(a,y,!0,!0)),Ee(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Et){var Tt=ve();lt&&Tt.push(z.get(Et)),At&&Tt.push(tt.get(Et)),ft&&Tt.push(rt.get(Et)),yt&&Tt.push(ot.get(Et)),Tt.sort(function(qt,Gt){return qt-Gt});var It=Tt.length;It=(Tt[Math.floor((It-1)/2)]+Tt[Math.ceil((It-1)/2)])/2,Ee(Tt),Et.zc=It})}function Jw(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var lt=rt[ot];t:{if(lt.node===null){var At=Gv(lt);if(0<At.length){At=At[0].node===null;break t}}At=!1}var ft=At;if(ot===rt.length-1||ft){for(At=tt.length-1,ft&&(At=Gv(lt)[0].index);z<=ot;){if(lt=rt[z],!lt.bo){ft=[];for(var yt=kn(lt.sourceEdgesArrayAccess),Et=yt.next();!Et.done;Et=yt.next())Et=Et.value,Et.valid&&ft.push(Et);lt.bo=ft}for(lt=kn(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<b||yt>At)&&y.add(ft);z++}b=At}}}wo.prototype.verticalAlignment=function(a,y,x){qw(a),a=kn(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=kn(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):eS(z),rt=tt.length;if(0<rt){tt.sort(function(ft,yt){return ft.vi-yt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var lt=tt[rt],At=void 0;At=x?um(lt,z):um(z,lt),!y.contains(At)&&b<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,b=lt.vi)}}}}};function qw(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function im(a,y,x,E){for(var b=a.K===90||a.K===270,z=kn(y),tt=z.next();!tt.done;tt=z.next()){var rt=kn(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=kn(y),rt=z.next();!rt.done;rt=z.next()){rt=kn(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var lt=0,At=ot;At.align!==ot;){var ft=At.align,yt=tt?At.width:At.height,Et=tt?ft.width:ft.height;if(x){var Tt=um(At,ft),It=Tt.portFromPos,qt=Tt.portToPos;Tt.link!==null&&(At.node&&At.node!==Tt.link.fromNode&&(It=tt?At.focusX:At.focusY),ft.node&&ft.node!==Tt.link.toNode&&(qt=tt?ft.focusX:ft.focusY))}else Tt=um(ft,At),It=Tt.portToPos,qt=Tt.portFromPos,Tt.link!==null&&(At.node&&At.node!==Tt.link.toNode&&(It=tt?At.focusX:At.focusY),ft.node&&ft.node!==Tt.link.fromNode&&(qt=tt?ft.focusX:ft.focusY));yt=E?At.qg+(yt-It)-(Et-qt):At.qg+It-qt,ft.qg=yt,lt=Math.min(lt,yt),At=At.align}At=ot;do At.qg=At.qg-lt,At=At.align;while(At!==ot)}}for(x=kn(y),tt=x.next();!tt.done;tt=x.next())for(z=kn(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ow(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=sw(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new hi,y=kn(y),tt=y.next();!tt.done;tt=y.next())for(x=kn(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ow(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=sw(E,x),z=b.root;ow(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function sw(a,y){var x=a.Tz;return a=a.vi,1>a&&Ge("Could not determine previous vertex in layer"),y[x][a-1]}wo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=ve(),b=ve(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=$w(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(lt){lt.value+=ot.delta}}(z)));Ee(E),Ee(b)};function $w(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}wo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=rm(this,!0),y=rm(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function rm(a,y){return a.K===270?y?na:Ba:a.K===90?y?Ba:na:a.K===180?y?ps:Ds:y?Ds:ps}wo.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 E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,lt=ot.layer,At=ot.column|0;E?(tt=y.x+this.kc*At,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*At),ot.centerX=tt,ot.centerY=lt,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Xt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},wo.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 E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new nn(0,0,x,Math.abs(this.Ta[0]))):y.push(new nn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new nn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new nn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new nn(0,0,Math.abs(this.Ta[0]),x)):y.push(new nn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new nn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new nn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},wo.prototype.commitLayers=function(){},wo.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 E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var lt=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var At=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===Wu&&y.pointsCount===4&&(At.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,lt,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&lt===Aa&&(E=!0),rt!==null&&ot===Aa&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Zr),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(Zr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(At.layer===ft.layer)y.zf();else{var yt=!1,Et=!1,Tt=this.ie,It=y.firstPickIndex+1;if(y.isOrthogonal){Et=!0;var qt=y.pointsCount;4<qt&&y.points.removeRange(2,qt-3)}else if(y.curve===Wu)yt=!0,qt=y.pointsCount,4<qt&&y.points.removeRange(2,qt-3),qt===4&&(It=2);else{qt=y.pointsCount;var Gt=lt===Aa,oe=ot===Aa;2<qt&&Gt&&oe?y.points.removeRange(1,qt-2):3<qt&&Gt&&!oe?y.points.removeRange(1,qt-3):3<qt&&!Gt&&oe?y.points.removeRange(2,qt-2):4<qt&&!Gt&&!oe&&y.points.removeRange(2,qt-3)}if(x.rev){for(;ft!==null&&At!==ft;){var le=qt=null;for(Gt=ft.sourceEdges.iterator;Gt.next()&&(oe=Gt.value,oe.link!==x.link||(qt=oe.fromVertex,le=oe.toVertex,qt.node!==null)););if(qt===null)break;if(qt!==At){Gt=y.i(It-1).x,oe=y.i(It-1).y;var ue=qt.centerX,ye=qt.centerY;if(Et)this.K===180||this.K===0?It===y.firstPickIndex+1?(y.m(It++,Gt,oe),y.m(It++,Gt,ye)):(le!==null?le.centerY:oe)!==ye&&(le=this.Ta[qt.layer-1]+this.Rf.x,y.m(It++,le,oe),y.m(It++,le,ye)):It===y.firstPickIndex+1?(y.m(It++,Gt,oe),y.m(It++,ue,oe)):(le!==null?le.centerX:Gt)!==ue&&(le=this.Ta[qt.layer-1]+this.Rf.y,y.m(It++,Gt,le),y.m(It++,ue,le));else if(It===y.firstPickIndex+1){le=Math.max(10,this.he[ft.layer]);var Oe=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?ue<=ft.bounds.x?(ft=ft.bounds.x,y.m(It++,ft-le,ye),y.m(It++,ft,ye),y.m(It++,ft+Oe,ye)):(y.m(It++,ue-le,ye),y.m(It++,ue,ye),y.m(It++,ue+Oe,ye)):this.K===90?ye>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(It++,ue,ft+Oe),y.m(It++,ue,ft),y.m(It++,ue,ft-le)):(y.m(It++,ue,ye+Oe),y.m(It++,ue,ye),y.m(It++,ue,ye-le)):this.K===270?ye<=ft.bounds.y?(ft=ft.bounds.y,y.m(It++,ue,ft-le),y.m(It++,ue,ft),y.m(It++,ue,ft+Oe)):(y.m(It++,ue,ye-le),y.m(It++,ue,ye),y.m(It++,ue,ye+Oe)):this.K===0&&(ue>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(It++,ft+Oe,ye),y.m(It++,ft,ye),y.m(It++,ft-le,ye)):(y.m(It++,ue+Oe,ye),y.m(It++,ue,ye),y.m(It++,ue-le,ye)));else{y.m(It++,Gt,oe);var Vn=0;this.K===180||this.K===0?((this.K===180?ue>=ft.bounds.right:ue<=ft.bounds.x)&&(Vn=(this.K===0?-le:Oe)/2),y.m(It++,Gt+Vn,ye)):((this.K===270?ye>=ft.bounds.bottom:ye<=ft.bounds.y)&&(Vn=(this.K===90?-le:Oe)/2),y.m(It++,ue,oe+Vn)),y.m(It++,ue,ye)}}else le=Math.max(10,this.he[qt.layer]),Oe=Math.max(10,this.Ld[qt.layer]),yt?this.K===180?(y.m(It++,ue-le-Tt,ye),y.m(It++,Math.min(ue-le+Tt/2,ue),ye),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,Math.max(ue+Oe-Tt/2,ue),ye),y.m(It++,ue+Oe+Tt,ye)):this.K===90?(y.m(It++,ue,ye+Oe+Tt),y.m(It++,ue,Math.max(ye+Oe-Tt/2,ye)),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,ue,Math.min(ye-le+Tt/2,ye)),y.m(It++,ue,ye-le-Tt)):this.K===270?(y.m(It++,ue,ye-le-Tt),y.m(It++,ue,Math.min(ye-le+Tt/2,ye)),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,ue,Math.max(ye+Oe-Tt/2,ye)),y.m(It++,ue,ye+Oe+Tt)):(y.m(It++,ue+Oe+Tt,ye),y.m(It++,Math.max(ue+Oe-Tt/2,ue),ye),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,Math.min(ue-le+Tt/2,ue),ye),y.m(It++,ue-le-Tt,ye)):y.m(It++,ue,ye)}ft=qt}(rt===null||lt!==Aa||Et)&&(Gt=y.i(It-1).x,oe=y.i(It-1).y,ue=y.i(It).x,ye=y.i(It).y,Et?(Tt=this.Ld[At.layer],this.K===180||this.K===0?(Et=oe,Et>=At.bounds.y&&Et<=At.bounds.bottom&&(this.K===180?ue>=At.bounds.x:ue<=At.bounds.right)&&(ft=At.centerX+(this.K===180?-Tt:Tt),Et<At.bounds.y+At.bounds.height/2?Et=At.bounds.y-this.kc/2:Et=At.bounds.bottom+this.kc/2,y.m(It++,ft,oe),y.m(It++,ft,Et)),y.m(It++,ue,Et)):(Et=Gt,Et>=At.bounds.x&&Et<=At.bounds.right&&(this.K===270?ye>=At.bounds.y:ye<=At.bounds.bottom)&&(ft=At.centerY+(this.K===270?-Tt:Tt),Et<At.bounds.x+At.bounds.width/2?Et=At.bounds.x-this.kc/2:Et=At.bounds.right+this.kc/2,y.m(It++,Gt,ft),y.m(It++,Et,ft)),y.m(It++,Et,ye)),y.m(It++,ue,ye)):yt?(le=Math.max(10,this.he[At.layer]),Oe=Math.max(10,this.Ld[At.layer]),this.K===180&&ue>=At.bounds.x?(ft=At.bounds.x+At.bounds.width,y.L(It-2,ft,oe),y.L(It-1,ft+Oe,oe)):this.K===90&&ye<=At.bounds.bottom?(ft=At.bounds.y,y.L(It-2,Gt,ft),y.L(It-1,Gt,ft-le)):this.K===270&&ye>=At.bounds.y?(ft=At.bounds.y+At.bounds.height,y.L(It-2,Gt,ft),y.L(It-1,Gt,ft+Oe)):this.K===0&&ue<=At.bounds.right&&(ft=At.bounds.x,y.L(It-2,ft,oe),y.L(It-1,ft-le,oe))):(le=Math.max(10,this.he[At.layer]),Oe=Math.max(10,this.Ld[At.layer]),Et=0,this.K===180||this.K===0?((this.K===180?ue<=At.bounds.x:ue>=At.bounds.right)&&(Et=(this.K===0?Oe:-le)/2),y.m(It++,ue+Et,oe)):((this.K===270?ye<=At.bounds.y:ye>=At.bounds.bottom)&&(Et=(this.K===90?Oe:-le)/2),y.m(It++,Gt,ye+Et)),y.m(It++,ue,ye)))}else{for(;At!==null&&At!==ft;){for(le=qt=null,At=At.destinationEdges.iterator;At.next()&&(Gt=At.value,Gt.link!==x.link||(qt=Gt.toVertex,le=Gt.fromVertex,le.node!==null&&(le=null),qt.node!==null)););if(qt===null)break;qt!==ft&&(Gt=y.i(It-1).x,oe=y.i(It-1).y,ue=qt.centerX,ye=qt.centerY,Et?this.K===180||this.K===0?(le!==null?le.centerY:oe)!==ye&&(le=this.Ta[qt.layer]+this.Rf.x,It===y.firstPickIndex+1&&(le=this.K===0?Math.max(le,Gt):Math.min(le,Gt)),y.m(It++,le,oe),y.m(It++,le,ye)):(le!==null?le.centerX:Gt)!==ue&&(le=this.Ta[qt.layer]+this.Rf.y,It===y.firstPickIndex+1&&(le=this.K===90?Math.max(le,oe):Math.min(le,oe)),y.m(It++,Gt,le),y.m(It++,ue,le)):(le=Math.max(10,this.he[qt.layer]),Oe=Math.max(10,this.Ld[qt.layer]),yt?this.K===180?(y.m(It++,ue+Oe+Tt,ye),y.m(It++,Math.max(ue+Oe-Tt/2,ue),ye),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,Math.min(ue-le+Tt/2,ue),ye),y.m(It++,ue-le-Tt,ye)):this.K===90?(y.m(It++,ue,ye-le-Tt),y.m(It++,ue,Math.min(ye-le+Tt/2,ye)),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,ue,Math.max(ye+Oe-Tt/2,ye)),y.m(It++,ue,ye+Oe+Tt)):this.K===270?(y.m(It++,ue,ye+Oe+Tt),y.m(It++,ue,Math.max(ye+Oe-Tt/2,ye)),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,ue,Math.min(ye-le+Tt/2,ye)),y.m(It++,ue,ye-le-Tt)):(y.m(It++,ue-le-Tt,ye),y.m(It++,Math.min(ue-le+Tt/2,ue),ye),y.m(It++,ue,ye),y.m(It++,ue,ye),y.m(It++,Math.max(ue+Oe-Tt/2,ue),ye),y.m(It++,ue+Oe+Tt,ye)):this.K===180?(y.m(It++,ue+Oe,ye),y.m(It++,ue-le,ye)):this.K===90?(y.m(It++,ue,ye-le),y.m(It++,ue,ye+Oe)):this.K===270?(y.m(It++,ue,ye+Oe),y.m(It++,ue,ye-le)):(y.m(It++,ue-le,ye),y.m(It++,ue+Oe,ye)))),At=qt}Et&&(Gt=y.i(It-1).x,oe=y.i(It-1).y,ue=y.i(It).x,ye=y.i(It).y,this.K===180||this.K===0?oe!==ye&&(le=this.K===0?Math.min(Math.max((ue+Gt)/2,this.Ta[ft.layer]+this.Rf.x),ue):Math.max(Math.min((ue+Gt)/2,this.Ta[ft.layer]+this.Rf.x),ue),y.m(It++,le,oe),y.m(It++,le,ye)):Gt!==ue&&(le=this.K===90?Math.min(Math.max((ye+oe)/2,this.Ta[ft.layer]+this.Rf.y),ye):Math.max(Math.min((ye+oe)/2,this.Ta[ft.layer]+this.Rf.y),ye),y.m(It++,Gt,le),y.m(It++,ue,le)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===Aa?y.getLinkPointFromPoint(b,tt,tt.ga(Zr),y.i(3),!0):y.i(0),lt===Aa&&(lt=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,E.x,(lt.y+E.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===Aa?y.getLinkPointFromPoint(z,rt,rt.ga(Zr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===Aa&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},wo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new cn,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 E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new Xd;rt.layer=Math.floor(z.y/2);var ot=E.i(0),lt=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=lt.x*lt.x+lt.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),lt=E.i(b+2);var At=0;ot.y<z.y?At=lt.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(At=lt.y>z.y?0:tt.x<z.x?2:1),rt.j=At}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(At++,rt=lt.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,At<ft?(ot=!1,lt=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++){var yt=x[ft];(ot?yt.first:yt.jc)!==rt&&(At++,rt=ot?yt.first:yt.jc);var Et=yt.link;z=Et.i(yt.index),tt=Et.i(yt.index+1);var Tt=this.linkSpacing*(At-(lt-1)/2);y++,Et.uh(),Et.L(yt.index,z.x,z.y+Tt),Et.L(yt.index+1,tt.x,tt.y+Tt),Et.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new Xd,rt.layer=Math.floor(z.x/2),ot=E.i(0),lt=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=lt.x+lt.y*lt.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),lt=E.i(b+2),At=0,ot.x<z.x?At=lt.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(At=lt.x>z.x?0:tt.y<z.y?2:1),rt.j=At),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(At++,rt=lt.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,At<ft?(ot=!1,lt=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++)yt=x[ft],(ot?yt.first:yt.jc)!==rt&&(At++,rt=ot?yt.first:yt.jc),Et=yt.link,z=Et.i(yt.index),tt=Et.i(yt.index+1),Tt=this.linkSpacing*(At-(lt-1)/2),y++,Et.uh(),Et.L(yt.index,z.x+Tt,z.y),Et.L(yt.index+1,tt.x+Tt,tt.y),Et.zf()}z=b}a=E}}}},Mt=wo.prototype,Mt.Vx=function(a,y){return a instanceof Xd&&y instanceof Xd&&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},Mt.Ux=function(a,y){return a instanceof Xd&&y instanceof Xd&&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},Mt.Js=function(a,y){return a instanceof Xd&&y instanceof Xd&&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},Mt.B=function(a,y){return a-=y,-1<a&&1>a},Mt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Ge("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Zd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function Yd(a,y,x){a.He[a.tc[y]]=x}un.Object.defineProperties(wo.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()):Ge("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Uv&&a!==om&&a!==Qp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==sm&&a!==Qv&&a!==Ov||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==am&&a!==Hv&&a!==Rv||(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!==_v&&a!==lm&&a!==Kv||(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 om=new Te(wo,"CycleDepthFirst",0),Uv=new Te(wo,"CycleGreedy",1),Qp=new Te(wo,"CycleFromLayers",2),sm=new Te(wo,"LayerOptimalLinkLength",0),Qv=new Te(wo,"LayerLongestPathSink",1),Ov=new Te(wo,"LayerLongestPathSource",2),am=new Te(wo,"InitDepthFirstOut",0),Hv=new Te(wo,"InitDepthFirstIn",1),Rv=new Te(wo,"InitNaive",2),_v=new Te(wo,"AggressiveNone",0),lm=new Te(wo,"AggressiveLess",1),Kv=new Te(wo,"AggressiveMore",2),tS=8;wo.className="LayeredDigraphLayout",wo.CycleDepthFirst=om,wo.CycleGreedy=Uv,wo.CycleFromLayers=Qp,wo.LayerOptimalLinkLength=sm,wo.LayerLongestPathSink=Qv,wo.LayerLongestPathSource=Ov,wo.InitDepthFirstOut=am,wo.InitDepthFirstIn=Hv,wo.InitNaive=Rv,wo.AggressiveNone=_v,wo.AggressiveLess=lm,wo.AggressiveMore=Kv,wo.PackNone=0,wo.PackExpand=1,wo.PackStraighten=2,wo.PackMedian=4,wo.PackAll=15,wo.AlignNone=0,wo.AlignUpperLeft=1,wo.AlignUpperRight=2,wo.AlignLowerLeft=4,wo.AlignLowerRight=8,wo.AlignAll=15;function Xd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Xd.className="SegInfo";function Kg(a){Uo.call(this,a)}be(Kg,Uo),Kg.prototype.createVertex=function(){return new AA(this)},Kg.prototype.createEdge=function(){return new Op(this)},Kg.className="LayeredDigraphNetwork";function AA(a){ga.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}be(AA,ga);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=kn(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=kn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ge("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=kn(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(aw),a.co=y}return a.co}function eS(a){if(!a.ao){for(var y=[],x=kn(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(aw),a.ao=y}return a.ao}AA.prototype.Cl=function(a){ga.prototype.Cl.call(this,a),this.bo=this.co=null},AA.prototype.Kl=function(a){ga.prototype.Kl.call(this,a),this.bo=this.co=null},AA.prototype.zl=function(a){ga.prototype.zl.call(this,a),this.$n=this.ao=null},AA.prototype.Jl=function(a){ga.prototype.Jl.call(this,a),this.$n=this.ao=null},un.Object.defineProperties(AA.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)}}}),AA.prototype.deleteDestinationEdge=AA.prototype.Jl,AA.prototype.addDestinationEdge=AA.prototype.zl,AA.prototype.deleteSourceEdge=AA.prototype.Kl,AA.prototype.addSourceEdge=AA.prototype.Cl,AA.className="LayeredDigraphVertex";function Op(a){bu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}be(Op,bu),un.Object.defineProperties(Op.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)}}}),Op.className="LayeredDigraphEdge";function Er(a){ns.call(this),this.Ub=new dn,this.Wn=dm,this.ud=uc,this.vo=gm,this.Bq=ty,this.$v=[],this.td=!0,this.Rb=pm,this.$d=new ln(10,10).freeze();var y=new Ag(this);this.W=new CA(y),this.Y=new CA(y),this.ru=[],a&&Object.assign(this,a)}be(Er,ns),Er.prototype.cloneProtected=function(a){ns.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)},Er.prototype.qb=function(a){a.classType===Er?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:Ge("Unknown enum value: "+a):ns.prototype.qb.call(this,a)},Er.prototype.createNetwork=function(){return new Ag(this)},Er.prototype.makeNetwork=function(a){function y(E){if(E instanceof Jn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Nn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Ue?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ir?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Er.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==mm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Ue&&(y=a),this.path===dm&&y!==null?this.ud=y.isTreePathToChildren?uc:lg:this.ud=this.path===dm?uc: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 dn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Jn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof CA&&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,jv(this,y));for(y=this.network.vertexes,a=null;a=nS(y),0<a.count;)y=lw(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,jv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof CA&&Aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof CA&&hw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof CA&&cw(this,y);if(this.Cu(),this.layerStyle===vm){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?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,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===ey)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof CA&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new dn,this.isValidLayout=!0};function nS(a){var y=new dn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Er.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case uc:x.sourceEdges.count===0&&this.Ub.add(x);break;case lg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Ge("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=lw(this,a),a!==null&&this.Ub.add(a))};function lw(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case uc:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case lg:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Ge("Unhandled path value "+a.ud.toString())}}return E}function jv(a,y){if(y!==null){switch(a.ud){case uc:if(0<y.destinationEdges.count){for(var x=new cn,E=y.destinationVertexes;E.next();){var b=E.value;uw(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case lg:if(0<y.sourceEdges.count){for(x=new cn,E=y.sourceVertexes;E.next();)b=E.value,uw(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Ge("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)jv(a,x[y])}}function uw(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Er.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function Aw(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===cc&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];Aw(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function iS(a,y){switch(a.vo){default:case gm:return y.parent!==null?y.parent:a.W;case qv:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Jv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Xv:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Er.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(iS(this,a)),a.parent!==null&&a.parent.alignment===cc){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==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 hw(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)hw(a,y[E])}}Er.prototype.assignTreeVertexValues=function(){};function cw(a,y){if(y!==null){y.alignment!==cc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)cw(a,y[E])}}Er.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Gg:break;case Rp:a.children.reverse();break;case _p:a.children.sort(a.comparer);break;case Kp:a.children.sort(a.comparer),a.children.reverse();break;default:Ge("Unhandled sorting value "+a.sorting.toString())}},Er.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Er.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Jd(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var lt=a.node.Mu();lt.next();){var At=lt.value;At.category==="Comment"&&At.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(At),At.Va(),At=At.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,At.width),tt+=At.height+Math.abs(rt)):(z+=At.width+Math.abs(rt),tt=Math.max(tt,At.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=nn.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,nn.free(b))};function Jd(a){return a===fd||a===cc||a===gd||a===kc}function Hp(a){return a===fd||a===cc}function zv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Jd(x)){if(Hp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===gd)return!0}}return!1}Er.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=Jd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=zv(a),ot=0,lt=a.comments,At=lt.length,ft=Xt.alloc(),yt=0;yt<At;yt++){var Et=lt[yt],Tt=Et.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Tt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();){var It=Et.value;It.fromSpot=ps,It.toSpot=Ds}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=Ds,It.toSpot=ps;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=Ds,It.toSpot=ps;else for(ft.h(a.bounds.x+a.commentMargin-Tt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=ps,It.toSpot=Ds;ot=0<=a.commentSpacing?ot+(Tt.height+a.commentSpacing):ot+(a.commentSpacing-Tt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Tt.height),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=na,It.toSpot=Ba;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=Ba,It.toSpot=na;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=Ba,It.toSpot=na;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Tt.height),Et.move(ft),Et=Et.Sd();Et.next();)It=Et.value,It.fromSpot=na,It.toSpot=Ba;ot=0<=a.commentSpacing?ot+(Tt.width+a.commentSpacing):ot+(a.commentSpacing-Tt.width)}}if(Xt.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===uc)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Er.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case fm:dw(this,a);break;case Gp:if(a.alignment===cc)dw(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Jd(x)),E=zv(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?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 b=zA(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===Ac;var lt=ot===hc,At=Jd(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var yt=a.nodeSpacing,Et=this.computeNodeIndent(a),Tt=a.rowSpacing,It=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(It=Math.max(0,a.rowIndent)),E=a.width;var qt=a.height,Gt=0,oe=0,le=0,ue=null,ye=null,Oe=0,Vn=0,ai=0,ii=0,Tn=0,fn=0,tr=0,Ki=0;if(At&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var io=0;io<rt;io++)io%2===0&&io!==rt-1&&(Ki=Math.max(Ki,y?tt[io].Da.width:tt[io].Da.height));else rt===1&&(Ki=y?tt[0].Da.width:tt[0].Da.height);if(At){switch(ot){case fd:oe=135>b?fw(this,a,tt,Ki,Gt,oe):gw(this,a,tt,Ki,Gt,oe),Ki=oe.x,Gt=oe.width,oe=oe.height;break;case gd:for(ue=0;ue<rt;ue++)ye=tt[ue],ft=ye.Da,le=fn===0?0:Tt,y?(ye.S.h(z-ft.width,ii+le),Gt=Math.max(Gt,ft.width),oe=Math.max(oe,ii+le+ft.height),ii+=le+ft.height):(ye.S.h(ai+le,z-ft.height),Gt=Math.max(Gt,ai+le+ft.width),oe=Math.max(oe,ft.height),ai+=le+ft.width),fn++;break;case kc:for(ue=0;ue<rt;ue++)ye=tt[ue],z=ye.Da,ft=fn===0?0:Tt,y?(ye.S.h(yt/2+a.focus.x,ii+ft),Gt=Math.max(Gt,z.width),oe=Math.max(oe,ii+ft+z.height),ii+=ft+z.height):(ye.S.h(ai+ft,yt/2+a.focus.y),Gt=Math.max(Gt,ai+ft+z.width),oe=Math.max(oe,z.height),ai+=ft+z.width),fn++}ue=vu(this,2),ye=vu(this,2),y?(ue[0].h(0,0),ue[1].h(0,oe),ye[0].h(Gt,0)):(ue[0].h(0,0),ue[1].h(Gt,0),ye[0].h(0,oe)),ye[1].h(Gt,oe)}else for(io=0;io<rt;io++){var bo=tt[io],Fa=bo.Da;if(y){0<ft&&0<fn&&ai+yt+Fa.width>ft&&(ai<z&&Mf(a,ot,z-ai,0,tr,io-1),Tn++,fn=0,tr=io,le=oe,ai=0,ii=135<b?-oe-Tt:oe+Tt),hm(this,bo,0,ii);var Ta=0;if(fn===0)ue=bo.Yo,ye=bo.kp,Oe=Fa.width,Vn=Fa.height,(ue===null||ye===null||b!==zA(bo))&&(ue=vu(this,2),ye=vu(this,2),ue[0].h(0,0),ue[1].h(0,Vn),ye[0].h(Oe,0),ye[1].h(Oe,Vn));else{var Fl=ve();Vn=pw(this,a,bo,ue,ye,Oe,Vn,Fl),Ta=Vn.x,ue=Fl[0],ye=Fl[1],Oe=Vn.width,Vn=Vn.height,Ee(Fl),ai<Fa.width&&0>Ta&&(ag(a,-Ta,0,tr,io-1),cm(ue,-Ta,0),cm(ye,-Ta,0),Ta=0)}bo.S.h(Ta,ii),Gt=Math.max(Gt,Oe),oe=Math.max(oe,le+(Tn===0?0:Tt)+Fa.height),ai=Oe}else 0<ft&&0<fn&&ii+yt+Fa.height>ft&&(ii<z&&Mf(a,ot,0,z-ii,tr,io-1),Tn++,fn=0,tr=io,le=Gt,ii=0,ai=135<b?-Gt-Tt:Gt+Tt),hm(this,bo,ai,0),Ta=0,fn===0?(ue=bo.Yo,ye=bo.kp,Oe=Fa.width,Vn=Fa.height,(ue===null||ye===null||b!==zA(bo))&&(ue=vu(this,2),ye=vu(this,2),ue[0].h(0,0),ue[1].h(Oe,0),ye[0].h(0,Vn),ye[1].h(Oe,Vn))):(Fl=ve(),Vn=pw(this,a,bo,ue,ye,Oe,Vn,Fl),Ta=Vn.x,ue=Fl[0],ye=Fl[1],Oe=Vn.width,Vn=Vn.height,Ee(Fl),ii<Fa.height&&0>Ta&&(ag(a,0,-Ta,tr,io-1),cm(ue,0,-Ta),cm(ye,0,-Ta),Ta=0)),bo.S.h(ai,Ta),oe=Math.max(oe,Vn),Gt=Math.max(Gt,le+(Tn===0?0:Tt)+Fa.width),ii=Vn;fn++}switch(0<Tn&&(y?(oe+=Math.max(0,x),ai<Gt&&Mf(a,ot,Gt-ai,0,tr,rt-1),0<It&&(lt||ag(a,It,0,0,rt-1),Gt+=It)):(Gt+=Math.max(0,x),ii<oe&&Mf(a,ot,0,oe-ii,tr,rt-1),0<It&&(lt||ag(a,0,It,0,rt-1),oe+=It))),It=lt=0,ot){case jg:y?lt+=Gt/2-a.focus.x-Et/2:It+=oe/2-a.focus.y-Et/2;break;case ug:0<Tn?y?lt+=Gt/2-a.focus.x-Et/2:It+=oe/2-a.focus.y-Et/2:y?(Ki=tt[0].S.x+tt[0].la.x,lt+=Ki+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Ki)/2-a.focus.x-Et/2):(Ki=tt[0].S.y+tt[0].la.y,It+=Ki+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Ki)/2-a.focus.y-Et/2);break;case Ac:y?(lt-=Et,Gt+=Et):(It-=Et,oe+=Et);break;case hc:y?(lt+=Gt-a.width+Et,Gt+=Et):(It+=oe-a.height+Et,oe+=Et);break;case fd:y?1<rt?lt+=Ki+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?It+=Ki+yt/2-a.focus.y:It+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case gd:y?lt+=Gt+yt/2-a.focus.x:It+=oe+yt/2-a.focus.y;break;case kc:break;default:oe=this.customAlignment(a,lt,It,Gt,oe),lt=oe[0],It=oe[1],Gt=oe[2],oe=oe[3]}for(Et=0;Et<rt;Et++)Ki=tt[Et],y?Ki.S.h(Ki.S.x+Ki.la.x-lt,Ki.S.y+(135<b?(At?-oe:-Ki.Da.height)+Ki.la.y-x:qt+x+Ki.la.y)):Ki.S.h(Ki.S.x+(135<b?(At?-Gt:-Ki.Da.width)+Ki.la.x-x:E+x+Ki.la.x),Ki.S.y+Ki.la.y-It);if(rt=tt=0,At?y?(Gt=Vv(a,Gt,lt),0>lt&&(lt=0),135<b&&(It+=oe+x),oe+=qt+x,ot===kc&&(tt+=yt/2+a.focus.x),rt+=qt+x):(135<b&&(lt+=Gt+x),Gt+=E+x,oe=Wv(a,oe,It),0>It&&(It=0),ot===kc&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Gt&&(Gt=Zv(ot,E-Gt,0),tt=Gt.x,rt=Gt.y,Gt=E,lt=0):Gt=Vv(a,Gt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(It+=oe+x),oe=Math.max(Math.max(oe,qt),oe+qt+x),rt+=qt+x):(135<b&&(lt+=Gt+x),Gt=Math.max(Math.max(Gt,E),Gt+E+x),a.comments===null?qt>oe&&(oe=Zv(ot,0,qt-oe),tt=oe.x,rt=oe.y,oe=qt,It=0):oe=Wv(a,oe,It),0>It&&(rt-=It,It=0),tt+=E+x),0<Tn)b=vu(this,4),Tn=vu(this,4),y?(b[2].h(0,qt+x),b[3].h(b[2].x,oe),Tn[2].h(Gt,b[2].y),Tn[3].h(Tn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Gt,b[2].y),Tn[2].h(b[2].x,oe),Tn[3].h(b[3].x,Tn[2].y));else{for(b=vu(this,ue.length+2),Tn=vu(this,ye.length+2),ot=0;ot<ue.length;ot++)At=ue[ot],b[ot+2].h(At.x+tt,At.y+rt);for(ot=0;ot<ye.length;ot++)At=ye[ot],Tn[ot+2].h(At.x+tt,At.y+rt)}y?(b[0].h(lt,0),b[1].h(b[0].x,qt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Tn[0].h(lt+E,0),Tn[1].h(Tn[0].x,qt),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])),b[2].y-=x/2,Tn[2].y-=x/2):(b[0].h(0,It),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Tn[0].h(0,It+qt),Tn[1].h(E,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])),b[2].x-=x/2,Tn[2].x-=x/2),uh(this,ue),uh(this,ye),a.Yo=b,a.kp=Tn,a.la.h(lt,It),a.Da.h(Gt,oe)}break;default:Ge("Unhandled compaction value "+a.compaction.toString())}}};function dw(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Jd(x));var b=zv(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=zA(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var lt=y.alignment,At=lt===Ac,ft=lt===hc;rt=Jd(lt);var yt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var Et=y.nodeSpacing,Tt=a.computeNodeIndent(y),It=At||ft?0:Tt/2,qt=y.rowSpacing,Gt=0;(At||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Gt=Math.max(0,y.rowIndent)),At=y.width;var oe=y.height,le=0,ue=0,ye=0,Oe=0,Vn=0,ai=0,ii=0,Tn=0,fn=0,tr=0;if(rt&&!Hp(lt)&&135<E&&b.reverse(),Hp(lt))if(1<tt)for(var Ki=0;Ki<tt;Ki++){var io=b[Ki],bo=io.Da;Ki%2===0&&Ki!==tt-1?fn=Math.max(fn,(x?bo.width:bo.height)+a.computeBusNodeSpacing(io)-Et):Ki%2!==0&&(tr=Math.max(tr,(x?bo.width:bo.height)+a.computeBusNodeSpacing(io)-Et))}else tt===1&&(fn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case fd:case cc:ue=135>E?fw(a,y,b,fn,le,ue):gw(a,y,b,fn,le,ue),fn=ue.x,le=ue.width,ue=ue.height;break;case gd:for(yt=0;yt<tt;yt++)It=b[yt],ye=It.Da,tr=ii===0?0:qt,x?(It.S.h(z-ye.width,Vn+tr),le=Math.max(le,ye.width),ue=Math.max(ue,Vn+tr+ye.height),Vn+=tr+ye.height):(It.S.h(Oe+tr,z-ye.height),le=Math.max(le,Oe+tr+ye.width),ue=Math.max(ue,ye.height),Oe+=tr+ye.width),ii++;break;case kc:for(z=0;z<tt;z++)yt=b[z],It=yt.Da,ye=ii===0?0:qt,x?(yt.S.h(Et/2+y.focus.x,Vn+ye),le=Math.max(le,It.width),ue=Math.max(ue,Vn+ye+It.height),Vn+=ye+It.height):(yt.S.h(Oe+ye,Et/2+y.focus.y),le=Math.max(le,Oe+ye+It.width),ue=Math.max(ue,It.height),Oe+=ye+It.width),ii++}else for(tr=0;tr<tt;tr++)Ki=b[tr],io=Ki.Da,x?(0<yt&&0<ii&&Oe+Et+io.width>yt&&(Oe<z&&Mf(y,lt,z-Oe,0,Tn,tr-1),ai++,ii=0,Tn=tr,ye=ue,Oe=0,Vn=135<E?-ue-qt:ue+qt),bo=ii===0?It:Et,hm(a,Ki,0,Vn),Ki.S.h(Oe+bo,Vn),le=Math.max(le,Oe+bo+io.width),ue=Math.max(ue,ye+(ai===0?0:qt)+io.height),Oe+=bo+io.width):(0<yt&&0<ii&&Vn+Et+io.height>yt&&(Vn<z&&Mf(y,lt,0,z-Vn,Tn,tr-1),ai++,ii=0,Tn=tr,ye=le,Vn=0,Oe=135<E?-le-qt:le+qt),bo=ii===0?It:Et,hm(a,Ki,Oe,0),Ki.S.h(Oe,Vn+bo),ue=Math.max(ue,Vn+bo+io.height),le=Math.max(le,ye+(ai===0?0:qt)+io.width),Vn+=bo+io.height),ii++;switch(0<ai&&(x?(ue+=Math.max(0,ot),Oe<le&&Mf(y,lt,le-Oe,0,Tn,tt-1),0<Gt&&(ft||ag(y,Gt,0,0,tt-1),le+=Gt)):(le+=Math.max(0,ot),Vn<ue&&Mf(y,lt,0,ue-Vn,Tn,tt-1),0<Gt&&(ft||ag(y,0,Gt,0,tt-1),ue+=Gt))),Gt=ft=0,lt){case jg:x?ft+=le/2-y.focus.x-Tt/2:Gt+=ue/2-y.focus.y-Tt/2;break;case ug:0<ai?x?ft+=le/2-y.focus.x-Tt/2:Gt+=ue/2-y.focus.y-Tt/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Tt/2):(a=b[0].S.y+b[0].la.y,Gt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Tt/2);break;case Ac:x?(ft-=Tt,le+=Tt):(Gt-=Tt,ue+=Tt);break;case hc:x?(ft+=le-y.width+Tt,le+=Tt):(Gt+=ue-y.height+Tt,ue+=Tt);break;case fd:case cc:x?1<tt?ft+=fn+Et/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Gt+=fn+Et/2-y.focus.y:Gt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case gd:x?ft+=le+Et/2-y.focus.x:Gt+=ue+Et/2-y.focus.y;break;case kc:break;default:a=a.customAlignment(y,ft,Gt,le,ue),ft=a[0],Gt=a[1],le=a[2],ue=a[3]}for(a=0;a<tt;a++)Tt=b[a],x?Tt.S.h(Tt.S.x+Tt.la.x-ft,Tt.S.y+(135<E?(rt?-ue:-Tt.Da.height)+Tt.la.y-ot:oe+ot+Tt.la.y)):Tt.S.h(Tt.S.x+(135<E?(rt?-le:-Tt.Da.width)+Tt.la.x-ot:At+ot+Tt.la.x),Tt.S.y+Tt.la.y-Gt);x?(le=Vv(y,le,ft),0>ft&&(ft=0),135<E&&(Gt+=ue+ot),ue=Math.max(Math.max(ue,oe),ue+oe+ot)):(135<E&&(ft+=le+ot),le=Math.max(Math.max(le,At),le+At+ot),ue=Wv(y,ue,Gt),0>Gt&&(Gt=0)),y.la.h(ft,Gt),y.Da.h(le,ue)}}Er.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function fw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new nn(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new nn(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=zA(y)===90,At=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var Tt=x[Et],It=Tt.Da,qt=At===0?0:ot;if(lt){var Gt=a.computeBusNodeSpacing(Tt)-rt;Tt.S.h(E-(It.width+Gt),yt+qt),b=Math.max(b,It.width+Gt),z=Math.max(z,yt+qt+It.height),yt+=qt+It.height}else Gt=a.computeBusNodeSpacing(Tt)-rt,Tt.S.h(ft+qt,E-(It.height+Gt)),z=Math.max(z,It.height+Gt),b=Math.max(b,ft+qt+It.width),ft+=qt+It.width;At++}for(At=0,Tt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),It=0;It<tt;It++)if(It%2!==0){qt=x[It],Gt=qt.Da;var oe=At===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(qt)-rt;qt.S.h(ft+le,yt+oe),b=Math.max(b,ft+Gt.width+le),z=Math.max(z,yt+oe+Gt.height),yt+=oe+Gt.height}else le=a.computeBusNodeSpacing(qt)-rt,qt.S.h(ft+oe,yt+le),b=Math.max(b,ft+oe+Gt.width),z=Math.max(z,yt+Gt.height+le),ft+=oe+Gt.width;At++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Et),Math.abs(yt)):Math.max(Math.abs(Tt),Math.abs(ft))),lt?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),lt=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,lt+tt.width),0>lt&&(b-=lt),z=Math.max(z,Math.max(Et,yt)+a+tt.height),0>x.S.x&&(E=Am(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Tt,ft)+a+tt.width),yt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,yt+tt.height),0>yt&&(z-=yt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new nn(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new nn(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new nn(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=zA(y)===270,At=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var Tt=x[Et],It=Tt.Da,qt=At===0?0:ot;if(lt){var Gt=a.computeBusNodeSpacing(Tt)-rt;yt-=qt+It.height,Tt.S.h(E-(It.width+Gt),yt),b=Math.max(b,It.width+Gt),z=Math.max(z,Math.abs(yt))}else Gt=a.computeBusNodeSpacing(Tt)-rt,ft-=qt+It.width,Tt.S.h(ft,E-(It.height+Gt)),z=Math.max(z,It.height+Gt),b=Math.max(b,Math.abs(ft));At++}for(At=0,Tt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),It=0;It<tt;It++)if(It%2!==0){qt=x[It],Gt=qt.Da;var oe=At===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(qt)-rt;yt-=oe+Gt.height,qt.S.h(ft+le,yt),b=Math.max(b,ft+Gt.width+le),z=Math.max(z,Math.abs(yt))}else le=a.computeBusNodeSpacing(qt)-rt,ft-=oe+Gt.width,qt.S.h(ft,yt+le),z=Math.max(z,yt+Gt.height+le),b=Math.max(b,Math.abs(ft));At++}for(1<tt&&tt%2===1&&(ot=x[tt-1],At=ot.Da,a=a.computeBusLastRowSpacing(ot,lt?Math.max(Math.abs(Et),Math.abs(yt)):Math.max(Math.abs(Tt),Math.abs(ft))),lt?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-At.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+At.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(Et,yt))+a+At.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-At.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Tt,ft))+a+At.width),yt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,yt+At.height),0>yt&&(z-=yt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],lt?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new nn(E,0,b,z)}Er.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Er.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Vv(a,y,x){switch(a.alignment){case ug:case jg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Ac:return a.width>y?a.width:y;case hc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case fd:case cc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case gd:return a.width-a.focus.x+a.nodeSpacing/2+y;case kc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Wv(a,y,x){switch(a.alignment){case ug:case jg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Ac:return a.height>y?a.height:y;case hc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case fd:case cc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case gd:return a.height-a.focus.y+a.nodeSpacing/2+y;case kc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zv(a,y,x){switch(a){case jg:y/=2,x/=2;break;case ug:y/=2,x/=2;break;case Ac:x=y=0;break;case hc:break;default:Ge("Unhandled alignment value "+a.toString())}return new Xt(y,x)}function Mf(a,y,x,E,b,z){y=Zv(y,x,E),ag(a,y.x,y.y,b,z)}function ag(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function hm(a,y,x,E){var b=y.parent;switch(a.ud){case uc:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case lg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Ge("Unhandled path value "+a.ud.toString())}}function cm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function pw(a,y,x,E,b,z,tt,rt){var ot=zA(y),lt=ot===90||ot===270,At=y.nodeSpacing;y=E;var ft=b;E=z;var yt=tt,Et=x.Yo,Tt=x.kp;tt=x.Da;var It=lt?Math.max(yt,tt.height):Math.max(E,tt.width);if((Et===null||ot!==zA(x))&&(Et=vu(a,2),Tt=vu(a,2),lt?(Et[0].h(0,0),Et[1].h(0,tt.height),Tt[0].h(tt.width,0),Tt[1].h(Tt[0].x,Et[1].y)):(Et[0].h(0,0),Et[1].h(tt.width,0),Tt[0].h(0,tt.height),Tt[1].h(Et[1].x,Tt[0].y))),lt){if(yt=9999999,!(ft===null||2>ft.length||Et===null||2>Et.length))for(b=x=0;x<ft.length&&b<Et.length;){z=ft[x];var qt=Et[b];ot=qt.x,lt=qt.y,ot+=E;var Gt=z;x+1<ft.length&&(Gt=ft[x+1]);var oe=qt;qt=oe.x,oe=oe.y,b+1<Et.length&&(oe=Et[b+1],qt=oe.x,oe=oe.y,qt+=E);var le=yt;z.y===lt?le=ot-z.x:z.y>lt&&z.y<oe?le=ot+(z.y-lt)/(oe-lt)*(qt-ot)-z.x:lt>z.y&&lt<Gt.y&&(le=ot-(z.x+(lt-z.y)/(Gt.y-z.y)*(Gt.x-z.x))),le<yt&&(yt=le),Gt.y<=z.y?x++:oe<=lt?b++:(Gt.y<=oe&&x++,oe<=Gt.y&&b++)}if(yt=E-yt,yt+=At,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=vu(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],At[E++].h(lt.x+b,lt.y);for(;ot<y.length;)lt=y[ot++],At[E++].h(lt.x,lt.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)lt=x[z++],At[E++].h(lt.x+b,lt.y);for(x=vu(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);uh(a,At),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=vu(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)Gt=ft[x++],At[b++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],At[b++].h(Gt.x+ot,Gt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=vu(a,b),x=0;x<b;x++)z[x].assign(At[x]);uh(a,At),b=z}return z=Math.max(0,yt)+tt.width,tt=It,uh(a,y),uh(a,Et),uh(a,ft),uh(a,Tt),rt[0]=E,rt[1]=b,new nn(yt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||Et===null||2>Et.length))for(b=x=0;x<ft.length&&b<Et.length;)z=ft[x],qt=Et[b],ot=qt.x,lt=qt.y,lt+=yt,Gt=z,x+1<ft.length&&(Gt=ft[x+1]),oe=qt,qt=oe.x,oe=oe.y,b+1<Et.length&&(oe=Et[b+1],qt=oe.x,oe=oe.y,oe+=yt),le=E,z.x===ot?le=lt-z.y:z.x>ot&&z.x<qt?le=lt+(z.x-ot)/(qt-ot)*(oe-lt)-z.y:ot>z.x&&ot<Gt.x&&(le=lt-(z.y+(ot-z.x)/(Gt.x-z.x)*(Gt.y-z.y))),le<E&&(E=le),Gt.x<=z.x?x++:qt<=ot?b++:(Gt.x<=qt&&x++,qt<=Gt.x&&b++);if(yt-=E,yt+=At,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=vu(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],At[E++].h(lt.x,lt.y+b);for(;ot<y.length;)lt=y[ot++],At[E++].h(lt.x,lt.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)lt=x[z++],At[E++].h(lt.x,lt.y+b);for(x=vu(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);uh(a,At),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=vu(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)Gt=ft[x++],At[b++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],At[b++].h(Gt.x,Gt.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=vu(a,b),x=0;x<b;x++)z[x].assign(At[x]);uh(a,At),b=z}return z=It,tt=Math.max(0,yt)+tt.height,uh(a,y),uh(a,Et),uh(a,ft),uh(a,Tt),rt[0]=E,rt[1]=b,new nn(yt,0,z,tt)}function vu(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 Xt;return a}function uh(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Er.prototype.arrangeTrees=function(){if(this.Rb===mm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof CA){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Yv(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof CA&&a.push(x);switch(this.sorting){case Gg:break;case Rp:a.reverse();break;case _p:a.sort(this.comparer);break;case Kp:a.sort(this.comparer),a.reverse();break;default:Ge("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Yv(this,b,y+b.la.x,x+b.la.y),this.Rb){case pm:x+=b.Da.height+this.$d.height;break;case $v:y+=b.Da.width+this.$d.width;break;default:Ge("Unhandled arrangement value "+this.Rb.toString())}}}};function Yv(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Yv(a,tt,x+tt.S.x,E+tt.S.y)}}}Er.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Er.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Er.prototype.Gu=function(){if(this.layerStyle===vm){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Xt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Xt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new nn(0,z,x,rt))):this.angle===90?(b.push(new nn(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new nn(z,0,rt,x))):(b.push(new nn(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Er.prototype.commitLayers=function(){},Er.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Er.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof CA&&mw(this,y)}};function mw(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)mw(a,y[E])}}Er.prototype.setPortSpots=function(a){var y=a.alignment;if(Jd(y)){var x=this.ud===uc,E=zA(a);switch(E){case 0:var b=Ds;break;case 90:b=Ba;break;case 180:b=ps;break;default:b=na}var z=a.children,tt=z.length;switch(y){case fd:case cc:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?ps:na;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=ps;break;case 90:ot=na;break;case 180:ot=Ds;break;default:ot=Ba}else y%2===0&&(ot=E===90||E===270?Ds:Ba);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case gd:for(E=E===90||E===270?Ds:Ba,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case kc:for(E=E===90||E===270?ps:na,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=zA(a),this.ud===uc){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=Ds;break;case 90:E.fromSpot=Ba;break;case 180:E.fromSpot=ps;break;default:E.fromSpot=na}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=ps;break;case 90:E.toSpot=na;break;case 180:E.toSpot=Ds;break;default:E.toSpot=Ba}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=Ds;break;case 90:E.toSpot=Ba;break;case 180:E.toSpot=ps;break;default:E.toSpot=na}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=ps;break;case 90:E.fromSpot=na;break;case 180:E.fromSpot=Ds;break;default:E.fromSpot=Ba}else E.fromSpot=a.childPortSpot}};function zA(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Er.prototype.computeLayerSpacing=function(a){var y=zA(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Er.prototype.computeNodeIndent=function(a){var y=zA(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},un.Object.defineProperties(Er.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!==gm&&a!==Jv&&a!==Xv&&a!==qv||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==ty&&a!==ey&&a!==vm||(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!==pm&&a!==$v&&a!==mm||(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!==Gg&&a!==Rp&&a!==_p&&!Kp||(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()):Ge("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!==fm&&a!==Gp||(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!==Gg&&a!==Rp&&a!==_p&&!Kp||(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!==fm&&a!==Gp||(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 dm=new Te(Er,"PathDefault",-1),uc=new Te(Er,"PathDestination",0),lg=new Te(Er,"PathSource",1),Gg=new Te(Er,"SortingForwards",10),Rp=new Te(Er,"SortingReverse",11),_p=new Te(Er,"SortingAscending",12),Kp=new Te(Er,"SortingDescending",13),jg=new Te(Er,"AlignmentCenterSubtrees",20),ug=new Te(Er,"AlignmentCenterChildren",21),Ac=new Te(Er,"AlignmentStart",22),hc=new Te(Er,"AlignmentEnd",23),fd=new Te(Er,"AlignmentBus",24),cc=new Te(Er,"AlignmentBusBranching",25),gd=new Te(Er,"AlignmentTopLeftBus",26),kc=new Te(Er,"AlignmentBottomRightBus",27),fm=new Te(Er,"CompactionNone",30),Gp=new Te(Er,"CompactionBlock",31),gm=new Te(Er,"StyleLayered",40),Xv=new Te(Er,"StyleLastParents",41),Jv=new Te(Er,"StyleAlternating",42),qv=new Te(Er,"StyleRootOnly",43),pm=new Te(Er,"ArrangementVertical",50),$v=new Te(Er,"ArrangementHorizontal",51),mm=new Te(Er,"ArrangementFixedRoots",52),ty=new Te(Er,"LayerIndividual",60),ey=new Te(Er,"LayerSiblings",61),vm=new Te(Er,"LayerUniform",62);Er.className="TreeLayout",Er.PathDefault=dm,Er.PathDestination=uc,Er.PathSource=lg,Er.SortingForwards=Gg,Er.SortingReverse=Rp,Er.SortingAscending=_p,Er.SortingDescending=Kp,Er.AlignmentCenterSubtrees=jg,Er.AlignmentCenterChildren=ug,Er.AlignmentStart=Ac,Er.AlignmentEnd=hc,Er.AlignmentBus=fd,Er.AlignmentBusBranching=cc,Er.AlignmentTopLeftBus=gd,Er.AlignmentBottomRightBus=kc,Er.CompactionNone=fm,Er.CompactionBlock=Gp,Er.StyleLayered=gm,Er.StyleLastParents=Xv,Er.StyleAlternating=Jv,Er.StyleRootOnly=qv,Er.ArrangementVertical=pm,Er.ArrangementHorizontal=$v,Er.ArrangementFixedRoots=mm,Er.LayerIndividual=ty,Er.LayerSiblings=ey,Er.LayerUniform=vm;function Ag(a){Uo.call(this,a)}be(Ag,Uo),Ag.prototype.createVertex=function(){return new CA(this)},Ag.prototype.createEdge=function(){return new zg(this)},Ag.className="TreeNetwork";function CA(a){ga.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 Xt(0,0),this.Da=new ln(0,0),this.la=new Xt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Gg,this.hd=Sv,this.Kb=0,this.Jb=ug,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Gp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Es,this.wr=!0,this.Dp=Es}be(CA,ga),CA.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)},un.Object.defineProperties(CA.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)}}}),CA.className="TreeVertex";function zg(a){bu.call(this,a),this.$t=new Xt(0,0)}be(zg,bu),zg.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case uc:x=this.fromVertex,E=this.toVertex;break;case lg:x=this.toVertex,E=this.fromVertex;break;default:Ge("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=zA(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===Wu,lt=a.isOrthogonal,At;if(a.uh(),lt||ot){for(At=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),yt=a.i(2)}else{for(At=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),yt=a.i(a.pointsCount-1)}var Et=a.i(a.pointsCount-1);z===0?(x.alignment===hc?(z=E.bottom+b.y,b.y===0&&ft.y>Et.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ac?(z=E.top+b.y,b.y===0&&ft.y<Et.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.right+tt,z),At++,a.m(At,E.right+tt+(b.x-rt)/3,z),At++,a.m(At,E.right+tt+2*(b.x-rt)/3,z),At++,a.m(At,E.right+tt+(b.x-rt),z),At++,a.m(At,yt.x,z)):(lt&&(a.m(At,E.right+tt/2,ft.y),At++),a.m(At,E.right+tt/2,z),At++,a.m(At,E.right+tt+b.x-(lt?rt/2:rt),z),At++,lt&&a.m(At,a.i(At-1).x,yt.y))):z===90?(x.alignment===hc?(z=E.right+b.x,b.x===0&&ft.x>Et.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ac?(z=E.left+b.x,b.x===0&&ft.x<Et.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.bottom+tt),At++,a.m(At,z,E.bottom+tt+(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+2*(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+(b.y-rt)),At++,a.m(At,z,yt.y)):(lt&&(a.m(At,ft.x,E.bottom+tt/2),At++),a.m(At,z,E.bottom+tt/2),At++,a.m(At,z,E.bottom+tt+b.y-(lt?rt/2:rt)),At++,lt&&a.m(At,yt.x,a.i(At-1).y))):z===180?(x.alignment===hc?(z=E.bottom+b.y,b.y===0&&ft.y>Et.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ac?(z=E.top+b.y,b.y===0&&ft.y<Et.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.left-tt,z),At++,a.m(At,E.left-tt+(b.x+rt)/3,z),At++,a.m(At,E.left-tt+2*(b.x+rt)/3,z),At++,a.m(At,E.left-tt+(b.x+rt),z),At++,a.m(At,yt.x,z)):(lt&&(a.m(At,E.left-tt/2,ft.y),At++),a.m(At,E.left-tt/2,z),At++,a.m(At,E.left-tt+b.x+(lt?rt/2:rt),z),At++,lt&&a.m(At,a.i(At-1).x,yt.y))):z===270?(x.alignment===hc?(z=E.right+b.x,b.x===0&&ft.x>Et.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ac?(z=E.left+b.x,b.x===0&&ft.x<Et.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.top-tt),At++,a.m(At,z,E.top-tt+(b.y+rt)/3),At++,a.m(At,z,E.top-tt+2*(b.y+rt)/3),At++,a.m(At,z,E.top-tt+(b.y+rt)),At++,a.m(At,z,yt.y)):(lt&&(a.m(At,ft.x,E.top-tt/2),At++),a.m(At,z,E.top-tt/2),At++,a.m(At,z,E.top-tt+b.y+(lt?rt/2:rt)),At++,lt&&a.m(At,yt.x,a.i(At-1).y))):Ge("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=zA(x),y!==zA(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===Wu,b=a.isOrthogonal,E=Jd(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/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)):b?E?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=rt.bottom+tt/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)):b?E?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=rt.left-tt/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)):b?E?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=rt.top-tt/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)):b?E?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()))}}},un.Object.defineProperties(zg.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)}}}),zg.className="TreeEdge",Ho.prototype.initializeStandardTools=function(){this.gb("Action",new Os,this.mouseDownTools),this.gb("Relinking",new to,this.mouseDownTools),this.gb("LinkReshaping",new Hi,this.mouseDownTools),this.gb("Rotating",new hs,this.mouseDownTools),this.gb("Resizing",new mo,this.mouseDownTools),this.gb("Linking",new Yr,this.mouseMoveTools),this.gb("Dragging",new ss,this.mouseMoveTools),this.gb("DragSelecting",new oa,this.mouseMoveTools),this.gb("Panning",new Co,this.mouseMoveTools),this.gb("ContextMenu",new cs,this.mouseUpTools),this.gb("TextEditing",new so,this.mouseUpTools),this.gb("ClickCreating",new ja,this.mouseUpTools),this.gb("ClickSelecting",new Ss,this.mouseUpTools)},Qh("Horizontal",new _o),Qh("Spot",new Ts),Qh("Table",new Al),Qh("Viewbox",new fa),Qh("TableRow",new Lu),Qh("TableColumn",new Vu),Qh("Graduated",new Uh),Qh("Grid",new Pl),gf.add("GraphLinksModel",ba),gf.add("TreeModel",lA);var ym=ee.go,ny={get licenseKey(){return Ue.licenseKey},set licenseKey(a){Ue.licenseKey=a},get version(){return Ue.version},Group:ir,EnumValue:Te,List:cn,Set:dn,Map:hi,Point:Xt,Size:ln,Rect:nn,Margin:nr,Spot:Ei,Geometry:Un,PathFigure:Js,PathSegment:Gr,InputEvent:La,DiagramEvent:MA,ChangedEvent:Jo,Model:pi,GraphLinksModel:Rr,TreeModel:Kl,Binding:zs,Transaction:ra,UndoManager:ts,CommandHandler:Jt,Tool:_r,DraggingTool:ss,DraggingInfo:ih,DraggingOptions:st,LinkingBaseTool:_i,LinkingTool:Yr,RelinkingTool:to,LinkReshapingTool:Hi,ResizingTool:mo,RotatingTool:hs,ClickSelectingTool:Ss,ActionTool:Os,ClickCreatingTool:ja,HTMLInfo:zo,ContextMenuTool:cs,DragSelectingTool:oa,PanningTool:Co,TextEditingTool:so,ToolManager:Ho,Animation:Sa,AnimationManager:Ja,AnimationTrigger:ql,Layer:jr,Diagram:Ue,Palette:dt,Overview:gt,Brush:fo,GraphObject:we,Panel:vn,RowColumnDefinition:la,Shape:fr,TextBlock:Io,Picture:ru,Part:Li,Adornment:Xr,Node:Jn,Link:Nn,Placeholder:Ol,Layout:ns,LayoutNetwork:Uo,LayoutVertex:ga,LayoutEdge:bu,GridLayout:Ha,PanelLayout:po,CircularLayout:vs,CircularNetwork:Rg,CircularVertex:Np,CircularEdge:$0,ForceDirectedLayout:el,ForceDirectedNetwork:sg,ForceDirectedVertex:Dp,ForceDirectedEdge:Ip,LayeredDigraphLayout:wo,LayeredDigraphNetwork:Kg,LayeredDigraphVertex:AA,LayeredDigraphEdge:Op,TreeLayout:Er,TreeNetwork:Ag,TreeVertex:CA,TreeEdge:zg};typeof ym=="object"&&ym.version&&ur("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),Ue.prototype.go=ny,ee.go=ny,typeof gn.exports=="object"&&(gn.exports=typeof Qt.g!="undefined"?Qt.g.go:self.go)}();var xt=typeof Qt.g!="undefined"?Qt.g.go:self.go;const Yt=typeof Qt.g!="undefined"?Qt.g.go:self.go,he=Yt.Group,xe=Yt.EnumValue,ge=Yt.List,Ut=Yt.Set,jt=Yt.Map,ne=Yt.Point,Ae=Yt.Size,se=Yt.Rect,ke=Yt.Margin,de=Yt.Spot,Ie=Yt.Geometry,Dt=Yt.PathFigure,nt=Yt.PathSegment,et=Yt.InputEvent,ut=Yt.DiagramEvent,at=Yt.ChangedEvent,ht=Yt.Model,pt=Yt.GraphLinksModel,St=Yt.TreeModel,bt=Yt.Binding,Ot=Yt.Transaction,Ht=Yt.UndoManager,Wt=Yt.CommandHandler,re=Yt.Tool,te=Yt.DraggingTool,Ce=Yt.DraggingInfo,ce=Yt.LinkingBaseTool,Qe=Yt.LinkingTool,je=Yt.RelinkingTool,He=Yt.LinkReshapingTool,Qn=Yt.ResizingTool,Gn=Yt.RotatingTool,Yn=Yt.ClickSelectingTool,di=Yt.ActionTool,ie=Yt.ClickCreatingTool,zt=Yt.HTMLInfo,We=Yt.ContextMenuTool,En=Yt.DragSelectingTool,Xn=Yt.PanningTool,Ve=Yt.TextEditingTool,In=Yt.ToolManager,Hn=Yt.Animation,li=Yt.AnimationManager,tn=Yt.AnimationTrigger,Me=Yt.Layer,rn=Yt.Diagram,Dn=Yt.Palette,sn=Yt.Overview,Vt=Yt.Brush,Pt=Yt.GraphObject,mt=Yt.Panel,vt=Yt.RowColumnDefinition,kt=Yt.Shape,Lt=Yt.TextBlock,_t=Yt.TextBlockMetrics,De=Yt.Picture,on=Yt.Part,mn=Yt.Adornment,$e=Yt.Node,Bn=Yt.Link,Re=Yt.Placeholder,Mn=Yt.Layout,Kn=Yt.LayoutNetwork,Fi=Yt.LayoutVertex,ti=Yt.LayoutEdge,sr=Yt.GridLayout,rr=Yt.PanelLayout,xi=Yt.CircularLayout,wi=Yt.CircularNetwork,Ir=Yt.CircularVertex,ji=Yt.CircularEdge,yr=Yt.ForceDirectedLayout,xr=Yt.ForceDirectedNetwork,Qr=Yt.ForceDirectedVertex,Ii=Yt.ForceDirectedEdge,br=Yt.LayeredDigraphLayout,Sr=Yt.LayeredDigraphNetwork,Bo=Yt.LayeredDigraphVertex,er=Yt.LayeredDigraphEdge,Lo=Yt.TreeLayout,ys=Yt.TreeNetwork,Mo=Yt.TreeVertex,Lr=Yt.TreeEdge,Pn=Yt.version},46020:function(gn){(function(ze,Qt){gn.exports=Qt()})(this,function(){"use strict";var ze=function(Bt,wt){return ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Ct){Ft.__proto__=Ct}||function(Ft,Ct){for(var Kt in Ct)Object.prototype.hasOwnProperty.call(Ct,Kt)&&(Ft[Kt]=Ct[Kt])},ze(Bt,wt)};function Qt(Bt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");ze(Bt,wt);function Ft(){this.constructor=Bt}Bt.prototype=wt===null?Object.create(wt):(Ft.prototype=wt.prototype,new Ft)}var xt=function(){return xt=Object.assign||function(wt){for(var Ft,Ct=1,Kt=arguments.length;Ct<Kt;Ct++){Ft=arguments[Ct];for(var ae in Ft)Object.prototype.hasOwnProperty.call(Ft,ae)&&(wt[ae]=Ft[ae])}return wt},xt.apply(this,arguments)};function Yt(Bt,wt,Ft,Ct){function Kt(ae){return ae instanceof Ft?ae:new Ft(function(Le){Le(ae)})}return new(Ft||(Ft=Promise))(function(ae,Le){function Ye(bn){try{wn(Ct.next(bn))}catch($n){Le($n)}}function Ne(bn){try{wn(Ct.throw(bn))}catch($n){Le($n)}}function wn(bn){bn.done?ae(bn.value):Kt(bn.value).then(Ye,Ne)}wn((Ct=Ct.apply(Bt,wt||[])).next())})}function he(Bt,wt){var Ft={label:0,sent:function(){if(ae[0]&1)throw ae[1];return ae[1]},trys:[],ops:[]},Ct,Kt,ae,Le;return Le={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Le[Symbol.iterator]=function(){return this}),Le;function Ye(wn){return function(bn){return Ne([wn,bn])}}function Ne(wn){if(Ct)throw new TypeError("Generator is already executing.");for(;Ft;)try{if(Ct=1,Kt&&(ae=wn[0]&2?Kt.return:wn[0]?Kt.throw||((ae=Kt.return)&&ae.call(Kt),0):Kt.next)&&!(ae=ae.call(Kt,wn[1])).done)return ae;switch(Kt=0,ae&&(wn=[wn[0]&2,ae.value]),wn[0]){case 0:case 1:ae=wn;break;case 4:return Ft.label++,{value:wn[1],done:!1};case 5:Ft.label++,Kt=wn[1],wn=[0];continue;case 7:wn=Ft.ops.pop(),Ft.trys.pop();continue;default:if(ae=Ft.trys,!(ae=ae.length>0&&ae[ae.length-1])&&(wn[0]===6||wn[0]===2)){Ft=0;continue}if(wn[0]===3&&(!ae||wn[1]>ae[0]&&wn[1]<ae[3])){Ft.label=wn[1];break}if(wn[0]===6&&Ft.label<ae[1]){Ft.label=ae[1],ae=wn;break}if(ae&&Ft.label<ae[2]){Ft.label=ae[2],Ft.ops.push(wn);break}ae[2]&&Ft.ops.pop(),Ft.trys.pop();continue}wn=wt.call(Bt,Ft)}catch(bn){wn=[6,bn],Kt=0}finally{Ct=ae=0}if(wn[0]&5)throw wn[1];return{value:wn[0]?wn[1]:void 0,done:!0}}}function xe(Bt,wt,Ft){if(Ft||arguments.length===2)for(var Ct=0,Kt=wt.length,ae;Ct<Kt;Ct++)(ae||!(Ct in wt))&&(ae||(ae=Array.prototype.slice.call(wt,0,Ct)),ae[Ct]=wt[Ct]);return Bt.concat(ae||wt)}for(var ge=function(){function Bt(wt,Ft,Ct,Kt){this.left=wt,this.top=Ft,this.width=Ct,this.height=Kt}return Bt.prototype.add=function(wt,Ft,Ct,Kt){return new Bt(this.left+wt,this.top+Ft,this.width+Ct,this.height+Kt)},Bt.fromClientRect=function(wt,Ft){return new Bt(Ft.left+wt.windowBounds.left,Ft.top+wt.windowBounds.top,Ft.width,Ft.height)},Bt.fromDOMRectList=function(wt,Ft){var Ct=Array.from(Ft).find(function(Kt){return Kt.width!==0});return Ct?new Bt(Ct.left+wt.windowBounds.left,Ct.top+wt.windowBounds.top,Ct.width,Ct.height):Bt.EMPTY},Bt.EMPTY=new Bt(0,0,0,0),Bt}(),Ut=function(Bt,wt){return ge.fromClientRect(Bt,wt.getBoundingClientRect())},jt=function(Bt){var wt=Bt.body,Ft=Bt.documentElement;if(!wt||!Ft)throw new Error("Unable to get document size");var Ct=Math.max(Math.max(wt.scrollWidth,Ft.scrollWidth),Math.max(wt.offsetWidth,Ft.offsetWidth),Math.max(wt.clientWidth,Ft.clientWidth)),Kt=Math.max(Math.max(wt.scrollHeight,Ft.scrollHeight),Math.max(wt.offsetHeight,Ft.offsetHeight),Math.max(wt.clientHeight,Ft.clientHeight));return new ge(0,0,Ct,Kt)},ne=function(Bt){for(var wt=[],Ft=0,Ct=Bt.length;Ft<Ct;){var Kt=Bt.charCodeAt(Ft++);if(Kt>=55296&&Kt<=56319&&Ft<Ct){var ae=Bt.charCodeAt(Ft++);(ae&64512)===56320?wt.push(((Kt&1023)<<10)+(ae&1023)+65536):(wt.push(Kt),Ft--)}else wt.push(Kt)}return wt},Ae=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Ft=Bt.length;if(!Ft)return"";for(var Ct=[],Kt=-1,ae="";++Kt<Ft;){var Le=Bt[Kt];Le<=65535?Ct.push(Le):(Le-=65536,Ct.push((Le>>10)+55296,Le%1024+56320)),(Kt+1===Ft||Ct.length>16384)&&(ae+=String.fromCharCode.apply(String,Ct),Ct.length=0)}return ae},se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),de=0;de<se.length;de++)ke[se.charCodeAt(de)]=de;for(var Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<Ie.length;nt++)Dt[Ie.charCodeAt(nt)]=nt;for(var et=function(Bt){var wt=Bt.length*.75,Ft=Bt.length,Ct,Kt=0,ae,Le,Ye,Ne;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var wn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),bn=Array.isArray(wn)?wn:new Uint8Array(wn);for(Ct=0;Ct<Ft;Ct+=4)ae=Dt[Bt.charCodeAt(Ct)],Le=Dt[Bt.charCodeAt(Ct+1)],Ye=Dt[Bt.charCodeAt(Ct+2)],Ne=Dt[Bt.charCodeAt(Ct+3)],bn[Kt++]=ae<<2|Le>>4,bn[Kt++]=(Le&15)<<4|Ye>>2,bn[Kt++]=(Ye&3)<<6|Ne&63;return wn},ut=function(Bt){for(var wt=Bt.length,Ft=[],Ct=0;Ct<wt;Ct+=2)Ft.push(Bt[Ct+1]<<8|Bt[Ct]);return Ft},at=function(Bt){for(var wt=Bt.length,Ft=[],Ct=0;Ct<wt;Ct+=4)Ft.push(Bt[Ct+3]<<24|Bt[Ct+2]<<16|Bt[Ct+1]<<8|Bt[Ct]);return Ft},ht=5,pt=11,St=2,bt=pt-ht,Ot=65536>>ht,Ht=1<<ht,Wt=Ht-1,re=1024>>ht,te=Ot+re,Ce=te,ce=32,Qe=Ce+ce,je=65536>>pt,He=1<<bt,Qn=He-1,Gn=function(Bt,wt,Ft){return Bt.slice?Bt.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(Bt,wt,Ft))},Yn=function(Bt,wt,Ft){return Bt.slice?Bt.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(Bt,wt,Ft))},di=function(Bt,wt){var Ft=et(Bt),Ct=Array.isArray(Ft)?at(Ft):new Uint32Array(Ft),Kt=Array.isArray(Ft)?ut(Ft):new Uint16Array(Ft),ae=24,Le=Gn(Kt,ae/2,Ct[4]/2),Ye=Ct[5]===2?Gn(Kt,(ae+Ct[4])/2):Yn(Ct,Math.ceil((ae+Ct[4])/4));return new ie(Ct[0],Ct[1],Ct[2],Ct[3],Le,Ye)},ie=function(){function Bt(wt,Ft,Ct,Kt,ae,Le){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=Kt,this.index=ae,this.data=Le}return Bt.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>ht],Ft=(Ft<<St)+(wt&Wt),this.data[Ft];if(wt<=65535)return Ft=this.index[Ot+(wt-55296>>ht)],Ft=(Ft<<St)+(wt&Wt),this.data[Ft];if(wt<this.highStart)return Ft=Qe-je+(wt>>pt),Ft=this.index[Ft],Ft+=wt>>ht&Qn,Ft=this.index[Ft],Ft=(Ft<<St)+(wt&Wt),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",We=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),En=0;En<zt.length;En++)We[zt.charCodeAt(En)]=En;var Xn="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Ve=50,In=1,Hn=2,li=3,tn=4,Me=5,rn=7,Dn=8,sn=9,Vt=10,Pt=11,mt=12,vt=13,kt=14,Lt=15,_t=16,De=17,on=18,mn=19,$e=20,Bn=21,Re=22,Mn=23,Kn=24,Fi=25,ti=26,sr=27,rr=28,xi=29,wi=30,Ir=31,ji=32,yr=33,xr=34,Qr=35,Ii=36,br=37,Sr=38,Bo=39,er=40,Lo=41,ys=42,Mo=43,Lr=[9001,65288],Pn="!",Mt="\xD7",jn="\xF7",kn=di(Xn),_n=[wi,Ii],Wn=[In,Hn,li,Me],qn=[Vt,Dn],ui=[sr,ti],Wi=Wn.concat(qn),en=[Sr,Bo,er,xr,Qr],Je=[Lt,vt],be=function(Bt,wt){wt===void 0&&(wt="strict");var Ft=[],Ct=[],Kt=[];return Bt.forEach(function(ae,Le){var Ye=kn.get(ae);if(Ye>Ve?(Kt.push(!0),Ye-=Ve):Kt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(ae)!==-1)return Ct.push(Le),Ft.push(_t);if(Ye===tn||Ye===Pt){if(Le===0)return Ct.push(Le),Ft.push(wi);var Ne=Ft[Le-1];return Wi.indexOf(Ne)===-1?(Ct.push(Ct[Le-1]),Ft.push(Ne)):(Ct.push(Le),Ft.push(wi))}if(Ct.push(Le),Ye===Ir)return Ft.push(wt==="strict"?Bn:br);if(Ye===ys||Ye===xi)return Ft.push(wi);if(Ye===Mo)return ae>=131072&&ae<=196605||ae>=196608&&ae<=262141?Ft.push(br):Ft.push(wi);Ft.push(Ye)}),[Ct,Ft,Kt]},un=function(Bt,wt,Ft,Ct){var Kt=Ct[Ft];if(Array.isArray(Bt)?Bt.indexOf(Kt)!==-1:Bt===Kt)for(var ae=Ft;ae<=Ct.length;){ae++;var Le=Ct[ae];if(Le===wt)return!0;if(Le!==Vt)break}if(Kt===Vt)for(var ae=Ft;ae>0;){ae--;var Ye=Ct[ae];if(Array.isArray(Bt)?Bt.indexOf(Ye)!==-1:Bt===Ye)for(var Ne=Ft;Ne<=Ct.length;){Ne++;var Le=Ct[Ne];if(Le===wt)return!0;if(Le!==Vt)break}if(Ye!==Vt)break}return!1},fi=function(Bt,wt){for(var Ft=Bt;Ft>=0;){var Ct=wt[Ft];if(Ct===Vt)Ft--;else return Ct}return 0},mi=function(Bt,wt,Ft,Ct,Kt){if(Ft[Ct]===0)return Mt;var ae=Ct-1;if(Array.isArray(Kt)&&Kt[ae]===!0)return Mt;var Le=ae-1,Ye=ae+1,Ne=wt[ae],wn=Le>=0?wt[Le]:0,bn=wt[Ye];if(Ne===Hn&&bn===li)return Mt;if(Wn.indexOf(Ne)!==-1)return Pn;if(Wn.indexOf(bn)!==-1||qn.indexOf(bn)!==-1)return Mt;if(fi(ae,wt)===Dn)return jn;if(kn.get(Bt[ae])===Pt||(Ne===ji||Ne===yr)&&kn.get(Bt[Ye])===Pt||Ne===rn||bn===rn||Ne===sn||[Vt,vt,Lt].indexOf(Ne)===-1&&bn===sn||[De,on,mn,Kn,rr].indexOf(bn)!==-1||fi(ae,wt)===Re||un(Mn,Re,ae,wt)||un([De,on],Bn,ae,wt)||un(mt,mt,ae,wt))return Mt;if(Ne===Vt)return jn;if(Ne===Mn||bn===Mn)return Mt;if(bn===_t||Ne===_t)return jn;if([vt,Lt,Bn].indexOf(bn)!==-1||Ne===kt||wn===Ii&&Je.indexOf(Ne)!==-1||Ne===rr&&bn===Ii||bn===$e||_n.indexOf(bn)!==-1&&Ne===Fi||_n.indexOf(Ne)!==-1&&bn===Fi||Ne===sr&&[br,ji,yr].indexOf(bn)!==-1||[br,ji,yr].indexOf(Ne)!==-1&&bn===ti||_n.indexOf(Ne)!==-1&&ui.indexOf(bn)!==-1||ui.indexOf(Ne)!==-1&&_n.indexOf(bn)!==-1||[sr,ti].indexOf(Ne)!==-1&&(bn===Fi||[Re,Lt].indexOf(bn)!==-1&&wt[Ye+1]===Fi)||[Re,Lt].indexOf(Ne)!==-1&&bn===Fi||Ne===Fi&&[Fi,rr,Kn].indexOf(bn)!==-1)return Mt;if([Fi,rr,Kn,De,on].indexOf(bn)!==-1)for(var $n=ae;$n>=0;){var Pi=wt[$n];if(Pi===Fi)return Mt;if([rr,Kn].indexOf(Pi)!==-1)$n--;else break}if([sr,ti].indexOf(bn)!==-1)for(var $n=[De,on].indexOf(Ne)!==-1?Le:ae;$n>=0;){var Pi=wt[$n];if(Pi===Fi)return Mt;if([rr,Kn].indexOf(Pi)!==-1)$n--;else break}if(Sr===Ne&&[Sr,Bo,xr,Qr].indexOf(bn)!==-1||[Bo,xr].indexOf(Ne)!==-1&&[Bo,er].indexOf(bn)!==-1||[er,Qr].indexOf(Ne)!==-1&&bn===er||en.indexOf(Ne)!==-1&&[$e,ti].indexOf(bn)!==-1||en.indexOf(bn)!==-1&&Ne===sr||_n.indexOf(Ne)!==-1&&_n.indexOf(bn)!==-1||Ne===Kn&&_n.indexOf(bn)!==-1||_n.concat(Fi).indexOf(Ne)!==-1&&bn===Re&&Lr.indexOf(Bt[Ye])===-1||_n.concat(Fi).indexOf(bn)!==-1&&Ne===on)return Mt;if(Ne===Lo&&bn===Lo){for(var Dr=Ft[ae],lr=1;Dr>0&&(Dr--,wt[Dr]===Lo);)lr++;if(lr%2!==0)return Mt}return Ne===ji&&bn===yr?Mt:jn},ri=function(Bt,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Ft=be(Bt,wt.lineBreak),Ct=Ft[0],Kt=Ft[1],ae=Ft[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(Kt=Kt.map(function(Ye){return[Fi,wi,ys].indexOf(Ye)!==-1?br:Ye}));var Le=wt.wordBreak==="keep-all"?ae.map(function(Ye,Ne){return Ye&&Bt[Ne]>=19968&&Bt[Ne]<=40959}):void 0;return[Ct,Kt,Le]},ee=function(){function Bt(wt,Ft,Ct,Kt){this.codePoints=wt,this.required=Ft===Pn,this.start=Ct,this.end=Kt}return Bt.prototype.slice=function(){return Ae.apply(void 0,this.codePoints.slice(this.start,this.end))},Bt}(),Cn=function(Bt,wt){var Ft=ne(Bt),Ct=ri(Ft,wt),Kt=Ct[0],ae=Ct[1],Le=Ct[2],Ye=Ft.length,Ne=0,wn=0;return{next:function(){if(wn>=Ye)return{done:!0,value:null};for(var bn=Mt;wn<Ye&&(bn=mi(Ft,ae,Kt,++wn,Le))===Mt;);if(bn!==Mt||wn===Ye){var $n=new ee(Ft,bn,Ne,wn);return Ne=wn,{value:$n,done:!1}}return{done:!0,value:null}}}},Ti=1,Xi=2,On=4,Ge=8,Si=10,Zi=47,ur=92,Ln=9,Ui=32,pe=34,Fe=61,Ke=35,ve=36,Ee=37,_e=39,Sn=40,ei=41,Xe=95,Fn=45,si=33,Gi=60,Ji=62,Te=64,Mi=91,Ri=93,yi=61,Nr=123,qi=63,ci=125,Bi=124,Qi=126,Ar=128,cn=65533,$i=42,dn=43,or=44,is=58,qr=59,rs=46,ro=0,Ur=8,Or=11,Wo=14,oo=31,hi=127,Xt=-1,An=48,_s=97,xs=101,Xo=102,Ms=117,pa=122,_a=65,ma=69,ki=70,Tr=85,Oi=90,bi=function(Bt){return Bt>=An&&Bt<=57},hr=function(Bt){return Bt>=55296&&Bt<=57343},ln=function(Bt){return bi(Bt)||Bt>=_a&&Bt<=ki||Bt>=_s&&Bt<=Xo},cr=function(Bt){return Bt>=_s&&Bt<=pa},Wr=function(Bt){return Bt>=_a&&Bt<=Oi},Ko=function(Bt){return cr(Bt)||Wr(Bt)},Go=function(Bt){return Bt>=Ar},ws=function(Bt){return Bt===Si||Bt===Ln||Bt===Ui},Zs=function(Bt){return Ko(Bt)||Go(Bt)||Bt===Xe},Qa=function(Bt){return Zs(Bt)||bi(Bt)||Bt===Fn},Na=function(Bt){return Bt>=ro&&Bt<=Ur||Bt===Or||Bt>=Wo&&Bt<=oo||Bt===hi},nl=function(Bt,wt){return Bt!==ur?!1:wt!==Si},Vl=function(Bt,wt,Ft){return Bt===Fn?Zs(wt)||nl(wt,Ft):Zs(Bt)?!0:!!(Bt===ur&&nl(Bt,wt))},nn=function(Bt,wt,Ft){return Bt===dn||Bt===Fn?bi(wt)?!0:wt===rs&&bi(Ft):bi(Bt===rs?wt:Bt)},il=function(Bt){var wt=0,Ft=1;(Bt[wt]===dn||Bt[wt]===Fn)&&(Bt[wt]===Fn&&(Ft=-1),wt++);for(var Ct=[];bi(Bt[wt]);)Ct.push(Bt[wt++]);var Kt=Ct.length?parseInt(Ae.apply(void 0,Ct),10):0;Bt[wt]===rs&&wt++;for(var ae=[];bi(Bt[wt]);)ae.push(Bt[wt++]);var Le=ae.length,Ye=Le?parseInt(Ae.apply(void 0,ae),10):0;(Bt[wt]===ma||Bt[wt]===xs)&&wt++;var Ne=1;(Bt[wt]===dn||Bt[wt]===Fn)&&(Bt[wt]===Fn&&(Ne=-1),wt++);for(var wn=[];bi(Bt[wt]);)wn.push(Bt[wt++]);var bn=wn.length?parseInt(Ae.apply(void 0,wn),10):0;return Ft*(Kt+Ye*Math.pow(10,-Le))*Math.pow(10,Ne*bn)},au={type:2},Xu={type:3},Ps={type:4},lu={type:13},cA={type:8},Ju={type:21},us={type:9},Ys={type:10},Vr={type:11},So={type:12},os={type:14},ks={type:23},nr={type:1},gh={type:25},qu={type:24},ml={type:26},ph={type:27},Uu={type:28},Ei={type:29},Aa={type:31},ta={type:32},uu=function(){function Bt(){this._value=[]}return Bt.prototype.write=function(wt){this._value=this._value.concat(ne(wt))},Bt.prototype.read=function(){for(var wt=[],Ft=this.consumeToken();Ft!==ta;)wt.push(Ft),Ft=this.consumeToken();return wt},Bt.prototype.consumeToken=function(){var wt=this.consumeCodePoint();switch(wt){case pe:return this.consumeStringToken(pe);case Ke:var Ft=this.peekCodePoint(0),Ct=this.peekCodePoint(1),Kt=this.peekCodePoint(2);if(Qa(Ft)||nl(Ct,Kt)){var ae=Vl(Ft,Ct,Kt)?Xi:Ti,Le=this.consumeName();return{type:5,value:Le,flags:ae}}break;case ve:if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),lu;break;case _e:return this.consumeStringToken(_e);case Sn:return au;case ei:return Xu;case $i:if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),os;break;case dn:if(nn(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case or:return Ps;case Fn:var Ye=wt,Ne=this.peekCodePoint(0),wn=this.peekCodePoint(1);if(nn(Ye,Ne,wn))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if(Vl(Ye,Ne,wn))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Ne===Fn&&wn===Ji)return this.consumeCodePoint(),this.consumeCodePoint(),qu;break;case rs:if(nn(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case Zi:if(this.peekCodePoint(0)===$i)for(this.consumeCodePoint();;){var bn=this.consumeCodePoint();if(bn===$i&&(bn=this.consumeCodePoint(),bn===Zi))return this.consumeToken();if(bn===Xt)return this.consumeToken()}break;case is:return ml;case qr:return ph;case Gi:if(this.peekCodePoint(0)===si&&this.peekCodePoint(1)===Fn&&this.peekCodePoint(2)===Fn)return this.consumeCodePoint(),this.consumeCodePoint(),gh;break;case Te:var $n=this.peekCodePoint(0),Pi=this.peekCodePoint(1),Dr=this.peekCodePoint(2);if(Vl($n,Pi,Dr)){var Le=this.consumeName();return{type:7,value:Le}}break;case Mi:return Uu;case ur:if(nl(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case Ri:return Ei;case yi:if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),cA;break;case Nr:return Vr;case ci:return So;case Ms:case Tr:var lr=this.peekCodePoint(0),wr=this.peekCodePoint(1);return lr===dn&&(ln(wr)||wr===qi)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case Bi:if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),us;if(this.peekCodePoint(0)===Bi)return this.consumeCodePoint(),Ju;break;case Qi:if(this.peekCodePoint(0)===Fe)return this.consumeCodePoint(),Ys;break;case Xt:return ta}return ws(wt)?(this.consumeWhiteSpace(),Aa):bi(wt)?(this.reconsumeCodePoint(wt),this.consumeNumericToken()):Zs(wt)?(this.reconsumeCodePoint(wt),this.consumeIdentLikeToken()):{type:6,value:Ae(wt)}},Bt.prototype.consumeCodePoint=function(){var wt=this._value.shift();return typeof wt=="undefined"?-1:wt},Bt.prototype.reconsumeCodePoint=function(wt){this._value.unshift(wt)},Bt.prototype.peekCodePoint=function(wt){return wt>=this._value.length?-1:this._value[wt]},Bt.prototype.consumeUnicodeRangeToken=function(){for(var wt=[],Ft=this.consumeCodePoint();ln(Ft)&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint();for(var Ct=!1;Ft===qi&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint(),Ct=!0;if(Ct){var Kt=parseInt(Ae.apply(void 0,wt.map(function(Ne){return Ne===qi?An:Ne})),16),ae=parseInt(Ae.apply(void 0,wt.map(function(Ne){return Ne===qi?ki:Ne})),16);return{type:30,start:Kt,end:ae}}var Le=parseInt(Ae.apply(void 0,wt),16);if(this.peekCodePoint(0)===Fn&&ln(this.peekCodePoint(1))){this.consumeCodePoint(),Ft=this.consumeCodePoint();for(var Ye=[];ln(Ft)&&Ye.length<6;)Ye.push(Ft),Ft=this.consumeCodePoint();var ae=parseInt(Ae.apply(void 0,Ye),16);return{type:30,start:Le,end:ae}}else return{type:30,start:Le,end:Le}},Bt.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===Sn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Sn?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},Bt.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xt)return{type:22,value:""};var Ft=this.peekCodePoint(0);if(Ft===_e||Ft===pe){var Ct=this.consumeStringToken(this.consumeCodePoint());return Ct.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xt||this.peekCodePoint(0)===ei)?(this.consumeCodePoint(),{type:22,value:Ct.value}):(this.consumeBadUrlRemnants(),ks)}for(;;){var Kt=this.consumeCodePoint();if(Kt===Xt||Kt===ei)return{type:22,value:Ae.apply(void 0,wt)};if(ws(Kt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Xt||this.peekCodePoint(0)===ei?(this.consumeCodePoint(),{type:22,value:Ae.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),ks);if(Kt===pe||Kt===_e||Kt===Sn||Na(Kt))return this.consumeBadUrlRemnants(),ks;if(Kt===ur)if(nl(Kt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),ks;else wt.push(Kt)}},Bt.prototype.consumeWhiteSpace=function(){for(;ws(this.peekCodePoint(0));)this.consumeCodePoint()},Bt.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===ei||wt===Xt)return;nl(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},Bt.prototype.consumeStringSlice=function(wt){for(var Ft=5e4,Ct="";wt>0;){var Kt=Math.min(Ft,wt);Ct+=Ae.apply(void 0,this._value.splice(0,Kt)),wt-=Kt}return this._value.shift(),Ct},Bt.prototype.consumeStringToken=function(wt){var Ft="",Ct=0;do{var Kt=this._value[Ct];if(Kt===Xt||Kt===void 0||Kt===wt)return Ft+=this.consumeStringSlice(Ct),{type:0,value:Ft};if(Kt===Si)return this._value.splice(0,Ct),nr;if(Kt===ur){var ae=this._value[Ct+1];ae!==Xt&&ae!==void 0&&(ae===Si?(Ft+=this.consumeStringSlice(Ct),Ct=-1,this._value.shift()):nl(Kt,ae)&&(Ft+=this.consumeStringSlice(Ct),Ft+=Ae(this.consumeEscapedCodePoint()),Ct=-1))}Ct++}while(!0)},Bt.prototype.consumeNumber=function(){var wt=[],Ft=On,Ct=this.peekCodePoint(0);for((Ct===dn||Ct===Fn)&&wt.push(this.consumeCodePoint());bi(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0);var Kt=this.peekCodePoint(1);if(Ct===rs&&bi(Kt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=Ge;bi(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0),Kt=this.peekCodePoint(1);var ae=this.peekCodePoint(2);if((Ct===ma||Ct===xs)&&((Kt===dn||Kt===Fn)&&bi(ae)||bi(Kt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=Ge;bi(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());return[il(wt),Ft]},Bt.prototype.consumeNumericToken=function(){var wt=this.consumeNumber(),Ft=wt[0],Ct=wt[1],Kt=this.peekCodePoint(0),ae=this.peekCodePoint(1),Le=this.peekCodePoint(2);if(Vl(Kt,ae,Le)){var Ye=this.consumeName();return{type:15,number:Ft,flags:Ct,unit:Ye}}return Kt===Ee?(this.consumeCodePoint(),{type:16,number:Ft,flags:Ct}):{type:17,number:Ft,flags:Ct}},Bt.prototype.consumeEscapedCodePoint=function(){var wt=this.consumeCodePoint();if(ln(wt)){for(var Ft=Ae(wt);ln(this.peekCodePoint(0))&&Ft.length<6;)Ft+=Ae(this.consumeCodePoint());ws(this.peekCodePoint(0))&&this.consumeCodePoint();var Ct=parseInt(Ft,16);return Ct===0||hr(Ct)||Ct>1114111?cn:Ct}return wt===Xt?cn:wt},Bt.prototype.consumeName=function(){for(var wt="";;){var Ft=this.consumeCodePoint();if(Qa(Ft))wt+=Ae(Ft);else if(nl(Ft,this.peekCodePoint(0)))wt+=Ae(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(Ft),wt}},Bt}(),ZA=function(){function Bt(wt){this._tokens=wt}return Bt.create=function(wt){var Ft=new uu;return Ft.write(wt),new Bt(Ft.read())},Bt.parseValue=function(wt){return Bt.create(wt).parseComponentValue()},Bt.parseValues=function(wt){return Bt.create(wt).parseComponentValues()},Bt.prototype.parseComponentValue=function(){for(var wt=this.consumeToken();wt.type===31;)wt=this.consumeToken();if(wt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(wt);var Ft=this.consumeComponentValue();do wt=this.consumeToken();while(wt.type===31);if(wt.type===32)return Ft;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},Bt.prototype.parseComponentValues=function(){for(var wt=[];;){var Ft=this.consumeComponentValue();if(Ft.type===32)return wt;wt.push(Ft),wt.push()}},Bt.prototype.consumeComponentValue=function(){var wt=this.consumeToken();switch(wt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(wt.type);case 19:return this.consumeFunction(wt)}return wt},Bt.prototype.consumeSimpleBlock=function(wt){for(var Ft={type:wt,values:[]},Ct=this.consumeToken();;){if(Ct.type===32||Xs(Ct,wt))return Ft;this.reconsumeToken(Ct),Ft.values.push(this.consumeComponentValue()),Ct=this.consumeToken()}},Bt.prototype.consumeFunction=function(wt){for(var Ft={name:wt.value,values:[],type:18};;){var Ct=this.consumeToken();if(Ct.type===32||Ct.type===3)return Ft;this.reconsumeToken(Ct),Ft.values.push(this.consumeComponentValue())}},Bt.prototype.consumeToken=function(){var wt=this._tokens.shift();return typeof wt=="undefined"?ta:wt},Bt.prototype.reconsumeToken=function(wt){this._tokens.unshift(wt)},Bt}(),Bu=function(Bt){return Bt.type===15},Zr=function(Bt){return Bt.type===17},Fs=function(Bt){return Bt.type===20},zi=function(Bt){return Bt.type===0},$r=function(Bt,wt){return Fs(Bt)&&Bt.value===wt},Po=function(Bt){return Bt.type!==31},Ka=function(Bt){return Bt.type!==31&&Bt.type!==4},Da=function(Bt){var wt=[],Ft=[];return Bt.forEach(function(Ct){if(Ct.type===4){if(Ft.length===0)throw new Error("Error parsing function args, zero tokens for arg");wt.push(Ft),Ft=[];return}Ct.type!==31&&Ft.push(Ct)}),Ft.length&&wt.push(Ft),wt},Xs=function(Bt,wt){return wt===11&&Bt.type===12||wt===28&&Bt.type===29?!0:wt===2&&Bt.type===3},va=function(Bt){return Bt.type===17||Bt.type===15},Ks=function(Bt){return Bt.type===16||va(Bt)},mh=function(Bt){return Bt.length>1?[Bt[0],Bt[1]]:[Bt[0]]},Ia={type:17,number:0,flags:On},Qu={type:16,number:50,flags:On},Zo={type:16,number:100,flags:On},Wl=function(Bt,wt,Ft){var Ct=Bt[0],Kt=Bt[1];return[As(Ct,wt),As(typeof Kt!="undefined"?Kt:Ct,Ft)]},As=function(Bt,wt){if(Bt.type===16)return Bt.number/100*wt;if(Bu(Bt))switch(Bt.unit){case"rem":case"em":return 16*Bt.number;case"px":default:return Bt.number}return Bt.number},xa="deg",Ga="grad",YA="rad",dA="turn",Es={name:"angle",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit){case xa:return Math.PI*wt.number/180;case Ga:return Math.PI/200*wt.number;case YA:return wt.number;case dA:return Math.PI*2*wt.number}throw new Error("Unsupported angle type")}},vh=function(Bt){return Bt.type===15&&(Bt.unit===xa||Bt.unit===Ga||Bt.unit===YA||Bt.unit===dA)},hl=function(Bt){var wt=Bt.filter(Fs).map(function(Ft){return Ft.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ia,Ia];case"to top":case"bottom":return ea(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ia,Zo];case"to right":case"left":return ea(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Zo,Zo];case"to bottom":case"top":return ea(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Zo,Ia];case"to left":case"right":return ea(270)}return 0},ea=function(Bt){return Math.PI*Bt/180},Ml={name:"color",parse:function(Bt,wt){if(wt.type===18){var Ft=pc[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported color function "'+wt.name+'"');return Ft(Bt,wt.values)}if(wt.type===5){if(wt.value.length===3){var Ct=wt.value.substring(0,1),Kt=wt.value.substring(1,2),ae=wt.value.substring(2,3);return Ds(parseInt(Ct+Ct,16),parseInt(Kt+Kt,16),parseInt(ae+ae,16),1)}if(wt.value.length===4){var Ct=wt.value.substring(0,1),Kt=wt.value.substring(1,2),ae=wt.value.substring(2,3),Le=wt.value.substring(3,4);return Ds(parseInt(Ct+Ct,16),parseInt(Kt+Kt,16),parseInt(ae+ae,16),parseInt(Le+Le,16)/255)}if(wt.value.length===6){var Ct=wt.value.substring(0,2),Kt=wt.value.substring(2,4),ae=wt.value.substring(4,6);return Ds(parseInt(Ct,16),parseInt(Kt,16),parseInt(ae,16),1)}if(wt.value.length===8){var Ct=wt.value.substring(0,2),Kt=wt.value.substring(2,4),ae=wt.value.substring(4,6),Le=wt.value.substring(6,8);return Ds(parseInt(Ct,16),parseInt(Kt,16),parseInt(ae,16),parseInt(Le,16)/255)}}if(wt.type===20){var Ye=Ou[wt.value.toUpperCase()];if(typeof Ye!="undefined")return Ye}return Ou.TRANSPARENT}},na=function(Bt){return(255&Bt)===0},ps=function(Bt){var wt=255&Bt,Ft=255&Bt>>8,Ct=255&Bt>>16,Kt=255&Bt>>24;return wt<255?"rgba("+Kt+","+Ct+","+Ft+","+wt/255+")":"rgb("+Kt+","+Ct+","+Ft+")"},Ds=function(Bt,wt,Ft,Ct){return(Bt<<24|wt<<16|Ft<<8|Math.round(Ct*255)<<0)>>>0},Ba=function(Bt,wt){if(Bt.type===17)return Bt.number;if(Bt.type===16){var Ft=wt===3?1:255;return wt===3?Bt.number/100*Ft:Math.round(Bt.number/100*Ft)}return 0},Gh=function(Bt,wt){var Ft=wt.filter(Ka);if(Ft.length===3){var Ct=Ft.map(Ba),Kt=Ct[0],ae=Ct[1],Le=Ct[2];return Ds(Kt,ae,Le,1)}if(Ft.length===4){var Ye=Ft.map(Ba),Kt=Ye[0],ae=Ye[1],Le=Ye[2],Ne=Ye[3];return Ds(Kt,ae,Le,Ne)}return 0};function kl(Bt,wt,Ft){return Ft<0&&(Ft+=1),Ft>=1&&(Ft-=1),Ft<1/6?(wt-Bt)*Ft*6+Bt:Ft<1/2?wt:Ft<2/3?(wt-Bt)*6*(2/3-Ft)+Bt:Bt}var ia=function(Bt,wt){var Ft=wt.filter(Ka),Ct=Ft[0],Kt=Ft[1],ae=Ft[2],Le=Ft[3],Ye=(Ct.type===17?ea(Ct.number):Es.parse(Bt,Ct))/(Math.PI*2),Ne=Ks(Kt)?Kt.number/100:0,wn=Ks(ae)?ae.number/100:0,bn=typeof Le!="undefined"&&Ks(Le)?As(Le,1):1;if(Ne===0)return Ds(wn*255,wn*255,wn*255,1);var $n=wn<=.5?wn*(Ne+1):wn+Ne-wn*Ne,Pi=wn*2-$n,Dr=kl(Pi,$n,Ye+1/3),lr=kl(Pi,$n,Ye),wr=kl(Pi,$n,Ye-1/3);return Ds(Dr*255,lr*255,wr*255,bn)},pc={hsl:ia,hsla:ia,rgb:Gh,rgba:Gh},LA=function(Bt,wt){return Ml.parse(Bt,ZA.create(wt).parseComponentValue())},Ou={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},vr={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Ft){if(Fs(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Pd={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Pe=function(Bt,wt){var Ft=Ml.parse(Bt,wt[0]),Ct=wt[1];return Ct&&Ks(Ct)?{color:Ft,stop:Ct}:{color:Ft,stop:null}},Un=function(Bt,wt){var Ft=Bt[0],Ct=Bt[Bt.length-1];Ft.stop===null&&(Ft.stop=Ia),Ct.stop===null&&(Ct.stop=Zo);for(var Kt=[],ae=0,Le=0;Le<Bt.length;Le++){var Ye=Bt[Le].stop;if(Ye!==null){var Ne=As(Ye,wt);Ne>ae?Kt.push(Ne):Kt.push(ae),ae=Ne}else Kt.push(null)}for(var wn=null,Le=0;Le<Kt.length;Le++){var bn=Kt[Le];if(bn===null)wn===null&&(wn=Le);else if(wn!==null){for(var $n=Le-wn,Pi=Kt[wn-1],Dr=(bn-Pi)/($n+1),lr=1;lr<=$n;lr++)Kt[wn+lr-1]=Dr*lr;wn=null}}return Bt.map(function(wr,es){var ao=wr.color;return{color:ao,stop:Math.max(Math.min(1,Kt[es]/wt),0)}})},lf=function(Bt,wt,Ft){var Ct=wt/2,Kt=Ft/2,ae=As(Bt[0],wt)-Ct,Le=Kt-As(Bt[1],Ft);return(Math.atan2(Le,ae)+Math.PI*2)%(Math.PI*2)},Fd=function(Bt,wt,Ft){var Ct=typeof Bt=="number"?Bt:lf(Bt,wt,Ft),Kt=Math.abs(wt*Math.sin(Ct))+Math.abs(Ft*Math.cos(Ct)),ae=wt/2,Le=Ft/2,Ye=Kt/2,Ne=Math.sin(Ct-Math.PI/2)*Ye,wn=Math.cos(Ct-Math.PI/2)*Ye;return[Kt,ae-wn,ae+wn,Le-Ne,Le+Ne]},rl=function(Bt,wt){return Math.sqrt(Bt*Bt+wt*wt)},$u=function(Bt,wt,Ft,Ct,Kt){var ae=[[0,0],[0,wt],[Bt,0],[Bt,wt]];return ae.reduce(function(Le,Ye){var Ne=Ye[0],wn=Ye[1],bn=rl(Ft-Ne,Ct-wn);return(Kt?bn<Le.optimumDistance:bn>Le.optimumDistance)?{optimumCorner:Ye,optimumDistance:bn}:Le},{optimumDistance:Kt?1/0:-1/0,optimumCorner:null}).optimumCorner},yh=function(Bt,wt,Ft,Ct,Kt){var ae=0,Le=0;switch(Bt.size){case 0:Bt.shape===0?ae=Le=Math.min(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-Kt)):Bt.shape===1&&(ae=Math.min(Math.abs(wt),Math.abs(wt-Ct)),Le=Math.min(Math.abs(Ft),Math.abs(Ft-Kt)));break;case 2:if(Bt.shape===0)ae=Le=Math.min(rl(wt,Ft),rl(wt,Ft-Kt),rl(wt-Ct,Ft),rl(wt-Ct,Ft-Kt));else if(Bt.shape===1){var Ye=Math.min(Math.abs(Ft),Math.abs(Ft-Kt))/Math.min(Math.abs(wt),Math.abs(wt-Ct)),Ne=$u(Ct,Kt,wt,Ft,!0),wn=Ne[0],bn=Ne[1];ae=rl(wn-wt,(bn-Ft)/Ye),Le=Ye*ae}break;case 1:Bt.shape===0?ae=Le=Math.max(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-Kt)):Bt.shape===1&&(ae=Math.max(Math.abs(wt),Math.abs(wt-Ct)),Le=Math.max(Math.abs(Ft),Math.abs(Ft-Kt)));break;case 3:if(Bt.shape===0)ae=Le=Math.max(rl(wt,Ft),rl(wt,Ft-Kt),rl(wt-Ct,Ft),rl(wt-Ct,Ft-Kt));else if(Bt.shape===1){var Ye=Math.max(Math.abs(Ft),Math.abs(Ft-Kt))/Math.max(Math.abs(wt),Math.abs(wt-Ct)),$n=$u(Ct,Kt,wt,Ft,!1),wn=$n[0],bn=$n[1];ae=rl(wn-wt,(bn-Ft)/Ye),Le=Ye*ae}break}return Array.isArray(Bt.size)&&(ae=As(Bt.size[0],Ct),Le=Bt.size.length===2?As(Bt.size[1],Kt):ae),[ae,Le]},mc=function(Bt,wt){var Ft=ea(180),Ct=[];return Da(wt).forEach(function(Kt,ae){if(ae===0){var Le=Kt[0];if(Le.type===20&&Le.value==="to"){Ft=hl(Kt);return}else if(vh(Le)){Ft=Es.parse(Bt,Le);return}}var Ye=Pe(Bt,Kt);Ct.push(Ye)}),{angle:Ft,stops:Ct,type:1}},fA=function(Bt,wt){var Ft=ea(180),Ct=[];return Da(wt).forEach(function(Kt,ae){if(ae===0){var Le=Kt[0];if(Le.type===20&&["top","left","right","bottom"].indexOf(Le.value)!==-1){Ft=hl(Kt);return}else if(vh(Le)){Ft=(Es.parse(Bt,Le)+ea(270))%ea(360);return}}var Ye=Pe(Bt,Kt);Ct.push(Ye)}),{angle:Ft,stops:Ct,type:1}},Js=function(Bt,wt){var Ft=ea(180),Ct=[],Kt=1,ae=0,Le=3,Ye=[];return Da(wt).forEach(function(Ne,wn){var bn=Ne[0];if(wn===0){if(Fs(bn)&&bn.value==="linear"){Kt=1;return}else if(Fs(bn)&&bn.value==="radial"){Kt=2;return}}if(bn.type===18){if(bn.name==="from"){var $n=Ml.parse(Bt,bn.values[0]);Ct.push({stop:Ia,color:$n})}else if(bn.name==="to"){var $n=Ml.parse(Bt,bn.values[0]);Ct.push({stop:Zo,color:$n})}else if(bn.name==="color-stop"){var Pi=bn.values.filter(Ka);if(Pi.length===2){var $n=Ml.parse(Bt,Pi[1]),Dr=Pi[0];Zr(Dr)&&Ct.push({stop:{type:16,number:Dr.number*100,flags:Dr.flags},color:$n})}}}}),Kt===1?{angle:(Ft+ea(180))%ea(360),stops:Ct,type:Kt}:{size:Le,shape:ae,stops:Ct,position:Ye,type:Kt}},Gr="closest-side",cl="farthest-side",Zl="closest-corner",Us="farthest-corner",Fo="circle",ya="ellipse",vl="cover",Ls="contain",Yl=function(Bt,wt){var Ft=0,Ct=3,Kt=[],ae=[];return Da(wt).forEach(function(Le,Ye){var Ne=!0;if(Ye===0){var wn=!1;Ne=Le.reduce(function($n,Pi){if(wn)if(Fs(Pi))switch(Pi.value){case"center":return ae.push(Qu),$n;case"top":case"left":return ae.push(Ia),$n;case"right":case"bottom":return ae.push(Zo),$n}else(Ks(Pi)||va(Pi))&&ae.push(Pi);else if(Fs(Pi))switch(Pi.value){case Fo:return Ft=0,!1;case ya:return Ft=1,!1;case"at":return wn=!0,!1;case Gr:return Ct=0,!1;case vl:case cl:return Ct=1,!1;case Ls:case Zl:return Ct=2,!1;case Us:return Ct=3,!1}else if(va(Pi)||Ks(Pi))return Array.isArray(Ct)||(Ct=[]),Ct.push(Pi),!1;return $n},Ne)}if(Ne){var bn=Pe(Bt,Le);Kt.push(bn)}}),{size:Ct,shape:Ft,stops:Kt,position:ae,type:2}},La=function(Bt,wt){var Ft=0,Ct=3,Kt=[],ae=[];return Da(wt).forEach(function(Le,Ye){var Ne=!0;if(Ye===0?Ne=Le.reduce(function(bn,$n){if(Fs($n))switch($n.value){case"center":return ae.push(Qu),!1;case"top":case"left":return ae.push(Ia),!1;case"right":case"bottom":return ae.push(Zo),!1}else if(Ks($n)||va($n))return ae.push($n),!1;return bn},Ne):Ye===1&&(Ne=Le.reduce(function(bn,$n){if(Fs($n))switch($n.value){case Fo:return Ft=0,!1;case ya:return Ft=1,!1;case Ls:case Gr:return Ct=0,!1;case cl:return Ct=1,!1;case Zl:return Ct=2,!1;case vl:case Us:return Ct=3,!1}else if(va($n)||Ks($n))return Array.isArray(Ct)||(Ct=[]),Ct.push($n),!1;return bn},Ne)),Ne){var wn=Pe(Bt,Le);Kt.push(wn)}}),{size:Ct,shape:Ft,stops:Kt,position:ae,type:2}},MA=function(Bt){return Bt.type===1},Jo=function(Bt){return Bt.type===2},ol={name:"image",parse:function(Bt,wt){if(wt.type===22){var Ft={url:wt.value,type:0};return Bt.cache.addImage(wt.value),Ft}if(wt.type===18){var Ct=Bs[wt.name];if(typeof Ct=="undefined")throw new Error('Attempting to parse an unsupported image function "'+wt.name+'"');return Ct(Bt,wt.values)}throw new Error("Unsupported image type "+wt.type)}};function Oo(Bt){return!(Bt.type===20&&Bt.value==="none")&&(Bt.type!==18||!!Bs[Bt.name])}var Bs={"linear-gradient":mc,"-moz-linear-gradient":fA,"-ms-linear-gradient":fA,"-o-linear-gradient":fA,"-webkit-linear-gradient":fA,"radial-gradient":Yl,"-moz-radial-gradient":La,"-ms-radial-gradient":La,"-o-radial-gradient":La,"-webkit-radial-gradient":La,"-webkit-gradient":Js},Qs={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt.filter(function(Ct){return Ka(Ct)&&Oo(Ct)}).map(function(Ct){return ol.parse(Bt,Ct)})}},ra={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Ft){if(Fs(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ts={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(Bt,wt){return Da(wt).map(function(Ft){return Ft.filter(Ks)}).map(mh)}},wh={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(Bt,wt){return Da(wt).map(function(Ft){return Ft.filter(Fs).map(function(Ct){return Ct.value}).join(" ")}).map(_r)}},_r=function(Bt){switch(Bt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Sh;(function(Bt){Bt.AUTO="auto",Bt.CONTAIN="contain",Bt.COVER="cover"})(Sh||(Sh={}));var Ho={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(Bt,wt){return Da(wt).map(function(Ft){return Ft.filter(uf)})}},uf=function(Bt){return Fs(Bt)||Ks(Bt)},kA=function(Bt){return{name:"border-"+Bt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},vc=kA("top"),Ed=kA("right"),Qc=kA("bottom"),bA=kA("left"),tA=function(Bt){return{name:"border-radius-"+Bt,initialValue:"0 0",prefix:!1,type:1,parse:function(wt,Ft){return mh(Ft.filter(Ks))}}},ss=tA("top-left"),TA=tA("top-right"),Zt=tA("bottom-right"),me=tA("bottom-left"),Se=function(Bt){return{name:"border-"+Bt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(wt,Ft){switch(Ft){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Be=Se("top"),Ze=Se("right"),an=Se("bottom"),hn=Se("left"),xn=function(Bt){return{name:"border-"+Bt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(wt,Ft){return Bu(Ft)?Ft.number:0}}},Zn=xn("top"),Rn=xn("right"),gi=xn("bottom"),zn=xn("left"),oi={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ni={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"rtl":return 1;case"ltr":default:return 0}}},Ci={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Fs).reduce(function(Ft,Ct){return Ft|Vi(Ct.value)},0)}},Vi=function(Bt){switch(Bt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},gr={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Mr={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(Bt,wt){return wt.type===20&&wt.value==="normal"?0:wt.type===17||wt.type===15?wt.number:0}},Ni;(function(Bt){Bt.NORMAL="normal",Bt.STRICT="strict"})(Ni||(Ni={}));var ar={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"strict":return Ni.STRICT;case"normal":default:return Ni.NORMAL}}},_i={name:"line-height",initialValue:"normal",prefix:!1,type:4},Cr=function(Bt,wt){return Fs(Bt)&&Bt.value==="normal"?1.2*wt:Bt.type===17?wt*Bt.number:Ks(Bt)?As(Bt,wt):wt},eo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(Bt,wt){return wt.type===20&&wt.value==="none"?null:ol.parse(Bt,wt)}},Br={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"inside":return 0;case"outside":default:return 1}}},xo={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Yr=function(Bt){return{name:"margin-"+Bt,initialValue:"0",prefix:!1,type:4}},ko=Yr("top"),Cs=Yr("right"),To=Yr("bottom"),to=Yr("left"),no={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Fs).map(function(Ft){switch(Ft.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Hi={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Pr=function(Bt){return{name:"padding-"+Bt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},lo=Pr("top"),Ao=Pr("right"),ho=Pr("bottom"),jo=Pr("left"),mo={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},hs={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Ss={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&$r(wt[0],"none")?[]:Da(wt).map(function(Ft){for(var Ct={color:Ou.TRANSPARENT,offsetX:Ia,offsetY:Ia,blur:Ia},Kt=0,ae=0;ae<Ft.length;ae++){var Le=Ft[ae];va(Le)?(Kt===0?Ct.offsetX=Le:Kt===1?Ct.offsetY=Le:Ct.blur=Le,Kt++):Ct.color=Ml.parse(Bt,Le)}return Ct})}},Os={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},ja={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(Bt,wt){if(wt.type===20&&wt.value==="none")return null;if(wt.type===18){var Ft=zo[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+wt.name+'"');return Ft(wt.values)}return null}},oa=function(Bt){var wt=Bt.filter(function(Ft){return Ft.type===17}).map(function(Ft){return Ft.number});return wt.length===6?wt:null},Co=function(Bt){var wt=Bt.filter(function(Ne){return Ne.type===17}).map(function(Ne){return Ne.number}),Ft=wt[0],Ct=wt[1];wt[2],wt[3];var Kt=wt[4],ae=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Le=wt[12],Ye=wt[13];return wt[14],wt[15],wt.length===16?[Ft,Ct,Kt,ae,Le,Ye]:null},zo={matrix:oa,matrix3d:Co},Yo={type:16,number:50,flags:On},cs=[Yo,Yo],Ro={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(Bt,wt){var Ft=wt.filter(Ks);return Ft.length!==2?cs:[Ft[0],Ft[1]]}},Kr={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},No;(function(Bt){Bt.NORMAL="normal",Bt.BREAK_ALL="break-all",Bt.KEEP_ALL="keep-all"})(No||(No={}));for(var wa={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-all":return No.BREAK_ALL;case"keep-all":return No.KEEP_ALL;case"normal":default:return No.NORMAL}}},dl={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(Bt,wt){if(wt.type===20)return{auto:!0,order:0};if(Zr(wt))return{auto:!1,order:wt.number};throw new Error("Invalid z-index number parsed")}},Ya={name:"time",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit.toLowerCase()){case"s":return 1e3*wt.number;case"ms":return wt.number}throw new Error("Unsupported time type")}},bl={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(Bt,wt){return Zr(wt)?wt.number:1}},Tl={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Au={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Fs).map(function(Ft){switch(Ft.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(Ft){return Ft!==0})}},so={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(Bt,wt){var Ft=[],Ct=[];return wt.forEach(function(Kt){switch(Kt.type){case 20:case 0:Ft.push(Kt.value);break;case 17:Ft.push(Kt.number.toString());break;case 4:Ct.push(Ft.join(" ")),Ft.length=0;break}}),Ft.length&&Ct.push(Ft.join(" ")),Ct.map(function(Kt){return Kt.indexOf(" ")===-1?Kt:"'"+Kt+"'"})}},Nl={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ms={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(Bt,wt){if(Zr(wt))return wt.number;if(Fs(wt))switch(wt.value){case"bold":return 700;case"normal":default:return 400}return 400}},za={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.filter(Fs).map(function(Ft){return Ft.value})}},Xa={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},qo=function(Bt,wt){return(Bt&wt)!==0},gA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt}},Xl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;for(var Ct=[],Kt=wt.filter(Po),ae=0;ae<Kt.length;ae++){var Le=Kt[ae],Ye=Kt[ae+1];if(Le.type===20){var Ne=Ye&&Zr(Ye)?Ye.number:1;Ct.push({counter:Le.value,increment:Ne})}}return Ct}},Cu={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return[];for(var Ft=[],Ct=wt.filter(Po),Kt=0;Kt<Ct.length;Kt++){var ae=Ct[Kt],Le=Ct[Kt+1];if(Fs(ae)&&ae.value!=="none"){var Ye=Le&&Zr(Le)?Le.number:0;Ft.push({counter:ae.value,reset:Ye})}}return Ft}},qs={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Bu).map(function(Ft){return Ya.parse(Bt,Ft)})}},hu={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;var Ct=[],Kt=wt.filter(zi);if(Kt.length%2!==0)return null;for(var ae=0;ae<Kt.length;ae+=2){var Le=Kt[ae].value,Ye=Kt[ae+1].value;Ct.push({open:Le,close:Ye})}return Ct}},Pu=function(Bt,wt,Ft){if(!Bt)return"";var Ct=Bt[Math.min(wt,Bt.length-1)];return Ct?Ft?Ct.open:Ct.close:""},XA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&$r(wt[0],"none")?[]:Da(wt).map(function(Ft){for(var Ct={color:255,offsetX:Ia,offsetY:Ia,blur:Ia,spread:Ia,inset:!1},Kt=0,ae=0;ae<Ft.length;ae++){var Le=Ft[ae];$r(Le,"inset")?Ct.inset=!0:va(Le)?(Kt===0?Ct.offsetX=Le:Kt===1?Ct.offsetY=Le:Kt===2?Ct.blur=Le:Ct.spread=Le,Kt++):Ct.color=Ml.parse(Bt,Le)}return Ct})}},jh={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(Bt,wt){var Ft=[0,1,2],Ct=[];return wt.filter(Fs).forEach(function(Kt){switch(Kt.value){case"stroke":Ct.push(1);break;case"fill":Ct.push(0);break;case"markers":Ct.push(2);break}}),Ft.forEach(function(Kt){Ct.indexOf(Kt)===-1&&Ct.push(Kt)}),Ct}},JA={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},sl={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(Bt,wt){return Bu(wt)?wt.number:0}},pA=function(){function Bt(wt,Ft){var Ct,Kt;this.animationDuration=kr(wt,qs,Ft.animationDuration),this.backgroundClip=kr(wt,vr,Ft.backgroundClip),this.backgroundColor=kr(wt,Pd,Ft.backgroundColor),this.backgroundImage=kr(wt,Qs,Ft.backgroundImage),this.backgroundOrigin=kr(wt,ra,Ft.backgroundOrigin),this.backgroundPosition=kr(wt,ts,Ft.backgroundPosition),this.backgroundRepeat=kr(wt,wh,Ft.backgroundRepeat),this.backgroundSize=kr(wt,Ho,Ft.backgroundSize),this.borderTopColor=kr(wt,vc,Ft.borderTopColor),this.borderRightColor=kr(wt,Ed,Ft.borderRightColor),this.borderBottomColor=kr(wt,Qc,Ft.borderBottomColor),this.borderLeftColor=kr(wt,bA,Ft.borderLeftColor),this.borderTopLeftRadius=kr(wt,ss,Ft.borderTopLeftRadius),this.borderTopRightRadius=kr(wt,TA,Ft.borderTopRightRadius),this.borderBottomRightRadius=kr(wt,Zt,Ft.borderBottomRightRadius),this.borderBottomLeftRadius=kr(wt,me,Ft.borderBottomLeftRadius),this.borderTopStyle=kr(wt,Be,Ft.borderTopStyle),this.borderRightStyle=kr(wt,Ze,Ft.borderRightStyle),this.borderBottomStyle=kr(wt,an,Ft.borderBottomStyle),this.borderLeftStyle=kr(wt,hn,Ft.borderLeftStyle),this.borderTopWidth=kr(wt,Zn,Ft.borderTopWidth),this.borderRightWidth=kr(wt,Rn,Ft.borderRightWidth),this.borderBottomWidth=kr(wt,gi,Ft.borderBottomWidth),this.borderLeftWidth=kr(wt,zn,Ft.borderLeftWidth),this.boxShadow=kr(wt,XA,Ft.boxShadow),this.color=kr(wt,oi,Ft.color),this.direction=kr(wt,ni,Ft.direction),this.display=kr(wt,Ci,Ft.display),this.float=kr(wt,gr,Ft.cssFloat),this.fontFamily=kr(wt,so,Ft.fontFamily),this.fontSize=kr(wt,Nl,Ft.fontSize),this.fontStyle=kr(wt,Xa,Ft.fontStyle),this.fontVariant=kr(wt,za,Ft.fontVariant),this.fontWeight=kr(wt,ms,Ft.fontWeight),this.letterSpacing=kr(wt,Mr,Ft.letterSpacing),this.lineBreak=kr(wt,ar,Ft.lineBreak),this.lineHeight=kr(wt,_i,Ft.lineHeight),this.listStyleImage=kr(wt,eo,Ft.listStyleImage),this.listStylePosition=kr(wt,Br,Ft.listStylePosition),this.listStyleType=kr(wt,xo,Ft.listStyleType),this.marginTop=kr(wt,ko,Ft.marginTop),this.marginRight=kr(wt,Cs,Ft.marginRight),this.marginBottom=kr(wt,To,Ft.marginBottom),this.marginLeft=kr(wt,to,Ft.marginLeft),this.opacity=kr(wt,bl,Ft.opacity);var ae=kr(wt,no,Ft.overflow);this.overflowX=ae[0],this.overflowY=ae[ae.length>1?1:0],this.overflowWrap=kr(wt,Hi,Ft.overflowWrap),this.paddingTop=kr(wt,lo,Ft.paddingTop),this.paddingRight=kr(wt,Ao,Ft.paddingRight),this.paddingBottom=kr(wt,ho,Ft.paddingBottom),this.paddingLeft=kr(wt,jo,Ft.paddingLeft),this.paintOrder=kr(wt,jh,Ft.paintOrder),this.position=kr(wt,hs,Ft.position),this.textAlign=kr(wt,mo,Ft.textAlign),this.textDecorationColor=kr(wt,Tl,(Ct=Ft.textDecorationColor)!==null&&Ct!==void 0?Ct:Ft.color),this.textDecorationLine=kr(wt,Au,(Kt=Ft.textDecorationLine)!==null&&Kt!==void 0?Kt:Ft.textDecoration),this.textShadow=kr(wt,Ss,Ft.textShadow),this.textTransform=kr(wt,Os,Ft.textTransform),this.transform=kr(wt,ja,Ft.transform),this.transformOrigin=kr(wt,Ro,Ft.transformOrigin),this.visibility=kr(wt,Kr,Ft.visibility),this.webkitTextStrokeColor=kr(wt,JA,Ft.webkitTextStrokeColor),this.webkitTextStrokeWidth=kr(wt,sl,Ft.webkitTextStrokeWidth),this.wordBreak=kr(wt,wa,Ft.wordBreak),this.zIndex=kr(wt,dl,Ft.zIndex)}return Bt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},Bt.prototype.isTransparent=function(){return na(this.backgroundColor)},Bt.prototype.isTransformed=function(){return this.transform!==null},Bt.prototype.isPositioned=function(){return this.position!==0},Bt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},Bt.prototype.isFloating=function(){return this.float!==0},Bt.prototype.isInlineLevel=function(){return qo(this.display,4)||qo(this.display,33554432)||qo(this.display,268435456)||qo(this.display,536870912)||qo(this.display,67108864)||qo(this.display,134217728)},Bt}(),Ja=function(){function Bt(wt,Ft){this.content=kr(wt,gA,Ft.content),this.quotes=kr(wt,hu,Ft.quotes)}return Bt}(),cu=function(){function Bt(wt,Ft){this.counterIncrement=kr(wt,Xl,Ft.counterIncrement),this.counterReset=kr(wt,Cu,Ft.counterReset)}return Bt}(),kr=function(Bt,wt,Ft){var Ct=new uu,Kt=Ft!==null&&typeof Ft!="undefined"?Ft.toString():wt.initialValue;Ct.write(Kt);var ae=new ZA(Ct.read());switch(wt.type){case 2:var Le=ae.parseComponentValue();return wt.parse(Bt,Fs(Le)?Le.value:wt.initialValue);case 0:return wt.parse(Bt,ae.parseComponentValue());case 1:return wt.parse(Bt,ae.parseComponentValues());case 4:return ae.parseComponentValue();case 3:switch(wt.format){case"angle":return Es.parse(Bt,ae.parseComponentValue());case"color":return Ml.parse(Bt,ae.parseComponentValue());case"image":return ol.parse(Bt,ae.parseComponentValue());case"length":var Ye=ae.parseComponentValue();return va(Ye)?Ye:Ia;case"length-percentage":var Ne=ae.parseComponentValue();return Ks(Ne)?Ne:Ia;case"time":return Ya.parse(Bt,ae.parseComponentValue())}break}},eA="data-html2canvas-debug",xh=function(Bt){var wt=Bt.getAttribute(eA);switch(wt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},mA=function(Bt,wt){var Ft=xh(Bt);return Ft===1||wt===Ft},Jl=function(){function Bt(wt,Ft){if(this.context=wt,this.textNodes=[],this.elements=[],this.flags=0,mA(Ft,3))debugger;this.styles=new pA(wt,window.getComputedStyle(Ft,null)),Wc(Ft)&&(this.styles.animationDuration.some(function(Ct){return Ct>0})&&(Ft.style.animationDuration="0s"),this.styles.transform!==null&&(Ft.style.transform="none")),this.bounds=Ut(this.context,Ft),mA(Ft,4)&&(this.flags|=16)}return Bt}(),vA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hu=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Fu=0;Fu<du.length;Fu++)Hu[du.charCodeAt(Fu)]=Fu;for(var Hs=function(Bt){var wt=Bt.length*.75,Ft=Bt.length,Ct,Kt=0,ae,Le,Ye,Ne;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var wn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),bn=Array.isArray(wn)?wn:new Uint8Array(wn);for(Ct=0;Ct<Ft;Ct+=4)ae=Hu[Bt.charCodeAt(Ct)],Le=Hu[Bt.charCodeAt(Ct+1)],Ye=Hu[Bt.charCodeAt(Ct+2)],Ne=Hu[Bt.charCodeAt(Ct+3)],bn[Kt++]=ae<<2|Le>>4,bn[Kt++]=(Le&15)<<4|Ye>>2,bn[Kt++]=(Ye&3)<<6|Ne&63;return wn},fl=function(Bt){for(var wt=Bt.length,Ft=[],Ct=0;Ct<wt;Ct+=2)Ft.push(Bt[Ct+1]<<8|Bt[Ct]);return Ft},Ru=function(Bt){for(var wt=Bt.length,Ft=[],Ct=0;Ct<wt;Ct+=4)Ft.push(Bt[Ct+3]<<24|Bt[Ct+2]<<16|Bt[Ct+1]<<8|Bt[Ct]);return Ft},yl=5,wl=11,Va=2,Bh=wl-yl,qA=65536>>yl,Sa=1<<yl,NA=Sa-1,nA=1024>>yl,Wa=qA+nA,_u=Wa,$A=32,Ku=_u+$A,zh=65536>>wl,yA=1<<Bh,ql=yA-1,wA=function(Bt,wt,Ft){return Bt.slice?Bt.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(Bt,wt,Ft))},Vh=function(Bt,wt,Ft){return Bt.slice?Bt.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(Bt,wt,Ft))},co=function(Bt,wt){var Ft=Hs(Bt),Ct=Array.isArray(Ft)?Ru(Ft):new Uint32Array(Ft),Kt=Array.isArray(Ft)?fl(Ft):new Uint16Array(Ft),ae=24,Le=wA(Kt,ae/2,Ct[4]/2),Ye=Ct[5]===2?wA(Kt,(ae+Ct[4])/2):Vh(Ct,Math.ceil((ae+Ct[4])/4));return new Jr(Ct[0],Ct[1],Ct[2],Ct[3],Le,Ye)},Jr=function(){function Bt(wt,Ft,Ct,Kt,ae,Le){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=Kt,this.index=ae,this.data=Le}return Bt.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>yl],Ft=(Ft<<Va)+(wt&NA),this.data[Ft];if(wt<=65535)return Ft=this.index[qA+(wt-55296>>yl)],Ft=(Ft<<Va)+(wt&NA),this.data[Ft];if(wt<this.highStart)return Ft=Ku-zh+(wt>>wl),Ft=this.index[Ft],Ft+=wt>>yl&ql,Ft=this.index[Ft],Ft=(Ft<<Va)+(wt&NA),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ma=0;Ma<jr.length;Ma++)bs[jr.charCodeAt(Ma)]=Ma;var DA=1,Eu=2,Ue=3,iA=4,Sl=5,Ch=7,Oc=8,yc=9,Wh=10,Af=11,qa=12,Zh=13,wc=14,Ph=15,Hc=function(Bt){for(var wt=[],Ft=0,Ct=Bt.length;Ft<Ct;){var Kt=Bt.charCodeAt(Ft++);if(Kt>=55296&&Kt<=56319&&Ft<Ct){var ae=Bt.charCodeAt(Ft++);(ae&64512)===56320?wt.push(((Kt&1023)<<10)+(ae&1023)+65536):(wt.push(Kt),Ft--)}else wt.push(Kt)}return wt},Rc=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Ft=Bt.length;if(!Ft)return"";for(var Ct=[],Kt=-1,ae="";++Kt<Ft;){var Le=Bt[Kt];Le<=65535?Ct.push(Le):(Le-=65536,Ct.push((Le>>10)+55296,Le%1024+56320)),(Kt+1===Ft||Ct.length>16384)&&(ae+=String.fromCharCode.apply(String,Ct),Ct.length=0)}return ae},Ld=co(vA),$l="\xD7",xl="\xF7",Fh=function(Bt){return Ld.get(Bt)},Md=function(Bt,wt,Ft){var Ct=Ft-2,Kt=wt[Ct],ae=wt[Ft-1],Le=wt[Ft];if(ae===Eu&&Le===Ue)return $l;if(ae===Eu||ae===Ue||ae===iA||Le===Eu||Le===Ue||Le===iA)return xl;if(ae===Oc&&[Oc,yc,Af,qa].indexOf(Le)!==-1||(ae===Af||ae===yc)&&(Le===yc||Le===Wh)||(ae===qa||ae===Wh)&&Le===Wh||Le===Zh||Le===Sl||Le===Ch||ae===DA)return $l;if(ae===Zh&&Le===wc){for(;Kt===Sl;)Kt=wt[--Ct];if(Kt===wc)return $l}if(ae===Ph&&Le===Ph){for(var Ye=0;Kt===Ph;)Ye++,Kt=wt[--Ct];if(Ye%2===0)return $l}return xl},rA=function(Bt){var wt=Hc(Bt),Ft=wt.length,Ct=0,Kt=0,ae=wt.map(Fh);return{next:function(){if(Ct>=Ft)return{done:!0,value:null};for(var Le=$l;Ct<Ft&&(Le=Md(wt,ae,++Ct))===$l;);if(Le!==$l||Ct===Ft){var Ye=Rc.apply(null,wt.slice(Kt,Ct));return Kt=Ct,{value:Ye,done:!1}}return{done:!0,value:null}}}},Eh=function(Bt){for(var wt=rA(Bt),Ft=[],Ct;!(Ct=wt.next()).done;)Ct.value&&Ft.push(Ct.value.slice());return Ft},Sc=function(Bt){var wt=123;if(Bt.createRange){var Ft=Bt.createRange();if(Ft.getBoundingClientRect){var Ct=Bt.createElement("boundtest");Ct.style.height=wt+"px",Ct.style.display="block",Bt.body.appendChild(Ct),Ft.selectNode(Ct);var Kt=Ft.getBoundingClientRect(),ae=Math.round(Kt.height);if(Bt.body.removeChild(Ct),ae===wt)return!0}}return!1},Lh=function(Bt){var wt=Bt.createElement("boundtest");wt.style.width="50px",wt.style.display="block",wt.style.fontSize="12px",wt.style.letterSpacing="0px",wt.style.wordSpacing="0px",Bt.body.appendChild(wt);var Ft=Bt.createRange();wt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var Ct=wt.firstChild,Kt=ne(Ct.data).map(function(Ne){return Ae(Ne)}),ae=0,Le={},Ye=Kt.every(function(Ne,wn){Ft.setStart(Ct,ae),Ft.setEnd(Ct,ae+Ne.length);var bn=Ft.getBoundingClientRect();ae+=Ne.length;var $n=bn.x>Le.x||bn.y>Le.y;return Le=bn,wn===0?!0:$n});return Bt.body.removeChild(wt),Ye},Dl=function(){return typeof new Image().crossOrigin!="undefined"},kd=function(){return typeof new XMLHttpRequest().responseType=="string"},as=function(Bt){var wt=new Image,Ft=Bt.createElement("canvas"),Ct=Ft.getContext("2d");if(!Ct)return!1;wt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{Ct.drawImage(wt,0,0),Ft.toDataURL()}catch(Kt){return!1}return!0},Eo=function(Bt){return Bt[0]===0&&Bt[1]===255&&Bt[2]===0&&Bt[3]===255},Oa=function(Bt){var wt=Bt.createElement("canvas"),Ft=100;wt.width=Ft,wt.height=Ft;var Ct=wt.getContext("2d");if(!Ct)return Promise.reject(!1);Ct.fillStyle="rgb(0, 255, 0)",Ct.fillRect(0,0,Ft,Ft);var Kt=new Image,ae=wt.toDataURL();Kt.src=ae;var Le=Il(Ft,Ft,0,0,Kt);return Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft),al(Le).then(function(Ye){Ct.drawImage(Ye,0,0);var Ne=Ct.getImageData(0,0,Ft,Ft).data;Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft);var wn=Bt.createElement("div");return wn.style.backgroundImage="url("+ae+")",wn.style.height=Ft+"px",Eo(Ne)?al(Il(Ft,Ft,0,0,wn)):Promise.reject(!1)}).then(function(Ye){return Ct.drawImage(Ye,0,0),Eo(Ct.getImageData(0,0,Ft,Ft).data)}).catch(function(){return!1})},Il=function(Bt,wt,Ft,Ct,Kt){var ae="http://www.w3.org/2000/svg",Le=document.createElementNS(ae,"svg"),Ye=document.createElementNS(ae,"foreignObject");return Le.setAttributeNS(null,"width",Bt.toString()),Le.setAttributeNS(null,"height",wt.toString()),Ye.setAttributeNS(null,"width","100%"),Ye.setAttributeNS(null,"height","100%"),Ye.setAttributeNS(null,"x",Ft.toString()),Ye.setAttributeNS(null,"y",Ct.toString()),Ye.setAttributeNS(null,"externalResourcesRequired","true"),Le.appendChild(Ye),Ye.appendChild(Kt),Le},al=function(Bt){return new Promise(function(wt,Ft){var Ct=new Image;Ct.onload=function(){return wt(Ct)},Ct.onerror=Ft,Ct.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},sa={get SUPPORT_RANGE_BOUNDS(){var Bt=Sc(document);return Object.defineProperty(sa,"SUPPORT_RANGE_BOUNDS",{value:Bt}),Bt},get SUPPORT_WORD_BREAKING(){var Bt=sa.SUPPORT_RANGE_BOUNDS&&Lh(document);return Object.defineProperty(sa,"SUPPORT_WORD_BREAKING",{value:Bt}),Bt},get SUPPORT_SVG_DRAWING(){var Bt=as(document);return Object.defineProperty(sa,"SUPPORT_SVG_DRAWING",{value:Bt}),Bt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var Bt=typeof Array.from=="function"&&typeof window.fetch=="function"?Oa(document):Promise.resolve(!1);return Object.defineProperty(sa,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:Bt}),Bt},get SUPPORT_CORS_IMAGES(){var Bt=Dl();return Object.defineProperty(sa,"SUPPORT_CORS_IMAGES",{value:Bt}),Bt},get SUPPORT_RESPONSE_TYPE(){var Bt=kd();return Object.defineProperty(sa,"SUPPORT_RESPONSE_TYPE",{value:Bt}),Bt},get SUPPORT_CORS_XHR(){var Bt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(sa,"SUPPORT_CORS_XHR",{value:Bt}),Bt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var Bt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(sa,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:Bt}),Bt}},Ca=function(){function Bt(wt,Ft){this.text=wt,this.bounds=Ft}return Bt}(),IA=function(Bt,wt,Ft,Ct){var Kt=Kc(wt,Ft),ae=[],Le=0;return Kt.forEach(function(Ye){if(Ft.textDecorationLine.length||Ye.trim().length>0)if(sa.SUPPORT_RANGE_BOUNDS){var Ne=th(Ct,Le,Ye.length).getClientRects();if(Ne.length>1){var wn=_c(Ye),bn=0;wn.forEach(function(Pi){ae.push(new Ca(Pi,ge.fromDOMRectList(Bt,th(Ct,bn+Le,Pi.length).getClientRects()))),bn+=Pi.length})}else ae.push(new Ca(Ye,ge.fromDOMRectList(Bt,Ne)))}else{var $n=Ct.splitText(Ye.length);ae.push(new Ca(Ye,aa(Bt,Ct))),Ct=$n}else sa.SUPPORT_RANGE_BOUNDS||(Ct=Ct.splitText(Ye.length));Le+=Ye.length}),ae},aa=function(Bt,wt){var Ft=wt.ownerDocument;if(Ft){var Ct=Ft.createElement("html2canvaswrapper");Ct.appendChild(wt.cloneNode(!0));var Kt=wt.parentNode;if(Kt){Kt.replaceChild(Ct,wt);var ae=Ut(Bt,Ct);return Ct.firstChild&&Kt.replaceChild(Ct.firstChild,Ct),ae}}return ge.EMPTY},th=function(Bt,wt,Ft){var Ct=Bt.ownerDocument;if(!Ct)throw new Error("Node has no owner document");var Kt=Ct.createRange();return Kt.setStart(Bt,wt),Kt.setEnd(Bt,wt+Ft),Kt},_c=function(Bt){if(sa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var wt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(wt.segment(Bt)).map(function(Ft){return Ft.segment})}return Eh(Bt)},Yh=function(Bt,wt){if(sa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var Ft=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(Ft.segment(Bt)).map(function(Ct){return Ct.segment})}return Qf(Bt,wt)},Kc=function(Bt,wt){return wt.letterSpacing!==0?_c(Bt):Yh(Bt,wt)},Gc=[32,160,4961,65792,65793,4153,4241],Qf=function(Bt,wt){for(var Ft=Cn(Bt,{lineBreak:wt.lineBreak,wordBreak:wt.overflowWrap==="break-word"?"break-word":wt.wordBreak}),Ct=[],Kt,ae=function(){if(Kt.value){var Le=Kt.value.slice(),Ye=ne(Le),Ne="";Ye.forEach(function(wn){Gc.indexOf(wn)===-1?Ne+=Ae(wn):(Ne.length&&Ct.push(Ne),Ct.push(Ae(wn)),Ne="")}),Ne.length&&Ct.push(Ne)}};!(Kt=Ft.next()).done;)ae();return Ct},jc=function(){function Bt(wt,Ft,Ct){this.text=Of(Ft.data,Ct.textTransform),this.textBounds=IA(wt,this.text,Ct,Ft)}return Bt}(),Of=function(Bt,wt){switch(wt){case 1:return Bt.toLowerCase();case 3:return Bt.replace(eh,xc);case 2:return Bt.toUpperCase();default:return Bt}},eh=/(^|\s|:|-|\(|\))([a-z])/g,xc=function(Bt,wt,Ft){return Bt.length>0?wt+Ft.toUpperCase():Bt},bd=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.src=Ct.currentSrc||Ct.src,Kt.intrinsicWidth=Ct.naturalWidth,Kt.intrinsicHeight=Ct.naturalHeight,Kt.context.cache.addImage(Kt.src),Kt}return wt}(Jl),Td=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.canvas=Ct,Kt.intrinsicWidth=Ct.width,Kt.intrinsicHeight=Ct.height,Kt}return wt}(Jl),Nd=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this,ae=new XMLSerializer,Le=Ut(Ft,Ct);return Ct.setAttribute("width",Le.width+"px"),Ct.setAttribute("height",Le.height+"px"),Kt.svg="data:image/svg+xml,"+encodeURIComponent(ae.serializeToString(Ct)),Kt.intrinsicWidth=Ct.width.baseVal.value,Kt.intrinsicHeight=Ct.height.baseVal.value,Kt.context.cache.addImage(Kt.svg),Kt}return wt}(Jl),Xh=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.value=Ct.value,Kt}return wt}(Jl),Dd=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.start=Ct.start,Kt.reversed=typeof Ct.reversed=="boolean"&&Ct.reversed===!0,Kt}return wt}(Jl),Hf=[{type:15,flags:0,unit:"px",number:3}],Rf=[{type:16,flags:0,number:50}],UA=function(Bt){return Bt.width>Bt.height?new ge(Bt.left+(Bt.width-Bt.height)/2,Bt.top,Bt.height,Bt.height):Bt.width<Bt.height?new ge(Bt.left,Bt.top+(Bt.height-Bt.width)/2,Bt.width,Bt.width):Bt},yg=function(Bt){var wt=Bt.type===Bc?new Array(Bt.value.length+1).join("\u2022"):Bt.value;return wt.length===0?Bt.placeholder||"":wt},zc="checkbox",Mh="radio",Bc="password",hf=707406591,oA=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;switch(Kt.type=Ct.type.toLowerCase(),Kt.checked=Ct.checked,Kt.value=yg(Ct),(Kt.type===zc||Kt.type===Mh)&&(Kt.styles.backgroundColor=3739148031,Kt.styles.borderTopColor=Kt.styles.borderRightColor=Kt.styles.borderBottomColor=Kt.styles.borderLeftColor=2779096575,Kt.styles.borderTopWidth=Kt.styles.borderRightWidth=Kt.styles.borderBottomWidth=Kt.styles.borderLeftWidth=1,Kt.styles.borderTopStyle=Kt.styles.borderRightStyle=Kt.styles.borderBottomStyle=Kt.styles.borderLeftStyle=1,Kt.styles.backgroundClip=[0],Kt.styles.backgroundOrigin=[0],Kt.bounds=UA(Kt.bounds)),Kt.type){case zc:Kt.styles.borderTopRightRadius=Kt.styles.borderTopLeftRadius=Kt.styles.borderBottomRightRadius=Kt.styles.borderBottomLeftRadius=Hf;break;case Mh:Kt.styles.borderTopRightRadius=Kt.styles.borderTopLeftRadius=Kt.styles.borderBottomRightRadius=Kt.styles.borderBottomLeftRadius=Rf;break}return Kt}return wt}(Jl),cf=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this,ae=Ct.options[Ct.selectedIndex||0];return Kt.value=ae&&ae.text||"",Kt}return wt}(Jl),Id=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.value=Ct.value,Kt}return wt}(Jl),_f=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;Kt.src=Ct.src,Kt.width=parseInt(Ct.width,10)||0,Kt.height=parseInt(Ct.height,10)||0,Kt.backgroundColor=Kt.styles.backgroundColor;try{if(Ct.contentWindow&&Ct.contentWindow.document&&Ct.contentWindow.document.documentElement){Kt.tree=Gf(Ft,Ct.contentWindow.document.documentElement);var ae=Ct.contentWindow.document.documentElement?LA(Ft,getComputedStyle(Ct.contentWindow.document.documentElement).backgroundColor):Ou.TRANSPARENT,Le=Ct.contentWindow.document.body?LA(Ft,getComputedStyle(Ct.contentWindow.document.body).backgroundColor):Ou.TRANSPARENT;Kt.backgroundColor=na(ae)?na(Le)?Kt.styles.backgroundColor:Le:ae}}catch(Ye){}return Kt}return wt}(Jl),Kf=["OL","UL","MENU"],Vc=function(Bt,wt,Ft,Ct){for(var Kt=wt.firstChild,ae=void 0;Kt;Kt=ae)if(ae=Kt.nextSibling,Ud(Kt)&&Kt.data.trim().length>0)Ft.textNodes.push(new jc(Bt,Kt,Ft.styles));else if(Cc(Kt))if(pf(Kt)&&Kt.assignedNodes)Kt.assignedNodes().forEach(function(Ye){return Vc(Bt,Ye,Ft,Ct)});else{var Le=wg(Bt,Kt);Le.styles.isVisible()&&(df(Kt,Le,Ct)?Le.flags|=4:ff(Le.styles)&&(Le.flags|=2),Kf.indexOf(Kt.tagName)!==-1&&(Le.flags|=8),Ft.elements.push(Le),Kt.slot,Kt.shadowRoot?Vc(Bt,Kt.shadowRoot,Le,Ct):!Zc(Kt)&&!zf(Kt)&&!Yc(Kt)&&Vc(Bt,Kt,Le,Ct))}},wg=function(Bt,wt){return Za(wt)?new bd(Bt,wt):Pc(wt)?new Td(Bt,wt):zf(wt)?new Nd(Bt,wt):jf(wt)?new Xh(Bt,wt):Qd(wt)?new Dd(Bt,wt):Sg(wt)?new oA(Bt,wt):Yc(wt)?new cf(Bt,wt):Zc(wt)?new Id(Bt,wt):tu(wt)?new _f(Bt,wt):new Jl(Bt,wt)},Gf=function(Bt,wt){var Ft=wg(Bt,wt);return Ft.flags|=4,Vc(Bt,wt,Ft,Ft),Ft},df=function(Bt,wt,Ft){return wt.styles.isPositionedWithZIndex()||wt.styles.opacity<1||wt.styles.isTransformed()||ds(Bt)&&Ft.styles.isTransparent()},ff=function(Bt){return Bt.isPositioned()||Bt.isFloating()},Ud=function(Bt){return Bt.nodeType===Node.TEXT_NODE},Cc=function(Bt){return Bt.nodeType===Node.ELEMENT_NODE},Wc=function(Bt){return Cc(Bt)&&typeof Bt.style!="undefined"&&!QA(Bt)},QA=function(Bt){return typeof Bt.className=="object"},jf=function(Bt){return Bt.tagName==="LI"},Qd=function(Bt){return Bt.tagName==="OL"},Sg=function(Bt){return Bt.tagName==="INPUT"},gf=function(Bt){return Bt.tagName==="HTML"},zf=function(Bt){return Bt.tagName==="svg"},ds=function(Bt){return Bt.tagName==="BODY"},Pc=function(Bt){return Bt.tagName==="CANVAS"},Jh=function(Bt){return Bt.tagName==="VIDEO"},Za=function(Bt){return Bt.tagName==="IMG"},tu=function(Bt){return Bt.tagName==="IFRAME"},qh=function(Bt){return Bt.tagName==="STYLE"},Od=function(Bt){return Bt.tagName==="SCRIPT"},Zc=function(Bt){return Bt.tagName==="TEXTAREA"},Yc=function(Bt){return Bt.tagName==="SELECT"},pf=function(Bt){return Bt.tagName==="SLOT"},mf=function(Bt){return Bt.tagName.indexOf("-")>0},Vf=function(){function Bt(){this.counters={}}return Bt.prototype.getCounterValue=function(wt){var Ft=this.counters[wt];return Ft&&Ft.length?Ft[Ft.length-1]:1},Bt.prototype.getCounterValues=function(wt){var Ft=this.counters[wt];return Ft||[]},Bt.prototype.pop=function(wt){var Ft=this;wt.forEach(function(Ct){return Ft.counters[Ct].pop()})},Bt.prototype.parse=function(wt){var Ft=this,Ct=wt.counterIncrement,Kt=wt.counterReset,ae=!0;Ct!==null&&Ct.forEach(function(Ye){var Ne=Ft.counters[Ye.counter];Ne&&Ye.increment!==0&&(ae=!1,Ne.length||Ne.push(1),Ne[Math.max(0,Ne.length-1)]+=Ye.increment)});var Le=[];return ae&&Kt.forEach(function(Ye){var Ne=Ft.counters[Ye.counter];Le.push(Ye.counter),Ne||(Ne=Ft.counters[Ye.counter]=[]),Ne.push(Ye.reset)}),Le},Bt}(),kh={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Xc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},$h={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Gs={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},bh=function(Bt,wt,Ft,Ct,Kt,ae){return Bt<wt||Bt>Ft?dt(Bt,Kt,ae.length>0):Ct.integers.reduce(function(Le,Ye,Ne){for(;Bt>=Ye;)Bt-=Ye,Le+=Ct.values[Ne];return Le},"")+ae},vf=function(Bt,wt,Ft,Ct){var Kt="";do Ft||Bt--,Kt=Ct(Bt)+Kt,Bt/=wt;while(Bt*wt>=wt);return Kt},ka=function(Bt,wt,Ft,Ct,Kt){var ae=Ft-wt+1;return(Bt<0?"-":"")+(vf(Math.abs(Bt),ae,Ct,function(Le){return Ae(Math.floor(Le%ae)+wt)})+Kt)},SA=function(Bt,wt,Ft){Ft===void 0&&(Ft=". ");var Ct=wt.length;return vf(Math.abs(Bt),Ct,!1,function(Kt){return wt[Math.floor(Kt%Ct)]})+Ft},nh=1,Th=2,ha=4,Jc=8,Gu=function(Bt,wt,Ft,Ct,Kt,ae){if(Bt<-9999||Bt>9999)return dt(Bt,4,Kt.length>0);var Le=Math.abs(Bt),Ye=Kt;if(Le===0)return wt[0]+Ye;for(var Ne=0;Le>0&&Ne<=4;Ne++){var wn=Le%10;wn===0&&qo(ae,nh)&&Ye!==""?Ye=wt[wn]+Ye:wn>1||wn===1&&Ne===0||wn===1&&Ne===1&&qo(ae,Th)||wn===1&&Ne===1&&qo(ae,ha)&&Bt>100||wn===1&&Ne>1&&qo(ae,Jc)?Ye=wt[wn]+(Ne>0?Ft[Ne-1]:"")+Ye:wn===1&&Ne>0&&(Ye=Ft[Ne-1]+Ye),Le=Math.floor(Le/10)}return(Bt<0?Ct:"")+Ye},ih="\u5341\u767E\u5343\u842C",qc="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",dt=function(Bt,wt,Ft){var Ct=Ft?". ":"",Kt=Ft?"\u3001":"",ae=Ft?", ":"",Le=Ft?" ":"";switch(wt){case 0:return"\u2022"+Le;case 1:return"\u25E6"+Le;case 2:return"\u25FE"+Le;case 5:var Ye=ka(Bt,48,57,!0,Ct);return Ye.length<4?"0"+Ye:Ye;case 4:return SA(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Kt);case 6:return bh(Bt,1,3999,kh,3,Ct).toLowerCase();case 7:return bh(Bt,1,3999,kh,3,Ct);case 8:return ka(Bt,945,969,!1,Ct);case 9:return ka(Bt,97,122,!1,Ct);case 10:return ka(Bt,65,90,!1,Ct);case 11:return ka(Bt,1632,1641,!0,Ct);case 12:case 49:return bh(Bt,1,9999,Xc,3,Ct);case 35:return bh(Bt,1,9999,Xc,3,Ct).toLowerCase();case 13:return ka(Bt,2534,2543,!0,Ct);case 14:case 30:return ka(Bt,6112,6121,!0,Ct);case 15:return SA(Bt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Kt);case 16:return SA(Bt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Kt);case 17:case 48:return Gu(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ih,"\u8CA0",Kt,Th|ha|Jc);case 47:return Gu(Bt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",qc,"\u8CA0",Kt,nh|Th|ha|Jc);case 42:return Gu(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ih,"\u8D1F",Kt,Th|ha|Jc);case 41:return Gu(Bt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",qc,"\u8D1F",Kt,nh|Th|ha|Jc);case 26:return Gu(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Kt,0);case 25:return Gu(Bt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Kt,nh|Th|ha);case 31:return Gu(Bt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,ae,nh|Th|ha);case 33:return Gu(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,ae,0);case 32:return Gu(Bt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,ae,nh|Th|ha);case 18:return ka(Bt,2406,2415,!0,Ct);case 20:return bh(Bt,1,19999,Gs,3,Ct);case 21:return ka(Bt,2790,2799,!0,Ct);case 22:return ka(Bt,2662,2671,!0,Ct);case 22:return bh(Bt,1,10999,$h,3,Ct);case 23:return SA(Bt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return SA(Bt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return ka(Bt,3302,3311,!0,Ct);case 28:return SA(Bt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",Kt);case 29:return SA(Bt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",Kt);case 34:return ka(Bt,3792,3801,!0,Ct);case 37:return ka(Bt,6160,6169,!0,Ct);case 38:return ka(Bt,4160,4169,!0,Ct);case 39:return ka(Bt,2918,2927,!0,Ct);case 40:return ka(Bt,1776,1785,!0,Ct);case 43:return ka(Bt,3046,3055,!0,Ct);case 44:return ka(Bt,3174,3183,!0,Ct);case 45:return ka(Bt,3664,3673,!0,Ct);case 46:return ka(Bt,3872,3881,!0,Ct);case 3:default:return ka(Bt,48,57,!0,Ct)}},ct="data-html2canvas-ignore",gt=function(){function Bt(wt,Ft,Ct){if(this.context=wt,this.options=Ct,this.scrolledElements=[],this.referenceElement=Ft,this.counters=new Vf,this.quoteDepth=0,!Ft.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(Ft.ownerDocument.documentElement,!1)}return Bt.prototype.toIFrame=function(wt,Ft){var Ct=this,Kt=Rt(wt,Ft);if(!Kt.contentWindow)return Promise.reject("Unable to find iframe window");var ae=wt.defaultView.pageXOffset,Le=wt.defaultView.pageYOffset,Ye=Kt.contentWindow,Ne=Ye.document,wn=fe(Kt).then(function(){return Yt(Ct,void 0,void 0,function(){var bn,$n;return he(this,function(Pi){switch(Pi.label){case 0:return this.scrolledElements.forEach(Ai),Ye&&(Ye.scrollTo(Ft.left,Ft.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ye.scrollY!==Ft.top||Ye.scrollX!==Ft.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ye.scrollX-Ft.left,Ye.scrollY-Ft.top,0,0))),bn=this.options.onclone,$n=this.clonedReferenceElement,typeof $n=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ne.fonts&&Ne.fonts.ready?[4,Ne.fonts.ready]:[3,2];case 1:Pi.sent(),Pi.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Jt(Ne)]:[3,4];case 3:Pi.sent(),Pi.label=4;case 4:return typeof bn=="function"?[2,Promise.resolve().then(function(){return bn(Ne,$n)}).then(function(){return Kt})]:[2,Kt]}})})});return Ne.open(),Ne.write(yn(document.doctype)+"<html></html>"),pn(this.referenceElement.ownerDocument,ae,Le),Ne.replaceChild(Ne.adoptNode(this.documentElement),Ne.documentElement),Ne.close(),wn},Bt.prototype.createElementClone=function(wt){if(mA(wt,2))debugger;if(Pc(wt))return this.createCanvasClone(wt);if(Jh(wt))return this.createVideoClone(wt);if(qh(wt))return this.createStyleClone(wt);var Ft=wt.cloneNode(!1);return Za(Ft)&&(Za(wt)&&wt.currentSrc&&wt.currentSrc!==wt.src&&(Ft.src=wt.currentSrc,Ft.srcset=""),Ft.loading==="lazy"&&(Ft.loading="eager")),mf(Ft)?this.createCustomElementClone(Ft):Ft},Bt.prototype.createCustomElementClone=function(wt){var Ft=document.createElement("html2canvascustomelement");return we(wt.style,Ft),Ft},Bt.prototype.createStyleClone=function(wt){try{var Ft=wt.sheet;if(Ft&&Ft.cssRules){var Ct=[].slice.call(Ft.cssRules,0).reduce(function(ae,Le){return Le&&typeof Le.cssText=="string"?ae+Le.cssText:ae},""),Kt=wt.cloneNode(!1);return Kt.textContent=Ct,Kt}}catch(ae){if(this.context.logger.error("Unable to access cssRules property",ae),ae.name!=="SecurityError")throw ae}return wt.cloneNode(!1)},Bt.prototype.createCanvasClone=function(wt){var Ft;if(this.options.inlineImages&&wt.ownerDocument){var Ct=wt.ownerDocument.createElement("img");try{return Ct.src=wt.toDataURL(),Ct}catch(wn){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var Kt=wt.cloneNode(!1);try{Kt.width=wt.width,Kt.height=wt.height;var ae=wt.getContext("2d"),Le=Kt.getContext("2d");if(Le)if(!this.options.allowTaint&&ae)Le.putImageData(ae.getImageData(0,0,wt.width,wt.height),0,0);else{var Ye=(Ft=wt.getContext("webgl2"))!==null&&Ft!==void 0?Ft:wt.getContext("webgl");if(Ye){var Ne=Ye.getContextAttributes();(Ne==null?void 0:Ne.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Le.drawImage(wt,0,0)}return Kt}catch(wn){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return Kt},Bt.prototype.createVideoClone=function(wt){var Ft=wt.ownerDocument.createElement("canvas");Ft.width=wt.offsetWidth,Ft.height=wt.offsetHeight;var Ct=Ft.getContext("2d");try{return Ct&&(Ct.drawImage(wt,0,0,Ft.width,Ft.height),this.options.allowTaint||Ct.getImageData(0,0,Ft.width,Ft.height)),Ft}catch(ae){this.context.logger.info("Unable to clone video as it is tainted",wt)}var Kt=wt.ownerDocument.createElement("canvas");return Kt.width=wt.offsetWidth,Kt.height=wt.offsetHeight,Kt},Bt.prototype.appendChildNode=function(wt,Ft,Ct){(!Cc(Ft)||!Od(Ft)&&!Ft.hasAttribute(ct)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(Ft)))&&(!this.options.copyStyles||!Cc(Ft)||!qh(Ft))&&wt.appendChild(this.cloneNode(Ft,Ct))},Bt.prototype.cloneChildNodes=function(wt,Ft,Ct){for(var Kt=this,ae=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;ae;ae=ae.nextSibling)if(Cc(ae)&&pf(ae)&&typeof ae.assignedNodes=="function"){var Le=ae.assignedNodes();Le.length&&Le.forEach(function(Ye){return Kt.appendChildNode(Ft,Ye,Ct)})}else this.appendChildNode(Ft,ae,Ct)},Bt.prototype.cloneNode=function(wt,Ft){if(Ud(wt))return document.createTextNode(wt.data);if(!wt.ownerDocument)return wt.cloneNode(!1);var Ct=wt.ownerDocument.defaultView;if(Ct&&Cc(wt)&&(Wc(wt)||QA(wt))){var Kt=this.createElementClone(wt);Kt.style.transitionProperty="none";var ae=Ct.getComputedStyle(wt),Le=Ct.getComputedStyle(wt,":before"),Ye=Ct.getComputedStyle(wt,":after");this.referenceElement===wt&&Wc(Kt)&&(this.clonedReferenceElement=Kt),ds(Kt)&&Hr(Kt);var Ne=this.counters.parse(new cu(this.context,ae)),wn=this.resolvePseudoContent(wt,Kt,Le,Nt.BEFORE);mf(wt)&&(Ft=!0),Jh(wt)||this.cloneChildNodes(wt,Kt,Ft),wn&&Kt.insertBefore(wn,Kt.firstChild);var bn=this.resolvePseudoContent(wt,Kt,Ye,Nt.AFTER);return bn&&Kt.appendChild(bn),this.counters.pop(Ne),(ae&&(this.options.copyStyles||QA(wt))&&!tu(wt)||Ft)&&we(ae,Kt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([Kt,wt.scrollLeft,wt.scrollTop]),(Zc(wt)||Yc(wt))&&(Zc(Kt)||Yc(Kt))&&(Kt.value=wt.value),Kt}return wt.cloneNode(!1)},Bt.prototype.resolvePseudoContent=function(wt,Ft,Ct,Kt){var ae=this;if(Ct){var Le=Ct.content,Ye=Ft.ownerDocument;if(!(!Ye||!Le||Le==="none"||Le==="-moz-alt-content"||Ct.display==="none")){this.counters.parse(new cu(this.context,Ct));var Ne=new Ja(this.context,Ct),wn=Ye.createElement("html2canvaspseudoelement");we(Ct,wn),Ne.content.forEach(function($n){if($n.type===0)wn.appendChild(Ye.createTextNode($n.value));else if($n.type===22){var Pi=Ye.createElement("img");Pi.src=$n.value,Pi.style.opacity="1",wn.appendChild(Pi)}else if($n.type===18){if($n.name==="attr"){var Dr=$n.values.filter(Fs);Dr.length&&wn.appendChild(Ye.createTextNode(wt.getAttribute(Dr[0].value)||""))}else if($n.name==="counter"){var lr=$n.values.filter(Ka),wr=lr[0],es=lr[1];if(wr&&Fs(wr)){var ao=ae.counters.getCounterValue(wr.value),uo=es&&Fs(es)?xo.parse(ae.context,es.value):3;wn.appendChild(Ye.createTextNode(dt(ao,uo,!1)))}}else if($n.name==="counters"){var po=$n.values.filter(Ka),wr=po[0],gs=po[1],es=po[2];if(wr&&Fs(wr)){var _o=ae.counters.getCounterValues(wr.value),zr=es&&Fs(es)?xo.parse(ae.context,es.value):3,Ts=gs&&gs.type===0?gs.value:"",Is=_o.map(function(Lu){return dt(Lu,zr,!1)}).join(Ts);wn.appendChild(Ye.createTextNode(Is))}}}else if($n.type===20)switch($n.value){case"open-quote":wn.appendChild(Ye.createTextNode(Pu(Ne.quotes,ae.quoteDepth++,!0)));break;case"close-quote":wn.appendChild(Ye.createTextNode(Pu(Ne.quotes,--ae.quoteDepth,!1)));break;default:wn.appendChild(Ye.createTextNode($n.value))}}),wn.className=Yi+" "+Fr;var bn=Kt===Nt.BEFORE?" "+Yi:" "+Fr;return QA(Ft)?Ft.className.baseValue+=bn:Ft.className+=bn,wn}}},Bt.destroy=function(wt){return wt.parentNode?(wt.parentNode.removeChild(wt),!0):!1},Bt}(),Nt;(function(Bt){Bt[Bt.BEFORE=0]="BEFORE",Bt[Bt.AFTER=1]="AFTER"})(Nt||(Nt={}));var Rt=function(Bt,wt){var Ft=Bt.createElement("iframe");return Ft.className="html2canvas-container",Ft.style.visibility="hidden",Ft.style.position="fixed",Ft.style.left="-10000px",Ft.style.top="0px",Ft.style.border="0",Ft.width=wt.width.toString(),Ft.height=wt.height.toString(),Ft.scrolling="no",Ft.setAttribute(ct,"true"),Bt.body.appendChild(Ft),Ft},$t=function(Bt){return new Promise(function(wt){if(Bt.complete){wt();return}if(!Bt.src){wt();return}Bt.onload=wt,Bt.onerror=wt})},Jt=function(Bt){return Promise.all([].slice.call(Bt.images,0).map($t))},fe=function(Bt){return new Promise(function(wt,Ft){var Ct=Bt.contentWindow;if(!Ct)return Ft("No window assigned for iframe");var Kt=Ct.document;Ct.onload=Bt.onload=function(){Ct.onload=Bt.onload=null;var ae=setInterval(function(){Kt.body.childNodes.length>0&&Kt.readyState==="complete"&&(clearInterval(ae),wt(Bt))},50)}})},qe=["all","d","content"],we=function(Bt,wt){for(var Ft=Bt.length-1;Ft>=0;Ft--){var Ct=Bt.item(Ft);qe.indexOf(Ct)===-1&&wt.style.setProperty(Ct,Bt.getPropertyValue(Ct))}return wt},yn=function(Bt){var wt="";return Bt&&(wt+="<!DOCTYPE ",Bt.name&&(wt+=Bt.name),Bt.internalSubset&&(wt+=Bt.internalSubset),Bt.publicId&&(wt+='"'+Bt.publicId+'"'),Bt.systemId&&(wt+='"'+Bt.systemId+'"'),wt+=">"),wt},pn=function(Bt,wt,Ft){Bt&&Bt.defaultView&&(wt!==Bt.defaultView.pageXOffset||Ft!==Bt.defaultView.pageYOffset)&&Bt.defaultView.scrollTo(wt,Ft)},Ai=function(Bt){var wt=Bt[0],Ft=Bt[1],Ct=Bt[2];wt.scrollLeft=Ft,wt.scrollTop=Ct},vi=":before",Di=":after",Yi="___html2canvas___pseudoelement_before",Fr="___html2canvas___pseudoelement_after",mr=`{
content: "" !important;
display: none !important;
}`,Hr=function(Bt){vo(Bt,"."+Yi+vi+mr+`
.`+Fr+Di+mr)},vo=function(Bt,wt){var Ft=Bt.ownerDocument;if(Ft){var Ct=Ft.createElement("style");Ct.textContent=wt,Bt.appendChild(Ct)}},pr=function(){function Bt(){}return Bt.getOrigin=function(wt){var Ft=Bt._link;return Ft?(Ft.href=wt,Ft.href=Ft.href,Ft.protocol+Ft.hostname+Ft.port):"about:blank"},Bt.isSameOrigin=function(wt){return Bt.getOrigin(wt)===Bt._origin},Bt.setContext=function(wt){Bt._link=wt.document.createElement("a"),Bt._origin=Bt.getOrigin(wt.location.href)},Bt._origin="about:blank",Bt}(),Qo=function(){function Bt(wt,Ft){this.context=wt,this._options=Ft,this._cache={}}return Bt.prototype.addImage=function(wt){var Ft=Promise.resolve();return this.has(wt)||(eu(wt)||fu(wt))&&(this._cache[wt]=this.loadImage(wt)).catch(function(){}),Ft},Bt.prototype.match=function(wt){return this._cache[wt]},Bt.prototype.loadImage=function(wt){return Yt(this,void 0,void 0,function(){var Ft,Ct,Kt,ae,Le=this;return he(this,function(Ye){switch(Ye.label){case 0:return Ft=pr.isSameOrigin(wt),Ct=!gl(wt)&&this._options.useCORS===!0&&sa.SUPPORT_CORS_IMAGES&&!Ft,Kt=!gl(wt)&&!Ft&&!eu(wt)&&typeof this._options.proxy=="string"&&sa.SUPPORT_CORS_XHR&&!Ct,!Ft&&this._options.allowTaint===!1&&!gl(wt)&&!eu(wt)&&!Kt&&!Ct?[2]:(ae=wt,Kt?[4,this.proxy(ae)]:[3,2]);case 1:ae=Ye.sent(),Ye.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Ne,wn){var bn=new Image;bn.onload=function(){return Ne(bn)},bn.onerror=wn,($a(ae)||Ct)&&(bn.crossOrigin="anonymous"),bn.src=ae,bn.complete===!0&&setTimeout(function(){return Ne(bn)},500),Le._options.imageTimeout>0&&setTimeout(function(){return wn("Timed out ("+Le._options.imageTimeout+"ms) loading image")},Le._options.imageTimeout)})];case 3:return[2,Ye.sent()]}})})},Bt.prototype.has=function(wt){return typeof this._cache[wt]!="undefined"},Bt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},Bt.prototype.proxy=function(wt){var Ft=this,Ct=this._options.proxy;if(!Ct)throw new Error("No proxy defined");var Kt=wt.substring(0,256);return new Promise(function(ae,Le){var Ye=sa.SUPPORT_RESPONSE_TYPE?"blob":"text",Ne=new XMLHttpRequest;Ne.onload=function(){if(Ne.status===200)if(Ye==="text")ae(Ne.response);else{var $n=new FileReader;$n.addEventListener("load",function(){return ae($n.result)},!1),$n.addEventListener("error",function(Pi){return Le(Pi)},!1),$n.readAsDataURL(Ne.response)}else Le("Failed to proxy resource "+Kt+" with status code "+Ne.status)},Ne.onerror=Le;var wn=Ct.indexOf("?")>-1?"&":"?";if(Ne.open("GET",""+Ct+wn+"url="+encodeURIComponent(wt)+"&responseType="+Ye),Ye!=="text"&&Ne instanceof XMLHttpRequest&&(Ne.responseType=Ye),Ft._options.imageTimeout){var bn=Ft._options.imageTimeout;Ne.timeout=bn,Ne.ontimeout=function(){return Le("Timed out ("+bn+"ms) proxying "+Kt)}}Ne.send()})},Bt}(),ca=/^data:image\/svg\+xml/i,ll=/^data:image\/.*;base64,/i,Pa=/^data:image\/.*/i,fu=function(Bt){return sa.SUPPORT_SVG_DRAWING||!Bl(Bt)},gl=function(Bt){return Pa.test(Bt)},$a=function(Bt){return ll.test(Bt)},eu=function(Bt){return Bt.substr(0,4)==="blob"},Bl=function(Bt){return Bt.substr(-3).toLowerCase()==="svg"||ca.test(Bt)},dr=function(){function Bt(wt,Ft){this.type=0,this.x=wt,this.y=Ft}return Bt.prototype.add=function(wt,Ft){return new Bt(this.x+wt,this.y+Ft)},Bt}(),ls=function(Bt,wt,Ft){return new dr(Bt.x+(wt.x-Bt.x)*Ft,Bt.y+(wt.y-Bt.y)*Ft)},da=function(){function Bt(wt,Ft,Ct,Kt){this.type=1,this.start=wt,this.startControl=Ft,this.endControl=Ct,this.end=Kt}return Bt.prototype.subdivide=function(wt,Ft){var Ct=ls(this.start,this.startControl,wt),Kt=ls(this.startControl,this.endControl,wt),ae=ls(this.endControl,this.end,wt),Le=ls(Ct,Kt,wt),Ye=ls(Kt,ae,wt),Ne=ls(Le,Ye,wt);return Ft?new Bt(this.start,Ct,Le,Ne):new Bt(Ne,Ye,ae,this.end)},Bt.prototype.add=function(wt,Ft){return new Bt(this.start.add(wt,Ft),this.startControl.add(wt,Ft),this.endControl.add(wt,Ft),this.end.add(wt,Ft))},Bt.prototype.reverse=function(){return new Bt(this.end,this.endControl,this.startControl,this.start)},Bt}(),$s=function(Bt){return Bt.type===1},Cl=function(){function Bt(wt){var Ft=wt.styles,Ct=wt.bounds,Kt=Wl(Ft.borderTopLeftRadius,Ct.width,Ct.height),ae=Kt[0],Le=Kt[1],Ye=Wl(Ft.borderTopRightRadius,Ct.width,Ct.height),Ne=Ye[0],wn=Ye[1],bn=Wl(Ft.borderBottomRightRadius,Ct.width,Ct.height),$n=bn[0],Pi=bn[1],Dr=Wl(Ft.borderBottomLeftRadius,Ct.width,Ct.height),lr=Dr[0],wr=Dr[1],es=[];es.push((ae+Ne)/Ct.width),es.push((lr+$n)/Ct.width),es.push((Le+wr)/Ct.height),es.push((wn+Pi)/Ct.height);var ao=Math.max.apply(Math,es);ao>1&&(ae/=ao,Le/=ao,Ne/=ao,wn/=ao,$n/=ao,Pi/=ao,lr/=ao,wr/=ao);var uo=Ct.width-Ne,po=Ct.height-Pi,gs=Ct.width-$n,_o=Ct.height-wr,zr=Ft.borderTopWidth,Ts=Ft.borderRightWidth,Is=Ft.borderBottomWidth,Vo=Ft.borderLeftWidth,Al=As(Ft.paddingTop,wt.bounds.width),Lu=As(Ft.paddingRight,wt.bounds.width),Vu=As(Ft.paddingBottom,wt.bounds.width),fa=As(Ft.paddingLeft,wt.bounds.width);this.topLeftBorderDoubleOuterBox=ae>0||Le>0?Do(Ct.left+Vo/3,Ct.top+zr/3,ae-Vo/3,Le-zr/3,fs.TOP_LEFT):new dr(Ct.left+Vo/3,Ct.top+zr/3),this.topRightBorderDoubleOuterBox=ae>0||Le>0?Do(Ct.left+uo,Ct.top+zr/3,Ne-Ts/3,wn-zr/3,fs.TOP_RIGHT):new dr(Ct.left+Ct.width-Ts/3,Ct.top+zr/3),this.bottomRightBorderDoubleOuterBox=$n>0||Pi>0?Do(Ct.left+gs,Ct.top+po,$n-Ts/3,Pi-Is/3,fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width-Ts/3,Ct.top+Ct.height-Is/3),this.bottomLeftBorderDoubleOuterBox=lr>0||wr>0?Do(Ct.left+Vo/3,Ct.top+_o,lr-Vo/3,wr-Is/3,fs.BOTTOM_LEFT):new dr(Ct.left+Vo/3,Ct.top+Ct.height-Is/3),this.topLeftBorderDoubleInnerBox=ae>0||Le>0?Do(Ct.left+Vo*2/3,Ct.top+zr*2/3,ae-Vo*2/3,Le-zr*2/3,fs.TOP_LEFT):new dr(Ct.left+Vo*2/3,Ct.top+zr*2/3),this.topRightBorderDoubleInnerBox=ae>0||Le>0?Do(Ct.left+uo,Ct.top+zr*2/3,Ne-Ts*2/3,wn-zr*2/3,fs.TOP_RIGHT):new dr(Ct.left+Ct.width-Ts*2/3,Ct.top+zr*2/3),this.bottomRightBorderDoubleInnerBox=$n>0||Pi>0?Do(Ct.left+gs,Ct.top+po,$n-Ts*2/3,Pi-Is*2/3,fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width-Ts*2/3,Ct.top+Ct.height-Is*2/3),this.bottomLeftBorderDoubleInnerBox=lr>0||wr>0?Do(Ct.left+Vo*2/3,Ct.top+_o,lr-Vo*2/3,wr-Is*2/3,fs.BOTTOM_LEFT):new dr(Ct.left+Vo*2/3,Ct.top+Ct.height-Is*2/3),this.topLeftBorderStroke=ae>0||Le>0?Do(Ct.left+Vo/2,Ct.top+zr/2,ae-Vo/2,Le-zr/2,fs.TOP_LEFT):new dr(Ct.left+Vo/2,Ct.top+zr/2),this.topRightBorderStroke=ae>0||Le>0?Do(Ct.left+uo,Ct.top+zr/2,Ne-Ts/2,wn-zr/2,fs.TOP_RIGHT):new dr(Ct.left+Ct.width-Ts/2,Ct.top+zr/2),this.bottomRightBorderStroke=$n>0||Pi>0?Do(Ct.left+gs,Ct.top+po,$n-Ts/2,Pi-Is/2,fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width-Ts/2,Ct.top+Ct.height-Is/2),this.bottomLeftBorderStroke=lr>0||wr>0?Do(Ct.left+Vo/2,Ct.top+_o,lr-Vo/2,wr-Is/2,fs.BOTTOM_LEFT):new dr(Ct.left+Vo/2,Ct.top+Ct.height-Is/2),this.topLeftBorderBox=ae>0||Le>0?Do(Ct.left,Ct.top,ae,Le,fs.TOP_LEFT):new dr(Ct.left,Ct.top),this.topRightBorderBox=Ne>0||wn>0?Do(Ct.left+uo,Ct.top,Ne,wn,fs.TOP_RIGHT):new dr(Ct.left+Ct.width,Ct.top),this.bottomRightBorderBox=$n>0||Pi>0?Do(Ct.left+gs,Ct.top+po,$n,Pi,fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width,Ct.top+Ct.height),this.bottomLeftBorderBox=lr>0||wr>0?Do(Ct.left,Ct.top+_o,lr,wr,fs.BOTTOM_LEFT):new dr(Ct.left,Ct.top+Ct.height),this.topLeftPaddingBox=ae>0||Le>0?Do(Ct.left+Vo,Ct.top+zr,Math.max(0,ae-Vo),Math.max(0,Le-zr),fs.TOP_LEFT):new dr(Ct.left+Vo,Ct.top+zr),this.topRightPaddingBox=Ne>0||wn>0?Do(Ct.left+Math.min(uo,Ct.width-Ts),Ct.top+zr,uo>Ct.width+Ts?0:Math.max(0,Ne-Ts),Math.max(0,wn-zr),fs.TOP_RIGHT):new dr(Ct.left+Ct.width-Ts,Ct.top+zr),this.bottomRightPaddingBox=$n>0||Pi>0?Do(Ct.left+Math.min(gs,Ct.width-Vo),Ct.top+Math.min(po,Ct.height-Is),Math.max(0,$n-Ts),Math.max(0,Pi-Is),fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width-Ts,Ct.top+Ct.height-Is),this.bottomLeftPaddingBox=lr>0||wr>0?Do(Ct.left+Vo,Ct.top+Math.min(_o,Ct.height-Is),Math.max(0,lr-Vo),Math.max(0,wr-Is),fs.BOTTOM_LEFT):new dr(Ct.left+Vo,Ct.top+Ct.height-Is),this.topLeftContentBox=ae>0||Le>0?Do(Ct.left+Vo+fa,Ct.top+zr+Al,Math.max(0,ae-(Vo+fa)),Math.max(0,Le-(zr+Al)),fs.TOP_LEFT):new dr(Ct.left+Vo+fa,Ct.top+zr+Al),this.topRightContentBox=Ne>0||wn>0?Do(Ct.left+Math.min(uo,Ct.width+Vo+fa),Ct.top+zr+Al,uo>Ct.width+Vo+fa?0:Ne-Vo+fa,wn-(zr+Al),fs.TOP_RIGHT):new dr(Ct.left+Ct.width-(Ts+Lu),Ct.top+zr+Al),this.bottomRightContentBox=$n>0||Pi>0?Do(Ct.left+Math.min(gs,Ct.width-(Vo+fa)),Ct.top+Math.min(po,Ct.height+zr+Al),Math.max(0,$n-(Ts+Lu)),Pi-(Is+Vu),fs.BOTTOM_RIGHT):new dr(Ct.left+Ct.width-(Ts+Lu),Ct.top+Ct.height-(Is+Vu)),this.bottomLeftContentBox=lr>0||wr>0?Do(Ct.left+Vo+fa,Ct.top+_o,Math.max(0,lr-(Vo+fa)),wr-(Is+Vu),fs.BOTTOM_LEFT):new dr(Ct.left+Vo+fa,Ct.top+Ct.height-(Is+Vu))}return Bt}(),fs;(function(Bt){Bt[Bt.TOP_LEFT=0]="TOP_LEFT",Bt[Bt.TOP_RIGHT=1]="TOP_RIGHT",Bt[Bt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",Bt[Bt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(fs||(fs={}));var Do=function(Bt,wt,Ft,Ct,Kt){var ae=4*((Math.sqrt(2)-1)/3),Le=Ft*ae,Ye=Ct*ae,Ne=Bt+Ft,wn=wt+Ct;switch(Kt){case fs.TOP_LEFT:return new da(new dr(Bt,wn),new dr(Bt,wn-Ye),new dr(Ne-Le,wt),new dr(Ne,wt));case fs.TOP_RIGHT:return new da(new dr(Bt,wt),new dr(Bt+Le,wt),new dr(Ne,wn-Ye),new dr(Ne,wn));case fs.BOTTOM_RIGHT:return new da(new dr(Ne,wt),new dr(Ne,wt+Ye),new dr(Bt+Le,wn),new dr(Bt,wn));case fs.BOTTOM_LEFT:default:return new da(new dr(Ne,wn),new dr(Ne-Le,wn),new dr(Bt,wt+Ye),new dr(Bt,wt))}},gu=function(Bt){return[Bt.topLeftBorderBox,Bt.topRightBorderBox,Bt.bottomRightBorderBox,Bt.bottomLeftBorderBox]},Ua=function(Bt){return[Bt.topLeftContentBox,Bt.topRightContentBox,Bt.bottomRightContentBox,Bt.bottomLeftContentBox]},tc=function(Bt){return[Bt.topLeftPaddingBox,Bt.topRightPaddingBox,Bt.bottomRightPaddingBox,Bt.bottomLeftPaddingBox]},ju=function(){function Bt(wt,Ft,Ct){this.offsetX=wt,this.offsetY=Ft,this.matrix=Ct,this.type=0,this.target=6}return Bt}(),Ul=function(){function Bt(wt,Ft){this.path=wt,this.target=Ft,this.type=1}return Bt}(),pu=function(){function Bt(wt){this.opacity=wt,this.type=2,this.target=6}return Bt}(),js=function(Bt){return Bt.type===0},ul=function(Bt){return Bt.type===1},rh=function(Bt){return Bt.type===2},Fc=function(Bt,wt){return Bt.length===wt.length?Bt.some(function(Ft,Ct){return Ft===wt[Ct]}):!1},qp=function(Bt,wt,Ft,Ct,Kt){return Bt.map(function(ae,Le){switch(Le){case 0:return ae.add(wt,Ft);case 1:return ae.add(wt+Ct,Ft);case 2:return ae.add(wt+Ct,Ft+Kt);case 3:return ae.add(wt,Ft+Kt)}return ae})},mu=function(){function Bt(wt){this.element=wt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return Bt}(),xg=function(){function Bt(wt,Ft){if(this.container=wt,this.parent=Ft,this.effects=[],this.curves=new Cl(this.container),this.container.styles.opacity<1&&this.effects.push(new pu(this.container.styles.opacity)),this.container.styles.transform!==null){var Ct=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Kt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ae=this.container.styles.transform;this.effects.push(new ju(Ct,Kt,ae))}if(this.container.styles.overflowX!==0){var Le=gu(this.curves),Ye=tc(this.curves);Fc(Le,Ye)?this.effects.push(new Ul(Le,6)):(this.effects.push(new Ul(Le,2)),this.effects.push(new Ul(Ye,4)))}}return Bt.prototype.getEffects=function(wt){for(var Ft=[2,3].indexOf(this.container.styles.position)===-1,Ct=this.parent,Kt=this.effects.slice(0);Ct;){var ae=Ct.effects.filter(function(Ne){return!ul(Ne)});if(Ft||Ct.container.styles.position!==0||!Ct.parent){if(Kt.unshift.apply(Kt,ae),Ft=[2,3].indexOf(Ct.container.styles.position)===-1,Ct.container.styles.overflowX!==0){var Le=gu(Ct.curves),Ye=tc(Ct.curves);Fc(Le,Ye)||Kt.unshift(new Ul(Ye,6))}}else Kt.unshift.apply(Kt,ae);Ct=Ct.parent}return Kt.filter(function(Ne){return qo(Ne.target,wt)})},Bt}(),oh=function(Bt,wt,Ft,Ct){Bt.container.elements.forEach(function(Kt){var ae=qo(Kt.flags,4),Le=qo(Kt.flags,2),Ye=new xg(Kt,Bt);qo(Kt.styles.display,2048)&&Ct.push(Ye);var Ne=qo(Kt.flags,8)?[]:Ct;if(ae||Le){var wn=ae||Kt.styles.isPositioned()?Ft:wt,bn=new mu(Ye);if(Kt.styles.isPositioned()||Kt.styles.opacity<1||Kt.styles.isTransformed()){var $n=Kt.styles.zIndex.order;if($n<0){var Pi=0;wn.negativeZIndex.some(function(lr,wr){return $n>lr.element.container.styles.zIndex.order?(Pi=wr,!1):Pi>0}),wn.negativeZIndex.splice(Pi,0,bn)}else if($n>0){var Dr=0;wn.positiveZIndex.some(function(lr,wr){return $n>=lr.element.container.styles.zIndex.order?(Dr=wr+1,!1):Dr>0}),wn.positiveZIndex.splice(Dr,0,bn)}else wn.zeroOrAutoZIndexOrTransformedOrOpacity.push(bn)}else Kt.styles.isFloating()?wn.nonPositionedFloats.push(bn):wn.nonPositionedInlineLevel.push(bn);oh(Ye,bn,ae?bn:Ft,Ne)}else Kt.styles.isInlineLevel()?wt.inlineLevel.push(Ye):wt.nonInlineLevel.push(Ye),oh(Ye,wt,Ft,Ne);qo(Kt.flags,8)&&Wf(Kt,Ne)})},Wf=function(Bt,wt){for(var Ft=Bt instanceof Dd?Bt.start:1,Ct=Bt instanceof Dd?Bt.reversed:!1,Kt=0;Kt<wt.length;Kt++){var ae=wt[Kt];ae.container instanceof Xh&&typeof ae.container.value=="number"&&ae.container.value!==0&&(Ft=ae.container.value),ae.listValue=dt(Ft,ae.container.styles.listStyleType,!0),Ft+=Ct?-1:1}},yf=function(Bt){var wt=new xg(Bt,null),Ft=new mu(wt),Ct=[];return oh(wt,Ft,Ft,Ct),Wf(wt.container,Ct),Ft},$c=function(Bt,wt){switch(wt){case 0:return tl(Bt.topLeftBorderBox,Bt.topLeftPaddingBox,Bt.topRightBorderBox,Bt.topRightPaddingBox);case 1:return tl(Bt.topRightBorderBox,Bt.topRightPaddingBox,Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox);case 2:return tl(Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox);case 3:default:return tl(Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderBox,Bt.topLeftPaddingBox)}},Ec=function(Bt,wt){switch(wt){case 0:return tl(Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox,Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox);case 1:return tl(Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox,Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox);case 2:return tl(Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox,Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox);case 3:default:return tl(Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox,Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox)}},Zf=function(Bt,wt){switch(wt){case 0:return tl(Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox,Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox);case 1:return tl(Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox,Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox);case 2:return tl(Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox);case 3:default:return tl(Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox)}},td=function(Bt,wt){switch(wt){case 0:return ec(Bt.topLeftBorderStroke,Bt.topRightBorderStroke);case 1:return ec(Bt.topRightBorderStroke,Bt.bottomRightBorderStroke);case 2:return ec(Bt.bottomRightBorderStroke,Bt.bottomLeftBorderStroke);case 3:default:return ec(Bt.bottomLeftBorderStroke,Bt.topLeftBorderStroke)}},ec=function(Bt,wt){var Ft=[];return $s(Bt)?Ft.push(Bt.subdivide(.5,!1)):Ft.push(Bt),$s(wt)?Ft.push(wt.subdivide(.5,!0)):Ft.push(wt),Ft},tl=function(Bt,wt,Ft,Ct){var Kt=[];return $s(Bt)?Kt.push(Bt.subdivide(.5,!1)):Kt.push(Bt),$s(Ft)?Kt.push(Ft.subdivide(.5,!0)):Kt.push(Ft),$s(Ct)?Kt.push(Ct.subdivide(.5,!0).reverse()):Kt.push(Ct),$s(wt)?Kt.push(wt.subdivide(.5,!1).reverse()):Kt.push(wt),Kt},Ql=function(Bt){var wt=Bt.bounds,Ft=Bt.styles;return wt.add(Ft.borderLeftWidth,Ft.borderTopWidth,-(Ft.borderRightWidth+Ft.borderLeftWidth),-(Ft.borderTopWidth+Ft.borderBottomWidth))},Yf=function(Bt){var wt=Bt.styles,Ft=Bt.bounds,Ct=As(wt.paddingLeft,Ft.width),Kt=As(wt.paddingRight,Ft.width),ae=As(wt.paddingTop,Ft.width),Le=As(wt.paddingBottom,Ft.width);return Ft.add(Ct+wt.borderLeftWidth,ae+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Ct+Kt),-(wt.borderTopWidth+wt.borderBottomWidth+ae+Le))},$p=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Yf(wt):Ql(wt)},t0=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Yf(wt):Ql(wt)},ed=function(Bt,wt,Ft){var Ct=$p(id(Bt.styles.backgroundOrigin,wt),Bt),Kt=t0(id(Bt.styles.backgroundClip,wt),Bt),ae=e0(id(Bt.styles.backgroundSize,wt),Ft,Ct),Le=ae[0],Ye=ae[1],Ne=Wl(id(Bt.styles.backgroundPosition,wt),Ct.width-Le,Ct.height-Ye),wn=Jf(id(Bt.styles.backgroundRepeat,wt),Ne,ae,Ct,Kt),bn=Math.round(Ct.left+Ne[0]),$n=Math.round(Ct.top+Ne[1]);return[wn,bn,$n,Le,Ye]},nd=function(Bt){return Fs(Bt)&&Bt.value===Sh.AUTO},Xf=function(Bt){return typeof Bt=="number"},e0=function(Bt,wt,Ft){var Ct=wt[0],Kt=wt[1],ae=wt[2],Le=Bt[0],Ye=Bt[1];if(!Le)return[0,0];if(Ks(Le)&&Ye&&Ks(Ye))return[As(Le,Ft.width),As(Ye,Ft.height)];var Ne=Xf(ae);if(Fs(Le)&&(Le.value===Sh.CONTAIN||Le.value===Sh.COVER)){if(Xf(ae)){var wn=Ft.width/Ft.height;return wn<ae!=(Le.value===Sh.COVER)?[Ft.width,Ft.width/ae]:[Ft.height*ae,Ft.height]}return[Ft.width,Ft.height]}var bn=Xf(Ct),$n=Xf(Kt),Pi=bn||$n;if(nd(Le)&&(!Ye||nd(Ye))){if(bn&&$n)return[Ct,Kt];if(!Ne&&!Pi)return[Ft.width,Ft.height];if(Pi&&Ne){var Dr=bn?Ct:Kt*ae,lr=$n?Kt:Ct/ae;return[Dr,lr]}var wr=bn?Ct:Ft.width,es=$n?Kt:Ft.height;return[wr,es]}if(Ne){var ao=0,uo=0;return Ks(Le)?ao=As(Le,Ft.width):Ks(Ye)&&(uo=As(Ye,Ft.height)),nd(Le)?ao=uo*ae:(!Ye||nd(Ye))&&(uo=ao/ae),[ao,uo]}var po=null,gs=null;if(Ks(Le)?po=As(Le,Ft.width):Ye&&Ks(Ye)&&(gs=As(Ye,Ft.height)),po!==null&&(!Ye||nd(Ye))&&(gs=bn&&$n?po/Ct*Kt:Ft.height),gs!==null&&nd(Le)&&(po=bn&&$n?gs/Kt*Ct:Ft.width),po!==null&&gs!==null)return[po,gs];throw new Error("Unable to calculate background-size for element")},id=function(Bt,wt){var Ft=Bt[wt];return typeof Ft=="undefined"?Bt[0]:Ft},Jf=function(Bt,wt,Ft,Ct,Kt){var ae=wt[0],Le=wt[1],Ye=Ft[0],Ne=Ft[1];switch(Bt){case 2:return[new dr(Math.round(Ct.left),Math.round(Ct.top+Le)),new dr(Math.round(Ct.left+Ct.width),Math.round(Ct.top+Le)),new dr(Math.round(Ct.left+Ct.width),Math.round(Ne+Ct.top+Le)),new dr(Math.round(Ct.left),Math.round(Ne+Ct.top+Le))];case 3:return[new dr(Math.round(Ct.left+ae),Math.round(Ct.top)),new dr(Math.round(Ct.left+ae+Ye),Math.round(Ct.top)),new dr(Math.round(Ct.left+ae+Ye),Math.round(Ct.height+Ct.top)),new dr(Math.round(Ct.left+ae),Math.round(Ct.height+Ct.top))];case 1:return[new dr(Math.round(Ct.left+ae),Math.round(Ct.top+Le)),new dr(Math.round(Ct.left+ae+Ye),Math.round(Ct.top+Le)),new dr(Math.round(Ct.left+ae+Ye),Math.round(Ct.top+Le+Ne)),new dr(Math.round(Ct.left+ae),Math.round(Ct.top+Le+Ne))];default:return[new dr(Math.round(Kt.left),Math.round(Kt.top)),new dr(Math.round(Kt.left+Kt.width),Math.round(Kt.top)),new dr(Math.round(Kt.left+Kt.width),Math.round(Kt.height+Kt.top)),new dr(Math.round(Kt.left),Math.round(Kt.height+Kt.top))]}},Bg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",OA="Hidden Text",Nh=function(){function Bt(wt){this._data={},this._document=wt}return Bt.prototype.parseMetrics=function(wt,Ft){var Ct=this._document.createElement("div"),Kt=this._document.createElement("img"),ae=this._document.createElement("span"),Le=this._document.body;Ct.style.visibility="hidden",Ct.style.fontFamily=wt,Ct.style.fontSize=Ft,Ct.style.margin="0",Ct.style.padding="0",Ct.style.whiteSpace="nowrap",Le.appendChild(Ct),Kt.src=Bg,Kt.width=1,Kt.height=1,Kt.style.margin="0",Kt.style.padding="0",Kt.style.verticalAlign="baseline",ae.style.fontFamily=wt,ae.style.fontSize=Ft,ae.style.margin="0",ae.style.padding="0",ae.appendChild(this._document.createTextNode(OA)),Ct.appendChild(ae),Ct.appendChild(Kt);var Ye=Kt.offsetTop-ae.offsetTop+2;Ct.removeChild(ae),Ct.appendChild(this._document.createTextNode(OA)),Ct.style.lineHeight="normal",Kt.style.verticalAlign="super";var Ne=Kt.offsetTop-Ct.offsetTop+2;return Le.removeChild(Ct),{baseline:Ye,middle:Ne}},Bt.prototype.getMetrics=function(wt,Ft){var Ct=wt+" "+Ft;return typeof this._data[Ct]=="undefined"&&(this._data[Ct]=this.parseMetrics(wt,Ft)),this._data[Ct]},Bt}(),qf=function(){function Bt(wt,Ft){this.context=wt,this.options=Ft}return Bt}(),zu=1e4,rd=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt._activeEffects=[],Kt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),Kt.ctx=Kt.canvas.getContext("2d"),Ct.canvas||(Kt.canvas.width=Math.floor(Ct.width*Ct.scale),Kt.canvas.height=Math.floor(Ct.height*Ct.scale),Kt.canvas.style.width=Ct.width+"px",Kt.canvas.style.height=Ct.height+"px"),Kt.fontMetrics=new Nh(document),Kt.ctx.scale(Kt.options.scale,Kt.options.scale),Kt.ctx.translate(-Ct.x,-Ct.y),Kt.ctx.textBaseline="bottom",Kt._activeEffects=[],Kt.context.logger.debug("Canvas renderer initialized ("+Ct.width+"x"+Ct.height+") with scale "+Ct.scale),Kt}return wt.prototype.applyEffects=function(Ft){for(var Ct=this;this._activeEffects.length;)this.popEffect();Ft.forEach(function(Kt){return Ct.applyEffect(Kt)})},wt.prototype.applyEffect=function(Ft){this.ctx.save(),rh(Ft)&&(this.ctx.globalAlpha=Ft.opacity),js(Ft)&&(this.ctx.translate(Ft.offsetX,Ft.offsetY),this.ctx.transform(Ft.matrix[0],Ft.matrix[1],Ft.matrix[2],Ft.matrix[3],Ft.matrix[4],Ft.matrix[5]),this.ctx.translate(-Ft.offsetX,-Ft.offsetY)),ul(Ft)&&(this.path(Ft.path),this.ctx.clip()),this._activeEffects.push(Ft)},wt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},wt.prototype.renderStack=function(Ft){return Yt(this,void 0,void 0,function(){var Ct;return he(this,function(Kt){switch(Kt.label){case 0:return Ct=Ft.element.container.styles,Ct.isVisible()?[4,this.renderStackContent(Ft)]:[3,2];case 1:Kt.sent(),Kt.label=2;case 2:return[2]}})})},wt.prototype.renderNode=function(Ft){return Yt(this,void 0,void 0,function(){return he(this,function(Ct){switch(Ct.label){case 0:if(qo(Ft.container.flags,16))debugger;return Ft.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(Ft)]:[3,3];case 1:return Ct.sent(),[4,this.renderNodeContent(Ft)];case 2:Ct.sent(),Ct.label=3;case 3:return[2]}})})},wt.prototype.renderTextWithLetterSpacing=function(Ft,Ct,Kt){var ae=this;if(Ct===0)this.ctx.fillText(Ft.text,Ft.bounds.left,Ft.bounds.top+Kt);else{var Le=_c(Ft.text);Le.reduce(function(Ye,Ne){return ae.ctx.fillText(Ne,Ye,Ft.bounds.top+Kt),Ye+ae.ctx.measureText(Ne).width},Ft.bounds.left)}},wt.prototype.createFontStyle=function(Ft){var Ct=Ft.fontVariant.filter(function(Le){return Le==="normal"||Le==="small-caps"}).join(""),Kt=i0(Ft.fontFamily).join(", "),ae=Bu(Ft.fontSize)?""+Ft.fontSize.number+Ft.fontSize.unit:Ft.fontSize.number+"px";return[[Ft.fontStyle,Ct,Ft.fontWeight,ae,Kt].join(" "),Kt,ae]},wt.prototype.renderTextNode=function(Ft,Ct){return Yt(this,void 0,void 0,function(){var Kt,ae,Le,Ye,Ne,wn,bn,$n,Pi=this;return he(this,function(Dr){return Kt=this.createFontStyle(Ct),ae=Kt[0],Le=Kt[1],Ye=Kt[2],this.ctx.font=ae,this.ctx.direction=Ct.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ne=this.fontMetrics.getMetrics(Le,Ye),wn=Ne.baseline,bn=Ne.middle,$n=Ct.paintOrder,Ft.textBounds.forEach(function(lr){$n.forEach(function(wr){switch(wr){case 0:Pi.ctx.fillStyle=ps(Ct.color),Pi.renderTextWithLetterSpacing(lr,Ct.letterSpacing,wn);var es=Ct.textShadow;es.length&&lr.text.trim().length&&(es.slice(0).reverse().forEach(function(ao){Pi.ctx.shadowColor=ps(ao.color),Pi.ctx.shadowOffsetX=ao.offsetX.number*Pi.options.scale,Pi.ctx.shadowOffsetY=ao.offsetY.number*Pi.options.scale,Pi.ctx.shadowBlur=ao.blur.number,Pi.renderTextWithLetterSpacing(lr,Ct.letterSpacing,wn)}),Pi.ctx.shadowColor="",Pi.ctx.shadowOffsetX=0,Pi.ctx.shadowOffsetY=0,Pi.ctx.shadowBlur=0),Ct.textDecorationLine.length&&(Pi.ctx.fillStyle=ps(Ct.textDecorationColor||Ct.color),Ct.textDecorationLine.forEach(function(ao){switch(ao){case 1:Pi.ctx.fillRect(lr.bounds.left,Math.round(lr.bounds.top+wn),lr.bounds.width,1);break;case 2:Pi.ctx.fillRect(lr.bounds.left,Math.round(lr.bounds.top),lr.bounds.width,1);break;case 3:Pi.ctx.fillRect(lr.bounds.left,Math.ceil(lr.bounds.top+bn),lr.bounds.width,1);break}}));break;case 1:Ct.webkitTextStrokeWidth&&lr.text.trim().length&&(Pi.ctx.strokeStyle=ps(Ct.webkitTextStrokeColor),Pi.ctx.lineWidth=Ct.webkitTextStrokeWidth,Pi.ctx.lineJoin=window.chrome?"miter":"round",Pi.ctx.strokeText(lr.text,lr.bounds.left,lr.bounds.top+wn)),Pi.ctx.strokeStyle="",Pi.ctx.lineWidth=0,Pi.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Ft,Ct,Kt){if(Kt&&Ft.intrinsicWidth>0&&Ft.intrinsicHeight>0){var ae=Yf(Ft),Le=tc(Ct);this.path(Le),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Kt,0,0,Ft.intrinsicWidth,Ft.intrinsicHeight,ae.left,ae.top,ae.width,ae.height),this.ctx.restore()}},wt.prototype.renderNodeContent=function(Ft){return Yt(this,void 0,void 0,function(){var Ct,Kt,ae,Le,Ye,Ne,uo,uo,wn,bn,$n,Pi,gs,Dr,lr,_o,wr,es,ao,uo,po,gs,_o;return he(this,function(zr){switch(zr.label){case 0:this.applyEffects(Ft.getEffects(4)),Ct=Ft.container,Kt=Ft.curves,ae=Ct.styles,Le=0,Ye=Ct.textNodes,zr.label=1;case 1:return Le<Ye.length?(Ne=Ye[Le],[4,this.renderTextNode(Ne,ae)]):[3,4];case 2:zr.sent(),zr.label=3;case 3:return Le++,[3,1];case 4:if(!(Ct instanceof bd))return[3,8];zr.label=5;case 5:return zr.trys.push([5,7,,8]),[4,this.context.cache.match(Ct.src)];case 6:return uo=zr.sent(),this.renderReplacedElement(Ct,Kt,uo),[3,8];case 7:return zr.sent(),this.context.logger.error("Error loading image "+Ct.src),[3,8];case 8:if(Ct instanceof Td&&this.renderReplacedElement(Ct,Kt,Ct.canvas),!(Ct instanceof Nd))return[3,12];zr.label=9;case 9:return zr.trys.push([9,11,,12]),[4,this.context.cache.match(Ct.svg)];case 10:return uo=zr.sent(),this.renderReplacedElement(Ct,Kt,uo),[3,12];case 11:return zr.sent(),this.context.logger.error("Error loading svg "+Ct.svg.substring(0,255)),[3,12];case 12:return Ct instanceof _f&&Ct.tree?(wn=new wt(this.context,{scale:this.options.scale,backgroundColor:Ct.backgroundColor,x:0,y:0,width:Ct.width,height:Ct.height}),[4,wn.render(Ct.tree)]):[3,14];case 13:bn=zr.sent(),Ct.width&&Ct.height&&this.ctx.drawImage(bn,0,0,Ct.width,Ct.height,Ct.bounds.left,Ct.bounds.top,Ct.bounds.width,Ct.bounds.height),zr.label=14;case 14:if(Ct instanceof oA&&($n=Math.min(Ct.bounds.width,Ct.bounds.height),Ct.type===zc?Ct.checked&&(this.ctx.save(),this.path([new dr(Ct.bounds.left+$n*.39363,Ct.bounds.top+$n*.79),new dr(Ct.bounds.left+$n*.16,Ct.bounds.top+$n*.5549),new dr(Ct.bounds.left+$n*.27347,Ct.bounds.top+$n*.44071),new dr(Ct.bounds.left+$n*.39694,Ct.bounds.top+$n*.5649),new dr(Ct.bounds.left+$n*.72983,Ct.bounds.top+$n*.23),new dr(Ct.bounds.left+$n*.84,Ct.bounds.top+$n*.34085),new dr(Ct.bounds.left+$n*.39363,Ct.bounds.top+$n*.79)]),this.ctx.fillStyle=ps(hf),this.ctx.fill(),this.ctx.restore()):Ct.type===Mh&&Ct.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(Ct.bounds.left+$n/2,Ct.bounds.top+$n/2,$n/4,0,Math.PI*2,!0),this.ctx.fillStyle=ps(hf),this.ctx.fill(),this.ctx.restore())),Tm(Ct)&&Ct.value.length){switch(Pi=this.createFontStyle(ae),gs=Pi[0],Dr=Pi[1],lr=this.fontMetrics.getMetrics(gs,Dr).baseline,this.ctx.font=gs,this.ctx.fillStyle=ps(ae.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=fo(Ct.styles.textAlign),_o=Yf(Ct),wr=0,Ct.styles.textAlign){case 1:wr+=_o.width/2;break;case 2:wr+=_o.width;break}es=_o.add(wr,0,0,-_o.height/2+1),this.ctx.save(),this.path([new dr(_o.left,_o.top),new dr(_o.left+_o.width,_o.top),new dr(_o.left+_o.width,_o.top+_o.height),new dr(_o.left,_o.top+_o.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ca(Ct.value,es),ae.letterSpacing,lr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!qo(Ct.styles.display,2048))return[3,20];if(Ct.styles.listStyleImage===null)return[3,19];if(ao=Ct.styles.listStyleImage,ao.type!==0)return[3,18];uo=void 0,po=ao.url,zr.label=15;case 15:return zr.trys.push([15,17,,18]),[4,this.context.cache.match(po)];case 16:return uo=zr.sent(),this.ctx.drawImage(uo,Ct.bounds.left-(uo.width+10),Ct.bounds.top),[3,18];case 17:return zr.sent(),this.context.logger.error("Error loading list-style-image "+po),[3,18];case 18:return[3,20];case 19:Ft.listValue&&Ct.styles.listStyleType!==-1&&(gs=this.createFontStyle(ae)[0],this.ctx.font=gs,this.ctx.fillStyle=ps(ae.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_o=new ge(Ct.bounds.left,Ct.bounds.top+As(Ct.styles.paddingTop,Ct.bounds.width),Ct.bounds.width,Cr(ae.lineHeight,ae.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ca(Ft.listValue,_o),ae.letterSpacing,Cr(ae.lineHeight,ae.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),zr.label=20;case 20:return[2]}})})},wt.prototype.renderStackContent=function(Ft){return Yt(this,void 0,void 0,function(){var Ct,Kt,ao,ae,Le,ao,Ye,Ne,ao,wn,bn,ao,$n,Pi,ao,Dr,lr,ao,wr,es,ao;return he(this,function(uo){switch(uo.label){case 0:if(qo(Ft.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Ft.element)];case 1:uo.sent(),Ct=0,Kt=Ft.negativeZIndex,uo.label=2;case 2:return Ct<Kt.length?(ao=Kt[Ct],[4,this.renderStack(ao)]):[3,5];case 3:uo.sent(),uo.label=4;case 4:return Ct++,[3,2];case 5:return[4,this.renderNodeContent(Ft.element)];case 6:uo.sent(),ae=0,Le=Ft.nonInlineLevel,uo.label=7;case 7:return ae<Le.length?(ao=Le[ae],[4,this.renderNode(ao)]):[3,10];case 8:uo.sent(),uo.label=9;case 9:return ae++,[3,7];case 10:Ye=0,Ne=Ft.nonPositionedFloats,uo.label=11;case 11:return Ye<Ne.length?(ao=Ne[Ye],[4,this.renderStack(ao)]):[3,14];case 12:uo.sent(),uo.label=13;case 13:return Ye++,[3,11];case 14:wn=0,bn=Ft.nonPositionedInlineLevel,uo.label=15;case 15:return wn<bn.length?(ao=bn[wn],[4,this.renderStack(ao)]):[3,18];case 16:uo.sent(),uo.label=17;case 17:return wn++,[3,15];case 18:$n=0,Pi=Ft.inlineLevel,uo.label=19;case 19:return $n<Pi.length?(ao=Pi[$n],[4,this.renderNode(ao)]):[3,22];case 20:uo.sent(),uo.label=21;case 21:return $n++,[3,19];case 22:Dr=0,lr=Ft.zeroOrAutoZIndexOrTransformedOrOpacity,uo.label=23;case 23:return Dr<lr.length?(ao=lr[Dr],[4,this.renderStack(ao)]):[3,26];case 24:uo.sent(),uo.label=25;case 25:return Dr++,[3,23];case 26:wr=0,es=Ft.positiveZIndex,uo.label=27;case 27:return wr<es.length?(ao=es[wr],[4,this.renderStack(ao)]):[3,30];case 28:uo.sent(),uo.label=29;case 29:return wr++,[3,27];case 30:return[2]}})})},wt.prototype.mask=function(Ft){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(Ft.slice(0).reverse()),this.ctx.closePath()},wt.prototype.path=function(Ft){this.ctx.beginPath(),this.formatPath(Ft),this.ctx.closePath()},wt.prototype.formatPath=function(Ft){var Ct=this;Ft.forEach(function(Kt,ae){var Le=$s(Kt)?Kt.start:Kt;ae===0?Ct.ctx.moveTo(Le.x,Le.y):Ct.ctx.lineTo(Le.x,Le.y),$s(Kt)&&Ct.ctx.bezierCurveTo(Kt.startControl.x,Kt.startControl.y,Kt.endControl.x,Kt.endControl.y,Kt.end.x,Kt.end.y)})},wt.prototype.renderRepeat=function(Ft,Ct,Kt,ae){this.path(Ft),this.ctx.fillStyle=Ct,this.ctx.translate(Kt,ae),this.ctx.fill(),this.ctx.translate(-Kt,-ae)},wt.prototype.resizeImage=function(Ft,Ct,Kt){var ae;if(Ft.width===Ct&&Ft.height===Kt)return Ft;var Le=(ae=this.canvas.ownerDocument)!==null&&ae!==void 0?ae:document,Ye=Le.createElement("canvas");Ye.width=Math.max(1,Ct),Ye.height=Math.max(1,Kt);var Ne=Ye.getContext("2d");return Ne.drawImage(Ft,0,0,Ft.width,Ft.height,0,0,Ct,Kt),Ye},wt.prototype.renderBackgroundImage=function(Ft){return Yt(this,void 0,void 0,function(){var Ct,Kt,ae,Le,Ye,Ne;return he(this,function(wn){switch(wn.label){case 0:Ct=Ft.styles.backgroundImage.length-1,Kt=function(bn){var $n,Pi,Dr,Al,Mu,sA,fa,Pl,Is,lr,Al,Mu,sA,fa,Pl,wr,es,ao,uo,po,gs,_o,zr,Ts,Is,Vo,Al,Lu,Vu,fa,Pl,Ih,Mu,sA,Uh,vn,nc,od,ic,rc,Lc,nu;return he(this,function(HA){switch(HA.label){case 0:if(bn.type!==0)return[3,5];$n=void 0,Pi=bn.url,HA.label=1;case 1:return HA.trys.push([1,3,,4]),[4,ae.context.cache.match(Pi)];case 2:return $n=HA.sent(),[3,4];case 3:return HA.sent(),ae.context.logger.error("Error loading background-image "+Pi),[3,4];case 4:return $n&&(Dr=ed(Ft,Ct,[$n.width,$n.height,$n.width/$n.height]),Al=Dr[0],Mu=Dr[1],sA=Dr[2],fa=Dr[3],Pl=Dr[4],Is=ae.ctx.createPattern(ae.resizeImage($n,fa,Pl),"repeat"),ae.renderRepeat(Al,Is,Mu,sA)),[3,6];case 5:MA(bn)?(lr=ed(Ft,Ct,[null,null,null]),Al=lr[0],Mu=lr[1],sA=lr[2],fa=lr[3],Pl=lr[4],wr=Fd(bn.angle,fa,Pl),es=wr[0],ao=wr[1],uo=wr[2],po=wr[3],gs=wr[4],_o=document.createElement("canvas"),_o.width=fa,_o.height=Pl,zr=_o.getContext("2d"),Ts=zr.createLinearGradient(ao,po,uo,gs),Un(bn.stops,es).forEach(function(xf){return Ts.addColorStop(xf.stop,ps(xf.color))}),zr.fillStyle=Ts,zr.fillRect(0,0,fa,Pl),fa>0&&Pl>0&&(Is=ae.ctx.createPattern(_o,"repeat"),ae.renderRepeat(Al,Is,Mu,sA))):Jo(bn)&&(Vo=ed(Ft,Ct,[null,null,null]),Al=Vo[0],Lu=Vo[1],Vu=Vo[2],fa=Vo[3],Pl=Vo[4],Ih=bn.position.length===0?[Qu]:bn.position,Mu=As(Ih[0],fa),sA=As(Ih[Ih.length-1],Pl),Uh=yh(bn,Mu,sA,fa,Pl),vn=Uh[0],nc=Uh[1],vn>0&&nc>0&&(od=ae.ctx.createRadialGradient(Lu+Mu,Vu+sA,0,Lu+Mu,Vu+sA,vn),Un(bn.stops,vn*2).forEach(function(xf){return od.addColorStop(xf.stop,ps(xf.color))}),ae.path(Al),ae.ctx.fillStyle=od,vn!==nc?(ic=Ft.bounds.left+.5*Ft.bounds.width,rc=Ft.bounds.top+.5*Ft.bounds.height,Lc=nc/vn,nu=1/Lc,ae.ctx.save(),ae.ctx.translate(ic,rc),ae.ctx.transform(1,0,0,Lc,0,0),ae.ctx.translate(-ic,-rc),ae.ctx.fillRect(Lu,nu*(Vu-rc)+rc,fa,Pl*nu),ae.ctx.restore()):ae.ctx.fill())),HA.label=6;case 6:return Ct--,[2]}})},ae=this,Le=0,Ye=Ft.styles.backgroundImage.slice(0).reverse(),wn.label=1;case 1:return Le<Ye.length?(Ne=Ye[Le],[5,Kt(Ne)]):[3,4];case 2:wn.sent(),wn.label=3;case 3:return Le++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Ft,Ct,Kt){return Yt(this,void 0,void 0,function(){return he(this,function(ae){return this.path($c(Kt,Ct)),this.ctx.fillStyle=ps(Ft),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Ft,Ct,Kt,ae){return Yt(this,void 0,void 0,function(){var Le,Ye;return he(this,function(Ne){switch(Ne.label){case 0:return Ct<3?[4,this.renderSolidBorder(Ft,Kt,ae)]:[3,2];case 1:return Ne.sent(),[2];case 2:return Le=Ec(ae,Kt),this.path(Le),this.ctx.fillStyle=ps(Ft),this.ctx.fill(),Ye=Zf(ae,Kt),this.path(Ye),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Ft){return Yt(this,void 0,void 0,function(){var Ct,Kt,ae,Le,Ye,Ne,wn,bn,$n=this;return he(this,function(Pi){switch(Pi.label){case 0:return this.applyEffects(Ft.getEffects(2)),Ct=Ft.container.styles,Kt=!na(Ct.backgroundColor)||Ct.backgroundImage.length,ae=[{style:Ct.borderTopStyle,color:Ct.borderTopColor,width:Ct.borderTopWidth},{style:Ct.borderRightStyle,color:Ct.borderRightColor,width:Ct.borderRightWidth},{style:Ct.borderBottomStyle,color:Ct.borderBottomColor,width:Ct.borderBottomWidth},{style:Ct.borderLeftStyle,color:Ct.borderLeftColor,width:Ct.borderLeftWidth}],Le=$f(id(Ct.backgroundClip,0),Ft.curves),Kt||Ct.boxShadow.length?(this.ctx.save(),this.path(Le),this.ctx.clip(),na(Ct.backgroundColor)||(this.ctx.fillStyle=ps(Ct.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Ft.container)]):[3,2];case 1:Pi.sent(),this.ctx.restore(),Ct.boxShadow.slice(0).reverse().forEach(function(Dr){$n.ctx.save();var lr=gu(Ft.curves),wr=Dr.inset?0:zu,es=qp(lr,-wr+(Dr.inset?1:-1)*Dr.spread.number,(Dr.inset?1:-1)*Dr.spread.number,Dr.spread.number*(Dr.inset?-2:2),Dr.spread.number*(Dr.inset?-2:2));Dr.inset?($n.path(lr),$n.ctx.clip(),$n.mask(es)):($n.mask(lr),$n.ctx.clip(),$n.path(es)),$n.ctx.shadowOffsetX=Dr.offsetX.number+wr,$n.ctx.shadowOffsetY=Dr.offsetY.number,$n.ctx.shadowColor=ps(Dr.color),$n.ctx.shadowBlur=Dr.blur.number,$n.ctx.fillStyle=Dr.inset?ps(Dr.color):"rgba(0,0,0,1)",$n.ctx.fill(),$n.ctx.restore()}),Pi.label=2;case 2:Ye=0,Ne=0,wn=ae,Pi.label=3;case 3:return Ne<wn.length?(bn=wn[Ne],bn.style!==0&&!na(bn.color)&&bn.width>0?bn.style!==2?[3,5]:[4,this.renderDashedDottedBorder(bn.color,bn.width,Ye,Ft.curves,2)]:[3,11]):[3,13];case 4:return Pi.sent(),[3,11];case 5:return bn.style!==3?[3,7]:[4,this.renderDashedDottedBorder(bn.color,bn.width,Ye,Ft.curves,3)];case 6:return Pi.sent(),[3,11];case 7:return bn.style!==4?[3,9]:[4,this.renderDoubleBorder(bn.color,bn.width,Ye,Ft.curves)];case 8:return Pi.sent(),[3,11];case 9:return[4,this.renderSolidBorder(bn.color,Ye,Ft.curves)];case 10:Pi.sent(),Pi.label=11;case 11:Ye++,Pi.label=12;case 12:return Ne++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Ft,Ct,Kt,ae,Le){return Yt(this,void 0,void 0,function(){var Ye,Ne,wn,bn,$n,Pi,Dr,lr,wr,es,ao,uo,po,gs,_o,zr,_o,zr;return he(this,function(Ts){return this.ctx.save(),Ye=td(ae,Kt),Ne=$c(ae,Kt),Le===2&&(this.path(Ne),this.ctx.clip()),$s(Ne[0])?(wn=Ne[0].start.x,bn=Ne[0].start.y):(wn=Ne[0].x,bn=Ne[0].y),$s(Ne[1])?($n=Ne[1].end.x,Pi=Ne[1].end.y):($n=Ne[1].x,Pi=Ne[1].y),Kt===0||Kt===2?Dr=Math.abs(wn-$n):Dr=Math.abs(bn-Pi),this.ctx.beginPath(),Le===3?this.formatPath(Ye):this.formatPath(Ne.slice(0,2)),lr=Ct<3?Ct*3:Ct*2,wr=Ct<3?Ct*2:Ct,Le===3&&(lr=Ct,wr=Ct),es=!0,Dr<=lr*2?es=!1:Dr<=lr*2+wr?(ao=Dr/(2*lr+wr),lr*=ao,wr*=ao):(uo=Math.floor((Dr+wr)/(lr+wr)),po=(Dr-uo*lr)/(uo-1),gs=(Dr-(uo+1)*lr)/uo,wr=gs<=0||Math.abs(wr-po)<Math.abs(wr-gs)?po:gs),es&&(Le===3?this.ctx.setLineDash([0,lr+wr]):this.ctx.setLineDash([lr,wr])),Le===3?(this.ctx.lineCap="round",this.ctx.lineWidth=Ct):this.ctx.lineWidth=Ct*2+1.1,this.ctx.strokeStyle=ps(Ft),this.ctx.stroke(),this.ctx.setLineDash([]),Le===2&&($s(Ne[0])&&(_o=Ne[3],zr=Ne[0],this.ctx.beginPath(),this.formatPath([new dr(_o.end.x,_o.end.y),new dr(zr.start.x,zr.start.y)]),this.ctx.stroke()),$s(Ne[1])&&(_o=Ne[1],zr=Ne[2],this.ctx.beginPath(),this.formatPath([new dr(_o.end.x,_o.end.y),new dr(zr.start.x,zr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},wt.prototype.render=function(Ft){return Yt(this,void 0,void 0,function(){var Ct;return he(this,function(Kt){switch(Kt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ps(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),Ct=yf(Ft),[4,this.renderStack(Ct)];case 1:return Kt.sent(),this.applyEffects([]),[2,this.canvas]}})})},wt}(qf),Tm=function(Bt){return Bt instanceof Id||Bt instanceof cf?!0:Bt instanceof oA&&Bt.type!==Mh&&Bt.type!==zc},$f=function(Bt,wt){switch(Bt){case 0:return gu(wt);case 2:return Ua(wt);case 1:default:return tc(wt)}},fo=function(Bt){switch(Bt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},n0=["-apple-system","system-ui"],i0=function(Bt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?Bt.filter(function(wt){return n0.indexOf(wt)===-1}):Bt},np=function(Bt){Qt(wt,Bt);function wt(Ft,Ct){var Kt=Bt.call(this,Ft,Ct)||this;return Kt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),Kt.ctx=Kt.canvas.getContext("2d"),Kt.options=Ct,Kt.canvas.width=Math.floor(Ct.width*Ct.scale),Kt.canvas.height=Math.floor(Ct.height*Ct.scale),Kt.canvas.style.width=Ct.width+"px",Kt.canvas.style.height=Ct.height+"px",Kt.ctx.scale(Kt.options.scale,Kt.options.scale),Kt.ctx.translate(-Ct.x,-Ct.y),Kt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Ct.width+"x"+Ct.height+" at "+Ct.x+","+Ct.y+") with scale "+Ct.scale),Kt}return wt.prototype.render=function(Ft){return Yt(this,void 0,void 0,function(){var Ct,Kt;return he(this,function(ae){switch(ae.label){case 0:return Ct=Il(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,Ft),[4,wf(Ct)];case 1:return Kt=ae.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ps(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Kt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},wt}(qf),wf=function(Bt){return new Promise(function(wt,Ft){var Ct=new Image;Ct.onload=function(){wt(Ct)},Ct.onerror=Ft,Ct.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},Sf=function(){function Bt(wt){var Ft=wt.id,Ct=wt.enabled;this.id=Ft,this.enabled=Ct,this.start=Date.now()}return Bt.prototype.debug=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.getTime=function(){return Date.now()-this.start},Bt.prototype.info=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,xe([this.id,this.getTime()+"ms"],wt))},Bt.prototype.warn=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.error=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.instances={},Bt}(),Dh=function(){function Bt(wt,Ft){var Ct;this.windowBounds=Ft,this.instanceName="#"+Bt.instanceCount++,this.logger=new Sf({id:this.instanceName,enabled:wt.logging}),this.cache=(Ct=wt.cache)!==null&&Ct!==void 0?Ct:new Qo(this,wt)}return Bt.instanceCount=1,Bt}(),ip=function(Bt,wt){return wt===void 0&&(wt={}),rp(Bt,wt)};typeof window!="undefined"&&pr.setContext(window);var rp=function(Bt,wt){return Yt(void 0,void 0,void 0,function(){var Ft,Ct,Kt,ae,Le,Ye,Ne,wn,bn,$n,Pi,Dr,lr,wr,es,ao,uo,po,gs,_o,Ts,zr,Ts,Is,Vo,Al,Lu,Vu,fa,Pl,Ih,Mu,sA,Uh,vn,nc,od,ic,rc,Lc;return he(this,function(nu){switch(nu.label){case 0:if(!Bt||typeof Bt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(Ft=Bt.ownerDocument,!Ft)throw new Error("Element is not attached to a Document");if(Ct=Ft.defaultView,!Ct)throw new Error("Document is not attached to a Window");return Kt={allowTaint:(Is=wt.allowTaint)!==null&&Is!==void 0?Is:!1,imageTimeout:(Vo=wt.imageTimeout)!==null&&Vo!==void 0?Vo:15e3,proxy:wt.proxy,useCORS:(Al=wt.useCORS)!==null&&Al!==void 0?Al:!1},ae=xt({logging:(Lu=wt.logging)!==null&&Lu!==void 0?Lu:!0,cache:wt.cache},Kt),Le={windowWidth:(Vu=wt.windowWidth)!==null&&Vu!==void 0?Vu:Ct.innerWidth,windowHeight:(fa=wt.windowHeight)!==null&&fa!==void 0?fa:Ct.innerHeight,scrollX:(Pl=wt.scrollX)!==null&&Pl!==void 0?Pl:Ct.pageXOffset,scrollY:(Ih=wt.scrollY)!==null&&Ih!==void 0?Ih:Ct.pageYOffset},Ye=new ge(Le.scrollX,Le.scrollY,Le.windowWidth,Le.windowHeight),Ne=new Dh(ae,Ye),wn=(Mu=wt.foreignObjectRendering)!==null&&Mu!==void 0?Mu:!1,bn={allowTaint:(sA=wt.allowTaint)!==null&&sA!==void 0?sA:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:wn,copyStyles:wn},Ne.logger.debug("Starting document clone with size "+Ye.width+"x"+Ye.height+" scrolled to "+-Ye.left+","+-Ye.top),$n=new gt(Ne,Bt,bn),Pi=$n.clonedReferenceElement,Pi?[4,$n.toIFrame(Ft,Ye)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Dr=nu.sent(),lr=ds(Pi)||gf(Pi)?jt(Pi.ownerDocument):Ut(Ne,Pi),wr=lr.width,es=lr.height,ao=lr.left,uo=lr.top,po=op(Ne,Pi,wt.backgroundColor),gs={canvas:wt.canvas,backgroundColor:po,scale:(vn=(Uh=wt.scale)!==null&&Uh!==void 0?Uh:Ct.devicePixelRatio)!==null&&vn!==void 0?vn:1,x:((nc=wt.x)!==null&&nc!==void 0?nc:0)+ao,y:((od=wt.y)!==null&&od!==void 0?od:0)+uo,width:(ic=wt.width)!==null&&ic!==void 0?ic:Math.ceil(wr),height:(rc=wt.height)!==null&&rc!==void 0?rc:Math.ceil(es)},wn?(Ne.logger.debug("Document cloned, using foreign object rendering"),Ts=new np(Ne,gs),[4,Ts.render(Pi)]):[3,3];case 2:return _o=nu.sent(),[3,5];case 3:return Ne.logger.debug("Document cloned, element located at "+ao+","+uo+" with size "+wr+"x"+es+" using computed rendering"),Ne.logger.debug("Starting DOM parsing"),zr=Gf(Ne,Pi),po===zr.styles.backgroundColor&&(zr.styles.backgroundColor=Ou.TRANSPARENT),Ne.logger.debug("Starting renderer for element at "+gs.x+","+gs.y+" with size "+gs.width+"x"+gs.height),Ts=new rd(Ne,gs),[4,Ts.render(zr)];case 4:_o=nu.sent(),nu.label=5;case 5:return(!((Lc=wt.removeContainer)!==null&&Lc!==void 0)||Lc)&&(gt.destroy(Dr)||Ne.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ne.logger.debug("Finished rendering"),[2,_o]}})})},op=function(Bt,wt,Ft){var Ct=wt.ownerDocument,Kt=Ct.documentElement?LA(Bt,getComputedStyle(Ct.documentElement).backgroundColor):Ou.TRANSPARENT,ae=Ct.body?LA(Bt,getComputedStyle(Ct.body).backgroundColor):Ou.TRANSPARENT,Le=typeof Ft=="string"?LA(Bt,Ft):Ft===null?Ou.TRANSPARENT:4294967295;return wt===Ct.documentElement?na(Kt)?na(ae)?Le:ae:Kt:Le};return ip})},80645:function(gn,ze){ze.read=function(Qt,xt,Yt,he,xe){var ge,Ut,jt=xe*8-he-1,ne=(1<<jt)-1,Ae=ne>>1,se=-7,ke=Yt?xe-1:0,de=Yt?-1:1,Ie=Qt[xt+ke];for(ke+=de,ge=Ie&(1<<-se)-1,Ie>>=-se,se+=jt;se>0;ge=ge*256+Qt[xt+ke],ke+=de,se-=8);for(Ut=ge&(1<<-se)-1,ge>>=-se,se+=he;se>0;Ut=Ut*256+Qt[xt+ke],ke+=de,se-=8);if(ge===0)ge=1-Ae;else{if(ge===ne)return Ut?NaN:(Ie?-1:1)*(1/0);Ut=Ut+Math.pow(2,he),ge=ge-Ae}return(Ie?-1:1)*Ut*Math.pow(2,ge-he)},ze.write=function(Qt,xt,Yt,he,xe,ge){var Ut,jt,ne,Ae=ge*8-xe-1,se=(1<<Ae)-1,ke=se>>1,de=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ie=he?0:ge-1,Dt=he?1:-1,nt=xt<0||xt===0&&1/xt<0?1:0;for(xt=Math.abs(xt),isNaN(xt)||xt===1/0?(jt=isNaN(xt)?1:0,Ut=se):(Ut=Math.floor(Math.log(xt)/Math.LN2),xt*(ne=Math.pow(2,-Ut))<1&&(Ut--,ne*=2),Ut+ke>=1?xt+=de/ne:xt+=de*Math.pow(2,1-ke),xt*ne>=2&&(Ut++,ne/=2),Ut+ke>=se?(jt=0,Ut=se):Ut+ke>=1?(jt=(xt*ne-1)*Math.pow(2,xe),Ut=Ut+ke):(jt=xt*Math.pow(2,ke-1)*Math.pow(2,xe),Ut=0));xe>=8;Qt[Yt+Ie]=jt&255,Ie+=Dt,jt/=256,xe-=8);for(Ut=Ut<<xe|jt,Ae+=xe;Ae>0;Qt[Yt+Ie]=Ut&255,Ie+=Dt,Ut/=256,Ae-=8);Qt[Yt+Ie-Dt]|=nt*128}},15979:function(gn,ze,Qt){"use strict";Qt.d(ze,{hP:function(){return sn}});var xt=function(Vt,Pt){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,vt){mt.__proto__=vt}||function(mt,vt){for(var kt in vt)Object.prototype.hasOwnProperty.call(vt,kt)&&(mt[kt]=vt[kt])})(Vt,Pt)};function Yt(Vt,Pt){function mt(){this.constructor=Vt}xt(Vt,Pt),Vt.prototype=Pt===null?Object.create(Pt):(mt.prototype=Pt.prototype,new mt)}function he(Vt,Pt,mt,vt){return new(mt||(mt=Promise))(function(kt,Lt){function _t(mn){try{on(vt.next(mn))}catch($e){Lt($e)}}function De(mn){try{on(vt.throw(mn))}catch($e){Lt($e)}}function on(mn){var $e;mn.done?kt(mn.value):($e=mn.value,$e instanceof mt?$e:new mt(function(Bn){Bn($e)})).then(_t,De)}on((vt=vt.apply(Vt,Pt||[])).next())})}function xe(Vt,Pt){var mt,vt,kt,Lt,_t={label:0,sent:function(){if(1&kt[0])throw kt[1];return kt[1]},trys:[],ops:[]};return Lt={next:De(0),throw:De(1),return:De(2)},typeof Symbol=="function"&&(Lt[Symbol.iterator]=function(){return this}),Lt;function De(on){return function(mn){return function($e){if(mt)throw new TypeError("Generator is already executing.");for(;_t;)try{if(mt=1,vt&&(kt=2&$e[0]?vt.return:$e[0]?vt.throw||((kt=vt.return)&&kt.call(vt),0):vt.next)&&!(kt=kt.call(vt,$e[1])).done)return kt;switch(vt=0,kt&&($e=[2&$e[0],kt.value]),$e[0]){case 0:case 1:kt=$e;break;case 4:return _t.label++,{value:$e[1],done:!1};case 5:_t.label++,vt=$e[1],$e=[0];continue;case 7:$e=_t.ops.pop(),_t.trys.pop();continue;default:if(kt=_t.trys,!((kt=kt.length>0&&kt[kt.length-1])||$e[0]!==6&&$e[0]!==2)){_t=0;continue}if($e[0]===3&&(!kt||$e[1]>kt[0]&&$e[1]<kt[3])){_t.label=$e[1];break}if($e[0]===6&&_t.label<kt[1]){_t.label=kt[1],kt=$e;break}if(kt&&_t.label<kt[2]){_t.label=kt[2],_t.ops.push($e);break}kt[2]&&_t.ops.pop(),_t.trys.pop();continue}$e=Pt.call(Vt,_t)}catch(Bn){$e=[6,Bn],vt=0}finally{mt=kt=0}if(5&$e[0])throw $e[1];return{value:$e[0]?$e[1]:void 0,done:!0}}([on,mn])}}}function ge(){for(var Vt=0,Pt=0,mt=arguments.length;Pt<mt;Pt++)Vt+=arguments[Pt].length;var vt=Array(Vt),kt=0;for(Pt=0;Pt<mt;Pt++)for(var Lt=arguments[Pt],_t=0,De=Lt.length;_t<De;_t++,kt++)vt[kt]=Lt[_t];return vt}var Ut=function(){function Vt(){}return Vt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Vt.setAttributes=function(Pt,mt){for(var vt=0,kt=mt;vt<kt.length;vt++){var Lt=kt[vt],_t=Lt[0],De=Lt[1];Pt.setAttribute(_t,De)}},Vt.createRect=function(Pt,mt,vt){var kt=document.createElementNS("http://www.w3.org/2000/svg","rect");return kt.setAttribute("width",Pt.toString()),kt.setAttribute("height",mt.toString()),vt&&Vt.setAttributes(kt,vt),kt},Vt.createLine=function(Pt,mt,vt,kt,Lt){var _t=document.createElementNS("http://www.w3.org/2000/svg","line");return _t.setAttribute("x1",Pt.toString()),_t.setAttribute("y1",mt.toString()),_t.setAttribute("x2",vt.toString()),_t.setAttribute("y2",kt.toString()),Lt&&Vt.setAttributes(_t,Lt),_t},Vt.createPolygon=function(Pt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",Pt),mt&&Vt.setAttributes(vt,mt),vt},Vt.createCircle=function(Pt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(Pt/2).toString()),vt.setAttribute("cy",(Pt/2).toString()),vt.setAttribute("r",Pt.toString()),mt&&Vt.setAttributes(vt,mt),vt},Vt.createEllipse=function(Pt,mt,vt){var kt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return kt.setAttribute("cx",(Pt/2).toString()),kt.setAttribute("cy",(mt/2).toString()),kt.setAttribute("rx",(Pt/2).toString()),kt.setAttribute("ry",(mt/2).toString()),vt&&Vt.setAttributes(kt,vt),kt},Vt.createGroup=function(Pt){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return Pt&&Vt.setAttributes(mt,Pt),mt},Vt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Vt.createMarker=function(Pt,mt,vt,kt,Lt,_t,De){var on=document.createElementNS("http://www.w3.org/2000/svg","marker");return Vt.setAttributes(on,[["id",Pt],["orient",mt],["markerWidth",vt.toString()],["markerHeight",kt.toString()],["refX",Lt.toString()],["refY",_t.toString()]]),on.appendChild(De),on},Vt.createText=function(Pt){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),Pt&&Vt.setAttributes(mt,Pt),mt},Vt.createTSpan=function(Pt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=Pt,mt&&Vt.setAttributes(vt,mt),vt},Vt.createImage=function(Pt){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return Pt&&Vt.setAttributes(mt,Pt),mt},Vt.createPoint=function(Pt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=Pt,vt.y=mt,vt},Vt.createPath=function(Pt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",Pt),mt&&Vt.setAttributes(vt,mt),vt},Vt}(),jt=function(){function Vt(){}return Vt.addKey=function(Pt){Vt.key=Pt},Object.defineProperty(Vt,"isLicensed",{get:function(){return!!Vt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Vt.key)},enumerable:!1,configurable:!0}),Vt}(),ne=function(){function Vt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Vt.prototype.rasterize=function(Pt,mt,vt){var kt=this;return new Promise(function(Lt){var _t=vt!==void 0?vt:document.createElement("canvas");Pt===null&&(kt.markersOnly=!0,kt.naturalSize=!1);var De=document.createElementNS("http://www.w3.org/2000/svg","svg");De.setAttribute("xmlns","http://www.w3.org/2000/svg"),De.setAttribute("width",mt.width.baseVal.valueAsString),De.setAttribute("height",mt.height.baseVal.valueAsString),De.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),De.innerHTML=mt.innerHTML,kt.naturalSize===!0?(De.width.baseVal.value=Pt.naturalWidth,De.height.baseVal.value=Pt.naturalHeight):kt.width!==void 0&&kt.height!==void 0&&(De.width.baseVal.value=kt.width,De.height.baseVal.value=kt.height),_t.width=De.width.baseVal.value,_t.height=De.height.baseVal.value;var on=De.outerHTML,mn=_t.getContext("2d");kt.markersOnly!==!0&&mn.drawImage(Pt,0,0,_t.width,_t.height);var $e=window.URL,Bn=new Image(_t.width,_t.height);Bn.setAttribute("crossOrigin","anonymous");var Re=new Blob([on],{type:"image/svg+xml"}),Mn=$e.createObjectURL(Re);Bn.onload=function(){mn.drawImage(Bn,0,0),$e.revokeObjectURL(Mn);var Kn=_t.toDataURL(kt.imageType,kt.imageQuality);Lt(Kn)},Bn.src=Mn})},Vt}(),Ae=function(){},se=function(){function Vt(Pt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Pt+"_"}return Object.defineProperty(Vt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.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(Vt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Vt.prototype.addClass=function(Pt){return this.styleSheet===void 0&&this.addStyleSheet(),Pt.name=""+this.classNamePrefix+Pt.localName,this.classes.push(Pt),this.styleSheet.sheet.insertRule("."+Pt.name+" {"+Pt.style+"}",this.styleSheet.sheet.cssRules.length),Pt},Vt.prototype.addRule=function(Pt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Pt),this.styleSheet.sheet.insertRule(Pt.selector+" {"+Pt.style+"}",this.styleSheet.sheet.cssRules.length)},Vt.prototype.addStyleSheet=function(){var Pt;this.styleSheet=document.createElement("style"),((Pt=this.styleSheetRoot)!==null&&Pt!==void 0?Pt:document.head).appendChild(this.styleSheet),this.addRule(new ke("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ke("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new ke("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new de("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new de("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Vt.prototype.removeStyleSheet=function(){var Pt;this.styleSheet&&(((Pt=this.styleSheetRoot)!==null&&Pt!==void 0?Pt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Vt}(),ke=function(Vt,Pt){this.selector=Vt,this.style=Pt},de=function(Vt,Pt){this.localName=Vt,this.style=Pt},Ie=function(){function Vt(Pt,mt,vt,kt,Lt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Pt,this.displayMode=mt,this.markerItems=vt,this.uiStyleSettings=kt,this.styles=Lt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Vt.prototype.show=function(Pt){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var vt=document.createElement("div");vt.className=this.toolbarBlockStyleClass.name,vt.style.whiteSpace="nowrap",this.uiContainer.appendChild(vt),this.addActionButton(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(Lt){var _t=document.createElement("div");_t.className=""+mt.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",Lt.typeName),_t.innerHTML=Lt.icon,_t.addEventListener("click",function(){mt.markerToolbarButtonClicked(_t,Lt)}),mt.buttons.push(_t),mt.markerButtons.push(_t)}),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 kt=document.createElement("div");kt.className=this.toolbarBlockStyleClass.name,kt.style.whiteSpace="nowrap",kt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(kt),this.addActionButton(kt,'<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(kt,'<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()},Vt.prototype.addButtonClickListener=function(Pt){this.buttonClickListeners.push(Pt)},Vt.prototype.removeButtonClickListener=function(Pt){this.buttonClickListeners.indexOf(Pt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Pt),1)},Vt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Vt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Pt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt<this.markerButtons.length;mt++)mt<Pt||mt===Pt&&this.markerButtons.length-1===Pt?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===Pt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},Vt.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")},Vt.prototype.resetButtonStyles=function(){var Pt=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(Pt.uiStyleSettings.toolbarButtonStyleColorsClassName?Pt.uiStyleSettings.toolbarButtonStyleColorsClassName:Pt.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(Pt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Pt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Pt.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(Pt.uiStyleSettings.toolbarButtonStyleColorsClassName?Pt.uiStyleSettings.toolbarButtonStyleColorsClassName:Pt.toolbarButtonStyleColorsClass.name)})},Vt.prototype.addActionButton=function(Pt,mt,vt){var kt=this,Lt=document.createElement("div");switch(Lt.className=""+this.toolbarButtonStyleClass.name,Lt.innerHTML=mt,Lt.setAttribute("data-action",vt),Lt.addEventListener("click",function(){kt.actionToolbarButtonClicked(Lt,vt)}),vt){case"select":Lt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Lt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Lt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Lt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Lt.style.fill=this.uiStyleSettings.closeButtonColor}Pt.appendChild(Lt),this.buttons.push(Lt)},Vt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new de("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 de("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new de("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new de("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 de("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Pt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new de("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Pt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Pt)+`px;
padding: `+Pt+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new de("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new de("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ke("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new ke("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Vt.prototype.markerToolbarButtonClicked=function(Pt,mt){this.setActiveButton(Pt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},Vt.prototype.actionToolbarButtonClicked=function(Pt,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Vt.prototype.setActiveButton=function(Pt){this.resetButtonStyles(),Pt.className=Pt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Pt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Vt.prototype.setActiveMarkerButton=function(Pt){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===Pt});mt&&this.setActiveButton(mt)},Vt.prototype.setCurrentMarker=function(Pt){var mt=this;this.currentMarker=Pt,this.buttons.filter(function(vt){return/delete|notes/.test(vt.getAttribute("data-action"))}).forEach(function(vt){mt.currentMarker===void 0?(vt.style.fillOpacity="0.4",vt.style.pointerEvents="none"):(vt.style.fillOpacity="1",vt.style.pointerEvents="all")})},Vt}(),Dt=function(){function Vt(Pt,mt,vt,kt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Pt,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=kt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Vt.prototype.addStyles=function(){var Pt;this.toolboxStyleClass=this.styles.addClass(new de("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 de("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new de("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new de("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new de("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 de("toolbox-panel-row_colors",`
background-color: `+((Pt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Pt!==void 0?Pt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new de("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
padding: `+mt+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new de("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new de("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new ke("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ke("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Vt.prototype.show=function(Pt){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Vt.prototype.setPanelButtons=function(Pt){var mt,vt,kt=this;this.panels=Pt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((vt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&vt!==void 0?vt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Lt){var _t;Lt.uiStyleSettings=kt.uiStyleSettings;var De=document.createElement("div");De.className=kt.toolboxButtonStyleClass.name+" "+((_t=kt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:kt.toolboxButtonStyleColorsClass.name),De.innerHTML=Lt.icon,De.title=Lt.title,De.addEventListener("click",function(){kt.panelButtonClick(Lt)}),kt.panelButtons.push(De),kt.buttonRow.appendChild(De)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Vt.prototype.panelButtonClick=function(Pt){var mt=this,vt=-1;if(Pt!==this.activePanel){vt=this.panels.indexOf(Pt),this.panelRow.innerHTML="";var kt=Pt.getUi();kt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(kt),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=Pt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Lt,_t){var De,on;Lt.className=mt.toolboxButtonStyleClass.name+" "+(_t===vt?""+((De=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&De!==void 0?De:mt.toolboxActiveButtonStyleColorsClass.name):""+((on=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&on!==void 0?on:mt.toolboxButtonStyleColorsClass.name))})},Vt}(),nt=function(Vt,Pt){this.title=Vt,this.icon=Pt},et=function(Vt){function Pt(mt,vt,kt,Lt){var _t=Vt.call(this,mt,Lt||'<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 _t.colors=[],_t.addTransparent=!1,_t.colorBoxes=[],_t.colors=vt,_t.currentColor=kt,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.whiteSpace="nowrap",this.colors.forEach(function(kt){var Lt=mt.getColorBox(kt);vt.appendChild(Lt),mt.colorBoxes.push(Lt)}),vt},Pt.prototype.getColorBox=function(mt){var vt=this,kt=this.uiStyleSettings.toolbarHeight/4,Lt=this.uiStyleSettings.toolbarHeight-kt,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=Lt-2+"px",_t.style.height=Lt-2+"px",_t.style.padding="1px",_t.style.marginRight="2px",_t.style.marginBottom="2px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderRadius=(Lt+2)/2+"px",_t.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){vt.setCurrentColor(mt,_t)});var De=document.createElement("div");return De.style.display="inline-block",De.style.width=Lt-2+"px",De.style.height=Lt-2+"px",De.style.backgroundColor=mt,De.style.borderRadius=Lt/2+"px",mt==="transparent"&&(De.style.fill=this.uiStyleSettings.toolboxAccentColor,De.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>`),_t.appendChild(De),_t},Pt.prototype.setCurrentColor=function(mt,vt){var kt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},Pt}(nt),ut=function(){function Vt(Pt,mt,vt){this._state="new",this._isSelected=!1,this._container=Pt,this._overlayContainer=mt,this.globalSettings=vt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Vt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Vt.prototype.ownsTarget=function(Pt){return!1},Object.defineProperty(Vt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Vt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Vt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Vt.prototype.pointerDown=function(Pt,mt){},Vt.prototype.dblClick=function(Pt,mt){},Vt.prototype.manipulate=function(Pt){},Vt.prototype.pointerUp=function(Pt){this.stateChanged()},Vt.prototype.dispose=function(){},Vt.prototype.addMarkerVisualToContainer=function(Pt){this.container.childNodes.length>0?this.container.insertBefore(Pt,this.container.childNodes[0]):this.container.appendChild(Pt)},Vt.prototype.getState=function(){return{typeName:Vt.typeName,state:this.state,notes:this.notes}},Vt.prototype.restoreState=function(Pt){this._state=Pt.state,this.notes=Pt.notes},Vt.prototype.scale=function(Pt,mt){},Vt.prototype.colorChanged=function(Pt){this.onColorChanged&&this.onColorChanged(Pt),this.stateChanged()},Vt.prototype.fillColorChanged=function(Pt){this.onFillColorChanged&&this.onFillColorChanged(Pt),this.stateChanged()},Vt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Pt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Pt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Pt)&&this.onStateChanged(this)}},Vt.typeName="MarkerBase",Vt}(),at=function(){function Vt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Vt.prototype.findGripByVisual=function(Pt){return this.topLeft.ownsTarget(Pt)?this.topLeft:this.topCenter.ownsTarget(Pt)?this.topCenter:this.topRight.ownsTarget(Pt)?this.topRight:this.centerLeft.ownsTarget(Pt)?this.centerLeft:this.centerRight.ownsTarget(Pt)?this.centerRight:this.bottomLeft.ownsTarget(Pt)?this.bottomLeft:this.bottomCenter.ownsTarget(Pt)?this.bottomCenter:this.bottomRight.ownsTarget(Pt)?this.bottomRight:void 0},Vt}(),ht=function(){function Vt(){this.GRIP_SIZE=10,this.visual=Ut.createGroup(),this.visual.appendChild(Ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ut.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Vt.prototype.ownsTarget=function(Pt){return Pt===this.visual||Pt===this.visual.childNodes[0]||Pt===this.visual.childNodes[1]},Vt}(),pt=function(){function Vt(){}return Vt.toITransformMatrix=function(Pt){return{a:Pt.a,b:Pt.b,c:Pt.c,d:Pt.d,e:Pt.e,f:Pt.f}},Vt.toSVGMatrix=function(Pt,mt){return Pt.a=mt.a,Pt.b=mt.b,Pt.c=mt.c,Pt.d=mt.d,Pt.e=mt.e,Pt.f=mt.f,Pt},Vt}(),St=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.left=0,Lt.top=0,Lt.width=0,Lt.height=0,Lt.defaultSize={x:50,y:20},Lt.offsetX=0,Lt.offsetY=0,Lt.rotationAngle=0,Lt.CB_DISTANCE=10,Lt._suppressMarkerCreateEvent=!1,Lt.container.transform.baseVal.appendItem(Ut.createTransform()),Lt.setupControlBox(),Lt}return Yt(Pt,Vt),Object.defineProperty(Pt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pt.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var vt=Ut.createTransform();this._visual.transform.baseVal.appendItem(vt)},enumerable:!1,configurable:!0}),Pt.prototype.ownsTarget=function(mt){return!!Vt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var kt=this.unrotatePoint(mt);if(this.manipulationStartX=kt.x,this.manipulationStartY=kt.y,this.offsetX=kt.x-this.left,this.offsetY=kt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(vt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(vt)){this.activeGrip=this.rotatorGrip;var Lt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Lt.x-this.width/2,this.top=Lt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _t=this.container.transform.baseVal.getItem(0);_t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_t,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Pt.prototype.pointerUp=function(mt){var vt=this.state;Vt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Pt.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},Pt.prototype.manipulate=function(mt){var vt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(vt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(vt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(vt):this.state==="rotate"&&this.rotate(mt)},Pt.prototype.resize=function(mt){var vt=this.manipulationStartLeft,kt=this.manipulationStartWidth,Lt=this.manipulationStartTop,_t=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:vt=this.manipulationStartLeft+mt.x-this.manipulationStartX,kt=this.manipulationStartWidth+this.manipulationStartLeft-vt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:kt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Lt=this.manipulationStartTop+mt.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-Lt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+mt.y-this.manipulationStartY}kt>=0?(this.left=vt,this.width=kt):(this.left=vt+kt,this.width=-kt),_t>=0?(this.top=Lt,this.height=_t):(this.top=Lt+_t,this.height=-_t),this.setSize()},Pt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Pt.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var vt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*vt,this.applyRotation()}},Pt.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},Pt.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM(),kt=Ut.createPoint(mt.x,mt.y);return{x:(kt=kt.matrixTransform(vt)).x,y:kt.y}},Pt.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM();vt=vt.inverse();var kt=Ut.createPoint(mt.x,mt.y);return{x:(kt=kt.matrixTransform(vt)).x,y:kt.y}},Pt.prototype.select=function(){Vt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pt.prototype.deselect=function(){Vt.prototype.deselect.call(this),this.controlBox.style.display="none"},Pt.prototype.setupControlBox=function(){this.controlBox=Ut.createGroup();var mt=Ut.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=Ut.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=Ut.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 at,this.addControlGrips(),this.controlBox.style.display="none"},Pt.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,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()},Pt.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()},Pt.prototype.createGrip=function(){var mt=new ht;return mt.visual.transform.baseVal.appendItem(Ut.createTransform()),this.controlBox.appendChild(mt.visual),mt},Pt.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,kt=vt,Lt=(this.width+this.CB_DISTANCE)/2-mt/2,_t=(this.height+this.CB_DISTANCE)/2-mt/2,De=this.height+this.CB_DISTANCE-mt/2,on=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,vt,kt),this.positionGrip(this.controlGrips.topCenter.visual,Lt,kt),this.positionGrip(this.controlGrips.topRight.visual,on,kt),this.positionGrip(this.controlGrips.centerLeft.visual,vt,_t),this.positionGrip(this.controlGrips.centerRight.visual,on,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,De),this.positionGrip(this.controlGrips.bottomCenter.visual,Lt,De),this.positionGrip(this.controlGrips.bottomRight.visual,on,De),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Lt,kt-3*this.CB_DISTANCE)},Pt.prototype.positionGrip=function(mt,vt,kt){var Lt=mt.transform.baseVal.getItem(0);Lt.setTranslate(vt,kt),mt.transform.baseVal.replaceItem(Lt,0)},Pt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Pt.prototype.showControlBox=function(){this.controlBox.style.display=""},Pt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Vt.prototype.getState.call(this))},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt);var vt=mt;this.left=vt.left,this.top=vt.top,this.width=vt.width,this.height=vt.height,this.rotationAngle=vt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,vt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,vt.containerTransformMatrix))},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt);var kt=this.rotatePoint({x:this.left,y:this.top}),Lt=this.unrotatePoint({x:kt.x*mt,y:kt.y*vt});this.left=Lt.x,this.top=Lt.y,this.width=this.width*mt,this.height=this.height*vt,this.adjustControlBox()},Pt}(ut),bt=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.opacity=1,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Pt.prototype.createVisual=function(){this.visual=Ut.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)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Pt.prototype.manipulate=function(mt){Vt.prototype.manipulate.call(this,mt)},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),this.setSize()},Pt.prototype.setSize=function(){Vt.prototype.setSize.call(this),Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Pt.prototype.pointerUp=function(mt){Vt.prototype.pointerUp.call(this,mt),this.setSize()},Pt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Pt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Pt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Vt.prototype.getState.call(this))},Pt.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),Vt.prototype.restoreState.call(this,mt),this.setSize()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.setSize()},Pt.title="Rectangle marker",Pt}(St),Ot=function(Vt){function Pt(mt,vt,kt,Lt){var _t=Vt.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _t.widths=[],_t.widthBoxes=[],_t.widths=vt,_t.currentWidth=kt,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.widths.forEach(function(kt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.flexGrow="2",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=kt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentWidth(kt,Lt)}),vt.appendChild(Lt);var _t=document.createElement("div");_t.innerText=kt.toString(),_t.style.marginRight="5px",Lt.appendChild(_t);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.display="flex",De.style.alignItems="center";var on=document.createElement("hr");on.style.minWidth="20px",on.style.border="0px",on.style.borderTop=kt+"px solid "+mt.uiStyleSettings.toolboxColor,on.style.flexGrow="2",De.appendChild(on),Lt.appendChild(De),mt.widthBoxes.push(Lt)}),vt},Pt.prototype.setCurrentWidth=function(mt,vt){var kt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Pt}(nt),Ht=function(Vt){function Pt(mt,vt,kt,Lt){var _t=Vt.call(this,mt,Lt||'<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 _t.styles=[],_t.styleBoxes=[],_t.styles=vt,_t.currentStyle=kt,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.styles.forEach(function(kt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.overflow="hidden",Lt.style.maxWidth=100/mt.styles.length-5+"%",Lt.style.borderColor=kt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentStyle(kt,Lt)}),vt.appendChild(Lt);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var De=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(kt!==""?'stroke-dasharray="'+kt+'"':"")+` />
</svg>`;_t.innerHTML=De,Lt.appendChild(_t),mt.styleBoxes.push(Lt)}),vt},Pt.prototype.setCurrentStyle=function(mt,vt){var kt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Pt}(nt),Wt=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.strokeColor=kt.defaultColor,Lt.strokeWidth=kt.defaultStrokeWidth,Lt.strokeDasharray=kt.defaultStrokeDasharray,Lt.strokePanel=new et("Line color",kt.defaultColorSet,kt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Ht("Line style",kt.defaultStrokeDasharrays,kt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Yt(Pt,Vt),Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Vt.prototype.getState.call(this);return mt.typeName=Pt.typeName,mt},Pt.typeName="FrameMarker",Pt.title="Frame marker",Pt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Pt}(bt),re=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"},te=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.x1=0,Lt.y1=0,Lt.x2=0,Lt.y2=0,Lt.defaultLength=50,Lt.manipulationStartX=0,Lt.manipulationStartY=0,Lt.manipulationStartX1=0,Lt.manipulationStartY1=0,Lt.manipulationStartX2=0,Lt.manipulationStartY2=0,Lt.setupControlBox(),Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!!Vt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.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(vt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(vt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Pt.prototype.pointerUp=function(mt){var vt=this.state;Vt.prototype.pointerUp.call(this,mt),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(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Pt.prototype.adjustVisual=function(){},Pt.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},Pt.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},Pt.prototype.select=function(){Vt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pt.prototype.deselect=function(){Vt.prototype.deselect.call(this),this.controlBox.style.display="none"},Pt.prototype.setupControlBox=function(){this.controlBox=Ut.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Pt.prototype.adjustControlBox=function(){this.positionGrips()},Pt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Pt.prototype.createGrip=function(){var mt=new ht;return mt.visual.transform.baseVal.appendItem(Ut.createTransform()),this.controlBox.appendChild(mt.visual),mt},Pt.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},Pt.prototype.positionGrip=function(mt,vt,kt){var Lt=mt.transform.baseVal.getItem(0);Lt.setTranslate(vt,kt),mt.transform.baseVal.replaceItem(Lt,0)},Pt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Vt.prototype.getState.call(this))},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.x1=this.x1*mt,this.y1=this.y1*vt,this.x2=this.x2*mt,this.y2=this.y2*vt,this.adjustVisual(),this.adjustControlBox()},Pt}(ut),Ce=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.strokeColor=kt.defaultColor,Lt.strokeWidth=kt.defaultStrokeWidth,Lt.strokeDasharray=kt.defaultStrokeDasharray,Lt.strokePanel=new et("Line color",kt.defaultColorSet,kt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Ht("Line style",kt.defaultStrokeDasharrays,kt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},Pt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.selectorLine=Ut.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ut.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)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Pt.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()),Ut.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ut.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ut.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Pt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Pt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},Pt.typeName="LineMarker",Pt.title="Line marker",Pt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Pt}(te),ce=function(Vt){function Pt(mt,vt,kt,Lt){var _t=Vt.call(this,mt,Lt||'<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 _t.fonts=[],_t.fontBoxes=[],_t.fonts=vt,_t.currentFont=kt,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.flexGrow="2",this.fonts.forEach(function(kt){var Lt=document.createElement("div");Lt.style.display="inline-block",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.overflow="hidden",Lt.style.maxWidth=100/mt.fonts.length-5+"%",Lt.style.borderColor=kt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentFont(kt,Lt)}),vt.appendChild(Lt);var _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=kt,_t.style.overflow="hidden";var De=document.createElement("div");De.style.whiteSpace="nowrap",De.style.overflow="hidden",De.style.textOverflow="ellipsis",De.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(De),Lt.appendChild(_t),mt.fontBoxes.push(Lt)}),vt},Pt.prototype.setCurrentFont=function(mt,vt){var kt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Pt}(nt),Qe=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.color="transparent",Lt.padding=5,Lt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Lt.text=Lt.DEFAULT_TEXT,Lt.isMoved=!1,Lt.color=kt.defaultColor,Lt.fontFamily=kt.defaultFontFamily,Lt.defaultSize={x:100,y:30},Lt.setColor=Lt.setColor.bind(Lt),Lt.setFont=Lt.setFont.bind(Lt),Lt.renderText=Lt.renderText.bind(Lt),Lt.sizeText=Lt.sizeText.bind(Lt),Lt.textEditDivClicked=Lt.textEditDivClicked.bind(Lt),Lt.showTextEditor=Lt.showTextEditor.bind(Lt),Lt.setSize=Lt.setSize.bind(Lt),Lt.positionTextEditor=Lt.positionTextEditor.bind(Lt),Lt.colorPanel=new et("Color",kt.defaultColorSet,kt.defaultColor),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.fontFamilyPanel=new ce("Font",kt.defaultFontFamilies,kt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){if(Vt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var vt=!1;return this.textElement.childNodes.forEach(function(kt){kt===mt&&(vt=!0)}),vt},Pt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.bgRectangle=Ut.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ut.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ut.createTransform()),this.textElement.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Pt.prototype.renderText=function(){var mt=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(vt){mt.textElement.appendChild(Ut.createTSpan(vt.trim()===""?" ":vt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Pt.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),vt=1;if(mt.width>0&&mt.height>0){var kt=(1*this.width-this.width*this.padding*2/100)/mt.width,Lt=(1*this.height-this.height*this.padding*2/100)/mt.height;vt=Math.min(kt,Lt)}return vt},Pt.prototype.getTextPosition=function(mt){var vt=this.textElement.getBBox(),kt=0,Lt=0;return vt.width>0&&vt.height>0&&(kt=(this.width-vt.width*mt)/2,Lt=this.height/2-vt.height*mt/2),{x:kt,y:Lt}},Pt.prototype.sizeText=function(){var mt=this.textElement.getBBox(),vt=this.getTextScale(),kt=this.getTextPosition(vt);kt.y-=mt.y*vt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+kt.x+"px, "+kt.y+"px) scale("+vt+", "+vt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(kt.x,kt.y),this.textElement.transform.baseVal.getItem(1).setScale(vt,vt))},Pt.prototype.manipulate=function(mt){Vt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},Pt.prototype.setSize=function(){Vt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Pt.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),Vt.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Pt.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var vt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&vt>.9;)vt-=.1,mt.textEditor.style.fontSize=Math.max(vt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(vt){if(vt.clipboardData){var kt=vt.clipboardData.getData("text"),Lt=window.getSelection();if(!Lt.rangeCount)return!1;Lt.deleteFromDocument(),Lt.getRangeAt(0).insertNode(document.createTextNode(kt)),vt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Pt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),vt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),kt=this.textElement.getBBox(),Lt={x:kt.width*mt,y:kt.height*mt};vt.x-=Lt.x/2,vt.y-=Lt.y/2,this.textEditor.style.top=vt.y+"px",this.textEditor.style.left=vt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-vt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},Pt.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Pt.prototype.select=function(){Vt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Pt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Vt.prototype.deselect.call(this)},Pt.prototype.dblClick=function(mt,vt){Vt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Pt.prototype.setColor=function(mt){this.textElement&&Ut.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},Pt.prototype.setFont=function(mt){this.textElement&&Ut.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Pt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Pt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){var vt=mt;this.color=vt.color,this.fontFamily=vt.fontFamily,this.padding=vt.padding,this.text=vt.text,this.createVisual(),Vt.prototype.restoreState.call(this,mt),this.setSize()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},Pt.typeName="TextMarker",Pt.title="Text marker",Pt.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>',Pt}(St),je=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.color="transparent",Lt.lineWidth=3,Lt.drawing=!1,Lt.pixelRatio=1,Lt.color=kt.defaultColor,Lt.lineWidth=kt.defaultStrokeWidth,Lt.pixelRatio=kt.freehandPixelRatio,Lt.setColor=Lt.setColor.bind(Lt),Lt.addCanvas=Lt.addCanvas.bind(Lt),Lt.finishCreation=Lt.finishCreation.bind(Lt),Lt.setLineWidth=Lt.setLineWidth.bind(Lt),Lt.colorPanel=new et("Color",kt.defaultColorSet,kt.defaultColor),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.lineWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.lineWidthPanel.onWidthChanged=Lt.setLineWidth,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},Pt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.drawingImage=Ut.createImage(),this.visual.appendChild(this.drawingImage);var mt=Ut.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},Pt.prototype.pointerDown=function(mt,vt){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(mt.x,mt.y),this.drawing=!0):Vt.prototype.pointerDown.call(this,mt,vt)},Pt.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):Vt.prototype.manipulate.call(this,mt)},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Pt.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Vt.prototype.pointerUp.call(this,mt)},Pt.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)},Pt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Vt.prototype.select.call(this)},Pt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Vt.prototype.deselect.call(this)},Pt.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),vt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],kt=vt[0],Lt=vt[1],_t=vt[2],De=vt[3],on=!1,mn=0;mn<this.canvasElement.height;mn++)for(var $e=0;$e<this.canvasElement.width;$e++)mt.data[mn*this.canvasElement.width*4+4*$e+3]>0&&(on=!0,mn<Lt&&(Lt=mn),$e<kt&&(kt=$e),mn>De&&(De=mn),$e>_t&&(_t=$e));if(on){this.left=kt/this.pixelRatio,this.top=Lt/this.pixelRatio,this.width=(_t-kt)/this.pixelRatio,this.height=(De-Lt)/this.pixelRatio;var Bn=document.createElement("canvas");Bn.width=_t-kt,Bn.height=De-Lt,Bn.getContext("2d").putImageData(this.canvasContext.getImageData(kt,Lt,_t-kt,De-Lt),0,0),this.drawingImgUrl=Bn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Pt.prototype.setDrawingImage=function(){Ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Pt.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},Pt.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){this.createVisual(),Vt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.setDrawingImage()},Pt.typeName="FreehandMarker",Pt.title="Freehand marker",Pt.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>',Pt}(St),He=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,kt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Lt.typeBoxes=[],Lt.currentType=vt,Lt.setCurrentType=Lt.setCurrentType.bind(Lt),Lt}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2";for(var kt=function(De){var on="both";switch(De){case 0:on="both";break;case 1:on="start";break;case 2:on="end";break;case 3:on="none"}var mn=document.createElement("div");if(mn.style.display="flex",mn.style.flexGrow="2",mn.style.alignItems="center",mn.style.justifyContent="space-between",mn.style.padding="5px",mn.style.borderWidth="2px",mn.style.borderStyle="solid",mn.style.borderColor=on===Lt.currentType?Lt.uiStyleSettings.toolboxAccentColor:"transparent",mn.addEventListener("click",function(){mt.setCurrentType(on,mn)}),vt.appendChild(mn),on==="both"||on==="start"){var $e=document.createElement("div");$e.style.display="flex",$e.style.alignItems="center",$e.style.minHeight="20px",$e.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="`+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,$e.style.marginLeft="5px",mn.appendChild($e)}var Bn=document.createElement("div");Bn.style.display="flex",Bn.style.alignItems="center",Bn.style.minHeight="20px",Bn.style.flexGrow="2";var Re=document.createElement("hr");if(Re.style.minWidth="20px",Re.style.border="0px",Re.style.borderTop="3px solid "+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee"),Re.style.flexGrow="2",Bn.appendChild(Re),mn.appendChild(Bn),on==="both"||on==="end"){var Mn=document.createElement("div");Mn.style.display="flex",Mn.style.alignItems="center",Mn.style.minHeight="20px",Mn.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="`+(Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Mn.style.marginRight="5px",mn.appendChild(Mn)}Lt.typeBoxes.push(mn)},Lt=this,_t=0;_t<4;_t++)kt(_t);return vt},Pt.prototype.setCurrentType=function(mt,vt){var kt=this;this.currentType=mt,this.typeBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Pt}(nt),Qn=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.arrowType="end",Lt.arrowBaseHeight=10,Lt.arrowBaseWidth=10,Lt.getArrowPoints=Lt.getArrowPoints.bind(Lt),Lt.setArrowType=Lt.setArrowType.bind(Lt),Lt.arrowTypePanel=new He("Arrow type","end"),Lt.arrowTypePanel.onArrowTypeChanged=Lt.setArrowType,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},Pt.prototype.getArrowPoints=function(mt,vt){var kt=this.arrowBaseWidth+2*this.strokeWidth,Lt=this.arrowBaseHeight+2*this.strokeWidth;return mt-kt/2+","+(vt+Lt/2)+" "+mt+","+(vt-Lt/2)+" "+(mt+kt/2)+","+(vt+Lt/2)},Pt.prototype.createTips=function(){this.arrow1=Ut.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ut.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.arrow2)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Pt.prototype.adjustVisual=function(){if(Vt.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",Ut.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ut.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var vt=this.arrow1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(vt,0);var kt=this.arrow2.transform.baseVal.getItem(0);kt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(kt,0)}},Pt.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},Pt.typeName="ArrowMarker",Pt.title="Arrow marker",Pt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Pt}(Ce),Gn=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.fillColor=kt.defaultFillColor,Lt.strokeWidth=0,Lt.fillPanel=new et("Color",kt.defaultColorSet,kt.defaultFillColor),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt}return Yt(Pt,Vt),Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Vt.prototype.getState.call(this);return mt.typeName=Pt.typeName,mt},Pt.typeName="CoverMarker",Pt.title="Cover marker",Pt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Pt}(bt),Yn=function(Vt){function Pt(mt,vt,kt,Lt){var _t=Vt.call(this,mt,Lt||'<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 _t.opacities=[],_t.opacityBoxes=[],_t.opacities=vt,_t.currentOpacity=kt,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return Yt(Pt,Vt),Pt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",vt.style.justifyContent="space-between",this.opacities.forEach(function(kt){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.justifyContent="center",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=kt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){mt.setCurrentOpacity(kt,Lt)}),vt.appendChild(Lt);var _t=document.createElement("div");_t.innerText=100*kt+"%",Lt.appendChild(_t),mt.opacityBoxes.push(Lt)}),vt},Pt.prototype.setCurrentOpacity=function(mt,vt){var kt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Lt){Lt.style.borderColor=Lt===vt?kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Pt}(nt),di=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.setOpacity=Lt.setOpacity.bind(Lt),Lt.fillColor=kt.defaultHighlightColor,Lt.strokeWidth=0,Lt.opacity=kt.defaultHighlightOpacity,Lt.fillPanel=new et("Color",kt.defaultColorSet,Lt.fillColor),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.opacityPanel=new Yn("Opacity",kt.defaultOpacitySteps,Lt.opacity),Lt.opacityPanel.onOpacityChanged=Lt.setOpacity,Lt}return Yt(Pt,Vt),Pt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Vt.prototype.getState.call(this);return mt.typeName=Pt.typeName,mt},Pt.typeName="HighlightMarker",Pt.title="Highlight marker",Pt.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>',Pt}(Gn),ie='<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>',zt='<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>',We=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.bgColor="transparent",Lt.tipPosition={x:0,y:0},Lt.tipBase1Position={x:0,y:0},Lt.tipBase2Position={x:0,y:0},Lt.tipMoving=!1,Lt.color=kt.defaultStrokeColor,Lt.bgColor=kt.defaultFillColor,Lt.fontFamily=kt.defaultFontFamily,Lt.defaultSize={x:100,y:30},Lt.setBgColor=Lt.setBgColor.bind(Lt),Lt.getTipPoints=Lt.getTipPoints.bind(Lt),Lt.positionTip=Lt.positionTip.bind(Lt),Lt.setTipPoints=Lt.setTipPoints.bind(Lt),Lt.colorPanel=new et("Text color",kt.defaultColorSet,Lt.color,ie),Lt.colorPanel.onColorChanged=Lt.setColor,Lt.bgColorPanel=new et("Fill color",kt.defaultColorSet,Lt.bgColor,zt),Lt.bgColorPanel.onColorChanged=Lt.setBgColor,Lt.fontFamilyPanel=new ce("Font",kt.defaultFontFamilies,kt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt.tipGrip=new ht,Lt.tipGrip.visual.transform.baseVal.appendItem(Ut.createTransform()),Lt.controlBox.appendChild(Lt.tipGrip.visual),Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return Vt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},Pt.prototype.createTip=function(){Ut.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ut.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Pt.prototype.pointerDown=function(mt,vt){this.state==="new"&&Vt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(vt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Vt.prototype.pointerDown.call(this,mt,vt)},Pt.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Vt.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";Vt.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},Pt.prototype.manipulate=function(mt){if(this.tipMoving){var vt=this.unrotatePoint(mt);this.tipPosition={x:vt.x-this.manipulationStartLeft,y:vt.y-this.manipulationStartTop},this.positionTip()}else Vt.prototype.manipulate.call(this,mt)},Pt.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(Ut.setAttributes(this.bgRectangle,[["fill",mt]]),Ut.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},Pt.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},Pt.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var vt=Math.min(this.height/2,15),kt=this.height/5;mt&&(this.tipPosition={x:vt+kt/2,y:this.height+20});var Lt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Lt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(kt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:0},this.tipBase2Position={x:vt+kt,y:0}):(this.tipBase1Position={x:0,y:vt},this.tipBase2Position={x:0,y:vt+kt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Lt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(kt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-kt,y:0},this.tipBase2Position={x:this.width-vt,y:0}):(this.tipBase1Position={x:this.width,y:vt},this.tipBase2Position={x:this.width,y:vt+kt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Lt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(kt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-kt,y:this.height},this.tipBase2Position={x:this.width-vt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-vt-kt},this.tipBase2Position={x:this.width,y:this.height-vt}):Lt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(kt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:this.height},this.tipBase2Position={x:vt+kt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-vt},this.tipBase2Position={x:0,y:this.height-vt-kt})},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),this.positionTip()},Pt.prototype.positionTip=function(){Ut.setAttributes(this.tip,[["points",this.getTipPoints()]]);var mt=this.tipGrip.visual.transform.baseVal.getItem(0);mt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(mt,0)},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pt.prototype.select=function(){this.positionTip(),Vt.prototype.select.call(this)},Pt.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,Vt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},Pt.typeName="CalloutMarker",Pt.title="Callout marker",Pt.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>',Pt}(Qe),En=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.opacity=1,Lt.strokeColor=kt.defaultColor,Lt.strokeWidth=kt.defaultStrokeWidth,Lt.strokeDasharray=kt.defaultStrokeDasharray,Lt.fillColor=kt.defaultFillColor,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.setOpacity=Lt.setOpacity.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt.strokePanel=new et("Line color",ge(kt.defaultColorSet,["transparent"]),kt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.fillPanel=new et("Fill color",ge(kt.defaultColorSet,["transparent"]),Lt.fillColor,zt),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.strokeWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Ht("Line style",kt.defaultStrokeDasharrays,kt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt.opacityPanel=new Yn("Opacity",kt.defaultOpacitySteps,Lt.opacity),Lt.opacityPanel.onOpacityChanged=Lt.setOpacity,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Pt.prototype.createVisual=function(){this.visual=Ut.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)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Pt.prototype.manipulate=function(mt){Vt.prototype.manipulate.call(this,mt)},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),this.setSize()},Pt.prototype.setSize=function(){Vt.prototype.setSize.call(this),Ut.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Pt.prototype.pointerUp=function(mt){Vt.prototype.pointerUp.call(this,mt),this.setSize()},Pt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Pt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Pt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),Vt.prototype.restoreState.call(this,mt),this.setSize()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.setSize()},Pt.typeName="EllipseMarker",Pt.title="Ellipse marker",Pt.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>',Pt}(St),Xn=function(Vt){function Pt(mt,vt,kt){return Vt.call(this,mt,vt,kt)||this}return Yt(Pt,Vt),Object.defineProperty(Pt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},Pt.prototype.createTips=function(){this.tip1=Ut.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(Ut.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ut.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(Ut.createTransform()),this.visual.appendChild(this.tip2)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Pt.prototype.adjustVisual=function(){if(Vt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ut.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()]]),Ut.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 mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),vt=this.tip1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(vt,0);var kt=this.tip2.transform.baseVal.getItem(0);kt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(kt,0)}},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Vt.prototype.getState.call(this);return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},Pt.typeName="MeasurementMarker",Pt.title="Measurement marker",Pt.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>',Pt}(Ce),Ve=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.strokePanel.colors=kt.defaultColorSet,Lt.fillColor="transparent",Lt}return Yt(Pt,Vt),Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Vt.prototype.getState.call(this);return mt.typeName=Pt.typeName,mt},Pt.typeName="EllipseFrameMarker",Pt.title="Ellipse frame marker",Pt.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>',Pt}(En),In=function(){function Vt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Vt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Vt.prototype.addUndoStep=function(Pt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Pt)||(this.undoStack.push(Pt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Pt)&&this.redoStack.splice(0,this.redoStack.length))},Vt.prototype.replaceLastUndoStep=function(Pt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Pt)},Vt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Vt.prototype.undo=function(){if(this.undoStack.length>1){var Pt=this.undoStack.pop();return Pt!==void 0&&this.redoStack.push(Pt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Vt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Vt}(),Hn=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.curveX=0,Lt.curveY=0,Lt.manipulationStartCurveX=0,Lt.manipulationStartCurveY=0,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.positionGrips=Lt.positionGrips.bind(Lt),Lt.addControlGrips=Lt.addControlGrips.bind(Lt),Lt.adjustVisual=Lt.adjustVisual.bind(Lt),Lt.setupControlBox=Lt.setupControlBox.bind(Lt),Lt.resize=Lt.resize.bind(Lt),Lt.strokeColor=kt.defaultColor,Lt.strokeWidth=kt.defaultStrokeWidth,Lt.strokeDasharray=kt.defaultStrokeDasharray,Lt.strokePanel=new et("Line color",kt.defaultColorSet,kt.defaultColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.strokeWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Ht("Line style",kt.defaultStrokeDasharrays,kt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},Pt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Pt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.selectorCurve=Ut.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ut.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)},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(vt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Pt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ut.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ut.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ut.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pt.prototype.setupControlBox=function(){Vt.prototype.setupControlBox.call(this),this.curveControlLine1=Ut.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ut.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)},Pt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Vt.prototype.addControlGrips.call(this)},Pt.prototype.positionGrips=function(){Vt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/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()))},Pt.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),Vt.prototype.manipulate.call(this,mt)},Pt.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),Vt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Pt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Pt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Pt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},Pt.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,Vt.prototype.scale.call(this,mt,vt)},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Vt.prototype.getState.call(this));return mt.typeName=Pt.typeName,mt},Pt.prototype.restoreState=function(mt){Vt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.curveX=vt.curveX,this.curveY=vt.curveY,this.createVisual(),this.adjustVisual()},Pt.typeName="CurveMarker",Pt.title="Curve marker",Pt.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>',Pt}(te),li=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,vt,kt)||this;return Lt.fillColor="transparent",Lt.strokeColor="transparent",Lt.strokeWidth=0,Lt.strokeDasharray="",Lt.textColor="transparent",Lt.fontSize="1rem",Lt.isMoved=!1,Lt.captionText="Caption",Lt.PADDING=5,Lt.captionBoxWidth=0,Lt.captionBoxHeight=0,Lt.strokeColor=kt.defaultColor,Lt.strokeWidth=kt.defaultStrokeWidth,Lt.strokeDasharray=kt.defaultStrokeDasharray,Lt.fillColor=kt.defaultFillColor,Lt.textColor=kt.defaultStrokeColor,Lt.fontFamily=kt.defaultFontFamily,Lt.fontSize=kt.defaultCaptionFontSize,Lt.captionText=kt.defaultCaptionText,Lt.setStrokeColor=Lt.setStrokeColor.bind(Lt),Lt.setFillColor=Lt.setFillColor.bind(Lt),Lt.setStrokeWidth=Lt.setStrokeWidth.bind(Lt),Lt.setStrokeDasharray=Lt.setStrokeDasharray.bind(Lt),Lt.createVisual=Lt.createVisual.bind(Lt),Lt.sizeCaption=Lt.sizeCaption.bind(Lt),Lt.setCaptionText=Lt.setCaptionText.bind(Lt),Lt.showTextEditor=Lt.showTextEditor.bind(Lt),Lt.positionTextEditor=Lt.positionTextEditor.bind(Lt),Lt.finishTextEditing=Lt.finishTextEditing.bind(Lt),Lt.setFont=Lt.setFont.bind(Lt),Lt.setTextColor=Lt.setTextColor.bind(Lt),Lt.strokePanel=new et("Line color",ge(kt.defaultColorSet,["transparent"]),Lt.strokeColor),Lt.strokePanel.onColorChanged=Lt.setStrokeColor,Lt.fillPanel=new et("Fill color",ge(kt.defaultColorSet,["transparent"]),Lt.fillColor,zt),Lt.fillPanel.onColorChanged=Lt.setFillColor,Lt.strokeWidthPanel=new Ot("Line width",kt.defaultStrokeWidths,kt.defaultStrokeWidth),Lt.strokeWidthPanel.onWidthChanged=Lt.setStrokeWidth,Lt.strokeStylePanel=new Ht("Line style",kt.defaultStrokeDasharrays,kt.defaultStrokeDasharray),Lt.strokeStylePanel.onStyleChanged=Lt.setStrokeDasharray,Lt.fontFamilyPanel=new ce("Font",kt.defaultFontFamilies,kt.defaultFontFamily),Lt.fontFamilyPanel.onFontChanged=Lt.setFont,Lt.textColorPanel=new et("Text color",kt.defaultColorSet,Lt.textColor,ie),Lt.textColorPanel.onColorChanged=Lt.setTextColor,Lt}return Yt(Pt,Vt),Pt.prototype.ownsTarget=function(mt){return!(!Vt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},Pt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ut.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ut.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=Ut.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()},Pt.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Pt.prototype.pointerDown=function(mt,vt){Vt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Pt.prototype.manipulate=function(mt){Vt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Pt.prototype.resize=function(mt){Vt.prototype.resize.call(this,mt),this.setSize()},Pt.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ut.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')"]]),Ut.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')"]])},Pt.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(vt){vt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Pt.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"))},Pt.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Pt.prototype.setFont=function(mt){this.captionElement&&Ut.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Pt.prototype.setTextColor=function(mt){this.captionElement&&Ut.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Pt.prototype.setSize=function(){Vt.prototype.setSize.call(this),Ut.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Pt.prototype.pointerUp=function(mt){Vt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Pt.prototype.dblClick=function(mt,vt){Vt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Pt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Ut.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Pt.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Ut.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Pt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Ut.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Ut.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Pt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Pt.prototype.getState=function(){var mt=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},Vt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},Pt.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.textColor=vt.textColor,this.fontFamily=vt.fontFamily,this.captionText=vt.captionText,this.fontSize=vt.fontSize,this.createVisual(),Vt.prototype.restoreState.call(this,mt),this.setSize()},Pt.prototype.scale=function(mt,vt){Vt.prototype.scale.call(this,mt,vt),this.setSize()},Pt.typeName="CaptionFrameMarker",Pt.title="Caption frame marker",Pt.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>',Pt}(St),tn=function(){function Vt(Pt,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Pt,this.cancelable=mt}return Object.defineProperty(Vt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Vt.prototype.preventDefault=function(){this._defaultPrevented=!0},Vt}(),Me=function(Vt){function Pt(mt,vt,kt){var Lt=Vt.call(this,mt,!1)||this;return Lt.dataUrl=vt,Lt.state=kt,Lt}return Yt(Pt,Vt),Pt}(tn),rn=function(Vt){function Pt(mt,vt,kt){kt===void 0&&(kt=!1);var Lt=Vt.call(this,mt,kt)||this;return Lt.marker=vt,Lt}return Yt(Pt,Vt),Pt}(tn),Dn=function(){function Vt(){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 Vt.prototype.addEventListener=function(Pt,mt){this[Pt].push(mt)},Vt.prototype.removeEventListener=function(Pt,mt){var vt=this[Pt].indexOf(mt);vt>-1&&this[Pt].splice(vt,1)},Vt}(),sn=function(){function Vt(Pt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new re,this._isOpen=!1,this.undoRedoManager=new In,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 Dn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Vt.instanceCounter++,this.styles=new se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Pt,this.targetRoot=document.body,this.width=Pt.clientWidth,this.height=Pt.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(Vt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Wt,je,Qn,Qe,Ve,En,di,We,Xn,Gn,Ce,Hn,li]},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Wt,je,Qn,Qe,En,di,We]},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Wt,je,Qn,Qe,di]},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Pt){var mt=this;this._availableMarkerTypes.splice(0),Pt.forEach(function(vt){if(typeof vt=="string"){var kt=mt.ALL_MARKER_TYPES.find(function(Lt){return Lt.typeName===vt});kt!==void 0&&mt._availableMarkerTypes.push(kt)}else mt._availableMarkerTypes.push(vt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Vt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Pt){this._zoomLevel=Pt,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(Vt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Vt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),jt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Vt.prototype.show=function(){var Pt=this;this.styles.styleSheetRoot===void 0&&Ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new tn(Pt))})},Vt.prototype.render=function(){return he(this,void 0,void 0,function(){var Pt;return xe(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(Pt=new ne).naturalSize=this.renderAtNaturalSize,Pt.imageType=this.renderImageType,Pt.imageQuality=this.renderImageQuality,Pt.markersOnly=this.renderMarkersOnly,Pt.width=this.renderWidth,Pt.height=this.renderHeight,[4,Pt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,Pt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},Vt.prototype.close=function(Pt){var mt=this;if(Pt===void 0&&(Pt=!1),this.isOpen){var vt=!1;Pt||this.eventListeners.beforeclose.forEach(function(kt){var Lt=new tn(mt,!0);kt(Lt),Lt.defaultPrevented&&(vt=!0)}),vt||(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(kt){return kt(new tn(mt))}),this.detachEvents(),this._isOpen=!1)}},Vt.prototype.addMarkersToToolbar=function(){for(var Pt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(Pt=this._availableMarkerTypes).push.apply(Pt,mt)},Vt.prototype.addRenderEventListener=function(Pt){this.addEventListener("render",function(mt){Pt(mt.dataUrl,mt.state)})},Vt.prototype.removeRenderEventListener=function(Pt){},Vt.prototype.addCloseEventListener=function(Pt){this.addEventListener("close",function(){Pt()})},Vt.prototype.removeCloseEventListener=function(Pt){},Vt.prototype.setupResizeObserver=function(){var Pt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Pt.resize(Pt.target.clientWidth,Pt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Pt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Vt.prototype.onPopupTargetResize=function(){var Pt=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/Pt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Pt:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Pt;this.resize(mt,vt)},Vt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Vt.prototype.resize=function(Pt,mt){this._isResizing=!0;var vt=Pt/this.imageWidth,kt=mt/this.imageHeight;this.imageWidth=Math.round(Pt),this.imageHeight=Math.round(mt),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(vt,kt),this._isResizing=!1},Vt.prototype.scaleMarkers=function(Pt,mt){var vt,kt=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(Pt,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Lt){Lt!==kt._currentMarker&&Lt.scale(Pt,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},Vt.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"},Vt.prototype.setTopLeft=function(){var Pt=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=Pt.left-mt.left,this.top=Pt.top-mt.top},Vt.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)},Vt.prototype.addDefs=function(){for(var Pt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Ut.createDefs(),this.addDefsToImage(),(Pt=this.defs).append.apply(Pt,mt)},Vt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Vt.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)},Vt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Vt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Vt.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)},Vt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Vt.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)},Vt.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 Pt=document.createElement("a");Pt.href="https://markerjs.com/",Pt.target="_blank",Pt.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>',Pt.title="Powered by marker.js",Pt.style.display="grid",Pt.style.alignItems="center",Pt.style.justifyItems="center",Pt.style.padding="3px",Pt.style.width="20px",Pt.style.height="20px",this.logoUI.appendChild(Pt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Vt.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")},Vt.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"},Vt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Vt.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 Pt=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=Pt+"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 Ie(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 Dt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Vt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Vt.prototype.removeMarker=function(Pt){this.markerImage.removeChild(Pt.container),this.markers.indexOf(Pt)>-1&&this.markers.splice(this.markers.indexOf(Pt),1),Pt.dispose()},Vt.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())},Vt.prototype.toolbarButtonClicked=function(Pt,mt){if(Pt==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(Pt==="action")switch(mt){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()}},Vt.prototype.deleteSelectedMarker=function(){var Pt=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(kt){var Lt=new rn(Pt,Pt._currentMarker,!0);kt(Lt),Lt.defaultPrevented&&(mt=!0)}),!mt){var vt=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(kt){return kt(new rn(Pt,vt))})}}},Vt.prototype.clear=function(){var Pt=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var De=new rn(Pt,void 0,!0);_t(De),De.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(_t){var De=kt.markers[_t];kt.setCurrentMarker(kt.markers[_t]),kt._currentMarker.dispose(),kt.markerImage.removeChild(kt._currentMarker.container),kt.markers.splice(kt.markers.indexOf(kt._currentMarker),1),kt.eventListeners.markerdelete.forEach(function(on){return on(new rn(Pt,De))})},kt=this,Lt=this.markers.length-1;Lt>=0;Lt--)vt(Lt);this.addUndoStep()}},Object.defineProperty(Vt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Vt.prototype.showNotesEditor=function(){var Pt;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=(Pt=this._currentMarker.notes)!==null&&Pt!==void 0?Pt:"",this.overlayContainer.appendChild(this.notesArea))},Vt.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)},Vt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Vt.prototype.addUndoStep=function(){var Pt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),vt=this.undoRedoManager.getLastUndoStep();if(!vt||vt.width===mt.width&&vt.height===mt.height){var kt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),kt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Lt){return Lt(new tn(Pt))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Lt){return Lt(new tn(Pt))})}},Vt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Vt.prototype.undoStep=function(){var Pt=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new tn(Pt))}))},Vt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Vt.prototype.redoStep=function(){var Pt=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new tn(Pt))}))},Vt.prototype.stepZoom=function(){var Pt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Pt<this.zoomSteps.length-1?this.zoomSteps[Pt+1]:this.zoomSteps[0]},Vt.prototype.panTo=function(Pt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Pt.x,top:this.prevPanPoint.y-Pt.y}),this.prevPanPoint=Pt},Vt.prototype.startRenderAndClose=function(){return he(this,void 0,void 0,function(){var Pt,mt,vt=this;return xe(this,function(kt){switch(kt.label){case 0:return[4,this.render()];case 1:return Pt=kt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Lt){return Lt(new Me(vt,Pt,mt))}),this.close(!0),[2]}})})},Vt.prototype.getState=function(Pt){Pt===!0&&this.setCurrentMarker();var mt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(vt){return mt.markers.push(vt.getState())}),mt},Vt.prototype.restoreState=function(Pt){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Pt.markers.forEach(function(vt){var kt=mt._availableMarkerTypes.find(function(_t){return _t.typeName===vt.typeName});if(kt!==void 0){var Lt=mt.addNewMarker(kt);Lt.restoreState(vt),mt.markers.push(Lt)}}),Pt.width&&Pt.height&&(Pt.width!==this.imageWidth||Pt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Pt.width,this.imageHeight/Pt.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new tn(mt))})},Vt.prototype.addNewMarker=function(Pt){var mt=Ut.createGroup();return this.markerImage.appendChild(mt),new Pt(mt,this.overlayContainer,this.settings)},Vt.prototype.createNewMarker=function(Pt){var mt,vt=this;(mt=typeof Pt=="string"?this._availableMarkerTypes.find(function(kt){return kt.typeName===Pt}):Pt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(mt),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(mt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(kt){return kt(new rn(vt,vt._currentMarker))}))},Vt.prototype.markerCreated=function(Pt){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Pt),this.setCurrentMarker(Pt),Pt instanceof je&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(je):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new rn(mt,mt._currentMarker))})},Vt.prototype.colorChanged=function(Pt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Pt,this.settings.defaultStrokeColor=Pt)},Vt.prototype.fillColorChanged=function(Pt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Pt)},Vt.prototype.markerStateChanged=function(Pt){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new rn(mt,Pt))})},Vt.prototype.setCurrentMarker=function(Pt){var mt=this;this._currentMarker!==Pt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new rn(mt,mt._currentMarker))})),this._currentMarker=Pt,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(vt){return vt(new rn(mt,mt._currentMarker))}))},Vt.prototype.onPointerDown=function(Pt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Pt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Pt.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pt.clientX,Pt.clientY),Pt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Pt.clientX,y:Pt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pt.clientX,Pt.clientY))},Vt.prototype.onDblClick=function(Pt){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Pt.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Pt.clientX,Pt.clientY),Pt.target):this.setCurrentMarker()}},Vt.prototype.onPointerMove=function(Pt){this.touchPoints!==1&&Pt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Pt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Pt.clientX,Pt.clientY)):this.zoomLevel>1&&this.panTo({x:Pt.clientX,y:Pt.clientY}))},Vt.prototype.onPointerUp=function(Pt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Pt.clientX,Pt.clientY)),this.isDragging=!1,this.addUndoStep()},Vt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Vt.prototype.onKeyUp=function(Pt){this._currentMarker===void 0||this.notesArea!==void 0||Pt.key!=="Delete"&&Pt.key!=="Backspace"||this.deleteSelectedMarker()},Vt.prototype.clientToLocalCoordinates=function(Pt,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(Pt-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},Vt.prototype.onWindowResize=function(){this.positionUI()},Vt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Pt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Pt+"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()},Vt.prototype.addLicenseKey=function(Pt){jt.addKey(Pt)},Vt.prototype.addEventListener=function(Pt,mt){this.eventListeners.addEventListener(Pt,mt)},Vt.prototype.removeEventListener=function(Pt,mt){this.eventListeners.removeEventListener(Pt,mt)},Vt.prototype.renderState=function(Pt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Pt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Vt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Vt.prototype.focus=function(){var Pt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new tn(Pt))}))},Vt.prototype.blur=function(){var Pt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new tn(Pt))}))},Vt.instanceCounter=0,Vt}()},31457:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return rn}});var xt=Qt(4942),Yt=Qt(87462),he=Qt(71002),xe=Qt(1413),ge=Qt(97685),Ut=Qt(94184),jt=Qt.n(Ut),ne=Qt(67294);function Ae(Dn){var sn=ne.useRef();sn.current=Dn;var Vt=ne.useCallback(function(){for(var Pt,mt=arguments.length,vt=new Array(mt),kt=0;kt<mt;kt++)vt[kt]=arguments[kt];return(Pt=sn.current)===null||Pt===void 0?void 0:Pt.call.apply(Pt,[sn].concat(vt))},[]);return Vt}function se(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ke=se()?ne.useLayoutEffect:ne.useEffect,de=function(sn,Vt){var Pt=ne.useRef(!0);ke(function(){return sn(Pt.current)},Vt),ke(function(){return Pt.current=!1,function(){Pt.current=!0}},[])},Ie=function(sn,Vt){de(function(Pt){if(!Pt)return sn()},Vt)},Dt=null;function nt(Dn){var sn=ne.useRef(!1),Vt=ne.useState(Dn),Pt=(0,ge.Z)(Vt,2),mt=Pt[0],vt=Pt[1];ne.useEffect(function(){return sn.current=!1,function(){sn.current=!0}},[]);function kt(Lt,_t){_t&&sn.current||vt(Lt)}return[mt,kt]}function et(Dn){return Dn!==void 0}function ut(Dn,sn){var Vt=sn||{},Pt=Vt.defaultValue,mt=Vt.value,vt=Vt.onChange,kt=Vt.postState,Lt=nt(function(){return et(mt)?mt:et(Pt)?typeof Pt=="function"?Pt():Pt:typeof Dn=="function"?Dn():Dn}),_t=(0,ge.Z)(Lt,2),De=_t[0],on=_t[1],mn=mt!==void 0?mt:De,$e=kt?kt(mn):mn,Bn=Ae(vt),Re=nt([mn]),Mn=(0,ge.Z)(Re,2),Kn=Mn[0],Fi=Mn[1];Ie(function(){var sr=Kn[0];De!==sr&&Bn(De,sr)},[Kn]),Ie(function(){et(mt)||on(mt)},[mt]);var ti=Ae(function(sr,rr){on(sr,rr),Fi([mn],rr)});return[$e,ti]}var at={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(sn){var Vt=sn.keyCode;if(sn.altKey&&!sn.ctrlKey||sn.metaKey||Vt>=at.F1&&Vt<=at.F12)return!1;switch(Vt){case at.ALT:case at.CAPS_LOCK:case at.CONTEXT_MENU:case at.CTRL:case at.DOWN:case at.END:case at.ESC:case at.HOME:case at.INSERT:case at.LEFT:case at.MAC_FF_META:case at.META:case at.NUMLOCK:case at.NUM_CENTER:case at.PAGE_DOWN:case at.PAGE_UP:case at.PAUSE:case at.PRINT_SCREEN:case at.RIGHT:case at.SHIFT:case at.UP:case at.WIN_KEY:case at.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(sn){if(sn>=at.ZERO&&sn<=at.NINE||sn>=at.NUM_ZERO&&sn<=at.NUM_MULTIPLY||sn>=at.A&&sn<=at.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&sn===0)return!0;switch(sn){case at.SPACE:case at.QUESTION_MARK:case at.NUM_PLUS:case at.NUM_MINUS:case at.NUM_PERIOD:case at.NUM_DIVISION:case at.SEMICOLON:case at.DASH:case at.EQUALS:case at.COMMA:case at.PERIOD:case at.SLASH:case at.APOSTROPHE:case at.SINGLE_QUOTE:case at.OPEN_SQUARE_BRACKET:case at.BACKSLASH:case at.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ht=at,pt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,St=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,bt="".concat(pt," ").concat(St).split(/[\s\n]+/),Ot="aria-",Ht="data-";function Wt(Dn,sn){return Dn.indexOf(sn)===0}function re(Dn){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Vt;sn===!1?Vt={aria:!0,data:!0,attr:!0}:sn===!0?Vt={aria:!0}:Vt=(0,xe.Z)({},sn);var Pt={};return Object.keys(Dn).forEach(function(mt){(Vt.aria&&(mt==="role"||Wt(mt,Ot))||Vt.data&&Wt(mt,Ht)||Vt.attr&&bt.includes(mt))&&(Pt[mt]=Dn[mt])}),Pt}var te={},Ce=[],ce=function(sn){Ce.push(sn)};function Qe(Dn,sn){if(0)var Vt}function je(Dn,sn){if(0)var Vt}function He(){te={}}function Qn(Dn,sn,Vt){!sn&&!te[Vt]&&(Dn(!1,Vt),te[Vt]=!0)}function Gn(Dn,sn){Qn(Qe,Dn,sn)}function Yn(Dn,sn){Qn(je,Dn,sn)}Gn.preMessage=ce,Gn.resetWarned=He,Gn.noteOnce=Yn;var di=null,ie=Qt(81626),zt=[10,20,50,100],We=function(sn){var Vt=sn.pageSizeOptions,Pt=Vt===void 0?zt:Vt,mt=sn.locale,vt=sn.changeSize,kt=sn.pageSize,Lt=sn.goButton,_t=sn.quickGo,De=sn.rootPrefixCls,on=sn.disabled,mn=sn.buildOptionText,$e=sn.showSizeChanger,Bn=sn.sizeChangerRender,Re=ne.useState(""),Mn=(0,ge.Z)(Re,2),Kn=Mn[0],Fi=Mn[1],ti=function(){return!Kn||Number.isNaN(Kn)?void 0:Number(Kn)},sr=typeof mn=="function"?mn:function(Ii){return"".concat(Ii," ").concat(mt.items_per_page)},rr=function(br){Fi(br.target.value)},xi=function(br){Lt||Kn===""||(Fi(""),!(br.relatedTarget&&(br.relatedTarget.className.indexOf("".concat(De,"-item-link"))>=0||br.relatedTarget.className.indexOf("".concat(De,"-item"))>=0))&&(_t==null||_t(ti())))},wi=function(br){Kn!==""&&(br.keyCode===ht.ENTER||br.type==="click")&&(Fi(""),_t==null||_t(ti()))},Ir=function(){return Pt.some(function(br){return br.toString()===kt.toString()})?Pt:Pt.concat([kt]).sort(function(br,Sr){var Bo=Number.isNaN(Number(br))?0:Number(br),er=Number.isNaN(Number(Sr))?0:Number(Sr);return Bo-er})},ji="".concat(De,"-options");if(!$e&&!_t)return null;var yr=null,xr=null,Qr=null;return $e&&Bn&&(yr=Bn({disabled:on,size:kt,onSizeChange:function(br){vt==null||vt(Number(br))},"aria-label":mt.page_size,className:"".concat(ji,"-size-changer"),options:Ir().map(function(Ii){return{label:sr(Ii),value:Ii}})})),_t&&(Lt&&(Qr=typeof Lt=="boolean"?ne.createElement("button",{type:"button",onClick:wi,onKeyUp:wi,disabled:on,className:"".concat(ji,"-quick-jumper-button")},mt.jump_to_confirm):ne.createElement("span",{onClick:wi,onKeyUp:wi},Lt)),xr=ne.createElement("div",{className:"".concat(ji,"-quick-jumper")},mt.jump_to,ne.createElement("input",{disabled:on,type:"text",value:Kn,onChange:rr,onKeyUp:wi,onBlur:xi,"aria-label":mt.page}),mt.page,Qr)),ne.createElement("li",{className:ji},yr,xr)},En=We,Xn=function(sn){var Vt=sn.rootPrefixCls,Pt=sn.page,mt=sn.active,vt=sn.className,kt=sn.showTitle,Lt=sn.onClick,_t=sn.onKeyPress,De=sn.itemRender,on="".concat(Vt,"-item"),mn=jt()(on,"".concat(on,"-").concat(Pt),(0,xt.Z)((0,xt.Z)({},"".concat(on,"-active"),mt),"".concat(on,"-disabled"),!Pt),vt),$e=function(){Lt(Pt)},Bn=function(Kn){_t(Kn,Lt,Pt)},Re=De(Pt,"page",ne.createElement("a",{rel:"nofollow"},Pt));return Re?ne.createElement("li",{title:kt?String(Pt):null,className:mn,onClick:$e,onKeyDown:Bn,tabIndex:0},Re):null},Ve=Xn,In=function(sn,Vt,Pt){return Pt};function Hn(){}function li(Dn){var sn=Number(Dn);return typeof sn=="number"&&!Number.isNaN(sn)&&isFinite(sn)&&Math.floor(sn)===sn}function tn(Dn,sn,Vt){var Pt=typeof Dn=="undefined"?sn:Dn;return Math.floor((Vt-1)/Pt)+1}var Me=function(sn){var Vt=sn.prefixCls,Pt=Vt===void 0?"rc-pagination":Vt,mt=sn.selectPrefixCls,vt=mt===void 0?"rc-select":mt,kt=sn.className,Lt=sn.current,_t=sn.defaultCurrent,De=_t===void 0?1:_t,on=sn.total,mn=on===void 0?0:on,$e=sn.pageSize,Bn=sn.defaultPageSize,Re=Bn===void 0?10:Bn,Mn=sn.onChange,Kn=Mn===void 0?Hn:Mn,Fi=sn.hideOnSinglePage,ti=sn.align,sr=sn.showPrevNextJumpers,rr=sr===void 0?!0:sr,xi=sn.showQuickJumper,wi=sn.showLessItems,Ir=sn.showTitle,ji=Ir===void 0?!0:Ir,yr=sn.onShowSizeChange,xr=yr===void 0?Hn:yr,Qr=sn.locale,Ii=Qr===void 0?ie.Z:Qr,br=sn.style,Sr=sn.totalBoundaryShowSizeChanger,Bo=Sr===void 0?50:Sr,er=sn.disabled,Lo=sn.simple,ys=sn.showTotal,Mo=sn.showSizeChanger,Lr=Mo===void 0?mn>Bo:Mo,Pn=sn.sizeChangerRender,Mt=sn.pageSizeOptions,jn=sn.itemRender,kn=jn===void 0?In:jn,_n=sn.jumpPrevIcon,Wn=sn.jumpNextIcon,qn=sn.prevIcon,ui=sn.nextIcon,Wi=ne.useRef(null),en=ut(10,{value:$e,defaultValue:Re}),Je=(0,ge.Z)(en,2),be=Je[0],un=Je[1],fi=ut(1,{value:Lt,defaultValue:De,postState:function(cr){return Math.max(1,Math.min(cr,tn(void 0,be,mn)))}}),mi=(0,ge.Z)(fi,2),ri=mi[0],ee=mi[1],Cn=ne.useState(ri),Ti=(0,ge.Z)(Cn,2),Xi=Ti[0],On=Ti[1];(0,ne.useEffect)(function(){On(ri)},[ri]);var Ge=Kn!==Hn,Si="current"in sn,Zi=Math.max(1,ri-(wi?3:5)),ur=Math.min(tn(void 0,be,mn),ri+(wi?3:5));function Ln(ln,cr){var Wr=ln||ne.createElement("button",{type:"button","aria-label":cr,className:"".concat(Pt,"-item-link")});return typeof ln=="function"&&(Wr=ne.createElement(ln,(0,xe.Z)({},sn))),Wr}function Ui(ln){var cr=ln.target.value,Wr=tn(void 0,be,mn),Ko;return cr===""?Ko=cr:Number.isNaN(Number(cr))?Ko=Xi:cr>=Wr?Ko=Wr:Ko=Number(cr),Ko}function pe(ln){return li(ln)&&ln!==ri&&li(mn)&&mn>0}var Fe=mn>be?xi:!1;function Ke(ln){(ln.keyCode===ht.UP||ln.keyCode===ht.DOWN)&&ln.preventDefault()}function ve(ln){var cr=Ui(ln);switch(cr!==Xi&&On(cr),ln.keyCode){case ht.ENTER:Sn(cr);break;case ht.UP:Sn(cr-1);break;case ht.DOWN:Sn(cr+1);break;default:break}}function Ee(ln){Sn(Ui(ln))}function _e(ln){var cr=tn(ln,be,mn),Wr=ri>cr&&cr!==0?cr:ri;un(ln),On(Wr),xr==null||xr(ri,ln),ee(Wr),Kn==null||Kn(Wr,ln)}function Sn(ln){if(pe(ln)&&!er){var cr=tn(void 0,be,mn),Wr=ln;return ln>cr?Wr=cr:ln<1&&(Wr=1),Wr!==Xi&&On(Wr),ee(Wr),Kn==null||Kn(Wr,be),Wr}return ri}var ei=ri>1,Xe=ri<tn(void 0,be,mn);function Fn(){ei&&Sn(ri-1)}function si(){Xe&&Sn(ri+1)}function Gi(){Sn(Zi)}function Ji(){Sn(ur)}function Te(ln,cr){if(ln.key==="Enter"||ln.charCode===ht.ENTER||ln.keyCode===ht.ENTER){for(var Wr=arguments.length,Ko=new Array(Wr>2?Wr-2:0),Go=2;Go<Wr;Go++)Ko[Go-2]=arguments[Go];cr.apply(void 0,Ko)}}function Mi(ln){Te(ln,Fn)}function Ri(ln){Te(ln,si)}function yi(ln){Te(ln,Gi)}function Nr(ln){Te(ln,Ji)}function qi(ln){var cr=kn(ln,"prev",Ln(qn,"prev page"));return ne.isValidElement(cr)?ne.cloneElement(cr,{disabled:!ei}):cr}function ci(ln){var cr=kn(ln,"next",Ln(ui,"next page"));return ne.isValidElement(cr)?ne.cloneElement(cr,{disabled:!Xe}):cr}function Bi(ln){(ln.type==="click"||ln.keyCode===ht.ENTER)&&Sn(Xi)}var Qi=null,Ar=re(sn,{aria:!0,data:!0}),cn=ys&&ne.createElement("li",{className:"".concat(Pt,"-total-text")},ys(mn,[mn===0?0:(ri-1)*be+1,ri*be>mn?mn:ri*be])),$i=null,dn=tn(void 0,be,mn);if(Fi&&mn<=be)return null;var or=[],is={rootPrefixCls:Pt,onClick:Sn,onKeyPress:Te,showTitle:ji,itemRender:kn,page:-1},qr=ri-1>0?ri-1:0,rs=ri+1<dn?ri+1:dn,ro=xi&&xi.goButton,Ur=(0,he.Z)(Lo)==="object"?Lo.readOnly:!Lo,Or=ro,Wo=null;Lo&&(ro&&(typeof ro=="boolean"?Or=ne.createElement("button",{type:"button",onClick:Bi,onKeyUp:Bi},Ii.jump_to_confirm):Or=ne.createElement("span",{onClick:Bi,onKeyUp:Bi},ro),Or=ne.createElement("li",{title:ji?"".concat(Ii.jump_to).concat(ri,"/").concat(dn):null,className:"".concat(Pt,"-simple-pager")},Or)),Wo=ne.createElement("li",{title:ji?"".concat(ri,"/").concat(dn):null,className:"".concat(Pt,"-simple-pager")},Ur?Xi:ne.createElement("input",{type:"text","aria-label":Ii.jump_to,value:Xi,disabled:er,onKeyDown:Ke,onKeyUp:ve,onChange:ve,onBlur:Ee,size:3}),ne.createElement("span",{className:"".concat(Pt,"-slash")},"/"),dn));var oo=wi?1:2;if(dn<=3+oo*2){dn||or.push(ne.createElement(Ve,(0,Yt.Z)({},is,{key:"noPager",page:1,className:"".concat(Pt,"-item-disabled")})));for(var hi=1;hi<=dn;hi+=1)or.push(ne.createElement(Ve,(0,Yt.Z)({},is,{key:hi,page:hi,active:ri===hi})))}else{var Xt=wi?Ii.prev_3:Ii.prev_5,An=wi?Ii.next_3:Ii.next_5,_s=kn(Zi,"jump-prev",Ln(_n,"prev page")),xs=kn(ur,"jump-next",Ln(Wn,"next page"));rr&&(Qi=_s?ne.createElement("li",{title:ji?Xt:null,key:"prev",onClick:Gi,tabIndex:0,onKeyDown:yi,className:jt()("".concat(Pt,"-jump-prev"),(0,xt.Z)({},"".concat(Pt,"-jump-prev-custom-icon"),!!_n))},_s):null,$i=xs?ne.createElement("li",{title:ji?An:null,key:"next",onClick:Ji,tabIndex:0,onKeyDown:Nr,className:jt()("".concat(Pt,"-jump-next"),(0,xt.Z)({},"".concat(Pt,"-jump-next-custom-icon"),!!Wn))},xs):null);var Xo=Math.max(1,ri-oo),Ms=Math.min(ri+oo,dn);ri-1<=oo&&(Ms=1+oo*2),dn-ri<=oo&&(Xo=dn-oo*2);for(var pa=Xo;pa<=Ms;pa+=1)or.push(ne.createElement(Ve,(0,Yt.Z)({},is,{key:pa,page:pa,active:ri===pa})));if(ri-1>=oo*2&&ri!==3&&(or[0]=ne.cloneElement(or[0],{className:jt()("".concat(Pt,"-item-after-jump-prev"),or[0].props.className)}),or.unshift(Qi)),dn-ri>=oo*2&&ri!==dn-2){var _a=or[or.length-1];or[or.length-1]=ne.cloneElement(_a,{className:jt()("".concat(Pt,"-item-before-jump-next"),_a.props.className)}),or.push($i)}Xo!==1&&or.unshift(ne.createElement(Ve,(0,Yt.Z)({},is,{key:1,page:1}))),Ms!==dn&&or.push(ne.createElement(Ve,(0,Yt.Z)({},is,{key:dn,page:dn})))}var ma=qi(qr);if(ma){var ki=!ei||!dn;ma=ne.createElement("li",{title:ji?Ii.prev_page:null,onClick:Fn,tabIndex:ki?null:0,onKeyDown:Mi,className:jt()("".concat(Pt,"-prev"),(0,xt.Z)({},"".concat(Pt,"-disabled"),ki)),"aria-disabled":ki},ma)}var Tr=ci(rs);if(Tr){var Oi,bi;Lo?(Oi=!Xe,bi=ei?0:null):(Oi=!Xe||!dn,bi=Oi?null:0),Tr=ne.createElement("li",{title:ji?Ii.next_page:null,onClick:si,tabIndex:bi,onKeyDown:Ri,className:jt()("".concat(Pt,"-next"),(0,xt.Z)({},"".concat(Pt,"-disabled"),Oi)),"aria-disabled":Oi},Tr)}var hr=jt()(Pt,kt,(0,xt.Z)((0,xt.Z)((0,xt.Z)((0,xt.Z)((0,xt.Z)({},"".concat(Pt,"-start"),ti==="start"),"".concat(Pt,"-center"),ti==="center"),"".concat(Pt,"-end"),ti==="end"),"".concat(Pt,"-simple"),Lo),"".concat(Pt,"-disabled"),er));return ne.createElement("ul",(0,Yt.Z)({className:hr,style:br,ref:Wi},Ar),cn,ma,Lo?Wo:or,Tr,ne.createElement(En,{locale:Ii,rootPrefixCls:Pt,disabled:er,selectPrefixCls:vt,changeSize:_e,pageSize:be,pageSizeOptions:Mt,quickGo:Fe?Sn:null,goButton:Or,showSizeChanger:Lr,sizeChangerRender:Pn}))},rn=Me},43579:function(gn,ze,Qt){"use strict";Qt.d(ze,{Cd:function(){return Ce}});var xt=Qt(87462),Yt=Qt(1413),he=Qt(45987),xe=Qt(67294),ge=Qt(94184),Ut=Qt.n(ge),jt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ne=function(){var je=(0,xe.useRef)([]),He=(0,xe.useRef)(null);return(0,xe.useEffect)(function(){var Qn=Date.now(),Gn=!1;je.current.forEach(function(Yn){if(Yn){Gn=!0;var di=Yn.style;di.transitionDuration=".3s, .3s, .3s, .06s",He.current&&Qn-He.current<100&&(di.transitionDuration="0s, 0s")}}),Gn&&(He.current=Date.now())}),je.current},Ae=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],se=function(je){var He=(0,Yt.Z)((0,Yt.Z)({},jt),je),Qn=He.className,Gn=He.percent,Yn=He.prefixCls,di=He.strokeColor,ie=He.strokeLinecap,zt=He.strokeWidth,We=He.style,En=He.trailColor,Xn=He.trailWidth,Ve=He.transition,In=(0,he.Z)(He,Ae);delete In.gapPosition;var Hn=Array.isArray(Gn)?Gn:[Gn],li=Array.isArray(di)?di:[di],tn=ne(),Me=zt/2,rn=100-zt/2,Dn="M ".concat(ie==="round"?Me:0,",").concat(Me,`
L `).concat(ie==="round"?rn:100,",").concat(Me),sn="0 0 100 ".concat(zt),Vt=0;return xe.createElement("svg",(0,xt.Z)({className:Ut()("".concat(Yn,"-line"),Qn),viewBox:sn,preserveAspectRatio:"none",style:We},In),xe.createElement("path",{className:"".concat(Yn,"-line-trail"),d:Dn,strokeLinecap:ie,stroke:En,strokeWidth:Xn||zt,fillOpacity:"0"}),Hn.map(function(Pt,mt){var vt=1;switch(ie){case"round":vt=1-zt/100;break;case"square":vt=1-zt/2/100;break;default:vt=1;break}var kt={strokeDasharray:"".concat(Pt*vt,"px, 100px"),strokeDashoffset:"-".concat(Vt,"px"),transition:Ve||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Lt=li[mt]||li[li.length-1];return Vt+=Pt,xe.createElement("path",{key:mt,className:"".concat(Yn,"-line-path"),d:Dn,strokeLinecap:ie,stroke:Lt,strokeWidth:zt,fillOpacity:"0",ref:function(De){tn[mt]=De},style:kt})}))},ke=se,de=Qt(71002),Ie=Qt(97685),Dt=Qt(98924),nt=0,et=(0,Dt.Z)();function ut(){var Qe;return et?(Qe=nt,nt+=1):Qe="TEST_OR_SSR",Qe}var at=function(Qe){var je=xe.useState(),He=(0,Ie.Z)(je,2),Qn=He[0],Gn=He[1];return xe.useEffect(function(){Gn("rc_progress_".concat(ut()))},[]),Qe||Qn},ht=function(je){var He=je.bg,Qn=je.children;return xe.createElement("div",{style:{width:"100%",height:"100%",background:He}},Qn)};function pt(Qe,je){return Object.keys(Qe).map(function(He){var Qn=parseFloat(He),Gn="".concat(Math.floor(Qn*je),"%");return"".concat(Qe[He]," ").concat(Gn)})}var St=xe.forwardRef(function(Qe,je){var He=Qe.prefixCls,Qn=Qe.color,Gn=Qe.gradientId,Yn=Qe.radius,di=Qe.style,ie=Qe.ptg,zt=Qe.strokeLinecap,We=Qe.strokeWidth,En=Qe.size,Xn=Qe.gapDegree,Ve=Qn&&(0,de.Z)(Qn)==="object",In=Ve?"#FFF":void 0,Hn=En/2,li=xe.createElement("circle",{className:"".concat(He,"-circle-path"),r:Yn,cx:Hn,cy:Hn,stroke:In,strokeLinecap:zt,strokeWidth:We,opacity:ie===0?0:1,style:di,ref:je});if(!Ve)return li;var tn="".concat(Gn,"-conic"),Me=Xn?"".concat(180+Xn/2,"deg"):"0deg",rn=pt(Qn,(360-Xn)/360),Dn=pt(Qn,1),sn="conic-gradient(from ".concat(Me,", ").concat(rn.join(", "),")"),Vt="linear-gradient(to ".concat(Xn?"bottom":"top",", ").concat(Dn.join(", "),")");return xe.createElement(xe.Fragment,null,xe.createElement("mask",{id:tn},li),xe.createElement("foreignObject",{x:0,y:0,width:En,height:En,mask:"url(#".concat(tn,")")},xe.createElement(ht,{bg:Vt},xe.createElement(ht,{bg:sn}))))}),bt=St,Ot=100,Ht=function(je,He,Qn,Gn,Yn,di,ie,zt,We,En){var Xn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ve=Qn/100*360*((360-di)/360),In=di===0?0:{bottom:0,top:180,left:90,right:-90}[ie],Hn=(100-Gn)/100*He;We==="round"&&Gn!==100&&(Hn+=En/2,Hn>=He&&(Hn=He-.01));var li=Ot/2;return{stroke:typeof zt=="string"?zt:void 0,strokeDasharray:"".concat(He,"px ").concat(je),strokeDashoffset:Hn+Xn,transform:"rotate(".concat(Yn+Ve+In,"deg)"),transformOrigin:"".concat(li,"px ").concat(li,"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}},Wt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function re(Qe){var je=Qe!=null?Qe:[];return Array.isArray(je)?je:[je]}var te=function(je){var He=(0,Yt.Z)((0,Yt.Z)({},jt),je),Qn=He.id,Gn=He.prefixCls,Yn=He.steps,di=He.strokeWidth,ie=He.trailWidth,zt=He.gapDegree,We=zt===void 0?0:zt,En=He.gapPosition,Xn=He.trailColor,Ve=He.strokeLinecap,In=He.style,Hn=He.className,li=He.strokeColor,tn=He.percent,Me=(0,he.Z)(He,Wt),rn=Ot/2,Dn=at(Qn),sn="".concat(Dn,"-gradient"),Vt=rn-di/2,Pt=Math.PI*2*Vt,mt=We>0?90+We/2:-90,vt=Pt*((360-We)/360),kt=(0,de.Z)(Yn)==="object"?Yn:{count:Yn,gap:2},Lt=kt.count,_t=kt.gap,De=re(tn),on=re(li),mn=on.find(function(ti){return ti&&(0,de.Z)(ti)==="object"}),$e=mn&&(0,de.Z)(mn)==="object",Bn=$e?"butt":Ve,Re=Ht(Pt,vt,0,100,mt,We,En,Xn,Bn,di),Mn=ne(),Kn=function(){var sr=0;return De.map(function(rr,xi){var wi=on[xi]||on[on.length-1],Ir=Ht(Pt,vt,sr,rr,mt,We,En,wi,Bn,di);return sr+=rr,xe.createElement(bt,{key:xi,color:wi,ptg:rr,radius:Vt,prefixCls:Gn,gradientId:sn,style:Ir,strokeLinecap:Bn,strokeWidth:di,gapDegree:We,ref:function(yr){Mn[xi]=yr},size:Ot})}).reverse()},Fi=function(){var sr=Math.round(Lt*(De[0]/100)),rr=100/Lt,xi=0;return new Array(Lt).fill(null).map(function(wi,Ir){var ji=Ir<=sr-1?on[0]:Xn,yr=ji&&(0,de.Z)(ji)==="object"?"url(#".concat(sn,")"):void 0,xr=Ht(Pt,vt,xi,rr,mt,We,En,ji,"butt",di,_t);return xi+=(vt-xr.strokeDashoffset+_t)*100/vt,xe.createElement("circle",{key:Ir,className:"".concat(Gn,"-circle-path"),r:Vt,cx:rn,cy:rn,stroke:yr,strokeWidth:di,opacity:1,style:xr,ref:function(Ii){Mn[Ir]=Ii}})})};return xe.createElement("svg",(0,xt.Z)({className:Ut()("".concat(Gn,"-circle"),Hn),viewBox:"0 0 ".concat(Ot," ").concat(Ot),style:In,id:Qn,role:"presentation"},Me),!Lt&&xe.createElement("circle",{className:"".concat(Gn,"-circle-trail"),r:Vt,cx:rn,cy:rn,stroke:Xn,strokeLinecap:Bn,strokeWidth:ie||di,style:Re}),Lt?Fi():Kn())},Ce=te,ce={Line:ke,Circle:Ce}},71032:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var xt=Qt(87462),Yt=Qt(4942),he=Qt(97685),xe=Qt(45987),ge=Qt(94184),Ut=Qt.n(ge),jt=Qt(21770),ne=Qt(15105),Ae=Qt(64217),se=Qt(67294);function ke(St,bt){var Ot=St.disabled,Ht=St.prefixCls,Wt=St.character,re=St.characterRender,te=St.index,Ce=St.count,ce=St.value,Qe=St.allowHalf,je=St.focused,He=St.onHover,Qn=St.onClick,Gn=function(Ve){He(Ve,te)},Yn=function(Ve){Qn(Ve,te)},di=function(Ve){Ve.keyCode===ne.Z.ENTER&&Qn(Ve,te)},ie=te+1,zt=new Set([Ht]);ce===0&&te===0&&je?zt.add("".concat(Ht,"-focused")):Qe&&ce+.5>=ie&&ce<ie?(zt.add("".concat(Ht,"-half")),zt.add("".concat(Ht,"-active")),je&&zt.add("".concat(Ht,"-focused"))):(ie<=ce?zt.add("".concat(Ht,"-full")):zt.add("".concat(Ht,"-zero")),ie===ce&&je&&zt.add("".concat(Ht,"-focused")));var We=typeof Wt=="function"?Wt(St):Wt,En=se.createElement("li",{className:Ut()(Array.from(zt)),ref:bt},se.createElement("div",{onClick:Ot?null:Yn,onKeyDown:Ot?null:di,onMouseMove:Ot?null:Gn,role:"radio","aria-checked":ce>te?"true":"false","aria-posinset":te+1,"aria-setsize":Ce,tabIndex:Ot?-1:0},se.createElement("div",{className:"".concat(Ht,"-first")},We),se.createElement("div",{className:"".concat(Ht,"-second")},We)));return re&&(En=re(En,St)),En}var de=se.forwardRef(ke);function Ie(){var St=se.useRef({});function bt(Ht){return St.current[Ht]}function Ot(Ht){return function(Wt){St.current[Ht]=Wt}}return[bt,Ot]}function Dt(St){var bt=St.pageXOffset,Ot="scrollLeft";if(typeof bt!="number"){var Ht=St.document;bt=Ht.documentElement[Ot],typeof bt!="number"&&(bt=Ht.body[Ot])}return bt}function nt(St){var bt,Ot,Ht=St.ownerDocument,Wt=Ht.body,re=Ht&&Ht.documentElement,te=St.getBoundingClientRect();return bt=te.left,Ot=te.top,bt-=re.clientLeft||Wt.clientLeft||0,Ot-=re.clientTop||Wt.clientTop||0,{left:bt,top:Ot}}function et(St){var bt=nt(St),Ot=St.ownerDocument,Ht=Ot.defaultView||Ot.parentWindow;return bt.left+=Dt(Ht),bt.left}var ut=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function at(St,bt){var Ot=St.prefixCls,Ht=Ot===void 0?"rc-rate":Ot,Wt=St.className,re=St.defaultValue,te=St.value,Ce=St.count,ce=Ce===void 0?5:Ce,Qe=St.allowHalf,je=Qe===void 0?!1:Qe,He=St.allowClear,Qn=He===void 0?!0:He,Gn=St.keyboard,Yn=Gn===void 0?!0:Gn,di=St.character,ie=di===void 0?"\u2605":di,zt=St.characterRender,We=St.disabled,En=St.direction,Xn=En===void 0?"ltr":En,Ve=St.tabIndex,In=Ve===void 0?0:Ve,Hn=St.autoFocus,li=St.onHoverChange,tn=St.onChange,Me=St.onFocus,rn=St.onBlur,Dn=St.onKeyDown,sn=St.onMouseLeave,Vt=(0,xe.Z)(St,ut),Pt=Ie(),mt=(0,he.Z)(Pt,2),vt=mt[0],kt=mt[1],Lt=se.useRef(null),_t=function(){if(!We){var Lr;(Lr=Lt.current)===null||Lr===void 0||Lr.focus()}};se.useImperativeHandle(bt,function(){return{focus:_t,blur:function(){if(!We){var Lr;(Lr=Lt.current)===null||Lr===void 0||Lr.blur()}}}});var De=(0,jt.Z)(re||0,{value:te}),on=(0,he.Z)(De,2),mn=on[0],$e=on[1],Bn=(0,jt.Z)(null),Re=(0,he.Z)(Bn,2),Mn=Re[0],Kn=Re[1],Fi=function(Lr,Pn){var Mt=Xn==="rtl",jn=Lr+1;if(je){var kn=vt(Lr),_n=et(kn),Wn=kn.clientWidth;(Mt&&Pn-_n>Wn/2||!Mt&&Pn-_n<Wn/2)&&(jn-=.5)}return jn},ti=function(Lr){$e(Lr),tn==null||tn(Lr)},sr=se.useState(!1),rr=(0,he.Z)(sr,2),xi=rr[0],wi=rr[1],Ir=function(){wi(!0),Me==null||Me()},ji=function(){wi(!1),rn==null||rn()},yr=se.useState(null),xr=(0,he.Z)(yr,2),Qr=xr[0],Ii=xr[1],br=function(Lr,Pn){var Mt=Fi(Pn,Lr.pageX);Mt!==Mn&&(Ii(Mt),Kn(null)),li==null||li(Mt)},Sr=function(Lr){We||(Ii(null),Kn(null),li==null||li(void 0)),Lr&&(sn==null||sn(Lr))},Bo=function(Lr,Pn){var Mt=Fi(Pn,Lr.pageX),jn=!1;Qn&&(jn=Mt===mn),Sr(),ti(jn?0:Mt),Kn(jn?Mt:null)},er=function(Lr){var Pn=Lr.keyCode,Mt=Xn==="rtl",jn=je?.5:1;Yn&&(Pn===ne.Z.RIGHT&&mn<ce&&!Mt?(ti(mn+jn),Lr.preventDefault()):Pn===ne.Z.LEFT&&mn>0&&!Mt||Pn===ne.Z.RIGHT&&mn>0&&Mt?(ti(mn-jn),Lr.preventDefault()):Pn===ne.Z.LEFT&&mn<ce&&Mt&&(ti(mn+jn),Lr.preventDefault())),Dn==null||Dn(Lr)};se.useEffect(function(){Hn&&!We&&_t()},[]);var Lo=new Array(ce).fill(0).map(function(Mo,Lr){return se.createElement(de,{ref:kt(Lr),index:Lr,count:ce,disabled:We,prefixCls:"".concat(Ht,"-star"),allowHalf:je,value:Qr===null?mn:Qr,onClick:Bo,onHover:br,key:Mo||Lr,character:ie,characterRender:zt,focused:xi})}),ys=Ut()(Ht,Wt,(0,Yt.Z)((0,Yt.Z)({},"".concat(Ht,"-disabled"),We),"".concat(Ht,"-rtl"),Xn==="rtl"));return se.createElement("ul",(0,xt.Z)({className:ys,onMouseLeave:Sr,tabIndex:We?-1:In,onFocus:We?null:Ir,onBlur:We?null:ji,onKeyDown:We?null:er,ref:Lt},(0,Ae.Z)(Vt,{aria:!0,data:!0,attr:!0})),Lo)}var ht=se.forwardRef(at),pt=ht},58212:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return di}});function xt(){return xt=Object.assign?Object.assign.bind():function(ie){for(var zt=1;zt<arguments.length;zt++){var We=arguments[zt];for(var En in We)Object.prototype.hasOwnProperty.call(We,En)&&(ie[En]=We[En])}return ie},xt.apply(this,arguments)}function Yt(ie){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(zt){return typeof zt}:function(zt){return zt&&typeof Symbol=="function"&&zt.constructor===Symbol&&zt!==Symbol.prototype?"symbol":typeof zt},Yt(ie)}function he(ie,zt){if(Yt(ie)!=="object"||ie===null)return ie;var We=ie[Symbol.toPrimitive];if(We!==void 0){var En=We.call(ie,zt||"default");if(Yt(En)!=="object")return En;throw new TypeError("@@toPrimitive must return a primitive value.")}return(zt==="string"?String:Number)(ie)}function xe(ie){var zt=he(ie,"string");return Yt(zt)==="symbol"?zt:String(zt)}function ge(ie,zt,We){return zt=xe(zt),zt in ie?Object.defineProperty(ie,zt,{value:We,enumerable:!0,configurable:!0,writable:!0}):ie[zt]=We,ie}function Ut(ie){if(Array.isArray(ie))return ie}function jt(ie,zt){var We=ie==null?null:typeof Symbol!="undefined"&&ie[Symbol.iterator]||ie["@@iterator"];if(We!=null){var En,Xn,Ve,In,Hn=[],li=!0,tn=!1;try{if(Ve=(We=We.call(ie)).next,zt===0){if(Object(We)!==We)return;li=!1}else for(;!(li=(En=Ve.call(We)).done)&&(Hn.push(En.value),Hn.length!==zt);li=!0);}catch(Me){tn=!0,Xn=Me}finally{try{if(!li&&We.return!=null&&(In=We.return(),Object(In)!==In))return}finally{if(tn)throw Xn}}return Hn}}function ne(ie,zt){(zt==null||zt>ie.length)&&(zt=ie.length);for(var We=0,En=new Array(zt);We<zt;We++)En[We]=ie[We];return En}function Ae(ie,zt){if(ie){if(typeof ie=="string")return ne(ie,zt);var We=Object.prototype.toString.call(ie).slice(8,-1);if(We==="Object"&&ie.constructor&&(We=ie.constructor.name),We==="Map"||We==="Set")return Array.from(ie);if(We==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(We))return ne(ie,zt)}}function se(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(ie,zt){return Ut(ie)||jt(ie,zt)||Ae(ie,zt)||se()}function de(ie,zt){if(ie==null)return{};var We={},En=Object.keys(ie),Xn,Ve;for(Ve=0;Ve<En.length;Ve++)Xn=En[Ve],!(zt.indexOf(Xn)>=0)&&(We[Xn]=ie[Xn]);return We}function Ie(ie,zt){if(ie==null)return{};var We=de(ie,zt),En,Xn;if(Object.getOwnPropertySymbols){var Ve=Object.getOwnPropertySymbols(ie);for(Xn=0;Xn<Ve.length;Xn++)En=Ve[Xn],!(zt.indexOf(En)>=0)&&Object.prototype.propertyIsEnumerable.call(ie,En)&&(We[En]=ie[En])}return We}var Dt=Qt(67294),nt=Qt(94184),et=Qt.n(nt);function ut(ie){if(Array.isArray(ie))return ie}function at(ie,zt){var We=ie==null?null:typeof Symbol!="undefined"&&ie[Symbol.iterator]||ie["@@iterator"];if(We!=null){var En,Xn,Ve,In,Hn=[],li=!0,tn=!1;try{if(Ve=(We=We.call(ie)).next,zt===0){if(Object(We)!==We)return;li=!1}else for(;!(li=(En=Ve.call(We)).done)&&(Hn.push(En.value),Hn.length!==zt);li=!0);}catch(Me){tn=!0,Xn=Me}finally{try{if(!li&&We.return!=null&&(In=We.return(),Object(In)!==In))return}finally{if(tn)throw Xn}}return Hn}}function ht(ie,zt){(zt==null||zt>ie.length)&&(zt=ie.length);for(var We=0,En=new Array(zt);We<zt;We++)En[We]=ie[We];return En}function pt(ie,zt){if(ie){if(typeof ie=="string")return ht(ie,zt);var We=Object.prototype.toString.call(ie).slice(8,-1);if(We==="Object"&&ie.constructor&&(We=ie.constructor.name),We==="Map"||We==="Set")return Array.from(ie);if(We==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(We))return ht(ie,zt)}}function St(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bt(ie,zt){return ut(ie)||at(ie,zt)||pt(ie,zt)||St()}function Ot(ie){var zt=Dt.useRef();zt.current=ie;var We=Dt.useCallback(function(){for(var En,Xn=arguments.length,Ve=new Array(Xn),In=0;In<Xn;In++)Ve[In]=arguments[In];return(En=zt.current)===null||En===void 0?void 0:En.call.apply(En,[zt].concat(Ve))},[]);return We}function Ht(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Wt=Ht()?Dt.useLayoutEffect:Dt.useEffect,re=function(zt,We){var En=Dt.useRef(!0);Wt(function(){return zt(En.current)},We),Wt(function(){return En.current=!1,function(){En.current=!0}},[])},te=function(zt,We){re(function(En){if(!En)return zt()},We)},Ce=null;function ce(ie){var zt=Dt.useRef(!1),We=Dt.useState(ie),En=bt(We,2),Xn=En[0],Ve=En[1];Dt.useEffect(function(){return zt.current=!1,function(){zt.current=!0}},[]);function In(Hn,li){li&&zt.current||Ve(Hn)}return[Xn,In]}function Qe(ie){return ie!==void 0}function je(ie,zt){var We=zt||{},En=We.defaultValue,Xn=We.value,Ve=We.onChange,In=We.postState,Hn=ce(function(){return Qe(Xn)?Xn:Qe(En)?typeof En=="function"?En():En:typeof ie=="function"?ie():ie}),li=bt(Hn,2),tn=li[0],Me=li[1],rn=Xn!==void 0?Xn:tn,Dn=In?In(rn):rn,sn=Ot(Ve),Vt=ce([rn]),Pt=bt(Vt,2),mt=Pt[0],vt=Pt[1];te(function(){var Lt=mt[0];tn!==Lt&&sn(tn,Lt)},[mt]),te(function(){Qe(Xn)||Me(Xn)},[Xn]);var kt=Ot(function(Lt,_t){Me(Lt,_t),vt([rn],_t)});return[Dn,kt]}var He={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(zt){var We=zt.keyCode;if(zt.altKey&&!zt.ctrlKey||zt.metaKey||We>=He.F1&&We<=He.F12)return!1;switch(We){case He.ALT:case He.CAPS_LOCK:case He.CONTEXT_MENU:case He.CTRL:case He.DOWN:case He.END:case He.ESC:case He.HOME:case He.INSERT:case He.LEFT:case He.MAC_FF_META:case He.META:case He.NUMLOCK:case He.NUM_CENTER:case He.PAGE_DOWN:case He.PAGE_UP:case He.PAUSE:case He.PRINT_SCREEN:case He.RIGHT:case He.SHIFT:case He.UP:case He.WIN_KEY:case He.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(zt){if(zt>=He.ZERO&&zt<=He.NINE||zt>=He.NUM_ZERO&&zt<=He.NUM_MULTIPLY||zt>=He.A&&zt<=He.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&zt===0)return!0;switch(zt){case He.SPACE:case He.QUESTION_MARK:case He.NUM_PLUS:case He.NUM_MINUS:case He.NUM_PERIOD:case He.NUM_DIVISION:case He.SEMICOLON:case He.DASH:case He.EQUALS:case He.COMMA:case He.PERIOD:case He.SLASH:case He.APOSTROPHE:case He.SINGLE_QUOTE:case He.OPEN_SQUARE_BRACKET:case He.BACKSLASH:case He.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Qn=He,Gn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Yn=Dt.forwardRef(function(ie,zt){var We,En=ie.prefixCls,Xn=En===void 0?"rc-switch":En,Ve=ie.className,In=ie.checked,Hn=ie.defaultChecked,li=ie.disabled,tn=ie.loadingIcon,Me=ie.checkedChildren,rn=ie.unCheckedChildren,Dn=ie.onClick,sn=ie.onChange,Vt=ie.onKeyDown,Pt=Ie(ie,Gn),mt=je(!1,{value:In,defaultValue:Hn}),vt=ke(mt,2),kt=vt[0],Lt=vt[1];function _t($e,Bn){var Re=kt;return li||(Re=$e,Lt(Re),sn==null||sn(Re,Bn)),Re}function De($e){$e.which===Qn.LEFT?_t(!1,$e):$e.which===Qn.RIGHT&&_t(!0,$e),Vt==null||Vt($e)}function on($e){var Bn=_t(!kt,$e);Dn==null||Dn(Bn,$e)}var mn=et()(Xn,Ve,(We={},ge(We,"".concat(Xn,"-checked"),kt),ge(We,"".concat(Xn,"-disabled"),li),We));return Dt.createElement("button",xt({},Pt,{type:"button",role:"switch","aria-checked":kt,disabled:li,className:mn,ref:zt,onKeyDown:De,onClick:on}),tn,Dt.createElement("span",{className:"".concat(Xn,"-inner")},Dt.createElement("span",{className:"".concat(Xn,"-inner-checked")},Me),Dt.createElement("span",{className:"".concat(Xn,"-inner-unchecked")},rn)))});Yn.displayName="Switch";var di=Yn},45233:function(gn,ze,Qt){"use strict";Qt.d(ze,{R:function(){return Yt},w:function(){return xt}});var xt={},Yt="rc-table-internal-hook"},54768:function(gn,ze,Qt){"use strict";Qt.d(ze,{L:function(){return ut},Z:function(){return bt}});var xt=Qt(97685),Yt=Qt(4942),he=Qt(74902),xe=Qt(71002),ge=Qt(1413),Ut=Qt(45987),jt=Qt(63295),ne=Qt(67294);function Ae(Ot){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Wt=[];return ne.Children.forEach(Ot,function(re){re==null&&!Ht.keepEmpty||(Array.isArray(re)?Wt=Wt.concat(Ae(re)):(0,jt.Z)(re)&&re.props?Wt=Wt.concat(Ae(re.props.children,Ht)):Wt.push(re))}),Wt}var se=Qt(40830),ke=Qt(45233),de=Qt(62978);function Ie(Ot){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ht=="number"?Ht:Ht.endsWith("%")?Ot*parseFloat(Ht)/100:null}function Dt(Ot,Ht,Wt){return ne.useMemo(function(){if(Ht&&Ht>0){var re=0,te=0;Ot.forEach(function(Yn){var di=Ie(Ht,Yn.width);di?re+=di:te+=1});var Ce=Math.max(Ht,Wt),ce=Math.max(Ce-re,te),Qe=te,je=ce/te,He=0,Qn=Ot.map(function(Yn){var di=(0,ge.Z)({},Yn),ie=Ie(Ht,di.width);if(ie)di.width=ie;else{var zt=Math.floor(je);di.width=Qe===1?ce:zt,ce-=zt,Qe-=1}return He+=di.width,di});if(He<Ce){var Gn=Ce/He;ce=Ce,Qn.forEach(function(Yn,di){var ie=Math.floor(Yn.width*Gn);Yn.width=di===Qn.length-1?ce:ie,ce-=ie})}return[Qn,Math.max(He,Ce)]}return[Ot,Ht]},[Ot,Ht,Wt])}var nt=["children"],et=["fixed"];function ut(Ot){return Ae(Ot).filter(function(Ht){return ne.isValidElement(Ht)}).map(function(Ht){var Wt=Ht.key,re=Ht.props,te=re.children,Ce=(0,Ut.Z)(re,nt),ce=(0,ge.Z)({key:Wt},Ce);return te&&(ce.children=ut(te)),ce})}function at(Ot){return Ot.filter(function(Ht){return Ht&&(0,xe.Z)(Ht)==="object"&&!Ht.hidden}).map(function(Ht){var Wt=Ht.children;return Wt&&Wt.length>0?(0,ge.Z)((0,ge.Z)({},Ht),{},{children:at(Wt)}):Ht})}function ht(Ot){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ot.filter(function(Wt){return Wt&&(0,xe.Z)(Wt)==="object"}).reduce(function(Wt,re,te){var Ce=re.fixed,ce=Ce===!0?"left":Ce,Qe="".concat(Ht,"-").concat(te),je=re.children;return je&&je.length>0?[].concat((0,he.Z)(Wt),(0,he.Z)(ht(je,Qe).map(function(He){return(0,ge.Z)({fixed:ce},He)}))):[].concat((0,he.Z)(Wt),[(0,ge.Z)((0,ge.Z)({key:Qe},re),{},{fixed:ce})])},[])}function pt(Ot){return Ot.map(function(Ht){var Wt=Ht.fixed,re=(0,Ut.Z)(Ht,et),te=Wt;return Wt==="left"?te="right":Wt==="right"&&(te="left"),(0,ge.Z)({fixed:te},re)})}function St(Ot,Ht){var Wt=Ot.prefixCls,re=Ot.columns,te=Ot.children,Ce=Ot.expandable,ce=Ot.expandedKeys,Qe=Ot.columnTitle,je=Ot.getRowKey,He=Ot.onTriggerExpand,Qn=Ot.expandIcon,Gn=Ot.rowExpandable,Yn=Ot.expandIconColumnIndex,di=Ot.direction,ie=Ot.expandRowByClick,zt=Ot.columnWidth,We=Ot.fixed,En=Ot.scrollWidth,Xn=Ot.clientWidth,Ve=ne.useMemo(function(){var Vt=re||ut(te)||[];return at(Vt.slice())},[re,te]),In=ne.useMemo(function(){if(Ce){var Vt=Ve.slice();if(!Vt.includes(ke.w)){var Pt=Yn||0;Pt>=0&&(Pt||We==="left"||!We)&&Vt.splice(Pt,0,ke.w),We==="right"&&Vt.splice(Ve.length,0,ke.w)}var mt=Vt.indexOf(ke.w);Vt=Vt.filter(function(_t,De){return _t!==ke.w||De===mt});var vt=Ve[mt],kt;We?kt=We:kt=vt?vt.fixed:null;var Lt=(0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)({},de.v,{className:"".concat(Wt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Qe),"fixed",kt),"className","".concat(Wt,"-row-expand-icon-cell")),"width",zt),"render",function(De,on,mn){var $e=je(on,mn),Bn=ce.has($e),Re=Gn?Gn(on):!0,Mn=Qn({prefixCls:Wt,expanded:Bn,expandable:Re,record:on,onExpand:He});return ie?ne.createElement("span",{onClick:function(Fi){return Fi.stopPropagation()}},Mn):Mn});return Vt.map(function(_t){return _t===ke.w?Lt:_t})}return Ve.filter(function(_t){return _t!==ke.w})},[Ce,Ve,je,ce,Qn,di]),Hn=ne.useMemo(function(){var Vt=In;return Ht&&(Vt=Ht(Vt)),Vt.length||(Vt=[{render:function(){return null}}]),Vt},[Ht,In,di]),li=ne.useMemo(function(){return di==="rtl"?pt(ht(Hn)):ht(Hn)},[Hn,di,En]),tn=ne.useMemo(function(){for(var Vt=-1,Pt=li.length-1;Pt>=0;Pt-=1){var mt=li[Pt].fixed;if(mt==="left"||mt===!0){Vt=Pt;break}}if(Vt>=0)for(var vt=0;vt<=Vt;vt+=1){var kt=li[vt].fixed;if(kt!=="left"&&kt!==!0)return!0}var Lt=li.findIndex(function(on){var mn=on.fixed;return mn==="right"});if(Lt>=0)for(var _t=Lt;_t<li.length;_t+=1){var De=li[_t].fixed;if(De!=="right")return!0}return!1},[li]),Me=Dt(li,En,Xn),rn=(0,xt.Z)(Me,2),Dn=rn[0],sn=rn[1];return[Hn,Dn,sn,tn]}var bt=St},29104:function(gn,ze,Qt){"use strict";Qt.d(ze,{w2:function(){return xt.w},vP:function(){return Bi.v},RQ:function(){return xt.R},ER:function(){return Pn},Q$:function(){return Ys},TN:function(){return tA}});var xt=Qt(45233),Yt=Qt(97685),he=Qt(66680),xe=Qt(8410),ge=Qt(91881),Ut=Qt(67294),jt=Qt(73935);function ne(Zt){var me=Ut.createContext(void 0),Se=function(Ze){var an=Ze.value,hn=Ze.children,xn=Ut.useRef(an);xn.current=an;var Zn=Ut.useState(function(){return{getValue:function(){return xn.current},listeners:new Set}}),Rn=(0,Yt.Z)(Zn,1),gi=Rn[0];return(0,xe.Z)(function(){(0,jt.unstable_batchedUpdates)(function(){gi.listeners.forEach(function(zn){zn(an)})})},[an]),Ut.createElement(me.Provider,{value:gi},hn)};return{Context:me,Provider:Se,defaultValue:Zt}}function Ae(Zt,me){var Se=(0,he.Z)(typeof me=="function"?me:function(zn){if(me===void 0)return zn;if(!Array.isArray(me))return zn[me];var oi={};return me.forEach(function(ni){oi[ni]=zn[ni]}),oi}),Be=Ut.useContext(Zt==null?void 0:Zt.Context),Ze=Be||{},an=Ze.listeners,hn=Ze.getValue,xn=Ut.useRef();xn.current=Se(Be?hn():Zt==null?void 0:Zt.defaultValue);var Zn=Ut.useState({}),Rn=(0,Yt.Z)(Zn,2),gi=Rn[1];return(0,xe.Z)(function(){if(!Be)return;function zn(oi){var ni=Se(oi);(0,ge.Z)(xn.current,ni,!0)||gi({})}return an.add(zn),function(){an.delete(zn)}},[Be]),xn.current}var se=Qt(87462),ke=Qt(42550);function de(){var Zt=Ut.createContext(null);function me(){return Ut.useContext(Zt)}function Se(Ze,an){var hn=(0,ke.Yr)(Ze),xn=function(Rn,gi){var zn=hn?{ref:gi}:{},oi=Ut.useRef(0),ni=Ut.useRef(Rn),Ci=me();return Ci!==null?Ut.createElement(Ze,(0,se.Z)({},Rn,zn)):((!an||an(ni.current,Rn))&&(oi.current+=1),ni.current=Rn,Ut.createElement(Zt.Provider,{value:oi.current},Ut.createElement(Ze,(0,se.Z)({},Rn,zn))))};return hn?Ut.forwardRef(xn):xn}function Be(Ze,an){var hn=(0,ke.Yr)(Ze),xn=function(Rn,gi){var zn=hn?{ref:gi}:{};return me(),Ut.createElement(Ze,(0,se.Z)({},Rn,zn))};return hn?Ut.memo(Ut.forwardRef(xn),an):Ut.memo(xn,an)}return{makeImmutable:Se,responseImmutable:Be,useImmutableMark:me}}var Ie=de(),Dt=Ie.makeImmutable,nt=Ie.responseImmutable,et=Ie.useImmutableMark,ut=de(),at=ut.makeImmutable,ht=ut.responseImmutable,pt=ut.useImmutableMark,St=ne(),bt=St;function Ot(Zt,me){var Se=React.useRef(0);Se.current+=1;var Be=React.useRef(Zt),Ze=[];Object.keys(Zt||{}).map(function(hn){var xn;(Zt==null?void 0:Zt[hn])!==((xn=Be.current)===null||xn===void 0?void 0:xn[hn])&&Ze.push(hn)}),Be.current=Zt;var an=React.useRef([]);return Ze.length&&(an.current=Ze),React.useDebugValue(Se.current),React.useDebugValue(an.current.join(", ")),me&&console.log("".concat(me,":"),Se.current,an.current),Se.current}var Ht=null,Wt=null,re=Qt(71002),te=Qt(1413),Ce=Qt(4942),ce=Qt(94184),Qe=Qt.n(ce);function je(Zt,me,Se){var Be=Ut.useRef({});return(!("value"in Be.current)||Se(Be.current.condition,me))&&(Be.current.value=Zt(),Be.current.condition=me),Be.current.value}var He=Qt(40830);function Qn(Zt,me){var Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Be=new Set;function Ze(an,hn){var xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Zn=Be.has(an);if((0,He.ZP)(!Zn,"Warning: There may be circular references"),Zn)return!1;if(an===hn)return!0;if(Se&&xn>1)return!1;Be.add(an);var Rn=xn+1;if(Array.isArray(an)){if(!Array.isArray(hn)||an.length!==hn.length)return!1;for(var gi=0;gi<an.length;gi++)if(!Ze(an[gi],hn[gi],Rn))return!1;return!0}if(an&&hn&&(0,re.Z)(an)==="object"&&(0,re.Z)(hn)==="object"){var zn=Object.keys(an);return zn.length!==Object.keys(hn).length?!1:zn.every(function(oi){return Ze(an[oi],hn[oi],Rn)})}return!1}return Ze(Zt,me)}var Gn=Qn;function Yn(Zt,me){for(var Se=Zt,Be=0;Be<me.length;Be+=1){if(Se==null)return;Se=Se[me[Be]]}return Se}var di=Ut.createContext({renderWithProps:!1}),ie=di,zt="RC_TABLE_KEY";function We(Zt){return Zt==null?[]:Array.isArray(Zt)?Zt:[Zt]}function En(Zt){var me=[],Se={};return Zt.forEach(function(Be){for(var Ze=Be||{},an=Ze.key,hn=Ze.dataIndex,xn=an||We(hn).join("-")||zt;Se[xn];)xn="".concat(xn,"_next");Se[xn]=!0,me.push(xn)}),me}function Xn(Zt){return Zt!=null}function Ve(Zt){return typeof Zt=="number"&&!Number.isNaN(Zt)}function In(Zt){return Zt&&(0,re.Z)(Zt)==="object"&&!Array.isArray(Zt)&&!Ut.isValidElement(Zt)}function Hn(Zt,me,Se,Be,Ze,an){var hn=Ut.useContext(ie),xn=pt(),Zn=je(function(){if(Xn(Be))return[Be];var Rn=me==null||me===""?[]:Array.isArray(me)?me:[me],gi=Yn(Zt,Rn),zn=gi,oi=void 0;if(Ze){var ni=Ze(gi,Zt,Se);In(ni)?(zn=ni.children,oi=ni.props,hn.renderWithProps=!0):zn=ni}return[zn,oi]},[xn,Zt,Be,me,Ze,Se],function(Rn,gi){if(an){var zn=(0,Yt.Z)(Rn,2),oi=zn[1],ni=(0,Yt.Z)(gi,2),Ci=ni[1];return an(Ci,oi)}return hn.renderWithProps?!0:!Gn(Rn,gi,!0)});return Zn}function li(Zt,me,Se,Be){var Ze=Zt+me-1;return Zt<=Be&&Ze>=Se}function tn(Zt,me){return Ae(bt,function(Se){var Be=li(Zt,me||1,Se.hoverStartRow,Se.hoverEndRow);return[Be,Se.onHover]})}function Me(Zt){var me=Ut.useRef();me.current=Zt;var Se=Ut.useCallback(function(){for(var Be,Ze=arguments.length,an=new Array(Ze),hn=0;hn<Ze;hn++)an[hn]=arguments[hn];return(Be=me.current)===null||Be===void 0?void 0:Be.call.apply(Be,[me].concat(an))},[]);return Se}function rn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Dn=rn()?Ut.useLayoutEffect:Ut.useEffect,sn=function(me,Se){var Be=React.useRef(!0);Dn(function(){return me(Be.current)},Se),Dn(function(){return Be.current=!1,function(){Be.current=!0}},[])},Vt=function(me,Se){sn(function(Be){if(!Be)return me()},Se)},Pt=null;function mt(Zt){var me=React.useRef(!1),Se=React.useState(Zt),Be=_slicedToArray(Se,2),Ze=Be[0],an=Be[1];React.useEffect(function(){return me.current=!1,function(){me.current=!0}},[]);function hn(xn,Zn){Zn&&me.current||an(xn)}return[Ze,hn]}function vt(Zt){return Zt!==void 0}function kt(Zt,me){var Se=me||{},Be=Se.defaultValue,Ze=Se.value,an=Se.onChange,hn=Se.postState,xn=useState(function(){return vt(Ze)?Ze:vt(Be)?typeof Be=="function"?Be():Be:typeof Zt=="function"?Zt():Zt}),Zn=_slicedToArray(xn,2),Rn=Zn[0],gi=Zn[1],zn=Ze!==void 0?Ze:Rn,oi=hn?hn(zn):zn,ni=useEvent(an),Ci=useState([zn]),Vi=_slicedToArray(Ci,2),gr=Vi[0],Mr=Vi[1];useLayoutUpdateEffect(function(){var ar=gr[0];Rn!==ar&&ni(Rn,ar)},[gr]),useLayoutUpdateEffect(function(){vt(Ze)||gi(Ze)},[Ze]);var Ni=useEvent(function(ar,_i){gi(ar,_i),Mr([zn],_i)});return[oi,Ni]}var Lt=Qt(35110),_t=Qt(63295),De=Number(Ut.version.split(".")[0]),on=function(me,Se){typeof me=="function"?me(Se):(0,re.Z)(me)==="object"&&me&&"current"in me&&(me.current=Se)},mn=function(){for(var me=arguments.length,Se=new Array(me),Be=0;Be<me;Be++)Se[Be]=arguments[Be];var Ze=Se.filter(Boolean);return Ze.length<=1?Ze[0]:function(an){Se.forEach(function(hn){on(hn,an)})}},$e=function(){for(var me=arguments.length,Se=new Array(me),Be=0;Be<me;Be++)Se[Be]=arguments[Be];return useMemo(function(){return mn.apply(void 0,Se)},Se,function(Ze,an){return Ze.length!==an.length||Ze.every(function(hn,xn){return hn!==an[xn]})})},Bn=function(me){var Se,Be;if(!me)return!1;if(Re(me)&&De>=19)return!0;var Ze=isMemo(me)?me.type.type:me.type;return!(typeof Ze=="function"&&!((Se=Ze.prototype)!==null&&Se!==void 0&&Se.render)&&Ze.$$typeof!==ForwardRef||typeof me=="function"&&!((Be=me.prototype)!==null&&Be!==void 0&&Be.render)&&me.$$typeof!==ForwardRef)};function Re(Zt){return isValidElement(Zt)&&!isFragment(Zt)}var Mn=function(me){return Re(me)&&Bn(me)},Kn=function(me){if(me&&Re(me)){var Se=me;return Se.props.propertyIsEnumerable("ref")?Se.props.ref:Se.ref}return null};function Fi(Zt,me,Se,Be){if(!me.length)return Se;var Ze=_toArray(me),an=Ze[0],hn=Ze.slice(1),xn;return!Zt&&typeof an=="number"?xn=[]:Array.isArray(Zt)?xn=_toConsumableArray(Zt):xn=_objectSpread({},Zt),Be&&Se===void 0&&hn.length===1?delete xn[an][hn[0]]:xn[an]=Fi(xn[an],hn,Se,Be),xn}function ti(Zt,me,Se){var Be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return me.length&&Be&&Se===void 0&&!get(Zt,me.slice(0,-1))?Zt:Fi(Zt,me,Se,Be)}function sr(Zt){return _typeof(Zt)==="object"&&Zt!==null&&Object.getPrototypeOf(Zt)===Object.prototype}function rr(Zt){return Array.isArray(Zt)?[]:{}}var xi=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function wi(){for(var Zt=arguments.length,me=new Array(Zt),Se=0;Se<Zt;Se++)me[Se]=arguments[Se];var Be=rr(me[0]);return me.forEach(function(Ze){function an(hn,xn){var Zn=new Set(xn),Rn=get(Ze,hn),gi=Array.isArray(Rn);if(gi||sr(Rn)){if(!Zn.has(Rn)){Zn.add(Rn);var zn=get(Be,hn);gi?Be=ti(Be,hn,[]):(!zn||_typeof(zn)!=="object")&&(Be=ti(Be,hn,rr(Rn))),xi(Rn).forEach(function(oi){an([].concat(_toConsumableArray(hn),[oi]),Zn)})}}else Be=ti(Be,hn,Rn)}an([])}),Be}var Ir=function(me){var Se=me.ellipsis,Be=me.rowType,Ze=me.children,an,hn=Se===!0?{showTitle:!0}:Se;return hn&&(hn.showTitle||Be==="header")&&(typeof Ze=="string"||typeof Ze=="number"?an=Ze.toString():Ut.isValidElement(Ze)&&typeof Ze.props.children=="string"&&(an=Ze.props.children)),an};function ji(Zt){var me,Se,Be,Ze,an,hn,xn,Zn,Rn=Zt.component,gi=Zt.children,zn=Zt.ellipsis,oi=Zt.scope,ni=Zt.prefixCls,Ci=Zt.className,Vi=Zt.align,gr=Zt.record,Mr=Zt.render,Ni=Zt.dataIndex,ar=Zt.renderIndex,_i=Zt.shouldCellUpdate,Cr=Zt.index,eo=Zt.rowType,Br=Zt.colSpan,xo=Zt.rowSpan,Yr=Zt.fixLeft,ko=Zt.fixRight,Cs=Zt.firstFixLeft,To=Zt.lastFixLeft,to=Zt.firstFixRight,no=Zt.lastFixRight,Hi=Zt.appendNode,Pr=Zt.additionalProps,lo=Pr===void 0?{}:Pr,Ao=Zt.isSticky,ho="".concat(ni,"-cell"),jo=Ae(bt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),mo=jo.supportSticky,hs=jo.allColumnsFixedLeft,Ss=jo.rowHoverable,Os=Hn(gr,Ni,ar,gi,Mr,_i),ja=(0,Yt.Z)(Os,2),oa=ja[0],Co=ja[1],zo={},Yo=typeof Yr=="number"&&mo,cs=typeof ko=="number"&&mo;Yo&&(zo.position="sticky",zo.left=Yr),cs&&(zo.position="sticky",zo.right=ko);var Ro=(me=(Se=(Be=Co==null?void 0:Co.colSpan)!==null&&Be!==void 0?Be:lo.colSpan)!==null&&Se!==void 0?Se:Br)!==null&&me!==void 0?me:1,Kr=(Ze=(an=(hn=Co==null?void 0:Co.rowSpan)!==null&&hn!==void 0?hn:lo.rowSpan)!==null&&an!==void 0?an:xo)!==null&&Ze!==void 0?Ze:1,No=tn(Cr,Kr),wa=(0,Yt.Z)(No,2),dl=wa[0],Ya=wa[1],bl=Me(function(Xa){var qo;gr&&Ya(Cr,Cr+Kr-1),lo==null||(qo=lo.onMouseEnter)===null||qo===void 0||qo.call(lo,Xa)}),Tl=Me(function(Xa){var qo;gr&&Ya(-1,-1),lo==null||(qo=lo.onMouseLeave)===null||qo===void 0||qo.call(lo,Xa)});if(Ro===0||Kr===0)return null;var Au=(xn=lo.title)!==null&&xn!==void 0?xn:Ir({rowType:eo,ellipsis:zn,children:oa}),so=Qe()(ho,Ci,(Zn={},(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)(Zn,"".concat(ho,"-fix-left"),Yo&&mo),"".concat(ho,"-fix-left-first"),Cs&&mo),"".concat(ho,"-fix-left-last"),To&&mo),"".concat(ho,"-fix-left-all"),To&&hs&&mo),"".concat(ho,"-fix-right"),cs&&mo),"".concat(ho,"-fix-right-first"),to&&mo),"".concat(ho,"-fix-right-last"),no&&mo),"".concat(ho,"-ellipsis"),zn),"".concat(ho,"-with-append"),Hi),"".concat(ho,"-fix-sticky"),(Yo||cs)&&Ao&&mo),(0,Ce.Z)(Zn,"".concat(ho,"-row-hover"),!Co&&dl)),lo.className,Co==null?void 0:Co.className),Nl={};Vi&&(Nl.textAlign=Vi);var ms=(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},Co==null?void 0:Co.style),zo),Nl),lo.style),za=oa;return(0,re.Z)(za)==="object"&&!Array.isArray(za)&&!Ut.isValidElement(za)&&(za=null),zn&&(To||to)&&(za=Ut.createElement("span",{className:"".concat(ho,"-content")},za)),Ut.createElement(Rn,(0,se.Z)({},Co,lo,{className:so,style:ms,title:Au,scope:oi,onMouseEnter:Ss?bl:void 0,onMouseLeave:Ss?Tl:void 0,colSpan:Ro!==1?Ro:null,rowSpan:Kr!==1?Kr:null}),Hi,za)}var yr=Ut.memo(ji);function xr(Zt,me,Se,Be,Ze){var an=Se[Zt]||{},hn=Se[me]||{},xn,Zn;an.fixed==="left"?xn=Be.left[Ze==="rtl"?me:Zt]:hn.fixed==="right"&&(Zn=Be.right[Ze==="rtl"?Zt:me]);var Rn=!1,gi=!1,zn=!1,oi=!1,ni=Se[me+1],Ci=Se[Zt-1],Vi=ni&&!ni.fixed||Ci&&!Ci.fixed||Se.every(function(_i){return _i.fixed==="left"});if(Ze==="rtl"){if(xn!==void 0){var gr=Ci&&Ci.fixed==="left";oi=!gr&&Vi}else if(Zn!==void 0){var Mr=ni&&ni.fixed==="right";zn=!Mr&&Vi}}else if(xn!==void 0){var Ni=ni&&ni.fixed==="left";Rn=!Ni&&Vi}else if(Zn!==void 0){var ar=Ci&&Ci.fixed==="right";gi=!ar&&Vi}return{fixLeft:xn,fixRight:Zn,lastFixLeft:Rn,firstFixRight:gi,lastFixRight:zn,firstFixLeft:oi,isSticky:Be.isSticky}}var Qr=Ut.createContext({}),Ii=Qr;function br(Zt){var me=Zt.className,Se=Zt.index,Be=Zt.children,Ze=Zt.colSpan,an=Ze===void 0?1:Ze,hn=Zt.rowSpan,xn=Zt.align,Zn=Ae(bt,["prefixCls","direction"]),Rn=Zn.prefixCls,gi=Zn.direction,zn=Ut.useContext(Ii),oi=zn.scrollColumnIndex,ni=zn.stickyOffsets,Ci=zn.flattenColumns,Vi=Se+an-1,gr=Vi+1===oi?an+1:an,Mr=xr(Se,Se+gr-1,Ci,ni,gi);return Ut.createElement(yr,(0,se.Z)({className:me,index:Se,component:"td",prefixCls:Rn,record:null,dataIndex:null,align:xn,colSpan:gr,rowSpan:hn,render:function(){return Be}},Mr))}var Sr=Qt(45987),Bo=["children"];function er(Zt){var me=Zt.children,Se=(0,Sr.Z)(Zt,Bo);return Ut.createElement("tr",Se,me)}function Lo(Zt){var me=Zt.children;return me}Lo.Row=er,Lo.Cell=br;var ys=Lo;function Mo(Zt){var me=Zt.children,Se=Zt.stickyOffsets,Be=Zt.flattenColumns,Ze=Ae(bt,"prefixCls"),an=Be.length-1,hn=Be[an],xn=Ut.useMemo(function(){return{stickyOffsets:Se,flattenColumns:Be,scrollColumnIndex:hn!=null&&hn.scrollbar?an:null}},[hn,Be,an,Se]);return Ut.createElement(Ii.Provider,{value:xn},Ut.createElement("tfoot",{className:"".concat(Ze,"-summary")},me))}var Lr=ht(Mo),Pn=ys,Mt=Qt(48555),jn=function(Zt){if(!Zt)return!1;if(Zt instanceof Element){if(Zt.offsetParent)return!0;if(Zt.getBBox){var me=Zt.getBBox(),Se=me.width,Be=me.height;if(Se||Be)return!0}if(Zt.getBoundingClientRect){var Ze=Zt.getBoundingClientRect(),an=Ze.width,hn=Ze.height;if(an||hn)return!0}}return!1},kn=function(me){if(rn()&&window.document.documentElement){var Se=Array.isArray(me)?me:[me],Be=window.document.documentElement;return Se.some(function(Ze){return Ze in Be.style})}return!1},_n=function(me,Se){if(!kn(me))return!1;var Be=document.createElement("div"),Ze=Be.style[me];return Be.style[me]=Se,Be.style[me]!==Ze};function Wn(Zt,me){return!Array.isArray(Zt)&&me!==void 0?_n(Zt,me):kn(Zt)}function qn(Zt,me){if(!Zt)return!1;if(Zt.contains)return Zt.contains(me);for(var Se=me;Se;){if(Se===Zt)return!0;Se=Se.parentNode}return!1}var ui="data-rc-order",Wi="data-rc-priority",en="rc-util-key",Je=new Map;function be(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=Zt.mark;return me?me.startsWith("data-")?me:"data-".concat(me):en}function un(Zt){if(Zt.attachTo)return Zt.attachTo;var me=document.querySelector("head");return me||document.body}function fi(Zt){return Zt==="queue"?"prependQueue":Zt?"prepend":"append"}function mi(Zt){return Array.from((Je.get(Zt)||Zt).children).filter(function(me){return me.tagName==="STYLE"})}function ri(Zt){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!rn())return null;var Se=me.csp,Be=me.prepend,Ze=me.priority,an=Ze===void 0?0:Ze,hn=fi(Be),xn=hn==="prependQueue",Zn=document.createElement("style");Zn.setAttribute(ui,hn),xn&&an&&Zn.setAttribute(Wi,"".concat(an)),Se!=null&&Se.nonce&&(Zn.nonce=Se==null?void 0:Se.nonce),Zn.innerHTML=Zt;var Rn=un(me),gi=Rn.firstChild;if(Be){if(xn){var zn=(me.styles||mi(Rn)).filter(function(oi){if(!["prepend","prependQueue"].includes(oi.getAttribute(ui)))return!1;var ni=Number(oi.getAttribute(Wi)||0);return an>=ni});if(zn.length)return Rn.insertBefore(Zn,zn[zn.length-1].nextSibling),Zn}Rn.insertBefore(Zn,gi)}else Rn.appendChild(Zn);return Zn}function ee(Zt){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=un(me);return(me.styles||mi(Se)).find(function(Be){return Be.getAttribute(be(me))===Zt})}function Cn(Zt){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=ee(Zt,me);if(Se){var Be=un(me);Be.removeChild(Se)}}function Ti(Zt,me){var Se=Je.get(Zt);if(!Se||!qn(document,Se)){var Be=ri("",me),Ze=Be.parentNode;Je.set(Zt,Ze),Zt.removeChild(Be)}}function Xi(){Je.clear()}function On(Zt,me){var Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Be=un(Se),Ze=mi(Be),an=(0,te.Z)((0,te.Z)({},Se),{},{styles:Ze});Ti(Be,an);var hn=ee(me,an);if(hn){var xn,Zn;if((xn=an.csp)!==null&&xn!==void 0&&xn.nonce&&hn.nonce!==((Zn=an.csp)===null||Zn===void 0?void 0:Zn.nonce)){var Rn;hn.nonce=(Rn=an.csp)===null||Rn===void 0?void 0:Rn.nonce}return hn.innerHTML!==Zt&&(hn.innerHTML=Zt),hn}var gi=ri(Zt,an);return gi.setAttribute(be(an),me),gi}var Ge;function Si(Zt){var me="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),Se=document.createElement("div");Se.id=me;var Be=Se.style;Be.position="absolute",Be.left="0",Be.top="0",Be.width="100px",Be.height="100px",Be.overflow="scroll";var Ze,an;if(Zt){var hn=getComputedStyle(Zt);Be.scrollbarColor=hn.scrollbarColor,Be.scrollbarWidth=hn.scrollbarWidth;var xn=getComputedStyle(Zt,"::-webkit-scrollbar"),Zn=parseInt(xn.width,10),Rn=parseInt(xn.height,10);try{var gi=Zn?"width: ".concat(xn.width,";"):"",zn=Rn?"height: ".concat(xn.height,";"):"";On(`
#`.concat(me,`::-webkit-scrollbar {
`).concat(gi,`
`).concat(zn,`
}`),me)}catch(Ci){console.error(Ci),Ze=Zn,an=Rn}}document.body.appendChild(Se);var oi=Zt&&Ze&&!isNaN(Ze)?Ze:Se.offsetWidth-Se.clientWidth,ni=Zt&&an&&!isNaN(an)?an:Se.offsetHeight-Se.clientHeight;return document.body.removeChild(Se),Cn(me),{width:oi,height:ni}}function Zi(Zt){return typeof document=="undefined"?0:((Zt||Ge===void 0)&&(Ge=Si()),Ge.width)}function ur(Zt){return typeof document=="undefined"||!Zt||!(Zt instanceof Element)?{width:0,height:0}:Si(Zt)}var Ln=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Ui=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,pe="".concat(Ln," ").concat(Ui).split(/[\s\n]+/),Fe="aria-",Ke="data-";function ve(Zt,me){return Zt.indexOf(me)===0}function Ee(Zt){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se;me===!1?Se={aria:!0,data:!0,attr:!0}:me===!0?Se={aria:!0}:Se=(0,te.Z)({},me);var Be={};return Object.keys(Zt).forEach(function(Ze){(Se.aria&&(Ze==="role"||ve(Ze,Fe))||Se.data&&ve(Ze,Ke)||Se.attr&&pe.includes(Ze))&&(Be[Ze]=Zt[Ze])}),Be}function _e(Zt,me,Se,Be,Ze,an,hn){Zt.push({record:me,indent:Se,index:hn});var xn=an(me),Zn=Ze==null?void 0:Ze.has(xn);if(me&&Array.isArray(me[Be])&&Zn)for(var Rn=0;Rn<me[Be].length;Rn+=1)_e(Zt,me[Be][Rn],Se+1,Be,Ze,an,Rn)}function Sn(Zt,me,Se,Be){var Ze=Ut.useMemo(function(){if(Se!=null&&Se.size){for(var an=[],hn=0;hn<(Zt==null?void 0:Zt.length);hn+=1){var xn=Zt[hn];_e(an,xn,0,me,Se,Be,hn)}return an}return Zt==null?void 0:Zt.map(function(Zn,Rn){return{record:Zn,indent:0,index:Rn}})},[Zt,me,Se,Be]);return Ze}function ei(Zt,me,Se,Be){var Ze=Ae(bt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),an=Ze.flattenColumns,hn=Ze.expandableType,xn=Ze.expandedKeys,Zn=Ze.childrenColumnName,Rn=Ze.onTriggerExpand,gi=Ze.rowExpandable,zn=Ze.onRow,oi=Ze.expandRowByClick,ni=Ze.rowClassName,Ci=hn==="nest",Vi=hn==="row"&&(!gi||gi(Zt)),gr=Vi||Ci,Mr=xn&&xn.has(me),Ni=Zn&&Zt&&Zt[Zn],ar=Me(Rn),_i=zn==null?void 0:zn(Zt,Se),Cr=_i==null?void 0:_i.onClick,eo=function(ko){oi&&gr&&Rn(Zt,ko);for(var Cs=arguments.length,To=new Array(Cs>1?Cs-1:0),to=1;to<Cs;to++)To[to-1]=arguments[to];Cr==null||Cr.apply(void 0,[ko].concat(To))},Br;typeof ni=="string"?Br=ni:typeof ni=="function"&&(Br=ni(Zt,Se,Be));var xo=En(an);return(0,te.Z)((0,te.Z)({},Ze),{},{columnsKey:xo,nestExpandable:Ci,expanded:Mr,hasNestChildren:Ni,record:Zt,onTriggerExpand:ar,rowSupportExpand:Vi,expandable:gr,rowProps:(0,te.Z)((0,te.Z)({},_i),{},{className:Qe()(Br,_i==null?void 0:_i.className),onClick:eo})})}function Xe(Zt){var me=Zt.prefixCls,Se=Zt.children,Be=Zt.component,Ze=Zt.cellComponent,an=Zt.className,hn=Zt.expanded,xn=Zt.colSpan,Zn=Zt.isEmpty,Rn=Ae(bt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),gi=Rn.scrollbarSize,zn=Rn.fixHeader,oi=Rn.fixColumn,ni=Rn.componentWidth,Ci=Rn.horizonScroll,Vi=Se;return(Zn?Ci&&ni:oi)&&(Vi=Ut.createElement("div",{style:{width:ni-(zn&&!Zn?gi:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(me,"-expanded-row-fixed")},Vi)),Ut.createElement(Be,{className:an,style:{display:hn?null:"none"}},Ut.createElement(yr,{component:Ze,prefixCls:me,colSpan:xn},Vi))}var Fn=Xe;function si(Zt){var me=Zt.prefixCls,Se=Zt.record,Be=Zt.onExpand,Ze=Zt.expanded,an=Zt.expandable,hn="".concat(me,"-row-expand-icon");if(!an)return Ut.createElement("span",{className:Qe()(hn,"".concat(me,"-row-spaced"))});var xn=function(Rn){Be(Se,Rn),Rn.stopPropagation()};return Ut.createElement("span",{className:Qe()(hn,(0,Ce.Z)((0,Ce.Z)({},"".concat(me,"-row-expanded"),Ze),"".concat(me,"-row-collapsed"),!Ze)),onClick:xn})}function Gi(Zt,me,Se){var Be=[];function Ze(an){(an||[]).forEach(function(hn,xn){Be.push(me(hn,xn)),Ze(hn[Se])})}return Ze(Zt),Be}function Ji(Zt,me,Se,Be){return typeof Zt=="string"?Zt:typeof Zt=="function"?Zt(me,Se,Be):""}function Te(Zt,me,Se,Be,Ze){var an=Zt.record,hn=Zt.prefixCls,xn=Zt.columnsKey,Zn=Zt.fixedInfoList,Rn=Zt.expandIconColumnIndex,gi=Zt.nestExpandable,zn=Zt.indentSize,oi=Zt.expandIcon,ni=Zt.expanded,Ci=Zt.hasNestChildren,Vi=Zt.onTriggerExpand,gr=xn[Se],Mr=Zn[Se],Ni;Se===(Rn||0)&&gi&&(Ni=Ut.createElement(Ut.Fragment,null,Ut.createElement("span",{style:{paddingLeft:"".concat(zn*Be,"px")},className:"".concat(hn,"-row-indent indent-level-").concat(Be)}),oi({prefixCls:hn,expanded:ni,expandable:Ci,record:an,onExpand:Vi})));var ar;return me.onCell&&(ar=me.onCell(an,Ze)),{key:gr,fixedInfo:Mr,appendCellNode:Ni,additionalCellProps:ar||{}}}function Mi(Zt){var me=Zt.className,Se=Zt.style,Be=Zt.record,Ze=Zt.index,an=Zt.renderIndex,hn=Zt.rowKey,xn=Zt.indent,Zn=xn===void 0?0:xn,Rn=Zt.rowComponent,gi=Zt.cellComponent,zn=Zt.scopeCellComponent,oi=ei(Be,hn,Ze,Zn),ni=oi.prefixCls,Ci=oi.flattenColumns,Vi=oi.expandedRowClassName,gr=oi.expandedRowRender,Mr=oi.rowProps,Ni=oi.expanded,ar=oi.rowSupportExpand,_i=Ut.useRef(!1);_i.current||(_i.current=Ni);var Cr=Ji(Vi,Be,Ze,Zn),eo=Ut.createElement(Rn,(0,se.Z)({},Mr,{"data-row-key":hn,className:Qe()(me,"".concat(ni,"-row"),"".concat(ni,"-row-level-").concat(Zn),Mr==null?void 0:Mr.className,(0,Ce.Z)({},Cr,Zn>=1)),style:(0,te.Z)((0,te.Z)({},Se),Mr==null?void 0:Mr.style)}),Ci.map(function(Yr,ko){var Cs=Yr.render,To=Yr.dataIndex,to=Yr.className,no=Te(oi,Yr,ko,Zn,Ze),Hi=no.key,Pr=no.fixedInfo,lo=no.appendCellNode,Ao=no.additionalCellProps;return Ut.createElement(yr,(0,se.Z)({className:to,ellipsis:Yr.ellipsis,align:Yr.align,scope:Yr.rowScope,component:Yr.rowScope?zn:gi,prefixCls:ni,key:Hi,record:Be,index:Ze,renderIndex:an,dataIndex:To,render:Cs,shouldCellUpdate:Yr.shouldCellUpdate},Pr,{appendNode:lo,additionalProps:Ao}))})),Br;if(ar&&(_i.current||Ni)){var xo=gr(Be,Ze,Zn+1,Ni);Br=Ut.createElement(Fn,{expanded:Ni,className:Qe()("".concat(ni,"-expanded-row"),"".concat(ni,"-expanded-row-level-").concat(Zn+1),Cr),prefixCls:ni,component:Rn,cellComponent:gi,colSpan:Ci.length,isEmpty:!1},xo)}return Ut.createElement(Ut.Fragment,null,eo,Br)}var Ri=ht(Mi);function yi(Zt){var me=Zt.columnKey,Se=Zt.onColumnResize,Be=Ut.useRef();return Ut.useEffect(function(){Be.current&&Se(me,Be.current.offsetWidth)},[]),Ut.createElement(Mt.Z,{data:me},Ut.createElement("td",{ref:Be,style:{padding:0,border:0,height:0}},Ut.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Nr(Zt){var me=Zt.prefixCls,Se=Zt.columnsKey,Be=Zt.onColumnResize;return Ut.createElement("tr",{"aria-hidden":"true",className:"".concat(me,"-measure-row"),style:{height:0,fontSize:0}},Ut.createElement(Mt.Z.Collection,{onBatchResize:function(an){an.forEach(function(hn){var xn=hn.data,Zn=hn.size;Be(xn,Zn.offsetWidth)})}},Se.map(function(Ze){return Ut.createElement(yi,{key:Ze,columnKey:Ze,onColumnResize:Be})})))}function qi(Zt){var me=Zt.data,Se=Zt.measureColumnWidth,Be=Ae(bt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ze=Be.prefixCls,an=Be.getComponent,hn=Be.onColumnResize,xn=Be.flattenColumns,Zn=Be.getRowKey,Rn=Be.expandedKeys,gi=Be.childrenColumnName,zn=Be.emptyNode,oi=Sn(me,gi,Rn,Zn),ni=Ut.useRef({renderWithProps:!1}),Ci=an(["body","wrapper"],"tbody"),Vi=an(["body","row"],"tr"),gr=an(["body","cell"],"td"),Mr=an(["body","cell"],"th"),Ni;me.length?Ni=oi.map(function(_i,Cr){var eo=_i.record,Br=_i.indent,xo=_i.index,Yr=Zn(eo,Cr);return Ut.createElement(Ri,{key:Yr,rowKey:Yr,record:eo,index:Cr,renderIndex:xo,rowComponent:Vi,cellComponent:gr,scopeCellComponent:Mr,indent:Br})}):Ni=Ut.createElement(Fn,{expanded:!0,className:"".concat(Ze,"-placeholder"),prefixCls:Ze,component:Vi,cellComponent:gr,colSpan:xn.length,isEmpty:!0},zn);var ar=En(xn);return Ut.createElement(ie.Provider,{value:ni.current},Ut.createElement(Ci,{className:"".concat(Ze,"-tbody")},Se&&Ut.createElement(Nr,{prefixCls:Ze,columnsKey:ar,onColumnResize:hn}),Ni))}var ci=ht(qi),Bi=Qt(62978),Qi=["columnType"];function Ar(Zt){for(var me=Zt.colWidths,Se=Zt.columns,Be=Zt.columCount,Ze=Ae(bt,["tableLayout"]),an=Ze.tableLayout,hn=[],xn=Be||Se.length,Zn=!1,Rn=xn-1;Rn>=0;Rn-=1){var gi=me[Rn],zn=Se&&Se[Rn],oi=void 0,ni=void 0;if(zn&&(oi=zn[Bi.v],an==="auto"&&(ni=zn.minWidth)),gi||ni||oi||Zn){var Ci=oi||{},Vi=Ci.columnType,gr=(0,Sr.Z)(Ci,Qi);hn.unshift(Ut.createElement("col",(0,se.Z)({key:Rn,style:{width:gi,minWidth:ni}},gr))),Zn=!0}}return Ut.createElement("colgroup",null,hn)}var cn=Ar,$i=Qt(74902),dn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function or(Zt,me){return(0,Ut.useMemo)(function(){for(var Se=[],Be=0;Be<me;Be+=1){var Ze=Zt[Be];if(Ze!==void 0)Se[Be]=Ze;else return null}return Se},[Zt.join("_"),me])}var is=Ut.forwardRef(function(Zt,me){var Se=Zt.className,Be=Zt.noData,Ze=Zt.columns,an=Zt.flattenColumns,hn=Zt.colWidths,xn=Zt.columCount,Zn=Zt.stickyOffsets,Rn=Zt.direction,gi=Zt.fixHeader,zn=Zt.stickyTopOffset,oi=Zt.stickyBottomOffset,ni=Zt.stickyClassName,Ci=Zt.onScroll,Vi=Zt.maxContentScroll,gr=Zt.children,Mr=(0,Sr.Z)(Zt,dn),Ni=Ae(bt,["prefixCls","scrollbarSize","isSticky","getComponent"]),ar=Ni.prefixCls,_i=Ni.scrollbarSize,Cr=Ni.isSticky,eo=Ni.getComponent,Br=eo(["header","table"],"table"),xo=Cr&&!gi?0:_i,Yr=Ut.useRef(null),ko=Ut.useCallback(function(Ao){on(me,Ao),on(Yr,Ao)},[]);Ut.useEffect(function(){var Ao;function ho(jo){var mo=jo,hs=mo.currentTarget,Ss=mo.deltaX;Ss&&(Ci({currentTarget:hs,scrollLeft:hs.scrollLeft+Ss}),jo.preventDefault())}return(Ao=Yr.current)===null||Ao===void 0||Ao.addEventListener("wheel",ho,{passive:!1}),function(){var jo;(jo=Yr.current)===null||jo===void 0||jo.removeEventListener("wheel",ho)}},[]);var Cs=Ut.useMemo(function(){return an.every(function(Ao){return Ao.width})},[an]),To=an[an.length-1],to={fixed:To?To.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ar,"-cell-scrollbar")}}},no=(0,Ut.useMemo)(function(){return xo?[].concat((0,$i.Z)(Ze),[to]):Ze},[xo,Ze]),Hi=(0,Ut.useMemo)(function(){return xo?[].concat((0,$i.Z)(an),[to]):an},[xo,an]),Pr=(0,Ut.useMemo)(function(){var Ao=Zn.right,ho=Zn.left;return(0,te.Z)((0,te.Z)({},Zn),{},{left:Rn==="rtl"?[].concat((0,$i.Z)(ho.map(function(jo){return jo+xo})),[0]):ho,right:Rn==="rtl"?Ao:[].concat((0,$i.Z)(Ao.map(function(jo){return jo+xo})),[0]),isSticky:Cr})},[xo,Zn,Cr]),lo=or(hn,xn);return Ut.createElement("div",{style:(0,te.Z)({overflow:"hidden"},Cr?{top:zn,bottom:oi}:{}),ref:ko,className:Qe()(Se,(0,Ce.Z)({},ni,!!ni))},Ut.createElement(Br,{style:{tableLayout:"fixed",visibility:Be||lo?null:"hidden"}},(!Be||!Vi||Cs)&&Ut.createElement(cn,{colWidths:lo?[].concat((0,$i.Z)(lo),[xo]):[],columCount:xn+1,columns:Hi}),gr((0,te.Z)((0,te.Z)({},Mr),{},{stickyOffsets:Pr,columns:no,flattenColumns:Hi}))))}),qr=Ut.memo(is),rs=function(me){var Se=me.cells,Be=me.stickyOffsets,Ze=me.flattenColumns,an=me.rowComponent,hn=me.cellComponent,xn=me.onHeaderRow,Zn=me.index,Rn=Ae(bt,["prefixCls","direction"]),gi=Rn.prefixCls,zn=Rn.direction,oi;xn&&(oi=xn(Se.map(function(Ci){return Ci.column}),Zn));var ni=En(Se.map(function(Ci){return Ci.column}));return Ut.createElement(an,oi,Se.map(function(Ci,Vi){var gr=Ci.column,Mr=xr(Ci.colStart,Ci.colEnd,Ze,Be,zn),Ni;return gr&&gr.onHeaderCell&&(Ni=Ci.column.onHeaderCell(gr)),Ut.createElement(yr,(0,se.Z)({},Ci,{scope:gr.title?Ci.colSpan>1?"colgroup":"col":null,ellipsis:gr.ellipsis,align:gr.align,component:hn,prefixCls:gi,key:ni[Vi]},Mr,{additionalProps:Ni,rowType:"header"}))}))},ro=rs;function Ur(Zt){var me=[];function Se(hn,xn){var Zn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;me[Zn]=me[Zn]||[];var Rn=xn,gi=hn.filter(Boolean).map(function(zn){var oi={key:zn.key,className:zn.className||"",children:zn.title,column:zn,colStart:Rn},ni=1,Ci=zn.children;return Ci&&Ci.length>0&&(ni=Se(Ci,Rn,Zn+1).reduce(function(Vi,gr){return Vi+gr},0),oi.hasSubColumns=!0),"colSpan"in zn&&(ni=zn.colSpan),"rowSpan"in zn&&(oi.rowSpan=zn.rowSpan),oi.colSpan=ni,oi.colEnd=oi.colStart+ni-1,me[Zn].push(oi),Rn+=ni,ni});return gi}Se(Zt,0);for(var Be=me.length,Ze=function(xn){me[xn].forEach(function(Zn){!("rowSpan"in Zn)&&!Zn.hasSubColumns&&(Zn.rowSpan=Be-xn)})},an=0;an<Be;an+=1)Ze(an);return me}var Or=function(me){var Se=me.stickyOffsets,Be=me.columns,Ze=me.flattenColumns,an=me.onHeaderRow,hn=Ae(bt,["prefixCls","getComponent"]),xn=hn.prefixCls,Zn=hn.getComponent,Rn=Ut.useMemo(function(){return Ur(Be)},[Be]),gi=Zn(["header","wrapper"],"thead"),zn=Zn(["header","row"],"tr"),oi=Zn(["header","cell"],"th");return Ut.createElement(gi,{className:"".concat(xn,"-thead")},Rn.map(function(ni,Ci){var Vi=Ut.createElement(ro,{key:Ci,flattenColumns:Ze,cells:ni,stickyOffsets:Se,rowComponent:zn,cellComponent:oi,onHeaderRow:an,index:Ci});return Vi}))},Wo=ht(Or),oo=Qt(54768);function hi(Zt,me,Se){var Be=(0,Bi.g)(Zt),Ze=Be.expandIcon,an=Be.expandedRowKeys,hn=Be.defaultExpandedRowKeys,xn=Be.defaultExpandAllRows,Zn=Be.expandedRowRender,Rn=Be.onExpand,gi=Be.onExpandedRowsChange,zn=Be.childrenColumnName,oi=Ze||si,ni=zn||"children",Ci=Ut.useMemo(function(){return Zn?"row":Zt.expandable&&Zt.internalHooks===xt.R&&Zt.expandable.__PARENT_RENDER_ICON__||me.some(function(Cr){return Cr&&(0,re.Z)(Cr)==="object"&&Cr[ni]})?"nest":!1},[!!Zn,me]),Vi=Ut.useState(function(){return hn||(xn?Gi(me,Se,ni):[])}),gr=(0,Yt.Z)(Vi,2),Mr=gr[0],Ni=gr[1],ar=Ut.useMemo(function(){return new Set(an||Mr||[])},[an,Mr]),_i=Ut.useCallback(function(Cr){var eo=Se(Cr,me.indexOf(Cr)),Br,xo=ar.has(eo);xo?(ar.delete(eo),Br=(0,$i.Z)(ar)):Br=[].concat((0,$i.Z)(ar),[eo]),Ni(Br),Rn&&Rn(!xo,Cr),gi&&gi(Br)},[Se,ar,me,Rn,gi]);return[Be,Ci,ar,oi,ni,_i]}function Xt(Zt,me,Se){var Be=Zt.map(function(Ze,an){return xr(an,an,Zt,me,Se)});return je(function(){return Be},[Be],function(Ze,an){return!Gn(Ze,an)})}function An(Zt){var me=(0,Ut.useRef)(Zt),Se=(0,Ut.useState)({}),Be=(0,Yt.Z)(Se,2),Ze=Be[1],an=(0,Ut.useRef)(null),hn=(0,Ut.useRef)([]);function xn(Zn){hn.current.push(Zn);var Rn=Promise.resolve();an.current=Rn,Rn.then(function(){if(an.current===Rn){var gi=hn.current,zn=me.current;hn.current=[],gi.forEach(function(oi){me.current=oi(me.current)}),an.current=null,zn!==me.current&&Ze({})}})}return(0,Ut.useEffect)(function(){return function(){an.current=null}},[]),[me.current,xn]}function _s(Zt){var me=(0,Ut.useRef)(Zt||null),Se=(0,Ut.useRef)();function Be(){window.clearTimeout(Se.current)}function Ze(hn){me.current=hn,Be(),Se.current=window.setTimeout(function(){me.current=null,Se.current=void 0},100)}function an(){return me.current}return(0,Ut.useEffect)(function(){return Be},[]),[Ze,an]}function xs(){var Zt=Ut.useState(-1),me=(0,Yt.Z)(Zt,2),Se=me[0],Be=me[1],Ze=Ut.useState(-1),an=(0,Yt.Z)(Ze,2),hn=an[0],xn=an[1],Zn=Ut.useCallback(function(Rn,gi){Be(Rn),xn(gi)},[]);return[Se,hn,Zn]}var Xo=rn()?window:null;function Ms(Zt,me){var Se=(0,re.Z)(Zt)==="object"?Zt:{},Be=Se.offsetHeader,Ze=Be===void 0?0:Be,an=Se.offsetSummary,hn=an===void 0?0:an,xn=Se.offsetScroll,Zn=xn===void 0?0:xn,Rn=Se.getContainer,gi=Rn===void 0?function(){return Xo}:Rn,zn=gi()||Xo,oi=!!Zt;return Ut.useMemo(function(){return{isSticky:oi,stickyClassName:oi?"".concat(me,"-sticky-holder"):"",offsetHeader:Ze,offsetSummary:hn,offsetScroll:Zn,container:zn}},[oi,Zn,Ze,hn,me,zn])}function pa(Zt,me,Se){var Be=(0,Ut.useMemo)(function(){var Ze=me.length,an=function(Rn,gi,zn){for(var oi=[],ni=0,Ci=Rn;Ci!==gi;Ci+=zn)oi.push(ni),me[Ci].fixed&&(ni+=Zt[Ci]||0);return oi},hn=an(0,Ze,1),xn=an(Ze-1,-1,-1).reverse();return Se==="rtl"?{left:xn,right:hn}:{left:hn,right:xn}},[Zt,me,Se]);return Be}var _a=pa;function ma(Zt){var me=Zt.className,Se=Zt.children;return Ut.createElement("div",{className:me},Se)}var ki=ma;function Tr(Zt,me,Se,Be){var Ze=jt.unstable_batchedUpdates?function(hn){jt.unstable_batchedUpdates(Se,hn)}:Se;return Zt!=null&&Zt.addEventListener&&Zt.addEventListener(me,Ze,Be),{remove:function(){Zt!=null&&Zt.removeEventListener&&Zt.removeEventListener(me,Ze,Be)}}}var Oi=function(me){return+setTimeout(me,16)},bi=function(me){return clearTimeout(me)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Oi=function(me){return window.requestAnimationFrame(me)},bi=function(me){return window.cancelAnimationFrame(me)});var hr=0,ln=new Map;function cr(Zt){ln.delete(Zt)}var Wr=function(me){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;hr+=1;var Be=hr;function Ze(an){if(an===0)cr(Be),me();else{var hn=Oi(function(){Ze(an-1)});ln.set(Be,hn)}}return Ze(Se),Be};Wr.cancel=function(Zt){var me=ln.get(Zt);return cr(Zt),bi(me)};var Ko=Wr;function Go(Zt){return Zt instanceof HTMLElement||Zt instanceof SVGElement}function ws(Zt){return Zt&&(0,re.Z)(Zt)==="object"&&Go(Zt.nativeElement)?Zt.nativeElement:Go(Zt)?Zt:null}function Zs(Zt){var me=ws(Zt);if(me)return me;if(Zt instanceof React.Component){var Se;return(Se=ReactDOM.findDOMNode)===null||Se===void 0?void 0:Se.call(ReactDOM,Zt)}return null}function Qa(Zt){var me=ws(Zt),Se=me.getBoundingClientRect(),Be=document.documentElement;return{left:Se.left+(window.pageXOffset||Be.scrollLeft)-(Be.clientLeft||document.body.clientLeft||0),top:Se.top+(window.pageYOffset||Be.scrollTop)-(Be.clientTop||document.body.clientTop||0)}}var Na=function(me,Se){var Be,Ze,an=me.scrollBodyRef,hn=me.onScroll,xn=me.offsetScroll,Zn=me.container,Rn=me.direction,gi=Ae(bt,"prefixCls"),zn=((Be=an.current)===null||Be===void 0?void 0:Be.scrollWidth)||0,oi=((Ze=an.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,ni=zn&&oi*(oi/zn),Ci=Ut.useRef(),Vi=An({scrollLeft:0,isHiddenScrollBar:!0}),gr=(0,Yt.Z)(Vi,2),Mr=gr[0],Ni=gr[1],ar=Ut.useRef({delta:0,x:0}),_i=Ut.useState(!1),Cr=(0,Yt.Z)(_i,2),eo=Cr[0],Br=Cr[1],xo=Ut.useRef(null);Ut.useEffect(function(){return function(){Ko.cancel(xo.current)}},[]);var Yr=function(){Br(!1)},ko=function(Hi){Hi.persist(),ar.current.delta=Hi.pageX-Mr.scrollLeft,ar.current.x=0,Br(!0),Hi.preventDefault()},Cs=function(Hi){var Pr,lo=Hi||((Pr=window)===null||Pr===void 0?void 0:Pr.event),Ao=lo.buttons;if(!eo||Ao===0){eo&&Br(!1);return}var ho=ar.current.x+Hi.pageX-ar.current.x-ar.current.delta,jo=Rn==="rtl";ho=Math.max(jo?ni-oi:0,Math.min(jo?0:oi-ni,ho));var mo=!jo||Math.abs(ho)+Math.abs(ni)<oi;mo&&(hn({scrollLeft:ho/oi*(zn+2)}),ar.current.x=Hi.pageX)},To=function(){Ko.cancel(xo.current),xo.current=Ko(function(){if(an.current){var Hi=Qa(an.current).top,Pr=Hi+an.current.offsetHeight,lo=Zn===window?document.documentElement.scrollTop+window.innerHeight:Qa(Zn).top+Zn.clientHeight;Pr-Zi()<=lo||Hi>=lo-xn?Ni(function(Ao){return(0,te.Z)((0,te.Z)({},Ao),{},{isHiddenScrollBar:!0})}):Ni(function(Ao){return(0,te.Z)((0,te.Z)({},Ao),{},{isHiddenScrollBar:!1})})}})},to=function(Hi){Ni(function(Pr){return(0,te.Z)((0,te.Z)({},Pr),{},{scrollLeft:Hi/zn*oi||0})})};return Ut.useImperativeHandle(Se,function(){return{setScrollLeft:to,checkScrollBarVisible:To}}),Ut.useEffect(function(){var no=Tr(document.body,"mouseup",Yr,!1),Hi=Tr(document.body,"mousemove",Cs,!1);return To(),function(){no.remove(),Hi.remove()}},[ni,eo]),Ut.useEffect(function(){if(an.current){for(var no=[],Hi=ws(an.current);Hi;)no.push(Hi),Hi=Hi.parentElement;return no.forEach(function(Pr){return Pr.addEventListener("scroll",To,!1)}),window.addEventListener("resize",To,!1),window.addEventListener("scroll",To,!1),Zn.addEventListener("scroll",To,!1),function(){no.forEach(function(Pr){return Pr.removeEventListener("scroll",To)}),window.removeEventListener("resize",To),window.removeEventListener("scroll",To),Zn.removeEventListener("scroll",To)}}},[Zn]),Ut.useEffect(function(){Mr.isHiddenScrollBar||Ni(function(no){var Hi=an.current;return Hi?(0,te.Z)((0,te.Z)({},no),{},{scrollLeft:Hi.scrollLeft/Hi.scrollWidth*Hi.clientWidth}):no})},[Mr.isHiddenScrollBar]),zn<=oi||!ni||Mr.isHiddenScrollBar?null:Ut.createElement("div",{style:{height:Zi(),width:oi,bottom:xn},className:"".concat(gi,"-sticky-scroll")},Ut.createElement("div",{onMouseDown:ko,ref:Ci,className:Qe()("".concat(gi,"-sticky-scroll-bar"),(0,Ce.Z)({},"".concat(gi,"-sticky-scroll-bar-active"),eo)),style:{width:"".concat(ni,"px"),transform:"translate3d(".concat(Mr.scrollLeft,"px, 0, 0)")}}))},nl=Ut.forwardRef(Na);function Vl(Zt){return null}var nn=Vl;function il(Zt){return null}var au=il,Xu="rc-table",Ps=[],lu={};function cA(){return"No Data"}function Ju(Zt,me){var Se=(0,te.Z)({rowKey:"key",prefixCls:Xu,emptyText:cA},Zt),Be=Se.prefixCls,Ze=Se.className,an=Se.rowClassName,hn=Se.style,xn=Se.data,Zn=Se.rowKey,Rn=Se.scroll,gi=Se.tableLayout,zn=Se.direction,oi=Se.title,ni=Se.footer,Ci=Se.summary,Vi=Se.caption,gr=Se.id,Mr=Se.showHeader,Ni=Se.components,ar=Se.emptyText,_i=Se.onRow,Cr=Se.onHeaderRow,eo=Se.onScroll,Br=Se.internalHooks,xo=Se.transformColumns,Yr=Se.internalRefs,ko=Se.tailor,Cs=Se.getContainerWidth,To=Se.sticky,to=Se.rowHoverable,no=to===void 0?!0:to,Hi=xn||Ps,Pr=!!Hi.length,lo=Br===xt.R,Ao=Ut.useCallback(function(as,Eo){return Yn(Ni,as)||Eo},[Ni]),ho=Ut.useMemo(function(){return typeof Zn=="function"?Zn:function(as){var Eo=as&&as[Zn];return Eo}},[Zn]),jo=Ao(["body"]),mo=xs(),hs=(0,Yt.Z)(mo,3),Ss=hs[0],Os=hs[1],ja=hs[2],oa=hi(Se,Hi,ho),Co=(0,Yt.Z)(oa,6),zo=Co[0],Yo=Co[1],cs=Co[2],Ro=Co[3],Kr=Co[4],No=Co[5],wa=Rn==null?void 0:Rn.x,dl=Ut.useState(0),Ya=(0,Yt.Z)(dl,2),bl=Ya[0],Tl=Ya[1],Au=(0,oo.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},Se),zo),{},{expandable:!!zo.expandedRowRender,columnTitle:zo.columnTitle,expandedKeys:cs,getRowKey:ho,onTriggerExpand:No,expandIcon:Ro,expandIconColumnIndex:zo.expandIconColumnIndex,direction:zn,scrollWidth:lo&&ko&&typeof wa=="number"?wa:null,clientWidth:bl}),lo?xo:null),so=(0,Yt.Z)(Au,4),Nl=so[0],ms=so[1],za=so[2],Xa=so[3],qo=za!=null?za:wa,gA=Ut.useMemo(function(){return{columns:Nl,flattenColumns:ms}},[Nl,ms]),Xl=Ut.useRef(),Cu=Ut.useRef(),qs=Ut.useRef(),hu=Ut.useRef();Ut.useImperativeHandle(me,function(){return{nativeElement:Xl.current,scrollTo:function(Eo){var Oa;if(qs.current instanceof HTMLElement){var Il=Eo.index,al=Eo.top,sa=Eo.key;if(Ve(al)){var Ca;(Ca=qs.current)===null||Ca===void 0||Ca.scrollTo({top:al})}else{var IA,aa=sa!=null?sa:ho(Hi[Il]);(IA=qs.current.querySelector('[data-row-key="'.concat(aa,'"]')))===null||IA===void 0||IA.scrollIntoView()}}else(Oa=qs.current)!==null&&Oa!==void 0&&Oa.scrollTo&&qs.current.scrollTo(Eo)}}});var Pu=Ut.useRef(),XA=Ut.useState(!1),jh=(0,Yt.Z)(XA,2),JA=jh[0],sl=jh[1],pA=Ut.useState(!1),Ja=(0,Yt.Z)(pA,2),cu=Ja[0],kr=Ja[1],eA=An(new Map),xh=(0,Yt.Z)(eA,2),mA=xh[0],Jl=xh[1],vA=En(ms),du=vA.map(function(as){return mA.get(as)}),Hu=Ut.useMemo(function(){return du},[du.join("_")]),Fu=_a(Hu,ms,zn),Hs=Rn&&Xn(Rn.y),fl=Rn&&Xn(qo)||!!zo.fixed,Ru=fl&&ms.some(function(as){var Eo=as.fixed;return Eo}),yl=Ut.useRef(),wl=Ms(To,Be),Va=wl.isSticky,Bh=wl.offsetHeader,qA=wl.offsetSummary,Sa=wl.offsetScroll,NA=wl.stickyClassName,nA=wl.container,Wa=Ut.useMemo(function(){return Ci==null?void 0:Ci(Hi)},[Ci,Hi]),_u=(Hs||Va)&&Ut.isValidElement(Wa)&&Wa.type===ys&&Wa.props.fixed,$A,Ku,zh;Hs&&(Ku={overflowY:Pr?"scroll":"auto",maxHeight:Rn.y}),fl&&($A={overflowX:"auto"},Hs||(Ku={overflowY:"hidden"}),zh={width:qo===!0?"auto":qo,minWidth:"100%"});var yA=Ut.useCallback(function(as,Eo){jn(Xl.current)&&Jl(function(Oa){if(Oa.get(as)!==Eo){var Il=new Map(Oa);return Il.set(as,Eo),Il}return Oa})},[]),ql=_s(null),wA=(0,Yt.Z)(ql,2),Vh=wA[0],co=wA[1];function Jr(as,Eo){Eo&&(typeof Eo=="function"?Eo(as):Eo.scrollLeft!==as&&(Eo.scrollLeft=as,Eo.scrollLeft!==as&&setTimeout(function(){Eo.scrollLeft=as},0)))}var jr=Me(function(as){var Eo=as.currentTarget,Oa=as.scrollLeft,Il=zn==="rtl",al=typeof Oa=="number"?Oa:Eo.scrollLeft,sa=Eo||lu;if(!co()||co()===sa){var Ca;Vh(sa),Jr(al,Cu.current),Jr(al,qs.current),Jr(al,Pu.current),Jr(al,(Ca=yl.current)===null||Ca===void 0?void 0:Ca.setScrollLeft)}var IA=Eo||Cu.current;if(IA){var aa=lo&&ko&&typeof qo=="number"?qo:IA.scrollWidth,th=IA.clientWidth;if(aa===th){sl(!1),kr(!1);return}Il?(sl(-al<aa-th),kr(-al>0)):(sl(al>0),kr(al<aa-th))}}),bs=Me(function(as){jr(as),eo==null||eo(as)}),Ma=function(){if(fl&&qs.current){var Eo;jr({currentTarget:ws(qs.current),scrollLeft:(Eo=qs.current)===null||Eo===void 0?void 0:Eo.scrollLeft})}else sl(!1),kr(!1)},DA=function(Eo){var Oa,Il=Eo.width;(Oa=yl.current)===null||Oa===void 0||Oa.checkScrollBarVisible();var al=Xl.current?Xl.current.offsetWidth:Il;lo&&Cs&&Xl.current&&(al=Cs(Xl.current,al)||al),al!==bl&&(Ma(),Tl(al))},Eu=Ut.useRef(!1);Ut.useEffect(function(){Eu.current&&Ma()},[fl,xn,Nl.length]),Ut.useEffect(function(){Eu.current=!0},[]);var Ue=Ut.useState(0),iA=(0,Yt.Z)(Ue,2),Sl=iA[0],Ch=iA[1],Oc=Ut.useState(!0),yc=(0,Yt.Z)(Oc,2),Wh=yc[0],Af=yc[1];Ut.useEffect(function(){(!ko||!lo)&&(qs.current instanceof Element?Ch(ur(qs.current).width):Ch(ur(hu.current).width)),Af(Wn("position","sticky"))},[]),Ut.useEffect(function(){lo&&Yr&&(Yr.body.current=qs.current)});var qa=Ut.useCallback(function(as){return Ut.createElement(Ut.Fragment,null,Ut.createElement(Wo,as),_u==="top"&&Ut.createElement(Lr,as,Wa))},[_u,Wa]),Zh=Ut.useCallback(function(as){return Ut.createElement(Lr,as,Wa)},[Wa]),wc=Ao(["table"],"table"),Ph=Ut.useMemo(function(){return gi||(Ru?qo==="max-content"?"auto":"fixed":Hs||Va||ms.some(function(as){var Eo=as.ellipsis;return Eo})?"fixed":"auto")},[Hs,Ru,ms,gi,Va]),Hc,Rc={colWidths:Hu,columCount:ms.length,stickyOffsets:Fu,onHeaderRow:Cr,fixHeader:Hs,scroll:Rn},Ld=Ut.useMemo(function(){return Pr?null:typeof ar=="function"?ar():ar},[Pr,ar]),$l=Ut.createElement(ci,{data:Hi,measureColumnWidth:Hs||fl||Va}),xl=Ut.createElement(cn,{colWidths:ms.map(function(as){var Eo=as.width;return Eo}),columns:ms}),Fh=Vi!=null?Ut.createElement("caption",{className:"".concat(Be,"-caption")},Vi):void 0,Md=Ee(Se,{data:!0}),rA=Ee(Se,{aria:!0});if(Hs||Va){var Eh;typeof jo=="function"?(Eh=jo(Hi,{scrollbarSize:Sl,ref:qs,onScroll:jr}),Rc.colWidths=ms.map(function(as,Eo){var Oa=as.width,Il=Eo===ms.length-1?Oa-Sl:Oa;return typeof Il=="number"&&!Number.isNaN(Il)?Il:0})):Eh=Ut.createElement("div",{style:(0,te.Z)((0,te.Z)({},$A),Ku),onScroll:bs,ref:qs,className:Qe()("".concat(Be,"-body"))},Ut.createElement(wc,(0,se.Z)({style:(0,te.Z)((0,te.Z)({},zh),{},{tableLayout:Ph})},rA),Fh,xl,$l,!_u&&Wa&&Ut.createElement(Lr,{stickyOffsets:Fu,flattenColumns:ms},Wa)));var Sc=(0,te.Z)((0,te.Z)((0,te.Z)({noData:!Hi.length,maxContentScroll:fl&&qo==="max-content"},Rc),gA),{},{direction:zn,stickyClassName:NA,onScroll:jr});Hc=Ut.createElement(Ut.Fragment,null,Mr!==!1&&Ut.createElement(qr,(0,se.Z)({},Sc,{stickyTopOffset:Bh,className:"".concat(Be,"-header"),ref:Cu}),qa),Eh,_u&&_u!=="top"&&Ut.createElement(qr,(0,se.Z)({},Sc,{stickyBottomOffset:qA,className:"".concat(Be,"-summary"),ref:Pu}),Zh),Va&&qs.current&&qs.current instanceof Element&&Ut.createElement(nl,{ref:yl,offsetScroll:Sa,scrollBodyRef:qs,onScroll:jr,container:nA,direction:zn}))}else Hc=Ut.createElement("div",{style:(0,te.Z)((0,te.Z)({},$A),Ku),className:Qe()("".concat(Be,"-content")),onScroll:jr,ref:qs},Ut.createElement(wc,(0,se.Z)({style:(0,te.Z)((0,te.Z)({},zh),{},{tableLayout:Ph})},rA),Fh,xl,Mr!==!1&&Ut.createElement(Wo,(0,se.Z)({},Rc,gA)),$l,Wa&&Ut.createElement(Lr,{stickyOffsets:Fu,flattenColumns:ms},Wa)));var Lh=Ut.createElement("div",(0,se.Z)({className:Qe()(Be,Ze,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Be,"-rtl"),zn==="rtl"),"".concat(Be,"-ping-left"),JA),"".concat(Be,"-ping-right"),cu),"".concat(Be,"-layout-fixed"),gi==="fixed"),"".concat(Be,"-fixed-header"),Hs),"".concat(Be,"-fixed-column"),Ru),"".concat(Be,"-fixed-column-gapped"),Ru&&Xa),"".concat(Be,"-scroll-horizontal"),fl),"".concat(Be,"-has-fix-left"),ms[0]&&ms[0].fixed),"".concat(Be,"-has-fix-right"),ms[ms.length-1]&&ms[ms.length-1].fixed==="right")),style:hn,id:gr,ref:Xl},Md),oi&&Ut.createElement(ki,{className:"".concat(Be,"-title")},oi(Hi)),Ut.createElement("div",{ref:hu,className:"".concat(Be,"-container")},Hc),ni&&Ut.createElement(ki,{className:"".concat(Be,"-footer")},ni(Hi)));fl&&(Lh=Ut.createElement(Mt.Z,{onResize:DA},Lh));var Dl=Xt(ms,Fu,zn),kd=Ut.useMemo(function(){return{scrollX:qo,prefixCls:Be,getComponent:Ao,scrollbarSize:Sl,direction:zn,fixedInfoList:Dl,isSticky:Va,supportSticky:Wh,componentWidth:bl,fixHeader:Hs,fixColumn:Ru,horizonScroll:fl,tableLayout:Ph,rowClassName:an,expandedRowClassName:zo.expandedRowClassName,expandIcon:Ro,expandableType:Yo,expandRowByClick:zo.expandRowByClick,expandedRowRender:zo.expandedRowRender,onTriggerExpand:No,expandIconColumnIndex:zo.expandIconColumnIndex,indentSize:zo.indentSize,allColumnsFixedLeft:ms.every(function(as){return as.fixed==="left"}),emptyNode:Ld,columns:Nl,flattenColumns:ms,onColumnResize:yA,hoverStartRow:Ss,hoverEndRow:Os,onHover:ja,rowExpandable:zo.rowExpandable,onRow:_i,getRowKey:ho,expandedKeys:cs,childrenColumnName:Kr,rowHoverable:no}},[qo,Be,Ao,Sl,zn,Dl,Va,Wh,bl,Hs,Ru,fl,Ph,an,zo.expandedRowClassName,Ro,Yo,zo.expandRowByClick,zo.expandedRowRender,No,zo.expandIconColumnIndex,zo.indentSize,Ld,Nl,ms,yA,Ss,Os,ja,zo.rowExpandable,_i,ho,cs,Kr,no]);return Ut.createElement(bt.Provider,{value:kd},Lh)}var us=Ut.forwardRef(Ju);function Ys(Zt){return at(us,Zt)}var Vr=Ys();Vr.EXPAND_COLUMN=xt.w,Vr.INTERNAL_HOOKS=xt.R,Vr.Column=nn,Vr.ColumnGroup=au,Vr.Summary=Pn;var So=Vr;function os(Zt){var me=Ut.useRef();me.current=Zt;var Se=Ut.useCallback(function(){for(var Be,Ze=arguments.length,an=new Array(Ze),hn=0;hn<Ze;hn++)an[hn]=arguments[hn];return(Be=me.current)===null||Be===void 0?void 0:Be.call.apply(Be,[me].concat(an))},[]);return Se}function ks(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var nr=ks()?Ut.useLayoutEffect:Ut.useEffect,gh=function(me,Se){var Be=Ut.useRef(!0);nr(function(){return me(Be.current)},Se),nr(function(){return Be.current=!1,function(){Be.current=!0}},[])},qu=function(me,Se){gh(function(Be){if(!Be)return me()},Se)},ml=gh;function ph(Zt){var me=React.useRef(!1),Se=React.useState(Zt),Be=_slicedToArray(Se,2),Ze=Be[0],an=Be[1];React.useEffect(function(){return me.current=!1,function(){me.current=!0}},[]);function hn(xn,Zn){Zn&&me.current||an(xn)}return[Ze,hn]}function Uu(Zt){return Zt!==void 0}function Ei(Zt,me){var Se=me||{},Be=Se.defaultValue,Ze=Se.value,an=Se.onChange,hn=Se.postState,xn=useState(function(){return Uu(Ze)?Ze:Uu(Be)?typeof Be=="function"?Be():Be:typeof Zt=="function"?Zt():Zt}),Zn=_slicedToArray(xn,2),Rn=Zn[0],gi=Zn[1],zn=Ze!==void 0?Ze:Rn,oi=hn?hn(zn):zn,ni=useEvent(an),Ci=useState([zn]),Vi=_slicedToArray(Ci,2),gr=Vi[0],Mr=Vi[1];useLayoutUpdateEffect(function(){var ar=gr[0];Rn!==ar&&ni(Rn,ar)},[gr]),useLayoutUpdateEffect(function(){Uu(Ze)||gi(Ze)},[Ze]);var Ni=useEvent(function(ar,_i){gi(ar,_i),Mr([zn],_i)});return[oi,Ni]}function Aa(Zt,me,Se){var Be=React.useRef({});return(!("value"in Be.current)||Se(Be.current.condition,me))&&(Be.current.value=Zt(),Be.current.condition=me),Be.current.value}function ta(Zt,me){typeof Zt=="function"?Zt(me):_typeof(Zt)==="object"&&Zt&&"current"in Zt&&(Zt.current=me)}function uu(){for(var Zt=arguments.length,me=new Array(Zt),Se=0;Se<Zt;Se++)me[Se]=arguments[Se];var Be=me.filter(function(Ze){return Ze});return Be.length<=1?Be[0]:function(Ze){me.forEach(function(an){ta(an,Ze)})}}function ZA(){for(var Zt=arguments.length,me=new Array(Zt),Se=0;Se<Zt;Se++)me[Se]=arguments[Se];return useMemo(function(){return uu.apply(void 0,me)},me,function(Be,Ze){return Be.length!==Ze.length||Be.every(function(an,hn){return an!==Ze[hn]})})}function Bu(Zt){var me,Se,Be=isMemo(Zt)?Zt.type.type:Zt.type;return!(typeof Be=="function"&&!((me=Be.prototype)!==null&&me!==void 0&&me.render)||typeof Zt=="function"&&!((Se=Zt.prototype)!==null&&Se!==void 0&&Se.render))}function Zr(Zt){return!isValidElement(Zt)||isFragment(Zt)?!1:Bu(Zt)}function Fs(Zt,me,Se,Be){if(!me.length)return Se;var Ze=_toArray(me),an=Ze[0],hn=Ze.slice(1),xn;return!Zt&&typeof an=="number"?xn=[]:Array.isArray(Zt)?xn=_toConsumableArray(Zt):xn=_objectSpread({},Zt),Be&&Se===void 0&&hn.length===1?delete xn[an][hn[0]]:xn[an]=Fs(xn[an],hn,Se,Be),xn}function zi(Zt,me,Se){var Be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return me.length&&Be&&Se===void 0&&!get(Zt,me.slice(0,-1))?Zt:Fs(Zt,me,Se,Be)}function $r(Zt){return _typeof(Zt)==="object"&&Zt!==null&&Object.getPrototypeOf(Zt)===Object.prototype}function Po(Zt){return Array.isArray(Zt)?[]:{}}var Ka=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Da(){for(var Zt=arguments.length,me=new Array(Zt),Se=0;Se<Zt;Se++)me[Se]=arguments[Se];var Be=Po(me[0]);return me.forEach(function(Ze){function an(hn,xn){var Zn=new Set(xn),Rn=get(Ze,hn),gi=Array.isArray(Rn);if(gi||$r(Rn)){if(!Zn.has(Rn)){Zn.add(Rn);var zn=get(Be,hn);gi?Be=zi(Be,hn,[]):(!zn||_typeof(zn)!=="object")&&(Be=zi(Be,hn,Po(Rn))),Ka(Rn).forEach(function(oi){an([].concat(_toConsumableArray(hn),[oi]),Zn)})}}else Be=zi(Be,hn,Rn)}an([])}),Be}var Xs={},va=[],Ks=function(me){va.push(me)};function mh(Zt,me){if(0)var Se}function Ia(Zt,me){if(0)var Se}function Qu(){Xs={}}function Zo(Zt,me,Se){!me&&!Xs[Se]&&(Zt(!1,Se),Xs[Se]=!0)}function Wl(Zt,me){Zo(mh,Zt,me)}function As(Zt,me){Zo(Ia,Zt,me)}Wl.preMessage=Ks,Wl.resetWarned=Qu,Wl.noteOnce=As;var xa=null,Ga=Ut.forwardRef(function(Zt,me){var Se=Zt.height,Be=Zt.offsetY,Ze=Zt.offsetX,an=Zt.children,hn=Zt.prefixCls,xn=Zt.onInnerResize,Zn=Zt.innerProps,Rn=Zt.rtl,gi=Zt.extra,zn={},oi={display:"flex",flexDirection:"column"};return Be!==void 0&&(zn={height:Se,position:"relative",overflow:"hidden"},oi=(0,te.Z)((0,te.Z)({},oi),{},(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({transform:"translateY(".concat(Be,"px)")},Rn?"marginRight":"marginLeft",-Ze),"position","absolute"),"left",0),"right",0),"top",0))),Ut.createElement("div",{style:zn},Ut.createElement(Mt.Z,{onResize:function(Ci){var Vi=Ci.offsetHeight;Vi&&xn&&xn()}},Ut.createElement("div",(0,se.Z)({style:oi,className:Qe()((0,Ce.Z)({},"".concat(hn,"-holder-inner"),hn)),ref:me},Zn),an,gi)))});Ga.displayName="Filler";var YA=Ga;function dA(Zt){var me=Zt.children,Se=Zt.setRef,Be=Ut.useCallback(function(Ze){Se(Ze)},[]);return Ut.cloneElement(me,{ref:Be})}function Es(Zt,me,Se,Be,Ze,an,hn,xn){var Zn=xn.getKey;return Zt.slice(me,Se+1).map(function(Rn,gi){var zn=me+gi,oi=hn(Rn,zn,{style:{width:Be},offsetX:Ze}),ni=Zn(Rn);return Ut.createElement(dA,{key:ni,setRef:function(Vi){return an(Rn,Vi)}},oi)})}function vh(Zt,me,Se,Be){var Ze=Se-Zt,an=me-Se,hn=Math.min(Ze,an)*2;if(Be<=hn){var xn=Math.floor(Be/2);return Be%2?Se+xn+1:Se-xn}return Ze>an?Se-(Be-an):Se+(Be-Ze)}function hl(Zt,me,Se){var Be=Zt.length,Ze=me.length,an,hn;if(Be===0&&Ze===0)return null;Be<Ze?(an=Zt,hn=me):(an=me,hn=Zt);var xn={__EMPTY_ITEM__:!0};function Zn(Ci){return Ci!==void 0?Se(Ci):xn}for(var Rn=null,gi=Math.abs(Be-Ze)!==1,zn=0;zn<hn.length;zn+=1){var oi=Zn(an[zn]),ni=Zn(hn[zn]);if(oi!==ni){Rn=zn,gi=gi||oi!==Zn(hn[zn+1]);break}}return Rn===null?null:{index:Rn,multiple:gi}}function ea(Zt,me,Se){var Be=Ut.useState(Zt),Ze=(0,Yt.Z)(Be,2),an=Ze[0],hn=Ze[1],xn=Ut.useState(null),Zn=(0,Yt.Z)(xn,2),Rn=Zn[0],gi=Zn[1];return Ut.useEffect(function(){var zn=hl(an||[],Zt||[],me);(zn==null?void 0:zn.index)!==void 0&&(Se==null||Se(zn.index),gi(Zt[zn.index])),hn(Zt)},[Zt]),[Rn]}var Ml=function(me){return+setTimeout(me,16)},na=function(me){return clearTimeout(me)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ml=function(me){return window.requestAnimationFrame(me)},na=function(me){return window.cancelAnimationFrame(me)});var ps=0,Ds=new Map;function Ba(Zt){Ds.delete(Zt)}var Gh=function(me){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ps+=1;var Be=ps;function Ze(an){if(an===0)Ba(Be),me();else{var hn=Ml(function(){Ze(an-1)});Ds.set(Be,hn)}}return Ze(Se),Be};Gh.cancel=function(Zt){var me=Ds.get(Zt);return Ba(me),na(me)};var kl=Gh,ia=(typeof navigator=="undefined"?"undefined":(0,re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),pc=ia,LA=function(Zt,me,Se,Be){var Ze=(0,Ut.useRef)(!1),an=(0,Ut.useRef)(null);function hn(){clearTimeout(an.current),Ze.current=!0,an.current=setTimeout(function(){Ze.current=!1},50)}var xn=(0,Ut.useRef)({top:Zt,bottom:me,left:Se,right:Be});return xn.current.top=Zt,xn.current.bottom=me,xn.current.left=Se,xn.current.right=Be,function(Zn,Rn){var gi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,zn=Zn?Rn<0&&xn.current.left||Rn>0&&xn.current.right:Rn<0&&xn.current.top||Rn>0&&xn.current.bottom;return gi&&zn?(clearTimeout(an.current),Ze.current=!1):(!zn||Ze.current)&&hn(),!Ze.current&&zn}};function Ou(Zt,me,Se,Be,Ze,an,hn){var xn=(0,Ut.useRef)(0),Zn=(0,Ut.useRef)(null),Rn=(0,Ut.useRef)(null),gi=(0,Ut.useRef)(!1),zn=LA(me,Se,Be,Ze);function oi(Ni,ar){if(kl.cancel(Zn.current),!zn(!1,ar)){var _i=Ni;if(!_i._virtualHandled)_i._virtualHandled=!0;else return;xn.current+=ar,Rn.current=ar,pc||_i.preventDefault(),Zn.current=kl(function(){var Cr=gi.current?10:1;hn(xn.current*Cr,!1),xn.current=0})}}function ni(Ni,ar){hn(ar,!0),pc||Ni.preventDefault()}var Ci=(0,Ut.useRef)(null),Vi=(0,Ut.useRef)(null);function gr(Ni){if(Zt){kl.cancel(Vi.current),Vi.current=kl(function(){Ci.current=null},2);var ar=Ni.deltaX,_i=Ni.deltaY,Cr=Ni.shiftKey,eo=ar,Br=_i;(Ci.current==="sx"||!Ci.current&&Cr&&_i&&!ar)&&(eo=_i,Br=0,Ci.current="sx");var xo=Math.abs(eo),Yr=Math.abs(Br);Ci.current===null&&(Ci.current=an&&xo>Yr?"x":"y"),Ci.current==="y"?oi(Ni,Br):ni(Ni,eo)}}function Mr(Ni){Zt&&(gi.current=Ni.detail===Rn.current)}return[gr,Mr]}function vr(Zt,me,Se,Be){var Ze=Ut.useMemo(function(){return[new Map,[]]},[Zt,Se.id,Be]),an=(0,Yt.Z)(Ze,2),hn=an[0],xn=an[1],Zn=function(gi){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi,oi=hn.get(gi),ni=hn.get(zn);if(oi===void 0||ni===void 0)for(var Ci=Zt.length,Vi=xn.length;Vi<Ci;Vi+=1){var gr,Mr=Zt[Vi],Ni=me(Mr);hn.set(Ni,Vi);var ar=(gr=Se.get(Ni))!==null&&gr!==void 0?gr:Be;if(xn[Vi]=(xn[Vi-1]||0)+ar,Ni===gi&&(oi=Vi),Ni===zn&&(ni=Vi),oi!==void 0&&ni!==void 0)break}return{top:xn[oi-1]||0,bottom:xn[ni]}};return Zn}var Pd=Qt(15671),Pe=Qt(43144),Un=function(){function Zt(){(0,Pd.Z)(this,Zt),(0,Ce.Z)(this,"maps",void 0),(0,Ce.Z)(this,"id",0),(0,Ce.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Pe.Z)(Zt,[{key:"set",value:function(Se,Be){this.maps[Se]=Be,this.id+=1,this.diffKeys.add(Se)}},{key:"get",value:function(Se){return this.maps[Se]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Zt}(),lf=Un;function Fd(Zt){var me=parseFloat(Zt);return isNaN(me)?0:me}function rl(Zt,me,Se){var Be=Ut.useState(0),Ze=(0,Yt.Z)(Be,2),an=Ze[0],hn=Ze[1],xn=(0,Ut.useRef)(new Map),Zn=(0,Ut.useRef)(new lf),Rn=(0,Ut.useRef)(0);function gi(){Rn.current+=1}function zn(){var ni=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;gi();var Ci=function(){var Mr=!1;xn.current.forEach(function(Ni,ar){if(Ni&&Ni.offsetParent){var _i=Ni.offsetHeight,Cr=getComputedStyle(Ni),eo=Cr.marginTop,Br=Cr.marginBottom,xo=Fd(eo),Yr=Fd(Br),ko=_i+xo+Yr;Zn.current.get(ar)!==ko&&(Zn.current.set(ar,ko),Mr=!0)}}),Mr&&hn(function(Ni){return Ni+1})};if(ni)Ci();else{Rn.current+=1;var Vi=Rn.current;Promise.resolve().then(function(){Vi===Rn.current&&Ci()})}}function oi(ni,Ci){var Vi=Zt(ni),gr=xn.current.get(Vi);Ci?(xn.current.set(Vi,Ci),zn()):xn.current.delete(Vi),!gr!=!Ci&&(Ci?me==null||me(ni):Se==null||Se(ni))}return(0,Ut.useEffect)(function(){return gi},[]),[oi,zn,Zn.current,an]}var $u=14/15;function yh(Zt,me,Se){var Be=(0,Ut.useRef)(!1),Ze=(0,Ut.useRef)(0),an=(0,Ut.useRef)(0),hn=(0,Ut.useRef)(null),xn=(0,Ut.useRef)(null),Zn,Rn=function(ni){if(Be.current){var Ci=Math.ceil(ni.touches[0].pageX),Vi=Math.ceil(ni.touches[0].pageY),gr=Ze.current-Ci,Mr=an.current-Vi,Ni=Math.abs(gr)>Math.abs(Mr);Ni?Ze.current=Ci:an.current=Vi;var ar=Se(Ni,Ni?gr:Mr,!1,ni);ar&&ni.preventDefault(),clearInterval(xn.current),ar&&(xn.current=setInterval(function(){Ni?gr*=$u:Mr*=$u;var _i=Math.floor(Ni?gr:Mr);(!Se(Ni,_i,!0)||Math.abs(_i)<=.1)&&clearInterval(xn.current)},16))}},gi=function(){Be.current=!1,Zn()},zn=function(ni){Zn(),ni.touches.length===1&&!Be.current&&(Be.current=!0,Ze.current=Math.ceil(ni.touches[0].pageX),an.current=Math.ceil(ni.touches[0].pageY),hn.current=ni.target,hn.current.addEventListener("touchmove",Rn,{passive:!1}),hn.current.addEventListener("touchend",gi,{passive:!0}))};Zn=function(){hn.current&&(hn.current.removeEventListener("touchmove",Rn),hn.current.removeEventListener("touchend",gi))},ml(function(){return Zt&&me.current.addEventListener("touchstart",zn,{passive:!0}),function(){var oi;(oi=me.current)===null||oi===void 0||oi.removeEventListener("touchstart",zn),Zn(),clearInterval(xn.current)}},[Zt])}function mc(Zt){return Math.floor(Math.pow(Zt,.5))}function fA(Zt,me){var Se="touches"in Zt?Zt.touches[0]:Zt;return Se[me?"pageX":"pageY"]-window[me?"scrollX":"scrollY"]}function Js(Zt,me,Se){Ut.useEffect(function(){var Be=me.current;if(Zt&&Be){var Ze=!1,an,hn,xn=function(){kl.cancel(an)},Zn=function oi(){xn(),an=kl(function(){Se(hn),oi()})},Rn=function(ni){if(!(ni.target.draggable||ni.button!==0)){var Ci=ni;Ci._virtualHandled||(Ci._virtualHandled=!0,Ze=!0)}},gi=function(){Ze=!1,xn()},zn=function(ni){if(Ze){var Ci=fA(ni,!1),Vi=Be.getBoundingClientRect(),gr=Vi.top,Mr=Vi.bottom;if(Ci<=gr){var Ni=gr-Ci;hn=-mc(Ni),Zn()}else if(Ci>=Mr){var ar=Ci-Mr;hn=mc(ar),Zn()}else xn()}};return Be.addEventListener("mousedown",Rn),Be.ownerDocument.addEventListener("mouseup",gi),Be.ownerDocument.addEventListener("mousemove",zn),function(){Be.removeEventListener("mousedown",Rn),Be.ownerDocument.removeEventListener("mouseup",gi),Be.ownerDocument.removeEventListener("mousemove",zn),xn()}}},[Zt])}var Gr=10;function cl(Zt,me,Se,Be,Ze,an,hn,xn){var Zn=Ut.useRef(),Rn=Ut.useState(null),gi=(0,Yt.Z)(Rn,2),zn=gi[0],oi=gi[1];return ml(function(){if(zn&&zn.times<Gr){if(!Zt.current){oi(function(ho){return(0,te.Z)({},ho)});return}an();var ni=zn.targetAlign,Ci=zn.originAlign,Vi=zn.index,gr=zn.offset,Mr=Zt.current.clientHeight,Ni=!1,ar=ni,_i=null;if(Mr){for(var Cr=ni||Ci,eo=0,Br=0,xo=0,Yr=Math.min(me.length-1,Vi),ko=0;ko<=Yr;ko+=1){var Cs=Ze(me[ko]);Br=eo;var To=Se.get(Cs);xo=Br+(To===void 0?Be:To),eo=xo}for(var to=Cr==="top"?gr:Mr-gr,no=Yr;no>=0;no-=1){var Hi=Ze(me[no]),Pr=Se.get(Hi);if(Pr===void 0){Ni=!0;break}if(to-=Pr,to<=0)break}switch(Cr){case"top":_i=Br-gr;break;case"bottom":_i=xo-Mr+gr;break;default:{var lo=Zt.current.scrollTop,Ao=lo+Mr;Br<lo?ar="top":xo>Ao&&(ar="bottom")}}_i!==null&&hn(_i),_i!==zn.lastTop&&(Ni=!0)}Ni&&oi((0,te.Z)((0,te.Z)({},zn),{},{times:zn.times+1,targetAlign:ar,lastTop:_i}))}},[zn,Zt.current]),function(ni){if(ni==null){xn();return}if(kl.cancel(Zn.current),typeof ni=="number")hn(ni);else if(ni&&(0,re.Z)(ni)==="object"){var Ci,Vi=ni.align;"index"in ni?Ci=ni.index:Ci=me.findIndex(function(Ni){return Ze(Ni)===ni.key});var gr=ni.offset,Mr=gr===void 0?0:gr;oi({times:0,index:Ci,offset:Mr,originAlign:Vi})}}}var Zl=Ut.forwardRef(function(Zt,me){var Se=Zt.prefixCls,Be=Zt.rtl,Ze=Zt.scrollOffset,an=Zt.scrollRange,hn=Zt.onStartMove,xn=Zt.onStopMove,Zn=Zt.onScroll,Rn=Zt.horizontal,gi=Zt.spinSize,zn=Zt.containerSize,oi=Zt.style,ni=Zt.thumbStyle,Ci=Zt.showScrollBar,Vi=Ut.useState(!1),gr=(0,Yt.Z)(Vi,2),Mr=gr[0],Ni=gr[1],ar=Ut.useState(null),_i=(0,Yt.Z)(ar,2),Cr=_i[0],eo=_i[1],Br=Ut.useState(null),xo=(0,Yt.Z)(Br,2),Yr=xo[0],ko=xo[1],Cs=!Be,To=Ut.useRef(),to=Ut.useRef(),no=Ut.useState(Ci),Hi=(0,Yt.Z)(no,2),Pr=Hi[0],lo=Hi[1],Ao=Ut.useRef(),ho=function(){Ci===!0||Ci===!1||(clearTimeout(Ao.current),lo(!0),Ao.current=setTimeout(function(){lo(!1)},3e3))},jo=an-zn||0,mo=zn-gi||0,hs=Ut.useMemo(function(){if(Ze===0||jo===0)return 0;var Ro=Ze/jo;return Ro*mo},[Ze,jo,mo]),Ss=function(Kr){Kr.stopPropagation(),Kr.preventDefault()},Os=Ut.useRef({top:hs,dragging:Mr,pageY:Cr,startTop:Yr});Os.current={top:hs,dragging:Mr,pageY:Cr,startTop:Yr};var ja=function(Kr){Ni(!0),eo(fA(Kr,Rn)),ko(Os.current.top),hn(),Kr.stopPropagation(),Kr.preventDefault()};Ut.useEffect(function(){var Ro=function(dl){dl.preventDefault()},Kr=To.current,No=to.current;return Kr.addEventListener("touchstart",Ro,{passive:!1}),No.addEventListener("touchstart",ja,{passive:!1}),function(){Kr.removeEventListener("touchstart",Ro),No.removeEventListener("touchstart",ja)}},[]);var oa=Ut.useRef();oa.current=jo;var Co=Ut.useRef();Co.current=mo,Ut.useEffect(function(){if(Mr){var Ro,Kr=function(dl){var Ya=Os.current,bl=Ya.dragging,Tl=Ya.pageY,Au=Ya.startTop;kl.cancel(Ro);var so=To.current.getBoundingClientRect(),Nl=zn/(Rn?so.width:so.height);if(bl){var ms=(fA(dl,Rn)-Tl)*Nl,za=Au;!Cs&&Rn?za-=ms:za+=ms;var Xa=oa.current,qo=Co.current,gA=qo?za/qo:0,Xl=Math.ceil(gA*Xa);Xl=Math.max(Xl,0),Xl=Math.min(Xl,Xa),Ro=kl(function(){Zn(Xl,Rn)})}},No=function(){Ni(!1),xn()};return window.addEventListener("mousemove",Kr,{passive:!0}),window.addEventListener("touchmove",Kr,{passive:!0}),window.addEventListener("mouseup",No,{passive:!0}),window.addEventListener("touchend",No,{passive:!0}),function(){window.removeEventListener("mousemove",Kr),window.removeEventListener("touchmove",Kr),window.removeEventListener("mouseup",No),window.removeEventListener("touchend",No),kl.cancel(Ro)}}},[Mr]),Ut.useEffect(function(){return ho(),function(){clearTimeout(Ao.current)}},[Ze]),Ut.useImperativeHandle(me,function(){return{delayHidden:ho}});var zo="".concat(Se,"-scrollbar"),Yo={position:"absolute",visibility:Pr?null:"hidden"},cs={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Rn?(Yo.height=8,Yo.left=0,Yo.right=0,Yo.bottom=0,cs.height="100%",cs.width=gi,Cs?cs.left=hs:cs.right=hs):(Yo.width=8,Yo.top=0,Yo.bottom=0,Cs?Yo.right=0:Yo.left=0,cs.width="100%",cs.height=gi,cs.top=hs),Ut.createElement("div",{ref:To,className:Qe()(zo,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(zo,"-horizontal"),Rn),"".concat(zo,"-vertical"),!Rn),"".concat(zo,"-visible"),Pr)),style:(0,te.Z)((0,te.Z)({},Yo),oi),onMouseDown:Ss,onMouseMove:ho},Ut.createElement("div",{ref:to,className:Qe()("".concat(zo,"-thumb"),(0,Ce.Z)({},"".concat(zo,"-thumb-moving"),Mr)),style:(0,te.Z)((0,te.Z)({},cs),ni),onMouseDown:ja}))}),Us=Zl,Fo=20;function ya(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Se=Zt/me*Zt;return isNaN(Se)&&(Se=0),Se=Math.max(Se,Fo),Math.floor(Se)}var vl=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ls=[],Yl={overflowY:"auto",overflowAnchor:"none"};function La(Zt,me){var Se=Zt.prefixCls,Be=Se===void 0?"rc-virtual-list":Se,Ze=Zt.className,an=Zt.height,hn=Zt.itemHeight,xn=Zt.fullHeight,Zn=xn===void 0?!0:xn,Rn=Zt.style,gi=Zt.data,zn=Zt.children,oi=Zt.itemKey,ni=Zt.virtual,Ci=Zt.direction,Vi=Zt.scrollWidth,gr=Zt.component,Mr=gr===void 0?"div":gr,Ni=Zt.onScroll,ar=Zt.onVirtualScroll,_i=Zt.onVisibleChange,Cr=Zt.innerProps,eo=Zt.extraRender,Br=Zt.styles,xo=Zt.showScrollBar,Yr=xo===void 0?"optional":xo,ko=(0,Sr.Z)(Zt,vl),Cs=Ut.useCallback(function(co){return typeof oi=="function"?oi(co):co==null?void 0:co[oi]},[oi]),To=rl(Cs,null,null),to=(0,Yt.Z)(To,4),no=to[0],Hi=to[1],Pr=to[2],lo=to[3],Ao=!!(ni!==!1&&an&&hn),ho=Ut.useMemo(function(){return Object.values(Pr.maps).reduce(function(co,Jr){return co+Jr},0)},[Pr.id,Pr.maps]),jo=Ao&&gi&&(Math.max(hn*gi.length,ho)>an||!!Vi),mo=Ci==="rtl",hs=Qe()(Be,(0,Ce.Z)({},"".concat(Be,"-rtl"),mo),Ze),Ss=gi||Ls,Os=(0,Ut.useRef)(),ja=(0,Ut.useRef)(),oa=(0,Ut.useRef)(),Co=(0,Ut.useState)(0),zo=(0,Yt.Z)(Co,2),Yo=zo[0],cs=zo[1],Ro=(0,Ut.useState)(0),Kr=(0,Yt.Z)(Ro,2),No=Kr[0],wa=Kr[1],dl=(0,Ut.useState)(!1),Ya=(0,Yt.Z)(dl,2),bl=Ya[0],Tl=Ya[1],Au=function(){Tl(!0)},so=function(){Tl(!1)},Nl={getKey:Cs};function ms(co){cs(function(Jr){var jr;typeof co=="function"?jr=co(Jr):jr=co;var bs=vA(jr);return Os.current.scrollTop=bs,bs})}var za=(0,Ut.useRef)({start:0,end:Ss.length}),Xa=(0,Ut.useRef)(),qo=ea(Ss,Cs),gA=(0,Yt.Z)(qo,1),Xl=gA[0];Xa.current=Xl;var Cu=Ut.useMemo(function(){if(!Ao)return{scrollHeight:void 0,start:0,end:Ss.length-1,offset:void 0};if(!jo){var co;return{scrollHeight:((co=ja.current)===null||co===void 0?void 0:co.offsetHeight)||0,start:0,end:Ss.length-1,offset:void 0}}for(var Jr=0,jr,bs,Ma,DA=Ss.length,Eu=0;Eu<DA;Eu+=1){var Ue=Ss[Eu],iA=Cs(Ue),Sl=Pr.get(iA),Ch=Jr+(Sl===void 0?hn:Sl);Ch>=Yo&&jr===void 0&&(jr=Eu,bs=Jr),Ch>Yo+an&&Ma===void 0&&(Ma=Eu),Jr=Ch}return jr===void 0&&(jr=0,bs=0,Ma=Math.ceil(an/hn)),Ma===void 0&&(Ma=Ss.length-1),Ma=Math.min(Ma+1,Ss.length-1),{scrollHeight:Jr,start:jr,end:Ma,offset:bs}},[jo,Ao,Yo,Ss,lo,an]),qs=Cu.scrollHeight,hu=Cu.start,Pu=Cu.end,XA=Cu.offset;za.current.start=hu,za.current.end=Pu,Ut.useLayoutEffect(function(){var co=Pr.getRecord();if(co.size===1){var Jr=Array.from(co)[0],jr=Ss[hu];if(jr){var bs=Cs(jr);if(bs===Jr){var Ma=Pr.get(Jr),DA=Ma-hn;ms(function(Eu){return Eu+DA})}}}Pr.resetRecord()},[qs]);var jh=Ut.useState({width:0,height:an}),JA=(0,Yt.Z)(jh,2),sl=JA[0],pA=JA[1],Ja=function(Jr){pA({width:Jr.offsetWidth,height:Jr.offsetHeight})},cu=(0,Ut.useRef)(),kr=(0,Ut.useRef)(),eA=Ut.useMemo(function(){return ya(sl.width,Vi)},[sl.width,Vi]),xh=Ut.useMemo(function(){return ya(sl.height,qs)},[sl.height,qs]),mA=qs-an,Jl=(0,Ut.useRef)(mA);Jl.current=mA;function vA(co){var Jr=co;return Number.isNaN(Jl.current)||(Jr=Math.min(Jr,Jl.current)),Jr=Math.max(Jr,0),Jr}var du=Yo<=0,Hu=Yo>=mA,Fu=No<=0,Hs=No>=Vi,fl=LA(du,Hu,Fu,Hs),Ru=function(){return{x:mo?-No:No,y:Yo}},yl=(0,Ut.useRef)(Ru()),wl=os(function(co){if(ar){var Jr=(0,te.Z)((0,te.Z)({},Ru()),co);(yl.current.x!==Jr.x||yl.current.y!==Jr.y)&&(ar(Jr),yl.current=Jr)}});function Va(co,Jr){var jr=co;Jr?((0,jt.flushSync)(function(){wa(jr)}),wl()):ms(jr)}function Bh(co){var Jr=co.currentTarget.scrollTop;Jr!==Yo&&ms(Jr),Ni==null||Ni(co),wl()}var qA=function(Jr){var jr=Jr,bs=Vi?Vi-sl.width:0;return jr=Math.max(jr,0),jr=Math.min(jr,bs),jr},Sa=os(function(co,Jr){Jr?((0,jt.flushSync)(function(){wa(function(jr){var bs=jr+(mo?-co:co);return qA(bs)})}),wl()):ms(function(jr){var bs=jr+co;return bs})}),NA=Ou(Ao,du,Hu,Fu,Hs,!!Vi,Sa),nA=(0,Yt.Z)(NA,2),Wa=nA[0],_u=nA[1];yh(Ao,Os,function(co,Jr,jr,bs){var Ma=bs;return fl(co,Jr,jr)?!1:!Ma||!Ma._virtualHandled?(Ma&&(Ma._virtualHandled=!0),Wa({preventDefault:function(){},deltaX:co?Jr:0,deltaY:co?0:Jr}),!0):!1}),Js(jo,Os,function(co){ms(function(Jr){return Jr+co})}),ml(function(){function co(jr){var bs=du&&jr.detail<0,Ma=Hu&&jr.detail>0;Ao&&!bs&&!Ma&&jr.preventDefault()}var Jr=Os.current;return Jr.addEventListener("wheel",Wa,{passive:!1}),Jr.addEventListener("DOMMouseScroll",_u,{passive:!0}),Jr.addEventListener("MozMousePixelScroll",co,{passive:!1}),function(){Jr.removeEventListener("wheel",Wa),Jr.removeEventListener("DOMMouseScroll",_u),Jr.removeEventListener("MozMousePixelScroll",co)}},[Ao,du,Hu]),ml(function(){if(Vi){var co=qA(No);wa(co),wl({x:co})}},[sl.width,Vi]);var $A=function(){var Jr,jr;(Jr=cu.current)===null||Jr===void 0||Jr.delayHidden(),(jr=kr.current)===null||jr===void 0||jr.delayHidden()},Ku=cl(Os,Ss,Pr,hn,Cs,function(){return Hi(!0)},ms,$A);Ut.useImperativeHandle(me,function(){return{nativeElement:oa.current,getScrollInfo:Ru,scrollTo:function(Jr){function jr(bs){return bs&&(0,re.Z)(bs)==="object"&&("left"in bs||"top"in bs)}jr(Jr)?(Jr.left!==void 0&&wa(qA(Jr.left)),Ku(Jr.top)):Ku(Jr)}}}),ml(function(){if(_i){var co=Ss.slice(hu,Pu+1);_i(co,Ss)}},[hu,Pu,Ss]);var zh=vr(Ss,Cs,Pr,hn),yA=eo==null?void 0:eo({start:hu,end:Pu,virtual:jo,offsetX:No,offsetY:XA,rtl:mo,getSize:zh}),ql=Es(Ss,hu,Pu,Vi,No,no,zn,Nl),wA=null;an&&(wA=(0,te.Z)((0,Ce.Z)({},Zn?"height":"maxHeight",an),Yl),Ao&&(wA.overflowY="hidden",Vi&&(wA.overflowX="hidden"),bl&&(wA.pointerEvents="none")));var Vh={};return mo&&(Vh.dir="rtl"),Ut.createElement("div",(0,se.Z)({ref:oa,style:(0,te.Z)((0,te.Z)({},Rn),{},{position:"relative"}),className:hs},Vh,ko),Ut.createElement(Mt.Z,{onResize:Ja},Ut.createElement(Mr,{className:"".concat(Be,"-holder"),style:wA,ref:Os,onScroll:Bh,onMouseEnter:$A},Ut.createElement(YA,{prefixCls:Be,height:qs,offsetX:No,offsetY:XA,scrollWidth:Vi,onInnerResize:Hi,ref:ja,innerProps:Cr,rtl:mo,extra:yA},ql))),jo&&qs>an&&Ut.createElement(Us,{ref:cu,prefixCls:Be,scrollOffset:Yo,scrollRange:qs,rtl:mo,onScroll:Va,onStartMove:Au,onStopMove:so,spinSize:xh,containerSize:sl.height,style:Br==null?void 0:Br.verticalScrollBar,thumbStyle:Br==null?void 0:Br.verticalScrollBarThumb,showScrollBar:Yr}),jo&&Vi>sl.width&&Ut.createElement(Us,{ref:kr,prefixCls:Be,scrollOffset:No,scrollRange:Vi,rtl:mo,onScroll:Va,onStartMove:Au,onStopMove:so,spinSize:eA,containerSize:sl.width,horizontal:!0,style:Br==null?void 0:Br.horizontalScrollBar,thumbStyle:Br==null?void 0:Br.horizontalScrollBarThumb,showScrollBar:Yr}))}var MA=Ut.forwardRef(La);MA.displayName="List";var Jo=MA,ol=Jo,Oo=ne(null),Bs=ne(null);function Qs(Zt,me,Se){var Be=me||1;return Se[Zt+Be]-(Se[Zt]||0)}function ra(Zt){var me=Zt.rowInfo,Se=Zt.column,Be=Zt.colIndex,Ze=Zt.indent,an=Zt.index,hn=Zt.component,xn=Zt.renderIndex,Zn=Zt.record,Rn=Zt.style,gi=Zt.className,zn=Zt.inverse,oi=Zt.getHeight,ni=Se.render,Ci=Se.dataIndex,Vi=Se.className,gr=Se.width,Mr=Ae(Bs,["columnsOffset"]),Ni=Mr.columnsOffset,ar=Te(me,Se,Be,Ze,an),_i=ar.key,Cr=ar.fixedInfo,eo=ar.appendCellNode,Br=ar.additionalCellProps,xo=Br.style,Yr=Br.colSpan,ko=Yr===void 0?1:Yr,Cs=Br.rowSpan,To=Cs===void 0?1:Cs,to=Be-1,no=Qs(to,ko,Ni),Hi=ko>1?gr-no:0,Pr=(0,te.Z)((0,te.Z)((0,te.Z)({},xo),Rn),{},{flex:"0 0 ".concat(no,"px"),width:"".concat(no,"px"),marginRight:Hi,pointerEvents:"auto"}),lo=Ut.useMemo(function(){return zn?To<=1:ko===0||To===0||To>1},[To,ko,zn]);lo?Pr.visibility="hidden":zn&&(Pr.height=oi==null?void 0:oi(To));var Ao=lo?function(){return null}:ni,ho={};return(To===0||ko===0)&&(ho.rowSpan=1,ho.colSpan=1),Ut.createElement(yr,(0,se.Z)({className:Qe()(Vi,gi),ellipsis:Se.ellipsis,align:Se.align,scope:Se.rowScope,component:hn,prefixCls:me.prefixCls,key:_i,record:Zn,index:an,renderIndex:xn,dataIndex:Ci,render:Ao,shouldCellUpdate:Se.shouldCellUpdate},Cr,{appendNode:eo,additionalProps:(0,te.Z)((0,te.Z)({},Br),{},{style:Pr},ho)}))}var ts=ra,wh=["data","index","className","rowKey","style","extra","getHeight"],_r=Ut.forwardRef(function(Zt,me){var Se=Zt.data,Be=Zt.index,Ze=Zt.className,an=Zt.rowKey,hn=Zt.style,xn=Zt.extra,Zn=Zt.getHeight,Rn=(0,Sr.Z)(Zt,wh),gi=Se.record,zn=Se.indent,oi=Se.index,ni=Ae(bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ci=ni.scrollX,Vi=ni.flattenColumns,gr=ni.prefixCls,Mr=ni.fixColumn,Ni=ni.componentWidth,ar=Ae(Oo,["getComponent"]),_i=ar.getComponent,Cr=ei(gi,an,Be,zn),eo=_i(["body","row"],"div"),Br=_i(["body","cell"],"div"),xo=Cr.rowSupportExpand,Yr=Cr.expanded,ko=Cr.rowProps,Cs=Cr.expandedRowRender,To=Cr.expandedRowClassName,to;if(xo&&Yr){var no=Cs(gi,Be,zn+1,Yr),Hi=Ji(To,gi,Be,zn),Pr={};Mr&&(Pr={style:(0,Ce.Z)({},"--virtual-width","".concat(Ni,"px"))});var lo="".concat(gr,"-expanded-row-cell");to=Ut.createElement(eo,{className:Qe()("".concat(gr,"-expanded-row"),"".concat(gr,"-expanded-row-level-").concat(zn+1),Hi)},Ut.createElement(yr,{component:Br,prefixCls:gr,className:Qe()(lo,(0,Ce.Z)({},"".concat(lo,"-fixed"),Mr)),additionalProps:Pr},no))}var Ao=(0,te.Z)((0,te.Z)({},hn),{},{width:Ci});xn&&(Ao.position="absolute",Ao.pointerEvents="none");var ho=Ut.createElement(eo,(0,se.Z)({},ko,Rn,{"data-row-key":an,ref:xo?null:me,className:Qe()(Ze,"".concat(gr,"-row"),ko==null?void 0:ko.className,(0,Ce.Z)({},"".concat(gr,"-row-extra"),xn)),style:(0,te.Z)((0,te.Z)({},Ao),ko==null?void 0:ko.style)}),Vi.map(function(jo,mo){return Ut.createElement(ts,{key:mo,component:Br,rowInfo:Cr,column:jo,colIndex:mo,indent:zn,index:Be,renderIndex:oi,record:gi,inverse:xn,getHeight:Zn})}));return xo?Ut.createElement("div",{ref:me},ho,to):ho}),Sh=ht(_r),Ho=Sh,uf=Ut.forwardRef(function(Zt,me){var Se=Zt.data,Be=Zt.onScroll,Ze=Ae(bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),an=Ze.flattenColumns,hn=Ze.onColumnResize,xn=Ze.getRowKey,Zn=Ze.expandedKeys,Rn=Ze.prefixCls,gi=Ze.childrenColumnName,zn=Ze.scrollX,oi=Ze.direction,ni=Ae(Oo),Ci=ni.sticky,Vi=ni.scrollY,gr=ni.listItemHeight,Mr=ni.getComponent,Ni=ni.onScroll,ar=Ut.useRef(),_i=Sn(Se,gi,Zn,xn),Cr=Ut.useMemo(function(){var to=0;return an.map(function(no){var Hi=no.width,Pr=no.key;return to+=Hi,[Pr,Hi,to]})},[an]),eo=Ut.useMemo(function(){return Cr.map(function(to){return to[2]})},[Cr]);Ut.useEffect(function(){Cr.forEach(function(to){var no=(0,Yt.Z)(to,2),Hi=no[0],Pr=no[1];hn(Hi,Pr)})},[Cr]),Ut.useImperativeHandle(me,function(){var to,no={scrollTo:function(Pr){var lo;(lo=ar.current)===null||lo===void 0||lo.scrollTo(Pr)},nativeElement:(to=ar.current)===null||to===void 0?void 0:to.nativeElement};return Object.defineProperty(no,"scrollLeft",{get:function(){var Pr;return((Pr=ar.current)===null||Pr===void 0?void 0:Pr.getScrollInfo().x)||0},set:function(Pr){var lo;(lo=ar.current)===null||lo===void 0||lo.scrollTo({left:Pr})}}),no});var Br=function(no,Hi){var Pr,lo=(Pr=_i[Hi])===null||Pr===void 0?void 0:Pr.record,Ao=no.onCell;if(Ao){var ho,jo=Ao(lo,Hi);return(ho=jo==null?void 0:jo.rowSpan)!==null&&ho!==void 0?ho:1}return 1},xo=function(no){var Hi=no.start,Pr=no.end,lo=no.getSize,Ao=no.offsetY;if(Pr<0)return null;for(var ho=an.filter(function(Ro){return Br(Ro,Hi)===0}),jo=Hi,mo=function(Kr){if(ho=ho.filter(function(No){return Br(No,Kr)===0}),!ho.length)return jo=Kr,1},hs=Hi;hs>=0&&!mo(hs);hs-=1);for(var Ss=an.filter(function(Ro){return Br(Ro,Pr)!==1}),Os=Pr,ja=function(Kr){if(Ss=Ss.filter(function(No){return Br(No,Kr)!==1}),!Ss.length)return Os=Math.max(Kr-1,Pr),1},oa=Pr;oa<_i.length&&!ja(oa);oa+=1);for(var Co=[],zo=function(Kr){var No=_i[Kr];if(!No)return 1;an.some(function(wa){return Br(wa,Kr)>1})&&Co.push(Kr)},Yo=jo;Yo<=Os;Yo+=1)zo(Yo);var cs=Co.map(function(Ro){var Kr=_i[Ro],No=xn(Kr.record,Ro),wa=function(bl){var Tl=Ro+bl-1,Au=xn(_i[Tl].record,Tl),so=lo(No,Au);return so.bottom-so.top},dl=lo(No);return Ut.createElement(Ho,{key:Ro,data:Kr,rowKey:No,index:Ro,style:{top:-Ao+dl.top},extra:!0,getHeight:wa})});return cs},Yr=Ut.useMemo(function(){return{columnsOffset:eo}},[eo]),ko="".concat(Rn,"-tbody"),Cs=Mr(["body","wrapper"]),To={};return Ci&&(To.position="sticky",To.bottom=0,(0,re.Z)(Ci)==="object"&&Ci.offsetScroll&&(To.bottom=Ci.offsetScroll)),Ut.createElement(Bs.Provider,{value:Yr},Ut.createElement(ol,{fullHeight:!1,ref:ar,prefixCls:"".concat(ko,"-virtual"),styles:{horizontalScrollBar:To},className:ko,height:Vi,itemHeight:gr||24,data:_i,itemKey:function(no){return xn(no.record)},component:Cs,scrollWidth:zn,direction:oi,onVirtualScroll:function(no){var Hi,Pr=no.x;Be({currentTarget:(Hi=ar.current)===null||Hi===void 0?void 0:Hi.nativeElement,scrollLeft:Pr})},onScroll:Ni,extraRender:xo},function(to,no,Hi){var Pr=xn(to.record,no);return Ut.createElement(Ho,{data:to,rowKey:Pr,index:no,style:Hi.style})}))}),kA=ht(uf),vc=kA,Ed=function(me,Se){var Be=Se.ref,Ze=Se.onScroll;return Ut.createElement(vc,{ref:Be,data:me,onScroll:Ze})};function Qc(Zt,me){var Se=Zt.data,Be=Zt.columns,Ze=Zt.scroll,an=Zt.sticky,hn=Zt.prefixCls,xn=hn===void 0?Xu:hn,Zn=Zt.className,Rn=Zt.listItemHeight,gi=Zt.components,zn=Zt.onScroll,oi=Ze||{},ni=oi.x,Ci=oi.y;typeof ni!="number"&&(ni=1),typeof Ci!="number"&&(Ci=500);var Vi=Me(function(Ni,ar){return Yn(gi,Ni)||ar}),gr=Me(zn),Mr=Ut.useMemo(function(){return{sticky:an,scrollY:Ci,listItemHeight:Rn,getComponent:Vi,onScroll:gr}},[an,Ci,Rn,Vi,gr]);return Ut.createElement(Oo.Provider,{value:Mr},Ut.createElement(So,(0,se.Z)({},Zt,{className:Qe()(Zn,"".concat(xn,"-virtual")),scroll:(0,te.Z)((0,te.Z)({},Ze),{},{x:ni}),components:(0,te.Z)((0,te.Z)({},gi),{},{body:Se!=null&&Se.length?Ed:void 0}),columns:Be,internalHooks:xt.R,tailor:!0,ref:me})))}var bA=Ut.forwardRef(Qc);function tA(Zt){return at(bA,Zt)}var ss=tA(),TA=null},62978:function(gn,ze,Qt){"use strict";Qt.d(ze,{g:function(){return Ut},v:function(){return ge}});var xt=Qt(1413),Yt=Qt(45987),he=Qt(40830),xe=["expandable"],ge="RC_TABLE_INTERNAL_COL_DEFINE";function Ut(jt){var ne=jt.expandable,Ae=(0,Yt.Z)(jt,xe),se;return"expandable"in jt?se=(0,xt.Z)((0,xt.Z)({},Ae),ne):se=Ae,se.showExpandColumn===!1&&(se.expandIconColumnIndex=-1),se}},63295:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ge}});var xt=Qt(71002),Yt=Symbol.for("react.element"),he=Symbol.for("react.transitional.element"),xe=Symbol.for("react.fragment");function ge(Ut){return Ut&&(0,xt.Z)(Ut)==="object"&&(Ut.$$typeof===Yt||Ut.$$typeof===he)&&Ut.type===xe}},40830:function(gn,ze,Qt){"use strict";var xt={},Yt=[],he=function(ke){Yt.push(ke)};function xe(se,ke){if(0)var de}function ge(se,ke){if(0)var de}function Ut(){xt={}}function jt(se,ke,de){!ke&&!xt[de]&&(se(!1,de),xt[de]=!0)}function ne(se,ke){jt(xe,se,ke)}function Ae(se,ke){jt(ge,se,ke)}ne.preMessage=he,ne.resetWarned=Ut,ne.noteOnce=Ae,ze.ZP=ne},46762:function(gn,ze){"use strict";var Qt;var xt=Symbol.for("react.element"),Yt=Symbol.for("react.portal"),he=Symbol.for("react.fragment"),xe=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Ut=Symbol.for("react.provider"),jt=Symbol.for("react.context"),ne=Symbol.for("react.server_context"),Ae=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),Ie=Symbol.for("react.lazy"),Dt=Symbol.for("react.offscreen"),nt;nt=Symbol.for("react.module.reference");function et(ut){if(typeof ut=="object"&&ut!==null){var at=ut.$$typeof;switch(at){case xt:switch(ut=ut.type,ut){case he:case ge:case xe:case se:case ke:return ut;default:switch(ut=ut&&ut.$$typeof,ut){case ne:case jt:case Ae:case Ie:case de:case Ut:return ut;default:return at}}case Yt:return at}}}Qt=jt,Qt=Ut,Qt=xt,Qt=Ae,Qt=he,Qt=Ie,Qt=de,Qt=Yt,Qt=ge,Qt=xe,Qt=se,Qt=ke,Qt=function(){return!1},Qt=function(){return!1},Qt=function(ut){return et(ut)===jt},Qt=function(ut){return et(ut)===Ut},Qt=function(ut){return typeof ut=="object"&&ut!==null&&ut.$$typeof===xt},Qt=function(ut){return et(ut)===Ae},Qt=function(ut){return et(ut)===he},Qt=function(ut){return et(ut)===Ie},Qt=function(ut){return et(ut)===de},Qt=function(ut){return et(ut)===Yt},Qt=function(ut){return et(ut)===ge},Qt=function(ut){return et(ut)===xe},Qt=function(ut){return et(ut)===se},Qt=function(ut){return et(ut)===ke},Qt=function(ut){return typeof ut=="string"||typeof ut=="function"||ut===he||ut===ge||ut===xe||ut===se||ut===ke||ut===Dt||typeof ut=="object"&&ut!==null&&(ut.$$typeof===Ie||ut.$$typeof===de||ut.$$typeof===Ut||ut.$$typeof===jt||ut.$$typeof===Ae||ut.$$typeof===nt||ut.getModuleId!==void 0)},Qt=et},35110:function(gn,ze,Qt){"use strict";Qt(46762)},86128:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var xt=Qt(87462),Yt=Qt(4942),he=Qt(1413),xe=Qt(97685),ge=Qt(45987),Ut=Qt(67294),jt=Qt(94184),ne=Qt.n(jt),Ae=Qt(64217),se=Qt(27822),ke=function(bt){for(var Ot=bt.prefixCls,Ht=bt.level,Wt=bt.isStart,re=bt.isEnd,te="".concat(Ot,"-indent-unit"),Ce=[],ce=0;ce<Ht;ce+=1)Ce.push(Ut.createElement("span",{key:ce,className:ne()(te,(0,Yt.Z)((0,Yt.Z)({},"".concat(te,"-start"),Wt[ce]),"".concat(te,"-end"),re[ce]))}));return Ut.createElement("span",{"aria-hidden":"true",className:"".concat(Ot,"-indent")},Ce)},de=Ut.memo(ke),Ie=Qt(35381),Dt=Qt(1089),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",ut="close",at="---",ht=function(bt){var Ot,Ht,Wt,re=bt.eventKey,te=bt.className,Ce=bt.style,ce=bt.dragOver,Qe=bt.dragOverGapTop,je=bt.dragOverGapBottom,He=bt.isLeaf,Qn=bt.isStart,Gn=bt.isEnd,Yn=bt.expanded,di=bt.selected,ie=bt.checked,zt=bt.halfChecked,We=bt.loading,En=bt.domRef,Xn=bt.active,Ve=bt.data,In=bt.onMouseMove,Hn=bt.selectable,li=(0,ge.Z)(bt,nt),tn=Ut.useContext(se.k),Me=Ut.useContext(se.y),rn=Ut.useRef(null),Dn=Ut.useState(!1),sn=(0,xe.Z)(Dn,2),Vt=sn[0],Pt=sn[1],mt=!!(tn.disabled||bt.disabled||(Ot=Me.nodeDisabled)!==null&&Ot!==void 0&&Ot.call(Me,Ve)),vt=Ut.useMemo(function(){return!tn.checkable||bt.checkable===!1?!1:tn.checkable},[tn.checkable,bt.checkable]),kt=function(kn){mt||tn.onNodeSelect(kn,(0,Dt.F)(bt))},Lt=function(kn){mt||!vt||bt.disableCheckbox||tn.onNodeCheck(kn,(0,Dt.F)(bt),!ie)},_t=Ut.useMemo(function(){return typeof Hn=="boolean"?Hn:tn.selectable},[Hn,tn.selectable]),De=function(kn){tn.onNodeClick(kn,(0,Dt.F)(bt)),_t?kt(kn):Lt(kn)},on=function(kn){tn.onNodeDoubleClick(kn,(0,Dt.F)(bt))},mn=function(kn){tn.onNodeMouseEnter(kn,(0,Dt.F)(bt))},$e=function(kn){tn.onNodeMouseLeave(kn,(0,Dt.F)(bt))},Bn=function(kn){tn.onNodeContextMenu(kn,(0,Dt.F)(bt))},Re=Ut.useMemo(function(){return!!(tn.draggable&&(!tn.draggable.nodeDraggable||tn.draggable.nodeDraggable(Ve)))},[tn.draggable,Ve]),Mn=function(kn){kn.stopPropagation(),Pt(!0),tn.onNodeDragStart(kn,bt);try{kn.dataTransfer.setData("text/plain","")}catch(_n){}},Kn=function(kn){kn.preventDefault(),kn.stopPropagation(),tn.onNodeDragEnter(kn,bt)},Fi=function(kn){kn.preventDefault(),kn.stopPropagation(),tn.onNodeDragOver(kn,bt)},ti=function(kn){kn.stopPropagation(),tn.onNodeDragLeave(kn,bt)},sr=function(kn){kn.stopPropagation(),Pt(!1),tn.onNodeDragEnd(kn,bt)},rr=function(kn){kn.preventDefault(),kn.stopPropagation(),Pt(!1),tn.onNodeDrop(kn,bt)},xi=function(kn){We||tn.onNodeExpand(kn,(0,Dt.F)(bt))},wi=Ut.useMemo(function(){var jn=(0,Ie.Z)(tn.keyEntities,re)||{},kn=jn.children;return!!(kn||[]).length},[tn.keyEntities,re]),Ir=Ut.useMemo(function(){return He===!1?!1:He||!tn.loadData&&!wi||tn.loadData&&bt.loaded&&!wi},[He,tn.loadData,wi,bt.loaded]);Ut.useEffect(function(){We||typeof tn.loadData=="function"&&Yn&&!Ir&&!bt.loaded&&tn.onNodeLoad((0,Dt.F)(bt))},[We,tn.loadData,tn.onNodeLoad,Yn,Ir,bt]);var ji=Ut.useMemo(function(){var jn;return(jn=tn.draggable)!==null&&jn!==void 0&&jn.icon?Ut.createElement("span",{className:"".concat(tn.prefixCls,"-draggable-icon")},tn.draggable.icon):null},[tn.draggable]),yr=function(kn){var _n=bt.switcherIcon||tn.switcherIcon;return typeof _n=="function"?_n((0,he.Z)((0,he.Z)({},bt),{},{isLeaf:kn})):_n},xr=function(){if(Ir){var kn=yr(!0);return kn!==!1?Ut.createElement("span",{className:ne()("".concat(tn.prefixCls,"-switcher"),"".concat(tn.prefixCls,"-switcher-noop"))},kn):null}var _n=yr(!1);return _n!==!1?Ut.createElement("span",{onClick:xi,className:ne()("".concat(tn.prefixCls,"-switcher"),"".concat(tn.prefixCls,"-switcher_").concat(Yn?et:ut))},_n):null},Qr=Ut.useMemo(function(){if(!vt)return null;var jn=typeof vt!="boolean"?vt:null;return Ut.createElement("span",{className:ne()("".concat(tn.prefixCls,"-checkbox"),(0,Yt.Z)((0,Yt.Z)((0,Yt.Z)({},"".concat(tn.prefixCls,"-checkbox-checked"),ie),"".concat(tn.prefixCls,"-checkbox-indeterminate"),!ie&&zt),"".concat(tn.prefixCls,"-checkbox-disabled"),mt||bt.disableCheckbox)),onClick:Lt,role:"checkbox","aria-checked":zt?"mixed":ie,"aria-disabled":mt||bt.disableCheckbox,"aria-label":"Select ".concat(typeof bt.title=="string"?bt.title:"tree node")},jn)},[vt,ie,zt,mt,bt.disableCheckbox,bt.title]),Ii=Ut.useMemo(function(){return Ir?null:Yn?et:ut},[Ir,Yn]),br=Ut.useMemo(function(){return Ut.createElement("span",{className:ne()("".concat(tn.prefixCls,"-iconEle"),"".concat(tn.prefixCls,"-icon__").concat(Ii||"docu"),(0,Yt.Z)({},"".concat(tn.prefixCls,"-icon_loading"),We))})},[tn.prefixCls,Ii,We]),Sr=Ut.useMemo(function(){var jn=!!tn.draggable,kn=!bt.disabled&&jn&&tn.dragOverNodeKey===re;return kn?tn.dropIndicatorRender({dropPosition:tn.dropPosition,dropLevelOffset:tn.dropLevelOffset,indent:tn.indent,prefixCls:tn.prefixCls,direction:tn.direction}):null},[tn.dropPosition,tn.dropLevelOffset,tn.indent,tn.prefixCls,tn.direction,tn.draggable,tn.dragOverNodeKey,tn.dropIndicatorRender]),Bo=Ut.useMemo(function(){var jn=bt.title,kn=jn===void 0?at:jn,_n="".concat(tn.prefixCls,"-node-content-wrapper"),Wn;if(tn.showIcon){var qn=bt.icon||tn.icon;Wn=qn?Ut.createElement("span",{className:ne()("".concat(tn.prefixCls,"-iconEle"),"".concat(tn.prefixCls,"-icon__customize"))},typeof qn=="function"?qn(bt):qn):br}else tn.loadData&&We&&(Wn=br);var ui;return typeof kn=="function"?ui=kn(Ve):tn.titleRender?ui=tn.titleRender(Ve):ui=kn,Ut.createElement("span",{ref:rn,title:typeof kn=="string"?kn:"",className:ne()(_n,"".concat(_n,"-").concat(Ii||"normal"),(0,Yt.Z)({},"".concat(tn.prefixCls,"-node-selected"),!mt&&(di||Vt))),onMouseEnter:mn,onMouseLeave:$e,onContextMenu:Bn,onClick:De,onDoubleClick:on},Wn,Ut.createElement("span",{className:"".concat(tn.prefixCls,"-title")},ui),Sr)},[tn.prefixCls,tn.showIcon,bt,tn.icon,br,tn.titleRender,Ve,Ii,mn,$e,Bn,De,on]),er=(0,Ae.Z)(li,{aria:!0,data:!0}),Lo=(0,Ie.Z)(tn.keyEntities,re)||{},ys=Lo.level,Mo=Gn[Gn.length-1],Lr=!mt&&Re,Pn=tn.draggingNodeKey===re,Mt=Hn!==void 0?{"aria-selected":!!Hn}:void 0;return Ut.createElement("div",(0,xt.Z)({ref:En,role:"treeitem","aria-expanded":He?void 0:Yn,className:ne()(te,"".concat(tn.prefixCls,"-treenode"),(Wt={},(0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)(Wt,"".concat(tn.prefixCls,"-treenode-disabled"),mt),"".concat(tn.prefixCls,"-treenode-switcher-").concat(Yn?"open":"close"),!He),"".concat(tn.prefixCls,"-treenode-checkbox-checked"),ie),"".concat(tn.prefixCls,"-treenode-checkbox-indeterminate"),zt),"".concat(tn.prefixCls,"-treenode-selected"),di),"".concat(tn.prefixCls,"-treenode-loading"),We),"".concat(tn.prefixCls,"-treenode-active"),Xn),"".concat(tn.prefixCls,"-treenode-leaf-last"),Mo),"".concat(tn.prefixCls,"-treenode-draggable"),Re),"dragging",Pn),(0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)((0,Yt.Z)(Wt,"drop-target",tn.dropTargetKey===re),"drop-container",tn.dropContainerKey===re),"drag-over",!mt&&ce),"drag-over-gap-top",!mt&&Qe),"drag-over-gap-bottom",!mt&&je),"filter-node",(Ht=tn.filterTreeNode)===null||Ht===void 0?void 0:Ht.call(tn,(0,Dt.F)(bt))),"".concat(tn.prefixCls,"-treenode-leaf"),Ir))),style:Ce,draggable:Lr,onDragStart:Lr?Mn:void 0,onDragEnter:Re?Kn:void 0,onDragOver:Re?Fi:void 0,onDragLeave:Re?ti:void 0,onDrop:Re?rr:void 0,onDragEnd:Re?sr:void 0,onMouseMove:In},Mt,er),Ut.createElement(de,{prefixCls:tn.prefixCls,level:ys,isStart:Qn,isEnd:Gn}),ji,xr(),Qr,Bo)};ht.isTreeNode=1;var pt=ht},27822:function(gn,ze,Qt){"use strict";Qt.d(ze,{k:function(){return Yt},y:function(){return he}});var xt=Qt(67294),Yt=xt.createContext(null),he=xt.createContext({})},70593:function(gn,ze,Qt){"use strict";Qt.d(ze,{OF:function(){return re.Z},y6:function(){return ut.y},ZP:function(){return mt}});var xt=Qt(87462),Yt=Qt(71002),he=Qt(1413),xe=Qt(74902),ge=Qt(15671),Ut=Qt(43144),jt=Qt(97326),ne=Qt(60136),Ae=Qt(29388),se=Qt(4942),ke=Qt(94184),de=Qt.n(ke),Ie=Qt(15105),Dt=Qt(64217),nt=Qt(80334),et=Qt(67294),ut=Qt(27822),at=function(kt){var Lt=kt.dropPosition,_t=kt.dropLevelOffset,De=kt.indent,on={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Lt){case-1:on.top=0,on.left=-_t*De;break;case 1:on.bottom=0,on.left=-_t*De;break;case 0:on.bottom=0,on.left=De;break}return et.createElement("div",{style:on})},ht=at;function pt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var St=Qt(97685),bt=Qt(45987),Ot=Qt(8410),Ht=Qt(73299),Wt=Qt(62874),re=Qt(86128);function te(vt,kt){var Lt=et.useState(!1),_t=(0,St.Z)(Lt,2),De=_t[0],on=_t[1];(0,Ot.Z)(function(){if(De)return vt(),function(){kt()}},[De]),(0,Ot.Z)(function(){return on(!0),function(){on(!1)}},[])}var Ce=te,ce=Qt(1089),Qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],je=et.forwardRef(function(vt,kt){var Lt=vt.className,_t=vt.style,De=vt.motion,on=vt.motionNodes,mn=vt.motionType,$e=vt.onMotionStart,Bn=vt.onMotionEnd,Re=vt.active,Mn=vt.treeNodeRequiredProps,Kn=(0,bt.Z)(vt,Qe),Fi=et.useState(!0),ti=(0,St.Z)(Fi,2),sr=ti[0],rr=ti[1],xi=et.useContext(ut.k),wi=xi.prefixCls,Ir=on&&mn!=="hide";(0,Ot.Z)(function(){on&&Ir!==sr&&rr(Ir)},[on]);var ji=function(){on&&$e()},yr=et.useRef(!1),xr=function(){on&&!yr.current&&(yr.current=!0,Bn())};Ce(ji,xr);var Qr=function(br){Ir===br&&xr()};return on?et.createElement(Wt.Z,(0,xt.Z)({ref:kt,visible:sr},De,{motionAppear:mn==="show",onVisibleChanged:Qr}),function(Ii,br){var Sr=Ii.className,Bo=Ii.style;return et.createElement("div",{ref:br,className:de()("".concat(wi,"-treenode-motion"),Sr),style:Bo},on.map(function(er){var Lo=Object.assign({},(pt(er.data),er.data)),ys=er.title,Mo=er.key,Lr=er.isStart,Pn=er.isEnd;delete Lo.children;var Mt=(0,ce.H8)(Mo,Mn);return et.createElement(re.Z,(0,xt.Z)({},Lo,Mt,{title:ys,active:Re,data:er.data,key:Mo,isStart:Lr,isEnd:Pn}))}))}):et.createElement(re.Z,(0,xt.Z)({domRef:kt,className:Lt,style:_t},Kn,{active:Re}))}),He=je;function Qn(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Lt=vt.length,_t=kt.length;if(Math.abs(Lt-_t)!==1)return{add:!1,key:null};function De(on,mn){var $e=new Map;on.forEach(function(Re){$e.set(Re,!0)});var Bn=mn.filter(function(Re){return!$e.has(Re)});return Bn.length===1?Bn[0]:null}return Lt<_t?{add:!0,key:De(vt,kt)}:{add:!1,key:De(kt,vt)}}function Gn(vt,kt,Lt){var _t=vt.findIndex(function($e){return $e.key===Lt}),De=vt[_t+1],on=kt.findIndex(function($e){return $e.key===Lt});if(De){var mn=kt.findIndex(function($e){return $e.key===De.key});return kt.slice(on+1,mn)}return kt.slice(on+1)}var Yn=["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"],di={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ie=function(){},zt="RC_TREE_MOTION_".concat(Math.random()),We={key:zt},En={key:zt,level:0,index:0,pos:"0",node:We,nodes:[We]},Xn={parent:null,children:[],pos:En.pos,data:We,title:null,key:zt,isStart:[],isEnd:[]};function Ve(vt,kt,Lt,_t){return kt===!1||!Lt?vt:vt.slice(0,Math.ceil(Lt/_t)+1)}function In(vt){var kt=vt.key,Lt=vt.pos;return(0,ce.km)(kt,Lt)}function Hn(vt){for(var kt=String(vt.data.key),Lt=vt;Lt.parent;)Lt=Lt.parent,kt="".concat(Lt.data.key," > ").concat(kt);return kt}var li=et.forwardRef(function(vt,kt){var Lt=vt.prefixCls,_t=vt.data,De=vt.selectable,on=vt.checkable,mn=vt.expandedKeys,$e=vt.selectedKeys,Bn=vt.checkedKeys,Re=vt.loadedKeys,Mn=vt.loadingKeys,Kn=vt.halfCheckedKeys,Fi=vt.keyEntities,ti=vt.disabled,sr=vt.dragging,rr=vt.dragOverNodeKey,xi=vt.dropPosition,wi=vt.motion,Ir=vt.height,ji=vt.itemHeight,yr=vt.virtual,xr=vt.scrollWidth,Qr=vt.focusable,Ii=vt.activeItem,br=vt.focused,Sr=vt.tabIndex,Bo=vt.onKeyDown,er=vt.onFocus,Lo=vt.onBlur,ys=vt.onActiveChange,Mo=vt.onListChangeStart,Lr=vt.onListChangeEnd,Pn=(0,bt.Z)(vt,Yn),Mt=et.useRef(null),jn=et.useRef(null);et.useImperativeHandle(kt,function(){return{scrollTo:function(Fe){Mt.current.scrollTo(Fe)},getIndentWidth:function(){return jn.current.offsetWidth}}});var kn=et.useState(mn),_n=(0,St.Z)(kn,2),Wn=_n[0],qn=_n[1],ui=et.useState(_t),Wi=(0,St.Z)(ui,2),en=Wi[0],Je=Wi[1],be=et.useState(_t),un=(0,St.Z)(be,2),fi=un[0],mi=un[1],ri=et.useState([]),ee=(0,St.Z)(ri,2),Cn=ee[0],Ti=ee[1],Xi=et.useState(null),On=(0,St.Z)(Xi,2),Ge=On[0],Si=On[1],Zi=et.useRef(_t);Zi.current=_t;function ur(){var pe=Zi.current;Je(pe),mi(pe),Ti([]),Si(null),Lr()}(0,Ot.Z)(function(){qn(mn);var pe=Qn(Wn,mn);if(pe.key!==null)if(pe.add){var Fe=en.findIndex(function(ei){var Xe=ei.key;return Xe===pe.key}),Ke=Ve(Gn(en,_t,pe.key),yr,Ir,ji),ve=en.slice();ve.splice(Fe+1,0,Xn),mi(ve),Ti(Ke),Si("show")}else{var Ee=_t.findIndex(function(ei){var Xe=ei.key;return Xe===pe.key}),_e=Ve(Gn(_t,en,pe.key),yr,Ir,ji),Sn=_t.slice();Sn.splice(Ee+1,0,Xn),mi(Sn),Ti(_e),Si("hide")}else en!==_t&&(Je(_t),mi(_t))},[mn,_t]),et.useEffect(function(){sr||ur()},[sr]);var Ln=wi?fi:_t,Ui={expandedKeys:mn,selectedKeys:$e,loadedKeys:Re,loadingKeys:Mn,checkedKeys:Bn,halfCheckedKeys:Kn,dragOverNodeKey:rr,dropPosition:xi,keyEntities:Fi};return et.createElement(et.Fragment,null,br&&Ii&&et.createElement("span",{style:di,"aria-live":"assertive"},Hn(Ii)),et.createElement("div",null,et.createElement("input",{style:di,disabled:Qr===!1||ti,tabIndex:Qr!==!1?Sr:null,onKeyDown:Bo,onFocus:er,onBlur:Lo,value:"",onChange:ie,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(Lt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(Lt,"-indent")},et.createElement("div",{ref:jn,className:"".concat(Lt,"-indent-unit")}))),et.createElement(Ht.Z,(0,xt.Z)({},Pn,{data:Ln,itemKey:In,height:Ir,fullHeight:!1,virtual:yr,itemHeight:ji,scrollWidth:xr,prefixCls:"".concat(Lt,"-list"),ref:Mt,role:"tree",onVisibleChange:function(Fe){Fe.every(function(Ke){return In(Ke)!==zt})&&ur()}}),function(pe){var Fe=pe.pos,Ke=Object.assign({},(pt(pe.data),pe.data)),ve=pe.title,Ee=pe.key,_e=pe.isStart,Sn=pe.isEnd,ei=(0,ce.km)(Ee,Fe);delete Ke.key,delete Ke.children;var Xe=(0,ce.H8)(ei,Ui);return et.createElement(He,(0,xt.Z)({},Ke,Xe,{title:ve,active:!!Ii&&Ee===Ii.key,pos:Fe,data:pe.data,isStart:_e,isEnd:Sn,motion:wi,motionNodes:Ee===zt?Cn:null,motionType:Ge,onMotionStart:Mo,onMotionEnd:ur,treeNodeRequiredProps:Ui,onMouseMove:function(){ys(null)}}))}))}),tn=li,Me=Qt(10225),rn=Qt(17341),Dn=Qt(35381),sn=10,Vt=function(vt){(0,ne.Z)(Lt,vt);var kt=(0,Ae.Z)(Lt);function Lt(){var _t;(0,ge.Z)(this,Lt);for(var De=arguments.length,on=new Array(De),mn=0;mn<De;mn++)on[mn]=arguments[mn];return _t=kt.call.apply(kt,[this].concat(on)),(0,se.Z)((0,jt.Z)(_t),"destroyed",!1),(0,se.Z)((0,jt.Z)(_t),"delayedDragEnterLogic",void 0),(0,se.Z)((0,jt.Z)(_t),"loadingRetryTimes",{}),(0,se.Z)((0,jt.Z)(_t),"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,ce.w$)()}),(0,se.Z)((0,jt.Z)(_t),"dragStartMousePosition",null),(0,se.Z)((0,jt.Z)(_t),"dragNodeProps",null),(0,se.Z)((0,jt.Z)(_t),"currentMouseOverDroppableNodeKey",null),(0,se.Z)((0,jt.Z)(_t),"listRef",et.createRef()),(0,se.Z)((0,jt.Z)(_t),"onNodeDragStart",function($e,Bn){var Re=_t.state,Mn=Re.expandedKeys,Kn=Re.keyEntities,Fi=_t.props.onDragStart,ti=Bn.eventKey;_t.dragNodeProps=Bn,_t.dragStartMousePosition={x:$e.clientX,y:$e.clientY};var sr=(0,Me._5)(Mn,ti);_t.setState({draggingNodeKey:ti,dragChildrenKeys:(0,Me.wA)(ti,Kn),indent:_t.listRef.current.getIndentWidth()}),_t.setExpandedKeys(sr),window.addEventListener("dragend",_t.onWindowDragEnd),Fi==null||Fi({event:$e,node:(0,ce.F)(Bn)})}),(0,se.Z)((0,jt.Z)(_t),"onNodeDragEnter",function($e,Bn){var Re=_t.state,Mn=Re.expandedKeys,Kn=Re.keyEntities,Fi=Re.dragChildrenKeys,ti=Re.flattenNodes,sr=Re.indent,rr=_t.props,xi=rr.onDragEnter,wi=rr.onExpand,Ir=rr.allowDrop,ji=rr.direction,yr=Bn.pos,xr=Bn.eventKey;if(_t.currentMouseOverDroppableNodeKey!==xr&&(_t.currentMouseOverDroppableNodeKey=xr),!_t.dragNodeProps){_t.resetDragState();return}var Qr=(0,Me.OM)($e,_t.dragNodeProps,Bn,sr,_t.dragStartMousePosition,Ir,ti,Kn,Mn,ji),Ii=Qr.dropPosition,br=Qr.dropLevelOffset,Sr=Qr.dropTargetKey,Bo=Qr.dropContainerKey,er=Qr.dropTargetPos,Lo=Qr.dropAllowed,ys=Qr.dragOverNodeKey;if(Fi.includes(Sr)||!Lo){_t.resetDragState();return}if(_t.delayedDragEnterLogic||(_t.delayedDragEnterLogic={}),Object.keys(_t.delayedDragEnterLogic).forEach(function(Mo){clearTimeout(_t.delayedDragEnterLogic[Mo])}),_t.dragNodeProps.eventKey!==Bn.eventKey&&($e.persist(),_t.delayedDragEnterLogic[yr]=window.setTimeout(function(){if(_t.state.draggingNodeKey!==null){var Mo=(0,xe.Z)(Mn),Lr=(0,Dn.Z)(Kn,Bn.eventKey);Lr&&(Lr.children||[]).length&&(Mo=(0,Me.L0)(Mn,Bn.eventKey)),_t.props.hasOwnProperty("expandedKeys")||_t.setExpandedKeys(Mo),wi==null||wi(Mo,{node:(0,ce.F)(Bn),expanded:!0,nativeEvent:$e.nativeEvent})}},800)),_t.dragNodeProps.eventKey===Sr&&br===0){_t.resetDragState();return}_t.setState({dragOverNodeKey:ys,dropPosition:Ii,dropLevelOffset:br,dropTargetKey:Sr,dropContainerKey:Bo,dropTargetPos:er,dropAllowed:Lo}),xi==null||xi({event:$e,node:(0,ce.F)(Bn),expandedKeys:Mn})}),(0,se.Z)((0,jt.Z)(_t),"onNodeDragOver",function($e,Bn){var Re=_t.state,Mn=Re.dragChildrenKeys,Kn=Re.flattenNodes,Fi=Re.keyEntities,ti=Re.expandedKeys,sr=Re.indent,rr=_t.props,xi=rr.onDragOver,wi=rr.allowDrop,Ir=rr.direction;if(_t.dragNodeProps){var ji=(0,Me.OM)($e,_t.dragNodeProps,Bn,sr,_t.dragStartMousePosition,wi,Kn,Fi,ti,Ir),yr=ji.dropPosition,xr=ji.dropLevelOffset,Qr=ji.dropTargetKey,Ii=ji.dropContainerKey,br=ji.dropTargetPos,Sr=ji.dropAllowed,Bo=ji.dragOverNodeKey;Mn.includes(Qr)||!Sr||(_t.dragNodeProps.eventKey===Qr&&xr===0?_t.state.dropPosition===null&&_t.state.dropLevelOffset===null&&_t.state.dropTargetKey===null&&_t.state.dropContainerKey===null&&_t.state.dropTargetPos===null&&_t.state.dropAllowed===!1&&_t.state.dragOverNodeKey===null||_t.resetDragState():yr===_t.state.dropPosition&&xr===_t.state.dropLevelOffset&&Qr===_t.state.dropTargetKey&&Ii===_t.state.dropContainerKey&&br===_t.state.dropTargetPos&&Sr===_t.state.dropAllowed&&Bo===_t.state.dragOverNodeKey||_t.setState({dropPosition:yr,dropLevelOffset:xr,dropTargetKey:Qr,dropContainerKey:Ii,dropTargetPos:br,dropAllowed:Sr,dragOverNodeKey:Bo}),xi==null||xi({event:$e,node:(0,ce.F)(Bn)}))}}),(0,se.Z)((0,jt.Z)(_t),"onNodeDragLeave",function($e,Bn){_t.currentMouseOverDroppableNodeKey===Bn.eventKey&&!$e.currentTarget.contains($e.relatedTarget)&&(_t.resetDragState(),_t.currentMouseOverDroppableNodeKey=null);var Re=_t.props.onDragLeave;Re==null||Re({event:$e,node:(0,ce.F)(Bn)})}),(0,se.Z)((0,jt.Z)(_t),"onWindowDragEnd",function($e){_t.onNodeDragEnd($e,null,!0),window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,se.Z)((0,jt.Z)(_t),"onNodeDragEnd",function($e,Bn){var Re=_t.props.onDragEnd;_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Re==null||Re({event:$e,node:(0,ce.F)(Bn)}),_t.dragNodeProps=null,window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,se.Z)((0,jt.Z)(_t),"onNodeDrop",function($e,Bn){var Re,Mn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kn=_t.state,Fi=Kn.dragChildrenKeys,ti=Kn.dropPosition,sr=Kn.dropTargetKey,rr=Kn.dropTargetPos,xi=Kn.dropAllowed;if(xi){var wi=_t.props.onDrop;if(_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),sr!==null){var Ir=(0,he.Z)((0,he.Z)({},(0,ce.H8)(sr,_t.getTreeNodeRequiredProps())),{},{active:((Re=_t.getActiveItem())===null||Re===void 0?void 0:Re.key)===sr,data:(0,Dn.Z)(_t.state.keyEntities,sr).node}),ji=Fi.includes(sr);(0,nt.ZP)(!ji,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var yr=(0,Me.yx)(rr),xr={event:$e,node:(0,ce.F)(Ir),dragNode:_t.dragNodeProps?(0,ce.F)(_t.dragNodeProps):null,dragNodesKeys:[_t.dragNodeProps.eventKey].concat(Fi),dropToGap:ti!==0,dropPosition:ti+Number(yr[yr.length-1])};Mn||wi==null||wi(xr),_t.dragNodeProps=null}}}),(0,se.Z)((0,jt.Z)(_t),"cleanDragState",function(){var $e=_t.state.draggingNodeKey;$e!==null&&_t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_t.dragStartMousePosition=null,_t.currentMouseOverDroppableNodeKey=null}),(0,se.Z)((0,jt.Z)(_t),"triggerExpandActionExpand",function($e,Bn){var Re=_t.state,Mn=Re.expandedKeys,Kn=Re.flattenNodes,Fi=Bn.expanded,ti=Bn.key,sr=Bn.isLeaf;if(!(sr||$e.shiftKey||$e.metaKey||$e.ctrlKey)){var rr=Kn.filter(function(wi){return wi.key===ti})[0],xi=(0,ce.F)((0,he.Z)((0,he.Z)({},(0,ce.H8)(ti,_t.getTreeNodeRequiredProps())),{},{data:rr.data}));_t.setExpandedKeys(Fi?(0,Me._5)(Mn,ti):(0,Me.L0)(Mn,ti)),_t.onNodeExpand($e,xi)}}),(0,se.Z)((0,jt.Z)(_t),"onNodeClick",function($e,Bn){var Re=_t.props,Mn=Re.onClick,Kn=Re.expandAction;Kn==="click"&&_t.triggerExpandActionExpand($e,Bn),Mn==null||Mn($e,Bn)}),(0,se.Z)((0,jt.Z)(_t),"onNodeDoubleClick",function($e,Bn){var Re=_t.props,Mn=Re.onDoubleClick,Kn=Re.expandAction;Kn==="doubleClick"&&_t.triggerExpandActionExpand($e,Bn),Mn==null||Mn($e,Bn)}),(0,se.Z)((0,jt.Z)(_t),"onNodeSelect",function($e,Bn){var Re=_t.state.selectedKeys,Mn=_t.state,Kn=Mn.keyEntities,Fi=Mn.fieldNames,ti=_t.props,sr=ti.onSelect,rr=ti.multiple,xi=Bn.selected,wi=Bn[Fi.key],Ir=!xi;Ir?rr?Re=(0,Me.L0)(Re,wi):Re=[wi]:Re=(0,Me._5)(Re,wi);var ji=Re.map(function(yr){var xr=(0,Dn.Z)(Kn,yr);return xr?xr.node:null}).filter(Boolean);_t.setUncontrolledState({selectedKeys:Re}),sr==null||sr(Re,{event:"select",selected:Ir,node:Bn,selectedNodes:ji,nativeEvent:$e.nativeEvent})}),(0,se.Z)((0,jt.Z)(_t),"onNodeCheck",function($e,Bn,Re){var Mn=_t.state,Kn=Mn.keyEntities,Fi=Mn.checkedKeys,ti=Mn.halfCheckedKeys,sr=_t.props,rr=sr.checkStrictly,xi=sr.onCheck,wi=Bn.key,Ir,ji={event:"check",node:Bn,checked:Re,nativeEvent:$e.nativeEvent};if(rr){var yr=Re?(0,Me.L0)(Fi,wi):(0,Me._5)(Fi,wi),xr=(0,Me._5)(ti,wi);Ir={checked:yr,halfChecked:xr},ji.checkedNodes=yr.map(function(er){return(0,Dn.Z)(Kn,er)}).filter(Boolean).map(function(er){return er.node}),_t.setUncontrolledState({checkedKeys:yr})}else{var Qr=(0,rn.S)([].concat((0,xe.Z)(Fi),[wi]),!0,Kn),Ii=Qr.checkedKeys,br=Qr.halfCheckedKeys;if(!Re){var Sr=new Set(Ii);Sr.delete(wi);var Bo=(0,rn.S)(Array.from(Sr),{checked:!1,halfCheckedKeys:br},Kn);Ii=Bo.checkedKeys,br=Bo.halfCheckedKeys}Ir=Ii,ji.checkedNodes=[],ji.checkedNodesPositions=[],ji.halfCheckedKeys=br,Ii.forEach(function(er){var Lo=(0,Dn.Z)(Kn,er);if(Lo){var ys=Lo.node,Mo=Lo.pos;ji.checkedNodes.push(ys),ji.checkedNodesPositions.push({node:ys,pos:Mo})}}),_t.setUncontrolledState({checkedKeys:Ii},!1,{halfCheckedKeys:br})}xi==null||xi(Ir,ji)}),(0,se.Z)((0,jt.Z)(_t),"onNodeLoad",function($e){var Bn,Re=$e.key,Mn=_t.state.keyEntities,Kn=(0,Dn.Z)(Mn,Re);if(!(Kn!=null&&(Bn=Kn.children)!==null&&Bn!==void 0&&Bn.length)){var Fi=new Promise(function(ti,sr){_t.setState(function(rr){var xi=rr.loadedKeys,wi=xi===void 0?[]:xi,Ir=rr.loadingKeys,ji=Ir===void 0?[]:Ir,yr=_t.props,xr=yr.loadData,Qr=yr.onLoad;if(!xr||wi.includes(Re)||ji.includes(Re))return null;var Ii=xr($e);return Ii.then(function(){var br=_t.state.loadedKeys,Sr=(0,Me.L0)(br,Re);Qr==null||Qr(Sr,{event:"load",node:$e}),_t.setUncontrolledState({loadedKeys:Sr}),_t.setState(function(Bo){return{loadingKeys:(0,Me._5)(Bo.loadingKeys,Re)}}),ti()}).catch(function(br){if(_t.setState(function(Bo){return{loadingKeys:(0,Me._5)(Bo.loadingKeys,Re)}}),_t.loadingRetryTimes[Re]=(_t.loadingRetryTimes[Re]||0)+1,_t.loadingRetryTimes[Re]>=sn){var Sr=_t.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_t.setUncontrolledState({loadedKeys:(0,Me.L0)(Sr,Re)}),ti()}sr(br)}),{loadingKeys:(0,Me.L0)(ji,Re)}})});return Fi.catch(function(){}),Fi}}),(0,se.Z)((0,jt.Z)(_t),"onNodeMouseEnter",function($e,Bn){var Re=_t.props.onMouseEnter;Re==null||Re({event:$e,node:Bn})}),(0,se.Z)((0,jt.Z)(_t),"onNodeMouseLeave",function($e,Bn){var Re=_t.props.onMouseLeave;Re==null||Re({event:$e,node:Bn})}),(0,se.Z)((0,jt.Z)(_t),"onNodeContextMenu",function($e,Bn){var Re=_t.props.onRightClick;Re&&($e.preventDefault(),Re({event:$e,node:Bn}))}),(0,se.Z)((0,jt.Z)(_t),"onFocus",function(){var $e=_t.props.onFocus;_t.setState({focused:!0});for(var Bn=arguments.length,Re=new Array(Bn),Mn=0;Mn<Bn;Mn++)Re[Mn]=arguments[Mn];$e==null||$e.apply(void 0,Re)}),(0,se.Z)((0,jt.Z)(_t),"onBlur",function(){var $e=_t.props.onBlur;_t.setState({focused:!1}),_t.onActiveChange(null);for(var Bn=arguments.length,Re=new Array(Bn),Mn=0;Mn<Bn;Mn++)Re[Mn]=arguments[Mn];$e==null||$e.apply(void 0,Re)}),(0,se.Z)((0,jt.Z)(_t),"getTreeNodeRequiredProps",function(){var $e=_t.state,Bn=$e.expandedKeys,Re=$e.selectedKeys,Mn=$e.loadedKeys,Kn=$e.loadingKeys,Fi=$e.checkedKeys,ti=$e.halfCheckedKeys,sr=$e.dragOverNodeKey,rr=$e.dropPosition,xi=$e.keyEntities;return{expandedKeys:Bn||[],selectedKeys:Re||[],loadedKeys:Mn||[],loadingKeys:Kn||[],checkedKeys:Fi||[],halfCheckedKeys:ti||[],dragOverNodeKey:sr,dropPosition:rr,keyEntities:xi}}),(0,se.Z)((0,jt.Z)(_t),"setExpandedKeys",function($e){var Bn=_t.state,Re=Bn.treeData,Mn=Bn.fieldNames,Kn=(0,ce.oH)(Re,$e,Mn);_t.setUncontrolledState({expandedKeys:$e,flattenNodes:Kn},!0)}),(0,se.Z)((0,jt.Z)(_t),"onNodeExpand",function($e,Bn){var Re=_t.state.expandedKeys,Mn=_t.state,Kn=Mn.listChanging,Fi=Mn.fieldNames,ti=_t.props,sr=ti.onExpand,rr=ti.loadData,xi=Bn.expanded,wi=Bn[Fi.key];if(!Kn){var Ir=Re.includes(wi),ji=!xi;if((0,nt.ZP)(xi&&Ir||!xi&&!Ir,"Expand state not sync with index check"),Re=ji?(0,Me.L0)(Re,wi):(0,Me._5)(Re,wi),_t.setExpandedKeys(Re),sr==null||sr(Re,{node:Bn,expanded:ji,nativeEvent:$e.nativeEvent}),ji&&rr){var yr=_t.onNodeLoad(Bn);yr&&yr.then(function(){var xr=(0,ce.oH)(_t.state.treeData,Re,Fi);_t.setUncontrolledState({flattenNodes:xr})}).catch(function(){var xr=_t.state.expandedKeys,Qr=(0,Me._5)(xr,wi);_t.setExpandedKeys(Qr)})}}}),(0,se.Z)((0,jt.Z)(_t),"onListChangeStart",function(){_t.setUncontrolledState({listChanging:!0})}),(0,se.Z)((0,jt.Z)(_t),"onListChangeEnd",function(){setTimeout(function(){_t.setUncontrolledState({listChanging:!1})})}),(0,se.Z)((0,jt.Z)(_t),"onActiveChange",function($e){var Bn=_t.state.activeKey,Re=_t.props,Mn=Re.onActiveChange,Kn=Re.itemScrollOffset,Fi=Kn===void 0?0:Kn;Bn!==$e&&(_t.setState({activeKey:$e}),$e!==null&&_t.scrollTo({key:$e,offset:Fi}),Mn==null||Mn($e))}),(0,se.Z)((0,jt.Z)(_t),"getActiveItem",function(){var $e=_t.state,Bn=$e.activeKey,Re=$e.flattenNodes;return Bn===null?null:Re.find(function(Mn){var Kn=Mn.key;return Kn===Bn})||null}),(0,se.Z)((0,jt.Z)(_t),"offsetActiveKey",function($e){var Bn=_t.state,Re=Bn.flattenNodes,Mn=Bn.activeKey,Kn=Re.findIndex(function(sr){var rr=sr.key;return rr===Mn});Kn===-1&&$e<0&&(Kn=Re.length),Kn=(Kn+$e+Re.length)%Re.length;var Fi=Re[Kn];if(Fi){var ti=Fi.key;_t.onActiveChange(ti)}else _t.onActiveChange(null)}),(0,se.Z)((0,jt.Z)(_t),"onKeyDown",function($e){var Bn=_t.state,Re=Bn.activeKey,Mn=Bn.expandedKeys,Kn=Bn.checkedKeys,Fi=Bn.fieldNames,ti=_t.props,sr=ti.onKeyDown,rr=ti.checkable,xi=ti.selectable;switch($e.which){case Ie.Z.UP:{_t.offsetActiveKey(-1),$e.preventDefault();break}case Ie.Z.DOWN:{_t.offsetActiveKey(1),$e.preventDefault();break}}var wi=_t.getActiveItem();if(wi&&wi.data){var Ir=_t.getTreeNodeRequiredProps(),ji=wi.data.isLeaf===!1||!!(wi.data[Fi.children]||[]).length,yr=(0,ce.F)((0,he.Z)((0,he.Z)({},(0,ce.H8)(Re,Ir)),{},{data:wi.data,active:!0}));switch($e.which){case Ie.Z.LEFT:{ji&&Mn.includes(Re)?_t.onNodeExpand({},yr):wi.parent&&_t.onActiveChange(wi.parent.key),$e.preventDefault();break}case Ie.Z.RIGHT:{ji&&!Mn.includes(Re)?_t.onNodeExpand({},yr):wi.children&&wi.children.length&&_t.onActiveChange(wi.children[0].key),$e.preventDefault();break}case Ie.Z.ENTER:case Ie.Z.SPACE:{rr&&!yr.disabled&&yr.checkable!==!1&&!yr.disableCheckbox?_t.onNodeCheck({},yr,!Kn.includes(Re)):!rr&&xi&&!yr.disabled&&yr.selectable!==!1&&_t.onNodeSelect({},yr);break}}}sr==null||sr($e)}),(0,se.Z)((0,jt.Z)(_t),"setUncontrolledState",function($e){var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_t.destroyed){var Mn=!1,Kn=!0,Fi={};Object.keys($e).forEach(function(ti){if(_t.props.hasOwnProperty(ti)){Kn=!1;return}Mn=!0,Fi[ti]=$e[ti]}),Mn&&(!Bn||Kn)&&_t.setState((0,he.Z)((0,he.Z)({},Fi),Re))}}),(0,se.Z)((0,jt.Z)(_t),"scrollTo",function($e){_t.listRef.current.scrollTo($e)}),_t}return(0,Ut.Z)(Lt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var De=this.props,on=De.activeKey,mn=De.itemScrollOffset,$e=mn===void 0?0:mn;on!==void 0&&on!==this.state.activeKey&&(this.setState({activeKey:on}),on!==null&&this.scrollTo({key:on,offset:$e}))}},{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 De=this.state,on=De.focused,mn=De.flattenNodes,$e=De.keyEntities,Bn=De.draggingNodeKey,Re=De.activeKey,Mn=De.dropLevelOffset,Kn=De.dropContainerKey,Fi=De.dropTargetKey,ti=De.dropPosition,sr=De.dragOverNodeKey,rr=De.indent,xi=this.props,wi=xi.prefixCls,Ir=xi.className,ji=xi.style,yr=xi.showLine,xr=xi.focusable,Qr=xi.tabIndex,Ii=Qr===void 0?0:Qr,br=xi.selectable,Sr=xi.showIcon,Bo=xi.icon,er=xi.switcherIcon,Lo=xi.draggable,ys=xi.checkable,Mo=xi.checkStrictly,Lr=xi.disabled,Pn=xi.motion,Mt=xi.loadData,jn=xi.filterTreeNode,kn=xi.height,_n=xi.itemHeight,Wn=xi.scrollWidth,qn=xi.virtual,ui=xi.titleRender,Wi=xi.dropIndicatorRender,en=xi.onContextMenu,Je=xi.onScroll,be=xi.direction,un=xi.rootClassName,fi=xi.rootStyle,mi=(0,Dt.Z)(this.props,{aria:!0,data:!0}),ri;Lo&&((0,Yt.Z)(Lo)==="object"?ri=Lo:typeof Lo=="function"?ri={nodeDraggable:Lo}:ri={});var ee={prefixCls:wi,selectable:br,showIcon:Sr,icon:Bo,switcherIcon:er,draggable:ri,draggingNodeKey:Bn,checkable:ys,checkStrictly:Mo,disabled:Lr,keyEntities:$e,dropLevelOffset:Mn,dropContainerKey:Kn,dropTargetKey:Fi,dropPosition:ti,dragOverNodeKey:sr,indent:rr,direction:be,dropIndicatorRender:Wi,loadData:Mt,filterTreeNode:jn,titleRender:ui,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 et.createElement(ut.k.Provider,{value:ee},et.createElement("div",{className:de()(wi,Ir,un,(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(wi,"-show-line"),yr),"".concat(wi,"-focused"),on),"".concat(wi,"-active-focused"),Re!==null)),style:fi},et.createElement(tn,(0,xt.Z)({ref:this.listRef,prefixCls:wi,style:ji,data:mn,disabled:Lr,selectable:br,checkable:!!ys,motion:Pn,dragging:Bn!==null,height:kn,itemHeight:_n,virtual:qn,focusable:xr,focused:on,tabIndex:Ii,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:en,onScroll:Je,scrollWidth:Wn},this.getTreeNodeRequiredProps(),mi))))}}],[{key:"getDerivedStateFromProps",value:function(De,on){var mn=on.prevProps,$e={prevProps:De};function Bn(Ii){return!mn&&De.hasOwnProperty(Ii)||mn&&mn[Ii]!==De[Ii]}var Re,Mn=on.fieldNames;if(Bn("fieldNames")&&(Mn=(0,ce.w$)(De.fieldNames),$e.fieldNames=Mn),Bn("treeData")?Re=De.treeData:Bn("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Re=(0,ce.zn)(De.children)),Re){$e.treeData=Re;var Kn=(0,ce.I8)(Re,{fieldNames:Mn});$e.keyEntities=(0,he.Z)((0,se.Z)({},zt,En),Kn.keyEntities)}var Fi=$e.keyEntities||on.keyEntities;if(Bn("expandedKeys")||mn&&Bn("autoExpandParent"))$e.expandedKeys=De.autoExpandParent||!mn&&De.defaultExpandParent?(0,Me.r7)(De.expandedKeys,Fi):De.expandedKeys;else if(!mn&&De.defaultExpandAll){var ti=(0,he.Z)({},Fi);delete ti[zt];var sr=[];Object.keys(ti).forEach(function(Ii){var br=ti[Ii];br.children&&br.children.length&&sr.push(br.key)}),$e.expandedKeys=sr}else!mn&&De.defaultExpandedKeys&&($e.expandedKeys=De.autoExpandParent||De.defaultExpandParent?(0,Me.r7)(De.defaultExpandedKeys,Fi):De.defaultExpandedKeys);if($e.expandedKeys||delete $e.expandedKeys,Re||$e.expandedKeys){var rr=(0,ce.oH)(Re||on.treeData,$e.expandedKeys||on.expandedKeys,Mn);$e.flattenNodes=rr}if(De.selectable&&(Bn("selectedKeys")?$e.selectedKeys=(0,Me.BT)(De.selectedKeys,De):!mn&&De.defaultSelectedKeys&&($e.selectedKeys=(0,Me.BT)(De.defaultSelectedKeys,De))),De.checkable){var xi;if(Bn("checkedKeys")?xi=(0,Me.E6)(De.checkedKeys)||{}:!mn&&De.defaultCheckedKeys?xi=(0,Me.E6)(De.defaultCheckedKeys)||{}:Re&&(xi=(0,Me.E6)(De.checkedKeys)||{checkedKeys:on.checkedKeys,halfCheckedKeys:on.halfCheckedKeys}),xi){var wi=xi,Ir=wi.checkedKeys,ji=Ir===void 0?[]:Ir,yr=wi.halfCheckedKeys,xr=yr===void 0?[]:yr;if(!De.checkStrictly){var Qr=(0,rn.S)(ji,!0,Fi);ji=Qr.checkedKeys,xr=Qr.halfCheckedKeys}$e.checkedKeys=ji,$e.halfCheckedKeys=xr}}return Bn("loadedKeys")&&($e.loadedKeys=De.loadedKeys),$e}}]),Lt}(et.Component);(0,se.Z)(Vt,"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:ht,allowDrop:function(){return!0},expandAction:!1}),(0,se.Z)(Vt,"TreeNode",re.Z);var Pt=Vt,mt=Pt},10225:function(gn,ze,Qt){"use strict";Qt.d(ze,{BT:function(){return et},E6:function(){return ht},L0:function(){return se},OM:function(){return nt},_5:function(){return Ae},r7:function(){return pt},wA:function(){return de},yx:function(){return ke}});var xt=Qt(74902),Yt=Qt(71002),he=Qt(80334),xe=Qt(67294),ge=Qt(86128),Ut=Qt(35381),jt=Qt(1089),ne=null;function Ae(St,bt){if(!St)return[];var Ot=St.slice(),Ht=Ot.indexOf(bt);return Ht>=0&&Ot.splice(Ht,1),Ot}function se(St,bt){var Ot=(St||[]).slice();return Ot.indexOf(bt)===-1&&Ot.push(bt),Ot}function ke(St){return St.split("-")}function de(St,bt){var Ot=[],Ht=(0,Ut.Z)(bt,St);function Wt(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];re.forEach(function(te){var Ce=te.key,ce=te.children;Ot.push(Ce),Wt(ce)})}return Wt(Ht.children),Ot}function Ie(St){if(St.parent){var bt=ke(St.pos);return Number(bt[bt.length-1])===St.parent.children.length-1}return!1}function Dt(St){var bt=ke(St.pos);return Number(bt[bt.length-1])===0}function nt(St,bt,Ot,Ht,Wt,re,te,Ce,ce,Qe){var je,He=St.clientX,Qn=St.clientY,Gn=St.target.getBoundingClientRect(),Yn=Gn.top,di=Gn.height,ie=(Qe==="rtl"?-1:1)*(((Wt==null?void 0:Wt.x)||0)-He),zt=(ie-12)/Ht,We=ce.filter(function(mt){var vt;return(vt=Ce[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),En=(0,Ut.Z)(Ce,Ot.eventKey);if(Qn<Yn+di/2){var Xn=te.findIndex(function(mt){return mt.key===En.key}),Ve=Xn<=0?0:Xn-1,In=te[Ve].key;En=(0,Ut.Z)(Ce,In)}var Hn=En.key,li=En,tn=En.key,Me=0,rn=0;if(!We.includes(Hn))for(var Dn=0;Dn<zt&&Ie(En);Dn+=1)En=En.parent,rn+=1;var sn=bt.data,Vt=En.node,Pt=!0;return Dt(En)&&En.level===0&&Qn<Yn+di/2&&re({dragNode:sn,dropNode:Vt,dropPosition:-1})&&En.key===Ot.eventKey?Me=-1:(li.children||[]).length&&We.includes(tn)?re({dragNode:sn,dropNode:Vt,dropPosition:0})?Me=0:Pt=!1:rn===0?zt>-1.5?re({dragNode:sn,dropNode:Vt,dropPosition:1})?Me=1:Pt=!1:re({dragNode:sn,dropNode:Vt,dropPosition:0})?Me=0:re({dragNode:sn,dropNode:Vt,dropPosition:1})?Me=1:Pt=!1:re({dragNode:sn,dropNode:Vt,dropPosition:1})?Me=1:Pt=!1,{dropPosition:Me,dropLevelOffset:rn,dropTargetKey:En.key,dropTargetPos:En.pos,dragOverNodeKey:tn,dropContainerKey:Me===0?null:((je=En.parent)===null||je===void 0?void 0:je.key)||null,dropAllowed:Pt}}function et(St,bt){if(St){var Ot=bt.multiple;return Ot?St.slice():St.length?[St[0]]:St}}var ut=function(bt){return bt};function at(St,bt){if(!St)return[];var Ot=bt||{},Ht=Ot.processProps,Wt=Ht===void 0?ut:Ht,re=Array.isArray(St)?St:[St];return re.map(function(te){var Ce=te.children,ce=_objectWithoutProperties(te,ne),Qe=at(Ce,bt);return React.createElement(TreeNode,_extends({key:ce.key},Wt(ce)),Qe)})}function ht(St){if(!St)return null;var bt;if(Array.isArray(St))bt={checkedKeys:St,halfCheckedKeys:void 0};else if((0,Yt.Z)(St)==="object")bt={checkedKeys:St.checked||void 0,halfCheckedKeys:St.halfChecked||void 0};else return(0,he.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return bt}function pt(St,bt){var Ot=new Set;function Ht(Wt){if(!Ot.has(Wt)){var re=(0,Ut.Z)(bt,Wt);if(re){Ot.add(Wt);var te=re.parent,Ce=re.node;Ce.disabled||te&&Ht(te.key)}}}return(St||[]).forEach(function(Wt){Ht(Wt)}),(0,xt.Z)(Ot)}},17341:function(gn,ze,Qt){"use strict";Qt.d(ze,{S:function(){return jt}});var xt=Qt(80334),Yt=Qt(35381);function he(ne,Ae){var se=new Set;return ne.forEach(function(ke){Ae.has(ke)||se.add(ke)}),se}function xe(ne){var Ae=ne||{},se=Ae.disabled,ke=Ae.disableCheckbox,de=Ae.checkable;return!!(se||ke)||de===!1}function ge(ne,Ae,se,ke){for(var de=new Set(ne),Ie=new Set,Dt=0;Dt<=se;Dt+=1){var nt=Ae.get(Dt)||new Set;nt.forEach(function(ht){var pt=ht.key,St=ht.node,bt=ht.children,Ot=bt===void 0?[]:bt;de.has(pt)&&!ke(St)&&Ot.filter(function(Ht){return!ke(Ht.node)}).forEach(function(Ht){de.add(Ht.key)})})}for(var et=new Set,ut=se;ut>=0;ut-=1){var at=Ae.get(ut)||new Set;at.forEach(function(ht){var pt=ht.parent,St=ht.node;if(!(ke(St)||!ht.parent||et.has(ht.parent.key))){if(ke(ht.parent.node)){et.add(pt.key);return}var bt=!0,Ot=!1;(pt.children||[]).filter(function(Ht){return!ke(Ht.node)}).forEach(function(Ht){var Wt=Ht.key,re=de.has(Wt);bt&&!re&&(bt=!1),!Ot&&(re||Ie.has(Wt))&&(Ot=!0)}),bt&&de.add(pt.key),Ot&&Ie.add(pt.key),et.add(pt.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(he(Ie,de))}}function Ut(ne,Ae,se,ke,de){for(var Ie=new Set(ne),Dt=new Set(Ae),nt=0;nt<=ke;nt+=1){var et=se.get(nt)||new Set;et.forEach(function(pt){var St=pt.key,bt=pt.node,Ot=pt.children,Ht=Ot===void 0?[]:Ot;!Ie.has(St)&&!Dt.has(St)&&!de(bt)&&Ht.filter(function(Wt){return!de(Wt.node)}).forEach(function(Wt){Ie.delete(Wt.key)})})}Dt=new Set;for(var ut=new Set,at=ke;at>=0;at-=1){var ht=se.get(at)||new Set;ht.forEach(function(pt){var St=pt.parent,bt=pt.node;if(!(de(bt)||!pt.parent||ut.has(pt.parent.key))){if(de(pt.parent.node)){ut.add(St.key);return}var Ot=!0,Ht=!1;(St.children||[]).filter(function(Wt){return!de(Wt.node)}).forEach(function(Wt){var re=Wt.key,te=Ie.has(re);Ot&&!te&&(Ot=!1),!Ht&&(te||Dt.has(re))&&(Ht=!0)}),Ot||Ie.delete(St.key),Ht&&Dt.add(St.key),ut.add(St.key)}})}return{checkedKeys:Array.from(Ie),halfCheckedKeys:Array.from(he(Dt,Ie))}}function jt(ne,Ae,se,ke){var de=[],Ie;ke?Ie=ke:Ie=xe;var Dt=new Set(ne.filter(function(at){var ht=!!(0,Yt.Z)(se,at);return ht||de.push(at),ht})),nt=new Map,et=0;Object.keys(se).forEach(function(at){var ht=se[at],pt=ht.level,St=nt.get(pt);St||(St=new Set,nt.set(pt,St)),St.add(ht),et=Math.max(et,pt)}),(0,xt.ZP)(!de.length,"Tree missing follow keys: ".concat(de.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var ut;return Ae===!0?ut=ge(Dt,nt,et,Ie):ut=Ut(Dt,Ae.halfCheckedKeys,nt,et,Ie),ut}},35381:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return xt}});function xt(Yt,he){return Yt[he]}},1089:function(gn,ze,Qt){"use strict";Qt.d(ze,{F:function(){return pt},H8:function(){return ht},I8:function(){return at},km:function(){return de},oH:function(){return et},w$:function(){return Ie},zn:function(){return nt}});var xt=Qt(71002),Yt=Qt(74902),he=Qt(1413),xe=Qt(45987),ge=Qt(50344),Ut=Qt(98423),jt=Qt(80334),ne=Qt(35381),Ae=["children"];function se(St,bt){return"".concat(St,"-").concat(bt)}function ke(St){return St&&St.type&&St.type.isTreeNode}function de(St,bt){return St!=null?St:bt}function Ie(St){var bt=St||{},Ot=bt.title,Ht=bt._title,Wt=bt.key,re=bt.children,te=Ot||"title";return{title:te,_title:Ht||[te],key:Wt||"key",children:re||"children"}}function Dt(St,bt){var Ot=new Map;function Ht(Wt){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Wt||[]).forEach(function(te){var Ce=te[bt.key],ce=te[bt.children];warning(Ce!=null,"Tree node must have a certain key: [".concat(re).concat(Ce,"]"));var Qe=String(Ce);warning(!Ot.has(Qe)||Ce===null||Ce===void 0,"Same 'key' exist in the Tree: ".concat(Qe)),Ot.set(Qe,!0),Ht(ce,"".concat(re).concat(Qe," > "))})}Ht(St)}function nt(St){function bt(Ot){var Ht=(0,ge.Z)(Ot);return Ht.map(function(Wt){if(!ke(Wt))return(0,jt.ZP)(!Wt,"Tree/TreeNode can only accept TreeNode as children."),null;var re=Wt.key,te=Wt.props,Ce=te.children,ce=(0,xe.Z)(te,Ae),Qe=(0,he.Z)({key:re},ce),je=bt(Ce);return je.length&&(Qe.children=je),Qe}).filter(function(Wt){return Wt})}return bt(St)}function et(St,bt,Ot){var Ht=Ie(Ot),Wt=Ht._title,re=Ht.key,te=Ht.children,Ce=new Set(bt===!0?[]:bt),ce=[];function Qe(je){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return je.map(function(Qn,Gn){for(var Yn=se(He?He.pos:"0",Gn),di=de(Qn[re],Yn),ie,zt=0;zt<Wt.length;zt+=1){var We=Wt[zt];if(Qn[We]!==void 0){ie=Qn[We];break}}var En=Object.assign((0,Ut.Z)(Qn,[].concat((0,Yt.Z)(Wt),[re,te])),{title:ie,key:di,parent:He,pos:Yn,children:null,data:Qn,isStart:[].concat((0,Yt.Z)(He?He.isStart:[]),[Gn===0]),isEnd:[].concat((0,Yt.Z)(He?He.isEnd:[]),[Gn===je.length-1])});return ce.push(En),bt===!0||Ce.has(di)?En.children=Qe(Qn[te]||[],En):En.children=[],En})}return Qe(St),ce}function ut(St,bt,Ot){var Ht={};(0,xt.Z)(Ot)==="object"?Ht=Ot:Ht={externalGetKey:Ot},Ht=Ht||{};var Wt=Ht,re=Wt.childrenPropName,te=Wt.externalGetKey,Ce=Wt.fieldNames,ce=Ie(Ce),Qe=ce.key,je=ce.children,He=re||je,Qn;te?typeof te=="string"?Qn=function(di){return di[te]}:typeof te=="function"&&(Qn=function(di){return te(di)}):Qn=function(di,ie){return de(di[Qe],ie)};function Gn(Yn,di,ie,zt){var We=Yn?Yn[He]:St,En=Yn?se(ie.pos,di):"0",Xn=Yn?[].concat((0,Yt.Z)(zt),[Yn]):[];if(Yn){var Ve=Qn(Yn,En),In={node:Yn,index:di,pos:En,key:Ve,parentPos:ie.node?ie.pos:null,level:ie.level+1,nodes:Xn};bt(In)}We&&We.forEach(function(Hn,li){Gn(Hn,li,{node:Yn,pos:En,level:ie?ie.level+1:-1},Xn)})}Gn(null)}function at(St){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ot=bt.initWrapper,Ht=bt.processEntity,Wt=bt.onProcessFinished,re=bt.externalGetKey,te=bt.childrenPropName,Ce=bt.fieldNames,ce=arguments.length>2?arguments[2]:void 0,Qe=re||ce,je={},He={},Qn={posEntities:je,keyEntities:He};return Ot&&(Qn=Ot(Qn)||Qn),ut(St,function(Gn){var Yn=Gn.node,di=Gn.index,ie=Gn.pos,zt=Gn.key,We=Gn.parentPos,En=Gn.level,Xn=Gn.nodes,Ve={node:Yn,nodes:Xn,index:di,key:zt,pos:ie,level:En},In=de(zt,ie);je[ie]=Ve,He[In]=Ve,Ve.parent=je[We],Ve.parent&&(Ve.parent.children=Ve.parent.children||[],Ve.parent.children.push(Ve)),Ht&&Ht(Ve,Qn)},{externalGetKey:Qe,childrenPropName:te,fieldNames:Ce}),Wt&&Wt(Qn),Qn}function ht(St,bt){var Ot=bt.expandedKeys,Ht=bt.selectedKeys,Wt=bt.loadedKeys,re=bt.loadingKeys,te=bt.checkedKeys,Ce=bt.halfCheckedKeys,ce=bt.dragOverNodeKey,Qe=bt.dropPosition,je=bt.keyEntities,He=(0,ne.Z)(je,St),Qn={eventKey:St,expanded:Ot.indexOf(St)!==-1,selected:Ht.indexOf(St)!==-1,loaded:Wt.indexOf(St)!==-1,loading:re.indexOf(St)!==-1,checked:te.indexOf(St)!==-1,halfChecked:Ce.indexOf(St)!==-1,pos:String(He?He.pos:""),dragOver:ce===St&&Qe===0,dragOverGapTop:ce===St&&Qe===-1,dragOverGapBottom:ce===St&&Qe===1};return Qn}function pt(St){var bt=St.data,Ot=St.expanded,Ht=St.selected,Wt=St.checked,re=St.loaded,te=St.loading,Ce=St.halfChecked,ce=St.dragOver,Qe=St.dragOverGapTop,je=St.dragOverGapBottom,He=St.pos,Qn=St.active,Gn=St.eventKey,Yn=(0,he.Z)((0,he.Z)({},bt),{},{expanded:Ot,selected:Ht,checked:Wt,loaded:re,loading:te,halfChecked:Ce,dragOver:ce,dragOverGapTop:Qe,dragOverGapBottom:je,pos:He,active:Qn,key:Gn});return"props"in Yn||Object.defineProperty(Yn,"props",{get:function(){return(0,jt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),St}}),Yn}},73299:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Lr}});var xt=Qt(87462),Yt=Qt(1413),he=Qt(71002),xe=Qt(97685),ge=Qt(4942),Ut=Qt(45987),jt=Qt(67294),ne=Qt(73935),Ae=Qt(94184),se=Qt.n(Ae),ke=Qt(48555),de=jt.forwardRef(function(Pn,Mt){var jn=Pn.height,kn=Pn.offsetY,_n=Pn.offsetX,Wn=Pn.children,qn=Pn.prefixCls,ui=Pn.onInnerResize,Wi=Pn.innerProps,en=Pn.rtl,Je=Pn.extra,be={},un={display:"flex",flexDirection:"column"};if(kn!==void 0){var fi;be={height:jn,position:"relative",overflow:"hidden"},un=(0,Yt.Z)((0,Yt.Z)({},un),{},(fi={transform:"translateY(".concat(kn,"px)")},(0,ge.Z)(fi,en?"marginRight":"marginLeft",-_n),(0,ge.Z)(fi,"position","absolute"),(0,ge.Z)(fi,"left",0),(0,ge.Z)(fi,"right",0),(0,ge.Z)(fi,"top",0),fi))}return jt.createElement("div",{style:be},jt.createElement(ke.Z,{onResize:function(ri){var ee=ri.offsetHeight;ee&&ui&&ui()}},jt.createElement("div",(0,xt.Z)({style:un,className:se()((0,ge.Z)({},"".concat(qn,"-holder-inner"),qn)),ref:Mt},Wi),Wn,Je)))});de.displayName="Filler";var Ie=de,Dt=function(Mt){return+setTimeout(Mt,16)},nt=function(Mt){return clearTimeout(Mt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Dt=function(Mt){return window.requestAnimationFrame(Mt)},nt=function(Mt){return window.cancelAnimationFrame(Mt)});var et=0,ut=new Map;function at(Pn){ut.delete(Pn)}var ht=function(Mt){var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;et+=1;var kn=et;function _n(Wn){if(Wn===0)at(kn),Mt();else{var qn=Dt(function(){_n(Wn-1)});ut.set(kn,qn)}}return _n(jn),kn};ht.cancel=function(Pn){var Mt=ut.get(Pn);return at(Mt),nt(Mt)};var pt=ht;function St(Pn,Mt){var jn="touches"in Pn?Pn.touches[0]:Pn;return jn[Mt?"pageX":"pageY"]}var bt=jt.forwardRef(function(Pn,Mt){var jn,kn=Pn.prefixCls,_n=Pn.rtl,Wn=Pn.scrollOffset,qn=Pn.scrollRange,ui=Pn.onStartMove,Wi=Pn.onStopMove,en=Pn.onScroll,Je=Pn.horizontal,be=Pn.spinSize,un=Pn.containerSize,fi=Pn.style,mi=Pn.thumbStyle,ri=jt.useState(!1),ee=(0,xe.Z)(ri,2),Cn=ee[0],Ti=ee[1],Xi=jt.useState(null),On=(0,xe.Z)(Xi,2),Ge=On[0],Si=On[1],Zi=jt.useState(null),ur=(0,xe.Z)(Zi,2),Ln=ur[0],Ui=ur[1],pe=!_n,Fe=jt.useRef(),Ke=jt.useRef(),ve=jt.useState(!1),Ee=(0,xe.Z)(ve,2),_e=Ee[0],Sn=Ee[1],ei=jt.useRef(),Xe=function(){clearTimeout(ei.current),Sn(!0),ei.current=setTimeout(function(){Sn(!1)},3e3)},Fn=qn-un||0,si=un-be||0,Gi=Fn>0,Ji=jt.useMemo(function(){if(Wn===0||Fn===0)return 0;var Qi=Wn/Fn;return Qi*si},[Wn,Fn,si]),Te=function(Ar){Ar.stopPropagation(),Ar.preventDefault()},Mi=jt.useRef({top:Ji,dragging:Cn,pageY:Ge,startTop:Ln});Mi.current={top:Ji,dragging:Cn,pageY:Ge,startTop:Ln};var Ri=function(Ar){Ti(!0),Si(St(Ar,Je)),Ui(Mi.current.top),ui(),Ar.stopPropagation(),Ar.preventDefault()};jt.useEffect(function(){var Qi=function(dn){dn.preventDefault()},Ar=Fe.current,cn=Ke.current;return Ar.addEventListener("touchstart",Qi),cn.addEventListener("touchstart",Ri),function(){Ar.removeEventListener("touchstart",Qi),cn.removeEventListener("touchstart",Ri)}},[]);var yi=jt.useRef();yi.current=Fn;var Nr=jt.useRef();Nr.current=si,jt.useEffect(function(){if(Cn){var Qi,Ar=function(dn){var or=Mi.current,is=or.dragging,qr=or.pageY,rs=or.startTop;if(pt.cancel(Qi),is){var ro=St(dn,Je)-qr,Ur=rs;!pe&&Je?Ur-=ro:Ur+=ro;var Or=yi.current,Wo=Nr.current,oo=Wo?Ur/Wo:0,hi=Math.ceil(oo*Or);hi=Math.max(hi,0),hi=Math.min(hi,Or),Qi=pt(function(){en(hi,Je)})}},cn=function(){Ti(!1),Wi()};return window.addEventListener("mousemove",Ar),window.addEventListener("touchmove",Ar),window.addEventListener("mouseup",cn),window.addEventListener("touchend",cn),function(){window.removeEventListener("mousemove",Ar),window.removeEventListener("touchmove",Ar),window.removeEventListener("mouseup",cn),window.removeEventListener("touchend",cn),pt.cancel(Qi)}}},[Cn]),jt.useEffect(function(){Xe()},[Wn]),jt.useImperativeHandle(Mt,function(){return{delayHidden:Xe}});var qi="".concat(kn,"-scrollbar"),ci={position:"absolute",visibility:_e&&Gi?null:"hidden"},Bi={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Je?(ci.height=8,ci.left=0,ci.right=0,ci.bottom=0,Bi.height="100%",Bi.width=be,pe?Bi.left=Ji:Bi.right=Ji):(ci.width=8,ci.top=0,ci.bottom=0,pe?ci.right=0:ci.left=0,Bi.width="100%",Bi.height=be,Bi.top=Ji),jt.createElement("div",{ref:Fe,className:se()(qi,(jn={},(0,ge.Z)(jn,"".concat(qi,"-horizontal"),Je),(0,ge.Z)(jn,"".concat(qi,"-vertical"),!Je),(0,ge.Z)(jn,"".concat(qi,"-visible"),_e),jn)),style:(0,Yt.Z)((0,Yt.Z)({},ci),fi),onMouseDown:Te,onMouseMove:Xe},jt.createElement("div",{ref:Ke,className:se()("".concat(qi,"-thumb"),(0,ge.Z)({},"".concat(qi,"-thumb-moving"),Cn)),style:(0,Yt.Z)((0,Yt.Z)({},Bi),mi),onMouseDown:Ri}))}),Ot=bt;function Ht(Pn){var Mt=Pn.children,jn=Pn.setRef,kn=jt.useCallback(function(_n){jn(_n)},[]);return jt.cloneElement(Mt,{ref:kn})}function Wt(Pn,Mt,jn,kn,_n,Wn,qn){var ui=qn.getKey;return Pn.slice(Mt,jn+1).map(function(Wi,en){var Je=Mt+en,be=Wn(Wi,Je,{style:{width:kn}}),un=ui(Wi);return jt.createElement(Ht,{key:un,setRef:function(mi){return _n(Wi,mi)}},be)})}function re(Pn){return Pn instanceof HTMLElement||Pn instanceof SVGElement}function te(Pn){return re(Pn)?Pn:Pn instanceof jt.Component?ne.findDOMNode(Pn):null}var Ce=Qt(15671),ce=Qt(43144),Qe=function(){function Pn(){(0,Ce.Z)(this,Pn),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,ce.Z)(Pn,[{key:"set",value:function(jn,kn){this.maps[jn]=kn,this.id+=1}},{key:"get",value:function(jn){return this.maps[jn]}}]),Pn}(),je=Qe;function He(Pn,Mt,jn){var kn=jt.useState(0),_n=(0,xe.Z)(kn,2),Wn=_n[0],qn=_n[1],ui=(0,jt.useRef)(new Map),Wi=(0,jt.useRef)(new je),en=(0,jt.useRef)();function Je(){pt.cancel(en.current)}function be(){var fi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Je();var mi=function(){ui.current.forEach(function(ee,Cn){if(ee&&ee.offsetParent){var Ti=te(ee),Xi=Ti.offsetHeight;Wi.current.get(Cn)!==Xi&&Wi.current.set(Cn,Ti.offsetHeight)}}),qn(function(ee){return ee+1})};fi?mi():en.current=pt(mi)}function un(fi,mi){var ri=Pn(fi),ee=ui.current.get(ri);mi?(ui.current.set(ri,mi),be()):ui.current.delete(ri),!ee!=!mi&&(mi?Mt==null||Mt(fi):jn==null||jn(fi))}return(0,jt.useEffect)(function(){return Je},[]),[un,be,Wi.current,Wn]}function Qn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Gn=Qn()?jt.useLayoutEffect:jt.useEffect,Yn=function(Mt,jn){var kn=jt.useRef(!0);Gn(function(){return Mt(kn.current)},jn),Gn(function(){return kn.current=!1,function(){kn.current=!0}},[])},di=function(Mt,jn){Yn(function(kn){if(!kn)return Mt()},jn)},ie=Yn;function zt(Pn){var Mt=jt.useRef();Mt.current=Pn;var jn=jt.useCallback(function(){for(var kn,_n=arguments.length,Wn=new Array(_n),qn=0;qn<_n;qn++)Wn[qn]=arguments[qn];return(kn=Mt.current)===null||kn===void 0?void 0:kn.call.apply(kn,[Mt].concat(Wn))},[]);return jn}function We(Pn){var Mt=React.useRef(!1),jn=React.useState(Pn),kn=_slicedToArray(jn,2),_n=kn[0],Wn=kn[1];React.useEffect(function(){return Mt.current=!1,function(){Mt.current=!0}},[]);function qn(ui,Wi){Wi&&Mt.current||Wn(ui)}return[_n,qn]}function En(Pn){return Pn!==void 0}function Xn(Pn,Mt){var jn=Mt||{},kn=jn.defaultValue,_n=jn.value,Wn=jn.onChange,qn=jn.postState,ui=useState(function(){return En(_n)?_n:En(kn)?typeof kn=="function"?kn():kn:typeof Pn=="function"?Pn():Pn}),Wi=_slicedToArray(ui,2),en=Wi[0],Je=Wi[1],be=_n!==void 0?_n:en,un=qn?qn(be):be,fi=useEvent(Wn),mi=useState([be]),ri=_slicedToArray(mi,2),ee=ri[0],Cn=ri[1];useLayoutUpdateEffect(function(){var Xi=ee[0];en!==Xi&&fi(en,Xi)},[ee]),useLayoutUpdateEffect(function(){En(_n)||Je(_n)},[_n]);var Ti=useEvent(function(Xi,On){Je(Xi,On),Cn([be],On)});return[un,Ti]}var Ve=Qt(31461);function In(Pn,Mt,jn){var kn=React.useRef({});return(!("value"in kn.current)||jn(kn.current.condition,Mt))&&(kn.current.value=Pn(),kn.current.condition=Mt),kn.current.value}function Hn(Pn,Mt){typeof Pn=="function"?Pn(Mt):_typeof(Pn)==="object"&&Pn&&"current"in Pn&&(Pn.current=Mt)}function li(){for(var Pn=arguments.length,Mt=new Array(Pn),jn=0;jn<Pn;jn++)Mt[jn]=arguments[jn];var kn=Mt.filter(function(_n){return _n});return kn.length<=1?kn[0]:function(_n){Mt.forEach(function(Wn){Hn(Wn,_n)})}}function tn(){for(var Pn=arguments.length,Mt=new Array(Pn),jn=0;jn<Pn;jn++)Mt[jn]=arguments[jn];return useMemo(function(){return li.apply(void 0,Mt)},Mt,function(kn,_n){return kn.length!==_n.length||kn.every(function(Wn,qn){return Wn!==_n[qn]})})}function Me(Pn){var Mt,jn,kn=isMemo(Pn)?Pn.type.type:Pn.type;return!(typeof kn=="function"&&!((Mt=kn.prototype)!==null&&Mt!==void 0&&Mt.render)||typeof Pn=="function"&&!((jn=Pn.prototype)!==null&&jn!==void 0&&jn.render))}function rn(Pn){return!isValidElement(Pn)||isFragment(Pn)?!1:Me(Pn)}function Dn(Pn,Mt,jn,kn){if(!Mt.length)return jn;var _n=_toArray(Mt),Wn=_n[0],qn=_n.slice(1),ui;return!Pn&&typeof Wn=="number"?ui=[]:Array.isArray(Pn)?ui=_toConsumableArray(Pn):ui=_objectSpread({},Pn),kn&&jn===void 0&&qn.length===1?delete ui[Wn][qn[0]]:ui[Wn]=Dn(ui[Wn],qn,jn,kn),ui}function sn(Pn,Mt,jn){var kn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Mt.length&&kn&&jn===void 0&&!get(Pn,Mt.slice(0,-1))?Pn:Dn(Pn,Mt,jn,kn)}function Vt(Pn){return _typeof(Pn)==="object"&&Pn!==null&&Object.getPrototypeOf(Pn)===Object.prototype}function Pt(Pn){return Array.isArray(Pn)?[]:{}}var mt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function vt(){for(var Pn=arguments.length,Mt=new Array(Pn),jn=0;jn<Pn;jn++)Mt[jn]=arguments[jn];var kn=Pt(Mt[0]);return Mt.forEach(function(_n){function Wn(qn,ui){var Wi=new Set(ui),en=get(_n,qn),Je=Array.isArray(en);if(Je||Vt(en)){if(!Wi.has(en)){Wi.add(en);var be=get(kn,qn);Je?kn=sn(kn,qn,[]):(!be||_typeof(be)!=="object")&&(kn=sn(kn,qn,Pt(en))),mt(en).forEach(function(un){Wn([].concat(_toConsumableArray(qn),[un]),Wi)})}}else kn=sn(kn,qn,en)}Wn([])}),kn}var kt={},Lt=[],_t=function(Mt){Lt.push(Mt)};function De(Pn,Mt){if(0)var jn}function on(Pn,Mt){if(0)var jn}function mn(){kt={}}function $e(Pn,Mt,jn){!Mt&&!kt[jn]&&(Pn(!1,jn),kt[jn]=!0)}function Bn(Pn,Mt){$e(De,Pn,Mt)}function Re(Pn,Mt){$e(on,Pn,Mt)}Bn.preMessage=_t,Bn.resetWarned=mn,Bn.noteOnce=Re;var Mn=null,Kn=10;function Fi(Pn,Mt,jn,kn,_n,Wn,qn,ui){var Wi=jt.useRef(),en=jt.useState(null),Je=(0,xe.Z)(en,2),be=Je[0],un=Je[1];return ie(function(){if(be&&be.times<Kn){if(!Pn.current){un(function(Xe){return(0,Yt.Z)({},Xe)});return}Wn();var fi=be.targetAlign,mi=be.originAlign,ri=be.index,ee=be.offset,Cn=Pn.current.clientHeight,Ti=!1,Xi=fi,On=null;if(Cn){for(var Ge=fi||mi,Si=0,Zi=0,ur=0,Ln=Math.min(Mt.length-1,ri),Ui=0;Ui<=Ln;Ui+=1){var pe=_n(Mt[Ui]);Zi=Si;var Fe=jn.get(pe);ur=Zi+(Fe===void 0?kn:Fe),Si=ur}for(var Ke=Ge==="top"?ee:Cn-ee,ve=Ln;ve>=0;ve-=1){var Ee=_n(Mt[ve]),_e=jn.get(Ee);if(_e===void 0){Ti=!0;break}if(Ke-=_e,Ke<=0)break}switch(Ge){case"top":On=Zi-ee;break;case"bottom":On=ur-Cn+ee;break;default:{var Sn=Pn.current.scrollTop,ei=Sn+Cn;Zi<Sn?Xi="top":ur>ei&&(Xi="bottom")}}On!==null&&qn(On),On!==be.lastTop&&(Ti=!0)}Ti&&un(function(Xe){return(0,Yt.Z)((0,Yt.Z)({},Xe),{},{times:Xe.times+1,targetAlign:Xi,lastTop:On})})}},[be,Pn.current]),function(fi){if(fi==null){ui();return}if(pt.cancel(Wi.current),typeof fi=="number")qn(fi);else if(fi&&(0,he.Z)(fi)==="object"){var mi,ri=fi.align;"index"in fi?mi=fi.index:mi=Mt.findIndex(function(Ti){return _n(Ti)===fi.key});var ee=fi.offset,Cn=ee===void 0?0:ee;un({times:0,index:mi,offset:Cn,originAlign:ri})}}}function ti(Pn,Mt,jn,kn){var _n=jn-Pn,Wn=Mt-jn,qn=Math.min(_n,Wn)*2;if(kn<=qn){var ui=Math.floor(kn/2);return kn%2?jn+ui+1:jn-ui}return _n>Wn?jn-(kn-Wn):jn+(kn-_n)}function sr(Pn,Mt,jn){var kn=Pn.length,_n=Mt.length,Wn,qn;if(kn===0&&_n===0)return null;kn<_n?(Wn=Pn,qn=Mt):(Wn=Mt,qn=Pn);var ui={__EMPTY_ITEM__:!0};function Wi(mi){return mi!==void 0?jn(mi):ui}for(var en=null,Je=Math.abs(kn-_n)!==1,be=0;be<qn.length;be+=1){var un=Wi(Wn[be]),fi=Wi(qn[be]);if(un!==fi){en=be,Je=Je||un!==Wi(qn[be+1]);break}}return en===null?null:{index:en,multiple:Je}}function rr(Pn,Mt,jn){var kn=jt.useState(Pn),_n=(0,xe.Z)(kn,2),Wn=_n[0],qn=_n[1],ui=jt.useState(null),Wi=(0,xe.Z)(ui,2),en=Wi[0],Je=Wi[1];return jt.useEffect(function(){var be=sr(Wn||[],Pn||[],Mt);(be==null?void 0:be.index)!==void 0&&(jn==null||jn(be.index),Je(Pn[be.index])),qn(Pn)},[Pn]),[en]}var xi=(typeof navigator=="undefined"?"undefined":(0,he.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),wi=xi,Ir=function(Pn,Mt){var jn=(0,jt.useRef)(!1),kn=(0,jt.useRef)(null);function _n(){clearTimeout(kn.current),jn.current=!0,kn.current=setTimeout(function(){jn.current=!1},50)}var Wn=(0,jt.useRef)({top:Pn,bottom:Mt});return Wn.current.top=Pn,Wn.current.bottom=Mt,function(qn){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wi=qn<0&&Wn.current.top||qn>0&&Wn.current.bottom;return ui&&Wi?(clearTimeout(kn.current),jn.current=!1):(!Wi||jn.current)&&_n(),!jn.current&&Wi}};function ji(Pn,Mt,jn,kn,_n){var Wn=(0,jt.useRef)(0),qn=(0,jt.useRef)(null),ui=(0,jt.useRef)(null),Wi=(0,jt.useRef)(!1),en=Ir(Mt,jn);function Je(ee,Cn){pt.cancel(qn.current),Wn.current+=Cn,ui.current=Cn,!en(Cn)&&(wi||ee.preventDefault(),qn.current=pt(function(){var Ti=Wi.current?10:1;_n(Wn.current*Ti),Wn.current=0}))}function be(ee,Cn){_n(Cn,!0),wi||ee.preventDefault()}var un=(0,jt.useRef)(null),fi=(0,jt.useRef)(null);function mi(ee){if(Pn){pt.cancel(fi.current),fi.current=pt(function(){un.current=null},2);var Cn=ee.deltaX,Ti=ee.deltaY,Xi=ee.shiftKey,On=Cn,Ge=Ti;(un.current==="sx"||!un.current&&Xi&&Ti&&!Cn)&&(On=Ti,Ge=0,un.current="sx");var Si=Math.abs(On),Zi=Math.abs(Ge);un.current===null&&(un.current=kn&&Si>Zi?"x":"y"),un.current==="y"?Je(ee,Ge):be(ee,On)}}function ri(ee){Pn&&(Wi.current=ee.detail===ui.current)}return[mi,ri]}var yr=14/15;function xr(Pn,Mt,jn){var kn=(0,jt.useRef)(!1),_n=(0,jt.useRef)(0),Wn=(0,jt.useRef)(null),qn=(0,jt.useRef)(null),ui,Wi=function(un){if(kn.current){var fi=Math.ceil(un.touches[0].pageY),mi=_n.current-fi;_n.current=fi,jn(mi)&&un.preventDefault(),clearInterval(qn.current),qn.current=setInterval(function(){mi*=yr,(!jn(mi,!0)||Math.abs(mi)<=.1)&&clearInterval(qn.current)},16)}},en=function(){kn.current=!1,ui()},Je=function(un){ui(),un.touches.length===1&&!kn.current&&(kn.current=!0,_n.current=Math.ceil(un.touches[0].pageY),Wn.current=un.target,Wn.current.addEventListener("touchmove",Wi),Wn.current.addEventListener("touchend",en))};ui=function(){Wn.current&&(Wn.current.removeEventListener("touchmove",Wi),Wn.current.removeEventListener("touchend",en))},ie(function(){return Pn&&Mt.current.addEventListener("touchstart",Je),function(){var be;(be=Mt.current)===null||be===void 0||be.removeEventListener("touchstart",Je),ui(),clearInterval(qn.current)}},[Pn])}var Qr=20;function Ii(){var Pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,jn=Pn/Mt*100;return isNaN(jn)&&(jn=0),jn=Math.max(jn,Qr),jn=Math.min(jn,Pn/2),Math.floor(jn)}function br(Pn,Mt,jn,kn){var _n=jt.useMemo(function(){return[new Map,[]]},[Pn,jn.id,kn]),Wn=(0,xe.Z)(_n,2),qn=Wn[0],ui=Wn[1],Wi=function(Je){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Je,un=qn.get(Je),fi=qn.get(be);if(un===void 0||fi===void 0)for(var mi=Pn.length,ri=ui.length;ri<mi;ri+=1){var ee,Cn=Pn[ri],Ti=Mt(Cn);qn.set(Ti,ri);var Xi=(ee=jn.get(Ti))!==null&&ee!==void 0?ee:kn;if(ui[ri]=(ui[ri-1]||0)+Xi,Ti===Je&&(un=ri),Ti===be&&(fi=ri),un!==void 0&&fi!==void 0)break}return{top:ui[un-1]||0,bottom:ui[fi]}};return Wi}var Sr=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Bo=[],er={overflowY:"auto",overflowAnchor:"none"};function Lo(Pn,Mt){var jn=Pn.prefixCls,kn=jn===void 0?"rc-virtual-list":jn,_n=Pn.className,Wn=Pn.height,qn=Pn.itemHeight,ui=Pn.fullHeight,Wi=ui===void 0?!0:ui,en=Pn.style,Je=Pn.data,be=Pn.children,un=Pn.itemKey,fi=Pn.virtual,mi=Pn.direction,ri=Pn.scrollWidth,ee=Pn.component,Cn=ee===void 0?"div":ee,Ti=Pn.onScroll,Xi=Pn.onVirtualScroll,On=Pn.onVisibleChange,Ge=Pn.innerProps,Si=Pn.extraRender,Zi=Pn.styles,ur=(0,Ut.Z)(Pn,Sr),Ln=!!(fi!==!1&&Wn&&qn),Ui=Ln&&Je&&(qn*Je.length>Wn||!!ri),pe=mi==="rtl",Fe=se()(kn,(0,ge.Z)({},"".concat(kn,"-rtl"),pe),_n),Ke=Je||Bo,ve=(0,jt.useRef)(),Ee=(0,jt.useRef)(),_e=(0,jt.useState)(0),Sn=(0,xe.Z)(_e,2),ei=Sn[0],Xe=Sn[1],Fn=(0,jt.useState)(0),si=(0,xe.Z)(Fn,2),Gi=si[0],Ji=si[1],Te=(0,jt.useState)(!1),Mi=(0,xe.Z)(Te,2),Ri=Mi[0],yi=Mi[1],Nr=function(){yi(!0)},qi=function(){yi(!1)},ci=jt.useCallback(function(Vr){return typeof un=="function"?un(Vr):Vr==null?void 0:Vr[un]},[un]),Bi={getKey:ci};function Qi(Vr){Xe(function(So){var os;typeof Vr=="function"?os=Vr(So):os=Vr;var ks=hr(os);return ve.current.scrollTop=ks,ks})}var Ar=(0,jt.useRef)({start:0,end:Ke.length}),cn=(0,jt.useRef)(),$i=rr(Ke,ci),dn=(0,xe.Z)($i,1),or=dn[0];cn.current=or;var is=He(ci,null,null),qr=(0,xe.Z)(is,4),rs=qr[0],ro=qr[1],Ur=qr[2],Or=qr[3],Wo=jt.useMemo(function(){if(!Ln)return{scrollHeight:void 0,start:0,end:Ke.length-1,offset:void 0};if(!Ui){var Vr;return{scrollHeight:((Vr=Ee.current)===null||Vr===void 0?void 0:Vr.offsetHeight)||0,start:0,end:Ke.length-1,offset:void 0}}for(var So=0,os,ks,nr,gh=Ke.length,qu=0;qu<gh;qu+=1){var ml=Ke[qu],ph=ci(ml),Uu=Ur.get(ph),Ei=So+(Uu===void 0?qn:Uu);Ei>=ei&&os===void 0&&(os=qu,ks=So),Ei>ei+Wn&&nr===void 0&&(nr=qu),So=Ei}return os===void 0&&(os=0,ks=0,nr=Math.ceil(Wn/qn)),nr===void 0&&(nr=Ke.length-1),nr=Math.min(nr+1,Ke.length-1),{scrollHeight:So,start:os,end:nr,offset:ks}},[Ui,Ln,ei,Ke,Or,Wn]),oo=Wo.scrollHeight,hi=Wo.start,Xt=Wo.end,An=Wo.offset;Ar.current.start=hi,Ar.current.end=Xt;var _s=jt.useState({width:0,height:Wn}),xs=(0,xe.Z)(_s,2),Xo=xs[0],Ms=xs[1],pa=function(So){Ms({width:So.width||So.offsetWidth,height:So.height||So.offsetHeight})},_a=(0,jt.useRef)(),ma=(0,jt.useRef)(),ki=jt.useMemo(function(){return Ii(Xo.width,ri)},[Xo.width,ri]),Tr=jt.useMemo(function(){return Ii(Xo.height,oo)},[Xo.height,oo]),Oi=oo-Wn,bi=(0,jt.useRef)(Oi);bi.current=Oi;function hr(Vr){var So=Vr;return Number.isNaN(bi.current)||(So=Math.min(So,bi.current)),So=Math.max(So,0),So}var ln=ei<=0,cr=ei>=Oi,Wr=Ir(ln,cr),Ko=function(){return{x:pe?-Gi:Gi,y:ei}},Go=(0,jt.useRef)(Ko()),ws=zt(function(){if(Xi){var Vr=Ko();(Go.current.x!==Vr.x||Go.current.y!==Vr.y)&&(Xi(Vr),Go.current=Vr)}});function Zs(Vr,So){var os=Vr;So?((0,ne.flushSync)(function(){Ji(os)}),ws()):Qi(os)}function Qa(Vr){var So=Vr.currentTarget.scrollTop;So!==ei&&Qi(So),Ti==null||Ti(Vr),ws()}var Na=function(So){var os=So,ks=ri-Xo.width;return os=Math.max(os,0),os=Math.min(os,ks),os},nl=zt(function(Vr,So){So?((0,ne.flushSync)(function(){Ji(function(os){var ks=os+(pe?-Vr:Vr);return Na(ks)})}),ws()):Qi(function(os){var ks=os+Vr;return ks})}),Vl=ji(Ln,ln,cr,!!ri,nl),nn=(0,xe.Z)(Vl,2),il=nn[0],au=nn[1];xr(Ln,ve,function(Vr,So){return Wr(Vr,So)?!1:(il({preventDefault:function(){},deltaY:Vr}),!0)}),ie(function(){function Vr(os){Ln&&os.preventDefault()}var So=ve.current;return So.addEventListener("wheel",il),So.addEventListener("DOMMouseScroll",au),So.addEventListener("MozMousePixelScroll",Vr),function(){So.removeEventListener("wheel",il),So.removeEventListener("DOMMouseScroll",au),So.removeEventListener("MozMousePixelScroll",Vr)}},[Ln]),ie(function(){ri&&Ji(function(Vr){return Na(Vr)})},[Xo.width,ri]);var Xu=function(){var So,os;(So=_a.current)===null||So===void 0||So.delayHidden(),(os=ma.current)===null||os===void 0||os.delayHidden()},Ps=Fi(ve,Ke,Ur,qn,ci,function(){return ro(!0)},Qi,Xu);jt.useImperativeHandle(Mt,function(){return{getScrollInfo:Ko,scrollTo:function(So){function os(ks){return ks&&(0,he.Z)(ks)==="object"&&("left"in ks||"top"in ks)}os(So)?(So.left!==void 0&&Ji(Na(So.left)),Ps(So.top)):Ps(So)}}}),ie(function(){if(On){var Vr=Ke.slice(hi,Xt+1);On(Vr,Ke)}},[hi,Xt,Ke]);var lu=br(Ke,ci,Ur,qn),cA=Si==null?void 0:Si({start:hi,end:Xt,virtual:Ui,offsetX:Gi,offsetY:An,rtl:pe,getSize:lu}),Ju=Wt(Ke,hi,Xt,ri,rs,be,Bi),us=null;Wn&&(us=(0,Yt.Z)((0,ge.Z)({},Wi?"height":"maxHeight",Wn),er),Ln&&(us.overflowY="hidden",ri&&(us.overflowX="hidden"),Ri&&(us.pointerEvents="none")));var Ys={};return pe&&(Ys.dir="rtl"),jt.createElement("div",(0,xt.Z)({style:(0,Yt.Z)((0,Yt.Z)({},en),{},{position:"relative"}),className:Fe},Ys,ur),jt.createElement(ke.Z,{onResize:pa},jt.createElement(Cn,{className:"".concat(kn,"-holder"),style:us,ref:ve,onScroll:Qa,onMouseEnter:Xu},jt.createElement(Ie,{prefixCls:kn,height:oo,offsetX:Gi,offsetY:An,scrollWidth:ri,onInnerResize:ro,ref:Ee,innerProps:Ge,rtl:pe,extra:cA},Ju))),Ui&&oo>Wn&&jt.createElement(Ot,{ref:_a,prefixCls:kn,scrollOffset:ei,scrollRange:oo,rtl:pe,onScroll:Zs,onStartMove:Nr,onStopMove:qi,spinSize:Tr,containerSize:Xo.height,style:Zi==null?void 0:Zi.verticalScrollBar,thumbStyle:Zi==null?void 0:Zi.verticalScrollBarThumb}),Ui&&ri&&jt.createElement(Ot,{ref:ma,prefixCls:kn,scrollOffset:Gi,scrollRange:ri,rtl:pe,onScroll:Zs,onStartMove:Nr,onStopMove:qi,spinSize:ki,containerSize:Xo.width,horizontal:!0,style:Zi==null?void 0:Zi.horizontalScrollBar,thumbStyle:Zi==null?void 0:Zi.horizontalScrollBarThumb}))}var ys=jt.forwardRef(Lo);ys.displayName="List";var Mo=ys,Lr=Mo},66392:function(gn,ze){"use strict";var Qt;var xt=Symbol.for("react.element"),Yt=Symbol.for("react.portal"),he=Symbol.for("react.fragment"),xe=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),Ut=Symbol.for("react.provider"),jt=Symbol.for("react.context"),ne=Symbol.for("react.server_context"),Ae=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),Ie=Symbol.for("react.lazy"),Dt=Symbol.for("react.offscreen"),nt;nt=Symbol.for("react.module.reference");function et(ut){if(typeof ut=="object"&&ut!==null){var at=ut.$$typeof;switch(at){case xt:switch(ut=ut.type,ut){case he:case ge:case xe:case se:case ke:return ut;default:switch(ut=ut&&ut.$$typeof,ut){case ne:case jt:case Ae:case Ie:case de:case Ut:return ut;default:return at}}case Yt:return at}}}Qt=jt,Qt=Ut,Qt=xt,Qt=Ae,Qt=he,Qt=Ie,Qt=de,Qt=Yt,Qt=ge,Qt=xe,Qt=se,Qt=ke,Qt=function(){return!1},Qt=function(){return!1},Qt=function(ut){return et(ut)===jt},Qt=function(ut){return et(ut)===Ut},Qt=function(ut){return typeof ut=="object"&&ut!==null&&ut.$$typeof===xt},Qt=function(ut){return et(ut)===Ae},Qt=function(ut){return et(ut)===he},Qt=function(ut){return et(ut)===Ie},Qt=function(ut){return et(ut)===de},Qt=function(ut){return et(ut)===Yt},Qt=function(ut){return et(ut)===ge},Qt=function(ut){return et(ut)===xe},Qt=function(ut){return et(ut)===se},Qt=function(ut){return et(ut)===ke},Qt=function(ut){return typeof ut=="string"||typeof ut=="function"||ut===he||ut===ge||ut===xe||ut===se||ut===ke||ut===Dt||typeof ut=="object"&&ut!==null&&(ut.$$typeof===Ie||ut.$$typeof===de||ut.$$typeof===Ut||ut.$$typeof===jt||ut.$$typeof===Ae||ut.$$typeof===nt||ut.getModuleId!==void 0)},Qt=et},31461:function(gn,ze,Qt){"use strict";Qt(66392)},75668:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),Object.defineProperty(ze,"DraggableCore",{enumerable:!0,get:function(){return ne.default}}),ze.default=void 0;var xt=de(Qt(67294)),Yt=se(Qt(45697)),he=se(Qt(73935)),xe=se(Qt(86010)),ge=Qt(81825),Ut=Qt(2849),jt=Qt(9280),ne=se(Qt(80783)),Ae=se(Qt(55904));function se(at){return at&&at.__esModule?at:{default:at}}function ke(at){if(typeof WeakMap!="function")return null;var ht=new WeakMap,pt=new WeakMap;return(ke=function(St){return St?pt:ht})(at)}function de(at,ht){if(!ht&&at&&at.__esModule)return at;if(at===null||typeof at!="object"&&typeof at!="function")return{default:at};var pt=ke(ht);if(pt&&pt.has(at))return pt.get(at);var St={},bt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ot in at)if(Ot!=="default"&&Object.prototype.hasOwnProperty.call(at,Ot)){var Ht=bt?Object.getOwnPropertyDescriptor(at,Ot):null;Ht&&(Ht.get||Ht.set)?Object.defineProperty(St,Ot,Ht):St[Ot]=at[Ot]}return St.default=at,pt&&pt.set(at,St),St}function Ie(){return Ie=Object.assign?Object.assign.bind():function(at){for(var ht=1;ht<arguments.length;ht++){var pt=arguments[ht];for(var St in pt)Object.prototype.hasOwnProperty.call(pt,St)&&(at[St]=pt[St])}return at},Ie.apply(this,arguments)}function Dt(at,ht,pt){return ht=nt(ht),ht in at?Object.defineProperty(at,ht,{value:pt,enumerable:!0,configurable:!0,writable:!0}):at[ht]=pt,at}function nt(at){var ht=et(at,"string");return typeof ht=="symbol"?ht:String(ht)}function et(at,ht){if(typeof at!="object"||at===null)return at;var pt=at[Symbol.toPrimitive];if(pt!==void 0){var St=pt.call(at,ht||"default");if(typeof St!="object")return St;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ht==="string"?String:Number)(at)}class ut extends xt.Component{static getDerivedStateFromProps(ht,pt){let{position:St}=ht,{prevPropsPosition:bt}=pt;return St&&(!bt||St.x!==bt.x||St.y!==bt.y)?((0,Ae.default)("Draggable: getDerivedStateFromProps %j",{position:St,prevPropsPosition:bt}),{x:St.x,y:St.y,prevPropsPosition:af({},St)}):null}constructor(ht){super(ht),Dt(this,"onDragStart",(pt,St)=>{if((0,Ae.default)("Draggable: onDragStart: %j",St),this.props.onStart(pt,(0,Ut.createDraggableData)(this,St))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Dt(this,"onDrag",(pt,St)=>{if(!this.state.dragging)return!1;(0,Ae.default)("Draggable: onDrag: %j",St);const bt=(0,Ut.createDraggableData)(this,St),Ot={x:bt.x,y:bt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Wt,y:re}=Ot;Ot.x+=this.state.slackX,Ot.y+=this.state.slackY;const[te,Ce]=(0,Ut.getBoundPosition)(this,Ot.x,Ot.y);Ot.x=te,Ot.y=Ce,Ot.slackX=this.state.slackX+(Wt-Ot.x),Ot.slackY=this.state.slackY+(re-Ot.y),bt.x=Ot.x,bt.y=Ot.y,bt.deltaX=Ot.x-this.state.x,bt.deltaY=Ot.y-this.state.y}if(this.props.onDrag(pt,bt)===!1)return!1;this.setState(Ot)}),Dt(this,"onDragStop",(pt,St)=>{if(!this.state.dragging||this.props.onStop(pt,(0,Ut.createDraggableData)(this,St))===!1)return!1;(0,Ae.default)("Draggable: onDragStop: %j",St);const Ot={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Wt,y:re}=this.props.position;Ot.x=Wt,Ot.y=re}this.setState(Ot)}),this.state={dragging:!1,dragged:!1,x:ht.position?ht.position.x:ht.defaultPosition.x,y:ht.position?ht.position.y:ht.defaultPosition.y,prevPropsPosition:af({},ht.position),slackX:0,slackY:0,isElementSVG:!1},ht.position&&!(ht.onDrag||ht.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var ht,pt;return(ht=(pt=this.props)===null||pt===void 0||(pt=pt.nodeRef)===null||pt===void 0?void 0:pt.current)!==null&&ht!==void 0?ht:he.default.findDOMNode(this)}render(){const ie=this.props,{axis:ht,bounds:pt,children:St,defaultPosition:bt,defaultClassName:Ot,defaultClassNameDragging:Ht,defaultClassNameDragged:Wt,position:re,positionOffset:te,scale:Ce}=ie,ce=xw(ie,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let Qe={},je=null;const Qn=!!!re||this.state.dragging,Gn=re||bt,Yn={x:(0,Ut.canDragX)(this)&&Qn?this.state.x:Gn.x,y:(0,Ut.canDragY)(this)&&Qn?this.state.y:Gn.y};this.state.isElementSVG?je=(0,ge.createSVGTransform)(Yn,te):Qe=(0,ge.createCSSTransform)(Yn,te);const di=(0,xe.default)(St.props.className||"",Ot,{[Ht]:this.state.dragging,[Wt]:this.state.dragged});return xt.createElement(ne.default,Ie({},ce,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),xt.cloneElement(xt.Children.only(St),{className:di,style:af(af({},St.props.style),Qe),transform:je}))}}ze.default=ut,Dt(ut,"displayName","Draggable"),Dt(ut,"propTypes",Ay(af({},ne.default.propTypes),{axis:Yt.default.oneOf(["both","x","y","none"]),bounds:Yt.default.oneOfType([Yt.default.shape({left:Yt.default.number,right:Yt.default.number,top:Yt.default.number,bottom:Yt.default.number}),Yt.default.string,Yt.default.oneOf([!1])]),defaultClassName:Yt.default.string,defaultClassNameDragging:Yt.default.string,defaultClassNameDragged:Yt.default.string,defaultPosition:Yt.default.shape({x:Yt.default.number,y:Yt.default.number}),positionOffset:Yt.default.shape({x:Yt.default.oneOfType([Yt.default.number,Yt.default.string]),y:Yt.default.oneOfType([Yt.default.number,Yt.default.string])}),position:Yt.default.shape({x:Yt.default.number,y:Yt.default.number}),className:jt.dontSetMe,style:jt.dontSetMe,transform:jt.dontSetMe})),Dt(ut,"defaultProps",Ay(af({},ne.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80783:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var xt=se(Qt(67294)),Yt=ne(Qt(45697)),he=ne(Qt(73935)),xe=Qt(81825),ge=Qt(2849),Ut=Qt(9280),jt=ne(Qt(55904));function ne(ut){return ut&&ut.__esModule?ut:{default:ut}}function Ae(ut){if(typeof WeakMap!="function")return null;var at=new WeakMap,ht=new WeakMap;return(Ae=function(pt){return pt?ht:at})(ut)}function se(ut,at){if(!at&&ut&&ut.__esModule)return ut;if(ut===null||typeof ut!="object"&&typeof ut!="function")return{default:ut};var ht=Ae(at);if(ht&&ht.has(ut))return ht.get(ut);var pt={},St=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var bt in ut)if(bt!=="default"&&Object.prototype.hasOwnProperty.call(ut,bt)){var Ot=St?Object.getOwnPropertyDescriptor(ut,bt):null;Ot&&(Ot.get||Ot.set)?Object.defineProperty(pt,bt,Ot):pt[bt]=ut[bt]}return pt.default=ut,ht&&ht.set(ut,pt),pt}function ke(ut,at,ht){return at=de(at),at in ut?Object.defineProperty(ut,at,{value:ht,enumerable:!0,configurable:!0,writable:!0}):ut[at]=ht,ut}function de(ut){var at=Ie(ut,"string");return typeof at=="symbol"?at:String(at)}function Ie(ut,at){if(typeof ut!="object"||ut===null)return ut;var ht=ut[Symbol.toPrimitive];if(ht!==void 0){var pt=ht.call(ut,at||"default");if(typeof pt!="object")return pt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(ut)}const Dt={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nt=Dt.mouse;class et extends xt.Component{constructor(){super(...arguments),ke(this,"dragging",!1),ke(this,"lastX",NaN),ke(this,"lastY",NaN),ke(this,"touchIdentifier",null),ke(this,"mounted",!1),ke(this,"handleDragStart",at=>{if(this.props.onMouseDown(at),!this.props.allowAnyClick&&typeof at.button=="number"&&at.button!==0)return!1;const ht=this.findDOMNode();if(!ht||!ht.ownerDocument||!ht.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:pt}=ht;if(this.props.disabled||!(at.target instanceof pt.defaultView.Node)||this.props.handle&&!(0,xe.matchesSelectorAndParentsTo)(at.target,this.props.handle,ht)||this.props.cancel&&(0,xe.matchesSelectorAndParentsTo)(at.target,this.props.cancel,ht))return;at.type==="touchstart"&&at.preventDefault();const St=(0,xe.getTouchIdentifier)(at);this.touchIdentifier=St;const bt=(0,ge.getControlPosition)(at,St,this);if(bt==null)return;const{x:Ot,y:Ht}=bt,Wt=(0,ge.createCoreData)(this,Ot,Ht);(0,jt.default)("DraggableCore: handleDragStart: %j",Wt),(0,jt.default)("calling",this.props.onStart),!(this.props.onStart(at,Wt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,xe.addUserSelectStyles)(pt),this.dragging=!0,this.lastX=Ot,this.lastY=Ht,(0,xe.addEvent)(pt,nt.move,this.handleDrag),(0,xe.addEvent)(pt,nt.stop,this.handleDragStop))}),ke(this,"handleDrag",at=>{const ht=(0,ge.getControlPosition)(at,this.touchIdentifier,this);if(ht==null)return;let{x:pt,y:St}=ht;if(Array.isArray(this.props.grid)){let Ht=pt-this.lastX,Wt=St-this.lastY;if([Ht,Wt]=(0,ge.snapToGrid)(this.props.grid,Ht,Wt),!Ht&&!Wt)return;pt=this.lastX+Ht,St=this.lastY+Wt}const bt=(0,ge.createCoreData)(this,pt,St);if((0,jt.default)("DraggableCore: handleDrag: %j",bt),this.props.onDrag(at,bt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Ht){const Wt=document.createEvent("MouseEvents");Wt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Wt)}return}this.lastX=pt,this.lastY=St}),ke(this,"handleDragStop",at=>{if(!this.dragging)return;const ht=(0,ge.getControlPosition)(at,this.touchIdentifier,this);if(ht==null)return;let{x:pt,y:St}=ht;if(Array.isArray(this.props.grid)){let Wt=pt-this.lastX||0,re=St-this.lastY||0;[Wt,re]=(0,ge.snapToGrid)(this.props.grid,Wt,re),pt=this.lastX+Wt,St=this.lastY+re}const bt=(0,ge.createCoreData)(this,pt,St);if(this.props.onStop(at,bt)===!1||this.mounted===!1)return!1;const Ht=this.findDOMNode();Ht&&this.props.enableUserSelectHack&&(0,xe.removeUserSelectStyles)(Ht.ownerDocument),(0,jt.default)("DraggableCore: handleDragStop: %j",bt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ht&&((0,jt.default)("DraggableCore: Removing handlers"),(0,xe.removeEvent)(Ht.ownerDocument,nt.move,this.handleDrag),(0,xe.removeEvent)(Ht.ownerDocument,nt.stop,this.handleDragStop))}),ke(this,"onMouseDown",at=>(nt=Dt.mouse,this.handleDragStart(at))),ke(this,"onMouseUp",at=>(nt=Dt.mouse,this.handleDragStop(at))),ke(this,"onTouchStart",at=>(nt=Dt.touch,this.handleDragStart(at))),ke(this,"onTouchEnd",at=>(nt=Dt.touch,this.handleDragStop(at)))}componentDidMount(){this.mounted=!0;const at=this.findDOMNode();at&&(0,xe.addEvent)(at,Dt.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const at=this.findDOMNode();if(at){const{ownerDocument:ht}=at;(0,xe.removeEvent)(ht,Dt.mouse.move,this.handleDrag),(0,xe.removeEvent)(ht,Dt.touch.move,this.handleDrag),(0,xe.removeEvent)(ht,Dt.mouse.stop,this.handleDragStop),(0,xe.removeEvent)(ht,Dt.touch.stop,this.handleDragStop),(0,xe.removeEvent)(at,Dt.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,xe.removeUserSelectStyles)(ht)}}findDOMNode(){var at,ht;return(at=this.props)!==null&&at!==void 0&&at.nodeRef?(ht=this.props)===null||ht===void 0||(ht=ht.nodeRef)===null||ht===void 0?void 0:ht.current:he.default.findDOMNode(this)}render(){return xt.cloneElement(xt.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}ze.default=et,ke(et,"displayName","DraggableCore"),ke(et,"propTypes",{allowAnyClick:Yt.default.bool,children:Yt.default.node.isRequired,disabled:Yt.default.bool,enableUserSelectHack:Yt.default.bool,offsetParent:function(ut,at){if(ut[at]&&ut[at].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Yt.default.arrayOf(Yt.default.number),handle:Yt.default.string,cancel:Yt.default.string,nodeRef:Yt.default.object,onStart:Yt.default.func,onDrag:Yt.default.func,onStop:Yt.default.func,onMouseDown:Yt.default.func,scale:Yt.default.number,className:Ut.dontSetMe,style:Ut.dontSetMe,transform:Ut.dontSetMe}),ke(et,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},61193:function(gn,ze,Qt){"use strict";const{default:xt,DraggableCore:Yt}=Qt(75668);gn.exports=xt,gn.exports.default=xt,gn.exports.DraggableCore=Yt},81825:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.addClassName=bt,ze.addEvent=ne,ze.addUserSelectStyles=pt,ze.createCSSTransform=nt,ze.createSVGTransform=et,ze.getTouch=at,ze.getTouchIdentifier=ht,ze.getTranslation=ut,ze.innerHeight=de,ze.innerWidth=Ie,ze.matchesSelector=Ut,ze.matchesSelectorAndParentsTo=jt,ze.offsetXYFromParent=Dt,ze.outerHeight=se,ze.outerWidth=ke,ze.removeClassName=Ot,ze.removeEvent=Ae,ze.removeUserSelectStyles=St;var xt=Qt(9280),Yt=xe(Qt(38650));function he(Ht){if(typeof WeakMap!="function")return null;var Wt=new WeakMap,re=new WeakMap;return(he=function(te){return te?re:Wt})(Ht)}function xe(Ht,Wt){if(!Wt&&Ht&&Ht.__esModule)return Ht;if(Ht===null||typeof Ht!="object"&&typeof Ht!="function")return{default:Ht};var re=he(Wt);if(re&&re.has(Ht))return re.get(Ht);var te={},Ce=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ce in Ht)if(ce!=="default"&&Object.prototype.hasOwnProperty.call(Ht,ce)){var Qe=Ce?Object.getOwnPropertyDescriptor(Ht,ce):null;Qe&&(Qe.get||Qe.set)?Object.defineProperty(te,ce,Qe):te[ce]=Ht[ce]}return te.default=Ht,re&&re.set(Ht,te),te}let ge="";function Ut(Ht,Wt){return ge||(ge=(0,xt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(re){return(0,xt.isFunction)(Ht[re])})),(0,xt.isFunction)(Ht[ge])?Ht[ge](Wt):!1}function jt(Ht,Wt,re){let te=Ht;do{if(Ut(te,Wt))return!0;if(te===re)return!1;te=te.parentNode}while(te);return!1}function ne(Ht,Wt,re,te){if(!Ht)return;const Ce=af({capture:!0},te);Ht.addEventListener?Ht.addEventListener(Wt,re,Ce):Ht.attachEvent?Ht.attachEvent("on"+Wt,re):Ht["on"+Wt]=re}function Ae(Ht,Wt,re,te){if(!Ht)return;const Ce=af({capture:!0},te);Ht.removeEventListener?Ht.removeEventListener(Wt,re,Ce):Ht.detachEvent?Ht.detachEvent("on"+Wt,re):Ht["on"+Wt]=null}function se(Ht){let Wt=Ht.clientHeight;const re=Ht.ownerDocument.defaultView.getComputedStyle(Ht);return Wt+=(0,xt.int)(re.borderTopWidth),Wt+=(0,xt.int)(re.borderBottomWidth),Wt}function ke(Ht){let Wt=Ht.clientWidth;const re=Ht.ownerDocument.defaultView.getComputedStyle(Ht);return Wt+=(0,xt.int)(re.borderLeftWidth),Wt+=(0,xt.int)(re.borderRightWidth),Wt}function de(Ht){let Wt=Ht.clientHeight;const re=Ht.ownerDocument.defaultView.getComputedStyle(Ht);return Wt-=(0,xt.int)(re.paddingTop),Wt-=(0,xt.int)(re.paddingBottom),Wt}function Ie(Ht){let Wt=Ht.clientWidth;const re=Ht.ownerDocument.defaultView.getComputedStyle(Ht);return Wt-=(0,xt.int)(re.paddingLeft),Wt-=(0,xt.int)(re.paddingRight),Wt}function Dt(Ht,Wt,re){const Ce=Wt===Wt.ownerDocument.body?{left:0,top:0}:Wt.getBoundingClientRect(),ce=(Ht.clientX+Wt.scrollLeft-Ce.left)/re,Qe=(Ht.clientY+Wt.scrollTop-Ce.top)/re;return{x:ce,y:Qe}}function nt(Ht,Wt){const re=ut(Ht,Wt,"px");return{[(0,Yt.browserPrefixToKey)("transform",Yt.default)]:re}}function et(Ht,Wt){return ut(Ht,Wt,"")}function ut(Ht,Wt,re){let{x:te,y:Ce}=Ht,ce="translate(".concat(te).concat(re,",").concat(Ce).concat(re,")");if(Wt){const Qe="".concat(typeof Wt.x=="string"?Wt.x:Wt.x+re),je="".concat(typeof Wt.y=="string"?Wt.y:Wt.y+re);ce="translate(".concat(Qe,", ").concat(je,")")+ce}return ce}function at(Ht,Wt){return Ht.targetTouches&&(0,xt.findInArray)(Ht.targetTouches,re=>Wt===re.identifier)||Ht.changedTouches&&(0,xt.findInArray)(Ht.changedTouches,re=>Wt===re.identifier)}function ht(Ht){if(Ht.targetTouches&&Ht.targetTouches[0])return Ht.targetTouches[0].identifier;if(Ht.changedTouches&&Ht.changedTouches[0])return Ht.changedTouches[0].identifier}function pt(Ht){if(!Ht)return;let Wt=Ht.getElementById("react-draggable-style-el");Wt||(Wt=Ht.createElement("style"),Wt.type="text/css",Wt.id="react-draggable-style-el",Wt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Wt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Ht.getElementsByTagName("head")[0].appendChild(Wt)),Ht.body&&bt(Ht.body,"react-draggable-transparent-selection")}function St(Ht){if(Ht)try{if(Ht.body&&Ot(Ht.body,"react-draggable-transparent-selection"),Ht.selection)Ht.selection.empty();else{const Wt=(Ht.defaultView||window).getSelection();Wt&&Wt.type!=="Caret"&&Wt.removeAllRanges()}}catch(Wt){}}function bt(Ht,Wt){Ht.classList?Ht.classList.add(Wt):Ht.className.match(new RegExp("(?:^|\\s)".concat(Wt,"(?!\\S)")))||(Ht.className+=" ".concat(Wt))}function Ot(Ht,Wt){Ht.classList?Ht.classList.remove(Wt):Ht.className=Ht.className.replace(new RegExp("(?:^|\\s)".concat(Wt,"(?!\\S)"),"g"),"")}},38650:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.browserPrefixToKey=Yt,ze.browserPrefixToStyle=he,ze.default=void 0,ze.getPrefix=xt;const Qt=["Moz","Webkit","O","ms"];function xt(){var Ut;let jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const ne=(Ut=window.document)===null||Ut===void 0||(Ut=Ut.documentElement)===null||Ut===void 0?void 0:Ut.style;if(!ne||jt in ne)return"";for(let Ae=0;Ae<Qt.length;Ae++)if(Yt(jt,Qt[Ae])in ne)return Qt[Ae];return""}function Yt(Ut,jt){return jt?"".concat(jt).concat(xe(Ut)):Ut}function he(Ut,jt){return jt?"-".concat(jt.toLowerCase(),"-").concat(Ut):Ut}function xe(Ut){let jt="",ne=!0;for(let Ae=0;Ae<Ut.length;Ae++)ne?(jt+=Ut[Ae].toUpperCase(),ne=!1):Ut[Ae]==="-"?ne=!0:jt+=Ut[Ae];return jt}var ge=ze.default=xt()},55904:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=Qt;function Qt(){}},2849:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.canDragX=ge,ze.canDragY=Ut,ze.createCoreData=ne,ze.createDraggableData=Ae,ze.getBoundPosition=he,ze.getControlPosition=jt,ze.snapToGrid=xe;var xt=Qt(9280),Yt=Qt(81825);function he(de,Ie,Dt){if(!de.props.bounds)return[Ie,Dt];let{bounds:nt}=de.props;nt=typeof nt=="string"?nt:se(nt);const et=ke(de);if(typeof nt=="string"){const{ownerDocument:ut}=et,at=ut.defaultView;let ht;if(nt==="parent"?ht=et.parentNode:ht=ut.querySelector(nt),!(ht instanceof at.HTMLElement))throw new Error('Bounds selector "'+nt+'" could not find an element.');const pt=ht,St=at.getComputedStyle(et),bt=at.getComputedStyle(pt);nt={left:-et.offsetLeft+(0,xt.int)(bt.paddingLeft)+(0,xt.int)(St.marginLeft),top:-et.offsetTop+(0,xt.int)(bt.paddingTop)+(0,xt.int)(St.marginTop),right:(0,Yt.innerWidth)(pt)-(0,Yt.outerWidth)(et)-et.offsetLeft+(0,xt.int)(bt.paddingRight)-(0,xt.int)(St.marginRight),bottom:(0,Yt.innerHeight)(pt)-(0,Yt.outerHeight)(et)-et.offsetTop+(0,xt.int)(bt.paddingBottom)-(0,xt.int)(St.marginBottom)}}return(0,xt.isNum)(nt.right)&&(Ie=Math.min(Ie,nt.right)),(0,xt.isNum)(nt.bottom)&&(Dt=Math.min(Dt,nt.bottom)),(0,xt.isNum)(nt.left)&&(Ie=Math.max(Ie,nt.left)),(0,xt.isNum)(nt.top)&&(Dt=Math.max(Dt,nt.top)),[Ie,Dt]}function xe(de,Ie,Dt){const nt=Math.round(Ie/de[0])*de[0],et=Math.round(Dt/de[1])*de[1];return[nt,et]}function ge(de){return de.props.axis==="both"||de.props.axis==="x"}function Ut(de){return de.props.axis==="both"||de.props.axis==="y"}function jt(de,Ie,Dt){const nt=typeof Ie=="number"?(0,Yt.getTouch)(de,Ie):null;if(typeof Ie=="number"&&!nt)return null;const et=ke(Dt),ut=Dt.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,Yt.offsetXYFromParent)(nt||de,ut,Dt.props.scale)}function ne(de,Ie,Dt){const nt=!(0,xt.isNum)(de.lastX),et=ke(de);return nt?{node:et,deltaX:0,deltaY:0,lastX:Ie,lastY:Dt,x:Ie,y:Dt}:{node:et,deltaX:Ie-de.lastX,deltaY:Dt-de.lastY,lastX:de.lastX,lastY:de.lastY,x:Ie,y:Dt}}function Ae(de,Ie){const Dt=de.props.scale;return{node:Ie.node,x:de.state.x+Ie.deltaX/Dt,y:de.state.y+Ie.deltaY/Dt,deltaX:Ie.deltaX/Dt,deltaY:Ie.deltaY/Dt,lastX:de.state.x,lastY:de.state.y}}function se(de){return{left:de.left,top:de.top,right:de.right,bottom:de.bottom}}function ke(de){const Ie=de.findDOMNode();if(!Ie)throw new Error("<DraggableCore>: Unmounted during event!");return Ie}},9280:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.dontSetMe=xe,ze.findInArray=Qt,ze.int=he,ze.isFunction=xt,ze.isNum=Yt;function Qt(ge,Ut){for(let jt=0,ne=ge.length;jt<ne;jt++)if(Ut.apply(Ut,[ge[jt],jt,ge]))return ge[jt]}function xt(ge){return typeof ge=="function"||Object.prototype.toString.call(ge)==="[object Function]"}function Yt(ge){return typeof ge=="number"&&!isNaN(ge)}function he(ge){return parseInt(ge,10)}function xe(ge,Ut,jt){if(ge[Ut])return new Error("Invalid prop ".concat(Ut," passed to ").concat(jt," - do not set this, set it on the child."))}},55168:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.SensorTabIndex=ze.SensorClassName=ze.SizeSensorId=void 0;var Qt="size-sensor-id";ze.SizeSensorId=Qt;var xt="size-sensor-object";ze.SensorClassName=xt;var Yt="-1";ze.SensorTabIndex=Yt},12177:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Qt=function(Yt){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,xe=null;return function(){for(var ge=this,Ut=arguments.length,jt=new Array(Ut),ne=0;ne<Ut;ne++)jt[ne]=arguments[ne];clearTimeout(xe),xe=setTimeout(function(){Yt.apply(ge,jt)},he)}};ze.default=Qt},96340:function(gn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Qt=1,xt=function(){return"".concat(Qt++)};ze.default=xt},18587:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.ver=ze.clear=ze.bind=void 0;var xt=Qt(12955),Yt=function(Ut,jt){var ne=(0,xt.getSensor)(Ut);return ne.bind(jt),function(){ne.unbind(jt)}};ze.bind=Yt;var he=function(Ut){var jt=(0,xt.getSensor)(Ut);(0,xt.removeSensor)(jt)};ze.clear=he;var xe="1.0.1";ze.ver=xe},12955:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.removeSensor=ze.getSensor=void 0;var xt=xe(Qt(96340)),Yt=Qt(82578),he=Qt(55168);function xe(ne){return ne&&ne.__esModule?ne:{default:ne}}var ge={},Ut=function(Ae){var se=Ae.getAttribute(he.SizeSensorId);if(se&&ge[se])return ge[se];var ke=(0,xt.default)();Ae.setAttribute(he.SizeSensorId,ke);var de=(0,Yt.createSensor)(Ae);return ge[ke]=de,de};ze.getSensor=Ut;var jt=function(Ae){var se=Ae.element.getAttribute(he.SizeSensorId);Ae.element.removeAttribute(he.SizeSensorId),Ae.destroy(),se&&ge[se]&&delete ge[se]};ze.removeSensor=jt},82578:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var xt=Qt(27643),Yt=Qt(31743),he=typeof ResizeObserver!="undefined"?Yt.createSensor:xt.createSensor;ze.createSensor=he},27643:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var xt=he(Qt(12177)),Yt=Qt(55168);function he(ge){return ge&&ge.__esModule?ge:{default:ge}}var xe=function(Ut){var jt=void 0,ne=[],Ae=function(){getComputedStyle(Ut).position==="static"&&(Ut.style.position="relative");var nt=document.createElement("object");return nt.onload=function(){nt.contentDocument.defaultView.addEventListener("resize",se),se()},nt.style.display="block",nt.style.position="absolute",nt.style.top="0",nt.style.left="0",nt.style.height="100%",nt.style.width="100%",nt.style.overflow="hidden",nt.style.pointerEvents="none",nt.style.zIndex="-1",nt.style.opacity="0",nt.setAttribute("class",Yt.SensorClassName),nt.setAttribute("tabindex",Yt.SensorTabIndex),nt.type="text/html",Ut.appendChild(nt),nt.data="about:blank",nt},se=(0,xt.default)(function(){ne.forEach(function(Dt){Dt(Ut)})}),ke=function(nt){jt||(jt=Ae()),ne.indexOf(nt)===-1&&ne.push(nt)},de=function(){jt&&jt.parentNode&&(jt.contentDocument&&jt.contentDocument.defaultView.removeEventListener("resize",se),jt.parentNode.removeChild(jt),jt=void 0,ne=[])},Ie=function(nt){var et=ne.indexOf(nt);et!==-1&&ne.splice(et,1),ne.length===0&&jt&&de()};return{element:Ut,bind:ke,destroy:de,unbind:Ie}};ze.createSensor=xe},31743:function(gn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var xt=Yt(Qt(12177));function Yt(xe){return xe&&xe.__esModule?xe:{default:xe}}var he=function(ge){var Ut=void 0,jt=[],ne=(0,xt.default)(function(){jt.forEach(function(Ie){Ie(ge)})}),Ae=function(){var Dt=new ResizeObserver(ne);return Dt.observe(ge),ne(),Dt},se=function(Dt){Ut||(Ut=Ae()),jt.indexOf(Dt)===-1&&jt.push(Dt)},ke=function(){Ut.disconnect(),jt=[],Ut=void 0},de=function(Dt){var nt=jt.indexOf(Dt);nt!==-1&&jt.splice(nt,1),jt.length===0&&Ut&&ke()};return{element:ge,bind:se,destroy:ke,unbind:de}};ze.createSensor=he},4977: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=="},96908:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(gn){"use strict";gn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},17423:function(gn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ne}});const xt=Ae=>typeof Ae=="object"&&Ae!=null&&Ae.nodeType===1,Yt=(Ae,se)=>(!se||Ae!=="hidden")&&Ae!=="visible"&&Ae!=="clip",he=(Ae,se)=>{if(Ae.clientHeight<Ae.scrollHeight||Ae.clientWidth<Ae.scrollWidth){const ke=getComputedStyle(Ae,null);return Yt(ke.overflowY,se)||Yt(ke.overflowX,se)||(de=>{const Ie=(Dt=>{if(!Dt.ownerDocument||!Dt.ownerDocument.defaultView)return null;try{return Dt.ownerDocument.defaultView.frameElement}catch(nt){return null}})(de);return!!Ie&&(Ie.clientHeight<de.scrollHeight||Ie.clientWidth<de.scrollWidth)})(Ae)}return!1},xe=(Ae,se,ke,de,Ie,Dt,nt,et)=>Dt<Ae&&nt>se||Dt>Ae&&nt<se?0:Dt<=Ae&&et<=ke||nt>=se&&et>=ke?Dt-Ae-de:nt>se&&et<ke||Dt<Ae&&et>ke?nt-se+Ie:0,ge=Ae=>{const se=Ae.parentElement;return se==null?Ae.getRootNode().host||null:se},Ut=(Ae,se)=>{var ke,de,Ie,Dt;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:ut,boundary:at,skipOverflowHiddenElements:ht}=se,pt=typeof at=="function"?at:Xn=>Xn!==at;if(!xt(Ae))throw new TypeError("Invalid target");const St=document.scrollingElement||document.documentElement,bt=[];let Ot=Ae;for(;xt(Ot)&&pt(Ot);){if(Ot=ge(Ot),Ot===St){bt.push(Ot);break}Ot!=null&&Ot===document.body&&he(Ot)&&!he(document.documentElement)||Ot!=null&&he(Ot,ht)&&bt.push(Ot)}const Ht=(de=(ke=window.visualViewport)==null?void 0:ke.width)!=null?de:innerWidth,Wt=(Dt=(Ie=window.visualViewport)==null?void 0:Ie.height)!=null?Dt:innerHeight,{scrollX:re,scrollY:te}=window,{height:Ce,width:ce,top:Qe,right:je,bottom:He,left:Qn}=Ae.getBoundingClientRect(),{top:Gn,right:Yn,bottom:di,left:ie}=(Xn=>{const Ve=window.getComputedStyle(Xn);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(Ae);let zt=et==="start"||et==="nearest"?Qe-Gn:et==="end"?He+di:Qe+Ce/2-Gn+di,We=ut==="center"?Qn+ce/2-ie+Yn:ut==="end"?je+Yn:Qn-ie;const En=[];for(let Xn=0;Xn<bt.length;Xn++){const Ve=bt[Xn],{height:In,width:Hn,top:li,right:tn,bottom:Me,left:rn}=Ve.getBoundingClientRect();if(nt==="if-needed"&&Qe>=0&&Qn>=0&&He<=Wt&&je<=Ht&&Qe>=li&&He<=Me&&Qn>=rn&&je<=tn)return En;const Dn=getComputedStyle(Ve),sn=parseInt(Dn.borderLeftWidth,10),Vt=parseInt(Dn.borderTopWidth,10),Pt=parseInt(Dn.borderRightWidth,10),mt=parseInt(Dn.borderBottomWidth,10);let vt=0,kt=0;const Lt="offsetWidth"in Ve?Ve.offsetWidth-Ve.clientWidth-sn-Pt:0,_t="offsetHeight"in Ve?Ve.offsetHeight-Ve.clientHeight-Vt-mt:0,De="offsetWidth"in Ve?Ve.offsetWidth===0?0:Hn/Ve.offsetWidth:0,on="offsetHeight"in Ve?Ve.offsetHeight===0?0:In/Ve.offsetHeight:0;if(St===Ve)vt=et==="start"?zt:et==="end"?zt-Wt:et==="nearest"?xe(te,te+Wt,Wt,Vt,mt,te+zt,te+zt+Ce,Ce):zt-Wt/2,kt=ut==="start"?We:ut==="center"?We-Ht/2:ut==="end"?We-Ht:xe(re,re+Ht,Ht,sn,Pt,re+We,re+We+ce,ce),vt=Math.max(0,vt+te),kt=Math.max(0,kt+re);else{vt=et==="start"?zt-li-Vt:et==="end"?zt-Me+mt+_t:et==="nearest"?xe(li,Me,In,Vt,mt+_t,zt,zt+Ce,Ce):zt-(li+In/2)+_t/2,kt=ut==="start"?We-rn-sn:ut==="center"?We-(rn+Hn/2)+Lt/2:ut==="end"?We-tn+Pt+Lt:xe(rn,tn,Hn,sn,Pt+Lt,We,We+ce,ce);const{scrollLeft:mn,scrollTop:$e}=Ve;vt=on===0?0:Math.max(0,Math.min($e+vt/on,Ve.scrollHeight-In/on+_t)),kt=De===0?0:Math.max(0,Math.min(mn+kt/De,Ve.scrollWidth-Hn/De+Lt)),zt+=$e-vt,We+=mn-kt}En.push({el:Ve,top:vt,left:kt})}return En},jt=Ae=>Ae===!1?{block:"end",inline:"nearest"}:(se=>se===Object(se)&&Object.keys(se).length!==0)(Ae)?Ae:{block:"start",inline:"nearest"};function ne(Ae,se){if(!Ae.isConnected||!(Ie=>{let Dt=Ie;for(;Dt&&Dt.parentNode;){if(Dt.parentNode===document)return!0;Dt=Dt.parentNode instanceof ShadowRoot?Dt.parentNode.host:Dt.parentNode}return!1})(Ae))return;const ke=(Ie=>{const Dt=window.getComputedStyle(Ie);return{top:parseFloat(Dt.scrollMarginTop)||0,right:parseFloat(Dt.scrollMarginRight)||0,bottom:parseFloat(Dt.scrollMarginBottom)||0,left:parseFloat(Dt.scrollMarginLeft)||0}})(Ae);if((Ie=>typeof Ie=="object"&&typeof Ie.behavior=="function")(se))return se.behavior(Ut(Ae,se));const de=typeof se=="boolean"||se==null?void 0:se.behavior;for(const{el:Ie,top:Dt,left:nt}of Ut(Ae,jt(se))){const et=Dt-ke.top+ke.bottom,ut=nt-ke.left+ke.right;Ie.scroll({top:et,left:ut,behavior:de})}}}}]);
}());