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

1184 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 sx=Object.defineProperty,ax=Object.defineProperties;var lx=Object.getOwnPropertyDescriptors;var km=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var yw=(xn,ze,Qt)=>ze in xn?sx(xn,ze,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):xn[ze]=Qt,Pd=(xn,ze)=>{for(var Qt in ze||(ze={}))ww.call(ze,Qt)&&yw(xn,Qt,ze[Qt]);if(km)for(var Qt of km(ze))xw.call(ze,Qt)&&yw(xn,Qt,ze[Qt]);return xn},Ay=(xn,ze)=>ax(xn,lx(ze));var Sw=(xn,ze)=>{var Qt={};for(var Ct in xn)ww.call(xn,Ct)&&ze.indexOf(Ct)<0&&(Qt[Ct]=xn[Ct]);if(xn!=null&&km)for(var Ct of km(xn))ze.indexOf(Ct)<0&&xw.call(xn,Ct)&&(Qt[Ct]=xn[Ct]);return Qt};(self.webpackChunk=self.webpackChunk||[]).push([[342],{95869:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ae}});var Ct=Qt(14809),ee=Qt(59301),ue={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"},Se=ue,de=Qt(7657),Ht=function(Wt,Ie){return ee.createElement(de.Z,(0,Ct.Z)({},Wt,{ref:Ie,icon:Se}))},ie=ee.forwardRef(Ht),Ae=ie},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(xn,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"}},63720:function(){"use strict";function xn(It,nt,et,At){et===void 0&&(et=0),At===void 0&&(At=1/0),this._name=It,this._defaultValue=nt,this._minimum=et,this._maximum=At}Object.defineProperty(xn.prototype,"name",{get:function(){return this._name},set:function(It){if(typeof It!="string"||It==="")throw new Error("Shape name must be a valid string.");this._name=It}}),Object.defineProperty(xn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("The default value must be a real number, not: "+It);this._defaultValue=It}}),Object.defineProperty(xn.prototype,"minimum",{get:function(){return this._minimum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Minimum must be a real number, not: "+It);this._minimum=It}}),Object.defineProperty(xn.prototype,"maximum",{get:function(){return this._maximum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Maximum must be a real number, not: "+It);this._maximum=It}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(It,nt){var et=go.Shape._FigureParameters[It];return et?et[nt]:null},go.Shape.setFigureParameter=function(It,nt,et){if(!(et instanceof xn))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 At=go.Shape._FigureParameters[It];At||(At=[],go.Shape._FigureParameters[It]=At),At[nt]=et};var ze=[];function Qt(It,nt){var et=ze.pop();return et===void 0?new go.Point(It,nt):(et.x=It,et.y=nt,et)}function Ct(){var It=ze.pop();return It===void 0?new go.Point:It}function ee(It){ze.push(It)}function ue(It,nt,et,At,at,ct,pt,xt,bt){bt||(bt=new go.Point);var Rt=It-et,Ot=at-pt,Zt=NaN,Vt=NaN;if(Rt===0)if(Ot===0)It===et&&(Zt=It,Vt=nt);else{var $t=(ct-xt)/Ot,Ce=ct-$t*at;Zt=It,Vt=$t*Zt+Ce}else if(Ot===0){var fe=(nt-At)/Rt,rn=nt-fe*It;Zt=at,Vt=fe*Zt+rn}else{var fe=(nt-At)/Rt,$t=(ct-xt)/Ot,rn=nt-fe*It,Ce=ct-$t*at;Zt=(Ce-rn)/(fe-$t),Vt=fe*Zt+rn}return bt.x=Zt,bt.y=Vt,bt}function Se(It,nt,et,At,at,ct,pt,xt,bt,Rt,Ot,Zt,Vt,$t){var Ce=1-bt,fe=bt,rn=It*Ce+et*fe,tn=nt*Ce+At*fe,Bn=et*Ce+at*fe,Fn=At*Ce+ct*fe,kn=at*Ce+pt*fe,Gn=ct*Ce+xt*fe,ti=rn*Ce+Bn*fe,me=tn*Ce+Fn*fe,oe=Bn*Ce+kn*fe,Cn=Fn*Ce+Gn*fe,li=ti*Ce+oe*fe,ai=me*Ce+Cn*fe;Rt.x=rn,Rt.y=tn,Ot.x=ti,Ot.y=me,Zt.x=li,Zt.y=ai,Vt.x=oe,Vt.y=Cn,$t.x=kn,$t.y=Gn}var de=new go.Spot(.156,.156),Ht=new go.Spot(.844,.844),ie=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new xn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=5),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,ct=new go.Geometry().add(new go.PathFigure(At,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-At,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)).add(new go.PathSegment(go.PathSegment.Line,nt,et-At)).add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,et-at,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,At,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,at,et,0,et-at)).add(new go.PathSegment(go.PathSegment.Line,0,At)).add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,at,at,0).close()));return at>1&&(ct.spot1=new go.Spot(0,0,at,at),ct.spot2=new go.Spot(1,1,-at,-at)),ct}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(It,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(It,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(It,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(It,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(It,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(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=et/2,At.endX=nt,At.endY=et/2,At}),go.Shape.defineFigureGenerator("LineV",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt/2,At.startY=0,At.endX=nt/2,At.endY=et,At}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(It,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(It,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(It,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(It,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(It,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(It,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(It,nt,et){var At=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(At*nt,(1-At)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,(1-At)*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(It,nt,et){var At=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,At,At,At,At).close()));return at.spot1=de,at.spot2=Ht,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=0,At.endX=nt,At.endY=et,At}),go.Shape.defineFigureGenerator("Line2",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt,At.startY=0,At.endX=0,At.endY=et,At}),go.Shape.defineFigureGenerator("Curve1",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ie*nt,0,nt,(1-ie)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ie*et,(1-ie)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ie*et,ie*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ie)*nt,0,0,(1-ie)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(It,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(It,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(It,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(It,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 xn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.1:At<-1?At=-1:At>1&&(At=1);var at=Math.abs(At)*nt;if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt:At>nt&&(At=nt);var at=Math.abs(At);if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.setFigureParameter("Trapezoid1",0,new xn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.2:At<.5?At=-.5:At>.5&&(At=.5);var at=Math.abs(At)*nt;if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new xn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=20:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.setFigureParameter("ManualOperation",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}});var Ae=[];function re(){var It=Ae.pop();return It===void 0?[]:It}function Wt(It){It.length=0,Ae.push(It)}function Ie(It){for(var nt=re(),et=.5,At=.5,at=Math.PI*1.5,ct=0,pt=0;pt<It;pt++)ct=2*Math.PI/It*pt+at,nt[pt]=new go.Point(At+et*Math.cos(ct),At+et*Math.sin(ct));return nt.push(nt[0]),nt}function Xt(It){var nt=Ee(It),et=re();et[0]=nt[0];for(var At=1,at=1;At<nt.length;At+=2,at+=3)et[at]=nt[At],et[at+1]=nt[At],et[at+2]=nt[At+1];return Wt(nt),et}function Ee(It){for(var nt=Ie(It),et=re(),At=Math.floor(nt.length/2),at=nt.length-1,ct=It%2===0?2:1,pt=0;pt<at;pt++){var xt=nt[pt],bt=nt[pt+1],Rt=nt[(At+pt-1)%at],Ot=nt[(At+pt+ct)%at];et[pt*2]=xt,et[pt*2+1]=ue(xt.x,xt.y,Rt.x,Rt.y,bt.x,bt.y,Ot.x,Ot.y,new go.Point)}return et[et.length]=et[0],Wt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(It,nt,et){var At=Ie(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<5;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(It,nt,et){var At=Ie(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<6;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(It,nt,et){var At=Ie(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<7;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(It,nt,et){var At=Ie(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<8;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(It,nt,et){var At=Ie(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<9;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(It,nt,et){var At=Ie(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<10;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(It,nt,et){var At=Ie(12),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<12;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(It,nt,et){var At=Ee(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<10;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(It,nt,et){var At=Ee(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<12;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(It,nt,et){var At=Ee(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<14;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(It,nt,et){var At=Ee(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<16;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(It,nt,et){var At=Ee(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<18;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(It,nt,et){var At=Ee(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<20;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(It,nt,et){var At=Xt(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(It,nt,et){var At=Xt(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(It,nt,et){var At=Xt(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(It,nt,et){var At=Xt(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(It,nt,et){var At=Xt(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(It,nt,et){var At=Xt(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new xn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new xn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=8),isNaN(at)&&(at=8);var ct=new go.Geometry,pt=new go.PathFigure(0,0,!0);return ct.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()),At<nt/2&&at<et/2&&(pt.add(new go.PathSegment(go.PathSegment.Move,At,at)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,at).close())),ct.setSpots(0,0,1,1,At,at,-At,-at),ct}),go.Shape.setFigureParameter("Ring",0,new xn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=8);var at=nt/2,ct=new go.Geometry,pt=new go.PathFigure(nt,nt/2,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var xt=Math.max(at-At,0);return xt>0&&(pt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),pt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,xt,xt).close())),ct.spot1=de,ct.spot2=Ht,ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Cloud",function(It,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(It,nt,et){var At=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(At*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,At*et).close())).setSpots(At/2,At/2,1-At/2,1-At/2)}),go.Shape.setFigureParameter("Pie",0,new xn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new xn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=0),isNaN(at)&&(at=315);var ct=At%360;ct<0&&(ct+=360);var pt=at%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,ct,pt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(It,nt,et){var At=ie/Math.SQRT2*.5,at=Math.SQRT2/2,ct=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,ct*et,nt,(1-At)*et,(at+At)*nt,(ct+At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30);var at=Math.min(At,nt)/2,ct=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ct-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+at,0)).add(new go.PathSegment(go.PathSegment.Line,ct+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,ct+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-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,ct-at,pt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=Math.min(At,nt)/2,ct=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ct-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+at,0)).add(new go.PathSegment(go.PathSegment.Line,ct+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,ct+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-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,ct-at,pt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(It,nt,et){var At=It?It.parameter1:NaN;if((isNaN(At)||At<0)&&(At=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 ct=nt/2,pt=et/2,xt=Math.atan2(et,nt),bt=At-Math.min(Math.cos(xt)*At/2,ct),Rt=At-Math.min(Math.sin(xt)*At/2,pt),at=new go.Geometry,Ot=new go.PathFigure(bt,0,!0);return at.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ct,.2*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-bt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.8*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,et-Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ct,.8*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et-Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Rt).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=new go.Geometry,ct=new go.PathFigure(.1*nt,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new xn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,ct=new go.PathFigure(0,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,At*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new xn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.5);var at=new go.Geometry,ct=new go.PathFigure(0,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-At)*nt,.25*et,Math.abs(1-At)*nt,.75*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ie*nt,0,nt,(.5-ie/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ie/2)*et,ie*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(It,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(It,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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);At.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 ct=.2,pt=.3,xt=0,bt=ct*ie;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-bt+xt)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt+.05)*nt,(.5-bt+xt-.02)*et)),ct=.2,pt=0,xt=-.3,bt=ct*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-bt+xt)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-bt+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),ct=.2,pt=-.3,xt=0,bt=ct*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt-.05)*nt,(.5-bt+xt-.02)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et).close()),At.setSpots(.06,.33,.93,.68),At}),go.Shape.defineFigureGenerator("YinYang",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);At.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 ct=.1,pt=.5,xt=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(pt+ct)*nt,xt*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*pt,et*xt,ct*nt,ct*nt).close()),at=new go.PathFigure(nt*.5,0,!1),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,at=new go.PathFigure((pt+ct)*nt,xt*et,!0),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*pt,et*xt,ct*nt,ct*nt).close()),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Peace",function(It,nt,et){var At=.8535533905932737,at=.5*nt,ct=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,ct,at,ct)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,ct)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,at,ct)).add(new go.PathSegment(go.PathSegment.Line,At*nt,At*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=.5,pt=.5,xt=.5,bt=new go.PathFigure(pt*nt,(xt-ct)*et);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),ct=.4,at=ie*.4;var Rt=Ct(),Ot=Ct(),Zt=Ct(),Vt=Ct();Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.42,Rt,Ot,Zt,Vt,Vt);var $t=Ct(),Ce=Ct(),fe=Ct();Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.58,Vt,Vt,fe,$t,Ce);var rn=Ct(),tn=Ct(),Bn=Ct();Se(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.42,rn,tn,Bn,Vt,Vt);var Fn=Ct(),kn=Ct(),Gn=Ct();return Se(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.58,Vt,Vt,Gn,Fn,kn),bt.add(new go.PathSegment(go.PathSegment.Move,Gn.x*nt,Gn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Fn.x*nt,Fn.y*et,kn.x*nt,kn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Zt.x*nt,Zt.y*et,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,Gn.x*nt,Gn.y*et).close()),bt.add(new go.PathSegment(go.PathSegment.Move,Bn.x*nt,Bn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,fe.x*nt,fe.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,$t.x*nt,$t.y*et,Ce.x*nt,Ce.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Bn.x*nt,Bn.y*et,rn.x*nt,rn.y*et,tn.x*nt,tn.y*et).close()),ee(Rt),ee(Ot),ee(Zt),ee(Vt),ee($t),ee(Ce),ee(fe),ee(rn),ee(tn),ee(Bn),ee(Fn),ee(kn),ee(Gn),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Fragile",function(It,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 xn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30),At>nt&&(At=nt);var at=(nt-At)/2,ct=at+At;return new go.Geometry().add(new go.PathFigure(ct,.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(It,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(It,nt,et){var At=new go.Geometry,at=ie*.4,ct=.4,pt=.5,xt=.5,bt=Ct(),Rt=Ct(),Ot=Ct(),Zt=Ct(),Vt=new go.PathFigure((pt-ct)*nt,xt*et,!1);At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.44,Ot,Zt,Rt,bt,bt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et));var $t=Qt(Rt.x,Rt.y);Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.56,bt,bt,Rt,Ot,Zt);var Ce=Qt(Rt.x,Rt.y);Vt.add(new go.PathSegment(go.PathSegment.Line,($t.x*.1+.95*.9)*nt,$t.y*.1*et)),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,$t.y*.1*et)),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),Vt.add(new go.PathSegment(go.PathSegment.Line,(Ce.x*.1+.9)*nt,.15*et)),Vt.add(new go.PathSegment(go.PathSegment.Line,(Ce.x*.1+.9)*nt,(Ce.y*.1+.05*.9)*et)),Vt.add(new go.PathSegment(go.PathSegment.Line,Ce.x*nt,Ce.y*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),ct=.35,at=ie*.35;var fe=new go.PathFigure(pt*nt,(xt-ct)*et,!1);At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et));var rn=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add(rn),ee(bt),ee(Rt),ee(Ot),ee(Zt),ee($t),ee(Ce),At.spot1=new go.Spot(.202,.257),At.spot2=new go.Spot(.792,.739),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("GenderFemale",function(It,nt,et){var At=new go.Geometry,at=.375,ct=0,pt=-.125,xt=at*ie,bt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ct)*nt,(.5+pt)*et,(.5+xt+ct)*nt,(.5+at+pt)*et,(.5+at+ct)*nt,(.5+xt+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5-at+pt)*et,(1-.5+at+ct)*nt,(.5-xt+pt)*et,(.5+xt+ct)*nt,(.5-at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ct)*nt,(.5+at+pt)*et,(.5-at+ct)*nt,(.5+xt+pt)*et,(.5-xt+ct)*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,ct=0,pt=-.125,xt=at*ie;var bt=new go.PathFigure((1-.5+at+ct)*nt,(.5+pt)*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5+at+pt)*et,(.5+at+ct)*nt,(.5+xt+pt)*et,(.5+xt+ct)*nt,(.5+at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5+at+pt)*et,(.5-at+ct)*nt,(.5+xt+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ct)*nt,(.5+pt)*et,(.5+xt+ct)*nt,(.5-at+pt)*et,(1-.5+at+ct)*nt,(.5-xt+pt)*et));var bt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);return At.add(bt),At.spot1=new go.Spot(.232,.136),At.spot2=new go.Spot(.682,.611),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicImplies",function(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*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(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*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,At*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(It,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(It,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(It,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(It,nt,et){var At=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 At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicTruth",function(It,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(It,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(It,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(It,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(It,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(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,At*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new xn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new xn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=It?It.parameter2:NaN;isNaN(at)&&(at=.3);var ct=(1-At)*nt,pt=(.5-at/2)*et,xt=(.5+at/2)*et,bt=new go.Geometry,Rt=new go.PathFigure(0,pt,!0);bt.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,pt/et);var Ot=ue(0,xt/et,1,xt/et,ct/nt,1,1,.5,Ct());return bt.spot2=new go.Spot(Ot.x,Ot.y),ee(Ot),bt}),go.Shape.setFigureParameter("Arrow2",0,new xn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new xn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=30),At>nt&&(At=nt);var at=It?It.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var ct=nt-At,pt=(et-at)/2,xt=pt+at,bt=new go.Geometry,Rt=new go.PathFigure(0,pt,!0);bt.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,pt/et);var Ot=ue(0,xt/et,1,xt/et,ct/nt,1,1,.5,Ct());return bt.spot2=new go.Spot(Ot.x,Ot.y),ee(Ot),bt}),go.Shape.defineFigureGenerator("Chevron",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("DoubleArrow",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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()),At}),go.Shape.setFigureParameter("DoubleEndArrow",0,new xn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var bt=ue(0,.5,.3,0,0,at/et,.1,at/et,Ct());return pt.spot1=new go.Spot(bt.x,bt.y),bt=ue(.7,1,1,.5,0,ct/et,1,ct/et,bt),pt.spot2=new go.Spot(bt.x,bt.y),ee(bt),pt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new xn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new xn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,bt=et):(ct=0,pt=et,xt=0,bt=et));var Rt=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Rt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var Zt=ue(0,.5,.3,xt/et,0,ct/et,1,ct/et,Ct());return Rt.spot1=new go.Spot(Zt.x,Zt.y),Zt=ue(.7,bt/et,1,.5,0,pt/et,1,pt/et,Zt),Rt.spot2=new go.Spot(Zt.x,Zt.y),ee(Zt),Rt}),go.Shape.setFigureParameter("IBeamArrow",0,new xn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(0,at/et);var bt=ue(.7,1,1,.5,0,ct/et,1,ct/et,Ct());return pt.spot2=new go.Spot(bt.x,bt.y),ee(bt),pt}),go.Shape.setFigureParameter("IBeamArrow2",0,new xn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new xn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,bt=et):(ct=0,pt=et,xt=0,bt=et));var Rt=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Rt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),Rt.spot1=new go.Spot(0,ct/et);var Zt=ue(.7,bt/et,1,.5,0,pt/et,1,pt/et,Ct());return Rt.spot2=new go.Spot(Zt.x,Zt.y),ee(Zt),Rt}),go.Shape.setFigureParameter("Pointer",0,new xn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.1);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(At,.35);var pt=ue(.2,.65,1,.65,0,1,1,.5,Ct());return at.spot2=new go.Spot(pt.x,pt.y),ee(pt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new xn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at.spot1=new go.Spot(At,.35);var pt=ue(0,.65,1,.65,0,1,1,.5,Ct());return at.spot2=new go.Spot(pt.x,pt.y),ee(pt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new xn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.4);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(.2,.3);var bt=ue(.7,1,1,.5,0,ct/et,1,ct/et,Ct());return pt.spot2=new go.Spot(bt.x,bt.y),ee(bt),pt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new xn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=50);var at=(et-At)/2,ct=at+At;At>et&&(at=0,ct=et);var pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),pt.spot1=new go.Spot(.2,at/et);var bt=ue(.7,1,1,.5,0,ct/et,1,ct/et,Ct());return pt.spot2=new go.Spot(bt.x,bt.y),ee(bt),pt}),go.Shape.setFigureParameter("SquareArrow",0,new xn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.7);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(At,1),at}),go.Shape.defineFigureGenerator("Cone1",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=ie*.1,pt=new go.PathFigure(0,.9*et,!0);return At.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+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*et).close()),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.97),At}),go.Shape.defineFigureGenerator("Cone2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);At.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 ct=new go.PathFigure(0,.9*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.82),At}),go.Shape.defineFigureGenerator("Cube1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);At.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 ct=new go.PathFigure(.5*nt,et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.5,.85),At}),go.Shape.defineFigureGenerator("Cube2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);At.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 ct=new go.PathFigure(0,.3*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.7,1),At}),go.Shape.defineFigureGenerator("Cylinder1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,ct=ie*.5,pt=new go.PathFigure(0,At,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,At,(.5+ct)*nt,0,1*nt,ie*At)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ie*At,(.5+ct)*nt,1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-ct)*nt,1*et,0,et-ie*At)),pt.add(new go.PathSegment(go.PathSegment.Line,0,At));var xt=new go.PathFigure(nt,At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*At,1*nt,2*At-ie*At,(.5+ct)*nt,2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,At,(.5-ct)*nt,2*At,0,2*At-ie*At)),at.spot1=new go.Spot(0,0,0,2*At),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,ct=ie*.5,pt=new go.PathFigure(0,et-At,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,(.5+ct)*nt,0,nt,ie*At)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ie*At,(.5+ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-ct)*nt,et,0,et-ie*At));var xt=new go.PathFigure(0,et-At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*At,0,et-At-ie*At,(.5-ct)*nt,et-2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-At,(.5+ct)*nt,et-2*At,nt,et-At-ie*At)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*At),at}),go.Shape.defineFigureGenerator("Cylinder3",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,ct=ie*.5,pt=new go.PathFigure(At,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+ct)*et,nt-ie*At,et)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-ct)*et,ie*At,0));var xt=new go.PathFigure(At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*At,.5*et,At+ie*At,0,2*At,(.5-ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,et,2*At,(.5+ct)*et,At+ie*At,et)),at.spot1=new go.Spot(0,0,2*At,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,ct=ie*.5,pt=new go.PathFigure(nt-At,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+ct)*et,nt-ie*At,et)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-ct)*et,ie*At,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0));var xt=new go.PathFigure(nt-At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*At,.5*et,nt-At-ie*At,0,nt-2*At,(.5-ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt-2*At,(.5+ct)*et,nt-At-ie*At,et)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*At,0),at}),go.Shape.defineFigureGenerator("Prism1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);At.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 ct=new go.PathFigure(.25*nt,.25*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.408,.172),At.spot2=new go.Spot(.833,.662),At}),go.Shape.defineFigureGenerator("Prism2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);At.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 ct=new go.PathFigure(0,et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ct.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("Pyramid1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.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 ct=new go.PathFigure(.5*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Pyramid2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.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 ct=new go.PathFigure(.5*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Actor",function(It,nt,et){var At=new go.Geometry,at=.2,ct=.1,pt=ie*at,xt=ie*ct,bt=.5,Rt=.1,Ot=new go.PathFigure(bt*nt,(Rt+ct)*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt-at)*nt,Rt*et,(bt-pt)*nt,(Rt+ct)*et,(bt-at)*nt,(Rt+xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-ct)*et,(bt-at)*nt,(Rt-xt)*et,(bt-pt)*nt,(Rt-ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt+at)*nt,Rt*et,(bt+pt)*nt,(Rt-ct)*et,(bt+at)*nt,(Rt-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+ct)*et,(bt+at)*nt,(Rt+xt)*et,(bt+pt)*nt,(Rt+ct)*et));var Zt=.05,Vt=ie*Zt;bt=.05,Rt=.25;var $t=new go.PathFigure(.5*nt,.2*et,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),bt=.95,Rt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt+Zt)*nt,Rt*et,(bt+Vt)*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),Zt=.025,Vt=ie*Zt,bt=.825,Rt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Vt)*et,(bt+Vt)*nt,(Rt-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Rt*et,(bt-Vt)*nt,(Rt-Zt)*et,(bt-Zt)*nt,(Rt-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),Zt=.05,Vt=ie*Zt,bt=.5,Rt=.7,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Vt)*et,(bt+Vt)*nt,(Rt-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Rt*et,(bt-Vt)*nt,(Rt-Zt)*et,(bt-Zt)*nt,(Rt-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),Zt=.025,Vt=ie*Zt,bt=.175,Rt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Vt)*et,(bt+Vt)*nt,(Rt-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Rt*et,(bt-Vt)*nt,(Rt-Zt)*et,(bt-Zt)*nt,(Rt-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),Zt=.05,Vt=ie*Zt,bt=.05,Rt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Zt)*et,(bt-Zt)*nt,(Rt-Vt)*et,(bt-Vt)*nt,(Rt-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),At.spot1=new go.Spot(.2,.2),At.spot2=new go.Spot(.8,.65),At}),go.Shape.setFigureParameter("Card",0,new xn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,ct=new go.PathFigure(nt,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=new go.Spot(0,At),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);At.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 ct=new go.PathFigure(.5*nt,.5*et,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,.25),At}),go.Shape.defineFigureGenerator("CreateRequest",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Database",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=ie*.1,pt=new go.PathFigure(nt,.1*et,!0);At.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+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*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-ct)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ct)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ct)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ct)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+ct)*et,(.5+at)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+ct)*et)),At.spot1=new go.Spot(0,.4),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("DataStorage",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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()),At.spot1=new go.Spot(.226,0),At.spot2=new go.Spot(.81,1),At}),go.Shape.defineFigureGenerator("DiskStorage",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=ie*.1,pt=new go.PathFigure(nt,.1*et,!0);At.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+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*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-ct)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ct)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+ct)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+ct)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ct)*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("Display",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.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()),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("DividedEvent",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var ct=ie*.2,pt=new go.PathFigure(0,.2*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-ct)*et,(.2-ct)*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+ct)*nt,0,nt,(.2-ct)*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+ct)*et,(.8+ct)*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-ct)*nt,et,0,(.8+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("DividedProcess",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("Document",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.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()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("ExternalOrganization",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("ExternalProcess",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.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 ct=new go.PathFigure(.1*nt,.4*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("File",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(.75*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Interrupt",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);At.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 ct=new go.PathFigure(nt,.5*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et));var pt=new go.PathFigure(nt,.5*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("InternalStorage",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.1);var pt=new go.PathFigure(0,0,!0);At.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 xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,ct*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)),At}),go.Shape.defineFigureGenerator("Junction",function(It,nt,et){var At=new go.Geometry,at=1/Math.SQRT2,ct=(1-1/Math.SQRT2)/2,pt=ie*.5,xt=.5,bt=new go.PathFigure(nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+pt)*et,(xt+pt)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-pt)*nt,et,0,(xt+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-pt)*et,(xt-pt)*nt,0)),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+pt)*nt,0,nt,(xt-pt)*et));var Rt=new go.PathFigure((ct+at)*nt,(ct+at)*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,ct*et)),Rt.add(new go.PathSegment(go.PathSegment.Move,ct*nt,(ct+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,(ct+at)*nt,ct*et)),At}),go.Shape.defineFigureGenerator("LinedDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);At.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 ct=new go.PathFigure(.1*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),At.spot1=new go.Spot(.1,0),At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("LoopLimit",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.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()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MagneticTape",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=.5,pt=new go.PathFigure(.5*nt,et,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(ct+.1)*nt,.9*et,nt,(ct+at)*et,(ct+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)),At.spot1=new go.Spot(.15,.15),At.spot2=new go.Spot(.85,.8),At}),go.Shape.defineFigureGenerator("ManualInput",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.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()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MessageFromUser",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.7);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("MicroformProcessing",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.25);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("MicroformRecording",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("MultiDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);At.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 ct=new go.PathFigure(.1*nt,.2*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.8,.77),At}),go.Shape.defineFigureGenerator("MultiProcess",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);At.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 ct=new go.PathFigure(.2*nt,.1*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),At.spot1=new go.Spot(0,.2),At.spot2=new go.Spot(.8,1),At}),go.Shape.defineFigureGenerator("OfflineStorage",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var ct=1-at,pt=new go.PathFigure(0,0,!0);At.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 xt=new go.PathFigure(.5*at*nt,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*nt,at*et)),At}),go.Shape.defineFigureGenerator("OffPageConnector",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("Or",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=.5,pt=new go.PathFigure(nt,ct*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,et,nt,(ct+at)*et,(ct+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-at)*et));var xt=new go.PathFigure(nt,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),At}),go.Shape.defineFigureGenerator("PaperTape",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.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()),At.spot1=new go.Spot(0,.49),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.3);var pt=new go.PathFigure(0,0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.3);var pt=new go.PathFigure(0,0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Procedure",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure((1-at)*nt,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Process",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Sort",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.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 ct=new go.PathFigure(0,.5*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.5),At}),go.Shape.defineFigureGenerator("Start",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.25);var ct=new go.PathFigure(at*nt,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),ct.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 At.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)),At.spot1=new go.Spot(at,0),At.spot2=new go.Spot(1-at,1),At}),go.Shape.defineFigureGenerator("Terminator",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.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)),At.spot1=new go.Spot(.23,0),At.spot2=new go.Spot(.77,1),At}),go.Shape.defineFigureGenerator("TransmittalTape",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("AndGate",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.55,1),At}),go.Shape.defineFigureGenerator("Buffer",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Clock",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=.5,pt=new go.PathFigure(nt,ct*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,et,nt,(ct+at)*et,(ct+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-at)*et));var xt=new go.PathFigure(nt,ct*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,ct*et));var bt=new go.PathFigure(.8*nt,.75*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Ground",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Inverter",function(It,nt,et){var At=new go.Geometry,at=ie*.1,ct=.1,pt=.9,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.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 Rt=new go.PathFigure((pt+ct)*nt,xt*et,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.4,.75),At}),go.Shape.defineFigureGenerator("NandGate",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=ie*.4,pt=ie*.1,xt=.1,bt=.9,Rt=.5,Ot=new go.PathFigure(.8*nt,.5*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+ct)*et,(.4+at)*nt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-ct)*et));var Zt=new go.PathFigure((bt+xt)*nt,Rt*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt,Rt*et,(bt-pt)*nt,(Rt+xt)*et,(bt-xt)*nt,(Rt+pt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt,Rt*et,(bt+pt)*nt,(Rt-xt)*et,(bt+xt)*nt,(Rt-pt)*et)),At.spot1=new go.Spot(0,.05),At.spot2=new go.Spot(.55,.95),At}),go.Shape.defineFigureGenerator("NorGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*at,pt=0,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+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+ct)*nt,(xt-at)*et,.7*nt,(xt-ct)*et)),at=.1,ct=ie*.1,pt=.9,xt=.5;var Rt=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.6,.75),At}),go.Shape.defineFigureGenerator("OrGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*at,pt=0,xt=.5,bt=new go.PathFigure(0,0,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct+ct)*nt,(xt-at)*et,.8*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+ct)*et,(pt+ct+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("XnorGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*at,pt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Rt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(pt+ct)*nt,(xt-at)*et,.7*nt,(xt-ct)*et)),at=.1,ct=ie*.1,pt=.9,xt=.5;var Ot=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.65,.75),At}),go.Shape.defineFigureGenerator("XorGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*at,pt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Rt=new go.PathFigure(.2*nt,0,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct)*nt,(xt-at)*et,.9*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.8,.75),At}),go.Shape.defineFigureGenerator("Capacitor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Resistor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Inductor",function(It,nt,et){var At=new go.Geometry,at=ie*.1,ct=.1,pt=.1,xt=.5,bt=new go.PathFigure((pt-at*.5)*nt,et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.3,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.5,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.7,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.9,bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at*.5)*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),At}),go.Shape.defineFigureGenerator("ACvoltageSource",function(It,nt,et){var At=new go.Geometry,at=ie*.5,ct=.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Move,(pt-ct+.1)*nt,xt*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct-.1)*nt,xt*et,pt*nt,(xt-ct)*et,pt*nt,(xt+ct)*et)),At}),go.Shape.defineFigureGenerator("DCvoltageSource",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Diode",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!1);return At.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)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Wifi",function(It,nt,et){var At=new go.Geometry,at=nt,ct=et;nt=nt*.38,et=et*.6;var pt=ie*.8,xt=.8,bt=0,Rt=.5,Ot=(at-nt)/2,Zt=(ct-et)/2,Vt=new go.PathFigure(bt*nt+Ot,(Rt+xt)*et+Zt,!0);At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Zt,(bt-pt)*nt+Ot,(Rt+xt)*et+Zt,(bt-xt)*nt+Ot,(Rt+pt)*et+Zt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Zt,(bt-xt)*nt+Ot,(Rt-pt)*et+Zt,(bt-pt)*nt+Ot,(Rt-xt)*et+Zt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+pt*.5)*nt+Ot,Rt*et+Zt,bt*nt+Ot,(Rt-xt)*et+Zt,(bt-xt+pt*.5)*nt+Ot,(Rt-pt)*et+Zt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Zt,(bt-xt+pt*.5)*nt+Ot,(Rt+pt)*et+Zt,bt*nt+Ot,(Rt+xt)*et+Zt).close()),pt=ie*.4,xt=.4,bt=.2,Rt=.5;var $t=new go.PathFigure(bt*nt+Ot,(Rt+xt)*et+Zt,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Zt,(bt-pt)*nt+Ot,(Rt+xt)*et+Zt,(bt-xt)*nt+Ot,(Rt+pt)*et+Zt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Zt,(bt-xt)*nt+Ot,(Rt-pt)*et+Zt,(bt-pt)*nt+Ot,(Rt-xt)*et+Zt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+pt*.5)*nt+Ot,Rt*et+Zt,bt*nt+Ot,(Rt-xt)*et+Zt,(bt-xt+pt*.5)*nt+Ot,(Rt-pt)*et+Zt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Zt,(bt-xt+pt*.5)*nt+Ot,(Rt+pt)*et+Zt,bt*nt+Ot,(Rt+xt)*et+Zt).close()),pt=ie*.2,xt=.2,bt=.5,Rt=.5;var Ce=new go.PathFigure((bt-xt)*nt+Ot,Rt*et+Zt,!0);At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Zt,(bt-xt)*nt+Ot,(Rt-pt)*et+Zt,(bt-pt)*nt+Ot,(Rt-xt)*et+Zt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Zt,(bt+pt)*nt+Ot,(Rt-xt)*et+Zt,(bt+xt)*nt+Ot,(Rt-pt)*et+Zt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Zt,(bt+xt)*nt+Ot,(Rt+pt)*et+Zt,(bt+pt)*nt+Ot,(Rt+xt)*et+Zt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Zt,(bt-pt)*nt+Ot,(Rt+xt)*et+Zt,(bt-xt)*nt+Ot,(Rt+pt)*et+Zt)),pt=ie*.4,xt=.4,bt=.8,Rt=.5;var fe=new go.PathFigure(bt*nt+Ot,(Rt-xt)*et+Zt,!0);At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Zt,(bt+pt)*nt+Ot,(Rt-xt)*et+Zt,(bt+xt)*nt+Ot,(Rt-pt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Zt,(bt+xt)*nt+Ot,(Rt+pt)*et+Zt,(bt+pt)*nt+Ot,(Rt+xt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-pt*.5)*nt+Ot,Rt*et+Zt,bt*nt+Ot,(Rt+xt)*et+Zt,(bt+xt-pt*.5)*nt+Ot,(Rt+pt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Zt,(bt+xt-pt*.5)*nt+Ot,(Rt-pt)*et+Zt,bt*nt+Ot,(Rt-xt)*et+Zt).close()),pt=ie*.8,xt=.8,bt=1,Rt=.5;var rn=new go.PathFigure(bt*nt+Ot,(Rt-xt)*et+Zt,!0);return At.add(rn),rn.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Zt,(bt+pt)*nt+Ot,(Rt-xt)*et+Zt,(bt+xt)*nt+Ot,(Rt-pt)*et+Zt)),rn.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Zt,(bt+xt)*nt+Ot,(Rt+pt)*et+Zt,(bt+pt)*nt+Ot,(Rt+xt)*et+Zt)),rn.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-pt*.5)*nt+Ot,Rt*et+Zt,bt*nt+Ot,(Rt+xt)*et+Zt,(bt+xt-pt*.5)*nt+Ot,(Rt+pt)*et+Zt)),rn.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Zt,(bt+xt-pt*.5)*nt+Ot,(Rt-pt)*et+Zt,bt*nt+Ot,(Rt-xt)*et+Zt).close()),At}),go.Shape.defineFigureGenerator("Email",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(0,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Move,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Move,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Ethernet",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);At.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 ct=new go.PathFigure(.1*nt,et,!0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var pt=new go.PathFigure(.6*nt,et,!0,!0);At.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 xt=new go.PathFigure(0,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Power",function(It,nt,et){var At=new go.Geometry,at=ie*.4,ct=.4,pt=.5,xt=.5,bt=Ct(),Rt=Ct(),Ot=Ct(),Zt=Ct();Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,bt,bt,Rt,Ot,Zt);var Vt=Qt(Rt.x,Rt.y),$t=new go.PathFigure(Rt.x*nt,Rt.y*et,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),Se(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Ot,Zt,Rt,bt,bt),$t.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),at=ie*.3,ct=.3,Se(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Ot,Zt,Rt,bt,bt),$t.add(new go.PathSegment(go.PathSegment.Line,Rt.x*nt,Rt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Zt.x*nt,Zt.y*et,Ot.x*nt,Ot.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Se(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,bt,bt,Rt,Ot,Zt),$t.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Zt.x*nt,Zt.y*et,Ot.x*nt,Ot.y*et).close());var $t=new go.PathFigure(.45*nt,0,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),ee(bt),ee(Rt),ee(Ot),ee(Zt),ee(Vt),At.spot1=new go.Spot(.25,.45),At.spot2=new go.Spot(.75,.8),At}),go.Shape.defineFigureGenerator("Fallout",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et/2,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function ct(pt,xt,bt){pt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+bt)*et).close())}return ct(at,0,0),ct(at,.4,0),ct(at,.2,-.3),At}),go.Shape.defineFigureGenerator("IrritationHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return At.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()),At.spot1=new go.Spot(.3,.3),At.spot2=new go.Spot(.7,.7),At}),go.Shape.defineFigureGenerator("ElectricalHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("FireHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return At.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()),At.spot1=new go.Spot(.07,.445),At.spot2=new go.Spot(.884,.958),At}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(It,nt,et){var At=new go.Geometry,at=.5,ct=0,pt=0,xt=at*ie,bt=.4*Math.SQRT2/2+.5,Rt=.5-.5*Math.SQRT2/2,Ot=1,Zt=.5,Vt=.5,$t=0,Ce=new go.PathFigure(bt*nt,(1-Rt)*et,!1);return At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,Zt*et,Ot*nt,.7*et,Ot*nt,Zt*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+ct)*nt,($t+ct)*et,(.5+at+ct)*nt,(.5-xt+ct)*et,(.5+xt+ct)*nt,(.5-at+ct)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ct)*nt,.9*et,(.5-at+ct)*nt,(.5+xt+pt)*et,(.5-xt+ct)*nt,.9*et)),Ce.add(new go.PathSegment(go.PathSegment.Move,(.25+ct)*nt,.8*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.35+ct)*nt,.9*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.2+ct)*nt,.95*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(nt,et,!1);At.add(ct);var pt=new go.PathFigure(0,.5*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);At.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 At.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)),At}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);At.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 ct=new go.PathFigure(.45*nt,.73*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(.335*nt,(1-.555)*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var pt=.5-.285,xt=.5,bt=pt,Rt=Math.PI/4,Ot=4*(1-Math.cos(Rt))/(3*Math.sin(Rt)),Zt=Ot*.5,Vt=pt,$t=pt,Ce=Ot*Vt,fe=Ot*$t;ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt-Vt)*nt,bt*et,(xt-(Ce+Vt)/2)*nt,(bt+($t+fe)/2)*et,(xt-Vt)*nt,(bt+fe)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(bt-$t)*et,(xt-Vt)*nt,(bt-fe)*et,(xt-Ce)*nt,(bt-$t)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt+Vt)*nt,bt*et,(xt+Ce)*nt,(bt-$t)*et,(xt+Vt)*nt,(bt-fe)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+Vt)*nt,(bt+fe)*et,(xt+(Ce+Vt)/2)*nt,(bt+($t+fe)/2)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var rn=new go.PathFigure(.2*nt,et,!1);At.add(rn),rn.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var tn=new go.PathFigure(.8*nt,et,!1);return At.add(tn),tn.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);At.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 ct=new go.PathFigure(.2*nt,.2*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventError",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(nt,et,!1);At.add(ct);var pt=new go.PathFigure(.1*nt,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Caution",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);At.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 ct=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-ct)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,ct*nt,ct*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)),At}),go.Shape.defineFigureGenerator("Recycle",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);At.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 ct=new go.PathFigure(.475*nt,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var pt=new go.PathFigure(.675*nt,.575*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*.5,pt=new go.PathFigure(nt,at*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+ct)*et,(at+ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-ct)*nt,et,0,(at+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-ct)*et,(at-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+ct)*nt,0,nt,(at-ct)*et));var xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Package",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);At.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 ct=new go.PathFigure(0,.15*et,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),At.spot1=new go.Spot(0,.1),At.spot2=new go.Spot(1,1),At}),go.Shape.defineFigureGenerator("Class",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(0,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(0,.5*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Component",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);At.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 ct=new go.PathFigure(0,.2*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var pt=new go.PathFigure(0,.6*et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Boat Shipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);At.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 ct=new go.PathFigure(.15*nt,.6*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Customer/Supplier",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Workcell",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Supermarket",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("TruckShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(nt,.8*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var pt=.1,xt=ie*.1,bt=.2,Rt=.9,Ot=new go.PathFigure((bt-pt)*nt,Rt*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Rt*et,(bt+xt)*nt,(Rt-pt)*et,(bt+pt)*nt,(Rt-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Rt*et,(bt-xt)*nt,(Rt+pt)*et,(bt-pt)*nt,(Rt+xt)*et).close()),pt=.1,xt=ie*.1,bt=.8,Rt=.9;var Zt=new go.PathFigure((bt-pt)*nt,Rt*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Rt*et,(bt+xt)*nt,(Rt-pt)*et,(bt+pt)*nt,(Rt-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Rt*et,(bt-xt)*nt,(Rt+pt)*et,(bt-pt)*nt,(Rt+xt)*et).close()),At}),go.Shape.defineFigureGenerator("KanbanPost",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Forklift",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(0,.5*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var pt=new go.PathFigure(.5*nt,.8*et,!0);At.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 xt=new go.PathFigure(.5*nt,.7*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var bt=.1,Rt=ie*.1,Ot=.1,Zt=.9,Vt=new go.PathFigure((Ot-bt)*nt,Zt*et,!0);At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt-bt)*et,(Ot-bt)*nt,(Zt-Rt)*et,(Ot-Rt)*nt,(Zt-bt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+bt)*nt,Zt*et,(Ot+Rt)*nt,(Zt-bt)*et,(Ot+bt)*nt,(Zt-Rt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt+bt)*et,(Ot+bt)*nt,(Zt+Rt)*et,(Ot+Rt)*nt,(Zt+bt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-bt)*nt,Zt*et,(Ot-Rt)*nt,(Zt+bt)*et,(Ot-bt)*nt,(Zt+Rt)*et)),bt=.1,Rt=ie*.1,Ot=.4,Zt=.9;var $t=new go.PathFigure((Ot-bt)*nt,Zt*et,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt-bt)*et,(Ot-bt)*nt,(Zt-Rt)*et,(Ot-Rt)*nt,(Zt-bt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+bt)*nt,Zt*et,(Ot+Rt)*nt,(Zt-bt)*et,(Ot+bt)*nt,(Zt-Rt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt+bt)*et,(Ot+bt)*nt,(Zt+Rt)*et,(Ot+Rt)*nt,(Zt+bt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-bt)*nt,Zt*et,(Ot-Rt)*nt,(Zt+bt)*et,(Ot-bt)*nt,(Zt+Rt)*et)),At}),go.Shape.defineFigureGenerator("RailShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);At.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 ct=new go.PathFigure(.45*nt,.7*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var pt=new go.PathFigure(.55*nt,.4*et,!0);At.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 Ot=.05,Zt=ie*.05,Vt=.175,$t=.95,xt=new go.PathFigure((Vt-Ot)*nt,$t*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t-Ot)*et,(Vt-Ot)*nt,($t-Zt)*et,(Vt-Zt)*nt,($t-Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Ot)*nt,$t*et,(Vt+Zt)*nt,($t-Ot)*et,(Vt+Ot)*nt,($t-Zt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t+Ot)*et,(Vt+Ot)*nt,($t+Zt)*et,(Vt+Zt)*nt,($t+Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Ot)*nt,$t*et,(Vt-Zt)*nt,($t+Ot)*et,(Vt-Ot)*nt,($t+Zt)*et));var Ot=.05,Zt=ie*.05,Vt=.375,$t=.95,bt=new go.PathFigure((Vt-Ot)*nt,$t*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t-Ot)*et,(Vt-Ot)*nt,($t-Zt)*et,(Vt-Zt)*nt,($t-Ot)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Ot)*nt,$t*et,(Vt+Zt)*nt,($t-Ot)*et,(Vt+Ot)*nt,($t-Zt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t+Ot)*et,(Vt+Ot)*nt,($t+Zt)*et,(Vt+Zt)*nt,($t+Ot)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Ot)*nt,$t*et,(Vt-Zt)*nt,($t+Ot)*et,(Vt-Ot)*nt,($t+Zt)*et));var Ot=.05,Zt=ie*.05,Vt=.625,$t=.95,Rt=new go.PathFigure((Vt-Ot)*nt,$t*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t-Ot)*et,(Vt-Ot)*nt,($t-Zt)*et,(Vt-Zt)*nt,($t-Ot)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Ot)*nt,$t*et,(Vt+Zt)*nt,($t-Ot)*et,(Vt+Ot)*nt,($t-Zt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t+Ot)*et,(Vt+Ot)*nt,($t+Zt)*et,(Vt+Zt)*nt,($t+Ot)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Ot)*nt,$t*et,(Vt-Zt)*nt,($t+Ot)*et,(Vt-Ot)*nt,($t+Zt)*et));var Ot=.05,Zt=ie*.05,Vt=.825,$t=.95,Ce=new go.PathFigure((Vt-Ot)*nt,$t*et,!0);At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t-Ot)*et,(Vt-Ot)*nt,($t-Zt)*et,(Vt-Zt)*nt,($t-Ot)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Ot)*nt,$t*et,(Vt+Zt)*nt,($t-Ot)*et,(Vt+Ot)*nt,($t-Zt)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Vt*nt,($t+Ot)*et,(Vt+Ot)*nt,($t+Zt)*et,(Vt+Zt)*nt,($t+Ot)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Ot)*nt,$t*et,(Vt-Zt)*nt,($t+Ot)*et,(Vt-Ot)*nt,($t+Zt)*et).close());var fe=new go.PathFigure(0,et,!1);return At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Warehouse",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(0,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(.15*nt,et,!0);At.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 xt=.05,bt=ie*.05,Rt=.35,Ot=.775,Zt=new go.PathFigure((Rt-xt)*nt,Ot*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Ot-xt)*et,(Rt-xt)*nt,(Ot-bt)*et,(Rt-bt)*nt,(Ot-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+xt)*nt,Ot*et,(Rt+bt)*nt,(Ot-xt)*et,(Rt+xt)*nt,(Ot-bt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Ot+xt)*et,(Rt+xt)*nt,(Ot+bt)*et,(Rt+bt)*nt,(Ot+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-xt)*nt,Ot*et,(Rt-bt)*nt,(Ot+xt)*et,(Rt-xt)*nt,(Ot+bt)*et).close()),At}),go.Shape.defineFigureGenerator("ControlCenter",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Bluetooth",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.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)),At}),go.Shape.defineFigureGenerator("Globe",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Wave",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return At.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)),At}),go.Shape.defineFigureGenerator("Operator",function(It,nt,et){var At=new go.Geometry,at=.3,ct=ie*.3,pt=.5,xt=.7,bt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et));var Rt=new go.PathFigure(0,.7*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),At}),go.Shape.defineFigureGenerator("TripleFanBlades",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return At.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)),At}),go.Shape.defineFigureGenerator("CentrifugalPump",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.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)),At}),go.Shape.defineFigureGenerator("Battery",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.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 ct=new go.PathFigure(0,.6*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),At}),go.Shape.defineFigureGenerator("Delete",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et));var Rt=new go.PathFigure(.15*nt,.5*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Flag",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Help",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ie*.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-at)*nt,xt*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et).close()),at=.05,ct=ie*.05,pt=.5,xt=.8;var Rt=new go.PathFigure((pt-at)*nt,xt*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et).close()),Rt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),At}),go.Shape.defineFigureGenerator("Location",function(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.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 ct=new go.PathFigure(.2*nt,.5*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),At}),go.Shape.defineFigureGenerator("Unlocked",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.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 ct=new go.PathFigure(.2*nt,.5*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),At}),go.Shape.defineFigureGenerator("Gear",function(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Map",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return At.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)),At}),go.Shape.defineFigureGenerator("Eject",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.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 ct=new go.PathFigure(0,et*.6,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),At}),go.Shape.defineFigureGenerator("Pencil",function(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);At.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 ct=new go.PathFigure(.126*nt,.85*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var pt=new go.PathFigure(.402*nt,.85*et,!1);At.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 xt=new go.PathFigure(.678*nt,.85*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var bt=new go.PathFigure(.5*nt,.1*et,!1);return At.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()),At}),go.Shape.defineFigureGenerator("Staircase",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return At.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()),At}),go.Shape.defineFigureGenerator("5Bars",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);At.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 ct=new go.PathFigure(nt*.204,et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var pt=new go.PathFigure(nt*.408,et,!0);At.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 xt=new go.PathFigure(nt*.612,et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var bt=new go.PathFigure(nt*.816,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("PC",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.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 ct=new go.PathFigure(nt*.055,.07*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var pt=new go.PathFigure(nt*.055,.13*et,!0);At.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 xt=new go.PathFigure(nt*.055,.18*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var bt=new go.PathFigure(nt*1,0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Plane",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Key",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return At.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()),At}),go.Shape.defineFigureGenerator("FilmTape",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.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 ct=new go.PathFigure(0,0,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),ct.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var pt=new go.PathFigure(nt*.11,et*.1,!1);At.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 xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.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 At.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()),At}),go.Shape.defineFigureGenerator("FloppyDisk",function(It,nt,et){var At=new go.Geometry,at=8,ct=at*ie,pt=new go.PathFigure(at,0,!1);At.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-ct,nt-ct,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ct,et,0,et-ct)),pt.add(new go.PathSegment(go.PathSegment.Line,0,at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,ct,ct,0).close());var xt=new go.PathFigure(nt*.83,0,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var bt=new go.PathFigure(nt*.83,et*1,!1);At.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 Rt=new go.PathFigure(nt*.78,et*.05,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),At}),go.Shape.defineFigureGenerator("SpeechBubble",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=15),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,ct=et*.8,pt=new go.Geometry,xt=new go.PathFigure(At,0,!0);return pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,ct-At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,ct,nt,ct-at,nt-at,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,At,ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct-At,at,ct,0,ct-at)),xt.add(new go.PathSegment(go.PathSegment.Line,0,At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);At.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 ct=new go.PathFigure(nt*1,et*.55,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),At}),go.Shape.defineFigureGenerator("Windows",function(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);At.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 ct=new go.PathFigure(nt*.1,et*.2,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var pt=new go.PathFigure(nt*.28,et*.37,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Beaker",function(It,nt,et){var At=new go.Geometry,at=15,ct=at*ie,pt=new go.PathFigure(nt*.62,et*.475,!0);return At.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-ct,nt-ct,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ct,et,0,et-ct)),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()),ct>1?(At.spot1=new go.Spot(0,0,ct,ct),At.spot2=new go.Spot(1,1,-ct,-ct)):(At.spot1=go.Spot.TopLeft,At.spot2=go.Spot.BottomRight),At}),go.Shape.defineFigureGenerator("Download",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close());var pt=new go.PathFigure(nt*.4,et*0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Bin",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close()),At}),go.Shape.defineFigureGenerator("Upload",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close());var pt=new go.PathFigure(nt*.5,et*0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("EmptyDrink",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return At.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()),At}),go.Shape.defineFigureGenerator("Drink",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);At.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 ct=new go.PathFigure(nt*.235,et*.28,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),At}),go.Shape.defineFigureGenerator("4Arrows",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return At.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()),At}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var xn={},ze="5.0",Qt={},Ct=null,ee=!1,ue=!1,Se=null,de=!1,Ht=null,ie=null,Ae=0;Ae<arguments.length;Ae++){var re=arguments[Ae];if(re!==null)switch(typeof re){case"number":ze=re.toFixed(1);break;case"string":re.match(new RegExp("^[0-9]\\.[0-9]+$"))?ze=re:Se=re;break;case"object":typeof re.is3D!="undefined"?Ct=re:Qt=re;break;case"boolean":ee=re,ue=!0;break}}Ct===null&&(Ct={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&&!ue&&(ee=!0)),Se!==null&&Qt.id===void 0&&(Qt.id=Se);var Wt="",Ie="",Xt=!1,Ee=null,It=null,nt=null,et=!1,At=null,at=null,ct=null,pt=null,xt=null;Qt.height!==void 0&&(Qt.height=Math.round(Qt.height)),Qt.width!==void 0&&(Qt.width=Math.round(Qt.width));var bt=function(sn){return parseFloat(sn)>4?parseFloat(sn):5};xn.setHTML5Codebase=function(sn,Rn){ie=sn,Cn(sn,Rn)},xn.setJavaCodebase=xn.setJavaCodebaseVersion=xn.isCompiledInstalled=xn.setPreCompiledScriptPath=xn.setPreCompiledResourcePath=function(){},xn.setHTML5CodebaseVersion=function(sn,Rn){var ri=parseFloat(sn);if(ri!==NaN&&ri<5){console.log("The GeoGebra HTML5 codebase version "+ri+" is deprecated. Using version latest instead.");return}Ht=sn,oe(sn,Rn)},xn.getHTML5CodebaseVersion=function(){return It},xn.getParameters=function(){return Qt},xn.setFontsCSSURL=function(sn){pt=sn},xn.setGiacJSURL=function(sn){},xn.setJNLPFile=function(sn){Wt=sn},xn.setJNLPBaseDir=function(sn){},xn.inject=function(){function sn(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Rn="auto",ri=Qt.id,Ui,en=!1,ei=0;ei<arguments.length;ei++){var Fe=arguments[ei];typeof Fe=="string"?(Fe=Fe.toLowerCase(),Fe.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Rn=Fe:ri=arguments[ei]):typeof Fe=="boolean"?en=Fe:Fe instanceof HTMLElement&&(Ui=Fe)}ci();function ci(){if(!de){setTimeout(ci,200);return}Rn=ti(Rn);var Ti=Ui||document.getElementById(ri);if(!Ti){console.log("possibly bug on ajax loading? ");return}if(xn.removeExistingApplet(Ti,!1),Qt.width===void 0&&Ti.clientWidth&&(Qt.width=Ti.clientWidth),Qt.height===void 0&&Ti.clientHeight&&(Qt.height=Ti.clientHeight),!(Qt.width&&Qt.height)&&Rn==="html5"&&(delete Qt.width,delete Qt.height),Ee=Rn,Rn==="screenshot")tn(Ti,Qt);else{var jt=!1;Qt.hasOwnProperty("playButton")&&Qt.playButton||Qt.hasOwnProperty("clickToLoad")&&Qt.clickToLoad?jt=!0:Qt.hasOwnProperty("playButtonAutoDecide")&&Qt.playButtonAutoDecide&&(jt=(!Rt()||sn())&&Ot()),jt?(Ee="screenshot",Fn(Ti,Qt,en,Rn)):rn(Ti,Qt,en)}}};function Rt(){try{return window.self!==window.top}catch(sn){return!0}}function Ot(){return Qt.hasOwnProperty("screenshotGenerator")&&Qt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}xn.getViews=function(){return Ct},xn.isJavaInstalled=function(){return!1};var Zt=function(sn){var Rn=function(ei){var Fe=JSON.parse(ei),ci=function(Mt){return Mt.type=="G"||Mt.type=="E"},Ti=Fe.elements?Fe.elements.filter(ci)[0]:Fe;if(!Ti||!Ti.url){ri();return}Qt.fileName=Ti.url,Vt(Ti.settings||{}),Ct.is3D=!0;var jt="https://www.geogebra.org/images/";xn.setPreviewImage(At||Ti.previewUrl,jt+"GeoGebra_loading.png",jt+"applet_play.png"),sn()},ri=function(){Qt.onError&&Qt.onError(),li("Error: Fetching material (id "+Qt.material_id+") failed.",Qt)},Ui=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",en="/materials/"+Qt.material_id+"?scope=basic";$t("https://"+Ui+"/api/proxy.php?path="+encodeURIComponent(en),Rn,ri)};function Vt(sn){var Rn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ri){sn[ri]=!!sn[ri]}),Rn.forEach(function(ri){Qt[ri]===void 0&&sn[ri]!==void 0&&(Qt[ri]=sn[ri])}),Qt.showToolBarHelp===void 0&&(Qt.showToolBarHelp=Qt.showToolBar)}function $t(sn,Rn,ri){var Ui=new XMLHttpRequest;Ui.open("GET",sn),Ui.onload=function(){Rn(Ui.responseText)},Ui.onerror=ri,Ui.send()}xn.isHTML5Installed=function(){return!0},xn.getLoadedAppletType=function(){return Ee},xn.setPreviewImage=function(sn,Rn,ri){At=sn,at=Rn,ct=ri},xn.removeExistingApplet=function(sn,Rn){var ri;typeof sn=="string"&&(sn=document.getElementById(sn)),Ee=null;var Ui=null;for(ri=0;ri<sn.childNodes.length;ri++){var en=sn.childNodes[ri],ei=en.className;ei==="applet_screenshot"?Rn?(en.style.display="block",Ee="screenshot"):en.style.display="none":ei!=="applet_scaler prerender"&&(sn.removeChild(en),Ui=ei&&ei.indexOf("appletParameters")!=-1?en.id:null,ri--)}var Fe=Qt.id!==void 0?Qt.id:Ui,ci=window[Fe];ci&&typeof ci.getBase64=="function"&&(ci.remove(),window[Fe]=null)},xn.refreshHitPoints=function(){if(bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var sn=xn.getAppletObject();return sn&&typeof sn.recalculateEnvironments=="function"?(sn.recalculateEnvironments(),!0):!1},xn.startAnimation=function(){var sn=xn.getAppletObject();return sn&&typeof sn.startAnimation=="function"?(sn.startAnimation(),!0):!1},xn.stopAnimation=function(){var sn=xn.getAppletObject();return sn&&typeof sn.stopAnimation=="function"?(sn.stopAnimation(),!0):!1},xn.getAppletObject=function(){var sn=Qt.id!==void 0?Qt.id:"ggbApplet";return window[sn]},xn.resize=function(){};var Ce=function(sn,Rn,ri){var Ui=document.createElement("param");Ui.setAttribute("name",Rn),Ui.setAttribute("value",ri),sn.appendChild(Ui)},fe=function(sn){return sn&&sn!=="false"},rn=function(sn,Rn,ri){bt(It)<=4.2&&(ri=!0);var Ui=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==It||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Ui=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var en=document.createElement("div");en.classList.add("appletParameters","notranslate");var ei=Rn.width,Fe=Rn.height;if(Rn.disableAutoScale=Rn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Rn.disableAutoScale,Rn.width!==void 0)if(bt(It)<=4.4)fe(Rn.showToolBar)&&(Rn.height-=7),fe(Rn.showAlgebraInput)&&(Rn.height-=37),Rn.width<605&&fe(Rn.showToolBar)&&(Rn.width=605,ei=605);else{var ci=100;(fe(Rn.showToolBar)||fe(Rn.showMenuBar))&&(Rn.hasOwnProperty("customToolBar")&&(Rn.customToolbar=Rn.customToolBar),ci=fe(Rn.showMenuBar)?245:155),ei<ci&&(Rn.width=ci,ei=ci)}en.style.border="none",en.style.display="inline-block";for(var Ti in Rn)Rn.hasOwnProperty(Ti)&&Ti!=="appletOnLoad"&&en.setAttribute("data-param-"+Ti,Rn[Ti]);pt&&en.setAttribute("data-param-fontscssurl",pt),xn.resize=function(){GGBAppletUtils.responsiveResize(sn,Rn)},window.addEventListener("resize",function(Oe){xn.resize()});var jt=typeof Rn.appletOnLoad=="function"?Rn.appletOnLoad:function(){};if(!ri&&Rn.width!==void 0){Rn.hasOwnProperty("showSplash")||en.setAttribute("data-param-showSplash","false");var Mt=sn.querySelector(".applet_scaler.prerender"),mt=Mt!==null;if(mt)var vt=Mt.querySelector(".ggb_preview");else{var vt=Gn(ei,Fe,Rn.borderColor,!1);Mt=document.createElement("div"),Mt.className="applet_scaler",Mt.style.position="relative",Mt.style.display="block",Mt.style.width=ei+"px",Mt.style.height=Fe+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Mt,"66%"),bt(It)>=5?(Rn.appletOnLoad=function(Oe){var nn=sn.querySelector(".ggb_preview");nn&&nn.parentNode.removeChild(nn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Mt),window.GGBT_wsf_view&&$(window).trigger("resize"),jt(Oe)},mt||Mt.appendChild(vt)):en.appendChild(vt),Mt.appendChild(en),mt||sn.appendChild(Mt),setTimeout(function(){xn.resize()},1)}else{var Lt=document.createElement("div");Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.appendChild(en),sn.appendChild(Lt),Rn.appletOnLoad=function(Oe){xn.resize(),jt(Oe)}}function Bt(Oe,nn){nn&&typeof nn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Oe,nn.appletOnLoad):renderGGBElement(Oe),li("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",nn)}function _t(Oe,nn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Oe,params:nn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(mn){Bt(mn.article,mn.params)}),html5AppletsToProcess=null)},bt(It)<5&&(Oe.className+=" geogebraweb")):Bt(Oe,nn)}if(Ui){scriptLoadStarted=!0;for(var Le=0;Le<en.childNodes.length;Le++){var xe=en.childNodes[Le].tagName;xe==="TABLE"&&(en.removeChild(en.childNodes[Le]),Le--)}if(ggbHTML5LoadedScript!==null){var Xe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Xe!=null&&Xe.parentNode.removeChild(Xe)}var Me=document.createElement("script"),De=function(){_t(en,Rn)};Me.src=Ie+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=It,ggbHTML5LoadedScript=Me.src,li("GeoGebra HTML5 codebase loaded: '"+Ie+"'.",Rn),!ie&&(!Ht||Ht=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),De()):Ie.requirejs?__webpack_require__.e(7963).then(function(){var Oe=[__webpack_require__(87963)];De.apply(null,Oe)}.bind(this)).catch(__webpack_require__.oe):(Me.onload=De,sn.appendChild(Me))}else _t(en,Rn);Rn.height=Fe,Rn.width=ei},tn=function(sn,Rn,ri){var Ui=Gn(Rn.width,Rn.height,Rn.borderColor,ri),en=document.createElement("div");en.style.position="relative",en.style.display="block",en.style.width=Rn.width+"px",en.style.height=Rn.height+"px",en.className="applet_screenshot applet_scaler"+(ri?" applet_screenshot_play":""),en.appendChild(Ui);var ei=GGBAppletUtils.getScale(Rn,sn,ri);ri?(sn.appendChild(kn()),window.GGBT_wsf_view||(sn.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(en,"66%"),sn.appendChild(en),ei!==1&&!isNaN(ei)&&(GGBAppletUtils.scaleElement(en,ei),en.style.width=Rn.width+"px",en.style.height=Rn.height+"px",en.parentNode.style.width=Rn.width*ei+"px",en.parentNode.style.height=Rn.height*ei+"px"),xn.resize=function(){Bn(sn,Ui,en,ri)},window.addEventListener("resize",function(Fe){xn.resize()}),xn.resize()};function Bn(sn,Rn,ri,Ui){if(sn.contains(Rn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(sn.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(sn)}var en=GGBAppletUtils.getScale(Qt,sn,Ui);ri.parentNode!==null&&(!isNaN(en)&&en!==1?(GGBAppletUtils.scaleElement(ri,en),ri.parentNode.style.width=Qt.width*en+"px",ri.parentNode.style.height=Qt.height*en+"px"):(GGBAppletUtils.scaleElement(ri,1),ri.parentNode.style.width=Qt.width+"px",ri.parentNode.style.height=Qt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(sn),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}xn.onExitFullscreen=function(sn,Rn){Rn.appendChild(sn)};var Fn=function(sn,Rn,ri,Ui){tn(sn,Rn,!0);for(var en=function(){var ci=[];for(Fe=0;Fe<sn.childNodes.length;Fe++)ci.push(sn.childNodes[Fe]);if(window.GGBT_wsf_view){var Ti=window.GGBT_wsf_view.renderFullScreen(sn,Rn.id),jt=document.getElementById("fullscreencontainer"),Mt=jQuery(sn).find(".fullscreencontent");Mt.length>0?(Ti.remove(),Mt.attr("id","fullscreencontent").show(),jQuery(jt).append(Mt),window.dispatchEvent(new Event("resize"))):rn(Ti,Rn,!1),window.GGBT_wsf_view.launchFullScreen(jt)}else Ee=Ui,rn(sn,Rn,!1);if(!window.GGBT_wsf_view)for(Fe=0;Fe<ci.length;Fe++)sn.removeChild(ci[Fe])},ei=sn.getElementsByClassName("ggb_preview_play"),Fe=0;Fe<ei.length;Fe++)ei[Fe].addEventListener("click",en,!1),ei[Fe].addEventListener("ontouchstart",en,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(sn),Ot()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},kn=function(){var sn=document.createElement("div");if(sn.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Rn='.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");}',ri=document.createElement("style");ri.styleSheet?ri.styleSheet.cssText=Rn:ri.appendChild(document.createTextNode(Rn)),document.getElementsByTagName("head")[0].appendChild(ri)}return sn},Gn=function(sn,Rn,ri,Ui){var en=document.createElement("div");en.className="ggb_preview",en.style.position="absolute",en.style.zIndex="90",en.style.width=sn-2+"px",en.style.height=Rn-2+"px",en.style.top="0px",en.style.left="0px",en.style.overflow="hidden",en.style.backgroundColor="white";var ei="lightgrey";ri!==void 0&&(ri==="none"?ei="transparent":ei=ri),en.style.border="1px solid "+ei;var Fe=document.createElement("img");if(Fe.style.position="relative",Fe.style.zIndex="1000",Fe.style.top="-1px",Fe.style.left="-1px",At!==null&&Fe.setAttribute("src",At),Fe.style.opacity=.7,at!==null){var ci,Ti,jt;if(!Ui){ci=document.createElement("img"),ci.style.position="absolute",ci.style.zIndex="1001",ci.style.opacity=1,Fe.style.opacity=.3,Ti=360,Ti>sn/4*3&&(Ti=sn/4*3),jt=Ti/5.8,ci.setAttribute("src",at),ci.setAttribute("width",Ti),ci.setAttribute("height",jt);var Mt=(sn-Ti)/2,mt=(Rn-jt)/2;ci.style.left=Mt+"px",ci.style.top=mt+"px",en.appendChild(ci)}}return en.appendChild(Fe),en},ti=function(sn){return sn=sn.toLowerCase(),sn==="html5"||sn==="screenshot"?sn:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],oe=function(sn,Rn){if(It=sn,Rn){Cn(It,!0);return}var ri=!ee;if(ri){var Ui=bt(It);!isNaN(Ui)&&Ui<4.4&&(ri=!1)}var en,ei;window.location.protocol.substr(0,4)==="http"?en=window.location.protocol:en="http:";var Fe=It.indexOf("//");Fe>0?ei=It:Fe===0?ei=en+It:ei="https://www.geogebra.org/apps/5.2.814.0/";for(var ci in me)if(It.slice(me[ci].length*-1)===me[ci]||It.slice((me[ci].length+1)*-1)===me[ci]+"/"){Cn(ei,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ri&&!Ct.is3D&&!Ct.AV&&!Ct.SV&&!Ct.CV&&!Ct.EV2&&!Ct.CP&&!Ct.PC&&!Ct.DA&&!Ct.FI&&!Ct.PV&&!fe(Qt.showToolBar)&&!fe(Qt.showMenuBar)&&!fe(Qt.showAlgebraInput)&&!fe(Qt.enableRightClick)&&(!Qt.appName||Qt.appName=="classic")?ei+="webSimple/":ei+="web3d/",Cn(ei,!1)},Cn=function(sn,Rn){if(sn.requirejs){Ie=sn;return}sn.slice(-1)!=="/"&&(sn+="/"),Ie=sn,Rn===null&&(Rn=sn.indexOf("http")===-1),Xt=Rn,nt="web.nocache.js",et=!1;var ri=Ie.split("/");ri.length>1&&(!Rn&&ri[ri.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):me.indexOf(ri[ri.length-2])>=0&&(nt=ri[ri.length-2]+".nocache.js")),ri=sn.split("/"),It=ri[ri.length-3],It.substr(0,4)==="test"?It=It.substr(4,1)+"."+It.substr(5,1):(It.substr(0,3)==="war"||It.substr(0,4)==="beta")&&(It="5.0");var Ui=parseFloat(It);Ui!==NaN&&Ui<5&&sn.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ui+" is deprecated. Using version latest instead."),oe("5.0",Rn))},li=function(sn,Rn){window.console&&window.console.log&&(!Rn||typeof Rn.showLogging=="undefined"||Rn.showLogging&&Rn.showLogging!=="false")&&console.log(sn)};Qt.material_id!==void 0?Zt(ai):ai();function ai(){var sn=ze;Ht!==null?sn=Ht:parseFloat(sn)<5&&(sn="5.0"),oe(sn,!1),ie!==null&&Cn(ie,Xt),de=!0}return xn},GGBAppletUtils=function(){"use strict";function xn(){return window.GGBT_wsf_edit!==void 0}function ze(de,Ht){Ht!=1?(de.style.transformOrigin="0% 0% 0px",de.style.webkitTransformOrigin="0% 0% 0px",de.style.transform="scale("+Ht+","+Ht+")",de.style.webkitTransform="scale("+Ht+","+Ht+")",de.style.maxWidth="initial",de.querySelector(".ggb_preview")!==null&&(de.querySelector(".ggb_preview").style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[0]!==void 0&&(de.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[1]!==void 0&&(de.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(de.style.transform="none",de.style.webkitTransform="none")}function Qt(de,Ht,ie,Ae,re,Wt){var Ie=null;if(Wt!=null&&Wt!="")for(var Xt=de.parentNode;Xt!=null;)if((" "+Xt.className+" ").indexOf(" "+Wt+" ")>-1){Ie=Xt;break}else Xt=Xt.parentNode;var Ee=0,It=0,nt=0,et=0,At=0,at=0,ct=0;if(Ie)Ee=Ie.offsetWidth,It=Math.max(Ae?Ie.offsetWidth:0,Ie.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ee=Math.min(window.innerWidth,document.documentElement.clientWidth),It=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Ee):(Ee=window.innerWidth,It=window.innerHeight,nt=window.innerWidth),de){var pt=de.getBoundingClientRect();pt.left>0&&pt.left<=Ee&&(re===void 0||!re)&&(document.dir==="rtl"?(At=Ee-pt.width-pt.left,at=nt<=480?10:30):(at=pt.left,At=nt<=480?10:30),et=at+At)}if(de&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=de.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,ct=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,ct=40)}}return de&&((ie===void 0||!ie)&&Ht>0&&Ht+et<Ee?Ee=Ht:Ee-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ie===void 0||!ie)&&(It-=ct)),{width:Ee,height:It}}function Ct(de,Ht,ie,Ae,re){if(de.isScreenshoGenerator)return 1;var Wt=Ae!==void 0&&Ae,Ie=de.noScaleMargin!=null&&de.noScaleMargin,Xt=function(xt){return xt&&xt!=="false"},Ee=Xt(de.autoHeight),It=Qt(Ht,de.width,ie,Ee,Wt&&window.GGBT_wsf_view||Ie,re),nt=parseInt(It.width),et=de.width,At=de.height;if(et===void 0){var at=Ht.querySelector(".appletParameters");at&&(et=at.offsetWidth,At=at.offsetHeight)}var ct=nt/et,pt=Wt?1:It.height/At;return ie!==void 0&&!ie&&(ct=Math.min(1,ct),pt=Math.min(1,pt)),Math.min(ct,pt)}function ee(de,Ht,ie){var Ae=1,re,Wt=!1;if(de.hasOwnProperty("allowUpscale")&&(Wt=de.allowUpscale),de.hasOwnProperty("scale")&&(Ae=parseFloat(de.scale),(isNaN(Ae)||Ae===null||Ae===0)&&(Ae=1),Ae>1&&(Wt=!0)),Ht&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Wt=!0),!(de.hasOwnProperty("disableAutoScale")&&de.disableAutoScale))re=Ct(de,Ht,Wt,ie,de.scaleContainerClass);else return Ae;return Wt&&(!de.hasOwnProperty("scale")||Ae===1)?re:Math.min(Ae,re)}function ue(de){var Ht=Math.min(window.innerWidth,document.documentElement.clientWidth),ie=Math.min(window.innerHeight,document.documentElement.clientHeight),Ae=de.getBoundingClientRect(),re=(Ht-Ae.width)/2,Wt=(ie-Ae.height)/2;Wt<0&&(Wt=0),de.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(re<40?de.style.left="40px":de.style.left=re+"px",de.style.top=Wt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Wt<40?de.style.top="40px":de.style.top=Wt+"px",de.style.left=re+"px")}function Se(de,Ht){var ie=de.querySelector(".appletParameters");if(ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ht.id!==ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(de)}if(ie.parentElement&&/fullscreen/.test(ie.parentElement.className))return;var Ae=ee(Ht,de);xn()&&ie.setAttribute("data-param-scale",Ae);for(var re=null,Wt=0;Wt<de.childNodes.length;Wt++)if(de.childNodes[Wt].className!==void 0&&de.childNodes[Wt].className.match(/^applet_scaler/)){re=de.childNodes[Wt];break}if(re!==null&&re.querySelector(".noscale")!==null)return;var Ie=Ht.id!==void 0?Ht.id:"ggbApplet",Xt=window[Ie];(Xt==null||!Xt.recalculateEnvironments)&&re!==null&&!re.className.match(/fullscreen/)&&(re.parentNode.style.transform="",!isNaN(Ae)&&Ae!==1?(re.parentNode.style.width=Ht.width*Ae+"px",re.parentNode.style.height=Ht.height*Ae+"px",ze(re,Ae)):(ze(re,1),re.parentNode.style.width=Ht.width+"px",re.parentNode.style.height=Ht.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ue(de),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ie).parents(".content-added-content"))}}return{responsiveResize:Se,isFlexibleWorksheetEditor:xn,positionCenter:ue,getScale:ee,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 xn=n.location.search;return xn.indexOf(J)!=-1||xn.indexOf(K)!=-1}function q(xn,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(xn){var ze=s[L].bindings;s[L].bindings=function(){for(var Qt=ze?ze():{},Ct=xn[webModule.__softPermutationId],ee=O;ee<Ct.length;ee++){var ue=Ct[ee];Qt[ue[O]]=ue[P]}return Qt}};var t;function u(){return v(),t}function v(){if(!t){var xn=o.createElement(Q);if(xn.id=L,xn.style.cssText=R+S,xn.tabIndex=-1,o.body.appendChild(xn),t=xn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var ze=document.compatMode==U?V:W;t.write(ze+X),t.close()}}}function w(xn){function ze(Ct){function ee(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ue=ee();if(ue){Ct();return}function Se(){if(!ue){if(!ee())return;ue=!0,Ct(),o.removeEventListener&&o.removeEventListener(Z,Se,!1),de&&clearInterval(de)}}o.addEventListener&&o.addEventListener(Z,Se,!1);var de=setInterval(function(){Se()},$)}function Qt(Ct){var ee=u(),ue=ee.body,Se=ee.createElement(_);Se.language=ab,Se.crossOrigin=W,Se.src=Ct,webModule.__errFn&&(Se.onerror=function(){webModule.__errFn(L,new Error(bb+Ct))}),ue.appendChild(Se)}ze(function(){Qt(xn)})}webModule.__startLoadingFragment=function(xn){return C(xn)},webModule.__installRunAsyncCode=function(xn){var ze=u(),Qt=ze.body,Ct=ze.createElement(_);Ct.language=ab,Ct.text=xn,Qt.appendChild(Ct),Qt.removeChild(Ct)};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(xn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(xn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(xn){var ze=c[xn];return ze==null?null:ze},r=d,webModule.__errFn=e}function B(){function xn(de){var Ht=de.lastIndexOf(rb);Ht==-1&&(Ht=de.length);var ie=de.indexOf(sb);ie==-1&&(ie=de.length);var Ae=de.lastIndexOf(tb,Math.min(ie,Ht));return Ae>=O?de.substring(O,Ae+P):W}function ze(de){if(!de.match(/^\w+:\/\//)){var Ht=o.createElement(ub);Ht.src=de+vb,de=xn(Ht.src)}return de}function Qt(){var de=__gwt_getMetaProperty(wb);return de!=null?de:W}function Ct(){for(var de=o.getElementsByTagName(_),Ht=O;Ht<de.length;++Ht)if(de[Ht].src.indexOf(xb)!=-1)return xn(de[Ht].src);return W}function ee(){var de=o.getElementsByTagName(yb);return de.length>O?de[de.length-P].href:W}function ue(){var de=o.location;return de.href==de.protocol+zb+de.host+de.pathname+de.search+de.hash}var Se=Qt();return Se==W&&(Se=Ct()),Se==W&&(Se=ee()),Se==W&&ue()&&(Se=xn(o.location.href)),Se=ze(Se),Se}function C(xn){return xn.match(/^\//)||xn.match(/^[a-zA-Z]+:\/\//)?xn:webModule.__moduleBase+xn}function D(){var xn=[],ze=O,Qt=[],Ct=[];function ee(de){var Ht=Ct[de](),ie=Qt[de];if(Ht in ie)return Ht;var Ae=[];for(var re in ie)Ae[ie[re]]=re;throw r&&r(de,Ae,Ht),null}if(__gwt_isKnownPropertyValue=function(de,Ht){return Ht in Qt[de]},webModule.__getPropMap=function(){var de={};for(var Ht in Qt)Qt.hasOwnProperty(Ht)&&(de[Ht]=ee(Ht));return de},webModule.__computePropValue=ee,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ue;try{ue=Cb;var Se=ue.indexOf(Db);Se!=-1&&(ze=parseInt(ue.substring(Se+P),$),ue=ue.substring(O,Se))}catch(de){}return webModule.__softPermutationId=ze,C(ue+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},46699:function(xn,ze,Qt){"use strict";Qt.d(ze,{Ax:function(){return Se},Ds:function(){return de},KI:function(){return ie},SI:function(){return ue},f1:function(){return ee}});var Ct=Qt(346);function ee(Ae){let re=!0;if(Ae.length>0){for(let Wt=0;Wt<Ae.length;Wt++)if(Ae[Wt].compile_success==0||!Ae[Wt].compile_success){re=!1;break}}else re=!1;return re}function ue(Ae,re=""){let Wt=[];for(let Ie=0;Ie<Ae.length;Ie++){let Xt=Ae[Ie],Ee=re?`${re}/${Xt.name}`:`${Xt.name}`;Wt.push({title:Xt.name,type:Xt.type,isLeaf:Xt.type!=="tree",key:Ee})}return Wt}function Se(Ae,re,Wt){for(let Ie=0;Ie<Ae.length;Ie++){let Xt=Ae[Ie];if(Xt.key===re){Xt.children=Wt;break}Xt.children&&Se(Xt.children,re,Wt)}return Ae}function de(Ae,re,Wt){let Ie;return function(){let Xt=this,Ee=arguments,It=function(){Ie=null,Wt||Ae.apply(Xt,Ee)},nt=Wt&&!Ie;clearTimeout(Ie),Ie=setTimeout(It,re),nt&&Ae.apply(Xt,Ee)}}const Ht=!0,ie=Ct.Z.API_SERVER},1546:function(xn,ze,Qt){"use strict";Qt.d(ze,{ij:function(){return ct},_s:function(){return at},Uf:function(){return At},ZP:function(){return xt}});var Ct=Qt(59301),ee={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"},ue=Qt(92310),Se=Qt.n(ue),de=Qt(42441),Ht=Qt(25399),ie=Qt(458),Ae=Qt(29787),re=Qt(28426),Wt=Qt(346),Ie=Object.defineProperty,Xt=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(bt,Rt,Ot)=>Rt in bt?Ie(bt,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):bt[Rt]=Ot,et=(bt,Rt)=>{for(var Ot in Rt||(Rt={}))Ee.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);if(Xt)for(var Ot of Xt(Rt))It.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);return bt};const At=(bt={})=>{var Rt,Ot,Zt,Vt;let $t=(Rt=bt==null?void 0:bt.emotion)==null?void 0:Rt.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),Ce=(Ot=bt==null?void 0:bt.focus)==null?void 0:Ot.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),fe=(Zt=bt==null?void 0:bt.action)==null?void 0:Zt.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),rn=(Vt=bt==null?void 0:bt.intention)==null?void 0:Vt.map(tn=>et({value:tn==null?void 0:tn.rate},tn));return[{title:"\u8868\u60C5\u5360\u6BD4",color:["#f7ca2e","#4ccf71","#3791ee","#f9ac95","#4f74ee","#f0e999"],data:$t||[]},{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:fe||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:rn||[]}]},at=({className:bt,dataSource:Rt=[],col:Ot=4,right:Zt,bottom:Vt=23,precision:$t=0,wrapWidth:Ce=1200})=>{const fe=(tn="",Bn,Fn="--")=>tn?(tn==null?void 0:tn.length)>Bn?(tn==null?void 0:tn.slice(0,Bn-1))+"...":tn:Fn,rn=Math.floor((Ce-(Ot-1)*Zt)/Ot);return Ct.createElement("div",{className:Se()(ee.list,bt)},!!(Rt!=null&&Rt.length)&&(Rt==null?void 0:Rt.map((tn,Bn)=>{const{cover_pic:Fn,created_at:kn,emotion:Gn,action:ti,intention:me,focus:oe}=tn;return Ct.createElement("div",{key:Bn,className:ee.wrap,style:{width:rn,marginRight:(1+Bn)%Ot===0?0:Zt+$t,marginBottom:Vt}},Ct.createElement("div",{className:ee.img},Ct.createElement("img",{src:`${Wt.Z.API_SERVER}${Fn}`}),Ct.createElement("div",{className:ee.tips},Ct.createElement("div",null,Ct.createElement("i",{className:"iconfont icon-paisheshijian mr5 font14"})," \u62CD\u6444\u65F6\u95F4"),Ct.createElement("span",null,kn))),Ct.createElement("div",{className:ee.footer},Ct.createElement("ul",null,Ct.createElement("li",null,Ct.createElement("i",{className:"iconfont icon-biaoqing"}),Ct.createElement("span",null,"\u8868\u60C5\uFF1A",Ct.createElement(Ht.Z,{title:Gn},Ct.createElement("span",{className:"c-grey-333"},fe(Gn,4))))),Ct.createElement("li",null,Ct.createElement("i",{className:"iconfont icon-hangwei"}),Ct.createElement("span",null,"\u884C\u4E3A\uFF1A",Ct.createElement(Ht.Z,{title:ti},Ct.createElement("span",{className:"c-grey-333"},fe(ti,4)))))),Ct.createElement("ul",null,Ct.createElement("li",null,Ct.createElement("i",{className:"iconfont icon-yitu"}),Ct.createElement("span",null,"\u610F\u56FE\uFF1A",Ct.createElement(Ht.Z,{title:me},Ct.createElement("span",{className:"c-grey-333"},fe(me,4))))),Ct.createElement("li",null,Ct.createElement("i",{className:"iconfont icon-zhuangtai"}),Ct.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",Ct.createElement(Ht.Z,{title:oe},Ct.createElement("span",{className:"c-grey-333"},fe(oe,3))))))))})))},ct=({className:bt,style:Rt,title:Ot,hideBar:Zt=!1,children:Vt,customText:$t="",noDataText:Ce="",emptyData:fe=[],loading:rn,actionAnalysis:tn})=>{var Bn,Fn;const kn=((Bn=fe==null?void 0:fe[0])==null?void 0:Bn.every(ti=>{var me;return!((me=ti==null?void 0:ti.data)!=null&&me.length)}))&&!((Fn=fe==null?void 0:fe[1])!=null&&Fn.length)||!tn,Gn=tn?Ce:$t;return Ct.createElement(ie.Z,{loading:rn,active:!0},kn&&Ct.createElement("div",{className:Se()(ee.noData,bt),style:Rt},!!Ot&&Ct.createElement("div",{className:ee.title},!Zt&&Ct.createElement("b",null),Ct.createElement("span",null,Ot)),Ct.createElement("div",{className:ee.itemWrap},Ct.createElement(re.Z,{customText:Gn}))),!kn&&Vt)};var xt=({className:bt,style:Rt,data:Ot=[],title:Zt,hideBar:Vt=!1,loading:$t=!1})=>Ct.createElement("div",{className:Se()(ee.analysis,bt),style:Rt},!!Zt&&Ct.createElement("div",{className:ee.title},!Vt&&Ct.createElement("b",null),Ct.createElement("span",null,Zt)),Ct.createElement(Ae.Z,{spinning:$t},Ct.createElement("div",{className:ee.itemWrap},Ot==null?void 0:Ot.map((Ce,fe)=>Ct.createElement("div",{className:ee.item,key:fe},Ct.createElement(de.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(rn){for(let tn in Ce==null?void 0:Ce.data)if(rn==(Ce==null?void 0:Ce.data[tn].name))return rn+" "+(Ce==null?void 0:Ce.data[tn].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}}))))))},85788:function(xn,ze,Qt){"use strict";var Ct=Qt(86204),ee=Qt.n(Ct),ue=Object.defineProperty,Se=(Ae,re,Wt)=>re in Ae?ue(Ae,re,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Ae[re]=Wt,de=(Ae,re,Wt)=>Se(Ae,typeof re!="symbol"?re+"":re,Wt),Ht=(Ae,re,Wt)=>new Promise((Ie,Xt)=>{var Ee=et=>{try{nt(Wt.next(et))}catch(At){Xt(At)}},It=et=>{try{nt(Wt.throw(et))}catch(At){Xt(At)}},nt=et=>et.done?Ie(et.value):Promise.resolve(et.value).then(Ee,It);nt((Wt=Wt.apply(Ae,re)).next())});class ie extends Ct.EventEmitter{constructor(re,Wt){super(),de(this,"url"),de(this,"body"),de(this,"fullContent",""),de(this,"controller",null),de(this,"buffer",""),this.url=re,this.body=Wt}startStream(){return Ht(this,null,function*(){this.controller=new AbortController;const{signal:re}=this.controller;try{const Wt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:re});if(!Wt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Wt.status}`);const Ie=Wt.headers.get("content-type");if(!Ie)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(Ie.includes("application/json")){const It=yield Wt.json();this.emit("error",It);return}if(!Ie.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const Xt=Wt.body.getReader(),Ee=new TextDecoder("utf-8");for(;;){const{done:It,value:nt}=yield Xt.read();if(It)break;const et=Ee.decode(nt,{stream:!0});this.buffer+=et;const At=this.buffer.split(`
`);this.buffer=At.pop()||"";for(const at of At)if(at.startsWith("data:")){const ct=at.slice(5).trim();if(ct==="[DONE]")break;try{const pt=JSON.parse(ct);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(Wt){Wt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Wt.message)}})}handleData(re){re.content&&(this.fullContent+=re.content,this.emit("data",{chunk:re,full:this.fullContent}))}cancelRequest(){var re;(re=this.controller)==null||re.abort()}}ze.Z=ie},9507:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ie}});var Ct=Qt(59301),ee={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ue=Qt(92310),Se=Qt.n(ue),de=Qt(29787),Ht=Qt(2859),ie=Qt(38986),Ae=Qt(51257),re=(Xt,Ee,It)=>new Promise((nt,et)=>{var At=pt=>{try{ct(It.next(pt))}catch(xt){et(xt)}},at=pt=>{try{ct(It.throw(pt))}catch(xt){et(xt)}},ct=pt=>pt.done?nt(pt.value):Promise.resolve(pt.value).then(At,at);ct((It=It.apply(Xt,Ee)).next())}),Ie=({data:Xt,className:Ee,fullWidth:It,style:nt={},onClose:et,onOk:At,showFullTools:at,noAssociationId:ct})=>{const pt=(0,Ct.useRef)(null),xt=(0,Ct.useRef)(null),bt=(0,Ct.useRef)(null),Rt=(0,Ct.useRef)(null),[Ot,Zt]=(0,Ct.useState)(!1),[Vt,$t]=(0,Ct.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Ct.useEffect)(()=>(bt.current||(bt.current=document.createElement("style"),document.head.appendChild(bt.current)),Xt!=null&&Xt.visible?(document.body.setAttribute("data-custom","y-hidden"),bt.current.innerHTML=" html { overflow-y: hidden; }",Xt!=null&&Xt.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)}),[Xt==null?void 0:Xt.visible]);const Ce=()=>re(void 0,null,function*(){Zt(!0),$t("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Bn=yield(0,Ae.ZJ)(Xt==null?void 0:Xt.src);pt.current.src="",pt.current.src=Bn,pt.current.onload=function(){tn()},Zt(!1),$t("")}),fe=Bn=>re(void 0,null,function*(){Zt(!0),$t("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Fn=yield(0,ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Xt.title,file:Bn.dataUrl}});Fn!=null&&Fn.id&&!ct?(yield(0,ie.ZP)(`/api/attachments/${Xt.id}/add_subitem.json`,{method:"post",body:{subitem_id:Fn==null?void 0:Fn.id,settings:JSON.stringify(Bn.state)}})).status===0&&At():Fn!=null&&Fn.id&&At(Fn),Zt(!1),$t("")}),rn=()=>{const Bn=document.querySelector('a[href="https://markerjs.com/"]');Bn&&Bn.parentNode&&(Bn.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(kn=>{const Gn=document.querySelector(kn.name);Gn&&Gn.setAttribute("title",kn.title)})},tn=()=>{xt.current=new Ht.hP(pt.current),xt.current.targetRoot=Rt.current,xt.current.addEventListener("render",fe),xt.current.addEventListener("beforeclose",et),at&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),Xt!=null&&Xt.snapshotData&&xt.current.restoreState(Xt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),rn()},300)};return Ct.createElement(Ct.Fragment,null,(Xt==null?void 0:Xt.visible)&&Ct.createElement(de.Z,{spinning:Ot,tip:Vt,style:{position:"absolute",width:"100vw"}},Ct.createElement("div",{ref:Rt,className:Se()(ee.imageDimensions,Ee,It?ee.fullWidth:""),style:nt},Ct.createElement("img",{className:ee.img,ref:pt}))))}},76562:function(xn,ze,Qt){"use strict";var Ct=Qt(59301),ee=Qt(77019),ue=Qt(5269),Se=Qt(20554),de=Qt(99571),Ht=Qt(76902),ie=Qt(99587),Ae=Qt(48136),re=Qt(59301);const Wt=(0,Ct.forwardRef)(({callback:Ie,showSaveButton:Xt,value:Ee=""},It)=>{const nt=(0,Ct.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 "}]}]}],At=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],at=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},ct=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:re.createElement(ee.Z,{className:ie.Z.lists,gutter:[10,10]},et.map((xt,bt)=>re.createElement(ue.Z,{flex:"110px",className:ie.Z.item},re.createElement("div",null,re.createElement(Ht.Z,{value:`$$${xt.value}$$`}),xt.name),re.createElement("div",{className:ie.Z.children},xt.children.map((Rt,Ot)=>re.createElement("div",{key:Ot},re.createElement("h1",null,Rt.name),re.createElement(ee.Z,{gutter:[10,10]},Rt.data.map((Zt,Vt)=>re.createElement(ue.Z,{key:Vt,onClick:()=>at(Zt),className:ie.Z.diamond},re.createElement(Ht.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:re.createElement(ee.Z,{className:ie.Z.lists,gutter:[10,10]},At.map((xt,bt)=>re.createElement(ue.Z,{flex:"110px",className:ie.Z.item},re.createElement("div",null,re.createElement(Ht.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),re.createElement("div",{className:ie.Z.children},xt.children.map((Rt,Ot)=>re.createElement("div",{key:Ot},Rt.name&&re.createElement("h1",null,Rt.name),re.createElement(ee.Z,{gutter:[10,10]},Rt.data.map((Zt,Vt)=>re.createElement(ue.Z,{key:Vt,onClick:()=>at(Zt),className:ie.Z.diamond},re.createElement(Ht.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],pt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var bt=xt.innerText;return Ie&&Ie(bt),bt};return(0,Ct.useImperativeHandle)(It,()=>({getData:pt})),re.createElement("div",{className:ie.Z.mathWrap},re.createElement(Se.default,{defaultActiveKey:"1",items:ct}),re.createElement("math-field",{locale:"zh_cn",className:ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Ee||""),Xt&&re.createElement("div",{className:ie.Z.button},re.createElement(de.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});ze.Z=Wt},28426:function(xn,ze,Qt){"use strict";var Ct=Qt(59301),ee=Qt(93314),ue=Qt(99571),Se=Object.defineProperty,de=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Wt=(It,nt,et)=>nt in It?Se(It,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):It[nt]=et,Ie=(It,nt)=>{for(var et in nt||(nt={}))Ae.call(nt,et)&&Wt(It,et,nt[et]);if(ie)for(var et of ie(nt))re.call(nt,et)&&Wt(It,et,nt[et]);return It},Xt=(It,nt)=>de(It,Ht(nt));const Ee=({img:It,buttonProps:nt={},styles:et={},customText:At,ButtonText:at,ButtonClick:ct,Buttonclass:pt,ButtonTwo:xt,imgStyles:bt,loading:Rt=!1,className:Ot=""})=>Ct.createElement("section",{className:`tc animated fadeIn ${Ot}`,style:Ie({color:"#999",margin:"100px auto",visibility:Rt?"hidden":"visible"},et)},Ct.createElement("img",{src:It||ee,style:Xt(Ie({},bt),{pointerEvents:"none",userSelect:"none"})}),Ct.createElement("p",{className:"mt20 font14"},At||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&Ct.createElement(ue.ZP,Ie({className:pt,onClick:ct},nt),at),xt&&xt);ze.Z=Ee},45677:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var Ct=Qt(59301),ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ue=Qt(99571),Se=Qt(70557),de=Qt(75975),Ht=Qt(25399),ie=Qt(51257),Ae=Qt(81722),re=Qt(28426),Wt=Qt(346),Ie=Qt(44203),Xt=Qt(59301),Ee=Object.defineProperty,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(xt,bt,Rt)=>bt in xt?Ee(xt,bt,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):xt[bt]=Rt,at=(xt,bt)=>{for(var Rt in bt||(bt={}))nt.call(bt,Rt)&&At(xt,Rt,bt[Rt]);if(It)for(var Rt of It(bt))et.call(bt,Rt)&&At(xt,Rt,bt[Rt]);return xt},ct=(xt,bt,Rt)=>new Promise((Ot,Zt)=>{var Vt=fe=>{try{Ce(Rt.next(fe))}catch(rn){Zt(rn)}},$t=fe=>{try{Ce(Rt.throw(fe))}catch(rn){Zt(rn)}},Ce=fe=>fe.done?Ot(fe.value):Promise.resolve(fe.value).then(Vt,$t);Ce((Rt=Rt.apply(xt,bt)).next())}),pt=({editOffice:xt="view",data:bt,issaver:Rt,onSaver:Ot,theme:Zt,type:Vt,filename:$t,monacoEditor:Ce,className:fe,style:rn,close:tn,onClose:Bn,hasMask:Fn,disabledDownload:kn,onImgDimensions:Gn,showNodata:ti,recordInfo:me})=>{const[oe,Cn]=(0,Ct.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[li,ai]=(0,Ct.useState)(""),[sn,Rn]=(0,Ct.useState)(),ri=window.ENV==="build"?"/react/build":"",Ui=location.host.startsWith("localhost")?Wt.Z.PROXY_SERVER:Wt.Z.API_SERVER,ei=10*(1024*1024),Fe=(0,Ct.useRef)();bt!=null&&bt.startsWith("/api")&&Vt!=="txt"&&(bt=Wt.Z.API_SERVER+bt);const ci=vt=>vt.substring(vt.lastIndexOf("/")+1).split(".").pop();$t&&Ce&&(Ce.filename=$t),(0,Ct.useEffect)(()=>{var vt,Lt;const Bt=(Lt=(vt=document.cookie)==null?void 0:vt.replace(/\s/g,""))==null?void 0:Lt.split(";");Bt==null||Bt.map(_t=>{let Le=_t.split("=");Le[0]==="_educoder_session"&&ai(Le[1])})},[]),(0,Ct.useEffect)(()=>{Vt==="office"&&(bt.indexOf("bigfilescdn.")>-1||bt.indexOf("bigfiles1")>-1?Rn({url:bt,fileType:ci(bt),model:bt.indexOf("model=edit")?"edit":"view"}):jt())},[Vt,bt]);function Ti(vt){return ct(this,null,function*(){vt.data.type==="pdfdata"&&(Ot(vt.data.data),window.removeEventListener("message",Ti,!1)),console.log("mess---:",vt.data)})}const jt=()=>ct(void 0,null,function*(){console.log("data:",bt);let vt=bt;bt.startsWith("http")||(vt=location.origin+vt);let Lt=new URL(vt).pathname.split("/").pop();const Bt=yield(0,Ae.gJ)({attachment_id:Lt});Bt.url=Ui+Bt.url,Rn(Bt)}),Mt=()=>{if(bt.startsWith("http")||bt.startsWith("blob:")){mt();return}(0,ie.Sv)($t||"educoder",bt,$t)},mt=()=>{me&&(0,Ie.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,ie.Nd)($t||"educoder",decodeURIComponent(bt))};return Xt.createElement("div",{style:at({},rn||{}),className:`${Fn&&ee.bgBlack} ${Vt?ee.wrp:"hide"}`},tn&&Xt.createElement("div",{className:ee.close,ref:Fe},!!Gn&&Xt.createElement(Ht.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Fe.current},Xt.createElement("span",{onClick:()=>{Bn(),Gn()}},Xt.createElement("i",{className:"icon-yulanpizhu"}))),!kn&&Xt.createElement(Ht.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Fe.current},Xt.createElement("span",{onClick:mt},Xt.createElement("i",{className:"icon-quxiaozhiding"}))),Rt&&Xt.createElement(Ht.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Fe.current},Xt.createElement("span",{className:"",onClick:()=>{const vt=document.getElementById("pdfiframe");window.addEventListener("message",Ti,!1),setTimeout(()=>{vt.contentWindow.postMessage("getData","*")},300)}},Xt.createElement("i",{className:"icon-baocun"}))),Xt.createElement(Ht.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Fe.current},Xt.createElement("span",{className:"",onClick:()=>{Bn()}},Xt.createElement("i",{className:"icon-guanbi1"})))),Xt.createElement("div",{className:`${ee[fe]} ${fe} ${ee.monaco} ${Vt==="txt"?"show":"hide"}`},Vt==="txt"&&Xt.createElement(Xt.Fragment,null,Xt.createElement(de.ZP,at({},Ce)))),Vt==="audio"&&Xt.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}),Vt==="video"&&Xt.createElement(Xt.Fragment,null,(bt==null?void 0:bt.indexOf("http"))>-1?Xt.createElement("video",{controls:!0,src:`${bt}`,autoPlay:!0}):Xt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${bt}`,autoPlay:!0})),Vt==="office"&&sn&&Xt.createElement("iframe",{src:`${ri}/office.html?key=${sn.key}&url=${btoa(sn.url)}&callbackUrl=${Ui+(sn.callbackUrl||"")}&fileType=${sn.fileType}&title=${sn.title||""}&model=${xt}&officeServer=${Wt.Z.ONLYOFFICE}&disabledDownload=${!!kn}`}),Vt==="html"&&Xt.createElement("iframe",{src:bt+"&disposition=inline"}),Vt==="pdf"&&Xt.createElement("iframe",{id:"pdfiframe",src:`${ri}/js/pdfview/index.html?filename=${$t||"educoder.pdf"}&url=${encodeURIComponent(bt)}&disabledDownload=${!!kn}&model=${xt}`}),Vt==="image"&&Xt.createElement("img",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${bt}`}),(Vt==="other"||Vt==="download")&&Xt.createElement(Xt.Fragment,null,ti?Xt.createElement(re.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Xt.createElement(ue.ZP,{icon:Xt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Mt,disabled:kn},"\u4E0B\u8F7D")}):Xt.createElement(ue.ZP,{type:"primary",size:"middle",onClick:Mt,disabled:kn},Xt.createElement(Se.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(xn,ze,Qt){"use strict";Qt.d(ze,{z:function(){return Zt},Z:function(){return Vt}});var Ct=Qt(59301),ee=Qt(8944),ue=Qt(81428),Se=Qt(64018),de=Qt(15360),Ht=Qt(346),ie=Qt(51257),Ae=Qt(15342),re=Qt(1012),Wt=Qt(45677),Ie=Qt(59301),Ee=({html:$t})=>{const Ce=(0,Ct.useRef)(null),fe=(0,Ct.useRef)(null),rn=`.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,Ct.useEffect)(()=>{const tn=Ce.current.attachShadow({mode:"open"});fe.current=document.createElement("div"),fe.current.className="markdown-body",fe.current.innerHTML=$t,tn.appendChild(fe.current);const Bn=document.createElement("style");return Bn.textContent=rn,tn.appendChild(Bn),()=>{tn.innerHTML=""}},[]),(0,Ct.useEffect)(()=>{fe.current&&(fe.current.innerHTML=$t)},[$t]),Ie.createElement("div",{ref:Ce})};function It($t){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"],fe=new RegExp(`\\b(${Ce.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return $t.replace(fe,"").trim()}var nt=Object.defineProperty,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ct=($t,Ce,fe)=>Ce in $t?nt($t,Ce,{enumerable:!0,configurable:!0,writable:!0,value:fe}):$t[Ce]=fe,pt=($t,Ce)=>{for(var fe in Ce||(Ce={}))At.call(Ce,fe)&&ct($t,fe,Ce[fe]);if(et)for(var fe of et(Ce))at.call(Ce,fe)&&ct($t,fe,Ce[fe]);return $t};const xt="@\u2581\u2581@",bt="@\u2581@",Rt=/<pre[^>]*>/g;function Ot($t){let Ce=document.createElement("div");return Ce.innerHTML=$t,Ce.childNodes.length===0?"":Ce.childNodes[0].nodeValue}const Zt=($t,Ce)=>{$t=$t||"";const fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,tn=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Bn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ce?$t.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(fe,(Fn,kn,Gn,ti,me,oe,Cn)=>{const li=kn||ti||oe,ai=Gn||me||Cn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+li+ai+"&t="+(0,ie.Jn)(li,Date.now())+(Fn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):($t=$t.replace(Bn,(Fn,kn,Gn,ti,me,oe,Cn)=>{const li=kn||ti||oe,ai=Gn||me||Cn||"?";return Ht.Z.API_SERVER+"/attachments/download/"+li+ai+"&t="+(0,ie.Jn)(li,Date.now())+(Fn.indexOf(")")>-1?")":"&")}).replace(fe,(Fn,kn,Gn,ti,me,oe,Cn)=>{const li=kn||ti||oe,ai=Gn||me||Cn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+li+ai+"&t="+(0,ie.Jn)(li,Date.now())+(Fn.indexOf(")")>-1?")":"&")}).replace(rn,(Fn,kn,Gn,ti,me)=>{const oe=kn||ti,Cn=Gn||me||"";return'"'+Ht.Z.API_SERVER+"/api/attachments/"+oe+Cn+oe+Cn+"&t="+(0,ie.Jn)(oe,Date.now())}).replace(tn,(Fn,kn,Gn,ti,me)=>{const oe=kn||ti,Cn=Gn||me||"";return"("+Ht.Z.API_SERVER+"/files/uploads/"+oe+Cn+oe+Cn+"&t="+(0,ie.Jn)(oe,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,`
`),$t)};var Vt=({value:$t="",className:Ce,showTextOnly:fe,showLines:rn,style:tn={},stylesPrev:Bn={},highlightKeywords:Fn,showProgramFill:kn,isProgramFill:Gn,disabledFill:ti=!1,programFillValue:me,onFillChange:oe=ai=>{},onFillBlur:Cn=()=>{},onFillFocus:li=()=>{}})=>{let ai=It(String($t||""));const[sn,Rn]=(0,Ct.useState)(""),[ri,Ui]=(0,Ct.useState)("office"),[en,ei]=(0,Ct.useState)([]),Fe=(0,Ct.useRef)("a"+(0,re.Z)()),ci={},Ti=De=>/<style[\s\S]*?>/i.test(De||""),jt=(De,Oe,nn)=>{const mn=document.createElement(De===bt?"input":"textarea");mn.style.width="100%",mn.style.height=De===bt?"40px":"151px",mn.rows=5,mn.spellcheck=!1,mn.name="edu-program-fill",mn.placeholder="\u8BF7\u8F93\u5165",mn.dataset.id=Oe;const On=Object.keys(ci).length;return ci[On]=mn,`<span class="edu-program-fill-wrap ${De===bt?"":"show"}" style="width:${De===bt?"400px":"100%"}" title=${nn||""}><span>${mn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Mt(De){return De=De.replace(/!\[.*?\]\(.*?\)/g,""),De=De.replace(/\[.*?\]\(.*?\)/g,""),De=De.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),De=De.replace(/<embed.*?>/g,""),De=De.replace(/<img.*?>/g,""),De=De.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),De=De.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),De=De.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),De=De.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),De}const mt=De=>!fe&&Ti(ai)?De:De.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Oe,nn){let mn=nn.replace(/(\n|\r)/g,"").split("}"),On=[];return mn.map(yn=>{yn!=""&&On.push(`.${Fe.current} ${yn}`)}),`<style>${On.join("}")}</style>`}),vt=(0,Ct.useMemo)(()=>{try{const mn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,On=/\"\/api\/attachments\/|\"\/attachments\/download\//g,yn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ui=/\(\/attachments\/download\//g;ai=ai.replace(ui,"("+Ht.Z.API_SERVER+"/attachments/download/").replace(mn,"("+Ht.Z.API_SERVER+"/api/attachments/").replace(On,'"'+Ht.Z.API_SERVER+"/api/attachments/").replace(yn,'"'+Ht.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(mn){}if(kn){let mn=-1;return ai=ai.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(On,yn,ui){var oi;return++mn,jt(On,mn,(oi=me==null?void 0:me[mn])==null?void 0:oi.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${mt(ai||"")}</pre>`}let De=mt(ai);De=(0,ue.ZP)(De);const Oe=(0,ue.ez)();ai.match(/\[TOC\]/)&&(De=De.replace("<p>[TOC]</p>",(0,ue.Qv)()),(0,ue.Iy)()),De=De.replace(/(__special_katext_id_\d+__)/g,(mn,On)=>{const{type:yn,expression:ui}=Oe[On];return(0,Ae.renderToString)(Ot(ui)||"",{displayMode:yn==="block",throwOnError:!1,output:"html"})}),De=De.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ue.AL)();const nn=document.createElement("div");if(nn.innerHTML=De,fe)return nn.innerText;if(Fn){const mn=Fn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Le(nn,mn),nn.innerHTML}return setTimeout(()=>Me(),500),nn.innerHTML},[ai,Fn]);(0,Ct.useEffect)(()=>{xe.current&&xe.current.querySelectorAll(["input","textarea"]).forEach(Oe=>{Oe.oninput=Lt,Oe.onblur=Bt,Oe.onfocus=_t})},[en]),(0,Ct.useEffect)(()=>{var De,Oe,nn,mn,On;if(me!=null&&me.length)try{const yn=xe.current.querySelectorAll(".edu-program-fill-score"),ui=xe.current.querySelectorAll('[name="edu-program-fill"]');for(const[oi,gi]of ui.entries())gi.value=((De=me==null?void 0:me[oi])==null?void 0:De.value)||"",((Oe=me==null?void 0:me[oi])==null?void 0:Oe.type)==="warning"?gi.className="program-fill-warning":((nn=me==null?void 0:me[oi])==null?void 0:nn.type)==="success"?gi.className="program-fill-success":gi.className="";for(const[oi,gi]of yn.entries())gi.innerHTML=(mn=me==null?void 0:me[oi])!=null&&mn.score?`${(On=me==null?void 0:me[oi])==null?void 0:On.score}\u5206`:"";ei(me)}catch(yn){console.log(yn,"error")}},[me]);const Lt=De=>{en[De.target.dataset.id]=en[De.target.dataset.id]||{},en[De.target.dataset.id].value=De.target.value,ei([...en]),oe(en,De.target.dataset.id)},Bt=De=>{en[De.target.dataset.id]=en[De.target.dataset.id]||{},en[De.target.dataset.id].value=De.target.value,ei([...en]),Cn(en,De.target.dataset.id)},_t=De=>{en[De.target.dataset.id]=en[De.target.dataset.id]||{},en[De.target.dataset.id].value=De.target.value,ei([...en]),li(en,De.target.dataset.id)};function Le(De,Oe){return De.childNodes.forEach(nn=>{var mn;if(nn.childNodes.length>0)Le(nn,Oe);else if(nn.nodeName!=="IMG")if(nn.innerHTML)nn.innerHTML=(mn=nn.innerHTML)==null?void 0:mn.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const On=document.createElement("span");On.innerHTML=nn.textContent.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),nn.replaceWith(On)}})}const xe=(0,Ct.useRef)();ue.jb.WebkitLineClamp=rn,rn&&(tn=pt(pt({},tn),ue.jb));function Xe(De){let Oe=De.target;if(Oe.tagName.toUpperCase()==="A"){let nn=Oe.getAttribute("href");if(nn.indexOf("office")>-1)De.preventDefault(),Rn(nn),Ui("office");else if(nn.indexOf("application/pdf")>-1)De.preventDefault(),Rn(nn),Ui("pdf");else if(nn.indexOf("text/html")>-1)De.preventDefault(),Rn(nn),Ui("html");else if(nn.startsWith("#")){De.preventDefault();let mn=document.getElementById(nn.replace("#",""));mn&&mn.scrollIntoView(!0)}}}const Me=()=>{var De;const Oe=(De=xe.current)==null?void 0:De.querySelectorAll("video");Oe==null||Oe.forEach(nn=>{if(nn.oncontextmenu=()=>!1,nn.src.indexOf(".m3u8")>-1&&!nn.canPlayType("application/vnd.apple.mpegurl")){if(de.ZP.isSupported()){var mn=new de.ZP;mn.loadSource(nn.src),mn.attachMedia(nn)}}})};return(0,Ct.useEffect)(()=>{if(xe.current&&vt&&vt.match(Rt)&&window.PR.prettyPrint(),xe.current)return xe.current.addEventListener("click",Xe),()=>{var De;(De=xe.current)==null||De.removeEventListener("click",Xe),(0,ue.AL)(),(0,ue.Iy)()}},[vt,xe.current,Xe]),(0,Ct.useEffect)(()=>{var De;const Oe=nn=>{nn.preventDefault(),nn.clipboardData.setData("text",window.getSelection().toString())};return(De=xe.current)==null||De.addEventListener("copy",Oe),()=>{var nn;(nn=xe.current)==null||nn.removeEventListener("copy",Oe)}},[xe.current]),Ct.createElement(Ct.Fragment,null,fe&&Ct.createElement("div",{ref:xe},vt),!fe&&!Ti(vt)&&Ct.createElement("div",{ref:xe,style:pt({},tn),className:`${Ce||""} ${ti?"disabled-fill":""} markdown-body ${Fe.current}`,dangerouslySetInnerHTML:{__html:vt}}),!fe&&Ti(vt)&&Ct.createElement(Ee,{html:vt}),Ct.createElement(Wt.Z,{close:!0,data:sn,type:sn!=null&&sn.length?ri:"",style:pt({},Bn),onClose:()=>Rn("")}))}},6701:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return rn}});var Ct=Qt(59301),ee=Qt(25690),ue=Qt(62957),Se=Qt(28284),de=Qt(6767),Ht=Qt(29787),ie=Qt(18287),Ae=Qt(77019),re=Qt(5269),Wt=Qt(25399),Ie=Qt(37568),Xt={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},Ee=Qt(45937),It=Qt(86245),nt=Qt(28426),et=Qt(9148),At=Object.defineProperty,at=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Rt=(tn,Bn,Fn)=>Bn in tn?At(tn,Bn,{enumerable:!0,configurable:!0,writable:!0,value:Fn}):tn[Bn]=Fn,Ot=(tn,Bn)=>{for(var Fn in Bn||(Bn={}))xt.call(Bn,Fn)&&Rt(tn,Fn,Bn[Fn]);if(pt)for(var Fn of pt(Bn))bt.call(Bn,Fn)&&Rt(tn,Fn,Bn[Fn]);return tn},Zt=(tn,Bn)=>at(tn,ct(Bn)),Vt=(tn,Bn)=>{var Fn={};for(var kn in tn)xt.call(tn,kn)&&Bn.indexOf(kn)<0&&(Fn[kn]=tn[kn]);if(tn!=null&&pt)for(var kn of pt(tn))Bn.indexOf(kn)<0&&bt.call(tn,kn)&&(Fn[kn]=tn[kn]);return Fn},$t=(tn,Bn,Fn)=>new Promise((kn,Gn)=>{var ti=Cn=>{try{oe(Fn.next(Cn))}catch(li){Gn(li)}},me=Cn=>{try{oe(Fn.throw(Cn))}catch(li){Gn(li)}},oe=Cn=>Cn.done?kn(Cn.value):Promise.resolve(Cn.value).then(ti,me);oe((Fn=Fn.apply(tn,Bn)).next())});const Ce=(tn=[])=>tn==null?void 0:tn.map(Bn=>Zt(Ot({},Bn),{title:(Bn==null?void 0:Bn.value)||"",key:Bn==null?void 0:Bn.id,isLeaf:!0})),fe=tn=>{var Bn=tn,{user:Fn,children:kn,isShowComponent:Gn=!0,ModalProps:ti={},onDataSelect:me}=Bn,oe=Vt(Bn,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[Cn,li]=ue.default.useModal(),[ai]=Se.default.useForm(),[sn,Rn]=(0,Ct.useState)([]),[ri,Ui]=(0,Ct.useState)(!1),[en,ei]=(0,Ct.useState)(!1),[,Fe,ci,Ti]=(0,Ee.U)(It.qE,{page:1,limit:9999}),[,,jt]=(0,Ee.U)(It.V8,{}),[,,Mt]=(0,Ee.U)(It.B$,{}),[,,mt]=(0,Ee.U)(It.DH,{}),[,,vt]=(0,Ee.U)(It.bJ,{}),Lt=()=>{Ui(!1),ai.resetFields(),ei(!1)},Bt=Le=>$t(void 0,null,function*(){const{node:xe,dragNode:Xe,event:Me}=Le,De=Le.node.pos.split("-"),Oe=Le.dropPosition-Number(De[De.length-1]);if(Oe==0){de.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Oe==1&&(Xe==null?void 0:Xe.item_index)==(xe==null?void 0:xe.item_index)+1){de.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const nn=yield vt({id:Xe==null?void 0:Xe.key,position:Oe==-1?1:(Xe==null?void 0:Xe.item_index)>(xe==null?void 0:xe.item_index)?(xe==null?void 0:xe.item_index)+1:xe==null?void 0:xe.item_index});(nn==null?void 0:nn.status)===0&&(de.ZP.success("\u79FB\u52A8\u6210\u529F"),ci({},!0))}),_t=Le=>$t(void 0,null,function*(){let xe={};en?xe=yield Mt(Ot({},Le)):xe=yield mt(Ot({},Le)),(xe==null?void 0:xe.status)==0&&(de.ZP.success((xe==null?void 0:xe.message)||(en?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),ci({},!0),Lt())});return(0,Ct.useEffect)(()=>{ti!=null&&ti.open&&ci({},!0)},[ti==null?void 0:ti.open]),(0,Ct.useEffect)(()=>{var Le;Rn(Ce((Le=Ti==null?void 0:Ti.data)==null?void 0:Le.list))},[Ti]),Gn?Ct.createElement(Ct.Fragment,null,li,kn,Ct.createElement(ue.default,Ot({},Ot({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},ti)),Ct.createElement(Ht.Z,{spinning:Fe},(sn==null?void 0:sn.length)>0?Ct.createElement(Ct.Fragment,null,Ct.createElement(ie.default.DirectoryTree,{height:500,className:Xt.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:me,treeData:sn,onDrop:Bt,titleRender:Le=>Ct.createElement(Ct.Fragment,null,Ct.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},Le==null?void 0:Le.title),Ct.createElement("div",{className:`${Xt.EditDom}`},Ct.createElement(Ae.Z,{wrap:!1,align:"middle",gutter:16},Ct.createElement(re.Z,null,Ct.createElement(Wt.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},Ct.createElement("i",{className:`iconfont icon-tuodong1 font12 ${Xt.currentPrimary}`}))),Ct.createElement(re.Z,null,Ct.createElement(Wt.Z,{title:"\u7F16\u8F91"},Ct.createElement("i",{className:`iconfont icon-bianji11 font12 ${Xt.currentPrimary}`,onClick:xe=>{xe.stopPropagation(),ai.setFieldsValue(Ot({},Le)),Ui(!0)}}))),Ct.createElement(re.Z,null,Ct.createElement(Wt.Z,{title:"\u5220\u9664"},Ct.createElement("i",{className:`iconfont icon-shanchu14 font12 ${Xt.currentDelete}`,onClick:xe=>{xe.stopPropagation(),Cn.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:()=>$t(void 0,null,function*(){const Xe=yield jt({id:Le==null?void 0:Le.key});(Xe==null?void 0:Xe.status)==0&&(de.ZP.success((Xe==null?void 0:Xe.message)||"\u5220\u9664\u6210\u529F"),ci({},!0))})})}}))))))}),Ct.createElement(et.op,{className:"ml20 mt20",icon:Ct.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{ei(!0),Ui(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):Ct.createElement(nt.Z,{styles:{margin:"30px auto"},customText:Ct.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",Ct.createElement("a",{onClick:()=>{ei(!0),Ui(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),Ct.createElement(ue.default,{title:en?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:ri,okText:en?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{Lt()},onOk:()=>{ai.submit()}},Ct.createElement(Se.default,{form:ai,onFinish:_t},en&&Ct.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"),Ct.createElement(Se.default.Item,{hidden:!0,name:"id"}),Ct.createElement(Se.default.Item,{className:"mt10",name:"value"},Ct.createElement(Ie.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 rn=(0,ee.connect)(({loading:tn,user:Bn})=>({user:Bn,loading:tn.effects}))(fe)},69720:function(xn,ze,Qt){"use strict";Qt.d(ze,{h:function(){return xt}});var Ct=Qt(59301),ee=Qt(82326),ue=Qt(28284),Se=Qt(99571),de=Qt(89780),Ht=Qt.n(de),ie=Qt(8336),Ae=Qt(12469),re=Object.defineProperty,Wt=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(bt,Rt,Ot)=>Rt in bt?re(bt,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):bt[Rt]=Ot,et=(bt,Rt)=>{for(var Ot in Rt||(Rt={}))Ee.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);if(Xt)for(var Ot of Xt(Rt))It.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);return bt},At=(bt,Rt)=>Wt(bt,Ie(Rt));const at=ee.default.Option,ct={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:Rt})=>{const[Ot,Zt]=(0,Ct.useState)("python");function Vt(Ce){Zt(pt[Ce][1])}function $t(Ce){bt(Ce)}return Ct.createElement(ue.default,At(et({},ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$t,style:{width:500}}),Ct.createElement(ue.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Ct.createElement(ee.default,{getPopupContainer:Ce=>Ce.parentNode,onChange:Vt},Object.keys(pt).map(Ce=>Ct.createElement(at,{key:Ce,value:Ce},pt[Ce][0])))),Ct.createElement(ue.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Ct.createElement(xt,{mode:Ot})),Ct.createElement("div",{className:"flex-container flex-end"},Ct.createElement(Se.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ct.createElement(Se.ZP,{type:"ghost",onClick:Rt},"\u53D6\u6D88")))};function xt({value:bt,onChange:Rt,mode:Ot,options:Zt={}}){const Vt=(0,Ct.useRef)(),[$t,Ce]=(0,Ct.useState)();return(0,Ct.useEffect)(()=>{if($t){let fe=function(rn){const tn=rn.getValue();Rt&&Rt(tn)};return $t.on("change",fe),()=>{$t.off("change",fe)}}},[$t,Rt]),(0,Ct.useEffect)(()=>{$t&&$t.setOption("mode",Ot)},[$t,Ot]),(0,Ct.useEffect)(()=>{$t&&(bt!==$t.getValue()||bt==="")&&setTimeout(()=>{$t.setValue(bt||"")},300)},[$t,bt]),(0,Ct.useEffect)(()=>{if(Vt.current&&!$t){const fe=Ht().fromTextArea(Vt.current,et({mode:Ot,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));Ce(fe)}},[Vt.current,$t]),Ct.createElement("div",{className:"my-codemirror-container"},Ct.createElement("textarea",{ref:Vt}))}},39793:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Tr}});var Ct=Qt(59301),ee=Qt(89780),ue=Qt.n(ee),Se=Qt(76374),de=Qt(8336),Ht=Qt(6313),ie=Qt(25717),Ae=Qt(99498),re=Qt(25419),Wt=Qt(67549),Ie=Qt(76902),Xt=({value:je="",className:Je,showTextOnly:Ke,showLines:Ci,style:Ne={}})=>{const Qi=(0,Ct.useMemo)(()=>"",[je]);return Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{dangerouslySetInnerHTML:{__html:Qi}}))},Ee=Qt(59301),It=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,pt=(je,Je,Ke)=>Je in je?It(je,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):je[Je]=Ke,xt=(je,Je)=>{for(var Ke in Je||(Je={}))at.call(Je,Ke)&&pt(je,Ke,Je[Ke]);if(At)for(var Ke of At(Je))ct.call(Je,Ke)&&pt(je,Ke,Je[Ke]);return je},bt=(je,Je)=>nt(je,et(Je));let Rt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ot({onActionCallback:je,title:Je,icon:Ke,actionName:Ci,className:Ne="",children:Qi}){function Hn(){je(Ci)}return Ee.createElement("a",{title:Je,className:Ne,onClick:Hn},Ee.createElement("i",{className:`${Ke}`}),Qi)}var Zt=({watch:je,showNullButton:Je,showNullProgramButton:Ke,onActionCallback:Ci,fullScreen:Ne,insertTemp:Qi,hidetoolBar:Hn,extraUse:fi})=>{const $i=[...Rt,{title:`${je?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${je?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Ee.createElement("ul",{className:"markdown-toolbar-container"},!Hn&&$i.map((Mr,Br)=>Ee.createElement("li",{key:Br},Mr.actionName?Ee.createElement(Ot,bt(xt({},Mr),{onActionCallback:Ci})):Ee.createElement("span",{className:"v-line"}))),Je?Ee.createElement("li",null,Ee.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ci},Ee.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ke?Ee.createElement(Ee.Fragment,null,Ee.createElement("li",null,Ee.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ci},Ee.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Ee.createElement("li",null,Ee.createElement(Ot,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ci},Ee.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Qi&&Ee.createElement("li",null,Ee.createElement(Ot,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Qi}`,onActionCallback:Ci},Ee.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),fi&&Ee.createElement("li",null,fi),Ee.createElement("li",{className:"btn-full-screen"},Ee.createElement(Ot,{icon:`${Ne?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ne?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ci})))},Vt=Qt(91558),$t=Qt(28284),Ce=Qt(37568),fe=Qt(99571),rn=Object.defineProperty,tn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,ti=(je,Je,Ke)=>Je in je?rn(je,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):je[Je]=Ke,me=(je,Je)=>{for(var Ke in Je||(Je={}))kn.call(Je,Ke)&&ti(je,Ke,Je[Ke]);if(Fn)for(var Ke of Fn(Je))Gn.call(Je,Ke)&&ti(je,Ke,Je[Ke]);return je},oe=(je,Je)=>tn(je,Bn(Je));const Cn={labelCol:{span:4},wrapperCol:{span:20}};var li=({callback:je,onCancel:Je})=>{function Ke(Ci){je(Ci)}return Ct.createElement($t.default,oe(me({},Cn),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ke,style:{width:500}}),Ct.createElement($t.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Ct.createElement(Ce.default,null)),Ct.createElement($t.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Ct.createElement(Ce.default,null)),Ct.createElement("div",{className:"flex-container flex-end"},Ct.createElement(fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ct.createElement(fe.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},ai=Qt(69720),sn=Qt(17077),Rn=Qt(62957),ri=Qt(77019),Ui=Qt(9507),en=Qt(59301),ei=({callback:je,onCancel:Je})=>{const Ke=document.createElement("canvas"),Ci=Ke.getContext("2d");Ke.width=1e3,Ke.height=800,Ci.fillStyle="#ffffff",Ci.fillRect(0,0,Ke.width,Ke.height);const Ne=Ke.toDataURL("image/png");return en.createElement(Rn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},en.createElement(ri.Z,{style:{height:"100vh"}},en.createElement(Ui.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ne,visible:!0,title:String(Date.now())},onOk:Qi=>{je({src:Qi.url})},onClose:Je})))},Fe=Qt(12378);function ci(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ci,go.CommandHandler),ci.prototype.canAlignSelection=function(){var je=this.diagram;return!(je===null||je.isReadOnly||je.isModelReadOnly||je.selection.count<2)},ci.prototype.alignLeft=function(){var je=this.diagram;je.startTransaction("aligning left");var Je=1/0;je.selection.each(function(Ke){Ke instanceof go.Link||(Je=Math.min(Ke.position.x,Je))}),je.selection.each(function(Ke){Ke instanceof go.Link||Ke.move(new go.Point(Je,Ke.position.y))}),je.commitTransaction("aligning left")},ci.prototype.alignRight=function(){var je=this.diagram;je.startTransaction("aligning right");var Je=-1/0;je.selection.each(function(Ke){if(!(Ke instanceof go.Link)){var Ci=Ke.actualBounds.x+Ke.actualBounds.width;Je=Math.max(Ci,Je)}}),je.selection.each(function(Ke){Ke instanceof go.Link||Ke.move(new go.Point(Je-Ke.actualBounds.width,Ke.position.y))}),je.commitTransaction("aligning right")},ci.prototype.alignTop=function(){var je=this.diagram;je.startTransaction("alignTop");var Je=1/0;je.selection.each(function(Ke){Ke instanceof go.Link||(Je=Math.min(Ke.position.y,Je))}),je.selection.each(function(Ke){Ke instanceof go.Link||Ke.move(new go.Point(Ke.position.x,Je))}),je.commitTransaction("alignTop")},ci.prototype.alignBottom=function(){var je=this.diagram;je.startTransaction("aligning bottom");var Je=-1/0;je.selection.each(function(Ke){if(!(Ke instanceof go.Link)){var Ci=Ke.actualBounds.y+Ke.actualBounds.height;Je=Math.max(Ci,Je)}}),je.selection.each(function(Ke){Ke instanceof go.Link||Ke.move(new go.Point(Ke.actualBounds.x,Je-Ke.actualBounds.height))}),je.commitTransaction("aligning bottom")},ci.prototype.alignCenterX=function(){var je=this.diagram,Je=je.selection.first();if(Je){je.startTransaction("aligning Center X");var Ke=Je.actualBounds.x+Je.actualBounds.width/2;je.selection.each(function(Ci){Ci instanceof go.Link||Ci.move(new go.Point(Ke-Ci.actualBounds.width/2,Ci.actualBounds.y))}),je.commitTransaction("aligning Center X")}},ci.prototype.alignCenterY=function(){var je=this.diagram,Je=je.selection.first();if(Je){je.startTransaction("aligning Center Y");var Ke=Je.actualBounds.y+Je.actualBounds.height/2;je.selection.each(function(Ci){Ci instanceof go.Link||Ci.move(new go.Point(Ci.actualBounds.x,Ke-Ci.actualBounds.height/2))}),je.commitTransaction("aligning Center Y")}},ci.prototype.alignColumn=function(je){var Je=this.diagram;Je.startTransaction("align Column"),je===void 0&&(je=0),je=parseFloat(je);var Ke=new Array;Je.selection.each(function(fi){fi instanceof go.Link||Ke.push(fi)});for(var Ci=0;Ci<Ke.length-1;Ci++){var Ne=Ke[Ci],Qi=Ne.actualBounds.y+Ne.actualBounds.height+je,Hn=Ke[Ci+1];Hn.move(new go.Point(Ne.actualBounds.x,Qi))}Je.commitTransaction("align Column")},ci.prototype.alignRow=function(je){je===void 0&&(je=0),je=parseFloat(je);var Je=this.diagram;Je.startTransaction("align Row");var Ke=new Array;Je.selection.each(function(fi){fi instanceof go.Link||Ke.push(fi)});for(var Ci=0;Ci<Ke.length-1;Ci++){var Ne=Ke[Ci],Qi=Ne.actualBounds.x+Ne.actualBounds.width+je,Hn=Ke[Ci+1];Hn.move(new go.Point(Qi,Ne.actualBounds.y))}Je.commitTransaction("align Row")},ci.prototype.canRotate=function(je){var Je=this.diagram;return!(Je===null||Je.isReadOnly||Je.isModelReadOnly||Je.selection.count<1)},ci.prototype.rotate=function(je){je===void 0&&(je=90);var Je=this.diagram;Je.startTransaction("rotate "+je.toString());var Je=this.diagram;Je.selection.each(function(Ke){Ke instanceof go.Link||Ke instanceof go.Group||(Ke.angle+=je)}),Je.commitTransaction("rotate "+je.toString())},ci.prototype.pullToFront=function(){var je=this.diagram;je.startTransaction("pullToFront");var Je=new go.Map;je.selection.each(function(Ke){Je.set(Ke.layer,0)}),Je.iteratorKeys.each(function(Ke){var Ci=0;Ke.parts.each(function(Ne){if(!Ne.isSelected){var Qi=Ne.zOrder;isNaN(Qi)?Ne.zOrder=0:Ci=Math.max(Ci,Qi)}}),Je.set(Ke,Ci)}),je.selection.each(function(Ke){ci._assignZOrder(Ke,Je.get(Ke.layer)+1)}),je.commitTransaction("pullToFront")},ci.prototype.pushToBack=function(){var je=this.diagram;je.startTransaction("pushToBack");var Je=new go.Map;je.selection.each(function(Ke){Je.set(Ke.layer,0)}),Je.iteratorKeys.each(function(Ke){var Ci=0;Ke.parts.each(function(Ne){if(!Ne.isSelected){var Qi=Ne.zOrder;isNaN(Qi)?Ne.zOrder=0:Ci=Math.min(Ci,Qi)}}),Je.set(Ke,Ci)}),je.selection.each(function(Ke){ci._assignZOrder(Ke,Je.get(Ke.layer)-1-ci._findGroupDepth(Ke))}),je.commitTransaction("pushToBack")},ci._assignZOrder=function(je,Je,Ke){Ke===void 0&&(Ke=je),je.layer===Ke.layer&&(je.zOrder=Je),je instanceof go.Group&&je.memberParts.each(function(Ci){ci._assignZOrder(Ci,Je+1,Ke)})},ci._findGroupDepth=function(je){if(je instanceof go.Group){var Je=0;return je.memberParts.each(function(Ke){Je=Math.max(Je,ci._findGroupDepth(Ke))}),Je+1}else return 0},ci.prototype.doKeyDown=function(){var je=this.diagram;if(je!==null){var Je=je.lastInput;if(Je.key==="Up"||Je.key==="Down"||Je.key==="Left"||Je.key==="Right"){var Ke=this.arrowKeyBehavior;if(Ke==="none")return;if(Ke==="select"){this._arrowKeySelect();return}else if(Ke==="move"){this._arrowKeyMove();return}else if(Ke==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},ci.prototype._getAllParts=function(){var je=new Array;return this.diagram.nodes.each(function(Je){je.push(Je)}),this.diagram.parts.each(function(Je){je.push(Je)}),je},ci.prototype._arrowKeyMove=function(){var je=this.diagram,Je=je.lastInput,Ke=0,Ci=0;if(Je.control||Je.meta)Ke=1,Ci=1;else if(je.grid!==null){var Ne=je.grid.gridCellSize;Ci=Ne.width,Ke=Ne.height}je.startTransaction("arrowKeyMove"),je.selection.each(function(Qi){Je.key==="Up"?Qi.move(new go.Point(Qi.actualBounds.x,Qi.actualBounds.y-Ke)):Je.key==="Down"?Qi.move(new go.Point(Qi.actualBounds.x,Qi.actualBounds.y+Ke)):Je.key==="Left"?Qi.move(new go.Point(Qi.actualBounds.x-Ci,Qi.actualBounds.y)):Je.key==="Right"&&Qi.move(new go.Point(Qi.actualBounds.x+Ci,Qi.actualBounds.y))}),je.commitTransaction("arrowKeyMove")},ci.prototype._arrowKeySelect=function(){var je=this.diagram,Je=je.lastInput,Ke=null;Je.key==="Up"?Ke=this._findNearestPartTowards(270):Je.key==="Down"?Ke=this._findNearestPartTowards(90):Je.key==="Left"?Ke=this._findNearestPartTowards(180):Je.key==="Right"&&(Ke=this._findNearestPartTowards(0)),Ke!==null&&(Je.shift?Ke.isSelected=!0:Je.control||Je.meta?Ke.isSelected=!Ke.isSelected:je.select(Ke))},ci.prototype._findNearestPartTowards=function(je){var Je=this.diagram.selection.first();if(Je===null)return null;for(var Ke=Je.actualBounds.center,Ci=this._getAllParts(),Ne=1/0,Qi=Je,Hn=0;Hn<Ci.length;Hn++){var fi=Ci[Hn];if(fi!==Je&&fi.canSelect()){var $i=fi.actualBounds.center,Mr=Ke.directionPoint($i),Br=this._angleCloseness(Mr,je);if(Br<=45){var te=Ke.distanceSquaredPoint($i);te*=1+Math.sin(Br*Math.PI/180),te<Ne&&(Ne=te,Qi=fi)}}}return Qi},ci.prototype._angleCloseness=function(je,Je){return Math.min(Math.abs(Je-je),Math.min(Math.abs(Je+360-je),Math.abs(Je-360-je)))},ci.prototype._arrowKeyTree=function(){var je=this.diagram,Je=je.selection.first();if(Je instanceof go.Node){var Ke=je.lastInput;if(Ke.key==="Right"){if(!Je.isTreeLeaf)if(!Je.isTreeExpanded)je.commandHandler.canExpandTree(Je)&&je.commandHandler.expandTree(Je);else{var Ci=this._sortTreeChildrenByY(Je).first();Ci!==null&&je.select(Ci)}}else if(Ke.key==="Left")if(!Je.isTreeLeaf&&Je.isTreeExpanded)je.commandHandler.canCollapseTree(Je)&&je.commandHandler.collapseTree(Je);else{var Ne=Je.findTreeParentNode();Ne!==null&&je.select(Ne)}else if(Ke.key==="Up"){var Ne=Je.findTreeParentNode();if(Ne!==null){var Qi=this._sortTreeChildrenByY(Ne),Hn=Qi.indexOf(Je);if(Hn>0){for(var fi=Qi.elt(Hn-1);fi!==null&&fi.isTreeExpanded&&!fi.isTreeLeaf;){var $i=this._sortTreeChildrenByY(fi);fi=$i.last()}fi!==null&&je.select(fi)}else je.select(Ne)}}else if(Ke.key==="Down")if(Je.isTreeExpanded&&!Je.isTreeLeaf){var Ci=this._sortTreeChildrenByY(Je).first();Ci!==null&&je.select(Ci)}else for(;Je!==null;){var Ne=Je.findTreeParentNode();if(Ne===null)break;var Qi=this._sortTreeChildrenByY(Ne),Hn=Qi.indexOf(Je);if(Hn<Qi.length-1){je.select(Qi.elt(Hn+1));break}else Je=Ne}var Mr=je.selection.first();Mr!==null&&je.scrollToRect(Mr.actualBounds)}},ci.prototype._sortTreeChildrenByY=function(je){var Je=new go.List().addAll(je.findTreeChildrenNodes());return Je.sort(function(Ke,Ci){var Ne=Ke.location,Qi=Ci.location;return Ne.y<Qi.y?-1:Ne.y>Qi.y?1:Ne.x<Qi.x?-1:Ne.x>Qi.x?1:0}),Je},ci.prototype.copyToClipboard=function(je){go.CommandHandler.prototype.copyToClipboard.call(this,je),this._lastPasteOffset.set(this.pasteOffset)},ci.prototype.pasteFromClipboard=function(){var je=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(je,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),je},Object.defineProperty(ci.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(je){if(je!=="move"&&je!=="select"&&je!=="scroll"&&je!=="tree"&&je!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+je);this._arrowKeyBehavior=je}}),Object.defineProperty(ci.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(je){if(!(je instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+je);this._pasteOffset.set(je)}});var Ti=ci,jt=Qt(63720),Mt=Qt(5269),mt=Qt(38986),vt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Lt=Qt(48790),Bt=Qt(59301),_t=(je,Je,Ke)=>new Promise((Ci,Ne)=>{var Qi=$i=>{try{fi(Ke.next($i))}catch(Mr){Ne(Mr)}},Hn=$i=>{try{fi(Ke.throw($i))}catch(Mr){Ne(Mr)}},fi=$i=>$i.done?Ci($i.value):Promise.resolve($i.value).then(Qi,Hn);fi((Ke=Ke.apply(je,Je)).next())});function Le({onCancel:je,callback:Je}){let Ke=(0,Ct.useRef)(),Ci=(0,Ct.useRef)(),Ne=(0,Ct.useRef)(),Qi=(0,Ct.useRef)(!1);const Hn=(0,Ct.useRef)(!1),[fi,$i]=(0,Ct.useState)(0);function Mr(){const te=Fe.bx.make,ke={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"};Ke.current=new Fe.S0(Ci.current,{padding:20,grid:te(Fe.s_,"Grid",te(Fe.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),te(Fe.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Wn=>{var Si=Wn.diagram.commandHandler.addTopLevelParts(Wn.diagram.selection,!0);Si||Wn.diagram.currentTool.doCancel()},commandHandler:te(Ti),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Wn=>{var Si=Wn.subject;Si.location=Si.location.copy().snapToGridPoint(Wn.diagram.grid.gridOrigin,Wn.diagram.grid.gridCellSize),setTimeout(()=>{Wn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Wn=>{var Si=Wn.subject;setTimeout(()=>{Wn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Wn=>{var Si=Wn.parameter.part;Si.invalidateConnectedLinks();var vi=Wn.subject;Wn.diagram.toolManager.linkingTool.isForwards?vi.toNode.invalidateConnectedLinks():vi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ke.current.nodeTemplate=te(Fe.NB,"Auto",{locationSpot:Fe.z6.Center,locationObjectName:"SHAPE",desiredSize:new Fe.$u(120,60),minSize:new Fe.$u(40,40),resizable:!0,resizeCellSize:new Fe.$u(10,10),rotatable:!0},new Fe.KX("location","loc",Fe.E9.parse).makeTwoWay(Fe.E9.stringify),new Fe.KX("desiredSize","size",Fe.$u.parse).makeTwoWay(Fe.$u.stringify),te(Fe.bn,{name:"SHAPE",fill:ke.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Fe.z6.AllSides,toSpot:Fe.z6.AllSides},new Fe.KX("figure"),new Fe.KX("fill"),new Fe.KX("stroke","borderColor"),new Fe.KX("strokeWidth","thickness"),new Fe.KX("strokeDashArray","dash")),te(Fe.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),te(Fe.al,{margin:1,textAlign:"center",overflow:Fe.al.OverflowEllipsis,editable:!0},new Fe.KX("text").makeTwoWay(),new Fe.KX("stroke","color"))),Ke.current.nodeTemplate.toolTip=te("ToolTip",te(Fe.s_,"Vertical",{maxSize:new Fe.$u(200,NaN)},te(Fe.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Fe.KX("text")),te(Fe.al,{font:"10pt sans-serif",textAlign:"center"},new Fe.KX("text","details"))));function zn(Wn,Si){var vi=(mi,Ii)=>{mi.handled=!0,mi.diagram.model.commit(Wi=>{var Ar=Ii.part.adornedPart,ae=new Fe.E9().setRectSpot(Ar.actualBounds,Wn);ae.subtract(Ar.location),ae.scale(2,2),ae.x+=Math.sign(ae.x)*130,ae.y+=Math.sign(ae.y)*130,ae.add(Ar.location),ae.snapToGridPoint(mi.diagram.grid.gridOrigin,mi.diagram.grid.gridCellSize);var ce=Wi.copyNodeData(Ar.data);Wi.setGroupKeyForNodeData(ce,Wi.getGroupKeyForNodeData(Ar.data)),Wi.addNodeData(ce);var ne={from:Ar.key,to:Wi.getKeyForNodeData(ce)};Wi.addLinkData(ne);var Ge=mi.diagram.findNodeForData(ce);Ge.location=ae,mi.diagram.select(Ge),setTimeout(()=>{mi.diagram.commandHandler.editTextBlock()},20)})};return te(Fe.bn,{figure:Si,alignment:Wn,alignmentFocus:Wn.opposite(),width:Wn.equals(Fe.z6.Top)||Wn.equals(Fe.z6.Bottom)?25:18,height:Wn.equals(Fe.z6.Top)||Wn.equals(Fe.z6.Bottom)?18:25,fill:"orange",stroke:ke.white,strokeWidth:4,mouseEnter:(mi,Ii)=>Ii.fill="dodgerblue",mouseLeave:(mi,Ii)=>Ii.fill="orange",isActionable:!0,click:vi,contextClick:vi})}function ni(Wn){return te(Fe.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:(Si,vi)=>vi.fill="dodgerblue",mouseLeave:(Si,vi)=>vi.fill="orange",click:(Si,vi)=>{Si.diagram.commandHandler.showContextMenu(vi.part.adornedPart)}},Wn||{})}Ke.current.nodeTemplate.selectionAdornmentTemplate=te(Fe.uz,"Spot",te(Fe.Vm,{padding:10}),zn(Fe.z6.Top,"TriangleUp"),zn(Fe.z6.Left,"TriangleLeft"),zn(Fe.z6.Right,"TriangleRight"),zn(Fe.z6.Bottom,"TriangleDown"),ni({alignment:new Fe.z6(.75,0)}));function Ye(Wn,Si){return(vi,mi)=>{vi.handled=!0,vi.diagram.model.commit(Ii=>{Ii.set(mi.part.adornedPart.data,Wn,Si)})}}function Kn(Wn,Si){return Si||(Si="color"),te(Fe.bn,{width:16,height:16,stroke:"lightgray",fill:Wn,margin:1,background:"transparent",mouseEnter:(vi,mi)=>mi.stroke="dodgerblue",mouseLeave:(vi,mi)=>mi.stroke="lightgray",click:Ye(Si,Wn),contextClick:Ye(Si,Wn)})}function _n(){return[te("ContextMenuButton",te(Fe.s_,"Horizontal",Kn(ke.white,"fill"),Kn(ke.beige,"fill"),Kn(ke.extralightblue,"fill"),Kn(ke.extralightred,"fill"))),te("ContextMenuButton",te(Fe.s_,"Horizontal",Kn(ke.lightgray,"fill"),Kn(ke.lightgreen,"fill"),Kn(ke.lightblue,"fill"),Kn(ke.lightred,"fill")))]}function We(){return[te("ContextMenuButton",te(Fe.s_,"Horizontal",Kn(ke.black),Kn(ke.green),Kn(ke.blue),Kn(ke.red))),te("ContextMenuButton",te(Fe.s_,"Horizontal",Kn(ke.white),Kn(ke.magenta),Kn(ke.purple),Kn(ke.orange)))]}function on(Wn,Si){return Si||(Si="thickness"),te(Fe.bn,"LineH",{width:16,height:16,strokeWidth:Wn,margin:1,background:"transparent",mouseEnter:(vi,mi)=>mi.background="dodgerblue",mouseLeave:(vi,mi)=>mi.background="transparent",click:Ye(Si,Wn),contextClick:Ye(Si,Wn)})}function An(Wn,Si){return Si||(Si="dash"),te(Fe.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Wn,margin:1,background:"transparent",mouseEnter:(vi,mi)=>mi.background="dodgerblue",mouseLeave:(vi,mi)=>mi.background="transparent",click:Ye(Si,Wn),contextClick:Ye(Si,Wn)})}function Nn(){return[te("ContextMenuButton",te(Fe.s_,"Horizontal",on(1),on(2),on(3),on(4))),te("ContextMenuButton",te(Fe.s_,"Horizontal",An(null),An([2,4]),An([4,4])))]}function Vn(Wn,Si){return Si||(Si="figure"),te(Fe.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Wn,margin:1,background:"transparent",mouseEnter:(vi,mi)=>mi.fill="dodgerblue",mouseLeave:(vi,mi)=>mi.fill="lightgray",click:Ye(Si,Wn),contextClick:Ye(Si,Wn)})}Ke.current.nodeTemplate.contextMenu=te("ContextMenu",te("ContextMenuButton",te(Fe.s_,"Horizontal",Vn("Rectangle"),Vn("RoundedRectangle"),Vn("Ellipse"),Vn("Diamond"))),te("ContextMenuButton",te(Fe.s_,"Horizontal",Vn("Parallelogram2"),Vn("ManualOperation"),Vn("Procedure"),Vn("Cylinder1"))),te("ContextMenuButton",te(Fe.s_,"Horizontal",Vn("Terminator"),Vn("CreateRequest"),Vn("Document"),Vn("TriangleDown"))),_n(),We(),Nn()),Ke.current.groupTemplate=te(Fe.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Fe.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Wn,Si)=>{var vi=Si.addMembers(Si.diagram.selection,!0);vi||Si.diagram.currentTool.doCancel()},avoidable:!1},new Fe.KX("location","loc",Fe.E9.parse).makeTwoWay(Fe.E9.stringify),te(Fe.s_,"Auto",{name:"BODY"},te(Fe.bn,{parameter1:10,fill:ke.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Fe.z6.AllSides,toSpot:Fe.z6.AllSides},new Fe.KX("fill"),new Fe.KX("stroke","color"),new Fe.KX("strokeWidth","thickness"),new Fe.KX("strokeDashArray","dash")),te(Fe.Vm,{background:"transparent",margin:20})),te(Fe.al,{alignment:Fe.z6.Top,alignmentFocus:Fe.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Fe.KX("text"),new Fe.KX("stroke","color"))),Ke.current.groupTemplate.selectionAdornmentTemplate=te(Fe.uz,"Spot",te(Fe.s_,"Auto",te(Fe.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),te(Fe.Vm,{margin:1.5})),ni({alignment:Fe.z6.TopRight,alignmentFocus:Fe.z6.BottomRight})),Ke.current.groupTemplate.contextMenu=te("ContextMenu",_n(),We(),Nn()),Ke.current.linkTemplate=te(Fe.rU,{layerName:"Foreground",routing:Fe.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Fe.KX("fromSpot","fromSpot",Fe.z6.parse),new Fe.KX("toSpot","toSpot",Fe.z6.parse),new Fe.KX("fromShortLength","dir",Wn=>Wn>=1?10:0),new Fe.KX("toShortLength","dir",Wn=>Wn>=1?10:0),new Fe.KX("points").makeTwoWay(),te(Fe.bn,{strokeWidth:2},new Fe.KX("stroke","color"),new Fe.KX("strokeWidth","thickness"),new Fe.KX("strokeDashArray","dash")),te(Fe.bn,{segmentIndex:0,segmentOffset:new Fe.E9(15,0),segmentOrientation:Fe.rU.OrientAlong,alignmentFocus:Fe.z6.Right,figure:"circle",width:10,strokeWidth:0},new Fe.KX("fill","color"),new Fe.KX("visible","dir",Wn=>Wn===1)),te(Fe.bn,{segmentIndex:-1,segmentOffset:new Fe.E9(-10,6),segmentOrientation:Fe.rU.OrientPlus90,alignmentFocus:Fe.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Fe.KX("fill","color"),new Fe.KX("visible","dir",Wn=>Wn>=1),new Fe.KX("width","thickness",Wn=>7+3*Wn),new Fe.KX("height","thickness",Wn=>7+3*Wn),new Fe.KX("segmentOffset","thickness",Wn=>new Fe.E9(-15,4+1.5*Wn))),te(Fe.bn,{segmentIndex:0,segmentOffset:new Fe.E9(15,-6),segmentOrientation:Fe.rU.OrientMinus90,alignmentFocus:Fe.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Fe.KX("fill","color"),new Fe.KX("visible","dir",Wn=>Wn===2),new Fe.KX("width","thickness",Wn=>7+3*Wn),new Fe.KX("height","thickness",Wn=>7+3*Wn),new Fe.KX("segmentOffset","thickness",Wn=>new Fe.E9(-15,4+1.5*Wn))),te(Fe.al,{alignmentFocus:new Fe.z6(0,1,-4,0),editable:!0},new Fe.KX("text").makeTwoWay(),new Fe.KX("stroke","color"))),Ke.current.linkTemplate.selectionAdornmentTemplate=te(Fe.uz,te(Fe.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Yi(2)},new Fe.KX("pathPattern","thickness",Yi)),ni({alignmentFocus:new Fe.z6(0,0,-6,-4)}));function Yi(Wn){return te(Fe.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Wn+4).toString()+" H3"})}function Li(Wn){var Si="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Wn===0?Si="M0 0 M16 16 M0 8 L16 8":Wn===2&&(Si="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),te(Fe.bn,{geometryString:Si,margin:2,background:"transparent",mouseEnter:(vi,mi)=>mi.background="dodgerblue",mouseLeave:(vi,mi)=>mi.background="transparent",click:Ye("dir",Wn),contextClick:Ye("dir",Wn)})}function Bi(Wn){var Si=(vi,mi)=>{vi.handled=!0,vi.diagram.model.commit(Ii=>{var Wi=mi.part.adornedPart;Ii.set(Wi.data,Wn?"toSpot":"fromSpot",Fe.z6.stringify(Fe.z6.AllSides)),(Wn?Wi.toNode:Wi.fromNode).invalidateConnectedLinks()})};return te(Fe.bn,{width:12,height:12,fill:"transparent",mouseEnter:(vi,mi)=>mi.background="dodgerblue",mouseLeave:(vi,mi)=>mi.background="transparent",click:Si,contextClick:Si})}function Ve(Wn,Si){var vi=0,mi=Fe.z6.RightSide;Wn.equals(Fe.z6.Top)?(vi=270,mi=Fe.z6.TopSide):Wn.equals(Fe.z6.Left)?(vi=180,mi=Fe.z6.LeftSide):Wn.equals(Fe.z6.Bottom)&&(vi=90,mi=Fe.z6.BottomSide),Si||(vi-=180);var Ii=(Wi,Ar)=>{Wi.handled=!0,Wi.diagram.model.commit(ae=>{var ce=Ar.part.adornedPart;ae.set(ce.data,Si?"toSpot":"fromSpot",Fe.z6.stringify(mi)),(Si?ce.toNode:ce.fromNode).invalidateConnectedLinks()})};return te(Fe.bn,{alignment:Wn,alignmentFocus:Wn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:vi,background:"transparent",mouseEnter:(Wi,Ar)=>Ar.background="dodgerblue",mouseLeave:(Wi,Ar)=>Ar.background="transparent",click:Ii,contextClick:Ii})}Ke.current.linkTemplate.contextMenu=te("ContextMenu",We(),Nn(),te("ContextMenuButton",te(Fe.s_,"Horizontal",Li(0),Li(1),Li(2))),te("ContextMenuButton",te(Fe.s_,"Horizontal",te(Fe.s_,"Spot",Bi(!1),Ve(Fe.z6.Top,!1),Ve(Fe.z6.Left,!1),Ve(Fe.z6.Right,!1),Ve(Fe.z6.Bottom,!1)),te(Fe.s_,"Spot",{margin:new Fe.Zt(0,0,0,2)},Bi(!0),Ve(Fe.z6.Top,!0),Ve(Fe.z6.Left,!0),Ve(Fe.z6.Right,!0),Ve(Fe.z6.Bottom,!0)))));const tr=`{ "class": "GraphLinksModel",
"nodeDataArray": [
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
],
"linkDataArray": [
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
]}`;var dr=["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 qr(Wn){return console.log("shapeName:",Wn),dr.indexOf(Wn)>=0}var hn=new Fe.YI(Ne.current,{maxSelectionCount:1,linkTemplate:te(Fe.rU,{locationSpot:Fe.z6.Center,selectionAdornmentTemplate:te(Fe.uz,"Link",{locationSpot:Fe.z6.Center},te(Fe.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),te(Fe.bn,{toArrow:"Standard",stroke:null}))},{routing:Fe.rU.AvoidsNodes,curve:Fe.rU.JumpOver,corner:5,toShortLength:4},new Fe.KX("points"),te(Fe.bn,{isPanelMain:!0,strokeWidth:2}),te(Fe.bn,{toArrow:"Standard",stroke:null})),model:new Fe.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Fe.bn.getFigureGenerators().toArray().map(Wn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Wn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ke.current.addDiagramListener("TextEdited",function(Wn){var Si;const vi=Wn.subject.part;var mi=(Si=document.activeElement)==null?void 0:Si.value;typeof mi=="string"&&mi.trim()===""&&Ke.current.model.commit(function(Ii){Ii.set(vi.data,"text","\u672A\u547D\u540D"),Ke.current.commandHandler.stopCommand()},"increment")}),hn.nodeTemplate=te(Fe.NB,"Auto",{locationSpot:Fe.z6.Center},new Fe.KX("location","location",Fe.E9.parse).makeTwoWay(Fe.E9.stringify),te(Fe.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 Fe.KX("stroke").makeTwoWay(),new Fe.KX("fill").makeTwoWay(),new Fe.KX("figure")),te(Fe.al,{margin:new Fe.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Fe.$u(16,16),maxSize:new Fe.$u(10,NaN),textAlign:"center",editable:!0},new Fe.KX("key").makeTwoWay())),setTimeout(()=>{Ke.current.grid=te(Fe.s_,"Grid",te(Fe.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),te(Fe.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ke.current.grid.visible=!0,Ke.current.grid.gridCellStroke="darkgray",Ke.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ke.current,Ke.current}const Br=()=>_t(this,null,function*(){var te,ke=Ke.current.makeImage();const zn=yield(0,mt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:ke.src,file_data:JSON.stringify({login:(te=(0,Lt.eY)())==null?void 0:te.login,data:JSON.parse(Ke.current.model.toJson())})}});Je({src:zn.url})});return(0,Ct.useEffect)(()=>(setTimeout(()=>{Mr()},500),$i(fi+1),()=>{Ke.current=null}),[]),Bt.createElement("div",{ref:Hn,className:"body-overflow-initial"},Bt.createElement(Rn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!fi,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Bt.createElement(ri.Z,null,Bt.createElement(Mt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Bt.createElement(Mt.Z,{onClick:()=>{var te,ke,zn=Ke.current.selection.first();if(Qi.current=!Qi.current,document.activeElement&&zn){let ni=(ke=(te=document.activeElement)==null?void 0:te.value)==null?void 0:ke.trim();typeof ni=="string"&&Ke.current.model.commit(function(Ye){Ye.set(zn.data,"text",ni||"\u672A\u547D\u540D"),Ke.current.commandHandler.stopCommand()},"increment")}$i(fi+1)}},Bt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:je},Bt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Qi.current?"none":"block"},className:vt.flowChartWrp},Bt.createElement("div",{style:{display:"flex",height:"100%"}},Bt.createElement("div",{style:{width:"300px",height:"100%"}},Bt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Bt.createElement("div",{style:{height:"calc(100% - 50px)"},className:vt.myPaletteDiv,ref:Ne})),Bt.createElement("div",{style:{flex:1,position:"relative"}},Bt.createElement("div",{ref:Ci,style:{height:"80vh"}}))),Bt.createElement("div",{className:"tr"},Bt.createElement(fe.ZP,{size:"large",onClick:Br,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var xe=Le,Xe=Qt(47889),Me=Qt(71051);const De=Xe.ZP.Group,Oe={margin:"0 8px"};var nn=({callback:je,onCancel:Je})=>{function Ke(Ci){je(Ci)}return Ct.createElement($t.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ke},Ct.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Ct.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),Ct.createElement("span",{style:Oe},"\u884C\u6570"),Ct.createElement($t.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Ct.createElement(Me.Z,null)),Ct.createElement("span",{style:Oe},"\u5217\u6570"),Ct.createElement($t.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Ct.createElement(Me.Z,null))),Ct.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Ct.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Ct.createElement($t.default.Item,{name:"align"},Ct.createElement(De,null,Ct.createElement(Xe.ZP,{value:"default"},Ct.createElement("i",{className:"fa fa-align-justify"})),Ct.createElement(Xe.ZP,{value:"left"},Ct.createElement("i",{className:"fa fa-align-left"})),Ct.createElement(Xe.ZP,{value:"center"},Ct.createElement("i",{className:"fa fa-align-center"})),Ct.createElement(Xe.ZP,{value:"right"},Ct.createElement("i",{className:"fa fa-align-right"}))))),Ct.createElement("div",{className:"flex-container flex-end"},Ct.createElement(fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ct.createElement(fe.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},mn=Qt(71411),On=Qt(43001),yn=Qt.n(On),oi=(0,Ct.forwardRef)(({use3d:je,width:Je,height:Ke,callback:Ci,showSaveButton:Ne},Qi)=>{const Hn=(0,Ct.useRef)(),fi=(0,Ct.useRef)(),[$i,Mr]=(0,Ct.useState)(!1),Br=(0,Ct.useRef)({id:Hn,appName:"graphing",width:Je||1e3,height:Ke||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Ct.useEffect)(()=>{fi.current=new(yn())(Br.current,!0),window.onload=function(){fi.current.inject("applet_container")}},[]);const te=()=>{var ke=window.ggbApplet.getPNGBase64(1,!0,72);return Ci&&Ci(ke),ke};return(0,Ct.useEffect)(()=>{Br.current.appName=$i?"3D":"graphing",fi.current.inject("applet_container")},[$i]),(0,Ct.useEffect)(()=>{Mr(je)},[je]),(0,Ct.useImperativeHandle)(Qi,()=>({getImgData:te})),Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Hn}),Ct.createElement(ri.Z,{align:"middle"},Ct.createElement(Mt.Z,{flex:1},Ct.createElement(mn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:$i,onChange:ke=>Mr(ke)})),Ct.createElement(Mt.Z,null,Ct.createElement(fe.ZP,{size:"large",onClick:te,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),gi=Qt(76562),bi=Qt(6767);const cr="link",Ei="upload-image",Ri="add-flowchart",Ki="draw-image",_r="add-flowchart",Ji="code-block",Er="add-table",yr="------------",Vr={default:yr,left:`:${yr}`,center:`:${yr}:`,right:`${yr}:`};var Zi=Qt(37808);function oo(){}let xo=0;const no=1e4,br="\u2581",uo="@\u2581\u2581@",Tt="@\u2581@",Gi=`
**\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`,Vi=["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 xi(je){return/^\d+$/.test(je)?`${je}px`:je}const zi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",or={[zi+"-B"]:"bold",[zi+"-I"]:"italic"},Yr={[cr]:"\u6DFB\u52A0\u94FE\u63A5",[Ji]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ei]:"\u6DFB\u52A0\u56FE\u7247",[Ki]:"\u6DFB\u52A0\u753B\u56FE",[Ri]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Er]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Tr=({defaultValue:je="",onChange:Je,width:Ke="100%",height:Ci=400,miniToolbar:Ne=!1,isFocus:Qi=!1,watch:Hn,insertTemp:fi,mode:$i="markdown",id:Mr="markdown-editor-id",showResizeBar:Br=!1,noStorage:te=!1,showNullButton:ke=!1,showNullProgramButton:zn=!1,hidetoolBar:ni=!1,fullScreen:Ye=!1,onBlur:Kn,onCMBeforeChange:_n,onFullScreen:We,className:on="",disablePaste:An=!1,disabled:Nn=!1,disabledFill:Vn=!1,placeholder:Yi="",values:Li="",extraUse:Bi})=>{const[Ve,tr]=(0,Ct.useState)(null),[dr,qr]=(0,Ct.useState)(je),[hn,Wn]=(0,Ct.useState)(Hn),[Si,vi]=(0,Ct.useState)(Ye),[mi,Ii]=(0,Ct.useState)(""),[Wi,Ar]=(0,Ct.useState)(0),[ae,ce]=(0,Ct.useState)(Ci),[ne,Ge]=(0,Ct.useState)(!1),[Be,cn]=(0,Ct.useState)(0),[Yn,Xn]=(0,Ct.useState)(0),ki=(0,Ct.useRef)(),ii=(0,Ct.useRef)(),be=(0,Ct.useRef)(),yi=(0,Ct.useRef)();(0,Ct.useEffect)(()=>{const Mn=window.scrollY||window.pageYOffset;qr(Li),Ve==null||Ve.setValue(Li),window.scrollTo(0,Mn)},[Li]),(0,Ct.useEffect)(()=>{We==null||We(Si)},[Si]),(0,Ct.useEffect)(()=>{if(ki.current){let Mn=function(ln,si){var Mi;if(An){si.preventDefault();return}const er=si.clipboardData;if(er){const Hi=er.types.toString(),Fr=er.items;if(Hi==="Files"||er.types.indexOf("Files")>-1){if(si.preventDefault(),$i=="stex")return;try{let wr=Fr[1];((Mi=Fr[0])==null?void 0:Mi.kind)==="file"&&(wr=Fr[0]);const Qr=wr.getAsFile(),Or=Qr.name.split(".").pop();(0,sn.I)(Qr,Lr=>{var Xr,He,xr;Lr.id?((Xr=Qr==null?void 0:Qr.type)==null?void 0:Xr.indexOf("image"))>-1?Un.replaceSelection(`<img width="100%" src="/api/attachments/${Lr.id}?type=${Lr.content_type})" alt="" />`):((He=Qr==null?void 0:Qr.type)==null?void 0:He.indexOf("video"))>-1?Un.replaceSelection(`<video width="100%" controls src="/api/attachments/${Lr.id}"></video>`):((xr=Qr==null?void 0:Qr.type)==null?void 0:xr.indexOf("pdf"))>-1?Un.replaceSelection(`<a href="/api/attachments/${Lr.id}?type=${Qr.type}&disposition=inline" target="_blank">${Qr.name}</a>`):Vi.includes(Or)?Un.replaceSelection(`<a href="/api/attachments/${Lr.id}?type=office&disposition=inline" target="_blank">${Qr.name}</a>`):Un.replaceSelection(`[${Qr.name}](/api/attachments/${Lr.id}?type=${Lr.content_type})`):(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})}catch(wr){bi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Un=ue().fromTextArea(ki.current,{mode:$i,lineNumbers:!Ne,lineWrapping:!0,value:je,autoCloseTags:!0,autoCloseBrackets:!0});return Un.on("keyup",function(ln,si){si.keyCode===8&&(ln.getValue()==""?Un.setOption("placeholder",Yi):Un.setOption("placeholder",null))}),Un.on("keydown",function(ln,si){if(si.keyCode===8){var Mi=un(ln);Mi&&si.preventDefault()}}),Qi&&Un.focus(),Un.on("paste",Mn),Nn&&Un.on("beforeChange",function(ln,si){(si.origin==="paste"||si.origin==="+input")&&si.cancel()}),tr(Un),()=>{Un.off("paste",Mn)}}},[]);const Te=(0,Ct.useCallback)(()=>{if(ii.current)try{}catch(Mn){console.log(Mn,"---- to set md editor body height")}},[ae,ii,Si]);(0,Ct.useEffect)(()=>{function Mn(){let Un=new Se.Z(ln=>{for(let si of ln)(si.target.offsetHeight>0||si.target.offsetWidth>0)&&(Te(),Ve.setSize("100%","100%"),Ve.refresh())});return Un.observe(ki.current.parentElement),Un}if(Ve){const Un=Mn();return()=>{var ln,si;(ln=ki.current)!=null&&ln.parentElement&&Un.unobserve((si=ki.current)==null?void 0:si.parentElement)}}},[Ve,Te]),(0,Ct.useEffect)(()=>{if(Ve){let Mn=[];for(const[Un,ln]of Object.entries(or)){let si={[Un]:()=>{Ue(ln)}};Mn.push(si),Ve.addKeyMap(si)}return()=>{for(let Un of Mn)Ve.removeKeyMap(Un)}}},[Ve]),(0,Ct.useEffect)(()=>{Ye!==Si&&vi(Ye)},[Ye]),(0,Zi.Z)(()=>{if(!te&&Wi>0){let Mn=new Date().getTime(),Un=window.sessionStorage.getItem(Mr);Mn>=Wi+no&&(!Un||Un!==dr)&&(window.sessionStorage.setItem(Mr,dr),Ge(!0))}},no),(0,Ct.useEffect)(()=>{Wn(Hn)},[Ve,Hn]),(0,Ct.useEffect)(()=>{Ve&&Qi&&Ve.focus()},[Ve,Qi]),(0,Ct.useEffect)(()=>{if(hn&&Ve){let Mn=function(ln){let si=ln.target;if(yi.current){let Mi=si.scrollTop/si.scrollHeight;yi.current.scrollTop=yi.current.scrollHeight*Mi}};const Un=Ve.getScrollerElement();return Un.addEventListener("scroll",Mn),()=>{Un.removeEventListener("scroll",Mn)}}},[Ve,hn]),(0,Ct.useEffect)(()=>{if(Ve&&_n){let Mn=function(Un,ln){_n(Un,ln)};return Ve.on("beforeChange",Mn),()=>{Ve.off("beforeChange",Mn)}}},[Ve,_n]),(0,Ct.useEffect)(()=>{if(Ve&&Kn){let Mn=function(){Kn(Ve.getValue())};return Ve.on("blur",Mn),()=>{Ve.off("blur",Mn)}}},[Ve,Kn]);function un(Mn,Un){var ln=Mn.getDoc(),si=ln.getCursor(),Mi=ln.getLine(si.line),er=Mi.charAt(si.ch-1),Hi=Mi.lastIndexOf("@\u2581@",si.ch),Fr=Mi.lastIndexOf("@\u2581\u2581@",si.ch),wr=Hi>Fr?Hi:Fr,Qr=Hi>Fr?3:4;if(uo.indexOf(er)===-1)return null;if(console.log("change1:",Un,Mn,Mi,si,wr,Hi,Fr,er),wr>=0&&si.ch-wr<5){var Or=wr+Qr;return ln.replaceRange("",{line:si.line,ch:wr},{line:si.line,ch:Or}),{line:si.line,ch:Or}}return null}(0,Ct.useEffect)(()=>{if(Ve){let Mn=function(Un,ln){const si=Un.getValue();qr(si),Ar(new Date().getTime()),Un.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Je&&(zn?Je(si,qe(si)):Je(si))};return Ve.on("change",Mn),()=>{Ve.off("change",Mn)}}},[Ve,Je]),(0,Ct.useEffect)(()=>{if(Ve)if(je==null)Ve.setValue(""),qr("");else{const Mn=window.scrollY||window.pageYOffset;je!==Ve.getValue()&&(Ve.setValue(je),qr(je),Ve.setCursor(Nn?1:Ve.lineCount(),0),window.scrollTo(0,Mn))}},[Ve,je]);const Ue=(0,Ct.useCallback)(Mn=>{const Un=Ve.getCursor(),ln=Ve.getSelection();let si=ln.split(`
`);switch(Mn){case"bold":return Ve.replaceSelection("**"+ln+"**"),ln===""&&Ve.setCursor(Un.line,Un.ch+2),Ve.focus();case"italic":return Ve.replaceSelection("*"+ln+"*"),ln===""&&Ve.setCursor(Un.line,Un.ch+1),Ve.focus();case"code":return Ve.replaceSelection("`"+ln+"`"),ln===""&&Ve.setCursor(Un.line,Un.ch+1),Ve.focus();case"inline-latex":return Ii("inline-latex"),Ve.focus();case"latex":return Ve.replaceSelection("```latex\n"+ln+"\n```"),Ve.setCursor(Un.line+1,ln.length+1),Ve.focus();case"line-break":return Ve.replaceSelection(`<br/>
`),Ve.focus();case"list-ul":return ln===""?Ve.replaceSelection("- "+ln):Ve.replaceSelection(si.map(Mi=>Mi===""?"":`- ${Mi}`).join(`
`)),Ve.focus();case"list-ol":return ln===""?Ve.replaceSelection("1. "+ln):Ve.replaceSelection(si.map((Mi,er)=>Mi===""?"":`${er+1}. ${Mi}`).join(`
`)),Ve.focus();case"add-null-ch":return ln===""&&Ve.setCursor(Un.line,Un.ch),Ve.replaceSelection(br),Ve.focus();case"add-signal":return ln===""&&Ve.setCursor(Un.line,Un.ch),Ve.replaceSelection(Tt),Ve.focus();case"add-multiple":return ln===""&&Ve.setCursor(Un.line,Un.ch),Ve.replaceSelection(uo),Ve.focus();case"inster-template-1":return ln===""&&Ve.setCursor(Un.line,Un.ch),Ve.replaceSelection(Gi),Ve.focus();case"eraser":return Ve.setValue(""),Ve.focus();case"trigger-watch":return Wn(!hn),Ve.focus();case"trigger-full-screen":return vi(!Si),Ve.focus();case cr:Ii(cr);return;case Ji:Ii(Ji);return;case Ei:Ii(Ei);return;case Ki:Ii(Ki);return;case"maths-latex":Ii("maths-latex");return;case Ri:Ii(Ri);return;case Er:Ii(Er);return;default:throw new Error}},[Ve,hn,Si]),Ut=(0,Ct.useCallback)((Mn,Un)=>{var ln,si,Mi,er,Hi,Fr;switch(Ii(""),mi){case cr:const{title:Xr,link:He}=Mn;return Ve.replaceSelection(`[${Xr}](${He})`),Ve.focus();case Ji:const{language:xr,content:Ur}=Mn;return Ve.replaceSelection(["```"+xr,Ur,"```"].join(`
`)),Ve.focus();case"maths-latex":for(var wr=atob(Mn),Qr=new Uint8Array(wr.length),Or=0;Or<wr.length;Or++)Qr[Or]=wr.charCodeAt(Or);var Lr=new Blob([Qr],{type:"image/png"});(0,sn.I)(Lr,us=>{us.id?Ve.replaceSelection(`![,](/api/attachments/${us.id}?type=${us.content_type})`):(us==null?void 0:us.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ve.replaceSelection("`$$"+Mn+"$$`");break;case Ei:case Ki:case _r:const{src:nr,alt:kr}=Mn,gr=Un,co=(Mi=(si=(ln=gr==null?void 0:gr.name)==null?void 0:ln.split("."))==null?void 0:si.pop)==null?void 0:Mi.call(si);return((er=gr==null?void 0:gr.type)==null?void 0:er.indexOf("image"))>-1||!(gr!=null&&gr.type)?gr!=null&&gr.align||gr!=null&&gr.width?Ve.replaceSelection(`<p style="text-align:${gr.align||"initial"}"><img width="${gr.width?gr.width+"%":"initial"}" src="${nr}" alt="${kr||""}" /></p>`):Ve.replaceSelection(`<img width="100%" src="${nr}" alt="${kr||""}" />`):((Hi=gr==null?void 0:gr.type)==null?void 0:Hi.indexOf("video"))>-1?Ve.replaceSelection(`<video width="100%" controls src="${nr}"></video>`):((Fr=gr==null?void 0:gr.type)==null?void 0:Fr.indexOf("pdf"))>-1?Ve.replaceSelection(`<a href="${nr}?type=${gr.type}&disposition=inline" target="_blank">${gr.name}</a>`):Vi.includes(co)?Ve.replaceSelection(`<a href="${nr}?type=office&disposition=inline" target="_blank">${gr.name}</a>`):Ve.replaceSelection(`[${gr.name}](${nr})`),Ve.focus();case Er:const{row:io,col:Pr,align:vo}=Mn;let ks=`
`;for(let us=0;us<io;us++){let Da=[],Ks=[];for(let ar=0;ar<Pr;ar++)us===1&&Ks.push(Vr[vo]),Da.push(" ");us===1&&(ks+=`| ${Ks.join(" | ")} |
`),ks+=`| ${Da.join(Pr===1?"":" | ")} |
`}return Ve.replaceSelection(ks+`
`),Ve.focus();default:throw new Error}},[Ve,mi]),pn=(0,Ct.useMemo)(()=>{switch(mi){case cr:return Ct.createElement(li,{callback:Ut,onCancel:Ln});case Ji:return Ct.createElement(ai.Z,{callback:Ut,onCancel:Ln});case Ei:return Ct.createElement(sn.Z,{callback:Ut,onCancel:Ln});case Ri:return Ct.createElement(xe,{callback:Ut,onCancel:Ln});case Er:return Ct.createElement(nn,{callback:Ut,onCancel:Ln});case"maths-latex":return Ct.createElement(oi,{showSaveButton:!0,callback:Ut});case"inline-latex":return Ct.createElement(gi.Z,{showSaveButton:!0,callback:Ut});default:return null}},[mi]);function Ln(){Ii("")}(0,Ct.useEffect)(()=>{if(be.current){let Mn=function(Hi){Mi=!0,er=Hi.pageY},Un=function(){Mi=!1},ln=function(Hi){if(Mi){let Fr=Hi.pageY-er;Fr<0&&(Fr=0),Fr>300&&(Fr=300);let wr=Ci+Fr+"px";ce(wr)}},si=be.current,Mi=!1,er=0;return si.addEventListener("mousedown",Mn),document.addEventListener("mousemove",ln),document.addEventListener("mouseup",Un),()=>{si.removeEventListener("mousedown",Mn),document.removeEventListener("mousemove",ln),document.removeEventListener("mouseup",Un)}}},[Ve,be]),(0,Ct.useEffect)(()=>{ce(Ci)},[Ci]);const Ai=xi(Ke),Zn=xi(ae),Tn={width:Ai,height:Zn},dn=(0,Ct.useMemo)(()=>{if(Wi){let Mn=new Date(Wi),Un=Mn.getHours(),ln=Mn.getMinutes(),si=Mn.getSeconds();return Un=Un<10?"0"+Un:Un,ln=ln<10?"0"+ln:ln,si=si<10?"0"+si:si,`${Un}:${ln}:${si}`}return 0},[Wi]),qe=Mn=>{const Un=[];if(zn){let ln=-1;Mn=Mn.replace(/(@▁▁@|@▁@)/g,function(si,Mi,er){Un.push({multiLine:si!==Tt})})}return Un};function fn(){window.sessionStorage.removeItem(Mr),Ge(!1),Ar(0)}function an(){Ge(!1),Ar(0),Ve.setValue(window.sessionStorage.getItem(Mr))}(0,Ct.useEffect)(()=>{Yr[mi]&&mi!==Ki&&mi!==Ri&&setTimeout(()=>{const Mn=document.getElementsByClassName("markdown-popup-form")[0],Un=window.innerWidth/2-Mn.offsetWidth/2,ln=window.innerHeight/2-Mn.offsetHeight/2;cn(Un),Xn(ln)},0)},[mi]);const gn=Mn=>{Mn.preventDefault();const Un=Mn.clientX-Be,ln=Mn.clientY-Yn;document.body.onmousemove=si=>{let Mi=si.clientX-Un,er=si.clientY-ln;const Hi=document.getElementsByClassName("markdown-popup-form")[0],Fr=window.innerWidth-Hi.offsetWidth,wr=window.innerHeight-Hi.offsetHeight;Mi=Math.max(0,Math.min(Mi,Fr)),er=Math.max(0,Math.min(er,wr)),qn(si.clientX,si.clientY,Un,ln)&&(cn(Mi),Xn(er))},document.body.onmouseup=function(){document.body.onmousemove=null}},qn=(Mn,Un,ln,si)=>{const Mi=document.body.clientHeight,er=document.body.clientWidth;return Mn<20&&ln>Mn||Mn>er-20&&ln<Mn||Un<20&&si>Un||Un>Mi-20&&si<Un?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{className:"markdown-editor-wrapper",ref:ii},Ct.createElement("div",{className:`markdown-editor-container ${on} ${hn?"on-preview":""} ${Ne?"mini":""} ${Si?"full-screen":""}`,style:Tn},Ct.createElement(Zt,{insertTemp:fi,watch:hn,fullScreen:Si,showNullButton:ke,showNullProgramButton:zn,onActionCallback:Ue,hidetoolBar:ni,extraUse:Bi}),Ct.createElement("div",{className:"markdown-editor-body"},Ct.createElement("div",{className:"codemirror-container"},Ct.createElement("textarea",{ref:ki,placeholder:Yi})),hn?Ct.createElement("div",{ref:yi,className:"preview-container"},$i==="stex"&&Ct.createElement(Xt,{value:dr}),$i!=="stex"&&Ct.createElement(Ie.Z,{disabledFill:Vn,showProgramFill:zn,value:dr})):null))),Br?Ct.createElement("a",{ref:be,className:"editor-resize"}):null,mi===Ki&&Ct.createElement(ei,{callback:Ut,onCancel:Ln}),mi===Ri&&Ct.createElement(xe,{callback:Ut,onCancel:Ln}),Ct.createElement(Vt.Z,null,Yr[mi]&&mi!==Ki&&mi!==Ri?Ct.createElement(Rn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Be,top:Yn},title:Ct.createElement("div",{style:{cursor:"move"},onMouseDown:gn},Yr[mi]),open:!0,onCancel:Ln,footer:null,destroyOnClose:!0,width:mi===Ri?"1200px":null,height:mi===Ri?"80vh":null,className:"markdown-popup-form"},pn):null))}},17077:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Rt},I:function(){return Zt}});var Ct=Qt(28284),ee=Qt(6767),ue=Qt(37568),Se=Qt(77736),de=Qt(71051),Ht=Qt(47889),ie=Qt(99571),Ae=Qt(46699),re=Qt(59301),Wt=Qt(59301),Ie=Object.defineProperty,Xt=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(Vt,$t,Ce)=>$t in Vt?Ie(Vt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Vt[$t]=Ce,at=(Vt,$t)=>{for(var Ce in $t||($t={}))nt.call($t,Ce)&&At(Vt,Ce,$t[Ce]);if(It)for(var Ce of It($t))et.call($t,Ce)&&At(Vt,Ce,$t[Ce]);return Vt},ct=(Vt,$t)=>Xt(Vt,Ee($t));const{useForm:pt}=Ct.default,xt={width:280,marginRight:10},bt={labelCol:{span:5},wrapperCol:{span:19}};var Rt=({callback:Vt,onCancel:$t})=>{const[Ce]=pt();let fe=(0,re.useRef)();function rn(Fn){fe.current.width=Ce.getFieldValue("width"),fe.current.align=Ce.getFieldValue("align"),Vt(Fn,fe.current)}function tn(Fn,kn){if(Fn.status===-1){ee.ZP.error(Fn.message);return}Ce.setFieldsValue({src:`/api/attachments/${Fn.id}`,type:kn.type})}function Bn(Fn){let kn=Fn.target.files[0];fe.current=kn,Zt(kn,tn)}return Wt.createElement(Ct.default,ct(at({form:Ce},bt),{className:"upload-image-panel",onFinish:rn,style:{width:470,overflow:"hidden"}}),Wt.createElement(Ct.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Wt.createElement("div",{className:"flex-container"},Wt.createElement(Ct.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Wt.createElement(ue.default,{style:xt})),Wt.createElement(Ot,{onFileChange:Bn}))),Wt.createElement(Ct.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Wt.createElement(ue.default,{style:{width:264}})),Wt.createElement(Ct.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Wt.createElement(Se.Z,null,Wt.createElement(Ct.default.Item,{name:"width",style:{margin:0}},Wt.createElement(de.Z,{style:{width:264}})),Wt.createElement("span",{className:"ml8"},"%"))),Wt.createElement(Ct.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Wt.createElement(Ht.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"}]})),Wt.createElement("aside",null,Wt.createElement(Ct.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Wt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Wt.createElement(ie.ZP,{type:"default",onClick:$t},"\u53D6\u6D88"))))};function Ot({onFileChange:Vt}){return Wt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Wt.createElement("input",{type:"file",onChange:Vt}))}function Zt(Vt,$t){if(!Vt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ce=new FormData;Ce.append("editormd-image-file",Vt),Ce.append("file_param_name","editormd-image-file"),Ce.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(rn){$t(JSON.parse(rn.target.responseText),Vt)},!1),fe.addEventListener("error",function(rn){console.error(rn)},!1),fe.open("POST",`${Ae.KI}/api/attachments.json`),fe.send(Ce)}},91558:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ue}});var Ct=Qt(59301),ee=Qt(4676);class ue extends Ct.Component{constructor(de){super(de);const Ht=window.document;this.node=Ht.createElement("div"),Ht.body.appendChild(this.node)}render(){const{children:de}=this.props;return(0,ee.createPortal)(de,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(xn,ze,Qt){"use strict";Qt.d(ze,{SV:function(){return Le},ZP:function(){return _t}});var Ct=Qt(59301),ee=Qt(76374);const ue={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"]},Se={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},de={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},Ht={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(`
`)}]},ie={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 Ae=Qt(53184),re=Qt.n(Ae),Wt=Object.defineProperty,Ie=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(xe,Xe,Me)=>Xe in xe?Wt(xe,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):xe[Xe]=Me,At=(xe,Xe)=>{for(var Me in Xe||(Xe={}))It.call(Xe,Me)&&et(xe,Me,Xe[Me]);if(Ee)for(var Me of Ee(Xe))nt.call(Xe,Me)&&et(xe,Me,Xe[Me]);return xe},at=(xe,Xe)=>Ie(xe,Xt(Xe)),ct=(xe,Xe,Me)=>new Promise((De,Oe)=>{var nn=yn=>{try{On(Me.next(yn))}catch(ui){Oe(ui)}},mn=yn=>{try{On(Me.throw(yn))}catch(ui){Oe(ui)}},On=yn=>yn.done?De(yn.value):Promise.resolve(yn.value).then(nn,mn);On((Me=Me.apply(xe,Xe)).next())});const pt={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"]}},xt=(xe,Xe)=>Xe.map(Me=>({label:Me,kind:xe.languages.CompletionItemKind.Keyword,insertText:Me})),bt=xe=>Object.keys(pt.tables).map(Xe=>({label:Xe,kind:xe.languages.CompletionItemKind.Variable,insertText:Xe})),Rt=(xe,Xe)=>{const Me=pt.tables[xe];return Me?Me.map(De=>({label:De,kind:Xe.languages.CompletionItemKind.Field,insertText:De})):[]};function Ot(xe,Xe,Me,De,Oe){let nn=Xe.getWordUntilPosition(Me),mn={startLineNumber:Me.lineNumber,endLineNumber:Me.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn},On=De.map(yn=>({label:yn,kind:xe.languages.CompletionItemKind.Keyword,insertText:yn,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:mn}));return Oe.map(yn=>{On.push(at(At({},yn),{range:mn}))}),On}var Zt=xe=>{pt.languages.map(Oe=>(xe.languages.registerDocumentFormattingEditProvider(Oe,{provideDocumentFormattingEdits(nn,mn,On){return ct(this,null,function*(){const yn=re()(nn.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:nn.getFullModelRange(),text:yn}]})}}),Oe));const Xe=de.quickKey.map(Oe=>({label:Oe.label,kind:xe.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Me=Ht.quickKey.map(Oe=>({label:Oe.label,kind:xe.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),De=Se.quickKey.map(Oe=>({label:Oe.label,kind:xe.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));xe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,nn){var mn=Oe.getWordUntilPosition(nn),On={startLineNumber:nn.lineNumber,endLineNumber:nn.lineNumber,startColumn:mn.startColumn,endColumn:mn.endColumn},yn=Oe.getLineContent(nn.lineNumber).substring(mn.startColumn-2,mn.endColumn);return{suggestions:[...de.keywords.map(ui=>({label:ui,kind:xe.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On})),...de.quickKey.map(ui=>({label:ui.label,kind:xe.languages.CompletionItemKind.Function,documentation:ui.content,insertText:yn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On}))]}}}),xe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,nn){var mn=Oe.getWordUntilPosition(nn),On={startLineNumber:nn.lineNumber,endLineNumber:nn.lineNumber,startColumn:mn.startColumn,endColumn:mn.endColumn};return{suggestions:[...ue.keywords.map(yn=>({label:yn,kind:xe.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On}))]}}}),xe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,nn){var mn=Oe.getWordUntilPosition(nn),On={startLineNumber:nn.lineNumber,endLineNumber:nn.lineNumber,startColumn:mn.startColumn,endColumn:mn.endColumn},yn=Oe.getLineContent(nn.lineNumber).substring(mn.startColumn-2,mn.endColumn);return{suggestions:[...Se.keywords.map(ui=>({label:ui,kind:xe.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On})),...Se.quickKey.map(ui=>({label:ui.label,kind:xe.languages.CompletionItemKind.Function,documentation:ui.content,insertText:yn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On}))]}}}),xe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Oe,nn){var mn=Oe.getWordUntilPosition(nn),On={startLineNumber:nn.lineNumber,endLineNumber:nn.lineNumber,startColumn:mn.startColumn,endColumn:mn.endColumn},yn=Oe.getLineContent(nn.lineNumber).substring(mn.startColumn-2,mn.endColumn);return{suggestions:[...ie.keywords.map(ui=>({label:ui,kind:xe.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On})),...ie.quickKey.map(ui=>({label:ui.label,kind:xe.languages.CompletionItemKind.Function,documentation:ui.content,insertText:yn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On}))]}}}),xe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,nn){var mn=Oe.getWordUntilPosition(nn),On={startLineNumber:nn.lineNumber,endLineNumber:nn.lineNumber,startColumn:mn.startColumn,endColumn:mn.endColumn},yn=Oe.getLineContent(nn.lineNumber).substring(mn.startColumn-2,mn.endColumn);return{suggestions:[...Ht.keywords.map(ui=>({label:ui,kind:xe.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On})),...Ht.quickKey.map(ui=>({label:ui.label,kind:xe.languages.CompletionItemKind.Function,documentation:ui.content,insertText:yn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:On}))]}}})};const Vt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var $t=Object.defineProperty,Ce=(xe,Xe,Me)=>Xe in xe?$t(xe,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):xe[Xe]=Me,fe=(xe,Xe,Me)=>Ce(xe,typeof Xe!="symbol"?Xe+"":Xe,Me);const rn=class Bw{constructor(Xe,Me,De){this.placeholder=Xe,this.editor=Me,this.monaco=De,Me.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)}};fe(rn,"ID","editor.widget.placeholderHint");var Bn=rn,Fn=Qt(96236),kn=Qt(6767),Gn=Qt(25399),ti=Qt(89392),me=Qt(49535),oe=Qt(56102),Cn=Object.defineProperty,li=Object.defineProperties,ai=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Rn=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,Ui=(xe,Xe,Me)=>Xe in xe?Cn(xe,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):xe[Xe]=Me,en=(xe,Xe)=>{for(var Me in Xe||(Xe={}))Rn.call(Xe,Me)&&Ui(xe,Me,Xe[Me]);if(sn)for(var Me of sn(Xe))ri.call(Xe,Me)&&Ui(xe,Me,Xe[Me]);return xe},ei=(xe,Xe)=>li(xe,ai(Xe)),Fe=(xe,Xe)=>{var Me={};for(var De in xe)Rn.call(xe,De)&&Xe.indexOf(De)<0&&(Me[De]=xe[De]);if(xe!=null&&sn)for(var De of sn(xe))Xe.indexOf(De)<0&&ri.call(xe,De)&&(Me[De]=xe[De]);return Me},ci=(xe,Xe,Me)=>new Promise((De,Oe)=>{var nn=yn=>{try{On(Me.next(yn))}catch(ui){Oe(ui)}},mn=yn=>{try{On(Me.throw(yn))}catch(ui){Oe(ui)}},On=yn=>yn.done?De(yn.value):Promise.resolve(yn.value).then(nn,mn);On((Me=Me.apply(xe,Xe)).next())});function Ti(xe){return/^\d+$/.test(xe)?`${xe}px`:xe}function jt(){}let Mt=!1;const mt={"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 vt(xe=[]){let Xe=xe;if(Array.isArray(xe)){for(let Me=0;Me<xe.length;Me++){let De=mt[xe[Me]];if(De)return De}return Xe[0]}return mt[Xe]||Xe}let Lt=null;const Bt=()=>ci(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(xe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",xe)}});var _t=xe=>{var Xe=xe,{width:Me="100%",height:De="100%",value:Oe,language:nn="javascript",style:mn={},options:On={},overrideServices:yn={},theme:ui="vs-dark",onEditBlur:oi,isCopy:gi=!1,onSave:bi,autoHeight:cr=!1,forbidCopy:Ei=!1,onChange:Ri=jt,editorDidMount:Ki=jt,onFocus:_r=jt,onBreakPoint:Ji=jt,breakPointValue:Er=[],filename:yr="educoder.txt",errorLine:Vr,errorContent:Zi="",highlightLine:oo,openBreakPoint:xo=!1,placeholder:no="",showMiniMap:br=!0}=Xe,uo=Fe(Xe,["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 Tt=(0,Ct.useRef)(),Gi=(0,Ct.useRef)({}),Vi=(0,Ct.useRef)(),xi=(0,Ct.useRef)(),Oi=(0,Ct.useRef)([]),zi=(0,Ct.useRef)(!1),or=(0,Ct.useRef)(),Yr=(0,Ct.useRef)(),Tr=(0,Ct.useRef)(!1),[je,Je]=(0,Ct.useState)(!1);function Ke(){let _n;return Tt.current&&(_n=new ee.Z(We=>{for(let on of We)(on.target.offsetHeight>0||on.target.offsetWidth>0)&&Gi.current.instance.layout()}),_n.observe(Tt.current)),_n}function Ci(){kn.ZP.warning({content:decodeURIComponent(Vt),key:"monaco-editor-tip"})}const Ne=()=>{let _n=Gi.current.instance;if(Oe!=null&&_n&&je){const We=_n.getModel();We&&Oe!==We.getValue()&&(Mt=!0,We.setValue(Oe),_n.layout(),Mt=!1)}};(0,Ct.useEffect)(()=>{const _n=me.Z.subscribe("formatDocument",We=>{var on;let An=Gi.current.instance;(on=An==null?void 0:An.getAction)==null||on.call(An,"editor.action.formatDocument").run()});return window.updateMonacoValue=We=>{Ri(We)},_n},[]),(0,Ct.useEffect)(()=>{var _n;let We=Gi.current.instance;xi.current&&clearTimeout(xi.current),xi.current=setTimeout(()=>{Ne()},500),Oe&&(Oe!=null&&Oe.length)&&((_n=We==null?void 0:We.updateOptions)==null||_n.call(We,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Oe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Oe,je,Gi.current]),(0,Ct.useEffect)(()=>{if(Vr&&Gi.current&&Gi.current.instance){let We=Gi.current.instance;We.changeViewZones(function(on){var An=document.createElement("div");An.style.padding="10px 20px",An.style.width="calc(100% - 20px)",An.className="my-error-line-wrp",An.innerHTML=Zi,on.addZone({afterLineNumber:Vr||11,heightInLines:3,domNode:An})});var _n={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}};We.addOverlayWidget(_n),We.revealPositionInCenter({lineNumber:20,column:1})}},[Vr,Gi.current,je]);const Qi=(_n="",We)=>{if(!_n||_n.trim()==="")return!0;const An=Gi.current.instance.getModel().getLineTokens(We);let Nn=!1;for(let Vn=0;Vn<2;Vn++)An.getStandardTokenType(Vn)===1&&(Nn=!0);return Nn};(0,Ct.useEffect)(()=>{var _n;const We=(_n=Gi.current)==null?void 0:_n.instance;if(We&&je&&Ei){const on=We.onDidBlurEditorWidget(()=>{Tr.current=!1}),An=We.onDidFocusEditorText(()=>{Tr.current=!0});return()=>{on.dispose(),An.dispose()}}},[Gi.current,je,Ei]),(0,Ct.useEffect)(()=>{var _n;if((_n=Gi.current)!=null&&_n.instance&&je&&xo){let We=Gi.current.instance,on=We.getModel();if(!on)return;(()=>{var Wn;let Si=[],vi=[];const mi=on.getAllDecorations();for(let Wi of mi)Wi.options.className==="highlighted-line"&&(Si.push((Wn=Wi==null?void 0:Wi.range)==null?void 0:Wn.startLineNumber),vi.push(Wi==null?void 0:Wi.id));if(oo===Si[0])return;on.deltaDecorations(vi,[]);const Ii=on.getLineCount();oo&&oo<=Ii&&(We.deltaDecorations([],[{range:new Lt.Range(oo,1,oo,on.getLineMaxColumn(oo)),options:{isWholeLine:!0,className:"highlighted-line"}}]),We.revealLineInCenter(oo))})();const Nn=(Wn=!1)=>{var Si;let vi=[],mi=[];const Ii=on.getAllDecorations();for(let Wi of Ii)Wi.options.linesDecorationsClassName==="breakpoints-select"&&(vi.push((Si=Wi==null?void 0:Wi.range)==null?void 0:Si.startLineNumber),mi.push(Wi==null?void 0:Wi.id));if(Wn)return{lines:vi,ids:mi};Ji(vi)},Vn=Wn=>ci(void 0,null,function*(){let Si={range:new Lt.Range(Wn,1,Wn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield on.deltaDecorations([],[Si]),Nn()}),Yi=Wn=>ci(void 0,null,function*(){let Si=[];const vi=We.getLineDecorations(Wn);for(let mi of vi)mi.options.linesDecorationsClassName==="breakpoints-select"&&Si.push(mi.id);yield on.deltaDecorations(Si,[]),Nn()}),Li=Wn=>{let Si=We.getLineDecorations(Wn);for(let vi of Si)if(vi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ti.isEqual)(Er,Nn(!0).lines)){on.deltaDecorations(Nn(!0).ids,[]);const Wn=Er.map(Si=>({range:new Lt.Range(Si,1,Si,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));on.deltaDecorations([],Wn)}const Bi=We.onDidChangeModelContent(Wn=>{let Si=We.getPosition();if(Si){let vi=Si.lineNumber;clearTimeout(Yr.current),Yr.current=setTimeout(()=>{Qi(on.getLineContent(vi),vi)?Yi(vi):Li(vi)?(Yi(vi),Vn(vi)):Nn()},100)}}),Ve=We.onMouseDown(Wn=>{var Si,vi,mi;if(Wn.target.detail&&((mi=(vi=(Si=Wn.target)==null?void 0:Si.element)==null?void 0:vi.className)!=null&&mi.includes("line-numbers"))){let Ii=Wn.target.position.lineNumber;if(Qi(on.getLineContent(Ii),Ii))return;Li(Ii)?Yi(Ii):Vn(Ii)}}),tr=Wn=>{let Si={range:new Lt.Range(Wn,1,Wn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Oi.current=We.deltaDecorations(Oi.current,[Si])},dr=()=>{Oi.current=We.deltaDecorations(Oi.current,[])},qr=We.onMouseMove(Wn=>{var Si,vi,mi;if(dr(),Wn.target.detail&&((mi=(vi=(Si=Wn.target)==null?void 0:Si.element)==null?void 0:vi.className)!=null&&mi.includes("line-numbers"))){let Ii=Wn.target.position.lineNumber;if(Qi(on.getLineContent(Ii),Ii))return;tr(Ii)}}),hn=We.onMouseLeave(()=>{dr()});return()=>{Bi.dispose(),Ve.dispose(),qr.dispose(),hn.dispose()}}},[Gi.current,je,Er,oo,xo,nn]),(0,Ct.useEffect)(()=>{var _n;(_n=Gi.current)!=null&&_n.instance&&xo&&Gi.current.instance.setPosition({lineNumber:0,column:0})},[oo]);function Hn(){let _n=Gi.current.instance;if(_n){const We=_n.getSelection(),on=Gi.current.pastePos||{},An=new Lt.Range(on.startLineNumber||We.endLineNumber,on.startColumn||We.endColumn,on.endLineNumber||We.endLineNumber,on.endColumn||We.endColumn);setTimeout(()=>{_n.executeEdits("",[{range:An,text:""}])},300)}}function fi(_n){(window.navigator.platform.match("Mac")?_n.metaKey:_n.ctrlKey)&&_n.keyCode==83&&(_n.preventDefault(),bi())}const $i=()=>{if(cr&&Gi.current.instance){const _n=Gi.current.instance.getContentHeight();Ye(_n<De?De:_n)}else Ye(De)};function Mr(_n){var We=document.createEvent("MouseEvents");We.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_n.dispatchEvent(We)}const Br=_n=>{if(!Tr.current)return;const{keyCode:We,ctrlKey:on,metaKey:An,target:Nn,type:Vn}=_n;return(Vn==="paste"||(We===67||We===86)&&(An||on))&&Nn.nodeName==="TEXTAREA"&&(Ci(),_n.preventDefault()),!1};function te(_n,We){var on=window.URL||window.webkitURL||window,An=new Blob([We]),Nn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Nn.href=on.createObjectURL(An),Nn.download=_n,Mr(Nn)}(0,Ct.useEffect)(()=>{$i()},[$i]),(0,Ct.useEffect)(()=>{Tt.current&&!je&&Promise.all([Qt.e(8909),Qt.e(6656)]).then(Qt.bind(Qt,71448)).then(_n=>{try{Lt=_n,Gi.current.instance=Lt.editor.create(Tt.current,{value:Oe,language:vt(nn),theme:ui,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:br||!1}},yn);const We=Gi.current.instance;let Nn=[...Fn.BH._menuItems].find(Bi=>Bi[0]._debugName=="EditorContext")[1],Vn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Yi=(Bi,Ve)=>{var tr,dr;let qr=Bi._first;do Ve.includes((dr=(tr=qr.element)==null?void 0:tr.command)==null?void 0:dr.id)&&Bi._remove(qr);while(qr=qr.next)};if(Ki(We,Lt),setTimeout(()=>{$i(),Gi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{te(yr||"educoder.txt",We.getValue())}})},500),Gi.current.subscription=We.onDidChangeModelContent(Bi=>{zi.current?clearTimeout(or.current):($i(),Ri(We.getValue(),Bi)),or.current=setTimeout(()=>{zi.current=!1},500)}),window.Monaco||Zt(Lt,vt(nn)),Ei&&(Yi(Nn,Vn),Tt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Br),window.removeEventListener("paste",Br),window.addEventListener("keydown",Br),window.addEventListener("paste",Br)),window.Monaco=Lt,oi&&We.onDidBlurEditorWidget(()=>{oi(We.getValue())}),_r&&We.onDidFocusEditorText(()=>{Ei&&Bt(),_r(We.getValue())}),Ei){Bt();try{We.onDidPaste(Bi=>{const Ve=We.getSelection(),tr=Gi.current.pastePos||{},dr=new Lt.Range(tr.startLineNumber||Ve.endLineNumber,tr.startColumn||Ve.endColumn,tr.endLineNumber||Ve.endLineNumber,tr.endColumn||Ve.endColumn);We.executeEdits("",[{range:Bi.range,text:""}])})}catch(Bi){}}let Li=Ke();return no&&typeof no=="string"&&new Bn(no,We,Lt),Je(!0),()=>{const Bi=Gi.current.instance;Bi.dispose();const Ve=Bi.getModel();Ve&&Ve.dispose(),Gi.current.subscription&&Gi.current.subscription.dispose(),Li.unobserve(Tt.current)}}catch(We){}})},[]),(0,Ct.useEffect)(()=>{if(Gi.current.instance&&je)return document.addEventListener("keydown",fi,!1),()=>{document.removeEventListener("keydown",fi)}},[bi,je]),(0,Ct.useEffect)(()=>{let _n=Gi.current.instance;if(_n&&je){let We=vt(nn);Lt.editor.setModelLanguage(_n.getModel(),We)}},[nn,je]),(0,Ct.useEffect)(()=>{Gi.current.instance&&je&&Lt.editor.setTheme(ui)},[ui,je]),(0,Ct.useEffect)(()=>{let _n=Gi.current.instance;Vi.current=On,_n&&je&&(_n.updateOptions(en({},On)),setTimeout(()=>{_n.getModel().updateOptions(en({},On))},200))},[JSON.stringify(On),je]),(0,Ct.useEffect)(()=>{let _n=Gi.current.instance;_n&&je&&_n.layout()},[Me,De,je]);const[ke,zn]=(0,Ct.useState)(Ti(Me)),[ni,Ye]=(0,Ct.useState)(Ti(De)),Kn=ei(en({},mn),{width:ke,height:ni,position:"relative"});return Ct.createElement("div",{className:"my-monaco-editor",ref:Tt,style:Kn},gi&&Ct.createElement(oe.CopyToClipboard,{text:Oe,onCopy:()=>kn.ZP.success("\u590D\u5236\u6210\u529F")},Ct.createElement(Gn.Z,{title:"\u590D\u5236\u4EE3\u7801"},Ct.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Ct.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Le({width:xe="100%",height:Xe="100%",original:Me,modified:De,language:Oe,options:nn={}}){const mn=(0,Ct.useRef)(),[On,yn]=(0,Ct.useState)(null);function ui(cr){let Ei;return mn.current&&(Ei=new ee.Z(Ri=>{for(let Ki of Ri)(Ki.target.offsetHeight>0||Ki.target.offsetWidth>0)&&cr.layout()}),Ei.observe(mn.current)),Ei}(0,Ct.useEffect)(()=>(mn.current&&Promise.all([Qt.e(8909),Qt.e(9404)]).then(Qt.bind(Qt,2550)).then(cr=>{Lt=cr;const Ei=Lt.editor.createDiffEditor(mn.current,ei(en({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},nn),{wordWrap:!0}));yn(Ei);let Ri=ui(Ei);return()=>{Ei.dispose();const Ki=Ei.getModel();Ki&&Ki.dispose(),Ri.unobserve(mn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Ct.useEffect)(()=>{On&&On.setModel({original:Lt.editor.createModel(Me,Oe),modified:Lt.editor.createModel(De,Oe)})},[Me,De,Oe,On]);const oi=Ti(xe),gi=Ti(Xe),bi={width:oi,height:gi};return Ct.createElement("div",{className:"my-diff-editor",ref:mn,style:bi})}},10661:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ie}});var Ct={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"},ee=Qt(29787),ue=Qt(25399),Se=Qt(92310),de=Qt.n(Se),Ht=Qt(51257),ie=Qt(28426),Ae=Qt(48790),re=Qt(59301),Ie=({className:Xt,dataSource:Ee=[],col:It=4,right:nt,bottom:et=23,precision:At=0,wrapWidth:at=1200,trackEventItems:ct,loading:pt,onRemove:xt=()=>{},isCurrent:bt=!0,showAlias:Rt=!1})=>{const Ot=Math.floor((at-(It-1)*nt)/It),Zt=[{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 re.createElement(ee.Z,{spinning:pt},re.createElement("div",{className:de()(Ct.list,Xt)},!!(Ee!=null&&Ee.length)&&(Ee==null?void 0:Ee.map((Vt,$t)=>{var Ce;const{name:fe,id:rn,identifier:tn,featured:Bn,school_name:Fn,image_url:kn,excellent:Gn,is_plan:ti}=Vt;return re.createElement("div",{key:rn,className:Ct.wrap,style:{width:Ot,marginRight:(1+$t)%It===0?0:nt+At,marginBottom:et}},re.createElement("a",{className:Ct.li,onClick:me=>{me.preventDefault(),me.stopPropagation(),ct&&(0,Ht.L9)([ct]),(0,Ht.xg)(`/paths/${tn}`)}},re.createElement("div",{className:Ct.img},re.createElement("img",{className:Ct.cover,src:`${kn}`}),bt&&(0,Ae.bg)()&&(Vt==null?void 0:Vt.studying)&&re.createElement("div",{className:`${Ct.movebq} user-path-items`,onClick:me=>{me.stopPropagation(),xt(Vt)}},re.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),re.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ce=Vt==null?void 0:Vt.subject_tags)==null?void 0:Ce.map((me,oe)=>{var Cn,li;if(oe===0){const sn=(Cn=Zt.find(Rn=>Rn.name==me))==null?void 0:Cn.swimg;return re.createElement("img",{className:Ct.sign,src:sn,style:{left:"-4px"}})}const ai=(li=Zt.find(sn=>sn.name==me))==null?void 0:li.ptimg;return re.createElement("img",{className:Ct.sign,src:ai,style:{left:`${48+52*(oe-1)+2*oe}px`}})}),re.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Vt==null?void 0:Vt.excellent)&&re.createElement("div",{className:Ct.bq},"\u5F00\u653E\u8BFE\u7A0B"))),re.createElement("div",{className:Ct.name},re.createElement(ue.Z,{title:Rt&&(Vt!=null&&Vt.excellent_alias_name)?re.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${fe}`,re.createElement("br",null),re.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Vt==null?void 0:Vt.excellent_alias_name}`)):fe},re.createElement("span",{className:Ct.e},Rt&&(Vt==null?void 0:Vt.excellent_alias_name)||fe))),re.createElement(ue.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Fn}`},re.createElement("div",{className:Ct.unit},re.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Fn)),re.createElement("div",{className:Ct.tags},re.createElement("div",null,re.createElement(ue.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},re.createElement("span",null,re.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),re.createElement("span",null,Vt.stages_count))),re.createElement(ue.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},re.createElement("span",null,re.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),re.createElement("span",null,Vt.members_count)))))))})),!Ee.length&&re.createElement(ie.Z,null)))}},9148:function(xn,ze,Qt){"use strict";Qt.d(ze,{jL:function(){return de},w9:function(){return Cn},QD:function(){return oi},cQ:function(){return kn.Z},op:function(){return Oe},O5:function(){return Vi},_b:function(){return Ki},t7:function(){return at},Gi:function(){return Ui},YG:function(){return Rn},qp:function(){return Ie},vr:function(){return cr},qE:function(){return On},Je:function(){return xt},wb:function(){return Fn},cq:function(){return jt},tp:function(){return It}});var Ct=Qt(59301),ee={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"},ue="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==",de=({dataSource:xi=[],img:Oi,imgWidth:zi=346,title:or,sunTitle:Yr,bannerExtraContent:Tr})=>Ct.createElement("div",{className:ee.banner},Ct.createElement("div",{className:ee.content},Ct.createElement("aside",null,Ct.createElement("p",null,Ct.createElement("b",null,or),Ct.createElement("span",null,Yr)),xi.length>0&&Ct.createElement("div",{className:ee.btns},xi.map((je,Je)=>Ct.createElement("div",{key:Je,onClick:je.click},je.name,je.sign?Ct.createElement("img",{src:ue,width:39}):null))),Tr),Oi&&Ct.createElement("img",{style:{marginTop:33,marginRight:38},src:Oi,width:zi}))),Ht={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"},ie=Qt(92310),Ae=Qt.n(ie),re=Qt(89392),Ie=({dataSource:xi=[],value:Oi,onChange:zi,onTitleChange:or,className:Yr,title:Tr,titleWidth:je=41,style:Je={},fontColor:Ke="#6A7283",showCount:Ci})=>{const[Ne,Qi]=(0,Ct.useState)(0),[Hn,fi]=(0,Ct.useState)(!1),$i=(0,Ct.useRef)(null),Mr=(0,Ct.useRef)(null);return(0,Ct.useEffect)(()=>{var Br;xi.length!==0&&(((Br=$i==null?void 0:$i.current)==null?void 0:Br.clientHeight)>97?Qi(1):Qi(0)),xi.length===0&&Qi(0),fi(!1)},[xi]),Ct.createElement("div",{className:Ae()(Ht.row,Yr),style:Je},Ct.createElement("div",{onClick:(0,re.throttle)(()=>or==null?void 0:or(),2e3),style:{width:je,marginTop:Hn?12:4},className:`${Ht.title} ${or?"current":""}`},Tr),Ct.createElement("div",{className:Hn?`${Ht.tagsWrap} ${Ht.tagsBorderWrap}`:Ht.tagsWrap},Ct.createElement("div",{className:Ht.bar,ref:Mr,style:Ne>0?{height:Ne===1?97:"auto",overflow:Ne===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Ct.createElement("div",{className:Ht.tag,ref:$i},xi==null?void 0:xi.map(Br=>Ct.createElement("span",{onClick:()=>zi(Br.id),key:Br.id,style:{color:Ke},className:Oi===Br.id?Ht.active:""},Ct.createElement("span",{title:Br.name,className:Ht.name},Br.name),!!Ci&&Ct.createElement("span",{className:Ht.num},Br.count))))),!!Ne&&Ct.createElement(Ct.Fragment,null,Ne===1?Ct.createElement("div",{onClick:()=>{var Br;Qi(2),((Br=$i==null?void 0:$i.current)==null?void 0:Br.clientHeight)>245?fi(!0):fi(!1)},className:Ht.action},"\u5C55\u5F00",Ct.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Ct.createElement("div",{onClick:()=>{Mr.current.scrollTop=0,Qi(1),fi(!1)},className:Ht.action},"\u6536\u8D77",Ct.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Xt={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"},It=({dataSource:xi=[],value:Oi,onChange:zi,className:or,style:Yr={}})=>Ct.createElement("div",{style:Yr,className:Ae()(Xt.tabs,or)},xi.map(Tr=>Ct.createElement("span",{onClick:()=>zi(Tr.id),className:Oi===Tr.id?Xt.active:"",key:Tr.id},Tr.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(37568),at=({dataSource:xi=[],value:Oi="",onChange:zi,onInputChange:or=()=>{},className:Yr,style:Tr={},placeholder:je,allowClear:Je=!1})=>{var Ke;const[Ci,Ne]=(0,Ct.useState)(""),[Qi,Hn]=(0,Ct.useState)("");(0,Ct.useEffect)(()=>{var Mr;let Br=Oi;(Mr=JSON.stringify(Oi))!=null&&Mr.includes("{")&&(Ne(Oi.id),Br=Oi.value||"");try{Hn(decodeURIComponent(Br||""))}catch(te){Hn(decodeURIComponent(Br||""))}},[Oi]);const fi=()=>{zi(encodeURIComponent(Qi),Ci||null)},$i=Mr=>{Mr!==Ci&&(Ne(Mr),zi(encodeURIComponent(Qi),Mr))};return Ct.createElement("div",{className:Ae()(nt.input,Yr),style:Tr},!!xi.length&&Ct.createElement("div",{className:nt.dropdown},Ct.createElement("div",{className:nt.text},(Ke=xi.find(Mr=>Mr.id===Ci))==null?void 0:Ke.name,Ct.createElement("i",{className:"iconfont icon-zhankai4"}),Ct.createElement("b",{className:nt.b1}),Ct.createElement("b",{className:nt.b2})),Ct.createElement("div",{className:nt.menu},xi.map((Mr,Br)=>Ct.createElement("div",{key:Br,onClick:()=>$i(Mr.id)},Mr.name)))),Ct.createElement(et.default,{onPressEnter:fi,value:Qi,onChange:Mr=>{Hn(Mr.target.value),or(encodeURIComponent(Mr.target.value),Ci||null)},bordered:!1,placeholder:je}),Ct.createElement("i",{onClick:fi,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ct={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"},xt=({value:xi,onChange:Oi,className:zi,total:or,pageSize:Yr,style:Tr={}})=>{const je=xi<2,Je=xi>=Math.ceil(or/Yr);return or<=Yr?Ct.createElement(Ct.Fragment,null):Ct.createElement("div",{className:Ae()(ct.quickPager,zi),style:Tr},Ct.createElement("div",{onClick:()=>{je||Oi(xi-1,"prev")},className:je?ct.disabled:""},"\u4E0A\u4E00\u9875"),Ct.createElement("div",{onClick:()=>{Je||Oi(xi+1,"next")},className:Je?ct.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"},Rt=Qt(29787),Ot=Qt(25399),Zt=Qt(58018),Vt=Qt(346),$t=Qt(51257),Ce=Qt(96908),fe=Qt(57177),rn=Qt(81378),tn=Qt(28426),Fn=({className:xi,dataSource:Oi=[],col:zi=4,right:or,bottom:Yr=23,precision:Tr=0,wrapWidth:je=1200,trackEventItems:Je,loading:Ke})=>{const Ci=Math.floor((je-(zi-1)*or)/zi);return Ct.createElement(Rt.Z,{spinning:Ke},Ct.createElement("div",{className:Ae()(bt.list,xi)},!!Oi.length&&Oi.map((Ne,Qi)=>{const{name:Hn,id:fi,identifier:$i,power:Mr,cover_image_id:Br,pic:te}=Ne;return Ct.createElement("div",{className:bt.wrap,key:fi,style:{width:Ci,marginRight:(1+Qi)%zi===0?0:or+Tr,marginBottom:Yr}},Ct.createElement("a",{target:"_blank",href:`/shixuns/${$i}/challenges`,className:bt.li,onClick:ke=>{ke.preventDefault(),Je&&(0,$t.L9)([Je]),Mr&&(0,$t.xg)(`/shixuns/${$i}/challenges`)}},Ct.createElement("div",{className:bt.img},Ct.createElement("img",{className:bt.cover,src:`${te}`}),Ne.is_jupyter&&Ct.createElement("img",{className:bt.sign,src:Ce}),Ne.is_jupyter_lab&&Ct.createElement("img",{className:bt.sign,src:fe}),Ne.is_unity_3d&&Ct.createElement("img",{className:bt.sign,src:rn})),Ct.createElement("div",{className:bt.name},Ct.createElement(Ot.Z,{title:Hn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Ct.createElement("span",{className:bt.e},Hn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Ct.createElement("div",{className:bt.tags},Ct.createElement(Ot.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Ct.createElement("span",null,Ct.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Ct.createElement("span",null,Ne.challenges_count))),!!Ne.myshixuns_count&&Ct.createElement(Ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ct.createElement("span",null,Ct.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Ct.createElement("span",null,Ne.myshixuns_count))),Ct.createElement(Ot.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Ct.createElement("span",null,Ct.createElement("span",null,Ne.level))),Ct.createElement("div",{className:bt.rate},Ct.createElement(Zt.Z,{allowHalf:!0,disabled:!0,defaultValue:Ne.score_info}),Ct.createElement("span",null,"\xA0",Ne.score_info?`${Ne.score_info}\u5206`:"5\u5206")))),!Mr&&Ct.createElement("div",{className:bt.lockWrap},Ct.createElement("img",{src:`${Vt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ct.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Oi.length&&Ct.createElement(tn.Z,null)))},kn=Qt(10661),Gn={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"},ti="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",me=Qt(59301),Cn=({className:xi,dataSource:Oi=[],col:zi=4,right:or,bottom:Yr=23,precision:Tr=0,wrapWidth:je=1200,trackEventItems:Je,loading:Ke,handleVery:Ci=()=>!0})=>{const Ne=Math.floor((je-(zi-1)*or)/zi);return me.createElement(Rt.Z,{spinning:Ke},me.createElement("div",{className:Ae()(Gn.list,xi)},!!Oi.length&&Oi.map((Qi,Hn)=>{const{subject_identifier:fi,id:$i,identifier:Mr,power:Br}=Qi,te=Qi.is_public!=0&&Qi.is_public;return me.createElement("div",{className:Gn.wrap,key:$i,style:{width:Ne,marginRight:(1+Hn)%zi===0?0:or+Tr,marginBottom:Yr}},me.createElement("a",{className:Gn.li,onClick:ke=>{ke.preventDefault(),Ci(Qi==null?void 0:Qi.first_category_url)&&(Je&&(0,$t.L9)([Je]),(0,$t.xg)(Qi.first_category_url))}},me.createElement("div",{className:Gn.top},me.createElement(Ot.Z,{title:Qi.name},me.createElement("div",{className:Gn.name},Qi.name)),me.createElement("img",{className:Gn.img,src:Vt.Z.IMG_SERVER+"/images/"+Qi.avatar_url}),me.createElement("div",{className:Gn.text,title:Qi.creator},Qi.creator),fi&&me.createElement("div",{className:Gn.btns},me.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),me.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),te&&me.createElement("div",{className:Gn.sign},"\u516C\u5F00")),me.createElement("div",{className:Gn.bottom},Qi.visits>0&&me.createElement(Ot.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-liulanyan"}),me.createElement("span",null,Qi.visits))),Qi.course_members_count>0&&me.createElement(Ot.Z,{title:"\u6210\u5458",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-chengyuan"}),Qi.course_members_count)),Qi.tasks_count>0&&me.createElement(Ot.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-zuoye"}),Qi.tasks_count)),Qi.is_end?me.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):me.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Qi.is_accessible&&me.createElement("div",{className:Gn.lockWrap},me.createElement("img",{src:`${Vt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),me.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Oi.length&&me.createElement(tn.Z,null)))},li={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"},ai=Qt(25690),Rn=({dataSource:xi=[],value:Oi,onChange:zi,className:or,style:Yr={},tabBarExtraContent:Tr})=>Ct.createElement("div",{className:Ae()(li.tabs,or),style:Yr},Ct.createElement("div",{className:li.tabsWrap},xi.map((je,Je)=>!(je!=null&&je.hide)&&Ct.createElement("aside",{className:li.tab,onClick:()=>{zi(je.id),je.link&&ai.history.push(je.link)},key:Je},Ct.createElement("div",{className:Oi===je.id?li.active:""},je.name),(je==null?void 0:je.resetCount)==null&&(je==null?void 0:je.total)!==void 0&&Ct.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&&Ct.createElement(Ot.Z,{title:(je==null?void 0:je.tip)!=null?je==null?void 0:je.tip:""},Ct.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Ct.createElement("span",{style:{color:"#000"}},je==null?void 0:je.resetCount),"/",Ct.createElement("span",null,je==null?void 0:je.total),"\uFF09"))))),Ct.createElement("div",{className:li.tabBar},Tr)),Ui=({className:xi,style:Oi={},children:zi})=>Ct.createElement("div",{className:Ae()(xi),style:Oi},zi),en={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"},ei=Qt(75727),Fe=Qt(93041);const ci=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var jt=({sortValue:xi,dropValue:Oi,className:zi,onSort:or,onDrop:Yr,dataSource:Tr=ci})=>{var je;return Ct.createElement("div",{className:Ae()(en.orderWrap,zi)},Ct.createElement(ei.Z,{dropdownRender:()=>Ct.createElement(Fe.default,null,Tr.map((Je,Ke)=>Ct.createElement(Fe.default.Item,{key:Ke,onClick:()=>Yr(Je.id)},Je.name)))},Ct.createElement("span",{className:en.orderTextWrap},(je=Tr.find(Je=>Oi===Je.id))==null?void 0:je.name)),Ct.createElement("span",{className:en.orderIconWrap},Ct.createElement("span",{className:en.orderAsc},Ct.createElement("i",{className:xi==="asc"?`iconfont icon-sanjiaoxing-up font12 ${en.cursorPointer} ${en.active}`:`iconfont icon-sanjiaoxing-up font12 ${en.cursorPointer}`,onClick:()=>or(xi==="asc"?"desc":"asc")})),Ct.createElement("span",{className:en.orderDesc},Ct.createElement("i",{className:xi==="desc"?`iconfont icon-sanjiaoxing-down font12 ${en.cursorPointer} ${en.active}`:`iconfont icon-sanjiaoxing-down font12 ${en.cursorPointer}`,onClick:()=>or(xi==="asc"?"desc":"asc")}))))},Mt={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(99571),vt=Object.defineProperty,Lt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,Le=(xi,Oi,zi)=>Oi in xi?vt(xi,Oi,{enumerable:!0,configurable:!0,writable:!0,value:zi}):xi[Oi]=zi,xe=(xi,Oi)=>{for(var zi in Oi||(Oi={}))Bt.call(Oi,zi)&&Le(xi,zi,Oi[zi]);if(Lt)for(var zi of Lt(Oi))_t.call(Oi,zi)&&Le(xi,zi,Oi[zi]);return xi},Xe=(xi,Oi)=>{var zi={};for(var or in xi)Bt.call(xi,or)&&Oi.indexOf(or)<0&&(zi[or]=xi[or]);if(xi!=null&&Lt)for(var or of Lt(xi))Oi.indexOf(or)<0&&_t.call(xi,or)&&(zi[or]=xi[or]);return zi},Me=(xi,Oi,zi)=>new Promise((or,Yr)=>{var Tr=Ke=>{try{Je(zi.next(Ke))}catch(Ci){Yr(Ci)}},je=Ke=>{try{Je(zi.throw(Ke))}catch(Ci){Yr(Ci)}},Je=Ke=>Ke.done?or(Ke.value):Promise.resolve(Ke.value).then(Tr,je);Je((zi=zi.apply(xi,Oi)).next())}),Oe=xi=>{var Oi=xi,{className:zi,style:or,children:Yr,loading:Tr=!1,openLoading:je,onClick:Je=()=>{},size:Ke="middle",shape:Ci="round"}=Oi,Ne=Xe(Oi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Qi,Hn]=(0,Ct.useState)(!1);return Ct.createElement(mt.ZP,xe({onClick:(0,re.throttle)(fi=>Me(void 0,null,function*(){je&&Hn(!0);try{yield Je(fi)}catch($i){console.log("error",$i)}je&&Hn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ae()(Mt.btn,Mt[`${Ke}-${Ci}`],zi),style:or,size:Ke,shape:Ci,loading:Qi||Tr},Ne),Yr)},nn={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"},On=({className:xi,style:Oi,children:zi=null,onClick:or,title:Yr})=>Ct.createElement("div",{className:Ae()(nn.head,xi),style:Oi},Ct.createElement("span",{className:"primary-hover",onClick:or},Ct.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Ct.createElement("b",{title:Yr},Yr),Ct.createElement("div",{className:nn.node},zi)),yn={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"},oi=({confirmShow:xi=!0,confirmTitle:Oi,confirmClick:zi,cancelShow:or=!0,cancelTitle:Yr,cancelClick:Tr,className:je,style:Je,confirmLoading:Ke=!1})=>Ct.createElement("div",{className:Ae()(yn.btns,je),style:Je},xi&&Ct.createElement(mt.ZP,{loading:Ke,onClick:zi,type:"primary",className:yn.confirm},Oi),or&&Ct.createElement(mt.ZP,{onClick:Tr,className:yn.cancel},Yr)),gi={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"},cr=({className:xi,style:Oi={},LeftContent:zi,children:or,RightContent:Yr})=>Ct.createElement("div",{className:Ae()(gi.fixedBottom,xi),style:Oi},Ct.createElement("div",{className:gi.wrap},Ct.createElement("div",{className:gi.left},zi),Ct.createElement("div",{className:gi.center},or),Ct.createElement("div",{className:gi.right},Yr))),Ei={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"},Ki=({className:xi,style:Oi={},dataSource:zi=[]})=>Ct.createElement("div",{className:Ae()(Ei.crumbs,xi),style:Oi},zi.map((or,Yr)=>Yr<zi.length-1?Ct.createElement(Ct.Fragment,{key:Yr},or.path||or.onClick?Ct.createElement("span",{className:Ei.hover,onClick:or!=null&&or.onClick?or.onClick:()=>ai.history.push(or.path)},or.name):Ct.createElement("span",null,or.name),Ct.createElement("span",null,"\xA0",">","\xA0")):Ct.createElement("span",{key:Yr,style:{color:"#5F6368"}},or.name))),_r=Qt(11938),Ji=Object.defineProperty,Er=Object.defineProperties,yr=Object.getOwnPropertyDescriptors,Vr=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,oo=Object.prototype.propertyIsEnumerable,xo=(xi,Oi,zi)=>Oi in xi?Ji(xi,Oi,{enumerable:!0,configurable:!0,writable:!0,value:zi}):xi[Oi]=zi,no=(xi,Oi)=>{for(var zi in Oi||(Oi={}))Zi.call(Oi,zi)&&xo(xi,zi,Oi[zi]);if(Vr)for(var zi of Vr(Oi))oo.call(Oi,zi)&&xo(xi,zi,Oi[zi]);return xi},br=(xi,Oi)=>Er(xi,yr(Oi)),uo=(xi,Oi)=>{var zi={};for(var or in xi)Zi.call(xi,or)&&Oi.indexOf(or)<0&&(zi[or]=xi[or]);if(xi!=null&&Vr)for(var or of Vr(xi))Oi.indexOf(or)<0&&oo.call(xi,or)&&(zi[or]=xi[or]);return zi};const{Countdown:Tt}=_r.default;var Vi=xi=>{var Oi=xi,{onChange:zi}=Oi,or=uo(Oi,["onChange"]);const[Yr,Tr]=(0,Ct.useState)(null);(0,Ct.useEffect)(()=>{typeof Yr=="number"&&Yr>=0&&zi(Yr)},[Yr]);const je=Je=>{const Ke=Math.floor(Je/1e3);Tr(Ke)};return Ct.createElement(Tt,br(no({},or),{onChange:je}))}},37808:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ee}});var Ct=Qt(59301);function ee(ue,Se){const de=(0,Ct.useRef)();(0,Ct.useEffect)(()=>{de.current=ue}),(0,Ct.useEffect)(()=>{function Ht(){de.current()}if(Se!==null){let ie=setInterval(Ht,Se);return()=>clearInterval(ie)}},[Se])}},96954:function(xn,ze,Qt){"use strict";Qt.r(ze),Qt.d(ze,{default:function(){return _n}});var Ct=Qt(59301),ee=Qt(61186),ue=Qt.n(ee),Se=Qt(86129),de=Qt.n(Se),Ht=Qt(38986),ie=Qt(25690),Ae=Qt(62957),re=Qt(6767),Wt=Qt(458),Ie=Qt(91882),Xt=Qt(77019),Ee=Qt(5269),It=Qt(99571),nt=Qt(25399),et=Qt(37285),At=Qt(37568),at=Qt(54172),ct=Qt(82326),pt=Qt(13747),xt=Qt(27812),bt=Qt(95869),Rt=Qt(87169),Ot=Qt(26227),Zt=Qt(346),Vt=Qt(48790),$t=Qt(51257),Ce=Qt(42441),fe={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"},rn={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const tn=({shixunHomeworks:We,data:on,globalSetting:An,loading:Nn,dispatch:Vn})=>{var Yi;const{shixunWorkReport:Li}=We;let Bi=((Yi=on==null?void 0:on.efficiency_list)==null?void 0:Yi.length)-parseInt(on==null?void 0:on.myself_eff[0]);const Ve=()=>({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(dr){return dr.name===Li.username?"\u59D3\u540D\uFF1A"+Li.username+"<br/>\u5B66\u53F7\uFF1A "+Li.user_id+"<br/>\u6548\u7387\uFF1A"+(on==null?void 0:on.myself_eff[1]):dr.name+":"+dr.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:on==null?void 0:on.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:Li.username,xAxis:Bi,yAxis:on==null?void 0:on.myself_eff[1],value:on==null?void 0:on.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),tr=()=>({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(dr){var qr=dr.value;if(dr.name===Li.username)return"\u59D3\u540D\uFF1A"+Li.username+"<br/>\u5B66\u53F7\uFF1A "+Li.user_id+"<br/>\u5F97\u5206\uFF1A"+(on==null?void 0:on.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:rn,data:on==null?void 0:on.consume_list,symbolSize:function(dr){return Math.round(dr[2])},markPoint:{data:[{name:Li.username,xAxis:on==null?void 0:on.myself_object[0],yAxis:on==null?void 0:on.myself_object[1],value:on==null?void 0:on.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return Ct.createElement(Ct.Fragment,null,Ct.createElement("aside",{className:"ml60 pr30"},Ct.createElement(Xt.Z,null,Ct.createElement(Ee.Z,{flex:"800px"},Ct.createElement(Ce.Z,{style:{width:750,height:580},option:Ve()})),Ct.createElement(Ee.Z,{flex:"1"},Ct.createElement("aside",{className:fe.rightInfo},Ct.createElement("ul",null,Ct.createElement("li",null,Ct.createElement("span",null,"\u59D3\u540D")," ",Ct.createElement("span",{className:"ml30"},Li.username)),Ct.createElement("li",null,Ct.createElement("span",null,"\u5B66\u53F7")," ",Ct.createElement("span",{className:"ml30"},Li.student_id||"--")),Ct.createElement("li",null,Ct.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",Ct.createElement("span",{className:"ml30 c-orange"},on==null?void 0:on.myself_eff[1])),Ct.createElement("li",null,Ct.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",Ct.createElement("span",{className:"ml30 c-orange"},on==null?void 0:on.myself_eff[0]))),Ct.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",Ct.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",Ct.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",Ct.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"))))),Ct.createElement("aside",{className:"ml60 pr30"},Ct.createElement(Xt.Z,null,Ct.createElement(Ee.Z,{flex:"800px"},Ct.createElement(Ce.Z,{style:{width:750,height:580},option:tr()})),Ct.createElement(Ee.Z,{flex:"1"},Ct.createElement("aside",{className:fe.rightInfo},Ct.createElement("ul",null,Ct.createElement("li",null,Ct.createElement("span",null,"\u59D3\u540D")," ",Ct.createElement("span",{className:"ml30"},Li.username)),Ct.createElement("li",null,Ct.createElement("span",null,"\u5B66\u53F7")," ",Ct.createElement("span",{className:"ml30"},Li.student_id||"--")),Ct.createElement("li",null,Ct.createElement("span",null,"\u80FD\u529B")," ",Ct.createElement("span",{className:"ml30 c-orange"},on==null?void 0:on.myself_object[1]))),Ct.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",Ct.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",Ct.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",Ct.createElement("br",null)))))))};var Bn=(0,ie.connect)(({shixunHomeworks:We,loading:on,globalSetting:An})=>({shixunHomeworks:We,globalSetting:An,loading:on.effects}))(tn),Fn=Qt(75975),kn=Qt(71051),Gn=({defaultValue:We,onBlur:on,max:An,className:Nn="game-score"})=>{const[Vn,Yi]=(0,Ct.useState)(We);(0,Ct.useEffect)(()=>{Yi(We)},[We]);function Li(Ve){Yi(Ve)}function Bi(){Vn!==We&&on(Vn>An?An:Vn)}return Ct.createElement(kn.Z,{max:An,min:0,className:Nn,value:Vn,onChange:Li,onBlur:Bi})},ti=Qt(39793),me={md:"md___TEmcT"},oe=Qt(59301),Cn=Object.defineProperty,li=Object.defineProperties,ai=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Rn=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,Ui=(We,on,An)=>on in We?Cn(We,on,{enumerable:!0,configurable:!0,writable:!0,value:An}):We[on]=An,en=(We,on)=>{for(var An in on||(on={}))Rn.call(on,An)&&Ui(We,An,on[An]);if(sn)for(var An of sn(on))ri.call(on,An)&&Ui(We,An,on[An]);return We},ei=(We,on)=>li(We,ai(on));const Fe=ct.default.Option,ci={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var Ti=(We=>(We[We.SET_PATH=0]="SET_PATH",We[We.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",We))(Ti||{});function jt(We,on){switch(on.type){case 0:return ei(en({},We),{selectedPath:on.payload});case 1:return ei(en({},We),{passedContent:on.payload});default:throw new Error}}var Mt=({path:We,game_id:on,onPathChange:An,autoHeight:Nn,diff_code_count:Vn,data:Yi,game_codes_cn:Li})=>{var Bi,Ve,tr,dr;const qr=We.split("\uFF1B").filter(Wi=>!!Wi),[hn,Wn]=(0,Ct.useReducer)(jt,{selectedPath:qr[0],passedContent:{language:"python",content:""}}),{selectedPath:Si,passedContent:vi}=hn;function mi(Wi){Wn({type:0,payload:Wi})}const Ii={\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 oe.createElement(oe.Fragment,null,oe.createElement("h2",null," ",oe.createElement("span",null,Li,oe.createElement(nt.Z,{title:oe.createElement("div",null,oe.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),oe.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),oe.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"),oe.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},oe.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),Vn&&oe.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",Vn),oe.createElement("span",null,oe.createElement(ct.default,{style:{width:200},value:Si,onChange:mi}," ",qr.map(Wi=>oe.createElement(Fe,{key:Wi,value:Wi},Wi))," "))," "),(Si==null?void 0:Si.split(".")[1])==="md"&&oe.createElement(ti.Z,{height:300,autoHeight:Nn,defaultValue:((Ve=(Bi=Yi==null?void 0:Yi.filter(Wi=>Wi.path===Si))==null?void 0:Bi[0])==null?void 0:Ve.content)||"",className:me.md}),(Si==null?void 0:Si.split(".")[1])!=="md"&&oe.createElement(Fn.ZP,{height:300,language:vi.language,value:((dr=(tr=Yi==null?void 0:Yi.filter(Wi=>Wi.path===Si))==null?void 0:tr[0])==null?void 0:dr.content)||"",autoHeight:Nn,theme:"default",isCopy:!0,options:ci}))},mt=Qt(82264),vt=Qt(12911),Lt=Qt.n(vt),Bt=Object.defineProperty,_t=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Xe=(We,on,An)=>on in We?Bt(We,on,{enumerable:!0,configurable:!0,writable:!0,value:An}):We[on]=An,Me=(We,on)=>{for(var An in on||(on={}))Le.call(on,An)&&Xe(We,An,on[An]);if(_t)for(var An of _t(on))xe.call(on,An)&&Xe(We,An,on[An]);return We};const De=We=>React.createElement("svg",Me({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},We),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 Oe="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",nn=Qt(85788),mn=Qt(76902),On=Object.defineProperty,yn=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,oi=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,cr=(We,on,An)=>on in We?On(We,on,{enumerable:!0,configurable:!0,writable:!0,value:An}):We[on]=An,Ei=(We,on)=>{for(var An in on||(on={}))gi.call(on,An)&&cr(We,An,on[An]);if(oi)for(var An of oi(on))bi.call(on,An)&&cr(We,An,on[An]);return We},Ri=(We,on)=>yn(We,ui(on)),Ki=(We,on,An)=>new Promise((Nn,Vn)=>{var Yi=Ve=>{try{Bi(An.next(Ve))}catch(tr){Vn(tr)}},Li=Ve=>{try{Bi(An.throw(Ve))}catch(tr){Vn(tr)}},Bi=Ve=>Ve.done?Nn(Ve.value):Promise.resolve(Ve.value).then(Yi,Li);Bi((An=An.apply(We,on)).next())});const _r=({shixunHomeworks:We,autoHeight:on,classroomList:An,dispatch:Nn})=>{var Vn,Yi,Li,Bi,Ve,tr,dr,qr;const{shixunWorkReport:hn}=We,{stage_list:Wn,work_id:Si,ai_code_evaluation_promote:vi}=hn,[mi,Ii]=(0,Ct.useState)(!1),[Wi,Ar]=(0,Ct.useState)(!0),[ae,ce]=(0,Ct.useState)({left:0,top:0,bottom:0,right:0}),ne=(0,Ct.useRef)(null),[Ge,Be]=(0,Ct.useState)(!1),[cn,Yn]=(0,Ct.useState)(""),Xn=(0,Ct.useRef)(null),ki=(qe,fn)=>{var an;const{clientWidth:gn,clientHeight:qn}=window.document.documentElement,Mn=(an=ne.current)==null?void 0:an.getBoundingClientRect();Mn&&ce({left:-Mn.left+fn.x,right:gn-(Mn.right-fn.x),top:-Mn.top+fn.y,bottom:qn-(Mn.bottom-fn.y)})},ii=(0,ie.useParams)(),be=(0,Vt.GJ)(),yi={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,Ct.useEffect)(()=>{console.log(ii)},[]);const Te=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(qe,fn,an)=>Ct.createElement("div",null,qe,fn.is_work_end_evaluate&&Ct.createElement($t.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:qe=>ue()(qe).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(qe,fn)=>Ct.createElement("span",{className:"c-blue current",onClick:()=>Ki(void 0,null,function*(){var an,gn;const qn=yield(0,mt.Lk)(fn.game_identifier,{path:(gn=(an=fn.path)==null?void 0:an.replace(/\/g,";"))==null?void 0:gn.split(";")[0],query_index:fn.query_index,homework_common_id:ii.categoryId});(qn==null?void 0:qn.status)===0&&(Be(qn),Ii(!0))})},fn.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],un=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(qe,fn)=>{var an;return Ct.createElement("span",null,Ct.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Zt.Z.IMG_SERVER+"/images/"+((an=fn==null?void 0:fn.user)==null?void 0:an.image_url)}),qe)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:qe=>Ct.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",qe,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:qe=>Ct.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",qe,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:qe=>Ct.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",qe?ue()(qe).format("YYYY-MM-DD HH:mm"):"--")}];function Ue(qe,fn){return Ki(this,null,function*(){const{challenge_id:an}=Wn[qe],gn=yield Nn({type:"shixunHomeworks/changeScore",payload:{categoryId:ii.homeworkId,type:"report",score:fn,challenge_id:an}});yield Nn({type:"shixunHomeworks/getShixunWorkReport",payload:Ei({},ii)}),gn.status===0&&re.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function Ut(qe,fn){return(0,Ht.U2)(`student_works/${Si}/rep_passed_content.json`,{path:fn,game_id:qe})}const[pn,Ln]=(0,Ct.useState)((Vn=hn==null?void 0:hn.shixun_detail)==null?void 0:Vn.map(qe=>Ri(Ei({},qe),{commentEdit:!1}))),Ai=qe=>qe.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,"`$&`"),[Zn,Tn]=(0,Ct.useState)(!1),dn=(qe,fn)=>Ki(void 0,null,function*(){var an,gn;Tn(!0),Xn.current=new nn.Z(Zt.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:vi,shixun_id:hn==null?void 0:hn.myshixun_identifier,game_id:qe==null?void 0:qe.id,source:"shixun",is_chat:!1,type:9,description:qe==null?void 0:qe.challenge_description,query:(gn=(an=qe==null?void 0:qe.game_codes)==null?void 0:an[0])==null?void 0:gn.content,homework_common_id:ii.categoryId}),yield new Promise((qn,Mn)=>{Xn.current.on("data",Un=>{const ln=[...pn];ln[fn].comment=Ai(Un==null?void 0:Un.full),Ln(ln)}),Xn.current.on("done",()=>Ki(void 0,null,function*(){var Un;Tn(!1);const ln=[...pn],si=yield(0,Ht.ZP)(`/api/student_works/${ii==null?void 0:ii.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:qe==null?void 0:qe.challenge_id,comment:ln[fn].comment}});if((si==null?void 0:si.status)==0){re.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Mi=[...pn];Mi[fn].comment_updated_at=(Un=si==null?void 0:si.data)==null?void 0:Un.comment_updated_at,Ln(Mi)}})),Xn.current.startStream()})});return Ct.createElement(Ct.Fragment,null,pn==null?void 0:pn.map(function(qe,fn){var an,gn;return Ct.createElement("div",{key:fn},Ct.createElement("aside",{className:"pl30 pr30",key:fn},Ct.createElement("div",{className:`${fe.shixunTitle} mt10`},Ct.createElement("div",null,Ct.createElement("span",{className:"fa fa-code "}),Ct.createElement("strong",{className:"c-black"},"\u7B2C",fn+1,"\u5173 ",Ct.createElement(ie.Link,{className:"c-black",target:"_blank",to:`/tasks/${ii.coursesId}/${ii.categoryId}/${qe.game_identifier}`},qe.subject))),be?Ct.createElement("span",null,"\u8C03\u5206\uFF1A",Ct.createElement(Gn,{className:"game-score",max:Wn[fn].game_score_full,defaultValue:Wn[fn].game_score,onBlur:qn=>{var Mn;if((0,Vt.Rm)()&&!((Mn=An.AssistantObject.practice)!=null&&Mn.can_appraise)){re.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}Ue(fn,qn)}})):null),Ct.createElement("div",{className:"font16 mt10"},qe.st===0&&(qe.path?typeof(qe==null?void 0:qe.game_codes_cn)=="string"?Ct.createElement("aside",{className:fe.shixunWrp},Ct.createElement(Mt,{game_codes_cn:qe==null?void 0:qe.game_codes_cn,autoHeight:on,path:qe.path,game_id:qe.id,data:qe.game_codes,diff_code_count:qe.diff_code_count,onPathChange:Ut})):Ct.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"),qe.st===1&&(qe.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")),Ct.createElement("aside",{className:"mt10 font16"},(an=qe.outputs)!=null&&an.length?Ct.createElement(at.default,{columns:Te,pagination:{hideOnSinglePage:!0},dataSource:qe.outputs.map(qn=>Ei(Ei({},qe),qn))}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"),Ct.createElement("aside",{className:"mt10"},Ct.createElement("div",null,Ct.createElement("div",{style:{display:"flex",alignItems:"center"}},Ct.createElement("strong",{className:"c-black font14"},"\u4EE3\u7801\u8BC4\u4EF7"),!(qe!=null&&qe.commentEdit)&&!(0,Vt.dE)()&&(qe!=null&&qe.comment?Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",qe!=null&&qe.comment_updated_at?ue()(qe==null?void 0:qe.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),Ct.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>Ki(this,null,function*(){Zn?re.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):Ae.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:()=>Ki(this,null,function*(){dn(qe,fn)})})})},Ct.createElement("i",{className:"iconfont icon-zhongxinshengcheng1 mr8 font14"}),"\u91CD\u65B0\u751F\u6210")):Ct.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"auto",cursor:"pointer"},onClick:()=>Ki(this,null,function*(){Zn?re.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):dn(qe,fn)})},Ct.createElement("img",{src:Oe,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(qe!=null&&qe.commentEdit)&&!(0,Vt.dE)()&&Ct.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const qn=[...pn];qn[fn].commentEdit=!0,Ln(qn),Yn(qe==null?void 0:qe.comment)}},Ct.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(qe==null?void 0:qe.commentEdit)&&Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{className:fe.pj_close,onClick:()=>{const qn=[...pn];qn[fn].commentEdit=!1,Ln(qn)}},"\u53D6\u6D88"),Ct.createElement("div",{className:fe.pj_save,onClick:()=>Ki(this,null,function*(){var qn;const Mn=yield(0,Ht.ZP)(`/api/student_works/${ii==null?void 0:ii.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:qe==null?void 0:qe.challenge_id,comment:cn}});if((Mn==null?void 0:Mn.status)==0){re.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Un=[...pn];Un[fn].commentEdit=!1,Un[fn].comment=cn,Un[fn].comment_updated_at=(qn=Mn==null?void 0:Mn.data)==null?void 0:qn.comment_updated_at,Ln(Un)}})},"\u4FDD\u5B58"))),!(qe!=null&&qe.commentEdit)&&Ct.createElement("div",{className:fe.pingjia},qe!=null&&qe.comment?Ct.createElement(mn.Z,{value:qe==null?void 0:qe.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(qe==null?void 0:qe.commentEdit)&&Ct.createElement(At.default.TextArea,{defaultValue:cn,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:qn=>Yn(qn.target.value)}))),Ct.createElement("aside",{className:"mt10 font16"},((gn=qe==null?void 0:qe.adjust_review_score_list)==null?void 0:gn.length)>0&&(0,Vt.GJ)()&&Ct.createElement("div",null,Ct.createElement("strong",{className:"c-black font14"},"\u8C03\u5206\u8BB0\u5F55"),Ct.createElement(at.default,{columns:un,pagination:{hideOnSinglePage:!0},dataSource:qe.adjust_review_score_list,showHeader:!1})))))}),Ct.createElement(Ae.default,{open:mi,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{Be({}),Ii(!1)},onCancel:()=>{Be({}),Ii(!1)},title:Ct.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{Wi&&Ar(!1)},onMouseOut:()=>{Ar(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:qe=>Ct.createElement(Lt(),{disabled:Wi,bounds:ae,nodeRef:ne,onStart:(fn,an)=>ki(fn,an)},Ct.createElement("div",{ref:ne},qe))},Ct.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},Ct.createElement("div",{style:{display:"flex",alignItems:"center"}},((Yi=Ge==null?void 0:Ge.data)==null?void 0:Yi.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?Ct.createElement("i",{style:{color:"#0B9953",fontSize:18,marginRight:10},className:"iconfont icon-duigou1"}):Ct.createElement("i",{style:{color:"#E21010",fontSize:18,marginRight:10},className:"iconfont icon-jinggao1"}),Ct.createElement("div",{style:{color:((Li=Ge==null?void 0:Ge.data)==null?void 0:Li.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(Bi=Ge==null?void 0:Ge.data)==null?void 0:Bi.output_detail)),Ct.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:20}},Ct.createElement("div",null,Ct.createElement("span",{style:{color:"#6A7283"}},"\u8BC4\u6D4B\u65F6\u95F4"),Ct.createElement("span",{style:{marginLeft:8,color:"#232B40"}},ue()((Ve=Ge==null?void 0:Ge.data)==null?void 0:Ve.created_at).format("YYYY-MM-DD HH:mm:ss"))),Ct.createElement("div",null,Ct.createElement("span",{style:{color:"#6A7283"}},"\u7528\u65F6"),Ct.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(tr=Ge==null?void 0:Ge.data)==null?void 0:tr.ts_time,"s")),Ct.createElement("div",null,Ct.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),Ct.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(dr=Ge==null?void 0:Ge.data)==null?void 0:dr.ts_mem,"mb")),Ct.createElement("div",null,Ct.createElement("span",{style:{color:"#6A7283"}},"\u7528\u4F8B\u901A\u8FC7\u7387"),Ct.createElement("span",{style:{marginLeft:8,color:"#232B40"}},((qr=Ge==null?void 0:Ge.data)==null?void 0:qr.test_set_passed_rate)*100,"%")))),Ct.createElement(Fn.ZP,{height:500,autoHeight:on,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((Ge==null?void 0:Ge.content)||""))),options:yi})))};var Ji=(0,ie.connect)(({shixunHomeworks:We,loading:on,globalSetting:An,classroomList:Nn})=>({shixunHomeworks:We,globalSetting:An,loading:on.effects,classroomList:Nn}))(_r),Er=Qt(28284),yr={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},Vr=Qt(6701),Zi=Qt(59301),oo=Object.defineProperty,xo=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,uo=(We,on,An)=>on in We?oo(We,on,{enumerable:!0,configurable:!0,writable:!0,value:An}):We[on]=An,Tt=(We,on)=>{for(var An in on||(on={}))no.call(on,An)&&uo(We,An,on[An]);if(xo)for(var An of xo(on))br.call(on,An)&&uo(We,An,on[An]);return We},Gi=(We,on,An)=>new Promise((Nn,Vn)=>{var Yi=Ve=>{try{Bi(An.next(Ve))}catch(tr){Vn(tr)}},Li=Ve=>{try{Bi(An.throw(Ve))}catch(tr){Vn(tr)}},Bi=Ve=>Ve.done?Nn(Ve.value):Promise.resolve(Ve.value).then(Yi,Li);Bi((An=An.apply(We,on)).next())});const Vi=({shixunHomeworks:We,dispatch:on,classroomList:An})=>{const{shixunWorkReport:Nn}=We,Vn=(0,ie.useParams)(),[Yi,Li]=(0,Ct.useState)(!1),[Bi]=Er.default.useForm(),[Ve,tr]=Ae.default.useModal(),[dr,qr]=(0,Ct.useState)(!1),[hn,Wn]=(0,Ct.useState)(!1);(0,Ct.useEffect)(()=>{var mi,Ii,Wi,Ar;We.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Bi.setFieldsValue({comment:(Ii=(mi=We.actionTabs.selectArrs)==null?void 0:mi.data)==null?void 0:Ii.work_comment,hidden_comment:(Ar=(Wi=We.actionTabs.selectArrs)==null?void 0:Wi.data)==null?void 0:Ar.work_comment_hidden})},[We.actionTabs.key]);const Si=()=>Gi(void 0,null,function*(){const mi=Bi.getFieldsValue();(yield(0,Ht.ZP)(`/api/student_works/${Vn.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:mi.hidden_comment,comment:mi.comment}})).status===0&&(re.ZP.success("\u8BC4\u9605\u6210\u529F"),Bi.resetFields(),on({type:"shixunHomeworks/setActionTabs",payload:{}}),on({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},Vn)}))}),vi=[{title:"\u5173\u5361",dataIndex:"name",render:(mi,Ii,Wi)=>Wi+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(mi,Ii,Wi)=>Zi.createElement("div",null,mi,Ii.complete_status===4&&Zi.createElement($t.vA,{status:Ii.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:mi=>mi?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(mi,Ii)=>Zi.createElement("div",null,Zi.createElement("span",{style:{color:parseFloat(Ii.game_score_full)!==parseFloat(mi)?"#E30000":"#53C41B"}},mi),"/",Ii.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(mi,Ii)=>(0,Vt.GJ)()?Zi.createElement(Gn,{max:Ii.game_score_full,defaultValue:parseFloat(mi),onBlur:Wi=>Gi(void 0,null,function*(){var Ar,ae;if((0,Vt.Rm)()&&!((Ar=An.AssistantObject.practice)!=null&&Ar.can_appraise)){re.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 ce=yield on({type:"shixunHomeworks/changeScore",payload:{categoryId:Vn.homeworkId,type:"report",score:Wi,challenge_id:Ii.challenge_id}});(ae=We==null?void 0:We.actionTabs)==null||ae.fn(),yield on({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},Vn)}),ce.status===0&&re.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):mi}];return Zi.createElement(Zi.Fragment,null,tr,Zi.createElement(Ae.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:We.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Gi(void 0,null,function*(){var mi;if((0,Vt.Rm)()&&!((mi=An.AssistantObject.practice)!=null&&mi.can_appraise)){re.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 Ii=Bi.getFieldsValue();JSON.stringify(Ii)==="{}"||Ii.hidden_comment===""&&Ii.comment===""?Li(!0):Si()}),onCancel:()=>{on({type:"shixunHomeworks/setActionTabs",payload:{}})}},Zi.createElement(Xt.Z,{justify:"space-between",className:yr.info},Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u59D3\u540D"),Zi.createElement("span",{className:yr.blackContent},Nn==null?void 0:Nn.username)),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u5B66\u53F7"),Zi.createElement("span",{className:yr.blackContent},(Nn==null?void 0:Nn.student_id)||"--")),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u73ED\u7EA7"),Zi.createElement("span",{className:yr.blackContent},(Nn==null?void 0:Nn.group_name)||"--")),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u5173\u5361\u5F97\u5206"),Zi.createElement("span",{className:yr.orangeContent},(Nn==null?void 0:Nn.challenge_score)||"--")),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u6548\u7387\u5206"),Zi.createElement("span",{className:yr.orangeContent},(Nn==null?void 0:Nn.eff_score)||"--")),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u8865\u4EA4\u6263\u5206"),Zi.createElement("span",{className:yr.orangeContent},(Nn==null?void 0:Nn.late_penalty)||"--")),Zi.createElement(Ee.Z,null,Zi.createElement("span",{className:`${yr.label} ${yr.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),Zi.createElement("span",{className:yr.orangeContent},(Nn==null?void 0:Nn.work_score)||"--"))),Zi.createElement(Er.default,{form:Bi,onChange:()=>{Yi&&Li(!1)}},Zi.createElement(Xt.Z,{wrap:!1,align:"middle",justify:"space-between"},Zi.createElement(Ee.Z,null,Zi.createElement("div",{className:`${yr.inputLabel} ${yr.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),Zi.createElement(Ee.Z,null,Zi.createElement(Vr.Z,{isShowComponent:(0,Vt.G5)(),ModalProps:{open:dr,onCancel:()=>{qr(!1)}},onDataSelect:(mi,Ii)=>Gi(void 0,[mi,Ii],function*(Wi,{node:Ar}){const ae=()=>{Bi.setFieldsValue({comment:Ar==null?void 0:Ar.value}),qr(!1)};if(Bi.getFieldValue("comment")){Ve.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:ae});return}ae()})},Zi.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:Zi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:mi=>{qr(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),Zi.createElement(Er.default.Item,{name:"comment"},Zi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),Zi.createElement(Xt.Z,{wrap:!1,align:"middle",justify:"space-between"},Zi.createElement(Ee.Z,null,Zi.createElement("div",{className:`${yr.inputLabel} ${yr.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),Zi.createElement(Ee.Z,null,Zi.createElement(Vr.Z,{isShowComponent:(0,Vt.G5)(),ModalProps:{open:hn,onCancel:()=>{Wn(!1)}},onDataSelect:(mi,Ii)=>Gi(void 0,[mi,Ii],function*(Wi,{node:Ar}){const ae=()=>{Bi.setFieldsValue({hidden_comment:Ar==null?void 0:Ar.value}),Wn(!1)};if(Bi.getFieldValue("hidden_comment")){Ve.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:ae});return}ae()})},Zi.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:Zi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:mi=>{Wn(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),Zi.createElement(Er.default.Item,{name:"hidden_comment"},Zi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),Yi&&Zi.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),Zi.createElement("div",{className:yr.tableTitle},"\u5173\u5361\u6210\u7EE9"),Zi.createElement(at.default,{className:yr.scoreTable,dataSource:Nn.stage_list,rowKey:"challenge_id",pagination:!1,columns:vi,scroll:{x:"max-content"}})))};var xi=(0,ie.connect)(({shixunHomeworks:We,classroomList:on})=>({shixunHomeworks:We,classroomList:on}))(Vi),Oi=Qt(97610),zi=Qt(1247),or=Qt(44164),Yr=Qt.n(or),Tr={wrap:"wrap___LZOi9",line:"line___oju0L"},je=Qt(1546),Ke=({detailData:We})=>{var on;return Ct.createElement("div",{className:Tr.wrap},Ct.createElement(je.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,je.Uf)(We),(We==null?void 0:We.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},Ct.createElement(je.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,je.Uf)(We)}),!!((on=We==null?void 0:We.photos)!=null&&on.length)&&Ct.createElement(Ct.Fragment,null,Ct.createElement("div",{className:Tr.line}),Ct.createElement(je._s,{dataSource:We==null?void 0:We.photos,right:21,col:4,wrapWidth:1140}))))},Ci=Qt(40133),Ne=Qt(59301),Qi=Object.defineProperty,Hn=Object.defineProperties,fi=Object.getOwnPropertyDescriptors,$i=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable,te=(We,on,An)=>on in We?Qi(We,on,{enumerable:!0,configurable:!0,writable:!0,value:An}):We[on]=An,ke=(We,on)=>{for(var An in on||(on={}))Mr.call(on,An)&&te(We,An,on[An]);if($i)for(var An of $i(on))Br.call(on,An)&&te(We,An,on[An]);return We},zn=(We,on)=>Hn(We,fi(on)),ni=(We,on)=>{var An={};for(var Nn in We)Mr.call(We,Nn)&&on.indexOf(Nn)<0&&(An[Nn]=We[Nn]);if(We!=null&&$i)for(var Nn of $i(We))on.indexOf(Nn)<0&&Br.call(We,Nn)&&(An[Nn]=We[Nn]);return An},Ye=(We,on,An)=>new Promise((Nn,Vn)=>{var Yi=Ve=>{try{Bi(An.next(Ve))}catch(tr){Vn(tr)}},Li=Ve=>{try{Bi(An.throw(Ve))}catch(tr){Vn(tr)}},Bi=Ve=>Ve.done?Nn(Ve.value):Promise.resolve(Ve.value).then(Yi,Li);Bi((An=An.apply(We,on)).next())});const Kn=We=>{var on=We,{shixunHomeworks:An,classroomList:Nn,globalSetting:Vn,loading:Yi,user:Li,dispatch:Bi}=on,Ve=ni(on,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),tr,dr,qr;const[hn,Wn]=(0,Ct.useState)(ke({},(0,ie.useParams)())),Si=(0,ie.useParams)(),[vi,mi]=(0,Ct.useState)({page:1,page_size:10}),Ii=(0,ie.useLocation)(),[]=(0,Ct.useState)([]),[Wi,Ar]=(0,Ct.useState)(),ae=(0,Ct.useRef)(),ce=(0,Ct.useRef)(),[ne,Ge]=(0,Ct.useState)(!1),[Be,cn]=(0,Ct.useState)(!0),[Yn,Xn]=(0,Ct.useState)(!1),[ki,ii]=(0,Ct.useState)(!1),{shixunWorkReport:be}=An,[yi,Te]=(0,Ct.useState)(),[un,Ue]=(0,Ct.useState)([]),[Ut,pn]=(0,Ct.useState)(),[Ln,Ai]=(0,Ct.useState)("all"),Zn=(0,Vt.GJ)(),[Tn,dn]=(0,Ct.useState)(new(de())),[qe,fn]=(0,Ct.useState)(0),[an,gn]=(0,Ct.useState)(!1),[qn,Mn]=(0,Ct.useState)(!1),[Un,ln]=(0,Ct.useState)(!1),[si,Mi]=(0,Ct.useState)(""),[er,Hi]=(0,Ct.useState)(!1),[Fr,wr]=(0,Ct.useState)(!0),[Qr,Or]=(0,Ct.useState)(0),Lr=(0,Ct.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),Xr=(0,Ct.useRef)(),He=()=>Ye(void 0,null,function*(){(Li.userInfo.is_teacher||Li.userInfo.admin)&&(Hi(!0),wr(!1))});(0,Ct.useEffect)(()=>{var ji;(0,Vt.Rm)()&&Nn.AssistantObject.practice&&!((ji=Nn.AssistantObject.practice)!=null&&ji.can_view)&&ie.history.replace("/403")},[(tr=Nn.AssistantObject.practice)==null?void 0:tr.can_view]),(0,Ct.useEffect)(()=>{He(),console.log("\u6253\u5370\u7684------",be),Xr.current=be==null?void 0:be.next_student_work_id,Mi(be.repeat_minus_score)},[be,Li]),(0,Ct.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",be.work_score),Or(be.work_score)},[be.work_score,si]),(0,Ct.useEffect)(()=>(Bi({type:"globalSetting/footerToggle",payload:!1}),()=>{Bi({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,Ct.useEffect)(()=>{var ji;if(be){let Nr=[];(ji=be==null?void 0:be.target_test_sets)==null||ji.map((so,di)=>{var ir;(ir=so==null?void 0:so.targets)==null||ir.map((fr,Rr)=>{var $r;fr.name=so==null?void 0:so.name,fr.total_target_score=so==null?void 0:so.total_target_score,fr.actual_target_score=so==null?void 0:so.actual_target_score,fr.rowSpan=Rr===0?($r=so==null?void 0:so.targets)==null?void 0:$r.length:0,fr.order=di+1,Nr.push(fr)})}),Te(Nr),(0,Vt.Rm)()&&Bi({type:"classroomList/getAssistantPermissions",payload:{course_id:hn.coursesId}})}},[be]),(0,Ct.useEffect)(()=>{An.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(be==null?void 0:be.students_count)>0&&!Be&&setTimeout(()=>{Pr("all")},800)},[be==null?void 0:be.homework_common_id,Be]),(0,Ct.useEffect)(()=>{Wn(ke({},Si))},[Ii.pathname]);const xr=()=>{document.body.scrollIntoView()},Ur=ji=>{vi.page=ji,mi(ke({},vi)),nr(vi,Ln)},nr=(ji,Nr)=>Ye(void 0,null,function*(){Xn(!0);const so=yield(0,Ht.ZP)(`/api/student_works/${hn==null?void 0:hn.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:zn(ke({},ji),{challenge_id:Nr=="all"?null:Nr})});(so==null?void 0:so.status)===0&&(Ue(so==null?void 0:so.list),pn(so==null?void 0:so.count)),Xn(!1)});function kr(){return Ye(this,null,function*(){Lr.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const gr=()=>{document.querySelectorAll("canvas").forEach(ji=>{(!ji.clientWidth||!ji.clientHeight)&&ji.remove()})},co=()=>{ae.current.offsetHeight>62e3?ii(!1):ii(!0)},io=ji=>Ye(void 0,null,function*(){const Nr=yield(0,zi.t1)({homeworkId:ji||hn.homeworkId});Ar(Nr==null?void 0:Nr.data)}),Pr=ji=>Ye(void 0,null,function*(){var Nr,so,di,ir;let fr=0,Rr;Rr=Ae.default.info({width:460,title:Ne.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",Ne.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:Ne.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",Ne.createElement("span",{className:"c-blue"},fr+1),"/",ji!=="all"?1:be==null?void 0:be.students_count,Ne.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:fe.modal,onOk:()=>{}});const $r={margin:[0,0],filename:`${be!=null&&be.student_id&&(be==null?void 0:be.student_id)!="--"?be==null?void 0:be.student_id:""}${be.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},Bo=Tn.folder(be==null?void 0:be.shixun_name);function rr(So){return Ye(this,null,function*(){yield io(So||Xr.current);const ao=yield Bi({type:"shixunHomeworks/getShixunWorkReport",payload:ke({homeworkId:So||Xr.current},Lr.current||{})});Xr.current=ao==null?void 0:ao.next_student_work_id,xr(),fr++,setTimeout(()=>Ye(this,null,function*(){var es,to,Do,Ro;gr();const Ls=Bo.folder(`${ao==null?void 0:ao.group_name}`).folder(`${ao!=null&&ao.student_id&&(ao==null?void 0:ao.student_id)!="--"?ao.student_id+"+":""}${ao==null?void 0:ao.username}`),Go=document.querySelector("#export-all").children;let la=Yr()();for(let yo=0;yo<Go.length;yo++)yield la.set($r).from(Go[yo]).toContainer().toCanvas().toPdf().get("pdf").then(da=>Ye(this,null,function*(){yo<Go.length-1&&(yield da.addPage())}));if(Ls.file(`${ao!=null&&ao.student_id&&(ao==null?void 0:ao.student_id)!="--"?ao.student_id+"+":""}${ao==null?void 0:ao.username}.pdf`,la.output("blob")),((es=ao==null?void 0:ao.shixun_detail)==null?void 0:es.length)>0&&((Do=(to=ao==null?void 0:ao.shixun_detail)==null?void 0:to.filter(yo=>{var da;return((da=yo==null?void 0:yo.game_codes)==null?void 0:da.length)>0}))==null?void 0:Do.length)>0){const yo=Ls.folder("\u4EE3\u7801\u6587\u4EF6");(Ro=ao==null?void 0:ao.shixun_detail)==null||Ro.map((da,za)=>{var Sa,Yo;if(((Sa=da==null?void 0:da.game_codes)==null?void 0:Sa.length)>0){const Ia=yo.folder(`\u7B2C${za+1}\u5173-${da.subject}-${da.id}`);(Yo=da==null?void 0:da.game_codes)==null||Yo.map(dl=>{Ia.file(`${dl.filename}.txt`,dl==null?void 0:dl.content)})}})}Rr.update({content:Ne.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",Ne.createElement("span",{className:"c-blue"},fr),"/",ao==null?void 0:ao.students_count,Ne.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),fr==(ao==null?void 0:ao.students_count)?(Rr.destroy(),vo()):rr()}),2200)})}if(ji!=="all"||(be==null?void 0:be.students_count)<2){gr(),xr();const So=ce.current.children;let ao=Yr()();const to=Bo.folder(`${be==null?void 0:be.group_name}`).folder(`${be!=null&&be.student_id&&(be==null?void 0:be.student_id)!="--"?(be==null?void 0:be.student_id)+"+":""}${be==null?void 0:be.username}`);for(let Do=0;Do<So.length;Do++)yield ao.set($r).from(So[Do]).toContainer().toCanvas().toPdf().get("pdf").then(Ro=>Ye(void 0,null,function*(){Do<So.length-1&&(yield Ro.addPage())}));if(Ge(!1),to.file(`${be!=null&&be.student_id&&(be==null?void 0:be.student_id)!="--"?(be==null?void 0:be.student_id)+"+":""}${be.username}.pdf`,ao.output("blob"),{base64:!1}),((Nr=be==null?void 0:be.shixun_detail)==null?void 0:Nr.length)>0&&((di=(so=be==null?void 0:be.shixun_detail)==null?void 0:so.filter(Do=>{var Ro;return((Ro=Do==null?void 0:Do.game_codes)==null?void 0:Ro.length)>0}))==null?void 0:di.length)>0){const Do=to.folder("\u4EE3\u7801\u6587\u4EF6");(ir=be==null?void 0:be.shixun_detail)==null||ir.map((Ro,$o)=>{var Ls,Go;if(((Ls=Ro==null?void 0:Ro.game_codes)==null?void 0:Ls.length)>0){const la=Do.folder(`\u7B2C${$o+1}\u5173-${Ro.subject}-${Ro.id}`);(Go=Ro==null?void 0:Ro.game_codes)==null||Go.map(yo=>{la.file(`${yo.filename}.txt`,yo==null?void 0:yo.content)})}})}Rr.destroy(),vo();return}else rr(be==null?void 0:be.first_student_work_id)}),vo=()=>{Tn.generateAsync({type:"blob"}).then(function(ji){console.log(be,"shixunWorkReport");const Nr=document.createElement("a");Nr.href=window.URL.createObjectURL(ji),Nr.download=(be==null?void 0:be.shixun_name)+".zip",document.body.appendChild(Nr);const so=document.createEvent("MouseEvents");so.initEvent("click",!1,!1),Nr.dispatchEvent(so),document.body.removeChild(Nr),dn(new(de()))}),ii(!1)};(0,Ct.useEffect)(()=>{ks()},[hn.homeworkId]);const ks=()=>Ye(void 0,null,function*(){cn(!0),yield Bi({type:"shixunHomeworks/getShixunWorkReport",payload:ke(ke({},hn),Lr.current||{})}),io(),(0,Vt.GJ)()&&kr(),cn(!1)}),us=[{title:"\u5173\u5361",dataIndex:"name",render:(ji,Nr,so)=>so+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(ji,Nr,so)=>Ne.createElement("div",null,ji,Nr.complete_status===4&&Ne.createElement($t.vA,{status:Nr.complete_status}))},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:(ji,Nr,so)=>ji||"- -"},{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:ji=>ji?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(ji,Nr)=>Ne.createElement("div",null,Ne.createElement("span",{style:{color:parseFloat(Nr.myself_experience)!==parseFloat(ji)?"red":"green"}},Nr.myself_experience),"/",ji)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(ji,Nr)=>Ne.createElement("div",null,Ne.createElement("span",{style:{color:parseFloat(Nr.game_score_full)!==parseFloat(ji)?"red":"green"}},ji),"/",Nr.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(ji,Nr)=>Zn?Ne.createElement(Gn,{max:Nr.game_score_full,defaultValue:parseFloat(ji),onBlur:so=>Ye(void 0,null,function*(){var di;if((0,Vt.Rm)()&&!((di=Nn.AssistantObject.practice)!=null&&di.can_appraise)){re.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 ir=yield Bi({type:"shixunHomeworks/changeScore",payload:{categoryId:hn.homeworkId,type:"report",score:so,challenge_id:Nr.challenge_id}});nr({page:1,page_size:10},"all"),yield Bi({type:"shixunHomeworks/getShixunWorkReport",payload:ke(ke({},hn),Lr.current||{})}),ir.status===0&&re.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):ji}];let Da=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(ji,Nr,so)=>({children:ji,props:{rowSpan:Nr.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(ji,Nr,so)=>({children:ji,props:{rowSpan:Nr.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:(ji,Nr,so)=>Ne.createElement("div",null,Ne.createElement("span",{style:{color:parseFloat(Nr.actual_test_score)!==parseFloat(ji)?"red":"green"}},Nr.actual_test_score),"/",ji)},{title:"\u6307\u6807\u603B\u5206",render:(ji,Nr,so)=>({children:Ne.createElement("div",null,Ne.createElement("span",{style:{color:parseFloat(Nr.actual_target_score)!==parseFloat(ji)?"red":"green"}},Nr.actual_target_score),"/",ji),props:{rowSpan:Nr.rowSpan}}),dataIndex:"total_target_score",key:"total_target_score"}];const Ks=[{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:ji=>Ne.createElement("span",null,ji?ue()(ji).format("YYYY-MM-DD HH:mm"):"--")}],ar=ji=>{Bi({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{ji==="next"?ie.history.push(`/classrooms/${hn.coursesId}/shixun_homework/${hn.categoryId}/${be==null?void 0:be.next_student_work_id}/comment`):ie.history.push(`/classrooms/${hn.coursesId}/shixun_homework/${hn.categoryId}/${be==null?void 0:be.pre_student_work_id}/comment`)},200)},rs=ji=>{Mi(""),ji.target.value&&(console.log("\u8FDB\u6765",be),ji.target.value=ji.target.value>be.repeat_setting_score?be.repeat_setting_score:ji.target.value,Mi(ji.target.value))},os=()=>Ye(void 0,null,function*(){const ji=yield(0,Ht.ZP)(`/api/student_works/${be==null?void 0:be.work_id}/update_repeat_score`,{method:"put",body:{score:si}});yield Bi({type:"shixunHomeworks/getShixunWorkReport",payload:ke(ke({},hn),Lr.current||{})}),ji.status===0&&re.ZP.info("\u64CD\u4F5C\u6210\u529F")});return Ne.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},Ne.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},Ne.createElement(Wt.Z,{loading:Yi["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},Ne.createElement("div",{className:"edu-container"},be.course_id&&Ne.createElement("section",{className:"animated fadeIn"},Ne.createElement("aside",{className:""},be.category&&Ne.createElement(Ie.Z,{separator:">"},Ne.createElement(Ie.Z.Item,null,Ne.createElement(ie.Link,{to:`/classrooms/${be.course_id}/shixun_homework`},be.course_name)),Ne.createElement(Ie.Z.Item,null,Ne.createElement(ie.Link,{to:`/classrooms/${be.course_id}/shixun_homework/${be.category.main?"":be.category.category_id}`},be.category.category_name)),Ne.createElement(Ie.Z.Item,null,Ne.createElement(ie.Link,{to:`/classrooms/${be.course_id}/shixun_homework/${be.homework_common_id}/detail${(0,Vt.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),Ne.createElement(Ie.Z.Item,null,be.username))),Ne.createElement("aside",{className:[fe.title1,"mt20"].join(" ")},Ne.createElement(Xt.Z,{align:"middle"},Ne.createElement(Ee.Z,{flex:1},Ne.createElement(ie.Link,{to:`/classrooms/${be.course_id}/shixun_homework/${be.homework_common_id}/detail`},Ne.createElement(xt.Z,{className:"font16 c-black"})),Ne.createElement("strong",{className:"font20 ml5"},be==null?void 0:be.homework_name),Ne.createElement($t.VV,{temporary:!0,status:be.homework_status})),Ne.createElement(Ee.Z,{className:fe.title1_right},be.view_tpi&&Ne.createElement(It.ZP,{onClick:()=>{var ji,Nr;(0,$t.xg)(`/tasks/${be==null?void 0:be.course_id}/${be==null?void 0:be.homework_common_id}/${(Nr=(ji=be==null?void 0:be.shixun_detail)==null?void 0:ji[0])==null?void 0:Nr.game_identifier}`)}},Ne.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,Vt.GJ)()&&be.homework_end===!1&&!!be.myshixun_id&&Ne.createElement(It.ZP,{className:"ml10",onClick:()=>Ye(void 0,null,function*(){yield Bi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:be.myshixun_identifier},homework_common_id:Si.categoryId}})})},Ne.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),Ne.createElement(It.ZP,{className:"ml10",onClick:()=>{var ji;if((0,Vt.Rm)()&&!((ji=Nn.AssistantObject.practice)!=null&&ji.can_download)){re.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}Pr("")},loading:ne},Ne.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,Vt.GJ)()&&(be==null?void 0:be.students_count)>1&&Ne.createElement(It.ZP,{className:"ml10",onClick:()=>{var ji;if((0,Vt.Rm)()&&!((ji=Nn.AssistantObject.practice)!=null&&ji.can_download)){re.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}Ae.default.confirm({title:"\u9009\u62E9\u5BFC\u51FA\u65B9\u5F0F",closable:!0,icon:null,centered:!0,okText:Ne.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:Ne.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:()=>{Pr("all")},onCancel:()=>{},cancelButtonProps:{onClick:()=>{(0,Ci.jj)({categoryId:hn.categoryId,coursesId:hn.coursesId},"shixun_report")}}})}},Ne.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),Ne.createElement("aside",{className:"mt30 relative"})),Ne.createElement("aside",{className:"edu-container bg-white",ref:ae},Ne.createElement("div",{id:"export-all",ref:ce},Ne.createElement("div",{id:"export-all-1"},Ne.createElement("div",{className:fe.title},Ne.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),Ne.createElement("div",null,(0,Vt.GJ)()&&Ne.createElement(It.ZP,{className:"mr20",type:"primary",onClick:()=>{Bi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:be.user_id,data:ke({},be)},fn:()=>nr({page:1,page_size:10},"all")}})}},Ne.createElement(bt.Z,null),be.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),Ne.createElement(et.Z,{style:{marginTop:0}}),Ne.createElement(Xt.Z,{className:"pl30 pr30"},Ne.createElement(Ee.Z,null,Ne.createElement("img",{className:fe.userPic,src:`${Zt.Z.IMG_SERVER}/images/${be.image_url}`,alt:be.username})),Ne.createElement(Ee.Z,null,Ne.createElement("span",{className:"font16 ml40"},be.username),Ne.createElement($t.vA,{status:be.compelete_status}),Ne.createElement("ul",{className:fe.userInfo},Ne.createElement("li",null,"\u5B66\u53F7\uFF1A",be.student_id||"--"),Ne.createElement("li",null,"\u5206\u73ED\uFF1A",be.group_name||"--"),Ne.createElement("br",null),Ne.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",Ne.createElement("span",{className:"c-red"},be.complete_count),"/",Ne.createElement("span",{className:"c-red"},be.challenges_count)),Ne.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",Ne.createElement("span",{className:"c-red"},be.current_complete_count||"-"),"/",Ne.createElement("span",{className:"c-red"},be.challenges_count)),Ne.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",be&&be.efficiency===null?"--":be&&be.efficiency),Ne.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",be&&be.max_efficiency===null?"--":be&&be.max_efficiency))),Ne.createElement("ul",{className:[fe.listItem,"mt10"].join(" ")},Ne.createElement("li",null,Ne.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),Ne.createElement("div",{className:"c-light-black mt20"},be&&be.passed_time===null||be&&be.passed_time==="--"?"--":ue()(be&&be.passed_time).format("YYYY-MM-DD HH:mm"))),Ne.createElement("li",null,Ne.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",Ne.createElement("i",{onClick:ji=>{ji.stopPropagation(),ji.preventDefault(),gn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Ne.createElement("div",{className:"c-light-black mt20"},be==null?void 0:be.human_training_time_rules)),Ne.createElement("li",null,Ne.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",Ne.createElement("i",{onClick:ji=>{ji.stopPropagation(),ji.preventDefault(),Mn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Ne.createElement("div",{className:"c-light-black mt20"},be.time_consuming)),Ne.createElement("li",null,Ne.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),Ne.createElement("div",{className:"mt20"},be.evaluate_count)),(be==null?void 0:be.eff_score_full)&&Ne.createElement(Ne.Fragment,null,Ne.createElement("li",null,Ne.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),Ne.createElement("div",{className:"mt20"},Ne.createElement("span",{className:"c-orange"},be.challenge_score),"/",Ne.createElement("span",{className:"c-light-black"},be.challenge_score_full))),Ne.createElement("li",null,Ne.createElement("strong",null,"\u6548\u7387\u5206"),Ne.createElement("div",{className:"mt20"},Ne.createElement("span",{className:"c-orange"},be.eff_score),"/",Ne.createElement("span",{className:"c-light-black"},be.eff_score_full)))),(be==null?void 0:be.have_repeat)&&(be==null?void 0:be.repeat_minus_score)!==0&&Ne.createElement("li",{style:{position:"relative"}},Ne.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},Ne.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Ne.createElement("div",{style:{position:"absolute",fontSize:"10px",color:"white",left:"57px",width:"46px",bottom:"72px"}},be!=null&&be.review_rate?Ne.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(be!=null&&be.review_id&&er)localStorage.setItem("studentDetial",window.location.pathname),ie.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${hn.categoryId}/review_detail/${be==null?void 0:be.review_id}`});else return}},be.review_rate.toFixed(1),"%"):Ne.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),er?Ne.createElement("div",{className:"mt20"},Ne.createElement(At.default,{style:{width:"45px",height:"22px"},value:si,onChange:ji=>{rs(ji)},onBlur:os,disabled:Fr})," / ",be==null?void 0:be.repeat_setting_score):Ne.createElement("div",{className:"mt20"},be==null?void 0:be.repeat_minus_score," / ",be==null?void 0:be.repeat_setting_score)),console.log("sssssssssssssssssssssss",be==null?void 0:be.have_repeat,be==null?void 0:be.repeat_minus_score),(be==null?void 0:be.have_repeat)&&(be==null?void 0:be.repeat_minus_score)===0&&Ne.createElement("li",null,Ne.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Ne.createElement("div",{className:"mt20"}," - -")),!(be!=null&&be.have_repeat)&&Ne.createElement("li",null,Ne.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Ne.createElement("div",{className:"mt20"}," - -")),Ne.createElement("li",null,Ne.createElement("strong",null,"\u8865\u4EA4\u6263\u5206"),Ne.createElement("div",{className:"mt20"},Ne.createElement("span",null,be.late_penalty||"- -"))),Ne.createElement("li",null,Ne.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),Ne.createElement("div",{className:"mt20"},Ne.createElement("span",{className:"c-orange"},Qr),"/",Ne.createElement("span",{className:"c-light-black"},be.all_work_score))),Ne.createElement("li",null,Ne.createElement("strong",null,"\u603B\u8BC4"),Ne.createElement("div",{className:"mt20"},Ne.createElement("span",{className:"c-orange"},be.overall_appraisal))))),Ne.createElement(et.Z,{style:{margin:0}}),(be.work_comment_hidden||be.work_comment)&&Ne.createElement("div",null,Ne.createElement(Xt.Z,{align:"middle"},Ne.createElement(Ee.Z,{flex:1},Ne.createElement("h1",{className:fe.title},"\u70B9\u8BC4\u5185\u5BB9")),Ne.createElement(Ee.Z,{className:"pr30"},(0,Vt.GJ)()&&Ne.createElement(It.ZP,{onClick:()=>Ye(void 0,null,function*(){Ae.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:Ne.createElement(Rt.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return Ye(this,null,function*(){(yield(0,zi.gZ)({comment_id:be.comment_id,homeworkId:hn.homeworkId})).status===0&&(re.ZP.success("\u5220\u9664\u6210\u529F"),Bi({type:"shixunHomeworks/getShixunWorkReport",payload:ke(ke({},hn),Lr.current||{})}))})}})})},Ne.createElement(Ot.Z,null),"\u5220\u9664"))),Ne.createElement(et.Z,{style:{margin:0}}),be.work_comment&&Ne.createElement("aside",{className:"pl30 pr30 mt20"},Ne.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),Ne.createElement("br",null),Ne.createElement(mn.Z,{value:be.work_comment})),be.work_comment_hidden&&Ne.createElement("aside",{className:"pl30 pr30 mt20"},Ne.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),Ne.createElement("br",null),Ne.createElement(mn.Z,{value:be.work_comment_hidden}))),(be==null?void 0:be.action_analysis)&&Ne.createElement(Ke,{detailData:be}),Ne.createElement("div",{className:fe.score},Ne.createElement("h1",{className:fe.title},"\u9636\u6BB5\u6210\u7EE9"),(be==null?void 0:be.adjust_review_score_count)>0&&(0,Vt.GJ)()&&Ne.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{ln(!0),nr({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",be==null?void 0:be.adjust_review_score_count,"\u6B21\uFF09")),Ne.createElement("aside",{className:"pl30 pr30"},Ne.createElement(at.default,{dataSource:be.stage_list,rowKey:ji=>ji==null?void 0:ji.challenge_id,pagination:!1,columns:us})),((dr=be==null?void 0:be.target_test_sets)==null?void 0:dr.length)>0&&Ne.createElement("div",null,Ne.createElement("h1",{className:fe.title},"\u6307\u6807\u6210\u7EE9"),Ne.createElement("aside",{className:"pl30 pr30"},Ne.createElement(at.default,{dataSource:yi,rowKey:ji=>ji==null?void 0:ji.challenge_id,pagination:!1,bordered:!0,columns:Da}))),(be==null?void 0:be.work_description)&&Ne.createElement(Ne.Fragment,null,Ne.createElement("h1",{className:fe.title},"\u4E2A\u4EBA\u603B\u7ED3"),Ne.createElement("aside",{className:"pl30 pr30"},Ne.createElement(mn.Z,{value:be==null?void 0:be.work_description}))),Ne.createElement("h1",{className:fe.title},"\u56FE\u5F62\u7EDF\u8BA1"),Ne.createElement(Bn,{data:Wi}),Ne.createElement("h1",{className:fe.title},"\u5B9E\u8BAD\u8BE6\u60C5")),Ne.createElement(Ji,{autoHeight:ki}))),(0,Vt.GJ)()&&Ne.createElement("aside",{className:`${fe.footerBar} ${ne?fe.footerBarStatic:""}`},Ne.createElement("aside",{className:"edu-container"},Ne.createElement(Xt.Z,{align:"middle"},Ne.createElement(Ee.Z,{flex:"1"},Ne.createElement(ie.Link,{className:fe.exitComment,to:`/classrooms/${hn.coursesId}/shixun_homework/${hn.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),Ne.createElement(Ee.Z,{flex:"1",className:"tr"},Ne.createElement(It.ZP,{type:"default",disabled:!(be!=null&&be.pre_student_work_id),onClick:()=>ar()},"\u4E0A\u4E00\u4E2A"),Ne.createElement(It.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(be!=null&&be.next_student_work_id),onClick:()=>ar("next")},"\u4E0B\u4E00\u4E2A"),(0,Vt.GJ)()&&Ne.createElement(It.ZP,{type:"primary",onClick:()=>Ye(void 0,null,function*(){Bi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:be.user_id,data:ke({},be)},fn:()=>nr({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),Ne.createElement(xi,null),Ne.createElement(Oi.Z,null),Ne.createElement(Ae.default,{open:an,width:860,centered:!0,onCancel:()=>{gn(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},Ne.createElement("div",{style:{color:"#333333",fontWeight:400}},Ne.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),Ne.createElement("br",null),Ne.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"),Ne.createElement("br",null),Ne.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"),Ne.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 "),Ne.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")),Ne.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Ne.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),Ne.createElement("br",null),Ne.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 "),Ne.createElement("br",null),Ne.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"),Ne.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 "),Ne.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"),Ne.createElement("br",null),Ne.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")),Ne.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Ne.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),Ne.createElement("br",null),Ne.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")),Ne.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Ne.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),Ne.createElement("br",null),Ne.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"))),Ne.createElement(Ae.default,{open:qn,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Mn(!1)},width:600},Ne.createElement("div",{style:{fontWeight:400,color:"#333333"}},Ne.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Ne.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"),Ne.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Ne.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"),Ne.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Ne.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"))),Ne.createElement(Ae.default,{open:Un,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{Ai("all"),ln(!1)},destroyOnClose:!0,width:900},Ne.createElement("div",{style:{fontWeight:400,color:"#333333"}},Ne.createElement("div",null,Ne.createElement("span",null,"\u5173\u5361\uFF1A"),Ne.createElement(ct.default,{style:{width:300},value:Ln,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:ji=>Ye(void 0,null,function*(){Ai(ji),nr({page:1,page_size:10},ji)})},Ne.createElement(ct.default.Option,{value:"all"}," \u5168\u90E8 "),(qr=be==null?void 0:be.stage_list)==null?void 0:qr.map((ji,Nr)=>Ne.createElement(ct.default.Option,{key:Nr,value:ji==null?void 0:ji.challenge_id},"\u7B2C",(0,$t.EM)(Nr+1),"\u5173")))),Ne.createElement("div",{className:"mt20"},Ne.createElement(at.default,{dataSource:un,rowKey:ji=>ji==null?void 0:ji.id,pagination:!1,columns:Ks,loading:Yn})),Ne.createElement("div",{className:fe.footer},Ne.createElement("div",null,Ne.createElement("span",{style:{color:"#656F87"}},"\u5171",Ne.createElement("span",{className:"c-light-primary"},Ut),"\u6761\u6570\u636E")),Ne.createElement(pt.Z,{defaultCurrent:1,defaultPageSize:10,current:(vi==null?void 0:vi.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:Ut,onChange:Ur})))))};var _n=(0,ie.connect)(({shixunHomeworks:We,classroomList:on,loading:An,globalSetting:Nn,user:Vn})=>({shixunHomeworks:We,classroomList:on,globalSetting:Nn,loading:An.effects,user:Vn}))(Kn)},97610:function(xn,ze,Qt){"use strict";var Ct=Qt(62957),ee=Qt(6767),ue=Qt(38986),Se=Qt(25690),de=Qt(48790),Ht=Qt(59301),ie=(re,Wt,Ie)=>new Promise((Xt,Ee)=>{var It=At=>{try{et(Ie.next(At))}catch(at){Ee(at)}},nt=At=>{try{et(Ie.throw(At))}catch(at){Ee(at)}},et=At=>At.done?Xt(At.value):Promise.resolve(At.value).then(It,nt);et((Ie=Ie.apply(re,Wt)).next())});const Ae=({shixunHomeworks:re,classroomList:Wt,dispatch:Ie})=>{const Xt=(0,Se.useParams)();return Ht.createElement(Ct.default,{centered:!0,title:"\u63D0\u793A",open:re.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ie(void 0,null,function*(){var Ee,It,nt,et;if((0,de.Rm)()&&!((Ee=Wt.AssistantObject.practice)!=null&&Ee.can_redo)){ee.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 At=yield(0,ue.ZP)(`/api/myshixuns/${re.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,{method:"GET",params:{course_id:Xt.coursesId,homework_common_id:re.actionTabs.homework_common_id}});if(At.shixun_identifier){ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ie({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(It=At==null?void 0:At.new_works)==null?void 0:It.find(ct=>`${ct.homework_common_id}`===Xt.categoryId))==null?void 0:nt.id;if((0,de.Rm)()&&!((et=Wt.AssistantObject.practice)!=null&&et.can_view))return;Se.history.replace(`/classrooms/${Xt.coursesId}/shixun_homework/${Xt.categoryId}/${at}/comment`)}}),onCancel:()=>{Ie({type:"shixunHomeworks/setActionTabs",payload:{}})}},Ht.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),Ht.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};ze.Z=(0,Se.connect)(({shixunHomeworks:re,classroomList:Wt})=>({shixunHomeworks:re,classroomList:Wt}))(Ae)},40133:function(xn,ze,Qt){"use strict";Qt.d(ze,{AD:function(){return Bn},D9:function(){return Cn},Hp:function(){return Rt},IM:function(){return ai},Iy:function(){return Zt},KM:function(){return jt},MJ:function(){return Ot},Ne:function(){return li},ON:function(){return en},Uj:function(){return ci},VY:function(){return ri},YO:function(){return Fe},YX:function(){return ei},Zn:function(){return nt},_g:function(){return pt},_k:function(){return me},c6:function(){return rn},cr:function(){return et},eV:function(){return tn},fi:function(){return At},gh:function(){return Ce},hS:function(){return sn},iA:function(){return at},j6:function(){return xt},je:function(){return Gn},jj:function(){return bt},kS:function(){return Ui},lS:function(){return ti},o6:function(){return fe},pO:function(){return Ti},rQ:function(){return Fn},sA:function(){return $t},xm:function(){return oe},xo:function(){return Rn},y8:function(){return kn},yd:function(){return ct}});var Ct=Qt(82264),ee=Qt(25690),ue=Qt(51257),Se=Qt(6767),de=Qt(346),Ht=Object.defineProperty,ie=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Wt=(Mt,mt,vt)=>mt in Mt?Ht(Mt,mt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Mt[mt]=vt,Ie=(Mt,mt)=>{for(var vt in mt||(mt={}))Ae.call(mt,vt)&&Wt(Mt,vt,mt[vt]);if(ie)for(var vt of ie(mt))re.call(mt,vt)&&Wt(Mt,vt,mt[vt]);return Mt},Xt=(Mt,mt,vt)=>new Promise((Lt,Bt)=>{var _t=Xe=>{try{xe(vt.next(Xe))}catch(Me){Bt(Me)}},Le=Xe=>{try{xe(vt.throw(Xe))}catch(Me){Bt(Me)}},xe=Xe=>Xe.done?Lt(Xe.value):Promise.resolve(Xe.value).then(_t,Le);xe((vt=vt.apply(Mt,mt)).next())});const Ee=()=>{(0,ee.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},It=()=>{(0,ee.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Mt=>Xt(void 0,null,function*(){Ee(),(yield(0,Ct.YR)(Ie({},Mt))).status===0&&(yield(0,ue.QH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_couser_info.json`,query:Mt}))),It()}),et=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.yS)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_member_act_score`);else{if(mt.status===-2)return mt;mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_member_act_score`))}}),At=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.W0)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_score`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_score`))}}),at=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.Nl)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`))}}),ct=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.IU)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/export_star_user`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/export_star_user`))}}),pt=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.td)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-2)return mt;if(mt.status===-3)(0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else if(mt.status===-4)return mt}}),xt=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.QX)(Ie({},Mt));if(mt.status===0)Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_homework`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_homework`))}}),bt=(Mt,mt)=>Xt(void 0,null,function*(){const vt=yield(0,Ct.o_)(Ie({},Mt));vt.status===0?(Se.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"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Rt=(Mt,mt)=>Xt(void 0,null,function*(){const vt=yield(0,Ct.ZL)(Ie({},Mt));vt.status===0?(Se.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"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Ot=(Mt,mt)=>Xt(void 0,null,function*(){const vt=yield(0,Ct.vV)(Ie({},Mt));vt.status===0?(Se.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"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Zt=(Mt,mt)=>Xt(void 0,null,function*(){const vt=yield(0,Ct.aP)(Ie({},Mt));vt.status===0?(Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Vt=Mt=>Xt(void 0,null,function*(){Ee(),(yield exportCourseWorkListAppendix(Ie({},Mt))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Mt.categoryId}/works_list.zip`,query:Mt}))),It()}),$t=Mt=>Xt(void 0,null,function*(){Ee(),yield(0,ue.QH)("",de.Z.API_SERVER+`/api/polls/${Mt.categoryId}/commit_result.xlsx`),It()}),Ce=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/attendances/export_xlsx_data.xlsx`,query:Mt}))}),fe=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/video_study_statics.xlsx`,query:Mt}))}),rn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_video_study.xlsx`,query:Mt}))}),tn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_course_students_info.xlsx`,query:Mt}))}),Bn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Mt}))}),Fn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Mt}))}),kn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Mt}))}),Gn=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.Uy)(Ie({},Mt));mt.status===0?(Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_users`)):mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_users`))}),ti=Mt=>Xt(void 0,null,function*(){const mt=yield(0,Ct.tg)(Ie({},Mt));mt.status===0?(Se.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_report`)):mt.status===-3&&((0,ee.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),ee.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_report`))}),me=Mt=>Xt(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/export_records/${Mt.id}.xlsx`,query:Mt}))}),oe=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:Mt}))}),Cn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt==null?void 0:Mt.coursesId}/${Mt.menuKey}_statistic.xlsx?${Mt.checkedList.map(mt=>`course_group_id[]=${mt}`).join("&")}`,query:Mt}))}),li=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_training_objectives.xlsx`,query:Mt}))}),ai=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)(Mt==null?void 0:Mt.name,(0,ue.NY)({url:de.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Mt}))}),sn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_courses.xlsx`,query:Mt}))}),Rn=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_graduation_requirements.xlsx`,query:Mt}))}),ri=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Mt}))}),Ui=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Mt}))}),en=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/examination_banks/${Mt.id}.json`,query:Mt}))}),ei=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/exercises/${Mt.categoryId}.json`,query:Mt}))}),Fe=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/polls/${Mt==null?void 0:Mt.id}/commit_result.json`,query:Mt}))}),ci=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Mt}))}),Ti=(Mt,mt)=>Xt(void 0,null,function*(){yield(0,ue.FH)(mt||"",(0,ue.NY)({url:de.Z.API_SERVER+`/api/exercises/${Mt==null?void 0:Mt.exercise_id}/consult_exercise.json`,query:Mt}))}),jt=Mt=>Xt(void 0,null,function*(){yield(0,ue.FH)("",(0,ue.NY)({url:de.Z.API_SERVER+`/api/competitions/${Mt==null?void 0:Mt.identifier}/competition_commit_records/member_works.xlsx`,query:Mt}))})},45937:function(xn,ze,Qt){"use strict";Qt.d(ze,{U:function(){return re}});var Ct=Qt(59301),ee=Object.defineProperty,ue=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Ht=(Wt,Ie,Xt)=>Ie in Wt?ee(Wt,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):Wt[Ie]=Xt,ie=(Wt,Ie)=>{for(var Xt in Ie||(Ie={}))Se.call(Ie,Xt)&&Ht(Wt,Xt,Ie[Xt]);if(ue)for(var Xt of ue(Ie))de.call(Ie,Xt)&&Ht(Wt,Xt,Ie[Xt]);return Wt},Ae=(Wt,Ie,Xt)=>new Promise((Ee,It)=>{var nt=at=>{try{At(Xt.next(at))}catch(ct){It(ct)}},et=at=>{try{At(Xt.throw(at))}catch(ct){It(ct)}},At=at=>at.done?Ee(at.value):Promise.resolve(at.value).then(nt,et);At((Xt=Xt.apply(Wt,Ie)).next())});function re(Wt,Ie){const[Xt,Ee]=(0,Ct.useState)(Ie),[It,nt]=(0,Ct.useState)(!1),[et,At]=(0,Ct.useState)();return[Xt,It,(ct,pt=!1)=>Ae(this,null,function*(){const xt=pt?Ie:ie(ie({},Xt),ct);nt(!0),Ee(xt);const bt=yield Wt(xt);return nt(!1),At(bt),bt}),et,At]}},81428:function(xn,ze,Qt){"use strict";Qt.d(ze,{AL:function(){return xt},Iy:function(){return Ie},Qv:function(){return It},ez:function(){return pt},jb:function(){return Xt}});var Ct=Qt(32834),ee=Qt.n(Ct),ue=Qt(11690),Se=Qt.n(ue);let de=1;function Ht(Vt,$t){const Ce=Vt.match(/^(\s+)(?:```)/);if(Ce===null)return $t;const fe=Ce[1];return $t.split(`
`).map(rn=>{const tn=rn.match(/^\s+/);if(tn===null)return rn;const[Bn]=tn;return Bn.length>=fe.length?rn.slice(fe.length):rn}).join(`
`)}let ie=[],Ae=["<ul>"];const re=new(ee()).Renderer,Wt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ie(){ie.length=0,Ae=["<ul>"]}const Xt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ee(Vt,$t,Ce,fe){if($t>=Vt.length||Vt[$t].level<=Ce)return $t;var rn=Vt[$t];fe.push("<li><a href='#"+de+rn.anchor+"'>"+rn.text+"</a>"),$t++;var tn=[];return $t=Ee(Vt,$t,rn.level,tn),tn.length>0&&(fe.push("<ul>"),tn.forEach(function(Bn){fe.push(Bn)}),fe.push("</ul>")),fe.push("</li>"),$t=Ee(Vt,$t,Ce,fe),$t}function It(){return Ee(ie,0,0,Ae),Ae.push("</ul>"),Ae.join("")}const nt={heading(Vt){const $t=Wt.exec(Vt);if(de+=1,$t)return{type:"heading",raw:$t[0],depth:$t[1].length,text:$t[2]}},fences(Vt){const $t=this.rules.block.fences.exec(Vt);if($t){const Ce=$t[0];let fe=Ht(Ce,$t[3]||"");const rn=$t[2]?$t[2].trim():$t[2];if(["latex","katex","math"].indexOf(rn)>=0){const tn=at(),Bn=fe;fe=tn,ct[tn]={type:"block",expression:Bn}}return{type:"code",raw:Ce,lang:rn,text:fe}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let At=0;const at=()=>`__special_katext_id_${At++}__`;let ct={};function pt(){return ct}function xt(){At=0,ct={}}function bt(Vt){return Vt=Vt.replace(et,($t,Ce)=>{const fe=at();return ct[fe]={type:"inline",expression:Ce},fe}),Vt}const Rt=re.listitem;re.listitem=function(Vt){return Rt(bt(Vt))};const Ot=re.paragraph;re.paragraph=function(Vt){return Ot(bt(Vt))};const Zt=re.tablecell;re.tablecell=function(Vt,$t){return Zt(bt(Vt),$t)},re.code=function(Vt,$t,Ce){const fe=($t||"").match(/\S*/)[0];return fe?["latex","katex","math"].indexOf(fe)>=0?`<p class='editormd-tex'>${Vt}</p>`:`<pre class="prettyprint linenums"><code class="language-${$t}">${Ce?Vt:(0,ue.escape)(Vt,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ce?Vt:(0,ue.escape)(Vt,!0))+"</code></pre>"},re.heading=function(Vt,$t,Ce){let fe=this.options.headerPrefix+Ce.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:fe,level:$t,text:Vt}),"<h"+$t+' id="'+de+fe+'">'+Vt+"</h"+$t+">"},ee().setOptions({silent:!0,gfm:!0,pedantic:!1}),ee().use({tokenizer:nt,renderer:re}),ze.ZP=ee()},86251:function(xn,ze){"use strict";ze.byteLength=ie,ze.toByteArray=re,ze.fromByteArray=Xt;for(var Qt=[],Ct=[],ee=typeof Uint8Array!="undefined"?Uint8Array:Array,ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,de=ue.length;Se<de;++Se)Qt[Se]=ue[Se],Ct[ue.charCodeAt(Se)]=Se;Ct[45]=62,Ct[95]=63;function Ht(Ee){var It=Ee.length;if(It%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=Ee.indexOf("=");nt===-1&&(nt=It);var et=nt===It?0:4-nt%4;return[nt,et]}function ie(Ee){var It=Ht(Ee),nt=It[0],et=It[1];return(nt+et)*3/4-et}function Ae(Ee,It,nt){return(It+nt)*3/4-nt}function re(Ee){var It,nt=Ht(Ee),et=nt[0],At=nt[1],at=new ee(Ae(Ee,et,At)),ct=0,pt=At>0?et-4:et,xt;for(xt=0;xt<pt;xt+=4)It=Ct[Ee.charCodeAt(xt)]<<18|Ct[Ee.charCodeAt(xt+1)]<<12|Ct[Ee.charCodeAt(xt+2)]<<6|Ct[Ee.charCodeAt(xt+3)],at[ct++]=It>>16&255,at[ct++]=It>>8&255,at[ct++]=It&255;return At===2&&(It=Ct[Ee.charCodeAt(xt)]<<2|Ct[Ee.charCodeAt(xt+1)]>>4,at[ct++]=It&255),At===1&&(It=Ct[Ee.charCodeAt(xt)]<<10|Ct[Ee.charCodeAt(xt+1)]<<4|Ct[Ee.charCodeAt(xt+2)]>>2,at[ct++]=It>>8&255,at[ct++]=It&255),at}function Wt(Ee){return Qt[Ee>>18&63]+Qt[Ee>>12&63]+Qt[Ee>>6&63]+Qt[Ee&63]}function Ie(Ee,It,nt){for(var et,At=[],at=It;at<nt;at+=3)et=(Ee[at]<<16&16711680)+(Ee[at+1]<<8&65280)+(Ee[at+2]&255),At.push(Wt(et));return At.join("")}function Xt(Ee){for(var It,nt=Ee.length,et=nt%3,At=[],at=16383,ct=0,pt=nt-et;ct<pt;ct+=at)At.push(Ie(Ee,ct,ct+at>pt?pt:ct+at));return et===1?(It=Ee[nt-1],At.push(Qt[It>>2]+Qt[It<<4&63]+"==")):et===2&&(It=(Ee[nt-2]<<8)+Ee[nt-1],At.push(Qt[It>>10]+Qt[It>>4&63]+Qt[It<<2&63]+"=")),At.join("")}},19208:function(xn,ze,Qt){"use strict";var Ct;var ee=Qt(86251),ue=Qt(67467),Se=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ze.lW=Ae,Ct=ct,ze.h2=50;var de=2147483647;Ct=de,Ae.TYPED_ARRAY_SUPPORT=Ht(),!Ae.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 Ht(){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(Lt){return!1}}Object.defineProperty(Ae.prototype,"parent",{enumerable:!0,get:function(){if(Ae.isBuffer(this))return this.buffer}}),Object.defineProperty(Ae.prototype,"offset",{enumerable:!0,get:function(){if(Ae.isBuffer(this))return this.byteOffset}});function ie(mt){if(mt>de)throw new RangeError('The value "'+mt+'" is invalid for option "size"');var vt=new Uint8Array(mt);return Object.setPrototypeOf(vt,Ae.prototype),vt}function Ae(mt,vt,Lt){if(typeof mt=="number"){if(typeof vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Xt(mt)}return re(mt,vt,Lt)}Ae.poolSize=8192;function re(mt,vt,Lt){if(typeof mt=="string")return Ee(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(Ti(mt,ArrayBuffer)||mt&&Ti(mt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ti(mt,SharedArrayBuffer)||mt&&Ti(mt.buffer,SharedArrayBuffer)))return et(mt,vt,Lt);if(typeof mt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Bt=mt.valueOf&&mt.valueOf();if(Bt!=null&&Bt!==mt)return Ae.from(Bt,vt,Lt);var _t=At(mt);if(_t)return _t;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof mt[Symbol.toPrimitive]=="function")return Ae.from(mt[Symbol.toPrimitive]("string"),vt,Lt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt)}Ae.from=function(mt,vt,Lt){return re(mt,vt,Lt)},Object.setPrototypeOf(Ae.prototype,Uint8Array.prototype),Object.setPrototypeOf(Ae,Uint8Array);function Wt(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 Ie(mt,vt,Lt){return Wt(mt),mt<=0?ie(mt):vt!==void 0?typeof Lt=="string"?ie(mt).fill(vt,Lt):ie(mt).fill(vt):ie(mt)}Ae.alloc=function(mt,vt,Lt){return Ie(mt,vt,Lt)};function Xt(mt){return Wt(mt),ie(mt<0?0:at(mt)|0)}Ae.allocUnsafe=function(mt){return Xt(mt)},Ae.allocUnsafeSlow=function(mt){return Xt(mt)};function Ee(mt,vt){if((typeof vt!="string"||vt==="")&&(vt="utf8"),!Ae.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);var Lt=pt(mt,vt)|0,Bt=ie(Lt),_t=Bt.write(mt,vt);return _t!==Lt&&(Bt=Bt.slice(0,_t)),Bt}function It(mt){for(var vt=mt.length<0?0:at(mt.length)|0,Lt=ie(vt),Bt=0;Bt<vt;Bt+=1)Lt[Bt]=mt[Bt]&255;return Lt}function nt(mt){if(Ti(mt,Uint8Array)){var vt=new Uint8Array(mt);return et(vt.buffer,vt.byteOffset,vt.byteLength)}return It(mt)}function et(mt,vt,Lt){if(vt<0||mt.byteLength<vt)throw new RangeError('"offset" is outside of buffer bounds');if(mt.byteLength<vt+(Lt||0))throw new RangeError('"length" is outside of buffer bounds');var Bt;return vt===void 0&&Lt===void 0?Bt=new Uint8Array(mt):Lt===void 0?Bt=new Uint8Array(mt,vt):Bt=new Uint8Array(mt,vt,Lt),Object.setPrototypeOf(Bt,Ae.prototype),Bt}function At(mt){if(Ae.isBuffer(mt)){var vt=at(mt.length)|0,Lt=ie(vt);return Lt.length===0||mt.copy(Lt,0,0,vt),Lt}if(mt.length!==void 0)return typeof mt.length!="number"||jt(mt.length)?ie(0):It(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return It(mt.data)}function at(mt){if(mt>=de)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+de.toString(16)+" bytes");return mt|0}function ct(mt){return+mt!=mt&&(mt=0),Ae.alloc(+mt)}Ae.isBuffer=function(vt){return vt!=null&&vt._isBuffer===!0&&vt!==Ae.prototype},Ae.compare=function(vt,Lt){if(Ti(vt,Uint8Array)&&(vt=Ae.from(vt,vt.offset,vt.byteLength)),Ti(Lt,Uint8Array)&&(Lt=Ae.from(Lt,Lt.offset,Lt.byteLength)),!Ae.isBuffer(vt)||!Ae.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(vt===Lt)return 0;for(var Bt=vt.length,_t=Lt.length,Le=0,xe=Math.min(Bt,_t);Le<xe;++Le)if(vt[Le]!==Lt[Le]){Bt=vt[Le],_t=Lt[Le];break}return Bt<_t?-1:_t<Bt?1:0},Ae.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}},Ae.concat=function(vt,Lt){if(!Array.isArray(vt))throw new TypeError('"list" argument must be an Array of Buffers');if(vt.length===0)return Ae.alloc(0);var Bt;if(Lt===void 0)for(Lt=0,Bt=0;Bt<vt.length;++Bt)Lt+=vt[Bt].length;var _t=Ae.allocUnsafe(Lt),Le=0;for(Bt=0;Bt<vt.length;++Bt){var xe=vt[Bt];if(Ti(xe,Uint8Array))Le+xe.length>_t.length?Ae.from(xe).copy(_t,Le):Uint8Array.prototype.set.call(_t,xe,Le);else if(Ae.isBuffer(xe))xe.copy(_t,Le);else throw new TypeError('"list" argument must be an Array of Buffers');Le+=xe.length}return _t};function pt(mt,vt){if(Ae.isBuffer(mt))return mt.length;if(ArrayBuffer.isView(mt)||Ti(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 Lt=mt.length,Bt=arguments.length>2&&arguments[2]===!0;if(!Bt&&Lt===0)return 0;for(var _t=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return Lt;case"utf8":case"utf-8":return Ui(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt*2;case"hex":return Lt>>>1;case"base64":return Fe(mt).length;default:if(_t)return Bt?-1:Ui(mt).length;vt=(""+vt).toLowerCase(),_t=!0}}Ae.byteLength=pt;function xt(mt,vt,Lt){var Bt=!1;if((vt===void 0||vt<0)&&(vt=0),vt>this.length||((Lt===void 0||Lt>this.length)&&(Lt=this.length),Lt<=0)||(Lt>>>=0,vt>>>=0,Lt<=vt))return"";for(mt||(mt="utf8");;)switch(mt){case"hex":return ti(this,vt,Lt);case"utf8":case"utf-8":return tn(this,vt,Lt);case"ascii":return kn(this,vt,Lt);case"latin1":case"binary":return Gn(this,vt,Lt);case"base64":return rn(this,vt,Lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,vt,Lt);default:if(Bt)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Bt=!0}}Ae.prototype._isBuffer=!0;function bt(mt,vt,Lt){var Bt=mt[vt];mt[vt]=mt[Lt],mt[Lt]=Bt}Ae.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 Lt=0;Lt<vt;Lt+=2)bt(this,Lt,Lt+1);return this},Ae.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 Lt=0;Lt<vt;Lt+=4)bt(this,Lt,Lt+3),bt(this,Lt+1,Lt+2);return this},Ae.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 Lt=0;Lt<vt;Lt+=8)bt(this,Lt,Lt+7),bt(this,Lt+1,Lt+6),bt(this,Lt+2,Lt+5),bt(this,Lt+3,Lt+4);return this},Ae.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?tn(this,0,vt):xt.apply(this,arguments)},Ae.prototype.toLocaleString=Ae.prototype.toString,Ae.prototype.equals=function(vt){if(!Ae.isBuffer(vt))throw new TypeError("Argument must be a Buffer");return this===vt?!0:Ae.compare(this,vt)===0},Ae.prototype.inspect=function(){var vt="",Lt=ze.h2;return vt=this.toString("hex",0,Lt).replace(/(.{2})/g,"$1 ").trim(),this.length>Lt&&(vt+=" ... "),"<Buffer "+vt+">"},Se&&(Ae.prototype[Se]=Ae.prototype.inspect),Ae.prototype.compare=function(vt,Lt,Bt,_t,Le){if(Ti(vt,Uint8Array)&&(vt=Ae.from(vt,vt.offset,vt.byteLength)),!Ae.isBuffer(vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof vt);if(Lt===void 0&&(Lt=0),Bt===void 0&&(Bt=vt?vt.length:0),_t===void 0&&(_t=0),Le===void 0&&(Le=this.length),Lt<0||Bt>vt.length||_t<0||Le>this.length)throw new RangeError("out of range index");if(_t>=Le&&Lt>=Bt)return 0;if(_t>=Le)return-1;if(Lt>=Bt)return 1;if(Lt>>>=0,Bt>>>=0,_t>>>=0,Le>>>=0,this===vt)return 0;for(var xe=Le-_t,Xe=Bt-Lt,Me=Math.min(xe,Xe),De=this.slice(_t,Le),Oe=vt.slice(Lt,Bt),nn=0;nn<Me;++nn)if(De[nn]!==Oe[nn]){xe=De[nn],Xe=Oe[nn];break}return xe<Xe?-1:Xe<xe?1:0};function Rt(mt,vt,Lt,Bt,_t){if(mt.length===0)return-1;if(typeof Lt=="string"?(Bt=Lt,Lt=0):Lt>2147483647?Lt=2147483647:Lt<-2147483648&&(Lt=-2147483648),Lt=+Lt,jt(Lt)&&(Lt=_t?0:mt.length-1),Lt<0&&(Lt=mt.length+Lt),Lt>=mt.length){if(_t)return-1;Lt=mt.length-1}else if(Lt<0)if(_t)Lt=0;else return-1;if(typeof vt=="string"&&(vt=Ae.from(vt,Bt)),Ae.isBuffer(vt))return vt.length===0?-1:Ot(mt,vt,Lt,Bt,_t);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?_t?Uint8Array.prototype.indexOf.call(mt,vt,Lt):Uint8Array.prototype.lastIndexOf.call(mt,vt,Lt):Ot(mt,[vt],Lt,Bt,_t);throw new TypeError("val must be string, number or Buffer")}function Ot(mt,vt,Lt,Bt,_t){var Le=1,xe=mt.length,Xe=vt.length;if(Bt!==void 0&&(Bt=String(Bt).toLowerCase(),Bt==="ucs2"||Bt==="ucs-2"||Bt==="utf16le"||Bt==="utf-16le")){if(mt.length<2||vt.length<2)return-1;Le=2,xe/=2,Xe/=2,Lt/=2}function Me(On,yn){return Le===1?On[yn]:On.readUInt16BE(yn*Le)}var De;if(_t){var Oe=-1;for(De=Lt;De<xe;De++)if(Me(mt,De)===Me(vt,Oe===-1?0:De-Oe)){if(Oe===-1&&(Oe=De),De-Oe+1===Xe)return Oe*Le}else Oe!==-1&&(De-=De-Oe),Oe=-1}else for(Lt+Xe>xe&&(Lt=xe-Xe),De=Lt;De>=0;De--){for(var nn=!0,mn=0;mn<Xe;mn++)if(Me(mt,De+mn)!==Me(vt,mn)){nn=!1;break}if(nn)return De}return-1}Ae.prototype.includes=function(vt,Lt,Bt){return this.indexOf(vt,Lt,Bt)!==-1},Ae.prototype.indexOf=function(vt,Lt,Bt){return Rt(this,vt,Lt,Bt,!0)},Ae.prototype.lastIndexOf=function(vt,Lt,Bt){return Rt(this,vt,Lt,Bt,!1)};function Zt(mt,vt,Lt,Bt){Lt=Number(Lt)||0;var _t=mt.length-Lt;Bt?(Bt=Number(Bt),Bt>_t&&(Bt=_t)):Bt=_t;var Le=vt.length;Bt>Le/2&&(Bt=Le/2);for(var xe=0;xe<Bt;++xe){var Xe=parseInt(vt.substr(xe*2,2),16);if(jt(Xe))return xe;mt[Lt+xe]=Xe}return xe}function Vt(mt,vt,Lt,Bt){return ci(Ui(vt,mt.length-Lt),mt,Lt,Bt)}function $t(mt,vt,Lt,Bt){return ci(en(vt),mt,Lt,Bt)}function Ce(mt,vt,Lt,Bt){return ci(Fe(vt),mt,Lt,Bt)}function fe(mt,vt,Lt,Bt){return ci(ei(vt,mt.length-Lt),mt,Lt,Bt)}Ae.prototype.write=function(vt,Lt,Bt,_t){if(Lt===void 0)_t="utf8",Bt=this.length,Lt=0;else if(Bt===void 0&&typeof Lt=="string")_t=Lt,Bt=this.length,Lt=0;else if(isFinite(Lt))Lt=Lt>>>0,isFinite(Bt)?(Bt=Bt>>>0,_t===void 0&&(_t="utf8")):(_t=Bt,Bt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Le=this.length-Lt;if((Bt===void 0||Bt>Le)&&(Bt=Le),vt.length>0&&(Bt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");for(var xe=!1;;)switch(_t){case"hex":return Zt(this,vt,Lt,Bt);case"utf8":case"utf-8":return Vt(this,vt,Lt,Bt);case"ascii":case"latin1":case"binary":return $t(this,vt,Lt,Bt);case"base64":return Ce(this,vt,Lt,Bt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,vt,Lt,Bt);default:if(xe)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),xe=!0}},Ae.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(mt,vt,Lt){return vt===0&&Lt===mt.length?ee.fromByteArray(mt):ee.fromByteArray(mt.slice(vt,Lt))}function tn(mt,vt,Lt){Lt=Math.min(mt.length,Lt);for(var Bt=[],_t=vt;_t<Lt;){var Le=mt[_t],xe=null,Xe=Le>239?4:Le>223?3:Le>191?2:1;if(_t+Xe<=Lt){var Me,De,Oe,nn;switch(Xe){case 1:Le<128&&(xe=Le);break;case 2:Me=mt[_t+1],(Me&192)===128&&(nn=(Le&31)<<6|Me&63,nn>127&&(xe=nn));break;case 3:Me=mt[_t+1],De=mt[_t+2],(Me&192)===128&&(De&192)===128&&(nn=(Le&15)<<12|(Me&63)<<6|De&63,nn>2047&&(nn<55296||nn>57343)&&(xe=nn));break;case 4:Me=mt[_t+1],De=mt[_t+2],Oe=mt[_t+3],(Me&192)===128&&(De&192)===128&&(Oe&192)===128&&(nn=(Le&15)<<18|(Me&63)<<12|(De&63)<<6|Oe&63,nn>65535&&nn<1114112&&(xe=nn))}}xe===null?(xe=65533,Xe=1):xe>65535&&(xe-=65536,Bt.push(xe>>>10&1023|55296),xe=56320|xe&1023),Bt.push(xe),_t+=Xe}return Fn(Bt)}var Bn=4096;function Fn(mt){var vt=mt.length;if(vt<=Bn)return String.fromCharCode.apply(String,mt);for(var Lt="",Bt=0;Bt<vt;)Lt+=String.fromCharCode.apply(String,mt.slice(Bt,Bt+=Bn));return Lt}function kn(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Bt+=String.fromCharCode(mt[_t]&127);return Bt}function Gn(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Bt+=String.fromCharCode(mt[_t]);return Bt}function ti(mt,vt,Lt){var Bt=mt.length;(!vt||vt<0)&&(vt=0),(!Lt||Lt<0||Lt>Bt)&&(Lt=Bt);for(var _t="",Le=vt;Le<Lt;++Le)_t+=Mt[mt[Le]];return _t}function me(mt,vt,Lt){for(var Bt=mt.slice(vt,Lt),_t="",Le=0;Le<Bt.length-1;Le+=2)_t+=String.fromCharCode(Bt[Le]+Bt[Le+1]*256);return _t}Ae.prototype.slice=function(vt,Lt){var Bt=this.length;vt=~~vt,Lt=Lt===void 0?Bt:~~Lt,vt<0?(vt+=Bt,vt<0&&(vt=0)):vt>Bt&&(vt=Bt),Lt<0?(Lt+=Bt,Lt<0&&(Lt=0)):Lt>Bt&&(Lt=Bt),Lt<vt&&(Lt=vt);var _t=this.subarray(vt,Lt);return Object.setPrototypeOf(_t,Ae.prototype),_t};function oe(mt,vt,Lt){if(mt%1!==0||mt<0)throw new RangeError("offset is not uint");if(mt+vt>Lt)throw new RangeError("Trying to access beyond buffer length")}Ae.prototype.readUintLE=Ae.prototype.readUIntLE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||oe(vt,Lt,this.length);for(var _t=this[vt],Le=1,xe=0;++xe<Lt&&(Le*=256);)_t+=this[vt+xe]*Le;return _t},Ae.prototype.readUintBE=Ae.prototype.readUIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||oe(vt,Lt,this.length);for(var _t=this[vt+--Lt],Le=1;Lt>0&&(Le*=256);)_t+=this[vt+--Lt]*Le;return _t},Ae.prototype.readUint8=Ae.prototype.readUInt8=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,1,this.length),this[vt]},Ae.prototype.readUint16LE=Ae.prototype.readUInt16LE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,2,this.length),this[vt]|this[vt+1]<<8},Ae.prototype.readUint16BE=Ae.prototype.readUInt16BE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,2,this.length),this[vt]<<8|this[vt+1]},Ae.prototype.readUint32LE=Ae.prototype.readUInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),(this[vt]|this[vt+1]<<8|this[vt+2]<<16)+this[vt+3]*16777216},Ae.prototype.readUint32BE=Ae.prototype.readUInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),this[vt]*16777216+(this[vt+1]<<16|this[vt+2]<<8|this[vt+3])},Ae.prototype.readIntLE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||oe(vt,Lt,this.length);for(var _t=this[vt],Le=1,xe=0;++xe<Lt&&(Le*=256);)_t+=this[vt+xe]*Le;return Le*=128,_t>=Le&&(_t-=Math.pow(2,8*Lt)),_t},Ae.prototype.readIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||oe(vt,Lt,this.length);for(var _t=Lt,Le=1,xe=this[vt+--_t];_t>0&&(Le*=256);)xe+=this[vt+--_t]*Le;return Le*=128,xe>=Le&&(xe-=Math.pow(2,8*Lt)),xe},Ae.prototype.readInt8=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},Ae.prototype.readInt16LE=function(vt,Lt){vt=vt>>>0,Lt||oe(vt,2,this.length);var Bt=this[vt]|this[vt+1]<<8;return Bt&32768?Bt|4294901760:Bt},Ae.prototype.readInt16BE=function(vt,Lt){vt=vt>>>0,Lt||oe(vt,2,this.length);var Bt=this[vt+1]|this[vt]<<8;return Bt&32768?Bt|4294901760:Bt},Ae.prototype.readInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),this[vt]|this[vt+1]<<8|this[vt+2]<<16|this[vt+3]<<24},Ae.prototype.readInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),this[vt]<<24|this[vt+1]<<16|this[vt+2]<<8|this[vt+3]},Ae.prototype.readFloatLE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),ue.read(this,vt,!0,23,4)},Ae.prototype.readFloatBE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,4,this.length),ue.read(this,vt,!1,23,4)},Ae.prototype.readDoubleLE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,8,this.length),ue.read(this,vt,!0,52,8)},Ae.prototype.readDoubleBE=function(vt,Lt){return vt=vt>>>0,Lt||oe(vt,8,this.length),ue.read(this,vt,!1,52,8)};function Cn(mt,vt,Lt,Bt,_t,Le){if(!Ae.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>_t||vt<Le)throw new RangeError('"value" argument is out of bounds');if(Lt+Bt>mt.length)throw new RangeError("Index out of range")}Ae.prototype.writeUintLE=Ae.prototype.writeUIntLE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!_t){var Le=Math.pow(2,8*Bt)-1;Cn(this,vt,Lt,Bt,Le,0)}var xe=1,Xe=0;for(this[Lt]=vt&255;++Xe<Bt&&(xe*=256);)this[Lt+Xe]=vt/xe&255;return Lt+Bt},Ae.prototype.writeUintBE=Ae.prototype.writeUIntBE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!_t){var Le=Math.pow(2,8*Bt)-1;Cn(this,vt,Lt,Bt,Le,0)}var xe=Bt-1,Xe=1;for(this[Lt+xe]=vt&255;--xe>=0&&(Xe*=256);)this[Lt+xe]=vt/Xe&255;return Lt+Bt},Ae.prototype.writeUint8=Ae.prototype.writeUInt8=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,1,255,0),this[Lt]=vt&255,Lt+1},Ae.prototype.writeUint16LE=Ae.prototype.writeUInt16LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,2,65535,0),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},Ae.prototype.writeUint16BE=Ae.prototype.writeUInt16BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,2,65535,0),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},Ae.prototype.writeUint32LE=Ae.prototype.writeUInt32LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,4,4294967295,0),this[Lt+3]=vt>>>24,this[Lt+2]=vt>>>16,this[Lt+1]=vt>>>8,this[Lt]=vt&255,Lt+4},Ae.prototype.writeUint32BE=Ae.prototype.writeUInt32BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,4,4294967295,0),this[Lt]=vt>>>24,this[Lt+1]=vt>>>16,this[Lt+2]=vt>>>8,this[Lt+3]=vt&255,Lt+4},Ae.prototype.writeIntLE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Le=Math.pow(2,8*Bt-1);Cn(this,vt,Lt,Bt,Le-1,-Le)}var xe=0,Xe=1,Me=0;for(this[Lt]=vt&255;++xe<Bt&&(Xe*=256);)vt<0&&Me===0&&this[Lt+xe-1]!==0&&(Me=1),this[Lt+xe]=(vt/Xe>>0)-Me&255;return Lt+Bt},Ae.prototype.writeIntBE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Le=Math.pow(2,8*Bt-1);Cn(this,vt,Lt,Bt,Le-1,-Le)}var xe=Bt-1,Xe=1,Me=0;for(this[Lt+xe]=vt&255;--xe>=0&&(Xe*=256);)vt<0&&Me===0&&this[Lt+xe+1]!==0&&(Me=1),this[Lt+xe]=(vt/Xe>>0)-Me&255;return Lt+Bt},Ae.prototype.writeInt8=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,1,127,-128),vt<0&&(vt=255+vt+1),this[Lt]=vt&255,Lt+1},Ae.prototype.writeInt16LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,2,32767,-32768),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},Ae.prototype.writeInt16BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,2,32767,-32768),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},Ae.prototype.writeInt32LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,4,2147483647,-2147483648),this[Lt]=vt&255,this[Lt+1]=vt>>>8,this[Lt+2]=vt>>>16,this[Lt+3]=vt>>>24,Lt+4},Ae.prototype.writeInt32BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Cn(this,vt,Lt,4,2147483647,-2147483648),vt<0&&(vt=4294967295+vt+1),this[Lt]=vt>>>24,this[Lt+1]=vt>>>16,this[Lt+2]=vt>>>8,this[Lt+3]=vt&255,Lt+4};function li(mt,vt,Lt,Bt,_t,Le){if(Lt+Bt>mt.length)throw new RangeError("Index out of range");if(Lt<0)throw new RangeError("Index out of range")}function ai(mt,vt,Lt,Bt,_t){return vt=+vt,Lt=Lt>>>0,_t||li(mt,vt,Lt,4,34028234663852886e22,-34028234663852886e22),ue.write(mt,vt,Lt,Bt,23,4),Lt+4}Ae.prototype.writeFloatLE=function(vt,Lt,Bt){return ai(this,vt,Lt,!0,Bt)},Ae.prototype.writeFloatBE=function(vt,Lt,Bt){return ai(this,vt,Lt,!1,Bt)};function sn(mt,vt,Lt,Bt,_t){return vt=+vt,Lt=Lt>>>0,_t||li(mt,vt,Lt,8,17976931348623157e292,-17976931348623157e292),ue.write(mt,vt,Lt,Bt,52,8),Lt+8}Ae.prototype.writeDoubleLE=function(vt,Lt,Bt){return sn(this,vt,Lt,!0,Bt)},Ae.prototype.writeDoubleBE=function(vt,Lt,Bt){return sn(this,vt,Lt,!1,Bt)},Ae.prototype.copy=function(vt,Lt,Bt,_t){if(!Ae.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Bt||(Bt=0),!_t&&_t!==0&&(_t=this.length),Lt>=vt.length&&(Lt=vt.length),Lt||(Lt=0),_t>0&&_t<Bt&&(_t=Bt),_t===Bt||vt.length===0||this.length===0)return 0;if(Lt<0)throw new RangeError("targetStart out of bounds");if(Bt<0||Bt>=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-Lt<_t-Bt&&(_t=vt.length-Lt+Bt);var Le=_t-Bt;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Lt,Bt,_t):Uint8Array.prototype.set.call(vt,this.subarray(Bt,_t),Lt),Le},Ae.prototype.fill=function(vt,Lt,Bt,_t){if(typeof vt=="string"){if(typeof Lt=="string"?(_t=Lt,Lt=0,Bt=this.length):typeof Bt=="string"&&(_t=Bt,Bt=this.length),_t!==void 0&&typeof _t!="string")throw new TypeError("encoding must be a string");if(typeof _t=="string"&&!Ae.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(vt.length===1){var Le=vt.charCodeAt(0);(_t==="utf8"&&Le<128||_t==="latin1")&&(vt=Le)}}else typeof vt=="number"?vt=vt&255:typeof vt=="boolean"&&(vt=Number(vt));if(Lt<0||this.length<Lt||this.length<Bt)throw new RangeError("Out of range index");if(Bt<=Lt)return this;Lt=Lt>>>0,Bt=Bt===void 0?this.length:Bt>>>0,vt||(vt=0);var xe;if(typeof vt=="number")for(xe=Lt;xe<Bt;++xe)this[xe]=vt;else{var Xe=Ae.isBuffer(vt)?vt:Ae.from(vt,_t),Me=Xe.length;if(Me===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(xe=0;xe<Bt-Lt;++xe)this[xe+Lt]=Xe[xe%Me]}return this};var Rn=/[^+/0-9A-Za-z-_]/g;function ri(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(Rn,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function Ui(mt,vt){vt=vt||1/0;for(var Lt,Bt=mt.length,_t=null,Le=[],xe=0;xe<Bt;++xe){if(Lt=mt.charCodeAt(xe),Lt>55295&&Lt<57344){if(!_t){if(Lt>56319){(vt-=3)>-1&&Le.push(239,191,189);continue}else if(xe+1===Bt){(vt-=3)>-1&&Le.push(239,191,189);continue}_t=Lt;continue}if(Lt<56320){(vt-=3)>-1&&Le.push(239,191,189),_t=Lt;continue}Lt=(_t-55296<<10|Lt-56320)+65536}else _t&&(vt-=3)>-1&&Le.push(239,191,189);if(_t=null,Lt<128){if((vt-=1)<0)break;Le.push(Lt)}else if(Lt<2048){if((vt-=2)<0)break;Le.push(Lt>>6|192,Lt&63|128)}else if(Lt<65536){if((vt-=3)<0)break;Le.push(Lt>>12|224,Lt>>6&63|128,Lt&63|128)}else if(Lt<1114112){if((vt-=4)<0)break;Le.push(Lt>>18|240,Lt>>12&63|128,Lt>>6&63|128,Lt&63|128)}else throw new Error("Invalid code point")}return Le}function en(mt){for(var vt=[],Lt=0;Lt<mt.length;++Lt)vt.push(mt.charCodeAt(Lt)&255);return vt}function ei(mt,vt){for(var Lt,Bt,_t,Le=[],xe=0;xe<mt.length&&!((vt-=2)<0);++xe)Lt=mt.charCodeAt(xe),Bt=Lt>>8,_t=Lt%256,Le.push(_t),Le.push(Bt);return Le}function Fe(mt){return ee.toByteArray(ri(mt))}function ci(mt,vt,Lt,Bt){for(var _t=0;_t<Bt&&!(_t+Lt>=vt.length||_t>=mt.length);++_t)vt[_t+Lt]=mt[_t];return _t}function Ti(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function jt(mt){return mt!==mt}var Mt=function(){for(var mt="0123456789abcdef",vt=new Array(256),Lt=0;Lt<16;++Lt)for(var Bt=Lt*16,_t=0;_t<16;++_t)vt[Bt+_t]=mt[Lt]+mt[_t];return vt}()},57780:function(xn,ze,Qt){"use strict";Qt.r(ze),Qt.d(ze,{clsx:function(){return ee}});function Ct(ue){var Se,de,Ht="";if(typeof ue=="string"||typeof ue=="number")Ht+=ue;else if(typeof ue=="object")if(Array.isArray(ue))for(Se=0;Se<ue.length;Se++)ue[Se]&&(de=Ct(ue[Se]))&&(Ht&&(Ht+=" "),Ht+=de);else for(Se in ue)ue[Se]&&(Ht&&(Ht+=" "),Ht+=Se);return Ht}function ee(){for(var ue,Se,de=0,Ht="";de<arguments.length;)(ue=arguments[de++])&&(Se=Ct(ue))&&(Ht&&(Ht+=" "),Ht+=Se);return Ht}ze.default=ee},99498:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){Ct.defineOption("placeholder","",function(Ae,re,Wt){var Ie=Wt&&Wt!=Ct.Init;if(re&&!Ie)Ae.on("blur",de),Ae.on("change",Ht),Ae.on("swapDoc",Ht),Ct.on(Ae.getInputField(),"compositionupdate",Ae.state.placeholderCompose=function(){Se(Ae)}),Ht(Ae);else if(!re&&Ie){Ae.off("blur",de),Ae.off("change",Ht),Ae.off("swapDoc",Ht),Ct.off(Ae.getInputField(),"compositionupdate",Ae.state.placeholderCompose),ee(Ae);var Xt=Ae.getWrapperElement();Xt.className=Xt.className.replace(" CodeMirror-empty","")}re&&!Ae.hasFocus()&&de(Ae)});function ee(Ae){Ae.state.placeholder&&(Ae.state.placeholder.parentNode.removeChild(Ae.state.placeholder),Ae.state.placeholder=null)}function ue(Ae){ee(Ae);var re=Ae.state.placeholder=document.createElement("pre");re.style.cssText="height: 0; overflow: visible",re.style.direction=Ae.getOption("direction"),re.className="CodeMirror-placeholder CodeMirror-line-like";var Wt=Ae.getOption("placeholder");typeof Wt=="string"&&(Wt=document.createTextNode(Wt)),re.appendChild(Wt),Ae.display.lineSpace.insertBefore(re,Ae.display.lineSpace.firstChild)}function Se(Ae){setTimeout(function(){var re=!1,Wt=Ae.getInputField();Wt.nodeName=="TEXTAREA"?re=!Wt.value:Ae.lineCount()==1&&(re=!/[^\u200b]/.test(Wt.querySelector(".CodeMirror-line").textContent)),re?ue(Ae):ee(Ae)},20)}function de(Ae){ie(Ae)&&ue(Ae)}function Ht(Ae){var re=Ae.getWrapperElement(),Wt=ie(Ae);re.className=re.className.replace(" CodeMirror-empty","")+(Wt?" CodeMirror-empty":""),Wt?ue(Ae):ee(Ae)}function ie(Ae){return Ae.lineCount()===1&&Ae.getLine(0)===""}})},25717:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){var ee={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ue=Ct.Pos;Ct.defineOption("autoCloseBrackets",!1,function(nt,et,At){At&&At!=Ct.Init&&(nt.removeKeyMap(de),nt.state.closeBrackets=null),et&&(Ht(Se(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(de))});function Se(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:ee[et]}var de={Backspace:re,Enter:Wt};function Ht(nt){for(var et=0;et<nt.length;et++){var At=nt.charAt(et),at="'"+At+"'";de[at]||(de[at]=ie(At))}}Ht(ee.pairs+"`");function ie(nt){return function(et){return Xt(et,nt)}}function Ae(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var At=nt.getModeAt(nt.getCursor());return At.closeBrackets||et}function re(nt){var et=Ae(nt);if(!et||nt.getOption("disableInput"))return Ct.Pass;for(var At=Se(et,"pairs"),at=nt.listSelections(),ct=0;ct<at.length;ct++){if(!at[ct].empty())return Ct.Pass;var pt=Ee(nt,at[ct].head);if(!pt||At.indexOf(pt)%2!=0)return Ct.Pass}for(var ct=at.length-1;ct>=0;ct--){var xt=at[ct].head;nt.replaceRange("",ue(xt.line,xt.ch-1),ue(xt.line,xt.ch+1),"+delete")}}function Wt(nt){var et=Ae(nt),At=et&&Se(et,"explode");if(!At||nt.getOption("disableInput"))return Ct.Pass;for(var at=nt.listSelections(),ct=0;ct<at.length;ct++){if(!at[ct].empty())return Ct.Pass;var pt=Ee(nt,at[ct].head);if(!pt||At.indexOf(pt)%2!=0)return Ct.Pass}nt.operation(function(){var xt=nt.lineSeparator()||`
`;nt.replaceSelection(xt+xt,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var bt=0;bt<at.length;bt++){var Rt=at[bt].head.line;nt.indentLine(Rt,null,!0),nt.indentLine(Rt+1,null,!0)}})}function Ie(nt){var et=Ct.cmpPos(nt.anchor,nt.head)>0;return{anchor:new ue(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new ue(nt.head.line,nt.head.ch+(et?1:-1))}}function Xt(nt,et){var At=Ae(nt);if(!At||nt.getOption("disableInput"))return Ct.Pass;var at=Se(At,"pairs"),ct=at.indexOf(et);if(ct==-1)return Ct.Pass;for(var pt=Se(At,"closeBefore"),xt=Se(At,"triples"),bt=at.charAt(ct+1)==et,Rt=nt.listSelections(),Ot=ct%2==0,Zt,Vt=0;Vt<Rt.length;Vt++){var $t=Rt[Vt],Ce=$t.head,fe,rn=nt.getRange(Ce,ue(Ce.line,Ce.ch+1));if(Ot&&!$t.empty())fe="surround";else if((bt||!Ot)&&rn==et)bt&&It(nt,Ce)?fe="both":xt.indexOf(et)>=0&&nt.getRange(Ce,ue(Ce.line,Ce.ch+3))==et+et+et?fe="skipThree":fe="skip";else if(bt&&Ce.ch>1&&xt.indexOf(et)>=0&&nt.getRange(ue(Ce.line,Ce.ch-2),Ce)==et+et){if(Ce.ch>2&&/\bstring/.test(nt.getTokenTypeAt(ue(Ce.line,Ce.ch-2))))return Ct.Pass;fe="addFour"}else if(bt){var tn=Ce.ch==0?" ":nt.getRange(ue(Ce.line,Ce.ch-1),Ce);if(!Ct.isWordChar(rn)&&tn!=et&&!Ct.isWordChar(tn))fe="both";else return Ct.Pass}else if(Ot&&(rn.length===0||/\s/.test(rn)||pt.indexOf(rn)>-1))fe="both";else return Ct.Pass;if(!Zt)Zt=fe;else if(Zt!=fe)return Ct.Pass}var Bn=ct%2?at.charAt(ct-1):et,Fn=ct%2?et:at.charAt(ct+1);nt.operation(function(){if(Zt=="skip")nt.execCommand("goCharRight");else if(Zt=="skipThree")for(var kn=0;kn<3;kn++)nt.execCommand("goCharRight");else if(Zt=="surround"){for(var Gn=nt.getSelections(),kn=0;kn<Gn.length;kn++)Gn[kn]=Bn+Gn[kn]+Fn;nt.replaceSelections(Gn,"around"),Gn=nt.listSelections().slice();for(var kn=0;kn<Gn.length;kn++)Gn[kn]=Ie(Gn[kn]);nt.setSelections(Gn)}else Zt=="both"?(nt.replaceSelection(Bn+Fn,null),nt.triggerElectric(Bn+Fn),nt.execCommand("goCharLeft")):Zt=="addFour"&&(nt.replaceSelection(Bn+Bn+Bn+Bn,"before"),nt.execCommand("goCharRight"))})}function Ee(nt,et){var At=nt.getRange(ue(et.line,et.ch-1),ue(et.line,et.ch+1));return At.length==2?At:null}function It(nt,et){var At=nt.getTokenAt(ue(et.line,et.ch+1));return/\bstring/.test(At.type)&&At.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780),Qt(32855))})(function(Ct){Ct.defineOption("autoCloseTags",!1,function(re,Wt,Ie){if(Ie!=Ct.Init&&Ie&&re.removeKeyMap("autoCloseTags"),!!Wt){var Xt={name:"autoCloseTags"};(typeof Wt!="object"||Wt.whenClosing!==!1)&&(Xt["'/'"]=function(Ee){return Ht(Ee)}),(typeof Wt!="object"||Wt.whenOpening!==!1)&&(Xt["'>'"]=function(Ee){return Se(Ee)}),re.addKeyMap(Xt)}});var ee=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ue=["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 Se(re){if(re.getOption("disableInput"))return Ct.Pass;for(var Wt=re.listSelections(),Ie=[],Xt=re.getOption("autoCloseTags"),Ee=0;Ee<Wt.length;Ee++){if(!Wt[Ee].empty())return Ct.Pass;var It=Wt[Ee].head,nt=re.getTokenAt(It),et=Ct.innerMode(re.getMode(),nt.state),At=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(At),ct=at&&at.name;if(!ct)return Ct.Pass;var pt=et.mode.configuration=="html",xt=typeof Xt=="object"&&Xt.dontCloseTags||pt&&ee,bt=typeof Xt=="object"&&Xt.indentTags||pt&&ue;nt.end>It.ch&&(ct=ct.slice(0,ct.length-nt.end+It.ch));var Rt=ct.toLowerCase();if(!ct||nt.type=="string"&&(nt.end!=It.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==It.ch-nt.start-1||xt&&ie(xt,Rt)>-1||Ae(re,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(At)||[],ct,It,!0))return Ct.Pass;var Ot=typeof Xt=="object"&&Xt.emptyTags;if(Ot&&ie(Ot,ct)>-1){Ie[Ee]={text:"/>",newPos:Ct.Pos(It.line,It.ch+2)};continue}var Zt=bt&&ie(bt,Rt)>-1;Ie[Ee]={indent:Zt,text:">"+(Zt?`
`:"")+"</"+ct+">",newPos:Zt?Ct.Pos(It.line+1,0):Ct.Pos(It.line,It.ch+1)}}for(var Vt=typeof Xt=="object"&&Xt.dontIndentOnAutoClose,Ee=Wt.length-1;Ee>=0;Ee--){var $t=Ie[Ee];re.replaceRange($t.text,Wt[Ee].head,Wt[Ee].anchor,"+insert");var Ce=re.listSelections().slice(0);Ce[Ee]={head:$t.newPos,anchor:$t.newPos},re.setSelections(Ce),!Vt&&$t.indent&&(re.indentLine($t.newPos.line,null,!0),re.indentLine($t.newPos.line+1,null,!0))}}function de(re,Wt){for(var Ie=re.listSelections(),Xt=[],Ee=Wt?"/":"</",It=re.getOption("autoCloseTags"),nt=typeof It=="object"&&It.dontIndentOnSlash,et=0;et<Ie.length;et++){if(!Ie[et].empty())return Ct.Pass;var At=Ie[et].head,at=re.getTokenAt(At),ct=Ct.innerMode(re.getMode(),at.state),pt=ct.state;if(Wt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=At.ch-1))return Ct.Pass;var xt,bt=ct.mode.name!="xml"&&re.getMode().name=="htmlmixed";if(bt&&ct.mode.name=="javascript")xt=Ee+"script";else if(bt&&ct.mode.name=="css")xt=Ee+"style";else{var Rt=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(pt);if(!Rt||Rt.length&&Ae(re,Rt,Rt[Rt.length-1],At))return Ct.Pass;xt=Ee+Rt[Rt.length-1]}re.getLine(At.line).charAt(at.end)!=">"&&(xt+=">"),Xt[et]=xt}if(re.replaceSelections(Xt),Ie=re.listSelections(),!nt)for(var et=0;et<Ie.length;et++)(et==Ie.length-1||Ie[et].head.line<Ie[et+1].head.line)&&re.indentLine(Ie[et].head.line)}function Ht(re){return re.getOption("disableInput")?Ct.Pass:de(re,!0)}Ct.commands.closeTag=function(re){return de(re)};function ie(re,Wt){if(re.indexOf)return re.indexOf(Wt);for(var Ie=0,Xt=re.length;Ie<Xt;++Ie)if(re[Ie]==Wt)return Ie;return-1}function Ae(re,Wt,Ie,Xt,Ee){if(!Ct.scanForClosingTag)return!1;var It=Math.min(re.lastLine()+1,Xt.line+500),nt=Ct.scanForClosingTag(re,Xt,null,It);if(!nt||nt.tag!=Ie)return!1;for(var et=Ee?1:0,At=Wt.length-1;At>=0&&Wt[At]==Ie;At--)++et;Xt=nt.to;for(var At=1;At<et;At++){var at=Ct.scanForClosingTag(re,Xt,null,It);if(!at||at.tag!=Ie)return!1;Xt=at.to}return!0}})},32855:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){"use strict";var ee=Ct.Pos;function ue(At,at){return At.line-at.line||At.ch-at.ch}var Se="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",de=Se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ht=new RegExp("<(/?)(["+Se+"]["+de+"]*)","g");function ie(At,at,ct,pt){this.line=at,this.ch=ct,this.cm=At,this.text=At.getLine(at),this.min=pt?Math.max(pt.from,At.firstLine()):At.firstLine(),this.max=pt?Math.min(pt.to-1,At.lastLine()):At.lastLine()}function Ae(At,at){var ct=At.cm.getTokenTypeAt(ee(At.line,at));return ct&&/\btag\b/.test(ct)}function re(At){if(!(At.line>=At.max))return At.ch=0,At.text=At.cm.getLine(++At.line),!0}function Wt(At){if(!(At.line<=At.min))return At.text=At.cm.getLine(--At.line),At.ch=At.text.length,!0}function Ie(At){for(;;){var at=At.text.indexOf(">",At.ch);if(at==-1){if(re(At))continue;return}if(!Ae(At,at+1)){At.ch=at+1;continue}var ct=At.text.lastIndexOf("/",at),pt=ct>-1&&!/\S/.test(At.text.slice(ct+1,at));return At.ch=at+1,pt?"selfClose":"regular"}}function Xt(At){for(;;){var at=At.ch?At.text.lastIndexOf("<",At.ch-1):-1;if(at==-1){if(Wt(At))continue;return}if(!Ae(At,at+1)){At.ch=at;continue}Ht.lastIndex=at,At.ch=at;var ct=Ht.exec(At.text);if(ct&&ct.index==at)return ct}}function Ee(At){for(;;){Ht.lastIndex=At.ch;var at=Ht.exec(At.text);if(!at){if(re(At))continue;return}if(!Ae(At,at.index+1)){At.ch=at.index+1;continue}return At.ch=at.index+at[0].length,at}}function It(At){for(;;){var at=At.ch?At.text.lastIndexOf(">",At.ch-1):-1;if(at==-1){if(Wt(At))continue;return}if(!Ae(At,at+1)){At.ch=at;continue}var ct=At.text.lastIndexOf("/",at),pt=ct>-1&&!/\S/.test(At.text.slice(ct+1,at));return At.ch=at+1,pt?"selfClose":"regular"}}function nt(At,at){for(var ct=[];;){var pt=Ee(At),xt,bt=At.line,Rt=At.ch-(pt?pt[0].length:0);if(!pt||!(xt=Ie(At)))return;if(xt!="selfClose")if(pt[1]){for(var Ot=ct.length-1;Ot>=0;--Ot)if(ct[Ot]==pt[2]){ct.length=Ot;break}if(Ot<0&&(!at||at==pt[2]))return{tag:pt[2],from:ee(bt,Rt),to:ee(At.line,At.ch)}}else ct.push(pt[2])}}function et(At,at){for(var ct=[];;){var pt=It(At);if(!pt)return;if(pt=="selfClose"){Xt(At);continue}var xt=At.line,bt=At.ch,Rt=Xt(At);if(!Rt)return;if(Rt[1])ct.push(Rt[2]);else{for(var Ot=ct.length-1;Ot>=0;--Ot)if(ct[Ot]==Rt[2]){ct.length=Ot;break}if(Ot<0&&(!at||at==Rt[2]))return{tag:Rt[2],from:ee(At.line,At.ch),to:ee(xt,bt)}}}}Ct.registerHelper("fold","xml",function(At,at){for(var ct=new ie(At,at.line,0);;){var pt=Ee(ct);if(!pt||ct.line!=at.line)return;var xt=Ie(ct);if(!xt)return;if(!pt[1]&&xt!="selfClose"){var bt=ee(ct.line,ct.ch),Rt=nt(ct,pt[2]);return Rt&&ue(Rt.from,bt)>0?{from:bt,to:Rt.from}:null}}}),Ct.findMatchingTag=function(At,at,ct){var pt=new ie(At,at.line,at.ch,ct);if(!(pt.text.indexOf(">")==-1&&pt.text.indexOf("<")==-1)){var xt=Ie(pt),bt=xt&&ee(pt.line,pt.ch),Rt=xt&&Xt(pt);if(!(!xt||!Rt||ue(pt,at)>0)){var Ot={from:ee(pt.line,pt.ch),to:bt,tag:Rt[2]};return xt=="selfClose"?{open:Ot,close:null,at:"open"}:Rt[1]?{open:et(pt,Rt[2]),close:Ot,at:"close"}:(pt=new ie(At,bt.line,bt.ch,ct),{open:Ot,close:nt(pt,Rt[2]),at:"open"})}}},Ct.findEnclosingTag=function(At,at,ct,pt){for(var xt=new ie(At,at.line,at.ch,ct);;){var bt=et(xt,pt);if(!bt)break;var Rt=new ie(At,at.line,at.ch,ct),Ot=nt(Rt,bt.tag);if(Ot)return{open:bt,close:Ot}}},Ct.scanForClosingTag=function(At,at,ct,pt){var xt=new ie(At,at.line,at.ch,pt?{from:0,to:pt}:null);return nt(xt,ct)}})},89780:function(xn){(function(ze,Qt){xn.exports=Qt()})(this,function(){"use strict";var ze=navigator.userAgent,Qt=navigator.platform,Ct=/gecko\/\d/i.test(ze),ee=/MSIE \d/.test(ze),ue=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ze),Se=/Edge\/(\d+)/.exec(ze),de=ee||ue||Se,Ht=de&&(ee?document.documentMode||6:+(Se||ue)[1]),ie=!Se&&/WebKit\//.test(ze),Ae=ie&&/Qt\/\d+\.\d+/.test(ze),re=!Se&&/Chrome\//.test(ze),Wt=/Opera\//.test(ze),Ie=/Apple Computer/.test(navigator.vendor),Xt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ze),Ee=/PhantomJS/.test(ze),It=!Se&&/AppleWebKit/.test(ze)&&/Mobile\/\w+/.test(ze),nt=/Android/.test(ze),et=It||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ze),At=It||/Mac/.test(Qt),at=/\bCrOS\b/.test(ze),ct=/win/i.test(Qt),pt=Wt&&ze.match(/Version\/(\d*\.\d*)/);pt&&(pt=Number(pt[1])),pt&&pt>=15&&(Wt=!1,ie=!0);var xt=At&&(Ae||Wt&&(pt==null||pt<12.11)),bt=Ct||de&&Ht>=9;function Rt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ot=function(it,st){var dt=it.className,ht=Rt(st).exec(dt);if(ht){var gt=dt.slice(ht.index+ht[0].length);it.className=dt.slice(0,ht.index)+(gt?ht[1]+gt:"")}};function Zt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Vt(it,st){return Zt(it).appendChild(st)}function $t(it,st,dt,ht){var gt=document.createElement(it);if(dt&&(gt.className=dt),ht&&(gt.style.cssText=ht),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,ht){var gt=$t(it,st,dt,ht);return gt.setAttribute("role","presentation"),gt}var fe;document.createRange?fe=function(it,st,dt,ht){var gt=document.createRange();return gt.setEnd(ht||it,dt),gt.setStart(it,st),gt}:fe=function(it,st,dt){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(gt){return ht}return ht.collapse(!0),ht.moveEnd("character",dt),ht.moveStart("character",st),ht};function rn(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 tn(){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 Bn(it,st){var dt=it.className;Rt(st).test(dt)||(it.className+=(dt?" ":"")+st)}function Fn(it,st){for(var dt=it.split(" "),ht=0;ht<dt.length;ht++)dt[ht]&&!Rt(dt[ht]).test(st)&&(st+=" "+dt[ht]);return st}var kn=function(it){it.select()};It?kn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:de&&(kn=function(it){try{it.select()}catch(st){}});function Gn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function ti(it,st,dt){st||(st={});for(var ht in it)it.hasOwnProperty(ht)&&(dt!==!1||!st.hasOwnProperty(ht))&&(st[ht]=it[ht]);return st}function me(it,st,dt,ht,gt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ht||0,Kt=gt||0;;){var qt=it.indexOf(" ",Nt);if(qt<0||qt>=st)return Kt+(st-Nt);Kt+=qt-Nt,Kt+=dt-Kt%dt,Nt=qt+1}}var oe=function(){this.id=null,this.f=null,this.time=0,this.handler=Gn(this.onTimeout,this)};oe.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},oe.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 Cn(it,st){for(var dt=0;dt<it.length;++dt)if(it[dt]==st)return dt;return-1}var li=50,ai={toString:function(){return"CodeMirror.Pass"}},sn={scroll:!1},Rn={origin:"*mouse"},ri={origin:"+move"};function Ui(it,st,dt){for(var ht=0,gt=0;;){var Nt=it.indexOf(" ",ht);Nt==-1&&(Nt=it.length);var Kt=Nt-ht;if(Nt==it.length||gt+Kt>=st)return ht+Math.min(Kt,st-gt);if(gt+=Nt-ht,gt+=dt-gt%dt,ht=Nt+1,gt>=st)return ht}}var en=[""];function ei(it){for(;en.length<=it;)en.push(Fe(en)+" ");return en[it]}function Fe(it){return it[it.length-1]}function ci(it,st){for(var dt=[],ht=0;ht<it.length;ht++)dt[ht]=st(it[ht],ht);return dt}function Ti(it,st,dt){for(var ht=0,gt=dt(st);ht<it.length&&dt(it[ht])<=gt;)ht++;it.splice(ht,0,st)}function jt(){}function Mt(it,st){var dt;return Object.create?dt=Object.create(it):(jt.prototype=it,dt=new jt),st&&ti(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 Lt(it,st){return st?st.source.indexOf("\\w")>-1&&vt(it)?!0:st.test(it):vt(it)}function Bt(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 Le(it){return it.charCodeAt(0)>=768&&_t.test(it)}function xe(it,st,dt){for(;(dt<0?st>0:st<it.length)&&Le(it.charAt(st));)st+=dt;return st}function Xe(it,st,dt){for(var ht=st>dt?-1:1;;){if(st==dt)return st;var gt=(st+dt)/2,Nt=ht<0?Math.ceil(gt):Math.floor(gt);if(Nt==st)return it(Nt)?st:dt;it(Nt)?dt=Nt:st=Nt+ht}}function Me(it,st,dt,ht){if(!it)return ht(st,dt,"ltr",0);for(var gt=!1,Nt=0;Nt<it.length;++Nt){var Kt=it[Nt];(Kt.from<dt&&Kt.to>st||st==dt&&Kt.to==st)&&(ht(Math.max(Kt.from,st),Math.min(Kt.to,dt),Kt.level==1?"rtl":"ltr",Nt),gt=!0)}gt||ht(st,dt,"ltr")}var De=null;function Oe(it,st,dt){var ht;De=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"?ht=gt:De=gt),Nt.from==st&&(Nt.from!=Nt.to&&dt!="before"?ht=gt:De=gt)}return ht!=null?ht:De}var nn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(pe){return pe<=247?it.charAt(pe):1424<=pe&&pe<=1524?"R":1536<=pe&&pe<=1785?st.charAt(pe-1536):1774<=pe&&pe<=2220?"r":8192<=pe&&pe<=8203?"w":pe==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,gt=/[stwN]/,Nt=/[LRr]/,Kt=/[Lb1n]/,qt=/[1n]/;function Yt(pe,$e,ye){this.level=pe,this.from=$e,this.to=ye}return function(pe,$e){var ye=$e=="ltr"?"L":"R";if(pe.length==0||$e=="ltr"&&!ht.test(pe))return!1;for(var Pn=pe.length,wn=[],wi=0;wi<Pn;++wi)wn.push(dt(pe.charCodeAt(wi)));for(var Fi=0,_i=ye;Fi<Pn;++Fi){var sr=wn[Fi];sr=="m"?wn[Fi]=_i:_i=sr}for(var Dr=0,Sr=ye;Dr<Pn;++Dr){var Kr=wn[Dr];Kr=="1"&&Sr=="r"?wn[Dr]="n":Nt.test(Kr)&&(Sr=Kr,Kr=="r"&&(wn[Dr]="R"))}for(var fo=1,vr=wn[0];fo<Pn-1;++fo){var To=wn[fo];To=="+"&&vr=="1"&&wn[fo+1]=="1"?wn[fo]="1":To==","&&vr==wn[fo+1]&&(vr=="1"||vr=="n")&&(wn[fo]=vr),vr=To}for(var Os=0;Os<Pn;++Os){var Ca=wn[Os];if(Ca==",")wn[Os]="N";else if(Ca=="%"){var js=void 0;for(js=Os+1;js<Pn&&wn[js]=="%";++js);for(var vl=Os&&wn[Os-1]=="!"||js<Pn&&wn[js]=="1"?"1":"N",Ta=Os;Ta<js;++Ta)wn[Ta]=vl;Os=js-1}}for(var ya=0,al=ye;ya<Pn;++ya){var Oa=wn[ya];al=="L"&&Oa=="1"?wn[ya]="L":Nt.test(Oa)&&(al=Oa)}for(var pr=0;pr<Pn;++pr)if(gt.test(wn[pr])){var Zo=void 0;for(Zo=pr+1;Zo<Pn&&gt.test(wn[Zo]);++Zo);for(var Hs=(pr?wn[pr-1]:ye)=="L",bs=(Zo<Pn?wn[Zo]:ye)=="L",Ha=Hs==bs?Hs?"L":"R":ye,Jo=pr;Jo<Zo;++Jo)wn[Jo]=Ha;pr=Zo-1}for(var Lo=[],yl,$s=0;$s<Pn;)if(Kt.test(wn[$s])){var XA=$s;for(++$s;$s<Pn&&Kt.test(wn[$s]);++$s);Lo.push(new Yt(0,XA,$s))}else{var Vl=$s,Va=Lo.length,wl=$e=="rtl"?1:0;for(++$s;$s<Pn&&wn[$s]!="L";++$s);for(var Cs=Vl;Cs<$s;)if(qt.test(wn[Cs])){Vl<Cs&&(Lo.splice(Va,0,new Yt(1,Vl,Cs)),Va+=wl);var Pa=Cs;for(++Cs;Cs<$s&&qt.test(wn[Cs]);++Cs);Lo.splice(Va,0,new Yt(2,Pa,Cs)),Va+=wl,Vl=Cs}else++Cs;Vl<$s&&Lo.splice(Va,0,new Yt(1,Vl,$s))}return $e=="ltr"&&(Lo[0].level==1&&(yl=pe.match(/^\s+/))&&(Lo[0].from=yl[0].length,Lo.unshift(new Yt(0,0,yl[0].length))),Fe(Lo).level==1&&(yl=pe.match(/\s+$/))&&(Fe(Lo).to-=yl[0].length,Lo.push(new Yt(0,Pn-yl[0].length,Pn)))),$e=="rtl"?Lo.reverse():Lo}}();function mn(it,st){var dt=it.order;return dt==null&&(dt=it.order=nn(it.text,st)),dt}var On=[],yn=function(it,st,dt){if(it.addEventListener)it.addEventListener(st,dt,!1);else if(it.attachEvent)it.attachEvent("on"+st,dt);else{var ht=it._handlers||(it._handlers={});ht[st]=(ht[st]||On).concat(dt)}};function ui(it,st){return it._handlers&&it._handlers[st]||On}function oi(it,st,dt){if(it.removeEventListener)it.removeEventListener(st,dt,!1);else if(it.detachEvent)it.detachEvent("on"+st,dt);else{var ht=it._handlers,gt=ht&&ht[st];if(gt){var Nt=Cn(gt,dt);Nt>-1&&(ht[st]=gt.slice(0,Nt).concat(gt.slice(Nt+1)))}}}function gi(it,st){var dt=ui(it,st);if(dt.length)for(var ht=Array.prototype.slice.call(arguments,2),gt=0;gt<dt.length;++gt)dt[gt].apply(null,ht)}function bi(it,st,dt){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),gi(it,dt||st.type,it,st),Ji(st)||st.codemirrorIgnore}function cr(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var dt=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<st.length;++ht)Cn(dt,st[ht])==-1&&dt.push(st[ht])}function Ei(it,st){return ui(it,st).length>0}function Ri(it){it.prototype.on=function(st,dt){yn(this,st,dt)},it.prototype.off=function(st,dt){oi(this,st,dt)}}function Ki(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function _r(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Ji(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Er(it){Ki(it),_r(it)}function yr(it){return it.target||it.srcElement}function Vr(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),At&&it.ctrlKey&&st==1&&(st=3),st}var Zi=function(){if(de&&Ht<9)return!1;var it=$t("div");return"draggable"in it||"dragDrop"in it}(),oo;function xo(it){if(oo==null){var st=$t("span","\u200B");Vt(it,$t("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(oo=st.offsetWidth<=1&&st.offsetHeight>2&&!(de&&Ht<8))}var dt=oo?$t("span","\u200B"):$t("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var no;function br(it){if(no!=null)return no;var st=Vt(it,document.createTextNode("A\u062EA")),dt=fe(st,0,1).getBoundingClientRect(),ht=fe(st,1,2).getBoundingClientRect();return Zt(it),!dt||dt.left==dt.right?!1:no=ht.right-dt.right<3}var uo=`
b`.split(/\n/).length!=3?function(it){for(var st=0,dt=[],ht=it.length;st<=ht;){var gt=it.indexOf(`
`,st);gt==-1&&(gt=it.length);var Nt=it.slice(st,it.charAt(gt-1)=="\r"?gt-1:gt),Kt=Nt.indexOf("\r");Kt!=-1?(dt.push(Nt.slice(0,Kt)),st+=Kt+1):(dt.push(Nt),st=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Tt=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},Gi=function(){var it=$t("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Vi=null;function xi(it){if(Vi!=null)return Vi;var st=Vt(it,$t("span","x")),dt=st.getBoundingClientRect(),ht=fe(st,0,1).getBoundingClientRect();return Vi=Math.abs(dt.left-ht.left)>1}var Oi={},zi={};function or(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Oi[it]=st}function Yr(it,st){zi[it]=st}function Tr(it){if(typeof it=="string"&&zi.hasOwnProperty(it))it=zi[it];else if(it&&typeof it.name=="string"&&zi.hasOwnProperty(it.name)){var st=zi[it.name];typeof st=="string"&&(st={name:st}),it=Mt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Tr("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Tr("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function je(it,st){st=Tr(st);var dt=Oi[st.name];if(!dt)return je(it,"text/plain");var ht=dt(it,st);if(Je.hasOwnProperty(st.name)){var gt=Je[st.name];for(var Nt in gt)gt.hasOwnProperty(Nt)&&(ht.hasOwnProperty(Nt)&&(ht["_"+Nt]=ht[Nt]),ht[Nt]=gt[Nt])}if(ht.name=st.name,st.helperType&&(ht.helperType=st.helperType),st.modeProps)for(var Kt in st.modeProps)ht[Kt]=st.modeProps[Kt];return ht}var Je={};function Ke(it,st){var dt=Je.hasOwnProperty(it)?Je[it]:Je[it]={};ti(st,dt)}function Ci(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var dt={};for(var ht in st){var gt=st[ht];gt instanceof Array&&(gt=gt.concat([])),dt[ht]=gt}return dt}function Ne(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 Qi(it,st,dt){return it.startState?it.startState(st,dt):!0}var Hn=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};Hn.prototype.eol=function(){return this.pos>=this.string.length},Hn.prototype.sol=function(){return this.pos==this.lineStart},Hn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Hn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Hn.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},Hn.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},Hn.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Hn.prototype.skipToEnd=function(){this.pos=this.string.length},Hn.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Hn.prototype.backUp=function(it){this.pos-=it},Hn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Hn.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Hn.prototype.match=function(it,st,dt){if(typeof it=="string"){var ht=function(Kt){return dt?Kt.toLowerCase():Kt},gt=this.string.substr(this.pos,it.length);if(ht(gt)==ht(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)}},Hn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Hn.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Hn.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Hn.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function fi(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 ht=0;;++ht){var gt=dt.children[ht],Nt=gt.chunkSize();if(st<Nt){dt=gt;break}st-=Nt}return dt.lines[st]}function $i(it,st,dt){var ht=[],gt=st.line;return it.iter(st.line,dt.line+1,function(Nt){var Kt=Nt.text;gt==dt.line&&(Kt=Kt.slice(0,dt.ch)),gt==st.line&&(Kt=Kt.slice(st.ch)),ht.push(Kt),++gt}),ht}function Mr(it,st,dt){var ht=[];return it.iter(st,dt,function(gt){ht.push(gt.text)}),ht}function Br(it,st){var dt=st-it.height;if(dt)for(var ht=it;ht;ht=ht.parent)ht.height+=dt}function te(it){if(it.parent==null)return null;for(var st=it.parent,dt=Cn(st.lines,it),ht=st.parent;ht;st=ht,ht=ht.parent)for(var gt=0;ht.children[gt]!=st;++gt)dt+=ht.children[gt].chunkSize();return dt+st.first}function ke(it,st){var dt=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var gt=it.children[ht],Nt=gt.height;if(st<Nt){it=gt;continue t}st-=Nt,dt+=gt.chunkSize()}return dt}while(!it.lines);for(var Kt=0;Kt<it.lines.length;++Kt){var qt=it.lines[Kt],Yt=qt.height;if(st<Yt)break;st-=Yt}return dt+Kt}function zn(it,st){return st>=it.first&&st<it.first+it.size}function ni(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ye(it,st,dt){if(dt===void 0&&(dt=null),!(this instanceof Ye))return new Ye(it,st,dt);this.line=it,this.ch=st,this.sticky=dt}function Kn(it,st){return it.line-st.line||it.ch-st.ch}function _n(it,st){return it.sticky==st.sticky&&Kn(it,st)==0}function We(it){return Ye(it.line,it.ch)}function on(it,st){return Kn(it,st)<0?st:it}function An(it,st){return Kn(it,st)<0?it:st}function Nn(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Vn(it,st){if(st.line<it.first)return Ye(it.first,0);var dt=it.first+it.size-1;return st.line>dt?Ye(dt,fi(it,dt).text.length):Yi(st,fi(it,st.line).text.length)}function Yi(it,st){var dt=it.ch;return dt==null||dt>st?Ye(it.line,st):dt<0?Ye(it.line,0):it}function Li(it,st){for(var dt=[],ht=0;ht<st.length;ht++)dt[ht]=Vn(it,st[ht]);return dt}var Bi=function(it,st){this.state=it,this.lookAhead=st},Ve=function(it,st,dt,ht){this.state=st,this.doc=it,this.line=dt,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};Ve.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Ve.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}},Ve.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ve.fromSaved=function(it,st,dt){return st instanceof Bi?new Ve(it,Ci(it.mode,st.state),dt,st.lookAhead):new Ve(it,Ci(it.mode,st),dt)},Ve.prototype.save=function(it){var st=it!==!1?Ci(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Bi(st,this.maxLookAhead):st};function tr(it,st,dt,ht){var gt=[it.state.modeGen],Nt={};Wi(it,st.text,it.doc.mode,dt,function(pe,$e){return gt.push(pe,$e)},Nt,ht);for(var Kt=dt.state,qt=function(pe){dt.baseTokens=gt;var $e=it.state.overlays[pe],ye=1,Pn=0;dt.state=!0,Wi(it,st.text,$e.mode,dt,function(wn,wi){for(var Fi=ye;Pn<wn;){var _i=gt[ye];_i>wn&&gt.splice(ye,1,wn,gt[ye+1],_i),ye+=2,Pn=Math.min(wn,_i)}if(wi)if($e.opaque)gt.splice(Fi,ye-Fi,wn,"overlay "+wi),ye=Fi+2;else for(;Fi<ye;Fi+=2){var sr=gt[Fi+1];gt[Fi+1]=(sr?sr+" ":"")+"overlay "+wi}},Nt),dt.state=Kt,dt.baseTokens=null,dt.baseTokenPos=1},Yt=0;Yt<it.state.overlays.length;++Yt)qt(Yt);return{styles:gt,classes:Nt.bgClass||Nt.textClass?Nt:null}}function dr(it,st,dt){if(!st.styles||st.styles[0]!=it.state.modeGen){var ht=qr(it,te(st)),gt=st.text.length>it.options.maxHighlightLength&&Ci(it.doc.mode,ht.state),Nt=tr(it,st,ht);gt&&(ht.state=gt),st.stateAfter=ht.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 qr(it,st,dt){var ht=it.doc,gt=it.display;if(!ht.mode.startState)return new Ve(ht,!0,st);var Nt=Ar(it,st,dt),Kt=Nt>ht.first&&fi(ht,Nt-1).stateAfter,qt=Kt?Ve.fromSaved(ht,Kt,Nt):new Ve(ht,Qi(ht.mode),Nt);return ht.iter(Nt,st,function(Yt){hn(it,Yt.text,qt);var pe=qt.line;Yt.stateAfter=pe==st-1||pe%5==0||pe>=gt.viewFrom&&pe<gt.viewTo?qt.save():null,qt.nextLine()}),dt&&(ht.modeFrontier=qt.line),qt}function hn(it,st,dt,ht){var gt=it.doc.mode,Nt=new Hn(st,it.options.tabSize,dt);for(Nt.start=Nt.pos=ht||0,st==""&&Wn(gt,dt.state);!Nt.eol();)Si(gt,Nt,dt.state),Nt.start=Nt.pos}function Wn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var dt=Ne(it,st);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function Si(it,st,dt,ht){for(var gt=0;gt<10;gt++){ht&&(ht[0]=Ne(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 vi=function(it,st,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=dt};function mi(it,st,dt,ht){var gt=it.doc,Nt=gt.mode,Kt;st=Vn(gt,st);var qt=fi(gt,st.line),Yt=qr(it,st.line,dt),pe=new Hn(qt.text,it.options.tabSize,Yt),$e;for(ht&&($e=[]);(ht||pe.pos<st.ch)&&!pe.eol();)pe.start=pe.pos,Kt=Si(Nt,pe,Yt.state),ht&&$e.push(new vi(pe,Kt,Ci(gt.mode,Yt.state)));return ht?$e:new vi(pe,Kt,Yt.state)}function Ii(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 ht=dt[1]?"bgClass":"textClass";st[ht]==null?st[ht]=dt[2]:new RegExp("(?:^|\\s)"+dt[2]+"(?:$|\\s)").test(st[ht])||(st[ht]+=" "+dt[2])}return it}function Wi(it,st,dt,ht,gt,Nt,Kt){var qt=dt.flattenSpans;qt==null&&(qt=it.options.flattenSpans);var Yt=0,pe=null,$e=new Hn(st,it.options.tabSize,ht),ye,Pn=it.options.addModeClass&&[null];for(st==""&&Ii(Wn(dt,ht.state),Nt);!$e.eol();){if($e.pos>it.options.maxHighlightLength?(qt=!1,Kt&&hn(it,st,ht,$e.pos),$e.pos=st.length,ye=null):ye=Ii(Si(dt,$e,ht.state,Pn),Nt),Pn){var wn=Pn[0].name;wn&&(ye="m-"+(ye?wn+" "+ye:wn))}if(!qt||pe!=ye){for(;Yt<$e.start;)Yt=Math.min($e.start,Yt+5e3),gt(Yt,pe);pe=ye}$e.start=$e.pos}for(;Yt<$e.pos;){var wi=Math.min($e.pos,Yt+5e3);gt(wi,pe),Yt=wi}}function Ar(it,st,dt){for(var ht,gt,Nt=it.doc,Kt=dt?-1:st-(it.doc.mode.innerMode?1e3:100),qt=st;qt>Kt;--qt){if(qt<=Nt.first)return Nt.first;var Yt=fi(Nt,qt-1),pe=Yt.stateAfter;if(pe&&(!dt||qt+(pe instanceof Bi?pe.lookAhead:0)<=Nt.modeFrontier))return qt;var $e=me(Yt.text,null,it.options.tabSize);(gt==null||ht>$e)&&(gt=qt-1,ht=$e)}return gt}function ae(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var dt=it.first,ht=st-1;ht>dt;ht--){var gt=fi(it,ht).stateAfter;if(gt&&(!(gt instanceof Bi)||ht+gt.lookAhead<st)){dt=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,dt)}}var ce=!1,ne=!1;function Ge(){ce=!0}function Be(){ne=!0}function cn(it,st,dt){this.marker=it,this.from=st,this.to=dt}function Yn(it,st){if(it)for(var dt=0;dt<it.length;++dt){var ht=it[dt];if(ht.marker==st)return ht}}function Xn(it,st){for(var dt,ht=0;ht<it.length;++ht)it[ht]!=st&&(dt||(dt=[])).push(it[ht]);return dt}function ki(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function ii(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Kt=Nt.marker,qt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!dt||!Nt.marker.insertLeft)){var Yt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);(ht||(ht=[])).push(new cn(Kt,Nt.from,Yt?null:Nt.to))}}return ht}function be(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Kt=Nt.marker,qt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!dt||Nt.marker.insertLeft)){var Yt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ht||(ht=[])).push(new cn(Kt,Yt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ht}function yi(it,st){if(st.full)return null;var dt=zn(it,st.from.line)&&fi(it,st.from.line).markedSpans,ht=zn(it,st.to.line)&&fi(it,st.to.line).markedSpans;if(!dt&&!ht)return null;var gt=st.from.ch,Nt=st.to.ch,Kt=Kn(st.from,st.to)==0,qt=ii(dt,gt,Kt),Yt=be(ht,Nt,Kt),pe=st.text.length==1,$e=Fe(st.text).length+(pe?gt:0);if(qt)for(var ye=0;ye<qt.length;++ye){var Pn=qt[ye];if(Pn.to==null){var wn=Yn(Yt,Pn.marker);wn?pe&&(Pn.to=wn.to==null?null:wn.to+$e):Pn.to=gt}}if(Yt)for(var wi=0;wi<Yt.length;++wi){var Fi=Yt[wi];if(Fi.to!=null&&(Fi.to+=$e),Fi.from==null){var _i=Yn(qt,Fi.marker);_i||(Fi.from=$e,pe&&(qt||(qt=[])).push(Fi))}else Fi.from+=$e,pe&&(qt||(qt=[])).push(Fi)}qt&&(qt=Te(qt)),Yt&&Yt!=qt&&(Yt=Te(Yt));var sr=[qt];if(!pe){var Dr=st.text.length-2,Sr;if(Dr>0&&qt)for(var Kr=0;Kr<qt.length;++Kr)qt[Kr].to==null&&(Sr||(Sr=[])).push(new cn(qt[Kr].marker,null,null));for(var fo=0;fo<Dr;++fo)sr.push(Sr);sr.push(Yt)}return sr}function Te(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 un(it,st,dt){var ht=null;if(it.iter(st.line,dt.line+1,function(wn){if(wn.markedSpans)for(var wi=0;wi<wn.markedSpans.length;++wi){var Fi=wn.markedSpans[wi].marker;Fi.readOnly&&(!ht||Cn(ht,Fi)==-1)&&(ht||(ht=[])).push(Fi)}}),!ht)return null;for(var gt=[{from:st,to:dt}],Nt=0;Nt<ht.length;++Nt)for(var Kt=ht[Nt],qt=Kt.find(0),Yt=0;Yt<gt.length;++Yt){var pe=gt[Yt];if(!(Kn(pe.to,qt.from)<0||Kn(pe.from,qt.to)>0)){var $e=[Yt,1],ye=Kn(pe.from,qt.from),Pn=Kn(pe.to,qt.to);(ye<0||!Kt.inclusiveLeft&&!ye)&&$e.push({from:pe.from,to:qt.from}),(Pn>0||!Kt.inclusiveRight&&!Pn)&&$e.push({from:qt.to,to:pe.to}),gt.splice.apply(gt,$e),Yt+=$e.length-3}}return gt}function Ue(it){var st=it.markedSpans;if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.detachLine(it);it.markedSpans=null}}function Ut(it,st){if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.attachLine(it);it.markedSpans=st}}function pn(it){return it.inclusiveLeft?-1:0}function Ln(it){return it.inclusiveRight?1:0}function Ai(it,st){var dt=it.lines.length-st.lines.length;if(dt!=0)return dt;var ht=it.find(),gt=st.find(),Nt=Kn(ht.from,gt.from)||pn(it)-pn(st);if(Nt)return-Nt;var Kt=Kn(ht.to,gt.to)||Ln(it)-Ln(st);return Kt||st.id-it.id}function Zn(it,st){var dt=ne&&it.markedSpans,ht;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&&(!ht||Ai(ht,gt.marker)<0)&&(ht=gt.marker);return ht}function Tn(it){return Zn(it,!0)}function dn(it){return Zn(it,!1)}function qe(it,st){var dt=ne&&it.markedSpans,ht;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)&&(!ht||Ai(ht,Nt.marker)<0)&&(ht=Nt.marker)}return ht}function fn(it,st,dt,ht,gt){var Nt=fi(it,st),Kt=ne&&Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;++qt){var Yt=Kt[qt];if(Yt.marker.collapsed){var pe=Yt.marker.find(0),$e=Kn(pe.from,dt)||pn(Yt.marker)-pn(gt),ye=Kn(pe.to,ht)||Ln(Yt.marker)-Ln(gt);if(!($e>=0&&ye<=0||$e<=0&&ye>=0)&&($e<=0&&(Yt.marker.inclusiveRight&&gt.inclusiveLeft?Kn(pe.to,dt)>=0:Kn(pe.to,dt)>0)||$e>=0&&(Yt.marker.inclusiveRight&&gt.inclusiveLeft?Kn(pe.from,ht)<=0:Kn(pe.from,ht)<0)))return!0}}}function an(it){for(var st;st=Tn(it);)it=st.find(-1,!0).line;return it}function gn(it){for(var st;st=dn(it);)it=st.find(1,!0).line;return it}function qn(it){for(var st,dt;st=dn(it);)it=st.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function Mn(it,st){var dt=fi(it,st),ht=an(dt);return dt==ht?st:te(ht)}function Un(it,st){if(st>it.lastLine())return st;var dt=fi(it,st),ht;if(!ln(it,dt))return st;for(;ht=dn(dt);)dt=ht.find(1,!0).line;return te(dt)+1}function ln(it,st){var dt=ne&&st.markedSpans;if(dt){for(var ht=void 0,gt=0;gt<dt.length;++gt)if(ht=dt[gt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&si(it,st,ht))return!0}}}function si(it,st,dt){if(dt.to==null){var ht=dt.marker.find(1,!0);return si(it,ht.line,Yn(ht.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)&&si(it,st,gt))return!0}function Mi(it){it=an(it);for(var st=0,dt=it.parent,ht=0;ht<dt.lines.length;++ht){var gt=dt.lines[ht];if(gt==it)break;st+=gt.height}for(var Nt=dt.parent;Nt;dt=Nt,Nt=dt.parent)for(var Kt=0;Kt<Nt.children.length;++Kt){var qt=Nt.children[Kt];if(qt==dt)break;st+=qt.height}return st}function er(it){if(it.height==0)return 0;for(var st=it.text.length,dt,ht=it;dt=Tn(ht);){var gt=dt.find(0,!0);ht=gt.from.line,st+=gt.from.ch-gt.to.ch}for(ht=it;dt=dn(ht);){var Nt=dt.find(0,!0);st-=ht.text.length-Nt.from.ch,ht=Nt.to.line,st+=ht.text.length-Nt.to.ch}return st}function Hi(it){var st=it.display,dt=it.doc;st.maxLine=fi(dt,dt.first),st.maxLineLength=er(st.maxLine),st.maxLineChanged=!0,dt.iter(function(ht){var gt=er(ht);gt>st.maxLineLength&&(st.maxLineLength=gt,st.maxLine=ht)})}var Fr=function(it,st,dt){this.text=it,Ut(this,st),this.height=dt?dt(this):1};Fr.prototype.lineNo=function(){return te(this)},Ri(Fr);function wr(it,st,dt,ht){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Ue(it),Ut(it,dt);var gt=ht?ht(it):1;gt!=it.height&&Br(it,gt)}function Qr(it){it.parent=null,Ue(it)}var Or={},Lr={};function Xr(it,st){if(!it||/^\s*$/.test(it))return null;var dt=st.addModeClass?Lr:Or;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function He(it,st){var dt=Ce("span",null,null,ie?"padding-right: .1px":null),ht={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,Kt=void 0;ht.pos=0,ht.addToken=Ur,br(it.display.measure)&&(Kt=mn(Nt,it.doc.direction))&&(ht.addToken=kr(ht.addToken,Kt)),ht.map=[];var qt=st!=it.display.externalMeasured&&te(Nt);co(Nt,ht,dr(it,Nt,qt)),Nt.styleClasses&&(Nt.styleClasses.bgClass&&(ht.bgClass=Fn(Nt.styleClasses.bgClass,ht.bgClass||"")),Nt.styleClasses.textClass&&(ht.textClass=Fn(Nt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(xo(it.display.measure))),gt==0?(st.measure.map=ht.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ht.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(ie){var Yt=ht.content.lastChild;(/\bcm-tab\b/.test(Yt.className)||Yt.querySelector&&Yt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return gi(it,"renderLine",it,st.line,ht.pre),ht.pre.className&&(ht.textClass=Fn(ht.pre.className,ht.textClass||"")),ht}function xr(it){var st=$t("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Ur(it,st,dt,ht,gt,Nt,Kt){if(st){var qt=it.splitSpaces?nr(st,it.trailingSpace):st,Yt=it.cm.state.specialChars,pe=!1,$e;if(!Yt.test(st))it.col+=st.length,$e=document.createTextNode(qt),it.map.push(it.pos,it.pos+st.length,$e),de&&Ht<9&&(pe=!0),it.pos+=st.length;else{$e=document.createDocumentFragment();for(var ye=0;;){Yt.lastIndex=ye;var Pn=Yt.exec(st),wn=Pn?Pn.index-ye:st.length-ye;if(wn){var wi=document.createTextNode(qt.slice(ye,ye+wn));de&&Ht<9?$e.appendChild($t("span",[wi])):$e.appendChild(wi),it.map.push(it.pos,it.pos+wn,wi),it.col+=wn,it.pos+=wn}if(!Pn)break;ye+=wn+1;var Fi=void 0;if(Pn[0]==" "){var _i=it.cm.options.tabSize,sr=_i-it.col%_i;Fi=$e.appendChild($t("span",ei(sr),"cm-tab")),Fi.setAttribute("role","presentation"),Fi.setAttribute("cm-text"," "),it.col+=sr}else Pn[0]=="\r"||Pn[0]==`
`?(Fi=$e.appendChild($t("span",Pn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Fi.setAttribute("cm-text",Pn[0]),it.col+=1):(Fi=it.cm.options.specialCharPlaceholder(Pn[0]),Fi.setAttribute("cm-text",Pn[0]),de&&Ht<9?$e.appendChild($t("span",[Fi])):$e.appendChild(Fi),it.col+=1);it.map.push(it.pos,it.pos+1,Fi),it.pos++}}if(it.trailingSpace=qt.charCodeAt(st.length-1)==32,dt||ht||gt||pe||Nt||Kt){var Dr=dt||"";ht&&(Dr+=ht),gt&&(Dr+=gt);var Sr=$t("span",[$e],Dr,Nt);if(Kt)for(var Kr in Kt)Kt.hasOwnProperty(Kr)&&Kr!="style"&&Kr!="class"&&Sr.setAttribute(Kr,Kt[Kr]);return it.content.appendChild(Sr)}it.content.appendChild($e)}}function nr(it,st){if(it.length>1&&!/ /.test(it))return it;for(var dt=st,ht="",gt=0;gt<it.length;gt++){var Nt=it.charAt(gt);Nt==" "&&dt&&(gt==it.length-1||it.charCodeAt(gt+1)==32)&&(Nt="\xA0"),ht+=Nt,dt=Nt==" "}return ht}function kr(it,st){return function(dt,ht,gt,Nt,Kt,qt,Yt){gt=gt?gt+" cm-force-border":"cm-force-border";for(var pe=dt.pos,$e=pe+ht.length;;){for(var ye=void 0,Pn=0;Pn<st.length&&(ye=st[Pn],!(ye.to>pe&&ye.from<=pe));Pn++);if(ye.to>=$e)return it(dt,ht,gt,Nt,Kt,qt,Yt);it(dt,ht.slice(0,ye.to-pe),gt,Nt,null,qt,Yt),Nt=null,ht=ht.slice(ye.to-pe),pe=ye.to}}}function gr(it,st,dt,ht){var gt=!ht&&dt.widgetNode;gt&&it.map.push(it.pos,it.pos+st,gt),!ht&&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 co(it,st,dt){var ht=it.markedSpans,gt=it.text,Nt=0;if(!ht){for(var Kt=1;Kt<dt.length;Kt+=2)st.addToken(st,gt.slice(Nt,Nt=dt[Kt]),Xr(dt[Kt+1],st.cm.options));return}for(var qt=gt.length,Yt=0,pe=1,$e="",ye,Pn,wn=0,wi,Fi,_i,sr,Dr;;){if(wn==Yt){wi=Fi=_i=Pn="",Dr=null,sr=null,wn=1/0;for(var Sr=[],Kr=void 0,fo=0;fo<ht.length;++fo){var vr=ht[fo],To=vr.marker;if(To.type=="bookmark"&&vr.from==Yt&&To.widgetNode)Sr.push(To);else if(vr.from<=Yt&&(vr.to==null||vr.to>Yt||To.collapsed&&vr.to==Yt&&vr.from==Yt)){if(vr.to!=null&&vr.to!=Yt&&wn>vr.to&&(wn=vr.to,Fi=""),To.className&&(wi+=" "+To.className),To.css&&(Pn=(Pn?Pn+";":"")+To.css),To.startStyle&&vr.from==Yt&&(_i+=" "+To.startStyle),To.endStyle&&vr.to==wn&&(Kr||(Kr=[])).push(To.endStyle,vr.to),To.title&&((Dr||(Dr={})).title=To.title),To.attributes)for(var Os in To.attributes)(Dr||(Dr={}))[Os]=To.attributes[Os];To.collapsed&&(!sr||Ai(sr.marker,To)<0)&&(sr=vr)}else vr.from>Yt&&wn>vr.from&&(wn=vr.from)}if(Kr)for(var Ca=0;Ca<Kr.length;Ca+=2)Kr[Ca+1]==wn&&(Fi+=" "+Kr[Ca]);if(!sr||sr.from==Yt)for(var js=0;js<Sr.length;++js)gr(st,0,Sr[js]);if(sr&&(sr.from||0)==Yt){if(gr(st,(sr.to==null?qt+1:sr.to)-Yt,sr.marker,sr.from==null),sr.to==null)return;sr.to==Yt&&(sr=!1)}}if(Yt>=qt)break;for(var vl=Math.min(qt,wn);;){if($e){var Ta=Yt+$e.length;if(!sr){var ya=Ta>vl?$e.slice(0,vl-Yt):$e;st.addToken(st,ya,ye?ye+wi:wi,_i,Yt+ya.length==wn?Fi:"",Pn,Dr)}if(Ta>=vl){$e=$e.slice(vl-Yt),Yt=vl;break}Yt=Ta,_i=""}$e=gt.slice(Nt,Nt=dt[pe++]),ye=Xr(dt[pe++],st.cm.options)}}}function io(it,st,dt){this.line=st,this.rest=qn(st),this.size=this.rest?te(Fe(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=ln(it,st)}function Pr(it,st,dt){for(var ht=[],gt,Nt=st;Nt<dt;Nt=gt){var Kt=new io(it.doc,fi(it.doc,Nt),Nt);gt=Nt+Kt.size,ht.push(Kt)}return ht}var vo=null;function ks(it){vo?vo.ops.push(it):it.ownsGroup=vo={ops:[it],delayedCallbacks:[]}}function us(it){var st=it.delayedCallbacks,dt=0;do{for(;dt<st.length;dt++)st[dt].call(null);for(var ht=0;ht<it.ops.length;ht++){var gt=it.ops[ht];if(gt.cursorActivityHandlers)for(;gt.cursorActivityCalled<gt.cursorActivityHandlers.length;)gt.cursorActivityHandlers[gt.cursorActivityCalled++].call(null,gt.cm)}}while(dt<st.length)}function Da(it,st){var dt=it.ownsGroup;if(dt)try{us(dt)}finally{vo=null,st(dt)}}var Ks=null;function ar(it,st){var dt=ui(it,st);if(dt.length){var ht=Array.prototype.slice.call(arguments,2),gt;vo?gt=vo.delayedCallbacks:Ks?gt=Ks:(gt=Ks=[],setTimeout(rs,0));for(var Nt=function(qt){gt.push(function(){return dt[qt].apply(null,ht)})},Kt=0;Kt<dt.length;++Kt)Nt(Kt)}}function rs(){var it=Ks;Ks=null;for(var st=0;st<it.length;++st)it[st]()}function os(it,st,dt,ht){for(var gt=0;gt<st.changes.length;gt++){var Nt=st.changes[gt];Nt=="text"?di(it,st):Nt=="gutter"?fr(it,st,dt,ht):Nt=="class"?ir(it,st):Nt=="widget"&&Rr(it,st,ht)}st.changes=null}function ji(it){return it.node==it.text&&(it.node=$t("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),de&&Ht<8&&(it.node.style.zIndex=2)),it.node}function Nr(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 ht=ji(st);st.background=ht.insertBefore($t("div",null,dt),ht.firstChild),it.display.input.setUneditable(st.background)}}function so(it,st){var dt=it.display.externalMeasured;return dt&&dt.line==st.line?(it.display.externalMeasured=null,st.measure=dt.measure,dt.built):He(it,st)}function di(it,st){var dt=st.text.className,ht=so(it,st);st.text==st.node&&(st.node=ht.pre),st.text.parentNode.replaceChild(ht.pre,st.text),st.text=ht.pre,ht.bgClass!=st.bgClass||ht.textClass!=st.textClass?(st.bgClass=ht.bgClass,st.textClass=ht.textClass,ir(it,st)):dt&&(st.text.className=dt)}function ir(it,st){Nr(it,st),st.line.wrapClass?ji(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 fr(it,st,dt,ht){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=ji(st);st.gutterBackground=$t("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px; width: "+ht.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 Kt=ji(st),qt=st.gutter=$t("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(qt),Kt.insertBefore(qt,st.text),st.line.gutterClass&&(qt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=qt.appendChild($t("div",ni(it.options,dt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Nt)for(var Yt=0;Yt<it.display.gutterSpecs.length;++Yt){var pe=it.display.gutterSpecs[Yt].className,$e=Nt.hasOwnProperty(pe)&&Nt[pe];$e&&qt.appendChild($t("div",[$e],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[pe]+"px; width: "+ht.gutterWidth[pe]+"px"))}}}function Rr(it,st,dt){st.alignable&&(st.alignable=null);for(var ht=Rt("CodeMirror-linewidget"),gt=st.node.firstChild,Nt=void 0;gt;gt=Nt)Nt=gt.nextSibling,ht.test(gt.className)&&st.node.removeChild(gt);Bo(it,st,dt)}function $r(it,st,dt,ht){var gt=so(it,st);return st.text=st.node=gt.pre,gt.bgClass&&(st.bgClass=gt.bgClass),gt.textClass&&(st.textClass=gt.textClass),ir(it,st),fr(it,st,dt,ht),Bo(it,st,ht),st.node}function Bo(it,st,dt){if(rr(it,st.line,st,dt,!0),st.rest)for(var ht=0;ht<st.rest.length;ht++)rr(it,st.rest[ht],st,dt,!1)}function rr(it,st,dt,ht,gt){if(st.widgets)for(var Nt=ji(dt),Kt=0,qt=st.widgets;Kt<qt.length;++Kt){var Yt=qt[Kt],pe=$t("div",[Yt.node],"CodeMirror-linewidget"+(Yt.className?" "+Yt.className:""));Yt.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),So(Yt,pe,dt,ht),it.display.input.setUneditable(pe),gt&&Yt.above?Nt.insertBefore(pe,dt.gutter||dt.text):Nt.appendChild(pe),ar(Yt,"redraw")}}function So(it,st,dt,ht){if(it.noHScroll){(dt.alignable||(dt.alignable=[])).push(st);var gt=ht.wrapperWidth;st.style.left=ht.fixedPos+"px",it.coverGutter||(gt-=ht.gutterTotalWidth,st.style.paddingLeft=ht.gutterTotalWidth+"px"),st.style.width=gt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ht.gutterTotalWidth+"px"))}function ao(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!rn(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;"),Vt(st.display.measure,$t("div",[it.node],null,dt))}return it.height=it.node.parentNode.offsetHeight}function es(it,st){for(var dt=yr(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 to(it){return it.lineSpace.offsetTop}function Do(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Ro(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=Vt(it.measure,$t("pre","x","CodeMirror-line-like")),dt=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ht={left:parseInt(dt.paddingLeft),right:parseInt(dt.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function $o(it){return li-it.display.nativeBarWidth}function Ls(it){return it.display.scroller.clientWidth-$o(it)-it.display.barWidth}function Go(it){return it.display.scroller.clientHeight-$o(it)-it.display.barHeight}function la(it,st,dt){var ht=it.options.lineWrapping,gt=ht&&Ls(it);if(!st.measure.heights||ht&&st.measure.width!=gt){var Nt=st.measure.heights=[];if(ht){st.measure.width=gt;for(var Kt=st.text.firstChild.getClientRects(),qt=0;qt<Kt.length-1;qt++){var Yt=Kt[qt],pe=Kt[qt+1];Math.abs(Yt.bottom-pe.bottom)>2&&Nt.push((Yt.bottom+pe.top)/2-dt.top)}}Nt.push(dt.bottom-dt.top)}}function yo(it,st,dt){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;ht<it.rest.length;ht++)if(it.rest[ht]==st)return{map:it.measure.maps[ht],cache:it.measure.caches[ht]};for(var gt=0;gt<it.rest.length;gt++)if(te(it.rest[gt])>dt)return{map:it.measure.maps[gt],cache:it.measure.caches[gt],before:!0}}function da(it,st){st=an(st);var dt=te(st),ht=it.display.externalMeasured=new io(it.doc,st,dt);ht.lineN=dt;var gt=ht.built=He(it,ht);return ht.text=gt.pre,Vt(it.display.lineMeasure,gt.pre),ht}function za(it,st,dt,ht){return Ia(it,Yo(it,st),dt,ht)}function Sa(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[il(it,st)];var dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size)return dt}function Yo(it,st){var dt=te(st),ht=Sa(it,dt);ht&&!ht.text?ht=null:ht&&ht.changes&&(os(it,ht,dt,Hl(it)),it.curOp.forceUpdate=!0),ht||(ht=da(it,st));var gt=yo(ht,st,dt);return{line:st,view:ht,rect:null,map:gt.map,cache:gt.cache,before:gt.before,hasHeights:!1}}function Ia(it,st,dt,ht,gt){st.before&&(dt=-1);var Nt=dt+(ht||""),Kt;return st.cache.hasOwnProperty(Nt)?Kt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(la(it,st.view,st.rect),st.hasHeights=!0),Kt=ws(it,st,dt,ht),Kt.bogus||(st.cache[Nt]=Kt)),{left:Kt.left,right:Kt.right,top:gt?Kt.rtop:Kt.top,bottom:gt?Kt.rbottom:Kt.bottom}}var dl={left:0,right:0,top:0,bottom:0};function AA(it,st,dt){for(var ht,gt,Nt,Kt,qt,Yt,pe=0;pe<it.length;pe+=3)if(qt=it[pe],Yt=it[pe+1],st<qt?(gt=0,Nt=1,Kt="left"):st<Yt?(gt=st-qt,Nt=gt+1):(pe==it.length-3||st==Yt&&it[pe+3]>st)&&(Nt=Yt-qt,gt=Nt-1,st>=Yt&&(Kt="right")),gt!=null){if(ht=it[pe+2],qt==Yt&&dt==(ht.insertLeft?"left":"right")&&(Kt=dt),dt=="left"&&gt==0)for(;pe&&it[pe-2]==it[pe-3]&&it[pe-1].insertLeft;)ht=it[(pe-=3)+2],Kt="left";if(dt=="right"&&gt==Yt-qt)for(;pe<it.length-3&&it[pe+3]==it[pe+4]&&!it[pe+5].insertLeft;)ht=it[(pe+=3)+2],Kt="right";break}return{node:ht,start:gt,end:Nt,collapse:Kt,coverStart:qt,coverEnd:Yt}}function hA(it,st){var dt=dl;if(st=="left")for(var ht=0;ht<it.length&&(dt=it[ht]).left==dt.right;ht++);else for(var gt=it.length-1;gt>=0&&(dt=it[gt]).left==dt.right;gt--);return dt}function ws(it,st,dt,ht){var gt=AA(st.map,dt,ht),Nt=gt.node,Kt=gt.start,qt=gt.end,Yt=gt.collapse,pe;if(Nt.nodeType==3){for(var $e=0;$e<4;$e++){for(;Kt&&Le(st.line.text.charAt(gt.coverStart+Kt));)--Kt;for(;gt.coverStart+qt<gt.coverEnd&&Le(st.line.text.charAt(gt.coverStart+qt));)++qt;if(de&&Ht<9&&Kt==0&&qt==gt.coverEnd-gt.coverStart?pe=Nt.parentNode.getBoundingClientRect():pe=hA(fe(Nt,Kt,qt).getClientRects(),ht),pe.left||pe.right||Kt==0)break;qt=Kt,Kt=Kt-1,Yt="right"}de&&Ht<11&&(pe=zu(it.display.measure,pe))}else{Kt>0&&(Yt=ht="right");var ye;it.options.lineWrapping&&(ye=Nt.getClientRects()).length>1?pe=ye[ht=="right"?ye.length-1:0]:pe=Nt.getBoundingClientRect()}if(de&&Ht<9&&!Kt&&(!pe||!pe.left&&!pe.right)){var Pn=Nt.parentNode.getClientRects()[0];Pn?pe={left:Pn.left,right:Pn.left+fl(it.display),top:Pn.top,bottom:Pn.bottom}:pe=dl}for(var wn=pe.top-st.rect.top,wi=pe.bottom-st.rect.top,Fi=(wn+wi)/2,_i=st.view.measure.heights,sr=0;sr<_i.length-1&&!(Fi<_i[sr]);sr++);var Dr=sr?_i[sr-1]:0,Sr=_i[sr],Kr={left:(Yt=="right"?pe.right:pe.left)-st.rect.left,right:(Yt=="left"?pe.left:pe.right)-st.rect.left,top:Dr,bottom:Sr};return!pe.left&&!pe.right&&(Kr.bogus=!0),it.options.singleCursorHeightPerLine||(Kr.rtop=wn,Kr.rbottom=wi),Kr}function zu(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xi(it))return st;var dt=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*dt,right:st.right*dt,top:st.top*ht,bottom:st.bottom*ht}}function cA(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 fa(it){it.display.externalMeasure=null,Zt(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)cA(it.display.view[st])}function nl(it){fa(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Ds(){return re&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ns(){return re&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ms(it){var st=0;if(it.widgets)for(var dt=0;dt<it.widgets.length;++dt)it.widgets[dt].above&&(st+=ao(it.widgets[dt]));return st}function Js(it,st,dt,ht,gt){if(!gt){var Nt=ms(st);dt.top+=Nt,dt.bottom+=Nt}if(ht=="line")return dt;ht||(ht="local");var Kt=Mi(st);if(ht=="local"?Kt+=to(it.display):Kt-=it.display.viewOffset,ht=="page"||ht=="window"){var qt=it.display.lineSpace.getBoundingClientRect();Kt+=qt.top+(ht=="window"?0:ns());var Yt=qt.left+(ht=="window"?0:Ds());dt.left+=Yt,dt.right+=Yt}return dt.top+=Kt,dt.bottom+=Kt,dt}function lu(it,st,dt){if(dt=="div")return st;var ht=st.left,gt=st.top;if(dt=="page")ht-=Ds(),gt-=ns();else if(dt=="local"||!dt){var Nt=it.display.sizer.getBoundingClientRect();ht+=Nt.left,gt+=Nt.top}var Kt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Kt.left,top:gt-Kt.top}}function ga(it,st,dt,ht,gt){return ht||(ht=fi(it.doc,st.line)),Js(it,ht,za(it,ht,st.ch,gt),dt)}function Wo(it,st,dt,ht,gt,Nt){ht=ht||fi(it.doc,st.line),gt||(gt=Yo(it,ht));function Kt(wi,Fi){var _i=Ia(it,gt,wi,Fi?"right":"left",Nt);return Fi?_i.left=_i.right:_i.right=_i.left,Js(it,ht,_i,dt)}var qt=mn(ht,it.doc.direction),Yt=st.ch,pe=st.sticky;if(Yt>=ht.text.length?(Yt=ht.text.length,pe="before"):Yt<=0&&(Yt=0,pe="after"),!qt)return Kt(pe=="before"?Yt-1:Yt,pe=="before");function $e(wi,Fi,_i){var sr=qt[Fi],Dr=sr.level==1;return Kt(_i?wi-1:wi,Dr!=_i)}var ye=Oe(qt,Yt,pe),Pn=De,wn=$e(Yt,ye,pe=="before");return Pn!=null&&(wn.other=$e(Yt,Pn,pe!="before")),wn}function Qo(it,st){var dt=0;st=Vn(it.doc,st),it.options.lineWrapping||(dt=fl(it.display)*st.ch);var ht=fi(it.doc,st.line),gt=Mi(ht)+to(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ht.height}}function Co(it,st,dt,ht,gt){var Nt=Ye(it,st,dt);return Nt.xRel=gt,ht&&(Nt.outside=ht),Nt}function cs(it,st,dt){var ht=it.doc;if(dt+=it.display.viewOffset,dt<0)return Co(ht.first,0,null,-1,-1);var gt=ke(ht,dt),Nt=ht.first+ht.size-1;if(gt>Nt)return Co(ht.first+ht.size-1,fi(ht,Nt).text.length,null,1,1);st<0&&(st=0);for(var Kt=fi(ht,gt);;){var qt=bn(it,Kt,gt,st,dt),Yt=qe(Kt,qt.ch+(qt.xRel>0||qt.outside>0?1:0));if(!Yt)return qt;var pe=Yt.find(1);if(pe.line==gt)return pe;Kt=fi(ht,gt=pe.line)}}function Xi(it,st,dt,ht){ht-=ms(st);var gt=st.text.length,Nt=Xe(function(Kt){return Ia(it,dt,Kt-1).bottom<=ht},gt,0);return gt=Xe(function(Kt){return Ia(it,dt,Kt).top>ht},Nt,gt),{begin:Nt,end:gt}}function qs(it,st,dt,ht){dt||(dt=Yo(it,st));var gt=Js(it,st,Ia(it,dt,ht),"line").top;return Xi(it,st,dt,gt)}function we(it,st,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>st}function bn(it,st,dt,ht,gt){gt-=Mi(st);var Nt=Yo(it,st),Kt=ms(st),qt=0,Yt=st.text.length,pe=!0,$e=mn(st,it.doc.direction);if($e){var ye=(it.options.lineWrapping?uu:El)(it,st,dt,Nt,$e,ht,gt);pe=ye.level!=1,qt=pe?ye.from:ye.to-1,Yt=pe?ye.to:ye.from-1}var Pn=null,wn=null,wi=Xe(function(fo){var vr=Ia(it,Nt,fo);return vr.top+=Kt,vr.bottom+=Kt,we(vr,ht,gt,!1)?(vr.top<=gt&&vr.left<=ht&&(Pn=fo,wn=vr),!0):!1},qt,Yt),Fi,_i,sr=!1;if(wn){var Dr=ht-wn.left<wn.right-ht,Sr=Dr==pe;wi=Pn+(Sr?0:1),_i=Sr?"after":"before",Fi=Dr?wn.left:wn.right}else{!pe&&(wi==Yt||wi==qt)&&wi++,_i=wi==0?"after":wi==st.text.length?"before":Ia(it,Nt,wi-(pe?1:0)).bottom+Kt<=gt==pe?"after":"before";var Kr=Wo(it,Ye(dt,wi,_i),"line",st,Nt);Fi=Kr.left,sr=gt<Kr.top?-1:gt>=Kr.bottom?1:0}return wi=xe(st.text,wi,1),Co(dt,wi,_i,sr,ht-Fi)}function El(it,st,dt,ht,gt,Nt,Kt){var qt=Xe(function(ye){var Pn=gt[ye],wn=Pn.level!=1;return we(Wo(it,Ye(dt,wn?Pn.to:Pn.from,wn?"before":"after"),"line",st,ht),Nt,Kt,!0)},0,gt.length-1),Yt=gt[qt];if(qt>0){var pe=Yt.level!=1,$e=Wo(it,Ye(dt,pe?Yt.from:Yt.to,pe?"after":"before"),"line",st,ht);we($e,Nt,Kt,!0)&&$e.top>Kt&&(Yt=gt[qt-1])}return Yt}function uu(it,st,dt,ht,gt,Nt,Kt){var qt=Xi(it,st,ht,Kt),Yt=qt.begin,pe=qt.end;/\s/.test(st.text.charAt(pe-1))&&pe--;for(var $e=null,ye=null,Pn=0;Pn<gt.length;Pn++){var wn=gt[Pn];if(!(wn.from>=pe||wn.to<=Yt)){var wi=wn.level!=1,Fi=Ia(it,ht,wi?Math.min(pe,wn.to)-1:Math.max(Yt,wn.from)).right,_i=Fi<Nt?Nt-Fi+1e9:Fi-Nt;(!$e||ye>_i)&&($e=wn,ye=_i)}}return $e||($e=gt[gt.length-1]),$e.from<Yt&&($e={from:Yt,to:$e.to,level:$e.level}),$e.to>pe&&($e={from:$e.from,to:pe,level:$e.level}),$e}var is;function ta(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(is==null){is=$t("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)is.appendChild(document.createTextNode("x")),is.appendChild($t("br"));is.appendChild(document.createTextNode("x"))}Vt(it.measure,is);var dt=is.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),Zt(it.measure),dt||1}function fl(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=$t("span","xxxxxxxxxx"),dt=$t("pre",[st],"CodeMirror-line-like");Vt(it.measure,dt);var ht=st.getBoundingClientRect(),gt=(ht.right-ht.left)/10;return gt>2&&(it.cachedCharWidth=gt),gt||10}function Hl(it){for(var st=it.display,dt={},ht={},gt=st.gutters.clientLeft,Nt=st.gutters.firstChild,Kt=0;Nt;Nt=Nt.nextSibling,++Kt){var qt=it.display.gutterSpecs[Kt].className;dt[qt]=Nt.offsetLeft+Nt.clientLeft+gt,ht[qt]=Nt.clientWidth}return{fixedPos:Au(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ht,wrapperWidth:st.wrapper.clientWidth}}function Au(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function xs(it){var st=ta(it.display),dt=it.options.lineWrapping,ht=dt&&Math.max(5,it.display.scroller.clientWidth/fl(it.display)-3);return function(gt){if(ln(it.doc,gt))return 0;var Nt=0;if(gt.widgets)for(var Kt=0;Kt<gt.widgets.length;Kt++)gt.widgets[Kt].height&&(Nt+=gt.widgets[Kt].height);return dt?Nt+(Math.ceil(gt.text.length/ht)||1)*st:Nt+st}}function jr(it){var st=it.doc,dt=xs(it);st.iter(function(ht){var gt=dt(ht);gt!=ht.height&&Br(ht,gt)})}function Ba(it,st,dt,ht){var gt=it.display;if(!dt&&yr(st).getAttribute("cm-not-content")=="true")return null;var Nt,Kt,qt=gt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-qt.left,Kt=st.clientY-qt.top}catch(ye){return null}var Yt=cs(it,Nt,Kt),pe;if(ht&&Yt.xRel>0&&(pe=fi(it.doc,Yt.line).text).length==Yt.ch){var $e=me(pe,pe.length,it.options.tabSize)-pe.length;Yt=Ye(Yt.line,Math.max(0,Math.round((Nt-Ro(it.display).left)/fl(it.display))-$e))}return Yt}function il(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var dt=it.display.view,ht=0;ht<dt.length;ht++)if(st-=dt[ht].size,st<0)return ht}function vs(it,st,dt,ht){st==null&&(st=it.doc.first),dt==null&&(dt=it.doc.first+it.doc.size),ht||(ht=0);var gt=it.display;if(ht&&dt<gt.viewTo&&(gt.updateLineNumbers==null||gt.updateLineNumbers>st)&&(gt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=gt.viewTo)ne&&Mn(it.doc,st)<gt.viewTo&&Ss(it);else if(dt<=gt.viewFrom)ne&&Un(it.doc,dt+ht)>gt.viewFrom?Ss(it):(gt.viewFrom+=ht,gt.viewTo+=ht);else if(st<=gt.viewFrom&&dt>=gt.viewTo)Ss(it);else if(st<=gt.viewFrom){var Nt=Ua(it,dt,dt+ht,1);Nt?(gt.view=gt.view.slice(Nt.index),gt.viewFrom=Nt.lineN,gt.viewTo+=ht):Ss(it)}else if(dt>=gt.viewTo){var Kt=Ua(it,st,st,-1);Kt?(gt.view=gt.view.slice(0,Kt.index),gt.viewTo=Kt.lineN):Ss(it)}else{var qt=Ua(it,st,st,-1),Yt=Ua(it,dt,dt+ht,1);qt&&Yt?(gt.view=gt.view.slice(0,qt.index).concat(Pr(it,qt.lineN,Yt.lineN)).concat(gt.view.slice(Yt.index)),gt.viewTo+=ht):Ss(it)}var pe=gt.externalMeasured;pe&&(dt<pe.lineN?pe.lineN+=ht:st<pe.lineN+pe.size&&(gt.externalMeasured=null))}function wo(it,st,dt){it.curOp.viewChanged=!0;var ht=it.display,gt=it.display.externalMeasured;if(gt&&st>=gt.lineN&&st<gt.lineN+gt.size&&(ht.externalMeasured=null),!(st<ht.viewFrom||st>=ht.viewTo)){var Nt=ht.view[il(it,st)];if(Nt.node!=null){var Kt=Nt.changes||(Nt.changes=[]);Cn(Kt,dt)==-1&&Kt.push(dt)}}}function Ss(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Ua(it,st,dt,ht){var gt=il(it,st),Nt,Kt=it.display.view;if(!ne||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var qt=it.display.viewFrom,Yt=0;Yt<gt;Yt++)qt+=Kt[Yt].size;if(qt!=st){if(ht>0){if(gt==Kt.length-1)return null;Nt=qt+Kt[gt].size-st,gt++}else Nt=qt-st;st+=Nt,dt+=Nt}for(;Mn(it.doc,dt)!=dt;){if(gt==(ht<0?0:Kt.length-1))return null;dt+=ht*Kt[gt-(ht<0?1:0)].size,gt+=ht}return{index:gt,lineN:dt}}function ss(it,st,dt){var ht=it.display,gt=ht.view;gt.length==0||st>=ht.viewTo||dt<=ht.viewFrom?(ht.view=Pr(it,st,dt),ht.viewFrom=st):(ht.viewFrom>st?ht.view=Pr(it,st,ht.viewFrom).concat(ht.view):ht.viewFrom<st&&(ht.view=ht.view.slice(il(it,st))),ht.viewFrom=st,ht.viewTo<dt?ht.view=ht.view.concat(Pr(it,ht.viewTo,dt)):ht.viewTo>dt&&(ht.view=ht.view.slice(0,il(it,dt)))),ht.viewTo=dt}function rl(it){for(var st=it.display.view,dt=0,ht=0;ht<st.length;ht++){var gt=st[ht];!gt.hidden&&(!gt.node||gt.changes)&&++dt}return dt}function zs(it){it.display.input.showSelection(it.display.input.prepareSelection())}function ju(it,st){st===void 0&&(st=!0);for(var dt=it.doc,ht={},gt=ht.cursors=document.createDocumentFragment(),Nt=ht.selection=document.createDocumentFragment(),Kt=0;Kt<dt.sel.ranges.length;Kt++)if(!(!st&&Kt==dt.sel.primIndex)){var qt=dt.sel.ranges[Kt];if(!(qt.from().line>=it.display.viewTo||qt.to().line<it.display.viewFrom)){var Yt=qt.empty();(Yt||it.options.showCursorWhenSelecting)&&Oo(it,qt.head,gt),Yt||Io(it,qt,Nt)}}return ht}function Oo(it,st,dt){var ht=Wo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),gt=dt.appendChild($t("div","\xA0","CodeMirror-cursor"));if(gt.style.left=ht.left+"px",gt.style.top=ht.top+"px",gt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Nt=dt.appendChild($t("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Nt.style.display="",Nt.style.left=ht.other.left+"px",Nt.style.top=ht.other.top+"px",Nt.style.height=(ht.other.bottom-ht.other.top)*.85+"px"}}function ea(it,st){return it.top-st.top||it.left-st.left}function Io(it,st,dt){var ht=it.display,gt=it.doc,Nt=document.createDocumentFragment(),Kt=Ro(it.display),qt=Kt.left,Yt=Math.max(ht.sizerWidth,Ls(it)-ht.sizer.offsetLeft)-Kt.right,pe=gt.direction=="ltr";function $e(Sr,Kr,fo,vr){Kr<0&&(Kr=0),Kr=Math.round(Kr),vr=Math.round(vr),Nt.appendChild($t("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
top: `+Kr+"px; width: "+(fo==null?Yt-Sr:fo)+`px;
height: `+(vr-Kr)+"px"))}function ye(Sr,Kr,fo){var vr=fi(gt,Sr),To=vr.text.length,Os,Ca;function js(ya,al){return ga(it,Ye(Sr,ya),"div",vr,al)}function vl(ya,al,Oa){var pr=qs(it,vr,null,ya),Zo=al=="ltr"==(Oa=="after")?"left":"right",Hs=Oa=="after"?pr.begin:pr.end-(/\s/.test(vr.text.charAt(pr.end-1))?2:1);return js(Hs,Zo)[Zo]}var Ta=mn(vr,gt.direction);return Me(Ta,Kr||0,fo==null?To:fo,function(ya,al,Oa,pr){var Zo=Oa=="ltr",Hs=js(ya,Zo?"left":"right"),bs=js(al-1,Zo?"right":"left"),Ha=Kr==null&&ya==0,Jo=fo==null&&al==To,Lo=pr==0,yl=!Ta||pr==Ta.length-1;if(bs.top-Hs.top<=3){var $s=(pe?Ha:Jo)&&Lo,XA=(pe?Jo:Ha)&&yl,Vl=$s?qt:(Zo?Hs:bs).left,Va=XA?Yt:(Zo?bs:Hs).right;$e(Vl,Hs.top,Va-Vl,Hs.bottom)}else{var wl,Cs,Pa,$u;Zo?(wl=pe&&Ha&&Lo?qt:Hs.left,Cs=pe?Yt:vl(ya,Oa,"before"),Pa=pe?qt:vl(al,Oa,"after"),$u=pe&&Jo&&yl?Yt:bs.right):(wl=pe?vl(ya,Oa,"before"):qt,Cs=!pe&&Ha&&Lo?Yt:Hs.right,Pa=!pe&&Jo&&yl?qt:bs.left,$u=pe?vl(al,Oa,"after"):Yt),$e(wl,Hs.top,Cs-wl,Hs.bottom),Hs.bottom<bs.top&&$e(qt,Hs.bottom,null,bs.top),$e(Pa,bs.top,$u-Pa,bs.bottom)}(!Os||ea(Hs,Os)<0)&&(Os=Hs),ea(bs,Os)<0&&(Os=bs),(!Ca||ea(Hs,Ca)<0)&&(Ca=Hs),ea(bs,Ca)<0&&(Ca=bs)}),{start:Os,end:Ca}}var Pn=st.from(),wn=st.to();if(Pn.line==wn.line)ye(Pn.line,Pn.ch,wn.ch);else{var wi=fi(gt,Pn.line),Fi=fi(gt,wn.line),_i=an(wi)==an(Fi),sr=ye(Pn.line,Pn.ch,_i?wi.text.length+1:null).end,Dr=ye(wn.line,_i?0:null,wn.ch).start;_i&&(sr.top<Dr.top-2?($e(sr.right,sr.top,null,sr.bottom),$e(qt,Dr.top,Dr.left,Dr.bottom)):$e(sr.right,sr.top,Dr.left-sr.right,sr.bottom)),sr.bottom<Dr.top&&$e(qt,sr.bottom,null,Dr.top)}dt.appendChild(Nt)}function as(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()||dA(it),st.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function ds(it){it.state.focused||(it.display.input.focus(),zo(it))}function Ms(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,dA(it))},100)}function zo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(gi(it,"focus",it,st),it.state.focused=!0,Bn(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ie&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),as(it))}function dA(it,st){it.state.delayingBlurEvent||(it.state.focused&&(gi(it,"blur",it,st),it.state.focused=!1,Ot(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function zr(it){for(var st=it.display,dt=st.lineDiv.offsetTop,ht=0;ht<st.view.length;ht++){var gt=st.view[ht],Nt=it.options.lineWrapping,Kt=void 0,qt=0;if(!gt.hidden){if(de&&Ht<8){var Yt=gt.node.offsetTop+gt.node.offsetHeight;Kt=Yt-dt,dt=Yt}else{var pe=gt.node.getBoundingClientRect();Kt=pe.bottom-pe.top,!Nt&&gt.text.firstChild&&(qt=gt.text.firstChild.getBoundingClientRect().right-pe.left-1)}var $e=gt.line.height-Kt;if(($e>.005||$e<-.005)&&(Br(gt.line,Kt),Vu(gt.line),gt.rest))for(var ye=0;ye<gt.rest.length;ye++)Vu(gt.rest[ye]);if(qt>it.display.sizerWidth){var Pn=Math.ceil(qt/fl(it.display));Pn>it.display.maxLineLength&&(it.display.maxLineLength=Pn,it.display.maxLine=gt.line,it.display.maxLineChanged=!0)}}}}function Vu(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var dt=it.widgets[st],ht=dt.node.parentNode;ht&&(dt.height=ht.offsetHeight)}}function Eo(it,st,dt){var ht=dt&&dt.top!=null?Math.max(0,dt.top):it.scroller.scrollTop;ht=Math.floor(ht-to(it));var gt=dt&&dt.bottom!=null?dt.bottom:ht+it.wrapper.clientHeight,Nt=ke(st,ht),Kt=ke(st,gt);if(dt&&dt.ensure){var qt=dt.ensure.from.line,Yt=dt.ensure.to.line;qt<Nt?(Nt=qt,Kt=ke(st,Mi(fi(st,qt))+it.wrapper.clientHeight)):Math.min(Yt,st.lastLine())>=Kt&&(Nt=ke(st,Mi(fi(st,Yt))-it.wrapper.clientHeight),Kt=Yt)}return{from:Nt,to:Math.max(Kt,Nt+1)}}function Oh(it,st){if(!bi(it,"scrollCursorIntoView")){var dt=it.display,ht=dt.sizer.getBoundingClientRect(),gt=null;if(st.top+ht.top<0?gt=!0:st.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(gt=!1),gt!=null&&!Ee){var Nt=$t("div","\u200B",null,`position: absolute;
top: `+(st.top-dt.viewOffset-to(it.display))+`px;
height: `+(st.bottom-st.top+$o(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 ql(it,st,dt,ht){ht==null&&(ht=0);var gt;!it.options.lineWrapping&&st==dt&&(st=st.ch?Ye(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,dt=st.sticky=="before"?Ye(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Kt=!1,qt=Wo(it,st),Yt=!dt||dt==st?qt:Wo(it,dt);gt={left:Math.min(qt.left,Yt.left),top:Math.min(qt.top,Yt.top)-ht,right:Math.max(qt.left,Yt.left),bottom:Math.max(qt.bottom,Yt.bottom)+ht};var pe=Hh(it,gt),$e=it.doc.scrollTop,ye=it.doc.scrollLeft;if(pe.scrollTop!=null&&(xu(it,pe.scrollTop),Math.abs(it.doc.scrollTop-$e)>1&&(Kt=!0)),pe.scrollLeft!=null&&(Su(it,pe.scrollLeft),Math.abs(it.doc.scrollLeft-ye)>1&&(Kt=!0)),!Kt)break}return gt}function TA(it,st){var dt=Hh(it,st);dt.scrollTop!=null&&xu(it,dt.scrollTop),dt.scrollLeft!=null&&Su(it,dt.scrollLeft)}function Hh(it,st){var dt=it.display,ht=ta(it.display);st.top<0&&(st.top=0);var gt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Nt=Go(it),Kt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var qt=it.doc.height+Do(dt),Yt=st.top<ht,pe=st.bottom>qt-ht;if(st.top<gt)Kt.scrollTop=Yt?0:st.top;else if(st.bottom>gt+Nt){var $e=Math.min(st.top,(pe?qt:st.bottom)-Nt);$e!=gt&&(Kt.scrollTop=$e)}var ye=it.options.fixedGutter?0:dt.gutters.offsetWidth,Pn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-ye,wn=Ls(it)-dt.gutters.offsetWidth,wi=st.right-st.left>wn;return wi&&(st.right=st.left+wn),st.left<10?Kt.scrollLeft=0:st.left<Pn?Kt.scrollLeft=Math.max(0,st.left+ye-(wi?0:10)):st.right>wn+Pn-3&&(Kt.scrollLeft=st.right+(wi?0:10)-wn),Kt}function ch(it,st){st!=null&&(Rl(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function hu(it){Rl(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function cu(it,st,dt){(st!=null||dt!=null)&&Rl(it),st!=null&&(it.curOp.scrollLeft=st),dt!=null&&(it.curOp.scrollTop=dt)}function _o(it,st){Rl(it),it.curOp.scrollToPos=st}function Rl(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var dt=Qo(it,st.from),ht=Qo(it,st.to);dh(it,dt,ht,st.margin)}}function dh(it,st,dt,ht){var gt=Hh(it,{left:Math.min(st.left,dt.left),top:Math.min(st.top,dt.top)-ht,right:Math.max(st.right,dt.right),bottom:Math.max(st.bottom,dt.bottom)+ht});cu(it,gt.scrollLeft,gt.scrollTop)}function xu(it,st){Math.abs(it.doc.scrollTop-st)<2||(Ct||Cu(it,{top:st}),fA(it,st,!0),Ct&&Cu(it),DA(it,100))}function fA(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 Su(it,st,dt,ht){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)&&!ht)&&(it.doc.scrollLeft=st,Ed(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function Po(it){var st=it.display,dt=st.gutters.offsetWidth,ht=Math.round(it.doc.height+Do(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:ht,scrollHeight:ht+$o(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:dt}}var Ho=function(it,st,dt){this.cm=dt;var ht=this.vert=$t("div",[$t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),gt=this.horiz=$t("div",[$t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=gt.tabIndex=-1,it(ht),it(gt),yn(ht,"scroll",function(){ht.clientHeight&&st(ht.scrollTop,"vertical")}),yn(gt,"scroll",function(){gt.clientWidth&&st(gt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,de&&Ht<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ho.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=st?ht+"px":"0";var gt=it.viewHeight-(st?ht: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?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Nt=it.viewWidth-it.barLeft-(dt?ht: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&&(ht==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:dt?ht:0,bottom:st?ht:0}},Ho.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ho.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ho.prototype.zeroWidthHack=function(){var it=At&&!Xt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new oe,this.disableVert=new oe},Ho.prototype.enableZeroWidthBar=function(it,st,dt){it.style.pointerEvents="auto";function ht(){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,ht)}st.set(1e3,ht)},Ho.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Is=function(){};Is.prototype.update=function(){return{bottom:0,right:0}},Is.prototype.setScrollLeft=function(){},Is.prototype.setScrollTop=function(){},Is.prototype.clear=function(){};function na(it,st){st||(st=Po(it));var dt=it.display.barWidth,ht=it.display.barHeight;pa(it,st);for(var gt=0;gt<4&&dt!=it.display.barWidth||ht!=it.display.barHeight;gt++)dt!=it.display.barWidth&&it.options.lineWrapping&&zr(it),pa(it,Po(it)),dt=it.display.barWidth,ht=it.display.barHeight}function pa(it,st){var dt=it.display,ht=dt.scrollbars.update(st);dt.sizer.style.paddingRight=(dt.barWidth=ht.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ht.bottom)+"px",dt.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ht.bottom+"px",dt.scrollbarFiller.style.width=ht.right+"px"):dt.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ht.bottom+"px",dt.gutterFiller.style.width=st.gutterWidth+"px"):dt.gutterFiller.style.display=""}var Wu={native:Ho,null:Is};function Bu(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ot(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Wu[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),yn(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"?Su(it,st):xu(it,st)},it),it.display.scrollbars.addClass&&Bn(it.display.wrapper,it.display.scrollbars.addClass)}var Zu=0;function _l(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:++Zu},ks(it.curOp)}function du(it){var st=it.curOp;st&&Da(st,function(dt){for(var ht=0;ht<dt.ops.length;ht++)dt.ops[ht].cm.curOp=null;qg(dt)})}function qg(it){for(var st=it.ops,dt=0;dt<st.length;dt++)$g(st[dt]);for(var ht=0;ht<st.length;ht++)tp(st[ht]);for(var gt=0;gt<st.length;gt++)sg(st[gt]);for(var Nt=0;Nt<st.length;Nt++)Us(st[Nt]);for(var Kt=0;Kt<st.length;Kt++)NA(st[Kt])}function $g(it){var st=it.cm,dt=st.display;ag(st),it.updateMaxLine&&Hi(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 fh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function tp(it){it.updatedDisplay=it.mustUpdate&&Fd(it.cm,it.update)}function sg(it){var st=it.cm,dt=st.display;it.updatedDisplay&&zr(st),it.barMeasure=Po(st),dt.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=za(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+$o(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-Ls(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Us(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&Su(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var dt=it.focus&&it.focus==tn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,dt),(it.updatedDisplay||it.startHeight!=st.doc.height)&&na(st,it.barMeasure),it.updatedDisplay&&UA(st,it.barMeasure),it.selectionChanged&&as(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),dt&&ds(it.cm)}function NA(it){var st=it.cm,dt=st.display,ht=st.doc;if(it.updatedDisplay&&fs(st,it.update),dt.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(dt.wheelStartX=dt.wheelStartY=null),it.scrollTop!=null&&fA(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Su(st,it.scrollLeft,!0,!0),it.scrollToPos){var gt=ql(st,Vn(ht,it.scrollToPos.from),Vn(ht,it.scrollToPos.to),it.scrollToPos.margin);Oh(st,gt)}var Nt=it.maybeHiddenMarkers,Kt=it.maybeUnhiddenMarkers;if(Nt)for(var qt=0;qt<Nt.length;++qt)Nt[qt].lines.length||gi(Nt[qt],"hide");if(Kt)for(var Yt=0;Yt<Kt.length;++Yt)Kt[Yt].lines.length&&gi(Kt[Yt],"unhide");dt.wrapper.offsetHeight&&(ht.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&gi(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function ls(it,st){if(it.curOp)return st();_l(it);try{return st()}finally{du(it)}}function ma(it,st){return function(){if(it.curOp)return st.apply(it,arguments);_l(it);try{return st.apply(it,arguments)}finally{du(it)}}}function Ea(it){return function(){if(this.curOp)return it.apply(this,arguments);_l(this);try{return it.apply(this,arguments)}finally{du(this)}}}function La(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);_l(st);try{return it.apply(this,arguments)}finally{du(st)}}}function DA(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Gn(ua,it))}function ua(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=qr(it,st.highlightFrontier),gt=[];st.iter(ht.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Nt){if(ht.line>=it.display.viewFrom){var Kt=Nt.styles,qt=Nt.text.length>it.options.maxHighlightLength?Ci(st.mode,ht.state):null,Yt=tr(it,Nt,ht,!0);qt&&(ht.state=qt),Nt.styles=Yt.styles;var pe=Nt.styleClasses,$e=Yt.classes;$e?Nt.styleClasses=$e:pe&&(Nt.styleClasses=null);for(var ye=!Kt||Kt.length!=Nt.styles.length||pe!=$e&&(!pe||!$e||pe.bgClass!=$e.bgClass||pe.textClass!=$e.textClass),Pn=0;!ye&&Pn<Kt.length;++Pn)ye=Kt[Pn]!=Nt.styles[Pn];ye&&gt.push(ht.line),Nt.stateAfter=ht.save(),ht.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&hn(it,Nt.text,ht),Nt.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>dt)return DA(it,it.options.workDelay),!0}),st.highlightFrontier=ht.line,st.modeFrontier=Math.max(st.modeFrontier,ht.line),gt.length&&ls(it,function(){for(var Nt=0;Nt<gt.length;Nt++)wo(it,gt[Nt],"text")})}}var fh=function(it,st,dt){var ht=it.display;this.viewport=st,this.visible=Eo(ht,it.doc,st),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=Ls(it),this.force=dt,this.dims=Hl(it),this.events=[]};fh.prototype.signal=function(it,st){Ei(it,st)&&this.events.push(arguments)},fh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)gi.apply(null,this.events[it])};function ag(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=$o(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=$o(it)+"px",st.scrollbarsClipped=!0)}function lg(it){if(it.hasFocus())return null;var st=tn();if(!st||!rn(it.display.lineDiv,st))return null;var dt={activeElt:st};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&rn(it.display.lineDiv,ht.anchorNode)&&(dt.anchorNode=ht.anchorNode,dt.anchorOffset=ht.anchorOffset,dt.focusNode=ht.focusNode,dt.focusOffset=ht.focusOffset)}return dt}function gl(it){if(!(!it||!it.activeElt||it.activeElt==tn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&rn(document.body,it.anchorNode)&&rn(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 Fd(it,st){var dt=it.display,ht=it.doc;if(st.editorIsHidden)return Ss(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&&rl(it)==0)return!1;Aa(it)&&(Ss(it),st.dims=Hl(it));var gt=ht.first+ht.size,Nt=Math.max(st.visible.from-it.options.viewportMargin,ht.first),Kt=Math.min(gt,st.visible.to+it.options.viewportMargin);dt.viewFrom<Nt&&Nt-dt.viewFrom<20&&(Nt=Math.max(ht.first,dt.viewFrom)),dt.viewTo>Kt&&dt.viewTo-Kt<20&&(Kt=Math.min(gt,dt.viewTo)),ne&&(Nt=Mn(it.doc,Nt),Kt=Un(it.doc,Kt));var qt=Nt!=dt.viewFrom||Kt!=dt.viewTo||dt.lastWrapHeight!=st.wrapperHeight||dt.lastWrapWidth!=st.wrapperWidth;ss(it,Nt,Kt),dt.viewOffset=Mi(fi(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Yt=rl(it);if(!qt&&Yt==0&&!st.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var pe=lg(it);return Yt>4&&(dt.lineDiv.style.display="none"),cf(it,dt.updateLineNumbers,st.dims),Yt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,gl(pe),Zt(dt.cursorDiv),Zt(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,qt&&(dt.lastWrapHeight=st.wrapperHeight,dt.lastWrapWidth=st.wrapperWidth,DA(it,400)),dt.updateLineNumbers=null,!0}function fs(it,st){for(var dt=st.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||st.oldDisplayWidth==Ls(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Do(it.display)-Go(it),dt.top)}),st.visible=Eo(it.display,it.doc,dt),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ht&&(st.visible=Eo(it.display,it.doc,dt));if(!Fd(it,st))break;zr(it);var gt=Po(it);zs(it),na(it,gt),UA(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 Cu(it,st){var dt=new fh(it,st);if(Fd(it,dt)){zr(it),fs(it,dt);var ht=Po(it);zs(it),na(it,ht),UA(it,ht),dt.finish()}}function cf(it,st,dt){var ht=it.display,gt=it.options.lineNumbers,Nt=ht.lineDiv,Kt=Nt.firstChild;function qt(wi){var Fi=wi.nextSibling;return ie&&At&&it.display.currentWheelTarget==wi?wi.style.display="none":wi.parentNode.removeChild(wi),Fi}for(var Yt=ht.view,pe=ht.viewFrom,$e=0;$e<Yt.length;$e++){var ye=Yt[$e];if(!ye.hidden)if(!ye.node||ye.node.parentNode!=Nt){var Pn=$r(it,ye,pe,dt);Nt.insertBefore(Pn,Kt)}else{for(;Kt!=ye.node;)Kt=qt(Kt);var wn=gt&&st!=null&&st<=pe&&ye.lineNumber;ye.changes&&(Cn(ye.changes,"gutter")>-1&&(wn=!1),os(it,ye,pe,dt)),wn&&(Zt(ye.lineNumber),ye.lineNumber.appendChild(document.createTextNode(ni(it.options,pe)))),Kt=ye.node.nextSibling}pe+=ye.size}for(;Kt;)Kt=qt(Kt)}function IA(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function UA(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+$o(it)+"px"}function Ed(it){var st=it.display,dt=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ht=Au(st)-st.scroller.scrollLeft+it.doc.scrollLeft,gt=st.gutters.offsetWidth,Nt=ht+"px",Kt=0;Kt<dt.length;Kt++)if(!dt[Kt].hidden){it.options.fixedGutter&&(dt[Kt].gutter&&(dt[Kt].gutter.style.left=Nt),dt[Kt].gutterBackground&&(dt[Kt].gutterBackground.style.left=Nt));var qt=dt[Kt].alignable;if(qt)for(var Yt=0;Yt<qt.length;Yt++)qt[Yt].style.left=Nt}it.options.fixedGutter&&(st.gutters.style.left=ht+gt+"px")}}function Aa(it){if(!it.options.lineNumbers)return!1;var st=it.doc,dt=ni(it.options,st.first+st.size-1),ht=it.display;if(dt.length!=ht.lineNumChars){var gt=ht.measure.appendChild($t("div",[$t("div",dt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Nt=gt.firstChild.offsetWidth,Kt=gt.offsetWidth-Nt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Nt,ht.lineGutter.offsetWidth-Kt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Kt,ht.lineNumChars=ht.lineNumInnerWidth?dt.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",IA(it.display),!0}return!1}function Ma(it,st){for(var dt=[],ht=!1,gt=0;gt<it.length;gt++){var Nt=it[gt],Kt=null;if(typeof Nt!="string"&&(Kt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ht=!0;else continue;dt.push({className:Nt,style:Kt})}return st&&!ht&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function gh(it){var st=it.gutters,dt=it.gutterSpecs;Zt(st),it.lineGutter=null;for(var ht=0;ht<dt.length;++ht){var gt=dt[ht],Nt=gt.className,Kt=gt.style,qt=st.appendChild($t("div",null,"CodeMirror-gutter "+Nt));Kt&&(qt.style.cssText=Kt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=qt,qt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=dt.length?"":"none",IA(it)}function Kl(it){gh(it.display),vs(it),Ed(it)}function QA(it,st,dt,ht){var gt=this;this.input=dt,gt.scrollbarFiller=$t("div",null,"CodeMirror-scrollbar-filler"),gt.scrollbarFiller.setAttribute("cm-not-content","true"),gt.gutterFiller=$t("div",null,"CodeMirror-gutter-filler"),gt.gutterFiller.setAttribute("cm-not-content","true"),gt.lineDiv=Ce("div",null,"CodeMirror-code"),gt.selectionDiv=$t("div",null,null,"position: relative; z-index: 1"),gt.cursorDiv=$t("div",null,"CodeMirror-cursors"),gt.measure=$t("div",null,"CodeMirror-measure"),gt.lineMeasure=$t("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=$t("div",[Nt],null,"position: relative"),gt.sizer=$t("div",[gt.mover],"CodeMirror-sizer"),gt.sizerWidth=null,gt.heightForcer=$t("div",null,null,"position: absolute; height: "+li+"px; width: 1px;"),gt.gutters=$t("div",null,"CodeMirror-gutters"),gt.lineGutter=null,gt.scroller=$t("div",[gt.sizer,gt.heightForcer,gt.gutters],"CodeMirror-scroll"),gt.scroller.setAttribute("tabIndex","-1"),gt.wrapper=$t("div",[gt.scrollbarFiller,gt.gutterFiller,gt.scroller],"CodeMirror"),de&&Ht<8&&(gt.gutters.style.zIndex=-1,gt.scroller.style.paddingRight=0),!ie&&!(Ct&&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=Ma(ht.gutters,ht.lineNumbers),gh(gt),dt.init(gt)}var Ll=0,ia=null;de?ia=-.53:Ct?ia=15:re?ia=-.7:Ie&&(ia=-1/3);function Pu(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 Ml(it){var st=Pu(it);return st.x*=ia,st.y*=ia,st}function ba(it,st){var dt=Pu(st),ht=dt.x,gt=dt.y,Nt=it.display,Kt=Nt.scroller,qt=Kt.scrollWidth>Kt.clientWidth,Yt=Kt.scrollHeight>Kt.clientHeight;if(ht&&qt||gt&&Yt){if(gt&&At&&ie){t:for(var pe=st.target,$e=Nt.view;pe!=Kt;pe=pe.parentNode)for(var ye=0;ye<$e.length;ye++)if($e[ye].node==pe){it.display.currentWheelTarget=pe;break t}}if(ht&&!Ct&&!Wt&&ia!=null){gt&&Yt&&xu(it,Math.max(0,Kt.scrollTop+gt*ia)),Su(it,Math.max(0,Kt.scrollLeft+ht*ia)),(!gt||gt&&Yt)&&Ki(st),Nt.wheelStartX=null;return}if(gt&&ia!=null){var Pn=gt*ia,wn=it.doc.scrollTop,wi=wn+Nt.wrapper.clientHeight;Pn<0?wn=Math.max(0,wn+Pn-50):wi=Math.min(it.doc.height,wi+Pn+50),Cu(it,{top:wn,bottom:wi})}Ll<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Kt.scrollLeft,Nt.wheelStartY=Kt.scrollTop,Nt.wheelDX=ht,Nt.wheelDY=gt,setTimeout(function(){if(Nt.wheelStartX!=null){var Fi=Kt.scrollLeft-Nt.wheelStartX,_i=Kt.scrollTop-Nt.wheelStartY,sr=_i&&Nt.wheelDY&&_i/Nt.wheelDY||Fi&&Nt.wheelDX&&Fi/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,sr&&(ia=(ia*Ll+sr)/(Ll+1),++Ll)}},200)):(Nt.wheelDX+=ht,Nt.wheelDY+=gt))}}var $l=function(it,st){this.ranges=it,this.primIndex=st};$l.prototype.primary=function(){return this.ranges[this.primIndex]},$l.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],ht=it.ranges[st];if(!_n(dt.anchor,ht.anchor)||!_n(dt.head,ht.head))return!1}return!0},$l.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new gs(We(this.ranges[st].anchor),We(this.ranges[st].head));return new $l(it,this.primIndex)},$l.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},$l.prototype.contains=function(it,st){st||(st=it);for(var dt=0;dt<this.ranges.length;dt++){var ht=this.ranges[dt];if(Kn(st,ht.from())>=0&&Kn(it,ht.to())<=0)return dt}return-1};var gs=function(it,st){this.anchor=it,this.head=st};gs.prototype.from=function(){return An(this.anchor,this.head)},gs.prototype.to=function(){return on(this.anchor,this.head)},gs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function pl(it,st,dt){var ht=it&&it.options.selectionsMayTouch,gt=st[dt];st.sort(function(Pn,wn){return Kn(Pn.from(),wn.from())}),dt=Cn(st,gt);for(var Nt=1;Nt<st.length;Nt++){var Kt=st[Nt],qt=st[Nt-1],Yt=Kn(qt.to(),Kt.from());if(ht&&!Kt.empty()?Yt>0:Yt>=0){var pe=An(qt.from(),Kt.from()),$e=on(qt.to(),Kt.to()),ye=qt.empty()?Kt.from()==Kt.head:qt.from()==qt.head;Nt<=dt&&--dt,st.splice(--Nt,2,new gs(ye?$e:pe,ye?pe:$e))}}return new $l(st,dt)}function gA(it,st){return new $l([new gs(it,st||it)],0)}function OA(it){return it.text?Ye(it.from.line+it.text.length-1,Fe(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function HA(it,st){if(Kn(it,st.from)<0)return it;if(Kn(it,st.to)<=0)return OA(st);var dt=it.line+st.text.length-(st.to.line-st.from.line)-1,ht=it.ch;return it.line==st.to.line&&(ht+=OA(st).ch-st.to.ch),Ye(dt,ht)}function Qc(it,st){for(var dt=[],ht=0;ht<it.sel.ranges.length;ht++){var gt=it.sel.ranges[ht];dt.push(new gs(HA(gt.anchor,st),HA(gt.head,st)))}return pl(it.cm,dt,it.sel.primIndex)}function Rh(it,st,dt){return it.line==st.line?Ye(dt.line,it.ch-st.ch+dt.ch):Ye(dt.line+(it.line-st.line),it.ch)}function Oc(it,st,dt){for(var ht=[],gt=Ye(it.first,0),Nt=gt,Kt=0;Kt<st.length;Kt++){var qt=st[Kt],Yt=Rh(qt.from,gt,Nt),pe=Rh(OA(qt),gt,Nt);if(gt=qt.to,Nt=pe,dt=="around"){var $e=it.sel.ranges[Kt],ye=Kn($e.head,$e.anchor)<0;ht[Kt]=new gs(ye?pe:Yt,ye?Yt:pe)}else ht[Kt]=new gs(Yt,Yt)}return new $l(ht,it.sel.primIndex)}function ko(it){it.doc.mode=je(it.options,it.doc.modeOption),Hc(it)}function Hc(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,DA(it,100),it.state.modeGen++,it.curOp&&vs(it)}function df(it,st){return st.from.ch==0&&st.to.ch==0&&Fe(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Ld(it,st,dt,ht){function gt(Dr){return dt?dt[Dr]:null}function Nt(Dr,Sr,Kr){wr(Dr,Sr,Kr,ht),ar(Dr,"change",Dr,st)}function Kt(Dr,Sr){for(var Kr=[],fo=Dr;fo<Sr;++fo)Kr.push(new Fr(pe[fo],gt(fo),ht));return Kr}var qt=st.from,Yt=st.to,pe=st.text,$e=fi(it,qt.line),ye=fi(it,Yt.line),Pn=Fe(pe),wn=gt(pe.length-1),wi=Yt.line-qt.line;if(st.full)it.insert(0,Kt(0,pe.length)),it.remove(pe.length,it.size-pe.length);else if(df(it,st)){var Fi=Kt(0,pe.length-1);Nt(ye,ye.text,wn),wi&&it.remove(qt.line,wi),Fi.length&&it.insert(qt.line,Fi)}else if($e==ye)if(pe.length==1)Nt($e,$e.text.slice(0,qt.ch)+Pn+$e.text.slice(Yt.ch),wn);else{var _i=Kt(1,pe.length-1);_i.push(new Fr(Pn+$e.text.slice(Yt.ch),wn,ht)),Nt($e,$e.text.slice(0,qt.ch)+pe[0],gt(0)),it.insert(qt.line+1,_i)}else if(pe.length==1)Nt($e,$e.text.slice(0,qt.ch)+pe[0]+ye.text.slice(Yt.ch),gt(0)),it.remove(qt.line+1,wi);else{Nt($e,$e.text.slice(0,qt.ch)+pe[0],gt(0)),Nt(ye,Pn+ye.text.slice(Yt.ch),wn);var sr=Kt(1,pe.length-1);wi>1&&it.remove(qt.line+1,wi-1),it.insert(qt.line+1,sr)}ar(it,"change",it,st)}function Fu(it,st,dt){function ht(gt,Nt,Kt){if(gt.linked)for(var qt=0;qt<gt.linked.length;++qt){var Yt=gt.linked[qt];if(Yt.doc!=Nt){var pe=Kt&&Yt.sharedHist;dt&&!pe||(st(Yt.doc,pe),ht(Yt.doc,gt,pe))}}}ht(it,null,!0)}function va(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,jr(it),ko(it),Rc(it),it.options.lineWrapping||Hi(it),it.options.mode=st.modeOption,vs(it)}function Rc(it){(it.doc.direction=="rtl"?Bn:Ot)(it.display.lineDiv,"CodeMirror-rtl")}function ep(it){ls(it,function(){Rc(it),vs(it)})}function _h(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 Md(it,st){var dt={from:We(st.from),to:OA(st),text:$i(it,st.from,st.to)};return RA(it,dt,st.from.line,st.to.line+1),Fu(it,function(ht){return RA(ht,dt,st.from.line,st.to.line+1)},!0),dt}function Kh(it){for(;it.length;){var st=Fe(it);if(st.ranges)it.pop();else break}}function Gh(it,st){if(st)return Kh(it.done),Fe(it.done);if(it.done.length&&!Fe(it.done).ranges)return Fe(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Fe(it.done)}function _c(it,st,dt,ht){var gt=it.history;gt.undone.length=0;var Nt=+new Date,Kt,qt;if((gt.lastOp==ht||gt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&gt.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Kt=Gh(gt,gt.lastOp==ht)))qt=Fe(Kt.changes),Kn(st.from,st.to)==0&&Kn(st.from,qt.to)==0?qt.to=OA(st):Kt.changes.push(Md(it,st));else{var Yt=Fe(gt.done);for((!Yt||!Yt.ranges)&&zh(it.sel,gt.done),Kt={changes:[Md(it,st)],generation:gt.generation},gt.done.push(Kt);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=ht,gt.lastOrigin=gt.lastSelOrigin=st.origin,qt||gi(it,"historyAdded")}function ff(it,st,dt,ht){var gt=st.charAt(0);return gt=="*"||gt=="+"&&dt.ranges.length==ht.ranges.length&&dt.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Kc(it,st,dt,ht){var gt=it.history,Nt=ht&&ht.origin;dt==gt.lastSelOp||Nt&&gt.lastSelOrigin==Nt&&(gt.lastModTime==gt.lastSelTime&&gt.lastOrigin==Nt||ff(it,Nt,Fe(gt.done),st))?gt.done[gt.done.length-1]=st:zh(st,gt.done),gt.lastSelTime=+new Date,gt.lastSelOrigin=Nt,gt.lastSelOp=dt,ht&&ht.clearRedo!==!1&&Kh(gt.undone)}function zh(it,st){var dt=Fe(st);dt&&dt.ranges&&dt.equals(it)||st.push(it)}function RA(it,st,dt,ht){var gt=st["spans_"+it.id],Nt=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ht),function(Kt){Kt.markedSpans&&((gt||(gt=st["spans_"+it.id]={}))[Nt]=Kt.markedSpans),++Nt})}function ol(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 Eu(it,st){var dt=st["spans_"+it.id];if(!dt)return null;for(var ht=[],gt=0;gt<st.text.length;++gt)ht.push(ol(dt[gt]));return ht}function Wr(it,st){var dt=Eu(it,st),ht=yi(it,st);if(!dt)return ht;if(!ht)return dt;for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt],Kt=ht[gt];if(Nt&&Kt)t:for(var qt=0;qt<Kt.length;++qt){for(var Yt=Kt[qt],pe=0;pe<Nt.length;++pe)if(Nt[pe].marker==Yt.marker)continue t;Nt.push(Yt)}else Kt&&(dt[gt]=Kt)}return dt}function pA(it,st,dt){for(var ht=[],gt=0;gt<it.length;++gt){var Nt=it[gt];if(Nt.ranges){ht.push(dt?$l.prototype.deepCopy.call(Nt):Nt);continue}var Kt=Nt.changes,qt=[];ht.push({changes:qt});for(var Yt=0;Yt<Kt.length;++Yt){var pe=Kt[Yt],$e=void 0;if(qt.push({from:pe.from,to:pe.to,text:pe.text}),st)for(var ye in pe)($e=ye.match(/^spans_(\d+)$/))&&Cn(st,Number($e[1]))>-1&&(Fe(qt)[ye]=pe[ye],delete pe[ye])}}return ht}function bd(it,st,dt,ht){if(ht){var gt=it.anchor;if(dt){var Nt=Kn(st,gt)<0;Nt!=Kn(dt,gt)<0?(gt=st,st=dt):Nt!=Kn(st,dt)<0&&(st=dt)}return new gs(gt,st)}else return new gs(dt||st,st)}function jh(it,st,dt,ht,gt){gt==null&&(gt=it.cm&&(it.cm.display.shift||it.extend)),ja(it,new $l([bd(it.sel.primary(),st,dt,gt)],0),ht)}function Lu(it,st,dt){for(var ht=[],gt=it.cm&&(it.cm.display.shift||it.extend),Nt=0;Nt<it.sel.ranges.length;Nt++)ht[Nt]=bd(it.sel.ranges[Nt],st[Nt],null,gt);var Kt=pl(it.cm,ht,it.sel.primIndex);ja(it,Kt,dt)}function _A(it,st,dt,ht){var gt=it.sel.ranges.slice(0);gt[st]=dt,ja(it,pl(it.cm,gt,it.sel.primIndex),ht)}function KA(it,st,dt,ht){ja(it,gA(st,dt),ht)}function Vh(it,st,dt){var ht={ranges:st.ranges,update:function(gt){this.ranges=[];for(var Nt=0;Nt<gt.length;Nt++)this.ranges[Nt]=new gs(Vn(it,gt[Nt].anchor),Vn(it,gt[Nt].head))},origin:dt&&dt.origin};return gi(it,"beforeSelectionChange",it,ht),it.cm&&gi(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=st.ranges?pl(it.cm,ht.ranges,ht.ranges.length-1):st}function ph(it,st,dt){var ht=it.history.done,gt=Fe(ht);gt&&gt.ranges?(ht[ht.length-1]=st,mh(it,st,dt)):ja(it,st,dt)}function ja(it,st,dt){mh(it,st,dt),Kc(it,it.sel,it.cm?it.cm.curOp.id:NaN,dt)}function mh(it,st,dt){(Ei(it,"beforeSelectionChange")||it.cm&&Ei(it.cm,"beforeSelectionChange"))&&(st=Vh(it,st,dt));var ht=dt&&dt.bias||(Kn(st.primary().head,it.sel.primary().head)<0?-1:1);gf(it,vh(it,st,ht,!0)),!(dt&&dt.scroll===!1)&&it.cm&&hu(it.cm)}function gf(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,cr(it.cm)),ar(it,"cursorActivity",it))}function Mu(it){gf(it,vh(it,it.sel,null,!1))}function vh(it,st,dt,ht){for(var gt,Nt=0;Nt<st.ranges.length;Nt++){var Kt=st.ranges[Nt],qt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Yt=Gc(it,Kt.anchor,qt&&qt.anchor,dt,ht),pe=Gc(it,Kt.head,qt&&qt.head,dt,ht);(gt||Yt!=Kt.anchor||pe!=Kt.head)&&(gt||(gt=st.ranges.slice(0,Nt)),gt[Nt]=new gs(Yt,pe))}return gt?pl(it.cm,gt,st.primIndex):st}function bu(it,st,dt,ht,gt){var Nt=fi(it,st.line);if(Nt.markedSpans)for(var Kt=0;Kt<Nt.markedSpans.length;++Kt){var qt=Nt.markedSpans[Kt],Yt=qt.marker,pe="selectLeft"in Yt?!Yt.selectLeft:Yt.inclusiveLeft,$e="selectRight"in Yt?!Yt.selectRight:Yt.inclusiveRight;if((qt.from==null||(pe?qt.from<=st.ch:qt.from<st.ch))&&(qt.to==null||($e?qt.to>=st.ch:qt.to>st.ch))){if(gt&&(gi(Yt,"beforeCursorEnter"),Yt.explicitlyCleared))if(Nt.markedSpans){--Kt;continue}else break;if(!Yt.atomic)continue;if(dt){var ye=Yt.find(ht<0?1:-1),Pn=void 0;if((ht<0?$e:pe)&&(ye=kd(it,ye,-ht,ye&&ye.line==st.line?Nt:null)),ye&&ye.line==st.line&&(Pn=Kn(ye,dt))&&(ht<0?Pn<0:Pn>0))return bu(it,ye,st,ht,gt)}var wn=Yt.find(ht<0?-1:1);return(ht<0?pe:$e)&&(wn=kd(it,wn,ht,wn.line==st.line?Nt:null)),wn?bu(it,wn,st,ht,gt):null}}return st}function Gc(it,st,dt,ht,gt){var Nt=ht||1,Kt=bu(it,st,dt,Nt,gt)||!gt&&bu(it,st,dt,Nt,!0)||bu(it,st,dt,-Nt,gt)||!gt&&bu(it,st,dt,-Nt,!0);return Kt||(it.cantEdit=!0,Ye(it.first,0))}function kd(it,st,dt,ht){return dt<0&&st.ch==0?st.line>it.first?Vn(it,Ye(st.line-1)):null:dt>0&&st.ch==(ht||fi(it,st.line)).text.length?st.line<it.first+it.size-1?Ye(st.line+1,0):null:new Ye(st.line,st.ch+dt)}function ra(it){it.setSelection(Ye(it.firstLine(),0),Ye(it.lastLine()),sn)}function yh(it,st,dt){var ht={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ht.canceled=!0}};return dt&&(ht.update=function(gt,Nt,Kt,qt){gt&&(ht.from=Vn(it,gt)),Nt&&(ht.to=Vn(it,Nt)),Kt&&(ht.text=Kt),qt!==void 0&&(ht.origin=qt)}),gi(it,"beforeChange",it,ht),it.cm&&gi(it.cm,"beforeChange",it.cm,ht),ht.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ht.from,to:ht.to,text:ht.text,origin:ht.origin}}function GA(it,st,dt){if(it.cm){if(!it.cm.curOp)return ma(it.cm,GA)(it,st,dt);if(it.cm.state.suppressEdits)return}if(!((Ei(it,"beforeChange")||it.cm&&Ei(it.cm,"beforeChange"))&&(st=yh(it,st,!0),!st))){var ht=ce&&!dt&&un(it,st.from,st.to);if(ht)for(var gt=ht.length-1;gt>=0;--gt)wh(it,{from:ht[gt].from,to:ht[gt].to,text:gt?[""]:st.text,origin:st.origin});else wh(it,st)}}function wh(it,st){if(!(st.text.length==1&&st.text[0]==""&&Kn(st.from,st.to)==0)){var dt=Qc(it,st);_c(it,st,dt,it.cm?it.cm.curOp.id:NaN),Wh(it,st,dt,yi(it,st));var ht=[];Fu(it,function(gt,Nt){!Nt&&Cn(ht,gt.history)==-1&&(vf(gt.history,st),ht.push(gt.history)),Wh(gt,st,null,yi(gt,st))})}}function zc(it,st,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var gt=it.history,Nt,Kt=it.sel,qt=st=="undo"?gt.done:gt.undone,Yt=st=="undo"?gt.undone:gt.done,pe=0;pe<qt.length&&(Nt=qt[pe],!(dt?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));pe++);if(pe!=qt.length){for(gt.lastOrigin=gt.lastSelOrigin=null;;)if(Nt=qt.pop(),Nt.ranges){if(zh(Nt,Yt),dt&&!Nt.equals(it.sel)){ja(it,Nt,{clearRedo:!1});return}Kt=Nt}else if(ht){qt.push(Nt);return}else break;var $e=[];zh(Kt,Yt),Yt.push({changes:$e,generation:gt.generation}),gt.generation=Nt.generation||++gt.maxGeneration;for(var ye=Ei(it,"beforeChange")||it.cm&&Ei(it.cm,"beforeChange"),Pn=function(Fi){var _i=Nt.changes[Fi];if(_i.origin=st,ye&&!yh(it,_i,!1))return qt.length=0,{};$e.push(Md(it,_i));var sr=Fi?Qc(it,_i):Fe(qt);Wh(it,_i,sr,Wr(it,_i)),!Fi&&it.cm&&it.cm.scrollIntoView({from:_i.from,to:OA(_i)});var Dr=[];Fu(it,function(Sr,Kr){!Kr&&Cn(Dr,Sr.history)==-1&&(vf(Sr.history,_i),Dr.push(Sr.history)),Wh(Sr,_i,null,Wr(Sr,_i))})},wn=Nt.changes.length-1;wn>=0;--wn){var wi=Pn(wn);if(wi)return wi.v}}}}function pf(it,st){if(st!=0&&(it.first+=st,it.sel=new $l(ci(it.sel.ranges,function(gt){return new gs(Ye(gt.anchor.line+st,gt.anchor.ch),Ye(gt.head.line+st,gt.head.ch))}),it.sel.primIndex),it.cm)){vs(it.cm,it.first,it.first-st,st);for(var dt=it.cm.display,ht=dt.viewFrom;ht<dt.viewTo;ht++)wo(it.cm,ht,"gutter")}}function Wh(it,st,dt,ht){if(it.cm&&!it.cm.curOp)return ma(it.cm,Wh)(it,st,dt,ht);if(st.to.line<it.first){pf(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);pf(it,gt),st={from:Ye(it.first,0),to:Ye(st.to.line+gt,st.to.ch),text:[Fe(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:Ye(Nt,fi(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=$i(it,st.from,st.to),dt||(dt=Qc(it,st)),it.cm?ug(it.cm,st,ht):Ld(it,st,ht),mh(it,dt,sn),it.cantEdit&&Gc(it,Ye(it.firstLine(),0))&&(it.cantEdit=!1)}}function ug(it,st,dt){var ht=it.doc,gt=it.display,Nt=st.from,Kt=st.to,qt=!1,Yt=Nt.line;it.options.lineWrapping||(Yt=te(an(fi(ht,Nt.line))),ht.iter(Yt,Kt.line+1,function(wn){if(wn==gt.maxLine)return qt=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&cr(it),Ld(ht,st,dt,xs(it)),it.options.lineWrapping||(ht.iter(Yt,Nt.line+st.text.length,function(wn){var wi=er(wn);wi>gt.maxLineLength&&(gt.maxLine=wn,gt.maxLineLength=wi,gt.maxLineChanged=!0,qt=!1)}),qt&&(it.curOp.updateMaxLine=!0)),ae(ht,Nt.line),DA(it,400);var pe=st.text.length-(Kt.line-Nt.line)-1;st.full?vs(it):Nt.line==Kt.line&&st.text.length==1&&!df(it.doc,st)?wo(it,Nt.line,"text"):vs(it,Nt.line,Kt.line+1,pe);var $e=Ei(it,"changes"),ye=Ei(it,"change");if(ye||$e){var Pn={from:Nt,to:Kt,text:st.text,removed:st.removed,origin:st.origin};ye&&ar(it,"change",it,Pn),$e&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Pn)}it.display.selForContextMenu=null}function xh(it,st,dt,ht,gt){var Nt;ht||(ht=dt),Kn(ht,dt)<0&&(Nt=[ht,dt],dt=Nt[0],ht=Nt[1]),typeof st=="string"&&(st=it.splitLines(st)),GA(it,{from:dt,to:ht,text:st,origin:gt})}function tu(it,st,dt,ht){dt<it.line?it.line+=ht:st<it.line&&(it.line=st,it.ch=0)}function mf(it,st,dt,ht){for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Kt=!0;if(Nt.ranges){Nt.copied||(Nt=it[gt]=Nt.deepCopy(),Nt.copied=!0);for(var qt=0;qt<Nt.ranges.length;qt++)tu(Nt.ranges[qt].anchor,st,dt,ht),tu(Nt.ranges[qt].head,st,dt,ht);continue}for(var Yt=0;Yt<Nt.changes.length;++Yt){var pe=Nt.changes[Yt];if(dt<pe.from.line)pe.from=Ye(pe.from.line+ht,pe.from.ch),pe.to=Ye(pe.to.line+ht,pe.to.ch);else if(st<=pe.to.line){Kt=!1;break}}Kt||(it.splice(0,gt+1),gt=0)}}function vf(it,st){var dt=st.from.line,ht=st.to.line,gt=st.text.length-(ht-dt)-1;mf(it.done,dt,ht,gt),mf(it.undone,dt,ht,gt)}function Sh(it,st,dt,ht){var gt=st,Nt=st;return typeof st=="number"?Nt=fi(it,Nn(it,st)):gt=te(st),gt==null?null:(ht(Nt,gt)&&it.cm&&wo(it.cm,gt,dt),Nt)}function Zh(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}Zh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var dt=it,ht=it+st;dt<ht;++dt){var gt=this.lines[dt];this.height-=gt.height,Qr(gt),ar(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 ht=0;ht<st.length;++ht)st[ht].parent=this},iterN:function(it,st,dt){for(var ht=it+st;it<ht;++it)if(dt(this.lines[it]))return!0}};function Gs(it){this.children=it;for(var st=0,dt=0,ht=0;ht<it.length;++ht){var gt=it[ht];st+=gt.chunkSize(),dt+=gt.height,gt.parent=this}this.size=st,this.height=dt,this.parent=null}Gs.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var dt=0;dt<this.children.length;++dt){var ht=this.children[dt],gt=ht.chunkSize();if(it<gt){var Nt=Math.min(st,gt-it),Kt=ht.height;if(ht.removeInner(it,Nt),this.height-=Kt-ht.height,gt==Nt&&(this.children.splice(dt--,1),ht.parent=null),(st-=Nt)==0)break;it=0}else it-=gt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Zh))){var qt=[];this.collapse(qt),this.children=[new Zh(qt)],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 ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Nt=gt.chunkSize();if(it<=Nt){if(gt.insertInner(it,st,dt),gt.lines&&gt.lines.length>50){for(var Kt=gt.lines.length%25+25,qt=Kt;qt<gt.lines.length;){var Yt=new Zh(gt.lines.slice(qt,qt+=25));gt.height-=Yt.height,this.children.splice(++ht,0,Yt),Yt.parent=this}gt.lines=gt.lines.slice(0,Kt),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 Gs(st);if(it.parent){it.size-=dt.size,it.height-=dt.height;var gt=Cn(it.parent.children,it);it.parent.children.splice(gt+1,0,dt)}else{var ht=new Gs(it.children);ht.parent=it,it.children=[ht,dt],it=ht}dt.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,dt){for(var ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Nt=gt.chunkSize();if(it<Nt){var Kt=Math.min(st,Nt-it);if(gt.iterN(it,Kt,dt))return!0;if((st-=Kt)==0)break;it=0}else it-=Nt}}};var mA=function(it,st,dt){if(dt)for(var ht in dt)dt.hasOwnProperty(ht)&&(this[ht]=dt[ht]);this.doc=it,this.node=st};mA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,dt=this.line,ht=te(dt);if(!(ht==null||!st)){for(var gt=0;gt<st.length;++gt)st[gt]==this&&st.splice(gt--,1);st.length||(dt.widgets=null);var Nt=ao(this);Br(dt,Math.max(0,dt.height-Nt)),it&&(ls(it,function(){jc(it,dt,-Nt),wo(it,ht,"widget")}),ar(it,"lineWidgetCleared",it,this,ht))}},mA.prototype.changed=function(){var it=this,st=this.height,dt=this.doc.cm,ht=this.line;this.height=null;var gt=ao(this)-st;gt&&(ln(this.doc,ht)||Br(ht,ht.height+gt),dt&&ls(dt,function(){dt.curOp.forceUpdate=!0,jc(dt,ht,gt),ar(dt,"lineWidgetChanged",dt,it,te(ht))}))},Ri(mA);function jc(it,st,dt){Mi(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&ch(it,dt)}function Td(it,st,dt,ht){var gt=new mA(it,dt,ht),Nt=it.cm;return Nt&&gt.noHScroll&&(Nt.display.alignWidgets=!0),Sh(it,st,"widget",function(Kt){var qt=Kt.widgets||(Kt.widgets=[]);if(gt.insertAt==null?qt.push(gt):qt.splice(Math.min(qt.length-1,Math.max(0,gt.insertAt)),0,gt),gt.line=Kt,Nt&&!ln(it,Kt)){var Yt=Mi(Kt)<it.scrollTop;Br(Kt,Kt.height+ao(gt)),Yt&&ch(Nt,gt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&ar(Nt,"lineWidgetAdded",Nt,gt,typeof st=="number"?st:te(st)),gt}var Nd=0,Re=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Nd};Re.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&_l(it),Ei(this,"clear")){var dt=this.find();dt&&ar(this,"clear",dt.from,dt.to)}for(var ht=null,gt=null,Nt=0;Nt<this.lines.length;++Nt){var Kt=this.lines[Nt],qt=Yn(Kt.markedSpans,this);it&&!this.collapsed?wo(it,te(Kt),"text"):it&&(qt.to!=null&&(gt=te(Kt)),qt.from!=null&&(ht=te(Kt))),Kt.markedSpans=Xn(Kt.markedSpans,qt),qt.from==null&&this.collapsed&&!ln(this.doc,Kt)&&it&&Br(Kt,ta(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Yt=0;Yt<this.lines.length;++Yt){var pe=an(this.lines[Yt]),$e=er(pe);$e>it.display.maxLineLength&&(it.display.maxLine=pe,it.display.maxLineLength=$e,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&vs(it,ht,gt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Mu(it.doc)),it&&ar(it,"markerCleared",it,this,ht,gt),st&&du(it),this.parent&&this.parent.clear()}},Re.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ht,gt=0;gt<this.lines.length;++gt){var Nt=this.lines[gt],Kt=Yn(Nt.markedSpans,this);if(Kt.from!=null&&(dt=Ye(st?Nt:te(Nt),Kt.from),it==-1))return dt;if(Kt.to!=null&&(ht=Ye(st?Nt:te(Nt),Kt.to),it==1))return ht}return dt&&{from:dt,to:ht}},Re.prototype.changed=function(){var it=this,st=this.find(-1,!0),dt=this,ht=this.doc.cm;!st||!ht||ls(ht,function(){var gt=st.line,Nt=te(st.line),Kt=Sa(ht,Nt);if(Kt&&(cA(Kt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!ln(dt.doc,gt)&&dt.height!=null){var qt=dt.height;dt.height=null;var Yt=ao(dt)-qt;Yt&&Br(gt,gt.height+Yt)}ar(ht,"markerChanged",ht,it)})},Re.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||Cn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Re.prototype.detachLine=function(it){if(this.lines.splice(Cn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},Ri(Re);function zA(it,st,dt,ht,gt){if(ht&&ht.shared)return Ag(it,st,dt,ht,gt);if(it.cm&&!it.cm.curOp)return ma(it.cm,zA)(it,st,dt,ht,gt);var Nt=new Re(it,gt),Kt=Kn(st,dt);if(ht&&ti(ht,Nt,!1),Kt>0||Kt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=Ce("span",[Nt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(fn(it,st.line,st,dt,Nt)||st.line!=dt.line&&fn(it,dt.line,st,dt,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}Nt.addToHistory&&_c(it,{from:st,to:dt,origin:"markText"},it.sel,NaN);var qt=st.line,Yt=it.cm,pe;if(it.iter(qt,dt.line+1,function(ye){Yt&&Nt.collapsed&&!Yt.options.lineWrapping&&an(ye)==Yt.display.maxLine&&(pe=!0),Nt.collapsed&&qt!=st.line&&Br(ye,0),ki(ye,new cn(Nt,qt==st.line?st.ch:null,qt==dt.line?dt.ch:null)),++qt}),Nt.collapsed&&it.iter(st.line,dt.line+1,function(ye){ln(it,ye)&&Br(ye,0)}),Nt.clearOnEnter&&yn(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&(Ge(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Nt.collapsed&&(Nt.id=++Nd,Nt.atomic=!0),Yt){if(pe&&(Yt.curOp.updateMaxLine=!0),Nt.collapsed)vs(Yt,st.line,dt.line+1);else if(Nt.className||Nt.startStyle||Nt.endStyle||Nt.css||Nt.attributes||Nt.title)for(var $e=st.line;$e<=dt.line;$e++)wo(Yt,$e,"text");Nt.atomic&&Mu(Yt.doc),ar(Yt,"markerAdded",Yt,Nt)}return Nt}var ku=function(it,st){this.markers=it,this.primary=st;for(var dt=0;dt<it.length;++dt)it[dt].parent=this};ku.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();ar(this,"clear")}},ku.prototype.find=function(it,st){return this.primary.find(it,st)},Ri(ku);function Ag(it,st,dt,ht,gt){ht=ti(ht),ht.shared=!1;var Nt=[zA(it,st,dt,ht,gt)],Kt=Nt[0],qt=ht.widgetNode;return Fu(it,function(Yt){qt&&(ht.widgetNode=qt.cloneNode(!0)),Nt.push(zA(Yt,Vn(Yt,st),Vn(Yt,dt),ht,gt));for(var pe=0;pe<Yt.linked.length;++pe)if(Yt.linked[pe].isParent)return;Kt=Fe(Nt)}),new ku(Nt,Kt)}function Dd(it){return it.findMarks(Ye(it.first,0),it.clipPos(Ye(it.lastLine())),function(st){return st.parent})}function Id(it,st){for(var dt=0;dt<st.length;dt++){var ht=st[dt],gt=ht.find(),Nt=it.clipPos(gt.from),Kt=it.clipPos(gt.to);if(Kn(Nt,Kt)){var qt=zA(it,Nt,Kt,ht.primary,ht.primary.type);ht.markers.push(qt),qt.parent=ht}}}function Vc(it){for(var st=function(ht){var gt=it[ht],Nt=[gt.primary.doc];Fu(gt.primary.doc,function(Yt){return Nt.push(Yt)});for(var Kt=0;Kt<gt.markers.length;Kt++){var qt=gt.markers[Kt];Cn(Nt,qt.doc)==-1&&(qt.parent=null,gt.markers.splice(Kt--,1))}},dt=0;dt<it.length;dt++)st(dt)}var hg=0,ka=function(it,st,dt,ht,gt){if(!(this instanceof ka))return new ka(it,st,dt,ht,gt);dt==null&&(dt=0),Gs.call(this,[new Zh([new Fr("",null)])]),this.first=dt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=dt;var Nt=Ye(dt,0);this.sel=gA(Nt),this.history=new _h(null),this.id=++hg,this.modeOption=st,this.lineSep=ht,this.direction=gt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Ld(this,{from:Nt,to:Nt,text:it}),ja(this,gA(Nt),sn)};ka.prototype=Mt(Gs.prototype,{constructor:ka,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,ht=0;ht<st.length;++ht)dt+=st[ht].height;this.insertInner(it-this.first,st,dt)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=Mr(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:La(function(it){var st=Ye(this.first,0),dt=this.first+this.size-1;GA(this,{from:st,to:Ye(dt,fi(this,dt).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&cu(this.cm,0,0),ja(this,gA(st),sn)}),replaceRange:function(it,st,dt,ht){st=Vn(this,st),dt=dt?Vn(this,dt):st,xh(this,it,st,dt,ht)},getRange:function(it,st,dt){var ht=$i(this,Vn(this,it),Vn(this,st));return dt===!1?ht:ht.join(dt||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(zn(this,it))return fi(this,it)},getLineNumber:function(it){return te(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=fi(this,it)),an(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Vn(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:La(function(it,st,dt){KA(this,Vn(this,typeof it=="number"?Ye(it,st||0):it),null,dt)}),setSelection:La(function(it,st,dt){KA(this,Vn(this,it),Vn(this,st||it),dt)}),extendSelection:La(function(it,st,dt){jh(this,Vn(this,it),st&&Vn(this,st),dt)}),extendSelections:La(function(it,st){Lu(this,Li(this,it),st)}),extendSelectionsBy:La(function(it,st){var dt=ci(this.sel.ranges,it);Lu(this,Li(this,dt),st)}),setSelections:La(function(it,st,dt){if(it.length){for(var ht=[],gt=0;gt<it.length;gt++)ht[gt]=new gs(Vn(this,it[gt].anchor),Vn(this,it[gt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),ja(this,pl(this.cm,ht,st),dt)}}),addSelection:La(function(it,st,dt){var ht=this.sel.ranges.slice(0);ht.push(new gs(Vn(this,it),Vn(this,st||it))),ja(this,pl(this.cm,ht,ht.length-1),dt)}),getSelection:function(it){for(var st=this.sel.ranges,dt,ht=0;ht<st.length;ht++){var gt=$i(this,st[ht].from(),st[ht].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,ht=0;ht<dt.length;ht++){var gt=$i(this,dt[ht].from(),dt[ht].to());it!==!1&&(gt=gt.join(it||this.lineSeparator())),st[ht]=gt}return st},replaceSelection:function(it,st,dt){for(var ht=[],gt=0;gt<this.sel.ranges.length;gt++)ht[gt]=it;this.replaceSelections(ht,st,dt||"+input")},replaceSelections:La(function(it,st,dt){for(var ht=[],gt=this.sel,Nt=0;Nt<gt.ranges.length;Nt++){var Kt=gt.ranges[Nt];ht[Nt]={from:Kt.from(),to:Kt.to(),text:this.splitLines(it[Nt]),origin:dt}}for(var qt=st&&st!="end"&&Oc(this,ht,st),Yt=ht.length-1;Yt>=0;Yt--)GA(this,ht[Yt]);qt?ph(this,qt):this.cm&&hu(this.cm)}),undo:La(function(){zc(this,"undo")}),redo:La(function(){zc(this,"redo")}),undoSelection:La(function(){zc(this,"undo",!0)}),redoSelection:La(function(){zc(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,ht=0;ht<it.done.length;ht++)it.done[ht].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 _h(this.history.maxGeneration),Fu(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:pA(this.history.done),undone:pA(this.history.undone)}},setHistory:function(it){var st=this.history=new _h(this.history.maxGeneration);st.done=pA(it.done.slice(0),null,!0),st.undone=pA(it.undone.slice(0),null,!0)},setGutterMarker:La(function(it,st,dt){return Sh(this,it,"gutter",function(ht){var gt=ht.gutterMarkers||(ht.gutterMarkers={});return gt[st]=dt,!dt&&Bt(gt)&&(ht.gutterMarkers=null),!0})}),clearGutter:La(function(it){var st=this;this.iter(function(dt){dt.gutterMarkers&&dt.gutterMarkers[it]&&Sh(st,dt,"gutter",function(){return dt.gutterMarkers[it]=null,Bt(dt.gutterMarkers)&&(dt.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!zn(this,it)||(st=it,it=fi(this,it),!it))return null}else if(st=te(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:La(function(it,st,dt){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ht[gt])ht[gt]=dt;else{if(Rt(dt).test(ht[gt]))return!1;ht[gt]+=" "+dt}return!0})}),removeLineClass:La(function(it,st,dt){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Nt=ht[gt];if(Nt)if(dt==null)ht[gt]=null;else{var Kt=Nt.match(Rt(dt));if(!Kt)return!1;var qt=Kt.index+Kt[0].length;ht[gt]=Nt.slice(0,Kt.index)+(!Kt.index||qt==Nt.length?"":" ")+Nt.slice(qt)||null}else return!1;return!0})}),addLineWidget:La(function(it,st,dt){return Td(this,it,st,dt)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,dt){return zA(this,Vn(this,it),Vn(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=Vn(this,it),zA(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=Vn(this,it);var st=[],dt=fi(this,it.line).markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht){var gt=dt[ht];(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=Vn(this,it),st=Vn(this,st);var ht=[],gt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Kt=Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;qt++){var Yt=Kt[qt];!(Yt.to!=null&&gt==it.line&&it.ch>=Yt.to||Yt.from==null&&gt!=it.line||Yt.from!=null&&gt==st.line&&Yt.from>=st.ch)&&(!dt||dt(Yt.marker))&&ht.push(Yt.marker.parent||Yt.marker)}++gt}),ht},getAllMarks:function(){var it=[];return this.iter(function(st){var dt=st.markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht)dt[ht].from!=null&&it.push(dt[ht].marker)}),it},posFromIndex:function(it){var st,dt=this.first,ht=this.lineSeparator().length;return this.iter(function(gt){var Nt=gt.text.length+ht;if(Nt>it)return st=it,!0;it-=Nt,++dt}),Vn(this,Ye(dt,st))},indexFromPos:function(it){it=Vn(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(ht){st+=ht.text.length+dt}),st},copy:function(it){var st=new ka(Mr(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 ht=new ka(Mr(this,st,dt),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ht.history=this.history),(this.linked||(this.linked=[])).push({doc:ht,sharedHist:it.sharedHist}),ht.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Id(ht,Dd(this)),ht},unlinkDoc:function(it){if(it instanceof Xo&&(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),Vc(Dd(this));break}}if(it.history==this.history){var ht=[it.id];Fu(it,function(gt){return ht.push(gt.id)},!0),it.history=new _h(null),it.history.done=pA(this.history.done,ht),it.history.undone=pA(this.history.undone,ht)}},iterLinkedDocs:function(it){Fu(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):uo(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:La(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&ep(this.cm))})}),ka.prototype.eachLine=ka.prototype.iter;var Yh=0;function Ud(it){var st=this;if(dg(st),!(bi(st,it)||es(st.display,it))){Ki(it),de&&(Yh=+new Date);var dt=Ba(st,it,!0),ht=it.dataTransfer.files;if(!(!dt||st.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var gt=ht.length,Nt=Array(gt),Kt=0,qt=function(){++Kt==gt&&ma(st,function(){dt=Vn(st.doc,dt);var wn={from:dt,to:dt,text:st.doc.splitLines(Nt.filter(function(wi){return wi!=null}).join(st.doc.lineSeparator())),origin:"paste"};GA(st.doc,wn),ph(st.doc,gA(Vn(st.doc,dt),Vn(st.doc,OA(wn))))})()},Yt=function(wn,wi){if(st.options.allowDropFileTypes&&Cn(st.options.allowDropFileTypes,wn.type)==-1){qt();return}var Fi=new FileReader;Fi.onerror=function(){return qt()},Fi.onload=function(){var _i=Fi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_i)){qt();return}Nt[wi]=_i,qt()},Fi.readAsText(wn)},pe=0;pe<ht.length;pe++)Yt(ht[pe],pe);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 $e=it.dataTransfer.getData("Text");if($e){var ye;if(st.state.draggingText&&!st.state.draggingText.copy&&(ye=st.listSelections()),mh(st.doc,gA(dt,dt)),ye)for(var Pn=0;Pn<ye.length;++Pn)xh(st.doc,"",ye[Pn].anchor,ye[Pn].head,"drag");st.replaceSelection($e,"around","paste"),st.display.input.focus()}}catch(wn){}}}}function Qd(it,st){if(de&&(!it.state.draggingText||+new Date-Yh<100)){Er(st);return}if(!(bi(it,st)||es(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Ie)){var dt=$t("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Wt&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),st.dataTransfer.setDragImage(dt,0,0),Wt&&dt.parentNode.removeChild(dt)}}function cg(it,st){var dt=Ba(it,st);if(dt){var ht=document.createDocumentFragment();Oo(it,dt,ht),it.display.dragCursor||(it.display.dragCursor=$t("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),Vt(it.display.dragCursor,ht)}}function dg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fg(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),dt=[],ht=0;ht<st.length;ht++){var gt=st[ht].CodeMirror;gt&&dt.push(gt)}dt.length&&dt[0].operation(function(){for(var Nt=0;Nt<dt.length;Nt++)it(dt[Nt])})}}var Gl=!1;function ml(){Gl||(Xh(),Gl=!0)}function Xh(){var it;yn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(yf)},100))}),yn(window,"blur",function(){return fg(dA)})}function yf(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var Yu={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"},Wc=0;Wc<10;Wc++)Yu[Wc+48]=Yu[Wc+96]=String(Wc);for(var Od=65;Od<=90;Od++)Yu[Od]=String.fromCharCode(Od);for(var Zc=1;Zc<=12;Zc++)Yu[Zc+111]=Yu[Zc+63235]="F"+Zc;var bl={};bl.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"},bl.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"},bl.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"},bl.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"]},bl.default=At?bl.macDefault:bl.pcDefault;function wf(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var dt,ht,gt,Nt,Kt=0;Kt<st.length-1;Kt++){var qt=st[Kt];if(/^(cmd|meta|m)$/i.test(qt))Nt=!0;else if(/^a(lt)?$/i.test(qt))dt=!0;else if(/^(c|ctrl|control)$/i.test(qt))ht=!0;else if(/^s(hift)?$/i.test(qt))gt=!0;else throw new Error("Unrecognized modifier name: "+qt)}return dt&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Nt&&(it="Cmd-"+it),gt&&(it="Shift-"+it),it}function xf(it){var st={};for(var dt in it)if(it.hasOwnProperty(dt)){var ht=it[dt];if(/^(name|fallthrough|(de|at)tach)$/.test(dt))continue;if(ht=="..."){delete it[dt];continue}for(var gt=ci(dt.split(" "),wf),Nt=0;Nt<gt.length;Nt++){var Kt=void 0,qt=void 0;Nt==gt.length-1?(qt=gt.join(" "),Kt=ht):(qt=gt.slice(0,Nt+1).join(" "),Kt="...");var Yt=st[qt];if(!Yt)st[qt]=Kt;else if(Yt!=Kt)throw new Error("Inconsistent bindings for "+qt)}delete it[dt]}for(var pe in st)it[pe]=st[pe];return it}function zl(it,st,dt,ht){st=ha(st);var gt=st.call?st.call(it,ht):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 zl(it,st.fallthrough,dt,ht);for(var Nt=0;Nt<st.fallthrough.length;Nt++){var Kt=zl(it,st.fallthrough[Nt],dt,ht);if(Kt)return Kt}}}function Jh(it){var st=typeof it=="string"?it:Yu[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Yc(it,st,dt){var ht=it;return st.altKey&&ht!="Alt"&&(it="Alt-"+it),(xt?st.metaKey:st.ctrlKey)&&ht!="Ctrl"&&(it="Ctrl-"+it),(xt?st.ctrlKey:st.metaKey)&&ht!="Mod"&&(it="Cmd-"+it),!dt&&st.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function Sf(it,st){if(Wt&&it.keyCode==34&&it.char)return!1;var dt=Yu[it.keyCode];return dt==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(dt=it.code),Yc(dt,it,st))}function ha(it){return typeof it=="string"?bl[it]:it}function Qa(it,st){for(var dt=it.doc.sel.ranges,ht=[],gt=0;gt<dt.length;gt++){for(var Nt=st(dt[gt]);ht.length&&Kn(Nt.from,Fe(ht).to)<=0;){var Kt=ht.pop();if(Kn(Kt.from,Nt.from)<0){Nt.from=Kt.from;break}}ht.push(Nt)}ls(it,function(){for(var qt=ht.length-1;qt>=0;qt--)xh(it.doc,"",ht[qt].from,ht[qt].to,"+delete");hu(it)})}function Bf(it,st,dt){var ht=xe(it.text,st+dt,dt);return ht<0||ht>it.text.length?null:ht}function oa(it,st,dt){var ht=Bf(it,st.ch,dt);return ht==null?null:new Ye(st.line,ht,dt<0?"after":"before")}function qh(it,st,dt,ht,gt){if(it){st.doc.direction=="rtl"&&(gt=-gt);var Nt=mn(dt,st.doc.direction);if(Nt){var Kt=gt<0?Fe(Nt):Nt[0],qt=gt<0==(Kt.level==1),Yt=qt?"after":"before",pe;if(Kt.level>0||st.doc.direction=="rtl"){var $e=Yo(st,dt);pe=gt<0?dt.text.length-1:0;var ye=Ia(st,$e,pe).top;pe=Xe(function(Pn){return Ia(st,$e,Pn).top==ye},gt<0==(Kt.level==1)?Kt.from:Kt.to-1,pe),Yt=="before"&&(pe=Bf(dt,pe,1))}else pe=gt<0?Kt.to:Kt.from;return new Ye(ht,pe,Yt)}}return new Ye(ht,gt<0?dt.text.length:0,gt<0?"before":"after")}function $h(it,st,dt,ht){var gt=mn(st,it.doc.direction);if(!gt)return oa(st,dt,ht);dt.ch>=st.text.length?(dt.ch=st.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Nt=Oe(gt,dt.ch,dt.sticky),Kt=gt[Nt];if(it.doc.direction=="ltr"&&Kt.level%2==0&&(ht>0?Kt.to>dt.ch:Kt.from<dt.ch))return oa(st,dt,ht);var qt=function(sr,Dr){return Bf(st,sr instanceof Ye?sr.ch:sr,Dr)},Yt,pe=function(sr){return it.options.lineWrapping?(Yt=Yt||Yo(it,st),qs(it,st,Yt,sr)):{begin:0,end:st.text.length}},$e=pe(dt.sticky=="before"?qt(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Kt.level==1){var ye=Kt.level==1==ht<0,Pn=qt(dt,ye?1:-1);if(Pn!=null&&(ye?Pn<=Kt.to&&Pn<=$e.end:Pn>=Kt.from&&Pn>=$e.begin)){var wn=ye?"before":"after";return new Ye(dt.line,Pn,wn)}}var wi=function(sr,Dr,Sr){for(var Kr=function(Os,Ca){return Ca?new Ye(dt.line,qt(Os,1),"before"):new Ye(dt.line,Os,"after")};sr>=0&&sr<gt.length;sr+=Dr){var fo=gt[sr],vr=Dr>0==(fo.level!=1),To=vr?Sr.begin:qt(Sr.end,-1);if(fo.from<=To&&To<fo.to||(To=vr?fo.from:qt(fo.to,-1),Sr.begin<=To&&To<Sr.end))return Kr(To,vr)}},Fi=wi(Nt+ht,ht,$e);if(Fi)return Fi;var _i=ht>0?$e.end:qt($e.begin,-1);return _i!=null&&!(ht>0&&_i==st.text.length)&&(Fi=wi(ht>0?0:gt.length-1,ht,pe(_i)),Fi)?Fi:null}var jA={selectAll:ra,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),sn)},killLine:function(it){return Qa(it,function(st){if(st.empty()){var dt=fi(it.doc,st.head.line).text.length;return st.head.ch==dt&&st.head.line<it.lastLine()?{from:st.head,to:Ye(st.head.line+1,0)}:{from:st.head,to:Ye(st.head.line,dt)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Qa(it,function(st){return{from:Ye(st.from().line,0),to:Vn(it.doc,Ye(st.to().line+1,0))}})},delLineLeft:function(it){return Qa(it,function(st){return{from:Ye(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Qa(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return{from:ht,to:st.from()}})},delWrappedLineRight:function(it){return Qa(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div");return{from:st.from(),to:ht}})},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(Ye(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ye(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return tc(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Cf(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return ec(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")},ri)},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")},ri)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Cf(it,st.head):ht},ri)},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(),ht=it.options.tabSize,gt=0;gt<dt.length;gt++){var Nt=dt[gt].from(),Kt=me(it.getLine(Nt.line),Nt.ch,ht);st.push(ei(ht-Kt%ht))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return ls(it,function(){for(var st=it.listSelections(),dt=[],ht=0;ht<st.length;ht++)if(st[ht].empty()){var gt=st[ht].head,Nt=fi(it.doc,gt.line).text;if(Nt){if(gt.ch==Nt.length&&(gt=new Ye(gt.line,gt.ch-1)),gt.ch>0)gt=new Ye(gt.line,gt.ch+1),it.replaceRange(Nt.charAt(gt.ch-1)+Nt.charAt(gt.ch-2),Ye(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Kt=fi(it.doc,gt.line-1).text;Kt&&(gt=new Ye(gt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Kt.charAt(Kt.length-1),Ye(gt.line-1,Kt.length-1),gt,"+transpose"))}}dt.push(new gs(gt,gt))}it.setSelections(dt)})},newlineAndIndent:function(it){return ls(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 ht=0;ht<st.length;ht++)it.indentLine(st[ht].from().line,null,!0);hu(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function tc(it,st){var dt=fi(it.doc,st),ht=an(dt);return ht!=dt&&(st=te(ht)),qh(!0,it,ht,st,1)}function ec(it,st){var dt=fi(it.doc,st),ht=gn(dt);return ht!=dt&&(st=te(ht)),qh(!0,it,dt,st,-1)}function Cf(it,st){var dt=tc(it,st.line),ht=fi(it.doc,dt.line),gt=mn(ht,it.doc.direction);if(!gt||gt[0].level==0){var Nt=Math.max(dt.ch,ht.text.search(/\S/)),Kt=st.line==dt.line&&st.ch<=Nt&&st.ch;return Ye(dt.line,Kt?0:Nt,dt.sticky)}return dt}function nc(it,st,dt){if(typeof st=="string"&&(st=jA[st],!st))return!1;it.display.input.ensurePolled();var ht=it.display.shift,gt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),dt&&(it.display.shift=!1),gt=st(it)!=ai}finally{it.display.shift=ht,it.state.suppressEdits=!1}return gt}function Pf(it,st,dt){for(var ht=0;ht<it.state.keyMaps.length;ht++){var gt=zl(st,it.state.keyMaps[ht],dt,it);if(gt)return gt}return it.options.extraKeys&&zl(st,it.options.extraKeys,dt,it)||zl(st,it.options.keyMap,dt,it)}var Xu=new oe;function Bh(it,st,dt,ht){var gt=it.state.keySeq;if(gt){if(Jh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:Xu.set(50,function(){it.state.keySeq==gt&&(it.state.keySeq=null,it.display.input.reset())}),Xc(it,gt+" "+st,dt,ht))return!0}return Xc(it,st,dt,ht)}function Xc(it,st,dt,ht){var gt=Pf(it,st,ht);return gt=="multi"&&(it.state.keySeq=st),gt=="handled"&&ar(it,"keyHandled",it,st,dt),(gt=="handled"||gt=="multi")&&(Ki(dt),as(it)),!!gt}function Jc(it,st){var dt=Sf(st,!0);return dt?st.shiftKey&&!it.state.keySeq?Bh(it,"Shift-"+dt,st,function(ht){return nc(it,ht,!0)})||Bh(it,dt,st,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return nc(it,ht)}):Bh(it,dt,st,function(ht){return nc(it,ht)}):!1}function qc(it,st,dt){return Bh(it,"'"+dt+"'",st,function(ht){return nc(it,ht,!0)})}var VA=null;function $c(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=tn(),!bi(st,it))){de&&Ht<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;st.display.shift=dt==16||it.shiftKey;var ht=Jc(st,it);Wt&&(VA=ht?dt:null,!ht&&dt==88&&!Gi&&(At?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),Ct&&!At&&!ht&&dt==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),dt==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Ff(st)}}function Ff(it){var st=it.display.lineDiv;Bn(st,"CodeMirror-crosshair");function dt(ht){(ht.keyCode==18||!ht.altKey)&&(Ot(st,"CodeMirror-crosshair"),oi(document,"keyup",dt),oi(document,"mouseover",dt))}yn(document,"keyup",dt),yn(document,"mouseover",dt)}function Ef(it){it.keyCode==16&&(this.doc.sel.shift=!1),bi(this,it)}function Tu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(es(st.display,it)||bi(st,it)||it.ctrlKey&&!it.altKey||At&&it.metaKey)){var dt=it.keyCode,ht=it.charCode;if(Wt&&dt==VA){VA=null,Ki(it);return}if(!(Wt&&(!it.which||it.which<10)&&Jc(st,it))){var gt=String.fromCharCode(ht==null?dt:ht);gt!="\b"&&(qc(st,it,gt)||st.display.input.onKeyPress(it))}}}var gg=400,ic=function(it,st,dt){this.time=it,this.pos=st,this.button=dt};ic.prototype.compare=function(it,st,dt){return this.time+gg>it&&Kn(st,this.pos)==0&&dt==this.button};var vA,Ch;function Hd(it,st){var dt=+new Date;return Ch&&Ch.compare(dt,it,st)?(vA=Ch=null,"triple"):vA&&vA.compare(dt,it,st)?(Ch=new ic(dt,it,st),vA=null,"double"):(vA=new ic(dt,it,st),Ch=null,"single")}function eu(it){var st=this,dt=st.display;if(!(bi(st,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,es(dt,it)){ie||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!Kd(st,it)){var ht=Ba(st,it),gt=Vr(it),Nt=ht?Hd(ht,gt):"single";window.focus(),gt==1&&st.state.selectingText&&st.state.selectingText(it),!(ht&&Rd(st,gt,ht,Nt,it))&&(gt==1?ht?Lf(st,ht,Nt,it):yr(it)==dt.scroller&&Ki(it):gt==2?(ht&&jh(st.doc,ht),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(bt?st.display.input.onContextMenu(it):Ms(st)))}}}function Rd(it,st,dt,ht,gt){var Nt="Click";return ht=="double"?Nt="Double"+Nt:ht=="triple"&&(Nt="Triple"+Nt),Nt=(st==1?"Left":st==2?"Middle":"Right")+Nt,Bh(it,Yc(Nt,gt),gt,function(Kt){if(typeof Kt=="string"&&(Kt=jA[Kt]),!Kt)return!1;var qt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),qt=Kt(it,dt)!=ai}finally{it.state.suppressEdits=!1}return qt})}function td(it,st,dt){var ht=it.getOption("configureMouse"),gt=ht?ht(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=At?dt.metaKey:dt.ctrlKey),gt.moveOnDrag==null&&(gt.moveOnDrag=!(At?dt.altKey:dt.ctrlKey)),gt}function Lf(it,st,dt,ht){de?setTimeout(Gn(ds,it),0):it.curOp.focus=tn();var gt=td(it,dt,ht),Nt=it.doc.sel,Kt;it.options.dragDrop&&Zi&&!it.isReadOnly()&&dt=="single"&&(Kt=Nt.contains(st))>-1&&(Kn((Kt=Nt.ranges[Kt]).from(),st)<0||st.xRel>0)&&(Kn(Kt.to(),st)>0||st.xRel<0)?Mf(it,ht,st,gt):pg(it,ht,st,gt)}function Mf(it,st,dt,ht){var gt=it.display,Nt=!1,Kt=ma(it,function(pe){ie&&(gt.scroller.draggable=!1),it.state.draggingText=!1,oi(gt.wrapper.ownerDocument,"mouseup",Kt),oi(gt.wrapper.ownerDocument,"mousemove",qt),oi(gt.scroller,"dragstart",Yt),oi(gt.scroller,"drop",Kt),Nt||(Ki(pe),ht.addNew||jh(it.doc,dt,null,null,ht.extend),ie&&!Ie||de&&Ht==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),qt=function(pe){Nt=Nt||Math.abs(st.clientX-pe.clientX)+Math.abs(st.clientY-pe.clientY)>=10},Yt=function(){return Nt=!0};ie&&(gt.scroller.draggable=!0),it.state.draggingText=Kt,Kt.copy=!ht.moveOnDrag,gt.scroller.dragDrop&&gt.scroller.dragDrop(),yn(gt.wrapper.ownerDocument,"mouseup",Kt),yn(gt.wrapper.ownerDocument,"mousemove",qt),yn(gt.scroller,"dragstart",Yt),yn(gt.scroller,"drop",Kt),Ms(it),setTimeout(function(){return gt.input.focus()},20)}function rc(it,st,dt){if(dt=="char")return new gs(st,st);if(dt=="word")return it.findWordAt(st);if(dt=="line")return new gs(Ye(st.line,0),Vn(it.doc,Ye(st.line+1,0)));var ht=dt(it,st);return new gs(ht.from,ht.to)}function pg(it,st,dt,ht){var gt=it.display,Nt=it.doc;Ki(st);var Kt,qt,Yt=Nt.sel,pe=Yt.ranges;if(ht.addNew&&!ht.extend?(qt=Nt.sel.contains(dt),qt>-1?Kt=pe[qt]:Kt=new gs(dt,dt)):(Kt=Nt.sel.primary(),qt=Nt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Kt=new gs(dt,dt)),dt=Ba(it,st,!0,!0),qt=-1;else{var $e=rc(it,dt,ht.unit);ht.extend?Kt=bd(Kt,$e.anchor,$e.head,ht.extend):Kt=$e}ht.addNew?qt==-1?(qt=pe.length,ja(Nt,pl(it,pe.concat([Kt]),qt),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[qt].empty()&&ht.unit=="char"&&!ht.extend?(ja(Nt,pl(it,pe.slice(0,qt).concat(pe.slice(qt+1)),0),{scroll:!1,origin:"*mouse"}),Yt=Nt.sel):_A(Nt,qt,Kt,Rn):(qt=0,ja(Nt,new $l([Kt],0),Rn),Yt=Nt.sel);var ye=dt;function Pn(Sr){if(Kn(ye,Sr)!=0)if(ye=Sr,ht.unit=="rectangle"){for(var Kr=[],fo=it.options.tabSize,vr=me(fi(Nt,dt.line).text,dt.ch,fo),To=me(fi(Nt,Sr.line).text,Sr.ch,fo),Os=Math.min(vr,To),Ca=Math.max(vr,To),js=Math.min(dt.line,Sr.line),vl=Math.min(it.lastLine(),Math.max(dt.line,Sr.line));js<=vl;js++){var Ta=fi(Nt,js).text,ya=Ui(Ta,Os,fo);Os==Ca?Kr.push(new gs(Ye(js,ya),Ye(js,ya))):Ta.length>ya&&Kr.push(new gs(Ye(js,ya),Ye(js,Ui(Ta,Ca,fo))))}Kr.length||Kr.push(new gs(dt,dt)),ja(Nt,pl(it,Yt.ranges.slice(0,qt).concat(Kr),qt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Sr)}else{var al=Kt,Oa=rc(it,Sr,ht.unit),pr=al.anchor,Zo;Kn(Oa.anchor,pr)>0?(Zo=Oa.head,pr=An(al.from(),Oa.anchor)):(Zo=Oa.anchor,pr=on(al.to(),Oa.head));var Hs=Yt.ranges.slice(0);Hs[qt]=bf(it,new gs(Vn(Nt,pr),Zo)),ja(Nt,pl(it,Hs,qt),Rn)}}var wn=gt.wrapper.getBoundingClientRect(),wi=0;function Fi(Sr){var Kr=++wi,fo=Ba(it,Sr,!0,ht.unit=="rectangle");if(fo)if(Kn(fo,ye)!=0){it.curOp.focus=tn(),Pn(fo);var vr=Eo(gt,Nt);(fo.line>=vr.to||fo.line<vr.from)&&setTimeout(ma(it,function(){wi==Kr&&Fi(Sr)}),150)}else{var To=Sr.clientY<wn.top?-20:Sr.clientY>wn.bottom?20:0;To&&setTimeout(ma(it,function(){wi==Kr&&(gt.scroller.scrollTop+=To,Fi(Sr))}),50)}}function _i(Sr){it.state.selectingText=!1,wi=1/0,Sr&&(Ki(Sr),gt.input.focus()),oi(gt.wrapper.ownerDocument,"mousemove",sr),oi(gt.wrapper.ownerDocument,"mouseup",Dr),Nt.history.lastSelOrigin=null}var sr=ma(it,function(Sr){Sr.buttons===0||!Vr(Sr)?_i(Sr):Fi(Sr)}),Dr=ma(it,_i);it.state.selectingText=Dr,yn(gt.wrapper.ownerDocument,"mousemove",sr),yn(gt.wrapper.ownerDocument,"mouseup",Dr)}function bf(it,st){var dt=st.anchor,ht=st.head,gt=fi(it.doc,dt.line);if(Kn(dt,ht)==0&&dt.sticky==ht.sticky)return st;var Nt=mn(gt);if(!Nt)return st;var Kt=Oe(Nt,dt.ch,dt.sticky),qt=Nt[Kt];if(qt.from!=dt.ch&&qt.to!=dt.ch)return st;var Yt=Kt+(qt.from==dt.ch==(qt.level!=1)?0:1);if(Yt==0||Yt==Nt.length)return st;var pe;if(ht.line!=dt.line)pe=(ht.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var $e=Oe(Nt,ht.ch,ht.sticky),ye=$e-Kt||(ht.ch-dt.ch)*(qt.level==1?-1:1);$e==Yt-1||$e==Yt?pe=ye<0:pe=ye>0}var Pn=Nt[Yt+(pe?-1:0)],wn=pe==(Pn.level==1),wi=wn?Pn.from:Pn.to,Fi=wn?"after":"before";return dt.ch==wi&&dt.sticky==Fi?st:new gs(new Ye(dt.line,wi,Fi),ht)}function _d(it,st,dt,ht){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(Pn){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Ki(st);var Kt=it.display,qt=Kt.lineDiv.getBoundingClientRect();if(Nt>qt.bottom||!Ei(it,dt))return Ji(st);Nt-=qt.top-Kt.viewOffset;for(var Yt=0;Yt<it.display.gutterSpecs.length;++Yt){var pe=Kt.gutters.childNodes[Yt];if(pe&&pe.getBoundingClientRect().right>=gt){var $e=ke(it.doc,Nt),ye=it.display.gutterSpecs[Yt];return gi(it,dt,it,$e,ye.className,st),Ji(st)}}}function Kd(it,st){return _d(it,st,"gutterClick",!0)}function ed(it,st){es(it.display,st)||Ph(it,st)||bi(it,st,"contextmenu")||bt||it.display.input.onContextMenu(st)}function Ph(it,st){return Ei(it,"gutterContextMenu")?_d(it,st,"gutterContextMenu",!1):!1}function oc(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),nl(it)}var Nu={toString:function(){return"CodeMirror.Init"}},kf={},nd={};function mg(it){var st=it.optionHandlers;function dt(ht,gt,Nt,Kt){it.defaults[ht]=gt,Nt&&(st[ht]=Kt?function(qt,Yt,pe){pe!=Nu&&Nt(qt,Yt,pe)}:Nt)}it.defineOption=dt,it.Init=Nu,dt("value","",function(ht,gt){return ht.setValue(gt)},!0),dt("mode",null,function(ht,gt){ht.doc.modeOption=gt,ko(ht)},!0),dt("indentUnit",2,ko,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ht){Hc(ht),nl(ht),vs(ht)},!0),dt("lineSeparator",null,function(ht,gt){if(ht.doc.lineSep=gt,!!gt){var Nt=[],Kt=ht.doc.first;ht.doc.iter(function(Yt){for(var pe=0;;){var $e=Yt.text.indexOf(gt,pe);if($e==-1)break;pe=$e+gt.length,Nt.push(Ye(Kt,$e))}Kt++});for(var qt=Nt.length-1;qt>=0;qt--)xh(ht.doc,gt,Nt[qt],Ye(Nt[qt].line,Nt[qt].ch+gt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,gt,Nt){ht.state.specialChars=new RegExp(gt.source+(gt.test(" ")?"":"| "),"g"),Nt!=Nu&&ht.refresh()}),dt("specialCharPlaceholder",xr,function(ht){return ht.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(ht,gt){return ht.getInputField().spellcheck=gt},!0),dt("autocorrect",!1,function(ht,gt){return ht.getInputField().autocorrect=gt},!0),dt("autocapitalize",!1,function(ht,gt){return ht.getInputField().autocapitalize=gt},!0),dt("rtlMoveVisually",!ct),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ht){oc(ht),Kl(ht)},!0),dt("keyMap","default",function(ht,gt,Nt){var Kt=ha(gt),qt=Nt!=Nu&&ha(Nt);qt&&qt.detach&&qt.detach(ht,Kt),Kt.attach&&Kt.attach(ht,qt||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,Tf,!0),dt("gutters",[],function(ht,gt){ht.display.gutterSpecs=Ma(gt,ht.options.lineNumbers),Kl(ht)},!0),dt("fixedGutter",!0,function(ht,gt){ht.display.gutters.style.left=gt?Au(ht.display)+"px":"0",ht.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ht){return na(ht)},!0),dt("scrollbarStyle","native",function(ht){Bu(ht),na(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ht,gt){ht.display.gutterSpecs=Ma(ht.options.gutters,gt),Kl(ht)},!0),dt("firstLineNumber",1,Kl,!0),dt("lineNumberFormatter",function(ht){return ht},Kl,!0),dt("showCursorWhenSelecting",!1,zs,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ht,gt){gt=="nocursor"&&(dA(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(gt)}),dt("screenReaderLabel",null,function(ht,gt){gt=gt===""?null:gt,ht.display.input.screenReaderLabelChanged(gt)}),dt("disableInput",!1,function(ht,gt){gt||ht.display.input.reset()},!0),dt("dragDrop",!0,Gd),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,zs,!0),dt("singleCursorHeightPerLine",!0,zs,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,Hc,!0),dt("addModeClass",!1,Hc,!0),dt("pollInterval",100),dt("undoDepth",200,function(ht,gt){return ht.doc.history.undoDepth=gt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ht){return ht.refresh()},!0),dt("maxHighlightLength",1e4,Hc,!0),dt("moveInputWithCursor",!0,function(ht,gt){gt||ht.display.input.resetPosition()}),dt("tabindex",null,function(ht,gt){return ht.display.input.getField().tabIndex=gt||""}),dt("autofocus",null),dt("direction","ltr",function(ht,gt){return ht.doc.setDirection(gt)},!0),dt("phrases",null)}function Gd(it,st,dt){var ht=dt&&dt!=Nu;if(!st!=!ht){var gt=it.display.dragFunctions,Nt=st?yn:oi;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 Tf(it){it.options.lineWrapping?(Bn(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ot(it.display.wrapper,"CodeMirror-wrap"),Hi(it)),jr(it),vs(it),nl(it),setTimeout(function(){return na(it)},100)}function Xo(it,st){var dt=this;if(!(this instanceof Xo))return new Xo(it,st);this.options=st=st?ti(st):{},ti(kf,st,!1);var ht=st.value;typeof ht=="string"?ht=new ka(ht,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ht.modeOption=st.mode),this.doc=ht;var gt=new Xo.inputStyles[st.inputStyle](this),Nt=this.display=new QA(it,ht,gt,st);Nt.wrapper.CodeMirror=this,oc(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bu(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 oe,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),de&&Ht<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Fh(this),ml(),_l(this),this.curOp.forceUpdate=!0,va(this,ht),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&zo(dt)},20):dA(this);for(var Kt in nd)nd.hasOwnProperty(Kt)&&nd[Kt](this,st[Kt],Nu);Aa(this),st.finishInit&&st.finishInit(this);for(var qt=0;qt<WA.length;++qt)WA[qt](this);du(this),ie&&st.lineWrapping&&getComputedStyle(Nt.lineDiv).textRendering=="optimizelegibility"&&(Nt.lineDiv.style.textRendering="auto")}Xo.defaults=kf,Xo.optionHandlers=nd;function Fh(it){var st=it.display;yn(st.scroller,"mousedown",ma(it,eu)),de&&Ht<11?yn(st.scroller,"dblclick",ma(it,function(Yt){if(!bi(it,Yt)){var pe=Ba(it,Yt);if(!(!pe||Kd(it,Yt)||es(it.display,Yt))){Ki(Yt);var $e=it.findWordAt(pe);jh(it.doc,$e.anchor,$e.head)}}})):yn(st.scroller,"dblclick",function(Yt){return bi(it,Yt)||Ki(Yt)}),yn(st.scroller,"contextmenu",function(Yt){return ed(it,Yt)}),yn(st.input.getField(),"contextmenu",function(Yt){st.scroller.contains(Yt.target)||ed(it,Yt)});var dt,ht={end:0};function gt(){st.activeTouch&&(dt=setTimeout(function(){return st.activeTouch=null},1e3),ht=st.activeTouch,ht.end=+new Date)}function Nt(Yt){if(Yt.touches.length!=1)return!1;var pe=Yt.touches[0];return pe.radiusX<=1&&pe.radiusY<=1}function Kt(Yt,pe){if(pe.left==null)return!0;var $e=pe.left-Yt.left,ye=pe.top-Yt.top;return $e*$e+ye*ye>20*20}yn(st.scroller,"touchstart",function(Yt){if(!bi(it,Yt)&&!Nt(Yt)&&!Kd(it,Yt)){st.input.ensurePolled(),clearTimeout(dt);var pe=+new Date;st.activeTouch={start:pe,moved:!1,prev:pe-ht.end<=300?ht:null},Yt.touches.length==1&&(st.activeTouch.left=Yt.touches[0].pageX,st.activeTouch.top=Yt.touches[0].pageY)}}),yn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),yn(st.scroller,"touchend",function(Yt){var pe=st.activeTouch;if(pe&&!es(st,Yt)&&pe.left!=null&&!pe.moved&&new Date-pe.start<300){var $e=it.coordsChar(st.activeTouch,"page"),ye;!pe.prev||Kt(pe,pe.prev)?ye=new gs($e,$e):!pe.prev.prev||Kt(pe,pe.prev.prev)?ye=it.findWordAt($e):ye=new gs(Ye($e.line,0),Vn(it.doc,Ye($e.line+1,0))),it.setSelection(ye.anchor,ye.head),it.focus(),Ki(Yt)}gt()}),yn(st.scroller,"touchcancel",gt),yn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(xu(it,st.scroller.scrollTop),Su(it,st.scroller.scrollLeft,!0),gi(it,"scroll",it))}),yn(st.scroller,"mousewheel",function(Yt){return ba(it,Yt)}),yn(st.scroller,"DOMMouseScroll",function(Yt){return ba(it,Yt)}),yn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Yt){bi(it,Yt)||Er(Yt)},over:function(Yt){bi(it,Yt)||(cg(it,Yt),Er(Yt))},start:function(Yt){return Qd(it,Yt)},drop:ma(it,Ud),leave:function(Yt){bi(it,Yt)||dg(it)}};var qt=st.input.getField();yn(qt,"keyup",function(Yt){return Ef.call(it,Yt)}),yn(qt,"keydown",ma(it,$c)),yn(qt,"keypress",ma(it,Tu)),yn(qt,"focus",function(Yt){return zo(it,Yt)}),yn(qt,"blur",function(Yt){return dA(it,Yt)})}var WA=[];Xo.defineInitHook=function(it){return WA.push(it)};function ca(it,st,dt,ht){var gt=it.doc,Nt;dt==null&&(dt="add"),dt=="smart"&&(gt.mode.indent?Nt=qr(it,st).state:dt="prev");var Kt=it.options.tabSize,qt=fi(gt,st),Yt=me(qt.text,null,Kt);qt.stateAfter&&(qt.stateAfter=null);var pe=qt.text.match(/^\s*/)[0],$e;if(!ht&&!/\S/.test(qt.text))$e=0,dt="not";else if(dt=="smart"&&($e=gt.mode.indent(Nt,qt.text.slice(pe.length),qt.text),$e==ai||$e>150)){if(!ht)return;dt="prev"}dt=="prev"?st>gt.first?$e=me(fi(gt,st-1).text,null,Kt):$e=0:dt=="add"?$e=Yt+it.options.indentUnit:dt=="subtract"?$e=Yt-it.options.indentUnit:typeof dt=="number"&&($e=Yt+dt),$e=Math.max(0,$e);var ye="",Pn=0;if(it.options.indentWithTabs)for(var wn=Math.floor($e/Kt);wn;--wn)Pn+=Kt,ye+=" ";if(Pn<$e&&(ye+=ei($e-Pn)),ye!=pe)return xh(gt,ye,Ye(st,0),Ye(st,pe.length),"+input"),qt.stateAfter=null,!0;for(var wi=0;wi<gt.sel.ranges.length;wi++){var Fi=gt.sel.ranges[wi];if(Fi.head.line==st&&Fi.head.ch<pe.length){var _i=Ye(st,pe.length);_A(gt,wi,new gs(_i,_i));break}}}var sl=null;function ZA(it){sl=it}function id(it,st,dt,ht,gt){var Nt=it.doc;it.display.shift=!1,ht||(ht=Nt.sel);var Kt=+new Date-200,qt=gt=="paste"||it.state.pasteIncoming>Kt,Yt=uo(st),pe=null;if(qt&&ht.ranges.length>1)if(sl&&sl.text.join(`
`)==st){if(ht.ranges.length%sl.text.length==0){pe=[];for(var $e=0;$e<sl.text.length;$e++)pe.push(Nt.splitLines(sl.text[$e]))}}else Yt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(pe=ci(Yt,function(sr){return[sr]}));for(var ye=it.curOp.updateInput,Pn=ht.ranges.length-1;Pn>=0;Pn--){var wn=ht.ranges[Pn],wi=wn.from(),Fi=wn.to();wn.empty()&&(dt&&dt>0?wi=Ye(wi.line,wi.ch-dt):it.state.overwrite&&!qt?Fi=Ye(Fi.line,Math.min(fi(Nt,Fi.line).text.length,Fi.ch+Fe(Yt).length)):qt&&sl&&sl.lineWise&&sl.text.join(`
`)==Yt.join(`
`)&&(wi=Fi=Ye(wi.line,0)));var _i={from:wi,to:Fi,text:pe?pe[Pn%pe.length]:Yt,origin:gt||(qt?"paste":it.state.cutIncoming>Kt?"cut":"+input")};GA(it.doc,_i),ar(it,"inputRead",it,_i)}st&&!qt&&ac(it,st),hu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ye),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function sc(it,st){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&ls(st,function(){return id(st,dt,0,null,"paste")}),!0}function ac(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ht=dt.ranges.length-1;ht>=0;ht--){var gt=dt.ranges[ht];if(!(gt.head.ch>100||ht&&dt.ranges[ht-1].head.line==gt.head.line)){var Nt=it.getModeAt(gt.head),Kt=!1;if(Nt.electricChars){for(var qt=0;qt<Nt.electricChars.length;qt++)if(st.indexOf(Nt.electricChars.charAt(qt))>-1){Kt=ca(it,gt.head.line,"smart");break}}else Nt.electricInput&&Nt.electricInput.test(fi(it.doc,gt.head.line).text.slice(0,gt.head.ch))&&(Kt=ca(it,gt.head.line,"smart"));Kt&&ar(it,"electricInput",it,gt.head.line)}}}function zd(it){for(var st=[],dt=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var gt=it.doc.sel.ranges[ht].head.line,Nt={anchor:Ye(gt,0),head:Ye(gt+1,0)};dt.push(Nt),st.push(it.getRange(Nt.anchor,Nt.head))}return{text:st,ranges:dt}}function jd(it,st,dt,ht){it.setAttribute("autocorrect",dt?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!st)}function Nf(){var it=$t("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=$t("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ie?it.style.width="1000px":it.setAttribute("wrap","off"),It&&(it.style.border="1px solid black"),jd(it),st}function yA(it){var st=it.optionHandlers,dt=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,gt){var Nt=this.options,Kt=Nt[ht];Nt[ht]==gt&&ht!="mode"||(Nt[ht]=gt,st.hasOwnProperty(ht)&&ma(this,st[ht])(this,gt,Kt),gi(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,gt){this.state.keyMaps[gt?"push":"unshift"](ha(ht))},removeKeyMap:function(ht){for(var gt=this.state.keyMaps,Nt=0;Nt<gt.length;++Nt)if(gt[Nt]==ht||gt[Nt].name==ht)return gt.splice(Nt,1),!0},addOverlay:Ea(function(ht,gt){var Nt=ht.token?ht:it.getMode(this.options,ht);if(Nt.startState)throw new Error("Overlays may not be stateful.");Ti(this.state.overlays,{mode:Nt,modeSpec:ht,opaque:gt&&gt.opaque,priority:gt&&gt.priority||0},function(Kt){return Kt.priority}),this.state.modeGen++,vs(this)}),removeOverlay:Ea(function(ht){for(var gt=this.state.overlays,Nt=0;Nt<gt.length;++Nt){var Kt=gt[Nt].modeSpec;if(Kt==ht||typeof ht=="string"&&Kt.name==ht){gt.splice(Nt,1),this.state.modeGen++,vs(this);return}}}),indentLine:Ea(function(ht,gt,Nt){typeof gt!="string"&&typeof gt!="number"&&(gt==null?gt=this.options.smartIndent?"smart":"prev":gt=gt?"add":"subtract"),zn(this.doc,ht)&&ca(this,ht,gt,Nt)}),indentSelection:Ea(function(ht){for(var gt=this.doc.sel.ranges,Nt=-1,Kt=0;Kt<gt.length;Kt++){var qt=gt[Kt];if(qt.empty())qt.head.line>Nt&&(ca(this,qt.head.line,ht,!0),Nt=qt.head.line,Kt==this.doc.sel.primIndex&&hu(this));else{var Yt=qt.from(),pe=qt.to(),$e=Math.max(Nt,Yt.line);Nt=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var ye=$e;ye<Nt;++ye)ca(this,ye,ht);var Pn=this.doc.sel.ranges;Yt.ch==0&&gt.length==Pn.length&&Pn[Kt].from().ch>0&&_A(this.doc,Kt,new gs(Yt,Pn[Kt].to()),sn)}}}),getTokenAt:function(ht,gt){return mi(this,ht,gt)},getLineTokens:function(ht,gt){return mi(this,Ye(ht),gt,!0)},getTokenTypeAt:function(ht){ht=Vn(this.doc,ht);var gt=dr(this,fi(this.doc,ht.line)),Nt=0,Kt=(gt.length-1)/2,qt=ht.ch,Yt;if(qt==0)Yt=gt[2];else for(;;){var pe=Nt+Kt>>1;if((pe?gt[pe*2-1]:0)>=qt)Kt=pe;else if(gt[pe*2+1]<qt)Nt=pe+1;else{Yt=gt[pe*2+2];break}}var $e=Yt?Yt.indexOf("overlay "):-1;return $e<0?Yt:$e==0?null:Yt.slice(0,$e-1)},getModeAt:function(ht){var gt=this.doc.mode;return gt.innerMode?it.innerMode(gt,this.getTokenAt(ht).state).mode:gt},getHelper:function(ht,gt){return this.getHelpers(ht,gt)[0]},getHelpers:function(ht,gt){var Nt=[];if(!dt.hasOwnProperty(gt))return Nt;var Kt=dt[gt],qt=this.getModeAt(ht);if(typeof qt[gt]=="string")Kt[qt[gt]]&&Nt.push(Kt[qt[gt]]);else if(qt[gt])for(var Yt=0;Yt<qt[gt].length;Yt++){var pe=Kt[qt[gt][Yt]];pe&&Nt.push(pe)}else qt.helperType&&Kt[qt.helperType]?Nt.push(Kt[qt.helperType]):Kt[qt.name]&&Nt.push(Kt[qt.name]);for(var $e=0;$e<Kt._global.length;$e++){var ye=Kt._global[$e];ye.pred(qt,this)&&Cn(Nt,ye.val)==-1&&Nt.push(ye.val)}return Nt},getStateAfter:function(ht,gt){var Nt=this.doc;return ht=Nn(Nt,ht==null?Nt.first+Nt.size-1:ht),qr(this,ht+1,gt).state},cursorCoords:function(ht,gt){var Nt,Kt=this.doc.sel.primary();return ht==null?Nt=Kt.head:typeof ht=="object"?Nt=Vn(this.doc,ht):Nt=ht?Kt.from():Kt.to(),Wo(this,Nt,gt||"page")},charCoords:function(ht,gt){return ga(this,Vn(this.doc,ht),gt||"page")},coordsChar:function(ht,gt){return ht=lu(this,ht,gt||"page"),cs(this,ht.left,ht.top)},lineAtHeight:function(ht,gt){return ht=lu(this,{top:ht,left:0},gt||"page").top,ke(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,gt,Nt){var Kt=!1,qt;if(typeof ht=="number"){var Yt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Yt&&(ht=Yt,Kt=!0),qt=fi(this.doc,ht)}else qt=ht;return Js(this,qt,{top:0,left:0},gt||"page",Nt||Kt).top+(Kt?this.doc.height-Mi(qt):0)},defaultTextHeight:function(){return ta(this.display)},defaultCharWidth:function(){return fl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,gt,Nt,Kt,qt){var Yt=this.display;ht=Wo(this,Vn(this.doc,ht));var pe=ht.bottom,$e=ht.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Yt.sizer.appendChild(gt),Kt=="over")pe=ht.top;else if(Kt=="above"||Kt=="near"){var ye=Math.max(Yt.wrapper.clientHeight,this.doc.height),Pn=Math.max(Yt.sizer.clientWidth,Yt.lineSpace.clientWidth);(Kt=="above"||ht.bottom+gt.offsetHeight>ye)&&ht.top>gt.offsetHeight?pe=ht.top-gt.offsetHeight:ht.bottom+gt.offsetHeight<=ye&&(pe=ht.bottom),$e+gt.offsetWidth>Pn&&($e=Pn-gt.offsetWidth)}gt.style.top=pe+"px",gt.style.left=gt.style.right="",qt=="right"?($e=Yt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):(qt=="left"?$e=0:qt=="middle"&&($e=(Yt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=$e+"px"),Nt&&TA(this,{left:$e,top:pe,right:$e+gt.offsetWidth,bottom:pe+gt.offsetHeight})},triggerOnKeyDown:Ea($c),triggerOnKeyPress:Ea(Tu),triggerOnKeyUp:Ef,triggerOnMouseDown:Ea(eu),execCommand:function(ht){if(jA.hasOwnProperty(ht))return jA[ht].call(null,this)},triggerElectric:Ea(function(ht){ac(this,ht)}),findPosH:function(ht,gt,Nt,Kt){var qt=1;gt<0&&(qt=-1,gt=-gt);for(var Yt=Vn(this.doc,ht),pe=0;pe<gt&&(Yt=lc(this.doc,Yt,qt,Nt,Kt),!Yt.hitSide);++pe);return Yt},moveH:Ea(function(ht,gt){var Nt=this;this.extendSelectionsBy(function(Kt){return Nt.display.shift||Nt.doc.extend||Kt.empty()?lc(Nt.doc,Kt.head,ht,gt,Nt.options.rtlMoveVisually):ht<0?Kt.from():Kt.to()},ri)}),deleteH:Ea(function(ht,gt){var Nt=this.doc.sel,Kt=this.doc;Nt.somethingSelected()?Kt.replaceSelection("",null,"+delete"):Qa(this,function(qt){var Yt=lc(Kt,qt.head,ht,gt,!1);return ht<0?{from:Yt,to:qt.head}:{from:qt.head,to:Yt}})}),findPosV:function(ht,gt,Nt,Kt){var qt=1,Yt=Kt;gt<0&&(qt=-1,gt=-gt);for(var pe=Vn(this.doc,ht),$e=0;$e<gt;++$e){var ye=Wo(this,pe,"div");if(Yt==null?Yt=ye.left:ye.left=Yt,pe=YA(this,ye,qt,Nt),pe.hitSide)break}return pe},moveV:Ea(function(ht,gt){var Nt=this,Kt=this.doc,qt=[],Yt=!this.display.shift&&!Kt.extend&&Kt.sel.somethingSelected();if(Kt.extendSelectionsBy(function($e){if(Yt)return ht<0?$e.from():$e.to();var ye=Wo(Nt,$e.head,"div");$e.goalColumn!=null&&(ye.left=$e.goalColumn),qt.push(ye.left);var Pn=YA(Nt,ye,ht,gt);return gt=="page"&&$e==Kt.sel.primary()&&ch(Nt,ga(Nt,Pn,"div").top-ye.top),Pn},ri),qt.length)for(var pe=0;pe<Kt.sel.ranges.length;pe++)Kt.sel.ranges[pe].goalColumn=qt[pe]}),findWordAt:function(ht){var gt=this.doc,Nt=fi(gt,ht.line).text,Kt=ht.ch,qt=ht.ch;if(Nt){var Yt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||qt==Nt.length)&&Kt?--Kt:++qt;for(var pe=Nt.charAt(Kt),$e=Lt(pe,Yt)?function(ye){return Lt(ye,Yt)}:/\s/.test(pe)?function(ye){return/\s/.test(ye)}:function(ye){return!/\s/.test(ye)&&!Lt(ye)};Kt>0&&$e(Nt.charAt(Kt-1));)--Kt;for(;qt<Nt.length&&$e(Nt.charAt(qt));)++qt}return new gs(Ye(ht.line,Kt),Ye(ht.line,qt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Bn(this.display.cursorDiv,"CodeMirror-overwrite"):Ot(this.display.cursorDiv,"CodeMirror-overwrite"),gi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==tn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ea(function(ht,gt){cu(this,ht,gt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-$o(this)-this.display.barHeight,width:ht.scrollWidth-$o(this)-this.display.barWidth,clientHeight:Go(this),clientWidth:Ls(this)}},scrollIntoView:Ea(function(ht,gt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},gt==null&&(gt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:Ye(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=gt||0,ht.from.line!=null?_o(this,ht):dh(this,ht.from,ht.to,ht.margin)}),setSize:Ea(function(ht,gt){var Nt=this,Kt=function(Yt){return typeof Yt=="number"||/^\d+$/.test(String(Yt))?Yt+"px":Yt};ht!=null&&(this.display.wrapper.style.width=Kt(ht)),gt!=null&&(this.display.wrapper.style.height=Kt(gt)),this.options.lineWrapping&&fa(this);var qt=this.display.viewFrom;this.doc.iter(qt,this.display.viewTo,function(Yt){if(Yt.widgets){for(var pe=0;pe<Yt.widgets.length;pe++)if(Yt.widgets[pe].noHScroll){wo(Nt,qt,"widget");break}}++qt}),this.curOp.forceUpdate=!0,gi(this,"refresh",this)}),operation:function(ht){return ls(this,ht)},startOperation:function(){return _l(this)},endOperation:function(){return du(this)},refresh:Ea(function(){var ht=this.display.cachedTextHeight;vs(this),this.curOp.forceUpdate=!0,nl(this),cu(this,this.doc.scrollLeft,this.doc.scrollTop),IA(this.display),(ht==null||Math.abs(ht-ta(this.display))>.5||this.options.lineWrapping)&&jr(this),gi(this,"refresh",this)}),swapDoc:Ea(function(ht){var gt=this.doc;return gt.cm=null,this.state.selectingText&&this.state.selectingText(),va(this,ht),nl(this),this.display.input.reset(),cu(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,gt),gt}),phrase:function(ht){var gt=this.options.phrases;return gt&&Object.prototype.hasOwnProperty.call(gt,ht)?gt[ht]:ht},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}},Ri(it),it.registerHelper=function(ht,gt,Nt){dt.hasOwnProperty(ht)||(dt[ht]=it[ht]={_global:[]}),dt[ht][gt]=Nt},it.registerGlobalHelper=function(ht,gt,Nt,Kt){it.registerHelper(ht,gt,Kt),dt[ht]._global.push({pred:Nt,val:Kt})}}function lc(it,st,dt,ht,gt){var Nt=st,Kt=dt,qt=fi(it,st.line),Yt=gt&&it.direction=="rtl"?-dt:dt;function pe(){var Dr=st.line+Yt;return Dr<it.first||Dr>=it.first+it.size?!1:(st=new Ye(Dr,st.ch,st.sticky),qt=fi(it,Dr))}function $e(Dr){var Sr;if(ht=="codepoint"){var Kr=qt.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(Kr)?Sr=null:Sr=new Ye(st.line,Math.max(0,Math.min(qt.text.length,st.ch+dt*(Kr>=55296&&Kr<56320?2:1))),-dt)}else gt?Sr=$h(it.cm,qt,st,dt):Sr=oa(qt,st,dt);if(Sr==null)if(!Dr&&pe())st=qh(gt,it.cm,qt,st.line,Yt);else return!1;else st=Sr;return!0}if(ht=="char"||ht=="codepoint")$e();else if(ht=="column")$e(!0);else if(ht=="word"||ht=="group")for(var ye=null,Pn=ht=="group",wn=it.cm&&it.cm.getHelper(st,"wordChars"),wi=!0;!(dt<0&&!$e(!wi));wi=!1){var Fi=qt.text.charAt(st.ch)||`
`,_i=Lt(Fi,wn)?"w":Pn&&Fi==`
`?"n":!Pn||/\s/.test(Fi)?null:"p";if(Pn&&!wi&&!_i&&(_i="s"),ye&&ye!=_i){dt<0&&(dt=1,$e(),st.sticky="after");break}if(_i&&(ye=_i),dt>0&&!$e(!wi))break}var sr=Gc(it,st,Nt,Kt,!0);return _n(Nt,sr)&&(sr.hitSide=!0),sr}function YA(it,st,dt,ht){var gt=it.doc,Nt=st.left,Kt;if(ht=="page"){var qt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Yt=Math.max(qt-.5*ta(it.display),3);Kt=(dt>0?st.bottom:st.top)+dt*Yt}else ht=="line"&&(Kt=dt>0?st.bottom+3:st.top-3);for(var pe;pe=cs(it,Nt,Kt),!!pe.outside;){if(dt<0?Kt<=0:Kt>=gt.height){pe.hitSide=!0;break}Kt+=dt*5}return pe}var Bs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new oe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Bs.prototype.init=function(it){var st=this,dt=this,ht=dt.cm,gt=dt.div=it.lineDiv;jd(gt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Nt(qt){for(var Yt=qt.target;Yt;Yt=Yt.parentNode){if(Yt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Yt.className))break}return!1}yn(gt,"paste",function(qt){!Nt(qt)||bi(ht,qt)||sc(qt,ht)||Ht<=11&&setTimeout(ma(ht,function(){return st.updateFromDOM()}),20)}),yn(gt,"compositionstart",function(qt){st.composing={data:qt.data,done:!1}}),yn(gt,"compositionupdate",function(qt){st.composing||(st.composing={data:qt.data,done:!1})}),yn(gt,"compositionend",function(qt){st.composing&&(qt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),yn(gt,"touchstart",function(){return dt.forceCompositionEnd()}),yn(gt,"input",function(){st.composing||st.readFromDOMSoon()});function Kt(qt){if(!(!Nt(qt)||bi(ht,qt))){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()}),qt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Yt=zd(ht);ZA({lineWise:!0,text:Yt.text}),qt.type=="cut"&&ht.operation(function(){ht.setSelections(Yt.ranges,0,sn),ht.replaceSelection("",null,"cut")})}else return;if(qt.clipboardData){qt.clipboardData.clearData();var pe=sl.text.join(`
`);if(qt.clipboardData.setData("Text",pe),qt.clipboardData.getData("Text")==pe){qt.preventDefault();return}}var $e=Nf(),ye=$e.firstChild;ht.display.lineSpace.insertBefore($e,ht.display.lineSpace.firstChild),ye.value=sl.text.join(`
`);var Pn=document.activeElement;kn(ye),setTimeout(function(){ht.display.lineSpace.removeChild($e),Pn.focus(),Pn==gt&&dt.showPrimarySelection()},50)}}yn(gt,"copy",Kt),yn(gt,"cut",Kt)},Bs.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Bs.prototype.prepareSelection=function(){var it=ju(this.cm,!1);return it.focus=document.activeElement==this.div,it},Bs.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Bs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bs.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,dt=st.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(st.display.viewTo==st.display.viewFrom||ht.line>=st.display.viewTo||gt.line<st.display.viewFrom){it.removeAllRanges();return}var Nt=Ju(st,it.anchorNode,it.anchorOffset),Kt=Ju(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Kt&&!Kt.bad&&Kn(An(Nt,Kt),ht)==0&&Kn(on(Nt,Kt),gt)==0)){var qt=st.display.view,Yt=ht.line>=st.display.viewFrom&&wA(st,ht)||{node:qt[0].measure.map[2],offset:0},pe=gt.line<st.display.viewTo&&wA(st,gt);if(!pe){var $e=qt[qt.length-1].measure,ye=$e.maps?$e.maps[$e.maps.length-1]:$e.map;pe={node:ye[ye.length-1],offset:ye[ye.length-2]-ye[ye.length-3]}}if(!Yt||!pe){it.removeAllRanges();return}var Pn=it.rangeCount&&it.getRangeAt(0),wn;try{wn=fe(Yt.node,Yt.offset,pe.offset,pe.node)}catch(wi){}wn&&(!Ct&&st.state.focused?(it.collapse(Yt.node,Yt.offset),wn.collapsed||(it.removeAllRanges(),it.addRange(wn))):(it.removeAllRanges(),it.addRange(wn)),Pn&&it.anchorNode==null?it.addRange(Pn):Ct&&this.startGracePeriod()),this.rememberSelection()}},Bs.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)},Bs.prototype.showMultipleSelections=function(it){Vt(this.cm.display.cursorDiv,it.cursors),Vt(this.cm.display.selectionDiv,it.selection)},Bs.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Bs.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return rn(this.div,st)},Bs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bs.prototype.blur=function(){this.div.blur()},Bs.prototype.getField=function(){return this.div},Bs.prototype.supportsTouch=function(){return!0},Bs.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():ls(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)},Bs.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Bs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&re&&this.cm.display.gutterSpecs.length&&Vd(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var dt=Ju(st,it.anchorNode,it.anchorOffset),ht=Ju(st,it.focusNode,it.focusOffset);dt&&ht&&ls(st,function(){ja(st.doc,gA(dt,ht),sn),(dt.bad||ht.bad)&&(st.curOp.selectionChanged=!0)})}}},Bs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,dt=it.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=Ye(ht.line-1,fi(it.doc,ht.line-1).length)),gt.ch==fi(it.doc,gt.line).text.length&&gt.line<it.lastLine()&&(gt=Ye(gt.line+1,0)),ht.line<st.viewFrom||gt.line>st.viewTo-1)return!1;var Nt,Kt,qt;ht.line==st.viewFrom||(Nt=il(it,ht.line))==0?(Kt=te(st.view[0].line),qt=st.view[0].node):(Kt=te(st.view[Nt].line),qt=st.view[Nt-1].node.nextSibling);var Yt=il(it,gt.line),pe,$e;if(Yt==st.view.length-1?(pe=st.viewTo-1,$e=st.lineDiv.lastChild):(pe=te(st.view[Yt+1].line)-1,$e=st.view[Yt+1].node.previousSibling),!qt)return!1;for(var ye=it.doc.splitLines(fu(it,qt,$e,Kt,pe)),Pn=$i(it.doc,Ye(Kt,0),Ye(pe,fi(it.doc,pe).text.length));ye.length>1&&Pn.length>1;)if(Fe(ye)==Fe(Pn))ye.pop(),Pn.pop(),pe--;else if(ye[0]==Pn[0])ye.shift(),Pn.shift(),Kt++;else break;for(var wn=0,wi=0,Fi=ye[0],_i=Pn[0],sr=Math.min(Fi.length,_i.length);wn<sr&&Fi.charCodeAt(wn)==_i.charCodeAt(wn);)++wn;for(var Dr=Fe(ye),Sr=Fe(Pn),Kr=Math.min(Dr.length-(ye.length==1?wn:0),Sr.length-(Pn.length==1?wn:0));wi<Kr&&Dr.charCodeAt(Dr.length-wi-1)==Sr.charCodeAt(Sr.length-wi-1);)++wi;if(ye.length==1&&Pn.length==1&&Kt==ht.line)for(;wn&&wn>ht.ch&&Dr.charCodeAt(Dr.length-wi-1)==Sr.charCodeAt(Sr.length-wi-1);)wn--,wi++;ye[ye.length-1]=Dr.slice(0,Dr.length-wi).replace(/^\u200b+/,""),ye[0]=ye[0].slice(wn).replace(/\u200b+$/,"");var fo=Ye(Kt,wn),vr=Ye(pe,Pn.length?Fe(Pn).length-wi:0);if(ye.length>1||ye[0]||Kn(fo,vr))return xh(it.doc,ye,fo,vr,"+input"),!0},Bs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bs.prototype.reset=function(){this.forceCompositionEnd()},Bs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bs.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))},Bs.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&ls(this.cm,function(){return vs(it.cm)})},Bs.prototype.setUneditable=function(it){it.contentEditable="false"},Bs.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||ma(this.cm,id)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Bs.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Bs.prototype.onContextMenu=function(){},Bs.prototype.resetPosition=function(){},Bs.prototype.needsContentAttribute=!0;function wA(it,st){var dt=Sa(it,st.line);if(!dt||dt.hidden)return null;var ht=fi(it.doc,st.line),gt=yo(dt,ht,st.line),Nt=mn(ht,it.doc.direction),Kt="left";if(Nt){var qt=Oe(Nt,st.ch);Kt=qt%2?"right":"left"}var Yt=AA(gt.map,st.ch,Kt);return Yt.offset=Yt.collapse=="right"?Yt.end:Yt.start,Yt}function Vd(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Zs(it,st){return st&&(it.bad=!0),it}function fu(it,st,dt,ht,gt){var Nt="",Kt=!1,qt=it.doc.lineSeparator(),Yt=!1;function pe(wn){return function(wi){return wi.id==wn}}function $e(){Kt&&(Nt+=qt,Yt&&(Nt+=qt),Kt=Yt=!1)}function ye(wn){wn&&($e(),Nt+=wn)}function Pn(wn){if(wn.nodeType==1){var wi=wn.getAttribute("cm-text");if(wi){ye(wi);return}var Fi=wn.getAttribute("cm-marker"),_i;if(Fi){var sr=it.findMarks(Ye(ht,0),Ye(gt+1,0),pe(+Fi));sr.length&&(_i=sr[0].find(0))&&ye($i(it.doc,_i.from,_i.to).join(qt));return}if(wn.getAttribute("contenteditable")=="false")return;var Dr=/^(pre|div|p|li|table|br)$/i.test(wn.nodeName);if(!/^br$/i.test(wn.nodeName)&&wn.textContent.length==0)return;Dr&&$e();for(var Sr=0;Sr<wn.childNodes.length;Sr++)Pn(wn.childNodes[Sr]);/^(pre|p)$/i.test(wn.nodeName)&&(Yt=!0),Dr&&(Kt=!0)}else wn.nodeType==3&&ye(wn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Pn(st),st!=dt;)st=st.nextSibling,Yt=!1;return Nt}function Ju(it,st,dt){var ht;if(st==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[dt],!ht)return Zs(it.clipPos(Ye(it.display.viewTo-1)),!0);st=null,dt=0}else for(ht=st;;ht=ht.parentNode){if(!ht||ht==it.display.lineDiv)return null;if(ht.parentNode&&ht.parentNode==it.display.lineDiv)break}for(var gt=0;gt<it.display.view.length;gt++){var Nt=it.display.view[gt];if(Nt.node==ht)return xA(Nt,st,dt)}}function xA(it,st,dt){var ht=it.text.firstChild,gt=!1;if(!st||!rn(ht,st))return Zs(Ye(te(it.line),0),!0);if(st==ht&&(gt=!0,st=ht.childNodes[dt],dt=0,!st)){var Nt=it.rest?Fe(it.rest):it.line;return Zs(Ye(te(Nt),Nt.text.length),gt)}var Kt=st.nodeType==3?st:null,qt=st;for(!Kt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Kt=st.firstChild,dt&&(dt=Kt.nodeValue.length));qt.parentNode!=ht;)qt=qt.parentNode;var Yt=it.measure,pe=Yt.maps;function $e(_i,sr,Dr){for(var Sr=-1;Sr<(pe?pe.length:0);Sr++)for(var Kr=Sr<0?Yt.map:pe[Sr],fo=0;fo<Kr.length;fo+=3){var vr=Kr[fo+2];if(vr==_i||vr==sr){var To=te(Sr<0?it.line:it.rest[Sr]),Os=Kr[fo]+Dr;return(Dr<0||vr!=_i)&&(Os=Kr[fo+(Dr?1:0)]),Ye(To,Os)}}}var ye=$e(Kt,qt,dt);if(ye)return Zs(ye,gt);for(var Pn=qt.nextSibling,wn=Kt?Kt.nodeValue.length-dt:0;Pn;Pn=Pn.nextSibling){if(ye=$e(Pn,Pn.firstChild,0),ye)return Zs(Ye(ye.line,ye.ch-wn),gt);wn+=Pn.textContent.length}for(var wi=qt.previousSibling,Fi=dt;wi;wi=wi.previousSibling){if(ye=$e(wi,wi.firstChild,-1),ye)return Zs(Ye(ye.line,ye.ch+Fi),gt);Fi+=wi.textContent.length}}var Qs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new oe,this.hasSelection=!1,this.composing=null};Qs.prototype.init=function(it){var st=this,dt=this,ht=this.cm;this.createField(it);var gt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),It&&(gt.style.width="0px"),yn(gt,"input",function(){de&&Ht>=9&&st.hasSelection&&(st.hasSelection=null),dt.poll()}),yn(gt,"paste",function(Kt){bi(ht,Kt)||sc(Kt,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Nt(Kt){if(!bi(ht,Kt)){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var qt=zd(ht);ZA({lineWise:!0,text:qt.text}),Kt.type=="cut"?ht.setSelections(qt.ranges,null,sn):(dt.prevInput="",gt.value=qt.text.join(`
`),kn(gt))}else return;Kt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}yn(gt,"cut",Nt),yn(gt,"copy",Nt),yn(it.scroller,"paste",function(Kt){if(!(es(it,Kt)||bi(ht,Kt))){if(!gt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var qt=new Event("paste");qt.clipboardData=Kt.clipboardData,gt.dispatchEvent(qt)}}),yn(it.lineSpace,"selectstart",function(Kt){es(it,Kt)||Ki(Kt)}),yn(gt,"compositionstart",function(){var Kt=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Kt,range:ht.markText(Kt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),yn(gt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},Qs.prototype.createField=function(it){this.wrapper=Nf(),this.textarea=this.wrapper.firstChild},Qs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,dt=it.doc,ht=ju(it);if(it.options.moveInputWithCursor){var gt=Wo(it,dt.sel.primary().head,"div"),Nt=st.wrapper.getBoundingClientRect(),Kt=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,gt.top+Kt.top-Nt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,gt.left+Kt.left-Nt.left))}return ht},Qs.prototype.showSelection=function(it){var st=this.cm,dt=st.display;Vt(dt.cursorDiv,it.cursors),Vt(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Qs.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&&kn(this.textarea),de&&Ht>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",de&&Ht>=9&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||tn()!=this.textarea))try{this.textarea.focus()}catch(it){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Qs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function dt(){var ht=st.poll();!ht&&!it?(it=!0,st.polling.set(60,dt)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,dt)},Qs.prototype.poll=function(){var it=this,st=this.cm,dt=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!st.state.focused||Tt(dt)&&!ht&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var gt=dt.value;if(gt==ht&&!st.somethingSelected())return!1;if(de&&Ht>=9&&this.hasSelection===gt||At&&/[\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&&!ht&&(ht="\u200B"),Nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Kt=0,qt=Math.min(ht.length,gt.length);Kt<qt&&ht.charCodeAt(Kt)==gt.charCodeAt(Kt);)++Kt;return ls(st,function(){id(st,gt.slice(Kt),ht.length-Kt,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},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){de&&Ht>=9&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(it){var st=this,dt=st.cm,ht=dt.display,gt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Nt=Ba(dt,it),Kt=ht.scroller.scrollTop;if(!Nt||Wt)return;var qt=dt.options.resetSelectionOnContextMenu;qt&&dt.doc.sel.contains(Nt)==-1&&ma(dt,ja)(dt.doc,gA(Nt),sn);var Yt=gt.style.cssText,pe=st.wrapper.style.cssText,$e=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-$e.top-5)+"px; left: "+(it.clientX-$e.left-5)+`px;
z-index: 1000; background: `+(de?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ye;ie&&(ye=window.scrollY),ht.input.focus(),ie&&window.scrollTo(null,ye),ht.input.reset(),dt.somethingSelected()||(gt.value=st.prevInput=" "),st.contextMenuPending=wn,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function Pn(){if(gt.selectionStart!=null){var Fi=dt.somethingSelected(),_i="\u200B"+(Fi?gt.value:"");gt.value="\u21DA",gt.value=_i,st.prevInput=Fi?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=_i.length,ht.selForContextMenu=dt.doc.sel}}function wn(){if(st.contextMenuPending==wn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=pe,gt.style.cssText=Yt,de&&Ht<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Kt),gt.selectionStart!=null)){(!de||de&&Ht<9)&&Pn();var Fi=0,_i=function(){ht.selForContextMenu==dt.doc.sel&&gt.selectionStart==0&&gt.selectionEnd>0&&st.prevInput=="\u200B"?ma(dt,ra)(dt):Fi++<10?ht.detectingSelectAll=setTimeout(_i,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(_i,200)}}if(de&&Ht>=9&&Pn(),bt){Er(it);var wi=function(){oi(window,"mouseup",wi),setTimeout(wn,20)};yn(window,"mouseup",wi)}else setTimeout(wn,50)},Qs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1;function uc(it,st){if(st=st?ti(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=tn();st.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=qt.getValue()}var gt;if(it.form&&(yn(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Nt=it.form;gt=Nt.submit;try{var Kt=Nt.submit=function(){ht(),Nt.submit=gt,Nt.submit(),Nt.submit=Kt}}catch(Yt){}}st.finishInit=function(Yt){Yt.save=ht,Yt.getTextArea=function(){return it},Yt.toTextArea=function(){Yt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Yt.getWrapperElement()),it.style.display="",it.form&&(oi(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var qt=Xo(function(Yt){return it.parentNode.insertBefore(Yt,it.nextSibling)},st);return qt}function jl(it){it.off=oi,it.on=yn,it.wheelEventPixels=Ml,it.Doc=ka,it.splitLines=uo,it.countColumn=me,it.findColumn=Ui,it.isWordChar=vt,it.Pass=ai,it.signal=gi,it.Line=Fr,it.changeEnd=OA,it.scrollbarModel=Wu,it.Pos=Ye,it.cmpPos=Kn,it.modes=Oi,it.mimeModes=zi,it.resolveMode=Tr,it.getMode=je,it.modeExtensions=Je,it.extendMode=Ke,it.copyState=Ci,it.startState=Qi,it.innerMode=Ne,it.commands=jA,it.keyMap=bl,it.keyName=Sf,it.isModifierKey=Jh,it.lookupKey=zl,it.normalizeKeyMap=xf,it.StringStream=Hn,it.SharedTextMarker=ku,it.TextMarker=Re,it.LineWidget=mA,it.e_preventDefault=Ki,it.e_stopPropagation=_r,it.e_stop=Er,it.addClass=Bn,it.contains=rn,it.rmClass=Ot,it.keyNames=Yu}mg(Xo),yA(Xo);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ac in ka.prototype)ka.prototype.hasOwnProperty(Ac)&&Cn(qu,Ac)<0&&(Xo.prototype[Ac]=function(it){return function(){return it.apply(this.doc,arguments)}}(ka.prototype[Ac]));return Ri(ka),Xo.inputStyles={textarea:Qs,contenteditable:Bs},Xo.defineMode=function(it){!Xo.defaults.mode&&it!="null"&&(Xo.defaults.mode=it),or.apply(this,arguments)},Xo.defineMIME=Yr,Xo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Xo.defineMIME("text/plain","null"),Xo.defineExtension=function(it,st){Xo.prototype[it]=st},Xo.defineDocExtension=function(it,st){ka.prototype[it]=st},Xo.fromTextArea=uc,jl(Xo),Xo.version="5.58.2",Xo})},25419:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780),Qt(15525),Qt(98101))})(function(Ct){"use strict";Ct.defineMode("markdown",function(ee,ue){var Se=Ct.getMode(ee,"text/html"),de=Se.name=="null";function Ht(me){if(Ct.findModeByName){var oe=Ct.findModeByName(me);oe&&(me=oe.mime||oe.mimes[0])}var Cn=Ct.getMode(ee,me);return Cn.name=="null"?null:Cn}ue.highlightFormatting===void 0&&(ue.highlightFormatting=!1),ue.maxBlockquoteDepth===void 0&&(ue.maxBlockquoteDepth=0),ue.taskLists===void 0&&(ue.taskLists=!1),ue.strikethrough===void 0&&(ue.strikethrough=!1),ue.emoji===void 0&&(ue.emoji=!1),ue.fencedCodeBlockHighlighting===void 0&&(ue.fencedCodeBlockHighlighting=!0),ue.fencedCodeBlockDefaultMode===void 0&&(ue.fencedCodeBlockDefaultMode="text/plain"),ue.xml===void 0&&(ue.xml=!0),ue.tokenTypeOverrides===void 0&&(ue.tokenTypeOverrides={});var ie={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 Ae in ie)ie.hasOwnProperty(Ae)&&ue.tokenTypeOverrides[Ae]&&(ie[Ae]=ue.tokenTypeOverrides[Ae]);var re=/^([*\-_])(?:\s*\1){2,}\s*$/,Wt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ie=/^\[(x| )\](?=\s)/i,Xt=ue.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ee=/^ {0,3}(?:\={1,}|-{2,})\s*$/,It=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,At=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,at=" ";function ct(me,oe,Cn){return oe.f=oe.inline=Cn,Cn(me,oe)}function pt(me,oe,Cn){return oe.f=oe.block=Cn,Cn(me,oe)}function xt(me){return!me||!/\S/.test(me.string)}function bt(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==Ot){var oe=de;if(!oe){var Cn=Ct.innerMode(Se,me.htmlState);oe=Cn.mode.name=="xml"&&Cn.state.tagStart===null&&!Cn.state.context&&Cn.state.tokenize.isInText}oe&&(me.f=Ce,me.block=Rt,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function Rt(me,oe){var Cn=me.column()===oe.indentation,li=xt(oe.prevLine.stream),ai=oe.indentedCode,sn=oe.prevLine.hr,Rn=oe.list!==!1,ri=(oe.listStack[oe.listStack.length-1]||0)+3;oe.indentedCode=!1;var Ui=oe.indentation;if(oe.indentationDiff===null&&(oe.indentationDiff=oe.indentation,Rn)){for(oe.list=null;Ui<oe.listStack[oe.listStack.length-1];)oe.listStack.pop(),oe.listStack.length?oe.indentation=oe.listStack[oe.listStack.length-1]:oe.list=!1;oe.list!==!1&&(oe.indentationDiff=Ui-oe.listStack[oe.listStack.length-1])}var en=!li&&!sn&&!oe.prevLine.header&&(!Rn||!ai)&&!oe.prevLine.fencedCodeEnd,ei=(oe.list===!1||sn||li)&&oe.indentation<=ri&&me.match(re),Fe=null;if(oe.indentationDiff>=4&&(ai||oe.prevLine.fencedCodeEnd||oe.prevLine.header||li))return me.skipToEnd(),oe.indentedCode=!0,ie.code;if(me.eatSpace())return null;if(Cn&&oe.indentation<=ri&&(Fe=me.match(Xt))&&Fe[1].length<=6)return oe.quote=0,oe.header=Fe[1].length,oe.thisLine.header=!0,ue.highlightFormatting&&(oe.formatting="header"),oe.f=oe.inline,Vt(oe);if(oe.indentation<=ri&&me.eat(">"))return oe.quote=Cn?1:oe.quote+1,ue.highlightFormatting&&(oe.formatting="quote"),me.eatSpace(),Vt(oe);if(!ei&&!oe.setext&&Cn&&oe.indentation<=ri&&(Fe=me.match(Wt))){var ci=Fe[1]?"ol":"ul";return oe.indentation=Ui+me.current().length,oe.list=!0,oe.quote=0,oe.listStack.push(oe.indentation),oe.em=!1,oe.strong=!1,oe.code=!1,oe.strikethrough=!1,ue.taskLists&&me.match(Ie,!1)&&(oe.taskList=!0),oe.f=oe.inline,ue.highlightFormatting&&(oe.formatting=["list","list-"+ci]),Vt(oe)}else{if(Cn&&oe.indentation<=ri&&(Fe=me.match(nt,!0)))return oe.quote=0,oe.fencedEndRE=new RegExp(Fe[1]+"+ *$"),oe.localMode=ue.fencedCodeBlockHighlighting&&Ht(Fe[2]||ue.fencedCodeBlockDefaultMode),oe.localMode&&(oe.localState=Ct.startState(oe.localMode)),oe.f=oe.block=Zt,ue.highlightFormatting&&(oe.formatting="code-block"),oe.code=-1,Vt(oe);if(oe.setext||(!en||!Rn)&&!oe.quote&&oe.list===!1&&!oe.code&&!ei&&!et.test(me.string)&&(Fe=me.lookAhead(1))&&(Fe=Fe.match(Ee)))return oe.setext?(oe.header=oe.setext,oe.setext=0,me.skipToEnd(),ue.highlightFormatting&&(oe.formatting="header")):(oe.header=Fe[0].charAt(0)=="="?1:2,oe.setext=oe.header),oe.thisLine.header=!0,oe.f=oe.inline,Vt(oe);if(ei)return me.skipToEnd(),oe.hr=!0,oe.thisLine.hr=!0,ie.hr;if(me.peek()==="[")return ct(me,oe,Fn)}return ct(me,oe,oe.inline)}function Ot(me,oe){var Cn=Se.token(me,oe.htmlState);if(!de){var li=Ct.innerMode(Se,oe.htmlState);(li.mode.name=="xml"&&li.state.tagStart===null&&!li.state.context&&li.state.tokenize.isInText||oe.md_inside&&me.current().indexOf(">")>-1)&&(oe.f=Ce,oe.block=Rt,oe.htmlState=null)}return Cn}function Zt(me,oe){var Cn=oe.listStack[oe.listStack.length-1]||0,li=oe.indentation<Cn,ai=Cn+3;if(oe.fencedEndRE&&oe.indentation<=ai&&(li||me.match(oe.fencedEndRE))){ue.highlightFormatting&&(oe.formatting="code-block");var sn;return li||(sn=Vt(oe)),oe.localMode=oe.localState=null,oe.block=Rt,oe.f=Ce,oe.fencedEndRE=null,oe.code=0,oe.thisLine.fencedCodeEnd=!0,li?pt(me,oe,oe.block):sn}else return oe.localMode?oe.localMode.token(me,oe.localState):(me.skipToEnd(),ie.code)}function Vt(me){var oe=[];if(me.formatting){oe.push(ie.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var Cn=0;Cn<me.formatting.length;Cn++)oe.push(ie.formatting+"-"+me.formatting[Cn]),me.formatting[Cn]==="header"&&oe.push(ie.formatting+"-"+me.formatting[Cn]+"-"+me.header),me.formatting[Cn]==="quote"&&(!ue.maxBlockquoteDepth||ue.maxBlockquoteDepth>=me.quote?oe.push(ie.formatting+"-"+me.formatting[Cn]+"-"+me.quote):oe.push("error"))}if(me.taskOpen)return oe.push("meta"),oe.length?oe.join(" "):null;if(me.taskClosed)return oe.push("property"),oe.length?oe.join(" "):null;if(me.linkHref?oe.push(ie.linkHref,"url"):(me.strong&&oe.push(ie.strong),me.em&&oe.push(ie.em),me.strikethrough&&oe.push(ie.strikethrough),me.emoji&&oe.push(ie.emoji),me.linkText&&oe.push(ie.linkText),me.code&&oe.push(ie.code),me.image&&oe.push(ie.image),me.imageAltText&&oe.push(ie.imageAltText,"link"),me.imageMarker&&oe.push(ie.imageMarker)),me.header&&oe.push(ie.header,ie.header+"-"+me.header),me.quote&&(oe.push(ie.quote),!ue.maxBlockquoteDepth||ue.maxBlockquoteDepth>=me.quote?oe.push(ie.quote+"-"+me.quote):oe.push(ie.quote+"-"+ue.maxBlockquoteDepth)),me.list!==!1){var li=(me.listStack.length-1)%3;li?li===1?oe.push(ie.list2):oe.push(ie.list3):oe.push(ie.list1)}return me.trailingSpaceNewLine?oe.push("trailing-space-new-line"):me.trailingSpace&&oe.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),oe.length?oe.join(" "):null}function $t(me,oe){if(me.match(It,!0))return Vt(oe)}function Ce(me,oe){var Cn=oe.text(me,oe);if(typeof Cn!="undefined")return Cn;if(oe.list)return oe.list=null,Vt(oe);if(oe.taskList){var li=me.match(Ie,!0)[1]===" ";return li?oe.taskOpen=!0:oe.taskClosed=!0,ue.highlightFormatting&&(oe.formatting="task"),oe.taskList=!1,Vt(oe)}if(oe.taskOpen=!1,oe.taskClosed=!1,oe.header&&me.match(/^#+$/,!0))return ue.highlightFormatting&&(oe.formatting="header"),Vt(oe);var ai=me.next();if(oe.linkTitle){oe.linkTitle=!1;var sn=ai;ai==="("&&(sn=")"),sn=(sn+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Rn="^\\s*(?:[^"+sn+"\\\\]+|\\\\\\\\|\\\\.)"+sn;if(me.match(new RegExp(Rn),!0))return ie.linkHref}if(ai==="`"){var ri=oe.formatting;ue.highlightFormatting&&(oe.formatting="code"),me.eatWhile("`");var Ui=me.current().length;if(oe.code==0&&(!oe.quote||Ui==1))return oe.code=Ui,Vt(oe);if(Ui==oe.code){var en=Vt(oe);return oe.code=0,en}else return oe.formatting=ri,Vt(oe)}else if(oe.code)return Vt(oe);if(ai==="\\"&&(me.next(),ue.highlightFormatting)){var ei=Vt(oe),Fe=ie.formatting+"-escape";return ei?ei+" "+Fe:Fe}if(ai==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return oe.imageMarker=!0,oe.image=!0,ue.highlightFormatting&&(oe.formatting="image"),Vt(oe);if(ai==="["&&oe.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return oe.imageMarker=!1,oe.imageAltText=!0,ue.highlightFormatting&&(oe.formatting="image"),Vt(oe);if(ai==="]"&&oe.imageAltText){ue.highlightFormatting&&(oe.formatting="image");var ei=Vt(oe);return oe.imageAltText=!1,oe.image=!1,oe.inline=oe.f=rn,ei}if(ai==="["&&!oe.image)return oe.linkText&&me.match(/^.*?\]/)||(oe.linkText=!0,ue.highlightFormatting&&(oe.formatting="link")),Vt(oe);if(ai==="]"&&oe.linkText){ue.highlightFormatting&&(oe.formatting="link");var ei=Vt(oe);return oe.linkText=!1,oe.inline=oe.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?rn:Ce,ei}if(ai==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){oe.f=oe.inline=fe,ue.highlightFormatting&&(oe.formatting="link");var ei=Vt(oe);return ei?ei+=" ":ei="",ei+ie.linkInline}if(ai==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){oe.f=oe.inline=fe,ue.highlightFormatting&&(oe.formatting="link");var ei=Vt(oe);return ei?ei+=" ":ei="",ei+ie.linkEmail}if(ue.xml&&ai==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ci=me.string.indexOf(">",me.pos);if(ci!=-1){var Ti=me.string.substring(me.start,ci);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ti)&&(oe.md_inside=!0)}return me.backUp(1),oe.htmlState=Ct.startState(Se),pt(me,oe,Ot)}if(ue.xml&&ai==="<"&&me.match(/^\/\w*?>/))return oe.md_inside=!1,"tag";if(ai==="*"||ai==="_"){for(var jt=1,Mt=me.pos==1?" ":me.string.charAt(me.pos-2);jt<3&&me.eat(ai);)jt++;var mt=me.peek()||" ",vt=!/\s/.test(mt)&&(!At.test(mt)||/\s/.test(Mt)||At.test(Mt)),Lt=!/\s/.test(Mt)&&(!At.test(Mt)||/\s/.test(mt)||At.test(mt)),Bt=null,_t=null;if(jt%2&&(!oe.em&&vt&&(ai==="*"||!Lt||At.test(Mt))?Bt=!0:oe.em==ai&&Lt&&(ai==="*"||!vt||At.test(mt))&&(Bt=!1)),jt>1&&(!oe.strong&&vt&&(ai==="*"||!Lt||At.test(Mt))?_t=!0:oe.strong==ai&&Lt&&(ai==="*"||!vt||At.test(mt))&&(_t=!1)),_t!=null||Bt!=null){ue.highlightFormatting&&(oe.formatting=Bt==null?"strong":_t==null?"em":"strong em"),Bt===!0&&(oe.em=ai),_t===!0&&(oe.strong=ai);var en=Vt(oe);return Bt===!1&&(oe.em=!1),_t===!1&&(oe.strong=!1),en}}else if(ai===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return Vt(oe);me.backUp(1)}if(ue.strikethrough){if(ai==="~"&&me.eatWhile(ai)){if(oe.strikethrough){ue.highlightFormatting&&(oe.formatting="strikethrough");var en=Vt(oe);return oe.strikethrough=!1,en}else if(me.match(/^[^\s]/,!1))return oe.strikethrough=!0,ue.highlightFormatting&&(oe.formatting="strikethrough"),Vt(oe)}else if(ai===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return Vt(oe);me.backUp(2)}}if(ue.emoji&&ai===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){oe.emoji=!0,ue.highlightFormatting&&(oe.formatting="emoji");var Le=Vt(oe);return oe.emoji=!1,Le}return ai===" "&&(me.match(/^ +$/,!1)?oe.trailingSpace++:oe.trailingSpace&&(oe.trailingSpaceNewLine=!0)),Vt(oe)}function fe(me,oe){var Cn=me.next();if(Cn===">"){oe.f=oe.inline=Ce,ue.highlightFormatting&&(oe.formatting="link");var li=Vt(oe);return li?li+=" ":li="",li+ie.linkInline}return me.match(/^[^>]+/,!0),ie.linkInline}function rn(me,oe){if(me.eatSpace())return null;var Cn=me.next();return Cn==="("||Cn==="["?(oe.f=oe.inline=Bn(Cn==="("?")":"]"),ue.highlightFormatting&&(oe.formatting="link-string"),oe.linkHref=!0,Vt(oe)):"error"}var tn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Bn(me){return function(oe,Cn){var li=oe.next();if(li===me){Cn.f=Cn.inline=Ce,ue.highlightFormatting&&(Cn.formatting="link-string");var ai=Vt(Cn);return Cn.linkHref=!1,ai}return oe.match(tn[me]),Cn.linkHref=!0,Vt(Cn)}}function Fn(me,oe){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(oe.f=kn,me.next(),ue.highlightFormatting&&(oe.formatting="link"),oe.linkText=!0,Vt(oe)):ct(me,oe,Ce)}function kn(me,oe){if(me.match(/^\]:/,!0)){oe.f=oe.inline=Gn,ue.highlightFormatting&&(oe.formatting="link");var Cn=Vt(oe);return oe.linkText=!1,Cn}return me.match(/^([^\]\\]|\\.)+/,!0),ie.linkText}function Gn(me,oe){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?oe.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),oe.f=oe.inline=Ce,ie.linkHref+" url")}var ti={startState:function(){return{f:Rt,prevLine:{stream:null},thisLine:{stream:null},block:Rt,htmlState:null,indentation:0,inline:Ce,text:$t,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(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&Ct.copyState(Se,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?Ct.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,oe){if(oe.formatting=!1,me!=oe.thisLine.stream){if(oe.header=0,oe.hr=!1,me.match(/^\s*$/,!0))return bt(oe),null;if(oe.prevLine=oe.thisLine,oe.thisLine={stream:me},oe.taskList=!1,oe.trailingSpace=0,oe.trailingSpaceNewLine=!1,!oe.localState&&(oe.f=oe.block,oe.f!=Ot)){var Cn=me.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(oe.indentation=Cn,oe.indentationDiff=null,Cn>0)return null}}return oe.f(me,oe)},innerMode:function(me){return me.block==Ot?{state:me.htmlState,mode:Se}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:ti}},indent:function(me,oe,Cn){return me.block==Ot&&Se.indent?Se.indent(me.htmlState,oe,Cn):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,oe,Cn):Ct.Pass},blankLine:bt,getType:Vt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ti},"xml"),Ct.defineMIME("text/markdown","markdown"),Ct.defineMIME("text/x-markdown","markdown")})},98101:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){"use strict";Ct.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 ee=0;ee<Ct.modeInfo.length;ee++){var ue=Ct.modeInfo[ee];ue.mimes&&(ue.mime=ue.mimes[0])}Ct.findModeByMIME=function(Se){Se=Se.toLowerCase();for(var de=0;de<Ct.modeInfo.length;de++){var Ht=Ct.modeInfo[de];if(Ht.mime==Se)return Ht;if(Ht.mimes){for(var ie=0;ie<Ht.mimes.length;ie++)if(Ht.mimes[ie]==Se)return Ht}}if(/\+xml$/.test(Se))return Ct.findModeByMIME("application/xml");if(/\+json$/.test(Se))return Ct.findModeByMIME("application/json")},Ct.findModeByExtension=function(Se){Se=Se.toLowerCase();for(var de=0;de<Ct.modeInfo.length;de++){var Ht=Ct.modeInfo[de];if(Ht.ext){for(var ie=0;ie<Ht.ext.length;ie++)if(Ht.ext[ie]==Se)return Ht}}},Ct.findModeByFileName=function(Se){for(var de=0;de<Ct.modeInfo.length;de++){var Ht=Ct.modeInfo[de];if(Ht.file&&Ht.file.test(Se))return Ht}var ie=Se.lastIndexOf("."),Ae=ie>-1&&Se.substring(ie+1,Se.length);if(Ae)return Ct.findModeByExtension(Ae)},Ct.findModeByName=function(Se){Se=Se.toLowerCase();for(var de=0;de<Ct.modeInfo.length;de++){var Ht=Ct.modeInfo[de];if(Ht.name.toLowerCase()==Se)return Ht;if(Ht.alias){for(var ie=0;ie<Ht.alias.length;ie++)if(Ht.alias[ie].toLowerCase()==Se)return Ht}}}})},67549:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){"use strict";Ct.defineMode("stex",function(ee,ue){"use strict";function Se(It,nt){It.cmdState.push(nt)}function de(It){return It.cmdState.length>0?It.cmdState[It.cmdState.length-1]:null}function Ht(It){var nt=It.cmdState.pop();nt&&nt.closeBracket()}function ie(It){for(var nt=It.cmdState,et=nt.length-1;et>=0;et--){var At=nt[et];if(At.name!="DEFAULT")return At}return{styleIdentifier:function(){return null}}}function Ae(It,nt,et){return function(){this.name=It,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 re={};re.importmodule=Ae("importmodule","tag",["string","builtin"]),re.documentclass=Ae("documentclass","tag",["","atom"]),re.usepackage=Ae("usepackage","tag",["atom"]),re.begin=Ae("begin","tag",["atom"]),re.end=Ae("end","tag",["atom"]),re.label=Ae("label","tag",["atom"]),re.ref=Ae("ref","tag",["atom"]),re.eqref=Ae("eqref","tag",["atom"]),re.cite=Ae("cite","tag",["atom"]),re.bibitem=Ae("bibitem","tag",["atom"]),re.Bibitem=Ae("Bibitem","tag",["atom"]),re.RBibitem=Ae("RBibitem","tag",["atom"]),re.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Wt(It,nt){It.f=nt}function Ie(It,nt){var et;if(It.match(/^\\[a-zA-Z@]+/)){var At=It.current().slice(1);return et=re.hasOwnProperty(At)?re[At]:re.DEFAULT,et=new et,Se(nt,et),Wt(nt,Ee),et.style}if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/\\]/))return"tag";if(It.match("\\["))return Wt(nt,function(ct,pt){return Xt(ct,pt,"\\]")}),"keyword";if(It.match("\\("))return Wt(nt,function(ct,pt){return Xt(ct,pt,"\\)")}),"keyword";if(It.match("$$"))return Wt(nt,function(ct,pt){return Xt(ct,pt,"$$")}),"keyword";if(It.match("$"))return Wt(nt,function(ct,pt){return Xt(ct,pt,"$")}),"keyword";var at=It.next();if(at=="%")return It.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=de(nt),et)et.closeBracket(at),Wt(nt,Ee);else return"error";return"bracket"}else return at=="{"||at=="["?(et=re.DEFAULT,et=new et,Se(nt,et),"bracket"):/\d/.test(at)?(It.eatWhile(/[\w.%]/),"atom"):(It.eatWhile(/[\w\-_]/),et=ie(nt),et.name=="begin"&&(et.argument=It.current()),et.styleIdentifier())}function Xt(It,nt,et){if(It.eatSpace())return null;if(et&&It.match(et))return Wt(nt,Ie),"keyword";if(It.match(/^\\[a-zA-Z@]+/))return"tag";if(It.match(/^[a-zA-Z]+/))return"variable-2";if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/]/)||It.match(/^[\^_&]/))return"tag";if(It.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(It.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var At=It.next();return At=="{"||At=="}"||At=="["||At=="]"||At=="("||At==")"?"bracket":At=="%"?(It.skipToEnd(),"comment"):"error"}function Ee(It,nt){var et=It.peek(),At;return et=="{"||et=="["?(At=de(nt),At.openBracket(et),It.eat(et),Wt(nt,Ie),"bracket"):/[ \t\r]/.test(et)?(It.eat(et),null):(Wt(nt,Ie),Ht(nt),Ie(It,nt))}return{startState:function(){var It=ue.inMathMode?function(nt,et){return Xt(nt,et)}:Ie;return{cmdState:[],f:It}},copyState:function(It){return{cmdState:It.cmdState.slice(),f:It.f}},token:function(It,nt){return nt.f(It,nt)},blankLine:function(It){It.f=Ie,It.cmdState.length=0},lineComment:"%"}}),Ct.defineMIME("text/x-stex","stex"),Ct.defineMIME("text/x-latex","stex")})},15525:function(xn,ze,Qt){(function(Ct){Ct(Qt(89780))})(function(Ct){"use strict";var ee={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},ue={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Ct.defineMode("xml",function(Se,de){var Ht=Se.indentUnit,ie={},Ae=de.htmlMode?ee:ue;for(var re in Ae)ie[re]=Ae[re];for(var re in de)ie[re]=de[re];var Wt,Ie;function Xt(fe,rn){function tn(kn){return rn.tokenize=kn,kn(fe,rn)}var Bn=fe.next();if(Bn=="<")return fe.eat("!")?fe.eat("[")?fe.match("CDATA[")?tn(nt("atom","]]>")):null:fe.match("--")?tn(nt("comment","-->")):fe.match("DOCTYPE",!0,!0)?(fe.eatWhile(/[\w\._\-]/),tn(et(1))):null:fe.eat("?")?(fe.eatWhile(/[\w\._\-]/),rn.tokenize=nt("meta","?>"),"meta"):(Wt=fe.eat("/")?"closeTag":"openTag",rn.tokenize=Ee,"tag bracket");if(Bn=="&"){var Fn;return fe.eat("#")?fe.eat("x")?Fn=fe.eatWhile(/[a-fA-F\d]/)&&fe.eat(";"):Fn=fe.eatWhile(/[\d]/)&&fe.eat(";"):Fn=fe.eatWhile(/[\w\.\-:]/)&&fe.eat(";"),Fn?"atom":"error"}else return fe.eatWhile(/[^&<]/),null}Xt.isInText=!0;function Ee(fe,rn){var tn=fe.next();if(tn==">"||tn=="/"&&fe.eat(">"))return rn.tokenize=Xt,Wt=tn==">"?"endTag":"selfcloseTag","tag bracket";if(tn=="=")return Wt="equals",null;if(tn=="<"){rn.tokenize=Xt,rn.state=pt,rn.tagName=rn.tagStart=null;var Bn=rn.tokenize(fe,rn);return Bn?Bn+" tag error":"tag error"}else return/[\'\"]/.test(tn)?(rn.tokenize=It(tn),rn.stringStartCol=fe.column(),rn.tokenize(fe,rn)):(fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function It(fe){var rn=function(tn,Bn){for(;!tn.eol();)if(tn.next()==fe){Bn.tokenize=Ee;break}return"string"};return rn.isInAttribute=!0,rn}function nt(fe,rn){return function(tn,Bn){for(;!tn.eol();){if(tn.match(rn)){Bn.tokenize=Xt;break}tn.next()}return fe}}function et(fe){return function(rn,tn){for(var Bn;(Bn=rn.next())!=null;){if(Bn=="<")return tn.tokenize=et(fe+1),tn.tokenize(rn,tn);if(Bn==">")if(fe==1){tn.tokenize=Xt;break}else return tn.tokenize=et(fe-1),tn.tokenize(rn,tn)}return"meta"}}function At(fe,rn,tn){this.prev=fe.context,this.tagName=rn,this.indent=fe.indented,this.startOfLine=tn,(ie.doNotIndent.hasOwnProperty(rn)||fe.context&&fe.context.noIndent)&&(this.noIndent=!0)}function at(fe){fe.context&&(fe.context=fe.context.prev)}function ct(fe,rn){for(var tn;;){if(!fe.context||(tn=fe.context.tagName,!ie.contextGrabbers.hasOwnProperty(tn)||!ie.contextGrabbers[tn].hasOwnProperty(rn)))return;at(fe)}}function pt(fe,rn,tn){return fe=="openTag"?(tn.tagStart=rn.column(),xt):fe=="closeTag"?bt:pt}function xt(fe,rn,tn){return fe=="word"?(tn.tagName=rn.current(),Ie="tag",Zt):ie.allowMissingTagName&&fe=="endTag"?(Ie="tag bracket",Zt(fe,rn,tn)):(Ie="error",xt)}function bt(fe,rn,tn){if(fe=="word"){var Bn=rn.current();return tn.context&&tn.context.tagName!=Bn&&ie.implicitlyClosed.hasOwnProperty(tn.context.tagName)&&at(tn),tn.context&&tn.context.tagName==Bn||ie.matchClosing===!1?(Ie="tag",Rt):(Ie="tag error",Ot)}else return ie.allowMissingTagName&&fe=="endTag"?(Ie="tag bracket",Rt(fe,rn,tn)):(Ie="error",Ot)}function Rt(fe,rn,tn){return fe!="endTag"?(Ie="error",Rt):(at(tn),pt)}function Ot(fe,rn,tn){return Ie="error",Rt(fe,rn,tn)}function Zt(fe,rn,tn){if(fe=="word")return Ie="attribute",Vt;if(fe=="endTag"||fe=="selfcloseTag"){var Bn=tn.tagName,Fn=tn.tagStart;return tn.tagName=tn.tagStart=null,fe=="selfcloseTag"||ie.autoSelfClosers.hasOwnProperty(Bn)?ct(tn,Bn):(ct(tn,Bn),tn.context=new At(tn,Bn,Fn==tn.indented)),pt}return Ie="error",Zt}function Vt(fe,rn,tn){return fe=="equals"?$t:(ie.allowMissing||(Ie="error"),Zt(fe,rn,tn))}function $t(fe,rn,tn){return fe=="string"?Ce:fe=="word"&&ie.allowUnquoted?(Ie="string",Zt):(Ie="error",Zt(fe,rn,tn))}function Ce(fe,rn,tn){return fe=="string"?Ce:Zt(fe,rn,tn)}return{startState:function(fe){var rn={tokenize:Xt,state:pt,indented:fe||0,tagName:null,tagStart:null,context:null};return fe!=null&&(rn.baseIndent=fe),rn},token:function(fe,rn){if(!rn.tagName&&fe.sol()&&(rn.indented=fe.indentation()),fe.eatSpace())return null;Wt=null;var tn=rn.tokenize(fe,rn);return(tn||Wt)&&tn!="comment"&&(Ie=null,rn.state=rn.state(Wt||tn,fe,rn),Ie&&(tn=Ie=="error"?tn+" error":Ie)),tn},indent:function(fe,rn,tn){var Bn=fe.context;if(fe.tokenize.isInAttribute)return fe.tagStart==fe.indented?fe.stringStartCol+1:fe.indented+Ht;if(Bn&&Bn.noIndent)return Ct.Pass;if(fe.tokenize!=Ee&&fe.tokenize!=Xt)return tn?tn.match(/^(\s*)/)[0].length:0;if(fe.tagName)return ie.multilineTagIndentPastTag!==!1?fe.tagStart+fe.tagName.length+2:fe.tagStart+Ht*(ie.multilineTagIndentFactor||1);if(ie.alignCDATA&&/<!\[CDATA\[/.test(rn))return 0;var Fn=rn&&/^<(\/)?([\w_:\.-]*)/.exec(rn);if(Fn&&Fn[1])for(;Bn;)if(Bn.tagName==Fn[2]){Bn=Bn.prev;break}else if(ie.implicitlyClosed.hasOwnProperty(Bn.tagName))Bn=Bn.prev;else break;else if(Fn)for(;Bn;){var kn=ie.contextGrabbers[Bn.tagName];if(kn&&kn.hasOwnProperty(Fn[2]))Bn=Bn.prev;else break}for(;Bn&&Bn.prev&&!Bn.startOfLine;)Bn=Bn.prev;return Bn?Bn.indent+Ht:fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ie.htmlMode?"html":"xml",helperType:ie.htmlMode?"html":"xml",skipAttribute:function(fe){fe.state==$t&&(fe.state=Zt)},xmlCurrentTag:function(fe){return fe.tagName?{name:fe.tagName,close:fe.type=="closeTag"}:null},xmlCurrentContext:function(fe){for(var rn=[],tn=fe.context;tn;tn=tn.prev)tn.tagName&&rn.push(tn.tagName);return rn.reverse()}}}),Ct.defineMIME("text/xml","xml"),Ct.defineMIME("application/xml","xml"),Ct.mimeModes.hasOwnProperty("text/html")||Ct.defineMIME("text/html",{name:"xml",htmlMode:!0})})},97774:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Ct=Object.assign||function(et){for(var At=1;At<arguments.length;At++){var at=arguments[At];for(var ct in at)Object.prototype.hasOwnProperty.call(at,ct)&&(et[ct]=at[ct])}return et},ee=function(){function et(At,at){for(var ct=0;ct<at.length;ct++){var pt=at[ct];pt.enumerable=pt.enumerable||!1,pt.configurable=!0,"value"in pt&&(pt.writable=!0),Object.defineProperty(At,pt.key,pt)}}return function(At,at,ct){return at&&et(At.prototype,at),ct&&et(At,ct),At}}(),ue=Qt(59301),Se=Ie(ue),de=Qt(12708),Ht=Ie(de),ie=Qt(53291),Ae=Ie(ie),re=Qt(47242),Wt=Qt(65429);function Ie(et){return et&&et.__esModule?et:{default:et}}function Xt(et,At){if(!(et instanceof At))throw new TypeError("Cannot call a class as a function")}function Ee(et,At){if(!et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return At&&(typeof At=="object"||typeof At=="function")?At:et}function It(et,At){if(typeof At!="function"&&At!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof At);et.prototype=Object.create(At&&At.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),At&&(Object.setPrototypeOf?Object.setPrototypeOf(et,At):et.__proto__=At)}var nt=function(et){It(At,et);function At(at){Xt(this,At);var ct=Ee(this,(At.__proto__||Object.getPrototypeOf(At)).call(this,at));return ct.getEchartsInstance=function(){return ct.echartsLib.getInstanceByDom(ct.echartsElement)||ct.echartsLib.init(ct.echartsElement,ct.props.theme,ct.props.opts)},ct.dispose=function(){if(ct.echartsElement){try{(0,re.clear)(ct.echartsElement)}catch(pt){console.warn(pt)}ct.echartsLib.dispose(ct.echartsElement)}},ct.rerender=function(){var pt=ct.props,xt=pt.onEvents,bt=pt.onChartReady,Rt=ct.renderEchartDom();ct.bindEvents(Rt,xt||{}),typeof bt=="function"&&ct.props.onChartReady(Rt),ct.echartsElement&&(0,re.bind)(ct.echartsElement,function(){try{Rt.resize()}catch(Ot){console.warn(Ot)}})},ct.bindEvents=function(pt,xt){var bt=function(Zt,Vt){typeof Zt=="string"&&typeof Vt=="function"&&pt.on(Zt,function($t){Vt($t,pt)})};for(var Rt in xt)Object.prototype.hasOwnProperty.call(xt,Rt)&&bt(Rt,xt[Rt])},ct.renderEchartDom=function(){var pt=ct.getEchartsInstance();return pt.setOption(ct.props.option,ct.props.notMerge||!1,ct.props.lazyUpdate||!1),ct.props.showLoading?pt.showLoading(ct.props.loadingOption||null):pt.hideLoading(),pt},ct.echartsLib=at.echarts,ct.echartsElement=null,ct}return ee(At,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(ct){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(ct,this.props))){if(!(0,Ae.default)(ct.theme,this.props.theme)||!(0,Ae.default)(ct.opts,this.props.opts)||!(0,Ae.default)(ct.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var pt=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,Ae.default)((0,Wt.pick)(this.props,pt),(0,Wt.pick)(ct,pt))){var xt=this.renderEchartDom();if(!(0,Ae.default)(ct.style,this.props.style)||!(0,Ae.default)(ct.className,this.props.className))try{xt.resize()}catch(bt){console.warn(bt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var ct=this,pt=this.props,xt=pt.style,bt=pt.className,Rt=Ct({height:300},xt);return Se.default.createElement("div",{ref:function(Zt){ct.echartsElement=Zt},style:Rt,className:"echarts-for-react "+bt})}}]),At}(ue.Component);ze.default=nt,nt.propTypes={option:Ht.default.object.isRequired,echarts:Ht.default.object,notMerge:Ht.default.bool,lazyUpdate:Ht.default.bool,style:Ht.default.object,className:Ht.default.string,theme:Ht.default.oneOfType([Ht.default.string,Ht.default.object]),onChartReady:Ht.default.func,showLoading:Ht.default.bool,loadingOption:Ht.default.object,onEvents:Ht.default.object,opts:Ht.default.shape({devicePixelRatio:Ht.default.number,renderer:Ht.default.oneOf(["canvas","svg"]),width:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])]),height:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:Ht.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}}},42441:function(xn,ze,Qt){"use strict";var Ct;Ct={value:!0},ze.Z=void 0;var ee=Qt(76411),ue=Ht(ee),Se=Qt(97774),de=Ht(Se);function Ht(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}function ie(Ie,Xt){if(!(Ie instanceof Xt))throw new TypeError("Cannot call a class as a function")}function Ae(Ie,Xt){if(!Ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Xt&&(typeof Xt=="object"||typeof Xt=="function")?Xt:Ie}function re(Ie,Xt){if(typeof Xt!="function"&&Xt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Xt);Ie.prototype=Object.create(Xt&&Xt.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Xt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ie,Xt):Ie.__proto__=Xt)}var Wt=function(Ie){re(Xt,Ie);function Xt(Ee){ie(this,Xt);var It=Ae(this,(Xt.__proto__||Object.getPrototypeOf(Xt)).call(this,Ee));return It.echartsLib=ue.default,It}return Xt}(de.default);ze.Z=Wt},65429:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0});var Qt=ze.pick=function(ee,ue){var Se={};return ue.forEach(function(de){Se[de]=ee[de]}),Se}},86204:function(xn){"use strict";var ze=typeof Reflect=="object"?Reflect:null,Qt=ze&&typeof ze.apply=="function"?ze.apply:function(pt,xt,bt){return Function.prototype.apply.call(pt,xt,bt)},Ct;ze&&typeof ze.ownKeys=="function"?Ct=ze.ownKeys:Object.getOwnPropertySymbols?Ct=function(pt){return Object.getOwnPropertyNames(pt).concat(Object.getOwnPropertySymbols(pt))}:Ct=function(pt){return Object.getOwnPropertyNames(pt)};function ee(ct){console&&console.warn&&console.warn(ct)}var ue=Number.isNaN||function(pt){return pt!==pt};function Se(){Se.init.call(this)}xn.exports=Se,xn.exports.once=et,Se.EventEmitter=Se,Se.prototype._events=void 0,Se.prototype._eventsCount=0,Se.prototype._maxListeners=void 0;var de=10;function Ht(ct){if(typeof ct!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ct)}Object.defineProperty(Se,"defaultMaxListeners",{enumerable:!0,get:function(){return de},set:function(ct){if(typeof ct!="number"||ct<0||ue(ct))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ct+".");de=ct}}),Se.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},Se.prototype.setMaxListeners=function(pt){if(typeof pt!="number"||pt<0||ue(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 ie(ct){return ct._maxListeners===void 0?Se.defaultMaxListeners:ct._maxListeners}Se.prototype.getMaxListeners=function(){return ie(this)},Se.prototype.emit=function(pt){for(var xt=[],bt=1;bt<arguments.length;bt++)xt.push(arguments[bt]);var Rt=pt==="error",Ot=this._events;if(Ot!==void 0)Rt=Rt&&Ot.error===void 0;else if(!Rt)return!1;if(Rt){var Zt;if(xt.length>0&&(Zt=xt[0]),Zt instanceof Error)throw Zt;var Vt=new Error("Unhandled error."+(Zt?" ("+Zt.message+")":""));throw Vt.context=Zt,Vt}var $t=Ot[pt];if($t===void 0)return!1;if(typeof $t=="function")Qt($t,this,xt);else for(var Ce=$t.length,fe=Ee($t,Ce),bt=0;bt<Ce;++bt)Qt(fe[bt],this,xt);return!0};function Ae(ct,pt,xt,bt){var Rt,Ot,Zt;if(Ht(xt),Ot=ct._events,Ot===void 0?(Ot=ct._events=Object.create(null),ct._eventsCount=0):(Ot.newListener!==void 0&&(ct.emit("newListener",pt,xt.listener?xt.listener:xt),Ot=ct._events),Zt=Ot[pt]),Zt===void 0)Zt=Ot[pt]=xt,++ct._eventsCount;else if(typeof Zt=="function"?Zt=Ot[pt]=bt?[xt,Zt]:[Zt,xt]:bt?Zt.unshift(xt):Zt.push(xt),Rt=ie(ct),Rt>0&&Zt.length>Rt&&!Zt.warned){Zt.warned=!0;var Vt=new Error("Possible EventEmitter memory leak detected. "+Zt.length+" "+String(pt)+" listeners added. Use emitter.setMaxListeners() to increase limit");Vt.name="MaxListenersExceededWarning",Vt.emitter=ct,Vt.type=pt,Vt.count=Zt.length,ee(Vt)}return ct}Se.prototype.addListener=function(pt,xt){return Ae(this,pt,xt,!1)},Se.prototype.on=Se.prototype.addListener,Se.prototype.prependListener=function(pt,xt){return Ae(this,pt,xt,!0)};function re(){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 Wt(ct,pt,xt){var bt={fired:!1,wrapFn:void 0,target:ct,type:pt,listener:xt},Rt=re.bind(bt);return Rt.listener=xt,bt.wrapFn=Rt,Rt}Se.prototype.once=function(pt,xt){return Ht(xt),this.on(pt,Wt(this,pt,xt)),this},Se.prototype.prependOnceListener=function(pt,xt){return Ht(xt),this.prependListener(pt,Wt(this,pt,xt)),this},Se.prototype.removeListener=function(pt,xt){var bt,Rt,Ot,Zt,Vt;if(Ht(xt),Rt=this._events,Rt===void 0)return this;if(bt=Rt[pt],bt===void 0)return this;if(bt===xt||bt.listener===xt)--this._eventsCount===0?this._events=Object.create(null):(delete Rt[pt],Rt.removeListener&&this.emit("removeListener",pt,bt.listener||xt));else if(typeof bt!="function"){for(Ot=-1,Zt=bt.length-1;Zt>=0;Zt--)if(bt[Zt]===xt||bt[Zt].listener===xt){Vt=bt[Zt].listener,Ot=Zt;break}if(Ot<0)return this;Ot===0?bt.shift():It(bt,Ot),bt.length===1&&(Rt[pt]=bt[0]),Rt.removeListener!==void 0&&this.emit("removeListener",pt,Vt||xt)}return this},Se.prototype.off=Se.prototype.removeListener,Se.prototype.removeAllListeners=function(pt){var xt,bt,Rt;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 Ot=Object.keys(bt),Zt;for(Rt=0;Rt<Ot.length;++Rt)Zt=Ot[Rt],Zt!=="removeListener"&&this.removeAllListeners(Zt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xt=bt[pt],typeof xt=="function")this.removeListener(pt,xt);else if(xt!==void 0)for(Rt=xt.length-1;Rt>=0;Rt--)this.removeListener(pt,xt[Rt]);return this};function Ie(ct,pt,xt){var bt=ct._events;if(bt===void 0)return[];var Rt=bt[pt];return Rt===void 0?[]:typeof Rt=="function"?xt?[Rt.listener||Rt]:[Rt]:xt?nt(Rt):Ee(Rt,Rt.length)}Se.prototype.listeners=function(pt){return Ie(this,pt,!0)},Se.prototype.rawListeners=function(pt){return Ie(this,pt,!1)},Se.listenerCount=function(ct,pt){return typeof ct.listenerCount=="function"?ct.listenerCount(pt):Xt.call(ct,pt)},Se.prototype.listenerCount=Xt;function Xt(ct){var pt=this._events;if(pt!==void 0){var xt=pt[ct];if(typeof xt=="function")return 1;if(xt!==void 0)return xt.length}return 0}Se.prototype.eventNames=function(){return this._eventsCount>0?Ct(this._events):[]};function Ee(ct,pt){for(var xt=new Array(pt),bt=0;bt<pt;++bt)xt[bt]=ct[bt];return xt}function It(ct,pt){for(;pt+1<ct.length;pt++)ct[pt]=ct[pt+1];ct.pop()}function nt(ct){for(var pt=new Array(ct.length),xt=0;xt<pt.length;++xt)pt[xt]=ct[xt].listener||ct[xt];return pt}function et(ct,pt){return new Promise(function(xt,bt){function Rt(Zt){ct.removeListener(pt,Ot),bt(Zt)}function Ot(){typeof ct.removeListener=="function"&&ct.removeListener("error",Rt),xt([].slice.call(arguments))}at(ct,pt,Ot,{once:!0}),pt!=="error"&&At(ct,Rt,{once:!0})})}function At(ct,pt,xt){typeof ct.on=="function"&&at(ct,"error",pt,xt)}function at(ct,pt,xt,bt){if(typeof ct.on=="function")bt.once?ct.once(pt,xt):ct.on(pt,xt);else if(typeof ct.addEventListener=="function")ct.addEventListener(pt,function Rt(Ot){bt.once&&ct.removeEventListener(pt,Rt),xt(Ot)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ct)}},53291:function(xn){"use strict";var ze=Array.isArray,Qt=Object.keys,Ct=Object.prototype.hasOwnProperty;xn.exports=function ee(ue,Se){if(ue===Se)return!0;if(ue&&Se&&typeof ue=="object"&&typeof Se=="object"){var de=ze(ue),Ht=ze(Se),ie,Ae,re;if(de&&Ht){if(Ae=ue.length,Ae!=Se.length)return!1;for(ie=Ae;ie--!==0;)if(!ee(ue[ie],Se[ie]))return!1;return!0}if(de!=Ht)return!1;var Wt=ue instanceof Date,Ie=Se instanceof Date;if(Wt!=Ie)return!1;if(Wt&&Ie)return ue.getTime()==Se.getTime();var Xt=ue instanceof RegExp,Ee=Se instanceof RegExp;if(Xt!=Ee)return!1;if(Xt&&Ee)return ue.toString()==Se.toString();var It=Qt(ue);if(Ae=It.length,Ae!==Qt(Se).length)return!1;for(ie=Ae;ie--!==0;)if(!Ct.call(Se,It[ie]))return!1;for(ie=Ae;ie--!==0;)if(re=It[ie],!ee(ue[re],Se[re]))return!1;return!0}return ue!==ue&&Se!==Se}},6330:function(xn,ze,Qt){"use strict";Qt.d(ze,{HT:function(){return Ne},iZ:function(){return je}});var Ct={},ee=function(ae,ce,ne,Ge,Be){var cn=new Worker(Ct[ce]||(Ct[ce]=URL.createObjectURL(new Blob([ae+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return cn.onmessage=function(Yn){var Xn=Yn.data,ki=Xn.$e$;if(ki){var ii=new Error(ki[0]);ii.code=ki[1],ii.stack=ki[2],Be(ii,null)}else Be(null,Xn)},cn.postMessage(ne,Ge),cn},ue=Uint8Array,Se=Uint16Array,de=Int32Array,Ht=new ue([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]),ie=new ue([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]),Ae=new ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),re=function(ae,ce){for(var ne=new Se(31),Ge=0;Ge<31;++Ge)ne[Ge]=ce+=1<<ae[Ge-1];for(var Be=new de(ne[30]),Ge=1;Ge<30;++Ge)for(var cn=ne[Ge];cn<ne[Ge+1];++cn)Be[cn]=cn-ne[Ge]<<5|Ge;return{b:ne,r:Be}},Wt=re(Ht,2),Ie=Wt.b,Xt=Wt.r;Ie[28]=258,Xt[258]=28;for(var Ee=re(ie,0),It=Ee.b,nt=Ee.r,et=new Se(32768),At=0;At<32768;++At){var at=(At&43690)>>1|(At&21845)<<1;at=(at&52428)>>2|(at&13107)<<2,at=(at&61680)>>4|(at&3855)<<4,et[At]=((at&65280)>>8|(at&255)<<8)>>1}for(var ct=function(ae,ce,ne){for(var Ge=ae.length,Be=0,cn=new Se(ce);Be<Ge;++Be)ae[Be]&&++cn[ae[Be]-1];var Yn=new Se(ce);for(Be=1;Be<ce;++Be)Yn[Be]=Yn[Be-1]+cn[Be-1]<<1;var Xn;if(ne){Xn=new Se(1<<ce);var ki=15-ce;for(Be=0;Be<Ge;++Be)if(ae[Be])for(var ii=Be<<4|ae[Be],be=ce-ae[Be],yi=Yn[ae[Be]-1]++<<be,Te=yi|(1<<be)-1;yi<=Te;++yi)Xn[et[yi]>>ki]=ii}else for(Xn=new Se(Ge),Be=0;Be<Ge;++Be)ae[Be]&&(Xn[Be]=et[Yn[ae[Be]-1]++]>>15-ae[Be]);return Xn},pt=new ue(288),At=0;At<144;++At)pt[At]=8;for(var At=144;At<256;++At)pt[At]=9;for(var At=256;At<280;++At)pt[At]=7;for(var At=280;At<288;++At)pt[At]=8;for(var xt=new ue(32),At=0;At<32;++At)xt[At]=5;var bt=ct(pt,9,0),Rt=ct(pt,9,1),Ot=ct(xt,5,0),Zt=ct(xt,5,1),Vt=function(ae){for(var ce=ae[0],ne=1;ne<ae.length;++ne)ae[ne]>ce&&(ce=ae[ne]);return ce},$t=function(ae,ce,ne){var Ge=ce/8|0;return(ae[Ge]|ae[Ge+1]<<8)>>(ce&7)&ne},Ce=function(ae,ce){var ne=ce/8|0;return(ae[ne]|ae[ne+1]<<8|ae[ne+2]<<16)>>(ce&7)},fe=function(ae){return(ae+7)/8|0},rn=function(ae,ce,ne){return(ce==null||ce<0)&&(ce=0),(ne==null||ne>ae.length)&&(ne=ae.length),new ue(ae.subarray(ce,ne))},tn={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Bn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Fn=function(ae,ce,ne){var Ge=new Error(ce||Bn[ae]);if(Ge.code=ae,Error.captureStackTrace&&Error.captureStackTrace(Ge,Fn),!ne)throw Ge;return Ge},kn=function(ae,ce,ne,Ge){var Be=ae.length,cn=Ge?Ge.length:0;if(!Be||ce.f&&!ce.l)return ne||new ue(0);var Yn=!ne,Xn=Yn||ce.i!=2,ki=ce.i;Yn&&(ne=new ue(Be*3));var ii=function(io){var Pr=ne.length;if(io>Pr){var vo=new ue(Math.max(Pr*2,io));vo.set(ne),ne=vo}},be=ce.f||0,yi=ce.p||0,Te=ce.b||0,un=ce.l,Ue=ce.d,Ut=ce.m,pn=ce.n,Ln=Be*8;do{if(!un){be=$t(ae,yi,1);var Ai=$t(ae,yi+1,3);if(yi+=3,Ai)if(Ai==1)un=Rt,Ue=Zt,Ut=9,pn=5;else if(Ai==2){var qe=$t(ae,yi,31)+257,fn=$t(ae,yi+10,15)+4,an=qe+$t(ae,yi+5,31)+1;yi+=14;for(var gn=new ue(an),qn=new ue(19),Mn=0;Mn<fn;++Mn)qn[Ae[Mn]]=$t(ae,yi+Mn*3,7);yi+=fn*3;for(var Un=Vt(qn),ln=(1<<Un)-1,si=ct(qn,Un,1),Mn=0;Mn<an;){var Mi=si[$t(ae,yi,ln)];yi+=Mi&15;var Zn=Mi>>4;if(Zn<16)gn[Mn++]=Zn;else{var er=0,Hi=0;for(Zn==16?(Hi=3+$t(ae,yi,3),yi+=2,er=gn[Mn-1]):Zn==17?(Hi=3+$t(ae,yi,7),yi+=3):Zn==18&&(Hi=11+$t(ae,yi,127),yi+=7);Hi--;)gn[Mn++]=er}}var Fr=gn.subarray(0,qe),wr=gn.subarray(qe);Ut=Vt(Fr),pn=Vt(wr),un=ct(Fr,Ut,1),Ue=ct(wr,pn,1)}else Fn(1);else{var Zn=fe(yi)+4,Tn=ae[Zn-4]|ae[Zn-3]<<8,dn=Zn+Tn;if(dn>Be){ki&&Fn(0);break}Xn&&ii(Te+Tn),ne.set(ae.subarray(Zn,dn),Te),ce.b=Te+=Tn,ce.p=yi=dn*8,ce.f=be;continue}if(yi>Ln){ki&&Fn(0);break}}Xn&&ii(Te+131072);for(var Qr=(1<<Ut)-1,Or=(1<<pn)-1,Lr=yi;;Lr=yi){var er=un[Ce(ae,yi)&Qr],Xr=er>>4;if(yi+=er&15,yi>Ln){ki&&Fn(0);break}if(er||Fn(2),Xr<256)ne[Te++]=Xr;else if(Xr==256){Lr=yi,un=null;break}else{var He=Xr-254;if(Xr>264){var Mn=Xr-257,xr=Ht[Mn];He=$t(ae,yi,(1<<xr)-1)+Ie[Mn],yi+=xr}var Ur=Ue[Ce(ae,yi)&Or],nr=Ur>>4;Ur||Fn(3),yi+=Ur&15;var wr=It[nr];if(nr>3){var xr=ie[nr];wr+=Ce(ae,yi)&(1<<xr)-1,yi+=xr}if(yi>Ln){ki&&Fn(0);break}Xn&&ii(Te+131072);var kr=Te+He;if(Te<wr){var gr=cn-wr,co=Math.min(wr,kr);for(gr+Te<0&&Fn(3);Te<co;++Te)ne[Te]=Ge[gr+Te]}for(;Te<kr;++Te)ne[Te]=ne[Te-wr]}}ce.l=un,ce.p=Lr,ce.b=Te,ce.f=be,un&&(be=1,ce.m=Ut,ce.d=Ue,ce.n=pn)}while(!be);return Te!=ne.length&&Yn?rn(ne,0,Te):ne.subarray(0,Te)},Gn=function(ae,ce,ne){ne<<=ce&7;var Ge=ce/8|0;ae[Ge]|=ne,ae[Ge+1]|=ne>>8},ti=function(ae,ce,ne){ne<<=ce&7;var Ge=ce/8|0;ae[Ge]|=ne,ae[Ge+1]|=ne>>8,ae[Ge+2]|=ne>>16},me=function(ae,ce){for(var ne=[],Ge=0;Ge<ae.length;++Ge)ae[Ge]&&ne.push({s:Ge,f:ae[Ge]});var Be=ne.length,cn=ne.slice();if(!Be)return{t:ri,l:0};if(Be==1){var Yn=new ue(ne[0].s+1);return Yn[ne[0].s]=1,{t:Yn,l:1}}ne.sort(function(dn,qe){return dn.f-qe.f}),ne.push({s:-1,f:25001});var Xn=ne[0],ki=ne[1],ii=0,be=1,yi=2;for(ne[0]={s:-1,f:Xn.f+ki.f,l:Xn,r:ki};be!=Be-1;)Xn=ne[ne[ii].f<ne[yi].f?ii++:yi++],ki=ne[ii!=be&&ne[ii].f<ne[yi].f?ii++:yi++],ne[be++]={s:-1,f:Xn.f+ki.f,l:Xn,r:ki};for(var Te=cn[0].s,Ge=1;Ge<Be;++Ge)cn[Ge].s>Te&&(Te=cn[Ge].s);var un=new Se(Te+1),Ue=oe(ne[be-1],un,0);if(Ue>ce){var Ge=0,Ut=0,pn=Ue-ce,Ln=1<<pn;for(cn.sort(function(qe,fn){return un[fn.s]-un[qe.s]||qe.f-fn.f});Ge<Be;++Ge){var Ai=cn[Ge].s;if(un[Ai]>ce)Ut+=Ln-(1<<Ue-un[Ai]),un[Ai]=ce;else break}for(Ut>>=pn;Ut>0;){var Zn=cn[Ge].s;un[Zn]<ce?Ut-=1<<ce-un[Zn]++-1:++Ge}for(;Ge>=0&&Ut;--Ge){var Tn=cn[Ge].s;un[Tn]==ce&&(--un[Tn],++Ut)}Ue=ce}return{t:new ue(un),l:Ue}},oe=function(ae,ce,ne){return ae.s==-1?Math.max(oe(ae.l,ce,ne+1),oe(ae.r,ce,ne+1)):ce[ae.s]=ne},Cn=function(ae){for(var ce=ae.length;ce&&!ae[--ce];);for(var ne=new Se(++ce),Ge=0,Be=ae[0],cn=1,Yn=function(ki){ne[Ge++]=ki},Xn=1;Xn<=ce;++Xn)if(ae[Xn]==Be&&Xn!=ce)++cn;else{if(!Be&&cn>2){for(;cn>138;cn-=138)Yn(32754);cn>2&&(Yn(cn>10?cn-11<<5|28690:cn-3<<5|12305),cn=0)}else if(cn>3){for(Yn(Be),--cn;cn>6;cn-=6)Yn(8304);cn>2&&(Yn(cn-3<<5|8208),cn=0)}for(;cn--;)Yn(Be);cn=1,Be=ae[Xn]}return{c:ne.subarray(0,Ge),n:ce}},li=function(ae,ce){for(var ne=0,Ge=0;Ge<ce.length;++Ge)ne+=ae[Ge]*ce[Ge];return ne},ai=function(ae,ce,ne){var Ge=ne.length,Be=fe(ce+2);ae[Be]=Ge&255,ae[Be+1]=Ge>>8,ae[Be+2]=ae[Be]^255,ae[Be+3]=ae[Be+1]^255;for(var cn=0;cn<Ge;++cn)ae[Be+cn+4]=ne[cn];return(Be+4+Ge)*8},sn=function(ae,ce,ne,Ge,Be,cn,Yn,Xn,ki,ii,be){Gn(ce,be++,ne),++Be[256];for(var yi=me(Be,15),Te=yi.t,un=yi.l,Ue=me(cn,15),Ut=Ue.t,pn=Ue.l,Ln=Cn(Te),Ai=Ln.c,Zn=Ln.n,Tn=Cn(Ut),dn=Tn.c,qe=Tn.n,fn=new Se(19),an=0;an<Ai.length;++an)++fn[Ai[an]&31];for(var an=0;an<dn.length;++an)++fn[dn[an]&31];for(var gn=me(fn,7),qn=gn.t,Mn=gn.l,Un=19;Un>4&&!qn[Ae[Un-1]];--Un);var ln=ii+5<<3,si=li(Be,pt)+li(cn,xt)+Yn,Mi=li(Be,Te)+li(cn,Ut)+Yn+14+3*Un+li(fn,qn)+2*fn[16]+3*fn[17]+7*fn[18];if(ki>=0&&ln<=si&&ln<=Mi)return ai(ce,be,ae.subarray(ki,ki+ii));var er,Hi,Fr,wr;if(Gn(ce,be,1+(Mi<si)),be+=2,Mi<si){er=ct(Te,un,0),Hi=Te,Fr=ct(Ut,pn,0),wr=Ut;var Qr=ct(qn,Mn,0);Gn(ce,be,Zn-257),Gn(ce,be+5,qe-1),Gn(ce,be+10,Un-4),be+=14;for(var an=0;an<Un;++an)Gn(ce,be+3*an,qn[Ae[an]]);be+=3*Un;for(var Or=[Ai,dn],Lr=0;Lr<2;++Lr)for(var Xr=Or[Lr],an=0;an<Xr.length;++an){var He=Xr[an]&31;Gn(ce,be,Qr[He]),be+=qn[He],He>15&&(Gn(ce,be,Xr[an]>>5&127),be+=Xr[an]>>12)}}else er=bt,Hi=pt,Fr=Ot,wr=xt;for(var an=0;an<Xn;++an){var xr=Ge[an];if(xr>255){var He=xr>>18&31;ti(ce,be,er[He+257]),be+=Hi[He+257],He>7&&(Gn(ce,be,xr>>23&31),be+=Ht[He]);var Ur=xr&31;ti(ce,be,Fr[Ur]),be+=wr[Ur],Ur>3&&(ti(ce,be,xr>>5&8191),be+=ie[Ur])}else ti(ce,be,er[xr]),be+=Hi[xr]}return ti(ce,be,er[256]),be+Hi[256]},Rn=new de([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ri=new ue(0),Ui=function(ae,ce,ne,Ge,Be,cn){var Yn=cn.z||ae.length,Xn=new ue(Ge+Yn+5*(1+Math.ceil(Yn/7e3))+Be),ki=Xn.subarray(Ge,Xn.length-Be),ii=cn.l,be=(cn.r||0)&7;if(ce){be&&(ki[0]=cn.r>>3);for(var yi=Rn[ce-1],Te=yi>>13,un=yi&8191,Ue=(1<<ne)-1,Ut=cn.p||new Se(32768),pn=cn.h||new Se(Ue+1),Ln=Math.ceil(ne/3),Ai=2*Ln,Zn=function(ks){return(ae[ks]^ae[ks+1]<<Ln^ae[ks+2]<<Ai)&Ue},Tn=new de(25e3),dn=new Se(288),qe=new Se(32),fn=0,an=0,gn=cn.i||0,qn=0,Mn=cn.w||0,Un=0;gn+2<Yn;++gn){var ln=Zn(gn),si=gn&32767,Mi=pn[ln];if(Ut[si]=Mi,pn[ln]=si,Mn<=gn){var er=Yn-gn;if((fn>7e3||qn>24576)&&(er>423||!ii)){be=sn(ae,ki,0,Tn,dn,qe,an,qn,Un,gn-Un,be),qn=fn=an=0,Un=gn;for(var Hi=0;Hi<286;++Hi)dn[Hi]=0;for(var Hi=0;Hi<30;++Hi)qe[Hi]=0}var Fr=2,wr=0,Qr=un,Or=si-Mi&32767;if(er>2&&ln==Zn(gn-Or))for(var Lr=Math.min(Te,er)-1,Xr=Math.min(32767,gn),He=Math.min(258,er);Or<=Xr&&--Qr&&si!=Mi;){if(ae[gn+Fr]==ae[gn+Fr-Or]){for(var xr=0;xr<He&&ae[gn+xr]==ae[gn+xr-Or];++xr);if(xr>Fr){if(Fr=xr,wr=Or,xr>Lr)break;for(var Ur=Math.min(Or,xr-2),nr=0,Hi=0;Hi<Ur;++Hi){var kr=gn-Or+Hi&32767,gr=Ut[kr],co=kr-gr&32767;co>nr&&(nr=co,Mi=kr)}}}si=Mi,Mi=Ut[si],Or+=si-Mi&32767}if(wr){Tn[qn++]=268435456|Xt[Fr]<<18|nt[wr];var io=Xt[Fr]&31,Pr=nt[wr]&31;an+=Ht[io]+ie[Pr],++dn[257+io],++qe[Pr],Mn=gn+Fr,++fn}else Tn[qn++]=ae[gn],++dn[ae[gn]]}}for(gn=Math.max(gn,Mn);gn<Yn;++gn)Tn[qn++]=ae[gn],++dn[ae[gn]];be=sn(ae,ki,ii,Tn,dn,qe,an,qn,Un,gn-Un,be),ii||(cn.r=be&7|ki[be/8|0]<<3,be-=7,cn.h=pn,cn.p=Ut,cn.i=gn,cn.w=Mn)}else{for(var gn=cn.w||0;gn<Yn+ii;gn+=65535){var vo=gn+65535;vo>=Yn&&(ki[be/8|0]=ii,vo=Yn),be=ai(ki,be+1,ae.subarray(gn,vo))}cn.i=Yn}return rn(Xn,0,Ge+fe(be)+Be)},en=null,ei=function(){var ae=-1;return{p:function(ce){for(var ne=ae,Ge=0;Ge<ce.length;++Ge)ne=en[ne&255^ce[Ge]]^ne>>>8;ae=ne},d:function(){return~ae}}},Fe=function(){var ae=1,ce=0;return{p:function(ne){for(var Ge=ae,Be=ce,cn=ne.length|0,Yn=0;Yn!=cn;){for(var Xn=Math.min(Yn+2655,cn);Yn<Xn;++Yn)Be+=Ge+=ne[Yn];Ge=(Ge&65535)+15*(Ge>>16),Be=(Be&65535)+15*(Be>>16)}ae=Ge,ce=Be},d:function(){return ae%=65521,ce%=65521,(ae&255)<<24|(ae&65280)<<8|(ce&255)<<8|ce>>8}}},ci=function(ae,ce,ne,Ge,Be){if(!Be&&(Be={l:1},ce.dictionary)){var cn=ce.dictionary.subarray(-32768),Yn=new ue(cn.length+ae.length);Yn.set(cn),Yn.set(ae,cn.length),ae=Yn,Be.w=cn.length}return Ui(ae,ce.level==null?6:ce.level,ce.mem==null?Be.l?Math.ceil(Math.max(8,Math.min(13,Math.log(ae.length)))*1.5):20:12+ce.mem,ne,Ge,Be)},Ti=function(ae,ce){var ne={};for(var Ge in ae)ne[Ge]=ae[Ge];for(var Ge in ce)ne[Ge]=ce[Ge];return ne},jt=function(ae,ce,ne){for(var Ge=ae(),Be=ae.toString(),cn=Be.slice(Be.indexOf("[")+1,Be.lastIndexOf("]")).replace(/\s+/g,"").split(","),Yn=0;Yn<Ge.length;++Yn){var Xn=Ge[Yn],ki=cn[Yn];if(typeof Xn=="function"){ce+=";"+ki+"=";var ii=Xn.toString();if(Xn.prototype)if(ii.indexOf("[native code]")!=-1){var be=ii.indexOf(" ",8)+1;ce+=ii.slice(be,ii.indexOf("(",be))}else{ce+=ii;for(var yi in Xn.prototype)ce+=";"+ki+".prototype."+yi+"="+Xn.prototype[yi].toString()}else ce+=ii}else ne[ki]=Xn}return ce},Mt=null,mt=function(ae){var ce=[];for(var ne in ae)ae[ne].buffer&&ce.push((ae[ne]=new ae[ne].constructor(ae[ne])).buffer);return ce},vt=function(ae,ce,ne,Ge){if(!Mt[ne]){for(var Be="",cn={},Yn=ae.length-1,Xn=0;Xn<Yn;++Xn)Be=jt(ae[Xn],Be,cn);Mt[ne]={c:jt(ae[Yn],Be,cn),e:cn}}var ki=Ti({},Mt[ne].e);return ee(Mt[ne].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ce.toString()+"}",ne,ki,mt(ki),Ge)},Lt=function(){return[ue,Se,de,Ht,ie,Ae,Ie,It,Rt,Zt,et,Bn,ct,Vt,$t,Ce,fe,rn,Fn,kn,no,Me,De]},Bt=function(){return[ue,Se,de,Ht,ie,Ae,Xt,nt,bt,pt,Ot,xt,et,Rn,ri,ct,Gn,ti,me,oe,Cn,li,ai,sn,fe,rn,Ui,ci,Vr,Me]},_t=function(){return[gi,Ei,oi,ei,en]},Le=function(){return[bi,cr]},xe=function(){return[Ri,oi,Fe]},Xe=function(){return[Ki]},Me=function(ae){return postMessage(ae,[ae.buffer])},De=function(ae){return ae&&{out:ae.size&&new ue(ae.size),dictionary:ae.dictionary}},Oe=function(ae,ce,ne,Ge,Be,cn){var Yn=vt(ne,Ge,Be,function(Xn,ki){Yn.terminate(),cn(Xn,ki)});return Yn.postMessage([ae,ce],ce.consume?[ae.buffer]:[]),function(){Yn.terminate()}},nn=function(ae){return ae.ondata=function(ce,ne){return postMessage([ce,ne],[ce.buffer])},function(ce){ce.data.length?(ae.push(ce.data[0],ce.data[1]),postMessage([ce.data[0].length])):ae.flush()}},mn=function(ae,ce,ne,Ge,Be,cn,Yn){var Xn,ki=vt(ae,Ge,Be,function(ii,be){ii?(ki.terminate(),ce.ondata.call(ce,ii)):Array.isArray(be)?be.length==1?(ce.queuedSize-=be[0],ce.ondrain&&ce.ondrain(be[0])):(be[1]&&ki.terminate(),ce.ondata.call(ce,ii,be[0],be[1])):Yn(be)});ki.postMessage(ne),ce.queuedSize=0,ce.push=function(ii,be){ce.ondata||Fn(5),Xn&&ce.ondata(Fn(4,0,1),null,!!be),ce.queuedSize+=ii.length,ki.postMessage([ii,Xn=be],[ii.buffer])},ce.terminate=function(){ki.terminate()},cn&&(ce.flush=function(){ki.postMessage([])})},On=function(ae,ce){return ae[ce]|ae[ce+1]<<8},yn=function(ae,ce){return(ae[ce]|ae[ce+1]<<8|ae[ce+2]<<16|ae[ce+3]<<24)>>>0},ui=function(ae,ce){return yn(ae,ce)+yn(ae,ce+4)*4294967296},oi=function(ae,ce,ne){for(;ne;++ce)ae[ce]=ne,ne>>>=8},gi=function(ae,ce){var ne=ce.filename;if(ae[0]=31,ae[1]=139,ae[2]=8,ae[8]=ce.level<2?4:ce.level==9?2:0,ae[9]=3,ce.mtime!=0&&oi(ae,4,Math.floor(new Date(ce.mtime||Date.now())/1e3)),ne){ae[3]=8;for(var Ge=0;Ge<=ne.length;++Ge)ae[Ge+10]=ne.charCodeAt(Ge)}},bi=function(ae){(ae[0]!=31||ae[1]!=139||ae[2]!=8)&&Fn(6,"invalid gzip data");var ce=ae[3],ne=10;ce&4&&(ne+=(ae[10]|ae[11]<<8)+2);for(var Ge=(ce>>3&1)+(ce>>4&1);Ge>0;Ge-=!ae[ne++]);return ne+(ce&2)},cr=function(ae){var ce=ae.length;return(ae[ce-4]|ae[ce-3]<<8|ae[ce-2]<<16|ae[ce-1]<<24)>>>0},Ei=function(ae){return 10+(ae.filename?ae.filename.length+1:0)},Ri=function(ae,ce){var ne=ce.level,Ge=ne==0?0:ne<6?1:ne==9?3:2;if(ae[0]=120,ae[1]=Ge<<6|(ce.dictionary&&32),ae[1]|=31-(ae[0]<<8|ae[1])%31,ce.dictionary){var Be=Fe();Be.p(ce.dictionary),oi(ae,2,Be.d())}},Ki=function(ae,ce){return((ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31)&&Fn(6,"invalid zlib data"),(ae[1]>>5&1)==+!ce&&Fn(6,"invalid zlib data: "+(ae[1]&32?"need":"unexpected")+" dictionary"),(ae[1]>>3&4)+2};function _r(ae,ce){return typeof ae=="function"&&(ce=ae,ae={}),this.ondata=ce,ae}var Ji=null,Er=null;function yr(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Bt],function(Ge){return Me(Vr(Ge.data[0],Ge.data[1]))},0,ne)}function Vr(ae,ce){return ci(ae,ce||{},0,0)}var Zi=null,oo=null;function xo(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Lt],function(Ge){return Me(no(Ge.data[0],De(Ge.data[1])))},1,ne)}function no(ae,ce){return kn(ae,{i:2},ce&&ce.out,ce&&ce.dictionary)}var br=null,uo=null;function Tt(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Bt,_t,function(){return[Gi]}],function(Ge){return Me(Gi(Ge.data[0],Ge.data[1]))},2,ne)}function Gi(ae,ce){ce||(ce={});var ne=ei(),Ge=ae.length;ne.p(ae);var Be=ci(ae,ce,Ei(ce),8),cn=Be.length;return gi(Be,ce),oi(Be,cn-8,ne.d()),oi(Be,cn-4,Ge),Be}var Vi=null,xi=null;function Oi(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Lt,Le,function(){return[zi]}],function(Ge){return Me(zi(Ge.data[0],Ge.data[1]))},3,ne)}function zi(ae,ce){var ne=bi(ae);return ne+8>ae.length&&Fn(6,"invalid gzip data"),kn(ae.subarray(ne,-8),{i:2},ce&&ce.out||new ue(cr(ae)),ce&&ce.dictionary)}var or=null,Yr=null;function Tr(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Bt,xe,function(){return[je]}],function(Ge){return Me(je(Ge.data[0],Ge.data[1]))},4,ne)}function je(ae,ce){ce||(ce={});var ne=Fe();ne.p(ae);var Ge=ci(ae,ce,ce.dictionary?6:2,4);return Ri(Ge,ce),oi(Ge,Ge.length-4,ne.d()),Ge}var Je=null,Ke=null;function Ci(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),Oe(ae,ce,[Lt,Xe,function(){return[Ne]}],function(Ge){return Me(Ne(Ge.data[0],De(Ge.data[1])))},5,ne)}function Ne(ae,ce){return kn(ae.subarray(Ki(ae,ce&&ce.dictionary),-4),{i:2},ce&&ce.out,ce&&ce.dictionary)}var Qi=null,Hn=null;function fi(ae,ce,ne){return ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7),ae[0]==31&&ae[1]==139&&ae[2]==8?Oi(ae,ce,ne):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?xo(ae,ce,ne):Ci(ae,ce,ne)}function $i(ae,ce){return ae[0]==31&&ae[1]==139&&ae[2]==8?zi(ae,ce):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?no(ae,ce):Ne(ae,ce)}var Mr=function(ae,ce,ne,Ge){for(var Be in ae){var cn=ae[Be],Yn=ce+Be,Xn=Ge;Array.isArray(cn)&&(Xn=Ti(Ge,cn[1]),cn=cn[0]),cn instanceof ue?ne[Yn]=[cn,Xn]:(ne[Yn+="/"]=[new ue(0),Xn],Mr(cn,Yn,ne,Ge))}},Br=typeof TextEncoder!="undefined"&&new TextEncoder,te=typeof TextDecoder!="undefined"&&new TextDecoder,ke=0;try{te.decode(ri,{stream:!0}),ke=1}catch(ae){}var zn=function(ae){for(var ce="",ne=0;;){var Ge=ae[ne++],Be=(Ge>127)+(Ge>223)+(Ge>239);if(ne+Be>ae.length)return{s:ce,r:rn(ae,ne-1)};Be?Be==3?(Ge=((Ge&15)<<18|(ae[ne++]&63)<<12|(ae[ne++]&63)<<6|ae[ne++]&63)-65536,ce+=String.fromCharCode(55296|Ge>>10,56320|Ge&1023)):Be&1?ce+=String.fromCharCode((Ge&31)<<6|ae[ne++]&63):ce+=String.fromCharCode((Ge&15)<<12|(ae[ne++]&63)<<6|ae[ne++]&63):ce+=String.fromCharCode(Ge)}},ni=null,Ye=null;function Kn(ae,ce){if(ce){for(var ne=new ue(ae.length),Ge=0;Ge<ae.length;++Ge)ne[Ge]=ae.charCodeAt(Ge);return ne}if(Br)return Br.encode(ae);for(var Be=ae.length,cn=new ue(ae.length+(ae.length>>1)),Yn=0,Xn=function(be){cn[Yn++]=be},Ge=0;Ge<Be;++Ge){if(Yn+5>cn.length){var ki=new ue(Yn+8+(Be-Ge<<1));ki.set(cn),cn=ki}var ii=ae.charCodeAt(Ge);ii<128||ce?Xn(ii):ii<2048?(Xn(192|ii>>6),Xn(128|ii&63)):ii>55295&&ii<57344?(ii=65536+(ii&1047552)|ae.charCodeAt(++Ge)&1023,Xn(240|ii>>18),Xn(128|ii>>12&63),Xn(128|ii>>6&63),Xn(128|ii&63)):(Xn(224|ii>>12),Xn(128|ii>>6&63),Xn(128|ii&63))}return rn(cn,0,Yn)}function _n(ae,ce){if(ce){for(var ne="",Ge=0;Ge<ae.length;Ge+=16384)ne+=String.fromCharCode.apply(null,ae.subarray(Ge,Ge+16384));return ne}else{if(te)return te.decode(ae);var Be=zn(ae),cn=Be.s,ne=Be.r;return ne.length&&Fn(8),cn}}var We=function(ae){return ae==1?3:ae<6?2:ae==9?1:0},on=function(ae,ce){return ce+30+On(ae,ce+26)+On(ae,ce+28)},An=function(ae,ce,ne){var Ge=On(ae,ce+28),Be=_n(ae.subarray(ce+46,ce+46+Ge),!(On(ae,ce+8)&2048)),cn=ce+46+Ge,Yn=yn(ae,ce+20),Xn=ne&&Yn==4294967295?Nn(ae,cn):[Yn,yn(ae,ce+24),yn(ae,ce+42)],ki=Xn[0],ii=Xn[1],be=Xn[2];return[On(ae,ce+10),ki,ii,Be,cn+On(ae,ce+30)+On(ae,ce+32),be]},Nn=function(ae,ce){for(;On(ae,ce)!=1;ce+=4+On(ae,ce+2));return[ui(ae,ce+12),ui(ae,ce+4),ui(ae,ce+20)]},Vn=function(ae){var ce=0;if(ae)for(var ne in ae){var Ge=ae[ne].length;Ge>65535&&Fn(9),ce+=Ge+4}return ce},Yi=function(ae,ce,ne,Ge,Be,cn,Yn,Xn){var ki=Ge.length,ii=ne.extra,be=Xn&&Xn.length,yi=Vn(ii);oi(ae,ce,Yn!=null?33639248:67324752),ce+=4,Yn!=null&&(ae[ce++]=20,ae[ce++]=ne.os),ae[ce]=20,ce+=2,ae[ce++]=ne.flag<<1|(cn<0&&8),ae[ce++]=Be&&8,ae[ce++]=ne.compression&255,ae[ce++]=ne.compression>>8;var Te=new Date(ne.mtime==null?Date.now():ne.mtime),un=Te.getFullYear()-1980;if((un<0||un>119)&&Fn(10),oi(ae,ce,un<<25|Te.getMonth()+1<<21|Te.getDate()<<16|Te.getHours()<<11|Te.getMinutes()<<5|Te.getSeconds()>>1),ce+=4,cn!=-1&&(oi(ae,ce,ne.crc),oi(ae,ce+4,cn<0?-cn-2:cn),oi(ae,ce+8,ne.size)),oi(ae,ce+12,ki),oi(ae,ce+14,yi),ce+=16,Yn!=null&&(oi(ae,ce,be),oi(ae,ce+6,ne.attrs),oi(ae,ce+10,Yn),ce+=14),ae.set(Ge,ce),ce+=ki,yi)for(var Ue in ii){var Ut=ii[Ue],pn=Ut.length;oi(ae,ce,+Ue),oi(ae,ce+2,pn),ae.set(Ut,ce+4),ce+=4+pn}return be&&(ae.set(Xn,ce),ce+=be),ce},Li=function(ae,ce,ne,Ge,Be){oi(ae,ce,101010256),oi(ae,ce+8,ne),oi(ae,ce+10,ne),oi(ae,ce+12,Ge),oi(ae,ce+16,Be)},Bi=null,Ve=null,tr=null,dr=null;function qr(ae,ce,ne){ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7);var Ge={};Mr(ae,"",Ge,ce);var Be=Object.keys(Ge),cn=Be.length,Yn=0,Xn=0,ki=cn,ii=new Array(cn),be=[],yi=function(){for(var pn=0;pn<be.length;++pn)be[pn]()},Te=function(pn,Ln){Ii(function(){ne(pn,Ln)})};Ii(function(){Te=ne});var un=function(){var pn=new ue(Xn+22),Ln=Yn,Ai=Xn-Yn;Xn=0;for(var Zn=0;Zn<ki;++Zn){var Tn=ii[Zn];try{var dn=Tn.c.length;Yi(pn,Xn,Tn,Tn.f,Tn.u,dn);var qe=30+Tn.f.length+Vn(Tn.extra),fn=Xn+qe;pn.set(Tn.c,fn),Yi(pn,Yn,Tn,Tn.f,Tn.u,dn,Xn,Tn.m),Yn+=16+qe+(Tn.m?Tn.m.length:0),Xn=fn+dn}catch(an){return Te(an,null)}}Li(pn,Yn,ii.length,Ai,Ln),Te(null,pn)};cn||un();for(var Ue=function(pn){var Ln=Be[pn],Ai=Ge[Ln],Zn=Ai[0],Tn=Ai[1],dn=ei(),qe=Zn.length;dn.p(Zn);var fn=Kn(Ln),an=fn.length,gn=Tn.comment,qn=gn&&Kn(gn),Mn=qn&&qn.length,Un=Vn(Tn.extra),ln=Tn.level==0?0:8,si=function(Mi,er){if(Mi)yi(),Te(Mi,null);else{var Hi=er.length;ii[pn]=Ti(Tn,{size:qe,crc:dn.d(),c:er,f:fn,m:qn,u:an!=Ln.length||qn&&gn.length!=Mn,compression:ln}),Yn+=30+an+Un+Hi,Xn+=76+2*(an+Un)+(Mn||0)+Hi,--cn||un()}};if(an>65535&&si(Fn(11,0,1),null),!ln)si(null,Zn);else if(qe<16e4)try{si(null,Vr(Zn,Tn))}catch(Mi){si(Mi,null)}else be.push(yr(Zn,Tn,si))},Ut=0;Ut<ki;++Ut)Ue(Ut);return yi}function hn(ae,ce){ce||(ce={});var ne={},Ge=[];Mr(ae,"",ne,ce);var Be=0,cn=0;for(var Yn in ne){var Xn=ne[Yn],ki=Xn[0],ii=Xn[1],be=ii.level==0?0:8,yi=Kn(Yn),Te=yi.length,un=ii.comment,Ue=un&&Kn(un),Ut=Ue&&Ue.length,pn=Vn(ii.extra);Te>65535&&Fn(11);var Ln=be?Vr(ki,ii):ki,Ai=Ln.length,Zn=ei();Zn.p(ki),Ge.push(Ti(ii,{size:ki.length,crc:Zn.d(),c:Ln,f:yi,m:Ue,u:Te!=Yn.length||Ue&&un.length!=Ut,o:Be,compression:be})),Be+=30+Te+pn+Ai,cn+=76+2*(Te+pn)+(Ut||0)+Ai}for(var Tn=new ue(cn+22),dn=Be,qe=cn-Be,fn=0;fn<Ge.length;++fn){var yi=Ge[fn];Yi(Tn,yi.o,yi,yi.f,yi.u,yi.c.length);var an=30+yi.f.length+Vn(yi.extra);Tn.set(yi.c,yi.o+an),Yi(Tn,Be,yi,yi.f,yi.u,yi.c.length,yi.o,yi.m),Be+=16+an+(yi.m?yi.m.length:0)}return Li(Tn,Be,Ge.length,qe,dn),Tn}var Wn=null,Si=null,vi=null,mi=null,Ii=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(ae){ae()};function Wi(ae,ce,ne){ne||(ne=ce,ce={}),typeof ne!="function"&&Fn(7);var Ge=[],Be=function(){for(var pn=0;pn<Ge.length;++pn)Ge[pn]()},cn={},Yn=function(pn,Ln){Ii(function(){ne(pn,Ln)})};Ii(function(){Yn=ne});for(var Xn=ae.length-22;yn(ae,Xn)!=101010256;--Xn)if(!Xn||ae.length-Xn>65558)return Yn(Fn(13,0,1),null),Be;var ki=On(ae,Xn+8);if(ki){var ii=ki,be=yn(ae,Xn+16),yi=be==4294967295||ii==65535;if(yi){var Te=yn(ae,Xn-12);yi=yn(ae,Te)==101075792,yi&&(ii=ki=yn(ae,Te+32),be=yn(ae,Te+48))}for(var un=ce&&ce.filter,Ue=function(pn){var Ln=An(ae,be,yi),Ai=Ln[0],Zn=Ln[1],Tn=Ln[2],dn=Ln[3],qe=Ln[4],fn=Ln[5],an=on(ae,fn);be=qe;var gn=function(Mn,Un){Mn?(Be(),Yn(Mn,null)):(Un&&(cn[dn]=Un),--ki||Yn(null,cn))};if(!un||un({name:dn,size:Zn,originalSize:Tn,compression:Ai}))if(!Ai)gn(null,rn(ae,an,an+Zn));else if(Ai==8){var qn=ae.subarray(an,an+Zn);if(Tn<524288||Zn>.8*Tn)try{gn(null,no(qn,{out:new ue(Tn)}))}catch(Mn){gn(Mn,null)}else Ge.push(xo(qn,{size:Tn},gn))}else gn(Fn(14,"unknown compression type "+Ai,1),null);else gn(null,null)},Ut=0;Ut<ii;++Ut)Ue(Ut)}else Yn(null,{});return Be}function Ar(ae,ce){for(var ne={},Ge=ae.length-22;yn(ae,Ge)!=101010256;--Ge)(!Ge||ae.length-Ge>65558)&&Fn(13);var Be=On(ae,Ge+8);if(!Be)return{};var cn=yn(ae,Ge+16),Yn=cn==4294967295||Be==65535;if(Yn){var Xn=yn(ae,Ge-12);Yn=yn(ae,Xn)==101075792,Yn&&(Be=yn(ae,Xn+32),cn=yn(ae,Xn+48))}for(var ki=ce&&ce.filter,ii=0;ii<Be;++ii){var be=An(ae,cn,Yn),yi=be[0],Te=be[1],un=be[2],Ue=be[3],Ut=be[4],pn=be[5],Ln=on(ae,pn);cn=Ut,(!ki||ki({name:Ue,size:Te,originalSize:un,compression:yi}))&&(yi?yi==8?ne[Ue]=no(ae.subarray(Ln,Ln+Te),{out:new ue(un)}):Fn(14,"unknown compression type "+yi):ne[Ue]=rn(ae,Ln,Ln+Te))}return ne}},12378:function(xn,ze,Qt){"use strict";Qt.d(ze,{$u:function(){return re},BD:function(){return jt},E9:function(){return Ae},FF:function(){return oo},FJ:function(){return pt},Hn:function(){return ct},KX:function(){return bt},NB:function(){return Me},S0:function(){return Fe},UL:function(){return Wt},Vk:function(){return at},Vm:function(){return Oe},YI:function(){return ci},ZA:function(){return ue},Zt:function(){return Ie},al:function(){return Bt},bn:function(){return Lt},bx:function(){return Mt},g2:function(){return Ti},h1:function(){return $t},hD:function(){return Ri},l4:function(){return Ht},rU:function(){return De},s_:function(){return mt},uz:function(){return Xe},z6:function(){return Xt}}),xn=Qt.hmd(xn),function(){var Tt;function Gi(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Vi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Gi(a)}}function xi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Oi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},zi;if(typeof Object.setPrototypeOf=="function")zi=Object.setPrototypeOf;else{var or;t:{var Yr={a:!0},Tr={};try{Tr.__proto__=Yr,or=Tr.a;break t}catch(a){}or=!1}zi=or?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var je=zi;function Je(a,y){if(a.prototype=Oi(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 Ke=typeof Qt.g!="undefined"&&Qt.g!=null?Qt.g:self,Ci=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},Ne=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Qi(a,y){if(y){var x=Ke;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&&Ne(x,a,{writable:!0,value:y})}}Qi("Object.assign",function(a){return a||Ci}),Qi("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 Hn=typeof globalThis=="object"&&globalThis||typeof Qt.g=="object"&&Qt.g.global===Qt.g&&Qt.g||typeof self=="object"&&self.self===self&&self||{};Hn.requestAnimationFrame===void 0&&(Hn.setImmediate===void 0?Hn.requestAnimationFrame=function(a){Hn.setTimeout(a,0)}:Hn.requestAnimationFrame=Hn.setImmediate);function fi(){}function $i(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Hn.clearTimeout(x),x=Mr(function(){x=-1,a.apply(E,b)},y)}}function Mr(a,y){return Hn.setTimeout(a,y)}function Br(a){return Hn.document.createElement(a)}function te(a){throw Error(a)}function ke(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),te(a)}function zn(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),te(x+" is not in the range "+y+": "+a)}function ni(a){Hn.console&&Hn.console.log(a)}function Ye(a){return typeof a=="object"&&a!==null}function Kn(a){return Array.isArray(a)||Hn.NodeList&&a instanceof Hn.NodeList||Hn.HTMLCollection&&a instanceof Hn.HTMLCollection}function _n(a){return Array.prototype.slice.call(a)}function We(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):te("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function on(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):te("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function An(){var a=qr.pop();return a===void 0?[]:a}function Nn(a){a.length=0,qr.push(a)}function Vn(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(Ye(a)&&a.constructor)return Vn(a.constructor);return typeof a}function Yi(a){var y=a;return Ye(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 Li(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 Bi(a,y,x){Object.defineProperty(Eo.prototype,a,{get:y,set:x})}function Ve(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 tr=Hn.navigator!==void 0&&0<Hn.navigator.userAgent.indexOf("Trident/7"),dr=Hn.navigator!==void 0&&Hn.navigator.platform!==void 0&&Hn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,qr=[];Object.freeze([]),fi.className="Util",fi.Dx="32ab5ff3b26f42dc0ed90f21472913b5",fi.adym="gojs.net",fi.vfo="28e645fdb266",fi.className="Util";function hn(a,y,x){cn(this),this.j=a,this.xa=y,this.o=x}hn.prototype.toString=function(){return"EnumValue."+this.xa};function Wn(a,y){return y==null||y===""?null:a[y]}Ke.Object.defineProperties(hn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),hn.className="EnumValue";function Si(){this.ew=[]}Si.prototype.toString=function(){return this.ew.join("")},Si.prototype.add=function(a){a!==""&&this.ew.push(a)},Si.className="StringBuilder";function vi(){}vi.className="PropertyCollection";var mi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Hn.console&&Hn.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 Ii(){}Ii.prototype.reset=function(){},Ii.prototype.next=function(){return!1},Ii.prototype.Ad=function(){return!1},Ii.prototype.first=function(){return null},Ii.prototype.any=function(){return!1},Ii.prototype.all=function(){return!0},Ii.prototype.each=function(){return this},Ii.prototype.map=function(){return this},Ii.prototype.filter=function(){return this},Ii.prototype.de=function(){},Ii.prototype.toString=function(){return"EmptyIterator"},Ke.Object.defineProperties(Ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ii.prototype.first=Ii.prototype.first,Ii.prototype.hasNext=Ii.prototype.Ad,Ii.prototype.next=Ii.prototype.next,Ii.prototype.reset=Ii.prototype.reset;var Wi=null;Ii.className="EmptyIterator",Wi=new Ii;function Ar(a){this.key=-1,this.value=a}Ar.prototype.reset=function(){this.key=-1},Ar.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Ar.prototype.Ad=function(){return this.next()},Ar.prototype.first=function(){return this.key=0,this.value},Ar.prototype.any=function(a){return this.key=-1,a(this.value)},Ar.prototype.all=function(a){return this.key=-1,a(this.value)},Ar.prototype.each=function(a){return this.key=-1,a(this.value),this},Ar.prototype.map=function(a){return new Ar(a(this.value))},Ar.prototype.filter=function(a){return a(this.value)?new Ar(this.value):Wi},Ar.prototype.de=function(){this.value=null},Ar.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ke.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function ae(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ae.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ae.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},ae.prototype.Ad=function(){return this.next()},ae.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},ae.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},ae.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},ae.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},ae.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 ne,a.s=x,a.xb(),a.iterator},ae.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 ne,a.s=x,a.xb(),a.iterator},ae.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ae.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ke.Object.defineProperties(ae.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}}}),ae.prototype.first=ae.prototype.first,ae.prototype.hasNext=ae.prototype.Ad,ae.prototype.next=ae.prototype.next,ae.prototype.reset=ae.prototype.reset,ae.className="ListIterator";function ce(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}ce.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},ce.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)},ce.prototype.Ad=function(){return this.next()},ce.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},ce.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},ce.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},ce.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},ce.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 ne,a.s=x,a.xb(),a.iterator},ce.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 ne,a.s=x,a.xb(),a.iterator},ce.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},ce.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ke.Object.defineProperties(ce.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),ce.prototype.first=ce.prototype.first,ce.prototype.hasNext=ce.prototype.Ad,ce.prototype.next=ce.prototype.next,ce.prototype.reset=ce.prototype.reset,ce.className="ListIteratorBackwards";function ne(a){cn(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&te("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=ne.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"List()#"+Xn(this)},Tt.add=function(a){return a===null?this:(this._isFrozen&&ke(this,a),this.s.push(a),this.xb(),this)},Tt.push=function(a){this.add(a)},Tt.addAll=function(a){if(a===null)return this;this._isFrozen&&ke(this);var y=this.s;if(Kn(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},Tt.clear=function(){this._isFrozen&&ke(this),this.s.length=0,this.xb()},Tt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Tt.has=function(a){return this.contains(a)},Tt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Tt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&zn(a,"0 <= i < length",ne,"elt:i"),y[a]},Tt.get=function(a){return this.M(a)},Tt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&zn(a,"0 <= i < length",ne,"setElt:i"),this._isFrozen&&ke(this,a),x[a]=y},Tt.set=function(a,y){this.cd(a,y)},Tt.first=function(){var a=this.s;return a.length===0?null:a[0]},Tt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Tt.pop=function(){this._isFrozen&&ke(this);var a=this.s;return 0<a.length?a.pop():null},ne.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},ne.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},ne.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},ne.prototype.map=function(a){for(var y=new ne,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},ne.prototype.filter=function(a){for(var y=new ne,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},Tt=ne.prototype,Tt.Gb=function(a,y){0>a&&zn(a,">= 0",ne,"insertAt:i"),this._isFrozen&&ke(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&ke(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)},Tt.delete=function(a){return this.remove(a)},Tt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&zn(a,"0 <= i < length",ne,"removeAt:i"),this._isFrozen&&ke(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Tt.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&&ke(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},ne.prototype.copy=function(){var a=new ne,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Tt=ne.prototype,Tt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Tt.Iv=function(){for(var a=new Be,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Tt.sort=function(a){return this._isFrozen&&ke(this),this.s.sort(a),this.xb(),this},Tt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&ke(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&zn(y,"0 <= from < length",ne,"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},Tt.reverse=function(){return this._isFrozen&&ke(this),this.s.reverse(),this.xb(),this},Ke.Object.defineProperties(ne.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 Wi;var a=this.Sa;return a!==null?(a.reset(),a):new ae(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Wi;var a=this.Hg;return a!==null?(a.reset(),a):new ce(this)}}}),ne.prototype.reverse=ne.prototype.reverse,ne.prototype.sortRange=ne.prototype.zi,ne.prototype.sort=ne.prototype.sort,ne.prototype.toSet=ne.prototype.Iv,ne.prototype.toArray=ne.prototype.Fa,ne.prototype.removeRange=ne.prototype.removeRange,ne.prototype.removeAt=ne.prototype.mb,ne.prototype.delete=ne.prototype.delete,ne.prototype.remove=ne.prototype.remove,ne.prototype.insertAt=ne.prototype.Gb,ne.prototype.pop=ne.prototype.pop,ne.prototype.last=ne.prototype.jc,ne.prototype.first=ne.prototype.first,ne.prototype.set=ne.prototype.set,ne.prototype.setElt=ne.prototype.cd,ne.prototype.get=ne.prototype.get,ne.prototype.elt=ne.prototype.M,ne.prototype.indexOf=ne.prototype.indexOf,ne.prototype.has=ne.prototype.has,ne.prototype.contains=ne.prototype.contains,ne.prototype.clear=ne.prototype.clear,ne.prototype.addAll=ne.prototype.addAll,ne.prototype.push=ne.prototype.push,ne.prototype.add=ne.prototype.add,ne.prototype.thaw=ne.prototype.ka,ne.prototype.freeze=ne.prototype.freeze,ne.className="List";function Ge(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ge.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ge.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)},Ge.prototype.Ad=function(){return this.next()},Ge.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},Ge.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},Ge.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},Ge.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},Ge.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ge.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ge.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ge.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ke.Object.defineProperties(Ge.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ge.prototype.first=Ge.prototype.first,Ge.prototype.hasNext=Ge.prototype.Ad,Ge.prototype.next=Ge.prototype.next,Ge.prototype.reset=Ge.prototype.reset,Ge.className="SetIterator";function Be(a){cn(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&te("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=Be.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Set()#"+Xn(this)},Tt.add=function(a){if(a===null)return this;this._isFrozen&&ke(this,a);var y=a;return Ye(a)&&(y=Yn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Te(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},Tt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&ke(this),Kn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Tt.contains=function(a){if(a===null)return!1;var y=a;return Ye(a)&&(y=Xn(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Tt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Tt.first=function(){var a=this.ea;return a===null?null:a.value},Be.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Be.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Be.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Be.prototype.map=function(a){for(var y=new Be,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Be.prototype.filter=function(a){for(var y=new Be,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Tt=Be.prototype,Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&ke(this,a);var y=a;if(Ye(a)&&(y=Xn(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},Tt.delete=function(a){return this.remove(a)},Tt.hp=function(a){if(a===null)return this;if(this._isFrozen&&ke(this),Kn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Tt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&ke(this);var y=new Be;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},Tt.clear=function(){this._isFrozen&&ke(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Be.prototype.copy=function(){var a=new Be,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Be.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},Be.prototype.Hv=function(){var a=new ne,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function cn(a){a.__gohashid=ki++}function Yn(a){var y=a.__gohashid;return y===void 0&&(y=ki++,a.__gohashid=y),y}function Xn(a){return a.__gohashid}Ke.Object.defineProperties(Be.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Wi;var a=this.Sa;return a!==null?(a.reset(),a):new Ge(this)}}}),Be.prototype.toList=Be.prototype.Hv,Be.prototype.toArray=Be.prototype.Fa,Be.prototype.clear=Be.prototype.clear,Be.prototype.retainAll=Be.prototype.pA,Be.prototype.removeAll=Be.prototype.hp,Be.prototype.delete=Be.prototype.delete,Be.prototype.remove=Be.prototype.remove,Be.prototype.first=Be.prototype.first,Be.prototype.containsAny=Be.prototype.Ty,Be.prototype.containsAll=Be.prototype.Sy,Be.prototype.has=Be.prototype.has,Be.prototype.contains=Be.prototype.contains,Be.prototype.addAll=Be.prototype.addAll,Be.prototype.add=Be.prototype.add,Be.prototype.thaw=Be.prototype.ka,Be.prototype.freeze=Be.prototype.freeze;var ki=1;Be.className="Set",Be.uniqueHash=cn,Be.hashIdUnique=Yn,Be.hashId=Xn;function ii(a){this.ma=a,this.qa=a.Ja,this.sa=null}ii.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ii.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)},ii.prototype.Ad=function(){return this.next()},ii.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},ii.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},ii.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},ii.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},ii.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ii.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},ii.prototype.de=function(){this.value=this.key=null,this.qa=-1},ii.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ke.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="MapKeySetIterator";function be(a){Be.call(this),cn(this),this._isFrozen=!0,this.ma=a}Je(be,Be),Tt=be.prototype,Tt.freeze=function(){return this},Tt.ka=function(){return this},Tt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Tt.add=function(){te("This Set is read-only: "+this.toString())},Tt.contains=function(a){return this.ma.contains(a)},Tt.has=function(a){return this.contains(a)},Tt.remove=function(){te("This Set is read-only: "+this.toString())},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){te("This Set is read-only: "+this.toString())},Tt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},be.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},be.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},be.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},be.prototype.map=function(a){for(var y=new Be,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},be.prototype.filter=function(a){for(var y=new Be,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},be.prototype.copy=function(){return new be(this.ma)},be.prototype.Iv=function(){var a=new Be,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},be.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},be.prototype.Hv=function(){var a=new ne,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ke.Object.defineProperties(be.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Wi:new ii(this.ma)}}}),be.prototype.toList=be.prototype.Hv,be.prototype.toArray=be.prototype.Fa,be.prototype.toSet=be.prototype.Iv,be.prototype.first=be.prototype.first,be.prototype.clear=be.prototype.clear,be.prototype.delete=be.prototype.delete,be.prototype.remove=be.prototype.remove,be.prototype.has=be.prototype.has,be.prototype.contains=be.prototype.contains,be.prototype.add=be.prototype.add,be.prototype.thaw=be.prototype.ka,be.prototype.freeze=be.prototype.freeze,be.className="MapKeySet";function yi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}yi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},yi.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)},yi.prototype.Ad=function(){return this.next()},yi.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},yi.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},yi.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},yi.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},yi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},yi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},yi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},yi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ke.Object.defineProperties(yi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),yi.prototype.first=yi.prototype.first,yi.prototype.hasNext=yi.prototype.Ad,yi.prototype.next=yi.prototype.next,yi.prototype.reset=yi.prototype.reset,yi.className="MapValueSetIterator";function Te(a,y){this.key=a,this.value=y,this.ll=this.va=null}Te.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Te.className="KeyValuePair";function un(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}un.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},un.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)},un.prototype.Ad=function(){return this.next()},un.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},un.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},un.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},un.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},un.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},un.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},un.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},un.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ke.Object.defineProperties(un.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),un.prototype.first=un.prototype.first,un.prototype.hasNext=un.prototype.Ad,un.prototype.next=un.prototype.next,un.prototype.reset=un.prototype.reset,un.className="MapIterator";function Ue(a){cn(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"&&te("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=Ue.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Map()#"+Xn(this)},Tt.add=function(a,y){this._isFrozen&&ke(this,a);var x=a;Ye(a)&&(x=Yn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Te(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},Tt.set=function(a,y){return this.add(a,y)},Tt.addAll=function(a){if(a===null)return this;if(Kn(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 Ue)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},Tt.first=function(){return this.ea},Ue.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ue.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ue.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ue.prototype.map=function(a){for(var y=new Ue,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ue.prototype.filter=function(a){for(var y=new Ue,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Tt=Ue.prototype,Tt.contains=function(a){var y=a;return Ye(a)&&(y=Xn(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.I=function(a){var y=a;return Ye(a)&&(y=Xn(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Tt.get=function(a){return this.I(a)},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&ke(this,a);var y=a;if(Ye(a)&&(y=Xn(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},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){this._isFrozen&&ke(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()},Ue.prototype.copy=function(){var a=new Ue,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Ue.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 Te(b.key,b.value),x++}return y},Ue.prototype.Lf=function(){return new be(this)},Ke.Object.defineProperties(Ue.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Wi;var a=this.Sa;return a!==null?(a.reset(),a):new un(this)}},iteratorKeys:{get:function(){return 0>=this.count?Wi:new ii(this)}},iteratorValues:{get:function(){if(0>=this.count)return Wi;var a=this.jf;return a!==null?(a.reset(),a):new yi(this)}}}),Ue.prototype.toKeySet=Ue.prototype.Lf,Ue.prototype.toArray=Ue.prototype.Fa,Ue.prototype.clear=Ue.prototype.clear,Ue.prototype.delete=Ue.prototype.delete,Ue.prototype.remove=Ue.prototype.remove,Ue.prototype.get=Ue.prototype.get,Ue.prototype.getValue=Ue.prototype.I,Ue.prototype.has=Ue.prototype.has,Ue.prototype.contains=Ue.prototype.contains,Ue.prototype.first=Ue.prototype.first,Ue.prototype.addAll=Ue.prototype.addAll,Ue.prototype.set=Ue.prototype.set,Ue.prototype.add=Ue.prototype.add,Ue.prototype.thaw=Ue.prototype.ka,Ue.prototype.freeze=Ue.prototype.freeze,Ue.className="Map";function Ut(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):te("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var pn,Ln,Ai,Zn,Tn;Ut.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Ut.prototype.h=function(a,y){return this.x=a,this.y=y,this},Ut.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Ut.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Ut.prototype.copy=function(){var a=new Ut;return a.x=this.x,a.y=this.y,a},Tt=Ut.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this};function dn(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 Ut(x,b)}return new Ut}function qe(a){return a.x.toString()+" "+a.y.toString()}Tt.toString=function(){return"Point("+this.x+","+this.y+")"},Tt.D=function(a){return a instanceof Ut?this.x===a.x&&this.y===a.y:!1},Tt.hi=function(a,y){return this.x===a&&this.y===y},Tt.Xa=function(a){return we.B(this.x,a.x)&&we.B(this.y,a.y)},Tt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Tt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Ut.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},Tt=Ut.prototype,Tt.scale=function(a,y){return this.x*=a,this.y*=y,this},Tt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Tt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Tt.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},Tt.ab=function(a){return fn(a.x-this.x,a.y-this.y)},Tt.direction=function(a,y){return fn(a-this.x,y-this.y)};function fn(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}Tt.Ry=function(a,y){return we.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Tt.fA=function(a,y,x,E){return we.qh(a,y,x,E,this.x,this.y,this),this},Tt.gA=function(a,y){return we.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Tt.uA=function(a,y,x,E){return we.No(this.x,this.y,a,y,x,E,this),this},Tt.vA=function(a,y){return we.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Tt.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},Tt.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},Tt.transform=function(a){return a.Ga(this),this};function an(a,y){return y.Cd(a),a}function gn(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 qn(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Mn(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)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Ut.alloc=function(){var a=Un.pop();return a===void 0?new Ut:a},Ut.allocAt=function(a,y){var x=Un.pop();return x===void 0?new Ut(a,y):(x.x=a,x.y=y,x)},Ut.free=function(a){Un.push(a)},Ut.prototype.isReal=Ut.prototype.w,Ut.prototype.setSpot=Ut.prototype.yi,Ut.prototype.setRectSpot=Ut.prototype.xi,Ut.prototype.snapToGridPoint=Ut.prototype.vA,Ut.prototype.snapToGrid=Ut.prototype.uA,Ut.prototype.projectOntoLineSegmentPoint=Ut.prototype.gA,Ut.prototype.projectOntoLineSegment=Ut.prototype.fA,Ut.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return we.Rl(a,y,x,E,b,z,tt,rt)},Ut.prototype.compareWithLineSegmentPoint=Ut.prototype.Ry,Ut.compareWithLineSegment=function(a,y,x,E,b,z){return we.Fl(a,y,x,E,b,z)},Ut.prototype.direction=Ut.prototype.direction,Ut.prototype.directionPoint=Ut.prototype.ab,Ut.prototype.normalize=Ut.prototype.normalize,Ut.prototype.distanceSquared=Ut.prototype.zd,Ut.prototype.distanceSquaredPoint=Ut.prototype.Bf,Ut.prototype.scale=Ut.prototype.scale,Ut.prototype.rotate=Ut.prototype.rotate,Ut.prototype.offset=Ut.prototype.offset,Ut.prototype.subtract=Ut.prototype.re,Ut.prototype.add=Ut.prototype.add,Ut.prototype.equalsApprox=Ut.prototype.Xa,Ut.prototype.equalTo=Ut.prototype.hi,Ut.prototype.equals=Ut.prototype.D,Ut.prototype.set=Ut.prototype.set,Ut.prototype.setTo=Ut.prototype.sg;var Un=[];Ut.className="Point",Ut.parse=dn,Ut.stringify=qe,Ut.distanceLineSegmentSquared=gn,Ut.distanceSquared=qn,Ut.direction=Mn,Ut.Origin=pn=new Ut(0,0).ja(),Ut.InfiniteTopLeft=Ln=new Ut(-1/0,-1/0).ja(),Ut.InfiniteBottomRight=Ai=new Ut(1/0,1/0).ja(),Ut.SixPoint=Zn=new Ut(6,6).ja(),Ut.NoPoint=Tn=new Ut(NaN,NaN).ja(),Ut.parse=dn,Ut.stringify=qe,Ut.distanceLineSegmentSquared=gn,Ut.distanceSquared=qn,Ut.direction=Mn;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):te("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var si,Mi,er,Hi,Fr,wr,Qr;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},Tt=ln.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this};function Or(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 Lr(a){return a.width.toString()+" "+a.height.toString()}Tt.toString=function(){return"Size("+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof ln?this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y){return this.width===a&&this.height===y},Tt.Xa=function(a){return we.B(this.width,a.width)&&we.B(this.height,a.height)},Tt.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},Tt.w=function(){return isFinite(this.width)&&isFinite(this.height)},ln.alloc=function(){var a=Xr.pop();return a===void 0?new ln:a},ln.free=function(a){Xr.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 Xr=[];ln.className="Size",ln.parse=Or,ln.stringify=Lr,ln.ZeroSize=si=new ln(0,0).ja(),ln.OneSize=Mi=new ln(1,1).ja(),ln.SixSize=er=new ln(6,6).ja(),ln.EightSize=Hi=new ln(8,8).ja(),ln.TenSize=Fr=new ln(10,10).ja(),ln.InfiniteSize=wr=new ln(1/0,1/0).ja(),ln.NoSize=Qr=new ln(NaN,NaN).ja(),ln.parse=Or,ln.stringify=Lr;function He(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 Ut?(x=a.x,a=a.y,y instanceof Ut?(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):te("Incorrect second argument supplied to Rect constructor "+y)):te("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Tt=He.prototype,Tt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function xr(a,y,x){a.width=y,a.height=x}Tt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Tt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.dd=function(a){return this.x=a.x,this.y=a.y,this},Tt.tA=function(a){return this.width=a.width,this.height=a.height,this},He.prototype.copy=function(){var a=new He;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Tt=He.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ur(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var 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 He(x,b,z,tt)}return new He}function nr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Tt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof He?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Tt.Xa=function(a){return we.B(this.x,a.x)&&we.B(this.y,a.y)&&we.B(this.width,a.width)&&we.B(this.height,a.height)};function kr(a,y){return we.$(a.x,y.x)&&we.$(a.y,y.y)&&we.$(a.width,y.width)&&we.$(a.height,y.height)}Tt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Tt.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},Tt.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},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.Bc=function(a,y){return gr(this,y,a,y,a)},Tt.Co=function(a){return gr(this,a.top,a.right,a.bottom,a.left)},Tt.Fv=function(a){return gr(this,-a.top,-a.right,-a.bottom,-a.left)},Tt.Hz=function(a,y,x,E){return gr(this,a,y,x,E)};function gr(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}Tt.Ex=function(a){return co(this,a.x,a.y,a.width,a.height)},Tt.Uu=function(a,y,x,E){return co(this,a,y,x,E)};function co(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}Tt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Tt.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 io(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))}Tt.Ye=function(a){return Pr(this,a.x,a.y,0,0)},Tt.ed=function(a){return Pr(this,a.x,a.y,a.width,a.height)},Tt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Pr(this,a,y,x,E)};function Pr(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}Tt.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 vo(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 ks(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Tt.Mz=function(){return this.width===0&&this.height===0},He.alloc=function(){var a=Ks.pop();return a===void 0?new He:a},He.allocAt=function(a,y,x,E){var b=Ks.pop();return b===void 0?new He(a,y,x,E):b.h(a,y,x,E)},He.free=function(a){Ks.push(a)},Ke.Object.defineProperties(He.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 Ut(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 Ut(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}}}),He.prototype.isEmpty=He.prototype.Mz,He.prototype.isReal=He.prototype.w,He.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return we.Fx(a,y,x,E,b,z,tt,rt)},He.prototype.setSpot=He.prototype.yi,He.prototype.union=He.prototype.Kv,He.prototype.unionRect=He.prototype.ed,He.prototype.unionPoint=He.prototype.Ye,He.prototype.intersects=He.prototype.Vu,He.prototype.intersectsRect=He.prototype.Yc,He.prototype.intersect=He.prototype.Uu,He.prototype.intersectRect=He.prototype.Ex,He.prototype.grow=He.prototype.Hz,He.prototype.subtractMargin=He.prototype.Fv,He.prototype.addMargin=He.prototype.Co,He.prototype.inflate=He.prototype.Bc,He.prototype.offset=He.prototype.offset,He.prototype.contains=He.prototype.contains,He.prototype.containsRect=He.prototype.Re,He.prototype.containsPoint=He.prototype.ca,He.prototype.equalsApprox=He.prototype.Xa,He.prototype.equalTo=He.prototype.hi,He.prototype.equals=He.prototype.D,He.prototype.setSize=He.prototype.tA,He.prototype.setPoint=He.prototype.dd,He.prototype.set=He.prototype.set,He.prototype.setTo=He.prototype.sg;var us=null,Da=null,Ks=[];He.className="Rect",He.parse=Ur,He.stringify=nr,He.contains=vo,He.intersects=ks,He.ZeroRect=us=new He(0,0,0,0).ja(),He.NoRect=Da=new He(NaN,NaN,NaN,NaN).ja(),He.parse=Ur,He.stringify=nr,He.contains=vo,He.intersects=ks;function ar(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):te("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}ar.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ar.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},ar.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},ar.prototype.copy=function(){var a=new ar;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Tt=ar.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this};function rs(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 ar;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new ar(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new ar(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new ar(x,b):new ar(x,b,z,tt)}return new ar}function os(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Tt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Tt.D=function(a){return a instanceof ar?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Tt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Tt.Xa=function(a){return we.B(this.top,a.top)&&we.B(this.right,a.right)&&we.B(this.bottom,a.bottom)&&we.B(this.left,a.left)},Tt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},ar.alloc=function(){var a=so.pop();return a===void 0?new ar:a},ar.free=function(a){so.push(a)},ar.prototype.isReal=ar.prototype.w,ar.prototype.equalsApprox=ar.prototype.Xa,ar.prototype.equalTo=ar.prototype.hi,ar.prototype.equals=ar.prototype.D,ar.prototype.set=ar.prototype.set,ar.prototype.setTo=ar.prototype.sg;var ji=null,Nr=null,so=[];ar.className="Margin",ar.parse=rs,ar.stringify=os,ar.ZeroMargin=ji=new ar(0,0,0,0).ja(),ar.TwoMargin=Nr=new ar(2,2,2,2).ja(),ar.parse=rs,ar.stringify=os;function di(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 ir,fr,Rr,$r,Bo,rr,So,ao,es,to,Do,Ro,$o,Ls,Go,la,yo,da,za,Sa,Yo,Ia,dl,AA,hA,ws,zu,cA,fa,nl,Ds,ns,ms,Js,lu,ga;di.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},di.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.copy=function(){var a=new di;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Tt=di.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Qo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ir;if(a==="TopLeft")return fr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Rr;if(a==="TopRight")return $r;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Bo;if(a==="Center")return rr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return So;if(a==="BottomLeft")return ao;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return es;if(a==="BottomRight")return to;if(a==="TopSide")return Do;if(a==="LeftSide")return Ro;if(a==="RightSide")return $o;if(a==="BottomSide")return Ls;if(a==="TopBottomSides")return Go;if(a==="LeftRightSides")return la;if(a==="TopLeftSides")return yo;if(a==="TopRightSides")return da;if(a==="BottomLeftSides")return za;if(a==="BottomRightSides")return Sa;if(a==="NotTopSide")return Yo;if(a==="NotLeftSide")return Ia;if(a==="NotRightSide")return dl;if(a==="NotBottomSide")return AA;if(a==="AllSides")return hA;if(a==="Default")return ws;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 di(x,b,z,tt)}return new di}function Co(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Tt.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(ir)?"None":this.D(fr)?"TopLeft":this.D(Rr)?"Top":this.D($r)?"TopRight":this.D(Bo)?"Left":this.D(rr)?"Center":this.D(So)?"Right":this.D(ao)?"BottomLeft":this.D(es)?"Bottom":this.D(to)?"BottomRight":this.D(Do)?"TopSide":this.D(Ro)?"LeftSide":this.D($o)?"RightSide":this.D(Ls)?"BottomSide":this.D(Go)?"TopBottomSides":this.D(la)?"LeftRightSides":this.D(yo)?"TopLeftSides":this.D(da)?"TopRightSides":this.D(za)?"BottomLeftSides":this.D(Sa)?"BottomRightSides":this.D(Yo)?"NotTopSide":this.D(Ia)?"NotLeftSide":this.D(dl)?"NotRightSide":this.D(AA)?"NotBottomSide":this.D(hA)?"AllSides":this.D(ws)?"Default":"None"},Tt.D=function(a){return a instanceof di?(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},Tt.gv=function(){return new di(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Tt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(zu))a=Ro;else if(a.D(cA))a=$o;else if(a.D(fa))a=Do;else if(a.D(nl))a=Ls;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Tt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Tt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Tt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Tt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Tt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},di.alloc=function(){var a=cs.pop();return a===void 0?new di:a},di.free=function(a){cs.push(a)},di.prototype.isDefault=di.prototype.Xb,di.prototype.isNone=di.prototype.ys,di.prototype.isSide=di.prototype.$c,di.prototype.isNoSpot=di.prototype.Mc,di.prototype.isSpot=di.prototype.sb,di.prototype.includesSide=di.prototype.Hf,di.prototype.opposite=di.prototype.gv,di.prototype.equals=di.prototype.D,di.prototype.set=di.prototype.set,di.prototype.setTo=di.prototype.sg;var cs=[];di.className="Spot",di.parse=Qo,di.stringify=Co,di.None=ir=Wo(new di(0,0,0,0),0).ja(),di.Default=ws=Wo(new di(0,0,-1,0),-1).ja(),di.TopLeft=fr=new di(0,0,0,0).ja(),di.TopCenter=Rr=new di(.5,0,0,0).ja(),di.TopRight=$r=new di(1,0,0,0).ja(),di.LeftCenter=Bo=new di(0,.5,0,0).ja(),di.Center=rr=new di(.5,.5,0,0).ja(),di.RightCenter=So=new di(1,.5,0,0).ja(),di.BottomLeft=ao=new di(0,1,0,0).ja(),di.BottomCenter=es=new di(.5,1,0,0).ja(),di.BottomRight=to=new di(1,1,0,0).ja(),di.MiddleTop=Ds=Rr,di.MiddleLeft=ns=Bo,di.MiddleRight=ms=So,di.MiddleBottom=Js=es,di.Top=fa=Rr,di.Left=zu=Bo,di.Right=cA=So,di.Bottom=nl=es,di.TopSide=Do=Wo(new di(0,0,1,1),1).ja(),di.LeftSide=Ro=Wo(new di(0,0,1,2),1).ja(),di.RightSide=$o=Wo(new di(0,0,1,4),1).ja(),di.BottomSide=Ls=Wo(new di(0,0,1,8),1).ja(),di.TopBottomSides=Go=Wo(new di(0,0,1,9),1).ja(),di.LeftRightSides=la=Wo(new di(0,0,1,6),1).ja(),di.TopLeftSides=yo=Wo(new di(0,0,1,3),1).ja(),di.TopRightSides=da=Wo(new di(0,0,1,5),1).ja(),di.BottomLeftSides=za=Wo(new di(0,0,1,10),1).ja(),di.BottomRightSides=Sa=Wo(new di(0,0,1,12),1).ja(),di.NotTopSide=Yo=Wo(new di(0,0,1,14),1).ja(),di.NotLeftSide=Ia=Wo(new di(0,0,1,13),1).ja(),di.NotRightSide=dl=Wo(new di(0,0,1,11),1).ja(),di.NotBottomSide=AA=Wo(new di(0,0,1,7),1).ja(),di.AllSides=hA=Wo(new di(0,0,1,15),1).ja(),lu=new di(.156,.156).ja(),ga=new di(.844,.844).ja(),di.parse=Qo,di.stringify=Co;function Xi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Xi.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},Xi.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},Xi.prototype.copy=function(){var a=new Xi;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},Xi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Xi.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},Xi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Xi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Xi.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},Xi.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},Xi.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},Xi.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},Tt=Xi.prototype,Tt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Tt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Tt.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)},Tt.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))},Tt.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))},Tt.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,ut=this.dy,ft=y*z+x*rt+lt,yt=y*tt+x*ot+ut,Et=E*z+x*rt+lt,kt=E*tt+x*ot+ut;return x=y*z+b*rt+lt,y=y*tt+b*ot+ut,z=E*z+b*rt+lt,E=E*tt+b*ot+ut,b=Math.min(ft,Et),ft=Math.max(ft,Et),Et=Math.min(yt,kt),yt=Math.max(yt,kt),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},Xi.alloc=function(){var a=qs.pop();return a===void 0?new Xi:a},Xi.free=function(a){qs.push(a)},Xi.prototype.transformRect=Xi.prototype.pp,Xi.prototype.transformPoint=Xi.prototype.Ga,Xi.prototype.scale=Xi.prototype.scale,Xi.prototype.translate=Xi.prototype.translate,Xi.prototype.rotate=Xi.prototype.rotate,Xi.prototype.invert=Xi.prototype.Vj,Xi.prototype.multiplyInverted=Xi.prototype.bv,Xi.prototype.multiply=Xi.prototype.multiply,Xi.prototype.reset=Xi.prototype.reset,Xi.prototype.isIdentity=Xi.prototype.ws,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.setTransform=Xi.prototype.setTransform,Xi.prototype.set=Xi.prototype.set;var qs=[];Xi.className="Transform",Xi.xF="54a702f3e53909c447824c6706603faf4c";var we={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=we.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);we.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,ut=E;else lt=E,ut=y;if(a===x)return lt<=tt&&tt<=ut&&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&&(ut+=b,lt-=b,lt<=tt&&tt<=ut))if(ot-rt>ut-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,ut,ft){if(we.Yb(a,y,tt,rt,ft,x,E)&&we.Yb(a,y,tt,rt,ft,b,z))return we.Yb(a,y,tt,rt,ft,lt,ut);var yt=(a+x)/2,Et=(y+E)/2,kt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+kt)/2,x=(Et+Dt)/2,kt=(kt+b)/2,Dt=(Dt+z)/2;var Jt=(E+kt)/2,zt=(x+Dt)/2;return we.cs(a,y,yt,Et,E,x,Jt,zt,ot,lt,ut,ft)||we.cs(Jt,zt,kt,Dt,b,z,tt,rt,ot,lt,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var lt=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+lt)/2+(lt+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(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 Mn(((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(we.Yb(a,y,tt,rt,ot,x,E)&&we.Yb(a,y,tt,rt,ot,b,z))Pr(lt,a,y,0,0),Pr(lt,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var kt=(E+yt)/2,Dt=(x+Et)/2;we.Dl(a,y,ut,ft,E,x,kt,Dt,ot,lt),we.Dl(kt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(we.Yb(a,y,tt,rt,ot,x,E)&&we.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 ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var kt=(E+yt)/2,Dt=(x+Et)/2;we.Qe(a,y,ut,ft,E,x,kt,Dt,ot,lt),we.Qe(kt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(we.Yb(a,y,b,z,lt,x,E))return we.Yb(a,y,b,z,lt,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var yt=(ut+x)/2,Et=(ft+E)/2;return we.jv(a,y,ut,ft,yt,Et,tt,rt,ot,lt)||we.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(we.Yb(a,y,b,z,tt,x,E))Pr(rt,a,y,0,0),Pr(rt,b,z,0,0);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(lt+E)/2;we.iv(a,y,ot,lt,ut,ft,tt,rt),we.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(we.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 ut=(ot+x)/2,ft=(lt+E)/2;we.ep(a,y,ot,lt,ut,ft,tt,rt),we.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt,Et){if(we.Yb(a,y,tt,rt,yt,x,E)&&we.Yb(a,y,tt,rt,yt,b,z))return!we.Rl(a,y,tt,rt,ot,lt,ut,ft)||(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)?!1:(Et.h(((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt),!0);var kt=(a+x)/2,Dt=(y+E)/2,Jt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(kt+Jt)/2,x=(Dt+zt)/2,Jt=(Jt+b)/2,zt=(zt+z)/2;var se=(E+Jt)/2,he=(x+zt)/2,ge=1/0,ve=!1,_e=0,jn=0;return we.Eo(a,y,kt,Dt,E,x,se,he,ot,lt,ut,ft,yt,Et)&&(a=(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt),a<ge&&(ge=a,ve=!0,_e=Et.x,jn=Et.y)),we.Eo(se,he,Jt,zt,b,z,tt,rt,ot,lt,ut,ft,yt,Et)&&(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt)<ge&&(ve=!0,_e=Et.x,jn=Et.y),ve&&(Et.x=_e,Et.y=jn),ve},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt){var Et=0;if(we.Yb(a,y,tt,rt,yt,x,E)&&we.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)return Et;var kt=((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,Dt=((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt;if(kt>=ut)return Et;if((ot>ut?ot-ut:ut-ot)<(lt>ft?lt-ft:ft-lt)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Dt<ot||Dt>a)return Et}else if(a<tt?(ot=a,a=tt):ot=tt,kt<ot||kt>a)return Et;0<yt?Et++:0>yt&&Et--}else{kt=(a+x)/2,Dt=(y+E)/2;var Jt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(kt+Jt)/2,x=(Dt+zt)/2,Jt=(Jt+b)/2,zt=(zt+z)/2;var se=(E+Jt)/2,he=(x+zt)/2;Et+=we.Fo(a,y,kt,Dt,E,x,se,he,ot,lt,ut,ft,yt),Et+=we.Fo(se,he,Jt,zt,b,z,tt,rt,ot,lt,ut,ft,yt)}return Et},qh:function(a,y,x,E,b,z,tt){return we.$(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)):we.$(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 we.B(a,x)&&we.B(y,E)?(ot.h(a,y),!1):we.$(b,tt)?we.$(a,x)?(we.qh(a,y,x,E,b,z,ot),!1):we.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),we.$(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),we.$(rt,tt)?(we.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),we.$(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)):we.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return we.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 ut(Jt,zt){var se=(Jt-a)*(Jt-a)+(zt-y)*(zt-y);se<ft&&(ft=se,ot.h(Jt,zt))}var ft=1/0;ut(ot.x,ot.y);var yt=0,Et=0,kt=0,Dt=0;if(b<tt?(yt=b,Et=tt):(yt=tt,Et=b),z<rt?(kt=b,Dt=tt):(kt=tt,Dt=b),yt=(Et-yt)/2+lt,lt=(Dt-kt)/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,ut(x,lt*yt+z),ut(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),ut(lt,x*lt-x*a+y),yt=(-rt-yt)/(2*E),ut(yt,x*yt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var lt=1e21,ut=a,ft=y;if(we.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,ut=ot.x,ft=ot.y)}return we.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,ut=ot.x,ft=ot.y)),we.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,ut=ot.x,ft=ot.y)),we.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,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>lt},us:function(a,y,x){return we.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):!!(vo(a,y,x,E,b,z)||vo(a,y,x,E,tt,rt)||we.Rl(a,y,ot,y,b,z,tt,rt)||we.Rl(ot,y,ot,lt,b,z,tt,rt)||we.Rl(ot,lt,a,lt,b,z,tt,rt)||we.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>=we.Fl(a,y,x,E,b,z)*we.Fl(a,y,x,E,tt,rt)&&0>=we.Fl(b,z,tt,rt,a,y)*we.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(we.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,ut=lt+tt*tt+ot*rt;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(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),we.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 ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)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 vi,um:new vi,Mf:new vi,Nf:0,vm:100};we.za=we.AA;function bn(a){cn(this),this.l=2,a===void 0&&(a=bn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===bn.o?this.ee=new ne:(bn.V===null&&(bn.V=new ne().freeze()),this.ee=bn.V),this.aq=this.ee.Ja,this.Ip=new He().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=fr,this.gg=to,this.Rk=this.Sk=NaN,this.Uf=Pn}bn.prototype.copy=function(){var a=new bn;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===bn.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},bn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},bn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==bn.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},bn.prototype.ka=function(){if(Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==bn.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},bn.prototype.Xa=function(a){if(!(a instanceof bn))return!1;if(this.type!==a.type)return this.type===bn.j&&a.type===bn.o?El(this,a):a.type===bn.j&&this.type===bn.o?El(a,this):!1;if(this.type===bn.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 we.B(this.startX,a.startX)&&we.B(this.startY,a.startY)&&we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)};function El(a,y){return a.type!==bn.j||y.type!==bn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&we.B(a.startX,y.startX)&&we.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===wo&&we.B(a.endX,y.endX)&&we.B(a.endY,y.endY))))}bn.ia=function(a){return a.toString()},bn.prototype.qb=function(a){a.classType===bn&&(this.type=a)},bn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bn.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 bn.u:var y=new He(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 bn.F:if(y=new He(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 bn.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()}},bn.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},bn.parse=function(a,y){function x(){return Dt>=ge-1?!0:lt[Dt+1].match(ve)!==null}function E(){return Dt++,lt[Dt]}function b(lr){var qi=parseFloat(E()),eo=parseFloat(E());Jt===Jt.toLowerCase()&&(qi=he.x+qi,eo=he.y+eo),lr.h(qi,eo)}function z(){return b(he),he}function tt(){return b(se),se}function rt(){var lr=zt.toLowerCase();return lr!=="c"&&lr!=="s"&&lr!=="q"&&lr!=="t"?he:new Ut(2*he.x-se.x,2*he.y-se.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 ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=An();for(var ft="",yt=!1,Et=0;Et<ut.length;Et++){var kt=ut[Et];kt!=="."||yt?kt==="."?(ot.push(ft),ft="."):ft+=kt:(yt=!0,ft+=kt)}for(ot.push(ft),lt.splice(a,1),ut=0;ut<ot.length;ut++)lt.splice(a+ut,0,ot[ut]);a+=ot.length-1,Nn(ot)}}var Dt=-1,Jt="",zt="";ot=new Ut(0,0);var se=new Ut(0,0),he=new Ut(0,0),ge=lt.length;a=Dy(null),yt=ft=ut=!1,Et=!0,kt=null;for(var ve=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Dt>=ge-1);)if(zt=Jt,Jt=E(),Jt!=="")switch(Jt.toUpperCase()){case"X":Et=!0,ft=ut=!1;break;case"M":for(kt=z(),a.mc===null||Et===!0?(Pg(a,kt.x,kt.y,ut,!ft,yt),Et=!1):a.moveTo(kt.x,kt.y),ot.assign(he);!x();)kt=z(),a.lineTo(kt.x,kt.y);break;case"L":for(;!x();)kt=z(),a.lineTo(kt.x,kt.y);break;case"H":for(;!x();)he=new Ut((Jt===Jt.toLowerCase()?he.x:0)+parseFloat(E()),he.y),a.lineTo(he.x,he.y);break;case"V":for(;!x();)he=new Ut(he.x,(Jt===Jt.toLowerCase()?he.y:0)+parseFloat(E())),a.lineTo(he.x,he.y);break;case"C":for(;!x();){kt=new Ut,b(kt);var _e=tt(),jn=z();yc(a,kt.x,kt.y,_e.x,_e.y,jn.x,jn.y)}break;case"S":for(;!x();)kt=rt(),_e=tt(),jn=z(),yc(a,kt.x,kt.y,_e.x,_e.y,jn.x,jn.y);break;case"Q":for(;!x();)kt=tt(),_e=z(),m0(a,kt.x,kt.y,_e.x,_e.y);break;case"T":for(;!x();)se=kt=rt(),_e=z(),m0(a,kt.x,kt.y,_e.x,_e.y);break;case"B":for(;!x();){kt=parseFloat(E()),_e=parseFloat(E()),jn=parseFloat(E());var pi=parseFloat(E()),hi=parseFloat(E()),In=hi,vn=!1;x()||(In=parseFloat(E()),x()||(vn=parseFloat(E())!==0)),Jt===Jt.toLowerCase()&&(jn+=he.x,pi+=he.y),a.arcTo(kt,_e,jn,pi,hi,In,vn)}break;case"A":for(;!x();)kt=Math.abs(parseFloat(E())),_e=Math.abs(parseFloat(E())),jn=parseFloat(E()),hi=pi=!1,vn=In=0,In=E(),In.length===1?(pi=!!parseFloat(In),hi=!!parseFloat(E()),In=parseFloat(E())):In.length===2?(pi=!!parseFloat(In[0]),hi=!!parseFloat(In[1]),In=parseFloat(E())):(pi=!!parseFloat(In[0]),hi=!!parseFloat(In[1]),In=parseFloat(In.slice(2))),vn=parseFloat(E()),Jt===Jt.toLowerCase()&&(In=he.x+In,vn=he.y+vn),he.h(In,vn),Mw(a,kt,_e,jn,pi,hi,In,vn);break;case"Z":Lw(a),he.assign(ot);break;case"F":for(kt="",_e=1;lt[Dt+_e];)if(lt[Dt+_e]==="0")yt=!0,_e++;else if(lt[Dt+_e].match(/[Uu]/)!==null)_e++;else if(lt[Dt+_e].match(ve)===null)_e++;else{kt=lt[Dt+_e];break}kt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(kt="",_e=1;lt[Dt+_e];)if(lt[Dt+_e].match(/[Ff]/)!==null)_e++;else if(lt[Dt+_e].match(ve)===null)_e++;else{kt=lt[Dt+_e];break}kt.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},bn.Ha=function(a,y){for(var x=a.length,E=Ut.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}Ut.free(E)},bn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===bn.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},bn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===bn.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),uu(this,a,!1),Pr(a,0,0,0,0),a.freeze()},bn.prototype.ix=function(){var a=new He;return uu(this,a,!0),a};function uu(a,y,x){switch(a.type){case bn.j:case bn.u:case bn.F:x?y.h(a.od,a.pd,0,0):Pr(y,a.od,a.pd,0,0),Pr(y,a.Dc,a.Ec,0,0);break;case bn.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):Pr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,lt=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case wo:case vs:ot=ft.endX,lt=ft.endY,Pr(y,ot,lt,0,0);break;case Ss:we.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 Ua:we.iv(ot,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case ss:case rl:var yt=ft.type===ss?Ba(ft,z):il(ft,z,ot,lt),Et=yt.length;if(Et===0){ot=ft.type===ss?ft.centerX:ft.endX,lt=ft.type===ss?ft.centerY:ft.endY,Pr(y,ot,lt,0,0);break}ft=null;for(var kt=0;kt<Et;kt++)ft=yt[kt],we.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:te("Unknown Segment type: "+ft.type)}}}break;default:te("Unknown Geometry type: "+a.type)}}bn.prototype.normalize=function(){this._isFrozen&&ke(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ut(-a.x,-a.y)},bn.prototype.offset=function(a,y){return this._isFrozen&&ke(this),this.transform(1,0,0,1,a,y),this},bn.prototype.scale=function(a,y){return this._isFrozen&&ke(this),this.transform(a,0,0,y,0,0),this},bn.prototype.rotate=function(a,y,x){this._isFrozen&&ke(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Xi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Xi.free(E),this},Tt=bn.prototype,Tt.transform=function(a,y,x,E,b,z){switch(this.type){case bn.j:case bn.u:case bn.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 bn.o:for(var ot=this.figures.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];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 kt=ft[Et];switch(kt.type){case wo:case vs:tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case Ss:tt=kt.point1X,rt=kt.point1Y,kt.point1X=tt*a+rt*x+b,kt.point1Y=tt*y+rt*E+z,tt=kt.point2X,rt=kt.point2Y,kt.point2X=tt*a+rt*x+b,kt.point2Y=tt*y+rt*E+z,tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case Ua:tt=kt.point1X,rt=kt.point1Y,kt.point1X=tt*a+rt*x+b,kt.point1Y=tt*y+rt*E+z,tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case ss:tt=kt.centerX,rt=kt.centerY,kt.centerX=tt*a+rt*x+b,kt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),kt.startAngle+=tt),0>a&&(kt.startAngle=180-kt.startAngle,kt.sweepAngle=-kt.sweepAngle),0>E&&(kt.startAngle=-kt.startAngle,kt.sweepAngle=-kt.sweepAngle),kt.radiusX*=Math.sqrt(a*a+x*x),kt.radiusY!==void 0&&(kt.radiusY*=Math.sqrt(y*y+E*E));break;case rl:if(tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z,kt.radiusX===0||kt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),kt.xAxisRotation+=tt),0>a&&(kt.xAxisRotation=180-kt.xAxisRotation,kt.isClockwiseArc=!kt.isClockwiseArc),0>E&&(kt.xAxisRotation=-kt.xAxisRotation,kt.isClockwiseArc=!kt.isClockwiseArc),kt.radiusX*=Math.sqrt(a*a+x*x),kt.radiusY*=Math.sqrt(y*y+E*E);break;default:te("Unknown Segment type: "+kt.type)}}}}return this._isInvalidBounds=!0,this},Tt.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 bn.j:return we.Yb(x,E,b,z,y,a.x,a.y);case bn.u:var tt=He.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),He.free(tt),a;case bn.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 bn.o:return is(this,a,y,!0,!1);default:return!1}};function is(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,lt,ut,ft,yt=a.figures.s,Et=yt.length,kt=0;kt<Et;kt++){var Dt=yt[kt],Jt=!Dt.isEvenOdd;if(Dt.isFilled){if(E&&Dt.ca(z,y,x))return!0;var zt=Dt.segments;ot=Dt.startX,lt=Dt.startY;for(var se=ot,he=lt,ge=zt.s,ve=0;ve<=zt.length;ve++){var _e=void 0;if(ve!==zt.length){_e=ge[ve];var jn=_e.type;a=_e.endX,ft=_e.endY}else jn=wo,a=se,ft=he;switch(jn){case vs:if(se=ta(z,y,tt,y,ot,lt,se,he),isNaN(se))return!0;rt+=se,se=a,he=ft;break;case wo:if(ot=ta(z,y,tt,y,ot,lt,a,ft),isNaN(ot))return!0;rt+=ot;break;case Ss:ut=we.Fo(ot,lt,_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Ua:ut=we.Fo(ot,lt,(ot+2*_e.point1X)/3,(lt+2*_e.point1Y)/3,(2*_e.point1X+a)/3,(2*_e.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ss:case rl:jn=_e.type===ss?Ba(_e,Dt):il(_e,Dt,ot,lt);var pi=jn.length;if(pi===0){if(ot=ta(z,y,tt,y,ot,lt,_e.type===ss?_e.centerX:_e.endX,_e.type===ss?_e.centerY:_e.endY),isNaN(ot))return!0;rt+=ot;break}_e=null;for(var hi=0;hi<pi;hi++){if(_e=jn[hi],hi===0){if(ut=ta(z,y,tt,y,ot,lt,_e[0],_e[1]),isNaN(ut))return!0;rt+=ut}ut=we.Fo(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5],_e[6],_e[7],tt,y,z,y,.5),rt+=ut}_e!==null&&(a=_e[6],ft=_e[7]);break;default:te("Unknown Segment type: "+_e.type)}ot=a,lt=ft}if(Jt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Dt.ca(z,y,b?x:x+2))return!0}return!1}function ta(a,y,x,E,b,z,tt,rt){if(we.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 fl(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}Tt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Ut),this.type===bn.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 ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,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+=ut}}return y},Tt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===bn.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},Tt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===bn.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 ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[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+=ut}}return y},Tt.xx=function(a){if(this.type===bn.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=Ut.alloc();return we.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Ut.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===bn.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=Ut.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=lt=0,ft=0;ft<ot;ft++)for(var yt=y[ft],Et=x[ft],kt=yt.length,Dt=0;Dt<kt;Dt+=2){var Jt=yt[Dt],zt=yt[Dt+1];if(Dt!==0){we.qh(lt,ut,Jt,zt,a.x,a.y,E);var se=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);se<b&&(b=se,tt=rt,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-ut)*(E.y-ut))),rt+=Et[(Dt-2)/2]}lt=Jt,ut=zt}return Ut.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function Hl(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===bn.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===bn.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===bn.F){var z=new xs;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new jr(ss);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=Ba(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];we.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(Au(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,ut=lt.length,ft=0;ft<ut;ft++){var yt=lt[ft];switch(yt.type){case vs:4<=E.length&&(y.push(E),x.push(Au(E))),E=[],E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY,rt=tt,ot=z;break;case wo:E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY;break;case Ss:we.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 Ua:we.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case ss:var Et=Ba(yt,b),kt=Et.length;if(kt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Dt=0;Dt<kt;Dt++){var Jt=Et[Dt];we.Qe(tt,z,Jt[2],Jt[3],Jt[4],Jt[5],Jt[6],Jt[7],.5,E),tt=Jt[6],z=Jt[7]}break;case rl:if(Et=il(yt,b,tt,z),kt=Et.length,Dt=yt.endX,Jt=yt.endY,kt===0){E.push(Dt),E.push(Jt),tt=Dt,z=Jt;break}for(Dt=0;Dt<kt;Dt++)Jt=Et[Dt],we.Qe(tt,z,Jt[2],Jt[3],Jt[4],Jt[5],Jt[6],Jt[7],.5,E),tt=Jt[6],z=Jt[7];break;default:te("Segment not of valid type: "+yt.type)}yt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(Au(E)))}}}function Au(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(qn(x,E,tt,rt))),x=tt,E=rt}return y}Tt.add=function(a){return this.ee.add(a),this},Tt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&ke(this),this.fg=new di(a,y,b,z).freeze(),this.gg=new di(x,E,tt,rt).freeze(),this},Ke.Object.defineProperties(bn.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 Hl(this),this.tk}},flattenedLengths:{get:function(){return Hl(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===bn.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===bn.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&&ke(this,a),this.na=a,a===bn.o?this.ee=new ne:(bn.V===null&&(bn.V=new ne().freeze()),this.ee=bn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&ke(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&ke(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&ke(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&ke(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&ke(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&ke(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&ke(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&ke(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),bn.prototype.setSpots=bn.prototype.pm,bn.prototype.add=bn.prototype.add,bn.prototype.getFractionForPoint=bn.prototype.xx,bn.prototype.getPointAndAngleAlongPath=bn.prototype.Qu,bn.prototype.getAngleAlongPath=bn.prototype.wx,bn.prototype.getPointAlongPath=bn.prototype.Pu,bn.prototype.containsPoint=bn.prototype.ca,bn.prototype.transform=bn.prototype.transform,bn.prototype.rotate=bn.prototype.rotate,bn.prototype.scale=bn.prototype.scale,bn.prototype.offset=bn.prototype.offset,bn.prototype.normalize=bn.prototype.normalize,bn.prototype.computeBoundsWithoutOrigin=bn.prototype.ix,bn.prototype.equalsApprox=bn.prototype.Xa,bn.className="Geometry",bn.j=new hn(bn,"Line",0),bn.u=new hn(bn,"Rectangle",1),bn.F=new hn(bn,"Ellipse",2),bn.o=new hn(bn,"Path",3),bn.V=null,bn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",bn.className="Geometry",bn.stringify=bn.ia,bn.fillPath=bn.nb,bn.parse=bn.parse,bn.Line=bn.j,bn.Rectangle=bn.u,bn.Ellipse=bn.F,bn.Path=bn.o;function xs(a,y,x,E,b){cn(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 ne,this.sr=this.pl.Ja,this.fw=null}xs.prototype.copy=function(){var a=new xs;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},Tt=xs.prototype,Tt.Xa=function(a){if(!(a instanceof xs&&we.B(this.startX,a.startX)&&we.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},Tt.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},Tt.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},Tt.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},Tt.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},Tt.add=function(a){return this.pl.add(a),this},Tt.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 ut=rt[lt];switch(ut.type){case vs:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case wo:if(we.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Ss:if(we.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Ua:if(we.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ss:case rl:var ft=ut.type===ss?Ba(ut,this):il(ut,this,E,b),yt=ft.length,Et=ut.type===ss?ut.centerX:ut.endX,kt=ut.type===ss?ut.centerY:ut.endY;if(yt===0){if(we.Yb(E,b,Et,kt,x,a,y))return!0;E=Et,b=kt;break}for(Et=null,kt=0;kt<yt;kt++)if(Et=ft[kt],kt===0&&we.Yb(E,b,Et[0],Et[1],x,a,y)||we.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:te("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&we.Yb(E,b,z,tt,x,a,y))return!0}return!1},Ke.Object.defineProperties(xs.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&&ke(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&ke(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ke(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&ke(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&ke(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&ke(this,a),this.pl=a,this._isInvalidBounds=!0}}}),xs.prototype.add=xs.prototype.add,xs.prototype.equalsApprox=xs.prototype.Xa,xs.className="PathFigure";function jr(a,y,x,E,b,z,tt,rt){cn(this),a===void 0&&(a=wo),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===rl?(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===ss&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ss&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}jr.prototype.copy=function(){var a=new jr;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},Tt=jr.prototype,Tt.Xa=function(a){if(!(a instanceof jr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case vs:case wo:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY);case Ss:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.point1X,a.point1X)&&we.B(this.point1Y,a.point1Y)&&we.B(this.point2X,a.point2X)&&we.B(this.point2Y,a.point2Y);case Ua:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.point1X,a.point1X)&&we.B(this.point1Y,a.point1Y);case ss:return we.B(this.startAngle,a.startAngle)&&we.B(this.sweepAngle,a.sweepAngle)&&we.B(this.centerX,a.centerX)&&we.B(this.centerY,a.centerY)&&we.B(this.radiusX,a.radiusX)&&we.B(this.radiusY,a.radiusY);case rl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&we.B(this.xAxisRotation,a.xAxisRotation)&&we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.radiusX,a.radiusX)&&we.B(this.radiusY,a.radiusY);default:return!1}},Tt.qb=function(a){a.classType===jr&&(this.type=a)},Tt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case vs:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case wo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ss: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 Ua: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 ss: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 rl: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":"")},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.close=function(){return this.isClosed=!0,this};function Ba(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=we.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Xi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),bn.Ha(z,tt),Xi.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 il(a,y,x,E){function b(Dt,Jt,zt,se){return(Dt*se<Jt*zt?-1:1)*Math.acos((Dt*zt+Jt*se)/(Math.sqrt(Dt*Dt+Jt*Jt)*Math.sqrt(zt*zt+se*se)))}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,ut=a.Ec,ft=Math.cos(tt),yt=Math.sin(tt),Et=ft*(x-lt)/2+yt*(E-ut)/2;tt=-yt*(x-lt)/2+ft*(E-ut)/2;var kt=Et*Et/(y*y)+tt*tt/(z*z);return 1<kt&&(y*=Math.sqrt(kt),z*=Math.sqrt(kt)),kt=(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(kt)&&(kt=0),rt=kt*y*tt/z,kt=kt*-z*Et/y,isNaN(rt)&&(rt=0),isNaN(kt)&&(kt=0),x=(x+lt)/2+ft*rt-yt*kt,E=(E+ut)/2+yt*rt+ft*kt,ut=b(1,0,(Et-rt)/y,(tt-kt)/z),ft=(Et-rt)/y,lt=(tt-kt)/z,Et=(-Et-rt)/y,rt=(-tt-kt)/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=we.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Xi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Et),bn.Ha(y,z),Xi.free(z),a.ae=y,a.ae}Ke.Object.defineProperties(jr.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&&ke(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ke(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ke(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ke(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ke(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ke(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ke(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ke(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ke(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&zn(a,">= zero",jr,"radiusX"),this._isFrozen&&ke(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&zn(a,">= zero",jr,"radiusY"),this._isFrozen&&ke(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ke(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&&ke(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&&ke(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&&ke(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&&ke(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),jr.prototype.equalsApprox=jr.prototype.Xa;var vs=new hn(jr,"Move",0),wo=new hn(jr,"Line",1),Ss=new hn(jr,"Bezier",2),Ua=new hn(jr,"QuadraticBezier",3),ss=new hn(jr,"Arc",4),rl=new hn(jr,"SvgArc",4);jr.className="PathSegment",jr.Move=vs,jr.Line=wo,jr.Bezier=Ss,jr.QuadraticBezier=Ua,jr.Arc=ss,jr.SvgArc=rl;function zs(){this.H=null,this.xu=new Ut(0,0).freeze(),this.mt=new Ut(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}zs.prototype.copy=function(){var a=new zs;return this.clone(a)},zs.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},zs.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},zs.prototype.So=function(a,y){var x=this.diagram;return x===null||Yc(x,a,y),y},zs.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Yc(x,a,y),y.assign(x.Ps(y))),y},Ke.Object.defineProperties(zs.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}}}),zs.prototype.getMultiTouchDocumentPoint=zs.prototype.Bz,zs.prototype.getMultiTouchViewPoint=zs.prototype.So,zs.className="InputEvent";function ju(){this.H=null,this.xa="",this.ar=this.Lr=null}ju.prototype.copy=function(){var a=new ju;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},ju.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ke.Object.defineProperties(ju.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}}}),ju.className="DiagramEvent";function Oo(){this.Fm=Io,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Oo.prototype.copy=function(){var a=new Oo;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ye(y)&&typeof y.J=="function"?y.J():y,a},Oo.prototype.qb=function(a){a.classType===Oo&&(this.change=a)},Oo.prototype.toString=function(){var a="";return a=this.change===ea?a+"* ":this.change===Io?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Yi(this.object)),this.oldValue!==null&&(a+=" old: "+Yi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Yi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Oo.prototype.I=function(a){return a?this.oldValue:this.newValue},Oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ke.Object.defineProperties(Oo.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===ea&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Oo.prototype.redo=Oo.prototype.redo,Oo.prototype.canRedo=Oo.prototype.canRedo,Oo.prototype.undo=Oo.prototype.undo,Oo.prototype.canUndo=Oo.prototype.canUndo,Oo.prototype.getParam=Oo.prototype.Dz,Oo.prototype.getValue=Oo.prototype.I,Oo.prototype.clear=Oo.prototype.clear;var ea=new hn(Oo,"Transaction",-1),Io=new hn(Oo,"Property",0),as=new hn(Oo,"Insert",1),ds=new hn(Oo,"Remove",2);Oo.className="ChangedEvent",Oo.Transaction=ea,Oo.Property=Io,Oo.Insert=as,Oo.Remove=ds;function Ms(){this.o=new ne().freeze(),this.xa="",this.j=!1}Ms.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},Ms.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()},Ms.prototype.canUndo=function(){return this.isComplete},Ms.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()}},Ms.prototype.canRedo=function(){return this.isComplete},Ms.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()}},Ms.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ue,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Io&&E.object){var b=y.get(E.object);b||(b=new Ue,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()}},Ke.Object.defineProperties(Ms.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}}}),Ms.prototype.optimize=Ms.prototype.ak,Ms.prototype.redo=Ms.prototype.redo,Ms.prototype.canRedo=Ms.prototype.canRedo,Ms.prototype.undo=Ms.prototype.undo,Ms.prototype.canUndo=Ms.prototype.canUndo,Ms.prototype.clear=Ms.prototype.clear,Ms.className="Transaction";function zo(){this.Pt=new Be,this.Jd=!1,this.u=new ne().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new ne().freeze(),this.hl=new ne,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}zo.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},zo.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},zo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Tt=zo.prototype,Tt.Xw=function(a){this.Pt.add(a)},Tt.Rx=function(a){this.Pt.remove(a)},Tt.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},Tt.eb=function(a){return a===void 0&&(a=""),dA(this,!0,a)},Tt.Kf=function(){return dA(this,!1,"")};function dA(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ni("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}Tt.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()}},zo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},zo.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){ni("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},zo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},zo.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){ni("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},zo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Oo;for(E.change=ea,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},zo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ms);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||ni("Change not within a transaction: "+x.toString()))}},zo.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},Ke.Object.defineProperties(zo.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}}}),zo.prototype.handleChanged=zo.prototype.Tu,zo.prototype.redo=zo.prototype.redo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.discardHistoryAfterIndex=zo.prototype.lx,zo.prototype.rollbackTransaction=zo.prototype.Kf,zo.prototype.commitTransaction=zo.prototype.eb,zo.prototype.startTransaction=zo.prototype.Ea,zo.prototype.removeModel=zo.prototype.Rx,zo.prototype.addModel=zo.prototype.Xw,zo.prototype.clear=zo.prototype.clear,zo.className="UndoManager";function zr(){cn(this),this.H=ku,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new zs,this.Zr=-1}zr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Vn(this.constructor)},zr.prototype.updateAdornments=function(){},zr.prototype.canStart=function(){return this.isEnabled},zr.prototype.doStart=function(){},zr.prototype.doActivate=function(){this.isActive=!0},zr.prototype.doDeactivate=function(){this.isActive=!1},zr.prototype.doStop=function(){},zr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},zr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},zr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},zr.prototype.doMouseMove=function(){},zr.prototype.doMouseUp=function(){this.stopTool()},zr.prototype.doMouseWheel=function(){},zr.prototype.canStartMultiTouch=function(){return!0},zr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ut.allocAt(NaN,NaN)),E=y.So(1,Ut.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}Ut.free(x),Ut.free(E)},zr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ut.allocAt(NaN,NaN)),E=y.So(1,Ut.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 Ut((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}Ut.free(x),Ut.free(E)},zr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},zr.prototype.doKeyUp=function(){},zr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},zr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},zr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(dr?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||(dr?y.meta:y.control)||y.shift||a.clearSelection()}},zr.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,Vu(a,E,x),E.handled};function Vu(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)}}}zr.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}},zr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},zr.prototype.doCurrentObjectChanged=function(){},zr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===TA&&!y.shift||b===ql&&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===TA&&y.shift||b===ql&&!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)}}},zr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},zr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Mr(function(){x.doWaitAfter(E)},a)},zr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Hn.clearTimeout(this.Zr),this.Zr=-1},zr.prototype.doWaitAfter=function(){},zr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Jr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},zr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var 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},Ke.Object.defineProperties(zr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Re&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),zr.prototype.startTransaction=zr.prototype.Ea,zr.className="Tool";function Eo(){zr.call(this),this.name="ToolManager",this.hb=new ne,this.ob=new ne,this.Hb=new ne,this.F=this.V=850,this.o=new ln(2,2).ja(),this.Ha=5e3,this.ia=ql,this.u=ch,this.Mp=this.j=null,this.zj=-1}Je(Eo,zr),Eo.prototype.initializeStandardTools=function(){},Eo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Jr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Eo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===hu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===cu){y.bubbles=!0;return}if(this.gestureBehavior===hu)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===ql?this.mouseWheelBehavior=TA:this.mouseWheelBehavior===TA&&(this.mouseWheelBehavior=ql)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Eo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===cu){y.bubbles=!0;return}if(this.gestureBehavior===hu)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}}Oh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Oh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Eo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Jr&&(y===a||y.rg(a))||this.hideToolTip()},Eo.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()))},Eo.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)},Eo.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 Jr)||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()},Eo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Jr){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 Pu&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Hn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Mr(function(){b.hideToolTip()},a)}},Eo.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}},Eo.prototype.hideToolTip=function(){this.zj!==-1&&(Hn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Jr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Pu&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Eo.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()},Eo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Eo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Eo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Eo.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},Eo.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},Eo.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)},Ke.Object.defineProperties(Eo.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 Jr?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}}}),Eo.prototype.replaceStandardTool=Eo.prototype.gb;var ql=new hn(Eo,"WheelScroll",0),TA=new hn(Eo,"WheelZoom",1),Hh=new hn(Eo,"WheelNone",2),ch=new hn(Eo,"GestureZoom",3),hu=new hn(Eo,"GestureCancel",4),cu=new hn(Eo,"GestureNone",5);Eo.className="ToolManager",Eo.WheelScroll=ql,Eo.WheelZoom=TA,Eo.WheelNone=Hh,Eo.GestureZoom=ch,Eo.GestureCancel=hu,Eo.GestureNone=cu;function _o(){zr.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Ut(NaN,NaN),this.Fr=new Ut,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Be().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Rl;Je(_o,zr),_o.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},_o.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},_o.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,(dr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},_o.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),Us=null,this.isActive=!0,this.tl.set(a.position),dh(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&&ka(a),qc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Us=this,NA=this.diagram,this.doSimulatedDragOut()))};function dh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Qn?(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 gl,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}_o.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},_o.prototype.Pd=function(a){return a===void 0?new qu(pn):this.isGridSnapEnabled?new qu(new Ut(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new qu(a.copy())},_o.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),xu(this),VA(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Rl.count){for(var y=Rl,x=y.length,E=0;E<x;E++){var b=y.M(E);Ho(b),Po(b),xu(b),b.diagram.ug()}y.clear()}Ho(this),this.tl.h(NaN,NaN),NA!==null&&(NA.currentCursor=""),Us=NA=null,Po(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Yh(a,!0)},_o.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function xu(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Wu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function fA(){var a=Us;Po(a),na(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}_o.prototype.doCancel=function(){Po(this),na(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},_o.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},_o.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Su(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")):na(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 Ue,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 Qn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,dh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Po(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 Qn&&(x.value.point=new Ut(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Ho(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 Is(a,y,x){var E=a.diagram,b=a.startPoint,z=Ut.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Ut.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(ka(E),E.hk())}_o.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Bh(E,a,y,this.dragOptions,x)};function na(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 Qn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Sc(E,-b.x,-b.y)}y.bd()}}function pa(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),_l(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=Wu(a,b,E),!a.isActive&&Us===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof ur)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Us===null||(a.doDragOver(y,E),!a.isActive&&Us===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)}_o.prototype.findDragOverObject=function(a){var y=this;return Yu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Jr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},_o.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 Wu(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&&Us===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Bu(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 Bu(a){var y=a.panel;return y!==null?y:a instanceof Di&&!(a instanceof ur)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Zu(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=Ut.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(rr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ut.free(a),tt}function _l(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=Zu(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Zu(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)):Fd(b,tt,z,ot,rt):Fd(b,null,null,null,null)}}}}_o.prototype.doDragOver=function(){};function du(a,y){var x=a.diagram;a.dragsLink&&_l(a,!0),xu(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;qg(a,b,z),z=Bu(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Us!==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||Us!==null){for(a=He.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Jn&&$g(x,E,a);He.free(a)}}}function qg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ur||(x=a.mouseDrop,x!==null&&x(y))}function $g(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 Qn},!0,function(b){return b instanceof Qn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}_o.prototype.doDropOnto=function(){},_o.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()?(Su(this,!1),qc(a,this.copiedParts),Is(this,this.copiedParts,!1),VA(a,this.copiedParts)):this.mayMove()?(Po(this),Is(this,this.draggedParts,!0)):this.mayDragOut()?(Su(this,!1),Is(this,this.copiedParts,!1)):Po(this),pa(this,a.lastInput.documentPoint))}},_o.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?(Po(this),Su(this,!0),qc(a,this.copiedParts),Is(this,this.copiedParts,!1),VA(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,Po(this),this.mayMove()&&(Is(this,this.draggedParts,!0),pa(this,a.lastInput.documentPoint))),this.Ym=!0,du(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&tp(this),a.Ya(),VA(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},_o.prototype.simulatedMouseMove=function(a,y,x){if(Us===null)return!1;var E=Us.diagram;x instanceof Re||(x=null);var b=NA;return x!==b&&(b!==null&&b!==E&&(b.ug(),Us.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),NA=x,x!==null&&x!==E&&(fA(),b=x.toolManager.findTool("Dragging"),b!==null&&(Rl.contains(b)||Rl.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)},_o.prototype.simulatedMouseUp=function(a,y,x){if(Us===null)return!1;var E=NA,b=Us.diagram;if(x===null)return Us.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Us.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;NA=x,E=x.toolManager.findTool("Dragging"),E!==null&&(fA(),Rl.contains(E)||Rl.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 Ut),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=Us,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function tp(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())}}_o.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(dr?!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())},_o.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())},_o.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())},_o.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},_o.prototype.Az=function(){return Us},_o.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Us;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},_o.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Qa(a),a.animationManager.Cc(),a=Us,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},_o.prototype.doSimulatedDragLeave=function(){var a=Us;a!==null&&a.doSimulatedDragOut(),this.doCancel()},_o.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Us;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;sg(this,y.draggedParts.Lf(),!1,a.firstInput),Is(this,this.copiedParts,!1),pa(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},_o.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Us;if(y!==null){var x=y.diagram;if(y.Ym=!0,Po(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),sg(this,y.draggedParts.Lf(),!0,a.lastInput),Is(this,this.copiedParts,!1);var E=new Be;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),du(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 sg(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=He.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 ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<E&&(E=lt),ut<b&&(b=ut),lt>tt&&(tt=lt),ut>rt&&(rt=ut))}}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,He.free(z),z=a.Fr,tt=new Ue,rt=Ut.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof Qn&&lt.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Sc(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,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))));Ut.free(rt),a.copiedParts=tt,dh(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}_o.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},_o.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Ut},Ke.Object.defineProperties(_o.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}}}),_o.prototype.getDraggingSource=_o.prototype.Az;var Us=null,NA=null;_o.className="DraggingTool",Rl=new ne,Bi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Eo.prototype.doCancel=function(){Us!==null&&Us.doCancel(),zr.prototype.doCancel.call(this)};function ls(){zr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Qn,y=new mr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new mr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Jn,y=new mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Mi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Jn,y=new mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Mi,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 Ue,this.Of=this.gj=this.Pf=null}Je(ls,zr),ls.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},ls.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=rr,z=Ut.alloc(),x.location=y.ga(rr,z),Ut.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},ls.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Mi,y.fromSpot=ir,y.toSpot=ir),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},ls.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},ls.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)}},ls.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},ls.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(rr,Ut.alloc()),lt=x.x-ot.x,ut=x.y-ot.y;Ut.free(ot),ot=lt*lt+ut*ut,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},ls.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},ls.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},ls.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},ls.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},ls.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)},ls.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 Be;return E.add(a),ma(this,x,y,E)};function ma(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),ma(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),ma(a,y.labeledLink,x,E))))}ls.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!==id){if(E===jd){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!Ea(this,a,y,x,!0)}if(E===Nf){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!Ea(this,a,y,x,!0)}if(E===sc)return a===y?a=!0:(E=new Be,E.add(y),a=La(this,E,a,y,x)),!a;if(E===ac)return!Ea(this,a,y,x,!1);if(E===zd)return a===y?a=!0:(E=new Be,E.add(y),a=DA(this,E,a,y,x)),!a}return!0};function Ea(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&&Ea(a,tt,x,E,b)))return!0}return!1}function La(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&&La(a,y,tt,E,b)))return!0}return!1}function DA(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&&DA(a,y,rt,E,b))return!0}}return!1}Ke.Object.defineProperties(ls.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}}}),ls.className="LinkingBaseTool";function ua(){ls.call(this),this.name="Linking",this.V={},this.F=null,this.K=fh,this.Xd=null}Je(ua,ls),ua.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},ua.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===fh||x===ag){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===fh||x===lg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ua.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)},ua.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()},ua.prototype.doStop=function(){ls.prototype.doStop.call(this),this.startObject=null},ua.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)}}},ua.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Qn)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)},ua.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ua.prototype.doNoLink=function(){},Ke.Object.defineProperties(ua.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 fh=new hn(ua,"Either",0),ag=new hn(ua,"ForwardsOnly",0),lg=new hn(ua,"BackwardsOnly",0);ua.className="LinkingTool",ua.Either=fh,ua.ForwardsOnly=ag,ua.BackwardsOnly=lg;function gl(){ls.call(this),this.name="Relinking";var a=new mr;a.figure="Diamond",a.desiredSize=Hi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new mr,a.figure="Diamond",a.desiredSize=Hi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new He}Je(gl,ls),gl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Qn){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)}},gl.prototype.makeAdornment=function(a,y){var x=new Jr;return x.type=Sn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},gl.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},gl.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 Jr&&x.adornedPart instanceof Qn))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=si),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=si),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},gl.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lg||x===Bc)&&(x=Ya),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}},gl.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()},gl.prototype.doStop=function(){ls.prototype.doStop.call(this),this.handle=null},gl.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()}}},gl.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},gl.prototype.doNoRelink=function(){};function Fd(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)}Ke.Object.defineProperties(gl.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 Jr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),gl.className="RelinkingTool",Bi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Bi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function fs(){zr.call(this),this.name="LinkReshaping";var a=new mr;a.figure="Rectangle",a.desiredSize=er,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new mr,a.figure="Diamond",a.desiredSize=Hi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Ut,this.Yq=new ne}Je(fs,zr),fs.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:cf},fs.prototype.om=function(a,y){a.reshapingBehavior=y},fs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Qn){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)}},fs.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Jr,b.type=Sn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Yl)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);we.B(ot.x,lt.x)&&we.B(ot.y,lt.y)&&(lt=y.i(x-1)),we.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):we.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),lt=y.i(z),we.B(ot.x,lt.x)&&we.B(ot.y,lt.y)&&(ot=y.i(z+1)),we.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):we.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")):tt!==z&&(this.om(rt,Ed),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},fs.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},fs.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},fs.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},fs.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 Qn){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}}},fs.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},fs.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},fs.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},fs.prototype.getResegmentingPoint=function(){return this.handle.ga(rr)},fs.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},fs.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&&(Cu(this,tt,E,b,z,!0)||Cu(this,tt,E,b,z,!1))){var rt=y.points.copy();Cu(this,tt,E,b,z,!0)?(rt.cd(x-2,new Ut(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Ut(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Ut((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Ut((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&&(Cu(this,E,b,z,tt,!0)||Cu(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Cu(this,E,b,z,tt,!0)?(rt.cd(x-1,new Ut(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Ut(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Ut((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Ut((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Ut.alloc(),we.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()),Ut.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Cu(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}fs.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===UA?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===IA&&(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===UA?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===IA&&(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);we.B(z.x,b.x)&&we.B(b.y,tt.y)?(we.B(z.x,y.i(E-2).x)&&!we.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),we.B(tt.y,y.i(E+2).y)&&!we.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):we.B(z.y,b.y)&&we.B(b.x,tt.x)?(we.B(z.y,y.i(E-2).y)&&!we.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),we.B(tt.x,y.i(E+2).x)&&!we.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):we.B(z.x,b.x)&&we.B(b.x,tt.x)?(we.B(z.x,y.i(E-2).x)&&!we.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),we.B(tt.x,y.i(E+2).x)&&!we.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):we.B(z.y,b.y)&&we.B(b.y,tt.y)&&(we.B(z.y,y.i(E-2).y)&&!we.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),we.B(tt.y,y.i(E+2).y)&&!we.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(rr,Ut.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Ut.alloc()),y.L(0,E.x,E.y),Ut.free(z),Ut.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(rr,Ut.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Ut.alloc()),y.L(y.pointsCount-1,a.x,a.y),Ut.free(x),Ut.free(a));y.zf()},fs.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ed:return a;case UA:return new Ut(y.i(x).x,a.y);case IA:return new Ut(a.x,y.i(x).y);default:case cf:return y.i(x)}},Ke.Object.defineProperties(fs.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 Jr))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}}}),fs.prototype.setReshapingBehavior=fs.prototype.om,fs.prototype.getReshapingBehavior=fs.prototype.Ru;var cf=new hn(fs,"None",0),IA=new hn(fs,"Horizontal",1),UA=new hn(fs,"Vertical",2),Ed=new hn(fs,"All",3);fs.className="LinkReshapingTool",fs.None=cf,fs.Horizontal=IA,fs.Vertical=UA,fs.All=Ed,Bi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Aa(){zr.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 mr;a.alignmentFocus=rr,a.figure="Rectangle",a.desiredSize=er,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Ut,this.Dw=new ln,this.Tn=new Ut,this.rt=new ln(0,0),this.qt=new ln(1/0,1/0),this.pt=new ln(1,1)}Je(Aa,zr),Aa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Qn)){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(),od(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Aa.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Jr,y.type=Sn.Spot,y.locationSpot=rr;var x=new Za;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,fr)),y.add(this.makeHandle(a,$r)),y.add(this.makeHandle(a,to)),y.add(this.makeHandle(a,ao)),y.add(this.makeHandle(a,Ds)),y.add(this.makeHandle(a,ms)),y.add(this.makeHandle(a,Js)),y.add(this.makeHandle(a,ns))}else if(gu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Aa.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Aa.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=rr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Sn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Aa.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},Aa.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))},Aa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Aa.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Aa.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Aa.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,Ut.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Ut.free(b)}},Aa.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,Ut.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Ut.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Aa.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 ur){var E=new ne;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()}},Aa.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=rr);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width,ut=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=Ut.alloc(),we.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,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-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=ut-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*(ut-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,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-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=ut-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*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-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))),Ut.free(yt),a},Aa.prototype.computeReshape=function(){var a=wn;return this.adornedObject instanceof mr&&(a=_m(this.adornedObject)),!(a===wi||this.diagram.lastInput.shift)},Aa.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},Aa.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},Aa.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},Ke.Object.defineProperties(Aa.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 Jr))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 Jr)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}}}),Aa.className="ResizingTool",Bi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ma(){zr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Ut,this.ue=null;var a=new mr;a.figure="Ellipse",a.desiredSize=Hi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Ut(NaN,NaN),this.u=0,this.F=50}Je(Ma,zr),Ma.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)}},Ma.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Jr,y.type=Sn.Position,y.locationSpot=rr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(gu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ma.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},Ma.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)},Ma.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(rr)},Ma.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)},Ma.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Ut(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ma.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ma.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ma.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ma.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()},Ma.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()}},Ma.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},Ke.Object.defineProperties(Ma.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 Jr))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 Jr)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}}}),Ma.className="RotatingTool",Bi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function gh(){zr.call(this),this.name="ClickSelecting"}Je(gh,zr),gh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},gh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},gh.className="ClickSelectingTool";function Kl(){zr.call(this),this.name="Action",this.pk=null}Je(Kl,zr),Kl.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},Kl.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()},Kl.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))}},Kl.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()},Kl.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())},Kl.prototype.doStop=function(){this.pk=null},Kl.className="ActionTool";function QA(){zr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ut(0,0)}Je(QA,zr),QA.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)},QA.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},QA.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 Di)x.Zc()&&(gu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ye(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ut.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Ut.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ke.Object.defineProperties(QA.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}}}),QA.className="ClickCreatingTool";function Ll(){zr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Di;a.layerName="Tool",a.selectable=!1;var y=new mr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Je(Ll,zr),Ll.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))},Ll.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ll.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ll.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)}},Ll.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()},Ll.prototype.computeBoxBounds=function(){var a=this.diagram;return new He(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ll.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),dr?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 ne,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)}},Ke.Object.defineProperties(Ll.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}}}),Ll.className="DragSelectingTool";function ia(){zr.call(this),this.name="Panning",this.Xt=new Ut,this.xy=new Ut,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Hn.document,"scroll",a.Kw,!1),a.stopTool()}}Je(ia,zr),ia.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())},ia.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Hn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ia.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ia.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ia.prototype.doMouseMove=function(){this.move()},ia.prototype.doMouseUp=function(){this.move(),this.stopTool()},ia.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)}},Ke.Object.defineProperties(ia.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ia.className="PanningTool",Bi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Bi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Bi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Bi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Bi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Pu(){this.F=this.u=this.j=this.o=null}Ke.Object.defineProperties(Pu.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}}}),Pu.className="HTMLInfo";function Ml(a,y,x){this.text=a,this.hx=y,this.visible=x}Ml.className="ContextMenuButtonInfo";function ba(){zr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Ut,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Je(ba,zr);function $l(a){var y=new Pu;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},HA=y,a.tu=function(){a.stopTool()},y=Br("div");var x=Br("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=Br("style");Hn.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",gs,!1),E.addEventListener(y,"selectstart",gs,!1),E.addEventListener(x,"contextmenu",gs,!1)),y.className="goCXforeground",x.className="goCXbackground",Hn.document.body&&(Hn.document.body.appendChild(y),Hn.document.body.appendChild(x)),Oc=y,Rh=x,Qc=!0}function gs(a){return a.preventDefault(),!1}ba.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)},ba.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ba.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ba.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Re||(a instanceof ye?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},ba.prototype.doActivate=function(){},ba.prototype.doMouseDown=function(){if(zr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Jr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&pl(this)},ba.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Jr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}pl(this)};function pl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Pu||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(gA(a,!0),a.isActive||a.stopTool())}ba.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function gA(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=HA,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof ye?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Jr&&!a.currentContextMenu.visible&&a.stopTool()}}ba.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ba.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Jr){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 Pu&&a.show(y,x,this);this.currentContextMenu=a},ba.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}},ba.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Jr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Pu&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function OA(a){var y=new ne;return y.add(new Ml("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Ml("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Ml("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Ml("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Ml("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Ml("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Ml("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Ml("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Ml("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Ml("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Ml("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Ml("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Ml("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ba.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=OA(this)),Oc.innerHTML="",Rh.addEventListener("pointerdown",this.tu,!1);var y=this,x=Br("ul");x.className="goCXul",Oc.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=Br("li"),z.className="goCXli";var tt=Br("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)}}Oc.style.display="block",Rh.style.display="block"},ba.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===HA){Oc.style.display="none",Rh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Rh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ke.Object.defineProperties(ba.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Jr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&HA===null&&Xo&&$l(this),HA},set:function(a){a===null&&(Qc=!0),HA=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var HA=null,Qc=!1,Rh=null,Oc=null;ba.className="ContextMenuTool",Bi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function ko(){zr.call(this),this.name="TextEditing",this.Zh=new Mo,this.ia=null,this.V=_h,this.vj=null,this.qa=Kh,this.u=1,this.F=!0,this.o=null,this.j=new Pu,this.kt=null,Hc(this,this.j)}Je(ko,zr);function Hc(a,y){if(Xo){var x=Br("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(Rc)):b==="Tab"?(a.acceptText(va),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Kh){var E=a.kt;a.qa===Gh&&(a.qa=_c),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Kh){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 Mo&&z instanceof ko)if(z.state===Kc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(rr),rt=b.position,ot=b.scale,lt=E.Df()*ot;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=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=ut+"px",x.style.left=(yt-ut/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)}}}ko.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||RA&&RA!==this&&(RA.acceptText(Fu),RA&&RA!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Mo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_h&&!y.isSelected||this.starting===Md&&2>a.lastInput.clickCount)):!1},ko.prototype.doStart=function(){RA=this,this.textBlock!==null&&this.doActivate()},ko.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 Mo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Gh;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new He(this.textBlock.ga(fr),this.textBlock.ga(to));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},ko.prototype.doCancel=function(){this.stopTool()},ko.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},ko.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Fu)},ko.prototype.acceptText=function(a){switch(a){case Fu:this.qa===zh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Gh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this));break;case Ld:case Rc:case va:(Rc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Gh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this))}};function df(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=zh,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=Kc,a.doError(b,z))}}ko.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)},ko.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},ko.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Kh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},ko.prototype.doStop=function(){RA=null},ko.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)))},ko.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ke.Object.defineProperties(ko.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)}}}),ko.prototype.measureTemporaryTextBlock=ko.prototype.Lx;var Ld=new hn(ko,"LostFocus",0),Fu=new hn(ko,"MouseDown",1),va=new hn(ko,"Tab",2),Rc=new hn(ko,"Enter",3),ep=new hn(ko,"SingleClick",0),_h=new hn(ko,"SingleClickSelected",1),Md=new hn(ko,"DoubleClick",2),Kh=new hn(ko,"StateNone",0),Gh=new hn(ko,"StateActive",1),_c=new hn(ko,"StateEditing",2),ff=new hn(ko,"StateValidating",3),Kc=new hn(ko,"StateInvalid",4),zh=new hn(ko,"StateValidated",5),RA=null;ko.className="TextEditingTool",ko.LostFocus=Ld,ko.MouseDown=Fu,ko.Tab=va,ko.Enter=Rc,ko.SingleClick=ep,ko.SingleClickSelected=_h,ko.DoubleClick=Md,ko.StateNone=Kh,ko.StateActive=Gh,ko.StateEditing=_c,ko.StateValidating=ff,ko.StateInvalid=Kc,ko.StateValidated=zh,Bi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ol(a){vh||(gf(),vh=!0),this.H=ku,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=bu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Be,this.ce=new ra,this.ce.Yd=this,this.Ei=new Be,this.pu=new Be,this.Sr=new Be,this.pr=new Be,a&&Object.assign(this,a)}ol.prototype.Xe=function(a){this.H=a},ol.prototype.canStart=function(){return!0};function Eu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),oa(a.H),a.zb=!0)}function Wr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===bu?(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===kd&&y.vc.clear(),a.Qw=!!(a.Pk===Gc&&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(),yh(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==ca&&E!==null&&(delete E.start.scale,delete E.end.scale),Hn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&ka(x),Ud(x),a.zb=!1,y.start(),y.bc&&(_A(a),x.Ya(),pf(y,0),Qa(x,!0),KA(a),x.R("AnimationStarting",a)))}))}}function pA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function bd(a,y,x,E){a.isTicking||pA(a)||y instanceof Qn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Tt=ol.prototype,Tt.fv=function(a){return this.ce.fv(a)},Tt.Xu=function(a){return this.ce.Xu(a)};function jh(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 ye&&ot.diagram!==null||ot instanceof Re){rt=!0;break t}}rt=!1}rt?zc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(_A(b),Qa(b.H),KA(b)),Hn.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Hn.requestAnimationFrame(function(){x()}))}function Lu(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function _A(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 KA(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Tt.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(),yh(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),yh(y,this.H)},Tt.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))},Tt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ja(this,a))},Tt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),GA(this.ce,y,"position",y.position,y.position),ja(this,a))};function Vh(a,y,x){!a.zb||y.D(x)||pA(a)||(a.H.pi||(y=x.copy()),GA(a.ce,a.H,"position",y,x))}function ph(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ja(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function mh(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],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=lt):(ut===0||ut===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,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function gf(){function a(x,E,b,z,tt,rt){x.position=new Ut(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new Ue;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 Ut(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 Ut(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 Ut(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 Ut(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 He(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=mh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=mh(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=mh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=mh(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)}),Mu=y}Ke.Object.defineProperties(ol.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&&zn(a,">= 1",ol,"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}}}),ol.prototype.stopAnimation=ol.prototype.Cc;var Mu=null,vh=!1,bu=new hn(ol,"Default",1),Gc=new hn(ol,"AnimateLocations",2),kd=new hn(ol,"None",3);ol.className="AnimationManager",ol.defineAnimationEffect=function(a,y){vh||(gf(),vh=!0),Mu.add(a,y)},ol.Default=bu,ol.AnimateLocations=Gc,ol.None=kd;function ra(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=Wh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=pn,this.vc=new Ue,this.Tt=new Ue,this.yl=new Be,this.Ut=new Be,this.dw=yA,a&&Object.assign(this,a)}ra.prototype.suspend=function(){this.Xk=!0},ra.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,zc(this,!0),_A(this.Yd),Qa(this.H),KA(this.Yd),this.H.redraw()};function yh(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}Tt=ra.prototype,Tt.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 Re?a=x:x instanceof ye&&(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===bu&&this===y.defaultAnimation&&(this.Lp=ug,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=lc),_A(y),this.yl.each(function(E){E.data=null,a.add(E)}),KA(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,jh(y,this),this)},Tt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Tt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Re?this.H=a:a instanceof ye&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Di){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return GA(this,a,y,x,E,b),this};function GA(a,y,x,E,b,z){var tt=a.vc;if(y instanceof Re&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(BA(E),ip(),E=[En.j,En.u,En.o,En.F],BA(b),ip(),b=[En.j,En.u,En.o,En.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,lt=rt.end;ot[x]===void 0&&(ot[x]=wh(E)),lt[x]=wh(b)}else ot={},lt={},ot[x]=wh(E),lt[x]=wh(b),rt=ot.position,y instanceof ye&&rt instanceof Ut&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(lt.position),rt=new xh(ot,lt,z),tt.add(y,rt);tt=ot[x],tt instanceof Ut&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Di?rt.Ku.location=wh(y.location):z&&(rt.Ku[x]=wh(E))}function wh(a){return a instanceof Ut||a instanceof ln?a.copy():a}Tt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Tt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function zc(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),_A(x),pf(a,b),Qa(a.H,!0),KA(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 pf(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof ye&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Mu,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)}}}Tt.stop=function(){return this.bc?(this.Ml(!0),this):this},Tt.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,_A(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=Mu;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,lt=b?rt.start:rt.end,ut=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],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:lt[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Di&&(tt.location=ut.location),rt.nv&&tt instanceof Di&&tt.Zb(!1)}if(y.As.clear(),Yh(y,!1),y.Ya(),y.N(),Qa(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()}Qa(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),KA(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),yh(this,null),x.Ml(this),y.$b())}},Tt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof ur&&(E=y.placeholder),E!==null?(x=E.ga(fr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Ut(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ur)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Cj(E,y)},Tt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ur&&(x=y.placeholder),x!==null){var E=x.ga(fr);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 ur)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Aj(E,y)}},Tt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ke.Object.defineProperties(ra.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&zn(a,">= 1",ra,"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:te("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}}}),ra.prototype.getTemporaryState=ra.prototype.Ez,ra.prototype.stop=ra.prototype.stop,ra.prototype.add=ra.prototype.add,ra.prototype.addTemporaryPart=ra.prototype.Iy;function Wh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function ug(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}ra.className="Animation",ra.EaseLinear=function(a,y,x,E){return x*a/E+y},ra.EaseInOutQuad=Wh,ra.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},ra.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},ra.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},ra.EaseOutExpo=ug;function xh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}xh.className="AnimationState";function tu(a,y,x){this.xd=null,this.rf=a,this.so=x||vf,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Sh))}tu.prototype.copy=function(){var a=new tu(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 mf(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))}Ke.Object.defineProperties(tu.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 vf=new hn(tu,"Default",1),Sh=new hn(tu,"Immediate",2),Zh=new hn(tu,"Bundled",3);tu.className="AnimationTrigger",tu.Default=vf,tu.Immediate=Sh,tu.Bundled=Zh;function Gs(a){cn(this),this.H=null,this.Pa=new ne,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)}Tt=Gs.prototype,Tt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,pr(x)}a.clear(),this.Zq.length=0},Tt.Xe=function(a){this.H=a},Tt.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 ur?b++:ot instanceof Jn?E++:ot instanceof Qn?z++:ot instanceof Jr?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&&Xn(E)&&(rt+=" #"+Xn(E)),x instanceof Jn?rt+=" "+Yi(E):x instanceof Qn&&(rt+=" "+Yi(x.fromNode)+" "+Yi(x.toNode));return y+" "+this.Pa.count+": "+rt},Tt.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=Ut.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),an(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Ut.free(b),rt}return Ut.free(b),null},Tt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ne||E instanceof Be||(E=new Be),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Ut.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),an(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 Ut.free(z),E},Tt.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 ne||b instanceof Be||(b=new Be),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||od(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},Tt.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||od(lt)!==!1)&&z(lt)&&lt.isVisible()){var ut=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Tt.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 ne||b instanceof Be)&&(z=b),b=!0),z instanceof ne||z instanceof Be||(z=new Be),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Ut.alloc(),ot=Ut.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),an(rt,ft.oe),ot.h(a.x+y,a.y),an(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 Ut.free(rt),Ut.free(ot),z},Tt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=An();for(var b=An(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Qn){if(tt.fd===!1)continue}else if(tt instanceof Jr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&io(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]);Nn(a),Nn(b)}}};function mA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Tt.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=mA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=He.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(He.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function jc(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=mA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,lt=He.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}He.free(lt),y.globalAlpha=tt}}}Tt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof Qn&&(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 Wa?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&&(Zo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Zo(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),Zo(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))}},Tt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Io,a,this,y,x,E,b)},Tt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&pr(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)),Td(this,a,y),a},Tt.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,pr(y),a};function Td(a,y,x){if(y=Nd(a,y,x),x instanceof ur&&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&&Td(a,-1,y)}x.svg!==null&&x.svg.remove()}function Nd(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}Ke.Object.defineProperties(Gs.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===""&&te("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&te("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)&&zn(a,"0 <= value <= 1",Gs,"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))}}}),Gs.prototype.findObjectsNear=Gs.prototype.og,Gs.prototype.findObjectsIn=Gs.prototype.Cf,Gs.prototype.findObjectsAt=Gs.prototype.ji,Gs.prototype.findObjectAt=Gs.prototype.ic,Gs.className="Layer";function Re(a,y){if(xA||(Qs(),xA=!0),cn(this),ku=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Xo){var x=this,E=function(){x.removeEventListener(Hn.document,"DOMContentLoaded",E,!1),x.setRTL()};Hn.document.body!==null?this.setRTL():x.addEventListener(Hn.document,"DOMContentLoaded",E,!1)}this.ol=null,Gd.add("Model",po);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===Io&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Ev(),this.Wg=!0,Qd(this),this.layout=new Vo,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 uc,a!==void 0&&(typeof a=="string"||Hn.Element&&a instanceof Element?Vc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var zA,ku;function Ag(a){a.Yd=new ol,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new ne,a.pj=new Ue,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Ut(NaN,NaN).freeze(),a.du=new Ut(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Ut(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Xi,a.zu=new Ut(NaN,NaN).freeze(),a.ut=new He(NaN,NaN,NaN,NaN).freeze(),a.rj=new ar(0,0,0,0).freeze(),a.sj=yA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ca,a.zk=ws,a.Fg=ca,a.pq=ws,a.yt=fr,a.Bt=fr,a.Fc=!0,a.pn=!1,a.De=new Be,a.Eh=new Ue,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new ar(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new zs,a.bq.diagram=a,a.Qg=new zs,a.Qg.diagram=a,a.cj=new zs,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,pg(a),a.ai=new Be,a.Ht=!0,a.uu=YA,a.pw=!1,a.wu=id,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 Ue,a.Xn=new ne,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new ar(5).freeze(),a.Hw=new Be().freeze(),a.Nt=999999999,a.nw=new Be().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 Be,a.ow=new Be,a.Xh=null,a.aw=new ln(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ut,bounds:new He,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 He(NaN,NaN,NaN,NaN).freeze(),a.wo=new ln(NaN,NaN).freeze(),a.Sp=new He(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ue;var y=new Jn,x=new Mo;x.bind(new Ps("text","",Yi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Jn,x=new Mo,x.stroke="brown",x.bind(new Ps("text","",Yi)),y.add(x),a.Lg.add("Comment",y),y=new Jn,y.selectable=!1,y.avoidable=!1,x=new mr,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 Ue,y=new ur,y.selectionObjectName="GROUPPANEL",y.type=Sn.Vertical,x=new Mo,x.font="bold 12pt sans-serif",x.bind(new Ps("text","",Yi)),y.add(x),x=new Sn(Sn.Auto),x.name="GROUPPANEL";var E=new mr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Za,E.padding=new ar(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ue,y=new Qn,x=new mr,x.isPanelMain=!0,y.add(x),x=new mr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Qn,x=new mr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Jr,y.type=Sn.Auto,x=new mr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Za,x.margin=new ar(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Jr,y.type=Sn.Link,x=new mr,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 po,a.toolManager=new Eo,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=Id(),a.eq=null,a.fq=Tn,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 Ut,a.zy=500,a.wp=new Ut,a.wq=!1}Re.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Fh=null,WA="",Dd(this,!1),this.Xn.clear(),Bg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Dd(a,y){a.animationManager.Cc(!0),a.Hw=new Be().freeze(),a.nw=new Be().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(),Bg(),a.Og.clear(),qr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Id(){return null}Re.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),eu(this),this.Wg=!0,Qd(this),this.layout=new Vo,this.Wg=!1,this.model=Ev(),this.model.undoManager=new zo,this.vb=this.rn=!1,this.N()},Re.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Hn.document.body);var y=Br("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},Re.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Hn.document.body);var y=0;if(Xo){var x=Tf;y=zA,x===null&&(x=Tf=Br("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=zA=Br("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||dr||(y=11)}this.Db=y,this.Gw=!0},Re.prototype.qb=function(a){a.classType===Re&&(this.autoScale=a)},Re.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 Vc(a,y){if(Xo){if(y!=null||te("Diagram setup requires an argument DIV."),a.Ka!==null&&te("Diagram has already completed setup."),typeof y=="string"?a.Ka=Hn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:te("No DIV or DIV id supplied: "+y),a.Ka===null&&te("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&te("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Hn.ResizeObserver){var x=$i(function(){a.$b()},250);a.ol=new Hn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Hn.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=Hn.go;var b=new Wl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Hn.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),Cf(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Wl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Xo){b=Br("div");var z=Br("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=dg,b.addEventListener("pointerdown",fg),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=$i(function(){a.Yh=null,a.N()},300),a.Ov=$i(function(){Ud(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=bl(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(),zl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,bl(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=xf(a,tt,!0,!1,!0,lt),Jh(a,tt,ot),ot.targetDiagram=wf(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():zl(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=xf(a,tt,!1,!1,!1,rt[1]!==null);var ot=Hn.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,ut=tt;ot&&ot.H&&(ut=tt,lt=ot.H),rt.targetDiagram=lt,Jh(a,ut,rt),rt.targetObject=null,a.doMouseMove(),zl(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=xf(a,tt,!1,!0,!0,!1);var lt=Hn.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 Re&&lt.H!==a&&Jh(lt.H,tt,ot),lt===null&&(lt=tt.target),Jh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=wf(tt,lt),ot.targetObject=null,a.doMouseUp(),zl(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"+Ac[1]+Ac[2]+"wI"+fu.slice(1,5)]["b"+Hw.slice(1,y)](E.Z,Ju,y,y),E.Vc(!0),hg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Re.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Re.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function hg(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(Hn,"resize",a.Ov,!1)}function ka(a){30<a.Sq&&(a.Yh=1)}function Yh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),mi&&mi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Re.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Hn.devicePixelRatio||1},Re.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Re.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Re.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Re.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Re.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Re.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Re.prototype.doFocus=function(){this.focus()},Re.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Hn.scrollX||Hn.pageXOffset,y=Hn.scrollY||Hn.pageYOffset;this.ta.focus(),Hn.scrollTo(a,y)}},Re.prototype.Oy=function(){this.H.R("GainedFocus")},Re.prototype.Ny=function(){this.H.R("LostFocus")};function Ud(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===ca&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Qd(a){var y=new Gs;y.name="Background",a.Al(y),y=new Gs,y.name="",a.Al(y),y=new Gs,y.name="Foreground",a.Al(y),y=new Gs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Gs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Gs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function cg(a){var y=new Sn(Sn.Grid);y.name="GRID";var x=new mr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new mr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Di,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 dg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):nc(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):nc(this.H)}Re.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,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var yt=b.width,Et=b.height,kt=b.right,Dt=b.bottom;b=this.scale;var Jt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Jt=Jt+a.scrollWidth-a.clientWidth;break;case"reverse":Jt=a.scrollWidth-Jt-a.clientWidth}var zt=Jt;yt<ot||Et<lt?(Jt=Ut.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==zt&&(Jt.x=zt/b+tt,this.ju=zt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Jt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Jt,Ut.free(Jt),this.Ee=this.qr=!1):(Jt=Ut.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Jt.h(zt+tt,this.position.y)),ut>kt&&(this.position=Jt.h(-(y.scrollWidth-this.Aa)+zt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Jt.h(this.position.x,a.scrollTop+rt)),z>Dt&&(this.position=Jt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Ut.free(Jt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,kt=b.right,z=E.bottom,Dt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,yt>=ot&&tt>=ft&&ut<=kt&&(x.style.width="1px"),Et>=lt&&rt>=E&&z<=Dt&&(x.style.height="1px"))}},Re.prototype.computeBounds=function(a){return a===void 0&&(a=new He),oa(this),Gl(this,a)};function Gl(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}Re.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Kn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Qn||(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 Qn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new He(NaN,NaN,0,0):x};function ml(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=Ut.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=He.allocAt(0,0,E.width,E.height);var b=Ut.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,He.free(E),Ut.free(b),Ut.free(x)}x=a.yh,y&&a.Fg!==ca&&(x=a.Fg);var z=x!==ca?Xh(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()?rr:ot),yf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,we.B(z.x,x)&&we.B(z.y,E)&&we.B(z.width,b)&&we.B(z.height,tt)||a.onViewportBoundsChanged(new He(x,E,b,tt),z,y,!1)}}function Xh(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===sl?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ZA?(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}Re.prototype.zoomToFit=function(){var a=this.sj;this.sj=yA,this.scale=Xh(this,sl),a!==yA&&(ml(this,!1),yf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Tt=Re.prototype,Tt.BA=function(a,y){y===void 0&&(y=sl);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===sl||y===ZA)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===ZA?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 Ut(a.x,a.y)}},Tt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Ut(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))},Tt.zz=function(a){if(a instanceof ye){this.eq=a;var y=Ut.alloc();this.fq=this.op(a.ga(fr,y)),Ut.free(y)}else this.eq=null,this.fq=Tn};function yf(a,y,x,E,b,z){var tt=Ut.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=Ut.alloc();lt=a.eq.ga(fr,lt),rt=lt.x-a.fq.x/a.scale,ot=lt.y-a.fq.y/a.scale,b=ir,Ut.free(lt)}(z||a.scrollMode===yA)&&(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),Vh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),eu(a),Ut.free(tt)}Tt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Yu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Di)return a}else if(a=Yu(this,a,function(x){return x.part}),a instanceof Di)return a;return null},Tt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),oa(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 Yu(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),oa(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}Tt.lz=function(a,y,x){return y===void 0&&(y=!0),Wc(this,a,function(E){return E.part},y?function(E){return E instanceof Di&&E.canSelect()}:null,x)};function Wc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof ne||b instanceof Be||(b=new Be),oa(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Tt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ne||E instanceof Be||(E=new Be),oa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Tt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Od(this,a,function(b){return b instanceof Di&&(!x||b.canSelect())},y,E)},Tt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ne||b instanceof Be||(b=new Be),oa(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Tt.Nu=function(a,y,x,E,b,z){var tt=new Be;oa(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 Od(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 ne||b instanceof Be||(b=new Be),oa(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Tt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Zc(this,a,y,function(z){return z instanceof Di&&(!E||z.canSelect())},x,b)},Tt.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 ne||b instanceof Be)&&(z=b),b=!0),z instanceof ne||z instanceof Be||(z=new Be),oa(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 Zc(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 ne||b instanceof Be)&&(z=b),b=!0),z instanceof ne||z instanceof Be||(z=new Be),oa(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}Re.prototype.acceptEvent=function(a){return bl(this,a,a instanceof MouseEvent)};function bl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Jh(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),dr&&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=wf(y,y.target),E.targetObject=null,E}function wf(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 xf(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,dr&&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 zl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Re.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=bl(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(),zl(x,a)},Re.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=bl(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(),zl(x,a)},Re.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=bl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),zl(x,a)},Re.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=bl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),zl(x,a)},Re.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Ut(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?an(new Ut(y,a),this.Ab):new Ut(y,a)};function Jh(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=Ut.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Ut.free(y)):x.documentPoint.h(tt,rt)}function Yc(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))}}Re.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Sf(a){a.ld||oa(a),a.Va()}Re.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Tt=Re.prototype,Tt.Pz=function(){return this.kg},Tt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Qa(this),this.hf=!1,this.du=new Ut(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Mr(function(){E.ld=!1,Eu(y,"Model"),a(E)},1)},Tt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Hn.requestAnimationFrame(function(){y.kg&&y.bd()})}},Tt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Qa(this))};function ha(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||nc(a)||(y&&oa(a),x&&ml(a,!1))}function Qa(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];Cs(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||Ud(a),ha(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Tu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),oa(a),z=!1,(!a.hf||a.xh)&&(a.hf?Mf(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Mf(a,!1)),z=!0),a.Jk=!1,oa(a),a.ou||Sf(a),ha(a,!0,!1),tt=!1,z?(x=He.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Bf(a)),a.R("LayoutCompleted"),ha(a,!0,!1),He.free(x)):x.Ok&&x.Qw&&(a.Fg!==ca?a.scale=Xh(a,a.Fg):a.yh!==ca?a.scale=Xh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ml(a,!0)),z&&tt&&a.eb("Initial Layout"),oa(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Bf(a){if(a.Fg!==ca)a.scale=Xh(a,a.Fg);else if(a.yh!==ca)a.scale=Xh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ml(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Tu(a)}function oa(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 Be,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ur&&E.U&65536&&(E.U=E.U^65536)})}}Tt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ur||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ur&&x.isVisible()&&qh(this,x);for(a.reset();a.next();)x=a.value,x instanceof Qn&&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 Jr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qh(a,y){for(var x=An(),E=An(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ur?(wl(z)||Pa(z)||rd(z))&&qh(a,z):z instanceof Qn?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(Nn(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();Nn(E)}Tt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Tt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&te("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){ec(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,Uf(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),jA(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?jl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Xi.prototype.Cd=Xi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,ec(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,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),jA(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?jl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Xi.prototype.Cd=Xi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=mi&&mi.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 $h(a,y,x,E,b,z,tt,rt,ot,lt){if(a.Ka!==null){a.ta===null&&te("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),lt===void 0&&(lt=!1),ec(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,yt=ft.length;try{var Et=new He(z.x,z.y,E.width/b,E.height/b),kt=Et.copy();kt.Co(x),Tu(a,kt),oa(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 Dt=a.Mb;y.scale(Dt,Dt);var Jt=Xi.alloc();Jt.reset(),Jt.translate(x.left,x.top),Jt.scale(b),z.x===0&&z.y===0||Jt.translate(-z.x,-z.y),y.setTransform(Jt.m11,Jt.m12,Jt.m21,Jt.m22,Jt.dx,Jt.dy),y.yc(),y instanceof Wa&&Uf(y,Jt.m11,Jt.m12,Jt.m21,Jt.m22,Jt.dx,Jt.dy),Xi.free(Jt),jA(a,y),y.globalAlpha=a.pb;var zt=a.Qj("Grid");if(tt){var se=new Be,he=tt.iterator;for(he.reset();he.next();){var ge=he.value;ge instanceof Di&&(lt||ge.layer!==zt)&&(ge.Gj(),se.add(ge))}for(lt=0;lt<yt;lt++)jc(ft[lt],y,a,se,ot);se.each(function(_e){return _e.Gj()})}else for(se=0;se<yt;se++){var ve=ft[se];ve===zt?lt&&ve.gc(y,a,!0):ve.gc(y,a,ot)}a.$i=!1,a.Yf&&jl(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),Tu(a),a.ib instanceof Wa&&(a.ib.Nj.PA(),a.redraw())}}}Tt.Gf=function(a){return this.Rg[a]},Tt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Tt.Tx=function(){this.Rg=new vi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(dr||tr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function jA(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Tt.Ql=function(a){return this.on[a]},Tt.sA=function(a,y){this.on[a]=y},Tt.Sx=function(){this.on=new vi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return this.nm(a)},Tt.nm=function(a){return tc(this,a),this};function tc(a,y){var x=a instanceof Sn,E=a instanceof Re,b;for(b in y){b===""&&te("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])),Ye(z)?tt=b.substr(rt+1):te("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Li(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Li(a.toolManager,tt))z=a.toolManager;else if(E&&bf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Pi&&tt==="Changed"){a.Pe(y[tt]);continue}else te('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof ye&&z.Vw(tt)}}Tt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ue,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Tt.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")},Re.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!==lc&&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=He.alloc(),Rd(this,this.computeBounds(E)),He.free(E)),E=this.ta,E===null||E instanceof wa)))){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,ut=Math.max(z,0),ft=Math.max(y,0),yt=Math.floor(b-ut),Et=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,yt,Et,0,0,yt,Et),jl(this.Yf,this)&&a.clearRect(0,0,ot,lt),E=An(),a=An(),Et=Math.abs(z),yt=Math.abs(y);var kt=ut===0?0:b-Et;ut=Ut.allocAt(kt,0),Et=Ut.allocAt(Et+kt,rt),a.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y)));var Dt=this.Ab;if(Dt.reset(),Dt.scale(tt,tt),this.Ca!==1&&Dt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Dt.translate(-tt.x,-tt.y),an(ut,Dt),an(Et,Dt),E.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),kt=ft===0?0:rt-yt,ut.h(0,kt),Et.h(b,yt+kt),a.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),an(ut,Dt),an(Et,Dt),E.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),jl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),Et.h(ot+b,lt+rt),a.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),an(ut,Dt),an(Et,Dt),E.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y)))),Ut.free(ut),Ut.free(Et),ha(this,!1,!0),this.Ka===null&&te("No div specified"),this.ta===null&&te("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(ec(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),jA(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){lt=mA(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,yt=He.alloc(),Et=tt.Pa.s,Dt=Et.length,kt=ot.length;for(var Jt=0;Jt<Dt;Jt++){var zt=Et[Jt],se=$d(zt,zt.actualBounds);t:{for(var he=2/ut,ge=4/ut,ve=0;ve<kt;ve++){var _e=ot[ve];if(_e.width!==0&&_e.height!==0&&se.Vu(_e.x-he,_e.y-he,_e.width+ge,_e.height+ge)){se=!0;break t}}se=!1}se&&tt.Oj(b,zt,this,ft,ut,yt,!0)}He.free(yt),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&jl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Nn(E),Nn(a),this.ld=!1}}else this.bd();x&&(ka(this),this.bd(),Yh(this,!0))}else x?(ka(this),this.bd(),Yh(this,!0)):this.bd()}};function ec(a){a.pn!==!1&&(a.pn=!1,Cf(a,a.Aa,a.ya))}function Cf(a,y,x){eu(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function nc(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,ut=a.viewportBounds;b=ut.x;var ft=ut.y,yt=ut.width,Et=ut.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,eu(a)),!a.hf||!a.viewportBounds.w())return!0;var kt=a.ku,Dt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Jt=a.documentBounds,zt=0,se=0,he=0,ge=0,ve=ut.width,_e=ut.height,jn=a.rj;a.contentAlignment.sb()?(Jt.width>ve&&(zt=jn.left,se=jn.right),Jt.height>_e&&(he=jn.top,ge=jn.bottom)):(zt=jn.left,se=jn.right,he=jn.top,ge=jn.bottom);var pi=Jt.width+zt+se,hi=Jt.height+he+ge;jn=a.scale;var In=pi>ot/jn,vn=hi>lt/jn;if(!(z||a.gf||a.Be||In||vn))return!0;zt=Jt.x-zt,ot=ut.x,se=Jt.right+se,lt=ut.right+tt,he=Jt.y-he;var lr=ut.y;Jt=Jt.bottom+ge,ut=ut.bottom+rt;var qi="1px";if(ge="1px",a.scrollMode===yA&&(In||vn)&&(In&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(In=1,zt+1<ot&&(In=Math.max((ot-zt)*jn+a.Aa,In)),se>lt+1&&(In=Math.max((se-lt)*jn+a.Aa,In)),ve+tt+1<pi&&(In=Math.max((pi-ve)*jn+a.Aa,In)),qi=In.toString()+"px"),vn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(In=1,he+1<lr&&(In=Math.max((lr-he)*jn+a.ya,In)),Jt>ut+1&&(In=Math.max((Jt-ut)*jn+a.ya,In)),_e+rt+1<hi&&(In=Math.max((hi-_e)*jn+a.ya,In)),ge=In.toString()+"px")),In=qi!=="1px",vn=ge!=="1px",In&&vn||!In&&!vn||(vn&&(lt-=a.Db),In&&(ut-=a.Db),pi<ve+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,zt+1<ot&&(tt=Math.max((ot-zt)*jn+a.Aa,tt)),se>lt+1&&(tt=Math.max((se-lt)*jn+a.Aa,tt)),ve+1<pi&&(tt=Math.max((pi-ve)*jn+a.Aa,tt)),qi=tt.toString()+"px"),In=qi!=="1px",tt=a.ya,In!==a.Be&&(tt=In?a.ya-a.Db:a.ya+a.Db),hi<_e+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,he+1<lr&&(rt=Math.max((lr-he)*jn+tt,rt)),Jt>ut+1&&(rt=Math.max((Jt-ut)*jn+tt,rt)),_e+1<hi&&(rt=Math.max((hi-_e)*jn+tt,rt)),ge=rt.toString()+"px"),vn=ge!=="1px"),a.qr&&In===a.Be&&vn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(In!==a.Be&&(qi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=In,Dt.style.width=qi,vn!==a.gf&&(ge==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Ut.alloc(),vn?(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)),Ut.free(rt))),z&&eu(a),a.gf=vn,Dt.style.height=ge,a.gu=!0,z&&(a.pn=!0),y=kt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ve+1<pi?y=(a.position.x-zt)*jn:zt+1<ot?y=kt.scrollWidth-kt.clientWidth:se>lt+1&&(y=a.position.x*jn)),a.tn)switch(a.bu){case"negative":y=-(kt.scrollWidth-y-kt.clientWidth);break;case"reverse":y=kt.scrollWidth-y-kt.clientWidth}return kt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(_e+1<hi?kt.scrollTop=(a.position.y-he)*jn:he+1<lr?kt.scrollTop=kt.scrollHeight-kt.clientHeight:Jt>ut+1&&(kt.scrollTop=a.position.y*jn)),ot=a.Aa,lt=a.ya,kt.style.width=ot+(a.gf?a.Db:0)+"px",kt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=He.allocAt(b,ft,yt,Et),a.onViewportBoundsChanged(x,a.viewportBounds,jn,z),He.free(x),!1):!0}Tt=Re.prototype,Tt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&te("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&&te('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(as,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Tt.oi=function(a){this.partManager.oi(a);var y=this;Iu(a,function(x){vA(y,x)}),(a instanceof Jr||a instanceof ur&&a.placeholder!==null)&&a.v(),a.data!==null&&Iu(a,function(x){Cv(y.partManager,x)}),Pa(a)!==!0&&rd(a)!==!0||this.De.add(a),_y(a,!0,this),Gy(a)?(a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.$b()},Tt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Iu(a,function(x){Pv(y.partManager,x,y)}),this.De.remove(a),Gy(a)?(a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.$b()},Tt.remove=function(a){Pf(this,a,!0)};function Pf(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(ds,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Tt.Is=function(a,y){if(y===void 0&&(y=!1),Kn(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 Be,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Tt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Re.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Xc(this)),this.toolManager!==null){var b=new Ue;if(a!==null)if(Kn(a))for(var z=0;z<a.length;z++)Xu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Xu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Xu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Xu(this,b,a.value,x,E);for(a=this.links;a.next();)Xu(this,b,a.value,x,E)}Bh(this,b,y,E,x)}};function Xu(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=Xc(a)),x instanceof Jn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof ur&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Xu(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)&&Xu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Xu(a,y,x.value,E,b)}else if(x instanceof Qn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Xu(a,y,x.value,E,b);else x instanceof Jr||y.add(x,a.Pd(b,x,x.location))}function Bh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Ut.alloc(),tt=Ut.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||qc(a,y);for(var rt=An(),ot=An(),lt=y.iterator,ut=Ut.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Et=$c(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,ut),ft.location=ut,yt.shifted===void 0&&(yt.shifted=new Ut),yt.shifted.assign(ut.re(Et)))}else lt.key instanceof Qn&&ot.push(lt.sa)}for(Ut.free(ut),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 Ut),ft.node.location=z.add(ft.Su.shifted);for(b=Ut.alloc(),lt=Ut.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var kt=ot[yt];if(Et=kt.key,Et instanceof Qn)if(Et.suspendsRouting){Et.Tg=null,ut=Et.fromNode;var Dt=Et.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Dt=kt.value.point,Et.dragComputation===null)y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-Dt.x,tt.y-Dt.y);else{kt=Ut.allocAt(0,0),(ut=Et.i(0))&&ut.w()&&kt.assign(ut);var Jt=ut=Ut.alloc().assign(kt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Jt=Ut.alloc(),Jc(a,Et,ut,Jt,E)),ut.assign(Et.dragComputation(Et,ut,Jt)).re(kt),y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-Dt.x,ut.y-Dt.y),Ut.free(kt),Ut.free(ut),Jt!==ut&&Ut.free(Jt)}else ut!==null&&(b.assign(ut.location),Jt=y.I(ut),Jt!==null&&b.re(Jt.point)),Dt!==null&&(lt.assign(Dt.location),Jt=y.I(Dt),Jt!==null&&lt.re(Jt.point)),ut!==null&&Dt!==null?b.Xa(lt)?(ut=kt.value.point,Dt=z,Dt.assign(b),Dt.re(ut),y.add(Et,a.Pd(E,Et,b)),Sc(Et,Dt.x,Dt.y)):(Et.suspendsRouting=!1,Et.bb()):(kt=kt.value.point,ut=ut!==null?b:Dt!==null?lt:tt,y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-kt.x,ut.y-kt.y))}else(Et.fromNode===null||Et.toNode===null)&&(ut=kt.value.point,y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-ut.x,tt.y-ut.y))}Ut.free(z),Ut.free(tt),Ut.free(b),Ut.free(lt),Nn(rt),Nn(ot),x||(oa(a),VA(a,y))}}Re.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Ut),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Ut.alloc(),Jc(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&&Ut.free(b),E};function Xc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Jc(a,y,x,E,b){if(b===void 0&&(b=Xc(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=Ut.allocAt(0,0),z.yi(0,0,a,y,b),we.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Ut.free(z)}}function qc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Qn&&(y.suspendsRouting=!0)}function VA(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Qn&&(x.suspendsRouting=!1,Av(x)&&x.bb())}a.Mr=!1}}function $c(a,y,x){return y=y.containingGroup,y!==null&&(a=$c(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Tt=Re.prototype,Tt.Pd=function(a,y,x){if(x===void 0)return new qu(pn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new qu(new Ut(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new qu(x.copy())};function Ff(a,y,x){if(y.diagram!==null&&y.diagram!==a&&te("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&te("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&te("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&te("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&&te("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Tt.Al=function(a){Ff(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(as,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Tt.Ww=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ds,"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(as,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Tt.Cy=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ds,"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(as,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Tt.kA=function(a){if(a.diagram!==this&&te("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(ds,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Tt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Tt.Yw=function(a){return this.pf===null&&(this.pf=new ne),this.pf.add(a),this.model.Pe(a),this},Tt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Tt.Pe=function(a){return this.zg===null&&(this.zg=new ne),this.zg.add(a),this},Tt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Tt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Tt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Oo;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)},Tt.g=function(a,y,x,E,b){this.cb(Io,a,this,y,x,E,b)},Re.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===Io){var b=a.object;if(Ko(b,a.propertyName,a.I(y)),b instanceof ye){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===as){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof Sn)if(typeof rt=="number"&&ot instanceof ye){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&&lt.Wb()}else typeof rt=="number"&&ot instanceof Ts&&(ot.isRow?fy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof Gs){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Di&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Re?typeof rt=="number"&&ot instanceof Gs&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):te("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ds){var ft=a.object,yt=a.oldParam,Et=a.oldValue;if(ft instanceof Sn)typeof yt=="number"&&Et instanceof ye?y?ft.Gb(yt,Et):ft.pc(yt):typeof yt=="number"&&Et instanceof Ts&&(Et.isRow?fy(ft,yt,y?Et:void 0):gy(ft,yt,y?Et:void 0));else if(ft instanceof Gs){var kt=a.newParam===!0;typeof yt=="number"&&Et instanceof Di&&(y?0>ft.Pa.indexOf(Et)&&ft.oi(yt,Et,kt):(Et.isSelected=!1,Et.isHighlighted=!1,Et.Wb(),ft.pc(kt?yt:-1,Et,kt)))}else ft instanceof Re?typeof yt=="number"&&Et instanceof Gs&&(y?(Et.Xe(this),this.Wa.Gb(yt,Et)):this.Wa.mb(yt)):te("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==ea&&te("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Re.prototype.Ea=function(a){return this.undoManager.Ea(a)},Re.prototype.eb=function(a){return this.undoManager.eb(a)},Re.prototype.Kf=function(){return this.undoManager.Kf()},Re.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}},Re.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Re.prototype.rp=function(){this.partManager.rp()};function Ef(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,eu(a),a.N(),a.Ee=!0,E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,eu(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(Ro)?rt=0:lt.Hf($o)&&(rt=z-1):rt=lt.sb()?lt.x*(z-1):z/2),isNaN(ot)&&(lt.$c()?lt.Hf(Do)?ot=0:lt.Hf(Ls)&&(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=Ut.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Ut.free(z),a.Ca=x,eu(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),ml(a,!1),E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Re.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!==ca||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Eo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Oh(b,this)),this.vb||this.invalidateViewport(a,y),Tu(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 Tu(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],ut=Math.abs(lt.interval);2>ut||(Mh(lt.figure)?z=z*ut/we.vx(z,ut):b=b*ut/we.vx(b,ut))}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=He.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){He.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,He.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Ut.alloc(),we.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),ln.free(E),x.part.location=y,Ut.free(y)}}Re.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)}},Re.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))},Re.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Kn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Di||te("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 Di||te("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Re.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()}},Tt=Re.prototype,Tt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Tt.Jz=function(a){a=new Be().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 Di||te("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Tt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Ut.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)),Ut.free(z);return}te("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):te("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Ut.free(z)},Tt.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)},Tt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Tt.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)},Tt.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,ut=y.dx,ft=y.dy,yt=x*tt+E*ot+ut;y=x*rt+E*lt+ft;var Et=b*tt+E*ot+ut;return a=b*rt+E*lt+ft,E=x*tt+z*ot+ut,x=x*rt+z*lt+ft,tt=b*tt+z*ot+ut,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 He(z,Et,yt-z,y-Et)},Tt.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),an(a.copy(),this.Ab)};function gg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function ic(a){return a=Gd.get(a),a!==null?new a:new po}Re.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===ea&&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===ea){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),oa(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Wr(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&&(gg(this),this.As.clear(),Lu(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;Mr(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function vA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Ch(a,y[E])}function Ch(a,y){if(y instanceof Al){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Be&&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 Hd(a,y){if(y instanceof Al){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 Be&&x.Bg.remove(a),Bg(E));break}}}}}Re.prototype.Wd=function(){this.partManager.Wd()},Re.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Re.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Re.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Re.prototype.Vb=function(a){return this.partManager.Vb(a)},Re.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Tt=Re.prototype,Tt.Lc=function(a){return this.partManager.Lc(a)},Tt.ii=function(a){return this.partManager.ii(a)},Tt.Kc=function(a){return this.partManager.Kc(a)},Tt.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:xi(Vi(y)))},Tt.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:xi(Vi(y)))};function eu(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 Rd(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ml(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Tt.Va=function(){if(this.Zi){var a=He.alloc();Rd(this,this.computeBounds(a)),He.free(a)}},Tt.rz=function(){for(var a=new Be,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},Tt.qz=function(){return this.ai.iterator},Tt.Uz=function(a){oa(this),a&&td(this,!0),this.ld?Mf(this,!1):(this.Jk=!0,Qa(this))};function td(a,y){for(var x=a.ai.iterator;x.next();)Lf(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Lf(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Lf(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Mf(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||Eu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)rc(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),oa(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||Wr(z),a.aa=x}}}function rc(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)rc(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),qh(a,y),b.isValidLayout=!0):a.xh=!0)}}Tt.yz=function(){for(var a=new ne,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function pg(a){function y(b){var z=b.toLowerCase(),tt=new ne;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Ue,E=new Ue;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 bf(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function _d(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;te("Unknown DiagramEvent name: "+y)}Tt.Bj=function(a,y){return a=_d(this,a),a!==null&&a.add(y),this},Tt.am=function(a,y){a=_d(this,a),a!==null&&a.remove(y)},Tt.R=function(a,y,x){var E=_d(this,a),b=new ju;if(b.diagram=this,a=bf(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 Kd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Tt.Yj=function(a,y){return ed(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Re.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Gl(this,a):a.assign(this.documentBounds)};function ed(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Sp(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=Ph(a,x)),x===null){y=He.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&&oc(a,tt,E,y)}He.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=He.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Jn&&oc(a,tt,E,y);He.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&l1(b);return b}function Ph(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?Ph(a,y.containingGroup):null}function oc(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(Mg(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(Cc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Cc}else if(y instanceof ur)for(y=y.memberParts;y.next();)b=y.value,b instanceof Jn&&oc(a,b,x,E)}}function Nu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Re.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():kf(this)};function kf(a){a.vk===-1&&(a.vk=Mr(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=He.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Rd(a,y),He.free(y),a.Fc=!0,a.bd(),kf(a))}},a.vp))}Re.prototype.ug=function(){this.vk!==-1&&(Hn.clearTimeout(this.vk),this.vk=-1)},Re.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=He.allocAt(0,0,E.width*b,E.height*b);var z=Ut.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(pn)||(y=new Ut(y.x+z.x/b,y.y+z.y/b)),He.free(E),Ut.free(z),y},Tt=Re.prototype,Tt.Cs=function(){return null},Tt.av=function(){return null},Tt.bs=function(a,y){this.pj.add(a,y)},Tt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ur&&(y.$p=null)})};function nd(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>ot?y(x,b,rt):Hn.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 Hn.requestAnimationFrame(function(){E()}),null}Tt.Wz=function(a){return Xo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Tt.Jx=function(a){return a===void 0&&(a={}),nd(this,this.Xz,a)},Tt.Xz=function(a,y,x){var E=mg(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 fu+"data":b=E.getImageData(0,0,x.width,x.height);break;case fu:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&te('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 mg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&te("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,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var yt=y.document||document,Et=y.elementFinished||null,kt=y.showTemporary;kt===void 0&&(kt=!ft),y=y.showGrid,y===void 0&&(y=kt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new ar(lt):lt instanceof ar||te("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 Wl(null,yt,void 0,!0);var Dt=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,$h(a,E.context,lt,new ln(ft.width,ft.height),a.Ca,a.pa,ot,ut,kt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new ln(ft.width,ft.height),a.Ca,a.pa,ot,ut,kt,y),a.Xm=!0,ft.context);var Jt=a.Pp,zt=a.documentBounds.copy();if(zt.Fv(a.yb),kt)for(var se=a.Wa.s,he=se.length,ge=0;ge<he;ge++){var ve=se[ge];if(ve.visible&&ve.isTemporary){ve=ve.Pa.s;for(var _e=ve.length,jn=0;jn<_e;jn++){var pi=ve[jn];pi.isInDocumentBounds&&pi.isVisible()&&(pi=pi.actualBounds,pi.w()&&zt.ed(pi))}}}if(se=new Ut(zt.x,zt.y),ot!==null){for(he=new He(0,0,0,0),ge=!0,ve=ot.iterator,ve.reset();ve.next();)_e=ve.value,_e instanceof Di&&(jn=_e.layer,jn!==null&&!jn.visible||jn!==null&&!kt&&jn.isTemporary||!_e.isVisible()||(_e=_e.actualBounds,_e.w()&&(ge?(ge=!1,he.assign(_e)):he.ed(_e))));zt.width=he.width,zt.height=he.height,se.x=he.x,se.y=he.y}return rt!==null&&rt.w()&&(se=rt,z||(z=Jt)),he=rt=0,lt!==null&&(rt=lt.left+lt.right,he=lt.top+lt.bottom),ge=ve=0,b!==null&&(ve=b.width,ge=b.height,isFinite(ve)&&(ve=Math.max(0,ve-rt)),isFinite(ge)&&(ge=Math.max(0,ge-he))),b!==null&&z!==null?(z==="NaN"&&(z=Jt),b.w()?(b=ve,zt=ge):isNaN(ge)?(b=ve,zt=zt.height*z):(b=zt.width*z,zt=ge)):b!==null?b.w()?(z=Math.min(ve/zt.width,ge/zt.height),b=ve,zt=ge):isNaN(ge)?(z=ve/zt.width,b=ve,zt=zt.height*z):(z=ge/zt.height,b=zt.width*z,zt=ge):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/zt.width,(tt.height-he)/zt.height),z>Jt?(z=Jt,b=zt.width,zt=zt.height):(b=tt.width,zt=tt.height)):(b=zt.width*z,zt=zt.height*z):(z=Jt,b=zt.width,zt=zt.height),lt!==null?(b+=rt,zt+=he):lt=new ar(0),tt!==null&&(Jt=tt.width,tt=tt.height,isNaN(Jt)&&(Jt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Jt)&&(b=Math.min(b,Jt)),isFinite(tt)&&(zt=Math.min(zt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(zt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Et,$h(a,E.context,lt,new ln(Math.ceil(b),Math.ceil(zt)),z,se,ot,ut,kt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new ln(Math.ceil(b),Math.ceil(zt)),z,se,ot,ut,kt,y),a.Xm=!0,ft.context)}Ke.Object.defineProperties(Re.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 wa(this,Hn.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 wa(this,Hn.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(Hn,"resize",this.Ov,!1),this.removeEventListener(Hn,"wheel",this.$j,!0),ku===this&&(ku=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Vc(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)&&zn(a,"0 <= value <= 1",Re,"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),ml(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),ml(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),ml(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),ml(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&zn(a,">= 0",Re,"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&&zn(a,">= 0",Re,"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 zn(a,">= 0",Re,"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||gg(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&&te("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Dd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Eu(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=ic(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(Hn,"pointermove",this.dk,!0),this.addEventListener(Hn,"pointerdown",this.ui,!0),this.addEventListener(Hn,"pointerup",this.fk,!0),this.addEventListener(Hn,"pointerout",this.ek,!0),this.addEventListener(Hn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Hn,"wheel",this.$j,!0),this.addEventListener(Hn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Hn,"pointermove",this.dk,!0),this.removeEventListener(Hn,"pointerdown",this.ui,!0),this.removeEventListener(Hn,"pointerup",this.fk,!0),this.removeEventListener(Hn,"pointerout",this.ek,!0),this.removeEventListener(Hn,"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(Hn,"wheel",this.$j,!0),this.removeEventListener(Hn,"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=Ut.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Vh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?eu(this):(this.vb=!0,a=this.scale,yf(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)}Ut.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=cg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=cg(this)),a.type!==Sn.Grid&&te("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),Tu(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),eu(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||te("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===yA&&ml(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,ml(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,Ef(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&&Ef(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!==ca&&ml(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()||te("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()||te("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)):zn(a,"> 0",Re,"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)):zn(a,"> 0",Re,"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),ml(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&te("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!==YA&&a!==Bs&&a!==wA&&te("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 ar(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ke.Object.defineProperties(Re,{licenseKey:{get:function(){return Vd.jc()},set:function(a){Vd.add(a.replace(/\s/g,""))}},version:{get:function(){return Zs}}}),Re.prototype.makeImageData=Re.prototype.Jx,Re.prototype.makeImage=Re.prototype.Wz,Re.prototype.cacheGroupExternalLinks=Re.prototype.Fu,Re.prototype.addRenderer=Re.prototype.bs,Re.prototype.makeSVG=Re.prototype.av,Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.stopAutoScroll=Re.prototype.ug,Re.prototype.doAutoScroll=Re.prototype.gs,Re.prototype.isUnoccupied=Re.prototype.Yj,Re.prototype.raiseDiagramEvent=Re.prototype.R,Re.prototype.removeDiagramListener=Re.prototype.am,Re.prototype.addDiagramListener=Re.prototype.Bj,Re.prototype.findTreeRoots=Re.prototype.yz,Re.prototype.layoutDiagram=Re.prototype.Uz,Re.prototype.findTopLevelGroups=Re.prototype.qz,Re.prototype.findTopLevelNodesAndLinks=Re.prototype.rz,Re.prototype.ensureBounds=Re.prototype.Va,Re.prototype.findLinksByExample=Re.prototype.ls,Re.prototype.findNodesByExample=Re.prototype.ms,Re.prototype.findLinkForData=Re.prototype.Kc,Re.prototype.findNodeForData=Re.prototype.ii,Re.prototype.findPartForData=Re.prototype.Lc,Re.prototype.findLinkForKey=Re.prototype.findLinkForKey,Re.prototype.findNodeForKey=Re.prototype.Vb,Re.prototype.findPartForKey=Re.prototype.findPartForKey,Re.prototype.rebuildParts=Re.prototype.Wd,Re.prototype.transformViewToDoc=Re.prototype.Ps,Re.prototype.transformRectDocToView=Re.prototype.zA,Re.prototype.transformDocToView=Re.prototype.op,Re.prototype.centerRect=Re.prototype.es,Re.prototype.scrollToRect=Re.prototype.tv,Re.prototype.scroll=Re.prototype.scroll,Re.prototype.highlightCollection=Re.prototype.Jz,Re.prototype.highlight=Re.prototype.Iz,Re.prototype.selectCollection=Re.prototype.rA,Re.prototype.select=Re.prototype.select,Re.prototype.updateAllRelationshipsFromData=Re.prototype.rp,Re.prototype.updateAllTargetBindings=Re.prototype.updateAllTargetBindings,Re.prototype.commit=Re.prototype.commit,Re.prototype.rollbackTransaction=Re.prototype.Kf,Re.prototype.commitTransaction=Re.prototype.eb,Re.prototype.startTransaction=Re.prototype.Ea,Re.prototype.raiseChanged=Re.prototype.g,Re.prototype.raiseChangedEvent=Re.prototype.cb,Re.prototype.removeChangedListener=Re.prototype.ik,Re.prototype.addChangedListener=Re.prototype.Pe,Re.prototype.removeModelChangedListener=Re.prototype.mA,Re.prototype.addModelChangedListener=Re.prototype.Yw,Re.prototype.findLayer=Re.prototype.Qj,Re.prototype.removeLayer=Re.prototype.kA,Re.prototype.addLayerAfter=Re.prototype.Cy,Re.prototype.addLayerBefore=Re.prototype.Ww,Re.prototype.addLayer=Re.prototype.Al,Re.prototype.moveParts=Re.prototype.moveParts,Re.prototype.copyParts=Re.prototype.Kj,Re.prototype.removeParts=Re.prototype.Is,Re.prototype.remove=Re.prototype.remove,Re.prototype.add=Re.prototype.add,Re.prototype.clearDelayedGeometries=Re.prototype.bx,Re.prototype.setProperties=Re.prototype.nm,Re.prototype.attach=Re.prototype.Du,Re.prototype.set=Re.prototype.set,Re.prototype.resetInputOptions=Re.prototype.Sx,Re.prototype.setInputOption=Re.prototype.sA,Re.prototype.getInputOption=Re.prototype.Ql,Re.prototype.resetRenderingHints=Re.prototype.Tx,Re.prototype.setRenderingHint=Re.prototype.Xx,Re.prototype.getRenderingHint=Re.prototype.Gf,Re.prototype.maybeUpdate=Re.prototype.bd,Re.prototype.requestUpdate=Re.prototype.$b,Re.prototype.delayInitialization=Re.prototype.Xy,Re.prototype.isUpdateRequested=Re.prototype.Pz,Re.prototype.invalidateDocumentBounds=Re.prototype.Ya,Re.prototype.findObjectsNear=Re.prototype.og,Re.prototype.findPartsNear=Re.prototype.mz,Re.prototype.findObjectsIn=Re.prototype.Cf,Re.prototype.findPartsIn=Re.prototype.ux,Re.prototype.findObjectsAt=Re.prototype.ji,Re.prototype.findPartsAt=Re.prototype.lz,Re.prototype.findObjectAt=Re.prototype.ic,Re.prototype.findPartAt=Re.prototype.Ol,Re.prototype.focusObject=Re.prototype.zz,Re.prototype.alignDocument=Re.prototype.Jy,Re.prototype.zoomToRect=Re.prototype.BA,Re.prototype.zoomToFit=Re.prototype.zoomToFit,Re.prototype.diagramScroll=Re.prototype.kx,Re.prototype.focus=Re.prototype.focus;var Gd=new Ue,Tf=null,Xo=Hn.document!==void 0,Fh=null,WA="",ca=new hn(Re,"None",0),sl=new hn(Re,"Uniform",1),ZA=new hn(Re,"UniformToFill",2),id=new hn(Re,"CycleAll",10),sc=new hn(Re,"CycleNotDirected",11),ac=new hn(Re,"CycleNotDirectedFast",12),zd=new hn(Re,"CycleNotUndirected",13),jd=new hn(Re,"CycleDestinationTree",14),Nf=new hn(Re,"CycleSourceTree",15),yA=new hn(Re,"DocumentScroll",1),lc=new hn(Re,"InfiniteScroll",2),YA=new hn(Re,"TreeParentCollapsed",21),Bs=new hn(Re,"AllParentsCollapsed",22),wA=new hn(Re,"AnyParentsCollapsed",23),Vd=new ne,Zs="2.3.10",fu="image",Ju=null,xA=!1;function Qs(){if(Xo){var a=Hn.document.createElement("canvas"),y=a.getContext("2d"),x=Ve("7ca11abfd022028846");y[x]=Ve("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",fi.Dx+"4ae6247590da4bb21c324ba3a84e385776",Xi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",we.za],b=1;5>b;b++)y[Ve("7ca11abfd7330390")](Ve(E[b-1]),10,15*b);for(y[x]=Ve("39f046ebb36e4b"),x=1;5>x;x++)y[Ve("7ca11abfd7330390")](Ve(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Xi.prototype.Cd=Xi.prototype.Eu),Ju=a}}Re.className="Diagram",Re.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Hn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Re?y.H:null},Re.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},Re.useDOM=function(a){Xo=a?Hn.document!==void 0:!1},Re.isUsingDOM=function(){return Xo},Re.None=ca,Re.Uniform=sl,Re.UniformToFill=ZA,Re.CycleAll=id,Re.CycleNotDirected=sc,Re.CycleNotDirectedFast=ac,Re.CycleNotUndirected=zd,Re.CycleDestinationTree=jd,Re.CycleSourceTree=Nf,Re.DocumentScroll=yA,Re.InfiniteScroll=lc,Re.TreeParentCollapsed=YA,Re.AllParentsCollapsed=Bs,Re.AnyParentsCollapsed=wA;function uc(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function jl(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=Hn[Ve("76a715b2f73f148a")][Ve("72ba13b5")]||"";if(a.Rc=!0,Xo){var E=Re[Ve("76a115b6ed251eaf4692")];if(E)for(var b=Vd.iterator;b.next()&&(E=b.value,E=Ve(E).split(Ve("39e9")),!(6>E.length));){var z=Ve(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Ve(fi[Ve("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=Hn[Ve("74a900bae4370f8b51")][Ve("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Ve("73a612b6fb191d")](Ve("3aad1ab6e022098b4dc4")),z=Ve(E[2]),-1<tt&&(rt=rt[Ve("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Ve("76ad18b4f73e")],rt=x[Ve("73a612b6fb191d")](Ve("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Ve("73a612b6fb191d")](z),0>tt&&z!==Ve("7da71ca0ad381e90")&&(tt=y[Ve("73a612b6fb191d")](Ve("76a715b2ef3e149757"))),0>tt&&(tt=y[Ve("73a612b6fb191d")](Ve("76a715b2ef3e149757"))),0>tt&&(tt=y[Ve("73a612b6fb191d")](Ve("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Ve("73a612b6fb191d")](Ve("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Ve("73a612b6fb191d")](Ve("35"))||y[Ve("73a612b6fb191d")](Ve("35"))===-1),!a.Rc||x[Ve("73a612b6fb191d")](Ve("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ve("73a612b6fb191d")](z)),!a.Rc)||(tt=Hn[Ve("76a715b2f73f148a")][Ve("69ad17a1e03e")],rt=tt[Ve("73a612b6fb191d")](Ve("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Ve("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=Hn.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[Ve("79a417a0f0181a8946")]=E,Hn.document[Ve("78a712aa")]){Hn.document[Ve("78a712aa")][Ve("7bb806b6ed32388c4a875b")](tt),ot=Hn.getComputedStyle(tt).getPropertyValue(Ve("78a704b7e62456904c9b12701b6532a8"));var lt=Hn.getComputedStyle(tt).getPropertyValue(Ve("75b817b0ea2202"));if(Hn.document[Ve("78a712aa")][Ve("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Hn[Ve("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(Ve("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[Ve("76ad18b4f73e")],b=x[Ve("73a612b6fb191d")](Ve("35e7"))+2;b<ut;b++)y+=x[b];x=y[Ve("73a612b6fb191d")](Ve("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ve("73a612b6fb191d")](Ve("35")))}}}return 0<a.Rc&&a!==a.wy}uc.className="DiagramHelper";function qu(a){this.j=a===void 0?new Ut:a,this.o=new Ut}Ke.Object.defineProperties(qu.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 Ac="DraggingInfo";qu.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=fr,this.gridSnapOrigin=new Ut(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"||Hn.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}Je(dt,Re);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Rr,a.layout=new sa}dt.prototype.reset=function(){Re.prototype.reset.call(this),ht(this)},dt.className="Palette";function gt(a,y){if(typeof a=="string"||Hn.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.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 Di;var b=new mr;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 ar(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new qt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Ut(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Kt(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&&Kt(E)},x.autoScale=sl,x.vb=!1,y&&Object.assign(x,y),x}Je(gt,Re),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(ec(this),this.ql===null){var x=new Wl(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}}}Re.prototype.redraw.call(this)},gt.prototype.gc=function(){if(this.Ka===null&&te("No div specified"),this.ta===null&&te("No canvas specified"),!(this.ta instanceof wa)&&(qm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){ec(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=He.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Tu(y,b),He.free(b),oa(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=mA(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var ut=mA(rt,b),ft=ot.scale,yt=He.alloc(),Et=rt.Pa.s,kt=Et.length,Dt=0;Dt<kt;Dt++){var Jt=Et[Dt];(E||Jt!==lt)&&rt.Oj(b,Jt,ot,null,ft,yt,!1)}He.free(yt),b.globalAlpha=ut}}}}}function Kt(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 mr&&(E.strokeWidth=a),y.location=new Ut(x.x-a/2,x.y-a/2),y.isSelected=!0}}}gt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return us;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(),Kt(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))},Ke.Object.defineProperties(gt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof gt&&te("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),Kt(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),Kt(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 qt(){_o.call(this),this.j=null}Je(qt,_o),qt.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 Ut(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Ut(a.x-this.j.x,a.y-this.j.y)),!0)},qt.prototype.doActivate=function(){this.j=null,_o.prototype.doActivate.call(this)},qt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},qt.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 Ut(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Ut(a.x-this.j.x,a.y-this.j.y)}}},qt.className="OverviewDraggingTool";function Yt(){cn(this),this.H=ku,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=us,this.hb=!0,this.cg=null,this.ob=200}Yt.prototype.toString=function(){return"CommandHandler"},Yt.prototype.Xe=function(a){this.H=a},Yt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=dr?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()},Yt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Yt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Eo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Yt.prototype.canStopCommand=function(){return!0},Yt.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=""}},Yt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Yt.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 Be,x=a.selection.iterator;x.next();)sd(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=""}},Yt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Yt.prototype.copySelection=function(){var a=this.diagram,y=new Be;for(a=a.selection.iterator;a.next();)sd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Yt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Yt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Yt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Yt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Fh=null,WA="";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 ne,x.addAll(z),Fh=x,WA=y.model.dataFormat}}y.R("ClipboardChanged",x)},Yt.prototype.pasteFromClipboard=function(){var a=new Be,y=Fh;if(y===null)return a;var x=this.diagram;if(WA!==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},Yt.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);Bh(y,z,new Ut(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=""}},Yt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Fh===null||Fh.count===0||WA!==a.model.dataFormat)},Yt.prototype.undo=function(){this.diagram.undoManager.undo()},Yt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Yt.prototype.redo=function(){this.diagram.undoManager.redo()},Yt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Yt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Yt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Yt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Yt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Yt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Yt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Yt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Eu(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=us):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Wr(y)},Yt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Yt.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;Eu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=pe(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 ur)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Di&&y.tv(ot.actualBounds),ot instanceof Jn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof ur&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Di&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Mr(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 pe(a,y,x){if(y.isVisible())return x;if(y instanceof Jr)pe(a,y.adornedPart,x);else if(y instanceof Qn){var E=y.fromNode;E!==null&&pe(a,E,x),y=y.toNode,y!==null&&pe(a,y,x)}else y instanceof Jn&&(E=y.labeledLink,E!==null&&pe(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),pe(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),pe(a,y,x));return x}Yt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Di)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Yt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Eu(y.animationManager,"Collapse Tree");var x=new ne;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")}},Yt.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},Yt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Eu(y.animationManager,"Expand Tree");var x=new ne;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")}},Yt.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},Yt.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 ne,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new ne,ot=b.iterator;ot.next();){var lt=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(lt.Td(ut.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 ur)gu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Et=y.copyNodeData(x);Ye(Et)&&(y.xf(Et),E=a.ii(Et))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var kt=rt.iterator;kt.next();){var Dt=kt.value;this.isValidMember(E,Dt)&&(Dt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Yt.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 $e(a){var y=An();for(a=a.iterator;a.next();){var x=a.value;x instanceof Qn||y.push(x)}a=new Be,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 Nn(y),a}Yt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Qn)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},Yt.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 ne;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof ur&&z.canUngroup()&&E.add(z)}var tt=new ne;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var lt=ot.containingGroup,ut=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 Qn)){var Et=yt.data;Et!==null?x.mp(Et,ut):yt.containingGroup=lt}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Yt.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 ur))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&y.canUngroup())return!0;return!1},Yt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=$e(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Yt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Eu(y.animationManager,"Collapse SubGraph");var x=new ne;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 ur&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Yt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ur&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&y.isSubGraphExpanded)return!0;return!1},Yt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Eu(y.animationManager,"Expand SubGraph");var x=new ne;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 ur&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Yt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ur&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ur&&!y.isSubGraphExpanded)return!0;return!1},Yt.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 Mo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Yt.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 Mo))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 Mo&&x.editable}),a!==null))return!0;return!1},Yt.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 ye?b=a.ga(rr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Ut(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,gA(x,!1,a)}},Yt.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)},Yt.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 Ue,a===null)return E;for(var z=a.iterator;z.next();)Xu(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 Qn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ke.Object.defineProperties(Yt.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||te("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}}}),Yt.className="CommandHandler",Id=function(){return new Yt};function ye(){cn(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ut(NaN,NaN).freeze(),this.jd=Qr,this.Ab=new Xi,this.wh=new Xi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ji,this.uc=new He(NaN,NaN,NaN,NaN).freeze(),this.Ib=new He(NaN,NaN,NaN,NaN).freeze(),this.dc=new He(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ws,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Pn,wn,wi,Fi,_i,sr,Dr,Sr,Kr,fo;ye.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=_n(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ye.prototype.Vw=function(a){var y=this.Dh;if(Kn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ye.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ye.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},ye.prototype.copy=function(){return this.clone()},Tt=ye.prototype,Tt.qb=function(a){a.classType===Qn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:te("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ye&&(this.stretch=a)},Tt.toString=function(){return Vn(this.constructor)+"#"+Xn(this)},Tt.th=function(){this.A!==null&&(this.A.nc=!0)};function vr(a){a.A===null?a.A=new hc:a.A.nc&&(a.A=a.A.copy())}Tt.Xc=function(){if(this.ba===null){var a=new If;a.Xi=ir,a.yj=ir,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Tt.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===Io&&$s(this)&&To(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 Ue),tt=z.undoManager.transactionLevel===0,a.startCondition===Sh?tt=!0:a.startCondition===Zh&&(tt=!1),tt?(z=new ra,mf(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()):(Eu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Sn&&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 Sn&&Iu(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function To(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=b1(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))}}Tt.ks=function(a){return this.bindingId===a?this:null},Tt.g=function(a,y,x){this.cb(Io,a,this,y,x)},Tt.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 Xi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Os(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Tt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?gn(a.x,a.y,0,0,0,E.height)<=y||gn(a.x,a.y,0,E.height,E.width,E.height)<=y||gn(a.x,a.y,E.width,E.height,E.width,0)<=y||gn(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},Tt.se=function(){return!0},Tt.ca=function(a){var y=Ut.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Ut.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=vo(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Ut.free(y),a}return b=!1,(this instanceof Jr||this instanceof mr?vo(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)),Ut.free(y),b},Tt.gh=function(a){var y=this.naturalBounds;return vo(0,0,y.width,y.height,a.x,a.y)},Tt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=He.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Ut.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)))),Ut.free(b),He.free(y),E},Tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Ut.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)))),Ut.free(b),E},Tt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Ut.allocAt(0,0),b=Ut.allocAt(0,x.height),z=Ut.allocAt(x.width,x.height),tt=Ut.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=He.allocAt(0,0,x.width,x.height);var ot=Ut.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)))),Ut.free(ot),He.free(x),!rt&&(we.us(a,E,b)||we.us(a,b,z)||we.us(a,z,tt)||we.us(a,tt,E))&&(rt=!0)}return Ut.free(E),Ut.free(b),Ut.free(z),Ut.free(tt),rt},Tt.ga=function(a,y){if(y===void 0&&(y=new Ut),a instanceof di){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},Tt.mi=function(a){a===void 0&&(a=new He);var y=this.naturalBounds,x=this.oe,E=Ut.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Pr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Pr(a,E.x,E.y,0,0),Ut.free(E),a},Tt.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},Tt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Tt.qs=function(a,y){return y===void 0&&(y=new Ut),y.assign(a),this.oe.Cd(y),y},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.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,ut=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,we.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*lt+ft,a=a*ot+y*ut+yt,y=x*rt+E*lt+ft,x=x*ot+E*ut+yt,b.h(0,0),E=this.naturalBounds,x=we.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},ye.prototype.measure=function(a,y,x,E){if(wl(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 Sn;switch(Ha(this,!0)){case wn:tt=b=0,rt&&(y=a=1/0);break;case Pn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Fi:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case _i: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()||te("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Cs(this,!1)}},ye.prototype.Wl=function(){},ye.prototype.Dd=function(){return!1},ye.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=He.alloc();z.assign(this.Ib),this.Ib.ka(),Pa(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&&vc(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 Mo&&(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()||te("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),$u(this,!1),He.free(z)},Tt=ye.prototype,Tt.eh=function(){};function Ca(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=Ha(a,!0),x===E&&z===b&&(y=wn),y){case wn:(x>E||z>b)&&(Cs(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Pn:Cs(a,!0),a.measure(E,b,0,0);break;case Fi:Cs(a,!0),a.measure(E,z,0,0);break;case _i:Cs(a,!0),a.measure(x,b,0,0)}}}Tt.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(),kr(a,y)||(x.oh(),this.Pn(x)))},Tt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof Jn&&Wy(a,this))},Tt.gc=function(a,y){if(!al(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 Sn&&vc(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(Zo(this,a,lt,!0,!0,ot,rt),lt instanceof Ao&&lt.type===Cr?(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)),ut!==null&&(Zo(this,a,ut,!0,!1,ot,rt),ut instanceof Ao&&ut.type===Cr?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):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&&Hs(this),lt=this.part,ot=!1;var ft=0;lt&&y.Gf("drawShadows")&&(ot=lt.isShadowed)&&(ut=lt.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var yt;if(!(yt=y.$i||!ut)){var Et=this.naturalBounds;yt=this.wh;var kt=yt.m11,Dt=yt.m21,Jt=yt.dx,zt=yt.m12,se=yt.m22,he=yt.dy,ge,ve=ge=0;yt=ge*kt+ve*Dt+Jt;var _e=ge*zt+ve*se+he;ge=Et.width+ft,ve=0;var jn=ge*kt+ve*Dt+Jt;ge=ge*zt+ve*se+he,ve=Math.min(yt,jn);var pi=Math.min(_e,ge),hi=Math.max(yt+0,jn)-ve,In=Math.max(_e+0,ge)-pi;yt=ve,_e=pi,ge=Et.width+ft,ve=Et.height+ft,jn=ge*kt+ve*Dt+Jt,ge=ge*zt+ve*se+he,ve=Math.min(yt,jn),pi=Math.min(_e,ge),hi=Math.max(yt+hi,jn)-ve,In=Math.max(_e+In,ge)-pi,yt=ve,_e=pi,ge=0,ve=Et.height+ft,jn=ge*kt+ve*Dt+Jt,ge=ge*zt+ve*se+he,ve=Math.min(yt,jn),pi=Math.min(_e,ge),hi=Math.max(yt+hi,jn)-ve,In=Math.max(_e+In,ge)-pi,yt=ve,_e=pi,ft=y.viewportBounds,Et=ft.x,kt=ft.y,yt=!(yt>ft.width+Et||Et>hi+yt||_e>ft.height+kt||kt>In+_e)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Mo&&(a.font=this.font),yt){if(_e=rt.se()?rt.naturalBounds:rt.actualBounds,hi=Math.max(tt.x,_e.x),In=Math.max(tt.y,_e.y),ft=Math.min(tt.right,_e.right)-hi,Et=Math.min(tt.bottom,_e.bottom)-In,kt=this.tb,kt!==null&&(hi=kt.x,In=kt.y,ft=kt.width,Et=kt.height),hi>tt.width+tt.x||tt.x>_e.width+_e.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(hi,In,ft,Et),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(_e=lt.shadowOffset,a.Ev(_e.x*y.scale*this.scale*y.Mb,_e.y*y.scale*this.scale*y.Mb,lt.shadowBlur),SA(a),a.shadowColor=lt.shadowColor)}ot&&this.shadowVisible===!0?SA(a):ot&&this.shadowVisible===!1&&Du(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),vl(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&js(this,rt)&&this.shadowVisible===null&&Du(a),this.Ma!==null&&(a.yc(),Ta(this,a,lt,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||js(this,rt))?(yl(this,!0),this.shadowVisible===null&&Du(a)):yl(this,!1),this.hh(a,y),ot&&this.l&512&&SA(a),ut&&ot&&Du(a),yt&&(a.restore(),a.Vc(this instanceof Sn)),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 js(a,y){return y===null?!1:(vc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Sn.Auto||y.type===Sn.Spot)&&y.Pb()!==a)}Tt.Dv=function(){};function vl(a,y,x,E){Zo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Ao&&a.areaBackground.type===Cr?(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 Ta(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;Zo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Ao&&a.Ma.type===Cr?(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 ya(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===Sn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function al(a,y,x){if(!(y instanceof Wa))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&&ya(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),SA(y),y.shadowColor=a.shadowColor}a instanceof Mo&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Sn;var rt=a instanceof Sn?vc(a):!1;a.l&4096&&Hs(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Of(y,1,0,0,1,0,0),a.svg=y.ad):z?(Of(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Of(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],vl(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]),Ta(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],Ta(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&&SA(y),rt&&a.shadowVisible===!0?SA(y):rt&&a.shadowVisible===!1&&Du(y),b=a.panel,rt&&js(a,b)&&a.shadowVisible===null&&Du(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||js(a,b))?(yl(a,!0),a.shadowVisible===null&&Du(y)):yl(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),Oa(y,lt),!0):(a.svg=rt,tt!==null&&rt===null&&(yg(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&&SA(y),a.Dd()&&Du(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&&ya(a,E,rt),tt!==null&&tt(a,rt)),!0)}Tt.$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"+ki++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Sn&&(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"),Oa(a,E)};function Oa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function pr(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Vi(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()}}Tt.hh=function(){},Tt.lv=function(){this.Uc=!0},Tt.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 Sn?vc(this):!1;if(!(this instanceof Sn&&b))if(this instanceof Al){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 Sn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof mr){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],vl(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&&Hf(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Hf(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Sn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Ta(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Hf(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&&Hf(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Tt.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 Zo(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===Hr)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 pc)&&x.xe&&(x.type===jo||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,yt=0,Et=0,kt=0,Dt=0,Jt=0;if(Jt=Dt=0,b?(Dt=tt.x,Jt=tt.y):E||(Dt-=lt/2,Jt-=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,kt=x.end.y*ot+x.end.offsetY,ft+=Dt,Et+=Dt,yt+=Jt,kt+=Jt,x.type===hr)ut=y.createLinearGradient(ft,yt,Et,kt);else if(x.type===Cr)Jt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Dt=0,Jt=Math.max(rt,ot)/2):Dt=x.startRadius,ut=y.createRadialGradient(ft,yt,Dt,Et,kt,Jt);else if(x.type===jo)try{ut=y.createPattern(x.pattern,"repeat")}catch(se){ut=null}if(x.type!==jo&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===jo&&x.yk!==-1)){x.yk=-1;var zt=a.diagram;zt!==null&&x.yk===-1&&Mr(function(){zt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Tt.rg=function(a){if(a instanceof Sn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Tt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Tt.If=function(){for(var a=this instanceof Sn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Hs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Vl(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)}Vl(a,!1),Va(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Va(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,Va(a,!1)))}Tt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ut.alloc();z.yi(y,x,E,b,rr),a.rotate(this.Kb,z.x,z.y),Ut.free(z)}},Tt.v=function(a){if(!wl(this)){a===void 0&&(a=!1),Cs(this,!0),$u(this,!0);var y=this.panel;y===null||a||y.v()}},Tt.Uj=function(){wl(this)||(Cs(this,!0),$u(this,!0))};function bs(a){if(!Pa(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())),$u(a,!0)}}Tt.Uk=function(){!(this.l&2048)&&(Vl(this,!0),Va(this,!0))},Tt.Wu=function(){Va(this,!0)},Tt.N=function(){var a=this.part;a!==null&&a.N()};function Ha(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Sn.Table?Jo(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Sn.Auto&&E.Pb()===a?Lo(a,Pn,y):x===sr?E!==null?E.type===Sn.Spot&&E.Pb()===a?Lo(a,Pn,y):(x=E.defaultStretch,x===sr?Lo(a,wn,y):Lo(a,x,y)):Lo(a,wn,y):Lo(a,x,y)}function Jo(a,y,x,E){var b=a.stretch;if(b!==sr)return Lo(a,b,E);var z=b=null;switch(y.stretch){case _i:z=!0;break;case Pn:z=!0}switch(x.stretch){case Fi:b=!0;break;case Pn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Fi||y===Pn),z===null&&(z=y===_i||y===Pn),b===!0&&z===!0?Lo(a,Pn,E):b===!0?Lo(a,Fi,E):z===!0?Lo(a,_i,E):Lo(a,wn,E)}function Lo(a,y,x){if(x)return y;if(y===wn||(x=a.desiredSize,x.w()))return wn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Fi)return wn;if(y===Pn)return _i}else{if(y===_i)return wn;if(y===Pn)return Fi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===_i)return wn;if(y===Pn)return Fi}else{if(y===Fi)return wn;if(y===Pn)return _i}return y}function yl(a,y){a.l=y?a.l|512:a.l&-513}function $s(a){return(a.l&1024)!==0}function XA(a,y){a.l=y?a.l|1024:a.l&-1025}function Vl(a,y){a.l=y?a.l|2048:a.l&-2049}function Va(a,y){a.l=y?a.l|4096:a.l&-4097}function wl(a){return(a.l&8192)!==0}function Cs(a,y){a.l=y?a.l|8192:a.l&-8193}function Pa(a){return(a.l&16384)!==0}function $u(a,y){a.l=y?a.l|16384:a.l&-16385}Tt.Gj=function(){this.svg=null},Tt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Tt.Av=function(){},Tt.zv=function(a){return this.pa=a,bs(this),!0},Tt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Tt.kq=function(){return 0};function Eh(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 Sn?a instanceof Jn?a.Bd():a.qm(a,function(x){Eh(x)}):Eh(a))}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ps(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&py(a)&&te("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new ne),this.localBindings.add(b),this},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return vg(this,a),this},Tt.apply=function(a){return a(this),this},Tt.nm=function(a){return tc(this,a),this},Tt.pz=function(){return this.ih()},Tt.ih=function(){for(var a=this instanceof Sn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Tt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ue),this.animationTriggers.add(a.propertyName,a),this};function xl(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=Wd.I(a);typeof z=="function"?(x=_n(arguments),E=z(x),Ye(E)||te('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Hn.go[a]}if(E===null&&(b!=null&&b.constructor||te("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 Re&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Vc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?te("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):vg(E,z);return E}function vg(a,y){if(typeof y=="string")if(a instanceof Mo)a.text=y;else if(a instanceof mr)a.figure=y;else if(a instanceof Al)a.source=y;else if(a instanceof Sn)y=Uu.I(y),y!==null&&(a.type=y);else if(a instanceof Ao){var x=Wn(Ao,y);x!==null?a.type=x:te("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof bn?(y=Wn(bn,y),y!==null&&(a.type=y)):a instanceof jr&&(y=Wn(jr,y),y!==null&&(a.type=y));else if(y instanceof ye)a instanceof Sn||te("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ts){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 Ts?s0(E,y):te("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof hn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ho)a.type=y;else if(y instanceof Ps)a instanceof ye||a instanceof Ts?a.bind(y):te("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof tu)a instanceof ye?a.Jv(y):te("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof xs)a instanceof bn&&a.type===bn.o?a.figures.add(y):te("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof jr)a instanceof xs?a.segments.add(y):te("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Vo)a instanceof Re||a instanceof ur?a.layout=y:te("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++)vg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ao){x=new vi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);tc(a,x)}else if(a instanceof Ts){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&te("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)&&te("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new vi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);tc(a,b)}else tc(a,y);else te('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function tA(a,y){Wd.add(a,y)}function Df(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}Ke.Object.defineProperties(ye.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new hc),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 hc),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 hc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(vr(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&&(vr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ya},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ya&&(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 Lh),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 Lh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:pn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Lh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:sr},set:function(a){var y=this.stretch;y!==a&&(vr(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&&(vr(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)&&zn(a,"0 <= value <= 1",ye,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N($d(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($d(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 Ao&&a.freeze(),vr(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 Ao&&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 Di)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 Ut(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&&te("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 mr&&this.qc(),this.g("desiredSize",E,a),$s(this)&&(a=this.part,a!==null&&(To(this,a,"width"),To(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 mr&&this.qc(),this.g("desiredSize",y,a),$s(this)&&(a=this.part,a!==null&&To(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 mr&&this.qc(),this.g("desiredSize",y,a),$s(this)&&(a=this.part,a!==null&&To(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:si},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(),vr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:wr},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(),vr(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Hs(this),this.Ab}},oe:{get:function(){return this.l&4096&&Hs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(vr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:wn},set:function(a){this.reshapingBehavior!==a&&(vr(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()&&te("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),bs(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&&zn(a,">= 0",ye,"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&&zn(a,">= 1",ye,"columnSpan"),vr(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&&zn(a,">= 0",ye,"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&&zn(a,">= 1",ye,"rowSpan"),vr(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&&(vr(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||te("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:ir},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Eh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&zn(a,">= 0",ye,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Eh(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),Eh(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&&zn(a,">= 0",ye,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ir},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Eh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&zn(a,">= 0",ye,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Eh(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),Eh(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&&zn(a,">= 0",ye,"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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(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&&(vr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ye.prototype.trigger=ye.prototype.Jv,ye.prototype.findBindingPanel=ye.prototype.ih,ye.prototype.findTemplateBinder=ye.prototype.pz,ye.prototype.setProperties=ye.prototype.nm,ye.prototype.apply=ye.prototype.apply,ye.prototype.attach=ye.prototype.Du,ye.prototype.set=ye.prototype.set,ye.prototype.isEnabledObject=ye.prototype.If,ye.prototype.isVisibleObject=ye.prototype.Ed,ye.prototype.isContainedBy=ye.prototype.rg,ye.prototype.getNearestIntersectionPoint=ye.prototype.rs,ye.prototype.getLocalPoint=ye.prototype.qs,ye.prototype.getDocumentScale=ye.prototype.Df,ye.prototype.getDocumentAngle=ye.prototype.li,ye.prototype.getDocumentBounds=ye.prototype.mi,ye.prototype.getDocumentPoint=ye.prototype.ga,ye.prototype.intersectsRect=ye.prototype.Yc,ye.prototype.containedInRect=ye.prototype.fh,ye.prototype.containsRect=ye.prototype.Re,ye.prototype.containsPoint=ye.prototype.ca,ye.prototype.raiseChanged=ye.prototype.g,ye.prototype.raiseChangedEvent=ye.prototype.cb,ye.prototype.addCopyProperty=ye.prototype.Vw;var Wd=null;ye.className="GraphObject",Wd=new Ue,tA("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=xl(Sn,Sn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Sn){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"},xl(mr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new di(0,0,2.76142374915397,2.761423749153969),spot2:new di(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 Sn&&(x=E.fb("ButtonBorder"),x instanceof mr)){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 Sn&&(x=E.fb("ButtonBorder"),x instanceof mr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Sn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof mr){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 Sn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof mr){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 Sn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof mr){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 Sn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof mr))){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}),tA("TreeExpanderButton",function(){var a=xl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},xl(mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Hi},new Ps("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ps("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Jr&&(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}),tA("SubGraphExpanderButton",function(){var a=xl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},xl(mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Hi},new Ps("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 Jr&&(x=x.adornedPart),x instanceof ur){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}),tA("ToolTip",function(){return xl(Jr,Sn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ut(0,3),shadowBlur:5},xl(mr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new di(0,0,4,6),spot2:new di(1,1,-4,-4)}))}),tA("ContextMenu",function(){return xl(Jr,Sn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ut(0,3),shadowBlur:5},new Ps("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),tA("ContextMenuButton",function(){var a=xl("Button");a.stretch=Fi;var y=a.fb("ButtonBorder");return y instanceof mr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new di(0,0,2,3),y.spot2=new di(1,1,-2,-2)),a}),tA("PanelExpanderButton",function(a){var y=Df(a,"COLLAPSIBLE"),x=xl("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},xl(mr,{name:"ButtonIcon",strokeWidth:2},new Ps("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof mr&&(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}),tA("CheckBoxButton",function(a){var y=Df(a);return a=xl("Button",{desiredSize:new ln(14,14)},xl(mr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Pn,geometryStretch:wi,visible:!1},y!==""?new Ps("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Sn){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}),tA("CheckBox",function(a){a=Df(a),a=xl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new ar(0,1,0,0)});var y=xl(Sn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new ar(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),ye.None=wn=new hn(ye,"None",0),ye.Default=sr=new hn(ye,"Default",0),ye.Vertical=_i=new hn(ye,"Vertical",4),ye.Horizontal=Fi=new hn(ye,"Horizontal",5),ye.Fill=Pn=new hn(ye,"Fill",3),ye.Uniform=wi=new hn(ye,"Uniform",1),ye.UniformToFill=Dr=new hn(ye,"UniformToFill",2),ye.FlipVertical=Sr=new hn(ye,"FlipVertical",1),ye.FlipHorizontal=Kr=new hn(ye,"FlipHorizontal",2),ye.FlipBoth=fo=new hn(ye,"FlipBoth",3),ye.make=xl,ye.getBuilders=function(){var a=new Ue,y;for(y in Wd)if(y!==y.toLowerCase()){var x=Wd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ye.defineBuilder=tA,ye.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Wd.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof ye))return y&&E.set(y),E;te('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ye.takeBuilderArgument=Df;function hc(){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=si,this.o=wr,this.hg=sr,this.ob=this.Bi=1,this.Pf=wn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}hc.prototype.copy=function(){var a=new hc;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 Lh(){this.u=-1/0,this.o=0,this.F=pn,this.rr=Ya,this.j=this.V="None"}Lh.prototype.copy=function(){var a=new Lh;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},Lh.className="LinkElementSettings";function If(){this.yj=this.Xi=ws,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}If.prototype.copy=function(){var a=new If;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},If.className="LinkSettings";function cc(){this.ha=[1,0,0,1,0,0]}cc.prototype.copy=function(){var a=new cc;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},cc.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},cc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},cc.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)}},cc.className="STransform";function JA(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}JA.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},JA.className="SGradient";function wa(a,y,x){this.ownerDocument=a=y===void 0?Hn.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 Wa(this,x)}wa.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},wa.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ye(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},wa.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},wa.prototype.focus=function(){this.Oa.focus()},wa.prototype.mx=function(){this.ownerDocument=null},Ke.Object.defineProperties(wa.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}}}),wa.className="SVGSurface";function Wa(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 cc,this.j=yg(this),this.Nj=yg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=ki++,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 Uf(a,y,x,E,b,z,tt){a.Nj===void 0?Of(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Tt=Wa.prototype,Tt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,lt=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),yt=a+ut,Et=y+ft,kt=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,kt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,kt,yt,Et])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),kt,a+x*Math.cos(b),y+x*Math.sin(b)])},Tt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Tt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Tt.clearRect=function(){},Tt.clip=function(){this.Yl.clipPath=!0},Tt.closePath=function(){this.path.push(["z"])},Tt.createLinearGradient=function(a,y,x,E){var b=new JA("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Tt.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"+ki++,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(fu,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Tt.createRadialGradient=function(a,y,x,E,b,z){var tt=new JA("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)}Tt.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 ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,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:ut||E,height:a||b,href:lt},we.$(E,rt)&&we.$(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!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),dc(this,fu,z,this.rb),this.addElement(fu,z)},Tt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),fc(this,this.Yl)},Tt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Tt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},dc(this,"fill",a,this.rb),this.addElement("rect",a)},Tt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},dc(this,"fill",a,this.rb),fc(this,a),this.svg.prepend(this.Ud("rect",a))},Tt.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},dc(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Tt.lineTo=function(a,y){this.path.push(["L",a,y])},Tt.moveTo=function(a,y){this.path.push(["M",a,y])},Tt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Tt.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"])},Tt.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},Tt.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())},Tt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Of(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]+")"}Tt.scale=function(a,y){this.rb.scale(a,y)},Tt.translate=function(a,y){this.rb.translate(a,y)},Tt.transform=function(){},Tt.yc=function(){},Tt.stroke=function(){e0(this,this.Yl)},Tt.jk=function(){this.clipInsteadOfFill||this.stroke()},Tt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Tt.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 dc(a,y,x,E){y==="fill"?fc(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 fc(a,y){a.fillStyle instanceof JA?y.fill=gc(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 Qf(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof JA?y.setAttributeNS(null,"fill",gc(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 JA)y.stroke=gc(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 gc(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"+ki++,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,ut){return lt.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Tt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=_n(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,dc(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 Of(a,y,x,E,b,z,tt){var rt=new cc;rt.ha=[y,x,E,b,z,tt],y={},dc(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function yg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Du(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function SA(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Tt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Tt.fs=function(){this.Ct=!1},Tt.Vc=function(){},Tt.Wx=function(){},Wa.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Wa.prototype.getImageData=function(){return null},Wa.prototype.measureText=function(){return null};function Hf(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()))}Wa.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Wa.className="SVGContext",Re.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new wa(this,Hn.document));var y=new wa(this,Hn.document,!0);a===void 0&&(a=new vi);var x=this;return nd(this,function(E,b){return E=mg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.av=function(a){return this.Cs(a)},Re.prototype.makeSVG=Re.prototype.av;function Wl(a,y,x,E){this.ownerDocument=y=y===void 0?Hn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new pc(y,x,E),y.H=a}Wl.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},Wl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Wl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Wl.prototype.focus=function(){this.Oa.focus()},Wl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ke.Object.defineProperties(Wl.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}}}),Wl.className="CanvasSurface";function pc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&te("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 Xi,this.isTemporary=!!x}Tt=pc.prototype,Tt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Tt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Tt.beginPath=function(){this.Z.beginPath()},Tt.Se=function(){},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Tt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Tt.clip=function(){this.Z.clip()},Tt.closePath=function(){this.Z.closePath()},Tt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Tt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Tt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Tt.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)},Tt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Tt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Tt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Tt.lineTo=function(a,y){this.Z.lineTo(a,y)},Tt.measureText=function(a){return this.Z.measureText(a)},Tt.moveTo=function(a,y){this.Z.moveTo(a,y)},Tt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Tt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Tt.restore=function(){this.Z.restore()},Tt.save=function(){this.yc(),this.Z.save()},pc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Tt=pc.prototype,Tt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Tt.scale=function(a,y){this.El.scale(a,y)},Tt.translate=function(a,y){this.El.translate(a,y)},Tt.stroke=function(){this.Z.stroke()},Tt.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}},Tt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Tt.ng=function(a,y){if(a instanceof Ao&&a.type===Cr){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)},Tt.jk=function(){this.Hm||this.stroke()},Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Tt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Tt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},Tt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Tt.Hs=function(){},Ke.Object.defineProperties(pc.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([]);pc.className="CanvasSurfaceContext";function Rf(){this.F=this.o=this.u=this.j=0}Rf.className="ColorNumbers";function Ao(a,y){Ni||(Pt(),Ni=!0),cn(this),this._isFrozen=!1,a===void 0?(this.na=Hr,this.xk="black"):typeof a=="string"?(this.na=Hr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===hr?(this.Qd=Rr,this.Lk=es):this.Lk=a===Cr?this.Qd=rr:this.Qd=ir,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ao.prototype.copy=function(){var a=new Ao;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},Tt=Ao.prototype,Tt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Tt.ka=function(){return Object.isFrozen(this)&&te("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Tt.qb=function(a){a.classType===Ao&&(this.type=a)},Tt.toString=function(){var a="Brush(";if(this.type===Hr)a+=this.color;else if(a=this.type===hr?a+"Linear ":this.type===Cr?a+"Radial ":this.type===jo?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+")"},Tt.addColorStop=function(a,y){return this._isFrozen&&ke(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&zn(a,"0 <= loc <= 1",Ao,"addColorStop:loc"),this.we===null&&(this.we=new Ue),this.we.add(a,y),this.na===Hr&&(this.type=hr),this.xe=null,this},Tt.Vz=function(a,y){if(this._isFrozen&&ke(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ro:y,this.type===Hr)BA(this.color),this.color=Yd(a,y);else if((this.type===hr||this.type===Cr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ro:x,BA(a),Yd(y,x)}Tt.Wy=function(a,y){if(this._isFrozen&&ke(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ro:y,this.type===Hr)BA(this.color),this.color=Yd(-a,y);else if((this.type===hr||this.type===Cr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(-a,y));return this};function i0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ro:x,BA(a),Yd(-y,x)}function np(a,y,x){BA(a),a=Qe.j;var E=Qe.u,b=Qe.o,z=Qe.F;return BA(y),x===void 0&&(x=.5),"rgba("+Math.round((Qe.j-a)*x+a)+", "+Math.round((Qe.u-E)*x+E)+", "+Math.round((Qe.o-b)*x+b)+", "+Math.round((Qe.F-z)*x+z)+")"}Tt.Gx=function(){if(this.type===Hr)return Zd(this.color);if((this.type===hr||this.type===Cr)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Cr)return Zd(a.first().value);if(a.get(.5)!==null)return Zd(a.get(.5));if(a.count===2)return a=a.Fa(),Zd(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,Zd(np(a.get(x),a.get(E),1-z/b))}return!1};function Zd(a){return a?a instanceof Ao?a.Gx():(BA(a),128>(299*Qe.j+587*Qe.u+114*Qe.o)/1e3):!1}function Yd(a,y){switch(y){case ro:y=100*rp(Qe.j);var x=100*rp(Qe.u),E=100*rp(Qe.o);return Dn.j=.4124564*y+.3575761*x+.1804375*E,Dn.u=.2126729*y+.7151522*x+.072175*E,Dn.o=.0193339*y+.119192*x+.9503041*E,Dn.F=Qe.F,y=St(Dn.j/Pe[0]),x=St(Dn.u/Pe[1]),E=St(Dn.o/Pe[2]),$n.j=116*x-16,$n.u=500*(y-x),$n.o=200*(x-E),$n.F=Dn.F,$n.j=Math.min(100,Math.max(0,$n.j+100*a)),a=($n.j+16)/116,y=a-$n.o/200,Dn.j=Pe[0]*wt($n.u/500+a),Dn.u=Pe[1]*($n.j>le*Gt?Math.pow(a,3):$n.j/le),Dn.o=Pe[2]*wt(y),Dn.F=$n.F,a=-.969266*Dn.j+1.8760108*Dn.u+.041556*Dn.o,y=.0556434*Dn.j+-.2040259*Dn.u+1.0572252*Dn.o,Qe.j=255*op((3.2404542*Dn.j+-1.5371385*Dn.u+-.4985314*Dn.o)/100),Qe.u=255*op(a/100),Qe.o=255*op(y/100),Qe.F=Dn.F,Qe.j=Math.round(Qe.j),255<Qe.j?Qe.j=255:0>Qe.j&&(Qe.j=0),Qe.u=Math.round(Qe.u),255<Qe.u?Qe.u=255:0>Qe.u&&(Qe.u=0),Qe.o=Math.round(Qe.o),255<Qe.o?Qe.o=255:0>Qe.o&&(Qe.o=0),"rgba("+Qe.j+", "+Qe.u+", "+Qe.o+", "+Qe.F+")";case lo:return ip(),En.o=Math.min(100,Math.max(0,En.o+100*a)),"hsla("+En.j+", "+En.u+"%, "+En.o+"%, "+En.F+")";default:te("Unknown color space: "+y)}}function BA(a){Ni||(Pt(),Ni=!0);var y=Ze;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,Qe.j=a[0],Qe.u=a[1],Qe.o=a[2],Qe.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Qe.j=0,Qe.u=0,Qe.o=0,Qe.F=1)}}function ip(){var a=Qe.j/255,y=Qe.u/255,x=Qe.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))}En.j=Math.round(tt),En.u=Math.round(100*a),En.o=Math.round(100*b),En.F=Qe.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 St(a){return a>Gt?Math.pow(a,1/3):(le*a+16)/116}function wt(a){var y=a*a*a;return y>Gt?y:(116*a-16)/le}function Ft(a,y){typeof a!="string"&&(a instanceof Ao||te("Value for "+y+" must be a color string or a Brush, not "+a))}function Pt(){Ze=Xo?new Wl(null,void 0,{willReadFrequently:!0}).context:null}Ke.Object.defineProperties(Ao.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ke(this,a),this.na=a,this.start.Mc()&&(a===hr?this.start=Rr:a===Cr&&(this.start=rr)),this.end.Mc()&&(a===hr?this.end=es:a===Cr&&(this.end=rr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ke(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ke(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ke(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ke(this,a),0>a&&zn(a,">= zero",Ao,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ke(this,a),0>a&&zn(a,">= zero",Ao,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ke(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ke(this,a),this.cr=a,this.xe=null}}}),Ao.prototype.isDark=Ao.prototype.Gx,Ao.prototype.darkenBy=Ao.prototype.Wy,Ao.prototype.lightenBy=Ao.prototype.Vz,Ao.prototype.addColorStop=Ao.prototype.addColorStop;var Gt=216/24389,le=24389/27,Pe=[95.047,100,108.883],Ze=null,Qe=new Rf,En=new Rf,Dn=new Rf,$n=new Rf,Ni=!1;Ao.className="Brush";var Hr;Ao.Solid=Hr=new hn(Ao,"Solid",0);var hr;Ao.Linear=hr=new hn(Ao,"Linear",1);var Cr;Ao.Radial=Cr=new hn(Ao,"Radial",2);var jo;Ao.Pattern=jo=new hn(Ao,"Pattern",4);var ro;Ao.Lab=ro=new hn(Ao,"Lab",5);var lo;Ao.HSL=lo=new hn(Ao,"HSL",6),Ao.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},Ao.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Ni||(Pt(),Ni=!0);var y=Ze;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)},Ao.lighten=function(a){return n0(a)},Ao.lightenBy=n0,Ao.darken=function(a){return i0(a)},Ao.darkenBy=i0,Ao.mix=np,Ao.isDark=Zd;function ho(){this.xa="Base"}ho.prototype.measure=function(){},ho.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ho.prototype.arrange=function(){},ho.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ho.prototype.iA=function(a){a.Uj()},ho.prototype.gc=function(){},Ke.Object.defineProperties(ho.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Sn}}}),ho.prototype.remeasureObject=ho.prototype.iA,ho.prototype.arrangeElement=ho.prototype.Ly,ho.prototype.measureElement=ho.prototype.Yz,ho.className="PanelLayout";function qo(){this.xa="Base"}Je(qo,ho),qo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=ll(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===a){var ut=lt.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var yt=lt.measuredBounds;ft=Math.max(yt.width+ft,0),ut=Math.max(yt.height+ut,0),yt=lt.position.x;var Et=lt.position.y;isFinite(yt)||(yt=0),isFinite(Et)||(Et=0),lt instanceof mr&&lt.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Et-=lt),Pr(b,yt,Et,ft,ut)}}},qo.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 mr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,lt-=ut}z.visible&&z.arrange(ot+rt.left,lt+rt.top,tt.width,tt.height)}};function No(){this.xa="Base"}Je(No,ho),No.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=An(),z=ll(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===z){var ut=Ha(lt,!1);if(ut!==wn&&ut!==Fi)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var ft=Math.max(lt.height+ut.top+ut.bottom,0);b.width+=Math.max(lt.width+ut.right+ut.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)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));Nn(y)},No.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,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Et=yt.top+yt.bottom,kt=z+b.bottom,Dt=ft.height,Jt=Ha(ut,!1);(isNaN(ut.desiredSize.height)&&Jt===Pn||Jt===_i)&&(Dt=Math.max(x.height-Et-kt,0)),Et=Dt+Et+kt,kt=ut.alignment,kt.Xb()&&(kt=a.defaultAlignment),kt.sb()||(kt=rr),tt&&(rt-=ft.width+yt.left+yt.right),ut.arrange(rt+kt.offsetX+yt.left,lt+kt.offsetY+yt.top+(x.height*kt.y-Et*kt.y),ft.width,Dt),tt||(rt+=ft.width+yt.left+yt.right)}}};function Zr(){this.xa="Base"}Je(Zr,ho),Zr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=An();for(var rt=ll(a),ot=0;ot<tt;ot++){var lt=E[ot];if(lt.visible||lt===rt){var ut=Ha(lt,!1);if(ut!==wn&&ut!==_i)x.push(lt);else{var ft=lt.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,xr(b,Math.max(b.width,Math.max(lt.width+ut,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);Nn(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,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Et=yt.left+yt.right,kt=z+b.right,Dt=ft.width,Jt=Ha(ut,!1);(isNaN(ut.desiredSize.width)&&Jt===Pn||Jt===Fi)&&(Dt=Math.max(x.width-Et-kt,0)),Et=Dt+Et+kt,kt=ut.alignment,kt.Xb()&&(kt=a.defaultAlignment),kt.sb()||(kt=rr),tt&&(rt-=ft.height+yt.bottom+yt.top),ut.arrange(lt+kt.offsetX+yt.left+(x.width*kt.x-Et*kt.x),rt+kt.offsetY+yt.top,Dt,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function As(){this.xa="Base"}Je(As,ho),As.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=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+ut,0),kt=Math.max(tt+ft,0),Dt=a.isClipping,Jt=He.allocAt(-lt.left,-lt.top,Et,kt),zt=He.allocAt(0,0,z,tt);ps(ot,zt,!0),z=zt.width,tt=zt.height;for(var se=!0,he=ll(a),ge=0;ge<rt;ge++){var ve=E[ge];yt=y;var _e=x;if(ve!==ot&&(ve.visible||ve===he)){lt=ve.margin;var jn=lt.left,pi=lt.top;switch(Et=lt.right+lt.left,kt=lt.top+lt.bottom,lt=Ha(ve,!1),lt){case Pn:yt=z,_e=tt,pi=jn=kt=Et=0;break;case Fi:yt=z,jn=Et=0;break;case _i:_e=tt,pi=kt=0}ve.measure(yt,_e,0,0),yt=ve.measuredBounds,Et=Math.max(yt.width+Et,0),kt=Math.max(yt.height+kt,0),lt=ve.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=rr);var hi=ve.alignmentFocus;if(hi.Xb()&&(hi=rr),_e=null,ve instanceof Sn&&ve.$e!==""&&(_e=ve.fb(ve.$e),_e===ve&&(_e=null)),jn=zt.x-jn,pi=zt.y-pi,_e!==null){for(ve.arrange(0,0,yt.width,yt.height),yt=_e.actualBounds,yt=Ut.allocAt(yt.x+(hi.x*yt.width-hi.offsetX),yt.y+(hi.y*yt.height-hi.offsetY)),_e=_e.panel;_e!==ve;)_e.transform.Ga(yt),_e=_e.panel;jn+=lt.x*z+lt.offsetX-yt.x,pi+=lt.y*tt+lt.offsetY-yt.y,Ut.free(yt)}else jn+=lt.x*z+lt.offsetX-(hi.x*yt.width+hi.offsetX),pi+=lt.y*tt+lt.offsetY-(hi.y*yt.height+hi.offsetY);se?(se=!1,b.h(jn,pi,Et,kt)):Pr(b,jn,pi,Et,kt)}}switch(se?b.assign(Jt):Dt?b.Uu(zt.x,zt.y,zt.width,zt.height):Pr(b,Jt.x,Jt.y,Jt.width,Jt.height),He.free(Jt),He.free(zt),lt=ot.stretch,lt===sr&&(lt=Ha(ot,!1)),lt){case wn:return;case Pn:if(!isFinite(y)&&!isFinite(x))return;break;case Fi:if(!isFinite(y))return;break;case _i:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Et=Math.max(z+ut,0),kt=Math.max(tt+ft,0),lt=ot.margin,zt=He.allocAt(-lt.left,-lt.top,Et,kt),ps(ot,zt,!0),z=zt.width,tt=zt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==he||(lt=x.margin,Et=lt.right+lt.left,kt=lt.top+lt.bottom,yt=x.measuredBounds,Et=Math.max(yt.width+Et,0),kt=Math.max(yt.height+kt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=rr),x=x.alignmentFocus,x.Xb()&&(x=rr),se?(se=!1,b.h(ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Et,kt)):Pr(b,ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Et,kt));se?b.assign(Jt):Dt?b.Uu(zt.x,zt.y,zt.width,zt.height):Pr(b,Jt.x,Jt.y,Jt.width,Jt.height),He.free(zt)},As.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,ut=ot-x.y;for(b.arrange(lt,ut,tt,rt),tt=He.allocAt(0,0,tt,rt),ps(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;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=rr);var kt=ft.alignmentFocus;if(kt.Xb()&&(kt=rr),lt=null,ft instanceof Sn&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Dt=lt.actualBounds;for(kt=Ut.allocAt(Dt.x+(kt.x*Dt.width-kt.offsetX),Dt.y+(kt.y*Dt.height-kt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(kt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-kt.x,ut=ut.y*tt.height+ut.offsetY-kt.y,Ut.free(kt)}else lt=ut.x*tt.width+ut.offsetX-(kt.x*yt+kt.offsetX),ut=ut.y*tt.height+ut.offsetY-(kt.y*Et+kt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+ut,yt,Et)}}He.free(tt)};function ps(a,y,x){var E=null;if(a instanceof Sn&&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 Uo(){this.xa="Base"}Je(Uo,ho),Uo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=y,ft=x,yt=lt.right+lt.left,Et=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var kt=0,Dt=null;ot instanceof mr&&(Dt=ot,kt=Dt.strokeWidth*Dt.scale);var Jt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Et,0);var zt=Dm(ot),se=zt.x*Jt+zt.offsetX;zt=zt.y*lt+zt.offsetY;var he=Im(ot),ge=he.x*Jt+he.offsetX;for(he=he.y*lt+he.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(se-ge)-kt,0)),isFinite(x)&&(ft=Math.max(Math.abs(zt-he)-kt,0)),kt=ln.alloc(),kt.h(0,0),a=ll(a),he=0;he<rt;he++)zt=E[he],zt===ot||!zt.visible&&zt!==a||(lt=zt.margin,Jt=lt.right+lt.left,se=lt.top+lt.bottom,zt.measure(ut,ft,0,0),lt=zt.measuredBounds,Jt=Math.max(lt.width+Jt,0),lt=Math.max(lt.height+se,0),kt.h(Math.max(Jt,kt.width),Math.max(lt,kt.height)));if(rt===1)b.width=Jt,b.height=lt,ln.free(kt);else{switch(zt=Dm(ot),he=Im(ot),rt=E=0,he.x!==zt.x&&he.y!==zt.y&&(E=kt.width/Math.abs(he.x-zt.x),rt=kt.height/Math.abs(he.y-zt.y)),ln.free(kt),kt=0,Dt!==null&&(kt=Dt.strokeWidth*Dt.scale,_m(Dt)===wi&&(E=rt=Math.max(E,rt))),E+=Math.abs(zt.offsetX)+Math.abs(he.offsetX)+kt,rt+=Math.abs(zt.offsetY)+Math.abs(he.offsetY)+kt,Dt=ot.stretch,Dt===sr&&(Dt=Ha(ot,!1)),Dt){case wn:tt=z=0;break;case Pn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Fi:isFinite(y)&&(E=y),tt=0;break;case _i: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}},Uo.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=He.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 ut=Dm(E),ft=Im(E),yt=ut.y*b.height+ut.offsetY,Et=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=yt,Pr(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),ut=Math.max(lt.height+tt.top+tt.bottom,0),yt=rt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=rr),ot=z.width*yt.x+yt.offsetX-ot*yt.x+tt.left+z.x,tt=z.height*yt.y+yt.offsetY-ut*yt.y+tt.top+z.y,rt.visible&&(vo(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 He(z.x,z.y,z.width,z.height))));He.free(z)};function Fa(){this.xa="Base",this.name="Table"}Je(Fa,ho),Fa.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=An(),rt=An(),ot=0;ot<z;ot++){var lt=E[ot],ut=lt instanceof Sn?lt:null;if(ut!==null&&vc(ut)&&lt.visible){rt.push(ut);for(var ft=ut.O.s,yt=ft.length,Et=0;Et<yt;Et++){var kt=ft[Et];ut.type===Sn.TableRow?kt.row=lt.row:ut.type===Sn.TableColumn&&(kt.column=lt.column),tt.push(kt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Dt=[],Jt=0;Jt<z;Jt++){var zt=tt[Jt];zt.visible&&(Cs(zt,!0),$u(zt,!0),Dt[zt.row]||(Dt[zt.row]=[]),Dt[zt.row][zt.column]||(Dt[zt.row][zt.column]=[]),Dt[zt.row][zt.column].push(zt))}Nn(tt);var se=An(),he=An(),ge=An(),ve={count:0},_e={count:0},jn=y,pi=x,hi=a.rowDefs,In=a.colDefs,vn=null;z=hi.length;for(var lr=0;lr<z;lr++)vn=hi[lr],vn!==void 0&&(vn.actual=0);z=In.length;for(var qi=0;qi<z;qi++)vn=In[qi],vn!==void 0&&(vn.actual=0);for(var eo=Dt.length,Fo=0,Vs=0;Vs<eo;Vs++)Dt[Vs]&&(Fo=Math.max(Fo,Dt[Vs].length));var Xs=Math.min(a.topIndex,eo-1),_a=Math.min(a.leftIndex,Fo-1),Ws=0;eo=Dt.length;for(var Lc=ll(a),Fs=0;Fs<eo;Fs++)if(Dt[Fs]){Fo=Dt[Fs].length;var oA=a.Fb(Fs);oA.actual=0;for(var Ka=oA.oc=0;Ka<Fo;Ka++)if(Dt[Fs][Ka]){var Mc=a.Eb(Ka);se[Ka]===void 0&&(Mc.actual=0,Mc.oc=0,se[Ka]=!0);for(var Jl=Dt[Fs][Ka],vu=Jl.length,Il=0;Il<vu;Il++){var Bl=Jl[Il];if(Bl.visible||Bl===Lc){var md=1<Bl.rowSpan||1<Bl.columnSpan;md&&(Fs<Xs||Ka<_a||he.push(Bl));var sA=Bl.margin,Kg=sA.right+sA.left,Ul=sA.top+sA.bottom,Ga=Jo(Bl,oA,Mc,!1),zp=Bl.desiredSize,qf=!isNaN(zp.height),LA=!isNaN(zp.width)&&qf;if(md||Ga===wn||LA||Fs<Xs||Ka<_a||(ve[Ka]!==void 0||Ga!==Pn&&Ga!==Fi||(ve[Ka]=-1,ve.count++),_e[Fs]!==void 0||Ga!==Pn&&Ga!==_i||(_e[Fs]=-1,_e.count++),ge.push(Bl)),Bl.measure(1/0,1/0,0,0),!(Fs<Xs||Ka<_a)){var Cl=Bl.measuredBounds,of=Math.max(Cl.width+Kg,0),Ql=Math.max(Cl.height+Ul,0);if(Bl.rowSpan===1&&(Ga===wn||Ga===Fi)){vn=a.Fb(Fs);var vd=vn.Wc();Ws=Math.max(Ql-vn.actual,0),Ws+vd>pi&&(Ws=Math.max(pi-vd,0));var wm=vn.oa===0;vn.oc=vn.oc+Ws,vn.actual=vn.oa+Ws,pi=Math.max(pi-(Ws+(wm?vd:0)),0)}if(Bl.columnSpan===1&&(Ga===wn||Ga===_i)){vn=a.Eb(Ka);var jp=vn.Wc();Ws=Math.max(of-vn.actual,0),Ws+jp>jn&&(Ws=Math.max(jn-jp,0));var iy=vn.oa===0;vn.oc=vn.oc+Ws,vn.actual=vn.oa+Ws,jn=Math.max(jn-(Ws+(iy?jp:0)),0)}md&&Bl.Uj()}}}}}Nn(se);var uh=0,Th=0;z=a.columnCount;for(var $f=0;$f<z;$f++){var yd=In[$f];yd!==void 0&&(uh+=isNaN(yd.Hc)?yd.oc:yd.Hc,yd.oc!==0&&(uh+=yd.Wc()))}z=a.rowCount;for(var Gg=0;Gg<z;Gg++){var wd=hi[Gg];wd!==void 0&&(Th+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Th+=wd.Wc()))}jn=Math.max(y-uh,0);var Ah=pi=Math.max(x-Th,0),bc=jn;z=ge.length;for(var Pl=0;Pl<z;Pl++){var MA=ge[Pl],xm=a.Fb(MA.row),Nh=a.Eb(MA.column),zg=MA.measuredBounds,aA=MA.margin,sf=aA.right+aA.left,bA=aA.top+aA.bottom;ve[MA.column]=Nh.oc===0&&ve[MA.column]!==void 0?Math.max(zg.width+sf,ve[MA.column]):null,_e[MA.row]=xm.oc===0&&_e[MA.row]!==void 0?Math.max(zg.height+bA,_e[MA.row]):null}var tg=0,jg=0,Ku;for(Ku in _e)Ku!=="count"&&(tg+=_e[Ku]);for(Ku in ve)Ku!=="count"&&(jg+=ve[Ku]);for(var aa=ln.alloc(),Vp=0;Vp<z;Vp++){var tl=ge[Vp];if(tl.visible||tl===Lc){var Es=a.Fb(tl.row),el=a.Eb(tl.column),Dh=0;isFinite(el.width)?Dh=el.width:(isFinite(jn)&&ve[tl.column]!==null?jg===0?Dh=el.actual+jn:Dh=ve[tl.column]/jg*bc:ve[tl.column]!==null?Dh=jn:Dh=el.actual||jn,Dh=Math.max(0,Dh-el.Wc()));var kc=0;switch(isFinite(Es.height)?kc=Es.height:(isFinite(pi)&&_e[tl.row]!==null?tg===0?kc=Es.actual+pi:kc=_e[tl.row]/tg*Ah:_e[tl.row]!==null?kc=pi:kc=Es.actual||pi,kc=Math.max(0,kc-Es.Wc())),aa.h(Math.max(el.minimum,Math.min(Dh,el.maximum)),Math.max(Es.minimum,Math.min(kc,Es.maximum))),Ga=Jo(tl,Es,el,!1),Ga){case Fi:aa.height=Math.max(aa.height,Es.actual+pi);break;case _i:aa.width=Math.max(aa.width,el.actual+jn)}var af=tl.margin,ry=af.right+af.left,Sm=af.top+af.bottom;tl.Uj(),tl.measure(aa.width,aa.height,el.minimum,Es.minimum);var Vg=tl.measuredBounds,lf=Math.max(Vg.width+ry,0),eg=Math.max(Vg.height+Sm,0);isFinite(jn)&&(lf=Math.min(lf,aa.width)),isFinite(pi)&&(eg=Math.min(eg,aa.height));var Fl=0;Fl=Es.actual,Es.actual=Math.max(Es.actual,eg),Es.oc=Math.max(Es.oc,eg),Ws=Es.actual-Fl,pi=Math.max(pi-Ws,0),_e[tl.row]===null&&(Ah=Math.max(Ah-Ws,0)),Fl=el.actual,el.actual=Math.max(el.actual,lf),el.oc=Math.max(el.oc,lf),Ws=el.actual-Fl,jn=Math.max(jn-Ws,0),ve[tl.column]===null&&(bc=Math.max(bc-Ws,0))}}Nn(ge);var Ih=ln.alloc(),lA=An(),au=An();if(z=he.length,z!==0){for(var xd=0;xd<eo;xd++)if(Dt[xd]){Fo=Dt[xd].length;var Wg=a.Fb(xd);lA[xd]=Wg.actual;for(var Sd=0;Sd<Fo;Sd++)if(Dt[xd][Sd]){var Bm=a.Eb(Sd);au[Sd]=Bm.actual}}}for(var Zg=0;Zg<z;Zg++){var hs=he[Zg];if(hs.visible||hs===Lc){var Gu=a.Fb(hs.row),yu=a.Eb(hs.column);switch(aa.h(Math.max(yu.minimum,Math.min(y,yu.maximum)),Math.max(Gu.minimum,Math.min(x,Gu.maximum))),Ga=Jo(hs,Gu,yu,!1),Ga){case Pn:au[yu.index]!==0&&(aa.width=Math.min(aa.width,au[yu.index])),lA[Gu.index]!==0&&(aa.height=Math.min(aa.height,lA[Gu.index]));break;case Fi:au[yu.index]!==0&&(aa.width=Math.min(aa.width,au[yu.index]));break;case _i:lA[Gu.index]!==0&&(aa.height=Math.min(aa.height,lA[Gu.index]))}isFinite(yu.width)&&(aa.width=yu.width),isFinite(Gu.height)&&(aa.height=Gu.height),Ih.h(0,0);for(var Cm=yu.minimum,Ol=Gu.minimum,Tc=1;Tc<hs.rowSpan&&!(hs.row+Tc>=a.rowCount);Tc++)vn=a.Fb(hs.row+Tc),Ws=0,Ws=Ga===Pn||Ga===_i?Math.max(vn.minimum,lA[hs.row+Tc]===0?vn.maximum:Math.min(lA[hs.row+Tc],vn.maximum)):Math.max(vn.minimum,isNaN(vn.Hc)?vn.maximum:Math.min(vn.Hc,vn.maximum)),Ih.height+=Ws,Ol+=vn.minimum;for(var wu=1;wu<hs.columnSpan&&!(hs.column+wu>=a.columnCount);wu++)vn=a.Eb(hs.column+wu),Ws=0,Ws=Ga===Pn||Ga===Fi?Math.max(vn.minimum,au[hs.column+wu]===0?vn.maximum:Math.min(au[hs.column+wu],vn.maximum)):Math.max(vn.minimum,isNaN(vn.Hc)?vn.maximum:Math.min(vn.Hc,vn.maximum)),Ih.width+=Ws,Cm+=vn.minimum;aa.width+=Ih.width,aa.height+=Ih.height;var Yg=hs.margin,Bd=Yg.right+Yg.left,Wp=Yg.top+Yg.bottom;hs.measure(aa.width,aa.height,Cm,Ol);for(var Xg=hs.measuredBounds,kA=Math.max(Xg.width+Bd,0),uf=Math.max(Xg.height+Wp,0),Cd=0,Jg=0;Jg<hs.rowSpan&&!(hs.row+Jg>=a.rowCount);Jg++)vn=a.Fb(hs.row+Jg),Cd+=vn.total||0;if(Cd<uf){var Nc=uf-Cd,hh=uf-Cd;if(hs.spanAllocation!==null)for(var Dc=hs.spanAllocation,Uh=0;Uh<hs.rowSpan&&!(0>=Nc)&&!(hs.row+Uh>=a.rowCount);Uh++){vn=a.Fb(hs.row+Uh);var Ic=vn.oa||0,Af=Dc(hs,vn,hh);vn.actual=Math.min(vn.maximum,Ic+Af),vn.oa!==Ic&&(Nc-=vn.oa-Ic)}for(;0<Nc;){var uA=vn.oa||0;if(isNaN(vn.height)&&vn.maximum>uA&&(vn.actual=Math.min(vn.maximum,uA+Nc),vn.oa!==uA&&(Nc-=vn.oa-uA)),vn.index===0)break;vn=a.Fb(vn.index-1)}}for(var ng=0,Uc=0;Uc<hs.columnSpan&&!(hs.column+Uc>=a.columnCount);Uc++)vn=a.Eb(hs.column+Uc),ng+=vn.total||0;if(ng<kA){var ig=kA-ng,oy=kA-ng;if(hs.spanAllocation!==null)for(var Qh=hs.spanAllocation,hf=0;hf<hs.columnSpan&&!(0>=ig)&&!(hs.column+hf>=a.columnCount);hf++){vn=a.Eb(hs.column+hf);var Zp=vn.oa||0,sy=Qh(hs,vn,oy);vn.actual=Math.min(vn.maximum,Zp+sy),vn.oa!==Zp&&(ig-=vn.oa-Zp)}for(;0<ig;){var Pm=vn.oa||0;if(isNaN(vn.width)&&vn.maximum>Pm&&(vn.actual=Math.min(vn.maximum,Pm+ig),vn.oa!==Pm&&(ig-=vn.oa-Pm)),vn.index===0)break;vn=a.Eb(vn.index-1)}}}}Nn(he),ln.free(Ih),ln.free(aa),lA!==void 0&&Nn(lA),au!==void 0&&Nn(au);var rg=0,og=0,Fm=a.desiredSize,vw=a.maxSize;Ga=Ha(a,!0);var Yp=Th=uh=0,Xp=0;z=a.columnCount;for(var Em=0;Em<z;Em++)In[Em]!==void 0&&(vn=a.Eb(Em),isFinite(vn.width)?(Yp+=vn.width,Yp+=vn.Wc()):a0(vn)===ap?(Yp+=vn.oa,Yp+=vn.Wc()):vn.oa!==0&&(uh+=vn.oa,uh+=vn.Wc()));isFinite(Fm.width)?rg=Math.min(Fm.width,vw.width):rg=Ga!==wn&&isFinite(y)?y:uh,rg=Math.max(rg,a.minSize.width),rg=Math.max(rg-Yp,0);for(var rx=uh===0?1:Math.max(rg/uh,1),Lm=0;Lm<z;Lm++)In[Lm]!==void 0&&(vn=a.Eb(Lm),isFinite(vn.width)||a0(vn)===ap||(vn.actual=vn.oa*rx),vn.position=b.width,vn.oa!==0&&(b.width+=vn.oa,b.width+=vn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)hi[Mm]!==void 0&&(vn=a.Fb(Mm),isFinite(vn.height)?(Xp+=vn.height,Xp+=vn.Wc()):a0(vn)===ap?(Xp+=vn.oa,Xp+=vn.Wc()):vn.oa!==0&&(Th+=vn.oa,Th+=vn.Wc()));isFinite(Fm.height)?og=Math.min(Fm.height,vw.height):og=Ga!==wn&&isFinite(x)?x:Th,og=Math.max(og,a.minSize.height),og=Math.max(og-Xp,0);for(var ox=Th===0?1:Math.max(og/Th,1),bm=0;bm<z;bm++)hi[bm]!==void 0&&(vn=a.Fb(bm),isFinite(vn.height)||a0(vn)===ap||(vn.actual=vn.oa*ox),vn.position=b.height,vn.oa!==0&&(b.height+=vn.oa,b.height+=vn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===Sn.TableRow?(ly=b.width,vn=a.Fb(Jp.row),uy=vn.actual):(vn=a.Eb(Jp.column),ly=vn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),Cs(Jp,!1)}Nn(rt),a.inRowsCols=Dt},Fa.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,ut=0,ft=0;ft<lt;ft++)tt[ft]&&(ut=Math.max(ut,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 kt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;kt!==ut&&(rt[kt]===void 0||rt[kt].oa===0);)kt++;kt=Math.max(Math.min(kt,ut-1),0),yt=-rt[kt].position}for(var Dt=0,Jt=0;Dt!==lt&&ot[Dt]===void 0;)Dt++;for(;Jt!==lt&&rt[Jt]===void 0;)Jt++;ut=a.part,a.Fb(Dt),a.Eb(Jt);for(var zt=0;zt<y.length;zt++){var se=y[zt];if(se instanceof Sn&&se.visible&&vc(se)){if(se.type===Sn.TableRow){rt=a.Fb(se.row);var he=a.Eb(Jt)}else rt=a.Fb(Dt),he=a.Eb(se.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Dt,Et))),rt=he.position+yt+z,he.oa!==0&&(rt+=he.Io(Math.max(Jt,kt))),he=se.measuredBounds,se.Uk(),se.actualBounds.ka();var ge=se.actualBounds,ve=He.allocAt(ge.x,ge.y,ge.width,ge.height);ge.x=se.type===Sn.TableRow?z:rt,ge.y=se.type===Sn.TableColumn?b:ot,ge.width=he.width,ge.height=he.height,se.actualBounds.freeze(),$u(se,!1),kr(ve,ge)||ut===null||(ut.oh(),se.Pn(ut)),He.free(ve)}}for(zt=ln.alloc(),se=0;se<lt;se++)if(tt[se]){for(ut=tt[se].length,he=a.Fb(se),ot=he.position+ft+b,he.oa!==0&&(ot+=he.Io(Math.max(Dt,Et))),ge=0;ge<ut;ge++)if(tt[se][ge]){ve=a.Eb(ge),rt=ve.position+yt+z,ve.oa!==0&&(rt+=ve.Io(Math.max(Jt,kt)));for(var _e=tt[se][ge],jn=_e.length,pi=0;pi<jn;pi++){var hi=_e[pi],In=hi.measuredBounds;zt.h(0,0);for(var vn=1;vn<hi.rowSpan&&!(se+vn>=a.rowCount);vn++){var lr=a.Fb(se+vn);lr.oa!==0&&(zt.height+=lr.total)}for(vn=1;vn<hi.columnSpan&&!(ge+vn>=a.columnCount);vn++)lr=a.Eb(ge+vn),lr.oa!==0&&(zt.width+=lr.total);var qi=ve.oa+zt.width,eo=he.oa+zt.height;vn=rt,lr=ot;var Fo=qi,Vs=eo,Xs=rt,_a=ot,Ws=qi,Lc=eo;rt+qi>x.width&&(Ws=Math.max(x.width-rt,0)),ot+eo>x.height&&(Lc=Math.max(x.height-ot,0));var Fs=hi.alignment;if(Fs.Xb()){Fs=a.defaultAlignment,Fs.sb()||(Fs=rr);var oA=Fs.x,Ka=Fs.y,Mc=Fs.offsetX;Fs=Fs.offsetY;var Jl=ve.alignment,vu=he.alignment;Jl.sb()&&(oA=Jl.x,Mc=Jl.offsetX),vu.sb()&&(Ka=vu.y,Fs=vu.offsetY)}else oA=Fs.x,Ka=Fs.y,Mc=Fs.offsetX,Fs=Fs.offsetY;(isNaN(oA)||isNaN(Ka))&&(Ka=oA=.5,Fs=Mc=0),Jl=In.width,vu=In.height;var Il=hi.margin,Bl=Il.left+Il.right,md=Il.top+Il.bottom,sA=Jo(hi,he,ve,!1);!isNaN(hi.desiredSize.width)||sA!==Pn&&sA!==Fi||(Jl=Math.max(qi-Bl,0)),!isNaN(hi.desiredSize.height)||sA!==Pn&&sA!==_i||(vu=Math.max(eo-md,0)),qi=hi.maxSize,eo=hi.minSize,Jl=Math.min(qi.width,Jl),vu=Math.min(qi.height,vu),Jl=Math.max(eo.width,Jl),vu=Math.max(eo.height,vu),qi=vu+md,vn+=Fo*oA-(Jl+Bl)*oA+Mc+Il.left,lr+=Vs*Ka-qi*Ka+Fs+Il.top,hi.visible&&(vo(Xs,_a,Ws,Lc,vn,lr,In.width,In.height)?hi.arrange(vn,lr,Jl,vu):hi.arrange(vn,lr,Jl,vu,new He(Xs,_a,Ws,Lc)))}}}for(ln.free(zt),a=0;a<E;a++)x=y[a],z=x instanceof Sn?x:null,z!==null&&vc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function kl(){this.xa="Base"}Je(kl,ho),kl.prototype.measure=function(){},kl.prototype.arrange=function(){};function Zl(){this.xa="Base"}Je(Zl,ho),Zl.prototype.measure=function(){},Zl.prototype.arrange=function(){};function Rs(){this.xa="Base"}Je(Rs,ho),Rs.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&te("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 ut=E.scale,ft=rt.width;rt=rt.height;var yt=Math.max(y-lt,0),Et=Math.max(x-ot,0),kt=1;a.viewboxStretch===wi?ft!==0&&rt!==0&&(kt=Math.min(yt/ft,Et/rt)):ft!==0&&rt!==0&&(kt=Math.max(yt/ft,Et/rt)),kt===0&&(kt=1e-4),E.Ca*=kt,ut!==E.scale&&(Cs(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)},Rs.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=rr),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 Ra(){this.xa="Base"}Je(Ra,ho),Ra.prototype.measure=function(){},Ra.prototype.arrange=function(){},Ra.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),ut=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=[],kt=a.O.s,Dt=kt.length,Jt=0;Jt<Dt;Jt++){var zt=kt[Jt],se=[];if(Et.push(se),zt.visible){var he=zt.interval;if(!(0>he)){zt=Mh(zt.figure);for(var ge=0;ge<Dt;ge++)if(ge!==Jt){var ve=kt[ge];ve.visible&&Mh(ve.figure)===zt&&(ve=ve.interval,ve>he&&se.push(ve))}}}}for(kt=a.O.s,Dt=kt.length,Jt=0;Jt<Dt;Jt++){var _e=kt[Jt];if(_e.visible&&(se=_e.interval||1,zt=Math.abs(se),!(2>b*zt*x))){if(he=_e.segmentIndex,(!isFinite(he)||isNaN(he))&&(he=0),0>he&&(he=zt-Math.min(-he,zt)),he=Math.round(he%zt),zt=_e.opacity,ge=1,zt!==1){if(zt===0)continue;ge=y.globalAlpha,y.globalAlpha=ge*zt}ve=Et[Jt];var jn=!1,pi=_e.strokeDashArray;if(pi!==null&&(jn=!0,y.js(pi,_e.strokeDashOffset)),_e.figure==="LineV"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,Zo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),pi=_e=Math.floor((yt-b)/b);pi<=_e+lt;pi++){var hi=pi*b+yt;0<=hi&&hi<=rt&&CA(pi,se,he,ve)&&(y.moveTo(hi,0),y.lineTo(hi,ot))}y.stroke(),y.Se()}else if(_e.figure==="LineH"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,Zo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),pi=_e=Math.floor((ft-E)/E);pi<=_e+ut;pi++)hi=pi*E+ft,0<=hi&&hi<=ot&&CA(pi,se,he,ve)&&(y.moveTo(0,hi),y.lineTo(rt,hi));y.stroke(),y.Se()}else if(_e.figure==="BarV"&&_e.fill!==null)for(Zo(a,y,_e.fill,!0,!1,z,tt),_e=_e.width,isNaN(_e)&&(_e=b),hi=pi=Math.floor((yt-b)/b);hi<=pi+lt;hi++){var In=hi*b+yt;0<=In+_e&&In<=rt&&CA(hi,se,he,ve)&&y.fillRect(In,0,_e,ot)}else if(_e.figure==="BarH"&&_e.fill!==null)for(Zo(a,y,_e.fill,!0,!1,z,tt),_e=_e.height,isNaN(_e)&&(_e=E),hi=pi=Math.floor((ft-E)/E);hi<=pi+ut;hi++)In=hi*E+ft,0<=In+_e&&In<=ot&&CA(hi,se,he,ve)&&y.fillRect(0,In,rt,_e);jn&&y.fs(),zt!==1&&(y.globalAlpha=ge)}}y.restore(),y.Vc(!1)};function CA(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 Tl(){this.xa="Base"}Je(Tl,ho),Tl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Jr||a instanceof Qn){var tt=null,rt=null;if(a instanceof Qn&&(tt=a),a instanceof Jr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Qn){var ot=tt;if(z===0)xr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Jr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=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){nu(a,rt,yt,lt);var kt=lt.measuredBounds;x.ed(kt),Et.push(kt)}kt=Xi.alloc();for(var Dt=Ut.alloc(),Jt=Ut.alloc(),zt=0;zt<z;zt++){var se=E[zt];if(se!==lt)if(se.isPanelMain&&se instanceof mr){nu(a,rt,yt,se);var he=se.measuredBounds;x.ed(he),Et.push(he)}else if(2>ft)se.measure(1/0,1/0,0,0),he=se.measuredBounds,x.ed(he),Et.push(he);else{var ge=se.segmentIndex,ve=se.segmentFraction,_e=se.alignmentFocus;_e.Mc()&&(_e=rr);var jn=se.segmentOrientation,pi=se.segmentOffset;if(isNaN(ge)){var hi=ot.ua;he=An(),hi.Qu(ve,he);var In=Ut.allocAt(he[0],he[1]);if(In.add(ot.i(0)),hi.type===bn.j?In.offset(-hi.startX,-hi.startY):(hi=hi.figures.first(),hi!==null&&In.offset(-hi.startX,-hi.startY)),hi=he[2],jn!==Ya){var vn=ot.computeAngle(se,jn,hi);se.Kb=vn}vn=In.x-y.x;var lr=In.y-y.y;Ut.free(In),Nn(he)}else if(ge<-ft||ge>=ft)he=Ut.alloc(),ot.vg(),ot.computeMidPoint(he),hi=ot.midAngle,jn!==Ya&&(vn=ot.computeAngle(se,jn,hi),se.Kb=vn),vn=he.x-y.x,lr=he.y-y.y,Ut.free(he);else{if(vn=0,0<=ge?(lr=ut.M(ge),he=ge<ft-1?ut.M(ge+1):lr):(vn=ft+ge,lr=ut.M(vn),he=0<vn?ut.M(vn-1):lr),lr.Xa(he)){0<=ge?(hi=0<ge?ut.M(ge-1):lr,vn=ge<ft-2?ut.M(ge+2):he):(hi=vn<ft-1?ut.M(vn+1):lr,vn=1<vn?ut.M(vn-2):he),In=hi.Bf(lr);var qi=he.Bf(vn);hi=In>qi+10?0<=ge?hi.ab(lr):lr.ab(hi):qi>In+10?0<=ge?he.ab(vn):vn.ab(he):0<=ge?hi.ab(vn):vn.ab(hi)}else hi=0<=ge?lr.ab(he):he.ab(lr);jn!==Ya&&(vn=ot.computeAngle(se,jn,hi),se.Kb=vn),vn=lr.x+(he.x-lr.x)*ve-y.x,lr=lr.y+(he.y-lr.y)*ve-y.y}se.measure(1/0,1/0,0,0),he=se.measuredBounds,In=se.naturalBounds;var eo=0;se instanceof mr&&(eo=se.strokeWidth),qi=In.width+eo;var Fo=In.height+eo;kt.reset(),kt.translate(-he.x,-he.y),kt.scale(se.scale,se.scale),kt.rotate(jn===Ya?se.angle:hi,qi/2,Fo/2),jn!==mp&&jn!==yp||kt.rotate(90,qi/2,Fo/2),jn!==vp&&jn!==wp||kt.rotate(-90,qi/2,Fo/2),jn===T0&&(45<hi&&135>hi||225<hi&&315>hi)&&kt.rotate(-hi,qi/2,Fo/2),In=new He(0,0,qi,Fo),Dt.xi(In,_e),kt.Ga(Dt),_e=-Dt.x+eo/2*se.scale,se=-Dt.y+eo/2*se.scale,Jt.assign(pi),eo=isNaN(pi.x);var Vs=isNaN(pi.y);if(eo||Vs){qi=qi/2+3,Fo=Fo/2+3;var Xs=45<=hi&&135>=hi,_a=225<=hi&&315>=hi;jn===Ya&&(Xs||_a)?(Jt.x=Vs?qi:pi.y,Jt.y=eo?Fo:pi.x,Xs?0<=ge||isNaN(ge)&&.5>ve||!eo||(Jt.y=-Fo):_a&&((0<=ge||isNaN(ge)&&.5>ve)&&eo&&(Jt.y=-Fo),Vs&&(Jt.x=-qi))):(eo&&(Jt.x=0<=ge||isNaN(ge)&&.5>ve?qi:-qi),Vs&&(Jt.y=-Fo),Jt.rotate(hi))}else Jt.rotate(hi);vn+=Jt.x,lr+=Jt.y,In.set(he),In.h(vn+_e,lr+se,he.width,he.height),Et.push(In),x.ed(In)}}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),xr(b,x.width||0,x.height||0),Xi.free(kt),Ut.free(Dt),Ut.free(Jt)}}}},Tl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Jr||a instanceof Qn){var E=a,b=null;a instanceof Jr&&(b=a,E=b.adornedPart);var z=a instanceof Jr?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 ut=tt[rt];rt++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Qn)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,ut=tt.segmentOffset,isNaN(rt)){var Et=ft.ua,kt=An();Et.Qu(ot,kt);var Dt=Ut.allocAt(kt[0],kt[1]);Dt.add(ft.i(0)),Et.type===bn.j||(Et=Et.figures.first()),Dt.offset(-Et.startX,-Et.startY),Et=kt[2],lt!==Ya&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Dt.x;var Jt=Dt.y;Ut.free(Dt),Nn(kt)}else if(rt<-x||rt>=x)kt=Ut.alloc(),Et=ft,Jt=kt,Et.vg(),Et.computeMidPoint(Jt),Et=ft.midAngle,lt!==Ya&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=kt.x,Jt=kt.y,Ut.free(kt);else{if(Dt=0,0<=rt?(kt=y.s[rt],Jt=rt<x-1?y.s[rt+1]:kt):(Dt=x+rt,kt=y.s[Dt],Jt=0<Dt?y.s[Dt-1]:kt),kt.Xa(Jt)){0<=rt?(Et=0<rt?y.s[rt-1]:kt,Dt=rt<x-2?y.s[rt+2]:Jt):(Et=Dt<x-1?y.s[Dt+1]:kt,Dt=1<Dt?y.s[Dt-2]:Jt);var zt=Et.Bf(kt),se=Jt.Bf(Dt);Et=zt>se+10?0<=rt?Et.ab(kt):kt.ab(Et):se>zt+10?0<=rt?Jt.ab(Dt):Dt.ab(Jt):0<=rt?Et.ab(Dt):Dt.ab(Et)}else Et=0<=rt?kt.ab(Jt):Jt.ab(kt);lt!==Ya&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=kt.x+(Jt.x-kt.x)*ot,Jt=kt.y+(Jt.y-kt.y)*ot}if(yt.ys())tt.location=new Ut(ft,Jt);else{yt.Mc()&&(yt=rr),kt=Xi.alloc(),kt.reset(),kt.scale(tt.scale,tt.scale),kt.rotate(tt.angle,0,0);var he=tt.naturalBounds;Dt=He.allocAt(0,0,he.width,he.height),zt=Ut.alloc(),zt.xi(Dt,yt),kt.Ga(zt),yt=-zt.x,se=-zt.y;var ge=he.width,ve=he.height;he=Ut.alloc(),he.assign(ut);var _e=isNaN(ut.x),jn=isNaN(ut.y);if(_e||jn){ge=ge/2+3,ve=ve/2+3;var pi=45<=Et&&135>=Et,hi=225<=Et&&315>=Et;lt===Ya&&(pi||hi)?(he.x=jn?ge:ut.y,he.y=_e?ve:ut.x,pi?0<=rt||isNaN(rt)&&.5>ot||!_e||(he.y=-ve):hi&&((0<=rt||isNaN(rt)&&.5>ot)&&_e&&(he.y=-ve),jn&&(he.x=-ge))):(_e&&(he.x=0<=rt||isNaN(rt)&&.5>ot?ge:-ge),jn&&(he.y=-ve),he.rotate(Et))}else he.rotate(Et);ft+=he.x,Jt+=he.y,kt.pp(Dt),yt+=Dt.x,se+=Dt.y,rt=Ut.allocAt(ft+yt,Jt+se),tt.move(rt),Ut.free(rt),Ut.free(he),Ut.free(zt),He.free(Dt),Xi.free(kt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Ut.free(E)}};function nu(a,y,x,E){if(wl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Jr&&a.type===Sn.Link&&a.adornedObject instanceof mr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Qn&&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 Jr&&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),Cs(E,!1)}}function PA(){this.xa="Base"}Je(PA,ho),PA.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,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,yt=new He(-ot.left,-ot.top,Math.max(ft.width+lt,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(yt),b.assign(yt);for(var Et=rt.geometry,kt=rt.strokeWidth,Dt=Et.flattenedSegments,Jt=Et.flattenedLengths,zt=Et.flattenedTotalLength,se=Dt.length,he=0,ge=0,ve=An(),_e=0;_e<se;_e++){var jn=Dt[_e],pi=[];ge=he=0;for(var hi=jn.length,In=0;In<hi;In+=2){var vn=jn[In],lr=jn[In+1];if(In!==0){var qi=180*Math.atan2(lr-ge,vn-he)/Math.PI;0>qi&&(qi+=360),pi.push(qi)}he=vn,ge=lr}ve.push(pi)}if(a.graduatedIntervals===null){for(var eo=[],Fo=a.O.s,Vs=Fo.length,Xs=0;Xs<Vs;Xs++){var _a=Fo[Xs],Ws=[];if(eo.push(Ws),_a.visible){var Lc=_a.interval;if(!(0>Lc)){for(var Fs=0;Fs<Vs;Fs++)if(Fs!==Xs){var oA=Fo[Fs];if(oA.visible&&_a.constructor===oA.constructor){var Ka=oA.interval;Ka>Lc&&Ws.push(Ka)}}}}}a.graduatedIntervals=eo}var Mc=a.graduatedIntervals,Jl=a.O.s,vu=Jl.length,Il=0,Bl=0,md=zt;a.graduatedMarks=[];for(var sA,Kg=0;Kg<vu;Kg++){var Ul=Jl[Kg];if(sA=[],Ul.visible&&Ul!==rt){var Ga=Math.abs(Ul.interval),zp=a.graduatedTickUnit;if(!(2>zp*Ga*zt/a.graduatedRange&&Ul.graduatedSkip===null)){var qf=Jt[0][0],LA=0,Cl=0;Bl=zt*Ul.graduatedStart-1e-4,md=zt*Ul.graduatedEnd+1e-4;var of=zp*Ga,Ql=a.graduatedTickBase;if(Ql<a.graduatedMin){var vd=(a.graduatedMin-Ql)/of;vd=vd%1===0?vd:Math.floor(vd+1),Ql+=vd*of}else Ql>a.graduatedMin+of&&(Ql-=Math.floor((Ql-a.graduatedMin)/of)*of);for(var wm=Mc[Kg],jp=Ql,iy=1e-6*a.graduatedMax,uh=1;Ql<=a.graduatedMax+iy;uh++){t:{for(var Th=wm.length,$f=0;$f<Th;$f++){var yd=(Ql-a.graduatedTickBase)%(wm[$f]*a.graduatedTickUnit),Gg=1e-6*a.graduatedTickUnit;if(yd<Gg&&yd>-Gg){var wd=!1;break t}}wd=!0}if(wd&&(Ql>a.graduatedMax&&(Ql=a.graduatedMax),Ul.graduatedSkip===null||Ul instanceof Mo&&!Ul.graduatedSkip(Ql,Ul)||Ul instanceof mr&&!Ul.graduatedSkip(Ql,Ul))&&(Il=(Ql-a.graduatedMin)*zt/a.graduatedRange,Il>zt&&(Il=zt),Bl<=Il&&Il<=md)){for(var Ah=ve[LA][Cl],bc=Jt[LA][Cl];LA<Jt.length;){for(;Il>qf&&Cl<Jt[LA].length-1;)Cl++,Ah=ve[LA][Cl],bc=Jt[LA][Cl],qf+=bc;if(Il<=qf)break;LA++,Cl=0,Ah=ve[LA][Cl],bc=Jt[LA][Cl],qf+=bc}var Pl=Dt[LA],MA=Pl[2*Cl],xm=Pl[2*Cl+1],Nh=(Il-(qf-bc))/bc,zg=new Ut(MA+(Pl[2*Cl+2]-MA)*Nh+kt/2-Et.bounds.x,xm+(Pl[2*Cl+3]-xm)*Nh+kt/2-Et.bounds.y);zg.scale(rt.scale,rt.scale);t:{var aA=Ah,sf=ve[LA];if(!(.5005>Nh&&.4995<Nh)){var bA=aA;if(.5>Nh?0<Cl?bA=sf[Cl-1]:we.$(Pl[0],Pl[Pl.length-2])&&we.$(Pl[1],Pl[Pl.length-1])&&(bA=sf[sf.length-1]):.5<Nh&&(Cl+1<sf.length?bA=sf[Cl+1]:we.$(Pl[0],Pl[Pl.length-2])&&we.$(Pl[1],Pl[Pl.length-1])&&(bA=sf[0])),aA!==bA){var tg=Math.abs(aA-bA);if(180<tg&&(aA<bA?aA+=360:bA+=360,tg=Math.abs(aA-bA)),5e-4>Nh||.9995<Nh){Ah=(aA+bA)/2%360;break t}if(10>tg){var jg=1-Math.abs(.5-Nh);Ah=(aA*jg+bA*(1-jg))%360;break t}}}Ah=aA}if(Ul instanceof Mo){var Ku="";Ul.graduatedFunction!==null?(Ku=Ul.graduatedFunction(Ql,Ul),Ku=Ku!=null?Ku.toString():""):Ku=(+Ql.toFixed(2)).toString(),Ku!==""&&sA.push({$l:zg,angle:Ah,text:Ku})}else sA.push({$l:zg,angle:Ah})}Ql=jp+uh*of}}}a.graduatedMarks.push(sA)}Nn(ve);var aa=a.graduatedMarks;if(aa!==null)for(var Vp=E.length,tl=0;tl<Vp;tl++){var Es=E[tl],el=aa[tl];if(Es.visible&&Es!==rt&&el.length!==0){if(Es instanceof mr){var Dh=a,kc=b,af=Es.alignmentFocus;af.Mc()&&(af=Rr);var ry=Es.angle;Es.Kb=0,Es.measure(1/0,1/0,0,0),Es.Kb=ry;var Sm=Es.measuredBounds,Vg=Sm.width,lf=Sm.height,eg=He.allocAt(0,0,Vg,lf),Fl=Ut.alloc();Fl.xi(eg,af),He.free(eg);for(var Ih=-Fl.x,lA=-Fl.y,au=new He,xd=el.length,Wg=0;Wg<xd;Wg++)for(var Sd=el[Wg],Bm=Sd.$l.x,Zg=Sd.$l.y,hs=Sd.angle,Gu=0;4>Gu;Gu++){switch(Gu){case 0:Fl.h(Ih,lA);break;case 1:Fl.h(Ih+Vg,lA);break;case 2:Fl.h(Ih,lA+lf);break;case 3:Fl.h(Ih+Vg,lA+lf)}Fl.rotate(hs+Es.angle),Fl.offset(Bm,Zg),Wg===0&&Gu===0?au.h(Fl.x,Fl.y,0,0):au.Ye(Fl),Fl.offset(-Bm,-Zg),Fl.rotate(-hs-Es.angle)}Ut.free(Fl),Dh.graduatedBounds!==null&&Dh.graduatedBounds.push(au),Pr(kc,au.x,au.y,au.width,au.height)}else if(Es instanceof Mo){var yu=a,Cm=b;yu.temporaryTextBlock===null&&(yu.temporaryTextBlock=new Mo);var Ol=yu.temporaryTextBlock;Sy(Ol,Es);var Tc=Es.alignmentFocus;Tc.Mc()&&(Tc=Rr);for(var wu=Es.segmentOrientation,Yg=Es.segmentOffset,Bd=new He,Wp=0,Xg=0,kA=0,uf=0,Cd=0,Jg=el.length,Nc=0;Nc<Jg;Nc++){var hh=el[Nc];Wp=hh.$l.x,Xg=hh.$l.y,kA=hh.angle,Cd=uf=Es.angle,wu!==Ya&&(Cd=wu===pp||wu===k0?kA+Es.angle:kA,uf=Qn.computeAngle(wu,Cd)),Ol.Kb=uf,Ol.text=hh.text||"",Ol.measure(1/0,1/0,0,0);var Dc=Ol.measuredBounds,Uh=Ol.naturalBounds,Ic=Uh.width,Af=Uh.height,uA=Xi.alloc();uA.reset(),uA.translate(-Dc.x,-Dc.y),uA.scale(Ol.scale,Ol.scale),uA.rotate(Cd,Ic/2,Af/2),wu!==mp&&wu!==yp||uA.rotate(90,Ic/2,Af/2),wu!==vp&&wu!==wp||uA.rotate(-90,Ic/2,Af/2),wu===T0&&(45<kA&&135>kA||225<kA&&315>kA)&&uA.rotate(-kA,Ic/2,Af/2);var ng=He.allocAt(0,0,Ic,Af),Uc=Ut.alloc();Uc.xi(ng,Tc),uA.Ga(Uc);var ig=-Uc.x,oy=-Uc.y,Qh=Ut.alloc();Qh.assign(Yg),isNaN(Qh.x)&&(Qh.x=Ic/2+3),isNaN(Qh.y)&&(Qh.y=-(Af/2+3)),Qh.rotate(kA),Wp+=Qh.x+ig,Xg+=Qh.y+oy;var hf=new He(Wp,Xg,Dc.width,Dc.height),Zp=new He(Dc.x,Dc.y,Dc.width,Dc.height),sy=new He(Uh.x,Uh.y,Uh.width,Uh.height);hh.Sz=uf,hh.lineCount=Ol.lineCount,hh.lines=[Ol.Cb,Ol.Ih,Ol.df,Ol.Le,Ol.Qc,Ol.Qb,Ol.ze],hh.actualBounds=hf,hh.measuredBounds=Zp,hh.naturalBounds=sy,Nc===0?Bd.assign(hf):Bd.ed(hf),Ut.free(Qh),Ut.free(Uc),He.free(ng),Xi.free(uA)}yu.graduatedBounds!==null&&yu.graduatedBounds.push(Bd),Pr(Cm,Bd.x,Bd.y,Bd.width,Bd.height)}Cs(Es,!1)}}},PA.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 ut=y[lt];rt=b[lt],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},PA.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 Wa,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,ut=ot.length,ft=0;ft<ut;ft++){var yt=ot[ft],Et=lt[ft],kt=Et.length;if(yt.visible&&yt!==z&&Et.length!==0){if(yt instanceof mr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Dt=yt.measuredBounds,Jt=yt.strokeWidth*yt.scale,zt=yt.alignmentFocus;zt.Mc()&&(zt=Rr);for(var se=0;se<kt;se++){var he=Et[se].$l,ge=Et[se].angle,ve=zt,_e=yt.Ab;_e.reset(),_e.translate(he.x+rt.x,he.y+rt.y),_e.rotate(ge+yt.angle,0,0),_e.translate(-Dt.width*ve.x+ve.offsetX+Jt/2,-Dt.height*ve.y+ve.offsetY+Jt/2),_e.scale(yt.scale,yt.scale),Vl(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,Va(yt,!1),yt.gc(y,x),b&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Mo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Mo),Dt=a.temporaryTextBlock,Sy(Dt,yt),Jt=0;Jt<kt;Jt++)zt=Et[Jt],zt.actualBounds&&zt.measuredBounds&&zt.naturalBounds&&(Dt.ec=zt.text||"",Dt.Kb=zt.Sz||0,Dt.Gc=zt.lineCount||0,se=zt.lines,se!==void 0&&(Dt.Cb=se[0],Dt.Ih=se[1],Dt.df=se[2],Dt.Le=se[3],Dt.Qc=se[4],Dt.Qb=se[5],Dt.ze=se[6]),zt.naturalBounds&&(Dt.dc=zt.naturalBounds),zt.actualBounds&&(se=zt.actualBounds,Dt.arrange(se.x,se.y,se.width,se.height)),se=zt.actualBounds,Dt.arrange(se.x,se.y,se.width,se.height),he=zt.measuredBounds,zt=zt.naturalBounds,ge=Dt.Ab,ge.reset(),ge.translate(se.x+rt.x,se.y+rt.y),ge.translate(-he.x,-he.y),Dt.no(ge,zt.x,zt.y,zt.width,zt.height),Vl(Dt,!1),Dt.wh.set(Dt.Ab),Dt.Kk=Dt.scale,Va(Dt,!1),Dt.Ng=yt.part,Dt.Me=yt.panel,Dt.gc(y,x),Dt.Me=null,Dt.Ng=null,b&&(a.svg.appendChild(Dt.svg),Dt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Sn(a,y){if(ye.call(this),this.na=null,a===void 0)this.na=Sn.Position;else if(typeof a=="string"){var x=Uu.I(a);x!==null&&(this.na=x)}else a instanceof ho?this.na=a:a&&(this.na=Sn.Position,y=a);this.na===null&&te("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Sn.Grid?1048576:0),this.O=new ne,this.yb=ji,this.Tm=ws,this.Uf=sr,this.$g=null,this.$e="",this.jg=new He(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=wi,this.jn=Fr,this.kn=pn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Je(Sn,ye),Sn.prototype.cloneProtected=function(a){ye.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Sn.prototype.Af=function(a){ye.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},Sn.prototype.copy=function(){var a=ye.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(as,"elements",a,null,b,null,tt)}}return a}return null},Tt=Sn.prototype,Tt.toString=function(){return"Panel("+this.type.name+")#"+Xn(this)},Tt.Pn=function(a){ye.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Tt.hh=function(a,y){if(this.na===Sn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Sn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Sn.Table)if(a.yc(),a instanceof Wa){var x=a.yd;a.yd=yg(a,"gojs-ts"),qA(this,a),a.nh.pop(),a.yd=x}else qA(this,a);(x=this.isClipping&&this.na===Sn.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 qA(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&$A(a,y,!0,x,!0),E!==null&&$A(a,y,!1,E,!0),x!==null&&mc(a,y,!0,x),E!==null&&mc(a,y,!1,E),x!==null&&$A(a,y,!0,x,!1),E!==null&&$A(a,y,!1,E,!1)}function mc(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 ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){Zo(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+ut,x?yt>tt.height&&(ut-=yt-tt.height):yt>tt.width&&(ut-=yt-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,yt=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(yt,lt)):(lt+=ut.left,yt=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,yt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function $A(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=th(a,!0),lt=th(a,!1),ut=0;ut<z;ut++){var ft=E[ut];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(),kt=ft.separatorStrokeWidth;isNaN(kt)&&(kt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Dt=ft.separatorStroke;Dt===null&&(Dt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Dt===null||ft.index===(x?ot:lt))&&(kt=0),Et-=kt,kt=ft.position+kt,Et+=ft.actual,kt+Et>yt&&(Et=yt-kt),0>=Et||(yt=a.yb,Zo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,kt+yt.top,tt.width-(yt.left+yt.right),Et):y.fillRect(kt+yt.left,yt.top,Et,tt.height-(yt.top+yt.bottom)))}}}}function th(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 Mh(a){return a==="LineV"||a==="BarV"}Tt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Tt.kk=function(a,y,x){if(!ye.prototype.kk.call(this,a,y,x))return!1;if(this.type===Sn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,qA(this,a),a.yd=null;else if(this.na===Sn.Grid||this.na===Sn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Tt.nk=function(){return!0},Tt.$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 ye.prototype.$o.call(this,a,y,x,E)},Tt.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,ut=-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,we.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+yt,rt=a*lt+y*ft+Et,a=x*ot+E*ut+yt,ot=x*lt+E*ft+Et,b.h(0,0),x=this.naturalBounds,z=we.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=lt=0,ft=1,Et=yt=0),rt=a*ot+y*ut+yt,a=a*lt+y*ft+Et,ot=x*ot+E*ut+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,ut=Ut.alloc(),yt=null,y=1/0;var kt=null,Dt=this.isClipping&&this.na===Sn.Spot;Dt&&(kt=Ut.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,kt))&&(y=(rt-kt.x)*(rt-kt.x)+(a-kt.y)*(a-kt.y)));for(var Jt=0;Jt<Et;Jt++){var zt=ft[Jt];zt.visible&&zt!==yt&&zt.Sj(rt,a,ot,x,ut)&&(lt=!0,zt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),zt<E&&(E=zt,b.set(ut)))}return Dt&&(y>E&&b.set(kt),Ut.free(kt)),Ut.free(ut),z&&b.transform(tt),lt},Tt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ye.prototype.Gj.call(this)},Tt.v=function(a){if(!wl(this)){ye.prototype.v.call(this,a),a=null,(this.na===Sn.Auto||this.na===Sn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Ha(b,!1);(b instanceof Za||b instanceof Sn||b instanceof Mo||z!==wn)&&b.v(!0)}}}},Tt.Uj=function(){if(!wl(this)){Cs(this,!0),$u(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Tt.Uk=function(){if(!(this.l&2048)){Vl(this,!0),Va(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Tt.Wu=function(){Va(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Tt.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),xr(b,a,ot),xr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Tt.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 ll(a){return a.part!==null?a.part.locationObject:null}Tt.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=Ha(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=wn),a){case wn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Pn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Fi:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case _i:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Tt.gh=function(a){var y=this.naturalBounds,x=ll(this);if(vo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Ut.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(an(b.set(a),z.transform),z.ca(b)))return Ut.free(b),!0}return Ut.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Tt.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},Tt.qm=function(a,y){if(y(this,a),a instanceof Sn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Iu(a,y){Xd(a,a,y)}function Xd(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 Sn&&Xd(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof Sn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}Tt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof Sn){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}Tt.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 Sn){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 Sn?x=Math.max(x,dy(b)):b instanceof mr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Tt.se=function(){return!(this.type===Sn.TableRow||this.type===Sn.TableColumn)};function vc(a){return a.type===Sn.TableRow||a.type===Sn.TableColumn}Tt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Pa(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:an(Ut.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),vo(-(lt*b),-(lt*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=Ut.alloc(),lt=(ot=this.isClipping&&this.na===Sn.Spot)?this.Pb():null,ot&&(lt.se()?an(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return Ut.free(rt),z||Ut.free(tt),null;for(var ft=ll(this);ut--;){var yt=b[ut];if((yt.visible||yt===ft)&&(yt.se()?an(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Et=null;if(yt instanceof Sn?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 Ut.free(rt),z||Ut.free(tt),Et}}Ut.free(rt)}return this.background===null&&this.areaBackground===null?(z||Ut.free(tt),null):(a=vo(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Ut.free(tt),a)}return z||Ut.free(tt),null},Tt.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:an(Ut.allocAt(a.x,a.y),this.transform);if(b=vo(0,0,b.width,b.height,tt.x,tt.y),vc(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,lt=Ut.alloc(),ut=ll(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?an(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof Sn?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))}}Ut.free(lt)}return z||Ut.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Ut.free(tt),!1},Tt.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=Xi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&Xi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=ll(this),ot=this.O.s,lt=ot.length;lt--;){var ut=ot[lt];if(ut.visible||ut===rt){var ft=ut.actualBounds,yt=this.naturalBounds;ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof Sn?ut:null,yt=Xi.alloc(),yt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,yt):Os(ft,a,E,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Xi.free(yt))}}return z===void 0&&Xi.free(tt),E}return z===void 0&&Xi.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 Sn&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Tt.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:an(Ut.allocAt(a.x,a.y),this.transform),lt=rt?y:an(Ut.allocAt(y.x,y.y),this.transform),ut=ot.Bf(lt),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||gn(ot.x,ot.y,0,0,0,tt.height)<=ut||gn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||gn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||gn(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(Ut.free(ot),Ut.free(lt)),ft){if(!this.isAtomic){ot=Ut.alloc(),lt=Ut.alloc(),ut=ll(this);for(var yt=this.O.s,Et=yt.length;Et--;){var kt=yt[Et];if(kt.visible||kt===ut){var Dt=kt.actualBounds,Jt=this.naturalBounds;(!rt||!(Dt.x>Jt.width||Dt.y>Jt.height||0>Dt.x+Dt.width||0>Dt.y+Dt.height))&&(kt.se()?(Dt=kt.transform,an(ot.set(a),Dt),an(lt.set(y),Dt)):(ot.set(a),lt.set(y)),Dt=kt,kt=kt instanceof Sn?kt:null,(kt!==null?kt.og(ot,lt,x,E,b,z):Dt.tx(ot,lt,b))&&(x!==null&&(Dt=x(Dt)),Dt===null||E!==null&&!E(Dt)||z.add(Dt)))}}Ut.free(ot),Ut.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof mr&&(y=a.spot1,y===ws&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=fr),y}function Im(a){var y=null;return a instanceof mr&&(y=a.spot2,y===ws&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=to),y}Tt.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},Tt.M=function(a){return this.O.M(a)},Tt.Gb=function(a,y){y instanceof Di&&te("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&te("Cannot make a Panel contain itself: "+this.toString()),te("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&te("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Sn.Grid||y instanceof mr||te("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Sn.Graduated||y instanceof mr||y instanceof Mo||te("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 Ue),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 te("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),wl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Sn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||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(ds,"elements",this,y,null,E,null),x.cb(as,"elements",this,null,y,null,a)))};function Um(a,y){a.l=y?a.l|16777216:a.l&-16777217}Tt.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)},Tt.mb=function(a){0<=a&&this.pc(a,!0)},Tt.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),Cs(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 Sn?E.qm(E,function(tt,rt){ov(z,rt,y)}):ov(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ds,"elements",this,E,null,a,null))},Tt.Fb=function(a){0>a&&zn(a,">= 0",Sn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ts;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(as,"rowdefs",this,null,x,null,a)}return y[a]},Tt.oA=function(a){if(0>a&&zn(a,">= 0",Sn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(ds,"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 Ts?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Tt.Eb=function(a){0>a&&zn(a,">= 0",Sn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ts;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(as,"coldefs",this,null,x,null,a)}return y[a]},Tt.jA=function(a){if(0>a&&zn(a,">= 0",Sn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(ds,"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 Ts?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Tt.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},Tt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new Ts(y)),this},Tt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new Ts(y)),this},Tt.nz=function(a){if(0>a||this.type!==Sn.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},Tt.fz=function(a){if(0>a||this.type!==Sn.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},Tt.Fz=function(a,y){if(y===void 0&&(y=new Ut(NaN,NaN)),this.type!==Sn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Tt.Gz=function(a){if(this.type!==Sn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function py(a){return a=a.allBindings,a!==null&&a._isFrozen}function gu(a){var y=a.allBindings;if(y===null)a.data!==null&&te("Template cannot have .data be non-null: "+a),a.allBindings=y=new ne;else if(y._isFrozen)return;var x=new ne;Um(a,!1),a.qm(a,function(lt,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(XA(ut,!1),ft=ft.iterator;ft.next();){var yt=ft.value;yt.mode===Lp&&XA(ut,!0);var Et=yt.sourceName;Et!==null&&(Et==="/"&&Um(lt,!0),Et=b1(yt,lt,ut),Et!==null&&(x.add(Et),Et.srcBindings===null&&(Et.srcBindings=new ne),Et.srcBindings.add(yt))),y.add(yt)}if(ut instanceof Sn&&ut.type===Sn.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Et=lt[yt],Et!==void 0&&Et.be!==null)for(var kt=Et.be.iterator;kt.next();){var Dt=kt.value;Dt.xd=Et,Dt.to=2,Dt.wl=Et.index,y.add(Dt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,ft=0;ft<lt;ft++)if(yt=ut[ft],yt!==void 0&&yt.be!==null)for(Et=yt.be.iterator;Et.next();)kt=Et.value,kt.xd=yt,kt.to=1,kt.wl=yt.index,y.add(kt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){XA(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new ne),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 Sn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):ni('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Ts?(tt=Xn(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof ye?(tt=Xn(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):te("Unknown type of binding target: "+z)}y.freeze(),a instanceof Di&&a.Zc()&&a.Va()}Tt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof Sn&&(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&&gu(y),y},Tt.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 Sn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Tt.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 Sn&&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 Sn)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===Sn.Spot||a.type===Sn.Auto)return Math.min(a.O.length,1);if(a.type===Sn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof mr&&E.isPanelMain))break}return x}return a.type===Sn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Sn&&vc(a))?1:0}Tt.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 Sn){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),wl(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(gu(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 Ue),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 Sn){var b=y,z=x;E.type===Sn.TableRow?E.row=b:E.type===Sn.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=ys(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;te("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,ni('No item template Panel found for category "'+y+'" on '+a),ni(" Using default item template."),a=new Sn,y=new Mo,y.bind(new Ps("text","",Yi)),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 Sn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Sn&&!z.isEnabled||o0(a,z,x)}}}function FA(a,y){y.name=a,Uu.add(a,y)}Ke.Object.defineProperties(Sn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Sn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&zn(a,">= 0",Sn,"padding"),a=new ar(a)):(0>a.left&&zn(a.left,">= 0",Sn,"padding:value.left"),0>a.right&&zn(a.right,">= 0",Sn,"padding:value.right"),0>a.top&&zn(a.top,">= 0",Sn,"padding:value.top"),0>a.bottom&&zn(a.bottom,">= 0",Sn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:ji},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new iu),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new iu),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 iu),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)||te("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 iu),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new iu),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 iu),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)||te("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 iu),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 iu),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||te("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Tu(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()||te("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Tu(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 bh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),$s(this)&&(a=this.part,a!==null&&To(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 bh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),$s(this)&&(a=this.part,a!==null&&To(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 bh),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 bh),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 bh,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 bh,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 bh,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 bh,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 iu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new iu),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 iu),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 iu),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)&&te("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new iu),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)&&te("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new iu),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 Di&&!(this instanceof Jr);gu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Qn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Di&&(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 hc),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 Ue}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Di||a.isPanelMain)&&te("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(););vr(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&&(vr(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 ur&&(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))}}}),Ke.Object.defineProperties(Sn,{Position:{get:function(){return Uu.I("Position")}},Horizontal:{get:function(){return Uu.I("Horizontal")}},Vertical:{get:function(){return Uu.I("Vertical")}},Spot:{get:function(){return Uu.I("Spot")}},Auto:{get:function(){return Uu.I("Auto")}},Table:{get:function(){return Uu.I("Table")}},Viewbox:{get:function(){return Uu.I("Viewbox")}},TableRow:{get:function(){return Uu.I("TableRow")}},TableColumn:{get:function(){return Uu.I("TableColumn")}},Link:{get:function(){return Uu.I("Link")}},Grid:{get:function(){return Uu.I("Grid")}},Graduated:{get:function(){return Uu.I("Graduated")}}}),Sn.prototype.rebuildItemElements=Sn.prototype.mv,Sn.prototype.findItemPanelForData=Sn.prototype.sx,Sn.prototype.updateTargetBindings=Sn.prototype.La,Sn.prototype.copyTemplate=Sn.prototype.Uy,Sn.prototype.graduatedValueForPoint=Sn.prototype.Gz,Sn.prototype.graduatedPointForValue=Sn.prototype.Fz,Sn.prototype.findColumnForLocalX=Sn.prototype.fz,Sn.prototype.findRowForLocalY=Sn.prototype.nz,Sn.prototype.addColumnDefinition=Sn.prototype.By,Sn.prototype.addRowDefinition=Sn.prototype.Hy,Sn.prototype.addRowColumnDefinition=Sn.prototype.Gy,Sn.prototype.removeColumnDefinition=Sn.prototype.jA,Sn.prototype.getColumnDefinition=Sn.prototype.Eb,Sn.prototype.removeRowDefinition=Sn.prototype.oA,Sn.prototype.getRowDefinition=Sn.prototype.Fb,Sn.prototype.removeAt=Sn.prototype.mb,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.insertAt=Sn.prototype.Gb,Sn.prototype.elt=Sn.prototype.M,Sn.prototype.add=Sn.prototype.add,Sn.prototype.findObject=Sn.prototype.fb,Sn.prototype.findInVisualTree=Sn.prototype.Nl,Sn.prototype.walkVisualTreeFrom=Sn.prototype.qm,Sn.prototype.findMainElement=Sn.prototype.Pb;var vy=!1,yy=null,Uu=new Ue;Sn.className="Panel",Sn.definePanelLayout=FA,FA("Position",new qo),FA("Vertical",new Zr),FA("Auto",new Uo),FA("Link",new Tl);function bh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}bh.prototype.copy=function(){var a=new bh;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},bh.className="GradPanelSettings";function iu(){this.Pc=[],this.Oc=[],this.j=this.ob=l0,this.hb=this.Hb=0,this.Qp=ji,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}iu.prototype.copy=function(a){for(var y=new iu,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},iu.className="TablePanelSettings";function Ts(a){cn(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ws,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Rm,this.hg=sr,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))}Ts.prototype.copy=function(){var a=new Ts;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=_n(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=_n(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Tt=Ts.prototype,Tt.qb=function(a){a.classType===Ts&&(this.sizing=a)},Tt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Xn(this)},Tt.wi=function(a){this.Me=a},Tt.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)},Tt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Sn.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)},Tt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Io,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}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ps(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&py(y)&&te("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new ne),this.be.add(b),this},Ke.Object.defineProperties(Ts.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&&zn(a,">= 0",Ts,"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&&zn(a,">= 0",Ts,"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))&&zn(a,">= 0",Ts,"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&&zn(a,">= 0",Ts,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Ft(a,"RowColumnDefinition.separatorStroke"),a instanceof Ao&&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)||te("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 Ao&&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}}}),Ts.prototype.computeEffectiveSpacing=Ts.prototype.Wc,Ts.prototype.computeEffectiveSpacingTop=Ts.prototype.Io;var Rm=new hn(Ts,"Default",0),ap=new hn(Ts,"None",1),l0=new hn(Ts,"ProportionalExtra",2);Ts.className="RowColumnDefinition",Ts.Default=Rm,Ts.None=ap,Ts.ProportionalExtra=l0;function mr(a,y){ye.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)}Je(mr,ye),mr.prototype.cloneProtected=function(a){ye.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=_n(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 Jd(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Tt=mr.prototype,Tt.th=function(){ye.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Tt.qb=function(a){a===wn||a===wi||a===Dr||a===sr?this.geometryStretch=a:ye.prototype.qb.call(this,a)},Tt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Xn(this)};function wg(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,ut,ft,yt,Et,kt,Dt=0,Jt=An(),zt=2;zt<b;zt+=2)lt=x[zt],ut=x[zt+1],ft=lt-rt,rt=ut-ot,ft===0&&(ft=.001),yt=rt/ft,Et=Math.atan2(rt,ft),kt=Math.sqrt(ft*ft+rt*rt),Jt.push([ft,Et,yt,kt]),Dt+=kt,rt=lt,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof mr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,ut=lt!==0,zt=0,kt=Jt[zt],ft=kt[0],Et=kt[1],yt=kt[2],kt=kt[3];for(var se=0;.1<=Dt;){if(se===0&&(ut?(b=x,b-=lt,Dt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Dt){Nn(Jt);return}b>kt?(se=b-kt,b=kt):se=0;var he=Math.sqrt(b*b/(1+yt*yt));if(0>ft&&(he=-he),rt+=he,ot+=yt*he,a.translate(rt,ot),a.rotate(Et),a.translate(-(tt/2),-(z/2)),se===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Et),a.translate(-rt,-ot),Dt-=b,kt-=b,se!==0){if(zt++,zt===Jt.length){Nn(Jt);return}kt=Jt[zt],ft=kt[0],Et=kt[1],yt=kt[2],kt=kt[3],b=se}}Nn(Jt)}}Tt.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&&Zo(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===Sn.Link&&rt instanceof Jr&&rt.category==="Selection"&&rt.adornedObject instanceof mr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(Zo(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===bn.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===bn.u){var lt=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(lt,ut);var yt=Math.min(ot,ft);lt=Math.abs(ut-lt),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,yt,lt,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Du(a),a.jk(),rt&&z&&SA(a)),a.Se()}else if(b.type===bn.F)lt=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-lt)/2,yt=Math.abs(ft-ot)/2,lt=Math.min(lt,ut)+b,ot=Math.min(ot,ft)+yt,a.beginPath(),a.moveTo(lt,ot-yt),a.bezierCurveTo(lt+we.wg*b,ot-yt,lt+b,ot-we.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+we.wg*yt,lt+we.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-we.wg*b,ot+yt,lt-b,ot+we.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-we.wg*yt,lt-we.wg*b,ot-yt,lt,ot-yt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Du(a),a.jk(),rt&&z&&SA(a)),a.Se();else if(b.type===bn.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),ut=lt.segments.s,ft=ut.length;for(var Et=null,kt=0;kt<ft;kt++){var Dt=ut[kt];switch(Dt.type){case vs:a.moveTo(Dt.endX,Dt.endY);break;case wo:a.lineTo(Dt.endX,Dt.endY);break;case Ss:a.bezierCurveTo(Dt.point1X,Dt.point1Y,Dt.point2X,Dt.point2Y,Dt.endX,Dt.endY);break;case Ua:a.quadraticCurveTo(Dt.point1X,Dt.point1Y,Dt.endX,Dt.endY);break;case ss:if(Dt.radiusX===Dt.radiusY){var Jt=Math.PI/180;a.arc(Dt.point1X,Dt.point1Y,Dt.radiusX,Dt.startAngle*Jt,(Dt.startAngle+Dt.sweepAngle)*Jt,0>Dt.sweepAngle,Et!==null?Et.endX:lt.startX,Et!==null?Et.endY:lt.startY)}else if(Et=Ba(Dt,lt),Jt=Et.length,Jt===0)a.lineTo(Dt.centerX,Dt.centerY);else for(var zt=0;zt<Jt;zt++){var se=Et[zt];zt===0&&a.lineTo(se[0],se[1]),a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7])}break;case rl:if(zt=Jt=0,Et!==null&&Et.type===ss){if(Et=Ba(Et,lt),se=Et.length,se===0){a.lineTo(Dt.endX,Dt.endY);break}Et=Et[se-1]||null,Et!==null&&(Jt=Et[6],zt=Et[7])}else Jt=Et!==null?Et.endX:lt.startX,zt=Et!==null?Et.endY:lt.startY;if(Et=il(Dt,lt,Jt,zt),Jt=Et.length,Jt===0){a.lineTo(Dt.endX,Dt.endY);break}for(zt=0;zt<Jt;zt++)se=Et[zt],a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7]);break;default:te("Segment not of valid type: "+Dt.type)}Dt.isClosed&&a.closePath(),Et=Dt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(ut&&rt&&Du(a),a.jk(),ut&&rt&&SA(a))):(Du(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk(),SA(a)):(ut&&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=An(),z.type===bn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),wg(a,y,E,x);else if(z.type===bn.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,ut=lt.length,ft=0;ft<ut;ft++){switch(kt=lt[ft],kt.type){case vs:wg(a,y,E,x),E.length=0,E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY,ot=tt,yt=b;break;case wo:E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY;break;case Ss:we.Qe(tt,b,kt.point1X,kt.point1Y,kt.point2X,kt.point2Y,kt.endX,kt.endY,.5,E),tt=kt.endX,b=kt.endY;break;case Ua:we.ep(tt,b,kt.point1X,kt.point1Y,kt.endX,kt.endY,.5,E),tt=kt.endX,b=kt.endY;break;case ss:if(Dt=Ba(kt,rt),Et=Dt.length,Et===0){E.push(kt.centerX),E.push(kt.centerY),tt=kt.centerX,b=kt.centerY;break}for(Jt=0;Jt<Et;Jt++)zt=Dt[Jt],we.Qe(tt,b,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,E),tt=zt[6],b=zt[7];break;case rl:if(Dt=il(kt,rt,tt,b),Et=Dt.length,Et===0){E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY;break}for(Jt=0;Jt<Et;Jt++)zt=Dt[Jt],we.Qe(tt,b,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,E),tt=zt[6],b=zt[7];break;default:te("Segment not of valid type: "+kt.type)}kt.isClosed&&(E.push(ot),E.push(yt),wg(a,y,E,x))}wg(a,y,E,x)}else if(z.type===bn.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),wg(a,y,E,x);else if(z.type===bn.F){if(b=new xs,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new jr(ss),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=Ba(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],we.Qe(tt,b,yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,E),tt=yt[6],b=yt[7];wg(a,y,E,x)}Nn(E),a.restore(),a.Vc(!1)}}}},Tt.kk=function(a,y,x){return!ye.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)},Tt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ye.prototype.nk.call(this,a)},Tt.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)}},Tt.ga=function(a,y){if(y===void 0&&(y=new Ut),a instanceof di){a.Mc()&&te("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},Tt.mi=function(a){a===void 0&&(a=new He);var y=this.naturalBounds,x=this.oe;y=He.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Ut.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Pr(a,E.x,E.y,0,0),He.free(y),Ut.free(E),a},Tt.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!==bn.j||y||(b+=2);var z=He.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return He.free(z),!1;if(E=b+1e-4,x.type===bn.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:(He.free(z),we.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===bn.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 He.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),He.free(z),a}if(x.type===bn.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 He.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),He.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===bn.o)return He.free(z),this.fill===null?fl(x,a.x,a.y,b):is(x,a,b,1<this.strokeWidth,y);te("Unknown Geometry type: "+x.type)},Tt.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=we.Ze[rt];typeof lt=="string"&&(lt=we.Ze[lt]),typeof lt=="function"?(ot=lt(null,100,100),Km[rt]=ot):te("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,lt=tt.width;var ut=tt.height;switch(Ha(this,!0)){case wn:E=x=0;break;case Pn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case Fi:lt=Math.max(a-z,0),E=0;break;case _i:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(lt=b.width),isFinite(b.height)&&(ut=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),ut=Math.min(ft.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=_m(this),x){case wn:break;case Pn:rt=lt,ot=ut;break;case wi:x=Math.min(lt/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:te(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&&we.$(this.ua.Sk,a-z)&&we.$(this.ua.Rk,y-z)||(this.ua=mr.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,ut+z),b.w()?(lt=b.width,ut=b.height,lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=Math.max(yt.width,lt),ut=Math.max(yt.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function _m(a){var y=a.geometryStretch;return a.Rd!==null?y===sr?Pn:y:y===sr?Km[a.figure].defaultStretch:y}Tt.eh=function(a,y,x,E){Ca(this,a,y,x,E)},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.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,ut=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*ut+yt,rt=x*rt+E*lt+ft,ot=x*ot+E*ut+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Et=lt.bounds;if(ut=!1,lt.type===bn.j)if(1.5>=this.strokeWidth)ut=we.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,rt,ot,b);else{if(lt.startX===lt.endX?(E=ft,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=An(),a=new Ut,we.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.Ve(lt.endX+E,lt.endY+ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Nn(y),!1;for(ut=!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);Nn(y)}else if(lt.type===bn.u)ut=we.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===bn.F){y=He.allocAt(Et.x,Et.y,Et.width,Et.height).Bc(ft,ft);t:if(y.width===0)ut=we.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=we.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,ut=y.y+lt,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+lt*lt-ot*ot){b.x=NaN,b.y=NaN,ut=!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+ut,ot=x*(a-E)+ot+ut,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,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}He.free(y)}else if(lt.type===bn.o){yt=Ut.alloc();var kt=rt-z,Dt=ot-tt,Jt=kt*kt+Dt*Dt,zt=z,se=tt;if(0<Jt&&Et.contains(zt,se)&&(yt.x=zt,yt.y=se,this.ca(yt)))for(kt!==0&&.5>Math.abs(kt)?(Dt*=.5/kt,kt=.5):Dt!==0&&.5>Math.abs(Dt)&&(kt*=.5/Dt,Dt=.5),zt-=kt,se-=Dt;Et.contains(zt,se);)zt-=kt,se-=Dt;for(b.x=rt,b.y=ot,Dt=0;Dt<lt.figures.count;Dt++){var he=lt.figures.s[Dt],ge=he.isFilled?zt:z,ve=he.isFilled?se:tt,_e=he.segments;Et=he.startX,kt=he.startY;for(var jn=Et,pi=kt,hi=0;hi<_e.count;hi++){var In=_e.s[hi],vn=In.type,lr=In.endX,qi=In.endY,eo=!1;switch(vn){case vs:jn=lr,pi=qi;break;case wo:eo=A0(Et,kt,lr,qi,ge,ve,rt,ot,yt);break;case Ss:eo=we.Eo(Et,kt,In.point1X,In.point1Y,In.point2X,In.point2Y,lr,qi,ge,ve,rt,ot,.6,yt);break;case Ua:eo=we.Eo(Et,kt,Et+2/3*(In.point1X-Et),kt+2/3*(In.point1Y-kt),lr+2/3*(In.point1X-lr),qi+2/3*(In.point1Y-qi),lr,qi,ge,ve,rt,ot,.6,yt);break;case ss:case rl:vn=In.type===ss?Ba(In,he):il(In,he,Et,kt);var Fo=vn.length;if(Fo===0){eo=A0(Et,kt,In.type===ss?In.centerX:In.endX,In.type===ss?In.centerY:In.endY,ge,ve,rt,ot,yt);break}for(qi=null,lr=0;lr<Fo;lr++){if(qi=vn[lr],lr===0&&A0(Et,kt,qi[0],qi[1],ge,ve,rt,ot,yt)){var Vs=u0(ge,ve,yt,Jt,b);Vs<Jt&&(Jt=Vs,ut=!0)}we.Eo(qi[0],qi[1],qi[2],qi[3],qi[4],qi[5],qi[6],qi[7],ge,ve,rt,ot,.6,yt)&&(Vs=u0(ge,ve,yt,Jt,b),Vs<Jt&&(Jt=Vs,ut=!0))}lr=qi[6],qi=qi[7];break;default:te("Unknown Segment type: "+vn)}Et=lr,kt=qi,eo&&(eo=u0(ge,ve,yt,Jt,b),eo<Jt&&(Jt=eo,ut=!0)),In.isClosed&&(lr=jn,qi=pi,A0(Et,kt,lr,qi,ge,ve,rt,ot,yt)&&(In=u0(ge,ve,yt,Jt,b),In<Jt&&(Jt=In,ut=!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,Ut.free(yt)}else te("Unknown Geometry type: "+lt.type);return ut?(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(we.$(a,x)&&we.$(y,E)||we.$(b,tt)&&we.$(z,rt))return!1;var lt=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(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||we.$(ot.y,a))&&(ot.y<y||we.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||we.$(ot.x,y))&&(ot.x<a||we.$(ot.x,a))&&(lt=!0)),lt)}Tt.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=Ut.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)))),Ut.free(z),b},Tt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Xi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Ut.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 Ut.free(tt),!0;var rt=Ut.alloc(),ot=Ut.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,qd(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),qd(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),qd(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),qd(this,tt,rt,ot)&&(y=!0)))),Ut.free(tt),Xi.free(x),Ut.free(rt),Ut.free(ot),y};function qd(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)}Tt.tx=function(a,y,x){function E(Jt,zt){for(var se=Jt.length,he=0;he<se;he+=2)if(zt.zd(Jt[he],Jt[he+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,qn(a.x,a.y,rt,ot)<=b&&qn(a.x,a.y,lt,ot)<=b&&qn(a.x,a.y,rt,tt)<=b&&qn(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===bn.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),gn(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===bn.u)return y=!1,x&&(y=gn(a.x,a.y,rt,ot,rt,tt)<=b||gn(a.x,a.y,rt,ot,lt,ot)<=b||gn(a.x,a.y,lt,ot,lt,tt)<=b||gn(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===bn.F){y=a.x-(rt+lt)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(lt-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return gn(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=we.$y(ut,ft,y,z),a*a<=b)return!0}else return!(qn(y,z,-ut,0)>=b||qn(y,z,0,-ft)>=b||qn(y,z,0,ft)>=b||qn(y,z,ut,0)>=b)}else if(y.type===bn.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&&gn(a.x,a.y,z,rt,z,lt)>b&&gn(a.x,a.y,z,rt,ot,rt)>b&&gn(a.x,a.y,ot,lt,z,lt)>b&&gn(a.x,a.y,ot,lt,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?fl(y,a.x,a.y,z):is(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,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,lt=0;lt<ot;lt++)switch(ft=rt[lt],ft.type){case vs:case wo:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case Ss:var yt=An();if(we.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Nn(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Ua:if(yt=An(),we.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Nn(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ss:case rl:yt=ft.type===ss?Ba(ft,z):il(ft,z,tt,ut);var Et=yt.length;if(Et===0){if(tt=ft.type===ss?ft.centerX:ft.endX,ut=ft.type===ss?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var kt=An(),Dt=0;Dt<Et;Dt++)if(ft=yt[Dt],kt.length=0,we.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,kt),E(kt,a))return Nn(kt),!1;Nn(kt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:te("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Tt.qc=function(){this.ua=null},Tt.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=ms):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new di(1-ms.x,ms.y)))}mr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=eh[a.toArrow];else a.fromArrow!=="None"?E=eh[a.fromArrow]:(E=we.Ze[a.figure],typeof E=="string"&&(E=we.Ze[E]),E===void 0&&te("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=we.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function xy(a){var y=eh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=eh[x],y===void 0){var E=null,b;for(b in we.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=bn.parse(we.um[E],!1),eh[E]=a,x!==E&&(eh[x]=E),E}}return typeof y=="string"?y:y instanceof bn?a:null}Ke.Object.defineProperties(mr.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),$s(this)&&(a=this.part,a!==null&&To(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=bn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Ut.allocAt(-y.x,-y.y),Ut.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 Ao&&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 Ao&&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 zn(a,"value >= 0",mr,"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"?zn(a,'"butt", "round", or "square"',mr,"strokeCap"):(Jd(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"?zn(a,'"miter", "bevel", or "round"',mr,"strokeJoin"):(Jd(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){Jd(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)||te("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&&(Jd(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=we.Ze[a];typeof x=="function"?x=a:(x=we.Ze[a.toLowerCase()])||te("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=xy(a);x===null?te("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),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=xy(a);x===null?te("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),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:ws},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Jd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:ws},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Jd(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&&(Jd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:sr},set:function(a){var y=this.geometryStretch;y!==a&&(Jd(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 nh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Tu(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 nh),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 nh),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 nh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),mr.prototype.intersectsRect=mr.prototype.Yc,mr.prototype.containedInRect=mr.prototype.fh,mr.prototype.getNearestIntersectionPoint=mr.prototype.rs,mr.prototype.getDocumentBounds=mr.prototype.mi,mr.prototype.getDocumentPoint=mr.prototype.ga;var eh=new vi,Km=new vi;mr.className="Shape",mr.getFigureGenerators=function(){var a=new Ue,y;for(y in we.Ze)y!==y.toLowerCase()&&a.add(y,we.Ze[y]);return a.freeze(),a},mr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=we.Ze;E[a]=y,E[x]=a},mr.getArrowheadGeometries=function(){var a=new Ue;for(E in we.um)if(eh[E]===void 0){var y=bn.parse(we.um[E],!1);eh[E]=y,y=E.toLowerCase(),y!==E&&(eh[y]=E)}for(var x in eh)if(x!==x.toLowerCase()){var E=eh[x];E instanceof bn&&a.add(x,E)}return a.freeze(),a},mr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=bn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||te("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=eh;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=sr,this.gg=this.fg=ws}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 Mo(a,y){return ye.call(this),g0||(ul=Xo?new Wl(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}Je(Mo,ye),Mo.prototype.cloneProtected=function(a){ye.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 EA(a){a.da===null?a.da=new Xm:a.da.nc&&(a.da=a.da.copy())}Tt=Mo.prototype,Tt.th=function(){ye.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function Sy(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}Tt.qb=function(a){a.classType===Mo?this.wrap=a:ye.prototype.qb.call(this,a)},Tt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Tt.v=function(){ye.prototype.v.call(this)},Tt.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;Zo(this,a,this.xc,!0,!1,x,E),(ot||lt)&&Zo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var yt=y.scale;switch(8>(ft*ft+ut*ut)*yt*yt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Wa&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Kr:a.translate(b,0),a.scale(-1,1);break;case Sr:a.translate(0,z),a.scale(1,-1);break;case fo:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,yt=(y+tt+ft)*ut,z>yt&&(E=this.verticalAlignment,E=E.y*z-E.y*yt+E.offsetY),ut===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<ut;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 Kr:a.scale(-1,1),a.translate(-b,0);break;case Sr:a.scale(1,-1),a.translate(0,-z);break;case fo:a.scale(-1,-1),a.translate(-b,-z)}}},Tt.Oj=function(a,y,x,E,b,z,tt,rt,ot,lt,ut){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 Wa&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Wa&&y.ad.classList.add("gojs-td"))}},Tt.kk=function(a,y,x){if(!ye.prototype.kk.call(this,a,y,x))return!1;if(Zo(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++)Qf(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qf(a,y,!0);return!0},Tt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ye.prototype.nk.call(this,a)},Tt.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)}},Tt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ul!==null&&My!==z&&(My=ul.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,Qu(rt)),rt=lt+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=Qu(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);Qu(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=hp,y=Qu(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),xr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Tt.eh=function(a,y,x,E){Ca(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 zm(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===jm){a.Le=1;var lt=Qu(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=xg(a,tt),tt=tt.substr(z.length),y=xg(a,tt),lt=Qu(z+y);0<y.length&&lt<=x;)z+=y,tt=tt.substr(y.length),y=xg(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=Qu(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);Qu(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=hp;var ut=Qu(z);a.Cb=ut,lp(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,lp(a,tt,0));0<tt.length;){for(y=xg(a,tt),tt=tt.substr(y.length);Qu(y)>x;){var ft=1;for(lt=Qu(y.substr(0,ft)),ut=0;lt<=x;)ft++,ut=lt,lt=Qu(y.substr(0,ft));if(ft===1){var yt=lt;z=Math.max(z,lt)}else yt=ut,z=Math.max(z,ut);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(ut=xg(a,tt),lt=Qu(y+ut);0<ut.length&&lt<=x;)y+=ut,tt=tt.substr(ut.length),ut=xg(a,tt),lt=y+ut,b&&(lt=lt.trim()),lt=Qu(lt);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=lt,z=Math.max(z,lt)):(ft=ut=Qu(y),z=Math.max(z,ut)),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 xg(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 Qu(a){return ul===null?8*a.length:ul.measureText(a).width}function up(a){if(a.df!==null)return a.df;var y=a.Ae;if(ul===null){var x=16;return a.df=x}return Zm[y]!==void 0&&5e3>Ly?x=Zm[y]:(x=1.3*ul.measureText("M").width,Zm[y]=x,Ly++),a.df=x}function By(a){if(ul===null)return 6;if(f0[a]!==void 0&&5e3>Ym)var y=f0[a];else y=ul.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!==jm){a.Le=0;var ot=ln.alloc();zm(a,z,y,ot),b+=ot.height,ln.free(ot),a.Gc+=a.Le}else zm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}Ke.Object.defineProperties(Mo.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"||(EA(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:wn},set:function(a){var y=this.flip;y!==a&&(EA(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:fa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),EA(this),this.da.Yr=a,bs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=ln.alloc();zm(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),xr(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&&(EA(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&&(EA(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 Ao&&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&&(EA(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&&(EA(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 nh),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 nh),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 nh),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 nh),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 nh),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&&(EA(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&&(EA(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&&(EA(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&&(EA(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&&(EA(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&&zn(a,"> 0",Mo,"maxLines"),EA(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,jm=new hn(Mo,"None",0),Py=new hn(Mo,"WrapFit",1),Vm=new hn(Mo,"WrapDesiredSize",2),Fy=new hn(Mo,"WrapBreakAll",3),Wm=new hn(Mo,"OverflowClip",0),d0=new hn(Mo,"OverflowEllipsis",1),Ap=new hn(Mo,"FormatTrim",0),Ey=new hn(Mo,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Zm=new vi,Ly=0,f0=new vi,Ym=0,hp="...",My="",ul=null,g0=!1;Mo.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=wn,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=fa,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},Mo.getEllipsis=function(){return hp},Mo.setEllipsis=function(a){hp=a,f0=new vi,Ym=0},Mo.getBaseline=function(){return h0},Mo.setBaseline=function(a){h0=a},Mo.getUnderline=function(){return c0},Mo.setUnderline=function(a){c0=a},Mo.isValidFont=function(a){if(g0||(ul=Xo?new Wl(null).context:null,g0=!0),ul===null)return!0;var y=ul.font;if(a===y||a==="10px sans-serif")return!0;ul.font="10px sans-serif",ul.font=a;var x=ul.font;if(x!=="10px sans-serif")return ul.font=y,!0;ul.font="19px serif";var E=ul.font;return ul.font=a,x=ul.font,ul.font=y,x!==E},Mo.FormatNone=Ey,Mo.FormatTrim=Ap,Mo.None=jm,Mo.OverflowClip=Wm,Mo.OverflowEllipsis=d0,Mo.WrapBreakAll=Fy,Mo.WrapDesiredSize=Vm,Mo.WrapFit=Py;function nh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}nh.prototype.copy=function(){var a=new nh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},nh.className="GradElementSettings";function Al(a,y){ye.call(this),this.Eg=null,this.qo="",this.Xg=Da,this.Nk=Pn,this.Zg=this.Hd=null,this.Mk=rr,this.Xf=wn,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 Sg;Je(Al,ye),Al.prototype.cloneProtected=function(a){ye.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},Al.prototype.qb=function(a){a===wn||a===wi||a===Dr?this.imageStretch=a:ye.prototype.qb.call(this,a)},Al.prototype.toString=function(){return"Picture("+this.source+")#"+Xn(this)};function Bg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],p0--):(Sg=new vi,p0=0)}function by(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()||(Cs(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=An();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);Nn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Al.prototype.hA=function(){if(this.source!==""){Bg(this.source);var a=this.source;this.source="",this.source=a}},Al.prototype.redraw=function(){this.N(),this.Uc=!0},Al.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 pc)){var b=a instanceof Wa;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,ut=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,kt=this.Mk;switch(Et){case wn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+kt.offsetX+(ft*kt.x-E.width*kt.x)),yt>=E.height&&(tt=tt+kt.offsetY+(yt*kt.y-E.height*kt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case Pn:ft=E.width,yt=E.height;break;case wi:case Dr:Et===wi?(Et=Math.min(E.height/yt,E.width/ft),ft*=Et,yt*=Et):Et===Dr&&(Et=Math.max(E.height/yt,E.width/ft),ft*=Et,yt*=Et,ft>=E.width&&(z=(z+kt.offsetX+(ft*kt.x-E.width*kt.x)/ft)*ot),yt>=E.height&&(tt=(tt+kt.offsetY+(yt*kt.y-E.height*kt.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 Dt=ft*Et*yt*Et,Jt=ot*rt/Dt,zt=x.__goCache;Et=null;var se=Ew;if(!b){if(x.sq&&zt!==void 0&&4<Dt&&Jt>se*se)for(zt.gi===null&&(Ty(zt,4,lt,ut,x),Ty(zt,16,lt,ut,x)),b=zt.gi,lt=b.length,ut=0;ut<lt&&b[ut].ratio*b[ut].ratio<Jt;ut++)Et=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Wl(null).context;try{b.drawImage(this.Eg,0,0)}catch(he){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(he){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?kt.offsetX+(E.width*kt.x-ft*kt.x):0,kt=yt<E.height?kt.offsetY+(E.height*kt.y-yt*kt.y):0,this.flip){case Kr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Sr:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case fo:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&zt!==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,kt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Wa&&(this.bt=[z/y,tt/y,Math.min(Et.source.width,ot/y),Math.min(Et.source.height,rt/y),b,kt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(he){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,kt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Wa&&(this.bt=[z,tt,ot,rt,b,kt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(he){this.en=!1}switch(this.flip){case Kr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Sr:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case fo:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,yt))}}}}},Al.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Ha(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===Pn||z===Fi?(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===Pn||z===_i?(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)),xr(this.dc,a,y),this.Ge(0,0,a,y)},Al.prototype.eh=function(a,y,x,E){Ca(this,a,y,x,E)},Ke.Object.defineProperties(Al.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||te("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Hd(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Be),E!==null&&x&&Ch(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()||(Cs(this,!1),this.v())):x&&by(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=Sg;if(Xo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<p0&&(Bg(),x=Sg),E=Br("img"),E.hn=!0,by(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 ky),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}}}),Al.prototype.redraw=Al.prototype.redraw,Al.prototype.reloadSource=Al.prototype.hA;var p0=0,Ew=4;Al.className="Picture",Sg=new vi,Al.clearCache=Bg;function ky(){this.gi=null}function Ty(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Wl(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))}ky.className="PictureCacheArray";function Ny(a,y){this.source=a,this.ratio=y}Ny.className="PictureCacheInstance";function Cg(){this.os=new bn,this.mc=null}Cg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new bn,this.mc=null};function Pg(a,y,x,E,b,z){a.mc=new xs,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()}Cg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new jr(vs);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Cg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new jr(wo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function yc(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new jr(Ss);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 jr(Ua);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Cg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new jr(ss);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 jr(rl,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 Cg,y.reset(a),y)}var v0=null;Cg.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),E=we.Ze;E[a]=y,E[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new bn(bn.u),E.endX=y,E.endY=x,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),Na("Square",function(a,y,x){a="s"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new bn(bn.u),E.endX=y,E.endY=x,E.defaultStretch=wi,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),Na("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=we.Mf[E];if(b!==void 0)return b;var z=a*we.wg;return b=new bn().add(new xs(a,0,!0).add(new jr(wo,y-a,0)).add(new jr(Ss,y,a,y-z,0,y,z)).add(new jr(wo,y,x-a)).add(new jr(Ss,y-a,x,y,x-z,y-z,x)).add(new jr(wo,a,x)).add(new jr(Ss,0,x-a,z,x,0,x-z)).add(new jr(wo,0,a)).add(new jr(Ss,a,0,0,z,z,0).close())),1<z&&(b.spot1=new di(0,0,z,z),b.spot2=new di(1,1,-z,-z)),we.Nf<we.vm&&(we.Mf[E]=b,we.Nf++),b}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new bn(bn.F),E.endX=y,E.endY=x,E.spot1=lu,E.spot2=ga,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),Na("Circle",function(a,y,x){a="c"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new bn(bn.F),E.endX=y,E.endY=x,E.spot1=lu,E.spot2=ga,E.defaultStretch=wi,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),Na("TriangleRight",function(a,y,x){return new bn().add(new xs(0,0).add(new jr(wo,y,.5*x)).add(new jr(wo,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new bn().add(new xs(0,0).add(new jr(wo,y,0)).add(new jr(wo,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new bn().add(new xs(y,x).add(new jr(wo,0,.5*x)).add(new jr(wo,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new bn().add(new xs(y,x).add(new jr(wo,0,x)).add(new jr(wo,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new bn().add(new xs(.5*y,0).add(new jr(wo,0,.5*x)).add(new jr(wo,.5*y,x)).add(new jr(wo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new bn(bn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Na("LineV",function(a,y,x){return a=new bn(bn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new bn().add(new xs(0,x/2,!1).add(new jr(wo,y,x/2)).add(new jr(vs,y/2,0)).add(new jr(wo,y/2,x)))}),Na("XLine",function(a,y,x){return new bn().add(new xs(0,x,!1).add(new jr(wo,y,0)).add(new jr(vs,0,0)).add(new jr(wo,y,x)))}),Na("LineRight",function(a,y,x){return new bn().add(new xs(.25*y,0,!1).add(new jr(wo,.75*y,.5*x)).add(new jr(wo,.25*y,x)))}),Na("LineDown",function(a,y,x){return new bn().add(new xs(0,.25*x,!1).add(new jr(wo,.5*y,.75*x)).add(new jr(wo,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new bn().add(new xs(.75*y,0,!1).add(new jr(wo,.25*y,.5*x)).add(new jr(wo,.75*y,x)))}),Na("LineUp",function(a,y,x){return new bn().add(new xs(0,.75*x,!1).add(new jr(wo,.5*y,.25*x)).add(new jr(wo,y,.75*x)))}),we.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=Qr,this.ir=null,this.jr="",this.lr=ws,this.Gq="",this.Hq=fr,this.Pq=Ln,this.Kq=Ai,this.Up=null,this.Cq=127,this.zr=Zn,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 Di(a,y){a===void 0||a instanceof ho||typeof a=="string"?Sn.call(this,a):(Sn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Ut(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new He,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Je(Di,Sn),Di.prototype.cloneProtected=function(a){Sn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Tt=Di.prototype,Tt.Af=function(a){Sn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Tt.toString=function(){var a=Vn(this.constructor)+"#"+Xn(this);return this.data!==null&&(a+="("+Yi(this.data)+")"),a};function hl(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}Tt.th=function(){Sn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Tt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===as&&y==="elements"?b instanceof Sn?Iu(b,function(ot){Cv(rt.partManager,ot),vA(rt,ot)}):Ch(rt,b):a===ds&&y==="elements"&&(b instanceof Sn?Iu(b,function(ot){Pv(rt.partManager,ot,rt)}):Hd(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Tt.La=function(a){if(Sn.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 Sn&&Iu(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Di.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Di.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Di.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 Ue),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)))}}},Di.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)}},Di.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=An();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Nn(y)}},Di.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 ur?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Jr))break t;gu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Sn.Link),x.adornedObject=y)}if(x!==null){x.type===Sn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(bw(this,a),y=this.adornments;y.next();)y.value.La()}},Di.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 bw(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function y0(a){if(rd(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,rd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Oy(a,y,x),x=a.Ib;var E=He.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),He.free(E),tv(a,!1)}}Di.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Xi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Di.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=rr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Ut.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),Ut.free(tt)}},Di.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Di.prototype.moveTo=function(a,y,x){a=Ut.allocAt(a,y),this.move(a,x),Ut.free(a)},Di.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())},Di.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())},Di.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ue),y.I(a)!==null)return y.I(a);var x=Sn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function wc(a,y,x,E){E===void 0&&(E=new Ut),x=x.Mc()?rr: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}Di.prototype.mi=function(a){return a===void 0&&(a=new He),a.assign(this.actualBounds)},Di.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=Ut.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof mr?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 $d(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}Di.prototype.arrange=function(){if(Pa(this)===!1)Iy(this);else{$u(this,!1);var a=this.Ib,y=He.alloc();y.assign(a);var x=od(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()||we.B(y.width,a.width)&&we.B(y.height,a.height)||0<=this.vw&&this.C(16),He.free(y),tv(this,!1)}},Tt=Di.prototype,Tt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=He.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),He.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||kr(a,y)||(this instanceof Jn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Tt.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 Ut(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),rd(this)===!1&&Pa(this)===!1&&(y0(this),Iy(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof Jr||(y=y.animationManager,y.zb&&bd(y,a,new Ut(E,b),x))}Tt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||Pa(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)},Tt.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,Ut.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 Jr||bd(x,a,new Ut(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Ut(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&&Nu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(io(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Tt.si=function(){return!0},Tt.Zc=function(){return!0},Tt.ph=function(){return!1},Tt.Dd=function(){return!0};function $m(a,y,x,E){y.constructor===a.constructor||zy||(zy=!0,ni('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),ni(" Old class: "+Vn(a.constructor)+", new class: "+Vn(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)}Di.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},Di.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},Di.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},Di.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},Di.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},Di.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},Di.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},Di.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},Di.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 rd(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 od(a){return(a.G&131072)!==0}Tt=Di.prototype,Tt.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}Tt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Tt.N=function(){var a=this.diagram;a!==null&&!Pa(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N($d(this,this.Ib))},Tt.v=function(){Sn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Jn&&this.labeledLink!==null&&bs(this.labeledLink),a.$b(!0))},Tt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},Tt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},Tt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Tt.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}Tt.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}Tt.Td=function(a){return a instanceof ur?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}Tt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ur&&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 ur&&w0(y,!1),y instanceof Jn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Di.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Jn&&this.isLinkLabel)},Di.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 sd(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Jr)){if(a.add(y),y instanceof Jn){if(x&&y instanceof ur)for(var tt=y.memberParts;tt.next();)sd(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)&&sd(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)sd(a,y.value,x,E-1,b,z)}else if(y instanceof Qn)for(y=y.labelNodes;y.next();)sd(a,y.value,x,E,b,z)}}Ke.Object.defineProperties(Di.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Wi: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(ds,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(as,"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&&(hl(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&&Td(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 Jr?this.type!==Sn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Ln},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),hl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ai},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),hl(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&&(hl(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:fr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),hl(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,Pa(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 Jr)){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 Jr?this instanceof Jr&&(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&&(gu(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&&(gu(x),x=x.copy(),x===null||x instanceof Qn||(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&&(hl(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&&(hl(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&&(hl(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 Qn?(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&&(hl(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&&(hl(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&&(hl(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:Qr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),hl(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&&(hl(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&&(hl(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:ws},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),hl(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&&te("Cannot make a Group a member of itself: "+this.toString()),te("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 ur&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?av(a,this):this instanceof ur&&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 ur){for(x=new Be,sd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Jn)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof Jn){for(x=this.linksConnected;x.next();)Fg(x.value);x=this.labeledLink,x!==null&&Fg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Td(y,-1,a))}}else te("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&&(hl(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&&(hl(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&&(hl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Zn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),hl(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&&(hl(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&&(hl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Di.prototype.invalidateLayout=Di.prototype.C,Di.prototype.findCommonContainingGroup=Di.prototype.px,Di.prototype.isMemberOf=Di.prototype.Td,Di.prototype.findTopLevelPart=Di.prototype.sz,Di.prototype.findSubGraphLevel=Di.prototype.oz,Di.prototype.ensureBounds=Di.prototype.Va,Di.prototype.getDocumentBounds=Di.prototype.mi,Di.prototype.findObject=Di.prototype.fb,Di.prototype.moveTo=Di.prototype.moveTo,Di.prototype.invalidateAdornments=Di.prototype.Wb,Di.prototype.clearAdornments=Di.prototype.Ej,Di.prototype.removeAdornment=Di.prototype.Jf,Di.prototype.addAdornment=Di.prototype.bh,Di.prototype.findAdornment=Di.prototype.Pj,Di.prototype.updateTargetBindings=Di.prototype.La;var zy=!1;Di.className="Part",Di.LayoutNone=0,Di.LayoutAdded=1,Di.LayoutRemoved=2,Di.LayoutShown=4,Di.LayoutHidden=8,Di.LayoutNodeSized=16,Di.LayoutGroupLayout=32,Di.LayoutNodeReplaced=64,Di.LayoutStandard=127,Di.LayoutAll=16777215;function Jr(a,y){a===void 0||a instanceof ho||typeof a=="string"?Di.call(this,a):(Di.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)}Je(Jr,Di),Jr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Jr.prototype.updateRelationshipsFromData=function(){},Jr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Qn&&y instanceof mr){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 mr&&(b.ua=a)}}},Jr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Pa(a))},Jr.prototype.Zc=function(){return!1},Jr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Za)this.$a===null&&(this.$a=b);else if(b instanceof Sn){var rt=b.Nl(function(ot){return ot instanceof Za});rt instanceof Za&&this.$a===null&&(this.$a=rt)}}else a===ds&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Sn&&this.$a.rg(E)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,E,b,z,tt)},Jr.prototype.updateAdornments=function(){},Jr.prototype.Lj=function(){},Ke.Object.defineProperties(Jr.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}}}),Jr.className="Adornment";function rv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Nr,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 ho||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new ne,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Je(Jn,Di),Jn.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Tt=Jn.prototype,Tt.Af=function(a){Di.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function xc(a){a.Ba===null?a.Ba=new rv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Tt.th=function(){Di.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new Be),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}Tt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},Tt.gk=function(a,y,x,E,b,z,tt){a===as&&y==="elements"?this.wc=null:a===ds&&y==="elements"&&(this.wc=null),Di.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Nl(x.fromPort),Nl(x.toPort),x.bb())}};function Wy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Nl(x.fromPort),Nl(x.toPort),x.bb())}}function Nl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Nl(y.port)}}Tt.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(!Di.prototype.isVisible.call(this))return!1;var a=!0,y=YA,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===YA){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Bs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===wA&&(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){Di.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 Be,y=new Be;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 ae(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Tt=Jn.prototype,Tt.Mo=function(a){a===void 0&&(a=null);var y=new ae(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Tt.Sd=function(a){a===void 0&&(a=null);var y=new ae(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Tt.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 Be,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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):Wi},Tt.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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):Wi},Tt.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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):Wi},Tt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ae(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},Tt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ae(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 x0(a,y,x){Nl(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 S0(a,y,x){Nl(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)},Tt=Jn.prototype,Tt.Vo=function(a){Di.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},Tt.Wo=function(a){Di.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Tt.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,Di.prototype.Lj.call(this)},Tt.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 Ue: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=An()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Nn(x)}}}Tt.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},Tt.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}},Tt.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},Tt.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},Tt.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},Tt.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 Be;return a(this,y),y},Tt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}Tt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ae(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},Tt.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 ne,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 ne,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Ar(x):Wi},Tt.wz=function(a){a===void 0&&(a=1/0);var y=new Be;return sd(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 Be;x.add(this),qy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),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 ut=y.contains(lt);if(ut||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,ut||$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 Be;x.add(this),t1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),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 ut=ot.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();lt.vv=a,ft.all(function(yt){return function(Et){return Et===yt.vv||!Et.isTreeExpanded}}(lt))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,t1(ut,y,x,E-1,b,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}Ke.Object.defineProperties(Jn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:B0},set:function(a){var y=this.portSpreading;y!==a&&(xc(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&&Nu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Nr},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),xc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Nu(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&&(xc(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&&(xc(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&&(xc(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),bs(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&&(xc(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 kw=new hn(Jn,"SpreadingNone",10),B0=new hn(Jn,"SpreadingEvenly",11),sv=new hn(Jn,"SpreadingPacked",12);Jn.className="Node",Jn.SpreadingNone=kw,Jn.SpreadingEvenly=B0,Jn.SpreadingPacked=sv;function ur(a,y){a===void 0||a instanceof ho||typeof a=="string"?Jn.call(this,a):(Jn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Be,this.$a=null,this.Sc=new Vo,this.Sc.group=this,this.gl=new Be,this.tb=this.$p=null,y&&Object.assign(this,y)}Je(ur,Jn),ur.prototype.cloneProtected=function(a){Jn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Za});y instanceof Za?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())},Tt=ur.prototype,Tt.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 Qn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Tt.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Za)this.$a===null?this.$a=b:this.$a!==b&&te("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Sn){var rt=b.Nl(function(ot){return ot instanceof Za});rt instanceof Za&&(this.$a===null?this.$a=rt:this.$a!==rt&&te("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ds&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Sn&&this.$a.rg(E)&&(this.$a=null));Jn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Xl=function(a,y){Jn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Sn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Sn&&(a=a.Pb()),this.tb===null&&(this.tb=new He),a.mi(this.tb),a instanceof mr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Tt.eh=function(a,y,x,E){this.nf=this.$a,Jn.prototype.eh.call(this,a,y,x,E)},Tt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Qn||y.Va()}),Jn.prototype.Va.call(this)},Tt.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()&&Pa(y))return!1}else if(y instanceof Qn&&y.isVisible()&&Pa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function av(a,y){if(a.Gn.add(y)){y instanceof ur&&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 Qn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function lv(a,y){if(a.Gn.remove(y)){y instanceof ur&&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 Qn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Tt.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)},ur.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=$e(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ur.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=$e(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},ur.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))},Tt=ur.prototype,Tt.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()?(Nl(x.fromPort),Nl(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Nl(x.fromPort),Nl(x.toPort),x.bb()))}}},Tt.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 Be,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},Tt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Be,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},Tt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Be;return a(this,y),y},Tt.Rj=function(){var a=new Be;return sd(a,this,!0,0,!0),a.remove(this),a},Tt.Zb=function(a){Jn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ur.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 ur&&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 Qn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}ur.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 ur&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,n1(z,y,x,E)),z instanceof Jn)z.Bd(y),x.Cj(z,E);else if(z instanceof Qn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}ur.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=Ut.alloc(),Jn.prototype.move.call(this,a,y),a=new Be,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Qn&&(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 Qn&&(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());Ut.free(z)}},Ke.Object.defineProperties(ur.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&&te("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&&(xc(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&&(xc(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&&(xc(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&&(xc(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)}}}),ur.prototype.expandSubGraph=ur.prototype.expandSubGraph,ur.prototype.collapseSubGraph=ur.prototype.collapseSubGraph,ur.prototype.findSubGraphParts=ur.prototype.Rj,ur.prototype.findContainingGroupChain=ur.prototype.hz,ur.prototype.findExternalNodesConnected=ur.prototype.iz,ur.prototype.findExternalLinksConnected=ur.prototype.Lu,ur.prototype.ensureBounds=ur.prototype.Va,ur.className="Group";function Za(a){ye.call(this),this.yb=ji,this.ko=new He(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Je(Za,ye),Za.prototype.cloneProtected=function(a){ye.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Za.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return vo(0,0,y.width,y.height,a.x,a.y)},Za.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ur||a instanceof Jr)||te("Placeholder is not inside a Group or Adornment."),a instanceof ur){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(xr(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=Ut.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Ut.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 mr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==Sn.Link&&(rt=z.ga(a.category==="Selection"?fr:a.locationSpot,Ut.alloc()),a.location=rt,Ut.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(fr,Ut.alloc()),lt=He.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(to,a)),lt.Ye(z.ga($r,a)),lt.Ye(z.ga(ao,a)),xr(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ut.free(a),He.free(lt)):(xr(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Za.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Za.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ur&&!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=He.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof ur&&!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)),He.free(x),E&&y instanceof ur&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Za.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ur))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 Qn&&(!y.computesBoundsIncludingLinks||wl(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},Ke.Object.defineProperties(Za.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new ar(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Za.className="Placeholder";function Qn(a){Di.call(this,Sn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ya,this.Om=0,this.Qm=Ya,this.Rm=NaN,this.qj=dv,this.po=.5,this.wd=null,this.Nb=new ne().freeze(),this.Tg=this.Mg=null,this.ml=new He,this.ua=new bn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ut,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Je(Qn,Di),Qn.prototype.cloneProtected=function(a){Di.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())},Tt=Qn.prototype,Tt.Af=function(a){Di.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&&Nl(y),a=a.toPort,a!==null&&Nl(a)},Tt.qb=function(a){a.classType===Qn?(a.value&2)===2?this.routing=a:a===Yl||a===Bc||a===Lg?this.curve=a:a===gp||a===M0||a===b0?this.adjusting=a:a!==dv&&a!==Ya&&te("Unknown Link enum value for a Link property: "+a):Di.prototype.qb.call(this,a)},Tt.Xc=function(){this.ba===null&&(this.ba=new If)},Tt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Pa(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Pa(a)||rd(a)))},Tt.zv=function(){return!1},Tt.Av=function(){},Tt.Zc=function(){return!1},Qn.prototype.computeAngle=function(a,y,x){return Qn.computeAngle(y,x)},Qn.computeAngle=function(a,y){switch(a){default:case Ya: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 k0:a=we.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=we.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=we.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=we.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return we.bp(a)};function Fg(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}Tt=Qn.prototype,Tt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Di.prototype.oh.call(this)},Tt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Tt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new Be),a.wd.add(y),a.v()}Tt.Vo=function(a){if(Di.prototype.Vo.call(this,a),tf(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)}dp(this)}},Tt.Wo=function(a){if(Di.prototype.Wo.call(this,a),tf(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)}fp(this)}},Tt.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))},Qn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Qn.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?Di.prototype.move.call(this,a,!1):(a=Ut.allocAt(x.x+E,x.y+b),Di.prototype.move.call(this,a,!1),Ut.free(a)),Sc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Qn.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},Qn.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},Qn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Tn),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()===Yl))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()===Yl){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return we.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),we.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},Qn.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()===Yl))return this.ua.wx(.5);if(this.computeCurve()===Yl&&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),we.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)},Tt=Qn.prototype,Tt.i=function(a){return this.Nb.s[a]},Tt.dd=function(a,y){this.Nb.cd(a,y)},Tt.L=function(a,y,x){this.Nb.cd(a,new Ut(y,x))},Tt.Kz=function(a,y){this.Nb.Gb(a,y)},Tt.m=function(a,y,x){this.Nb.Gb(a,new Ut(y,x))},Tt.ne=function(a){this.Nb.add(a)},Tt.yf=function(a,y){this.Nb.add(new Ut(a,y))},Tt.pv=function(a){this.Nb.mb(a)},Tt.Fj=function(){this.Nb.clear()};function Sc(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 ne,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Ut(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),bs(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&&ph(tt.animationManager,a,b),a.g("points",z,b)}}Tt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Tt.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,ut=0;ut<lt;ut++){var ft=ot[ut];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(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ph(x.animationManager,this,y),C0(this),this.g("points",a,y)}},Tt.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))}Tt.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())}},Tt.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()}}},Qn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Gf||(Gf=new Jn,Gf.desiredSize=si,Gf.Va()),this.defaultFromPoint&&(Gf.location=this.defaultFromPoint,Gf.Va(),y=a=Gf)):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?(zf||(zf=new Jn,zf.desiredSize=si,zf.Va()),this.defaultToPoint&&(zf.location=this.defaultToPoint,zf.Va(),b=E=zf)):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=Eg(tt),ot=Eg(x),lt=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===Yl;this.Wf=lt&&!ut?ft=!0:!1;var yt=this.computeAdjusting()===Ya||lt;if(!ut&&!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=ut=0;var Et=z.x+rt/3,kt=z.y+ot/3,Dt=Et,Jt=kt;we.B(ot,0)?Jt=0<rt?Jt-lt:Jt+lt:(ut=-rt/ot,ft=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(ft=-ft),Dt=(0>ot?-1:1)*ft+Et,Jt=ut*(Dt-Et)+kt),Et=z.x+2*rt/3,kt=z.y+2*ot/3;var zt=Et,se=kt;we.B(ot,0)?se=0<rt?se-lt:se+lt:(zt=(0>ot?-1:1)*ft+Et,se=ut*(zt-Et)+kt),this.Fj(),this.ne(z),this.yf(Dt,Jt),this.yf(zt,se),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,we.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=He.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new Ut),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new Ut),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),He.free(rt))}else{ft=this.isAvoiding,yt&&(ut&&ft||lt)&&this.Fj();var he=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),Et=Dt=kt=0,(ut||!rt||lt)&&(Jt=this.computeEndSegmentLength(a,y,tt,!0),Et=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Et-=ut?90:30,0>he&&(Et-=180)),0>Et?Et+=360:360<=Et&&(Et-=360),lt&&(Jt+=Math.abs(he)*(ut?1:2)),Et===0?kt=Jt:Et===90?Dt=Jt:Et===180?kt=-Jt:Et===270?Dt=-Jt:(kt=Jt*Math.cos(Et*Math.PI/180),Dt=Jt*Math.sin(Et*Math.PI/180)),tt.Mc()&&lt&&(Jt=y.ga(rr,Ut.alloc()),zt=Ut.allocAt(Jt.x+1e3*kt,Jt.y+1e3*Dt),this.getLinkPointFromPoint(a,y,Jt,zt,!0,ft),Ut.free(Jt),Ut.free(zt))),Jt=this.getLinkPoint(E,b,x,!1,ut,a,y);var ge=se=zt=0;if(ut||!ot||lt){var ve=this.computeEndSegmentLength(E,b,x,!1);ge=this.getLinkDirection(E,b,Jt,x,!1,ut,a,y),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ge+=ut?0:30,0>he&&(ge+=180)),0>ge?ge+=360:360<=ge&&(ge-=360),lt&&(ve+=Math.abs(he)*(ut?1:2)),ge===0?zt=ve:ge===90?se=ve:ge===180?zt=-ve:ge===270?se=-ve:(zt=ve*Math.cos(ge*Math.PI/180),se=ve*Math.sin(ge*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(rr,Ut.alloc()),tt=Ut.allocAt(x.x+1e3*zt,x.y+1e3*se),this.getLinkPointFromPoint(E,b,x,tt,!1,Jt),Ut.free(x),Ut.free(tt))}x=ft,(ut||!rt||lt)&&(x=new Ut(ft.x+kt,ft.y+Dt)),tt=Jt,(ut||!ot||lt)&&(tt=new Ut(Jt.x+zt,Jt.y+se)),!yt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Jt):!yt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,Jt)?this.dd(0,ft):!yt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Jt)):(this.Fj(),this.ne(ft),(ut||!rt||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Et,tt,ge,a,E),(ut||!ot||lt)&&this.ne(tt),this.ne(Jt))}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}Qn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Ut),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,ut=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+ut,E=E.x*rt+E.y*lt+ft,tt=x.x*tt+x.y*ot+ut,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 jf,x.port=y,x.node=y.part,y.Zn=x),h1(x,a)}Qn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Ut),x.sb()&&!Eg(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=Ut.alloc(),lt=Ut.alloc();var ut=new He(y.ga(fr,ot),y.ga(to,lt)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,lt),(x.Hf(Ro)||x.Hf($o))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Do)||x.Hf(Ls))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Ut.free(ot),Ut.free(lt)}}return rt}}return x=y.ga(F0(x),Ut.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=Ut.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),Ut.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Ut.free(x),rt},Qn.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(rr,Ut.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=Ut.alloc(),rt=rt.ga(rr,x),Ut.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,Ut.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Eg(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},Qn.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)},Qn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=rr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ws?ir:y)):(a=y||this.toPort,a===null?a=rr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ws?ir:y)),a};function Eg(a){return a===ir||a.x===.5&&a.y===.5}function F0(a){return a.x===.5&&a.y===.5?a:rr}Qn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ya&&4<this.pointsCount?this.computeMidPoint(new Ut):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(rr))},Qn.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},Qn.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=Xi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&Xi.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 ut=ot[lt];if(ut.visible||ut===this.locationObject){var ft=ut.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=Xi.alloc(),ft.set(tt),ut instanceof Sn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof mr)if(rt=a,yt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),yt)t:{var Et=rt,kt=ft;if(ut.fh(Et,kt))rt=!0;else{if(kt===void 0&&(kt=ut.transform,Et.Re(ut.actualBounds))){rt=!0;break t}rt=Et.left,yt=Et.right;var Dt=Et.top;Et=Et.bottom;var Jt=Ut.alloc(),zt=Ut.alloc(),se=Ut.alloc(),he=Xi.alloc();he.set(kt),he.bv(ut.transform),he.Vj(),zt.x=yt,zt.y=Dt,zt.transform(he),Jt.x=rt,Jt.y=Dt,Jt.transform(he),kt=!1,qd(ut,Jt,zt,se)?kt=!0:(Jt.x=yt,Jt.y=Et,Jt.transform(he),qd(ut,Jt,zt,se)?kt=!0:(zt.x=rt,zt.y=Et,zt.transform(he),qd(ut,Jt,zt,se)?kt=!0:(Jt.x=rt,Jt.y=Dt,Jt.transform(he),qd(ut,Jt,zt,se)&&(kt=!0)))),Xi.free(he),Ut.free(Jt),Ut.free(zt),Ut.free(se),rt=kt}}else rt=ut.fh(rt,ft)}else rt=Os(ut,a,E,ft);rt&&(yt=ut,y!==null&&(yt=y(ut)),yt&&(x===null||x(yt))&&b.add(yt)),Xi.free(ft)}}}return z===void 0&&Xi.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Xi.free(tt),!1},Qn.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?Yl:this.curve},Qn.prototype.computeCorner=function(){if(this.curve===Yl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Qn.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},Qn.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===k0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(rr).ab(x.ga(rr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Yl&&(a*=1.333)}}return a},Qn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ya&&x.bb()}},Qn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=An(),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),Nn(x)}}return a},Qn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Qn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Qn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===b0&&(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(!we.$(lt,0)){if(we.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var yt=E.y-ft;for(ot=Math.sqrt(rt*rt+yt*yt),we.$(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,ut=yt-ut,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),we.$(y,0)||(we.$(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+ut,y*=lt,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case b0: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,ut=y.y,ot=E.x,yt=E.y;var Et=1;if(ot-rt!==0){var kt=(yt-ut)/(ot-rt);Et=Math.sqrt(1+1/(kt*kt))}else kt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Dt=y.x,Jt=y.y,zt=.5;lt!==0&&(zt=((b-Dt)*(b-tt)+(z-Jt)*(z-ft))/lt);var se=b+zt*(tt-b),he=z+zt*(ft-z);y=Math.sqrt((Dt-se)*(Dt-se)+(Jt-he)*(Jt-he)),Jt<kt*(Dt-se)+he&&(y=-y),0<kt&&(y=-y),Dt=rt+zt*(ot-rt),zt=ut+zt*(yt-ut),kt!==0?(y=Dt+y/Et,this.L(a,y,zt-(y-Dt)/kt)):this.L(a,Dt,zt+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,ut=z.y,ft=rt,lt=ut,we.B(b.y,z.y)?we.B(z.x,tt.x)?ut=y.y:we.B(z.y,tt.y)&&(rt=y.x):we.B(b.x,z.x)&&(we.B(z.y,tt.y)?rt=y.x:we.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,yt=ut,we.B(b.y,z.y)?we.B(z.x,tt.x)?ut=E.y:we.B(z.y,tt.y)&&(rt=E.x):we.B(b.x,z.x)&&(we.B(z.y,tt.y)?rt=E.x:we.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),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}},Qn.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(xp,xp),ot.Bc(xp,xp),rt.Ye(a),ot.Ye(x);var lt=Ut.alloc(),ut=Ut.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),ut.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.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,ut.x=lt.x,ut.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),ut.y=lt.y)):(lt.h(a.x,x.y),ut.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)),ut.x=x.x,ut.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),ut.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)),ut.x=x.x,ut.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),ut.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.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,ut.x=lt.x,ut.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),ut.y=lt.y)):(lt.h(a.x,x.y),ut.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)),ut.x=x.x,ut.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),ut.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)),ut.x=x.x,ut.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),ut.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.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,ut.x=x.x,ut.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,ut.x=lt.x)):(lt.h(x.x,a.y),ut.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)),ut.x=lt.x,ut.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)),ut.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)),ut.x=lt.x,ut.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),ut.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.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,ut.x=x.x,ut.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,ut.x=lt.x)):(lt.h(x.x,a.y),ut.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)),ut.x=lt.x,ut.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)),ut.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)),ut.x=lt.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||b===z||this.layer.isTemporary||!Kd(yt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var Et=ed(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,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&Et.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var kt=x=null;if(yt.isVirtualized){yt=Et.bounds.copy(),yt.Bc(-Et.Ho,-Et.Go);var Dt=Ut.alloc();Mg(Et,a.x,a.y)||(we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,a.x,a.y,lt.x,lt.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(lt)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,ut.x,ut.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(ut)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,ft.x,ft.y,Dt)&&(x=a=Dt.copy(),y=Dt.ab(ft))),Mg(Et,ft.x,ft.y)||(we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Dt)?(kt=ft=Dt.copy(),E=ut.ab(Dt)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Dt)?(kt=ft=Dt.copy(),E=lt.ab(Dt)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Dt)&&(kt=ft=Dt.copy(),E=a.ab(Dt))),Ut.free(Dt)}rt=rt.copy().ed(ot),rt.Bc(Et.Ho*Et.Os,Et.Go*Et.Os),u1(Et,a,y,ft,E,rt,!0),ot=ih(Et,ft.x,ft.y),!Et.abort&&ot>=bg&&(l1(Et),rt.Bc(Et.Ho*Et.Hx,Et.Go*Et.Ix),u1(Et,a,y,ft,E,rt,!1),ot=ih(Et,ft.x,ft.y)),!Et.abort&&ot<bg&&ih(Et,ft.x,ft.y)!==Cc?(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?we.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)):we.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)&&(we.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)):we.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)),kt!==null&&(E===0||E===180?this.yf(z.x,kt.y):this.yf(kt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),Ut.free(lt),Ut.free(ut)}},Qn.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||!Kd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ed(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=ih(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&lt>ef&&ih(y,ut,ft)!==lt-1&&(ih(y,x-rt,E)===lt-1?(b=180,ut=x-rt,ft=E):ih(y,x+rt,E)===lt-1?(b=0,ut=x+rt,ft=E):ih(y,x,E-ot)===lt-1?(b=270,ut=x,ft=E-ot):ih(y,x,E+ot)===lt-1&&(b=90,ut=x,ft=E+ot));lt>ef&&ih(y,ut,ft)===lt-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=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,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),ih(y,tt,ut)===lt-1?hv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),ih(y,tt,ut)===lt-1&&hv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Qn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=gn(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=gn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Qn.prototype.qc=function(){this.lk=!1,this.v()},Qn.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 mr&&(b.ua=this.ua)}}},Qn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tf(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===Yl&&3<=y&&!we.$(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||tf(this)){if(a.type=bn.o,rt=Dy(a),this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),Pg(rt,b.x,b.y,!1),tt===Yl&&3<=y&&!we.$(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=_f(this,b,!1,z)),yc(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Ut.allocAt(E,ot),x=Ut.alloc(),x.assign(this.i(1)),z=Ut.allocAt(E,ot),b=Ut.allocAt(E,ot),tt=this.i(0);for(var lt,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){lt=this.i(ft);var yt=tt,Et=lt,kt=this.i(cv(this,lt,ft,!1));if((!we.$(yt.x,Et.x)||!we.$(Et.x,kt.x))&&(!we.$(yt.y,Et.y)||!we.$(Et.y,kt.y))){var Dt=ut;isNaN(Dt)&&(Dt=this.smoothness/3);var Jt=yt.x;yt=yt.y;var zt=Et.x;Et=Et.y;var se=kt.x;kt=kt.y;var he=Dt*E0(Jt,yt,zt,Et);Dt*=E0(zt,Et,se,kt),we.$(yt,Et)&&we.$(zt,se)&&(zt>Jt?kt>Et?(z.x=zt-he,z.y=Et-he,b.x=zt+Dt,b.y=Et+Dt):(z.x=zt-he,z.y=Et+he,b.x=zt+Dt,b.y=Et-Dt):kt>Et?(z.x=zt+he,z.y=Et-he,b.x=zt-Dt,b.y=Et+Dt):(z.x=zt+he,z.y=Et+he,b.x=zt-Dt,b.y=Et-Dt)),we.$(Jt,zt)&&we.$(Et,kt)&&(Et>yt?(se>zt?(z.x=zt-he,z.y=Et-he,b.x=zt+Dt):(z.x=zt+he,z.y=Et-he,b.x=zt-Dt),b.y=Et+Dt):(se>zt?(z.x=zt-he,z.y=Et+he,b.x=zt+Dt):(z.x=zt+he,z.y=Et+he,b.x=zt-Dt),b.y=Et-Dt)),(we.$(Jt,zt)&&we.$(zt,se)||we.$(yt,Et)&&we.$(Et,kt))&&(Jt=.5*(Jt+se),yt=.5*(yt+kt),z.x=Jt,z.y=yt,b.x=Jt,b.y=yt),(ft===1||ft===2&&we.$(tt.x,this.i(0).x)&&we.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),yc(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,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,pn)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),yc(rt,b.x-E,b.y-ot,lt-E,tt-ot,ut.x-E,ut.y-ot),Ut.free(y),Ut.free(x),Ut.free(z),Ut.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=_f(this,tt.copy(),!1,pn)),yc(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Ut.alloc(),z.assign(this.i(0)),b=Ut.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,lt=0;ft<y;){if(ft=cv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,pn)),Kf(this,rt,-E,-ot,z,ut,x);else if(lt===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Kf(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(lt=cv(this,ut,ft+1,ft<y-3),ft=-E,Jt=-ot,yt=ut,zt=this.i(lt),Dt=x,we.B(z.y,yt.y)&&we.B(yt.x,zt.x))if(kt=Math.min(tt,Math.abs(yt.x-b.x)/2),kt=he=Math.min(kt,Math.abs(zt.y-yt.y)/2),we.B(kt,0))Kf(this,rt,ft,Jt,z,yt,Dt),z.assign(yt);else{var ge=yt.x,ve=yt.y;Et=ge,se=ve,yt.x>z.x?ge=yt.x-kt:ge=yt.x+kt,zt.y>yt.y?se=yt.y+he:se=yt.y-he,zt=Ut.allocAt(ge,ve),Kf(this,rt,ft,Jt,z,zt,Dt),Ut.free(zt),m0(rt,yt.x+ft,yt.y+Jt,Et+ft,se+Jt),z.h(Et,se)}else we.B(z.x,yt.x)&&we.B(yt.y,zt.y)?(kt=Math.min(tt,Math.abs(yt.y-b.y)/2),kt=he=Math.min(kt,Math.abs(zt.x-yt.x)/2),we.B(he,0)?(Kf(this,rt,ft,Jt,z,yt,Dt),z.assign(yt)):(ge=yt.x,ve=yt.y,Et=ge,se=ve,yt.y>z.y?ve=yt.y-kt:ve=yt.y+kt,zt.x>yt.x?Et=yt.x+he:Et=yt.x-he,zt=Ut.allocAt(ge,ve),Kf(this,rt,ft,Jt,z,zt,Dt),Ut.free(zt),m0(rt,yt.x+ft,yt.y+Jt,Et+ft,se+Jt),z.h(Et,se))):(Kf(this,rt,ft,Jt,z,yt,Dt),z.assign(yt));b.assign(ut),ft=lt}Ut.free(z)}v0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=_f(this,rt,!1,z)),a.type=bn.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),we.$(a,0)?y:we.$(y,0)?a:Math.sqrt(a*a+y*y)))}function _f(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;we.$(y.x,z.x)&&we.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!we.$(y.x,z.x)&&!we.$(y.y,z.y))return x-1;for(var tt=z;we.$(y.x,z.x)&&we.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||we.$(y.y,z.y)&&we.$(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}Qn.prototype.computeJumpLength=function(){return 10};function Kf(a,y,x,E,b,z,tt){if(!tt&&tf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],lt=0;if(a.isVisible()&&(lt=Tw(a,b,z,ot)),0<lt){if(we.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<lt;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var yt=ft+x,Et=Math.min(ft+tt,z.x);ut<lt&&(ft=ot[ut],ft<Et+tt);)ut++,Et=Math.min(ft+rt,z.x);ft=z.y-tt+E,Et+=x;var kt=z.y+E;a.curve===Bc?Pg(y,Et,kt,!1):yc(y,yt,ft,Et,ft,Et,kt)}else for(--lt;0<=lt;){for(ut=Math.min(b.x,Math.max(ot[lt--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),yt=ut+x,ft=Math.max(ut-tt,z.x);0<=lt&&(ut=ot[lt],ut>ft-tt);)lt--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,Et=z.y+E,a.curve===Bc?Pg(y,ft,Et,!1):yc(y,yt,ut,ft,ut,ft,Et)}else if(we.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<lt;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),yt=ft+E,ft=Math.min(ft+tt,z.y);ut<lt&&(Et=ot[ut],Et<ft+tt);)ut++,ft=Math.min(Et+rt,z.y);Et=z.x-tt+x,kt=z.x+x,ft+=E,a.curve===Bc?Pg(y,kt,ft,!1):yc(y,Et,yt,Et,ft,kt,ft)}else for(--lt;0<=lt;){for(ut=Math.min(b.y,Math.max(ot[lt--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),yt=ut+E,ut=Math.max(ut-tt,z.y);0<=lt&&(ft=ot[lt],ft>ut-tt);)lt--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,Et=z.x+x,ut+=E,a.curve===Bc?Pg(y,Et,ut,!1):yc(y,ft,yt,ft,ut,Et,ut)}}}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 Qn){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&tf(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(ut,ft){return ut-ft}),E.length}function Nw(a,y,x,E){for(var b=we.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Ut.alloc(),ot=1;ot<z;ot++){var lt=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===lt.y&&lt.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var ft=a.y,yt=y.x,Et=y.y,kt=tt.x;tt=tt.y;var Dt=lt.x,Jt=lt.y;if(we.B(ut,yt)){if(!we.B(ft,Et)&&we.B(tt,Jt)&&Math.min(ft,Et)<tt&&Math.max(ft,Et)>tt&&Math.min(kt,Dt)<ut&&Math.max(kt,Dt)>ut&&!we.B(kt,Dt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(we.B(ft,Et)&&we.B(kt,Dt)&&Math.min(ut,yt)<kt&&Math.max(ut,yt)>kt&&Math.min(tt,Jt)<ft&&Math.max(tt,Jt)>ft&&!we.B(tt,Jt)){rt.x=kt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=lt}Ut.free(rt)}function tf(a){return a=a.curve,a===Lg||a===Bc}function L0(a,y){(y||tf(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()))}Qn.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 Qn&&(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 Qn&&r1(this,rt,a)}}}}};function r1(a,y,x){if(y!==null&&y.lk&&y.fd&&tf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Qn.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},Qn.prototype.isVisible=function(){if(!Di.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},Qn.prototype.Zb=function(a){if(Di.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)},Qn.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),jy(y,z),jy(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&&(on(y.links,a),y.Sl()))}Qn.prototype.ph=function(){return!0},Ke.Object.defineProperties(Qn.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&&S0(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&&x0(a,this,b),dp(this),this.C(1)),this.g("fromNode",y,a),Fg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Nl(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&Nl(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&&S0(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&&x0(a,this,b),dp(this),this.C(1)),this.g("toNode",y,a),Fg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Nl(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&Nl(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:ws},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&&Nl(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&&zn(a,">= 0",Qn,"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:ws},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&&Nl(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&&zn(a,">= 0",Qn,"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?Wi: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 mr?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()===Yl&&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),we.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);we.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 Ut)}},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);we.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):we.$(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 ne,E=0;E<a.length/2;E++)b=new Ut(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(!Ye(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new ne,E=0;E<a.length;E++)b=a[E],x.add(new Ut(b.x,b.y).freeze())}}else if(a instanceof ne)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else te("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&&ph(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||!Eg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Eg(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===Bc||y===Lg||a===Bc||a===Lg),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)}}}),Qn.prototype.invalidateOtherJumpOvers=Qn.prototype.Xo,Qn.prototype.findClosestSegment=Qn.prototype.ez,Qn.prototype.updateRoute=Qn.prototype.vg,Qn.prototype.invalidateRoute=Qn.prototype.bb,Qn.prototype.rollbackRoute=Qn.prototype.rv,Qn.prototype.commitRoute=Qn.prototype.zf,Qn.prototype.startRoute=Qn.prototype.uh,Qn.prototype.clearPoints=Qn.prototype.Fj,Qn.prototype.removePoint=Qn.prototype.pv,Qn.prototype.addPointAt=Qn.prototype.yf,Qn.prototype.addPoint=Qn.prototype.ne,Qn.prototype.insertPointAt=Qn.prototype.m,Qn.prototype.insertPoint=Qn.prototype.Kz,Qn.prototype.setPointAt=Qn.prototype.L,Qn.prototype.setPoint=Qn.prototype.dd,Qn.prototype.getPoint=Qn.prototype.i,Qn.prototype.getOtherPort=Qn.prototype.Cz,Qn.prototype.getOtherNode=Qn.prototype.To;var Gf=null,zf=null,dv=new hn(Qn,"Normal",1),Dw=new hn(Qn,"Orthogonal",2),Iw=new hn(Qn,"AvoidsNodes",6),o1=new hn(Qn,"AvoidsNodesStraight",7),Ya=new hn(Qn,"None",0),Yl=new hn(Qn,"Bezier",9),Bc=new hn(Qn,"JumpGap",10),Lg=new hn(Qn,"JumpOver",11),gp=new hn(Qn,"End",17),M0=new hn(Qn,"Scale",18),b0=new hn(Qn,"Stretch",19),pp=new hn(Qn,"OrientAlong",21),mp=new hn(Qn,"OrientPlus90",22),vp=new hn(Qn,"OrientMinus90",23),fv=new hn(Qn,"OrientOpposite",24),k0=new hn(Qn,"OrientUpright",25),yp=new hn(Qn,"OrientPlus90Upright",26),wp=new hn(Qn,"OrientMinus90Upright",27),T0=new hn(Qn,"OrientUpright45",28),s1=16,a1=14,xp=8;Qn.className="Link",Qn.Normal=dv,Qn.Orthogonal=Dw,Qn.AvoidsNodes=Iw,Qn.AvoidsNodesStraight=o1,Qn.None=Ya,Qn.Bezier=Yl,Qn.JumpGap=Bc,Qn.JumpOver=Lg,Qn.End=gp,Qn.Scale=M0,Qn.Stretch=b0,Qn.OrientAlong=pp,Qn.OrientPlus90=mp,Qn.OrientMinus90=vp,Qn.OrientOpposite=fv,Qn.OrientUpright=k0,Qn.OrientPlus90Upright=yp,Qn.OrientMinus90Upright=wp,Qn.OrientUpright45=T0,Qn.EndSegmentStep=8,Qn.CurvinessStart=s1,Qn.SpacingMin=a1,Qn.OrthoShortCut=xp;function N0(a,y,x,E){cn(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 Sp(a){cn(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}Sp.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 Mg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ih(a,y,x){return Mg(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)}Sp.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]===Cc)return!1}return!0};function rh(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var lt=y|0,ut=x|0,ft=a.ac[lt][ut];if(ft>=ef&&ft<bg)for(b?ut+=E:lt+=E,ft+=1;z<=lt&&lt<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[lt][ut]);)a.ac[lt][ut]=ft,ft+=1,b?ut+=E:lt+=E;if(lt=b?ut:lt,b)if(0<E)for(x+=E;x<lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(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=Cc,ut=ef;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,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=Cc,ut=bg;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,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(Mg(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var lt=E.x,ut=E.y;if(Mg(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-lt)&&1>=Math.abs(ot-ut))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,ut|=0;var Et=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===Cc?(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][ut]===Cc?(I0(a,lt,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,yt),I0(a,lt,ut,1,!(b===90||b===270),z,y,ft,yt),I0(a,lt,ut,-1,!(b===90||b===270),z,y,ft,yt)):I0(a,lt,ut,Et,x,lt,ut,lt,ut),x=An(),tt&&A1(a,lt,ut,b,rt,ot,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),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 rh(a,rt,ot,1,!1,z,y,ft,yt),rh(a,rt,ot,-1,!1,z,y,ft,yt),rh(a,rt,ot,1,!0,z,y,ft,yt),rh(a,rt,ot,-1,!0,z,y,ft,yt);Nn(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 ut=ot,ft=lt;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var yt=rt[ut][ft];if(yt===0||yt===pv)break;ot=ut,lt=ft}for(;;){if(ut=E,ft=ot,yt=lt,E===0?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][yt],ut!==E&&ft!==0&&ft!==pv){if(tt.push(ot),tt.push(lt),A1(a,ot,lt,ut,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++}}}Ke.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new He(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 Cc=0,ef=1,bg=999999,gv=bg+1,pv=bg+2;Sp.className="PositionArray";function jf(){cn(this),this.port=this.node=null,this.pe=[],this.ap=!1}jf.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}jf.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 ur?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(fr,Ut.alloc()),ot=a.port.ga(to,Ut.alloc());for(b=He.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Ut.free(rt),Ut.free(ot),rt=Ut.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 ut=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),ft=lt.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var yt=ut.part;if(yt!==null){var Et=yt.findVisibleNode();Et!==null&&Et!==yt&&(yt=Et,ut=yt.port),ut=lt.computeOtherPoint(yt,ut),yt=rt.ab(ut),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(ut),z++}}}}for(Ut.free(rt),a.pe.sort(jf.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=Ut.alloc(),ot=Ut.alloc(),tt=Ut.alloc(),lt=Ut.alloc(),ft.ga(fr,rt),ft.ga($r,ot),ft.ga(to,tt),ft.ga(ao,lt),Et=yt=ut=ft=0,E===sv)for(var kt=0;kt<z.length;kt++){var Dt=z[kt];if(Dt!==null){var Jt=Dt.link.computeThickness();switch(Dt.Nc){case 8:yt+=Jt;break;case 2:Et+=Jt;break;case 1:ft+=Jt;break;default:case 4:ut+=Jt}}}var zt=kt=0,se=1,he=Dt=0;for(Jt=0;Jt<z.length;Jt++){var ge=z[Jt];if(ge!==null){if(kt!==ge.Nc){switch(kt=ge.Nc,kt){case 8:var ve=tt;zt=lt;break;case 2:ve=lt,zt=rt;break;case 1:ve=rt,zt=ot;break;default:case 4:ve=ot,zt=tt}switch(Dt=zt.x-ve.x,he=zt.y-ve.y,kt){case 8:yt>Math.abs(Dt)?(se=Math.abs(Dt)/yt,yt=Math.abs(Dt)):se=1;break;case 2:Et>Math.abs(he)?(se=Math.abs(he)/Et,Et=Math.abs(he)):se=1;break;case 1:ft>Math.abs(Dt)?(se=Math.abs(Dt)/ft,ft=Math.abs(Dt)):se=1;break;default:case 4:ut>Math.abs(he)?(se=Math.abs(he)/ut,ut=Math.abs(he)):se=1}zt=0}var _e=ge.Zo;if(E===sv){switch(ge=ge.link.computeThickness(),ge*=se,_e.set(ve),kt){case 8:_e.x=ve.x+Dt/2+yt/2-zt-ge/2;break;case 2:_e.y=ve.y+he/2+Et/2-zt-ge/2;break;case 1:_e.x=ve.x+Dt/2-ft/2+zt+ge/2;break;default:case 4:_e.y=ve.y+he/2-ut/2+zt+ge/2}zt+=ge}else{var jn=.5;E===B0&&(jn=(ge.Uo+1)/(ge.Gl+1)),_e.x=ve.x+Dt*jn,_e.y=ve.y+he*jn}}}for(Ut.free(rt),Ut.free(ot),Ut.free(tt),Ut.free(lt),ve=a.pe,z=0;z<ve.length;z++)E=ve[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,He.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}jf.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},jf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ir,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)},jf.className="Knot";function mv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Ut,this.Gl=this.Uo=0,this.Zo=new Ut,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 Vo(a){cn(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Ut(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Vo.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},Vo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Vo.prototype.qb=function(){},Vo.prototype.toString=function(){var a=Vn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Vo.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())}}},Vo.prototype.createNetwork=function(){return new bo(this)},Vo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Re?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ur?y.lg(a.memberParts):y.lg(a.iterator),y},Vo.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")}},Vo.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()}},Vo.prototype.doLayout=function(a){var y=new Be;a instanceof Re?(ad(this,y,a.nodes,!0,this.rh,!0,!1,!0),ad(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ur?ad(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},Vo.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 ur&&(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++}},Vo.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 Qn)&&(Bp(rt),this.rh(rt))){var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof ur&&(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++}}},Vo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ur&&a.rh)};function ad(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 ur&&ot.layout===null?ad(a,y,ot.memberParts,!1,b,z,tt,rt):(Bp(ot),y.add(ot))):tt&&ot instanceof Qn?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()}Vo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new He),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Vo.prototype.ex=function(a){var y=new Be;return a instanceof Re?(ad(this,y,a.nodes,!0,null,!0,!0,!0),ad(this,y,a.links,!0,null,!0,!0,!0),ad(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ur?ad(this,y,a.memberParts,!1,null,!0,!0,!0):ad(this,y,a.iterator,!1,null,!0,!0,!0),y},Vo.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(fr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ke.Object.defineProperties(Vo.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())}}}),Vo.prototype.collectParts=Vo.prototype.ex,Vo.prototype.getLayoutBounds=Vo.prototype.ni,Vo.prototype.invalidateLayout=Vo.prototype.C,Vo.className="Layout";function bo(a){cn(this),this.Sc=a,this.wf=new Be,this.ye=new Be,this.Es=new Ue,this.zs=new Ue}bo.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 Be,this.ye=new Be,this.Es=new Ue,this.zs=new Ue},bo.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},bo.prototype.createVertex=function(){return new _s(this)},bo.prototype.createEdge=function(){return new Dl(this)},bo.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 Qn){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 ur&&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 Qn&&(!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))}}},bo.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},Tt=bo.prototype,Tt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Tt.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},Tt.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}Tt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Tt.ki=function(a){return a===null?null:this.Es.I(a)},Tt.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}}Tt.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},Tt.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))}Tt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Tt.Lo=function(a){return a===null?null:this.zs.I(a)},Tt.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},Tt.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))}},Tt.Ko=function(){for(var a=An(),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]);Nn(a)},bo.prototype.deleteArtificialVertexes=function(){for(var a=An(),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=An(),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]);Nn(a),Nn(y)};function Qw(a){for(var y=An(),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]);Nn(y)}bo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Qw(this),this.Ko()),a=new ne;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))}}bo.prototype.dz=function(){for(var a=new Be,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},Ke.Object.defineProperties(bo.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}}}),bo.prototype.findAllParts=bo.prototype.dz,bo.prototype.splitIntoSubNetworks=bo.prototype.Zx,bo.prototype.deleteSelfEdges=bo.prototype.Ko,bo.prototype.reverseEdge=bo.prototype.gm,bo.prototype.linkVertexes=bo.prototype.Zj,bo.prototype.findEdge=bo.prototype.Lo,bo.prototype.deleteLink=bo.prototype.Yy,bo.prototype.deleteEdge=bo.prototype.Mj,bo.prototype.addLink=bo.prototype.Dy,bo.prototype.addEdge=bo.prototype.Bo,bo.prototype.findVertex=bo.prototype.ki,bo.prototype.deleteNode=bo.prototype.Zy,bo.prototype.deleteVertex=bo.prototype.Iu,bo.prototype.addNode=bo.prototype.Bl,bo.prototype.addVertex=bo.prototype.dh,bo.prototype.addParts=bo.prototype.lg,bo.className="LayoutNetwork";function _s(a){cn(this),this.ob=a,this.j=new He(0,0,10,10).freeze(),this.o=new Ut(5,5).freeze(),this.Sh=this.ub=null,this.tg=new ne,this.mg=new ne}_s.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new ne,this.mg=new ne},_s.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Xn(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},_s.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ye(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 ur)){x=He.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(rr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),He.free(x);return}He.free(x)}a.moveTo(y.x,y.y)}},_s.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},_s.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},_s.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},_s.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function xv(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}Ke.Object.defineProperties(_s.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=He.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),He.free(x),!(a instanceof ur)&&(a=a.locationObject.ga(rr),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 Be,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Be,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Be,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 ne,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}}}),_s.prototype.deleteDestinationEdge=_s.prototype.Jl,_s.prototype.addDestinationEdge=_s.prototype.zl,_s.prototype.deleteSourceEdge=_s.prototype.Kl,_s.prototype.addSourceEdge=_s.prototype.Cl,_s.className="LayoutVertex",_s.standardComparer=xv,_s.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 Dl(a){cn(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Dl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Dl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Xn(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},Dl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Dl.prototype.commit=function(){},Dl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ke.Object.defineProperties(Dl.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)}}}),Dl.prototype.getOtherVertex=Dl.prototype.Ax,Dl.className="LayoutEdge";function sa(a){Vo.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)}Je(sa,Vo),sa.prototype.cloneProtected=function(a){Vo.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},sa.prototype.qb=function(a){a.classType===sa?a===Pp||a===H0||a===Sv||a===O0?this.sorting=a:a===Q0||a===eA?this.arrangement=a:a===Cp||a===U0?this.alignment=a:te("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},sa.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 ur)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=He.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var yt=this.ni(b[ft],lt);ut=Math.max(ut,yt.width)}if(ut=Math.max(ut+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 kt=Et=this.arrangementOrigin.x,Dt=this.arrangementOrigin.y,Jt=0,zt=0,se=0;se<b.length;se++){var he=b[se],ge=this.ni(he,lt),ve=Math.ceil((ge.width+rt)/ut)*ut,_e=Math.ceil((ge.height+ot)/ft)*ft;switch(yt){case eA:var jn=Math.abs(kt-ge.width);break;default:jn=kt+ge.width}switch((0<z&&Jt>z-1||0<tt&&0<Jt&&jn-Et>tt)&&(E.push(new He(0,Dt,tt+rt,zt)),Jt=0,kt=Et,Dt+=zt,zt=0),zt=Math.max(zt,_e),yt){case eA:ge=-ge.width;break;default:ge=0}switch(he.moveTo(kt+ge,Dt),yt){case eA:kt-=ve;break;default:kt+=ve}Jt++}E.push(new He(0,Dt,tt+rt,zt)),He.free(lt);break;case Cp:for(ot=tt,ut=z,ft=y,yt=x,tt=He.alloc(),Et=Math.max(this.cellSize.width,1),z=Dt=lt=0,rt=Ut.alloc(),kt=0;kt<b.length;kt++)zt=b[kt],Jt=this.ni(zt,tt),zt=wc(zt,zt.locationObject,zt.locationSpot,rt),lt=Math.max(lt,zt.x),Dt=Math.max(Dt,Jt.width-zt.x),z=Math.max(z,zt.y);switch(kt=this.arrangement,kt){case eA:lt+=ft;break;default:Dt+=ft}Et=isFinite(Et)?Math.max(Et+ft,1):Math.max(lt+Dt,1);var pi=zt=this.arrangementOrigin.x;for(se=this.arrangementOrigin.y,Dt=0,ot>=lt&&(ot-=lt),lt=he=0,ve=Math.max(this.cellSize.height,1),ge=z=0,_e=!0,Jt=Ut.alloc(),jn=0;jn<b.length;jn++){var hi=b[jn],In=this.ni(hi,tt),vn=wc(hi,hi.locationObject,hi.locationSpot,rt);if(0<Dt)switch(kt){case eA:pi=(pi-zt-(In.width-vn.x))/Et,pi=we.$(Math.round(pi),pi)?Math.round(pi):Math.floor(pi),pi=pi*Et+zt;break;default:pi=(pi-zt+vn.x)/Et,pi=we.$(Math.round(pi),pi)?Math.round(pi):Math.ceil(pi),pi=pi*Et+zt}else switch(kt){case eA:he=pi+vn.x+In.width;break;default:he=pi-vn.x}switch(kt){case eA:var lr=-(pi+vn.x)+he;break;default:lr=pi+In.width-vn.x-he}if(0<ut&&Dt>ut-1||0<ot&&0<Dt&&lr>ot){for(E.push(new He(0,_e?se-z:se,ot+ft,ge+z+yt)),pi=0;pi<Dt&&jn!==Dt;pi++){lr=b[jn-Dt+pi];var qi=wc(lr,lr.locationObject,lr.locationSpot,Jt);lr.moveTo(lr.position.x,lr.position.y+z-qi.y)}ge+=yt,se=_e?se+ge:se+(ge+z),Dt=ge=z=0,pi=zt,_e=!1}switch(pi===zt&&(lt=kt===eA?Math.max(lt,In.width-vn.x):Math.min(lt,-vn.x)),z=Math.max(z,vn.y),ge=Math.max(ge,In.height-vn.y),isFinite(ve)&&(ge=Math.max(ge,Math.max(In.height,ve)-vn.y)),_e?hi.moveTo(pi-vn.x,se-vn.y):hi.moveTo(pi-vn.x,se),kt){case eA:pi-=vn.x+ft;break;default:pi+=In.width-vn.x+ft}Dt++}if(E.push(new He(0,se,ot+ft,(_e?ge:ge+z)+yt)),b.length!==Dt)for(ot=0;ot<Dt;ot++)ut=b[b.length-Dt+ot],ft=wc(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Ut.free(rt),Ut.free(Jt),kt===eA)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);He.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===eA?this.commitLayers(E,new Ut(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Ut(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},sa.prototype.commitLayers=function(){};function d1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ke.Object.defineProperties(sa.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!==eA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&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 hn(sa,"Position",0),Cp=new hn(sa,"Location",1),Q0=new hn(sa,"LeftToRight",2),eA=new hn(sa,"RightToLeft",3),Sv=new hn(sa,"Forward",4),O0=new hn(sa,"Reverse",5),Pp=new hn(sa,"Ascending",6),H0=new hn(sa,"Descending",7);sa.className="GridLayout",sa.standardComparer=d1,sa.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},sa.Position=U0,sa.Location=Cp,sa.LeftToRight=Q0,sa.RightToLeft=eA,sa.Forward=Sv,sa.Reverse=O0,sa.Ascending=Pp,sa.Descending=H0;function po(){this.On=new Be,this.Dn=new Be,this.Pa=new Be,this.cf=new Ue,this.bf=new Ue,this.aj=new Ue,this.H=null,this.tp=!1}Tt=po.prototype,Tt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Tt.Xe=function(a){this.H=a},Tt.oi=function(a){if(a instanceof Jn){if(this.On.add(a),a instanceof ur){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 Qn?this.Dn.add(a):a instanceof Jr||this.Pa.add(a);y=a.data,y===null||a instanceof Jr||(a instanceof Qn?this.bf.add(y,a):this.cf.add(y,a))},Tt.pc=function(a){if(a.Ej(),a instanceof Jn){if(this.On.remove(a),a instanceof ur){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 Qn?this.Dn.remove(a):a instanceof Jr||this.Pa.remove(a);y=a.data,y===null||a instanceof Jr||(a instanceof Qn?this.bf.remove(y):this.cf.remove(y))},Tt.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 ur)&&te('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 ur||te('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 Qn||te('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=An(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=An(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=An(),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]);Nn(y),Nn(x),Nn(a)}},po.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},po.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&&td(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&&(gu(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)}}po.prototype.insertLink=function(){return null},po.prototype.resolveReferencesForData=function(){},po.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,ni('No Group template found for category "'+x+'"'),ni(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,ni('No Node template found for category "'+x+'"'),ni(" Using default node template")),y=a.ny))),y}po.prototype.getLinkCategoryForData=function(){return""},po.prototype.setLinkCategoryForData=function(){},po.prototype.setFromNodeForLink=function(){},po.prototype.setToNodeForLink=function(){},po.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,ni('No Link template found for category "'+a+'"'),ni(" Using default link template")),x=y.my)),x},po.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},po.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},po.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Pf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},po.prototype.unresolveReferencesForPart=function(){},po.prototype.removeDataForLink=function(){},po.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},po.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)},po.prototype.findLinkForKey=function(){return null},Tt=po.prototype,Tt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Tt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Jn?a:null)},Tt.Kc=function(a){return a===null?null:this.bf.I(a)},Tt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Be;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(Ye(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},Tt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Be;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(Ye(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(Kn(z)){if(!Kn(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(Ye(y)&&Ye(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}po.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===Io){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===as){var tt=a.newValue;E==="nodeDataArray"&&Ye(tt)&&f1(this,tt),y.isModified=!0}else if(x===ds){var rt=a.oldValue;E==="nodeDataArray"&&Ye(rt)&&this.ip(rt),y.isModified=!0}else x===ea&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Io){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===as||x===ds){var ut=a.change===as,ft=ut?a.newParam:a.oldParam,yt=ut?a.newValue:a.oldValue,Et=this.aj.I(a.object);if(Array.isArray(Et))for(a=0;a<Et.length;a++){var kt=Et[a];if(ut)r0(kt,yt,ft,!0);else if(!(0>ft)){var Dt=ft+sp(kt);kt.pc(Dt,!0),Qm(kt,Dt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},po.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)},po.prototype.rp=function(){for(var a=this.H.model,y=new Be,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()},po.prototype.refreshDataBoundLinks=function(){},po.prototype.updateRelationshipsFromData=function(){},po.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=An()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Nn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(Kn(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){Iu(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Hd(x,tt[ot])});var E=y.Hh;if(Kn(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}}}}po.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Ue;if(Kn(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 Be;for(var z=new Ue,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Qn)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 ut=new Ue;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,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 Di))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 ur&&z instanceof ur)for(y=y.memberParts;y.next();)tt=R0(a,y.value,x,E,b),tt instanceof Qn||tt===null||(tt.containingGroup=z)}else if(y instanceof Qn&&z instanceof Qn)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}po.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Qn||(E=b.copyNodeData(E),Ye(E)&&(b.xf(E),x=y.Lc(E)))}else gu(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 Qn||(b=y.copyNodeData(E)),Ye(b)&&(x.data=b)));return x},Ke.Object.defineProperties(po.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}}}),po.prototype.updateAllRelationshipsFromData=po.prototype.rp,po.prototype.findLinksByExample=po.prototype.ls,po.prototype.findNodesByExample=po.prototype.ms,po.prototype.findLinkForData=po.prototype.Kc,po.prototype.findNodeForData=po.prototype.ii,po.prototype.findPartForData=po.prototype.Lc,po.prototype.findNodeForKey=po.prototype.Vb,po.prototype.removeModeledPart=po.prototype.ip,po.prototype.removeModeledParts=po.prototype.Gs,po.prototype.rebuildParts=po.prototype.Wd;var m1=!1,v1=!1,y1=!1;po.className="PartManager";function Ys(a){po.apply(this,arguments)}Je(Ys,po),Ys.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},Ys.prototype.addModeledParts=function(a){for(po.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Fg(a.value);td(this.diagram,!1)};function w1(a,y){y.forEach(function(x){x1(a,x)}),td(a.diagram,!1)}function x1(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){gu(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=z0(x,y,!0);z!==""&&(b.fromPortId=z),z=Xl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Jn&&(b.fromNode=z)),z=z0(x,y,!1),z!==""&&(b.toPortId=z),z=Xl(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}}}}Ys.prototype.removeAllModeledParts=function(){var a=this.diagram.model;S1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function S1(a,y){y.forEach(function(x){a.ip(x)})}Ys.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ys.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ys.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ys.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ys.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ys.prototype.findPartForKey=function(a){var y=po.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ys.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ys.prototype.doModelChanged=function(a){var y=this;if(po.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===Io){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 ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}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 kt=a.newValue;if(kt!==void 0){var Dt=this.Vb(kt);Dt instanceof ur?Et.containingGroup=Dt:Et.containingGroup=null}else Et.containingGroup=null}}else if(b==="linkLabelKeys"){var Jt=this.Kc(a.object);if(Jt!==null){var zt=a.oldValue,se=a.newValue;Array.isArray(zt)&&zt.forEach(function(vn){0<=se.indexOf(vn)||(vn=y.Vb(vn),vn!==null&&(vn.labeledLink=null))}),Array.isArray(se)&&se.forEach(function(vn){vn=y.Vb(vn),vn!==null&&(vn.labeledLink=Jt)})}}else if(b==="linkCategory"){var he=this.Kc(a.object),ge=a.newValue;he!==null&&typeof ge=="string"&&(he.category=ge)}else b==="linkDataArray"&&(S1(this,a.oldValue),w1(this,a.newValue));x.isModified=!0}else if(E===as){var ve=a.newValue;if(b==="linkDataArray"&&typeof ve=="object"&&ve!==null)x1(this,ve);else if(b==="linkLabelKeys"&&ud(ve)){var _e=this.Kc(a.object),jn=this.Vb(ve);_e!==null&&jn!==null&&(jn.labeledLink=_e)}x.isModified=!0}else if(E===ds){var pi=a.oldValue;if(b==="linkDataArray"&&typeof pi=="object"&&pi!==null)this.ip(pi);else if(b==="linkLabelKeys"&&ud(pi)){var hi=this.Vb(pi);hi!==null&&(hi.labeledLink=null)}x.isModified=!0}}else if(E===Io){var In=a.propertyName;a.object!==x.model||In!=="linkFromKeyProperty"&&In!=="linkToKeyProperty"&&In!=="linkFromPortIdProperty"&&In!=="linkToPortIdProperty"&&In!=="linkLabelKeysProperty"&&In!=="nodeIsGroupProperty"&&In!=="nodeGroupKeyProperty"&&In!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ys.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Be,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)})},Ys.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 Qn){var b=Xl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=Xl(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 Be().addAll(y);var tt=new Be;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 Jr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof ur)&&(a.containingGroup=y)}}},Ys.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 ur&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Jn&&(Xl(y,tt,!0)===x&&(z.link.fromNode=b),Xl(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}}iA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ur&&(b.containingGroup=a))}},Ys.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();)nA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&nA(y,x,E.data)),a instanceof ur)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&nA(y,x,E)}}},Ys.prototype.copyPartData=function(a,y){var x=po.prototype.copyPartData.call(this,a,y);if(a instanceof Qn)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},Ys.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 Qn){if(gu(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&&(gu(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&&Tg(z,E,z.wa(a.data),!0),Ng(z,E,rt,!0),x!==null&&Tg(z,E,z.wa(x.data),!1),Ng(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},Ys.prototype.findLinkForKey=Ys.prototype.findLinkForKey,Ys.prototype.findPartForKey=Ys.prototype.findPartForKey,Ys.prototype.removeAllModeledParts=Ys.prototype.removeAllModeledParts,Ys.prototype.addModeledParts=Ys.prototype.addModeledParts,Ys.prototype.addAllModeledParts=Ys.prototype.addAllModeledParts,Ys.className="GraphLinksPartManager";function ru(){po.apply(this,arguments),this.Sg=null}Je(ru,po);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||!Ea(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(gu(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}}}ru.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},ru.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},ru.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}},ru.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))},ru.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},ru.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},ru.prototype.doModelChanged=function(a){if(po.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===Io){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 ut=ot.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===Io){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},ru.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&&Pf(x,E,!1)))}}},ru.prototype.updateDataBindings=function(a,y){po.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},ru.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))}iA(y,x)}a=y.mh(a),a!==void 0&&b instanceof Jn&&(a=this.Vb(a),_0(this,a,b))}},ru.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(ds,"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)&&nA(y,x,b)}},ru.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},ru.prototype.findLinkForKey=ru.prototype.findLinkForKey,ru.className="TreePartManager";function Pi(a,y){this.kl=new Be,this.il=new Be,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,cn(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ue,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 Ue,this.Lt=new ne,this.Wg=!1,this.o=null,this.undoManager=new zo,a!==void 0&&(Kn(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)+":"+Yi(b)}}return y},Pi.prototype.xA=function(a){a.change!==ea&&te("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ms?(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 Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===as?b.add(ft.newValue):ft.change===ds&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Io||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 ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),ot.clear(),ut},Pi.prototype.cloneDeep=function(a){return kg(this,a,!0)};function kg(a,y,x,E,b,z){function tt(ft,yt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,yt)):(ft=ki++,E.set(ft,yt),b.set(ft,y))}if(!Ye(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new Ue),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new Ue),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 ut=0;ut<y.length;ut++)ot.push(kg(a,y[ut],!1,E,b,z))}else if(y instanceof Ut||y instanceof ln||y instanceof He||y instanceof ar||y instanceof di)ot=y.copy(),tt(y,ot);else{if(y instanceof Ao||y instanceof bn||y instanceof hn)return y;if(y instanceof ne)ot=new ne().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Be)ot=new Be().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Ue)ot=new Ue().addAll(kg(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(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=kg(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Tt=Pi.prototype,Tt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Tt.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},Tt.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,Ye(y)&&(a.dm(y),a.modelData=y)}Tt.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": `+ld(this,this.nodeDataArray,!0)},Tt.kv=function(a){B1(this,a),a=a.nodeDataArray,Kn(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 Be,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Ue,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Io?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===as||z===ds)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new Be,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(Ye(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}Tt.Pv=function(a,y){var x=this,E=!1,b=new Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ds&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==Io||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof Pi||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+Fv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.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)&&te("applyIncrementalJson cannot change Model properties"),B1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Ue;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)},Tt.$x=function(a,y){a.change!==ea&&te("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ms?(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 }'},Tt.yA=function(a,y){return this.$x(a,y)},Tt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Tt.toJSON=function(a){return this.np(a)},Tt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Hn.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:te("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&te("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Tt.Ky=function(a){return this.Zw(a)},Pi.constructGraphLinksModel=function(){return new Pi},Tt=Pi.prototype,Tt.dm=function(a){if(Kn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ye(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:te("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ye(a)){for(y in a)if(x=a[y],Ye(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 ne,E=0;E<x.length/2;E++)b.add(new Ut(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},Tt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):Kn(a)?ld(this,a):Ye(a)?Fv(this,a):typeof a=="function"?"null":a.toString()};function ld(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Si;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 Xa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Fv(a,y){var x=y;if(x instanceof Ut)y={class:"go.Point",x:Xa(x.x),y:Xa(x.y)};else if(x instanceof ln)y={class:"go.Size",width:Xa(x.width),height:Xa(x.height)};else if(x instanceof He)y={class:"go.Rect",x:Xa(x.x),y:Xa(x.y),width:Xa(x.width),height:Xa(x.height)};else if(x instanceof ar)y={class:"go.Margin",top:Xa(x.top),right:Xa(x.right),bottom:Xa(x.bottom),left:Xa(x.left)};else if(x instanceof di)x.sb()?y={class:"go.Spot",x:Xa(x.x),y:Xa(x.y),offsetX:Xa(x.offsetX),offsetY:Xa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ao){if(y={class:"go.Brush",type:x.type.name},x.type===Hr?y.color=x.color:(x.type===hr||x.type===Cr)&&(y.start=x.start,y.end=x.end,x.type===Cr&&(x.startRadius!==0&&(y.startRadius=Xa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Xa(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 bn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Xa(x.startX)),x.startY!==0&&(y.startY=Xa(x.startY)),x.endX!==0&&(y.endX=Xa(x.endX)),x.endY!==0&&(y.endY=Xa(x.endY)),x.spot1.D(fr)||(y.spot1=x.spot1),x.spot2.D(to)||(y.spot2=x.spot2),x.type===bn.o&&(y.path=bn.ia(x))):x instanceof hn&&(y={class:"go.EnumValue",classType:Ep(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=ys(y,b);if(!F1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof ne){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 Ja(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 Ut(Ja(a.x),Ja(a.y));else if(y==="Size")x=new ln(Ja(a.width),Ja(a.height));else if(y==="Rect")x=new He(Ja(a.x),Ja(a.y),Ja(a.width),Ja(a.height));else if(y==="Margin")x=new ar(Ja(a.top),Ja(a.right),Ja(a.bottom),Ja(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Qo(a.enum):x=new di(Ja(a.x),Ja(a.y),Ja(a.offsetX),Ja(a.offsetY));else if(y==="Brush"){if(x=new Ao,x.type=Wn(Ao,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof di&&(x.start=a.start),a.end instanceof di&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ja(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ja(a.endRadius)),a=a.colorStops,Ye(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=bn.parse(a.path):x=new bn,x.type=Wn(bn,a.type),typeof a.startX=="number"&&(x.startX=Ja(a.startX)),typeof a.startY=="number"&&(x.startY=Ja(a.startY)),typeof a.endX=="number"&&(x.endX=Ja(a.endX)),typeof a.endY=="number"&&(x.endY=Ja(a.endY)),a.spot1 instanceof di&&(x.spot1=a.spot1),a.spot2 instanceof di&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=Wn(E,a.name)));return x}Tt.Pe=function(a){return this.Lt.add(a),this},Tt.ik=function(a){this.Lt.remove(a)},Tt.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)},Tt.cb=function(a,y,x,E,b,z,tt){Ns(this,"",a,y,x,E,b,z,tt)},Tt.g=function(a,y,x,E,b){Ns(this,"",Io,a,this,y,x,E,b)},Tt.Fs=function(a,y,x,E,b,z){Ns(this,"",Io,y,a,x,E,b,z)};function Ns(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var lt=new Oo;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===Io){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)),Ko(x,E,b)}else a.change===as?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ye(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&on(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&We(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Kn(E)&&a.propertyName&&(E=ys(a.object,a.propertyName)),Kn(E)&&typeof x=="number"&&(a=a.newValue,y?on(E,x):We(E,x,a))):te("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ye(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&We(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&on(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Kn(E)&&a.propertyName&&(E=ys(a.object,a.propertyName)),Kn(E)&&typeof x=="number"&&(a=a.oldValue,y?We(E,x,a):on(E,x))):te("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ea&&te("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}},Tt=Pi.prototype,Tt.La=function(a,y){y===void 0&&(y=""),Ns(this,"SourceChanged",ea,y,a,null,null)},Tt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ys(a,y),y!==void 0)){if(ud(y))return y;te("Key value for node data "+a+" is not a number or a string: "+y)}}},Tt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=ys(a,x);E!==y&&this.hc(y)===null&&(Ko(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Ns(this,"nodeKey",Io,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Ko(a,x,y)}};function ud(a){return typeof a=="number"||typeof a=="string"}Tt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Tt.hc=function(a){return a===null&&te("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},Tt.$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))){Ko(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Ko(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ko(a,y,x)}}}}},Tt.xf=function(a){a!==null&&(Yn(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&&te("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,We(a.Tc,E,y)),Ns(a,"nodeDataArray",as,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Tt.Fy=function(a){if(Kn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Tt.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;on(a.Tc,E)}Ns(a,"nodeDataArray",ds,"nodeDataArray",a,y,null,E,null),a.qp(y)}Tt.nA=function(a){if(Kn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Tt.$z=function(a){if(a!==this.nodeDataArray&&Kn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var 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()}},Tt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof Be&&this.Vf.add(y,a))},Tt.Lv=function(){},Tt.fm=function(){},Tt.em=function(){},Tt.qp=function(){};function nA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Be,a.Vf.add(y,E)),E.add(x)}}function iA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Be&&(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 Be?a:null)}Tt.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),Ye(a)&&cn(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 cn(E),E}if(x&&Ye(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=ys(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 zo||z instanceof Ms||z instanceof Oo||(z=G0(a,z,!1)),Ko(x,E,z)}return cn(x),x}return y instanceof Ut||y instanceof ln||y instanceof He||y instanceof di||y instanceof ar?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 ye&&(M1=!0,ni('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ni(" Is that really your intent?"));var E=ys(a,y);E!==x&&(Ko(a,y,x),this.Fs(a,y,E,x))},Tt=Pi.prototype,Tt.set=function(a,y,x){this.setDataProperty(a,y,x)},Tt.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])}},Tt.Ay=function(a,y){this.ts(a,-1,y)},Tt.ts=function(a,y,x){0>y&&(y=a.length),We(a,y,x),Ns(this,"",as,"",a,null,x,null,y)},Tt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&te("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];on(a,y),Ns(this,"",ds,"",a,x,null,y,null)},Tt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ys(a,y),y===void 0))return"";if(typeof y=="string")return y;te("getCategoryForNodeData found a non-string category for "+a+": "+y)},Tt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=ys(a,x);E===void 0&&(E=""),E!==y&&(Ko(a,x,y),Ns(this,"nodeCategory",Io,x,a,E,y))}else Ko(a,x,y)}},Tt.lm=function(a,y){this.jm(y,this.Ro(a))},Tt.Tl=function(){return!1},Tt.Wj=function(){return!1},Tt.ri=function(){return!1},Tt.xs=function(){return!1},Tt.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 Ou[a]?Ou[a]:Hn.go!==void 0&&Hn.go[a]?Hn.go[a]:null}function ys(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 Ko(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){}}Ke.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===""&&te("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&te("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];Ye(b)||te("Model.nodeDataArray must only contain Objects, not: "+b),Yn(b)}for(this.Tc=a,E=new ne,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(Ns(this,"nodeDataArray",Io,"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,Ou={};Pi.className="Model",Pi.fromJSON=Pi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Hn.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:te("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=Hn[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Pi?y=a:te("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=ys,Pi.safePropertySet=Ko,Ou.Brush=Ao,Ou.ChangedEvent=Oo,Ou.Geometry=bn,Ou.Margin=ar,Ou.Panel=Sn,Ou.Point=Ut,Ou.Rect=He,Ou.Size=ln,Ou.Spot=di,Ou.Transaction=Ms,Ou.UndoManager=zo;function Ps(a,y,x,E){cn(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=k1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new Be}Ps.prototype.copy=function(){var a=new Ps;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},Tt=Ps.prototype,Tt.qb=function(a){a.classType===Ps&&(this.mode=a)},Tt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Tt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Tt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function b1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Tt.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==="")ni("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=ys(y,E)),z!==void 0)if(b===null)x!==""&&Ko(a,x,z);else try{if(x!==""){var tt=b(z,a);Ko(a,x,tt)}else b(z,a)}catch(rt){}}}},Tt.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=ys(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):Ko(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var lt=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,lt),ot.ts(ut,lt,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):Ko(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,kt=E.panel.itemArray;ot.ov(kt,Et),ot.ts(kt,Et,yt)}}}catch(Dt){}}finally{this.st.remove(a)}}}},Ke.Object.defineProperties(Ps.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&ke(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&ke(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&ke(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&ke(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&ke(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&ke(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&ke(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&ke(this),this.el=a}}}),Ps.prototype.updateSource=Ps.prototype.sp,Ps.prototype.updateTarget=Ps.prototype.Mv,Ps.prototype.ofModel=Ps.prototype.dA,Ps.prototype.ofObject=Ps.prototype.cp,Ps.prototype.makeTwoWay=Ps.prototype.Kx;var Hw="Binding",k1=new hn(Ps,"OneWay",1),Lp=new hn(Ps,"TwoWay",2);Ps.className="Binding",Ps.parseEnum=function(a,y){return function(x){return x=Wn(a,x),x===null?y:x}},Ps.toString=Yi,Ps.OneWay=k1,Ps.TwoWay=Lp;function Gr(a,y,x){Pi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Be,this.wb=new Ue,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(Kn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Je(Gr,Pi),Gr.constructGraphLinksModel=Pi.constructGraphLinksModel,Gr.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},Tt=Gr.prototype,Tt.clear=function(){Pi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Tt.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)+":"+Yi(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+Xl(this,b,!0)+"-->"+Xl(this,b,!1)}return y},Tt.Qv=function(a,y){this.linkKeyProperty===""&&te("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 Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ds&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Pi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),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},Tt.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},Tt.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)},Tt.Rv=function(){var a=Pi.prototype.Rv.call(this),y=`,
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},Tt.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 Be,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}Tt.Pv=function(a,y){this.linkKeyProperty===""&&te("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 Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ds&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Pi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.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)&&te("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)},Gr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Io){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),Ko(x,E,b);return}}else if(a.change===as){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ye(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===ds){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ye(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)}},Tt=Gr.prototype,Tt.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),Ko(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Tt.yx=function(a){return Xl(this,a,!0)},Tt.wv=function(a,y){Tg(this,a,y,!0)},Tt.Bx=function(a){return Xl(this,a,!1)},Tt.Bv=function(a,y){Tg(this,a,y,!1)};function Xl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ys(y,a),a!==void 0))){if(ud(a))return a;te((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Tg(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=ys(y,b);z!==x&&(iA(a,z,y),Ko(y,b,x),a.hc(x)===null&&nA(a,x,y),Ns(a,E?"linkFromKey":"linkToKey",Io,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ko(y,b,x)}}Tt.zx=function(a){return z0(this,a,!0)},Tt.xv=function(a,y){Ng(this,a,y,!0)},Tt.Cx=function(a){return z0(this,a,!1)},Tt.Cv=function(a,y){Ng(this,a,y,!1)};function z0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ys(y,a),y===void 0?"":y)}function Ng(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=ys(y,b);z===void 0&&(z=""),z!==x&&(Ko(y,b,x),Ns(a,E?"linkFromPortId":"linkToPortId",Io,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ko(y,b,x)}}Tt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=ys(a,y),a===void 0?j0:a)},Tt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=ys(a,x);if(E===void 0&&(E=j0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)iA(this,E[z],a);for(Ko(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&nA(this,tt,a)}Ns(this,"linkLabelKeys",Io,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Ko(a,x,y)}},Tt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ys(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&&nA(this,y,a),Ns(this,"linkLabelKeys",as,x,a,null,y,null,b)))}else te(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Tt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=ys(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(iA(this,y,a),Ns(this,"linkLabelKeys",ds,x,a,y,null,b,null)))}else E!==void 0&&te(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Tt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ys(a,y),y!==void 0)){if(ud(y))return y;te("Key value for link data "+a+" is not a number or a string: "+y)}}},Tt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=ys(a,x);E!==y&&this.jh(y)===null&&(Ko(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Ns(this,"linkKey",Io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ko(a,x,y)}},Tt.jh=function(a){return a===null&&te("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},Tt.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))){Ko(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Ko(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ko(a,y,x)}}}}},Tt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Tt.fi=function(a){a!==null&&(Yn(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&&te("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)),Ns(a,"linkDataArray",as,"linkDataArray",a,null,y,null,E),Mv(a,y)}Tt.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)},Tt.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(Ns(a,"linkDataArray",ds,"linkDataArray",a,y,null,E,null),x=Xl(a,y,!0),iA(a,x,y),x=Xl(a,y,!1),iA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],iA(a,x,y)}Tt.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)},Tt.Zz=function(a){if(this.linkKeyProperty===""&&te("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Kn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var 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=Xl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&nA(a,x,y),x=Xl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&nA(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&&nA(a,x,y)}Tt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):G0(this,a,!0),Ye(a)&&(cn(a),this.lf!==""&&Ko(a,this.lf,void 0),this.mf!==""&&Ko(a,this.mf,void 0),this.je!==""&&Ko(a,this.je,[])),a},Tt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ys(a,y)},Tt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ys(a,y),y!==void 0)){if(ud(y))return y;te("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Tt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=ys(a,x);E!==y&&(iA(this,E,a),Ko(a,x,y),this.hc(y)===null&&nA(this,y,a),Ns(this,"nodeGroupKey",Io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ko(a,x,y)}},Gr.prototype.copyNodeData=function(a){return a===null?null:(a=Pi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ys(a,this.Je)===void 0||Ko(a,this.Je,void 0),a)},Gr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Tg(this,a,x,!0);return}if(y===this.linkToKeyProperty){Tg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Ng(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Ng(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=ys(a,y);E!==x&&(Ko(a,y,x),this.Fs(a,y,E,x))},Tt=Gr.prototype,Tt.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&&ys(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Tt.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(Xl(this,E,!0)===b){var tt=this.lf;Ko(E,tt,z),Ns(this,"linkFromKey",Io,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(Xl(this,E,!1)===b&&(tt=this.mf,Ko(E,tt,z),Ns(this,"linkToKey",Io,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,Ns(this,"linkLabelKeys",as,ot,E,b,z,lt,lt))}},Tt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Ko(a,E,x),Ns(this,"nodeGroupKey",Io,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.Lv=function(){Pi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},Tt.fm=function(a){Pi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=An();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Ns(this,"nodeGroupKey",Io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(Xl(this,E,!0)===a&&(b=this.lf,Ns(this,"linkFromKey",Io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),Xl(this,E,!1)===a&&(b=this.mf,Ns(this,"linkToKey",Io,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&&(Ns(this,"linkLabelKeys",as,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)iA(this,a,x[y]);Nn(x)}},Tt.em=function(a){Pi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&nA(this,y,a)},Tt.qp=function(a){Pi.prototype.qp.call(this,a);var y=this.lh(a);iA(this,y,a)},Tt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ys(a,y),y===void 0))return"";if(typeof y=="string")return y;te("getCategoryForLinkData found a non-string category for "+a+": "+y)},Gr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Gr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=ys(a,x);E===void 0&&(E=""),E!==y&&(Ko(a,x,y),Ns(this,"linkCategory",Io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ko(a,x,y)}},Gr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Tt=Gr.prototype,Tt.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))}Tt.Wj=function(){return!0},Tt.ri=function(){return!0},Tt.xs=function(){return!0},Tt.Xj=function(){return!0},Ke.Object.defineProperties(Gr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];Ye(b)||te("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Yn(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new ne,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 Be,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Ns(this,"linkDataArray",Io,"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"}}}),Gr.prototype.setCategoryForLinkData=Gr.prototype.lp,Gr.prototype.getCategoryForLinkData=Gr.prototype.ps,Gr.prototype.assignAllDataProperties=Gr.prototype.Do,Gr.prototype.setGroupKeyForNodeData=Gr.prototype.mp,Gr.prototype.getGroupKeyForNodeData=Gr.prototype.lh,Gr.prototype.isGroupForNodeData=Gr.prototype.Yu,Gr.prototype.copyLinkData=Gr.prototype.Jo,Gr.prototype.mergeLinkDataArray=Gr.prototype.Zz,Gr.prototype.removeLinkDataCollection=Gr.prototype.lA,Gr.prototype.removeLinkData=Gr.prototype.bm,Gr.prototype.addLinkDataCollection=Gr.prototype.Ey,Gr.prototype.addLinkData=Gr.prototype.fi,Gr.prototype.containsLinkData=Gr.prototype.Jc,Gr.prototype.makeLinkDataKeyUnique=Gr.prototype.Bs,Gr.prototype.findLinkDataForKey=Gr.prototype.jh,Gr.prototype.setKeyForLinkData=Gr.prototype.Ks,Gr.prototype.getKeyForLinkData=Gr.prototype.Ac,Gr.prototype.removeLabelKeyForLinkData=Gr.prototype.Qx,Gr.prototype.addLabelKeyForLinkData=Gr.prototype.Bu,Gr.prototype.setLabelKeysForLinkData=Gr.prototype.Ls,Gr.prototype.getLabelKeysForLinkData=Gr.prototype.Ef,Gr.prototype.setToPortIdForLinkData=Gr.prototype.Cv,Gr.prototype.getToPortIdForLinkData=Gr.prototype.Cx,Gr.prototype.setFromPortIdForLinkData=Gr.prototype.xv,Gr.prototype.getFromPortIdForLinkData=Gr.prototype.zx,Gr.prototype.setToKeyForLinkData=Gr.prototype.Bv,Gr.prototype.getToKeyForLinkData=Gr.prototype.Bx,Gr.prototype.setFromKeyForLinkData=Gr.prototype.wv,Gr.prototype.getFromKeyForLinkData=Gr.prototype.yx,Gr.prototype.clear=Gr.prototype.clear;var j0=Object.freeze([]);Gr.className="GraphLinksModel",Ou.GraphLinksModel=Gr,Pi.constructGraphLinksModel=Pi.constructGraphLinksModel=function(){return new Gr},Pi.initDiagramModel=Ev=function(){return new Gr};function qa(a,y){Pi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Kn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Je(qa,Pi),qa.constructGraphLinksModel=Pi.constructGraphLinksModel,qa.prototype.cloneProtected=function(a){Pi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Tt=qa.prototype,Tt.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)+":"+Yi(b)}}return y},Tt.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},Tt.gp=function(a){Pi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Tt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&te("applyIncrementalJson cannot change Model properties"),Pi.prototype.fp.call(this,a)},Tt.Vl=function(a){return a},Tt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ys(a,y),y!==void 0)){if(ud(y))return y;te("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Tt.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=ys(a,x);E!==y&&(iA(this,E,a),Ko(a,x,y),this.hc(y)===null&&nA(this,y,a),Ns(this,"nodeParentKey",Io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ko(a,x,y)}},Tt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ys(a,y),y===void 0)?"":typeof y=="string"?y:(te("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},qa.prototype.getLinkCategoryForData=function(a){return this.ss(a)},qa.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=ys(a,x);E===void 0&&(E=""),E!==y&&(Ko(a,x,y),Ns(this,"parentLinkCategory",Io,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ko(a,x,y)}},qa.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},qa.prototype.copyNodeData=function(a){return a===null?null:(a=Pi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ys(a,this.Ke)===void 0||Ko(a,this.Ke,void 0),a)},qa.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=ys(a,y);E!==x&&(Ko(a,y,x),this.Fs(a,y,E,x))},Tt=qa.prototype,Tt.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)},Tt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Ko(a,E,x),Ns(this,"nodeParentKey",Io,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.fm=function(a){Pi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=An();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Ns(this,"nodeParentKey",Io,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)iA(this,a,x[y]);Nn(x)}},Tt.em=function(a){Pi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&nA(this,y,a)},Tt.qp=function(a){Pi.prototype.qp.call(this,a);var y=this.mh(a);iA(this,y,a)},Tt.lm=function(a,y){Pi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Tt.Tl=function(){return!0},Tt.xs=function(){return!0},Ke.Object.defineProperties(qa.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"}}}),qa.prototype.setParentLinkCategoryForNodeData=qa.prototype.Ms,qa.prototype.getParentLinkCategoryForNodeData=qa.prototype.ss,qa.prototype.setParentKeyForNodeData=qa.prototype.qe,qa.prototype.getParentKeyForNodeData=qa.prototype.mh,qa.className="TreeModel",Ou.TreeModel=qa;function ts(a){Vo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Hu,this.Ti=0,this.Zv=new Ut,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=Hu,this.K=$a,this.nd=Ig,this.hd=xv,this.tf=6,this.Nn=q0,a&&Object.assign(this,a)}Je(ts,Vo),ts.prototype.cloneProtected=function(a){Vo.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},ts.prototype.qb=function(a){a.classType===ts?a===X0||a===J0||a===Z0||a===Y0||a===Ig?this.sorting=a:a===nf||a===Dg||a===$a||a===hd?this.direction=a:a===Pc||a===Ad||a===Hu||a===Ru?this.arrangement=a:(a===Vf||a===q0)&&(this.nodeDiameterFormula=a):Vo.prototype.qb.call(this,a)},ts.prototype.createNetwork=function(){return new Ug(this)},ts.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 ne;y.addAll(a.iterator),a=new ne;var x=new ne,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 ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=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===Ru&&ot===Vf?rt=Hu:rt===Ru&&ot!==Vf&&(rt=this.arrangement),(this.direction===nf||this.direction===Dg)&&this.sorting!==Ig){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===nf?(this.arrangement===Ru&&a.reverse(),E=new ne,E.addAll(a),E.addAll(x)):(this.arrangement===Ru&&x.reverse(),E=new ne,E.addAll(x),E.addAll(a))}ot=E.length;for(var Et=z=b=0;Et<E.length;Et++){var kt=ft+yt*z*(this.direction===$a?1:-1)/ot,Dt=E.M(Et).diameter;isNaN(Dt)&&(Dt=cd(E.M(Et),kt)),360>yt&&(Et===0||Et===E.length-1)&&(Dt/=2),b+=Dt,z++}if(isNaN(lt)||rt===Ru){if(isNaN(y)&&(y=6),rt!==Hu&&rt!==Ru){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)&&cd(Et,0),isNaN(b.diameter)&&cd(b,0),z=Math.max(z,(Et.diameter+b.diameter)/2);tt=z+y,rt===Pc?lt=(z+y)/(2*Math.PI/ot):lt=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180)}else lt=V0(this,b+(360<=yt?ot:ot-1)*(rt!==Ru?y:1.6*y),ut,ft*Math.PI/180,yt*Math.PI/180);z=lt*ut}else if(z=lt*ut,Et=bv(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(rt===Hu||rt===Ru)&&(y=(Et-b)/(360<=yt?ot:ot-1));else if(rt===Hu||rt===Ru)Et=(Et-b)/(360<=yt?ot:ot-1),Et<y?(lt=V0(this,b+y*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),z=lt*ut):y=Et;else{for(tt=-1/0,b=0;b<ot;b++)kt=E.M(b),Dt=E.M(b===ot-1?0:b+1),isNaN(kt.diameter)&&cd(kt,0),isNaN(Dt.diameter)&&cd(Dt,0),tt=Math.max(tt,(kt.diameter+Dt.diameter)/2);tt+=y,b=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),b>lt?(lt=b,z=lt*ut):tt=Et/(360<=yt?ot:ot-1)}if(this.kw=rt,this.lc=lt,this.Zm=ut,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,ut=this.Wp,ft=this.Ti,yt=this.me,ot=this.Jp,this.direction!==nf&&this.direction!==Dg||E!==Ru)if(this.direction===nf||this.direction===Dg){switch(tt=0,E){case Ad:tt=180*W0(this,rt,yt,lt,ot)/Math.PI;break;case Hu:ot=y=0,tt=a.first(),tt!==null&&(y=cd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=cd(tt,Math.PI/2)),tt=180*W0(this,rt,yt,lt,ft+(y+ot)/2)/Math.PI;break;case Pc:tt=ut/y.length}if(this.direction===nf){switch(E){case Ad:kp(this,a,lt,hd);break;case Hu:bp(this,a,lt,hd);break;case Pc:Mp(this,a,ut/2,lt,hd)}switch(E){case Ad:kp(this,x,lt+tt,$a);break;case Hu:bp(this,x,lt+tt,$a);break;case Pc:Mp(this,x,ut/2,lt+tt,$a)}}else{switch(E){case Ad:kp(this,x,lt,hd);break;case Hu:bp(this,x,lt,hd);break;case Pc:Mp(this,x,ut/2,lt,hd)}switch(E){case Ad:kp(this,a,lt+tt,$a);break;case Hu:bp(this,a,lt+tt,$a);break;case Pc:Mp(this,a,ut/2,lt+tt,$a)}}}else switch(E){case Ad:kp(this,y,lt,this.direction);break;case Hu:bp(this,y,lt,this.direction);break;case Pc:Mp(this,y,ut,lt,this.direction);break;case Ru:U1(this,y,ut,lt,this.direction)}else U1(this,y,ut,lt-ut/2,$a)}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===$a?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(lt)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(lt),ut.centerY=ft*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function bp(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),ut=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)&&cd(lt,0),isNaN(ut.diameter)&&cd(ut,0),lt=W0(a,b,z,E===$a?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=E===$a?lt:-lt}}function kp(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===$a?x:-x,tt),x+=E===$a?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===$a?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),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Ut.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=lt,!(ft>=ut.length-1));ft++)H1(a,ot,lt,ut,ft,b,z)||R1(a,ot,lt,ut,ft,b,z),ot=z.x,lt=z.y;if(Ut.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var yt=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),Et=Math.abs(lt-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Et)?Math.abs(ot-z)<(ut[0].width+ut[ut.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===$a?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.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),ut=Ut.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,ut)||R1(a,ot,lt,ft,yt,b,ut),ot=ut.x,lt=ut.y;if(Ut.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(lt,ot),ot=b===$a?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 ut=!1;if(0<=x!=(z===$a)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==ut&&(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===$a)){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}ts.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},ts.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 Ut(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))},ts.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function bv(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 ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*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?bv(a,1,x,E,b):bv(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}}ts.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 Ig:return this.ak(Rw(a));default:te("Invalid sorting type.")}return a};function Rw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new ne;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}ts.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 ne;for(var ot=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)E.push(lt);else if(ut===0)b.add(a.M(lt));else{if(ot===0)x.push(lt);else{for(var ft=ut=1/0,yt=-1,Et=[],kt=0;kt<x.length;kt++)0>y[x[kt]].indexOf(x[kt===x.length-1?0:kt+1])&&Et.push(kt===x.length-1?0:kt+1);if(Et.length===0)for(kt=0;kt<x.length;kt++)Et.push(kt);for(kt=0;kt<Et.length;kt++){for(var Dt=Et[kt],Jt=y[lt],zt=0,se=0;se<tt.length;se++){var he=z[tt[se]],ge=z[rt[se]];if(he<ge){var ve=he;he=ge}else ve=ge;if(ve<Dt&&Dt<=he)for(ge=0;ge<Jt.length;ge++){var _e=Jt[ge];0>x.indexOf(_e)||ve<z[_e]&&z[_e]<he||ve===z[_e]||he===z[_e]||zt++}else for(ge=0;ge<Jt.length;ge++)_e=Jt[ge],0>x.indexOf(_e)||ve<z[_e]&&z[_e]<he&&ve!==z[_e]&&he!==z[_e]&&zt++}for(Jt=zt,se=zt=0;se<y[lt].length;se++)ve=x.indexOf(y[lt][se]),0<=ve&&(ve=Math.abs(Dt-(ve>=Dt?ve+1:ve)),zt+=ve<x.length+1-ve?ve:x.length+1-ve);for(se=0;se<tt.length;se++)ve=z[tt[se]],he=z[rt[se]],ve>=Dt&&ve++,he>=Dt&&he++,ve>he&&(ge=he,he=ve,ve=ge),he-ve<(x.length+2)/2==(ve<Dt&&Dt<=he)&&zt++;(Jt<ut||Jt===ut&&zt<ft)&&(ut=Jt,ft=zt,yt=Dt)}for(x.splice(yt,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)ft=y[lt][ut],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],ut=x.indexOf(lt),0<=ut){for(yt=ft=0;yt<y[lt].length;yt++)Et=x.indexOf(y[lt][yt]),0>Et||Et===ut||(kt=Et>ut?Et-ut:ut-Et,ft+=Et<ut!=kt>tt-kt?1:-1);x.splice(0>ft?ut:ut+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},Ke.Object.defineProperties(ts.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!==Ru&&a!==Hu&&a!==Ad&&a!==Pc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==$a&&a!==hd&&a!==nf&&a!==Dg||(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!==Ig||(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!==Vf||(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 Hu=new hn(ts,"ConstantSpacing",0),Ad=new hn(ts,"ConstantDistance",1),Pc=new hn(ts,"ConstantAngle",2),Ru=new hn(ts,"Packed",3),$a=new hn(ts,"Clockwise",4),hd=new hn(ts,"Counterclockwise",5),nf=new hn(ts,"BidirectionalLeft",6),Dg=new hn(ts,"BidirectionalRight",7),Z0=new hn(ts,"Forwards",8),Y0=new hn(ts,"Reverse",9),X0=new hn(ts,"Ascending",10),J0=new hn(ts,"Descending",11),Ig=new hn(ts,"Optimized",12),q0=new hn(ts,"Pythagorean",13),Vf=new hn(ts,"Circular",14);ts.className="CircularLayout",ts.ConstantSpacing=Hu,ts.ConstantDistance=Ad,ts.ConstantAngle=Pc,ts.Packed=Ru,ts.Clockwise=$a,ts.Counterclockwise=hd,ts.BidirectionalLeft=nf,ts.BidirectionalRight=Dg,ts.Forwards=Z0,ts.Reverse=Y0,ts.Ascending=X0,ts.Descending=J0,ts.Optimized=Ig,ts.Pythagorean=q0,ts.Circular=Vf;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 Ug(a){bo.call(this,a)}Je(Ug,bo),Ug.prototype.createVertex=function(){return new Np(this)},Ug.prototype.createEdge=function(){return new $0(this)},Ug.className="CircularNetwork";function Np(a){_s.call(this,a),this.u=this.Si=NaN}Je(Np,_s);function cd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ru)if(x.nodeDiameterFormula===Vf)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===Vf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ke.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){Dl.call(this,a)}Je($0,Dl),$0.className="CircularEdge";function xa(a){Vo.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)}Je(xa,Vo),xa.prototype.cloneProtected=function(a){Vo.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},xa.prototype.createNetwork=function(){return new Wf(this)},xa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var 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=An(),ut=0;ut<rt+y.vertexes.count+2;ut++)lt[ut]=null;rt=0,tt.reset();for(var ft=He.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,lt[0]=new Ut(ft.x+ft.width+E.width,ft.y),lt[1]=new Ut(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],kt=new Ut(Et.x+ft.width+E.width,Et.y),Dt=new Ut(Et.x,Et.y+ft.height+E.height);for(yt+1<rt&&lt.splice(yt+1,0,null),lt[yt]=kt,lt[yt+1]=Dt,rt++,yt=Et.x-ft.x,Et=Et.y-ft.y,ut=ut.vertexes.iterator;ut.next();)kt=ut.value,kt.centerX+=yt,kt.centerY+=Et}for(He.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,yt=tt.bounds,2>rt?(b=yt.x+yt.width/2,z=yt.y+yt.height/2,lt[0]=new Ut(yt.x+yt.width+E.width,yt.y),lt[1]=new Ut(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 Ut(ft.x+yt.width+E.width,ft.y),yt=new Ut(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(Nn(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)}}z1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},xa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,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},xa.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),z1(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++)zw(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 Wf(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new j1;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 ne),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 ne,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new ne,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,we.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,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),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,ut=b.width,ft=b.height,yt=b.focus,Et=ut*ft,1>Et&&(Et=1),rt=we.sqrt((rt+Et+lt*lt*4/(tt*tt))/Et),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new He(z-yt.x-tt,ot-yt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Ut(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 He(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Ut(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function zw(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=we.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.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,kt){return Et===null||kt===null||Et===kt?0:kt.width*kt.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(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var yt=ot.height;ft=we.sqrt(ft*ft+yt*yt)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+lt)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*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 ut=a[lt],ft=ut.x-x,yt=ut.y-E;if(ft=ft*ft+yt*yt,ft<rt){for(yt=lt-1;0<=yt;yt--)if(a[yt].y>ut.y&&a[yt].x-ut.x<b+tt.width)continue t;for(yt=lt+1;yt<y;yt++)if(a[yt].x>ut.x&&a[yt].y-ut.y<z+tt.height)continue t;ot=lt,rt=ft}}return ot}xa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var 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,we.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,we.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,we.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,we.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function z1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jw(a)););a.ah=null}function jw(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(Dt,Jt){return Dt===null||Jt===null||Dt===Jt?0:Dt.centerX-Jt.centerX}):y.sort(function(Dt,Jt){return Dt===null||Jt===null||Dt===Jt?0:Dt.centerY-Jt.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 ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),lt=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),lt+=tt.mass*a.gravitationalFieldY(ot,ut),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(ut-Et>x||Et-ut>x){if(!b)break}else{var kt=G1(tt,yt);1>kt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),kt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*kt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*kt):(E=Math.max(yt.width,tt.width),E=(1+E)*kt-E/2),ut>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)/(kt*kt),E=(lt-ot)/kt*rt,lt=(Et-ut)/kt*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,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.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>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,lt=(ut-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}xa.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},xa.prototype.moveFixedVertex=function(){},xa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},xa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ws,y.toSpot=ws)}},xa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=He.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,He.free(x)}x=He.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()}He.free(x)},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},xa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},xa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},xa.prototype.electricalFieldX=function(){return 0},xa.prototype.electricalFieldY=function(){return 0},xa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},xa.prototype.gravitationalFieldX=function(){return 0},xa.prototype.gravitationalFieldY=function(){return 0},xa.prototype.isFixed=function(a){return a.isFixed},Ke.Object.defineProperties(xa.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&te('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),xa.className="ForceDirectedLayout";function j1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}j1.className="ForceDirectedSubnet";function Wf(a){bo.call(this,a)}Je(Wf,bo),Wf.prototype.createVertex=function(){return new Dp(this)},Wf.prototype.createEdge=function(){return new Ip(this)},Wf.className="ForceDirectedNetwork";function Dp(a){_s.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}Je(Dp,_s),Ke.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){Dl.call(this,a),this.j=this.o=NaN}Je(Ip,Dl),Ke.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 mo(a){Vo.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 Ut,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Je(mo,Vo),mo.prototype.cloneProtected=function(a){Vo.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},mo.prototype.qb=function(a){a.classType===mo?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:te("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},mo.prototype.createNetwork=function(){return new Og(this)},mo.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 ut=b.node;if(tt=z.node,ut===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 kt=b.focus;lt=z.focus;var Dt=E.rev?z.bounds:b.bounds;Et=Ut.alloc(),ut!==ft?Dt.w()&&ft.isVisible()?ft.actualBounds.w()?(wc(ft,yt,rr,Et),Et.x+=ft.actualBounds.x-Dt.x,Et.y+=ft.actualBounds.y-Dt.y):(wc(ft,yt,rr,Et),Et.w()||Et.assign(kt)):Et.assign(kt):Dt.w()?(wc(ft,yt,rr,Et),Et.w()||Et.assign(kt)):Et.assign(kt),ft=E.rev?b.bounds:z.bounds,ut=Ut.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(wc(ot,rt,rr,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(wc(ot,rt,rr,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(wc(ot,rt,rr,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Et.x-kt.x)/this.kc),ot=Et.x,rt=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Et.y-kt.y)/this.kc),ot=Et.y,rt=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),Ut.free(Et),Ut.free(ut),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,ut=z.layer,ft=0,Dt=E.link,Dt!==null){var Jt=Dt.fromPort,zt=Dt.toPort;if(Jt!==null&&zt!==null){var se=Dt.fromNode;if(yt=Dt.toNode,se!==null&&yt!==null){var he=rm(this,!0),ge=rm(this,!1),ve=this.setsPortSpots?he:Dt.computeSpot(!0,Jt);kt=this.setsPortSpots?ge:Dt.computeSpot(!1,zt);var _e=Dt.isOrthogonal;ve.$c()&&ve.Hf(ge)&&kt.$c()&&kt.Hf(he)?ft=0:(he=Dt.getLinkPoint(se,Jt,ve,!0,_e,yt,zt,Ut.alloc()),ge=Dt.getLinkDirection(se,Jt,he,ve,!0,_e,yt,zt),Ut.free(he),ve.ys()||ge!==tw(this,E,!0)?this.setsPortSpots&&se!==null&&se.ports.count===1&&E.rev&&(ft+=1):ft+=1,ve=Dt.getLinkPoint(yt,zt,kt,!1,_e,se,Jt,Ut.alloc()),Dt=Dt.getLinkDirection(yt,zt,ve,kt,!1,_e,se,Jt),Ut.free(ve),kt.ys()||Dt!==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)&&(kt=a.createVertex(),kt.node=null,kt.Dj=1,kt.layer=Et,kt.near=b,a.dh(kt),b=a.Zj(b,kt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=kt),Dt=1,ft&&Dt--,Et-ut>Dt&&0<Et){for(E.valid=!1,kt=a.createVertex(),kt.node=null,kt.Dj=2,kt.layer=Et-1,a.dh(kt),b=a.Zj(b,kt,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=kt,Et--;Et-ut>Dt&&0<Et;)kt=a.createVertex(),kt.node=null,kt.Dj=3,kt.layer=Et-1,a.dh(kt),b=a.Zj(b,kt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=kt,Et--;b=a.Zj(kt,z,E.link),b.valid=!ft,ft&&(kt.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=dd(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),fd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},mo.prototype.linkMinLength=function(){return 1};function kv(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}mo.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},mo.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 cl(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 ou(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=dd(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 ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===lt&&ft.Dj===lt.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],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,ut=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++){var kt=ot[yt];if(kt.valid&&kt.fromVertex.layer!==y){var Dt=kt.fromVertex.index,Jt=kt.portToPos;kt=kt.portFromPos,ut<Jt&&(ft>Dt||ft===Dt&&Et>kt)&&rt++,Jt<ut&&(Dt>ft||Dt===ft&&kt>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,ut=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++)kt=ot[yt],kt.valid&&kt.toVertex.layer!==y&&(Dt=kt.toVertex.index,Jt=kt.portToPos,kt=kt.portFromPos,Et<kt&&(ft>Dt||ft===Dt&&ut>Jt)&&rt++,kt<Et&&(Dt>ft||Dt===ft&&Jt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var zt=0,se=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var he=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<he.length;yt++)kt=he[yt],kt.valid&&kt.fromVertex.layer!==y&&(Dt=kt.fromVertex.index,kt=kt.portFromPos,(ft<Dt||ft===Dt&&Et<kt)&&se++,(Dt<ft||Dt===ft&&kt<Et)&&zt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,he=E[ot].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Et=rt[lt],Et.valid&&Et.toVertex.layer!==y)for(ft=Et.toVertex.index,ut=Et.portToPos,yt=0;yt<he.length;yt++)kt=he[yt],kt.valid&&kt.toVertex.layer!==y&&(Dt=kt.toVertex.index,Jt=kt.portToPos,(ft<Dt||ft===Dt&&ut<Jt)&&se++,(Dt<ft||Dt===ft&&Jt<ut)&&zt++)}z[tt*b+ot]=zt,z[ot*b+tt]=se}}return fd(a,y,E),z}mo.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=dd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var lt=z[ot].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var ft=lt[ut];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)*kv(ft)}}}fd(E,b,z),y+=rt}return y}mo.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=dd(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 ut=0,ft=0,yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ut+=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&&(ut+=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&&(ut+=yt.column,ft++);z[tt]=ft===0?-1:ut/ft}return fd(a,y,E),z}function W1(a,y,x){for(var E=dd(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 ut=0,ft=[],yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ft[ut]=yt.column-1,ut++),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[ut]=Et.column+rt.portFromColOffset,ut++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ft[ut]=yt.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(kt,Dt){return kt-Dt}),lt=ut>>1,z[tt]=ut&1?ft[lt]:ft[lt-1]+ft[lt]>>1)}return fd(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)}}mo.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 ut=rt.sourceEdges;ut.next();)ut.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++}mo.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 ut=0,ft=!1,yt=lt.sourceEdgesArrayAccess;b=yt.length;for(var Et=0;Et<b;Et++){var kt=yt[Et],Dt=kt.fromVertex;ut+=1,Dt.component!==1&&(z+=1,Dt=Dt.layer-lt.layer,kt=a.linkMinLength(kt),E=Math.min(E,Dt-kt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Et=0;Et<b;Et++)kt=yt[Et].toVertex,--ut,kt.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=lt,rt=ut)}}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,ut=!1,yt=tt.sourceEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)kt=yt[Et].fromVertex,lt+=1,kt.component!==1?E+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)kt=yt[Et],Dt=kt.toVertex,--lt,Dt.component!==1&&(--E,Dt=tt.layer-Dt.layer,kt=a.linkMinLength(kt),b=Math.min(b,Dt-kt));(rt===null||lt>z)&&!ut&&(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}mo.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))}mo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=cl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,1),pu(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=cl(this)),E=this.Ia;0<=E;E--)nm(this,E,-1),pu(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=cl(this))}for(ou(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,0),pu(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=cl(this)),E=this.Ia;0<=E;E--)nm(this,E,0),pu(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=cl(this))}ou(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=pu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=pu(this,E,1)||z;for(b=this.countCrossings(),b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,1)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,-1)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=pu(this,E,0)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,0)||z;b>=a?ou(this,y):(a=b,y=cl(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=pu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=pu(this,E,1)||z;for(b=this.countCrossings(),b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,1)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,-1)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=pu(this,E,0)||z;for(b>=a?ou(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=pu(this,E,0)||z;b>=a?ou(this,y):(a=b,y=cl(this))}}ou(this,y)};function nm(a,y,x){var E=dd(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);fd(a,y,E)}function pu(a,y,x){var E=dd(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 ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],yt=0,Et=0,kt=E[z].column,Dt=E[z+1].column,Jt=a.nodeMinColumnSpace(E[z],!0),zt=a.nodeMinColumnSpace(E[z],!1),se=a.nodeMinColumnSpace(E[z+1],!0),he=a.nodeMinColumnSpace(E[z+1],!1);Jt=kt-Jt+se,zt=Dt-zt+he;var ge=E[z].sourceEdges.iterator;for(ge.reset();ge.next();)if(se=ge.value,he=se.fromVertex,se.valid&&he.layer===y){for(se=0;E[se]!==he;)se++;se<z&&(yt+=2*(z-se),Et+=2*(z+1-se)),se===z+1&&(yt+=1),se>z+1&&(yt+=4*(se-z),Et+=4*(se-(z+1)))}for(ge=E[z].destinationEdges.iterator,ge.reset();ge.next();)if(se=ge.value,he=se.toVertex,se.valid&&he.layer===y){for(se=0;E[se]!==he;)se++;se===z+1&&(Et+=1)}for(ge=E[z+1].sourceEdges.iterator,ge.reset();ge.next();)if(se=ge.value,he=se.fromVertex,se.valid&&he.layer===y){for(se=0;E[se]!==he;)se++;se<z&&(yt+=2*(z+1-se),Et+=2*(z-se)),se===z&&(Et+=1),se>z+1&&(yt+=4*(se-(z+1)),Et+=4*(se-z))}for(ge=E[z+1].destinationEdges.iterator,ge.reset();ge.next();)if(se=ge.value,he=se.toVertex,se.valid&&he.layer===y){for(se=0;E[se]!==he;)se++;se===z&&(yt+=1)}se=he=0,ge=tt[E[z].index];var ve=rt[E[z].index],_e=tt[E[z+1].index],jn=rt[E[z+1].index];ge!==-1&&(he+=Math.abs(ge-kt),se+=Math.abs(ge-zt)),ve!==-1&&(he+=Math.abs(ve-kt),se+=Math.abs(ve-zt)),_e!==-1&&(he+=Math.abs(_e-Dt),se+=Math.abs(_e-Jt)),jn!==-1&&(he+=Math.abs(jn-Dt),se+=Math.abs(jn-Jt)),(Et<yt-.5||Et===yt&&ft<ut-.5||Et===yt&&ft===ut&&se<he-.5)&&(lt=ot=!0,E[z].column=zt,E[z+1].column=Jt,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return fd(a,y,E),ot}mo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&tx)!==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=Qg(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,-1)||x;x=Qg(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=Qg(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Qg(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,0)||x}}else Xw(this)};function Qg(a,y,x){for(var E=!1;Ww(a,y,x);)E=!0;return E}function Ww(a,y,x){var E,b=dd(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 ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),yt=a.nodeMinColumnSpace(b[E],!1),Et=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?Et=ut-1:Et=ut,ft=E+1>=z||b[E+1].column-ut-1>yt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var kt=yt=0,Dt=0;if(0>=x)for(var Jt=b[E].sourceEdges.iterator;Jt.next();){var zt=Jt.value,se=zt.fromVertex;if(zt.valid&&se.layer!==y){var he=kv(zt),ge=zt.portFromColOffset;zt=zt.portToColOffset,se=se.column,yt+=(Math.abs(ut+zt-(se+ge))+1)*he,kt+=(Math.abs(Et+zt-(se+ge))+1)*he,Dt+=(Math.abs(ft+zt-(se+ge))+1)*he}}if(0<=x)for(Jt=b[E].destinationEdges.iterator;Jt.next();)zt=Jt.value,se=zt.toVertex,zt.valid&&se.layer!==y&&(he=kv(zt),ge=zt.portFromColOffset,zt=zt.portToColOffset,se=se.column,yt+=(Math.abs(ut+ge-(se+zt))+1)*he,kt+=(Math.abs(Et+ge-(se+zt))+1)*he,Dt+=(Math.abs(ft+ge-(se+zt))+1)*he);zt=ge=he=0,Jt=tt[b[E].index],se=rt[b[E].index],Jt!==-1&&(he+=Math.abs(Jt-ut),ge+=Math.abs(Jt-Et),zt+=Math.abs(Jt-ft)),se!==-1&&(he+=Math.abs(se-ut),ge+=Math.abs(se-Et),zt+=Math.abs(se-ft)),kt<yt||kt===yt&&ge<he?(lt=ot=!0,b[E].column=Et):(Dt<yt||Dt===yt&&zt<he)&&(lt=ot=!0,b[E].column=ft)}return fd(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=dd(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),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===lt+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=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,ut=(ot+lt)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=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?ut=tt[x]:ot>=tt[x]?ut=ot:lt<=tt[x]&&(ut=lt));ut!==rt&&(z=!0,E[x].column=ut)}fd(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=cl(a),z=em(a);for(E=z+1;z<E;){E=z,rw(a,x,1);var tt=em(a);tt>z?ou(a,b):tt<z&&(z=tt,b=cl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=cl(a),z=em(a),E=z+1;z<E;)E=z,rw(a,x,-1),tt=em(a),tt>z?ou(a,b):tt<z&&(z=tt,b=cl(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=An(),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 Be,Jw(y,x);var z=null,tt=null,rt=null,ot=null,lt=(a.ve&1)!==0,ut=(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=Vi(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(),ut&&(a.verticalAlignment(y,x,!0),tt=im(a,y,!0,!0)),Nn(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Et){var kt=An();lt&&kt.push(z.get(Et)),ut&&kt.push(tt.get(Et)),ft&&kt.push(rt.get(Et)),yt&&kt.push(ot.get(Et)),kt.sort(function(Jt,zt){return Jt-zt});var Dt=kt.length;Dt=(kt[Math.floor((Dt-1)/2)]+kt[Math.ceil((Dt-1)/2)])/2,Nn(kt),Et.zc=Dt})}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 ut=Gv(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=Gv(lt)[0].index);z<=ot;){if(lt=rt[z],!lt.bo){ft=[];for(var yt=Vi(lt.sourceEdgesArrayAccess),Et=yt.next();!Et.done;Et=yt.next())Et=Et.value,Et.valid&&ft.push(Et);lt.bo=ft}for(lt=Vi(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<b||yt>ut)&&y.add(ft);z++}b=ut}}}mo.prototype.verticalAlignment=function(a,y,x){qw(a),a=Vi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Vi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):ex(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],ut=void 0;ut=x?um(lt,z):um(z,lt),!y.contains(ut)&&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=Vi(y),tt=z.next();!tt.done;tt=z.next()){var rt=Vi(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=Vi(y),rt=z.next();!rt.done;rt=z.next()){rt=Vi(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var lt=0,ut=ot;ut.align!==ot;){var ft=ut.align,yt=tt?ut.width:ut.height,Et=tt?ft.width:ft.height;if(x){var kt=um(ut,ft),Dt=kt.portFromPos,Jt=kt.portToPos;kt.link!==null&&(ut.node&&ut.node!==kt.link.fromNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==kt.link.toNode&&(Jt=tt?ft.focusX:ft.focusY))}else kt=um(ft,ut),Dt=kt.portToPos,Jt=kt.portFromPos,kt.link!==null&&(ut.node&&ut.node!==kt.link.toNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==kt.link.fromNode&&(Jt=tt?ft.focusX:ft.focusY));yt=E?ut.qg+(yt-Dt)-(Et-Jt):ut.qg+Dt-Jt,ft.qg=yt,lt=Math.min(lt,yt),ut=ut.align}ut=ot;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==ot)}}for(x=Vi(y),tt=x.next();!tt.done;tt=x.next())for(z=Vi(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 Ue,y=Vi(y),tt=y.next();!tt.done;tt=y.next())for(x=Vi(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&&te("Could not determine previous vertex in layer"),y[x][a-1]}mo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=An(),b=An(),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)));Nn(E),Nn(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}mo.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?Ds:Js:a.K===90?y?Js:Ds:a.K===180?y?ns:ms:y?ms:ns}mo.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,ut=ot.column|0;E?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),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 Ut(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},mo.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 He(0,0,x,Math.abs(this.Ta[0]))):y.push(new He(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new He(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new He(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new He(0,0,Math.abs(this.Ta[0]),x)):y.push(new He(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new He(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new He(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},mo.prototype.commitLayers=function(){},mo.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 ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===Yl&&y.pointsCount===4&&(ut.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===ir&&(E=!0),rt!==null&&ot===ir&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(rr),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(rr),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(ut.layer===ft.layer)y.zf();else{var yt=!1,Et=!1,kt=this.ie,Dt=y.firstPickIndex+1;if(y.isOrthogonal){Et=!0;var Jt=y.pointsCount;4<Jt&&y.points.removeRange(2,Jt-3)}else if(y.curve===Yl)yt=!0,Jt=y.pointsCount,4<Jt&&y.points.removeRange(2,Jt-3),Jt===4&&(Dt=2);else{Jt=y.pointsCount;var zt=lt===ir,se=ot===ir;2<Jt&&zt&&se?y.points.removeRange(1,Jt-2):3<Jt&&zt&&!se?y.points.removeRange(1,Jt-3):3<Jt&&!zt&&se?y.points.removeRange(2,Jt-2):4<Jt&&!zt&&!se&&y.points.removeRange(2,Jt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var he=Jt=null;for(zt=ft.sourceEdges.iterator;zt.next()&&(se=zt.value,se.link!==x.link||(Jt=se.fromVertex,he=se.toVertex,Jt.node!==null)););if(Jt===null)break;if(Jt!==ut){zt=y.i(Dt-1).x,se=y.i(Dt-1).y;var ge=Jt.centerX,ve=Jt.centerY;if(Et)this.K===180||this.K===0?Dt===y.firstPickIndex+1?(y.m(Dt++,zt,se),y.m(Dt++,zt,ve)):(he!==null?he.centerY:se)!==ve&&(he=this.Ta[Jt.layer-1]+this.Rf.x,y.m(Dt++,he,se),y.m(Dt++,he,ve)):Dt===y.firstPickIndex+1?(y.m(Dt++,zt,se),y.m(Dt++,ge,se)):(he!==null?he.centerX:zt)!==ge&&(he=this.Ta[Jt.layer-1]+this.Rf.y,y.m(Dt++,zt,he),y.m(Dt++,ge,he));else if(Dt===y.firstPickIndex+1){he=Math.max(10,this.he[ft.layer]);var _e=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?ge<=ft.bounds.x?(ft=ft.bounds.x,y.m(Dt++,ft-he,ve),y.m(Dt++,ft,ve),y.m(Dt++,ft+_e,ve)):(y.m(Dt++,ge-he,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge+_e,ve)):this.K===90?ve>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Dt++,ge,ft+_e),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft-he)):(y.m(Dt++,ge,ve+_e),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve-he)):this.K===270?ve<=ft.bounds.y?(ft=ft.bounds.y,y.m(Dt++,ge,ft-he),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft+_e)):(y.m(Dt++,ge,ve-he),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve+_e)):this.K===0&&(ge>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Dt++,ft+_e,ve),y.m(Dt++,ft,ve),y.m(Dt++,ft-he,ve)):(y.m(Dt++,ge+_e,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge-he,ve)));else{y.m(Dt++,zt,se);var jn=0;this.K===180||this.K===0?((this.K===180?ge>=ft.bounds.right:ge<=ft.bounds.x)&&(jn=(this.K===0?-he:_e)/2),y.m(Dt++,zt+jn,ve)):((this.K===270?ve>=ft.bounds.bottom:ve<=ft.bounds.y)&&(jn=(this.K===90?-he:_e)/2),y.m(Dt++,ge,se+jn)),y.m(Dt++,ge,ve)}}else he=Math.max(10,this.he[Jt.layer]),_e=Math.max(10,this.Ld[Jt.layer]),yt?this.K===180?(y.m(Dt++,ge-he-kt,ve),y.m(Dt++,Math.min(ge-he+kt/2,ge),ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,Math.max(ge+_e-kt/2,ge),ve),y.m(Dt++,ge+_e+kt,ve)):this.K===90?(y.m(Dt++,ge,ve+_e+kt),y.m(Dt++,ge,Math.max(ve+_e-kt/2,ve)),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,Math.min(ve-he+kt/2,ve)),y.m(Dt++,ge,ve-he-kt)):this.K===270?(y.m(Dt++,ge,ve-he-kt),y.m(Dt++,ge,Math.min(ve-he+kt/2,ve)),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,Math.max(ve+_e-kt/2,ve)),y.m(Dt++,ge,ve+_e+kt)):(y.m(Dt++,ge+_e+kt,ve),y.m(Dt++,Math.max(ge+_e-kt/2,ge),ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,Math.min(ge-he+kt/2,ge),ve),y.m(Dt++,ge-he-kt,ve)):y.m(Dt++,ge,ve)}ft=Jt}(rt===null||lt!==ir||Et)&&(zt=y.i(Dt-1).x,se=y.i(Dt-1).y,ge=y.i(Dt).x,ve=y.i(Dt).y,Et?(kt=this.Ld[ut.layer],this.K===180||this.K===0?(Et=se,Et>=ut.bounds.y&&Et<=ut.bounds.bottom&&(this.K===180?ge>=ut.bounds.x:ge<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-kt:kt),Et<ut.bounds.y+ut.bounds.height/2?Et=ut.bounds.y-this.kc/2:Et=ut.bounds.bottom+this.kc/2,y.m(Dt++,ft,se),y.m(Dt++,ft,Et)),y.m(Dt++,ge,Et)):(Et=zt,Et>=ut.bounds.x&&Et<=ut.bounds.right&&(this.K===270?ve>=ut.bounds.y:ve<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-kt:kt),Et<ut.bounds.x+ut.bounds.width/2?Et=ut.bounds.x-this.kc/2:Et=ut.bounds.right+this.kc/2,y.m(Dt++,zt,ft),y.m(Dt++,Et,ft)),y.m(Dt++,Et,ve)),y.m(Dt++,ge,ve)):yt?(he=Math.max(10,this.he[ut.layer]),_e=Math.max(10,this.Ld[ut.layer]),this.K===180&&ge>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Dt-2,ft,se),y.L(Dt-1,ft+_e,se)):this.K===90&&ve<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Dt-2,zt,ft),y.L(Dt-1,zt,ft-he)):this.K===270&&ve>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Dt-2,zt,ft),y.L(Dt-1,zt,ft+_e)):this.K===0&&ge<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Dt-2,ft,se),y.L(Dt-1,ft-he,se))):(he=Math.max(10,this.he[ut.layer]),_e=Math.max(10,this.Ld[ut.layer]),Et=0,this.K===180||this.K===0?((this.K===180?ge<=ut.bounds.x:ge>=ut.bounds.right)&&(Et=(this.K===0?_e:-he)/2),y.m(Dt++,ge+Et,se)):((this.K===270?ve<=ut.bounds.y:ve>=ut.bounds.bottom)&&(Et=(this.K===90?_e:-he)/2),y.m(Dt++,zt,ve+Et)),y.m(Dt++,ge,ve)))}else{for(;ut!==null&&ut!==ft;){for(he=Jt=null,ut=ut.destinationEdges.iterator;ut.next()&&(zt=ut.value,zt.link!==x.link||(Jt=zt.toVertex,he=zt.fromVertex,he.node!==null&&(he=null),Jt.node!==null)););if(Jt===null)break;Jt!==ft&&(zt=y.i(Dt-1).x,se=y.i(Dt-1).y,ge=Jt.centerX,ve=Jt.centerY,Et?this.K===180||this.K===0?(he!==null?he.centerY:se)!==ve&&(he=this.Ta[Jt.layer]+this.Rf.x,Dt===y.firstPickIndex+1&&(he=this.K===0?Math.max(he,zt):Math.min(he,zt)),y.m(Dt++,he,se),y.m(Dt++,he,ve)):(he!==null?he.centerX:zt)!==ge&&(he=this.Ta[Jt.layer]+this.Rf.y,Dt===y.firstPickIndex+1&&(he=this.K===90?Math.max(he,se):Math.min(he,se)),y.m(Dt++,zt,he),y.m(Dt++,ge,he)):(he=Math.max(10,this.he[Jt.layer]),_e=Math.max(10,this.Ld[Jt.layer]),yt?this.K===180?(y.m(Dt++,ge+_e+kt,ve),y.m(Dt++,Math.max(ge+_e-kt/2,ge),ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,Math.min(ge-he+kt/2,ge),ve),y.m(Dt++,ge-he-kt,ve)):this.K===90?(y.m(Dt++,ge,ve-he-kt),y.m(Dt++,ge,Math.min(ve-he+kt/2,ve)),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,Math.max(ve+_e-kt/2,ve)),y.m(Dt++,ge,ve+_e+kt)):this.K===270?(y.m(Dt++,ge,ve+_e+kt),y.m(Dt++,ge,Math.max(ve+_e-kt/2,ve)),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,Math.min(ve-he+kt/2,ve)),y.m(Dt++,ge,ve-he-kt)):(y.m(Dt++,ge-he-kt,ve),y.m(Dt++,Math.min(ge-he+kt/2,ge),ve),y.m(Dt++,ge,ve),y.m(Dt++,ge,ve),y.m(Dt++,Math.max(ge+_e-kt/2,ge),ve),y.m(Dt++,ge+_e+kt,ve)):this.K===180?(y.m(Dt++,ge+_e,ve),y.m(Dt++,ge-he,ve)):this.K===90?(y.m(Dt++,ge,ve-he),y.m(Dt++,ge,ve+_e)):this.K===270?(y.m(Dt++,ge,ve+_e),y.m(Dt++,ge,ve-he)):(y.m(Dt++,ge-he,ve),y.m(Dt++,ge+_e,ve)))),ut=Jt}Et&&(zt=y.i(Dt-1).x,se=y.i(Dt-1).y,ge=y.i(Dt).x,ve=y.i(Dt).y,this.K===180||this.K===0?se!==ve&&(he=this.K===0?Math.min(Math.max((ge+zt)/2,this.Ta[ft.layer]+this.Rf.x),ge):Math.max(Math.min((ge+zt)/2,this.Ta[ft.layer]+this.Rf.x),ge),y.m(Dt++,he,se),y.m(Dt++,he,ve)):zt!==ge&&(he=this.K===90?Math.min(Math.max((ve+se)/2,this.Ta[ft.layer]+this.Rf.y),ve):Math.max(Math.min((ve+se)/2,this.Ta[ft.layer]+this.Rf.y),ve),y.m(Dt++,zt,he),y.m(Dt++,ge,he)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===ir?y.getLinkPointFromPoint(b,tt,tt.ga(rr),y.i(3),!0):y.i(0),lt===ir&&(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===ir?y.getLinkPointFromPoint(z,rt,rt.ga(rr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===ir&&(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()},mo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new ne,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 gd;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 ut=0;ot.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=lt.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}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),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,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,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var yt=x[ft];(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc);var Et=yt.link;z=Et.i(yt.index),tt=Et.i(yt.index+1);var kt=this.linkSpacing*(ut-(lt-1)/2);y++,Et.uh(),Et.L(yt.index,z.x,z.y+kt),Et.L(yt.index+1,tt.x,tt.y+kt),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 gd,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),ut=0,ot.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=lt.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),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),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,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,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)yt=x[ft],(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc),Et=yt.link,z=Et.i(yt.index),tt=Et.i(yt.index+1),kt=this.linkSpacing*(ut-(lt-1)/2),y++,Et.uh(),Et.L(yt.index,z.x+kt,z.y),Et.L(yt.index+1,tt.x+kt,tt.y),Et.zf()}z=b}a=E}}}},Tt=mo.prototype,Tt.Vx=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.Ux=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.Js=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.B=function(a,y){return a-=y,-1<a&&1>a},Tt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&te("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 dd(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 fd(a,y,x){a.He[a.tc[y]]=x}Ke.Object.defineProperties(mo.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()):te("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 hn(mo,"CycleDepthFirst",0),Uv=new hn(mo,"CycleGreedy",1),Qp=new hn(mo,"CycleFromLayers",2),sm=new hn(mo,"LayerOptimalLinkLength",0),Qv=new hn(mo,"LayerLongestPathSink",1),Ov=new hn(mo,"LayerLongestPathSource",2),am=new hn(mo,"InitDepthFirstOut",0),Hv=new hn(mo,"InitDepthFirstIn",1),Rv=new hn(mo,"InitNaive",2),_v=new hn(mo,"AggressiveNone",0),lm=new hn(mo,"AggressiveLess",1),Kv=new hn(mo,"AggressiveMore",2),tx=8;mo.className="LayeredDigraphLayout",mo.CycleDepthFirst=om,mo.CycleGreedy=Uv,mo.CycleFromLayers=Qp,mo.LayerOptimalLinkLength=sm,mo.LayerLongestPathSink=Qv,mo.LayerLongestPathSource=Ov,mo.InitDepthFirstOut=am,mo.InitDepthFirstIn=Hv,mo.InitNaive=Rv,mo.AggressiveNone=_v,mo.AggressiveLess=lm,mo.AggressiveMore=Kv,mo.PackNone=0,mo.PackExpand=1,mo.PackStraighten=2,mo.PackMedian=4,mo.PackAll=15,mo.AlignNone=0,mo.AlignUpperLeft=1,mo.AlignUpperRight=2,mo.AlignLowerLeft=4,mo.AlignLowerRight=8,mo.AlignAll=15;function gd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}gd.className="SegInfo";function Og(a){bo.call(this,a)}Je(Og,bo),Og.prototype.createVertex=function(){return new su(this)},Og.prototype.createEdge=function(){return new Op(this)},Og.className="LayeredDigraphNetwork";function su(a){_s.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}Je(su,_s);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=Vi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Vi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;te("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Vi(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 ex(a){if(!a.ao){for(var y=[],x=Vi(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}su.prototype.Cl=function(a){_s.prototype.Cl.call(this,a),this.bo=this.co=null},su.prototype.Kl=function(a){_s.prototype.Kl.call(this,a),this.bo=this.co=null},su.prototype.zl=function(a){_s.prototype.zl.call(this,a),this.$n=this.ao=null},su.prototype.Jl=function(a){_s.prototype.Jl.call(this,a),this.$n=this.ao=null},Ke.Object.defineProperties(su.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)}}}),su.prototype.deleteDestinationEdge=su.prototype.Jl,su.prototype.addDestinationEdge=su.prototype.zl,su.prototype.deleteSourceEdge=su.prototype.Kl,su.prototype.addSourceEdge=su.prototype.Cl,su.className="LayeredDigraphVertex";function Op(a){Dl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Je(Op,Dl),Ke.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 Ir(a){Vo.call(this),this.Ub=new Be,this.Wn=dm,this.ud=oh,this.vo=gm,this.Bq=ty,this.$v=[],this.td=!0,this.Rb=pm,this.$d=new ln(10,10).freeze();var y=new Jf(this);this.W=new mu(y),this.Y=new mu(y),this.ru=[],a&&Object.assign(this,a)}Je(Ir,Vo),Ir.prototype.cloneProtected=function(a){Vo.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},Ir.prototype.qb=function(a){a.classType===Ir?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:te("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},Ir.prototype.createNetwork=function(){return new Jf(this)},Ir.prototype.makeNetwork=function(a){function y(E){if(E instanceof Jn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Qn){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 Re?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ur?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ir.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==mm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Re&&(y=a),this.path===dm&&y!==null?this.ud=y.isTreePathToChildren?oh:Yf:this.ud=this.path===dm?oh: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 Be,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 mu&&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,zv(this,y));for(y=this.network.vertexes,a=null;a=nx(y),0<a.count;)y=lw(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,zv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof mu&&Aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof mu&&hw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof mu&&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 mu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Be,this.isValidLayout=!0};function nx(a){var y=new Be;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ir.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case oh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Yf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:te("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 oh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Yf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:te("Unhandled path value "+a.ud.toString())}}return E}function zv(a,y){if(y!==null){switch(a.ud){case oh:if(0<y.destinationEdges.count){for(var x=new ne,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 Yf:if(0<y.sourceEdges.count){for(x=new ne,E=y.sourceVertexes;E.next();)b=E.value,uw(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:te("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++)zv(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}Ir.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===lh&&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 ix(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}}Ir.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(ix(this,a)),a.parent!==null&&a.parent.alignment===lh){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])}}Ir.prototype.assignTreeVertexValues=function(){};function cw(a,y){if(y!==null){y.alignment!==lh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)cw(a,y[E])}}Ir.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Hg: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:te("Unhandled sorting value "+a.sorting.toString())}},Ir.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ir.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=pd(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 ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.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=He.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,He.free(b))};function pd(a){return a===Fc||a===lh||a===Ec||a===kh}function Hp(a){return a===Fc||a===lh}function jv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(pd(x)){if(Hp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ec)return!0}}return!1}Ir.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=pd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=jv(a),ot=0,lt=a.comments,ut=lt.length,ft=Ut.alloc(),yt=0;yt<ut;yt++){var Et=lt[yt],kt=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-kt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();){var Dt=Et.value;Dt.fromSpot=ns,Dt.toSpot=ms}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();)Dt=Et.value,Dt.fromSpot=ms,Dt.toSpot=ns;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();)Dt=Et.value,Dt.fromSpot=ms,Dt.toSpot=ns;else for(ft.h(a.bounds.x+a.commentMargin-kt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=ns,Dt.toSpot=ms;ot=0<=a.commentSpacing?ot+(kt.height+a.commentSpacing):ot+(a.commentSpacing-kt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-kt.height),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=Ds,Dt.toSpot=Js;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();)Dt=Et.value,Dt.fromSpot=Js,Dt.toSpot=Ds;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();)Dt=Et.value,Dt.fromSpot=Js,Dt.toSpot=Ds;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-kt.height),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=Ds,Dt.toSpot=Js;ot=0<=a.commentSpacing?ot+(kt.width+a.commentSpacing):ot+(a.commentSpacing-kt.width)}}if(Ut.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===oh)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)}},Ir.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===lh)dw(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=pd(x)),E=jv(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=_u(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===sh;var lt=ot===ah,ut=pd(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var yt=a.nodeSpacing,Et=this.computeNodeIndent(a),kt=a.rowSpacing,Dt=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Dt=Math.max(0,a.rowIndent)),E=a.width;var Jt=a.height,zt=0,se=0,he=0,ge=null,ve=null,_e=0,jn=0,pi=0,hi=0,In=0,vn=0,lr=0,qi=0;if(ut&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var eo=0;eo<rt;eo++)eo%2===0&&eo!==rt-1&&(qi=Math.max(qi,y?tt[eo].Da.width:tt[eo].Da.height));else rt===1&&(qi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fc:se=135>b?fw(this,a,tt,qi,zt,se):gw(this,a,tt,qi,zt,se),qi=se.x,zt=se.width,se=se.height;break;case Ec:for(ge=0;ge<rt;ge++)ve=tt[ge],ft=ve.Da,he=vn===0?0:kt,y?(ve.S.h(z-ft.width,hi+he),zt=Math.max(zt,ft.width),se=Math.max(se,hi+he+ft.height),hi+=he+ft.height):(ve.S.h(pi+he,z-ft.height),zt=Math.max(zt,pi+he+ft.width),se=Math.max(se,ft.height),pi+=he+ft.width),vn++;break;case kh:for(ge=0;ge<rt;ge++)ve=tt[ge],z=ve.Da,ft=vn===0?0:kt,y?(ve.S.h(yt/2+a.focus.x,hi+ft),zt=Math.max(zt,z.width),se=Math.max(se,hi+ft+z.height),hi+=ft+z.height):(ve.S.h(pi+ft,yt/2+a.focus.y),zt=Math.max(zt,pi+ft+z.width),se=Math.max(se,z.height),pi+=ft+z.width),vn++}ge=Sl(this,2),ve=Sl(this,2),y?(ge[0].h(0,0),ge[1].h(0,se),ve[0].h(zt,0)):(ge[0].h(0,0),ge[1].h(zt,0),ve[0].h(0,se)),ve[1].h(zt,se)}else for(eo=0;eo<rt;eo++){var Fo=tt[eo],Vs=Fo.Da;if(y){0<ft&&0<vn&&pi+yt+Vs.width>ft&&(pi<z&&rf(a,ot,z-pi,0,lr,eo-1),In++,vn=0,lr=eo,he=se,pi=0,hi=135<b?-se-kt:se+kt),hm(this,Fo,0,hi);var Xs=0;if(vn===0)ge=Fo.Yo,ve=Fo.kp,_e=Vs.width,jn=Vs.height,(ge===null||ve===null||b!==_u(Fo))&&(ge=Sl(this,2),ve=Sl(this,2),ge[0].h(0,0),ge[1].h(0,jn),ve[0].h(_e,0),ve[1].h(_e,jn));else{var _a=An();jn=pw(this,a,Fo,ge,ve,_e,jn,_a),Xs=jn.x,ge=_a[0],ve=_a[1],_e=jn.width,jn=jn.height,Nn(_a),pi<Vs.width&&0>Xs&&(Zf(a,-Xs,0,lr,eo-1),cm(ge,-Xs,0),cm(ve,-Xs,0),Xs=0)}Fo.S.h(Xs,hi),zt=Math.max(zt,_e),se=Math.max(se,he+(In===0?0:kt)+Vs.height),pi=_e}else 0<ft&&0<vn&&hi+yt+Vs.height>ft&&(hi<z&&rf(a,ot,0,z-hi,lr,eo-1),In++,vn=0,lr=eo,he=zt,hi=0,pi=135<b?-zt-kt:zt+kt),hm(this,Fo,pi,0),Xs=0,vn===0?(ge=Fo.Yo,ve=Fo.kp,_e=Vs.width,jn=Vs.height,(ge===null||ve===null||b!==_u(Fo))&&(ge=Sl(this,2),ve=Sl(this,2),ge[0].h(0,0),ge[1].h(_e,0),ve[0].h(0,jn),ve[1].h(_e,jn))):(_a=An(),jn=pw(this,a,Fo,ge,ve,_e,jn,_a),Xs=jn.x,ge=_a[0],ve=_a[1],_e=jn.width,jn=jn.height,Nn(_a),hi<Vs.height&&0>Xs&&(Zf(a,0,-Xs,lr,eo-1),cm(ge,0,-Xs),cm(ve,0,-Xs),Xs=0)),Fo.S.h(pi,Xs),se=Math.max(se,jn),zt=Math.max(zt,he+(In===0?0:kt)+Vs.width),hi=jn;vn++}switch(0<In&&(y?(se+=Math.max(0,x),pi<zt&&rf(a,ot,zt-pi,0,lr,rt-1),0<Dt&&(lt||Zf(a,Dt,0,0,rt-1),zt+=Dt)):(zt+=Math.max(0,x),hi<se&&rf(a,ot,0,se-hi,lr,rt-1),0<Dt&&(lt||Zf(a,0,Dt,0,rt-1),se+=Dt))),Dt=lt=0,ot){case Rg:y?lt+=zt/2-a.focus.x-Et/2:Dt+=se/2-a.focus.y-Et/2;break;case Xf:0<In?y?lt+=zt/2-a.focus.x-Et/2:Dt+=se/2-a.focus.y-Et/2:y?(qi=tt[0].S.x+tt[0].la.x,lt+=qi+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-qi)/2-a.focus.x-Et/2):(qi=tt[0].S.y+tt[0].la.y,Dt+=qi+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-qi)/2-a.focus.y-Et/2);break;case sh:y?(lt-=Et,zt+=Et):(Dt-=Et,se+=Et);break;case ah:y?(lt+=zt-a.width+Et,zt+=Et):(Dt+=se-a.height+Et,se+=Et);break;case Fc:y?1<rt?lt+=qi+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Dt+=qi+yt/2-a.focus.y:Dt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ec:y?lt+=zt+yt/2-a.focus.x:Dt+=se+yt/2-a.focus.y;break;case kh:break;default:se=this.customAlignment(a,lt,Dt,zt,se),lt=se[0],Dt=se[1],zt=se[2],se=se[3]}for(Et=0;Et<rt;Et++)qi=tt[Et],y?qi.S.h(qi.S.x+qi.la.x-lt,qi.S.y+(135<b?(ut?-se:-qi.Da.height)+qi.la.y-x:Jt+x+qi.la.y)):qi.S.h(qi.S.x+(135<b?(ut?-zt:-qi.Da.width)+qi.la.x-x:E+x+qi.la.x),qi.S.y+qi.la.y-Dt);if(rt=tt=0,ut?y?(zt=Vv(a,zt,lt),0>lt&&(lt=0),135<b&&(Dt+=se+x),se+=Jt+x,ot===kh&&(tt+=yt/2+a.focus.x),rt+=Jt+x):(135<b&&(lt+=zt+x),zt+=E+x,se=Wv(a,se,Dt),0>Dt&&(Dt=0),ot===kh&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>zt&&(zt=Zv(ot,E-zt,0),tt=zt.x,rt=zt.y,zt=E,lt=0):zt=Vv(a,zt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Dt+=se+x),se=Math.max(Math.max(se,Jt),se+Jt+x),rt+=Jt+x):(135<b&&(lt+=zt+x),zt=Math.max(Math.max(zt,E),zt+E+x),a.comments===null?Jt>se&&(se=Zv(ot,0,Jt-se),tt=se.x,rt=se.y,se=Jt,Dt=0):se=Wv(a,se,Dt),0>Dt&&(rt-=Dt,Dt=0),tt+=E+x),0<In)b=Sl(this,4),In=Sl(this,4),y?(b[2].h(0,Jt+x),b[3].h(b[2].x,se),In[2].h(zt,b[2].y),In[3].h(In[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(zt,b[2].y),In[2].h(b[2].x,se),In[3].h(b[3].x,In[2].y));else{for(b=Sl(this,ge.length+2),In=Sl(this,ve.length+2),ot=0;ot<ge.length;ot++)ut=ge[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<ve.length;ot++)ut=ve[ot],In[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(lt,0),b[1].h(b[0].x,Jt),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])),In[0].h(lt+E,0),In[1].h(In[0].x,Jt),In[2].y<In[1].y&&(In[2].x<In[0].x?In[2].assign(In[1]):In[1].assign(In[2])),In[3].y<In[2].y&&(In[3].x<In[0].x?In[3].assign(In[2]):In[2].assign(In[3])),b[2].y-=x/2,In[2].y-=x/2):(b[0].h(0,Dt),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])),In[0].h(0,Dt+Jt),In[1].h(E,In[0].y),In[2].x<In[1].x&&(In[2].y<In[0].y?In[2].assign(In[1]):In[1].assign(In[2])),In[3].x<In[2].x&&(In[3].y<In[0].y?In[3].assign(In[2]):In[2].assign(In[3])),b[2].x-=x/2,In[2].x-=x/2),rA(this,ge),rA(this,ve),a.Yo=b,a.kp=In,a.la.h(lt,Dt),a.Da.h(zt,se)}break;default:te("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=pd(x));var b=jv(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=_u(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,ut=lt===sh,ft=lt===ah;rt=pd(lt);var yt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var Et=y.nodeSpacing,kt=a.computeNodeIndent(y),Dt=ut||ft?0:kt/2,Jt=y.rowSpacing,zt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(zt=Math.max(0,y.rowIndent)),ut=y.width;var se=y.height,he=0,ge=0,ve=0,_e=0,jn=0,pi=0,hi=0,In=0,vn=0,lr=0;if(rt&&!Hp(lt)&&135<E&&b.reverse(),Hp(lt))if(1<tt)for(var qi=0;qi<tt;qi++){var eo=b[qi],Fo=eo.Da;qi%2===0&&qi!==tt-1?vn=Math.max(vn,(x?Fo.width:Fo.height)+a.computeBusNodeSpacing(eo)-Et):qi%2!==0&&(lr=Math.max(lr,(x?Fo.width:Fo.height)+a.computeBusNodeSpacing(eo)-Et))}else tt===1&&(vn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case Fc:case lh:ge=135>E?fw(a,y,b,vn,he,ge):gw(a,y,b,vn,he,ge),vn=ge.x,he=ge.width,ge=ge.height;break;case Ec:for(yt=0;yt<tt;yt++)Dt=b[yt],ve=Dt.Da,lr=hi===0?0:Jt,x?(Dt.S.h(z-ve.width,jn+lr),he=Math.max(he,ve.width),ge=Math.max(ge,jn+lr+ve.height),jn+=lr+ve.height):(Dt.S.h(_e+lr,z-ve.height),he=Math.max(he,_e+lr+ve.width),ge=Math.max(ge,ve.height),_e+=lr+ve.width),hi++;break;case kh:for(z=0;z<tt;z++)yt=b[z],Dt=yt.Da,ve=hi===0?0:Jt,x?(yt.S.h(Et/2+y.focus.x,jn+ve),he=Math.max(he,Dt.width),ge=Math.max(ge,jn+ve+Dt.height),jn+=ve+Dt.height):(yt.S.h(_e+ve,Et/2+y.focus.y),he=Math.max(he,_e+ve+Dt.width),ge=Math.max(ge,Dt.height),_e+=ve+Dt.width),hi++}else for(lr=0;lr<tt;lr++)qi=b[lr],eo=qi.Da,x?(0<yt&&0<hi&&_e+Et+eo.width>yt&&(_e<z&&rf(y,lt,z-_e,0,In,lr-1),pi++,hi=0,In=lr,ve=ge,_e=0,jn=135<E?-ge-Jt:ge+Jt),Fo=hi===0?Dt:Et,hm(a,qi,0,jn),qi.S.h(_e+Fo,jn),he=Math.max(he,_e+Fo+eo.width),ge=Math.max(ge,ve+(pi===0?0:Jt)+eo.height),_e+=Fo+eo.width):(0<yt&&0<hi&&jn+Et+eo.height>yt&&(jn<z&&rf(y,lt,0,z-jn,In,lr-1),pi++,hi=0,In=lr,ve=he,jn=0,_e=135<E?-he-Jt:he+Jt),Fo=hi===0?Dt:Et,hm(a,qi,_e,0),qi.S.h(_e,jn+Fo),ge=Math.max(ge,jn+Fo+eo.height),he=Math.max(he,ve+(pi===0?0:Jt)+eo.width),jn+=Fo+eo.height),hi++;switch(0<pi&&(x?(ge+=Math.max(0,ot),_e<he&&rf(y,lt,he-_e,0,In,tt-1),0<zt&&(ft||Zf(y,zt,0,0,tt-1),he+=zt)):(he+=Math.max(0,ot),jn<ge&&rf(y,lt,0,ge-jn,In,tt-1),0<zt&&(ft||Zf(y,0,zt,0,tt-1),ge+=zt))),zt=ft=0,lt){case Rg:x?ft+=he/2-y.focus.x-kt/2:zt+=ge/2-y.focus.y-kt/2;break;case Xf:0<pi?x?ft+=he/2-y.focus.x-kt/2:zt+=ge/2-y.focus.y-kt/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-kt/2):(a=b[0].S.y+b[0].la.y,zt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-kt/2);break;case sh:x?(ft-=kt,he+=kt):(zt-=kt,ge+=kt);break;case ah:x?(ft+=he-y.width+kt,he+=kt):(zt+=ge-y.height+kt,ge+=kt);break;case Fc:case lh:x?1<tt?ft+=vn+Et/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?zt+=vn+Et/2-y.focus.y:zt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ec:x?ft+=he+Et/2-y.focus.x:zt+=ge+Et/2-y.focus.y;break;case kh:break;default:a=a.customAlignment(y,ft,zt,he,ge),ft=a[0],zt=a[1],he=a[2],ge=a[3]}for(a=0;a<tt;a++)kt=b[a],x?kt.S.h(kt.S.x+kt.la.x-ft,kt.S.y+(135<E?(rt?-ge:-kt.Da.height)+kt.la.y-ot:se+ot+kt.la.y)):kt.S.h(kt.S.x+(135<E?(rt?-he:-kt.Da.width)+kt.la.x-ot:ut+ot+kt.la.x),kt.S.y+kt.la.y-zt);x?(he=Vv(y,he,ft),0>ft&&(ft=0),135<E&&(zt+=ge+ot),ge=Math.max(Math.max(ge,se),ge+se+ot)):(135<E&&(ft+=he+ot),he=Math.max(Math.max(he,ut),he+ut+ot),ge=Wv(y,ge,zt),0>zt&&(zt=0)),y.la.h(ft,zt),y.Da.h(he,ge)}}Ir.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 He(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new He(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=_u(y)===90,ut=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var kt=x[Et],Dt=kt.Da,Jt=ut===0?0:ot;if(lt){var zt=a.computeBusNodeSpacing(kt)-rt;kt.S.h(E-(Dt.width+zt),yt+Jt),b=Math.max(b,Dt.width+zt),z=Math.max(z,yt+Jt+Dt.height),yt+=Jt+Dt.height}else zt=a.computeBusNodeSpacing(kt)-rt,kt.S.h(ft+Jt,E-(Dt.height+zt)),z=Math.max(z,Dt.height+zt),b=Math.max(b,ft+Jt+Dt.width),ft+=Jt+Dt.width;ut++}for(ut=0,kt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){Jt=x[Dt],zt=Jt.Da;var se=ut===0?0:ot;if(lt){var he=a.computeBusNodeSpacing(Jt)-rt;Jt.S.h(ft+he,yt+se),b=Math.max(b,ft+zt.width+he),z=Math.max(z,yt+se+zt.height),yt+=se+zt.height}else he=a.computeBusNodeSpacing(Jt)-rt,Jt.S.h(ft+se,yt+he),b=Math.max(b,ft+se+zt.width),z=Math.max(z,yt+zt.height+he),ft+=se+zt.width;ut++}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(kt),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(kt,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 He(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new He(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new He(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=_u(y)===270,ut=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var kt=x[Et],Dt=kt.Da,Jt=ut===0?0:ot;if(lt){var zt=a.computeBusNodeSpacing(kt)-rt;yt-=Jt+Dt.height,kt.S.h(E-(Dt.width+zt),yt),b=Math.max(b,Dt.width+zt),z=Math.max(z,Math.abs(yt))}else zt=a.computeBusNodeSpacing(kt)-rt,ft-=Jt+Dt.width,kt.S.h(ft,E-(Dt.height+zt)),z=Math.max(z,Dt.height+zt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,kt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){Jt=x[Dt],zt=Jt.Da;var se=ut===0?0:ot;if(lt){var he=a.computeBusNodeSpacing(Jt)-rt;yt-=se+zt.height,Jt.S.h(ft+he,yt),b=Math.max(b,ft+zt.width+he),z=Math.max(z,Math.abs(yt))}else he=a.computeBusNodeSpacing(Jt)-rt,ft-=se+zt.width,Jt.S.h(ft,yt+he),z=Math.max(z,yt+zt.height+he),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,lt?Math.max(Math.abs(Et),Math.abs(yt)):Math.max(Math.abs(kt),Math.abs(ft))),lt?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(Et,yt))+a+ut.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(kt,ft))+a+ut.width),yt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,yt+ut.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 He(E,0,b,z)}Ir.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ir.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function 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 Xf:case Rg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case sh:return a.width>y?a.width:y;case ah:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Fc:case lh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ec:return a.width-a.focus.x+a.nodeSpacing/2+y;case kh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Wv(a,y,x){switch(a.alignment){case Xf:case Rg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case sh:return a.height>y?a.height:y;case ah:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Fc:case lh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ec:return a.height-a.focus.y+a.nodeSpacing/2+y;case kh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zv(a,y,x){switch(a){case Rg:y/=2,x/=2;break;case Xf:y/=2,x/=2;break;case sh:x=y=0;break;case ah:break;default:te("Unhandled alignment value "+a.toString())}return new Ut(y,x)}function rf(a,y,x,E,b,z){y=Zv(y,x,E),Zf(a,y.x,y.y,b,z)}function Zf(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 oh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Yf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:te("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=_u(y),lt=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var yt=tt,Et=x.Yo,kt=x.kp;tt=x.Da;var Dt=lt?Math.max(yt,tt.height):Math.max(E,tt.width);if((Et===null||ot!==_u(x))&&(Et=Sl(a,2),kt=Sl(a,2),lt?(Et[0].h(0,0),Et[1].h(0,tt.height),kt[0].h(tt.width,0),kt[1].h(kt[0].x,Et[1].y)):(Et[0].h(0,0),Et[1].h(tt.width,0),kt[0].h(0,tt.height),kt[1].h(Et[1].x,kt[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 Jt=Et[b];ot=Jt.x,lt=Jt.y,ot+=E;var zt=z;x+1<ft.length&&(zt=ft[x+1]);var se=Jt;Jt=se.x,se=se.y,b+1<Et.length&&(se=Et[b+1],Jt=se.x,se=se.y,Jt+=E);var he=yt;z.y===lt?he=ot-z.x:z.y>lt&&z.y<se?he=ot+(z.y-lt)/(se-lt)*(Jt-ot)-z.x:lt>z.y&&lt<zt.y&&(he=ot-(z.x+(lt-z.y)/(zt.y-z.y)*(zt.x-z.x))),he<yt&&(yt=he),zt.y<=z.y?x++:se<=lt?b++:(zt.y<=se&&x++,se<=zt.y&&b++)}if(yt=E-yt,yt+=ut,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Sl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(;ot<y.length;)lt=y[ot++],ut[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++],ut[E++].h(lt.x+b,lt.y);for(x=Sl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);rA(a,ut),E=x}if(z=kt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Sl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)zt=ft[x++],ut[b++].h(zt.x,zt.y);for(;lt<z.length;)zt=z[lt++],ut[b++].h(zt.x+ot,zt.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++],ut[b++].h(ot.x,ot.y);for(z=Sl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);rA(a,ut),b=z}return z=Math.max(0,yt)+tt.width,tt=Dt,rA(a,y),rA(a,Et),rA(a,ft),rA(a,kt),rt[0]=E,rt[1]=b,new He(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],Jt=Et[b],ot=Jt.x,lt=Jt.y,lt+=yt,zt=z,x+1<ft.length&&(zt=ft[x+1]),se=Jt,Jt=se.x,se=se.y,b+1<Et.length&&(se=Et[b+1],Jt=se.x,se=se.y,se+=yt),he=E,z.x===ot?he=lt-z.y:z.x>ot&&z.x<Jt?he=lt+(z.x-ot)/(Jt-ot)*(se-lt)-z.y:ot>z.x&&ot<zt.x&&(he=lt-(z.y+(ot-z.x)/(zt.x-z.x)*(zt.y-z.y))),he<E&&(E=he),zt.x<=z.x?x++:Jt<=ot?b++:(zt.x<=Jt&&x++,Jt<=zt.x&&b++);if(yt-=E,yt+=ut,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Sl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(;ot<y.length;)lt=y[ot++],ut[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++],ut[E++].h(lt.x,lt.y+b);for(x=Sl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);rA(a,ut),E=x}if(z=kt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Sl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)zt=ft[x++],ut[b++].h(zt.x,zt.y);for(;lt<z.length;)zt=z[lt++],ut[b++].h(zt.x,zt.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++],ut[b++].h(ot.x,ot.y);for(z=Sl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);rA(a,ut),b=z}return z=Dt,tt=Math.max(0,yt)+tt.height,rA(a,y),rA(a,Et),rA(a,ft),rA(a,kt),rt[0]=E,rt[1]=b,new He(yt,0,z,tt)}function Sl(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 Ut;return a}function rA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Ir.prototype.arrangeTrees=function(){if(this.Rb===mm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof mu){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 mu&&a.push(x);switch(this.sorting){case Hg:break;case Rp:a.reverse();break;case _p:a.sort(this.comparer);break;case Kp:a.sort(this.comparer),a.reverse();break;default:te("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:te("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)}}}Ir.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ir.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ir.prototype.Gu=function(){if(this.layerStyle===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 Ut(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Ut(-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 He(0,z,x,rt))):this.angle===90?(b.push(new He(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new He(z,0,rt,x))):(b.push(new He(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Ir.prototype.commitLayers=function(){},Ir.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ir.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof mu&&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])}}Ir.prototype.setPortSpots=function(a){var y=a.alignment;if(pd(y)){var x=this.ud===oh,E=_u(a);switch(E){case 0:var b=ms;break;case 90:b=Js;break;case 180:b=ns;break;default:b=Ds}var z=a.children,tt=z.length;switch(y){case Fc:case lh: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?ns:Ds;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=ns;break;case 90:ot=Ds;break;case 180:ot=ms;break;default:ot=Js}else y%2===0&&(ot=E===90||E===270?ms:Js);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ec:for(E=E===90||E===270?ms:Js,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 kh:for(E=E===90||E===270?ns:Ds,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=_u(a),this.ud===oh){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=ms;break;case 90:E.fromSpot=Js;break;case 180:E.fromSpot=ns;break;default:E.fromSpot=Ds}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=ns;break;case 90:E.toSpot=Ds;break;case 180:E.toSpot=ms;break;default:E.toSpot=Js}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=ms;break;case 90:E.toSpot=Js;break;case 180:E.toSpot=ns;break;default:E.toSpot=Ds}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=ns;break;case 90:E.fromSpot=Ds;break;case 180:E.fromSpot=ms;break;default:E.fromSpot=Js}else E.fromSpot=a.childPortSpot}};function _u(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ir.prototype.computeLayerSpacing=function(a){var y=_u(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},Ir.prototype.computeNodeIndent=function(a){var y=_u(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)},Ke.Object.defineProperties(Ir.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==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!==Hg&&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()):te("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!==Hg&&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 hn(Ir,"PathDefault",-1),oh=new hn(Ir,"PathDestination",0),Yf=new hn(Ir,"PathSource",1),Hg=new hn(Ir,"SortingForwards",10),Rp=new hn(Ir,"SortingReverse",11),_p=new hn(Ir,"SortingAscending",12),Kp=new hn(Ir,"SortingDescending",13),Rg=new hn(Ir,"AlignmentCenterSubtrees",20),Xf=new hn(Ir,"AlignmentCenterChildren",21),sh=new hn(Ir,"AlignmentStart",22),ah=new hn(Ir,"AlignmentEnd",23),Fc=new hn(Ir,"AlignmentBus",24),lh=new hn(Ir,"AlignmentBusBranching",25),Ec=new hn(Ir,"AlignmentTopLeftBus",26),kh=new hn(Ir,"AlignmentBottomRightBus",27),fm=new hn(Ir,"CompactionNone",30),Gp=new hn(Ir,"CompactionBlock",31),gm=new hn(Ir,"StyleLayered",40),Xv=new hn(Ir,"StyleLastParents",41),Jv=new hn(Ir,"StyleAlternating",42),qv=new hn(Ir,"StyleRootOnly",43),pm=new hn(Ir,"ArrangementVertical",50),$v=new hn(Ir,"ArrangementHorizontal",51),mm=new hn(Ir,"ArrangementFixedRoots",52),ty=new hn(Ir,"LayerIndividual",60),ey=new hn(Ir,"LayerSiblings",61),vm=new hn(Ir,"LayerUniform",62);Ir.className="TreeLayout",Ir.PathDefault=dm,Ir.PathDestination=oh,Ir.PathSource=Yf,Ir.SortingForwards=Hg,Ir.SortingReverse=Rp,Ir.SortingAscending=_p,Ir.SortingDescending=Kp,Ir.AlignmentCenterSubtrees=Rg,Ir.AlignmentCenterChildren=Xf,Ir.AlignmentStart=sh,Ir.AlignmentEnd=ah,Ir.AlignmentBus=Fc,Ir.AlignmentBusBranching=lh,Ir.AlignmentTopLeftBus=Ec,Ir.AlignmentBottomRightBus=kh,Ir.CompactionNone=fm,Ir.CompactionBlock=Gp,Ir.StyleLayered=gm,Ir.StyleLastParents=Xv,Ir.StyleAlternating=Jv,Ir.StyleRootOnly=qv,Ir.ArrangementVertical=pm,Ir.ArrangementHorizontal=$v,Ir.ArrangementFixedRoots=mm,Ir.LayerIndividual=ty,Ir.LayerSiblings=ey,Ir.LayerUniform=vm;function Jf(a){bo.call(this,a)}Je(Jf,bo),Jf.prototype.createVertex=function(){return new mu(this)},Jf.prototype.createEdge=function(){return new _g(this)},Jf.className="TreeNetwork";function mu(a){_s.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 Ut(0,0),this.Da=new ln(0,0),this.la=new Ut(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Hg,this.hd=xv,this.Kb=0,this.Jb=Xf,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=ws,this.wr=!0,this.Dp=ws}Je(mu,_s),mu.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)},Ke.Object.defineProperties(mu.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)}}}),mu.className="TreeVertex";function _g(a){Dl.call(this,a),this.$t=new Ut(0,0)}Je(_g,Dl),_g.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 oh:x=this.fromVertex,E=this.toVertex;break;case Yf:x=this.toVertex,E=this.fromVertex;break;default:te("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=_u(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===Yl,lt=a.isOrthogonal,ut;if(a.uh(),lt||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),yt=a.i(2)}else{for(ut=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===ah?(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===sh?(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(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===90?(x.alignment===ah?(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===sh?(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(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):z===180?(x.alignment===ah?(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===sh?(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(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===270?(x.alignment===ah?(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===sh?(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(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):te("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=_u(x),y!==_u(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===Yl,b=a.isOrthogonal,E=pd(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()))}}},Ke.Object.defineProperties(_g.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)}}}),_g.className="TreeEdge",Eo.prototype.initializeStandardTools=function(){this.gb("Action",new Kl,this.mouseDownTools),this.gb("Relinking",new gl,this.mouseDownTools),this.gb("LinkReshaping",new fs,this.mouseDownTools),this.gb("Rotating",new Ma,this.mouseDownTools),this.gb("Resizing",new Aa,this.mouseDownTools),this.gb("Linking",new ua,this.mouseMoveTools),this.gb("Dragging",new _o,this.mouseMoveTools),this.gb("DragSelecting",new Ll,this.mouseMoveTools),this.gb("Panning",new ia,this.mouseMoveTools),this.gb("ContextMenu",new ba,this.mouseUpTools),this.gb("TextEditing",new ko,this.mouseUpTools),this.gb("ClickCreating",new QA,this.mouseUpTools),this.gb("ClickSelecting",new gh,this.mouseUpTools)},FA("Horizontal",new No),FA("Spot",new As),FA("Table",new Fa),FA("Viewbox",new Rs),FA("TableRow",new kl),FA("TableColumn",new Zl),FA("Graduated",new PA),FA("Grid",new Ra),Gd.add("GraphLinksModel",Ys),Gd.add("TreeModel",ru);var ym=Hn.go,ny={get licenseKey(){return Re.licenseKey},set licenseKey(a){Re.licenseKey=a},get version(){return Re.version},Group:ur,EnumValue:hn,List:ne,Set:Be,Map:Ue,Point:Ut,Size:ln,Rect:He,Margin:ar,Spot:di,Geometry:bn,PathFigure:xs,PathSegment:jr,InputEvent:zs,DiagramEvent:ju,ChangedEvent:Oo,Model:Pi,GraphLinksModel:Gr,TreeModel:qa,Binding:Ps,Transaction:Ms,UndoManager:zo,CommandHandler:Yt,Tool:zr,DraggingTool:_o,DraggingInfo:qu,DraggingOptions:st,LinkingBaseTool:ls,LinkingTool:ua,RelinkingTool:gl,LinkReshapingTool:fs,ResizingTool:Aa,RotatingTool:Ma,ClickSelectingTool:gh,ActionTool:Kl,ClickCreatingTool:QA,HTMLInfo:Pu,ContextMenuTool:ba,DragSelectingTool:Ll,PanningTool:ia,TextEditingTool:ko,ToolManager:Eo,Animation:ra,AnimationManager:ol,AnimationTrigger:tu,Layer:Gs,Diagram:Re,Palette:dt,Overview:gt,Brush:Ao,GraphObject:ye,Panel:Sn,RowColumnDefinition:Ts,Shape:mr,TextBlock:Mo,Picture:Al,Part:Di,Adornment:Jr,Node:Jn,Link:Qn,Placeholder:Za,Layout:Vo,LayoutNetwork:bo,LayoutVertex:_s,LayoutEdge:Dl,GridLayout:sa,PanelLayout:ho,CircularLayout:ts,CircularNetwork:Ug,CircularVertex:Np,CircularEdge:$0,ForceDirectedLayout:xa,ForceDirectedNetwork:Wf,ForceDirectedVertex:Dp,ForceDirectedEdge:Ip,LayeredDigraphLayout:mo,LayeredDigraphNetwork:Og,LayeredDigraphVertex:su,LayeredDigraphEdge:Op,TreeLayout:Ir,TreeNetwork:Jf,TreeVertex:mu,TreeEdge:_g};typeof ym=="object"&&ym.version&&ni("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),Re.prototype.go=ny,Hn.go=ny,typeof xn.exports=="object"&&(xn.exports=typeof Qt.g!="undefined"?Qt.g.go:self.go)}();var Ct=typeof Qt.g!="undefined"?Qt.g.go:self.go;const ee=typeof Qt.g!="undefined"?Qt.g.go:self.go,ue=ee.Group,Se=ee.EnumValue,de=ee.List,Ht=ee.Set,ie=ee.Map,Ae=ee.Point,re=ee.Size,Wt=ee.Rect,Ie=ee.Margin,Xt=ee.Spot,Ee=ee.Geometry,It=ee.PathFigure,nt=ee.PathSegment,et=ee.InputEvent,At=ee.DiagramEvent,at=ee.ChangedEvent,ct=ee.Model,pt=ee.GraphLinksModel,xt=ee.TreeModel,bt=ee.Binding,Rt=ee.Transaction,Ot=ee.UndoManager,Zt=ee.CommandHandler,Vt=ee.Tool,$t=ee.DraggingTool,Ce=ee.DraggingInfo,fe=ee.LinkingBaseTool,rn=ee.LinkingTool,tn=ee.RelinkingTool,Bn=ee.LinkReshapingTool,Fn=ee.ResizingTool,kn=ee.RotatingTool,Gn=ee.ClickSelectingTool,ti=ee.ActionTool,me=ee.ClickCreatingTool,oe=ee.HTMLInfo,Cn=ee.ContextMenuTool,li=ee.DragSelectingTool,ai=ee.PanningTool,sn=ee.TextEditingTool,Rn=ee.ToolManager,ri=ee.Animation,Ui=ee.AnimationManager,en=ee.AnimationTrigger,ei=ee.Layer,Fe=ee.Diagram,ci=ee.Palette,Ti=ee.Overview,jt=ee.Brush,Mt=ee.GraphObject,mt=ee.Panel,vt=ee.RowColumnDefinition,Lt=ee.Shape,Bt=ee.TextBlock,_t=ee.TextBlockMetrics,Le=ee.Picture,xe=ee.Part,Xe=ee.Adornment,Me=ee.Node,De=ee.Link,Oe=ee.Placeholder,nn=ee.Layout,mn=ee.LayoutNetwork,On=ee.LayoutVertex,yn=ee.LayoutEdge,ui=ee.GridLayout,oi=ee.PanelLayout,gi=ee.CircularLayout,bi=ee.CircularNetwork,cr=ee.CircularVertex,Ei=ee.CircularEdge,Ri=ee.ForceDirectedLayout,Ki=ee.ForceDirectedNetwork,_r=ee.ForceDirectedVertex,Ji=ee.ForceDirectedEdge,Er=ee.LayeredDigraphLayout,yr=ee.LayeredDigraphNetwork,Vr=ee.LayeredDigraphVertex,Zi=ee.LayeredDigraphEdge,oo=ee.TreeLayout,xo=ee.TreeNetwork,no=ee.TreeVertex,br=ee.TreeEdge,uo=ee.version},64270:function(xn){(function(ze,Qt){xn.exports=Qt()})(this,function(){"use strict";var ze=function(St,wt){return ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Pt){Ft.__proto__=Pt}||function(Ft,Pt){for(var Gt in Pt)Object.prototype.hasOwnProperty.call(Pt,Gt)&&(Ft[Gt]=Pt[Gt])},ze(St,wt)};function Qt(St,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");ze(St,wt);function Ft(){this.constructor=St}St.prototype=wt===null?Object.create(wt):(Ft.prototype=wt.prototype,new Ft)}var Ct=function(){return Ct=Object.assign||function(wt){for(var Ft,Pt=1,Gt=arguments.length;Pt<Gt;Pt++){Ft=arguments[Pt];for(var le in Ft)Object.prototype.hasOwnProperty.call(Ft,le)&&(wt[le]=Ft[le])}return wt},Ct.apply(this,arguments)};function ee(St,wt,Ft,Pt){function Gt(le){return le instanceof Ft?le:new Ft(function(Pe){Pe(le)})}return new(Ft||(Ft=Promise))(function(le,Pe){function Ze(Dn){try{En(Pt.next(Dn))}catch($n){Pe($n)}}function Qe(Dn){try{En(Pt.throw(Dn))}catch($n){Pe($n)}}function En(Dn){Dn.done?le(Dn.value):Gt(Dn.value).then(Ze,Qe)}En((Pt=Pt.apply(St,wt||[])).next())})}function ue(St,wt){var Ft={label:0,sent:function(){if(le[0]&1)throw le[1];return le[1]},trys:[],ops:[]},Pt,Gt,le,Pe;return Pe={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(Pe[Symbol.iterator]=function(){return this}),Pe;function Ze(En){return function(Dn){return Qe([En,Dn])}}function Qe(En){if(Pt)throw new TypeError("Generator is already executing.");for(;Ft;)try{if(Pt=1,Gt&&(le=En[0]&2?Gt.return:En[0]?Gt.throw||((le=Gt.return)&&le.call(Gt),0):Gt.next)&&!(le=le.call(Gt,En[1])).done)return le;switch(Gt=0,le&&(En=[En[0]&2,le.value]),En[0]){case 0:case 1:le=En;break;case 4:return Ft.label++,{value:En[1],done:!1};case 5:Ft.label++,Gt=En[1],En=[0];continue;case 7:En=Ft.ops.pop(),Ft.trys.pop();continue;default:if(le=Ft.trys,!(le=le.length>0&&le[le.length-1])&&(En[0]===6||En[0]===2)){Ft=0;continue}if(En[0]===3&&(!le||En[1]>le[0]&&En[1]<le[3])){Ft.label=En[1];break}if(En[0]===6&&Ft.label<le[1]){Ft.label=le[1],le=En;break}if(le&&Ft.label<le[2]){Ft.label=le[2],Ft.ops.push(En);break}le[2]&&Ft.ops.pop(),Ft.trys.pop();continue}En=wt.call(St,Ft)}catch(Dn){En=[6,Dn],Gt=0}finally{Pt=le=0}if(En[0]&5)throw En[1];return{value:En[0]?En[1]:void 0,done:!0}}}function Se(St,wt,Ft){if(Ft||arguments.length===2)for(var Pt=0,Gt=wt.length,le;Pt<Gt;Pt++)(le||!(Pt in wt))&&(le||(le=Array.prototype.slice.call(wt,0,Pt)),le[Pt]=wt[Pt]);return St.concat(le||wt)}for(var de=function(){function St(wt,Ft,Pt,Gt){this.left=wt,this.top=Ft,this.width=Pt,this.height=Gt}return St.prototype.add=function(wt,Ft,Pt,Gt){return new St(this.left+wt,this.top+Ft,this.width+Pt,this.height+Gt)},St.fromClientRect=function(wt,Ft){return new St(Ft.left+wt.windowBounds.left,Ft.top+wt.windowBounds.top,Ft.width,Ft.height)},St.fromDOMRectList=function(wt,Ft){var Pt=Array.from(Ft).find(function(Gt){return Gt.width!==0});return Pt?new St(Pt.left+wt.windowBounds.left,Pt.top+wt.windowBounds.top,Pt.width,Pt.height):St.EMPTY},St.EMPTY=new St(0,0,0,0),St}(),Ht=function(St,wt){return de.fromClientRect(St,wt.getBoundingClientRect())},ie=function(St){var wt=St.body,Ft=St.documentElement;if(!wt||!Ft)throw new Error("Unable to get document size");var Pt=Math.max(Math.max(wt.scrollWidth,Ft.scrollWidth),Math.max(wt.offsetWidth,Ft.offsetWidth),Math.max(wt.clientWidth,Ft.clientWidth)),Gt=Math.max(Math.max(wt.scrollHeight,Ft.scrollHeight),Math.max(wt.offsetHeight,Ft.offsetHeight),Math.max(wt.clientHeight,Ft.clientHeight));return new de(0,0,Pt,Gt)},Ae=function(St){for(var wt=[],Ft=0,Pt=St.length;Ft<Pt;){var Gt=St.charCodeAt(Ft++);if(Gt>=55296&&Gt<=56319&&Ft<Pt){var le=St.charCodeAt(Ft++);(le&64512)===56320?wt.push(((Gt&1023)<<10)+(le&1023)+65536):(wt.push(Gt),Ft--)}else wt.push(Gt)}return wt},re=function(){for(var St=[],wt=0;wt<arguments.length;wt++)St[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,St);var Ft=St.length;if(!Ft)return"";for(var Pt=[],Gt=-1,le="";++Gt<Ft;){var Pe=St[Gt];Pe<=65535?Pt.push(Pe):(Pe-=65536,Pt.push((Pe>>10)+55296,Pe%1024+56320)),(Gt+1===Ft||Pt.length>16384)&&(le+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return le},Wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ie=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Xt=0;Xt<Wt.length;Xt++)Ie[Wt.charCodeAt(Xt)]=Xt;for(var Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",It=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<Ee.length;nt++)It[Ee.charCodeAt(nt)]=nt;for(var et=function(St){var wt=St.length*.75,Ft=St.length,Pt,Gt=0,le,Pe,Ze,Qe;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var En=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Dn=Array.isArray(En)?En:new Uint8Array(En);for(Pt=0;Pt<Ft;Pt+=4)le=It[St.charCodeAt(Pt)],Pe=It[St.charCodeAt(Pt+1)],Ze=It[St.charCodeAt(Pt+2)],Qe=It[St.charCodeAt(Pt+3)],Dn[Gt++]=le<<2|Pe>>4,Dn[Gt++]=(Pe&15)<<4|Ze>>2,Dn[Gt++]=(Ze&3)<<6|Qe&63;return En},At=function(St){for(var wt=St.length,Ft=[],Pt=0;Pt<wt;Pt+=2)Ft.push(St[Pt+1]<<8|St[Pt]);return Ft},at=function(St){for(var wt=St.length,Ft=[],Pt=0;Pt<wt;Pt+=4)Ft.push(St[Pt+3]<<24|St[Pt+2]<<16|St[Pt+1]<<8|St[Pt]);return Ft},ct=5,pt=11,xt=2,bt=pt-ct,Rt=65536>>ct,Ot=1<<ct,Zt=Ot-1,Vt=1024>>ct,$t=Rt+Vt,Ce=$t,fe=32,rn=Ce+fe,tn=65536>>pt,Bn=1<<bt,Fn=Bn-1,kn=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(St,wt,Ft))},Gn=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(St,wt,Ft))},ti=function(St,wt){var Ft=et(St),Pt=Array.isArray(Ft)?at(Ft):new Uint32Array(Ft),Gt=Array.isArray(Ft)?At(Ft):new Uint16Array(Ft),le=24,Pe=kn(Gt,le/2,Pt[4]/2),Ze=Pt[5]===2?kn(Gt,(le+Pt[4])/2):Gn(Pt,Math.ceil((le+Pt[4])/4));return new me(Pt[0],Pt[1],Pt[2],Pt[3],Pe,Ze)},me=function(){function St(wt,Ft,Pt,Gt,le,Pe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Pt,this.highValueIndex=Gt,this.index=le,this.data=Pe}return St.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>ct],Ft=(Ft<<xt)+(wt&Zt),this.data[Ft];if(wt<=65535)return Ft=this.index[Rt+(wt-55296>>ct)],Ft=(Ft<<xt)+(wt&Zt),this.data[Ft];if(wt<this.highStart)return Ft=rn-tn+(wt>>pt),Ft=this.index[Ft],Ft+=wt>>ct&Fn,Ft=this.index[Ft],Ft=(Ft<<xt)+(wt&Zt),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},St}(),oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),li=0;li<oe.length;li++)Cn[oe.charCodeAt(li)]=li;var ai="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==",sn=50,Rn=1,ri=2,Ui=3,en=4,ei=5,Fe=7,ci=8,Ti=9,jt=10,Mt=11,mt=12,vt=13,Lt=14,Bt=15,_t=16,Le=17,xe=18,Xe=19,Me=20,De=21,Oe=22,nn=23,mn=24,On=25,yn=26,ui=27,oi=28,gi=29,bi=30,cr=31,Ei=32,Ri=33,Ki=34,_r=35,Ji=36,Er=37,yr=38,Vr=39,Zi=40,oo=41,xo=42,no=43,br=[9001,65288],uo="!",Tt="\xD7",Gi="\xF7",Vi=ti(ai),xi=[bi,Ji],Oi=[Rn,ri,Ui,ei],zi=[jt,ci],or=[ui,yn],Yr=Oi.concat(zi),Tr=[yr,Vr,Zi,Ki,_r],je=[Bt,vt],Je=function(St,wt){wt===void 0&&(wt="strict");var Ft=[],Pt=[],Gt=[];return St.forEach(function(le,Pe){var Ze=Vi.get(le);if(Ze>sn?(Gt.push(!0),Ze-=sn):Gt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(le)!==-1)return Pt.push(Pe),Ft.push(_t);if(Ze===en||Ze===Mt){if(Pe===0)return Pt.push(Pe),Ft.push(bi);var Qe=Ft[Pe-1];return Yr.indexOf(Qe)===-1?(Pt.push(Pt[Pe-1]),Ft.push(Qe)):(Pt.push(Pe),Ft.push(bi))}if(Pt.push(Pe),Ze===cr)return Ft.push(wt==="strict"?De:Er);if(Ze===xo||Ze===gi)return Ft.push(bi);if(Ze===no)return le>=131072&&le<=196605||le>=196608&&le<=262141?Ft.push(Er):Ft.push(bi);Ft.push(Ze)}),[Pt,Ft,Gt]},Ke=function(St,wt,Ft,Pt){var Gt=Pt[Ft];if(Array.isArray(St)?St.indexOf(Gt)!==-1:St===Gt)for(var le=Ft;le<=Pt.length;){le++;var Pe=Pt[le];if(Pe===wt)return!0;if(Pe!==jt)break}if(Gt===jt)for(var le=Ft;le>0;){le--;var Ze=Pt[le];if(Array.isArray(St)?St.indexOf(Ze)!==-1:St===Ze)for(var Qe=Ft;Qe<=Pt.length;){Qe++;var Pe=Pt[Qe];if(Pe===wt)return!0;if(Pe!==jt)break}if(Ze!==jt)break}return!1},Ci=function(St,wt){for(var Ft=St;Ft>=0;){var Pt=wt[Ft];if(Pt===jt)Ft--;else return Pt}return 0},Ne=function(St,wt,Ft,Pt,Gt){if(Ft[Pt]===0)return Tt;var le=Pt-1;if(Array.isArray(Gt)&&Gt[le]===!0)return Tt;var Pe=le-1,Ze=le+1,Qe=wt[le],En=Pe>=0?wt[Pe]:0,Dn=wt[Ze];if(Qe===ri&&Dn===Ui)return Tt;if(Oi.indexOf(Qe)!==-1)return uo;if(Oi.indexOf(Dn)!==-1||zi.indexOf(Dn)!==-1)return Tt;if(Ci(le,wt)===ci)return Gi;if(Vi.get(St[le])===Mt||(Qe===Ei||Qe===Ri)&&Vi.get(St[Ze])===Mt||Qe===Fe||Dn===Fe||Qe===Ti||[jt,vt,Bt].indexOf(Qe)===-1&&Dn===Ti||[Le,xe,Xe,mn,oi].indexOf(Dn)!==-1||Ci(le,wt)===Oe||Ke(nn,Oe,le,wt)||Ke([Le,xe],De,le,wt)||Ke(mt,mt,le,wt))return Tt;if(Qe===jt)return Gi;if(Qe===nn||Dn===nn)return Tt;if(Dn===_t||Qe===_t)return Gi;if([vt,Bt,De].indexOf(Dn)!==-1||Qe===Lt||En===Ji&&je.indexOf(Qe)!==-1||Qe===oi&&Dn===Ji||Dn===Me||xi.indexOf(Dn)!==-1&&Qe===On||xi.indexOf(Qe)!==-1&&Dn===On||Qe===ui&&[Er,Ei,Ri].indexOf(Dn)!==-1||[Er,Ei,Ri].indexOf(Qe)!==-1&&Dn===yn||xi.indexOf(Qe)!==-1&&or.indexOf(Dn)!==-1||or.indexOf(Qe)!==-1&&xi.indexOf(Dn)!==-1||[ui,yn].indexOf(Qe)!==-1&&(Dn===On||[Oe,Bt].indexOf(Dn)!==-1&&wt[Ze+1]===On)||[Oe,Bt].indexOf(Qe)!==-1&&Dn===On||Qe===On&&[On,oi,mn].indexOf(Dn)!==-1)return Tt;if([On,oi,mn,Le,xe].indexOf(Dn)!==-1)for(var $n=le;$n>=0;){var Ni=wt[$n];if(Ni===On)return Tt;if([oi,mn].indexOf(Ni)!==-1)$n--;else break}if([ui,yn].indexOf(Dn)!==-1)for(var $n=[Le,xe].indexOf(Qe)!==-1?Pe:le;$n>=0;){var Ni=wt[$n];if(Ni===On)return Tt;if([oi,mn].indexOf(Ni)!==-1)$n--;else break}if(yr===Qe&&[yr,Vr,Ki,_r].indexOf(Dn)!==-1||[Vr,Ki].indexOf(Qe)!==-1&&[Vr,Zi].indexOf(Dn)!==-1||[Zi,_r].indexOf(Qe)!==-1&&Dn===Zi||Tr.indexOf(Qe)!==-1&&[Me,yn].indexOf(Dn)!==-1||Tr.indexOf(Dn)!==-1&&Qe===ui||xi.indexOf(Qe)!==-1&&xi.indexOf(Dn)!==-1||Qe===mn&&xi.indexOf(Dn)!==-1||xi.concat(On).indexOf(Qe)!==-1&&Dn===Oe&&br.indexOf(St[Ze])===-1||xi.concat(On).indexOf(Dn)!==-1&&Qe===xe)return Tt;if(Qe===oo&&Dn===oo){for(var Hr=Ft[le],hr=1;Hr>0&&(Hr--,wt[Hr]===oo);)hr++;if(hr%2!==0)return Tt}return Qe===Ei&&Dn===Ri?Tt:Gi},Qi=function(St,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Ft=Je(St,wt.lineBreak),Pt=Ft[0],Gt=Ft[1],le=Ft[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(Gt=Gt.map(function(Ze){return[On,bi,xo].indexOf(Ze)!==-1?Er:Ze}));var Pe=wt.wordBreak==="keep-all"?le.map(function(Ze,Qe){return Ze&&St[Qe]>=19968&&St[Qe]<=40959}):void 0;return[Pt,Gt,Pe]},Hn=function(){function St(wt,Ft,Pt,Gt){this.codePoints=wt,this.required=Ft===uo,this.start=Pt,this.end=Gt}return St.prototype.slice=function(){return re.apply(void 0,this.codePoints.slice(this.start,this.end))},St}(),fi=function(St,wt){var Ft=Ae(St),Pt=Qi(Ft,wt),Gt=Pt[0],le=Pt[1],Pe=Pt[2],Ze=Ft.length,Qe=0,En=0;return{next:function(){if(En>=Ze)return{done:!0,value:null};for(var Dn=Tt;En<Ze&&(Dn=Ne(Ft,le,Gt,++En,Pe))===Tt;);if(Dn!==Tt||En===Ze){var $n=new Hn(Ft,Dn,Qe,En);return Qe=En,{value:$n,done:!1}}return{done:!0,value:null}}}},$i=1,Mr=2,Br=4,te=8,ke=10,zn=47,ni=92,Ye=9,Kn=32,_n=34,We=61,on=35,An=36,Nn=37,Vn=39,Yi=40,Li=41,Bi=95,Ve=45,tr=33,dr=60,qr=62,hn=64,Wn=91,Si=93,vi=61,mi=123,Ii=63,Wi=125,Ar=124,ae=126,ce=128,ne=65533,Ge=42,Be=43,cn=44,Yn=58,Xn=59,ki=46,ii=0,be=8,yi=11,Te=14,un=31,Ue=127,Ut=-1,pn=48,Ln=97,Ai=101,Zn=102,Tn=117,dn=122,qe=65,fn=69,an=70,gn=85,qn=90,Mn=function(St){return St>=pn&&St<=57},Un=function(St){return St>=55296&&St<=57343},ln=function(St){return Mn(St)||St>=qe&&St<=an||St>=Ln&&St<=Zn},si=function(St){return St>=Ln&&St<=dn},Mi=function(St){return St>=qe&&St<=qn},er=function(St){return si(St)||Mi(St)},Hi=function(St){return St>=ce},Fr=function(St){return St===ke||St===Ye||St===Kn},wr=function(St){return er(St)||Hi(St)||St===Bi},Qr=function(St){return wr(St)||Mn(St)||St===Ve},Or=function(St){return St>=ii&&St<=be||St===yi||St>=Te&&St<=un||St===Ue},Lr=function(St,wt){return St!==ni?!1:wt!==ke},Xr=function(St,wt,Ft){return St===Ve?wr(wt)||Lr(wt,Ft):wr(St)?!0:!!(St===ni&&Lr(St,wt))},He=function(St,wt,Ft){return St===Be||St===Ve?Mn(wt)?!0:wt===ki&&Mn(Ft):Mn(St===ki?wt:St)},xr=function(St){var wt=0,Ft=1;(St[wt]===Be||St[wt]===Ve)&&(St[wt]===Ve&&(Ft=-1),wt++);for(var Pt=[];Mn(St[wt]);)Pt.push(St[wt++]);var Gt=Pt.length?parseInt(re.apply(void 0,Pt),10):0;St[wt]===ki&&wt++;for(var le=[];Mn(St[wt]);)le.push(St[wt++]);var Pe=le.length,Ze=Pe?parseInt(re.apply(void 0,le),10):0;(St[wt]===fn||St[wt]===Ai)&&wt++;var Qe=1;(St[wt]===Be||St[wt]===Ve)&&(St[wt]===Ve&&(Qe=-1),wt++);for(var En=[];Mn(St[wt]);)En.push(St[wt++]);var Dn=En.length?parseInt(re.apply(void 0,En),10):0;return Ft*(Gt+Ze*Math.pow(10,-Pe))*Math.pow(10,Qe*Dn)},Ur={type:2},nr={type:3},kr={type:4},gr={type:13},co={type:8},io={type:21},Pr={type:9},vo={type:10},ks={type:11},us={type:12},Da={type:14},Ks={type:23},ar={type:1},rs={type:25},os={type:24},ji={type:26},Nr={type:27},so={type:28},di={type:29},ir={type:31},fr={type:32},Rr=function(){function St(){this._value=[]}return St.prototype.write=function(wt){this._value=this._value.concat(Ae(wt))},St.prototype.read=function(){for(var wt=[],Ft=this.consumeToken();Ft!==fr;)wt.push(Ft),Ft=this.consumeToken();return wt},St.prototype.consumeToken=function(){var wt=this.consumeCodePoint();switch(wt){case _n:return this.consumeStringToken(_n);case on:var Ft=this.peekCodePoint(0),Pt=this.peekCodePoint(1),Gt=this.peekCodePoint(2);if(Qr(Ft)||Lr(Pt,Gt)){var le=Xr(Ft,Pt,Gt)?Mr:$i,Pe=this.consumeName();return{type:5,value:Pe,flags:le}}break;case An:if(this.peekCodePoint(0)===We)return this.consumeCodePoint(),gr;break;case Vn:return this.consumeStringToken(Vn);case Yi:return Ur;case Li:return nr;case Ge:if(this.peekCodePoint(0)===We)return this.consumeCodePoint(),Da;break;case Be:if(He(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case cn:return kr;case Ve:var Ze=wt,Qe=this.peekCodePoint(0),En=this.peekCodePoint(1);if(He(Ze,Qe,En))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if(Xr(Ze,Qe,En))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Qe===Ve&&En===qr)return this.consumeCodePoint(),this.consumeCodePoint(),os;break;case ki:if(He(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case zn:if(this.peekCodePoint(0)===Ge)for(this.consumeCodePoint();;){var Dn=this.consumeCodePoint();if(Dn===Ge&&(Dn=this.consumeCodePoint(),Dn===zn))return this.consumeToken();if(Dn===Ut)return this.consumeToken()}break;case Yn:return ji;case Xn:return Nr;case dr:if(this.peekCodePoint(0)===tr&&this.peekCodePoint(1)===Ve&&this.peekCodePoint(2)===Ve)return this.consumeCodePoint(),this.consumeCodePoint(),rs;break;case hn:var $n=this.peekCodePoint(0),Ni=this.peekCodePoint(1),Hr=this.peekCodePoint(2);if(Xr($n,Ni,Hr)){var Pe=this.consumeName();return{type:7,value:Pe}}break;case Wn:return so;case ni:if(Lr(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case Si:return di;case vi:if(this.peekCodePoint(0)===We)return this.consumeCodePoint(),co;break;case mi:return ks;case Wi:return us;case Tn:case gn:var hr=this.peekCodePoint(0),Cr=this.peekCodePoint(1);return hr===Be&&(ln(Cr)||Cr===Ii)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case Ar:if(this.peekCodePoint(0)===We)return this.consumeCodePoint(),Pr;if(this.peekCodePoint(0)===Ar)return this.consumeCodePoint(),io;break;case ae:if(this.peekCodePoint(0)===We)return this.consumeCodePoint(),vo;break;case Ut:return fr}return Fr(wt)?(this.consumeWhiteSpace(),ir):Mn(wt)?(this.reconsumeCodePoint(wt),this.consumeNumericToken()):wr(wt)?(this.reconsumeCodePoint(wt),this.consumeIdentLikeToken()):{type:6,value:re(wt)}},St.prototype.consumeCodePoint=function(){var wt=this._value.shift();return typeof wt=="undefined"?-1:wt},St.prototype.reconsumeCodePoint=function(wt){this._value.unshift(wt)},St.prototype.peekCodePoint=function(wt){return wt>=this._value.length?-1:this._value[wt]},St.prototype.consumeUnicodeRangeToken=function(){for(var wt=[],Ft=this.consumeCodePoint();ln(Ft)&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint();for(var Pt=!1;Ft===Ii&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint(),Pt=!0;if(Pt){var Gt=parseInt(re.apply(void 0,wt.map(function(Qe){return Qe===Ii?pn:Qe})),16),le=parseInt(re.apply(void 0,wt.map(function(Qe){return Qe===Ii?an:Qe})),16);return{type:30,start:Gt,end:le}}var Pe=parseInt(re.apply(void 0,wt),16);if(this.peekCodePoint(0)===Ve&&ln(this.peekCodePoint(1))){this.consumeCodePoint(),Ft=this.consumeCodePoint();for(var Ze=[];ln(Ft)&&Ze.length<6;)Ze.push(Ft),Ft=this.consumeCodePoint();var le=parseInt(re.apply(void 0,Ze),16);return{type:30,start:Pe,end:le}}else return{type:30,start:Pe,end:Pe}},St.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===Yi?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Yi?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},St.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut)return{type:22,value:""};var Ft=this.peekCodePoint(0);if(Ft===Vn||Ft===_n){var Pt=this.consumeStringToken(this.consumeCodePoint());return Pt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===Li)?(this.consumeCodePoint(),{type:22,value:Pt.value}):(this.consumeBadUrlRemnants(),Ks)}for(;;){var Gt=this.consumeCodePoint();if(Gt===Ut||Gt===Li)return{type:22,value:re.apply(void 0,wt)};if(Fr(Gt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===Li?(this.consumeCodePoint(),{type:22,value:re.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),Ks);if(Gt===_n||Gt===Vn||Gt===Yi||Or(Gt))return this.consumeBadUrlRemnants(),Ks;if(Gt===ni)if(Lr(Gt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ks;else wt.push(Gt)}},St.prototype.consumeWhiteSpace=function(){for(;Fr(this.peekCodePoint(0));)this.consumeCodePoint()},St.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===Li||wt===Ut)return;Lr(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},St.prototype.consumeStringSlice=function(wt){for(var Ft=5e4,Pt="";wt>0;){var Gt=Math.min(Ft,wt);Pt+=re.apply(void 0,this._value.splice(0,Gt)),wt-=Gt}return this._value.shift(),Pt},St.prototype.consumeStringToken=function(wt){var Ft="",Pt=0;do{var Gt=this._value[Pt];if(Gt===Ut||Gt===void 0||Gt===wt)return Ft+=this.consumeStringSlice(Pt),{type:0,value:Ft};if(Gt===ke)return this._value.splice(0,Pt),ar;if(Gt===ni){var le=this._value[Pt+1];le!==Ut&&le!==void 0&&(le===ke?(Ft+=this.consumeStringSlice(Pt),Pt=-1,this._value.shift()):Lr(Gt,le)&&(Ft+=this.consumeStringSlice(Pt),Ft+=re(this.consumeEscapedCodePoint()),Pt=-1))}Pt++}while(!0)},St.prototype.consumeNumber=function(){var wt=[],Ft=Br,Pt=this.peekCodePoint(0);for((Pt===Be||Pt===Ve)&&wt.push(this.consumeCodePoint());Mn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0);var Gt=this.peekCodePoint(1);if(Pt===ki&&Mn(Gt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=te;Mn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0),Gt=this.peekCodePoint(1);var le=this.peekCodePoint(2);if((Pt===fn||Pt===Ai)&&((Gt===Be||Gt===Ve)&&Mn(le)||Mn(Gt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=te;Mn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());return[xr(wt),Ft]},St.prototype.consumeNumericToken=function(){var wt=this.consumeNumber(),Ft=wt[0],Pt=wt[1],Gt=this.peekCodePoint(0),le=this.peekCodePoint(1),Pe=this.peekCodePoint(2);if(Xr(Gt,le,Pe)){var Ze=this.consumeName();return{type:15,number:Ft,flags:Pt,unit:Ze}}return Gt===Nn?(this.consumeCodePoint(),{type:16,number:Ft,flags:Pt}):{type:17,number:Ft,flags:Pt}},St.prototype.consumeEscapedCodePoint=function(){var wt=this.consumeCodePoint();if(ln(wt)){for(var Ft=re(wt);ln(this.peekCodePoint(0))&&Ft.length<6;)Ft+=re(this.consumeCodePoint());Fr(this.peekCodePoint(0))&&this.consumeCodePoint();var Pt=parseInt(Ft,16);return Pt===0||Un(Pt)||Pt>1114111?ne:Pt}return wt===Ut?ne:wt},St.prototype.consumeName=function(){for(var wt="";;){var Ft=this.consumeCodePoint();if(Qr(Ft))wt+=re(Ft);else if(Lr(Ft,this.peekCodePoint(0)))wt+=re(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(Ft),wt}},St}(),$r=function(){function St(wt){this._tokens=wt}return St.create=function(wt){var Ft=new Rr;return Ft.write(wt),new St(Ft.read())},St.parseValue=function(wt){return St.create(wt).parseComponentValue()},St.parseValues=function(wt){return St.create(wt).parseComponentValues()},St.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")},St.prototype.parseComponentValues=function(){for(var wt=[];;){var Ft=this.consumeComponentValue();if(Ft.type===32)return wt;wt.push(Ft),wt.push()}},St.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},St.prototype.consumeSimpleBlock=function(wt){for(var Ft={type:wt,values:[]},Pt=this.consumeToken();;){if(Pt.type===32||$o(Pt,wt))return Ft;this.reconsumeToken(Pt),Ft.values.push(this.consumeComponentValue()),Pt=this.consumeToken()}},St.prototype.consumeFunction=function(wt){for(var Ft={name:wt.value,values:[],type:18};;){var Pt=this.consumeToken();if(Pt.type===32||Pt.type===3)return Ft;this.reconsumeToken(Pt),Ft.values.push(this.consumeComponentValue())}},St.prototype.consumeToken=function(){var wt=this._tokens.shift();return typeof wt=="undefined"?fr:wt},St.prototype.reconsumeToken=function(wt){this._tokens.unshift(wt)},St}(),Bo=function(St){return St.type===15},rr=function(St){return St.type===17},So=function(St){return St.type===20},ao=function(St){return St.type===0},es=function(St,wt){return So(St)&&St.value===wt},to=function(St){return St.type!==31},Do=function(St){return St.type!==31&&St.type!==4},Ro=function(St){var wt=[],Ft=[];return St.forEach(function(Pt){if(Pt.type===4){if(Ft.length===0)throw new Error("Error parsing function args, zero tokens for arg");wt.push(Ft),Ft=[];return}Pt.type!==31&&Ft.push(Pt)}),Ft.length&&wt.push(Ft),wt},$o=function(St,wt){return wt===11&&St.type===12||wt===28&&St.type===29?!0:wt===2&&St.type===3},Ls=function(St){return St.type===17||St.type===15},Go=function(St){return St.type===16||Ls(St)},la=function(St){return St.length>1?[St[0],St[1]]:[St[0]]},yo={type:17,number:0,flags:Br},da={type:16,number:50,flags:Br},za={type:16,number:100,flags:Br},Sa=function(St,wt,Ft){var Pt=St[0],Gt=St[1];return[Yo(Pt,wt),Yo(typeof Gt!="undefined"?Gt:Pt,Ft)]},Yo=function(St,wt){if(St.type===16)return St.number/100*wt;if(Bo(St))switch(St.unit){case"rem":case"em":return 16*St.number;case"px":default:return St.number}return St.number},Ia="deg",dl="grad",AA="rad",hA="turn",ws={name:"angle",parse:function(St,wt){if(wt.type===15)switch(wt.unit){case Ia:return Math.PI*wt.number/180;case dl:return Math.PI/200*wt.number;case AA:return wt.number;case hA:return Math.PI*2*wt.number}throw new Error("Unsupported angle type")}},zu=function(St){return St.type===15&&(St.unit===Ia||St.unit===dl||St.unit===AA||St.unit===hA)},cA=function(St){var wt=St.filter(So).map(function(Ft){return Ft.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[yo,yo];case"to top":case"bottom":return fa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[yo,za];case"to right":case"left":return fa(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[za,za];case"to bottom":case"top":return fa(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[za,yo];case"to left":case"right":return fa(270)}return 0},fa=function(St){return Math.PI*St/180},nl={name:"color",parse:function(St,wt){if(wt.type===18){var Ft=Qo[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported color function "'+wt.name+'"');return Ft(St,wt.values)}if(wt.type===5){if(wt.value.length===3){var Pt=wt.value.substring(0,1),Gt=wt.value.substring(1,2),le=wt.value.substring(2,3);return ms(parseInt(Pt+Pt,16),parseInt(Gt+Gt,16),parseInt(le+le,16),1)}if(wt.value.length===4){var Pt=wt.value.substring(0,1),Gt=wt.value.substring(1,2),le=wt.value.substring(2,3),Pe=wt.value.substring(3,4);return ms(parseInt(Pt+Pt,16),parseInt(Gt+Gt,16),parseInt(le+le,16),parseInt(Pe+Pe,16)/255)}if(wt.value.length===6){var Pt=wt.value.substring(0,2),Gt=wt.value.substring(2,4),le=wt.value.substring(4,6);return ms(parseInt(Pt,16),parseInt(Gt,16),parseInt(le,16),1)}if(wt.value.length===8){var Pt=wt.value.substring(0,2),Gt=wt.value.substring(2,4),le=wt.value.substring(4,6),Pe=wt.value.substring(6,8);return ms(parseInt(Pt,16),parseInt(Gt,16),parseInt(le,16),parseInt(Pe,16)/255)}}if(wt.type===20){var Ze=cs[wt.value.toUpperCase()];if(typeof Ze!="undefined")return Ze}return cs.TRANSPARENT}},Ds=function(St){return(255&St)===0},ns=function(St){var wt=255&St,Ft=255&St>>8,Pt=255&St>>16,Gt=255&St>>24;return wt<255?"rgba("+Gt+","+Pt+","+Ft+","+wt/255+")":"rgb("+Gt+","+Pt+","+Ft+")"},ms=function(St,wt,Ft,Pt){return(St<<24|wt<<16|Ft<<8|Math.round(Pt*255)<<0)>>>0},Js=function(St,wt){if(St.type===17)return St.number;if(St.type===16){var Ft=wt===3?1:255;return wt===3?St.number/100*Ft:Math.round(St.number/100*Ft)}return 0},lu=function(St,wt){var Ft=wt.filter(Do);if(Ft.length===3){var Pt=Ft.map(Js),Gt=Pt[0],le=Pt[1],Pe=Pt[2];return ms(Gt,le,Pe,1)}if(Ft.length===4){var Ze=Ft.map(Js),Gt=Ze[0],le=Ze[1],Pe=Ze[2],Qe=Ze[3];return ms(Gt,le,Pe,Qe)}return 0};function ga(St,wt,Ft){return Ft<0&&(Ft+=1),Ft>=1&&(Ft-=1),Ft<1/6?(wt-St)*Ft*6+St:Ft<1/2?wt:Ft<2/3?(wt-St)*6*(2/3-Ft)+St:St}var Wo=function(St,wt){var Ft=wt.filter(Do),Pt=Ft[0],Gt=Ft[1],le=Ft[2],Pe=Ft[3],Ze=(Pt.type===17?fa(Pt.number):ws.parse(St,Pt))/(Math.PI*2),Qe=Go(Gt)?Gt.number/100:0,En=Go(le)?le.number/100:0,Dn=typeof Pe!="undefined"&&Go(Pe)?Yo(Pe,1):1;if(Qe===0)return ms(En*255,En*255,En*255,1);var $n=En<=.5?En*(Qe+1):En+Qe-En*Qe,Ni=En*2-$n,Hr=ga(Ni,$n,Ze+1/3),hr=ga(Ni,$n,Ze),Cr=ga(Ni,$n,Ze-1/3);return ms(Hr*255,hr*255,Cr*255,Dn)},Qo={hsl:Wo,hsla:Wo,rgb:lu,rgba:lu},Co=function(St,wt){return nl.parse(St,$r.create(wt).parseComponentValue())},cs={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},Xi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(St,wt){return wt.map(function(Ft){if(So(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},qs={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},we=function(St,wt){var Ft=nl.parse(St,wt[0]),Pt=wt[1];return Pt&&Go(Pt)?{color:Ft,stop:Pt}:{color:Ft,stop:null}},bn=function(St,wt){var Ft=St[0],Pt=St[St.length-1];Ft.stop===null&&(Ft.stop=yo),Pt.stop===null&&(Pt.stop=za);for(var Gt=[],le=0,Pe=0;Pe<St.length;Pe++){var Ze=St[Pe].stop;if(Ze!==null){var Qe=Yo(Ze,wt);Qe>le?Gt.push(Qe):Gt.push(le),le=Qe}else Gt.push(null)}for(var En=null,Pe=0;Pe<Gt.length;Pe++){var Dn=Gt[Pe];if(Dn===null)En===null&&(En=Pe);else if(En!==null){for(var $n=Pe-En,Ni=Gt[En-1],Hr=(Dn-Ni)/($n+1),hr=1;hr<=$n;hr++)Gt[En+hr-1]=Hr*hr;En=null}}return St.map(function(Cr,jo){var ro=Cr.color;return{color:ro,stop:Math.max(Math.min(1,Gt[jo]/wt),0)}})},El=function(St,wt,Ft){var Pt=wt/2,Gt=Ft/2,le=Yo(St[0],wt)-Pt,Pe=Gt-Yo(St[1],Ft);return(Math.atan2(Pe,le)+Math.PI*2)%(Math.PI*2)},uu=function(St,wt,Ft){var Pt=typeof St=="number"?St:El(St,wt,Ft),Gt=Math.abs(wt*Math.sin(Pt))+Math.abs(Ft*Math.cos(Pt)),le=wt/2,Pe=Ft/2,Ze=Gt/2,Qe=Math.sin(Pt-Math.PI/2)*Ze,En=Math.cos(Pt-Math.PI/2)*Ze;return[Gt,le-En,le+En,Pe-Qe,Pe+Qe]},is=function(St,wt){return Math.sqrt(St*St+wt*wt)},ta=function(St,wt,Ft,Pt,Gt){var le=[[0,0],[0,wt],[St,0],[St,wt]];return le.reduce(function(Pe,Ze){var Qe=Ze[0],En=Ze[1],Dn=is(Ft-Qe,Pt-En);return(Gt?Dn<Pe.optimumDistance:Dn>Pe.optimumDistance)?{optimumCorner:Ze,optimumDistance:Dn}:Pe},{optimumDistance:Gt?1/0:-1/0,optimumCorner:null}).optimumCorner},fl=function(St,wt,Ft,Pt,Gt){var le=0,Pe=0;switch(St.size){case 0:St.shape===0?le=Pe=Math.min(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Ft),Math.abs(Ft-Gt)):St.shape===1&&(le=Math.min(Math.abs(wt),Math.abs(wt-Pt)),Pe=Math.min(Math.abs(Ft),Math.abs(Ft-Gt)));break;case 2:if(St.shape===0)le=Pe=Math.min(is(wt,Ft),is(wt,Ft-Gt),is(wt-Pt,Ft),is(wt-Pt,Ft-Gt));else if(St.shape===1){var Ze=Math.min(Math.abs(Ft),Math.abs(Ft-Gt))/Math.min(Math.abs(wt),Math.abs(wt-Pt)),Qe=ta(Pt,Gt,wt,Ft,!0),En=Qe[0],Dn=Qe[1];le=is(En-wt,(Dn-Ft)/Ze),Pe=Ze*le}break;case 1:St.shape===0?le=Pe=Math.max(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Ft),Math.abs(Ft-Gt)):St.shape===1&&(le=Math.max(Math.abs(wt),Math.abs(wt-Pt)),Pe=Math.max(Math.abs(Ft),Math.abs(Ft-Gt)));break;case 3:if(St.shape===0)le=Pe=Math.max(is(wt,Ft),is(wt,Ft-Gt),is(wt-Pt,Ft),is(wt-Pt,Ft-Gt));else if(St.shape===1){var Ze=Math.max(Math.abs(Ft),Math.abs(Ft-Gt))/Math.max(Math.abs(wt),Math.abs(wt-Pt)),$n=ta(Pt,Gt,wt,Ft,!1),En=$n[0],Dn=$n[1];le=is(En-wt,(Dn-Ft)/Ze),Pe=Ze*le}break}return Array.isArray(St.size)&&(le=Yo(St.size[0],Pt),Pe=St.size.length===2?Yo(St.size[1],Gt):le),[le,Pe]},Hl=function(St,wt){var Ft=fa(180),Pt=[];return Ro(wt).forEach(function(Gt,le){if(le===0){var Pe=Gt[0];if(Pe.type===20&&Pe.value==="to"){Ft=cA(Gt);return}else if(zu(Pe)){Ft=ws.parse(St,Pe);return}}var Ze=we(St,Gt);Pt.push(Ze)}),{angle:Ft,stops:Pt,type:1}},Au=function(St,wt){var Ft=fa(180),Pt=[];return Ro(wt).forEach(function(Gt,le){if(le===0){var Pe=Gt[0];if(Pe.type===20&&["top","left","right","bottom"].indexOf(Pe.value)!==-1){Ft=cA(Gt);return}else if(zu(Pe)){Ft=(ws.parse(St,Pe)+fa(270))%fa(360);return}}var Ze=we(St,Gt);Pt.push(Ze)}),{angle:Ft,stops:Pt,type:1}},xs=function(St,wt){var Ft=fa(180),Pt=[],Gt=1,le=0,Pe=3,Ze=[];return Ro(wt).forEach(function(Qe,En){var Dn=Qe[0];if(En===0){if(So(Dn)&&Dn.value==="linear"){Gt=1;return}else if(So(Dn)&&Dn.value==="radial"){Gt=2;return}}if(Dn.type===18){if(Dn.name==="from"){var $n=nl.parse(St,Dn.values[0]);Pt.push({stop:yo,color:$n})}else if(Dn.name==="to"){var $n=nl.parse(St,Dn.values[0]);Pt.push({stop:za,color:$n})}else if(Dn.name==="color-stop"){var Ni=Dn.values.filter(Do);if(Ni.length===2){var $n=nl.parse(St,Ni[1]),Hr=Ni[0];rr(Hr)&&Pt.push({stop:{type:16,number:Hr.number*100,flags:Hr.flags},color:$n})}}}}),Gt===1?{angle:(Ft+fa(180))%fa(360),stops:Pt,type:Gt}:{size:Pe,shape:le,stops:Pt,position:Ze,type:Gt}},jr="closest-side",Ba="farthest-side",il="closest-corner",vs="farthest-corner",wo="circle",Ss="ellipse",Ua="cover",ss="contain",rl=function(St,wt){var Ft=0,Pt=3,Gt=[],le=[];return Ro(wt).forEach(function(Pe,Ze){var Qe=!0;if(Ze===0){var En=!1;Qe=Pe.reduce(function($n,Ni){if(En)if(So(Ni))switch(Ni.value){case"center":return le.push(da),$n;case"top":case"left":return le.push(yo),$n;case"right":case"bottom":return le.push(za),$n}else(Go(Ni)||Ls(Ni))&&le.push(Ni);else if(So(Ni))switch(Ni.value){case wo:return Ft=0,!1;case Ss:return Ft=1,!1;case"at":return En=!0,!1;case jr:return Pt=0,!1;case Ua:case Ba:return Pt=1,!1;case ss:case il:return Pt=2,!1;case vs:return Pt=3,!1}else if(Ls(Ni)||Go(Ni))return Array.isArray(Pt)||(Pt=[]),Pt.push(Ni),!1;return $n},Qe)}if(Qe){var Dn=we(St,Pe);Gt.push(Dn)}}),{size:Pt,shape:Ft,stops:Gt,position:le,type:2}},zs=function(St,wt){var Ft=0,Pt=3,Gt=[],le=[];return Ro(wt).forEach(function(Pe,Ze){var Qe=!0;if(Ze===0?Qe=Pe.reduce(function(Dn,$n){if(So($n))switch($n.value){case"center":return le.push(da),!1;case"top":case"left":return le.push(yo),!1;case"right":case"bottom":return le.push(za),!1}else if(Go($n)||Ls($n))return le.push($n),!1;return Dn},Qe):Ze===1&&(Qe=Pe.reduce(function(Dn,$n){if(So($n))switch($n.value){case wo:return Ft=0,!1;case Ss:return Ft=1,!1;case ss:case jr:return Pt=0,!1;case Ba:return Pt=1,!1;case il:return Pt=2,!1;case Ua:case vs:return Pt=3,!1}else if(Ls($n)||Go($n))return Array.isArray(Pt)||(Pt=[]),Pt.push($n),!1;return Dn},Qe)),Qe){var En=we(St,Pe);Gt.push(En)}}),{size:Pt,shape:Ft,stops:Gt,position:le,type:2}},ju=function(St){return St.type===1},Oo=function(St){return St.type===2},ea={name:"image",parse:function(St,wt){if(wt.type===22){var Ft={url:wt.value,type:0};return St.cache.addImage(wt.value),Ft}if(wt.type===18){var Pt=as[wt.name];if(typeof Pt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+wt.name+'"');return Pt(St,wt.values)}throw new Error("Unsupported image type "+wt.type)}};function Io(St){return!(St.type===20&&St.value==="none")&&(St.type!==18||!!as[St.name])}var as={"linear-gradient":Hl,"-moz-linear-gradient":Au,"-ms-linear-gradient":Au,"-o-linear-gradient":Au,"-webkit-linear-gradient":Au,"radial-gradient":rl,"-moz-radial-gradient":zs,"-ms-radial-gradient":zs,"-o-radial-gradient":zs,"-webkit-radial-gradient":zs,"-webkit-gradient":xs},ds={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt.filter(function(Pt){return Do(Pt)&&Io(Pt)}).map(function(Pt){return ea.parse(St,Pt)})}},Ms={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(St,wt){return wt.map(function(Ft){if(So(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},zo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(St,wt){return Ro(wt).map(function(Ft){return Ft.filter(Go)}).map(la)}},dA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(St,wt){return Ro(wt).map(function(Ft){return Ft.filter(So).map(function(Pt){return Pt.value}).join(" ")}).map(zr)}},zr=function(St){switch(St){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}},Vu;(function(St){St.AUTO="auto",St.CONTAIN="contain",St.COVER="cover"})(Vu||(Vu={}));var Eo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(St,wt){return Ro(wt).map(function(Ft){return Ft.filter(Oh)})}},Oh=function(St){return So(St)||Go(St)},ql=function(St){return{name:"border-"+St+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},TA=ql("top"),Hh=ql("right"),ch=ql("bottom"),hu=ql("left"),cu=function(St){return{name:"border-radius-"+St,initialValue:"0 0",prefix:!1,type:1,parse:function(wt,Ft){return la(Ft.filter(Go))}}},_o=cu("top-left"),Rl=cu("top-right"),dh=cu("bottom-right"),xu=cu("bottom-left"),fA=function(St){return{name:"border-"+St+"-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}}},Su=fA("top"),Po=fA("right"),Ho=fA("bottom"),Is=fA("left"),na=function(St){return{name:"border-"+St+"-width",initialValue:"0",type:0,prefix:!1,parse:function(wt,Ft){return Bo(Ft)?Ft.number:0}}},pa=na("top"),Wu=na("right"),Bu=na("bottom"),Zu=na("left"),_l={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},du={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"rtl":return 1;case"ltr":default:return 0}}},qg={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(St,wt){return wt.filter(So).reduce(function(Ft,Pt){return Ft|$g(Pt.value)},0)}},$g=function(St){switch(St){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},tp={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},sg={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(St,wt){return wt.type===20&&wt.value==="normal"?0:wt.type===17||wt.type===15?wt.number:0}},Us;(function(St){St.NORMAL="normal",St.STRICT="strict"})(Us||(Us={}));var NA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"strict":return Us.STRICT;case"normal":default:return Us.NORMAL}}},ls={name:"line-height",initialValue:"normal",prefix:!1,type:4},ma=function(St,wt){return So(St)&&St.value==="normal"?1.2*wt:St.type===17?wt*St.number:Go(St)?Yo(St,wt):wt},Ea={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(St,wt){return wt.type===20&&wt.value==="none"?null:ea.parse(St,wt)}},La={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"inside":return 0;case"outside":default:return 1}}},DA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(St,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}}},ua=function(St){return{name:"margin-"+St,initialValue:"0",prefix:!1,type:4}},fh=ua("top"),ag=ua("right"),lg=ua("bottom"),gl=ua("left"),Fd={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(St,wt){return wt.filter(So).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}})}},fs={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Cu=function(St){return{name:"padding-"+St,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},cf=Cu("top"),IA=Cu("right"),UA=Cu("bottom"),Ed=Cu("left"),Aa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ma={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},gh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){return wt.length===1&&es(wt[0],"none")?[]:Ro(wt).map(function(Ft){for(var Pt={color:cs.TRANSPARENT,offsetX:yo,offsetY:yo,blur:yo},Gt=0,le=0;le<Ft.length;le++){var Pe=Ft[le];Ls(Pe)?(Gt===0?Pt.offsetX=Pe:Gt===1?Pt.offsetY=Pe:Pt.blur=Pe,Gt++):Pt.color=nl.parse(St,Pe)}return Pt})}},Kl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},QA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(St,wt){if(wt.type===20&&wt.value==="none")return null;if(wt.type===18){var Ft=Pu[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+wt.name+'"');return Ft(wt.values)}return null}},Ll=function(St){var wt=St.filter(function(Ft){return Ft.type===17}).map(function(Ft){return Ft.number});return wt.length===6?wt:null},ia=function(St){var wt=St.filter(function(Qe){return Qe.type===17}).map(function(Qe){return Qe.number}),Ft=wt[0],Pt=wt[1];wt[2],wt[3];var Gt=wt[4],le=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Pe=wt[12],Ze=wt[13];return wt[14],wt[15],wt.length===16?[Ft,Pt,Gt,le,Pe,Ze]:null},Pu={matrix:Ll,matrix3d:ia},Ml={type:16,number:50,flags:Br},ba=[Ml,Ml],$l={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(St,wt){var Ft=wt.filter(Go);return Ft.length!==2?ba:[Ft[0],Ft[1]]}},gs={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},pl;(function(St){St.NORMAL="normal",St.BREAK_ALL="break-all",St.KEEP_ALL="keep-all"})(pl||(pl={}));for(var gA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"break-all":return pl.BREAK_ALL;case"keep-all":return pl.KEEP_ALL;case"normal":default:return pl.NORMAL}}},OA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(St,wt){if(wt.type===20)return{auto:!0,order:0};if(rr(wt))return{auto:!1,order:wt.number};throw new Error("Invalid z-index number parsed")}},HA={name:"time",parse:function(St,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")}},Qc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(St,wt){return rr(wt)?wt.number:1}},Rh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(St,wt){return wt.filter(So).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})}},ko={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(St,wt){var Ft=[],Pt=[];return wt.forEach(function(Gt){switch(Gt.type){case 20:case 0:Ft.push(Gt.value);break;case 17:Ft.push(Gt.number.toString());break;case 4:Pt.push(Ft.join(" ")),Ft.length=0;break}}),Ft.length&&Pt.push(Ft.join(" ")),Pt.map(function(Gt){return Gt.indexOf(" ")===-1?Gt:"'"+Gt+"'"})}},Hc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},df={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(St,wt){if(rr(wt))return wt.number;if(So(wt))switch(wt.value){case"bold":return 700;case"normal":default:return 400}return 400}},Ld={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){return wt.filter(So).map(function(Ft){return Ft.value})}},Fu={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},va=function(St,wt){return(St&wt)!==0},Rc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt}},ep={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;for(var Pt=[],Gt=wt.filter(to),le=0;le<Gt.length;le++){var Pe=Gt[le],Ze=Gt[le+1];if(Pe.type===20){var Qe=Ze&&rr(Ze)?Ze.number:1;Pt.push({counter:Pe.value,increment:Qe})}}return Pt}},_h={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return[];for(var Ft=[],Pt=wt.filter(to),Gt=0;Gt<Pt.length;Gt++){var le=Pt[Gt],Pe=Pt[Gt+1];if(So(le)&&le.value!=="none"){var Ze=Pe&&rr(Pe)?Pe.number:0;Ft.push({counter:le.value,reset:Ze})}}return Ft}},Md={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(St,wt){return wt.filter(Bo).map(function(Ft){return HA.parse(St,Ft)})}},Kh={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;var Pt=[],Gt=wt.filter(ao);if(Gt.length%2!==0)return null;for(var le=0;le<Gt.length;le+=2){var Pe=Gt[le].value,Ze=Gt[le+1].value;Pt.push({open:Pe,close:Ze})}return Pt}},Gh=function(St,wt,Ft){if(!St)return"";var Pt=St[Math.min(wt,St.length-1)];return Pt?Ft?Pt.open:Pt.close:""},_c={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){return wt.length===1&&es(wt[0],"none")?[]:Ro(wt).map(function(Ft){for(var Pt={color:255,offsetX:yo,offsetY:yo,blur:yo,spread:yo,inset:!1},Gt=0,le=0;le<Ft.length;le++){var Pe=Ft[le];es(Pe,"inset")?Pt.inset=!0:Ls(Pe)?(Gt===0?Pt.offsetX=Pe:Gt===1?Pt.offsetY=Pe:Gt===2?Pt.blur=Pe:Pt.spread=Pe,Gt++):Pt.color=nl.parse(St,Pe)}return Pt})}},ff={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(St,wt){var Ft=[0,1,2],Pt=[];return wt.filter(So).forEach(function(Gt){switch(Gt.value){case"stroke":Pt.push(1);break;case"fill":Pt.push(0);break;case"markers":Pt.push(2);break}}),Ft.forEach(function(Gt){Pt.indexOf(Gt)===-1&&Pt.push(Gt)}),Pt}},Kc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},zh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(St,wt){return Bo(wt)?wt.number:0}},RA=function(){function St(wt,Ft){var Pt,Gt;this.animationDuration=Wr(wt,Md,Ft.animationDuration),this.backgroundClip=Wr(wt,Xi,Ft.backgroundClip),this.backgroundColor=Wr(wt,qs,Ft.backgroundColor),this.backgroundImage=Wr(wt,ds,Ft.backgroundImage),this.backgroundOrigin=Wr(wt,Ms,Ft.backgroundOrigin),this.backgroundPosition=Wr(wt,zo,Ft.backgroundPosition),this.backgroundRepeat=Wr(wt,dA,Ft.backgroundRepeat),this.backgroundSize=Wr(wt,Eo,Ft.backgroundSize),this.borderTopColor=Wr(wt,TA,Ft.borderTopColor),this.borderRightColor=Wr(wt,Hh,Ft.borderRightColor),this.borderBottomColor=Wr(wt,ch,Ft.borderBottomColor),this.borderLeftColor=Wr(wt,hu,Ft.borderLeftColor),this.borderTopLeftRadius=Wr(wt,_o,Ft.borderTopLeftRadius),this.borderTopRightRadius=Wr(wt,Rl,Ft.borderTopRightRadius),this.borderBottomRightRadius=Wr(wt,dh,Ft.borderBottomRightRadius),this.borderBottomLeftRadius=Wr(wt,xu,Ft.borderBottomLeftRadius),this.borderTopStyle=Wr(wt,Su,Ft.borderTopStyle),this.borderRightStyle=Wr(wt,Po,Ft.borderRightStyle),this.borderBottomStyle=Wr(wt,Ho,Ft.borderBottomStyle),this.borderLeftStyle=Wr(wt,Is,Ft.borderLeftStyle),this.borderTopWidth=Wr(wt,pa,Ft.borderTopWidth),this.borderRightWidth=Wr(wt,Wu,Ft.borderRightWidth),this.borderBottomWidth=Wr(wt,Bu,Ft.borderBottomWidth),this.borderLeftWidth=Wr(wt,Zu,Ft.borderLeftWidth),this.boxShadow=Wr(wt,_c,Ft.boxShadow),this.color=Wr(wt,_l,Ft.color),this.direction=Wr(wt,du,Ft.direction),this.display=Wr(wt,qg,Ft.display),this.float=Wr(wt,tp,Ft.cssFloat),this.fontFamily=Wr(wt,ko,Ft.fontFamily),this.fontSize=Wr(wt,Hc,Ft.fontSize),this.fontStyle=Wr(wt,Fu,Ft.fontStyle),this.fontVariant=Wr(wt,Ld,Ft.fontVariant),this.fontWeight=Wr(wt,df,Ft.fontWeight),this.letterSpacing=Wr(wt,sg,Ft.letterSpacing),this.lineBreak=Wr(wt,NA,Ft.lineBreak),this.lineHeight=Wr(wt,ls,Ft.lineHeight),this.listStyleImage=Wr(wt,Ea,Ft.listStyleImage),this.listStylePosition=Wr(wt,La,Ft.listStylePosition),this.listStyleType=Wr(wt,DA,Ft.listStyleType),this.marginTop=Wr(wt,fh,Ft.marginTop),this.marginRight=Wr(wt,ag,Ft.marginRight),this.marginBottom=Wr(wt,lg,Ft.marginBottom),this.marginLeft=Wr(wt,gl,Ft.marginLeft),this.opacity=Wr(wt,Qc,Ft.opacity);var le=Wr(wt,Fd,Ft.overflow);this.overflowX=le[0],this.overflowY=le[le.length>1?1:0],this.overflowWrap=Wr(wt,fs,Ft.overflowWrap),this.paddingTop=Wr(wt,cf,Ft.paddingTop),this.paddingRight=Wr(wt,IA,Ft.paddingRight),this.paddingBottom=Wr(wt,UA,Ft.paddingBottom),this.paddingLeft=Wr(wt,Ed,Ft.paddingLeft),this.paintOrder=Wr(wt,ff,Ft.paintOrder),this.position=Wr(wt,Ma,Ft.position),this.textAlign=Wr(wt,Aa,Ft.textAlign),this.textDecorationColor=Wr(wt,Rh,(Pt=Ft.textDecorationColor)!==null&&Pt!==void 0?Pt:Ft.color),this.textDecorationLine=Wr(wt,Oc,(Gt=Ft.textDecorationLine)!==null&&Gt!==void 0?Gt:Ft.textDecoration),this.textShadow=Wr(wt,gh,Ft.textShadow),this.textTransform=Wr(wt,Kl,Ft.textTransform),this.transform=Wr(wt,QA,Ft.transform),this.transformOrigin=Wr(wt,$l,Ft.transformOrigin),this.visibility=Wr(wt,gs,Ft.visibility),this.webkitTextStrokeColor=Wr(wt,Kc,Ft.webkitTextStrokeColor),this.webkitTextStrokeWidth=Wr(wt,zh,Ft.webkitTextStrokeWidth),this.wordBreak=Wr(wt,gA,Ft.wordBreak),this.zIndex=Wr(wt,OA,Ft.zIndex)}return St.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},St.prototype.isTransparent=function(){return Ds(this.backgroundColor)},St.prototype.isTransformed=function(){return this.transform!==null},St.prototype.isPositioned=function(){return this.position!==0},St.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},St.prototype.isFloating=function(){return this.float!==0},St.prototype.isInlineLevel=function(){return va(this.display,4)||va(this.display,33554432)||va(this.display,268435456)||va(this.display,536870912)||va(this.display,67108864)||va(this.display,134217728)},St}(),ol=function(){function St(wt,Ft){this.content=Wr(wt,Rc,Ft.content),this.quotes=Wr(wt,Kh,Ft.quotes)}return St}(),Eu=function(){function St(wt,Ft){this.counterIncrement=Wr(wt,ep,Ft.counterIncrement),this.counterReset=Wr(wt,_h,Ft.counterReset)}return St}(),Wr=function(St,wt,Ft){var Pt=new Rr,Gt=Ft!==null&&typeof Ft!="undefined"?Ft.toString():wt.initialValue;Pt.write(Gt);var le=new $r(Pt.read());switch(wt.type){case 2:var Pe=le.parseComponentValue();return wt.parse(St,So(Pe)?Pe.value:wt.initialValue);case 0:return wt.parse(St,le.parseComponentValue());case 1:return wt.parse(St,le.parseComponentValues());case 4:return le.parseComponentValue();case 3:switch(wt.format){case"angle":return ws.parse(St,le.parseComponentValue());case"color":return nl.parse(St,le.parseComponentValue());case"image":return ea.parse(St,le.parseComponentValue());case"length":var Ze=le.parseComponentValue();return Ls(Ze)?Ze:yo;case"length-percentage":var Qe=le.parseComponentValue();return Go(Qe)?Qe:yo;case"time":return HA.parse(St,le.parseComponentValue())}break}},pA="data-html2canvas-debug",bd=function(St){var wt=St.getAttribute(pA);switch(wt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},jh=function(St,wt){var Ft=bd(St);return Ft===1||wt===Ft},Lu=function(){function St(wt,Ft){if(this.context=wt,this.textNodes=[],this.elements=[],this.flags=0,jh(Ft,3))debugger;this.styles=new RA(wt,window.getComputedStyle(Ft,null)),oc(Ft)&&(this.styles.animationDuration.some(function(Pt){return Pt>0})&&(Ft.style.animationDuration="0s"),this.styles.transform!==null&&(Ft.style.transform="none")),this.bounds=Ht(this.context,Ft),jh(Ft,4)&&(this.flags|=16)}return St}(),_A="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",KA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ph=0;ph<KA.length;ph++)Vh[KA.charCodeAt(ph)]=ph;for(var ja=function(St){var wt=St.length*.75,Ft=St.length,Pt,Gt=0,le,Pe,Ze,Qe;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var En=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Dn=Array.isArray(En)?En:new Uint8Array(En);for(Pt=0;Pt<Ft;Pt+=4)le=Vh[St.charCodeAt(Pt)],Pe=Vh[St.charCodeAt(Pt+1)],Ze=Vh[St.charCodeAt(Pt+2)],Qe=Vh[St.charCodeAt(Pt+3)],Dn[Gt++]=le<<2|Pe>>4,Dn[Gt++]=(Pe&15)<<4|Ze>>2,Dn[Gt++]=(Ze&3)<<6|Qe&63;return En},mh=function(St){for(var wt=St.length,Ft=[],Pt=0;Pt<wt;Pt+=2)Ft.push(St[Pt+1]<<8|St[Pt]);return Ft},gf=function(St){for(var wt=St.length,Ft=[],Pt=0;Pt<wt;Pt+=4)Ft.push(St[Pt+3]<<24|St[Pt+2]<<16|St[Pt+1]<<8|St[Pt]);return Ft},Mu=5,vh=11,bu=2,Gc=vh-Mu,kd=65536>>Mu,ra=1<<Mu,yh=ra-1,GA=1024>>Mu,wh=kd+GA,zc=wh,pf=32,Wh=zc+pf,ug=65536>>vh,xh=1<<Gc,tu=xh-1,mf=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(St,wt,Ft))},vf=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(St,wt,Ft))},Sh=function(St,wt){var Ft=ja(St),Pt=Array.isArray(Ft)?gf(Ft):new Uint32Array(Ft),Gt=Array.isArray(Ft)?mh(Ft):new Uint16Array(Ft),le=24,Pe=mf(Gt,le/2,Pt[4]/2),Ze=Pt[5]===2?mf(Gt,(le+Pt[4])/2):vf(Pt,Math.ceil((le+Pt[4])/4));return new Zh(Pt[0],Pt[1],Pt[2],Pt[3],Pe,Ze)},Zh=function(){function St(wt,Ft,Pt,Gt,le,Pe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Pt,this.highValueIndex=Gt,this.index=le,this.data=Pe}return St.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>Mu],Ft=(Ft<<bu)+(wt&yh),this.data[Ft];if(wt<=65535)return Ft=this.index[kd+(wt-55296>>Mu)],Ft=(Ft<<bu)+(wt&yh),this.data[Ft];if(wt<this.highStart)return Ft=Wh-ug+(wt>>vh),Ft=this.index[Ft],Ft+=wt>>Mu&tu,Ft=this.index[Ft],Ft=(Ft<<bu)+(wt&yh),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},St}(),Gs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),jc=0;jc<Gs.length;jc++)mA[Gs.charCodeAt(jc)]=jc;var Td=1,Nd=2,Re=3,zA=4,ku=5,Ag=7,Dd=8,Id=9,Vc=10,hg=11,ka=12,Yh=13,Ud=14,Qd=15,cg=function(St){for(var wt=[],Ft=0,Pt=St.length;Ft<Pt;){var Gt=St.charCodeAt(Ft++);if(Gt>=55296&&Gt<=56319&&Ft<Pt){var le=St.charCodeAt(Ft++);(le&64512)===56320?wt.push(((Gt&1023)<<10)+(le&1023)+65536):(wt.push(Gt),Ft--)}else wt.push(Gt)}return wt},dg=function(){for(var St=[],wt=0;wt<arguments.length;wt++)St[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,St);var Ft=St.length;if(!Ft)return"";for(var Pt=[],Gt=-1,le="";++Gt<Ft;){var Pe=St[Gt];Pe<=65535?Pt.push(Pe):(Pe-=65536,Pt.push((Pe>>10)+55296,Pe%1024+56320)),(Gt+1===Ft||Pt.length>16384)&&(le+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return le},fg=Sh(_A),Gl="\xD7",ml="\xF7",Xh=function(St){return fg.get(St)},yf=function(St,wt,Ft){var Pt=Ft-2,Gt=wt[Pt],le=wt[Ft-1],Pe=wt[Ft];if(le===Nd&&Pe===Re)return Gl;if(le===Nd||le===Re||le===zA||Pe===Nd||Pe===Re||Pe===zA)return ml;if(le===Dd&&[Dd,Id,hg,ka].indexOf(Pe)!==-1||(le===hg||le===Id)&&(Pe===Id||Pe===Vc)||(le===ka||le===Vc)&&Pe===Vc||Pe===Yh||Pe===ku||Pe===Ag||le===Td)return Gl;if(le===Yh&&Pe===Ud){for(;Gt===ku;)Gt=wt[--Pt];if(Gt===Ud)return Gl}if(le===Qd&&Pe===Qd){for(var Ze=0;Gt===Qd;)Ze++,Gt=wt[--Pt];if(Ze%2===0)return Gl}return ml},Yu=function(St){var wt=cg(St),Ft=wt.length,Pt=0,Gt=0,le=wt.map(Xh);return{next:function(){if(Pt>=Ft)return{done:!0,value:null};for(var Pe=Gl;Pt<Ft&&(Pe=yf(wt,le,++Pt))===Gl;);if(Pe!==Gl||Pt===Ft){var Ze=dg.apply(null,wt.slice(Gt,Pt));return Gt=Pt,{value:Ze,done:!1}}return{done:!0,value:null}}}},Wc=function(St){for(var wt=Yu(St),Ft=[],Pt;!(Pt=wt.next()).done;)Pt.value&&Ft.push(Pt.value.slice());return Ft},Od=function(St){var wt=123;if(St.createRange){var Ft=St.createRange();if(Ft.getBoundingClientRect){var Pt=St.createElement("boundtest");Pt.style.height=wt+"px",Pt.style.display="block",St.body.appendChild(Pt),Ft.selectNode(Pt);var Gt=Ft.getBoundingClientRect(),le=Math.round(Gt.height);if(St.body.removeChild(Pt),le===wt)return!0}}return!1},Zc=function(St){var wt=St.createElement("boundtest");wt.style.width="50px",wt.style.display="block",wt.style.fontSize="12px",wt.style.letterSpacing="0px",wt.style.wordSpacing="0px",St.body.appendChild(wt);var Ft=St.createRange();wt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var Pt=wt.firstChild,Gt=Ae(Pt.data).map(function(Qe){return re(Qe)}),le=0,Pe={},Ze=Gt.every(function(Qe,En){Ft.setStart(Pt,le),Ft.setEnd(Pt,le+Qe.length);var Dn=Ft.getBoundingClientRect();le+=Qe.length;var $n=Dn.x>Pe.x||Dn.y>Pe.y;return Pe=Dn,En===0?!0:$n});return St.body.removeChild(wt),Ze},bl=function(){return typeof new Image().crossOrigin!="undefined"},wf=function(){return typeof new XMLHttpRequest().responseType=="string"},xf=function(St){var wt=new Image,Ft=St.createElement("canvas"),Pt=Ft.getContext("2d");if(!Pt)return!1;wt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{Pt.drawImage(wt,0,0),Ft.toDataURL()}catch(Gt){return!1}return!0},zl=function(St){return St[0]===0&&St[1]===255&&St[2]===0&&St[3]===255},Jh=function(St){var wt=St.createElement("canvas"),Ft=100;wt.width=Ft,wt.height=Ft;var Pt=wt.getContext("2d");if(!Pt)return Promise.reject(!1);Pt.fillStyle="rgb(0, 255, 0)",Pt.fillRect(0,0,Ft,Ft);var Gt=new Image,le=wt.toDataURL();Gt.src=le;var Pe=Yc(Ft,Ft,0,0,Gt);return Pt.fillStyle="red",Pt.fillRect(0,0,Ft,Ft),Sf(Pe).then(function(Ze){Pt.drawImage(Ze,0,0);var Qe=Pt.getImageData(0,0,Ft,Ft).data;Pt.fillStyle="red",Pt.fillRect(0,0,Ft,Ft);var En=St.createElement("div");return En.style.backgroundImage="url("+le+")",En.style.height=Ft+"px",zl(Qe)?Sf(Yc(Ft,Ft,0,0,En)):Promise.reject(!1)}).then(function(Ze){return Pt.drawImage(Ze,0,0),zl(Pt.getImageData(0,0,Ft,Ft).data)}).catch(function(){return!1})},Yc=function(St,wt,Ft,Pt,Gt){var le="http://www.w3.org/2000/svg",Pe=document.createElementNS(le,"svg"),Ze=document.createElementNS(le,"foreignObject");return Pe.setAttributeNS(null,"width",St.toString()),Pe.setAttributeNS(null,"height",wt.toString()),Ze.setAttributeNS(null,"width","100%"),Ze.setAttributeNS(null,"height","100%"),Ze.setAttributeNS(null,"x",Ft.toString()),Ze.setAttributeNS(null,"y",Pt.toString()),Ze.setAttributeNS(null,"externalResourcesRequired","true"),Pe.appendChild(Ze),Ze.appendChild(Gt),Pe},Sf=function(St){return new Promise(function(wt,Ft){var Pt=new Image;Pt.onload=function(){return wt(Pt)},Pt.onerror=Ft,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(St))})},ha={get SUPPORT_RANGE_BOUNDS(){var St=Od(document);return Object.defineProperty(ha,"SUPPORT_RANGE_BOUNDS",{value:St}),St},get SUPPORT_WORD_BREAKING(){var St=ha.SUPPORT_RANGE_BOUNDS&&Zc(document);return Object.defineProperty(ha,"SUPPORT_WORD_BREAKING",{value:St}),St},get SUPPORT_SVG_DRAWING(){var St=xf(document);return Object.defineProperty(ha,"SUPPORT_SVG_DRAWING",{value:St}),St},get SUPPORT_FOREIGNOBJECT_DRAWING(){var St=typeof Array.from=="function"&&typeof window.fetch=="function"?Jh(document):Promise.resolve(!1);return Object.defineProperty(ha,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:St}),St},get SUPPORT_CORS_IMAGES(){var St=bl();return Object.defineProperty(ha,"SUPPORT_CORS_IMAGES",{value:St}),St},get SUPPORT_RESPONSE_TYPE(){var St=wf();return Object.defineProperty(ha,"SUPPORT_RESPONSE_TYPE",{value:St}),St},get SUPPORT_CORS_XHR(){var St="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ha,"SUPPORT_CORS_XHR",{value:St}),St},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var St=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ha,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:St}),St}},Qa=function(){function St(wt,Ft){this.text=wt,this.bounds=Ft}return St}(),Bf=function(St,wt,Ft,Pt){var Gt=tc(wt,Ft),le=[],Pe=0;return Gt.forEach(function(Ze){if(Ft.textDecorationLine.length||Ze.trim().length>0)if(ha.SUPPORT_RANGE_BOUNDS){var Qe=qh(Pt,Pe,Ze.length).getClientRects();if(Qe.length>1){var En=$h(Ze),Dn=0;En.forEach(function(Ni){le.push(new Qa(Ni,de.fromDOMRectList(St,qh(Pt,Dn+Pe,Ni.length).getClientRects()))),Dn+=Ni.length})}else le.push(new Qa(Ze,de.fromDOMRectList(St,Qe)))}else{var $n=Pt.splitText(Ze.length);le.push(new Qa(Ze,oa(St,Pt))),Pt=$n}else ha.SUPPORT_RANGE_BOUNDS||(Pt=Pt.splitText(Ze.length));Pe+=Ze.length}),le},oa=function(St,wt){var Ft=wt.ownerDocument;if(Ft){var Pt=Ft.createElement("html2canvaswrapper");Pt.appendChild(wt.cloneNode(!0));var Gt=wt.parentNode;if(Gt){Gt.replaceChild(Pt,wt);var le=Ht(St,Pt);return Pt.firstChild&&Gt.replaceChild(Pt.firstChild,Pt),le}}return de.EMPTY},qh=function(St,wt,Ft){var Pt=St.ownerDocument;if(!Pt)throw new Error("Node has no owner document");var Gt=Pt.createRange();return Gt.setStart(St,wt),Gt.setEnd(St,wt+Ft),Gt},$h=function(St){if(ha.SUPPORT_NATIVE_TEXT_SEGMENTATION){var wt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(wt.segment(St)).map(function(Ft){return Ft.segment})}return Wc(St)},jA=function(St,wt){if(ha.SUPPORT_NATIVE_TEXT_SEGMENTATION){var Ft=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(Ft.segment(St)).map(function(Pt){return Pt.segment})}return Cf(St,wt)},tc=function(St,wt){return wt.letterSpacing!==0?$h(St):jA(St,wt)},ec=[32,160,4961,65792,65793,4153,4241],Cf=function(St,wt){for(var Ft=fi(St,{lineBreak:wt.lineBreak,wordBreak:wt.overflowWrap==="break-word"?"break-word":wt.wordBreak}),Pt=[],Gt,le=function(){if(Gt.value){var Pe=Gt.value.slice(),Ze=Ae(Pe),Qe="";Ze.forEach(function(En){ec.indexOf(En)===-1?Qe+=re(En):(Qe.length&&Pt.push(Qe),Pt.push(re(En)),Qe="")}),Qe.length&&Pt.push(Qe)}};!(Gt=Ft.next()).done;)le();return Pt},nc=function(){function St(wt,Ft,Pt){this.text=Pf(Ft.data,Pt.textTransform),this.textBounds=Bf(wt,this.text,Pt,Ft)}return St}(),Pf=function(St,wt){switch(wt){case 1:return St.toLowerCase();case 3:return St.replace(Xu,Bh);case 2:return St.toUpperCase();default:return St}},Xu=/(^|\s|:|-|\(|\))([a-z])/g,Bh=function(St,wt,Ft){return St.length>0?wt+Ft.toUpperCase():St},Xc=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.src=Pt.currentSrc||Pt.src,Gt.intrinsicWidth=Pt.naturalWidth,Gt.intrinsicHeight=Pt.naturalHeight,Gt.context.cache.addImage(Gt.src),Gt}return wt}(Lu),Jc=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.canvas=Pt,Gt.intrinsicWidth=Pt.width,Gt.intrinsicHeight=Pt.height,Gt}return wt}(Lu),qc=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this,le=new XMLSerializer,Pe=Ht(Ft,Pt);return Pt.setAttribute("width",Pe.width+"px"),Pt.setAttribute("height",Pe.height+"px"),Gt.svg="data:image/svg+xml,"+encodeURIComponent(le.serializeToString(Pt)),Gt.intrinsicWidth=Pt.width.baseVal.value,Gt.intrinsicHeight=Pt.height.baseVal.value,Gt.context.cache.addImage(Gt.svg),Gt}return wt}(Lu),VA=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.value=Pt.value,Gt}return wt}(Lu),$c=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.start=Pt.start,Gt.reversed=typeof Pt.reversed=="boolean"&&Pt.reversed===!0,Gt}return wt}(Lu),Ff=[{type:15,flags:0,unit:"px",number:3}],Ef=[{type:16,flags:0,number:50}],Tu=function(St){return St.width>St.height?new de(St.left+(St.width-St.height)/2,St.top,St.height,St.height):St.width<St.height?new de(St.left,St.top+(St.height-St.width)/2,St.width,St.width):St},gg=function(St){var wt=St.type===Ch?new Array(St.value.length+1).join("\u2022"):St.value;return wt.length===0?St.placeholder||"":wt},ic="checkbox",vA="radio",Ch="password",Hd=707406591,eu=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;switch(Gt.type=Pt.type.toLowerCase(),Gt.checked=Pt.checked,Gt.value=gg(Pt),(Gt.type===ic||Gt.type===vA)&&(Gt.styles.backgroundColor=3739148031,Gt.styles.borderTopColor=Gt.styles.borderRightColor=Gt.styles.borderBottomColor=Gt.styles.borderLeftColor=2779096575,Gt.styles.borderTopWidth=Gt.styles.borderRightWidth=Gt.styles.borderBottomWidth=Gt.styles.borderLeftWidth=1,Gt.styles.borderTopStyle=Gt.styles.borderRightStyle=Gt.styles.borderBottomStyle=Gt.styles.borderLeftStyle=1,Gt.styles.backgroundClip=[0],Gt.styles.backgroundOrigin=[0],Gt.bounds=Tu(Gt.bounds)),Gt.type){case ic:Gt.styles.borderTopRightRadius=Gt.styles.borderTopLeftRadius=Gt.styles.borderBottomRightRadius=Gt.styles.borderBottomLeftRadius=Ff;break;case vA:Gt.styles.borderTopRightRadius=Gt.styles.borderTopLeftRadius=Gt.styles.borderBottomRightRadius=Gt.styles.borderBottomLeftRadius=Ef;break}return Gt}return wt}(Lu),Rd=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this,le=Pt.options[Pt.selectedIndex||0];return Gt.value=le&&le.text||"",Gt}return wt}(Lu),td=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.value=Pt.value,Gt}return wt}(Lu),Lf=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;Gt.src=Pt.src,Gt.width=parseInt(Pt.width,10)||0,Gt.height=parseInt(Pt.height,10)||0,Gt.backgroundColor=Gt.styles.backgroundColor;try{if(Pt.contentWindow&&Pt.contentWindow.document&&Pt.contentWindow.document.documentElement){Gt.tree=bf(Ft,Pt.contentWindow.document.documentElement);var le=Pt.contentWindow.document.documentElement?Co(Ft,getComputedStyle(Pt.contentWindow.document.documentElement).backgroundColor):cs.TRANSPARENT,Pe=Pt.contentWindow.document.body?Co(Ft,getComputedStyle(Pt.contentWindow.document.body).backgroundColor):cs.TRANSPARENT;Gt.backgroundColor=Ds(le)?Ds(Pe)?Gt.styles.backgroundColor:Pe:le}}catch(Ze){}return Gt}return wt}(Lu),Mf=["OL","UL","MENU"],rc=function(St,wt,Ft,Pt){for(var Gt=wt.firstChild,le=void 0;Gt;Gt=le)if(le=Gt.nextSibling,ed(Gt)&&Gt.data.trim().length>0)Ft.textNodes.push(new nc(St,Gt,Ft.styles));else if(Ph(Gt))if(zd(Gt)&&Gt.assignedNodes)Gt.assignedNodes().forEach(function(Ze){return rc(St,Ze,Ft,Pt)});else{var Pe=pg(St,Gt);Pe.styles.isVisible()&&(_d(Gt,Pe,Pt)?Pe.flags|=4:Kd(Pe.styles)&&(Pe.flags|=2),Mf.indexOf(Gt.tagName)!==-1&&(Pe.flags|=8),Ft.elements.push(Pe),Gt.slot,Gt.shadowRoot?rc(St,Gt.shadowRoot,Pe,Pt):!sc(Gt)&&!Tf(Gt)&&!ac(Gt)&&rc(St,Gt,Pe,Pt))}},pg=function(St,wt){return ca(wt)?new Xc(St,wt):Fh(wt)?new Jc(St,wt):Tf(wt)?new qc(St,wt):kf(wt)?new VA(St,wt):nd(wt)?new $c(St,wt):mg(wt)?new eu(St,wt):ac(wt)?new Rd(St,wt):sc(wt)?new td(St,wt):sl(wt)?new Lf(St,wt):new Lu(St,wt)},bf=function(St,wt){var Ft=pg(St,wt);return Ft.flags|=4,rc(St,wt,Ft,Ft),Ft},_d=function(St,wt,Ft){return wt.styles.isPositionedWithZIndex()||wt.styles.opacity<1||wt.styles.isTransformed()||Xo(St)&&Ft.styles.isTransparent()},Kd=function(St){return St.isPositioned()||St.isFloating()},ed=function(St){return St.nodeType===Node.TEXT_NODE},Ph=function(St){return St.nodeType===Node.ELEMENT_NODE},oc=function(St){return Ph(St)&&typeof St.style!="undefined"&&!Nu(St)},Nu=function(St){return typeof St.className=="object"},kf=function(St){return St.tagName==="LI"},nd=function(St){return St.tagName==="OL"},mg=function(St){return St.tagName==="INPUT"},Gd=function(St){return St.tagName==="HTML"},Tf=function(St){return St.tagName==="svg"},Xo=function(St){return St.tagName==="BODY"},Fh=function(St){return St.tagName==="CANVAS"},WA=function(St){return St.tagName==="VIDEO"},ca=function(St){return St.tagName==="IMG"},sl=function(St){return St.tagName==="IFRAME"},ZA=function(St){return St.tagName==="STYLE"},id=function(St){return St.tagName==="SCRIPT"},sc=function(St){return St.tagName==="TEXTAREA"},ac=function(St){return St.tagName==="SELECT"},zd=function(St){return St.tagName==="SLOT"},jd=function(St){return St.tagName.indexOf("-")>0},Nf=function(){function St(){this.counters={}}return St.prototype.getCounterValue=function(wt){var Ft=this.counters[wt];return Ft&&Ft.length?Ft[Ft.length-1]:1},St.prototype.getCounterValues=function(wt){var Ft=this.counters[wt];return Ft||[]},St.prototype.pop=function(wt){var Ft=this;wt.forEach(function(Pt){return Ft.counters[Pt].pop()})},St.prototype.parse=function(wt){var Ft=this,Pt=wt.counterIncrement,Gt=wt.counterReset,le=!0;Pt!==null&&Pt.forEach(function(Ze){var Qe=Ft.counters[Ze.counter];Qe&&Ze.increment!==0&&(le=!1,Qe.length||Qe.push(1),Qe[Math.max(0,Qe.length-1)]+=Ze.increment)});var Pe=[];return le&&Gt.forEach(function(Ze){var Qe=Ft.counters[Ze.counter];Pe.push(Ze.counter),Qe||(Qe=Ft.counters[Ze.counter]=[]),Qe.push(Ze.reset)}),Pe},St}(),yA={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"]},lc={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"]},YA={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"]},Bs={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"]},wA=function(St,wt,Ft,Pt,Gt,le){return St<wt||St>Ft?dt(St,Gt,le.length>0):Pt.integers.reduce(function(Pe,Ze,Qe){for(;St>=Ze;)St-=Ze,Pe+=Pt.values[Qe];return Pe},"")+le},Vd=function(St,wt,Ft,Pt){var Gt="";do Ft||St--,Gt=Pt(St)+Gt,St/=wt;while(St*wt>=wt);return Gt},Zs=function(St,wt,Ft,Pt,Gt){var le=Ft-wt+1;return(St<0?"-":"")+(Vd(Math.abs(St),le,Pt,function(Pe){return re(Math.floor(Pe%le)+wt)})+Gt)},fu=function(St,wt,Ft){Ft===void 0&&(Ft=". ");var Pt=wt.length;return Vd(Math.abs(St),Pt,!1,function(Gt){return wt[Math.floor(Gt%Pt)]})+Ft},Ju=1,xA=2,Qs=4,uc=8,jl=function(St,wt,Ft,Pt,Gt,le){if(St<-9999||St>9999)return dt(St,4,Gt.length>0);var Pe=Math.abs(St),Ze=Gt;if(Pe===0)return wt[0]+Ze;for(var Qe=0;Pe>0&&Qe<=4;Qe++){var En=Pe%10;En===0&&va(le,Ju)&&Ze!==""?Ze=wt[En]+Ze:En>1||En===1&&Qe===0||En===1&&Qe===1&&va(le,xA)||En===1&&Qe===1&&va(le,Qs)&&St>100||En===1&&Qe>1&&va(le,uc)?Ze=wt[En]+(Qe>0?Ft[Qe-1]:"")+Ze:En===1&&Qe>0&&(Ze=Ft[Qe-1]+Ze),Pe=Math.floor(Pe/10)}return(St<0?Pt:"")+Ze},qu="\u5341\u767E\u5343\u842C",Ac="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",dt=function(St,wt,Ft){var Pt=Ft?". ":"",Gt=Ft?"\u3001":"",le=Ft?", ":"",Pe=Ft?" ":"";switch(wt){case 0:return"\u2022"+Pe;case 1:return"\u25E6"+Pe;case 2:return"\u25FE"+Pe;case 5:var Ze=Zs(St,48,57,!0,Pt);return Ze.length<4?"0"+Ze:Ze;case 4:return fu(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Gt);case 6:return wA(St,1,3999,yA,3,Pt).toLowerCase();case 7:return wA(St,1,3999,yA,3,Pt);case 8:return Zs(St,945,969,!1,Pt);case 9:return Zs(St,97,122,!1,Pt);case 10:return Zs(St,65,90,!1,Pt);case 11:return Zs(St,1632,1641,!0,Pt);case 12:case 49:return wA(St,1,9999,lc,3,Pt);case 35:return wA(St,1,9999,lc,3,Pt).toLowerCase();case 13:return Zs(St,2534,2543,!0,Pt);case 14:case 30:return Zs(St,6112,6121,!0,Pt);case 15:return fu(St,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Gt);case 16:return fu(St,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Gt);case 17:case 48:return jl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",qu,"\u8CA0",Gt,xA|Qs|uc);case 47:return jl(St,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ac,"\u8CA0",Gt,Ju|xA|Qs|uc);case 42:return jl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",qu,"\u8D1F",Gt,xA|Qs|uc);case 41:return jl(St,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ac,"\u8D1F",Gt,Ju|xA|Qs|uc);case 26:return jl(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Gt,0);case 25:return jl(St,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Gt,Ju|xA|Qs);case 31:return jl(St,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,le,Ju|xA|Qs);case 33:return jl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,le,0);case 32:return jl(St,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,le,Ju|xA|Qs);case 18:return Zs(St,2406,2415,!0,Pt);case 20:return wA(St,1,19999,Bs,3,Pt);case 21:return Zs(St,2790,2799,!0,Pt);case 22:return Zs(St,2662,2671,!0,Pt);case 22:return wA(St,1,10999,YA,3,Pt);case 23:return fu(St,"\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 fu(St,"\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 Zs(St,3302,3311,!0,Pt);case 28:return fu(St,"\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",Gt);case 29:return fu(St,"\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",Gt);case 34:return Zs(St,3792,3801,!0,Pt);case 37:return Zs(St,6160,6169,!0,Pt);case 38:return Zs(St,4160,4169,!0,Pt);case 39:return Zs(St,2918,2927,!0,Pt);case 40:return Zs(St,1776,1785,!0,Pt);case 43:return Zs(St,3046,3055,!0,Pt);case 44:return Zs(St,3174,3183,!0,Pt);case 45:return Zs(St,3664,3673,!0,Pt);case 46:return Zs(St,3872,3881,!0,Pt);case 3:default:return Zs(St,48,57,!0,Pt)}},ht="data-html2canvas-ignore",gt=function(){function St(wt,Ft,Pt){if(this.context=wt,this.options=Pt,this.scrolledElements=[],this.referenceElement=Ft,this.counters=new Nf,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 St.prototype.toIFrame=function(wt,Ft){var Pt=this,Gt=Kt(wt,Ft);if(!Gt.contentWindow)return Promise.reject("Unable to find iframe window");var le=wt.defaultView.pageXOffset,Pe=wt.defaultView.pageYOffset,Ze=Gt.contentWindow,Qe=Ze.document,En=pe(Gt).then(function(){return ee(Pt,void 0,void 0,function(){var Dn,$n;return ue(this,function(Ni){switch(Ni.label){case 0:return this.scrolledElements.forEach(wi),Ze&&(Ze.scrollTo(Ft.left,Ft.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ze.scrollY!==Ft.top||Ze.scrollX!==Ft.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ze.scrollX-Ft.left,Ze.scrollY-Ft.top,0,0))),Dn=this.options.onclone,$n=this.clonedReferenceElement,typeof $n=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Qe.fonts&&Qe.fonts.ready?[4,Qe.fonts.ready]:[3,2];case 1:Ni.sent(),Ni.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Yt(Qe)]:[3,4];case 3:Ni.sent(),Ni.label=4;case 4:return typeof Dn=="function"?[2,Promise.resolve().then(function(){return Dn(Qe,$n)}).then(function(){return Gt})]:[2,Gt]}})})});return Qe.open(),Qe.write(Pn(document.doctype)+"<html></html>"),wn(this.referenceElement.ownerDocument,le,Pe),Qe.replaceChild(Qe.adoptNode(this.documentElement),Qe.documentElement),Qe.close(),En},St.prototype.createElementClone=function(wt){if(jh(wt,2))debugger;if(Fh(wt))return this.createCanvasClone(wt);if(WA(wt))return this.createVideoClone(wt);if(ZA(wt))return this.createStyleClone(wt);var Ft=wt.cloneNode(!1);return ca(Ft)&&(ca(wt)&&wt.currentSrc&&wt.currentSrc!==wt.src&&(Ft.src=wt.currentSrc,Ft.srcset=""),Ft.loading==="lazy"&&(Ft.loading="eager")),jd(Ft)?this.createCustomElementClone(Ft):Ft},St.prototype.createCustomElementClone=function(wt){var Ft=document.createElement("html2canvascustomelement");return ye(wt.style,Ft),Ft},St.prototype.createStyleClone=function(wt){try{var Ft=wt.sheet;if(Ft&&Ft.cssRules){var Pt=[].slice.call(Ft.cssRules,0).reduce(function(le,Pe){return Pe&&typeof Pe.cssText=="string"?le+Pe.cssText:le},""),Gt=wt.cloneNode(!1);return Gt.textContent=Pt,Gt}}catch(le){if(this.context.logger.error("Unable to access cssRules property",le),le.name!=="SecurityError")throw le}return wt.cloneNode(!1)},St.prototype.createCanvasClone=function(wt){var Ft;if(this.options.inlineImages&&wt.ownerDocument){var Pt=wt.ownerDocument.createElement("img");try{return Pt.src=wt.toDataURL(),Pt}catch(En){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var Gt=wt.cloneNode(!1);try{Gt.width=wt.width,Gt.height=wt.height;var le=wt.getContext("2d"),Pe=Gt.getContext("2d");if(Pe)if(!this.options.allowTaint&&le)Pe.putImageData(le.getImageData(0,0,wt.width,wt.height),0,0);else{var Ze=(Ft=wt.getContext("webgl2"))!==null&&Ft!==void 0?Ft:wt.getContext("webgl");if(Ze){var Qe=Ze.getContextAttributes();(Qe==null?void 0:Qe.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Pe.drawImage(wt,0,0)}return Gt}catch(En){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return Gt},St.prototype.createVideoClone=function(wt){var Ft=wt.ownerDocument.createElement("canvas");Ft.width=wt.offsetWidth,Ft.height=wt.offsetHeight;var Pt=Ft.getContext("2d");try{return Pt&&(Pt.drawImage(wt,0,0,Ft.width,Ft.height),this.options.allowTaint||Pt.getImageData(0,0,Ft.width,Ft.height)),Ft}catch(le){this.context.logger.info("Unable to clone video as it is tainted",wt)}var Gt=wt.ownerDocument.createElement("canvas");return Gt.width=wt.offsetWidth,Gt.height=wt.offsetHeight,Gt},St.prototype.appendChildNode=function(wt,Ft,Pt){(!Ph(Ft)||!id(Ft)&&!Ft.hasAttribute(ht)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(Ft)))&&(!this.options.copyStyles||!Ph(Ft)||!ZA(Ft))&&wt.appendChild(this.cloneNode(Ft,Pt))},St.prototype.cloneChildNodes=function(wt,Ft,Pt){for(var Gt=this,le=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;le;le=le.nextSibling)if(Ph(le)&&zd(le)&&typeof le.assignedNodes=="function"){var Pe=le.assignedNodes();Pe.length&&Pe.forEach(function(Ze){return Gt.appendChildNode(Ft,Ze,Pt)})}else this.appendChildNode(Ft,le,Pt)},St.prototype.cloneNode=function(wt,Ft){if(ed(wt))return document.createTextNode(wt.data);if(!wt.ownerDocument)return wt.cloneNode(!1);var Pt=wt.ownerDocument.defaultView;if(Pt&&Ph(wt)&&(oc(wt)||Nu(wt))){var Gt=this.createElementClone(wt);Gt.style.transitionProperty="none";var le=Pt.getComputedStyle(wt),Pe=Pt.getComputedStyle(wt,":before"),Ze=Pt.getComputedStyle(wt,":after");this.referenceElement===wt&&oc(Gt)&&(this.clonedReferenceElement=Gt),Xo(Gt)&&Kr(Gt);var Qe=this.counters.parse(new Eu(this.context,le)),En=this.resolvePseudoContent(wt,Gt,Pe,Nt.BEFORE);jd(wt)&&(Ft=!0),WA(wt)||this.cloneChildNodes(wt,Gt,Ft),En&&Gt.insertBefore(En,Gt.firstChild);var Dn=this.resolvePseudoContent(wt,Gt,Ze,Nt.AFTER);return Dn&&Gt.appendChild(Dn),this.counters.pop(Qe),(le&&(this.options.copyStyles||Nu(wt))&&!sl(wt)||Ft)&&ye(le,Gt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([Gt,wt.scrollLeft,wt.scrollTop]),(sc(wt)||ac(wt))&&(sc(Gt)||ac(Gt))&&(Gt.value=wt.value),Gt}return wt.cloneNode(!1)},St.prototype.resolvePseudoContent=function(wt,Ft,Pt,Gt){var le=this;if(Pt){var Pe=Pt.content,Ze=Ft.ownerDocument;if(!(!Ze||!Pe||Pe==="none"||Pe==="-moz-alt-content"||Pt.display==="none")){this.counters.parse(new Eu(this.context,Pt));var Qe=new ol(this.context,Pt),En=Ze.createElement("html2canvaspseudoelement");ye(Pt,En),Qe.content.forEach(function($n){if($n.type===0)En.appendChild(Ze.createTextNode($n.value));else if($n.type===22){var Ni=Ze.createElement("img");Ni.src=$n.value,Ni.style.opacity="1",En.appendChild(Ni)}else if($n.type===18){if($n.name==="attr"){var Hr=$n.values.filter(So);Hr.length&&En.appendChild(Ze.createTextNode(wt.getAttribute(Hr[0].value)||""))}else if($n.name==="counter"){var hr=$n.values.filter(Do),Cr=hr[0],jo=hr[1];if(Cr&&So(Cr)){var ro=le.counters.getCounterValue(Cr.value),lo=jo&&So(jo)?DA.parse(le.context,jo.value):3;En.appendChild(Ze.createTextNode(dt(ro,lo,!1)))}}else if($n.name==="counters"){var ho=$n.values.filter(Do),Cr=ho[0],qo=ho[1],jo=ho[2];if(Cr&&So(Cr)){var No=le.counters.getCounterValues(Cr.value),Zr=jo&&So(jo)?DA.parse(le.context,jo.value):3,As=qo&&qo.type===0?qo.value:"",ps=No.map(function(kl){return dt(kl,Zr,!1)}).join(As);En.appendChild(Ze.createTextNode(ps))}}}else if($n.type===20)switch($n.value){case"open-quote":En.appendChild(Ze.createTextNode(Gh(Qe.quotes,le.quoteDepth++,!0)));break;case"close-quote":En.appendChild(Ze.createTextNode(Gh(Qe.quotes,--le.quoteDepth,!1)));break;default:En.appendChild(Ze.createTextNode($n.value))}}),En.className=sr+" "+Dr;var Dn=Gt===Nt.BEFORE?" "+sr:" "+Dr;return Nu(Ft)?Ft.className.baseValue+=Dn:Ft.className+=Dn,En}}},St.destroy=function(wt){return wt.parentNode?(wt.parentNode.removeChild(wt),!0):!1},St}(),Nt;(function(St){St[St.BEFORE=0]="BEFORE",St[St.AFTER=1]="AFTER"})(Nt||(Nt={}));var Kt=function(St,wt){var Ft=St.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(ht,"true"),St.body.appendChild(Ft),Ft},qt=function(St){return new Promise(function(wt){if(St.complete){wt();return}if(!St.src){wt();return}St.onload=wt,St.onerror=wt})},Yt=function(St){return Promise.all([].slice.call(St.images,0).map(qt))},pe=function(St){return new Promise(function(wt,Ft){var Pt=St.contentWindow;if(!Pt)return Ft("No window assigned for iframe");var Gt=Pt.document;Pt.onload=St.onload=function(){Pt.onload=St.onload=null;var le=setInterval(function(){Gt.body.childNodes.length>0&&Gt.readyState==="complete"&&(clearInterval(le),wt(St))},50)}})},$e=["all","d","content"],ye=function(St,wt){for(var Ft=St.length-1;Ft>=0;Ft--){var Pt=St.item(Ft);$e.indexOf(Pt)===-1&&wt.style.setProperty(Pt,St.getPropertyValue(Pt))}return wt},Pn=function(St){var wt="";return St&&(wt+="<!DOCTYPE ",St.name&&(wt+=St.name),St.internalSubset&&(wt+=St.internalSubset),St.publicId&&(wt+='"'+St.publicId+'"'),St.systemId&&(wt+='"'+St.systemId+'"'),wt+=">"),wt},wn=function(St,wt,Ft){St&&St.defaultView&&(wt!==St.defaultView.pageXOffset||Ft!==St.defaultView.pageYOffset)&&St.defaultView.scrollTo(wt,Ft)},wi=function(St){var wt=St[0],Ft=St[1],Pt=St[2];wt.scrollLeft=Ft,wt.scrollTop=Pt},Fi=":before",_i=":after",sr="___html2canvas___pseudoelement_before",Dr="___html2canvas___pseudoelement_after",Sr=`{
content: "" !important;
display: none !important;
}`,Kr=function(St){fo(St,"."+sr+Fi+Sr+`
.`+Dr+_i+Sr)},fo=function(St,wt){var Ft=St.ownerDocument;if(Ft){var Pt=Ft.createElement("style");Pt.textContent=wt,St.appendChild(Pt)}},vr=function(){function St(){}return St.getOrigin=function(wt){var Ft=St._link;return Ft?(Ft.href=wt,Ft.href=Ft.href,Ft.protocol+Ft.hostname+Ft.port):"about:blank"},St.isSameOrigin=function(wt){return St.getOrigin(wt)===St._origin},St.setContext=function(wt){St._link=wt.document.createElement("a"),St._origin=St.getOrigin(wt.location.href)},St._origin="about:blank",St}(),To=function(){function St(wt,Ft){this.context=wt,this._options=Ft,this._cache={}}return St.prototype.addImage=function(wt){var Ft=Promise.resolve();return this.has(wt)||(al(wt)||vl(wt))&&(this._cache[wt]=this.loadImage(wt)).catch(function(){}),Ft},St.prototype.match=function(wt){return this._cache[wt]},St.prototype.loadImage=function(wt){return ee(this,void 0,void 0,function(){var Ft,Pt,Gt,le,Pe=this;return ue(this,function(Ze){switch(Ze.label){case 0:return Ft=vr.isSameOrigin(wt),Pt=!Ta(wt)&&this._options.useCORS===!0&&ha.SUPPORT_CORS_IMAGES&&!Ft,Gt=!Ta(wt)&&!Ft&&!al(wt)&&typeof this._options.proxy=="string"&&ha.SUPPORT_CORS_XHR&&!Pt,!Ft&&this._options.allowTaint===!1&&!Ta(wt)&&!al(wt)&&!Gt&&!Pt?[2]:(le=wt,Gt?[4,this.proxy(le)]:[3,2]);case 1:le=Ze.sent(),Ze.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Qe,En){var Dn=new Image;Dn.onload=function(){return Qe(Dn)},Dn.onerror=En,(ya(le)||Pt)&&(Dn.crossOrigin="anonymous"),Dn.src=le,Dn.complete===!0&&setTimeout(function(){return Qe(Dn)},500),Pe._options.imageTimeout>0&&setTimeout(function(){return En("Timed out ("+Pe._options.imageTimeout+"ms) loading image")},Pe._options.imageTimeout)})];case 3:return[2,Ze.sent()]}})})},St.prototype.has=function(wt){return typeof this._cache[wt]!="undefined"},St.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},St.prototype.proxy=function(wt){var Ft=this,Pt=this._options.proxy;if(!Pt)throw new Error("No proxy defined");var Gt=wt.substring(0,256);return new Promise(function(le,Pe){var Ze=ha.SUPPORT_RESPONSE_TYPE?"blob":"text",Qe=new XMLHttpRequest;Qe.onload=function(){if(Qe.status===200)if(Ze==="text")le(Qe.response);else{var $n=new FileReader;$n.addEventListener("load",function(){return le($n.result)},!1),$n.addEventListener("error",function(Ni){return Pe(Ni)},!1),$n.readAsDataURL(Qe.response)}else Pe("Failed to proxy resource "+Gt+" with status code "+Qe.status)},Qe.onerror=Pe;var En=Pt.indexOf("?")>-1?"&":"?";if(Qe.open("GET",""+Pt+En+"url="+encodeURIComponent(wt)+"&responseType="+Ze),Ze!=="text"&&Qe instanceof XMLHttpRequest&&(Qe.responseType=Ze),Ft._options.imageTimeout){var Dn=Ft._options.imageTimeout;Qe.timeout=Dn,Qe.ontimeout=function(){return Pe("Timed out ("+Dn+"ms) proxying "+Gt)}}Qe.send()})},St}(),Os=/^data:image\/svg\+xml/i,Ca=/^data:image\/.*;base64,/i,js=/^data:image\/.*/i,vl=function(St){return ha.SUPPORT_SVG_DRAWING||!Oa(St)},Ta=function(St){return js.test(St)},ya=function(St){return Ca.test(St)},al=function(St){return St.substr(0,4)==="blob"},Oa=function(St){return St.substr(-3).toLowerCase()==="svg"||Os.test(St)},pr=function(){function St(wt,Ft){this.type=0,this.x=wt,this.y=Ft}return St.prototype.add=function(wt,Ft){return new St(this.x+wt,this.y+Ft)},St}(),Zo=function(St,wt,Ft){return new pr(St.x+(wt.x-St.x)*Ft,St.y+(wt.y-St.y)*Ft)},Hs=function(){function St(wt,Ft,Pt,Gt){this.type=1,this.start=wt,this.startControl=Ft,this.endControl=Pt,this.end=Gt}return St.prototype.subdivide=function(wt,Ft){var Pt=Zo(this.start,this.startControl,wt),Gt=Zo(this.startControl,this.endControl,wt),le=Zo(this.endControl,this.end,wt),Pe=Zo(Pt,Gt,wt),Ze=Zo(Gt,le,wt),Qe=Zo(Pe,Ze,wt);return Ft?new St(this.start,Pt,Pe,Qe):new St(Qe,Ze,le,this.end)},St.prototype.add=function(wt,Ft){return new St(this.start.add(wt,Ft),this.startControl.add(wt,Ft),this.endControl.add(wt,Ft),this.end.add(wt,Ft))},St.prototype.reverse=function(){return new St(this.end,this.endControl,this.startControl,this.start)},St}(),bs=function(St){return St.type===1},Ha=function(){function St(wt){var Ft=wt.styles,Pt=wt.bounds,Gt=Sa(Ft.borderTopLeftRadius,Pt.width,Pt.height),le=Gt[0],Pe=Gt[1],Ze=Sa(Ft.borderTopRightRadius,Pt.width,Pt.height),Qe=Ze[0],En=Ze[1],Dn=Sa(Ft.borderBottomRightRadius,Pt.width,Pt.height),$n=Dn[0],Ni=Dn[1],Hr=Sa(Ft.borderBottomLeftRadius,Pt.width,Pt.height),hr=Hr[0],Cr=Hr[1],jo=[];jo.push((le+Qe)/Pt.width),jo.push((hr+$n)/Pt.width),jo.push((Pe+Cr)/Pt.height),jo.push((En+Ni)/Pt.height);var ro=Math.max.apply(Math,jo);ro>1&&(le/=ro,Pe/=ro,Qe/=ro,En/=ro,$n/=ro,Ni/=ro,hr/=ro,Cr/=ro);var lo=Pt.width-Qe,ho=Pt.height-Ni,qo=Pt.width-$n,No=Pt.height-Cr,Zr=Ft.borderTopWidth,As=Ft.borderRightWidth,ps=Ft.borderBottomWidth,Uo=Ft.borderLeftWidth,Fa=Yo(Ft.paddingTop,wt.bounds.width),kl=Yo(Ft.paddingRight,wt.bounds.width),Zl=Yo(Ft.paddingBottom,wt.bounds.width),Rs=Yo(Ft.paddingLeft,wt.bounds.width);this.topLeftBorderDoubleOuterBox=le>0||Pe>0?Lo(Pt.left+Uo/3,Pt.top+Zr/3,le-Uo/3,Pe-Zr/3,Jo.TOP_LEFT):new pr(Pt.left+Uo/3,Pt.top+Zr/3),this.topRightBorderDoubleOuterBox=le>0||Pe>0?Lo(Pt.left+lo,Pt.top+Zr/3,Qe-As/3,En-Zr/3,Jo.TOP_RIGHT):new pr(Pt.left+Pt.width-As/3,Pt.top+Zr/3),this.bottomRightBorderDoubleOuterBox=$n>0||Ni>0?Lo(Pt.left+qo,Pt.top+ho,$n-As/3,Ni-ps/3,Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width-As/3,Pt.top+Pt.height-ps/3),this.bottomLeftBorderDoubleOuterBox=hr>0||Cr>0?Lo(Pt.left+Uo/3,Pt.top+No,hr-Uo/3,Cr-ps/3,Jo.BOTTOM_LEFT):new pr(Pt.left+Uo/3,Pt.top+Pt.height-ps/3),this.topLeftBorderDoubleInnerBox=le>0||Pe>0?Lo(Pt.left+Uo*2/3,Pt.top+Zr*2/3,le-Uo*2/3,Pe-Zr*2/3,Jo.TOP_LEFT):new pr(Pt.left+Uo*2/3,Pt.top+Zr*2/3),this.topRightBorderDoubleInnerBox=le>0||Pe>0?Lo(Pt.left+lo,Pt.top+Zr*2/3,Qe-As*2/3,En-Zr*2/3,Jo.TOP_RIGHT):new pr(Pt.left+Pt.width-As*2/3,Pt.top+Zr*2/3),this.bottomRightBorderDoubleInnerBox=$n>0||Ni>0?Lo(Pt.left+qo,Pt.top+ho,$n-As*2/3,Ni-ps*2/3,Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width-As*2/3,Pt.top+Pt.height-ps*2/3),this.bottomLeftBorderDoubleInnerBox=hr>0||Cr>0?Lo(Pt.left+Uo*2/3,Pt.top+No,hr-Uo*2/3,Cr-ps*2/3,Jo.BOTTOM_LEFT):new pr(Pt.left+Uo*2/3,Pt.top+Pt.height-ps*2/3),this.topLeftBorderStroke=le>0||Pe>0?Lo(Pt.left+Uo/2,Pt.top+Zr/2,le-Uo/2,Pe-Zr/2,Jo.TOP_LEFT):new pr(Pt.left+Uo/2,Pt.top+Zr/2),this.topRightBorderStroke=le>0||Pe>0?Lo(Pt.left+lo,Pt.top+Zr/2,Qe-As/2,En-Zr/2,Jo.TOP_RIGHT):new pr(Pt.left+Pt.width-As/2,Pt.top+Zr/2),this.bottomRightBorderStroke=$n>0||Ni>0?Lo(Pt.left+qo,Pt.top+ho,$n-As/2,Ni-ps/2,Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width-As/2,Pt.top+Pt.height-ps/2),this.bottomLeftBorderStroke=hr>0||Cr>0?Lo(Pt.left+Uo/2,Pt.top+No,hr-Uo/2,Cr-ps/2,Jo.BOTTOM_LEFT):new pr(Pt.left+Uo/2,Pt.top+Pt.height-ps/2),this.topLeftBorderBox=le>0||Pe>0?Lo(Pt.left,Pt.top,le,Pe,Jo.TOP_LEFT):new pr(Pt.left,Pt.top),this.topRightBorderBox=Qe>0||En>0?Lo(Pt.left+lo,Pt.top,Qe,En,Jo.TOP_RIGHT):new pr(Pt.left+Pt.width,Pt.top),this.bottomRightBorderBox=$n>0||Ni>0?Lo(Pt.left+qo,Pt.top+ho,$n,Ni,Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width,Pt.top+Pt.height),this.bottomLeftBorderBox=hr>0||Cr>0?Lo(Pt.left,Pt.top+No,hr,Cr,Jo.BOTTOM_LEFT):new pr(Pt.left,Pt.top+Pt.height),this.topLeftPaddingBox=le>0||Pe>0?Lo(Pt.left+Uo,Pt.top+Zr,Math.max(0,le-Uo),Math.max(0,Pe-Zr),Jo.TOP_LEFT):new pr(Pt.left+Uo,Pt.top+Zr),this.topRightPaddingBox=Qe>0||En>0?Lo(Pt.left+Math.min(lo,Pt.width-As),Pt.top+Zr,lo>Pt.width+As?0:Math.max(0,Qe-As),Math.max(0,En-Zr),Jo.TOP_RIGHT):new pr(Pt.left+Pt.width-As,Pt.top+Zr),this.bottomRightPaddingBox=$n>0||Ni>0?Lo(Pt.left+Math.min(qo,Pt.width-Uo),Pt.top+Math.min(ho,Pt.height-ps),Math.max(0,$n-As),Math.max(0,Ni-ps),Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width-As,Pt.top+Pt.height-ps),this.bottomLeftPaddingBox=hr>0||Cr>0?Lo(Pt.left+Uo,Pt.top+Math.min(No,Pt.height-ps),Math.max(0,hr-Uo),Math.max(0,Cr-ps),Jo.BOTTOM_LEFT):new pr(Pt.left+Uo,Pt.top+Pt.height-ps),this.topLeftContentBox=le>0||Pe>0?Lo(Pt.left+Uo+Rs,Pt.top+Zr+Fa,Math.max(0,le-(Uo+Rs)),Math.max(0,Pe-(Zr+Fa)),Jo.TOP_LEFT):new pr(Pt.left+Uo+Rs,Pt.top+Zr+Fa),this.topRightContentBox=Qe>0||En>0?Lo(Pt.left+Math.min(lo,Pt.width+Uo+Rs),Pt.top+Zr+Fa,lo>Pt.width+Uo+Rs?0:Qe-Uo+Rs,En-(Zr+Fa),Jo.TOP_RIGHT):new pr(Pt.left+Pt.width-(As+kl),Pt.top+Zr+Fa),this.bottomRightContentBox=$n>0||Ni>0?Lo(Pt.left+Math.min(qo,Pt.width-(Uo+Rs)),Pt.top+Math.min(ho,Pt.height+Zr+Fa),Math.max(0,$n-(As+kl)),Ni-(ps+Zl),Jo.BOTTOM_RIGHT):new pr(Pt.left+Pt.width-(As+kl),Pt.top+Pt.height-(ps+Zl)),this.bottomLeftContentBox=hr>0||Cr>0?Lo(Pt.left+Uo+Rs,Pt.top+No,Math.max(0,hr-(Uo+Rs)),Cr-(ps+Zl),Jo.BOTTOM_LEFT):new pr(Pt.left+Uo+Rs,Pt.top+Pt.height-(ps+Zl))}return St}(),Jo;(function(St){St[St.TOP_LEFT=0]="TOP_LEFT",St[St.TOP_RIGHT=1]="TOP_RIGHT",St[St.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",St[St.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Jo||(Jo={}));var Lo=function(St,wt,Ft,Pt,Gt){var le=4*((Math.sqrt(2)-1)/3),Pe=Ft*le,Ze=Pt*le,Qe=St+Ft,En=wt+Pt;switch(Gt){case Jo.TOP_LEFT:return new Hs(new pr(St,En),new pr(St,En-Ze),new pr(Qe-Pe,wt),new pr(Qe,wt));case Jo.TOP_RIGHT:return new Hs(new pr(St,wt),new pr(St+Pe,wt),new pr(Qe,En-Ze),new pr(Qe,En));case Jo.BOTTOM_RIGHT:return new Hs(new pr(Qe,wt),new pr(Qe,wt+Ze),new pr(St+Pe,En),new pr(St,En));case Jo.BOTTOM_LEFT:default:return new Hs(new pr(Qe,En),new pr(Qe-Pe,En),new pr(St,wt+Ze),new pr(St,wt))}},yl=function(St){return[St.topLeftBorderBox,St.topRightBorderBox,St.bottomRightBorderBox,St.bottomLeftBorderBox]},$s=function(St){return[St.topLeftContentBox,St.topRightContentBox,St.bottomRightContentBox,St.bottomLeftContentBox]},XA=function(St){return[St.topLeftPaddingBox,St.topRightPaddingBox,St.bottomRightPaddingBox,St.bottomLeftPaddingBox]},Vl=function(){function St(wt,Ft,Pt){this.offsetX=wt,this.offsetY=Ft,this.matrix=Pt,this.type=0,this.target=6}return St}(),Va=function(){function St(wt,Ft){this.path=wt,this.target=Ft,this.type=1}return St}(),wl=function(){function St(wt){this.opacity=wt,this.type=2,this.target=6}return St}(),Cs=function(St){return St.type===0},Pa=function(St){return St.type===1},$u=function(St){return St.type===2},Eh=function(St,wt){return St.length===wt.length?St.some(function(Ft,Pt){return Ft===wt[Pt]}):!1},qp=function(St,wt,Ft,Pt,Gt){return St.map(function(le,Pe){switch(Pe){case 0:return le.add(wt,Ft);case 1:return le.add(wt+Pt,Ft);case 2:return le.add(wt+Pt,Ft+Gt);case 3:return le.add(wt,Ft+Gt)}return le})},xl=function(){function St(wt){this.element=wt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return St}(),vg=function(){function St(wt,Ft){if(this.container=wt,this.parent=Ft,this.effects=[],this.curves=new Ha(this.container),this.container.styles.opacity<1&&this.effects.push(new wl(this.container.styles.opacity)),this.container.styles.transform!==null){var Pt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Gt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,le=this.container.styles.transform;this.effects.push(new Vl(Pt,Gt,le))}if(this.container.styles.overflowX!==0){var Pe=yl(this.curves),Ze=XA(this.curves);Eh(Pe,Ze)?this.effects.push(new Va(Pe,6)):(this.effects.push(new Va(Pe,2)),this.effects.push(new Va(Ze,4)))}}return St.prototype.getEffects=function(wt){for(var Ft=[2,3].indexOf(this.container.styles.position)===-1,Pt=this.parent,Gt=this.effects.slice(0);Pt;){var le=Pt.effects.filter(function(Qe){return!Pa(Qe)});if(Ft||Pt.container.styles.position!==0||!Pt.parent){if(Gt.unshift.apply(Gt,le),Ft=[2,3].indexOf(Pt.container.styles.position)===-1,Pt.container.styles.overflowX!==0){var Pe=yl(Pt.curves),Ze=XA(Pt.curves);Eh(Pe,Ze)||Gt.unshift(new Va(Ze,6))}}else Gt.unshift.apply(Gt,le);Pt=Pt.parent}return Gt.filter(function(Qe){return va(Qe.target,wt)})},St}(),tA=function(St,wt,Ft,Pt){St.container.elements.forEach(function(Gt){var le=va(Gt.flags,4),Pe=va(Gt.flags,2),Ze=new vg(Gt,St);va(Gt.styles.display,2048)&&Pt.push(Ze);var Qe=va(Gt.flags,8)?[]:Pt;if(le||Pe){var En=le||Gt.styles.isPositioned()?Ft:wt,Dn=new xl(Ze);if(Gt.styles.isPositioned()||Gt.styles.opacity<1||Gt.styles.isTransformed()){var $n=Gt.styles.zIndex.order;if($n<0){var Ni=0;En.negativeZIndex.some(function(hr,Cr){return $n>hr.element.container.styles.zIndex.order?(Ni=Cr,!1):Ni>0}),En.negativeZIndex.splice(Ni,0,Dn)}else if($n>0){var Hr=0;En.positiveZIndex.some(function(hr,Cr){return $n>=hr.element.container.styles.zIndex.order?(Hr=Cr+1,!1):Hr>0}),En.positiveZIndex.splice(Hr,0,Dn)}else En.zeroOrAutoZIndexOrTransformedOrOpacity.push(Dn)}else Gt.styles.isFloating()?En.nonPositionedFloats.push(Dn):En.nonPositionedInlineLevel.push(Dn);tA(Ze,Dn,le?Dn:Ft,Qe)}else Gt.styles.isInlineLevel()?wt.inlineLevel.push(Ze):wt.nonInlineLevel.push(Ze),tA(Ze,wt,Ft,Qe);va(Gt.flags,8)&&Df(Gt,Qe)})},Df=function(St,wt){for(var Ft=St instanceof $c?St.start:1,Pt=St instanceof $c?St.reversed:!1,Gt=0;Gt<wt.length;Gt++){var le=wt[Gt];le.container instanceof VA&&typeof le.container.value=="number"&&le.container.value!==0&&(Ft=le.container.value),le.listValue=dt(Ft,le.container.styles.listStyleType,!0),Ft+=Pt?-1:1}},Wd=function(St){var wt=new vg(St,null),Ft=new xl(wt),Pt=[];return tA(wt,Ft,Ft,Pt),Df(wt.container,Pt),Ft},hc=function(St,wt){switch(wt){case 0:return wa(St.topLeftBorderBox,St.topLeftPaddingBox,St.topRightBorderBox,St.topRightPaddingBox);case 1:return wa(St.topRightBorderBox,St.topRightPaddingBox,St.bottomRightBorderBox,St.bottomRightPaddingBox);case 2:return wa(St.bottomRightBorderBox,St.bottomRightPaddingBox,St.bottomLeftBorderBox,St.bottomLeftPaddingBox);case 3:default:return wa(St.bottomLeftBorderBox,St.bottomLeftPaddingBox,St.topLeftBorderBox,St.topLeftPaddingBox)}},Lh=function(St,wt){switch(wt){case 0:return wa(St.topLeftBorderBox,St.topLeftBorderDoubleOuterBox,St.topRightBorderBox,St.topRightBorderDoubleOuterBox);case 1:return wa(St.topRightBorderBox,St.topRightBorderDoubleOuterBox,St.bottomRightBorderBox,St.bottomRightBorderDoubleOuterBox);case 2:return wa(St.bottomRightBorderBox,St.bottomRightBorderDoubleOuterBox,St.bottomLeftBorderBox,St.bottomLeftBorderDoubleOuterBox);case 3:default:return wa(St.bottomLeftBorderBox,St.bottomLeftBorderDoubleOuterBox,St.topLeftBorderBox,St.topLeftBorderDoubleOuterBox)}},If=function(St,wt){switch(wt){case 0:return wa(St.topLeftBorderDoubleInnerBox,St.topLeftPaddingBox,St.topRightBorderDoubleInnerBox,St.topRightPaddingBox);case 1:return wa(St.topRightBorderDoubleInnerBox,St.topRightPaddingBox,St.bottomRightBorderDoubleInnerBox,St.bottomRightPaddingBox);case 2:return wa(St.bottomRightBorderDoubleInnerBox,St.bottomRightPaddingBox,St.bottomLeftBorderDoubleInnerBox,St.bottomLeftPaddingBox);case 3:default:return wa(St.bottomLeftBorderDoubleInnerBox,St.bottomLeftPaddingBox,St.topLeftBorderDoubleInnerBox,St.topLeftPaddingBox)}},cc=function(St,wt){switch(wt){case 0:return JA(St.topLeftBorderStroke,St.topRightBorderStroke);case 1:return JA(St.topRightBorderStroke,St.bottomRightBorderStroke);case 2:return JA(St.bottomRightBorderStroke,St.bottomLeftBorderStroke);case 3:default:return JA(St.bottomLeftBorderStroke,St.topLeftBorderStroke)}},JA=function(St,wt){var Ft=[];return bs(St)?Ft.push(St.subdivide(.5,!1)):Ft.push(St),bs(wt)?Ft.push(wt.subdivide(.5,!0)):Ft.push(wt),Ft},wa=function(St,wt,Ft,Pt){var Gt=[];return bs(St)?Gt.push(St.subdivide(.5,!1)):Gt.push(St),bs(Ft)?Gt.push(Ft.subdivide(.5,!0)):Gt.push(Ft),bs(Pt)?Gt.push(Pt.subdivide(.5,!0).reverse()):Gt.push(Pt),bs(wt)?Gt.push(wt.subdivide(.5,!1).reverse()):Gt.push(wt),Gt},Wa=function(St){var wt=St.bounds,Ft=St.styles;return wt.add(Ft.borderLeftWidth,Ft.borderTopWidth,-(Ft.borderRightWidth+Ft.borderLeftWidth),-(Ft.borderTopWidth+Ft.borderBottomWidth))},Uf=function(St){var wt=St.styles,Ft=St.bounds,Pt=Yo(wt.paddingLeft,Ft.width),Gt=Yo(wt.paddingRight,Ft.width),le=Yo(wt.paddingTop,Ft.width),Pe=Yo(wt.paddingBottom,Ft.width);return Ft.add(Pt+wt.borderLeftWidth,le+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Pt+Gt),-(wt.borderTopWidth+wt.borderBottomWidth+le+Pe))},$p=function(St,wt){return St===0?wt.bounds:St===2?Uf(wt):Wa(wt)},t0=function(St,wt){return St===0?wt.bounds:St===2?Uf(wt):Wa(wt)},dc=function(St,wt,Ft){var Pt=$p(gc(St.styles.backgroundOrigin,wt),St),Gt=t0(gc(St.styles.backgroundClip,wt),St),le=e0(gc(St.styles.backgroundSize,wt),Ft,Pt),Pe=le[0],Ze=le[1],Qe=Sa(gc(St.styles.backgroundPosition,wt),Pt.width-Pe,Pt.height-Ze),En=Of(gc(St.styles.backgroundRepeat,wt),Qe,le,Pt,Gt),Dn=Math.round(Pt.left+Qe[0]),$n=Math.round(Pt.top+Qe[1]);return[En,Dn,$n,Pe,Ze]},fc=function(St){return So(St)&&St.value===Vu.AUTO},Qf=function(St){return typeof St=="number"},e0=function(St,wt,Ft){var Pt=wt[0],Gt=wt[1],le=wt[2],Pe=St[0],Ze=St[1];if(!Pe)return[0,0];if(Go(Pe)&&Ze&&Go(Ze))return[Yo(Pe,Ft.width),Yo(Ze,Ft.height)];var Qe=Qf(le);if(So(Pe)&&(Pe.value===Vu.CONTAIN||Pe.value===Vu.COVER)){if(Qf(le)){var En=Ft.width/Ft.height;return En<le!=(Pe.value===Vu.COVER)?[Ft.width,Ft.width/le]:[Ft.height*le,Ft.height]}return[Ft.width,Ft.height]}var Dn=Qf(Pt),$n=Qf(Gt),Ni=Dn||$n;if(fc(Pe)&&(!Ze||fc(Ze))){if(Dn&&$n)return[Pt,Gt];if(!Qe&&!Ni)return[Ft.width,Ft.height];if(Ni&&Qe){var Hr=Dn?Pt:Gt*le,hr=$n?Gt:Pt/le;return[Hr,hr]}var Cr=Dn?Pt:Ft.width,jo=$n?Gt:Ft.height;return[Cr,jo]}if(Qe){var ro=0,lo=0;return Go(Pe)?ro=Yo(Pe,Ft.width):Go(Ze)&&(lo=Yo(Ze,Ft.height)),fc(Pe)?ro=lo*le:(!Ze||fc(Ze))&&(lo=ro/le),[ro,lo]}var ho=null,qo=null;if(Go(Pe)?ho=Yo(Pe,Ft.width):Ze&&Go(Ze)&&(qo=Yo(Ze,Ft.height)),ho!==null&&(!Ze||fc(Ze))&&(qo=Dn&&$n?ho/Pt*Gt:Ft.height),qo!==null&&fc(Pe)&&(ho=Dn&&$n?qo/Gt*Pt:Ft.width),ho!==null&&qo!==null)return[ho,qo];throw new Error("Unable to calculate background-size for element")},gc=function(St,wt){var Ft=St[wt];return typeof Ft=="undefined"?St[0]:Ft},Of=function(St,wt,Ft,Pt,Gt){var le=wt[0],Pe=wt[1],Ze=Ft[0],Qe=Ft[1];switch(St){case 2:return[new pr(Math.round(Pt.left),Math.round(Pt.top+Pe)),new pr(Math.round(Pt.left+Pt.width),Math.round(Pt.top+Pe)),new pr(Math.round(Pt.left+Pt.width),Math.round(Qe+Pt.top+Pe)),new pr(Math.round(Pt.left),Math.round(Qe+Pt.top+Pe))];case 3:return[new pr(Math.round(Pt.left+le),Math.round(Pt.top)),new pr(Math.round(Pt.left+le+Ze),Math.round(Pt.top)),new pr(Math.round(Pt.left+le+Ze),Math.round(Pt.height+Pt.top)),new pr(Math.round(Pt.left+le),Math.round(Pt.height+Pt.top))];case 1:return[new pr(Math.round(Pt.left+le),Math.round(Pt.top+Pe)),new pr(Math.round(Pt.left+le+Ze),Math.round(Pt.top+Pe)),new pr(Math.round(Pt.left+le+Ze),Math.round(Pt.top+Pe+Qe)),new pr(Math.round(Pt.left+le),Math.round(Pt.top+Pe+Qe))];default:return[new pr(Math.round(Gt.left),Math.round(Gt.top)),new pr(Math.round(Gt.left+Gt.width),Math.round(Gt.top)),new pr(Math.round(Gt.left+Gt.width),Math.round(Gt.height+Gt.top)),new pr(Math.round(Gt.left),Math.round(Gt.height+Gt.top))]}},yg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Du="Hidden Text",SA=function(){function St(wt){this._data={},this._document=wt}return St.prototype.parseMetrics=function(wt,Ft){var Pt=this._document.createElement("div"),Gt=this._document.createElement("img"),le=this._document.createElement("span"),Pe=this._document.body;Pt.style.visibility="hidden",Pt.style.fontFamily=wt,Pt.style.fontSize=Ft,Pt.style.margin="0",Pt.style.padding="0",Pt.style.whiteSpace="nowrap",Pe.appendChild(Pt),Gt.src=yg,Gt.width=1,Gt.height=1,Gt.style.margin="0",Gt.style.padding="0",Gt.style.verticalAlign="baseline",le.style.fontFamily=wt,le.style.fontSize=Ft,le.style.margin="0",le.style.padding="0",le.appendChild(this._document.createTextNode(Du)),Pt.appendChild(le),Pt.appendChild(Gt);var Ze=Gt.offsetTop-le.offsetTop+2;Pt.removeChild(le),Pt.appendChild(this._document.createTextNode(Du)),Pt.style.lineHeight="normal",Gt.style.verticalAlign="super";var Qe=Gt.offsetTop-Pt.offsetTop+2;return Pe.removeChild(Pt),{baseline:Ze,middle:Qe}},St.prototype.getMetrics=function(wt,Ft){var Pt=wt+" "+Ft;return typeof this._data[Pt]=="undefined"&&(this._data[Pt]=this.parseMetrics(wt,Ft)),this._data[Pt]},St}(),Hf=function(){function St(wt,Ft){this.context=wt,this.options=Ft}return St}(),Wl=1e4,pc=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt._activeEffects=[],Gt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),Gt.ctx=Gt.canvas.getContext("2d"),Pt.canvas||(Gt.canvas.width=Math.floor(Pt.width*Pt.scale),Gt.canvas.height=Math.floor(Pt.height*Pt.scale),Gt.canvas.style.width=Pt.width+"px",Gt.canvas.style.height=Pt.height+"px"),Gt.fontMetrics=new SA(document),Gt.ctx.scale(Gt.options.scale,Gt.options.scale),Gt.ctx.translate(-Pt.x,-Pt.y),Gt.ctx.textBaseline="bottom",Gt._activeEffects=[],Gt.context.logger.debug("Canvas renderer initialized ("+Pt.width+"x"+Pt.height+") with scale "+Pt.scale),Gt}return wt.prototype.applyEffects=function(Ft){for(var Pt=this;this._activeEffects.length;)this.popEffect();Ft.forEach(function(Gt){return Pt.applyEffect(Gt)})},wt.prototype.applyEffect=function(Ft){this.ctx.save(),$u(Ft)&&(this.ctx.globalAlpha=Ft.opacity),Cs(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)),Pa(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 ee(this,void 0,void 0,function(){var Pt;return ue(this,function(Gt){switch(Gt.label){case 0:return Pt=Ft.element.container.styles,Pt.isVisible()?[4,this.renderStackContent(Ft)]:[3,2];case 1:Gt.sent(),Gt.label=2;case 2:return[2]}})})},wt.prototype.renderNode=function(Ft){return ee(this,void 0,void 0,function(){return ue(this,function(Pt){switch(Pt.label){case 0:if(va(Ft.container.flags,16))debugger;return Ft.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(Ft)]:[3,3];case 1:return Pt.sent(),[4,this.renderNodeContent(Ft)];case 2:Pt.sent(),Pt.label=3;case 3:return[2]}})})},wt.prototype.renderTextWithLetterSpacing=function(Ft,Pt,Gt){var le=this;if(Pt===0)this.ctx.fillText(Ft.text,Ft.bounds.left,Ft.bounds.top+Gt);else{var Pe=$h(Ft.text);Pe.reduce(function(Ze,Qe){return le.ctx.fillText(Qe,Ze,Ft.bounds.top+Gt),Ze+le.ctx.measureText(Qe).width},Ft.bounds.left)}},wt.prototype.createFontStyle=function(Ft){var Pt=Ft.fontVariant.filter(function(Pe){return Pe==="normal"||Pe==="small-caps"}).join(""),Gt=i0(Ft.fontFamily).join(", "),le=Bo(Ft.fontSize)?""+Ft.fontSize.number+Ft.fontSize.unit:Ft.fontSize.number+"px";return[[Ft.fontStyle,Pt,Ft.fontWeight,le,Gt].join(" "),Gt,le]},wt.prototype.renderTextNode=function(Ft,Pt){return ee(this,void 0,void 0,function(){var Gt,le,Pe,Ze,Qe,En,Dn,$n,Ni=this;return ue(this,function(Hr){return Gt=this.createFontStyle(Pt),le=Gt[0],Pe=Gt[1],Ze=Gt[2],this.ctx.font=le,this.ctx.direction=Pt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Qe=this.fontMetrics.getMetrics(Pe,Ze),En=Qe.baseline,Dn=Qe.middle,$n=Pt.paintOrder,Ft.textBounds.forEach(function(hr){$n.forEach(function(Cr){switch(Cr){case 0:Ni.ctx.fillStyle=ns(Pt.color),Ni.renderTextWithLetterSpacing(hr,Pt.letterSpacing,En);var jo=Pt.textShadow;jo.length&&hr.text.trim().length&&(jo.slice(0).reverse().forEach(function(ro){Ni.ctx.shadowColor=ns(ro.color),Ni.ctx.shadowOffsetX=ro.offsetX.number*Ni.options.scale,Ni.ctx.shadowOffsetY=ro.offsetY.number*Ni.options.scale,Ni.ctx.shadowBlur=ro.blur.number,Ni.renderTextWithLetterSpacing(hr,Pt.letterSpacing,En)}),Ni.ctx.shadowColor="",Ni.ctx.shadowOffsetX=0,Ni.ctx.shadowOffsetY=0,Ni.ctx.shadowBlur=0),Pt.textDecorationLine.length&&(Ni.ctx.fillStyle=ns(Pt.textDecorationColor||Pt.color),Pt.textDecorationLine.forEach(function(ro){switch(ro){case 1:Ni.ctx.fillRect(hr.bounds.left,Math.round(hr.bounds.top+En),hr.bounds.width,1);break;case 2:Ni.ctx.fillRect(hr.bounds.left,Math.round(hr.bounds.top),hr.bounds.width,1);break;case 3:Ni.ctx.fillRect(hr.bounds.left,Math.ceil(hr.bounds.top+Dn),hr.bounds.width,1);break}}));break;case 1:Pt.webkitTextStrokeWidth&&hr.text.trim().length&&(Ni.ctx.strokeStyle=ns(Pt.webkitTextStrokeColor),Ni.ctx.lineWidth=Pt.webkitTextStrokeWidth,Ni.ctx.lineJoin=window.chrome?"miter":"round",Ni.ctx.strokeText(hr.text,hr.bounds.left,hr.bounds.top+En)),Ni.ctx.strokeStyle="",Ni.ctx.lineWidth=0,Ni.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Ft,Pt,Gt){if(Gt&&Ft.intrinsicWidth>0&&Ft.intrinsicHeight>0){var le=Uf(Ft),Pe=XA(Pt);this.path(Pe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Gt,0,0,Ft.intrinsicWidth,Ft.intrinsicHeight,le.left,le.top,le.width,le.height),this.ctx.restore()}},wt.prototype.renderNodeContent=function(Ft){return ee(this,void 0,void 0,function(){var Pt,Gt,le,Pe,Ze,Qe,lo,lo,En,Dn,$n,Ni,qo,Hr,hr,No,Cr,jo,ro,lo,ho,qo,No;return ue(this,function(Zr){switch(Zr.label){case 0:this.applyEffects(Ft.getEffects(4)),Pt=Ft.container,Gt=Ft.curves,le=Pt.styles,Pe=0,Ze=Pt.textNodes,Zr.label=1;case 1:return Pe<Ze.length?(Qe=Ze[Pe],[4,this.renderTextNode(Qe,le)]):[3,4];case 2:Zr.sent(),Zr.label=3;case 3:return Pe++,[3,1];case 4:if(!(Pt instanceof Xc))return[3,8];Zr.label=5;case 5:return Zr.trys.push([5,7,,8]),[4,this.context.cache.match(Pt.src)];case 6:return lo=Zr.sent(),this.renderReplacedElement(Pt,Gt,lo),[3,8];case 7:return Zr.sent(),this.context.logger.error("Error loading image "+Pt.src),[3,8];case 8:if(Pt instanceof Jc&&this.renderReplacedElement(Pt,Gt,Pt.canvas),!(Pt instanceof qc))return[3,12];Zr.label=9;case 9:return Zr.trys.push([9,11,,12]),[4,this.context.cache.match(Pt.svg)];case 10:return lo=Zr.sent(),this.renderReplacedElement(Pt,Gt,lo),[3,12];case 11:return Zr.sent(),this.context.logger.error("Error loading svg "+Pt.svg.substring(0,255)),[3,12];case 12:return Pt instanceof Lf&&Pt.tree?(En=new wt(this.context,{scale:this.options.scale,backgroundColor:Pt.backgroundColor,x:0,y:0,width:Pt.width,height:Pt.height}),[4,En.render(Pt.tree)]):[3,14];case 13:Dn=Zr.sent(),Pt.width&&Pt.height&&this.ctx.drawImage(Dn,0,0,Pt.width,Pt.height,Pt.bounds.left,Pt.bounds.top,Pt.bounds.width,Pt.bounds.height),Zr.label=14;case 14:if(Pt instanceof eu&&($n=Math.min(Pt.bounds.width,Pt.bounds.height),Pt.type===ic?Pt.checked&&(this.ctx.save(),this.path([new pr(Pt.bounds.left+$n*.39363,Pt.bounds.top+$n*.79),new pr(Pt.bounds.left+$n*.16,Pt.bounds.top+$n*.5549),new pr(Pt.bounds.left+$n*.27347,Pt.bounds.top+$n*.44071),new pr(Pt.bounds.left+$n*.39694,Pt.bounds.top+$n*.5649),new pr(Pt.bounds.left+$n*.72983,Pt.bounds.top+$n*.23),new pr(Pt.bounds.left+$n*.84,Pt.bounds.top+$n*.34085),new pr(Pt.bounds.left+$n*.39363,Pt.bounds.top+$n*.79)]),this.ctx.fillStyle=ns(Hd),this.ctx.fill(),this.ctx.restore()):Pt.type===vA&&Pt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(Pt.bounds.left+$n/2,Pt.bounds.top+$n/2,$n/4,0,Math.PI*2,!0),this.ctx.fillStyle=ns(Hd),this.ctx.fill(),this.ctx.restore())),Tm(Pt)&&Pt.value.length){switch(Ni=this.createFontStyle(le),qo=Ni[0],Hr=Ni[1],hr=this.fontMetrics.getMetrics(qo,Hr).baseline,this.ctx.font=qo,this.ctx.fillStyle=ns(le.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ao(Pt.styles.textAlign),No=Uf(Pt),Cr=0,Pt.styles.textAlign){case 1:Cr+=No.width/2;break;case 2:Cr+=No.width;break}jo=No.add(Cr,0,0,-No.height/2+1),this.ctx.save(),this.path([new pr(No.left,No.top),new pr(No.left+No.width,No.top),new pr(No.left+No.width,No.top+No.height),new pr(No.left,No.top+No.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Qa(Pt.value,jo),le.letterSpacing,hr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!va(Pt.styles.display,2048))return[3,20];if(Pt.styles.listStyleImage===null)return[3,19];if(ro=Pt.styles.listStyleImage,ro.type!==0)return[3,18];lo=void 0,ho=ro.url,Zr.label=15;case 15:return Zr.trys.push([15,17,,18]),[4,this.context.cache.match(ho)];case 16:return lo=Zr.sent(),this.ctx.drawImage(lo,Pt.bounds.left-(lo.width+10),Pt.bounds.top),[3,18];case 17:return Zr.sent(),this.context.logger.error("Error loading list-style-image "+ho),[3,18];case 18:return[3,20];case 19:Ft.listValue&&Pt.styles.listStyleType!==-1&&(qo=this.createFontStyle(le)[0],this.ctx.font=qo,this.ctx.fillStyle=ns(le.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",No=new de(Pt.bounds.left,Pt.bounds.top+Yo(Pt.styles.paddingTop,Pt.bounds.width),Pt.bounds.width,ma(le.lineHeight,le.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Qa(Ft.listValue,No),le.letterSpacing,ma(le.lineHeight,le.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 ee(this,void 0,void 0,function(){var Pt,Gt,ro,le,Pe,ro,Ze,Qe,ro,En,Dn,ro,$n,Ni,ro,Hr,hr,ro,Cr,jo,ro;return ue(this,function(lo){switch(lo.label){case 0:if(va(Ft.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Ft.element)];case 1:lo.sent(),Pt=0,Gt=Ft.negativeZIndex,lo.label=2;case 2:return Pt<Gt.length?(ro=Gt[Pt],[4,this.renderStack(ro)]):[3,5];case 3:lo.sent(),lo.label=4;case 4:return Pt++,[3,2];case 5:return[4,this.renderNodeContent(Ft.element)];case 6:lo.sent(),le=0,Pe=Ft.nonInlineLevel,lo.label=7;case 7:return le<Pe.length?(ro=Pe[le],[4,this.renderNode(ro)]):[3,10];case 8:lo.sent(),lo.label=9;case 9:return le++,[3,7];case 10:Ze=0,Qe=Ft.nonPositionedFloats,lo.label=11;case 11:return Ze<Qe.length?(ro=Qe[Ze],[4,this.renderStack(ro)]):[3,14];case 12:lo.sent(),lo.label=13;case 13:return Ze++,[3,11];case 14:En=0,Dn=Ft.nonPositionedInlineLevel,lo.label=15;case 15:return En<Dn.length?(ro=Dn[En],[4,this.renderStack(ro)]):[3,18];case 16:lo.sent(),lo.label=17;case 17:return En++,[3,15];case 18:$n=0,Ni=Ft.inlineLevel,lo.label=19;case 19:return $n<Ni.length?(ro=Ni[$n],[4,this.renderNode(ro)]):[3,22];case 20:lo.sent(),lo.label=21;case 21:return $n++,[3,19];case 22:Hr=0,hr=Ft.zeroOrAutoZIndexOrTransformedOrOpacity,lo.label=23;case 23:return Hr<hr.length?(ro=hr[Hr],[4,this.renderStack(ro)]):[3,26];case 24:lo.sent(),lo.label=25;case 25:return Hr++,[3,23];case 26:Cr=0,jo=Ft.positiveZIndex,lo.label=27;case 27:return Cr<jo.length?(ro=jo[Cr],[4,this.renderStack(ro)]):[3,30];case 28:lo.sent(),lo.label=29;case 29:return Cr++,[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 Pt=this;Ft.forEach(function(Gt,le){var Pe=bs(Gt)?Gt.start:Gt;le===0?Pt.ctx.moveTo(Pe.x,Pe.y):Pt.ctx.lineTo(Pe.x,Pe.y),bs(Gt)&&Pt.ctx.bezierCurveTo(Gt.startControl.x,Gt.startControl.y,Gt.endControl.x,Gt.endControl.y,Gt.end.x,Gt.end.y)})},wt.prototype.renderRepeat=function(Ft,Pt,Gt,le){this.path(Ft),this.ctx.fillStyle=Pt,this.ctx.translate(Gt,le),this.ctx.fill(),this.ctx.translate(-Gt,-le)},wt.prototype.resizeImage=function(Ft,Pt,Gt){var le;if(Ft.width===Pt&&Ft.height===Gt)return Ft;var Pe=(le=this.canvas.ownerDocument)!==null&&le!==void 0?le:document,Ze=Pe.createElement("canvas");Ze.width=Math.max(1,Pt),Ze.height=Math.max(1,Gt);var Qe=Ze.getContext("2d");return Qe.drawImage(Ft,0,0,Ft.width,Ft.height,0,0,Pt,Gt),Ze},wt.prototype.renderBackgroundImage=function(Ft){return ee(this,void 0,void 0,function(){var Pt,Gt,le,Pe,Ze,Qe;return ue(this,function(En){switch(En.label){case 0:Pt=Ft.styles.backgroundImage.length-1,Gt=function(Dn){var $n,Ni,Hr,Fa,Tl,nu,Rs,Ra,ps,hr,Fa,Tl,nu,Rs,Ra,Cr,jo,ro,lo,ho,qo,No,Zr,As,ps,Uo,Fa,kl,Zl,Rs,Ra,CA,Tl,nu,PA,Sn,qA,mc,$A,th,Mh,ll;return ue(this,function(Iu){switch(Iu.label){case 0:if(Dn.type!==0)return[3,5];$n=void 0,Ni=Dn.url,Iu.label=1;case 1:return Iu.trys.push([1,3,,4]),[4,le.context.cache.match(Ni)];case 2:return $n=Iu.sent(),[3,4];case 3:return Iu.sent(),le.context.logger.error("Error loading background-image "+Ni),[3,4];case 4:return $n&&(Hr=dc(Ft,Pt,[$n.width,$n.height,$n.width/$n.height]),Fa=Hr[0],Tl=Hr[1],nu=Hr[2],Rs=Hr[3],Ra=Hr[4],ps=le.ctx.createPattern(le.resizeImage($n,Rs,Ra),"repeat"),le.renderRepeat(Fa,ps,Tl,nu)),[3,6];case 5:ju(Dn)?(hr=dc(Ft,Pt,[null,null,null]),Fa=hr[0],Tl=hr[1],nu=hr[2],Rs=hr[3],Ra=hr[4],Cr=uu(Dn.angle,Rs,Ra),jo=Cr[0],ro=Cr[1],lo=Cr[2],ho=Cr[3],qo=Cr[4],No=document.createElement("canvas"),No.width=Rs,No.height=Ra,Zr=No.getContext("2d"),As=Zr.createLinearGradient(ro,ho,lo,qo),bn(Dn.stops,jo).forEach(function(Xd){return As.addColorStop(Xd.stop,ns(Xd.color))}),Zr.fillStyle=As,Zr.fillRect(0,0,Rs,Ra),Rs>0&&Ra>0&&(ps=le.ctx.createPattern(No,"repeat"),le.renderRepeat(Fa,ps,Tl,nu))):Oo(Dn)&&(Uo=dc(Ft,Pt,[null,null,null]),Fa=Uo[0],kl=Uo[1],Zl=Uo[2],Rs=Uo[3],Ra=Uo[4],CA=Dn.position.length===0?[da]:Dn.position,Tl=Yo(CA[0],Rs),nu=Yo(CA[CA.length-1],Ra),PA=fl(Dn,Tl,nu,Rs,Ra),Sn=PA[0],qA=PA[1],Sn>0&&qA>0&&(mc=le.ctx.createRadialGradient(kl+Tl,Zl+nu,0,kl+Tl,Zl+nu,Sn),bn(Dn.stops,Sn*2).forEach(function(Xd){return mc.addColorStop(Xd.stop,ns(Xd.color))}),le.path(Fa),le.ctx.fillStyle=mc,Sn!==qA?($A=Ft.bounds.left+.5*Ft.bounds.width,th=Ft.bounds.top+.5*Ft.bounds.height,Mh=qA/Sn,ll=1/Mh,le.ctx.save(),le.ctx.translate($A,th),le.ctx.transform(1,0,0,Mh,0,0),le.ctx.translate(-$A,-th),le.ctx.fillRect(kl,ll*(Zl-th)+th,Rs,Ra*ll),le.ctx.restore()):le.ctx.fill())),Iu.label=6;case 6:return Pt--,[2]}})},le=this,Pe=0,Ze=Ft.styles.backgroundImage.slice(0).reverse(),En.label=1;case 1:return Pe<Ze.length?(Qe=Ze[Pe],[5,Gt(Qe)]):[3,4];case 2:En.sent(),En.label=3;case 3:return Pe++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Ft,Pt,Gt){return ee(this,void 0,void 0,function(){return ue(this,function(le){return this.path(hc(Gt,Pt)),this.ctx.fillStyle=ns(Ft),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Ft,Pt,Gt,le){return ee(this,void 0,void 0,function(){var Pe,Ze;return ue(this,function(Qe){switch(Qe.label){case 0:return Pt<3?[4,this.renderSolidBorder(Ft,Gt,le)]:[3,2];case 1:return Qe.sent(),[2];case 2:return Pe=Lh(le,Gt),this.path(Pe),this.ctx.fillStyle=ns(Ft),this.ctx.fill(),Ze=If(le,Gt),this.path(Ze),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Ft){return ee(this,void 0,void 0,function(){var Pt,Gt,le,Pe,Ze,Qe,En,Dn,$n=this;return ue(this,function(Ni){switch(Ni.label){case 0:return this.applyEffects(Ft.getEffects(2)),Pt=Ft.container.styles,Gt=!Ds(Pt.backgroundColor)||Pt.backgroundImage.length,le=[{style:Pt.borderTopStyle,color:Pt.borderTopColor,width:Pt.borderTopWidth},{style:Pt.borderRightStyle,color:Pt.borderRightColor,width:Pt.borderRightWidth},{style:Pt.borderBottomStyle,color:Pt.borderBottomColor,width:Pt.borderBottomWidth},{style:Pt.borderLeftStyle,color:Pt.borderLeftColor,width:Pt.borderLeftWidth}],Pe=Rf(gc(Pt.backgroundClip,0),Ft.curves),Gt||Pt.boxShadow.length?(this.ctx.save(),this.path(Pe),this.ctx.clip(),Ds(Pt.backgroundColor)||(this.ctx.fillStyle=ns(Pt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Ft.container)]):[3,2];case 1:Ni.sent(),this.ctx.restore(),Pt.boxShadow.slice(0).reverse().forEach(function(Hr){$n.ctx.save();var hr=yl(Ft.curves),Cr=Hr.inset?0:Wl,jo=qp(hr,-Cr+(Hr.inset?1:-1)*Hr.spread.number,(Hr.inset?1:-1)*Hr.spread.number,Hr.spread.number*(Hr.inset?-2:2),Hr.spread.number*(Hr.inset?-2:2));Hr.inset?($n.path(hr),$n.ctx.clip(),$n.mask(jo)):($n.mask(hr),$n.ctx.clip(),$n.path(jo)),$n.ctx.shadowOffsetX=Hr.offsetX.number+Cr,$n.ctx.shadowOffsetY=Hr.offsetY.number,$n.ctx.shadowColor=ns(Hr.color),$n.ctx.shadowBlur=Hr.blur.number,$n.ctx.fillStyle=Hr.inset?ns(Hr.color):"rgba(0,0,0,1)",$n.ctx.fill(),$n.ctx.restore()}),Ni.label=2;case 2:Ze=0,Qe=0,En=le,Ni.label=3;case 3:return Qe<En.length?(Dn=En[Qe],Dn.style!==0&&!Ds(Dn.color)&&Dn.width>0?Dn.style!==2?[3,5]:[4,this.renderDashedDottedBorder(Dn.color,Dn.width,Ze,Ft.curves,2)]:[3,11]):[3,13];case 4:return Ni.sent(),[3,11];case 5:return Dn.style!==3?[3,7]:[4,this.renderDashedDottedBorder(Dn.color,Dn.width,Ze,Ft.curves,3)];case 6:return Ni.sent(),[3,11];case 7:return Dn.style!==4?[3,9]:[4,this.renderDoubleBorder(Dn.color,Dn.width,Ze,Ft.curves)];case 8:return Ni.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Dn.color,Ze,Ft.curves)];case 10:Ni.sent(),Ni.label=11;case 11:Ze++,Ni.label=12;case 12:return Qe++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Ft,Pt,Gt,le,Pe){return ee(this,void 0,void 0,function(){var Ze,Qe,En,Dn,$n,Ni,Hr,hr,Cr,jo,ro,lo,ho,qo,No,Zr,No,Zr;return ue(this,function(As){return this.ctx.save(),Ze=cc(le,Gt),Qe=hc(le,Gt),Pe===2&&(this.path(Qe),this.ctx.clip()),bs(Qe[0])?(En=Qe[0].start.x,Dn=Qe[0].start.y):(En=Qe[0].x,Dn=Qe[0].y),bs(Qe[1])?($n=Qe[1].end.x,Ni=Qe[1].end.y):($n=Qe[1].x,Ni=Qe[1].y),Gt===0||Gt===2?Hr=Math.abs(En-$n):Hr=Math.abs(Dn-Ni),this.ctx.beginPath(),Pe===3?this.formatPath(Ze):this.formatPath(Qe.slice(0,2)),hr=Pt<3?Pt*3:Pt*2,Cr=Pt<3?Pt*2:Pt,Pe===3&&(hr=Pt,Cr=Pt),jo=!0,Hr<=hr*2?jo=!1:Hr<=hr*2+Cr?(ro=Hr/(2*hr+Cr),hr*=ro,Cr*=ro):(lo=Math.floor((Hr+Cr)/(hr+Cr)),ho=(Hr-lo*hr)/(lo-1),qo=(Hr-(lo+1)*hr)/lo,Cr=qo<=0||Math.abs(Cr-ho)<Math.abs(Cr-qo)?ho:qo),jo&&(Pe===3?this.ctx.setLineDash([0,hr+Cr]):this.ctx.setLineDash([hr,Cr])),Pe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=Pt):this.ctx.lineWidth=Pt*2+1.1,this.ctx.strokeStyle=ns(Ft),this.ctx.stroke(),this.ctx.setLineDash([]),Pe===2&&(bs(Qe[0])&&(No=Qe[3],Zr=Qe[0],this.ctx.beginPath(),this.formatPath([new pr(No.end.x,No.end.y),new pr(Zr.start.x,Zr.start.y)]),this.ctx.stroke()),bs(Qe[1])&&(No=Qe[1],Zr=Qe[2],this.ctx.beginPath(),this.formatPath([new pr(No.end.x,No.end.y),new pr(Zr.start.x,Zr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},wt.prototype.render=function(Ft){return ee(this,void 0,void 0,function(){var Pt;return ue(this,function(Gt){switch(Gt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ns(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),Pt=Wd(Ft),[4,this.renderStack(Pt)];case 1:return Gt.sent(),this.applyEffects([]),[2,this.canvas]}})})},wt}(Hf),Tm=function(St){return St instanceof td||St instanceof Rd?!0:St instanceof eu&&St.type!==vA&&St.type!==ic},Rf=function(St,wt){switch(St){case 0:return yl(wt);case 2:return $s(wt);case 1:default:return XA(wt)}},Ao=function(St){switch(St){case 1:return"center";case 2:return"right";case 0:default:return"left"}},n0=["-apple-system","system-ui"],i0=function(St){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?St.filter(function(wt){return n0.indexOf(wt)===-1}):St},np=function(St){Qt(wt,St);function wt(Ft,Pt){var Gt=St.call(this,Ft,Pt)||this;return Gt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),Gt.ctx=Gt.canvas.getContext("2d"),Gt.options=Pt,Gt.canvas.width=Math.floor(Pt.width*Pt.scale),Gt.canvas.height=Math.floor(Pt.height*Pt.scale),Gt.canvas.style.width=Pt.width+"px",Gt.canvas.style.height=Pt.height+"px",Gt.ctx.scale(Gt.options.scale,Gt.options.scale),Gt.ctx.translate(-Pt.x,-Pt.y),Gt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Pt.width+"x"+Pt.height+" at "+Pt.x+","+Pt.y+") with scale "+Pt.scale),Gt}return wt.prototype.render=function(Ft){return ee(this,void 0,void 0,function(){var Pt,Gt;return ue(this,function(le){switch(le.label){case 0:return Pt=Yc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,Ft),[4,Zd(Pt)];case 1:return Gt=le.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ns(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Gt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},wt}(Hf),Zd=function(St){return new Promise(function(wt,Ft){var Pt=new Image;Pt.onload=function(){wt(Pt)},Pt.onerror=Ft,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(St))})},Yd=function(){function St(wt){var Ft=wt.id,Pt=wt.enabled;this.id=Ft,this.enabled=Pt,this.start=Date.now()}return St.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,Se([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.prototype.getTime=function(){return Date.now()-this.start},St.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,Se([this.id,this.getTime()+"ms"],wt))},St.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,Se([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.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,Se([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.instances={},St}(),BA=function(){function St(wt,Ft){var Pt;this.windowBounds=Ft,this.instanceName="#"+St.instanceCount++,this.logger=new Yd({id:this.instanceName,enabled:wt.logging}),this.cache=(Pt=wt.cache)!==null&&Pt!==void 0?Pt:new To(this,wt)}return St.instanceCount=1,St}(),ip=function(St,wt){return wt===void 0&&(wt={}),rp(St,wt)};typeof window!="undefined"&&vr.setContext(window);var rp=function(St,wt){return ee(void 0,void 0,void 0,function(){var Ft,Pt,Gt,le,Pe,Ze,Qe,En,Dn,$n,Ni,Hr,hr,Cr,jo,ro,lo,ho,qo,No,As,Zr,As,ps,Uo,Fa,kl,Zl,Rs,Ra,CA,Tl,nu,PA,Sn,qA,mc,$A,th,Mh;return ue(this,function(ll){switch(ll.label){case 0:if(!St||typeof St!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(Ft=St.ownerDocument,!Ft)throw new Error("Element is not attached to a Document");if(Pt=Ft.defaultView,!Pt)throw new Error("Document is not attached to a Window");return Gt={allowTaint:(ps=wt.allowTaint)!==null&&ps!==void 0?ps:!1,imageTimeout:(Uo=wt.imageTimeout)!==null&&Uo!==void 0?Uo:15e3,proxy:wt.proxy,useCORS:(Fa=wt.useCORS)!==null&&Fa!==void 0?Fa:!1},le=Ct({logging:(kl=wt.logging)!==null&&kl!==void 0?kl:!0,cache:wt.cache},Gt),Pe={windowWidth:(Zl=wt.windowWidth)!==null&&Zl!==void 0?Zl:Pt.innerWidth,windowHeight:(Rs=wt.windowHeight)!==null&&Rs!==void 0?Rs:Pt.innerHeight,scrollX:(Ra=wt.scrollX)!==null&&Ra!==void 0?Ra:Pt.pageXOffset,scrollY:(CA=wt.scrollY)!==null&&CA!==void 0?CA:Pt.pageYOffset},Ze=new de(Pe.scrollX,Pe.scrollY,Pe.windowWidth,Pe.windowHeight),Qe=new BA(le,Ze),En=(Tl=wt.foreignObjectRendering)!==null&&Tl!==void 0?Tl:!1,Dn={allowTaint:(nu=wt.allowTaint)!==null&&nu!==void 0?nu:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:En,copyStyles:En},Qe.logger.debug("Starting document clone with size "+Ze.width+"x"+Ze.height+" scrolled to "+-Ze.left+","+-Ze.top),$n=new gt(Qe,St,Dn),Ni=$n.clonedReferenceElement,Ni?[4,$n.toIFrame(Ft,Ze)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Hr=ll.sent(),hr=Xo(Ni)||Gd(Ni)?ie(Ni.ownerDocument):Ht(Qe,Ni),Cr=hr.width,jo=hr.height,ro=hr.left,lo=hr.top,ho=op(Qe,Ni,wt.backgroundColor),qo={canvas:wt.canvas,backgroundColor:ho,scale:(Sn=(PA=wt.scale)!==null&&PA!==void 0?PA:Pt.devicePixelRatio)!==null&&Sn!==void 0?Sn:1,x:((qA=wt.x)!==null&&qA!==void 0?qA:0)+ro,y:((mc=wt.y)!==null&&mc!==void 0?mc:0)+lo,width:($A=wt.width)!==null&&$A!==void 0?$A:Math.ceil(Cr),height:(th=wt.height)!==null&&th!==void 0?th:Math.ceil(jo)},En?(Qe.logger.debug("Document cloned, using foreign object rendering"),As=new np(Qe,qo),[4,As.render(Ni)]):[3,3];case 2:return No=ll.sent(),[3,5];case 3:return Qe.logger.debug("Document cloned, element located at "+ro+","+lo+" with size "+Cr+"x"+jo+" using computed rendering"),Qe.logger.debug("Starting DOM parsing"),Zr=bf(Qe,Ni),ho===Zr.styles.backgroundColor&&(Zr.styles.backgroundColor=cs.TRANSPARENT),Qe.logger.debug("Starting renderer for element at "+qo.x+","+qo.y+" with size "+qo.width+"x"+qo.height),As=new pc(Qe,qo),[4,As.render(Zr)];case 4:No=ll.sent(),ll.label=5;case 5:return(!((Mh=wt.removeContainer)!==null&&Mh!==void 0)||Mh)&&(gt.destroy(Hr)||Qe.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Qe.logger.debug("Finished rendering"),[2,No]}})})},op=function(St,wt,Ft){var Pt=wt.ownerDocument,Gt=Pt.documentElement?Co(St,getComputedStyle(Pt.documentElement).backgroundColor):cs.TRANSPARENT,le=Pt.body?Co(St,getComputedStyle(Pt.body).backgroundColor):cs.TRANSPARENT,Pe=typeof Ft=="string"?Co(St,Ft):Ft===null?cs.TRANSPARENT:4294967295;return wt===Pt.documentElement?Ds(Gt)?Ds(le)?Pe:le:Gt:Pe};return ip})},67467:function(xn,ze){ze.read=function(Qt,Ct,ee,ue,Se){var de,Ht,ie=Se*8-ue-1,Ae=(1<<ie)-1,re=Ae>>1,Wt=-7,Ie=ee?Se-1:0,Xt=ee?-1:1,Ee=Qt[Ct+Ie];for(Ie+=Xt,de=Ee&(1<<-Wt)-1,Ee>>=-Wt,Wt+=ie;Wt>0;de=de*256+Qt[Ct+Ie],Ie+=Xt,Wt-=8);for(Ht=de&(1<<-Wt)-1,de>>=-Wt,Wt+=ue;Wt>0;Ht=Ht*256+Qt[Ct+Ie],Ie+=Xt,Wt-=8);if(de===0)de=1-re;else{if(de===Ae)return Ht?NaN:(Ee?-1:1)*(1/0);Ht=Ht+Math.pow(2,ue),de=de-re}return(Ee?-1:1)*Ht*Math.pow(2,de-ue)},ze.write=function(Qt,Ct,ee,ue,Se,de){var Ht,ie,Ae,re=de*8-Se-1,Wt=(1<<re)-1,Ie=Wt>>1,Xt=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ee=ue?0:de-1,It=ue?1:-1,nt=Ct<0||Ct===0&&1/Ct<0?1:0;for(Ct=Math.abs(Ct),isNaN(Ct)||Ct===1/0?(ie=isNaN(Ct)?1:0,Ht=Wt):(Ht=Math.floor(Math.log(Ct)/Math.LN2),Ct*(Ae=Math.pow(2,-Ht))<1&&(Ht--,Ae*=2),Ht+Ie>=1?Ct+=Xt/Ae:Ct+=Xt*Math.pow(2,1-Ie),Ct*Ae>=2&&(Ht++,Ae/=2),Ht+Ie>=Wt?(ie=0,Ht=Wt):Ht+Ie>=1?(ie=(Ct*Ae-1)*Math.pow(2,Se),Ht=Ht+Ie):(ie=Ct*Math.pow(2,Ie-1)*Math.pow(2,Se),Ht=0));Se>=8;Qt[ee+Ee]=ie&255,Ee+=It,ie/=256,Se-=8);for(Ht=Ht<<Se|ie,re+=Se;re>0;Qt[ee+Ee]=Ht&255,Ee+=It,Ht/=256,re-=8);Qt[ee+Ee-It]|=nt*128}},2859:function(xn,ze,Qt){"use strict";Qt.d(ze,{hP:function(){return Ti}});var Ct=function(jt,Mt){return(Ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,vt){mt.__proto__=vt}||function(mt,vt){for(var Lt in vt)Object.prototype.hasOwnProperty.call(vt,Lt)&&(mt[Lt]=vt[Lt])})(jt,Mt)};function ee(jt,Mt){function mt(){this.constructor=jt}Ct(jt,Mt),jt.prototype=Mt===null?Object.create(Mt):(mt.prototype=Mt.prototype,new mt)}function ue(jt,Mt,mt,vt){return new(mt||(mt=Promise))(function(Lt,Bt){function _t(Xe){try{xe(vt.next(Xe))}catch(Me){Bt(Me)}}function Le(Xe){try{xe(vt.throw(Xe))}catch(Me){Bt(Me)}}function xe(Xe){var Me;Xe.done?Lt(Xe.value):(Me=Xe.value,Me instanceof mt?Me:new mt(function(De){De(Me)})).then(_t,Le)}xe((vt=vt.apply(jt,Mt||[])).next())})}function Se(jt,Mt){var mt,vt,Lt,Bt,_t={label:0,sent:function(){if(1&Lt[0])throw Lt[1];return Lt[1]},trys:[],ops:[]};return Bt={next:Le(0),throw:Le(1),return:Le(2)},typeof Symbol=="function"&&(Bt[Symbol.iterator]=function(){return this}),Bt;function Le(xe){return function(Xe){return function(Me){if(mt)throw new TypeError("Generator is already executing.");for(;_t;)try{if(mt=1,vt&&(Lt=2&Me[0]?vt.return:Me[0]?vt.throw||((Lt=vt.return)&&Lt.call(vt),0):vt.next)&&!(Lt=Lt.call(vt,Me[1])).done)return Lt;switch(vt=0,Lt&&(Me=[2&Me[0],Lt.value]),Me[0]){case 0:case 1:Lt=Me;break;case 4:return _t.label++,{value:Me[1],done:!1};case 5:_t.label++,vt=Me[1],Me=[0];continue;case 7:Me=_t.ops.pop(),_t.trys.pop();continue;default:if(Lt=_t.trys,!((Lt=Lt.length>0&&Lt[Lt.length-1])||Me[0]!==6&&Me[0]!==2)){_t=0;continue}if(Me[0]===3&&(!Lt||Me[1]>Lt[0]&&Me[1]<Lt[3])){_t.label=Me[1];break}if(Me[0]===6&&_t.label<Lt[1]){_t.label=Lt[1],Lt=Me;break}if(Lt&&_t.label<Lt[2]){_t.label=Lt[2],_t.ops.push(Me);break}Lt[2]&&_t.ops.pop(),_t.trys.pop();continue}Me=Mt.call(jt,_t)}catch(De){Me=[6,De],vt=0}finally{mt=Lt=0}if(5&Me[0])throw Me[1];return{value:Me[0]?Me[1]:void 0,done:!0}}([xe,Xe])}}}function de(){for(var jt=0,Mt=0,mt=arguments.length;Mt<mt;Mt++)jt+=arguments[Mt].length;var vt=Array(jt),Lt=0;for(Mt=0;Mt<mt;Mt++)for(var Bt=arguments[Mt],_t=0,Le=Bt.length;_t<Le;_t++,Lt++)vt[Lt]=Bt[_t];return vt}var Ht=function(){function jt(){}return jt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},jt.setAttributes=function(Mt,mt){for(var vt=0,Lt=mt;vt<Lt.length;vt++){var Bt=Lt[vt],_t=Bt[0],Le=Bt[1];Mt.setAttribute(_t,Le)}},jt.createRect=function(Mt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Lt.setAttribute("width",Mt.toString()),Lt.setAttribute("height",mt.toString()),vt&&jt.setAttributes(Lt,vt),Lt},jt.createLine=function(Mt,mt,vt,Lt,Bt){var _t=document.createElementNS("http://www.w3.org/2000/svg","line");return _t.setAttribute("x1",Mt.toString()),_t.setAttribute("y1",mt.toString()),_t.setAttribute("x2",vt.toString()),_t.setAttribute("y2",Lt.toString()),Bt&&jt.setAttributes(_t,Bt),_t},jt.createPolygon=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",Mt),mt&&jt.setAttributes(vt,mt),vt},jt.createCircle=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(Mt/2).toString()),vt.setAttribute("cy",(Mt/2).toString()),vt.setAttribute("r",Mt.toString()),mt&&jt.setAttributes(vt,mt),vt},jt.createEllipse=function(Mt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Lt.setAttribute("cx",(Mt/2).toString()),Lt.setAttribute("cy",(mt/2).toString()),Lt.setAttribute("rx",(Mt/2).toString()),Lt.setAttribute("ry",(mt/2).toString()),vt&&jt.setAttributes(Lt,vt),Lt},jt.createGroup=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return Mt&&jt.setAttributes(mt,Mt),mt},jt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},jt.createMarker=function(Mt,mt,vt,Lt,Bt,_t,Le){var xe=document.createElementNS("http://www.w3.org/2000/svg","marker");return jt.setAttributes(xe,[["id",Mt],["orient",mt],["markerWidth",vt.toString()],["markerHeight",Lt.toString()],["refX",Bt.toString()],["refY",_t.toString()]]),xe.appendChild(Le),xe},jt.createText=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),Mt&&jt.setAttributes(mt,Mt),mt},jt.createTSpan=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=Mt,mt&&jt.setAttributes(vt,mt),vt},jt.createImage=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return Mt&&jt.setAttributes(mt,Mt),mt},jt.createPoint=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=Mt,vt.y=mt,vt},jt.createPath=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",Mt),mt&&jt.setAttributes(vt,mt),vt},jt}(),ie=function(){function jt(){}return jt.addKey=function(Mt){jt.key=Mt},Object.defineProperty(jt,"isLicensed",{get:function(){return!!jt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(jt.key)},enumerable:!1,configurable:!0}),jt}(),Ae=function(){function jt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return jt.prototype.rasterize=function(Mt,mt,vt){var Lt=this;return new Promise(function(Bt){var _t=vt!==void 0?vt:document.createElement("canvas");Mt===null&&(Lt.markersOnly=!0,Lt.naturalSize=!1);var Le=document.createElementNS("http://www.w3.org/2000/svg","svg");Le.setAttribute("xmlns","http://www.w3.org/2000/svg"),Le.setAttribute("width",mt.width.baseVal.valueAsString),Le.setAttribute("height",mt.height.baseVal.valueAsString),Le.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),Le.innerHTML=mt.innerHTML,Lt.naturalSize===!0?(Le.width.baseVal.value=Mt.naturalWidth,Le.height.baseVal.value=Mt.naturalHeight):Lt.width!==void 0&&Lt.height!==void 0&&(Le.width.baseVal.value=Lt.width,Le.height.baseVal.value=Lt.height),_t.width=Le.width.baseVal.value,_t.height=Le.height.baseVal.value;var xe=Le.outerHTML,Xe=_t.getContext("2d");Lt.markersOnly!==!0&&Xe.drawImage(Mt,0,0,_t.width,_t.height);var Me=window.URL,De=new Image(_t.width,_t.height);De.setAttribute("crossOrigin","anonymous");var Oe=new Blob([xe],{type:"image/svg+xml"}),nn=Me.createObjectURL(Oe);De.onload=function(){Xe.drawImage(De,0,0),Me.revokeObjectURL(nn);var mn=_t.toDataURL(Lt.imageType,Lt.imageQuality);Bt(mn)},De.src=nn})},jt}(),re=function(){},Wt=function(){function jt(Mt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Mt+"_"}return Object.defineProperty(jt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(jt.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(jt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),jt.prototype.addClass=function(Mt){return this.styleSheet===void 0&&this.addStyleSheet(),Mt.name=""+this.classNamePrefix+Mt.localName,this.classes.push(Mt),this.styleSheet.sheet.insertRule("."+Mt.name+" {"+Mt.style+"}",this.styleSheet.sheet.cssRules.length),Mt},jt.prototype.addRule=function(Mt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Mt),this.styleSheet.sheet.insertRule(Mt.selector+" {"+Mt.style+"}",this.styleSheet.sheet.cssRules.length)},jt.prototype.addStyleSheet=function(){var Mt;this.styleSheet=document.createElement("style"),((Mt=this.styleSheetRoot)!==null&&Mt!==void 0?Mt:document.head).appendChild(this.styleSheet),this.addRule(new Ie("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Xt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Xt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},jt.prototype.removeStyleSheet=function(){var Mt;this.styleSheet&&(((Mt=this.styleSheetRoot)!==null&&Mt!==void 0?Mt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},jt}(),Ie=function(jt,Mt){this.selector=jt,this.style=Mt},Xt=function(jt,Mt){this.localName=jt,this.style=Mt},Ee=function(){function jt(Mt,mt,vt,Lt,Bt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Mt,this.displayMode=mt,this.markerItems=vt,this.uiStyleSettings=Lt,this.styles=Bt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return jt.prototype.show=function(Mt){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Mt,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(Bt){var _t=document.createElement("div");_t.className=""+mt.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",Bt.typeName),_t.innerHTML=Bt.icon,_t.addEventListener("click",function(){mt.markerToolbarButtonClicked(_t,Bt)}),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 Lt=document.createElement("div");Lt.className=this.toolbarBlockStyleClass.name,Lt.style.whiteSpace="nowrap",Lt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Lt),this.addActionButton(Lt,'<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(Lt,'<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()},jt.prototype.addButtonClickListener=function(Mt){this.buttonClickListeners.push(Mt)},jt.prototype.removeButtonClickListener=function(Mt){this.buttonClickListeners.indexOf(Mt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Mt),1)},jt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},jt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Mt=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<Mt||mt===Mt&&this.markerButtons.length-1===Mt?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===Mt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},jt.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")},jt.prototype.resetButtonStyles=function(){var Mt=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(Mt.uiStyleSettings.toolbarButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarButtonStyleColorsClassName:Mt.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(Mt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Mt.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(Mt.uiStyleSettings.toolbarButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarButtonStyleColorsClassName:Mt.toolbarButtonStyleColorsClass.name)})},jt.prototype.addActionButton=function(Mt,mt,vt){var Lt=this,Bt=document.createElement("div");switch(Bt.className=""+this.toolbarButtonStyleClass.name,Bt.innerHTML=mt,Bt.setAttribute("data-action",vt),Bt.addEventListener("click",function(){Lt.actionToolbarButtonClicked(Bt,vt)}),vt){case"select":Bt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Bt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Bt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Bt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Bt.style.fill=this.uiStyleSettings.closeButtonColor}Mt.appendChild(Bt),this.buttons.push(Bt)},jt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Xt("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 Xt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Xt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Xt("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 Xt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Mt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Xt("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},jt.prototype.markerToolbarButtonClicked=function(Mt,mt){this.setActiveButton(Mt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},jt.prototype.actionToolbarButtonClicked=function(Mt,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])},jt.prototype.setActiveButton=function(Mt){this.resetButtonStyles(),Mt.className=Mt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Mt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},jt.prototype.setActiveMarkerButton=function(Mt){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===Mt});mt&&this.setActiveButton(mt)},jt.prototype.setCurrentMarker=function(Mt){var mt=this;this.currentMarker=Mt,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")})},jt}(),It=function(){function jt(Mt,mt,vt,Lt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Mt,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=Lt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return jt.prototype.addStyles=function(){var Mt;this.toolboxStyleClass=this.styles.addClass(new Xt("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 Xt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Xt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Xt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Xt("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 Xt("toolbox-panel-row_colors",`
background-color: `+((Mt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Mt!==void 0?Mt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Xt("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 Xt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Xt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},jt.prototype.show=function(Mt){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Mt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},jt.prototype.setPanelButtons=function(Mt){var mt,vt,Lt=this;this.panels=Mt,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(Bt){var _t;Bt.uiStyleSettings=Lt.uiStyleSettings;var Le=document.createElement("div");Le.className=Lt.toolboxButtonStyleClass.name+" "+((_t=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Lt.toolboxButtonStyleColorsClass.name),Le.innerHTML=Bt.icon,Le.title=Bt.title,Le.addEventListener("click",function(){Lt.panelButtonClick(Bt)}),Lt.panelButtons.push(Le),Lt.buttonRow.appendChild(Le)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},jt.prototype.panelButtonClick=function(Mt){var mt=this,vt=-1;if(Mt!==this.activePanel){vt=this.panels.indexOf(Mt),this.panelRow.innerHTML="";var Lt=Mt.getUi();Lt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Lt),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=Mt}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(Bt,_t){var Le,xe;Bt.className=mt.toolboxButtonStyleClass.name+" "+(_t===vt?""+((Le=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Le!==void 0?Le:mt.toolboxActiveButtonStyleColorsClass.name):""+((xe=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:mt.toolboxButtonStyleColorsClass.name))})},jt}(),nt=function(jt,Mt){this.title=jt,this.icon=Mt},et=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<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=Lt,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return ee(Mt,jt),Mt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.whiteSpace="nowrap",this.colors.forEach(function(Lt){var Bt=mt.getColorBox(Lt);vt.appendChild(Bt),mt.colorBoxes.push(Bt)}),vt},Mt.prototype.getColorBox=function(mt){var vt=this,Lt=this.uiStyleSettings.toolbarHeight/4,Bt=this.uiStyleSettings.toolbarHeight-Lt,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=Bt-2+"px",_t.style.height=Bt-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=(Bt+2)/2+"px",_t.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){vt.setCurrentColor(mt,_t)});var Le=document.createElement("div");return Le.style.display="inline-block",Le.style.width=Bt-2+"px",Le.style.height=Bt-2+"px",Le.style.backgroundColor=mt,Le.style.borderRadius=Bt/2+"px",mt==="transparent"&&(Le.style.fill=this.uiStyleSettings.toolboxAccentColor,Le.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(Le),_t},Mt.prototype.setCurrentColor=function(mt,vt){var Lt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},Mt}(nt),At=function(){function jt(Mt,mt,vt){this._state="new",this._isSelected=!1,this._container=Mt,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(jt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),jt.prototype.ownsTarget=function(Mt){return!1},Object.defineProperty(jt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),jt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},jt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},jt.prototype.pointerDown=function(Mt,mt){},jt.prototype.dblClick=function(Mt,mt){},jt.prototype.manipulate=function(Mt){},jt.prototype.pointerUp=function(Mt){this.stateChanged()},jt.prototype.dispose=function(){},jt.prototype.addMarkerVisualToContainer=function(Mt){this.container.childNodes.length>0?this.container.insertBefore(Mt,this.container.childNodes[0]):this.container.appendChild(Mt)},jt.prototype.getState=function(){return{typeName:jt.typeName,state:this.state,notes:this.notes}},jt.prototype.restoreState=function(Mt){this._state=Mt.state,this.notes=Mt.notes},jt.prototype.scale=function(Mt,mt){},jt.prototype.colorChanged=function(Mt){this.onColorChanged&&this.onColorChanged(Mt),this.stateChanged()},jt.prototype.fillColorChanged=function(Mt){this.onFillColorChanged&&this.onFillColorChanged(Mt),this.stateChanged()},jt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Mt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Mt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Mt)&&this.onStateChanged(this)}},jt.typeName="MarkerBase",jt}(),at=function(){function jt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return jt.prototype.findGripByVisual=function(Mt){return this.topLeft.ownsTarget(Mt)?this.topLeft:this.topCenter.ownsTarget(Mt)?this.topCenter:this.topRight.ownsTarget(Mt)?this.topRight:this.centerLeft.ownsTarget(Mt)?this.centerLeft:this.centerRight.ownsTarget(Mt)?this.centerRight:this.bottomLeft.ownsTarget(Mt)?this.bottomLeft:this.bottomCenter.ownsTarget(Mt)?this.bottomCenter:this.bottomRight.ownsTarget(Mt)?this.bottomRight:void 0},jt}(),ct=function(){function jt(){this.GRIP_SIZE=10,this.visual=Ht.createGroup(),this.visual.appendChild(Ht.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ht.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return jt.prototype.ownsTarget=function(Mt){return Mt===this.visual||Mt===this.visual.childNodes[0]||Mt===this.visual.childNodes[1]},jt}(),pt=function(){function jt(){}return jt.toITransformMatrix=function(Mt){return{a:Mt.a,b:Mt.b,c:Mt.c,d:Mt.d,e:Mt.e,f:Mt.f}},jt.toSVGMatrix=function(Mt,mt){return Mt.a=mt.a,Mt.b=mt.b,Mt.c=mt.c,Mt.d=mt.d,Mt.e=mt.e,Mt.f=mt.f,Mt},jt}(),xt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.left=0,Bt.top=0,Bt.width=0,Bt.height=0,Bt.defaultSize={x:50,y:20},Bt.offsetX=0,Bt.offsetY=0,Bt.rotationAngle=0,Bt.CB_DISTANCE=10,Bt._suppressMarkerCreateEvent=!1,Bt.container.transform.baseVal.appendItem(Ht.createTransform()),Bt.setupControlBox(),Bt}return ee(Mt,jt),Object.defineProperty(Mt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Mt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Mt.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var vt=Ht.createTransform();this._visual.transform.baseVal.appendItem(vt)},enumerable:!1,configurable:!0}),Mt.prototype.ownsTarget=function(mt){return!!jt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},Mt.prototype.pointerDown=function(mt,vt){jt.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 Lt=this.unrotatePoint(mt);if(this.manipulationStartX=Lt.x,this.manipulationStartY=Lt.y,this.offsetX=Lt.x-this.left,this.offsetY=Lt.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 Bt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Bt.x-this.width/2,this.top=Bt.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"},Mt.prototype.pointerUp=function(mt){var vt=this.state;jt.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)},Mt.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},Mt.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)},Mt.prototype.resize=function(mt){var vt=this.manipulationStartLeft,Lt=this.manipulationStartWidth,Bt=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,Lt=this.manipulationStartWidth+this.manipulationStartLeft-vt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Lt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Bt=this.manipulationStartTop+mt.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-Bt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+mt.y-this.manipulationStartY}Lt>=0?(this.left=vt,this.width=Lt):(this.left=vt+Lt,this.width=-Lt),_t>=0?(this.top=Bt,this.height=_t):(this.top=Bt+_t,this.height=-_t),this.setSize()},Mt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Mt.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()}},Mt.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)},Mt.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM(),Lt=Ht.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Mt.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM();vt=vt.inverse();var Lt=Ht.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Mt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Mt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Mt.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup();var mt=Ht.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=Ht.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=Ht.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"},Mt.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()},Mt.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()},Mt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Mt.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,Lt=vt,Bt=(this.width+this.CB_DISTANCE)/2-mt/2,_t=(this.height+this.CB_DISTANCE)/2-mt/2,Le=this.height+this.CB_DISTANCE-mt/2,xe=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,vt,Lt),this.positionGrip(this.controlGrips.topCenter.visual,Bt,Lt),this.positionGrip(this.controlGrips.topRight.visual,xe,Lt),this.positionGrip(this.controlGrips.centerLeft.visual,vt,_t),this.positionGrip(this.controlGrips.centerRight.visual,xe,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,Le),this.positionGrip(this.controlGrips.bottomCenter.visual,Bt,Le),this.positionGrip(this.controlGrips.bottomRight.visual,xe,Le),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Bt,Lt-3*this.CB_DISTANCE)},Mt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},Mt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Mt.prototype.showControlBox=function(){this.controlBox.style.display=""},Mt.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)},jt.prototype.getState.call(this))},Mt.prototype.restoreState=function(mt){jt.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))},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt);var Lt=this.rotatePoint({x:this.left,y:this.top}),Bt=this.unrotatePoint({x:Lt.x*mt,y:Lt.y*vt});this.left=Bt.x,this.top=Bt.y,this.width=this.width*mt,this.height=this.height*vt,this.adjustControlBox()},Mt}(At),bt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.opacity=1,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Mt.prototype.createVisual=function(){this.visual=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Mt.prototype.manipulate=function(mt){jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Mt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this))},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.title="Rectangle marker",Mt}(xt),Rt=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<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=Lt,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return ee(Mt,jt),Mt.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(Lt){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.flexGrow="2",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.borderColor=Lt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentWidth(Lt,Bt)}),vt.appendChild(Bt);var _t=document.createElement("div");_t.innerText=Lt.toString(),_t.style.marginRight="5px",Bt.appendChild(_t);var Le=document.createElement("div");Le.style.minHeight="20px",Le.style.flexGrow="2",Le.style.display="flex",Le.style.alignItems="center";var xe=document.createElement("hr");xe.style.minWidth="20px",xe.style.border="0px",xe.style.borderTop=Lt+"px solid "+mt.uiStyleSettings.toolboxColor,xe.style.flexGrow="2",Le.appendChild(xe),Bt.appendChild(Le),mt.widthBoxes.push(Bt)}),vt},Mt.prototype.setCurrentWidth=function(mt,vt){var Lt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Mt}(nt),Ot=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<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=Lt,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return ee(Mt,jt),Mt.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(Lt){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.overflow="hidden",Bt.style.maxWidth=100/mt.styles.length-5+"%",Bt.style.borderColor=Lt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentStyle(Lt,Bt)}),vt.appendChild(Bt);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var Le=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Lt!==""?'stroke-dasharray="'+Lt+'"':"")+` />
</svg>`;_t.innerHTML=Le,Bt.appendChild(_t),mt.styleBoxes.push(Bt)}),vt},Mt.prototype.setCurrentStyle=function(mt,vt){var Lt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Mt}(nt),Zt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return ee(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="FrameMarker",Mt.title="Frame marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Mt}(bt),Vt=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"},$t=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.x1=0,Bt.y1=0,Bt.x2=0,Bt.y2=0,Bt.defaultLength=50,Bt.manipulationStartX=0,Bt.manipulationStartY=0,Bt.manipulationStartX1=0,Bt.manipulationStartY1=0,Bt.manipulationStartX2=0,Bt.manipulationStartY2=0,Bt.setupControlBox(),Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!!jt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.pointerUp=function(mt){var vt=this.state;jt.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)},Mt.prototype.adjustVisual=function(){},Mt.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)},Mt.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()},Mt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Mt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Mt.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Mt.prototype.adjustControlBox=function(){this.positionGrips()},Mt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Mt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Mt.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)},Mt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},Mt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},jt.prototype.getState.call(this))},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},Mt.prototype.scale=function(mt,vt){jt.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()},Mt}(At),Ce=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorLine=Ht.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Mt.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()),Ht.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},Mt.typeName="LineMarker",Mt.title="Line marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Mt}($t),fe=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<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=Lt,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return ee(Mt,jt),Mt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.flexGrow="2",this.fonts.forEach(function(Lt){var Bt=document.createElement("div");Bt.style.display="inline-block",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.overflow="hidden",Bt.style.maxWidth=100/mt.fonts.length-5+"%",Bt.style.borderColor=Lt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentFont(Lt,Bt)}),vt.appendChild(Bt);var _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=Lt,_t.style.overflow="hidden";var Le=document.createElement("div");Le.style.whiteSpace="nowrap",Le.style.overflow="hidden",Le.style.textOverflow="ellipsis",Le.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(Le),Bt.appendChild(_t),mt.fontBoxes.push(Bt)}),vt},Mt.prototype.setCurrentFont=function(mt,vt){var Lt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Mt}(nt),rn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.color="transparent",Bt.padding=5,Bt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Bt.text=Bt.DEFAULT_TEXT,Bt.isMoved=!1,Bt.color=Lt.defaultColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.defaultSize={x:100,y:30},Bt.setColor=Bt.setColor.bind(Bt),Bt.setFont=Bt.setFont.bind(Bt),Bt.renderText=Bt.renderText.bind(Bt),Bt.sizeText=Bt.sizeText.bind(Bt),Bt.textEditDivClicked=Bt.textEditDivClicked.bind(Bt),Bt.showTextEditor=Bt.showTextEditor.bind(Bt),Bt.setSize=Bt.setSize.bind(Bt),Bt.positionTextEditor=Bt.positionTextEditor.bind(Bt),Bt.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.fontFamilyPanel=new fe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){if(jt.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(Lt){Lt===mt&&(vt=!0)}),vt},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.bgRectangle=Ht.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ht.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.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(Ht.createTSpan(vt.trim()===""?" ":vt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Mt.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),vt=1;if(mt.width>0&&mt.height>0){var Lt=(1*this.width-this.width*this.padding*2/100)/mt.width,Bt=(1*this.height-this.height*this.padding*2/100)/mt.height;vt=Math.min(Lt,Bt)}return vt},Mt.prototype.getTextPosition=function(mt){var vt=this.textElement.getBBox(),Lt=0,Bt=0;return vt.width>0&&vt.height>0&&(Lt=(this.width-vt.width*mt)/2,Bt=this.height/2-vt.height*mt/2),{x:Lt,y:Bt}},Mt.prototype.sizeText=function(){var mt=this.textElement.getBBox(),vt=this.getTextScale(),Lt=this.getTextPosition(vt);Lt.y-=mt.y*vt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Lt.x+"px, "+Lt.y+"px) scale("+vt+", "+vt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Lt.x,Lt.y),this.textElement.transform.baseVal.getItem(1).setScale(vt,vt))},Mt.prototype.manipulate=function(mt){jt.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)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Mt.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),jt.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Mt.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 Lt=vt.clipboardData.getData("text"),Bt=window.getSelection();if(!Bt.rangeCount)return!1;Bt.deleteFromDocument(),Bt.getRangeAt(0).insertNode(document.createTextNode(Lt)),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")},Mt.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}),Lt=this.textElement.getBBox(),Bt={x:Lt.width*mt,y:Lt.height*mt};vt.x-=Bt.x/2,vt.y-=Bt.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"}},Mt.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()},Mt.prototype.select=function(){jt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Mt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),jt.prototype.deselect.call(this)},Mt.prototype.dblClick=function(mt,vt){jt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Mt.prototype.setColor=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},Mt.prototype.setFont=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Mt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Mt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},Mt.typeName="TextMarker",Mt.title="Text marker",Mt.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>',Mt}(xt),tn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.color="transparent",Bt.lineWidth=3,Bt.drawing=!1,Bt.pixelRatio=1,Bt.color=Lt.defaultColor,Bt.lineWidth=Lt.defaultStrokeWidth,Bt.pixelRatio=Lt.freehandPixelRatio,Bt.setColor=Bt.setColor.bind(Bt),Bt.addCanvas=Bt.addCanvas.bind(Bt),Bt.finishCreation=Bt.finishCreation.bind(Bt),Bt.setLineWidth=Bt.setLineWidth.bind(Bt),Bt.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.lineWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.lineWidthPanel.onWidthChanged=Bt.setLineWidth,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.drawingImage=Ht.createImage(),this.visual.appendChild(this.drawingImage);var mt=Ht.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},Mt.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):jt.prototype.pointerDown.call(this,mt,vt)},Mt.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Mt.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):jt.prototype.pointerUp.call(this,mt)},Mt.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)},Mt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.select.call(this)},Mt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.deselect.call(this)},Mt.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],Lt=vt[0],Bt=vt[1],_t=vt[2],Le=vt[3],xe=!1,Xe=0;Xe<this.canvasElement.height;Xe++)for(var Me=0;Me<this.canvasElement.width;Me++)mt.data[Xe*this.canvasElement.width*4+4*Me+3]>0&&(xe=!0,Xe<Bt&&(Bt=Xe),Me<Lt&&(Lt=Me),Xe>Le&&(Le=Xe),Me>_t&&(_t=Me));if(xe){this.left=Lt/this.pixelRatio,this.top=Bt/this.pixelRatio,this.width=(_t-Lt)/this.pixelRatio,this.height=(Le-Bt)/this.pixelRatio;var De=document.createElement("canvas");De.width=_t-Lt,De.height=Le-Bt,De.getContext("2d").putImageData(this.canvasContext.getImageData(Lt,Bt,_t-Lt,Le-Bt),0,0),this.drawingImgUrl=De.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Mt.prototype.setDrawingImage=function(){Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Mt.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},Mt.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){this.createVisual(),jt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setDrawingImage()},Mt.typeName="FreehandMarker",Mt.title="Freehand marker",Mt.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>',Mt}(xt),Bn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Bt.typeBoxes=[],Bt.currentType=vt,Bt.setCurrentType=Bt.setCurrentType.bind(Bt),Bt}return ee(Mt,jt),Mt.prototype.getUi=function(){var mt=this,vt=document.createElement("div");vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2";for(var Lt=function(Le){var xe="both";switch(Le){case 0:xe="both";break;case 1:xe="start";break;case 2:xe="end";break;case 3:xe="none"}var Xe=document.createElement("div");if(Xe.style.display="flex",Xe.style.flexGrow="2",Xe.style.alignItems="center",Xe.style.justifyContent="space-between",Xe.style.padding="5px",Xe.style.borderWidth="2px",Xe.style.borderStyle="solid",Xe.style.borderColor=xe===Bt.currentType?Bt.uiStyleSettings.toolboxAccentColor:"transparent",Xe.addEventListener("click",function(){mt.setCurrentType(xe,Xe)}),vt.appendChild(Xe),xe==="both"||xe==="start"){var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Me.style.marginLeft="5px",Xe.appendChild(Me)}var De=document.createElement("div");De.style.display="flex",De.style.alignItems="center",De.style.minHeight="20px",De.style.flexGrow="2";var Oe=document.createElement("hr");if(Oe.style.minWidth="20px",Oe.style.border="0px",Oe.style.borderTop="3px solid "+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee"),Oe.style.flexGrow="2",De.appendChild(Oe),Xe.appendChild(De),xe==="both"||xe==="end"){var nn=document.createElement("div");nn.style.display="flex",nn.style.alignItems="center",nn.style.minHeight="20px",nn.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="`+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,nn.style.marginRight="5px",Xe.appendChild(nn)}Bt.typeBoxes.push(Xe)},Bt=this,_t=0;_t<4;_t++)Lt(_t);return vt},Mt.prototype.setCurrentType=function(mt,vt){var Lt=this;this.currentType=mt,this.typeBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Mt}(nt),Fn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.arrowType="end",Bt.arrowBaseHeight=10,Bt.arrowBaseWidth=10,Bt.getArrowPoints=Bt.getArrowPoints.bind(Bt),Bt.setArrowType=Bt.setArrowType.bind(Bt),Bt.arrowTypePanel=new Bn("Arrow type","end"),Bt.arrowTypePanel.onArrowTypeChanged=Bt.setArrowType,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},Mt.prototype.getArrowPoints=function(mt,vt){var Lt=this.arrowBaseWidth+2*this.strokeWidth,Bt=this.arrowBaseHeight+2*this.strokeWidth;return mt-Lt/2+","+(vt+Bt/2)+" "+mt+","+(vt-Bt/2)+" "+(mt+Lt/2)+","+(vt+Bt/2)},Mt.prototype.createTips=function(){this.arrow1=Ht.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ht.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow2)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Mt.prototype.adjustVisual=function(){if(jt.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",Ht.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ht.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 Lt=this.arrow2.transform.baseVal.getItem(0);Lt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Lt,0)}},Mt.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},Mt.typeName="ArrowMarker",Mt.title="Arrow marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Mt}(Ce),kn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.fillColor=Lt.defaultFillColor,Bt.strokeWidth=0,Bt.fillPanel=new et("Color",Lt.defaultColorSet,Lt.defaultFillColor),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt}return ee(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="CoverMarker",Mt.title="Cover marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Mt}(bt),Gn=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<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=Lt,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return ee(Mt,jt),Mt.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(Lt){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.justifyContent="center",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.borderColor=Lt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentOpacity(Lt,Bt)}),vt.appendChild(Bt);var _t=document.createElement("div");_t.innerText=100*Lt+"%",Bt.appendChild(_t),mt.opacityBoxes.push(Bt)}),vt},Mt.prototype.setCurrentOpacity=function(mt,vt){var Lt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Mt}(nt),ti=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.setOpacity=Bt.setOpacity.bind(Bt),Bt.fillColor=Lt.defaultHighlightColor,Bt.strokeWidth=0,Bt.opacity=Lt.defaultHighlightOpacity,Bt.fillPanel=new et("Color",Lt.defaultColorSet,Bt.fillColor),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.opacityPanel=new Gn("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return ee(Mt,jt),Mt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="HighlightMarker",Mt.title="Highlight marker",Mt.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>',Mt}(kn),me='<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>',oe='<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>',Cn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.bgColor="transparent",Bt.tipPosition={x:0,y:0},Bt.tipBase1Position={x:0,y:0},Bt.tipBase2Position={x:0,y:0},Bt.tipMoving=!1,Bt.color=Lt.defaultStrokeColor,Bt.bgColor=Lt.defaultFillColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.defaultSize={x:100,y:30},Bt.setBgColor=Bt.setBgColor.bind(Bt),Bt.getTipPoints=Bt.getTipPoints.bind(Bt),Bt.positionTip=Bt.positionTip.bind(Bt),Bt.setTipPoints=Bt.setTipPoints.bind(Bt),Bt.colorPanel=new et("Text color",Lt.defaultColorSet,Bt.color,me),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.bgColorPanel=new et("Fill color",Lt.defaultColorSet,Bt.bgColor,oe),Bt.bgColorPanel.onColorChanged=Bt.setBgColor,Bt.fontFamilyPanel=new fe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.tipGrip=new ct,Bt.tipGrip.visual.transform.baseVal.appendItem(Ht.createTransform()),Bt.controlBox.appendChild(Bt.tipGrip.visual),Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return jt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},Mt.prototype.createTip=function(){Ht.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ht.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Mt.prototype.pointerDown=function(mt,vt){this.state==="new"&&jt.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):jt.prototype.pointerDown.call(this,mt,vt)},Mt.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,jt.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";jt.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},Mt.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 jt.prototype.manipulate.call(this,mt)},Mt.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(Ht.setAttributes(this.bgRectangle,[["fill",mt]]),Ht.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},Mt.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},Mt.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var vt=Math.min(this.height/2,15),Lt=this.height/5;mt&&(this.tipPosition={x:vt+Lt/2,y:this.height+20});var Bt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Bt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:0},this.tipBase2Position={x:vt+Lt,y:0}):(this.tipBase1Position={x:0,y:vt},this.tipBase2Position={x:0,y:vt+Lt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Bt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Lt,y:0},this.tipBase2Position={x:this.width-vt,y:0}):(this.tipBase1Position={x:this.width,y:vt},this.tipBase2Position={x:this.width,y:vt+Lt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Bt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Lt,y:this.height},this.tipBase2Position={x:this.width-vt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-vt-Lt},this.tipBase2Position={x:this.width,y:this.height-vt}):Bt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:this.height},this.tipBase2Position={x:vt+Lt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-vt},this.tipBase2Position={x:0,y:this.height-vt-Lt})},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.positionTip()},Mt.prototype.positionTip=function(){Ht.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(Mt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Mt.prototype.select=function(){this.positionTip(),jt.prototype.select.call(this)},Mt.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,jt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},Mt.typeName="CalloutMarker",Mt.title="Callout marker",Mt.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>',Mt}(rn),li=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.opacity=1,Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.fillColor=Lt.defaultFillColor,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.setOpacity=Bt.setOpacity.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt.strokePanel=new et("Line color",de(Lt.defaultColorSet,["transparent"]),Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.fillPanel=new et("Fill color",de(Lt.defaultColorSet,["transparent"]),Bt.fillColor,oe),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.opacityPanel=new Gn("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Mt.prototype.createVisual=function(){this.visual=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Mt.prototype.manipulate=function(mt){jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Mt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.typeName="EllipseMarker",Mt.title="Ellipse marker",Mt.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>',Mt}(xt),ai=function(jt){function Mt(mt,vt,Lt){return jt.call(this,mt,vt,Lt)||this}return ee(Mt,jt),Object.defineProperty(Mt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},Mt.prototype.createTips=function(){this.tip1=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip2)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Mt.prototype.adjustVisual=function(){if(jt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ht.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()]]),Ht.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 Lt=this.tip2.transform.baseVal.getItem(0);Lt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Lt,0)}},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},Mt.typeName="MeasurementMarker",Mt.title="Measurement marker",Mt.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>',Mt}(Ce),sn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.strokePanel.colors=Lt.defaultColorSet,Bt.fillColor="transparent",Bt}return ee(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="EllipseFrameMarker",Mt.title="Ellipse frame marker",Mt.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>',Mt}(li),Rn=function(){function jt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),jt.prototype.addUndoStep=function(Mt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Mt)||(this.undoStack.push(Mt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Mt)&&this.redoStack.splice(0,this.redoStack.length))},jt.prototype.replaceLastUndoStep=function(Mt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Mt)},jt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},jt.prototype.undo=function(){if(this.undoStack.length>1){var Mt=this.undoStack.pop();return Mt!==void 0&&this.redoStack.push(Mt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},jt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},jt}(),ri=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.curveX=0,Bt.curveY=0,Bt.manipulationStartCurveX=0,Bt.manipulationStartCurveY=0,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.positionGrips=Bt.positionGrips.bind(Bt),Bt.addControlGrips=Bt.addControlGrips.bind(Bt),Bt.adjustVisual=Bt.adjustVisual.bind(Bt),Bt.setupControlBox=Bt.setupControlBox.bind(Bt),Bt.resize=Bt.resize.bind(Bt),Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},Mt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorCurve=Ht.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ht.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Mt.prototype.setupControlBox=function(){jt.prototype.setupControlBox.call(this),this.curveControlLine1=Ht.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ht.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)},Mt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,jt.prototype.addControlGrips.call(this)},Mt.prototype.positionGrips=function(){jt.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()))},Mt.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),jt.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)},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},Mt.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,jt.prototype.scale.call(this,mt,vt)},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.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()},Mt.typeName="CurveMarker",Mt.title="Curve marker",Mt.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>',Mt}($t),Ui=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.textColor="transparent",Bt.fontSize="1rem",Bt.isMoved=!1,Bt.captionText="Caption",Bt.PADDING=5,Bt.captionBoxWidth=0,Bt.captionBoxHeight=0,Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.fillColor=Lt.defaultFillColor,Bt.textColor=Lt.defaultStrokeColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.fontSize=Lt.defaultCaptionFontSize,Bt.captionText=Lt.defaultCaptionText,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt.sizeCaption=Bt.sizeCaption.bind(Bt),Bt.setCaptionText=Bt.setCaptionText.bind(Bt),Bt.showTextEditor=Bt.showTextEditor.bind(Bt),Bt.positionTextEditor=Bt.positionTextEditor.bind(Bt),Bt.finishTextEditing=Bt.finishTextEditing.bind(Bt),Bt.setFont=Bt.setFont.bind(Bt),Bt.setTextColor=Bt.setTextColor.bind(Bt),Bt.strokePanel=new et("Line color",de(Lt.defaultColorSet,["transparent"]),Bt.strokeColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.fillPanel=new et("Fill color",de(Lt.defaultColorSet,["transparent"]),Bt.fillColor,oe),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.fontFamilyPanel=new fe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.textColorPanel=new et("Text color",Lt.defaultColorSet,Bt.textColor,me),Bt.textColorPanel.onColorChanged=Bt.setTextColor,Bt}return ee(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ht.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ht.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=Ht.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()},Mt.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.manipulate=function(mt){jt.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)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.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),Ht.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')"]]),Ht.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')"]])},Mt.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()},Mt.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"))},Mt.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Mt.prototype.setFont=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Mt.prototype.setTextColor=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Mt.prototype.dblClick=function(mt,vt){jt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Ht.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Mt.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},jt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.typeName="CaptionFrameMarker",Mt.title="Caption frame marker",Mt.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>',Mt}(xt),en=function(){function jt(Mt,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Mt,this.cancelable=mt}return Object.defineProperty(jt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),jt.prototype.preventDefault=function(){this._defaultPrevented=!0},jt}(),ei=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,!1)||this;return Bt.dataUrl=vt,Bt.state=Lt,Bt}return ee(Mt,jt),Mt}(en),Fe=function(jt){function Mt(mt,vt,Lt){Lt===void 0&&(Lt=!1);var Bt=jt.call(this,mt,Lt)||this;return Bt.marker=vt,Bt}return ee(Mt,jt),Mt}(en),ci=function(){function jt(){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 jt.prototype.addEventListener=function(Mt,mt){this[Mt].push(mt)},jt.prototype.removeEventListener=function(Mt,mt){var vt=this[Mt].indexOf(mt);vt>-1&&this[Mt].splice(vt,1)},jt}(),Ti=function(){function jt(Mt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Vt,this._isOpen=!1,this.undoRedoManager=new Rn,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 ci,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=jt.instanceCounter++,this.styles=new Wt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Mt,this.targetRoot=document.body,this.width=Mt.clientWidth,this.height=Mt.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(jt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Zt,tn,Fn,rn,sn,li,ti,Cn,ai,kn,Ce,ri,Ui]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,tn,Fn,rn,li,ti,Cn]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,tn,Fn,rn,ti]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Mt){var mt=this;this._availableMarkerTypes.splice(0),Mt.forEach(function(vt){if(typeof vt=="string"){var Lt=mt.ALL_MARKER_TYPES.find(function(Bt){return Bt.typeName===vt});Lt!==void 0&&mt._availableMarkerTypes.push(Lt)}else mt._availableMarkerTypes.push(vt)})},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Mt){this._zoomLevel=Mt,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(jt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),jt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},jt.prototype.show=function(){var Mt=this;this.styles.styleSheetRoot===void 0&&re.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=re.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new en(Mt))})},jt.prototype.render=function(){return ue(this,void 0,void 0,function(){var Mt;return Se(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(Mt=new Ae).naturalSize=this.renderAtNaturalSize,Mt.imageType=this.renderImageType,Mt.imageQuality=this.renderImageQuality,Mt.markersOnly=this.renderMarkersOnly,Mt.width=this.renderWidth,Mt.height=this.renderHeight,[4,Mt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,Mt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},jt.prototype.close=function(Mt){var mt=this;if(Mt===void 0&&(Mt=!1),this.isOpen){var vt=!1;Mt||this.eventListeners.beforeclose.forEach(function(Lt){var Bt=new en(mt,!0);Lt(Bt),Bt.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(Lt){return Lt(new en(mt))}),this.detachEvents(),this._isOpen=!1)}},jt.prototype.addMarkersToToolbar=function(){for(var Mt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(Mt=this._availableMarkerTypes).push.apply(Mt,mt)},jt.prototype.addRenderEventListener=function(Mt){this.addEventListener("render",function(mt){Mt(mt.dataUrl,mt.state)})},jt.prototype.removeRenderEventListener=function(Mt){},jt.prototype.addCloseEventListener=function(Mt){this.addEventListener("close",function(){Mt()})},jt.prototype.removeCloseEventListener=function(Mt){},jt.prototype.setupResizeObserver=function(){var Mt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Mt.resize(Mt.target.clientWidth,Mt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Mt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},jt.prototype.onPopupTargetResize=function(){var Mt=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/Mt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Mt:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Mt;this.resize(mt,vt)},jt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},jt.prototype.resize=function(Mt,mt){this._isResizing=!0;var vt=Mt/this.imageWidth,Lt=mt/this.imageHeight;this.imageWidth=Math.round(Mt),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,Lt),this._isResizing=!1},jt.prototype.scaleMarkers=function(Mt,mt){var vt,Lt=this;this._currentMarker&&this._currentMarker instanceof rn?this._currentMarker.scale(Mt,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Bt){Bt!==Lt._currentMarker&&Bt.scale(Mt,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},jt.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"},jt.prototype.setTopLeft=function(){var Mt=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=Mt.left-mt.left,this.top=Mt.top-mt.top},jt.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)},jt.prototype.addDefs=function(){for(var Mt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Ht.createDefs(),this.addDefsToImage(),(Mt=this.defs).append.apply(Mt,mt)},jt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},jt.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)},jt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},jt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},jt.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)},jt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},jt.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)},jt.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 Mt=document.createElement("a");Mt.href="https://markerjs.com/",Mt.target="_blank",Mt.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>',Mt.title="Powered by marker.js",Mt.style.display="grid",Mt.style.alignItems="center",Mt.style.justifyItems="center",Mt.style.padding="3px",Mt.style.width="20px",Mt.style.height="20px",this.logoUI.appendChild(Mt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},jt.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")},jt.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"},jt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},jt.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 Mt=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=Mt+"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 Ee(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 It(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},jt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},jt.prototype.removeMarker=function(Mt){this.markerImage.removeChild(Mt.container),this.markers.indexOf(Mt)>-1&&this.markers.splice(this.markers.indexOf(Mt),1),Mt.dispose()},jt.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())},jt.prototype.toolbarButtonClicked=function(Mt,mt){if(Mt==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(Mt==="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()}},jt.prototype.deleteSelectedMarker=function(){var Mt=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Lt){var Bt=new Fe(Mt,Mt._currentMarker,!0);Lt(Bt),Bt.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(Lt){return Lt(new Fe(Mt,vt))})}}},jt.prototype.clear=function(){var Mt=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var Le=new Fe(Mt,void 0,!0);_t(Le),Le.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(_t){var Le=Lt.markers[_t];Lt.setCurrentMarker(Lt.markers[_t]),Lt._currentMarker.dispose(),Lt.markerImage.removeChild(Lt._currentMarker.container),Lt.markers.splice(Lt.markers.indexOf(Lt._currentMarker),1),Lt.eventListeners.markerdelete.forEach(function(xe){return xe(new Fe(Mt,Le))})},Lt=this,Bt=this.markers.length-1;Bt>=0;Bt--)vt(Bt);this.addUndoStep()}},Object.defineProperty(jt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),jt.prototype.showNotesEditor=function(){var Mt;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=(Mt=this._currentMarker.notes)!==null&&Mt!==void 0?Mt:"",this.overlayContainer.appendChild(this.notesArea))},jt.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)},jt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},jt.prototype.addUndoStep=function(){var Mt=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 Lt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),Lt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Bt){return Bt(new en(Mt))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Bt){return Bt(new en(Mt))})}},jt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},jt.prototype.undoStep=function(){var Mt=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new en(Mt))}))},jt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},jt.prototype.redoStep=function(){var Mt=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new en(Mt))}))},jt.prototype.stepZoom=function(){var Mt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Mt<this.zoomSteps.length-1?this.zoomSteps[Mt+1]:this.zoomSteps[0]},jt.prototype.panTo=function(Mt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Mt.x,top:this.prevPanPoint.y-Mt.y}),this.prevPanPoint=Mt},jt.prototype.startRenderAndClose=function(){return ue(this,void 0,void 0,function(){var Mt,mt,vt=this;return Se(this,function(Lt){switch(Lt.label){case 0:return[4,this.render()];case 1:return Mt=Lt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Bt){return Bt(new ei(vt,Mt,mt))}),this.close(!0),[2]}})})},jt.prototype.getState=function(Mt){Mt===!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},jt.prototype.restoreState=function(Mt){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Mt.markers.forEach(function(vt){var Lt=mt._availableMarkerTypes.find(function(_t){return _t.typeName===vt.typeName});if(Lt!==void 0){var Bt=mt.addNewMarker(Lt);Bt.restoreState(vt),mt.markers.push(Bt)}}),Mt.width&&Mt.height&&(Mt.width!==this.imageWidth||Mt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Mt.width,this.imageHeight/Mt.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new en(mt))})},jt.prototype.addNewMarker=function(Mt){var mt=Ht.createGroup();return this.markerImage.appendChild(mt),new Mt(mt,this.overlayContainer,this.settings)},jt.prototype.createNewMarker=function(Mt){var mt,vt=this;(mt=typeof Mt=="string"?this._availableMarkerTypes.find(function(Lt){return Lt.typeName===Mt}):Mt)&&(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(Lt){return Lt(new Fe(vt,vt._currentMarker))}))},jt.prototype.markerCreated=function(Mt){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Mt),this.setCurrentMarker(Mt),Mt instanceof tn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(tn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new Fe(mt,mt._currentMarker))})},jt.prototype.colorChanged=function(Mt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Mt,this.settings.defaultStrokeColor=Mt)},jt.prototype.fillColorChanged=function(Mt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Mt)},jt.prototype.markerStateChanged=function(Mt){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new Fe(mt,Mt))})},jt.prototype.setCurrentMarker=function(Mt){var mt=this;this._currentMarker!==Mt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new Fe(mt,mt._currentMarker))})),this._currentMarker=Mt,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 Fe(mt,mt._currentMarker))}))},jt.prototype.onPointerDown=function(Mt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Mt.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(Mt.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY),Mt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Mt.clientX,y:Mt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY))},jt.prototype.onDblClick=function(Mt){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Mt.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY),Mt.target):this.setCurrentMarker()}},jt.prototype.onPointerMove=function(Mt){this.touchPoints!==1&&Mt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Mt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY)):this.zoomLevel>1&&this.panTo({x:Mt.clientX,y:Mt.clientY}))},jt.prototype.onPointerUp=function(Mt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY)),this.isDragging=!1,this.addUndoStep()},jt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},jt.prototype.onKeyUp=function(Mt){this._currentMarker===void 0||this.notesArea!==void 0||Mt.key!=="Delete"&&Mt.key!=="Backspace"||this.deleteSelectedMarker()},jt.prototype.clientToLocalCoordinates=function(Mt,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(Mt-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},jt.prototype.onWindowResize=function(){this.positionUI()},jt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Mt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Mt+"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()},jt.prototype.addLicenseKey=function(Mt){ie.addKey(Mt)},jt.prototype.addEventListener=function(Mt,mt){this.eventListeners.addEventListener(Mt,mt)},jt.prototype.removeEventListener=function(Mt,mt){this.eventListeners.removeEventListener(Mt,mt)},jt.prototype.renderState=function(Mt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Mt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(jt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),jt.prototype.focus=function(){var Mt=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 en(Mt))}))},jt.prototype.blur=function(){var Mt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new en(Mt))}))},jt.instanceCounter=0,jt}()},23425:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ot}});var Ct=Qt(4635),ee=Qt(14809),ue=Qt(93664),Se=Qt(20439),de=Qt(50298),Ht=Qt(92310),ie=Qt.n(Ht),Ae=Qt(18929),re=Qt(10228),Wt=Qt(26112),Ie=Qt(48736),Xt=Qt(59301),Ee=Qt(17119),It=[10,20,50,100],nt=function(Vt){var $t=Vt.pageSizeOptions,Ce=$t===void 0?It:$t,fe=Vt.locale,rn=Vt.changeSize,tn=Vt.pageSize,Bn=Vt.goButton,Fn=Vt.quickGo,kn=Vt.rootPrefixCls,Gn=Vt.disabled,ti=Vt.buildOptionText,me=Vt.showSizeChanger,oe=Vt.sizeChangerRender,Cn=Xt.useState(""),li=(0,de.Z)(Cn,2),ai=li[0],sn=li[1],Rn=function(){return!ai||Number.isNaN(ai)?void 0:Number(ai)},ri=typeof ti=="function"?ti:function(mt){return"".concat(mt," ").concat(fe.items_per_page)},Ui=function(vt){sn(vt.target.value)},en=function(vt){Bn||ai===""||(sn(""),!(vt.relatedTarget&&(vt.relatedTarget.className.indexOf("".concat(kn,"-item-link"))>=0||vt.relatedTarget.className.indexOf("".concat(kn,"-item"))>=0))&&(Fn==null||Fn(Rn())))},ei=function(vt){ai!==""&&(vt.keyCode===re.Z.ENTER||vt.type==="click")&&(sn(""),Fn==null||Fn(Rn()))},Fe=function(){return Ce.some(function(vt){return vt.toString()===tn.toString()})?Ce:Ce.concat([tn]).sort(function(vt,Lt){var Bt=Number.isNaN(Number(vt))?0:Number(vt),_t=Number.isNaN(Number(Lt))?0:Number(Lt);return Bt-_t})},ci="".concat(kn,"-options");if(!me&&!Fn)return null;var Ti=null,jt=null,Mt=null;return me&&oe&&(Ti=oe({disabled:Gn,size:tn,onSizeChange:function(vt){rn==null||rn(Number(vt))},"aria-label":fe.page_size,className:"".concat(ci,"-size-changer"),options:Fe().map(function(mt){return{label:ri(mt),value:mt}})})),Fn&&(Bn&&(Mt=typeof Bn=="boolean"?Xt.createElement("button",{type:"button",onClick:ei,onKeyUp:ei,disabled:Gn,className:"".concat(ci,"-quick-jumper-button")},fe.jump_to_confirm):Xt.createElement("span",{onClick:ei,onKeyUp:ei},Bn)),jt=Xt.createElement("div",{className:"".concat(ci,"-quick-jumper")},fe.jump_to,Xt.createElement("input",{disabled:Gn,type:"text",value:ai,onChange:Ui,onKeyUp:ei,onBlur:en,"aria-label":fe.page}),fe.page,Mt)),Xt.createElement("li",{className:ci},Ti,jt)},et=nt,At=function(Vt){var $t=Vt.rootPrefixCls,Ce=Vt.page,fe=Vt.active,rn=Vt.className,tn=Vt.showTitle,Bn=Vt.onClick,Fn=Vt.onKeyPress,kn=Vt.itemRender,Gn="".concat($t,"-item"),ti=ie()(Gn,"".concat(Gn,"-").concat(Ce),(0,Ct.Z)((0,Ct.Z)({},"".concat(Gn,"-active"),fe),"".concat(Gn,"-disabled"),!Ce),rn),me=function(){Bn(Ce)},oe=function(ai){Fn(ai,Bn,Ce)},Cn=kn(Ce,"page",Xt.createElement("a",{rel:"nofollow"},Ce));return Cn?Xt.createElement("li",{title:tn?String(Ce):null,className:ti,onClick:me,onKeyDown:oe,tabIndex:0},Cn):null},at=At,ct=function(Vt,$t,Ce){return Ce};function pt(){}function xt(Zt){var Vt=Number(Zt);return typeof Vt=="number"&&!Number.isNaN(Vt)&&isFinite(Vt)&&Math.floor(Vt)===Vt}function bt(Zt,Vt,$t){var Ce=typeof Zt=="undefined"?Vt:Zt;return Math.floor(($t-1)/Ce)+1}var Rt=function(Vt){var $t=Vt.prefixCls,Ce=$t===void 0?"rc-pagination":$t,fe=Vt.selectPrefixCls,rn=fe===void 0?"rc-select":fe,tn=Vt.className,Bn=Vt.current,Fn=Vt.defaultCurrent,kn=Fn===void 0?1:Fn,Gn=Vt.total,ti=Gn===void 0?0:Gn,me=Vt.pageSize,oe=Vt.defaultPageSize,Cn=oe===void 0?10:oe,li=Vt.onChange,ai=li===void 0?pt:li,sn=Vt.hideOnSinglePage,Rn=Vt.align,ri=Vt.showPrevNextJumpers,Ui=ri===void 0?!0:ri,en=Vt.showQuickJumper,ei=Vt.showLessItems,Fe=Vt.showTitle,ci=Fe===void 0?!0:Fe,Ti=Vt.onShowSizeChange,jt=Ti===void 0?pt:Ti,Mt=Vt.locale,mt=Mt===void 0?Ee.Z:Mt,vt=Vt.style,Lt=Vt.totalBoundaryShowSizeChanger,Bt=Lt===void 0?50:Lt,_t=Vt.disabled,Le=Vt.simple,xe=Vt.showTotal,Xe=Vt.showSizeChanger,Me=Xe===void 0?ti>Bt:Xe,De=Vt.sizeChangerRender,Oe=Vt.pageSizeOptions,nn=Vt.itemRender,mn=nn===void 0?ct:nn,On=Vt.jumpPrevIcon,yn=Vt.jumpNextIcon,ui=Vt.prevIcon,oi=Vt.nextIcon,gi=Xt.useRef(null),bi=(0,Ae.Z)(10,{value:me,defaultValue:Cn}),cr=(0,de.Z)(bi,2),Ei=cr[0],Ri=cr[1],Ki=(0,Ae.Z)(1,{value:Bn,defaultValue:kn,postState:function(Yn){return Math.max(1,Math.min(Yn,bt(void 0,Ei,ti)))}}),_r=(0,de.Z)(Ki,2),Ji=_r[0],Er=_r[1],yr=Xt.useState(Ji),Vr=(0,de.Z)(yr,2),Zi=Vr[0],oo=Vr[1];(0,Xt.useEffect)(function(){oo(Ji)},[Ji]);var xo=ai!==pt,no="current"in Vt,br=Math.max(1,Ji-(ei?3:5)),uo=Math.min(bt(void 0,Ei,ti),Ji+(ei?3:5));function Tt(cn,Yn){var Xn=cn||Xt.createElement("button",{type:"button","aria-label":Yn,className:"".concat(Ce,"-item-link")});return typeof cn=="function"&&(Xn=Xt.createElement(cn,(0,Se.Z)({},Vt))),Xn}function Gi(cn){var Yn=cn.target.value,Xn=bt(void 0,Ei,ti),ki;return Yn===""?ki=Yn:Number.isNaN(Number(Yn))?ki=Zi:Yn>=Xn?ki=Xn:ki=Number(Yn),ki}function Vi(cn){return xt(cn)&&cn!==Ji&&xt(ti)&&ti>0}var xi=ti>Ei?en:!1;function Oi(cn){(cn.keyCode===re.Z.UP||cn.keyCode===re.Z.DOWN)&&cn.preventDefault()}function zi(cn){var Yn=Gi(cn);switch(Yn!==Zi&&oo(Yn),cn.keyCode){case re.Z.ENTER:Tr(Yn);break;case re.Z.UP:Tr(Yn-1);break;case re.Z.DOWN:Tr(Yn+1);break;default:break}}function or(cn){Tr(Gi(cn))}function Yr(cn){var Yn=bt(cn,Ei,ti),Xn=Ji>Yn&&Yn!==0?Yn:Ji;Ri(cn),oo(Xn),jt==null||jt(Ji,cn),Er(Xn),ai==null||ai(Xn,cn)}function Tr(cn){if(Vi(cn)&&!_t){var Yn=bt(void 0,Ei,ti),Xn=cn;return cn>Yn?Xn=Yn:cn<1&&(Xn=1),Xn!==Zi&&oo(Xn),Er(Xn),ai==null||ai(Xn,Ei),Xn}return Ji}var je=Ji>1,Je=Ji<bt(void 0,Ei,ti);function Ke(){je&&Tr(Ji-1)}function Ci(){Je&&Tr(Ji+1)}function Ne(){Tr(br)}function Qi(){Tr(uo)}function Hn(cn,Yn){if(cn.key==="Enter"||cn.charCode===re.Z.ENTER||cn.keyCode===re.Z.ENTER){for(var Xn=arguments.length,ki=new Array(Xn>2?Xn-2:0),ii=2;ii<Xn;ii++)ki[ii-2]=arguments[ii];Yn.apply(void 0,ki)}}function fi(cn){Hn(cn,Ke)}function $i(cn){Hn(cn,Ci)}function Mr(cn){Hn(cn,Ne)}function Br(cn){Hn(cn,Qi)}function te(cn){var Yn=mn(cn,"prev",Tt(ui,"prev page"));return Xt.isValidElement(Yn)?Xt.cloneElement(Yn,{disabled:!je}):Yn}function ke(cn){var Yn=mn(cn,"next",Tt(oi,"next page"));return Xt.isValidElement(Yn)?Xt.cloneElement(Yn,{disabled:!Je}):Yn}function zn(cn){(cn.type==="click"||cn.keyCode===re.Z.ENTER)&&Tr(Zi)}var ni=null,Ye=(0,Wt.Z)(Vt,{aria:!0,data:!0}),Kn=xe&&Xt.createElement("li",{className:"".concat(Ce,"-total-text")},xe(ti,[ti===0?0:(Ji-1)*Ei+1,Ji*Ei>ti?ti:Ji*Ei])),_n=null,We=bt(void 0,Ei,ti);if(sn&&ti<=Ei)return null;var on=[],An={rootPrefixCls:Ce,onClick:Tr,onKeyPress:Hn,showTitle:ci,itemRender:mn,page:-1},Nn=Ji-1>0?Ji-1:0,Vn=Ji+1<We?Ji+1:We,Yi=en&&en.goButton,Li=(0,ue.Z)(Le)==="object"?Le.readOnly:!Le,Bi=Yi,Ve=null;Le&&(Yi&&(typeof Yi=="boolean"?Bi=Xt.createElement("button",{type:"button",onClick:zn,onKeyUp:zn},mt.jump_to_confirm):Bi=Xt.createElement("span",{onClick:zn,onKeyUp:zn},Yi),Bi=Xt.createElement("li",{title:ci?"".concat(mt.jump_to).concat(Ji,"/").concat(We):null,className:"".concat(Ce,"-simple-pager")},Bi)),Ve=Xt.createElement("li",{title:ci?"".concat(Ji,"/").concat(We):null,className:"".concat(Ce,"-simple-pager")},Li?Zi:Xt.createElement("input",{type:"text","aria-label":mt.jump_to,value:Zi,disabled:_t,onKeyDown:Oi,onKeyUp:zi,onChange:zi,onBlur:or,size:3}),Xt.createElement("span",{className:"".concat(Ce,"-slash")},"/"),We));var tr=ei?1:2;if(We<=3+tr*2){We||on.push(Xt.createElement(at,(0,ee.Z)({},An,{key:"noPager",page:1,className:"".concat(Ce,"-item-disabled")})));for(var dr=1;dr<=We;dr+=1)on.push(Xt.createElement(at,(0,ee.Z)({},An,{key:dr,page:dr,active:Ji===dr})))}else{var qr=ei?mt.prev_3:mt.prev_5,hn=ei?mt.next_3:mt.next_5,Wn=mn(br,"jump-prev",Tt(On,"prev page")),Si=mn(uo,"jump-next",Tt(yn,"next page"));Ui&&(ni=Wn?Xt.createElement("li",{title:ci?qr:null,key:"prev",onClick:Ne,tabIndex:0,onKeyDown:Mr,className:ie()("".concat(Ce,"-jump-prev"),(0,Ct.Z)({},"".concat(Ce,"-jump-prev-custom-icon"),!!On))},Wn):null,_n=Si?Xt.createElement("li",{title:ci?hn:null,key:"next",onClick:Qi,tabIndex:0,onKeyDown:Br,className:ie()("".concat(Ce,"-jump-next"),(0,Ct.Z)({},"".concat(Ce,"-jump-next-custom-icon"),!!yn))},Si):null);var vi=Math.max(1,Ji-tr),mi=Math.min(Ji+tr,We);Ji-1<=tr&&(mi=1+tr*2),We-Ji<=tr&&(vi=We-tr*2);for(var Ii=vi;Ii<=mi;Ii+=1)on.push(Xt.createElement(at,(0,ee.Z)({},An,{key:Ii,page:Ii,active:Ji===Ii})));if(Ji-1>=tr*2&&Ji!==3&&(on[0]=Xt.cloneElement(on[0],{className:ie()("".concat(Ce,"-item-after-jump-prev"),on[0].props.className)}),on.unshift(ni)),We-Ji>=tr*2&&Ji!==We-2){var Wi=on[on.length-1];on[on.length-1]=Xt.cloneElement(Wi,{className:ie()("".concat(Ce,"-item-before-jump-next"),Wi.props.className)}),on.push(_n)}vi!==1&&on.unshift(Xt.createElement(at,(0,ee.Z)({},An,{key:1,page:1}))),mi!==We&&on.push(Xt.createElement(at,(0,ee.Z)({},An,{key:We,page:We})))}var Ar=te(Nn);if(Ar){var ae=!je||!We;Ar=Xt.createElement("li",{title:ci?mt.prev_page:null,onClick:Ke,tabIndex:ae?null:0,onKeyDown:fi,className:ie()("".concat(Ce,"-prev"),(0,Ct.Z)({},"".concat(Ce,"-disabled"),ae)),"aria-disabled":ae},Ar)}var ce=ke(Vn);if(ce){var ne,Ge;Le?(ne=!Je,Ge=je?0:null):(ne=!Je||!We,Ge=ne?null:0),ce=Xt.createElement("li",{title:ci?mt.next_page:null,onClick:Ci,tabIndex:Ge,onKeyDown:$i,className:ie()("".concat(Ce,"-next"),(0,Ct.Z)({},"".concat(Ce,"-disabled"),ne)),"aria-disabled":ne},ce)}var Be=ie()(Ce,tn,(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({},"".concat(Ce,"-start"),Rn==="start"),"".concat(Ce,"-center"),Rn==="center"),"".concat(Ce,"-end"),Rn==="end"),"".concat(Ce,"-simple"),Le),"".concat(Ce,"-disabled"),_t));return Xt.createElement("ul",(0,ee.Z)({className:Be,style:vt,ref:gi},Ye),Kn,Ar,Le?Ve:on,ce,Xt.createElement(et,{locale:mt,rootPrefixCls:Ce,disabled:_t,selectPrefixCls:rn,changeSize:Yr,pageSize:Ei,pageSizeOptions:Oe,quickGo:xi?Tr:null,goButton:Bi,showSizeChanger:Me,sizeChangerRender:De}))},Ot=Rt},738:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var Ct=Qt(14809),ee=Qt(4635),ue=Qt(50298),Se=Qt(62646),de=Qt(92310),Ht=Qt.n(de),ie=Qt(18929),Ae=Qt(10228),re=Qt(26112),Wt=Qt(59301);function Ie(xt,bt){var Rt=xt.disabled,Ot=xt.prefixCls,Zt=xt.character,Vt=xt.characterRender,$t=xt.index,Ce=xt.count,fe=xt.value,rn=xt.allowHalf,tn=xt.focused,Bn=xt.onHover,Fn=xt.onClick,kn=function(sn){Bn(sn,$t)},Gn=function(sn){Fn(sn,$t)},ti=function(sn){sn.keyCode===Ae.Z.ENTER&&Fn(sn,$t)},me=$t+1,oe=new Set([Ot]);fe===0&&$t===0&&tn?oe.add("".concat(Ot,"-focused")):rn&&fe+.5>=me&&fe<me?(oe.add("".concat(Ot,"-half")),oe.add("".concat(Ot,"-active")),tn&&oe.add("".concat(Ot,"-focused"))):(me<=fe?oe.add("".concat(Ot,"-full")):oe.add("".concat(Ot,"-zero")),me===fe&&tn&&oe.add("".concat(Ot,"-focused")));var Cn=typeof Zt=="function"?Zt(xt):Zt,li=Wt.createElement("li",{className:Ht()(Array.from(oe)),ref:bt},Wt.createElement("div",{onClick:Rt?null:Gn,onKeyDown:Rt?null:ti,onMouseMove:Rt?null:kn,role:"radio","aria-checked":fe>$t?"true":"false","aria-posinset":$t+1,"aria-setsize":Ce,tabIndex:Rt?-1:0},Wt.createElement("div",{className:"".concat(Ot,"-first")},Cn),Wt.createElement("div",{className:"".concat(Ot,"-second")},Cn)));return Vt&&(li=Vt(li,xt)),li}var Xt=Wt.forwardRef(Ie);function Ee(){var xt=Wt.useRef({});function bt(Ot){return xt.current[Ot]}function Rt(Ot){return function(Zt){xt.current[Ot]=Zt}}return[bt,Rt]}function It(xt){var bt=xt.pageXOffset,Rt="scrollLeft";if(typeof bt!="number"){var Ot=xt.document;bt=Ot.documentElement[Rt],typeof bt!="number"&&(bt=Ot.body[Rt])}return bt}function nt(xt){var bt,Rt,Ot=xt.ownerDocument,Zt=Ot.body,Vt=Ot&&Ot.documentElement,$t=xt.getBoundingClientRect();return bt=$t.left,Rt=$t.top,bt-=Vt.clientLeft||Zt.clientLeft||0,Rt-=Vt.clientTop||Zt.clientTop||0,{left:bt,top:Rt}}function et(xt){var bt=nt(xt),Rt=xt.ownerDocument,Ot=Rt.defaultView||Rt.parentWindow;return bt.left+=It(Ot),bt.left}var At=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function at(xt,bt){var Rt=xt.prefixCls,Ot=Rt===void 0?"rc-rate":Rt,Zt=xt.className,Vt=xt.defaultValue,$t=xt.value,Ce=xt.count,fe=Ce===void 0?5:Ce,rn=xt.allowHalf,tn=rn===void 0?!1:rn,Bn=xt.allowClear,Fn=Bn===void 0?!0:Bn,kn=xt.keyboard,Gn=kn===void 0?!0:kn,ti=xt.character,me=ti===void 0?"\u2605":ti,oe=xt.characterRender,Cn=xt.disabled,li=xt.direction,ai=li===void 0?"ltr":li,sn=xt.tabIndex,Rn=sn===void 0?0:sn,ri=xt.autoFocus,Ui=xt.onHoverChange,en=xt.onChange,ei=xt.onFocus,Fe=xt.onBlur,ci=xt.onKeyDown,Ti=xt.onMouseLeave,jt=(0,Se.Z)(xt,At),Mt=Ee(),mt=(0,ue.Z)(Mt,2),vt=mt[0],Lt=mt[1],Bt=Wt.useRef(null),_t=function(){if(!Cn){var br;(br=Bt.current)===null||br===void 0||br.focus()}};Wt.useImperativeHandle(bt,function(){return{focus:_t,blur:function(){if(!Cn){var br;(br=Bt.current)===null||br===void 0||br.blur()}}}});var Le=(0,ie.Z)(Vt||0,{value:$t}),xe=(0,ue.Z)(Le,2),Xe=xe[0],Me=xe[1],De=(0,ie.Z)(null),Oe=(0,ue.Z)(De,2),nn=Oe[0],mn=Oe[1],On=function(br,uo){var Tt=ai==="rtl",Gi=br+1;if(tn){var Vi=vt(br),xi=et(Vi),Oi=Vi.clientWidth;(Tt&&uo-xi>Oi/2||!Tt&&uo-xi<Oi/2)&&(Gi-=.5)}return Gi},yn=function(br){Me(br),en==null||en(br)},ui=Wt.useState(!1),oi=(0,ue.Z)(ui,2),gi=oi[0],bi=oi[1],cr=function(){bi(!0),ei==null||ei()},Ei=function(){bi(!1),Fe==null||Fe()},Ri=Wt.useState(null),Ki=(0,ue.Z)(Ri,2),_r=Ki[0],Ji=Ki[1],Er=function(br,uo){var Tt=On(uo,br.pageX);Tt!==nn&&(Ji(Tt),mn(null)),Ui==null||Ui(Tt)},yr=function(br){Cn||(Ji(null),mn(null),Ui==null||Ui(void 0)),br&&(Ti==null||Ti(br))},Vr=function(br,uo){var Tt=On(uo,br.pageX),Gi=!1;Fn&&(Gi=Tt===Xe),yr(),yn(Gi?0:Tt),mn(Gi?Tt:null)},Zi=function(br){var uo=br.keyCode,Tt=ai==="rtl",Gi=tn?.5:1;Gn&&(uo===Ae.Z.RIGHT&&Xe<fe&&!Tt?(yn(Xe+Gi),br.preventDefault()):uo===Ae.Z.LEFT&&Xe>0&&!Tt||uo===Ae.Z.RIGHT&&Xe>0&&Tt?(yn(Xe-Gi),br.preventDefault()):uo===Ae.Z.LEFT&&Xe<fe&&Tt&&(yn(Xe+Gi),br.preventDefault())),ci==null||ci(br)};Wt.useEffect(function(){ri&&!Cn&&_t()},[]);var oo=new Array(fe).fill(0).map(function(no,br){return Wt.createElement(Xt,{ref:Lt(br),index:br,count:fe,disabled:Cn,prefixCls:"".concat(Ot,"-star"),allowHalf:tn,value:_r===null?Xe:_r,onClick:Vr,onHover:Er,key:no||br,character:me,characterRender:oe,focused:gi})}),xo=Ht()(Ot,Zt,(0,ee.Z)((0,ee.Z)({},"".concat(Ot,"-disabled"),Cn),"".concat(Ot,"-rtl"),ai==="rtl"));return Wt.createElement("ul",(0,Ct.Z)({className:xo,onMouseLeave:yr,tabIndex:Cn?-1:Rn,onFocus:Cn?null:cr,onBlur:Cn?null:Ei,onKeyDown:Cn?null:Zi,ref:Bt},(0,re.Z)(jt,{aria:!0,data:!0,attr:!0})),oo)}var ct=Wt.forwardRef(at),pt=ct},6551:function(xn,ze,Qt){"use strict";Qt.d(ze,{ZP:function(){return ie}});var Ct=Qt(50298),ee=Qt(59301),ue=Qt(47273),Se=0,de=(0,ue.Z)();function Ht(){var Ae;return de?(Ae=Se,Se+=1):Ae="TEST_OR_SSR",Ae}function ie(Ae){var re=ee.useState(),Wt=(0,Ct.Z)(re,2),Ie=Wt[0],Xt=Wt[1];return ee.useEffect(function(){Xt("rc_select_".concat(Ht()))},[]),Ae||Ie}},37463:function(xn,ze,Qt){"use strict";Qt.d(ze,{Ac:function(){return bi},Xo:function(){return Ei},Wx:function(){return Ki},ZP:function(){return Br},lk:function(){return pt}});var Ct=Qt(14809),ee=Qt(95190),ue=Qt(4635),Se=Qt(20439),de=Qt(50298),Ht=Qt(62646),ie=Qt(93664),Ae=Qt(18929),re=Qt(48736),Wt=Qt(59301),Ie=Qt(92310),Xt=Qt.n(Ie),Ee=Qt(34280),It=Qt(49658),nt=Qt(8654),et=function(ke){var zn=ke.className,ni=ke.customizeIcon,Ye=ke.customizeIconProps,Kn=ke.children,_n=ke.onMouseDown,We=ke.onClick,on=typeof ni=="function"?ni(Ye):ni;return Wt.createElement("span",{className:zn,onMouseDown:function(Nn){Nn.preventDefault(),_n==null||_n(Nn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:We,"aria-hidden":!0},on!==void 0?on:Wt.createElement("span",{className:Xt()(zn.split(/\s+/).map(function(An){return"".concat(An,"-icon")}))},Kn))},At=et,at=function(ke,zn,ni,Ye,Kn){var _n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,We=arguments.length>6?arguments[6]:void 0,on=arguments.length>7?arguments[7]:void 0,An=Wt.useMemo(function(){if((0,ie.Z)(Ye)==="object")return Ye.clearIcon;if(Kn)return Kn},[Ye,Kn]),Nn=Wt.useMemo(function(){return!!(!_n&&Ye&&(ni.length||We)&&!(on==="combobox"&&We===""))},[Ye,_n,ni.length,We,on]);return{allowClear:Nn,clearIcon:Wt.createElement(At,{className:"".concat(ke,"-clear"),onMouseDown:zn,customizeIcon:An},"\xD7")}},ct=Wt.createContext(null);function pt(){return Wt.useContext(ct)}function xt(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ke=Wt.useState(!1),zn=(0,de.Z)(ke,2),ni=zn[0],Ye=zn[1],Kn=Wt.useRef(null),_n=function(){window.clearTimeout(Kn.current)};Wt.useEffect(function(){return _n},[]);var We=function(An,Nn){_n(),Kn.current=window.setTimeout(function(){Ye(An),Nn&&Nn()},te)};return[ni,We,_n]}function bt(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ke=Wt.useRef(null),zn=Wt.useRef(null);Wt.useEffect(function(){return function(){window.clearTimeout(zn.current)}},[]);function ni(Ye){(Ye||ke.current===null)&&(ke.current=Ye),window.clearTimeout(zn.current),zn.current=window.setTimeout(function(){ke.current=null},te)}return[function(){return ke.current},ni]}function Rt(te,ke,zn,ni){var Ye=Wt.useRef(null);Ye.current={open:ke,triggerOpen:zn,customizedTrigger:ni},Wt.useEffect(function(){function Kn(_n){var We;if(!((We=Ye.current)!==null&&We!==void 0&&We.customizedTrigger)){var on=_n.target;on.shadowRoot&&_n.composed&&(on=_n.composedPath()[0]||on),Ye.current.open&&te().filter(function(An){return An}).every(function(An){return!An.contains(on)&&An!==on})&&Ye.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Kn),function(){return window.removeEventListener("mousedown",Kn)}},[])}var Ot=Qt(10228);function Zt(te){return te&&![Ot.Z.ESC,Ot.Z.SHIFT,Ot.Z.BACKSPACE,Ot.Z.TAB,Ot.Z.WIN_KEY,Ot.Z.ALT,Ot.Z.META,Ot.Z.WIN_KEY_RIGHT,Ot.Z.CTRL,Ot.Z.SEMICOLON,Ot.Z.EQUALS,Ot.Z.CAPS_LOCK,Ot.Z.CONTEXT_MENU,Ot.Z.F1,Ot.Z.F2,Ot.Z.F3,Ot.Z.F4,Ot.Z.F5,Ot.Z.F6,Ot.Z.F7,Ot.Z.F8,Ot.Z.F9,Ot.Z.F10,Ot.Z.F11,Ot.Z.F12].includes(te)}var Vt=Qt(26112),$t=Qt(11780);function Ce(te,ke,zn){var ni=(0,Se.Z)((0,Se.Z)({},te),zn?ke:{});return Object.keys(ke).forEach(function(Ye){var Kn=ke[Ye];typeof Kn=="function"&&(ni[Ye]=function(){for(var _n,We=arguments.length,on=new Array(We),An=0;An<We;An++)on[An]=arguments[An];return Kn.apply(void 0,on),(_n=te[Ye])===null||_n===void 0?void 0:_n.call.apply(_n,[te].concat(on))})}),ni}var fe=Ce,rn=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],tn=function(ke,zn){var ni=ke.prefixCls,Ye=ke.id,Kn=ke.inputElement,_n=ke.autoFocus,We=ke.autoComplete,on=ke.editable,An=ke.activeDescendantId,Nn=ke.value,Vn=ke.open,Yi=ke.attrs,Li=(0,Ht.Z)(ke,rn),Bi=Kn||Wt.createElement("input",null),Ve=Bi,tr=Ve.ref,dr=Ve.props;return(0,re.Kp)(!("maxLength"in Bi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Bi=Wt.cloneElement(Bi,(0,Se.Z)((0,Se.Z)((0,Se.Z)({type:"search"},fe(Li,dr,!0)),{},{id:Ye,ref:(0,nt.sQ)(zn,tr),autoComplete:We||"off",autoFocus:_n,className:Xt()("".concat(ni,"-selection-search-input"),dr==null?void 0:dr.className),role:"combobox","aria-expanded":Vn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ye,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ye,"_list"),"aria-activedescendant":Vn?An:void 0},Yi),{},{value:on?Nn:"",readOnly:!on,unselectable:on?null:"on",style:(0,Se.Z)((0,Se.Z)({},dr.style),{},{opacity:on?null:0})})),Bi},Bn=Wt.forwardRef(tn),Fn=Bn;function kn(te){return Array.isArray(te)?te:te!==void 0?[te]:[]}var Gn=typeof window!="undefined"&&window.document&&window.document.documentElement,ti=Gn;function me(te){return te!=null}function oe(te){return!te&&te!==0}function Cn(te){return["string","number"].includes((0,ie.Z)(te))}function li(te){var ke=void 0;return te&&(Cn(te.title)?ke=te.title.toString():Cn(te.label)&&(ke=te.label.toString())),ke}function ai(te,ke){ti?Wt.useLayoutEffect(te,ke):Wt.useEffect(te,ke)}function sn(te){var ke;return(ke=te.key)!==null&&ke!==void 0?ke:te.value}var Rn=function(ke){ke.preventDefault(),ke.stopPropagation()},ri=function(ke){var zn=ke.id,ni=ke.prefixCls,Ye=ke.values,Kn=ke.open,_n=ke.searchValue,We=ke.autoClearSearchValue,on=ke.inputRef,An=ke.placeholder,Nn=ke.disabled,Vn=ke.mode,Yi=ke.showSearch,Li=ke.autoFocus,Bi=ke.autoComplete,Ve=ke.activeDescendantId,tr=ke.tabIndex,dr=ke.removeIcon,qr=ke.maxTagCount,hn=ke.maxTagTextLength,Wn=ke.maxTagPlaceholder,Si=Wn===void 0?function(fn){return"+ ".concat(fn.length," ...")}:Wn,vi=ke.tagRender,mi=ke.onToggleOpen,Ii=ke.onRemove,Wi=ke.onInputChange,Ar=ke.onInputPaste,ae=ke.onInputKeyDown,ce=ke.onInputMouseDown,ne=ke.onInputCompositionStart,Ge=ke.onInputCompositionEnd,Be=ke.onInputBlur,cn=Wt.useRef(null),Yn=(0,Wt.useState)(0),Xn=(0,de.Z)(Yn,2),ki=Xn[0],ii=Xn[1],be=(0,Wt.useState)(!1),yi=(0,de.Z)(be,2),Te=yi[0],un=yi[1],Ue="".concat(ni,"-selection"),Ut=Kn||Vn==="multiple"&&We===!1||Vn==="tags"?_n:"",pn=Vn==="tags"||Vn==="multiple"&&We===!1||Yi&&(Kn||Te);ai(function(){ii(cn.current.scrollWidth)},[Ut]);var Ln=function(an,gn,qn,Mn,Un){return Wt.createElement("span",{title:li(an),className:Xt()("".concat(Ue,"-item"),(0,ue.Z)({},"".concat(Ue,"-item-disabled"),qn))},Wt.createElement("span",{className:"".concat(Ue,"-item-content")},gn),Mn&&Wt.createElement(At,{className:"".concat(Ue,"-item-remove"),onMouseDown:Rn,onClick:Un,customizeIcon:dr},"\xD7"))},Ai=function(an,gn,qn,Mn,Un,ln){var si=function(er){Rn(er),mi(!Kn)};return Wt.createElement("span",{onMouseDown:si},vi({label:gn,value:an,disabled:qn,closable:Mn,onClose:Un,isMaxTag:!!ln}))},Zn=function(an){var gn=an.disabled,qn=an.label,Mn=an.value,Un=!Nn&&!gn,ln=qn;if(typeof hn=="number"&&(typeof qn=="string"||typeof qn=="number")){var si=String(ln);si.length>hn&&(ln="".concat(si.slice(0,hn),"..."))}var Mi=function(Hi){Hi&&Hi.stopPropagation(),Ii(an)};return typeof vi=="function"?Ai(Mn,ln,gn,Un,Mi):Ln(an,ln,gn,Un,Mi)},Tn=function(an){if(!Ye.length)return null;var gn=typeof Si=="function"?Si(an):Si;return typeof vi=="function"?Ai(void 0,gn,!1,!1,void 0,!0):Ln({title:gn},gn,!1)},dn=Wt.createElement("div",{className:"".concat(Ue,"-search"),style:{width:ki},onFocus:function(){un(!0)},onBlur:function(){un(!1)}},Wt.createElement(Fn,{ref:on,open:Kn,prefixCls:ni,id:zn,inputElement:null,disabled:Nn,autoFocus:Li,autoComplete:Bi,editable:pn,activeDescendantId:Ve,value:Ut,onKeyDown:ae,onMouseDown:ce,onChange:Wi,onPaste:Ar,onCompositionStart:ne,onCompositionEnd:Ge,onBlur:Be,tabIndex:tr,attrs:(0,Vt.Z)(ke,!0)}),Wt.createElement("span",{ref:cn,className:"".concat(Ue,"-search-mirror"),"aria-hidden":!0},Ut,"\xA0")),qe=Wt.createElement($t.Z,{prefixCls:"".concat(Ue,"-overflow"),data:Ye,renderItem:Zn,renderRest:Tn,suffix:dn,itemKey:sn,maxCount:qr});return Wt.createElement("span",{className:"".concat(Ue,"-wrap")},qe,!Ye.length&&!Ut&&Wt.createElement("span",{className:"".concat(Ue,"-placeholder")},An))},Ui=ri,en=function(ke){var zn=ke.inputElement,ni=ke.prefixCls,Ye=ke.id,Kn=ke.inputRef,_n=ke.disabled,We=ke.autoFocus,on=ke.autoComplete,An=ke.activeDescendantId,Nn=ke.mode,Vn=ke.open,Yi=ke.values,Li=ke.placeholder,Bi=ke.tabIndex,Ve=ke.showSearch,tr=ke.searchValue,dr=ke.activeValue,qr=ke.maxLength,hn=ke.onInputKeyDown,Wn=ke.onInputMouseDown,Si=ke.onInputChange,vi=ke.onInputPaste,mi=ke.onInputCompositionStart,Ii=ke.onInputCompositionEnd,Wi=ke.onInputBlur,Ar=ke.title,ae=Wt.useState(!1),ce=(0,de.Z)(ae,2),ne=ce[0],Ge=ce[1],Be=Nn==="combobox",cn=Be||Ve,Yn=Yi[0],Xn=tr||"";Be&&dr&&!ne&&(Xn=dr),Wt.useEffect(function(){Be&&Ge(!1)},[Be,dr]);var ki=Nn!=="combobox"&&!Vn&&!Ve?!1:!!Xn,ii=Ar===void 0?li(Yn):Ar,be=Wt.useMemo(function(){return Yn?null:Wt.createElement("span",{className:"".concat(ni,"-selection-placeholder"),style:ki?{visibility:"hidden"}:void 0},Li)},[Yn,ki,Li,ni]);return Wt.createElement("span",{className:"".concat(ni,"-selection-wrap")},Wt.createElement("span",{className:"".concat(ni,"-selection-search")},Wt.createElement(Fn,{ref:Kn,prefixCls:ni,id:Ye,open:Vn,inputElement:zn,disabled:_n,autoFocus:We,autoComplete:on,editable:cn,activeDescendantId:An,value:Xn,onKeyDown:hn,onMouseDown:Wn,onChange:function(Te){Ge(!0),Si(Te)},onPaste:vi,onCompositionStart:mi,onCompositionEnd:Ii,onBlur:Wi,tabIndex:Bi,attrs:(0,Vt.Z)(ke,!0),maxLength:Be?qr:void 0})),!Be&&Yn?Wt.createElement("span",{className:"".concat(ni,"-selection-item"),title:ii,style:ki?{visibility:"hidden"}:void 0},Yn.label):null,be)},ei=en,Fe=function(ke,zn){var ni=(0,Wt.useRef)(null),Ye=(0,Wt.useRef)(!1),Kn=ke.prefixCls,_n=ke.open,We=ke.mode,on=ke.showSearch,An=ke.tokenWithEnter,Nn=ke.disabled,Vn=ke.prefix,Yi=ke.autoClearSearchValue,Li=ke.onSearch,Bi=ke.onSearchSubmit,Ve=ke.onToggleOpen,tr=ke.onInputKeyDown,dr=ke.onInputBlur,qr=ke.domRef;Wt.useImperativeHandle(zn,function(){return{focus:function(ii){ni.current.focus(ii)},blur:function(){ni.current.blur()}}});var hn=bt(0),Wn=(0,de.Z)(hn,2),Si=Wn[0],vi=Wn[1],mi=function(ii){var be=ii.which,yi=ni.current instanceof HTMLTextAreaElement;!yi&&_n&&(be===Ot.Z.UP||be===Ot.Z.DOWN)&&ii.preventDefault(),tr&&tr(ii),be===Ot.Z.ENTER&&We==="tags"&&!Ye.current&&!_n&&(Bi==null||Bi(ii.target.value)),!(yi&&!_n&&~[Ot.Z.UP,Ot.Z.DOWN,Ot.Z.LEFT,Ot.Z.RIGHT].indexOf(be))&&Zt(be)&&Ve(!0)},Ii=function(){vi(!0)},Wi=(0,Wt.useRef)(null),Ar=function(ii){Li(ii,!0,Ye.current)!==!1&&Ve(!0)},ae=function(){Ye.current=!0},ce=function(ii){Ye.current=!1,We!=="combobox"&&Ar(ii.target.value)},ne=function(ii){var be=ii.target.value;if(An&&Wi.current&&/[\r\n]/.test(Wi.current)){var yi=Wi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");be=be.replace(yi,Wi.current)}Wi.current=null,Ar(be)},Ge=function(ii){var be=ii.clipboardData,yi=be==null?void 0:be.getData("text");Wi.current=yi||""},Be=function(ii){var be=ii.target;if(be!==ni.current){var yi=document.body.style.msTouchAction!==void 0;yi?setTimeout(function(){ni.current.focus()}):ni.current.focus()}},cn=function(ii){var be=Si();ii.target!==ni.current&&!be&&!(We==="combobox"&&Nn)&&ii.preventDefault(),(We!=="combobox"&&(!on||!be)||!_n)&&(_n&&Yi!==!1&&Li("",!0,!1),Ve())},Yn={inputRef:ni,onInputKeyDown:mi,onInputMouseDown:Ii,onInputChange:ne,onInputPaste:Ge,onInputCompositionStart:ae,onInputCompositionEnd:ce,onInputBlur:dr},Xn=We==="multiple"||We==="tags"?Wt.createElement(Ui,(0,Ct.Z)({},ke,Yn)):Wt.createElement(ei,(0,Ct.Z)({},ke,Yn));return Wt.createElement("div",{ref:qr,className:"".concat(Kn,"-selector"),onClick:Be,onMouseDown:cn},Vn&&Wt.createElement("div",{className:"".concat(Kn,"-prefix")},Vn),Xn)},ci=Wt.forwardRef(Fe),Ti=ci,jt=Qt(65352),Mt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],mt=function(ke){var zn=ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:zn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:zn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:zn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:zn,adjustY:1},htmlRegion:"scroll"}}},vt=function(ke,zn){var ni=ke.prefixCls,Ye=ke.disabled,Kn=ke.visible,_n=ke.children,We=ke.popupElement,on=ke.animation,An=ke.transitionName,Nn=ke.dropdownStyle,Vn=ke.dropdownClassName,Yi=ke.direction,Li=Yi===void 0?"ltr":Yi,Bi=ke.placement,Ve=ke.builtinPlacements,tr=ke.dropdownMatchSelectWidth,dr=ke.dropdownRender,qr=ke.dropdownAlign,hn=ke.getPopupContainer,Wn=ke.empty,Si=ke.getTriggerDOMNode,vi=ke.onPopupVisibleChange,mi=ke.onPopupMouseEnter,Ii=(0,Ht.Z)(ke,Mt),Wi="".concat(ni,"-dropdown"),Ar=We;dr&&(Ar=dr(We));var ae=Wt.useMemo(function(){return Ve||mt(tr)},[Ve,tr]),ce=on?"".concat(Wi,"-").concat(on):An,ne=typeof tr=="number",Ge=Wt.useMemo(function(){return ne?null:tr===!1?"minWidth":"width"},[tr,ne]),Be=Nn;ne&&(Be=(0,Se.Z)((0,Se.Z)({},Be),{},{width:tr}));var cn=Wt.useRef(null);return Wt.useImperativeHandle(zn,function(){return{getPopupElement:function(){var Xn;return(Xn=cn.current)===null||Xn===void 0?void 0:Xn.popupElement}}}),Wt.createElement(jt.Z,(0,Ct.Z)({},Ii,{showAction:vi?["click"]:[],hideAction:vi?["click"]:[],popupPlacement:Bi||(Li==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ae,prefixCls:Wi,popupTransitionName:ce,popup:Wt.createElement("div",{onMouseEnter:mi},Ar),ref:cn,stretch:Ge,popupAlign:qr,popupVisible:Kn,getPopupContainer:hn,popupClassName:Xt()(Vn,(0,ue.Z)({},"".concat(Wi,"-empty"),Wn)),popupStyle:Be,getTriggerDOMNode:Si,onPopupVisibleChange:vi}),_n)},Lt=Wt.forwardRef(vt),Bt=Lt,_t=Qt(21696);function Le(te,ke){var zn=te.key,ni;return"value"in te&&(ni=te.value),zn!=null?zn:ni!==void 0?ni:"rc-index-key-".concat(ke)}function xe(te){return typeof te!="undefined"&&!Number.isNaN(te)}function Xe(te,ke){var zn=te||{},ni=zn.label,Ye=zn.value,Kn=zn.options,_n=zn.groupLabel,We=ni||(ke?"children":"label");return{label:We,value:Ye||"value",options:Kn||"options",groupLabel:_n||We}}function Me(te){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},zn=ke.fieldNames,ni=ke.childrenAsData,Ye=[],Kn=Xe(zn,!1),_n=Kn.label,We=Kn.value,on=Kn.options,An=Kn.groupLabel;function Nn(Vn,Yi){Array.isArray(Vn)&&Vn.forEach(function(Li){if(Yi||!(on in Li)){var Bi=Li[We];Ye.push({key:Le(Li,Ye.length),groupOption:Yi,data:Li,label:Li[_n],value:Bi})}else{var Ve=Li[An];Ve===void 0&&ni&&(Ve=Li.label),Ye.push({key:Le(Li,Ye.length),group:!0,data:Li,label:Ve}),Nn(Li[on],!0)}})}return Nn(te,!1),Ye}function De(te){var ke=(0,Se.Z)({},te);return"props"in ke||Object.defineProperty(ke,"props",{get:function(){return(0,re.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ke}}),ke}var Oe=function(ke,zn,ni){if(!zn||!zn.length)return null;var Ye=!1,Kn=function We(on,An){var Nn=(0,_t.Z)(An),Vn=Nn[0],Yi=Nn.slice(1);if(!Vn)return[on];var Li=on.split(Vn);return Ye=Ye||Li.length>1,Li.reduce(function(Bi,Ve){return[].concat((0,ee.Z)(Bi),(0,ee.Z)(We(Ve,Yi)))},[]).filter(Boolean)},_n=Kn(ke,zn);return Ye?typeof ni!="undefined"?_n.slice(0,ni):_n:null},nn=Wt.createContext(null),mn=nn;function On(te){var ke=te.visible,zn=te.values;if(!ke)return null;var ni=50;return Wt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(zn.slice(0,ni).map(function(Ye){var Kn=Ye.label,_n=Ye.value;return["number","string"].includes((0,ie.Z)(Kn))?Kn:_n}).join(", ")),zn.length>ni?", ...":null)}var yn=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ui=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],oi=function(ke){return ke==="tags"||ke==="multiple"},gi=Wt.forwardRef(function(te,ke){var zn,ni=te.id,Ye=te.prefixCls,Kn=te.className,_n=te.showSearch,We=te.tagRender,on=te.direction,An=te.omitDomProps,Nn=te.displayValues,Vn=te.onDisplayValuesChange,Yi=te.emptyOptions,Li=te.notFoundContent,Bi=Li===void 0?"Not Found":Li,Ve=te.onClear,tr=te.mode,dr=te.disabled,qr=te.loading,hn=te.getInputElement,Wn=te.getRawInputElement,Si=te.open,vi=te.defaultOpen,mi=te.onDropdownVisibleChange,Ii=te.activeValue,Wi=te.onActiveValueChange,Ar=te.activeDescendantId,ae=te.searchValue,ce=te.autoClearSearchValue,ne=te.onSearch,Ge=te.onSearchSplit,Be=te.tokenSeparators,cn=te.allowClear,Yn=te.prefix,Xn=te.suffixIcon,ki=te.clearIcon,ii=te.OptionList,be=te.animation,yi=te.transitionName,Te=te.dropdownStyle,un=te.dropdownClassName,Ue=te.dropdownMatchSelectWidth,Ut=te.dropdownRender,pn=te.dropdownAlign,Ln=te.placement,Ai=te.builtinPlacements,Zn=te.getPopupContainer,Tn=te.showAction,dn=Tn===void 0?[]:Tn,qe=te.onFocus,fn=te.onBlur,an=te.onKeyUp,gn=te.onKeyDown,qn=te.onMouseDown,Mn=(0,Ht.Z)(te,yn),Un=oi(tr),ln=(_n!==void 0?_n:Un)||tr==="combobox",si=(0,Se.Z)({},Mn);ui.forEach(function(Qo){delete si[Qo]}),An==null||An.forEach(function(Qo){delete si[Qo]});var Mi=Wt.useState(!1),er=(0,de.Z)(Mi,2),Hi=er[0],Fr=er[1];Wt.useEffect(function(){Fr((0,It.Z)())},[]);var wr=Wt.useRef(null),Qr=Wt.useRef(null),Or=Wt.useRef(null),Lr=Wt.useRef(null),Xr=Wt.useRef(null),He=Wt.useRef(!1),xr=xt(),Ur=(0,de.Z)(xr,3),nr=Ur[0],kr=Ur[1],gr=Ur[2];Wt.useImperativeHandle(ke,function(){var Qo,Co;return{focus:(Qo=Lr.current)===null||Qo===void 0?void 0:Qo.focus,blur:(Co=Lr.current)===null||Co===void 0?void 0:Co.blur,scrollTo:function(Xi){var qs;return(qs=Xr.current)===null||qs===void 0?void 0:qs.scrollTo(Xi)},nativeElement:wr.current||Qr.current}});var co=Wt.useMemo(function(){var Qo;if(tr!=="combobox")return ae;var Co=(Qo=Nn[0])===null||Qo===void 0?void 0:Qo.value;return typeof Co=="string"||typeof Co=="number"?String(Co):""},[ae,tr,Nn]),io=tr==="combobox"&&typeof hn=="function"&&hn()||null,Pr=typeof Wn=="function"&&Wn(),vo=(0,nt.x1)(Qr,Pr==null||(zn=Pr.props)===null||zn===void 0?void 0:zn.ref),ks=Wt.useState(!1),us=(0,de.Z)(ks,2),Da=us[0],Ks=us[1];(0,Ee.Z)(function(){Ks(!0)},[]);var ar=(0,Ae.Z)(!1,{defaultValue:vi,value:Si}),rs=(0,de.Z)(ar,2),os=rs[0],ji=rs[1],Nr=Da?os:!1,so=!Bi&&Yi;(dr||so&&Nr&&tr==="combobox")&&(Nr=!1);var di=so?!1:Nr,ir=Wt.useCallback(function(Qo){var Co=Qo!==void 0?Qo:!Nr;dr||(ji(Co),Nr!==Co&&(mi==null||mi(Co)))},[dr,Nr,ji,mi]),fr=Wt.useMemo(function(){return(Be||[]).some(function(Qo){return[`
`,`\r
`].includes(Qo)})},[Be]),Rr=Wt.useContext(mn)||{},$r=Rr.maxCount,Bo=Rr.rawValues,rr=function(Co,cs,Xi){if(!(Un&&xe($r)&&(Bo==null?void 0:Bo.size)>=$r)){var qs=!0,we=Co;Wi==null||Wi(null);var bn=Oe(Co,Be,xe($r)?$r-Bo.size:void 0),El=Xi?null:bn;return tr!=="combobox"&&El&&(we="",Ge==null||Ge(El),ir(!1),qs=!1),ne&&co!==we&&ne(we,{source:cs?"typing":"effect"}),qs}},So=function(Co){!Co||!Co.trim()||ne(Co,{source:"submit"})};Wt.useEffect(function(){!Nr&&!Un&&tr!=="combobox"&&rr("",!1,!1)},[Nr]),Wt.useEffect(function(){os&&dr&&ji(!1),dr&&!He.current&&kr(!1)},[dr]);var ao=bt(),es=(0,de.Z)(ao,2),to=es[0],Do=es[1],Ro=Wt.useRef(!1),$o=function(Co){var cs=to(),Xi=Co.key,qs=Xi==="Enter";if(qs&&(tr!=="combobox"&&Co.preventDefault(),Nr||ir(!0)),Do(!!co),Xi==="Backspace"&&!cs&&Un&&!co&&Nn.length){for(var we=(0,ee.Z)(Nn),bn=null,El=we.length-1;El>=0;El-=1){var uu=we[El];if(!uu.disabled){we.splice(El,1),bn=uu;break}}bn&&Vn(we,{type:"remove",values:[bn]})}for(var is=arguments.length,ta=new Array(is>1?is-1:0),fl=1;fl<is;fl++)ta[fl-1]=arguments[fl];if(Nr&&(!qs||!Ro.current)){var Hl;qs&&(Ro.current=!0),(Hl=Xr.current)===null||Hl===void 0||Hl.onKeyDown.apply(Hl,[Co].concat(ta))}gn==null||gn.apply(void 0,[Co].concat(ta))},Ls=function(Co){for(var cs=arguments.length,Xi=new Array(cs>1?cs-1:0),qs=1;qs<cs;qs++)Xi[qs-1]=arguments[qs];if(Nr){var we;(we=Xr.current)===null||we===void 0||we.onKeyUp.apply(we,[Co].concat(Xi))}Co.key==="Enter"&&(Ro.current=!1),an==null||an.apply(void 0,[Co].concat(Xi))},Go=function(Co){var cs=Nn.filter(function(Xi){return Xi!==Co});Vn(cs,{type:"remove",values:[Co]})},la=function(){Ro.current=!1},yo=Wt.useRef(!1),da=function(){kr(!0),dr||(qe&&!yo.current&&qe.apply(void 0,arguments),dn.includes("focus")&&ir(!0)),yo.current=!0},za=function(){He.current=!0,kr(!1,function(){yo.current=!1,He.current=!1,ir(!1)}),!dr&&(co&&(tr==="tags"?ne(co,{source:"submit"}):tr==="multiple"&&ne("",{source:"blur"})),fn&&fn.apply(void 0,arguments))},Sa=[];Wt.useEffect(function(){return function(){Sa.forEach(function(Qo){return clearTimeout(Qo)}),Sa.splice(0,Sa.length)}},[]);var Yo=function(Co){var cs,Xi=Co.target,qs=(cs=Or.current)===null||cs===void 0?void 0:cs.getPopupElement();if(qs&&qs.contains(Xi)){var we=setTimeout(function(){var is=Sa.indexOf(we);if(is!==-1&&Sa.splice(is,1),gr(),!Hi&&!qs.contains(document.activeElement)){var ta;(ta=Lr.current)===null||ta===void 0||ta.focus()}});Sa.push(we)}for(var bn=arguments.length,El=new Array(bn>1?bn-1:0),uu=1;uu<bn;uu++)El[uu-1]=arguments[uu];qn==null||qn.apply(void 0,[Co].concat(El))},Ia=Wt.useState({}),dl=(0,de.Z)(Ia,2),AA=dl[1];function hA(){AA({})}var ws;Pr&&(ws=function(Co){ir(Co)}),Rt(function(){var Qo;return[wr.current,(Qo=Or.current)===null||Qo===void 0?void 0:Qo.getPopupElement()]},di,ir,!!Pr);var zu=Wt.useMemo(function(){return(0,Se.Z)((0,Se.Z)({},te),{},{notFoundContent:Bi,open:Nr,triggerOpen:di,id:ni,showSearch:ln,multiple:Un,toggleOpen:ir})},[te,Bi,di,Nr,ni,ln,Un,ir]),cA=!!Xn||qr,fa;cA&&(fa=Wt.createElement(At,{className:Xt()("".concat(Ye,"-arrow"),(0,ue.Z)({},"".concat(Ye,"-arrow-loading"),qr)),customizeIcon:Xn,customizeIconProps:{loading:qr,searchValue:co,open:Nr,focused:nr,showSearch:ln}}));var nl=function(){var Co;Ve==null||Ve(),(Co=Lr.current)===null||Co===void 0||Co.focus(),Vn([],{type:"clear",values:Nn}),rr("",!1,!1)},Ds=at(Ye,nl,Nn,cn,ki,dr,co,tr),ns=Ds.allowClear,ms=Ds.clearIcon,Js=Wt.createElement(ii,{ref:Xr}),lu=Xt()(Ye,Kn,(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat(Ye,"-focused"),nr),"".concat(Ye,"-multiple"),Un),"".concat(Ye,"-single"),!Un),"".concat(Ye,"-allow-clear"),cn),"".concat(Ye,"-show-arrow"),cA),"".concat(Ye,"-disabled"),dr),"".concat(Ye,"-loading"),qr),"".concat(Ye,"-open"),Nr),"".concat(Ye,"-customize-input"),io),"".concat(Ye,"-show-search"),ln)),ga=Wt.createElement(Bt,{ref:Or,disabled:dr,prefixCls:Ye,visible:di,popupElement:Js,animation:be,transitionName:yi,dropdownStyle:Te,dropdownClassName:un,direction:on,dropdownMatchSelectWidth:Ue,dropdownRender:Ut,dropdownAlign:pn,placement:Ln,builtinPlacements:Ai,getPopupContainer:Zn,empty:Yi,getTriggerDOMNode:function(Co){return Qr.current||Co},onPopupVisibleChange:ws,onPopupMouseEnter:hA},Pr?Wt.cloneElement(Pr,{ref:vo}):Wt.createElement(Ti,(0,Ct.Z)({},te,{domRef:Qr,prefixCls:Ye,inputElement:io,ref:Lr,id:ni,prefix:Yn,showSearch:ln,autoClearSearchValue:ce,mode:tr,activeDescendantId:Ar,tagRender:We,values:Nn,open:Nr,onToggleOpen:ir,activeValue:Ii,searchValue:co,onSearch:rr,onSearchSubmit:So,onRemove:Go,tokenWithEnter:fr,onInputBlur:la}))),Wo;return Pr?Wo=ga:Wo=Wt.createElement("div",(0,Ct.Z)({className:lu},si,{ref:wr,onMouseDown:Yo,onKeyDown:$o,onKeyUp:Ls,onFocus:da,onBlur:za}),Wt.createElement(On,{visible:nr&&!Nr,values:Nn}),ga,fa,ns&&ms),Wt.createElement(ct.Provider,{value:zu},Wo)}),bi=gi,cr=function(){return null};cr.isSelectOptGroup=!0;var Ei=cr,Ri=function(){return null};Ri.isSelectOption=!0;var Ki=Ri,_r=Qt(80547),Ji=Qt(2738),Er=Qt(65283);function yr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Vr=["disabled","title","children","style","className"];function Zi(te){return typeof te=="string"||typeof te=="number"}var oo=function(ke,zn){var ni=pt(),Ye=ni.prefixCls,Kn=ni.id,_n=ni.open,We=ni.multiple,on=ni.mode,An=ni.searchValue,Nn=ni.toggleOpen,Vn=ni.notFoundContent,Yi=ni.onPopupScroll,Li=Wt.useContext(mn),Bi=Li.maxCount,Ve=Li.flattenOptions,tr=Li.onActiveValue,dr=Li.defaultActiveFirstOption,qr=Li.onSelect,hn=Li.menuItemSelectedIcon,Wn=Li.rawValues,Si=Li.fieldNames,vi=Li.virtual,mi=Li.direction,Ii=Li.listHeight,Wi=Li.listItemHeight,Ar=Li.optionRender,ae="".concat(Ye,"-item"),ce=(0,_r.Z)(function(){return Ve},[_n,Ve],function(Tn,dn){return dn[0]&&Tn[1]!==dn[1]}),ne=Wt.useRef(null),Ge=Wt.useMemo(function(){return We&&xe(Bi)&&(Wn==null?void 0:Wn.size)>=Bi},[We,Bi,Wn==null?void 0:Wn.size]),Be=function(dn){dn.preventDefault()},cn=function(dn){var qe;(qe=ne.current)===null||qe===void 0||qe.scrollTo(typeof dn=="number"?{index:dn}:dn)},Yn=Wt.useCallback(function(Tn){return on==="combobox"?!1:Wn.has(Tn)},[on,(0,ee.Z)(Wn).toString(),Wn.size]),Xn=function(dn){for(var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,fn=ce.length,an=0;an<fn;an+=1){var gn=(dn+an*qe+fn)%fn,qn=ce[gn]||{},Mn=qn.group,Un=qn.data;if(!Mn&&!(Un!=null&&Un.disabled)&&(Yn(Un.value)||!Ge))return gn}return-1},ki=Wt.useState(function(){return Xn(0)}),ii=(0,de.Z)(ki,2),be=ii[0],yi=ii[1],Te=function(dn){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;yi(dn);var fn={source:qe?"keyboard":"mouse"},an=ce[dn];if(!an){tr(null,-1,fn);return}tr(an.value,dn,fn)};(0,Wt.useEffect)(function(){Te(dr!==!1?Xn(0):-1)},[ce.length,An]);var un=Wt.useCallback(function(Tn){return on==="combobox"?String(Tn).toLowerCase()===An.toLowerCase():Wn.has(Tn)},[on,An,(0,ee.Z)(Wn).toString(),Wn.size]);(0,Wt.useEffect)(function(){var Tn=setTimeout(function(){if(!We&&_n&&Wn.size===1){var qe=Array.from(Wn)[0],fn=ce.findIndex(function(an){var gn=an.data;return An?String(gn.value).startsWith(An):gn.value===qe});fn!==-1&&(Te(fn),cn(fn))}});if(_n){var dn;(dn=ne.current)===null||dn===void 0||dn.scrollTo(void 0)}return function(){return clearTimeout(Tn)}},[_n,An]);var Ue=function(dn){dn!==void 0&&qr(dn,{selected:!Wn.has(dn)}),We||Nn(!1)};if(Wt.useImperativeHandle(zn,function(){return{onKeyDown:function(dn){var qe=dn.which,fn=dn.ctrlKey;switch(qe){case Ot.Z.N:case Ot.Z.P:case Ot.Z.UP:case Ot.Z.DOWN:{var an=0;if(qe===Ot.Z.UP?an=-1:qe===Ot.Z.DOWN?an=1:yr()&&fn&&(qe===Ot.Z.N?an=1:qe===Ot.Z.P&&(an=-1)),an!==0){var gn=Xn(be+an,an);cn(gn),Te(gn,!0)}break}case Ot.Z.TAB:case Ot.Z.ENTER:{var qn,Mn=ce[be];Mn&&!(Mn!=null&&(qn=Mn.data)!==null&&qn!==void 0&&qn.disabled)&&!Ge?Ue(Mn.value):Ue(void 0),_n&&dn.preventDefault();break}case Ot.Z.ESC:Nn(!1),_n&&dn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(dn){cn(dn)}}}),ce.length===0)return Wt.createElement("div",{role:"listbox",id:"".concat(Kn,"_list"),className:"".concat(ae,"-empty"),onMouseDown:Be},Vn);var Ut=Object.keys(Si).map(function(Tn){return Si[Tn]}),pn=function(dn){return dn.label};function Ln(Tn,dn){var qe=Tn.group;return{role:qe?"presentation":"option",id:"".concat(Kn,"_list_").concat(dn)}}var Ai=function(dn){var qe=ce[dn];if(!qe)return null;var fn=qe.data||{},an=fn.value,gn=qe.group,qn=(0,Vt.Z)(fn,!0),Mn=pn(qe);return qe?Wt.createElement("div",(0,Ct.Z)({"aria-label":typeof Mn=="string"&&!gn?Mn:null},qn,{key:dn},Ln(qe,dn),{"aria-selected":un(an)}),an):null},Zn={role:"listbox",id:"".concat(Kn,"_list")};return Wt.createElement(Wt.Fragment,null,vi&&Wt.createElement("div",(0,Ct.Z)({},Zn,{style:{height:0,width:0,overflow:"hidden"}}),Ai(be-1),Ai(be),Ai(be+1)),Wt.createElement(Er.Z,{itemKey:"key",ref:ne,data:ce,height:Ii,itemHeight:Wi,fullHeight:!1,onMouseDown:Be,onScroll:Yi,virtual:vi,direction:mi,innerProps:vi?null:Zn},function(Tn,dn){var qe=Tn.group,fn=Tn.groupOption,an=Tn.data,gn=Tn.label,qn=Tn.value,Mn=an.key;if(qe){var Un,ln=(Un=an.title)!==null&&Un!==void 0?Un:Zi(gn)?gn.toString():void 0;return Wt.createElement("div",{className:Xt()(ae,"".concat(ae,"-group"),an.className),title:ln},gn!==void 0?gn:Mn)}var si=an.disabled,Mi=an.title,er=an.children,Hi=an.style,Fr=an.className,wr=(0,Ht.Z)(an,Vr),Qr=(0,Ji.Z)(wr,Ut),Or=Yn(qn),Lr=si||!Or&&Ge,Xr="".concat(ae,"-option"),He=Xt()(ae,Xr,Fr,(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat(Xr,"-grouped"),fn),"".concat(Xr,"-active"),be===dn&&!Lr),"".concat(Xr,"-disabled"),Lr),"".concat(Xr,"-selected"),Or)),xr=pn(Tn),Ur=!hn||typeof hn=="function"||Or,nr=typeof xr=="number"?xr:xr||qn,kr=Zi(nr)?nr.toString():void 0;return Mi!==void 0&&(kr=Mi),Wt.createElement("div",(0,Ct.Z)({},(0,Vt.Z)(Qr),vi?{}:Ln(Tn,dn),{"aria-selected":un(qn),className:He,title:kr,onMouseMove:function(){be===dn||Lr||Te(dn)},onClick:function(){Lr||Ue(qn)},style:Hi}),Wt.createElement("div",{className:"".concat(Xr,"-content")},typeof Ar=="function"?Ar(Tn,{index:dn}):nr),Wt.isValidElement(hn)||Or,Ur&&Wt.createElement(At,{className:"".concat(ae,"-option-state"),customizeIcon:hn,customizeIconProps:{value:qn,disabled:Lr,isSelected:Or}},Or?"\u2713":null))}))},xo=Wt.forwardRef(oo),no=xo,br=function(te,ke){var zn=Wt.useRef({values:new Map,options:new Map}),ni=Wt.useMemo(function(){var Kn=zn.current,_n=Kn.values,We=Kn.options,on=te.map(function(Vn){if(Vn.label===void 0){var Yi;return(0,Se.Z)((0,Se.Z)({},Vn),{},{label:(Yi=_n.get(Vn.value))===null||Yi===void 0?void 0:Yi.label})}return Vn}),An=new Map,Nn=new Map;return on.forEach(function(Vn){An.set(Vn.value,Vn),Nn.set(Vn.value,ke.get(Vn.value)||We.get(Vn.value))}),zn.current.values=An,zn.current.options=Nn,on},[te,ke]),Ye=Wt.useCallback(function(Kn){return ke.get(Kn)||zn.current.options.get(Kn)},[ke]);return[ni,Ye]};function uo(te,ke){return kn(te).join("").toUpperCase().includes(ke)}var Tt=function(te,ke,zn,ni,Ye){return Wt.useMemo(function(){if(!zn||ni===!1)return te;var Kn=ke.options,_n=ke.label,We=ke.value,on=[],An=typeof ni=="function",Nn=zn.toUpperCase(),Vn=An?ni:function(Li,Bi){return Ye?uo(Bi[Ye],Nn):Bi[Kn]?uo(Bi[_n!=="children"?_n:"label"],Nn):uo(Bi[We],Nn)},Yi=An?function(Li){return De(Li)}:function(Li){return Li};return te.forEach(function(Li){if(Li[Kn]){var Bi=Vn(zn,Yi(Li));if(Bi)on.push(Li);else{var Ve=Li[Kn].filter(function(tr){return Vn(zn,Yi(tr))});Ve.length&&on.push((0,Se.Z)((0,Se.Z)({},Li),{},(0,ue.Z)({},Kn,Ve)))}return}Vn(zn,Yi(Li))&&on.push(Li)}),on},[te,ni,Ye,zn,ke])},Gi=Qt(6551),Vi=Qt(11592),xi=["children","value"],Oi=["children"];function zi(te){var ke=te,zn=ke.key,ni=ke.props,Ye=ni.children,Kn=ni.value,_n=(0,Ht.Z)(ni,xi);return(0,Se.Z)({key:zn,value:Kn!==void 0?Kn:zn,children:Ye},_n)}function or(te){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Vi.Z)(te).map(function(zn,ni){if(!Wt.isValidElement(zn)||!zn.type)return null;var Ye=zn,Kn=Ye.type.isSelectOptGroup,_n=Ye.key,We=Ye.props,on=We.children,An=(0,Ht.Z)(We,Oi);return ke||!Kn?zi(zn):(0,Se.Z)((0,Se.Z)({key:"__RC_SELECT_GRP__".concat(_n===null?ni:_n,"__"),label:_n},An),{},{options:or(on)})}).filter(function(zn){return zn})}var Yr=function(ke,zn,ni,Ye,Kn){return Wt.useMemo(function(){var _n=ke,We=!ke;We&&(_n=or(zn));var on=new Map,An=new Map,Nn=function(Li,Bi,Ve){Ve&&typeof Ve=="string"&&Li.set(Bi[Ve],Bi)},Vn=function Yi(Li){for(var Bi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ve=0;Ve<Li.length;Ve+=1){var tr=Li[Ve];!tr[ni.options]||Bi?(on.set(tr[ni.value],tr),Nn(An,tr,ni.label),Nn(An,tr,Ye),Nn(An,tr,Kn)):Yi(tr[ni.options],!0)}};return Vn(_n),{options:_n,valueOptions:on,labelOptions:An}},[ke,zn,ni,Ye,Kn])},Tr=Yr;function je(te){var ke=Wt.useRef();ke.current=te;var zn=Wt.useCallback(function(){return ke.current.apply(ke,arguments)},[]);return zn}function Je(te){var ke=te.mode,zn=te.options,ni=te.children,Ye=te.backfill,Kn=te.allowClear,_n=te.placeholder,We=te.getInputElement,on=te.showSearch,An=te.onSearch,Nn=te.defaultOpen,Vn=te.autoFocus,Yi=te.labelInValue,Li=te.value,Bi=te.inputValue,Ve=te.optionLabelProp,tr=isMultiple(ke),dr=on!==void 0?on:tr||ke==="combobox",qr=zn||convertChildrenToData(ni);if(warning(ke!=="tags"||qr.every(function(vi){return!vi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ke==="tags"||ke==="combobox"){var hn=qr.some(function(vi){return vi.options?vi.options.some(function(mi){return typeof("value"in mi?mi.value:mi.key)=="number"}):typeof("value"in vi?vi.value:vi.key)=="number"});warning(!hn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ke!=="combobox"||!Ve,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ke==="combobox"||!Ye,"`backfill` only works with `combobox` mode."),warning(ke==="combobox"||!We,"`getInputElement` only work with `combobox` mode."),noteOnce(ke!=="combobox"||!We||!Kn||!_n,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),An&&!dr&&ke!=="combobox"&&ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Nn||Vn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Li!=null){var Wn=toArray(Li);warning(!Yi||Wn.every(function(vi){return _typeof(vi)==="object"&&("key"in vi||"value"in vi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!tr||Array.isArray(Li),"`value` should be array when `mode` is `multiple` or `tags`")}if(ni){var Si=null;toNodeArray(ni).some(function(vi){if(!React.isValidElement(vi)||!vi.type)return!1;var mi=vi,Ii=mi.type;if(Ii.isSelectOption)return!1;if(Ii.isSelectOptGroup){var Wi=toNodeArray(vi.props.children).every(function(Ar){return!React.isValidElement(Ar)||!vi.type||Ar.type.isSelectOption?!0:(Si=Ar.type,!1)});return!Wi}return Si=Ii,!0}),Si&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Si.displayName||Si.name||Si,"`.")),warning(Bi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ke(te,ke){if(te){var zn=function ni(Ye){for(var Kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_n=0;_n<Ye.length;_n++){var We=Ye[_n];if(We[ke==null?void 0:ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Kn&&Array.isArray(We[ke==null?void 0:ke.options])&&ni(We[ke==null?void 0:ke.options],!0))break}};zn(te)}}var Ci=null,Ne=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Qi=["inputValue"];function Hn(te){return!te||(0,ie.Z)(te)!=="object"}var fi=Wt.forwardRef(function(te,ke){var zn=te.id,ni=te.mode,Ye=te.prefixCls,Kn=Ye===void 0?"rc-select":Ye,_n=te.backfill,We=te.fieldNames,on=te.inputValue,An=te.searchValue,Nn=te.onSearch,Vn=te.autoClearSearchValue,Yi=Vn===void 0?!0:Vn,Li=te.onSelect,Bi=te.onDeselect,Ve=te.dropdownMatchSelectWidth,tr=Ve===void 0?!0:Ve,dr=te.filterOption,qr=te.filterSort,hn=te.optionFilterProp,Wn=te.optionLabelProp,Si=te.options,vi=te.optionRender,mi=te.children,Ii=te.defaultActiveFirstOption,Wi=te.menuItemSelectedIcon,Ar=te.virtual,ae=te.direction,ce=te.listHeight,ne=ce===void 0?200:ce,Ge=te.listItemHeight,Be=Ge===void 0?20:Ge,cn=te.labelRender,Yn=te.value,Xn=te.defaultValue,ki=te.labelInValue,ii=te.onChange,be=te.maxCount,yi=(0,Ht.Z)(te,Ne),Te=(0,Gi.ZP)(zn),un=oi(ni),Ue=!!(!Si&&mi),Ut=Wt.useMemo(function(){return dr===void 0&&ni==="combobox"?!1:dr},[dr,ni]),pn=Wt.useMemo(function(){return Xe(We,Ue)},[JSON.stringify(We),Ue]),Ln=(0,Ae.Z)("",{value:An!==void 0?An:on,postState:function(fr){return fr||""}}),Ai=(0,de.Z)(Ln,2),Zn=Ai[0],Tn=Ai[1],dn=Tr(Si,mi,pn,hn,Wn),qe=dn.valueOptions,fn=dn.labelOptions,an=dn.options,gn=Wt.useCallback(function(ir){var fr=kn(ir);return fr.map(function(Rr){var $r,Bo,rr,So,ao;if(Hn(Rr))$r=Rr;else{var es;rr=Rr.key,Bo=Rr.label,$r=(es=Rr.value)!==null&&es!==void 0?es:rr}var to=qe.get($r);if(to){var Do;if(Bo===void 0&&(Bo=to==null?void 0:to[Wn||pn.label]),rr===void 0&&(rr=(Do=to==null?void 0:to.key)!==null&&Do!==void 0?Do:$r),So=to==null?void 0:to.disabled,ao=to==null?void 0:to.title,0)var Ro}return{label:Bo,value:$r,key:rr,disabled:So,title:ao}})},[pn,Wn,qe]),qn=(0,Ae.Z)(Xn,{value:Yn}),Mn=(0,de.Z)(qn,2),Un=Mn[0],ln=Mn[1],si=Wt.useMemo(function(){var ir,fr=un&&Un===null?[]:Un,Rr=gn(fr);return ni==="combobox"&&oe((ir=Rr[0])===null||ir===void 0?void 0:ir.value)?[]:Rr},[Un,gn,ni,un]),Mi=br(si,qe),er=(0,de.Z)(Mi,2),Hi=er[0],Fr=er[1],wr=Wt.useMemo(function(){if(!ni&&Hi.length===1){var ir=Hi[0];if(ir.value===null&&(ir.label===null||ir.label===void 0))return[]}return Hi.map(function(fr){var Rr;return(0,Se.Z)((0,Se.Z)({},fr),{},{label:(Rr=typeof cn=="function"?cn(fr):fr.label)!==null&&Rr!==void 0?Rr:fr.value})})},[ni,Hi,cn]),Qr=Wt.useMemo(function(){return new Set(Hi.map(function(ir){return ir.value}))},[Hi]);Wt.useEffect(function(){if(ni==="combobox"){var ir,fr=(ir=Hi[0])===null||ir===void 0?void 0:ir.value;Tn(me(fr)?String(fr):"")}},[Hi]);var Or=je(function(ir,fr){var Rr=fr!=null?fr:ir;return(0,ue.Z)((0,ue.Z)({},pn.value,ir),pn.label,Rr)}),Lr=Wt.useMemo(function(){if(ni!=="tags")return an;var ir=(0,ee.Z)(an),fr=function($r){return qe.has($r)};return(0,ee.Z)(Hi).sort(function(Rr,$r){return Rr.value<$r.value?-1:1}).forEach(function(Rr){var $r=Rr.value;fr($r)||ir.push(Or($r,Rr.label))}),ir},[Or,an,qe,Hi,ni]),Xr=Tt(Lr,pn,Zn,Ut,hn),He=Wt.useMemo(function(){return ni!=="tags"||!Zn||Xr.some(function(ir){return ir[hn||"value"]===Zn})||Xr.some(function(ir){return ir[pn.value]===Zn})?Xr:[Or(Zn)].concat((0,ee.Z)(Xr))},[Or,hn,ni,Xr,Zn,pn]),xr=function ir(fr){var Rr=(0,ee.Z)(fr).sort(function($r,Bo){return qr($r,Bo,{searchValue:Zn})});return Rr.map(function($r){return Array.isArray($r.options)?(0,Se.Z)((0,Se.Z)({},$r),{},{options:$r.options.length>0?ir($r.options):$r.options}):$r})},Ur=Wt.useMemo(function(){return qr?xr(He):He},[He,qr,Zn]),nr=Wt.useMemo(function(){return Me(Ur,{fieldNames:pn,childrenAsData:Ue})},[Ur,pn,Ue]),kr=function(fr){var Rr=gn(fr);if(ln(Rr),ii&&(Rr.length!==Hi.length||Rr.some(function(rr,So){var ao;return((ao=Hi[So])===null||ao===void 0?void 0:ao.value)!==(rr==null?void 0:rr.value)}))){var $r=ki?Rr:Rr.map(function(rr){return rr.value}),Bo=Rr.map(function(rr){return De(Fr(rr.value))});ii(un?$r:$r[0],un?Bo:Bo[0])}},gr=Wt.useState(null),co=(0,de.Z)(gr,2),io=co[0],Pr=co[1],vo=Wt.useState(0),ks=(0,de.Z)(vo,2),us=ks[0],Da=ks[1],Ks=Ii!==void 0?Ii:ni!=="combobox",ar=Wt.useCallback(function(ir,fr){var Rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$r=Rr.source,Bo=$r===void 0?"keyboard":$r;Da(fr),_n&&ni==="combobox"&&ir!==null&&Bo==="keyboard"&&Pr(String(ir))},[_n,ni]),rs=function(fr,Rr,$r){var Bo=function(){var Go,la=Fr(fr);return[ki?{label:la==null?void 0:la[pn.label],value:fr,key:(Go=la==null?void 0:la.key)!==null&&Go!==void 0?Go:fr}:fr,De(la)]};if(Rr&&Li){var rr=Bo(),So=(0,de.Z)(rr,2),ao=So[0],es=So[1];Li(ao,es)}else if(!Rr&&Bi&&$r!=="clear"){var to=Bo(),Do=(0,de.Z)(to,2),Ro=Do[0],$o=Do[1];Bi(Ro,$o)}},os=je(function(ir,fr){var Rr,$r=un?fr.selected:!0;$r?Rr=un?[].concat((0,ee.Z)(Hi),[ir]):[ir]:Rr=Hi.filter(function(Bo){return Bo.value!==ir}),kr(Rr),rs(ir,$r),ni==="combobox"?Pr(""):(!oi||Yi)&&(Tn(""),Pr(""))}),ji=function(fr,Rr){kr(fr);var $r=Rr.type,Bo=Rr.values;($r==="remove"||$r==="clear")&&Bo.forEach(function(rr){rs(rr.value,!1,$r)})},Nr=function(fr,Rr){if(Tn(fr),Pr(null),Rr.source==="submit"){var $r=(fr||"").trim();if($r){var Bo=Array.from(new Set([].concat((0,ee.Z)(Qr),[$r])));kr(Bo),rs($r,!0),Tn("")}return}Rr.source!=="blur"&&(ni==="combobox"&&kr(fr),Nn==null||Nn(fr))},so=function(fr){var Rr=fr;ni!=="tags"&&(Rr=fr.map(function(Bo){var rr=fn.get(Bo);return rr==null?void 0:rr.value}).filter(function(Bo){return Bo!==void 0}));var $r=Array.from(new Set([].concat((0,ee.Z)(Qr),(0,ee.Z)(Rr))));kr($r),$r.forEach(function(Bo){rs(Bo,!0)})},di=Wt.useMemo(function(){var ir=Ar!==!1&&tr!==!1;return(0,Se.Z)((0,Se.Z)({},dn),{},{flattenOptions:nr,onActiveValue:ar,defaultActiveFirstOption:Ks,onSelect:os,menuItemSelectedIcon:Wi,rawValues:Qr,fieldNames:pn,virtual:ir,direction:ae,listHeight:ne,listItemHeight:Be,childrenAsData:Ue,maxCount:be,optionRender:vi})},[be,dn,nr,ar,Ks,os,Wi,Qr,pn,Ar,tr,ae,ne,Be,Ue,vi]);return Wt.createElement(mn.Provider,{value:di},Wt.createElement(bi,(0,Ct.Z)({},yi,{id:Te,prefixCls:Kn,ref:ke,omitDomProps:Qi,mode:ni,displayValues:wr,onDisplayValuesChange:ji,direction:ae,searchValue:Zn,onSearch:Nr,autoClearSearchValue:Yi,onSearchSplit:so,dropdownMatchSelectWidth:tr,OptionList:no,emptyOptions:!nr.length,activeValue:io,activeDescendantId:"".concat(Te,"_list_").concat(us)})))}),$i=fi;$i.Option=Ki,$i.OptGroup=Ei;var Mr=$i,Br=Mr},63158:function(xn,ze,Qt){"use strict";var Ct=Qt(14809),ee=Qt(4635),ue=Qt(50298),Se=Qt(62646),de=Qt(59301),Ht=Qt(92310),ie=Qt.n(Ht),Ae=Qt(18929),re=Qt(10228),Wt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ie=de.forwardRef(function(Xt,Ee){var It,nt=Xt.prefixCls,et=nt===void 0?"rc-switch":nt,At=Xt.className,at=Xt.checked,ct=Xt.defaultChecked,pt=Xt.disabled,xt=Xt.loadingIcon,bt=Xt.checkedChildren,Rt=Xt.unCheckedChildren,Ot=Xt.onClick,Zt=Xt.onChange,Vt=Xt.onKeyDown,$t=(0,Se.Z)(Xt,Wt),Ce=(0,Ae.Z)(!1,{value:at,defaultValue:ct}),fe=(0,ue.Z)(Ce,2),rn=fe[0],tn=fe[1];function Bn(ti,me){var oe=rn;return pt||(oe=ti,tn(oe),Zt==null||Zt(oe,me)),oe}function Fn(ti){ti.which===re.Z.LEFT?Bn(!1,ti):ti.which===re.Z.RIGHT&&Bn(!0,ti),Vt==null||Vt(ti)}function kn(ti){var me=Bn(!rn,ti);Ot==null||Ot(me,ti)}var Gn=ie()(et,At,(It={},(0,ee.Z)(It,"".concat(et,"-checked"),rn),(0,ee.Z)(It,"".concat(et,"-disabled"),pt),It));return de.createElement("button",(0,Ct.Z)({},$t,{type:"button",role:"switch","aria-checked":rn,disabled:pt,className:Gn,ref:Ee,onKeyDown:Fn,onClick:kn}),xt,de.createElement("span",{className:"".concat(et,"-inner")},de.createElement("span",{className:"".concat(et,"-inner-checked")},bt),de.createElement("span",{className:"".concat(et,"-inner-unchecked")},Rt)))});Ie.displayName="Switch",ze.Z=Ie},86351:function(xn,ze,Qt){"use strict";Qt.d(ze,{R:function(){return ee},w:function(){return Ct}});var Ct={},ee="rc-table-internal-hook"},97347:function(xn,ze,Qt){"use strict";Qt.d(ze,{L:function(){return et},Z:function(){return xt}});var Ct=Qt(50298),ee=Qt(4635),ue=Qt(95190),Se=Qt(93664),de=Qt(20439),Ht=Qt(62646),ie=Qt(11592),Ae=Qt(48736),re=Qt(59301),Wt=Qt(86351),Ie=Qt(54451);function Xt(bt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Rt=="number"?Rt:Rt.endsWith("%")?bt*parseFloat(Rt)/100:null}function Ee(bt,Rt,Ot){return re.useMemo(function(){if(Rt&&Rt>0){var Zt=0,Vt=0;bt.forEach(function(kn){var Gn=Xt(Rt,kn.width);Gn?Zt+=Gn:Vt+=1});var $t=Math.max(Rt,Ot),Ce=Math.max($t-Zt,Vt),fe=Vt,rn=Ce/Vt,tn=0,Bn=bt.map(function(kn){var Gn=(0,de.Z)({},kn),ti=Xt(Rt,Gn.width);if(ti)Gn.width=ti;else{var me=Math.floor(rn);Gn.width=fe===1?Ce:me,Ce-=me,fe-=1}return tn+=Gn.width,Gn});if(tn<$t){var Fn=$t/tn;Ce=$t,Bn.forEach(function(kn,Gn){var ti=Math.floor(kn.width*Fn);kn.width=Gn===Bn.length-1?Ce:ti,Ce-=ti})}return[Bn,Math.max(tn,$t)]}return[bt,Rt]},[bt,Rt,Ot])}var It=["children"],nt=["fixed"];function et(bt){return(0,ie.Z)(bt).filter(function(Rt){return re.isValidElement(Rt)}).map(function(Rt){var Ot=Rt.key,Zt=Rt.props,Vt=Zt.children,$t=(0,Ht.Z)(Zt,It),Ce=(0,de.Z)({key:Ot},$t);return Vt&&(Ce.children=et(Vt)),Ce})}function At(bt){return bt.filter(function(Rt){return Rt&&(0,Se.Z)(Rt)==="object"&&!Rt.hidden}).map(function(Rt){var Ot=Rt.children;return Ot&&Ot.length>0?(0,de.Z)((0,de.Z)({},Rt),{},{children:At(Ot)}):Rt})}function at(bt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return bt.filter(function(Ot){return Ot&&(0,Se.Z)(Ot)==="object"}).reduce(function(Ot,Zt,Vt){var $t=Zt.fixed,Ce=$t===!0?"left":$t,fe="".concat(Rt,"-").concat(Vt),rn=Zt.children;return rn&&rn.length>0?[].concat((0,ue.Z)(Ot),(0,ue.Z)(at(rn,fe).map(function(tn){return(0,de.Z)({fixed:Ce},tn)}))):[].concat((0,ue.Z)(Ot),[(0,de.Z)((0,de.Z)({key:fe},Zt),{},{fixed:Ce})])},[])}function ct(bt){return bt.map(function(Rt){var Ot=Rt.fixed,Zt=(0,Ht.Z)(Rt,nt),Vt=Ot;return Ot==="left"?Vt="right":Ot==="right"&&(Vt="left"),(0,de.Z)({fixed:Vt},Zt)})}function pt(bt,Rt){var Ot=bt.prefixCls,Zt=bt.columns,Vt=bt.children,$t=bt.expandable,Ce=bt.expandedKeys,fe=bt.columnTitle,rn=bt.getRowKey,tn=bt.onTriggerExpand,Bn=bt.expandIcon,Fn=bt.rowExpandable,kn=bt.expandIconColumnIndex,Gn=bt.direction,ti=bt.expandRowByClick,me=bt.columnWidth,oe=bt.fixed,Cn=bt.scrollWidth,li=bt.clientWidth,ai=re.useMemo(function(){var Ti=Zt||et(Vt)||[];return At(Ti.slice())},[Zt,Vt]),sn=re.useMemo(function(){if($t){var Ti=ai.slice();if(!Ti.includes(Wt.w)){var jt=kn||0;jt>=0&&(jt||oe==="left"||!oe)&&Ti.splice(jt,0,Wt.w),oe==="right"&&Ti.splice(ai.length,0,Wt.w)}var Mt=Ti.indexOf(Wt.w);Ti=Ti.filter(function(Bt,_t){return Bt!==Wt.w||_t===Mt});var mt=ai[Mt],vt;oe?vt=oe:vt=mt?mt.fixed:null;var Lt=(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)({},Ie.v,{className:"".concat(Ot,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",fe),"fixed",vt),"className","".concat(Ot,"-row-expand-icon-cell")),"width",me),"render",function(_t,Le,xe){var Xe=rn(Le,xe),Me=Ce.has(Xe),De=Fn?Fn(Le):!0,Oe=Bn({prefixCls:Ot,expanded:Me,expandable:De,record:Le,onExpand:tn});return ti?re.createElement("span",{onClick:function(mn){return mn.stopPropagation()}},Oe):Oe});return Ti.map(function(Bt){return Bt===Wt.w?Lt:Bt})}return ai.filter(function(Bt){return Bt!==Wt.w})},[$t,ai,rn,Ce,Bn,Gn]),Rn=re.useMemo(function(){var Ti=sn;return Rt&&(Ti=Rt(Ti)),Ti.length||(Ti=[{render:function(){return null}}]),Ti},[Rt,sn,Gn]),ri=re.useMemo(function(){return Gn==="rtl"?ct(at(Rn)):at(Rn)},[Rn,Gn,Cn]),Ui=re.useMemo(function(){for(var Ti=-1,jt=ri.length-1;jt>=0;jt-=1){var Mt=ri[jt].fixed;if(Mt==="left"||Mt===!0){Ti=jt;break}}if(Ti>=0)for(var mt=0;mt<=Ti;mt+=1){var vt=ri[mt].fixed;if(vt!=="left"&&vt!==!0)return!0}var Lt=ri.findIndex(function(Le){var xe=Le.fixed;return xe==="right"});if(Lt>=0)for(var Bt=Lt;Bt<ri.length;Bt+=1){var _t=ri[Bt].fixed;if(_t!=="right")return!0}return!1},[ri]),en=Ee(ri,Cn,li),ei=(0,Ct.Z)(en,2),Fe=ei[0],ci=ei[1];return[Rn,Fe,ci,Ui]}var xt=pt},4030:function(xn,ze,Qt){"use strict";Qt.d(ze,{w2:function(){return Ct.w},vP:function(){return Zi.v},RQ:function(){return Ct.R},ER:function(){return Xe},Q$:function(){return dr},TN:function(){return ii}});var Ct=Qt(86351),ee=Qt(50298),ue=Qt(6089),Se=Qt(34280),de=Qt(13697),Ht=Qt(59301),ie=Qt(4676);function Ae(Te){var un=Ht.createContext(void 0),Ue=function(pn){var Ln=pn.value,Ai=pn.children,Zn=Ht.useRef(Ln);Zn.current=Ln;var Tn=Ht.useState(function(){return{getValue:function(){return Zn.current},listeners:new Set}}),dn=(0,ee.Z)(Tn,1),qe=dn[0];return(0,Se.Z)(function(){(0,ie.unstable_batchedUpdates)(function(){qe.listeners.forEach(function(fn){fn(Ln)})})},[Ln]),Ht.createElement(un.Provider,{value:qe},Ai)};return{Context:un,Provider:Ue,defaultValue:Te}}function re(Te,un){var Ue=(0,ue.Z)(typeof un=="function"?un:function(fn){if(un===void 0)return fn;if(!Array.isArray(un))return fn[un];var an={};return un.forEach(function(gn){an[gn]=fn[gn]}),an}),Ut=Ht.useContext(Te==null?void 0:Te.Context),pn=Ut||{},Ln=pn.listeners,Ai=pn.getValue,Zn=Ht.useRef();Zn.current=Ue(Ut?Ai():Te==null?void 0:Te.defaultValue);var Tn=Ht.useState({}),dn=(0,ee.Z)(Tn,2),qe=dn[1];return(0,Se.Z)(function(){if(!Ut)return;function fn(an){var gn=Ue(an);(0,de.Z)(Zn.current,gn,!0)||qe({})}return Ln.add(fn),function(){Ln.delete(fn)}},[Ut]),Zn.current}var Wt=Qt(14809),Ie=Qt(8654);function Xt(){var Te=Ht.createContext(null);function un(){return Ht.useContext(Te)}function Ue(pn,Ln){var Ai=(0,Ie.Yr)(pn),Zn=function(dn,qe){var fn=Ai?{ref:qe}:{},an=Ht.useRef(0),gn=Ht.useRef(dn),qn=un();return qn!==null?Ht.createElement(pn,(0,Wt.Z)({},dn,fn)):((!Ln||Ln(gn.current,dn))&&(an.current+=1),gn.current=dn,Ht.createElement(Te.Provider,{value:an.current},Ht.createElement(pn,(0,Wt.Z)({},dn,fn))))};return Ai?Ht.forwardRef(Zn):Zn}function Ut(pn,Ln){var Ai=(0,Ie.Yr)(pn),Zn=function(dn,qe){var fn=Ai?{ref:qe}:{};return un(),Ht.createElement(pn,(0,Wt.Z)({},dn,fn))};return Ai?Ht.memo(Ht.forwardRef(Zn),Ln):Ht.memo(Zn,Ln)}return{makeImmutable:Ue,responseImmutable:Ut,useImmutableMark:un}}var Ee=Xt(),It=Ee.makeImmutable,nt=Ee.responseImmutable,et=Ee.useImmutableMark,At=Xt(),at=At.makeImmutable,ct=At.responseImmutable,pt=At.useImmutableMark,xt=Ae(),bt=xt;function Rt(Te,un){var Ue=React.useRef(0);Ue.current+=1;var Ut=React.useRef(Te),pn=[];Object.keys(Te||{}).map(function(Ai){var Zn;(Te==null?void 0:Te[Ai])!==((Zn=Ut.current)===null||Zn===void 0?void 0:Zn[Ai])&&pn.push(Ai)}),Ut.current=Te;var Ln=React.useRef([]);return pn.length&&(Ln.current=pn),React.useDebugValue(Ue.current),React.useDebugValue(Ln.current.join(", ")),un&&console.log("".concat(un,":"),Ue.current,Ln.current),Ue.current}var Ot=null,Zt=null,Vt=Qt(93664),$t=Qt(20439),Ce=Qt(4635),fe=Qt(92310),rn=Qt.n(fe),tn=Qt(80547),Bn=Qt(97938),Fn=Qt(48736),kn=Ht.createContext({renderWithProps:!1}),Gn=kn,ti="RC_TABLE_KEY";function me(Te){return Te==null?[]:Array.isArray(Te)?Te:[Te]}function oe(Te){var un=[],Ue={};return Te.forEach(function(Ut){for(var pn=Ut||{},Ln=pn.key,Ai=pn.dataIndex,Zn=Ln||me(Ai).join("-")||ti;Ue[Zn];)Zn="".concat(Zn,"_next");Ue[Zn]=!0,un.push(Zn)}),un}function Cn(Te){return Te!=null}function li(Te){return typeof Te=="number"&&!Number.isNaN(Te)}function ai(Te){return Te&&(0,Vt.Z)(Te)==="object"&&!Array.isArray(Te)&&!Ht.isValidElement(Te)}function sn(Te,un,Ue,Ut,pn,Ln){var Ai=Ht.useContext(Gn),Zn=pt(),Tn=(0,tn.Z)(function(){if(Cn(Ut))return[Ut];var dn=un==null||un===""?[]:Array.isArray(un)?un:[un],qe=(0,Bn.Z)(Te,dn),fn=qe,an=void 0;if(pn){var gn=pn(qe,Te,Ue);ai(gn)?(fn=gn.children,an=gn.props,Ai.renderWithProps=!0):fn=gn}return[fn,an]},[Zn,Te,Ut,un,pn,Ue],function(dn,qe){if(Ln){var fn=(0,ee.Z)(dn,2),an=fn[1],gn=(0,ee.Z)(qe,2),qn=gn[1];return Ln(qn,an)}return Ai.renderWithProps?!0:!(0,de.Z)(dn,qe,!0)});return Tn}function Rn(Te,un,Ue,Ut){var pn=Te+un-1;return Te<=Ut&&pn>=Ue}function ri(Te,un){return re(bt,function(Ue){var Ut=Rn(Te,un||1,Ue.hoverStartRow,Ue.hoverEndRow);return[Ut,Ue.onHover]})}var Ui=Qt(70425),en=function(un){var Ue=un.ellipsis,Ut=un.rowType,pn=un.children,Ln,Ai=Ue===!0?{showTitle:!0}:Ue;return Ai&&(Ai.showTitle||Ut==="header")&&(typeof pn=="string"||typeof pn=="number"?Ln=pn.toString():Ht.isValidElement(pn)&&typeof pn.props.children=="string"&&(Ln=pn.props.children)),Ln};function ei(Te){var un,Ue,Ut,pn,Ln,Ai,Zn,Tn,dn=Te.component,qe=Te.children,fn=Te.ellipsis,an=Te.scope,gn=Te.prefixCls,qn=Te.className,Mn=Te.align,Un=Te.record,ln=Te.render,si=Te.dataIndex,Mi=Te.renderIndex,er=Te.shouldCellUpdate,Hi=Te.index,Fr=Te.rowType,wr=Te.colSpan,Qr=Te.rowSpan,Or=Te.fixLeft,Lr=Te.fixRight,Xr=Te.firstFixLeft,He=Te.lastFixLeft,xr=Te.firstFixRight,Ur=Te.lastFixRight,nr=Te.appendNode,kr=Te.additionalProps,gr=kr===void 0?{}:kr,co=Te.isSticky,io="".concat(gn,"-cell"),Pr=re(bt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),vo=Pr.supportSticky,ks=Pr.allColumnsFixedLeft,us=Pr.rowHoverable,Da=sn(Un,si,Mi,qe,ln,er),Ks=(0,ee.Z)(Da,2),ar=Ks[0],rs=Ks[1],os={},ji=typeof Or=="number"&&vo,Nr=typeof Lr=="number"&&vo;ji&&(os.position="sticky",os.left=Or),Nr&&(os.position="sticky",os.right=Lr);var so=(un=(Ue=(Ut=rs==null?void 0:rs.colSpan)!==null&&Ut!==void 0?Ut:gr.colSpan)!==null&&Ue!==void 0?Ue:wr)!==null&&un!==void 0?un:1,di=(pn=(Ln=(Ai=rs==null?void 0:rs.rowSpan)!==null&&Ai!==void 0?Ai:gr.rowSpan)!==null&&Ln!==void 0?Ln:Qr)!==null&&pn!==void 0?pn:1,ir=ri(Hi,di),fr=(0,ee.Z)(ir,2),Rr=fr[0],$r=fr[1],Bo=(0,Ui.zX)(function(Ro){var $o;Un&&$r(Hi,Hi+di-1),gr==null||($o=gr.onMouseEnter)===null||$o===void 0||$o.call(gr,Ro)}),rr=(0,Ui.zX)(function(Ro){var $o;Un&&$r(-1,-1),gr==null||($o=gr.onMouseLeave)===null||$o===void 0||$o.call(gr,Ro)});if(so===0||di===0)return null;var So=(Zn=gr.title)!==null&&Zn!==void 0?Zn:en({rowType:Fr,ellipsis:fn,children:ar}),ao=rn()(io,qn,(Tn={},(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)(Tn,"".concat(io,"-fix-left"),ji&&vo),"".concat(io,"-fix-left-first"),Xr&&vo),"".concat(io,"-fix-left-last"),He&&vo),"".concat(io,"-fix-left-all"),He&&ks&&vo),"".concat(io,"-fix-right"),Nr&&vo),"".concat(io,"-fix-right-first"),xr&&vo),"".concat(io,"-fix-right-last"),Ur&&vo),"".concat(io,"-ellipsis"),fn),"".concat(io,"-with-append"),nr),"".concat(io,"-fix-sticky"),(ji||Nr)&&co&&vo),(0,Ce.Z)(Tn,"".concat(io,"-row-hover"),!rs&&Rr)),gr.className,rs==null?void 0:rs.className),es={};Mn&&(es.textAlign=Mn);var to=(0,$t.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},rs==null?void 0:rs.style),os),es),gr.style),Do=ar;return(0,Vt.Z)(Do)==="object"&&!Array.isArray(Do)&&!Ht.isValidElement(Do)&&(Do=null),fn&&(He||xr)&&(Do=Ht.createElement("span",{className:"".concat(io,"-content")},Do)),Ht.createElement(dn,(0,Wt.Z)({},rs,gr,{className:ao,style:to,title:So,scope:an,onMouseEnter:us?Bo:void 0,onMouseLeave:us?rr:void 0,colSpan:so!==1?so:null,rowSpan:di!==1?di:null}),nr,Do)}var Fe=Ht.memo(ei);function ci(Te,un,Ue,Ut,pn){var Ln=Ue[Te]||{},Ai=Ue[un]||{},Zn,Tn;Ln.fixed==="left"?Zn=Ut.left[pn==="rtl"?un:Te]:Ai.fixed==="right"&&(Tn=Ut.right[pn==="rtl"?Te:un]);var dn=!1,qe=!1,fn=!1,an=!1,gn=Ue[un+1],qn=Ue[Te-1],Mn=gn&&!gn.fixed||qn&&!qn.fixed||Ue.every(function(er){return er.fixed==="left"});if(pn==="rtl"){if(Zn!==void 0){var Un=qn&&qn.fixed==="left";an=!Un&&Mn}else if(Tn!==void 0){var ln=gn&&gn.fixed==="right";fn=!ln&&Mn}}else if(Zn!==void 0){var si=gn&&gn.fixed==="left";dn=!si&&Mn}else if(Tn!==void 0){var Mi=qn&&qn.fixed==="right";qe=!Mi&&Mn}return{fixLeft:Zn,fixRight:Tn,lastFixLeft:dn,firstFixRight:qe,lastFixRight:fn,firstFixLeft:an,isSticky:Ut.isSticky}}var Ti=Ht.createContext({}),jt=Ti;function Mt(Te){var un=Te.className,Ue=Te.index,Ut=Te.children,pn=Te.colSpan,Ln=pn===void 0?1:pn,Ai=Te.rowSpan,Zn=Te.align,Tn=re(bt,["prefixCls","direction"]),dn=Tn.prefixCls,qe=Tn.direction,fn=Ht.useContext(jt),an=fn.scrollColumnIndex,gn=fn.stickyOffsets,qn=fn.flattenColumns,Mn=Ue+Ln-1,Un=Mn+1===an?Ln+1:Ln,ln=ci(Ue,Ue+Un-1,qn,gn,qe);return Ht.createElement(Fe,(0,Wt.Z)({className:un,index:Ue,component:"td",prefixCls:dn,record:null,dataIndex:null,align:Zn,colSpan:Un,rowSpan:Ai,render:function(){return Ut}},ln))}var mt=Qt(62646),vt=["children"];function Lt(Te){var un=Te.children,Ue=(0,mt.Z)(Te,vt);return Ht.createElement("tr",Ue,un)}function Bt(Te){var un=Te.children;return un}Bt.Row=Lt,Bt.Cell=Mt;var _t=Bt;function Le(Te){var un=Te.children,Ue=Te.stickyOffsets,Ut=Te.flattenColumns,pn=re(bt,"prefixCls"),Ln=Ut.length-1,Ai=Ut[Ln],Zn=Ht.useMemo(function(){return{stickyOffsets:Ue,flattenColumns:Ut,scrollColumnIndex:Ai!=null&&Ai.scrollbar?Ln:null}},[Ai,Ut,Ln,Ue]);return Ht.createElement(jt.Provider,{value:Zn},Ht.createElement("tfoot",{className:"".concat(pn,"-summary")},un))}var xe=ct(Le),Xe=_t,Me=Qt(29301),De=Qt(24514),Oe=Qt(75152),nn=Qt(26112);function mn(Te,un,Ue,Ut,pn,Ln,Ai){Te.push({record:un,indent:Ue,index:Ai});var Zn=Ln(un),Tn=pn==null?void 0:pn.has(Zn);if(un&&Array.isArray(un[Ut])&&Tn)for(var dn=0;dn<un[Ut].length;dn+=1)mn(Te,un[Ut][dn],Ue+1,Ut,pn,Ln,dn)}function On(Te,un,Ue,Ut){var pn=Ht.useMemo(function(){if(Ue!=null&&Ue.size){for(var Ln=[],Ai=0;Ai<(Te==null?void 0:Te.length);Ai+=1){var Zn=Te[Ai];mn(Ln,Zn,0,un,Ue,Ut,Ai)}return Ln}return Te==null?void 0:Te.map(function(Tn,dn){return{record:Tn,indent:0,index:dn}})},[Te,un,Ue,Ut]);return pn}function yn(Te,un,Ue,Ut){var pn=re(bt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ln=pn.flattenColumns,Ai=pn.expandableType,Zn=pn.expandedKeys,Tn=pn.childrenColumnName,dn=pn.onTriggerExpand,qe=pn.rowExpandable,fn=pn.onRow,an=pn.expandRowByClick,gn=pn.rowClassName,qn=Ai==="nest",Mn=Ai==="row"&&(!qe||qe(Te)),Un=Mn||qn,ln=Zn&&Zn.has(un),si=Tn&&Te&&Te[Tn],Mi=(0,Ui.zX)(dn),er=fn==null?void 0:fn(Te,Ue),Hi=er==null?void 0:er.onClick,Fr=function(Lr){an&&Un&&dn(Te,Lr);for(var Xr=arguments.length,He=new Array(Xr>1?Xr-1:0),xr=1;xr<Xr;xr++)He[xr-1]=arguments[xr];Hi==null||Hi.apply(void 0,[Lr].concat(He))},wr;typeof gn=="string"?wr=gn:typeof gn=="function"&&(wr=gn(Te,Ue,Ut));var Qr=oe(Ln);return(0,$t.Z)((0,$t.Z)({},pn),{},{columnsKey:Qr,nestExpandable:qn,expanded:ln,hasNestChildren:si,record:Te,onTriggerExpand:Mi,rowSupportExpand:Mn,expandable:Un,rowProps:(0,$t.Z)((0,$t.Z)({},er),{},{className:rn()(wr,er==null?void 0:er.className),onClick:Fr})})}function ui(Te){var un=Te.prefixCls,Ue=Te.children,Ut=Te.component,pn=Te.cellComponent,Ln=Te.className,Ai=Te.expanded,Zn=Te.colSpan,Tn=Te.isEmpty,dn=re(bt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),qe=dn.scrollbarSize,fn=dn.fixHeader,an=dn.fixColumn,gn=dn.componentWidth,qn=dn.horizonScroll,Mn=Ue;return(Tn?qn&&gn:an)&&(Mn=Ht.createElement("div",{style:{width:gn-(fn&&!Tn?qe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(un,"-expanded-row-fixed")},Mn)),Ht.createElement(Ut,{className:Ln,style:{display:Ai?null:"none"}},Ht.createElement(Fe,{component:pn,prefixCls:un,colSpan:Zn},Mn))}var oi=ui;function gi(Te){var un=Te.prefixCls,Ue=Te.record,Ut=Te.onExpand,pn=Te.expanded,Ln=Te.expandable,Ai="".concat(un,"-row-expand-icon");if(!Ln)return Ht.createElement("span",{className:rn()(Ai,"".concat(un,"-row-spaced"))});var Zn=function(dn){Ut(Ue,dn),dn.stopPropagation()};return Ht.createElement("span",{className:rn()(Ai,(0,Ce.Z)((0,Ce.Z)({},"".concat(un,"-row-expanded"),pn),"".concat(un,"-row-collapsed"),!pn)),onClick:Zn})}function bi(Te,un,Ue){var Ut=[];function pn(Ln){(Ln||[]).forEach(function(Ai,Zn){Ut.push(un(Ai,Zn)),pn(Ai[Ue])})}return pn(Te),Ut}function cr(Te,un,Ue,Ut){return typeof Te=="string"?Te:typeof Te=="function"?Te(un,Ue,Ut):""}function Ei(Te,un,Ue,Ut,pn){var Ln=Te.record,Ai=Te.prefixCls,Zn=Te.columnsKey,Tn=Te.fixedInfoList,dn=Te.expandIconColumnIndex,qe=Te.nestExpandable,fn=Te.indentSize,an=Te.expandIcon,gn=Te.expanded,qn=Te.hasNestChildren,Mn=Te.onTriggerExpand,Un=Zn[Ue],ln=Tn[Ue],si;Ue===(dn||0)&&qe&&(si=Ht.createElement(Ht.Fragment,null,Ht.createElement("span",{style:{paddingLeft:"".concat(fn*Ut,"px")},className:"".concat(Ai,"-row-indent indent-level-").concat(Ut)}),an({prefixCls:Ai,expanded:gn,expandable:qn,record:Ln,onExpand:Mn})));var Mi;return un.onCell&&(Mi=un.onCell(Ln,pn)),{key:Un,fixedInfo:ln,appendCellNode:si,additionalCellProps:Mi||{}}}function Ri(Te){var un=Te.className,Ue=Te.style,Ut=Te.record,pn=Te.index,Ln=Te.renderIndex,Ai=Te.rowKey,Zn=Te.indent,Tn=Zn===void 0?0:Zn,dn=Te.rowComponent,qe=Te.cellComponent,fn=Te.scopeCellComponent,an=yn(Ut,Ai,pn,Tn),gn=an.prefixCls,qn=an.flattenColumns,Mn=an.expandedRowClassName,Un=an.expandedRowRender,ln=an.rowProps,si=an.expanded,Mi=an.rowSupportExpand,er=Ht.useRef(!1);er.current||(er.current=si);var Hi=cr(Mn,Ut,pn,Tn),Fr=Ht.createElement(dn,(0,Wt.Z)({},ln,{"data-row-key":Ai,className:rn()(un,"".concat(gn,"-row"),"".concat(gn,"-row-level-").concat(Tn),ln==null?void 0:ln.className,(0,Ce.Z)({},Hi,Tn>=1)),style:(0,$t.Z)((0,$t.Z)({},Ue),ln==null?void 0:ln.style)}),qn.map(function(Or,Lr){var Xr=Or.render,He=Or.dataIndex,xr=Or.className,Ur=Ei(an,Or,Lr,Tn,pn),nr=Ur.key,kr=Ur.fixedInfo,gr=Ur.appendCellNode,co=Ur.additionalCellProps;return Ht.createElement(Fe,(0,Wt.Z)({className:xr,ellipsis:Or.ellipsis,align:Or.align,scope:Or.rowScope,component:Or.rowScope?fn:qe,prefixCls:gn,key:nr,record:Ut,index:pn,renderIndex:Ln,dataIndex:He,render:Xr,shouldCellUpdate:Or.shouldCellUpdate},kr,{appendNode:gr,additionalProps:co}))})),wr;if(Mi&&(er.current||si)){var Qr=Un(Ut,pn,Tn+1,si);wr=Ht.createElement(oi,{expanded:si,className:rn()("".concat(gn,"-expanded-row"),"".concat(gn,"-expanded-row-level-").concat(Tn+1),Hi),prefixCls:gn,component:dn,cellComponent:qe,colSpan:qn.length,isEmpty:!1},Qr)}return Ht.createElement(Ht.Fragment,null,Fr,wr)}var Ki=ct(Ri);function _r(Te){var un=Te.columnKey,Ue=Te.onColumnResize,Ut=Ht.useRef();return(0,Se.Z)(function(){Ut.current&&Ue(un,Ut.current.offsetWidth)},[]),Ht.createElement(Me.Z,{data:un},Ht.createElement("td",{ref:Ut,style:{padding:0,border:0,height:0}},Ht.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Ji=Qt(29194);function Er(Te){var un=Te.prefixCls,Ue=Te.columnsKey,Ut=Te.onColumnResize,pn=Ht.useRef(null);return Ht.createElement("tr",{"aria-hidden":"true",className:"".concat(un,"-measure-row"),style:{height:0,fontSize:0},ref:pn},Ht.createElement(Me.Z.Collection,{onBatchResize:function(Ai){(0,Ji.Z)(pn.current)&&Ai.forEach(function(Zn){var Tn=Zn.data,dn=Zn.size;Ut(Tn,dn.offsetWidth)})}},Ue.map(function(Ln){return Ht.createElement(_r,{key:Ln,columnKey:Ln,onColumnResize:Ut})})))}function yr(Te){var un=Te.data,Ue=Te.measureColumnWidth,Ut=re(bt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),pn=Ut.prefixCls,Ln=Ut.getComponent,Ai=Ut.onColumnResize,Zn=Ut.flattenColumns,Tn=Ut.getRowKey,dn=Ut.expandedKeys,qe=Ut.childrenColumnName,fn=Ut.emptyNode,an=On(un,qe,dn,Tn),gn=Ht.useRef({renderWithProps:!1}),qn=Ln(["body","wrapper"],"tbody"),Mn=Ln(["body","row"],"tr"),Un=Ln(["body","cell"],"td"),ln=Ln(["body","cell"],"th"),si;un.length?si=an.map(function(er,Hi){var Fr=er.record,wr=er.indent,Qr=er.index,Or=Tn(Fr,Hi);return Ht.createElement(Ki,{key:Or,rowKey:Or,record:Fr,index:Hi,renderIndex:Qr,rowComponent:Mn,cellComponent:Un,scopeCellComponent:ln,indent:wr})}):si=Ht.createElement(oi,{expanded:!0,className:"".concat(pn,"-placeholder"),prefixCls:pn,component:Mn,cellComponent:Un,colSpan:Zn.length,isEmpty:!0},fn);var Mi=oe(Zn);return Ht.createElement(Gn.Provider,{value:gn.current},Ht.createElement(qn,{className:"".concat(pn,"-tbody")},Ue&&Ht.createElement(Er,{prefixCls:pn,columnsKey:Mi,onColumnResize:Ai}),si))}var Vr=ct(yr),Zi=Qt(54451),oo=["columnType"];function xo(Te){for(var un=Te.colWidths,Ue=Te.columns,Ut=Te.columCount,pn=re(bt,["tableLayout"]),Ln=pn.tableLayout,Ai=[],Zn=Ut||Ue.length,Tn=!1,dn=Zn-1;dn>=0;dn-=1){var qe=un[dn],fn=Ue&&Ue[dn],an=void 0,gn=void 0;if(fn&&(an=fn[Zi.v],Ln==="auto"&&(gn=fn.minWidth)),qe||gn||an||Tn){var qn=an||{},Mn=qn.columnType,Un=(0,mt.Z)(qn,oo);Ai.unshift(Ht.createElement("col",(0,Wt.Z)({key:dn,style:{width:qe,minWidth:gn}},Un))),Tn=!0}}return Ht.createElement("colgroup",null,Ai)}var no=xo,br=Qt(95190),uo=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Tt(Te,un){return(0,Ht.useMemo)(function(){for(var Ue=[],Ut=0;Ut<un;Ut+=1){var pn=Te[Ut];if(pn!==void 0)Ue[Ut]=pn;else return null}return Ue},[Te.join("_"),un])}var Gi=Ht.forwardRef(function(Te,un){var Ue=Te.className,Ut=Te.noData,pn=Te.columns,Ln=Te.flattenColumns,Ai=Te.colWidths,Zn=Te.columCount,Tn=Te.stickyOffsets,dn=Te.direction,qe=Te.fixHeader,fn=Te.stickyTopOffset,an=Te.stickyBottomOffset,gn=Te.stickyClassName,qn=Te.onScroll,Mn=Te.maxContentScroll,Un=Te.children,ln=(0,mt.Z)(Te,uo),si=re(bt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Mi=si.prefixCls,er=si.scrollbarSize,Hi=si.isSticky,Fr=si.getComponent,wr=Fr(["header","table"],"table"),Qr=Hi&&!qe?0:er,Or=Ht.useRef(null),Lr=Ht.useCallback(function(co){(0,Ie.mH)(un,co),(0,Ie.mH)(Or,co)},[]);Ht.useEffect(function(){var co;function io(Pr){var vo=Pr,ks=vo.currentTarget,us=vo.deltaX;us&&(qn({currentTarget:ks,scrollLeft:ks.scrollLeft+us}),Pr.preventDefault())}return(co=Or.current)===null||co===void 0||co.addEventListener("wheel",io,{passive:!1}),function(){var Pr;(Pr=Or.current)===null||Pr===void 0||Pr.removeEventListener("wheel",io)}},[]);var Xr=Ht.useMemo(function(){return Ln.every(function(co){return co.width})},[Ln]),He=Ln[Ln.length-1],xr={fixed:He?He.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Mi,"-cell-scrollbar")}}},Ur=(0,Ht.useMemo)(function(){return Qr?[].concat((0,br.Z)(pn),[xr]):pn},[Qr,pn]),nr=(0,Ht.useMemo)(function(){return Qr?[].concat((0,br.Z)(Ln),[xr]):Ln},[Qr,Ln]),kr=(0,Ht.useMemo)(function(){var co=Tn.right,io=Tn.left;return(0,$t.Z)((0,$t.Z)({},Tn),{},{left:dn==="rtl"?[].concat((0,br.Z)(io.map(function(Pr){return Pr+Qr})),[0]):io,right:dn==="rtl"?co:[].concat((0,br.Z)(co.map(function(Pr){return Pr+Qr})),[0]),isSticky:Hi})},[Qr,Tn,Hi]),gr=Tt(Ai,Zn);return Ht.createElement("div",{style:(0,$t.Z)({overflow:"hidden"},Hi?{top:fn,bottom:an}:{}),ref:Lr,className:rn()(Ue,(0,Ce.Z)({},gn,!!gn))},Ht.createElement(wr,{style:{tableLayout:"fixed",visibility:Ut||gr?null:"hidden"}},(!Ut||!Mn||Xr)&&Ht.createElement(no,{colWidths:gr?[].concat((0,br.Z)(gr),[Qr]):[],columCount:Zn+1,columns:nr}),Un((0,$t.Z)((0,$t.Z)({},ln),{},{stickyOffsets:kr,columns:Ur,flattenColumns:nr}))))}),Vi=Ht.memo(Gi),xi=function(un){var Ue=un.cells,Ut=un.stickyOffsets,pn=un.flattenColumns,Ln=un.rowComponent,Ai=un.cellComponent,Zn=un.onHeaderRow,Tn=un.index,dn=re(bt,["prefixCls","direction"]),qe=dn.prefixCls,fn=dn.direction,an;Zn&&(an=Zn(Ue.map(function(qn){return qn.column}),Tn));var gn=oe(Ue.map(function(qn){return qn.column}));return Ht.createElement(Ln,an,Ue.map(function(qn,Mn){var Un=qn.column,ln=ci(qn.colStart,qn.colEnd,pn,Ut,fn),si;return Un&&Un.onHeaderCell&&(si=qn.column.onHeaderCell(Un)),Ht.createElement(Fe,(0,Wt.Z)({},qn,{scope:Un.title?qn.colSpan>1?"colgroup":"col":null,ellipsis:Un.ellipsis,align:Un.align,component:Ai,prefixCls:qe,key:gn[Mn]},ln,{additionalProps:si,rowType:"header"}))}))},Oi=xi;function zi(Te){var un=[];function Ue(Ai,Zn){var Tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;un[Tn]=un[Tn]||[];var dn=Zn,qe=Ai.filter(Boolean).map(function(fn){var an={key:fn.key,className:fn.className||"",children:fn.title,column:fn,colStart:dn},gn=1,qn=fn.children;return qn&&qn.length>0&&(gn=Ue(qn,dn,Tn+1).reduce(function(Mn,Un){return Mn+Un},0),an.hasSubColumns=!0),"colSpan"in fn&&(gn=fn.colSpan),"rowSpan"in fn&&(an.rowSpan=fn.rowSpan),an.colSpan=gn,an.colEnd=an.colStart+gn-1,un[Tn].push(an),dn+=gn,gn});return qe}Ue(Te,0);for(var Ut=un.length,pn=function(Zn){un[Zn].forEach(function(Tn){!("rowSpan"in Tn)&&!Tn.hasSubColumns&&(Tn.rowSpan=Ut-Zn)})},Ln=0;Ln<Ut;Ln+=1)pn(Ln);return un}var or=function(un){var Ue=un.stickyOffsets,Ut=un.columns,pn=un.flattenColumns,Ln=un.onHeaderRow,Ai=re(bt,["prefixCls","getComponent"]),Zn=Ai.prefixCls,Tn=Ai.getComponent,dn=Ht.useMemo(function(){return zi(Ut)},[Ut]),qe=Tn(["header","wrapper"],"thead"),fn=Tn(["header","row"],"tr"),an=Tn(["header","cell"],"th");return Ht.createElement(qe,{className:"".concat(Zn,"-thead")},dn.map(function(gn,qn){var Mn=Ht.createElement(Oi,{key:qn,flattenColumns:pn,cells:gn,stickyOffsets:Ue,rowComponent:fn,cellComponent:an,onHeaderRow:Ln,index:qn});return Mn}))},Yr=ct(or),Tr=Qt(97347);function je(Te,un,Ue){var Ut=(0,Zi.g)(Te),pn=Ut.expandIcon,Ln=Ut.expandedRowKeys,Ai=Ut.defaultExpandedRowKeys,Zn=Ut.defaultExpandAllRows,Tn=Ut.expandedRowRender,dn=Ut.onExpand,qe=Ut.onExpandedRowsChange,fn=Ut.childrenColumnName,an=pn||gi,gn=fn||"children",qn=Ht.useMemo(function(){return Tn?"row":Te.expandable&&Te.internalHooks===Ct.R&&Te.expandable.__PARENT_RENDER_ICON__||un.some(function(Hi){return Hi&&(0,Vt.Z)(Hi)==="object"&&Hi[gn]})?"nest":!1},[!!Tn,un]),Mn=Ht.useState(function(){return Ai||(Zn?bi(un,Ue,gn):[])}),Un=(0,ee.Z)(Mn,2),ln=Un[0],si=Un[1],Mi=Ht.useMemo(function(){return new Set(Ln||ln||[])},[Ln,ln]),er=Ht.useCallback(function(Hi){var Fr=Ue(Hi,un.indexOf(Hi)),wr,Qr=Mi.has(Fr);Qr?(Mi.delete(Fr),wr=(0,br.Z)(Mi)):wr=[].concat((0,br.Z)(Mi),[Fr]),si(wr),dn&&dn(!Qr,Hi),qe&&qe(wr)},[Ue,Mi,un,dn,qe]);return[Ut,qn,Mi,an,gn,er]}function Je(Te,un,Ue){var Ut=Te.map(function(pn,Ln){return ci(Ln,Ln,Te,un,Ue)});return(0,tn.Z)(function(){return Ut},[Ut],function(pn,Ln){return!(0,de.Z)(pn,Ln)})}function Ke(Te){var un=(0,Ht.useRef)(Te),Ue=(0,Ht.useState)({}),Ut=(0,ee.Z)(Ue,2),pn=Ut[1],Ln=(0,Ht.useRef)(null),Ai=(0,Ht.useRef)([]);function Zn(Tn){Ai.current.push(Tn);var dn=Promise.resolve();Ln.current=dn,dn.then(function(){if(Ln.current===dn){var qe=Ai.current,fn=un.current;Ai.current=[],qe.forEach(function(an){un.current=an(un.current)}),Ln.current=null,fn!==un.current&&pn({})}})}return(0,Ht.useEffect)(function(){return function(){Ln.current=null}},[]),[un.current,Zn]}function Ci(Te){var un=(0,Ht.useRef)(Te||null),Ue=(0,Ht.useRef)();function Ut(){window.clearTimeout(Ue.current)}function pn(Ai){un.current=Ai,Ut(),Ue.current=window.setTimeout(function(){un.current=null,Ue.current=void 0},100)}function Ln(){return un.current}return(0,Ht.useEffect)(function(){return Ut},[]),[pn,Ln]}function Ne(){var Te=Ht.useState(-1),un=(0,ee.Z)(Te,2),Ue=un[0],Ut=un[1],pn=Ht.useState(-1),Ln=(0,ee.Z)(pn,2),Ai=Ln[0],Zn=Ln[1],Tn=Ht.useCallback(function(dn,qe){Ut(dn),Zn(qe)},[]);return[Ue,Ai,Tn]}var Qi=Qt(47273),Hn=(0,Qi.Z)()?window:null;function fi(Te,un){var Ue=(0,Vt.Z)(Te)==="object"?Te:{},Ut=Ue.offsetHeader,pn=Ut===void 0?0:Ut,Ln=Ue.offsetSummary,Ai=Ln===void 0?0:Ln,Zn=Ue.offsetScroll,Tn=Zn===void 0?0:Zn,dn=Ue.getContainer,qe=dn===void 0?function(){return Hn}:dn,fn=qe()||Hn,an=!!Te;return Ht.useMemo(function(){return{isSticky:an,stickyClassName:an?"".concat(un,"-sticky-holder"):"",offsetHeader:pn,offsetSummary:Ai,offsetScroll:Tn,container:fn}},[an,Tn,pn,Ai,un,fn])}function $i(Te,un,Ue){var Ut=(0,Ht.useMemo)(function(){var pn=un.length,Ln=function(dn,qe,fn){for(var an=[],gn=0,qn=dn;qn!==qe;qn+=fn)an.push(gn),un[qn].fixed&&(gn+=Te[qn]||0);return an},Ai=Ln(0,pn,1),Zn=Ln(pn-1,-1,-1).reverse();return Ue==="rtl"?{left:Zn,right:Ai}:{left:Ai,right:Zn}},[Te,un,Ue]);return Ut}var Mr=$i;function Br(Te){var un=Te.className,Ue=Te.children;return Ht.createElement("div",{className:un},Ue)}var te=Br,ke=Qt(8224),zn=Qt(16089),ni=Qt(76846);function Ye(Te){var un=(0,ni.bn)(Te),Ue=un.getBoundingClientRect(),Ut=document.documentElement;return{left:Ue.left+(window.pageXOffset||Ut.scrollLeft)-(Ut.clientLeft||document.body.clientLeft||0),top:Ue.top+(window.pageYOffset||Ut.scrollTop)-(Ut.clientTop||document.body.clientTop||0)}}var Kn=function(un,Ue){var Ut,pn,Ln=un.scrollBodyRef,Ai=un.onScroll,Zn=un.offsetScroll,Tn=un.container,dn=un.direction,qe=re(bt,"prefixCls"),fn=((Ut=Ln.current)===null||Ut===void 0?void 0:Ut.scrollWidth)||0,an=((pn=Ln.current)===null||pn===void 0?void 0:pn.clientWidth)||0,gn=fn&&an*(an/fn),qn=Ht.useRef(),Mn=Ke({scrollLeft:0,isHiddenScrollBar:!0}),Un=(0,ee.Z)(Mn,2),ln=Un[0],si=Un[1],Mi=Ht.useRef({delta:0,x:0}),er=Ht.useState(!1),Hi=(0,ee.Z)(er,2),Fr=Hi[0],wr=Hi[1],Qr=Ht.useRef(null);Ht.useEffect(function(){return function(){zn.Z.cancel(Qr.current)}},[]);var Or=function(){wr(!1)},Lr=function(nr){nr.persist(),Mi.current.delta=nr.pageX-ln.scrollLeft,Mi.current.x=0,wr(!0),nr.preventDefault()},Xr=function(nr){var kr,gr=nr||((kr=window)===null||kr===void 0?void 0:kr.event),co=gr.buttons;if(!Fr||co===0){Fr&&wr(!1);return}var io=Mi.current.x+nr.pageX-Mi.current.x-Mi.current.delta,Pr=dn==="rtl";io=Math.max(Pr?gn-an:0,Math.min(Pr?0:an-gn,io));var vo=!Pr||Math.abs(io)+Math.abs(gn)<an;vo&&(Ai({scrollLeft:io/an*(fn+2)}),Mi.current.x=nr.pageX)},He=function(){zn.Z.cancel(Qr.current),Qr.current=(0,zn.Z)(function(){if(Ln.current){var nr=Ye(Ln.current).top,kr=nr+Ln.current.offsetHeight,gr=Tn===window?document.documentElement.scrollTop+window.innerHeight:Ye(Tn).top+Tn.clientHeight;kr-(0,Oe.Z)()<=gr||nr>=gr-Zn?si(function(co){return(0,$t.Z)((0,$t.Z)({},co),{},{isHiddenScrollBar:!0})}):si(function(co){return(0,$t.Z)((0,$t.Z)({},co),{},{isHiddenScrollBar:!1})})}})},xr=function(nr){si(function(kr){return(0,$t.Z)((0,$t.Z)({},kr),{},{scrollLeft:nr/fn*an||0})})};return Ht.useImperativeHandle(Ue,function(){return{setScrollLeft:xr,checkScrollBarVisible:He}}),Ht.useEffect(function(){var Ur=(0,ke.Z)(document.body,"mouseup",Or,!1),nr=(0,ke.Z)(document.body,"mousemove",Xr,!1);return He(),function(){Ur.remove(),nr.remove()}},[gn,Fr]),Ht.useEffect(function(){if(Ln.current){for(var Ur=[],nr=(0,ni.bn)(Ln.current);nr;)Ur.push(nr),nr=nr.parentElement;return Ur.forEach(function(kr){return kr.addEventListener("scroll",He,!1)}),window.addEventListener("resize",He,!1),window.addEventListener("scroll",He,!1),Tn.addEventListener("scroll",He,!1),function(){Ur.forEach(function(kr){return kr.removeEventListener("scroll",He)}),window.removeEventListener("resize",He),window.removeEventListener("scroll",He),Tn.removeEventListener("scroll",He)}}},[Tn]),Ht.useEffect(function(){ln.isHiddenScrollBar||si(function(Ur){var nr=Ln.current;return nr?(0,$t.Z)((0,$t.Z)({},Ur),{},{scrollLeft:nr.scrollLeft/nr.scrollWidth*nr.clientWidth}):Ur})},[ln.isHiddenScrollBar]),fn<=an||!gn||ln.isHiddenScrollBar?null:Ht.createElement("div",{style:{height:(0,Oe.Z)(),width:an,bottom:Zn},className:"".concat(qe,"-sticky-scroll")},Ht.createElement("div",{onMouseDown:Lr,ref:qn,className:rn()("".concat(qe,"-sticky-scroll-bar"),(0,Ce.Z)({},"".concat(qe,"-sticky-scroll-bar-active"),Fr)),style:{width:"".concat(gn,"px"),transform:"translate3d(".concat(ln.scrollLeft,"px, 0, 0)")}}))},_n=Ht.forwardRef(Kn);function We(Te){return null}var on=We;function An(Te){return null}var Nn=An,Vn="rc-table",Yi=[],Li={};function Bi(){return"No Data"}function Ve(Te,un){var Ue=(0,$t.Z)({rowKey:"key",prefixCls:Vn,emptyText:Bi},Te),Ut=Ue.prefixCls,pn=Ue.className,Ln=Ue.rowClassName,Ai=Ue.style,Zn=Ue.data,Tn=Ue.rowKey,dn=Ue.scroll,qe=Ue.tableLayout,fn=Ue.direction,an=Ue.title,gn=Ue.footer,qn=Ue.summary,Mn=Ue.caption,Un=Ue.id,ln=Ue.showHeader,si=Ue.components,Mi=Ue.emptyText,er=Ue.onRow,Hi=Ue.onHeaderRow,Fr=Ue.onScroll,wr=Ue.internalHooks,Qr=Ue.transformColumns,Or=Ue.internalRefs,Lr=Ue.tailor,Xr=Ue.getContainerWidth,He=Ue.sticky,xr=Ue.rowHoverable,Ur=xr===void 0?!0:xr,nr=Zn||Yi,kr=!!nr.length,gr=wr===Ct.R,co=Ht.useCallback(function(Po,Ho){return(0,Bn.Z)(si,Po)||Ho},[si]),io=Ht.useMemo(function(){return typeof Tn=="function"?Tn:function(Po){var Ho=Po&&Po[Tn];return Ho}},[Tn]),Pr=co(["body"]),vo=Ne(),ks=(0,ee.Z)(vo,3),us=ks[0],Da=ks[1],Ks=ks[2],ar=je(Ue,nr,io),rs=(0,ee.Z)(ar,6),os=rs[0],ji=rs[1],Nr=rs[2],so=rs[3],di=rs[4],ir=rs[5],fr=dn==null?void 0:dn.x,Rr=Ht.useState(0),$r=(0,ee.Z)(Rr,2),Bo=$r[0],rr=$r[1],So=(0,Tr.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},Ue),os),{},{expandable:!!os.expandedRowRender,columnTitle:os.columnTitle,expandedKeys:Nr,getRowKey:io,onTriggerExpand:ir,expandIcon:so,expandIconColumnIndex:os.expandIconColumnIndex,direction:fn,scrollWidth:gr&&Lr&&typeof fr=="number"?fr:null,clientWidth:Bo}),gr?Qr:null),ao=(0,ee.Z)(So,4),es=ao[0],to=ao[1],Do=ao[2],Ro=ao[3],$o=Do!=null?Do:fr,Ls=Ht.useMemo(function(){return{columns:es,flattenColumns:to}},[es,to]),Go=Ht.useRef(),la=Ht.useRef(),yo=Ht.useRef(),da=Ht.useRef();Ht.useImperativeHandle(un,function(){return{nativeElement:Go.current,scrollTo:function(Ho){var Is;if(yo.current instanceof HTMLElement){var na=Ho.index,pa=Ho.top,Wu=Ho.key;if(li(pa)){var Bu;(Bu=yo.current)===null||Bu===void 0||Bu.scrollTo({top:pa})}else{var Zu,_l=Wu!=null?Wu:io(nr[na]);(Zu=yo.current.querySelector('[data-row-key="'.concat(_l,'"]')))===null||Zu===void 0||Zu.scrollIntoView()}}else(Is=yo.current)!==null&&Is!==void 0&&Is.scrollTo&&yo.current.scrollTo(Ho)}}});var za=Ht.useRef(),Sa=Ht.useState(!1),Yo=(0,ee.Z)(Sa,2),Ia=Yo[0],dl=Yo[1],AA=Ht.useState(!1),hA=(0,ee.Z)(AA,2),ws=hA[0],zu=hA[1],cA=Ht.useState(new Map),fa=(0,ee.Z)(cA,2),nl=fa[0],Ds=fa[1],ns=oe(to),ms=ns.map(function(Po){return nl.get(Po)}),Js=Ht.useMemo(function(){return ms},[ms.join("_")]),lu=Mr(Js,to,fn),ga=dn&&Cn(dn.y),Wo=dn&&Cn($o)||!!os.fixed,Qo=Wo&&to.some(function(Po){var Ho=Po.fixed;return Ho}),Co=Ht.useRef(),cs=fi(He,Ut),Xi=cs.isSticky,qs=cs.offsetHeader,we=cs.offsetSummary,bn=cs.offsetScroll,El=cs.stickyClassName,uu=cs.container,is=Ht.useMemo(function(){return qn==null?void 0:qn(nr)},[qn,nr]),ta=(ga||Xi)&&Ht.isValidElement(is)&&is.type===_t&&is.props.fixed,fl,Hl,Au;ga&&(Hl={overflowY:kr?"scroll":"auto",maxHeight:dn.y}),Wo&&(fl={overflowX:"auto"},ga||(Hl={overflowY:"hidden"}),Au={width:$o===!0?"auto":$o,minWidth:"100%"});var xs=Ht.useCallback(function(Po,Ho){Ds(function(Is){if(Is.get(Po)!==Ho){var na=new Map(Is);return na.set(Po,Ho),na}return Is})},[]),jr=Ci(null),Ba=(0,ee.Z)(jr,2),il=Ba[0],vs=Ba[1];function wo(Po,Ho){Ho&&(typeof Ho=="function"?Ho(Po):Ho.scrollLeft!==Po&&(Ho.scrollLeft=Po,Ho.scrollLeft!==Po&&setTimeout(function(){Ho.scrollLeft=Po},0)))}var Ss=(0,ue.Z)(function(Po){var Ho=Po.currentTarget,Is=Po.scrollLeft,na=fn==="rtl",pa=typeof Is=="number"?Is:Ho.scrollLeft,Wu=Ho||Li;if(!vs()||vs()===Wu){var Bu;il(Wu),wo(pa,la.current),wo(pa,yo.current),wo(pa,za.current),wo(pa,(Bu=Co.current)===null||Bu===void 0?void 0:Bu.setScrollLeft)}var Zu=Ho||la.current;if(Zu){var _l=gr&&Lr&&typeof $o=="number"?$o:Zu.scrollWidth,du=Zu.clientWidth;if(_l===du){dl(!1),zu(!1);return}na?(dl(-pa<_l-du),zu(-pa>0)):(dl(pa>0),zu(pa<_l-du))}}),Ua=(0,ue.Z)(function(Po){Ss(Po),Fr==null||Fr(Po)}),ss=function(){if(Wo&&yo.current){var Ho;Ss({currentTarget:(0,ni.bn)(yo.current),scrollLeft:(Ho=yo.current)===null||Ho===void 0?void 0:Ho.scrollLeft})}else dl(!1),zu(!1)},rl=function(Ho){var Is,na=Ho.width;(Is=Co.current)===null||Is===void 0||Is.checkScrollBarVisible();var pa=Go.current?Go.current.offsetWidth:na;gr&&Xr&&Go.current&&(pa=Xr(Go.current,pa)||pa),pa!==Bo&&(ss(),rr(pa))},zs=Ht.useRef(!1);Ht.useEffect(function(){zs.current&&ss()},[Wo,Zn,es.length]),Ht.useEffect(function(){zs.current=!0},[]);var ju=Ht.useState(0),Oo=(0,ee.Z)(ju,2),ea=Oo[0],Io=Oo[1],as=Ht.useState(!0),ds=(0,ee.Z)(as,2),Ms=ds[0],zo=ds[1];(0,Se.Z)(function(){(!Lr||!gr)&&(yo.current instanceof Element?Io((0,Oe.o)(yo.current).width):Io((0,Oe.o)(da.current).width)),zo((0,De.G)("position","sticky"))},[]),Ht.useEffect(function(){gr&&Or&&(Or.body.current=yo.current)});var dA=Ht.useCallback(function(Po){return Ht.createElement(Ht.Fragment,null,Ht.createElement(Yr,Po),ta==="top"&&Ht.createElement(xe,Po,is))},[ta,is]),zr=Ht.useCallback(function(Po){return Ht.createElement(xe,Po,is)},[is]),Vu=co(["table"],"table"),Eo=Ht.useMemo(function(){return qe||(Qo?$o==="max-content"?"auto":"fixed":ga||Xi||to.some(function(Po){var Ho=Po.ellipsis;return Ho})?"fixed":"auto")},[ga,Qo,to,qe,Xi]),Oh,ql={colWidths:Js,columCount:to.length,stickyOffsets:lu,onHeaderRow:Hi,fixHeader:ga,scroll:dn},TA=Ht.useMemo(function(){return kr?null:typeof Mi=="function"?Mi():Mi},[kr,Mi]),Hh=Ht.createElement(Vr,{data:nr,measureColumnWidth:ga||Wo||Xi}),ch=Ht.createElement(no,{colWidths:to.map(function(Po){var Ho=Po.width;return Ho}),columns:to}),hu=Mn!=null?Ht.createElement("caption",{className:"".concat(Ut,"-caption")},Mn):void 0,cu=(0,nn.Z)(Ue,{data:!0}),_o=(0,nn.Z)(Ue,{aria:!0});if(ga||Xi){var Rl;typeof Pr=="function"?(Rl=Pr(nr,{scrollbarSize:ea,ref:yo,onScroll:Ss}),ql.colWidths=to.map(function(Po,Ho){var Is=Po.width,na=Ho===to.length-1?Is-ea:Is;return typeof na=="number"&&!Number.isNaN(na)?na:0})):Rl=Ht.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},fl),Hl),onScroll:Ua,ref:yo,className:rn()("".concat(Ut,"-body"))},Ht.createElement(Vu,(0,Wt.Z)({style:(0,$t.Z)((0,$t.Z)({},Au),{},{tableLayout:Eo})},_o),hu,ch,Hh,!ta&&is&&Ht.createElement(xe,{stickyOffsets:lu,flattenColumns:to},is)));var dh=(0,$t.Z)((0,$t.Z)((0,$t.Z)({noData:!nr.length,maxContentScroll:Wo&&$o==="max-content"},ql),Ls),{},{direction:fn,stickyClassName:El,onScroll:Ss});Oh=Ht.createElement(Ht.Fragment,null,ln!==!1&&Ht.createElement(Vi,(0,Wt.Z)({},dh,{stickyTopOffset:qs,className:"".concat(Ut,"-header"),ref:la}),dA),Rl,ta&&ta!=="top"&&Ht.createElement(Vi,(0,Wt.Z)({},dh,{stickyBottomOffset:we,className:"".concat(Ut,"-summary"),ref:za}),zr),Xi&&yo.current&&yo.current instanceof Element&&Ht.createElement(_n,{ref:Co,offsetScroll:bn,scrollBodyRef:yo,onScroll:Ss,container:uu,direction:fn}))}else Oh=Ht.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},fl),Hl),className:rn()("".concat(Ut,"-content")),onScroll:Ss,ref:yo},Ht.createElement(Vu,(0,Wt.Z)({style:(0,$t.Z)((0,$t.Z)({},Au),{},{tableLayout:Eo})},_o),hu,ch,ln!==!1&&Ht.createElement(Yr,(0,Wt.Z)({},ql,Ls)),Hh,is&&Ht.createElement(xe,{stickyOffsets:lu,flattenColumns:to},is)));var xu=Ht.createElement("div",(0,Wt.Z)({className:rn()(Ut,pn,(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(Ut,"-rtl"),fn==="rtl"),"".concat(Ut,"-ping-left"),Ia),"".concat(Ut,"-ping-right"),ws),"".concat(Ut,"-layout-fixed"),qe==="fixed"),"".concat(Ut,"-fixed-header"),ga),"".concat(Ut,"-fixed-column"),Qo),"".concat(Ut,"-fixed-column-gapped"),Qo&&Ro),"".concat(Ut,"-scroll-horizontal"),Wo),"".concat(Ut,"-has-fix-left"),to[0]&&to[0].fixed),"".concat(Ut,"-has-fix-right"),to[to.length-1]&&to[to.length-1].fixed==="right")),style:Ai,id:Un,ref:Go},cu),an&&Ht.createElement(te,{className:"".concat(Ut,"-title")},an(nr)),Ht.createElement("div",{ref:da,className:"".concat(Ut,"-container")},Oh),gn&&Ht.createElement(te,{className:"".concat(Ut,"-footer")},gn(nr)));Wo&&(xu=Ht.createElement(Me.Z,{onResize:rl},xu));var fA=Je(to,lu,fn),Su=Ht.useMemo(function(){return{scrollX:$o,prefixCls:Ut,getComponent:co,scrollbarSize:ea,direction:fn,fixedInfoList:fA,isSticky:Xi,supportSticky:Ms,componentWidth:Bo,fixHeader:ga,fixColumn:Qo,horizonScroll:Wo,tableLayout:Eo,rowClassName:Ln,expandedRowClassName:os.expandedRowClassName,expandIcon:so,expandableType:ji,expandRowByClick:os.expandRowByClick,expandedRowRender:os.expandedRowRender,onTriggerExpand:ir,expandIconColumnIndex:os.expandIconColumnIndex,indentSize:os.indentSize,allColumnsFixedLeft:to.every(function(Po){return Po.fixed==="left"}),emptyNode:TA,columns:es,flattenColumns:to,onColumnResize:xs,hoverStartRow:us,hoverEndRow:Da,onHover:Ks,rowExpandable:os.rowExpandable,onRow:er,getRowKey:io,expandedKeys:Nr,childrenColumnName:di,rowHoverable:Ur}},[$o,Ut,co,ea,fn,fA,Xi,Ms,Bo,ga,Qo,Wo,Eo,Ln,os.expandedRowClassName,so,ji,os.expandRowByClick,os.expandedRowRender,ir,os.expandIconColumnIndex,os.indentSize,TA,es,to,xs,us,Da,Ks,os.rowExpandable,er,io,Nr,di,Ur]);return Ht.createElement(bt.Provider,{value:Su},xu)}var tr=Ht.forwardRef(Ve);function dr(Te){return at(tr,Te)}var qr=dr();qr.EXPAND_COLUMN=Ct.w,qr.INTERNAL_HOOKS=Ct.R,qr.Column=on,qr.ColumnGroup=Nn,qr.Summary=Xe;var hn=qr,Wn=Qt(65283),Si=Ae(null),vi=Ae(null);function mi(Te,un,Ue){var Ut=un||1;return Ue[Te+Ut]-(Ue[Te]||0)}function Ii(Te){var un=Te.rowInfo,Ue=Te.column,Ut=Te.colIndex,pn=Te.indent,Ln=Te.index,Ai=Te.component,Zn=Te.renderIndex,Tn=Te.record,dn=Te.style,qe=Te.className,fn=Te.inverse,an=Te.getHeight,gn=Ue.render,qn=Ue.dataIndex,Mn=Ue.className,Un=Ue.width,ln=re(vi,["columnsOffset"]),si=ln.columnsOffset,Mi=Ei(un,Ue,Ut,pn,Ln),er=Mi.key,Hi=Mi.fixedInfo,Fr=Mi.appendCellNode,wr=Mi.additionalCellProps,Qr=wr.style,Or=wr.colSpan,Lr=Or===void 0?1:Or,Xr=wr.rowSpan,He=Xr===void 0?1:Xr,xr=Ut-1,Ur=mi(xr,Lr,si),nr=Lr>1?Un-Ur:0,kr=(0,$t.Z)((0,$t.Z)((0,$t.Z)({},Qr),dn),{},{flex:"0 0 ".concat(Ur,"px"),width:"".concat(Ur,"px"),marginRight:nr,pointerEvents:"auto"}),gr=Ht.useMemo(function(){return fn?He<=1:Lr===0||He===0||He>1},[He,Lr,fn]);gr?kr.visibility="hidden":fn&&(kr.height=an==null?void 0:an(He));var co=gr?function(){return null}:gn,io={};return(He===0||Lr===0)&&(io.rowSpan=1,io.colSpan=1),Ht.createElement(Fe,(0,Wt.Z)({className:rn()(Mn,qe),ellipsis:Ue.ellipsis,align:Ue.align,scope:Ue.rowScope,component:Ai,prefixCls:un.prefixCls,key:er,record:Tn,index:Ln,renderIndex:Zn,dataIndex:qn,render:co,shouldCellUpdate:Ue.shouldCellUpdate},Hi,{appendNode:Fr,additionalProps:(0,$t.Z)((0,$t.Z)({},wr),{},{style:kr},io)}))}var Wi=Ii,Ar=["data","index","className","rowKey","style","extra","getHeight"],ae=Ht.forwardRef(function(Te,un){var Ue=Te.data,Ut=Te.index,pn=Te.className,Ln=Te.rowKey,Ai=Te.style,Zn=Te.extra,Tn=Te.getHeight,dn=(0,mt.Z)(Te,Ar),qe=Ue.record,fn=Ue.indent,an=Ue.index,gn=re(bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),qn=gn.scrollX,Mn=gn.flattenColumns,Un=gn.prefixCls,ln=gn.fixColumn,si=gn.componentWidth,Mi=re(Si,["getComponent"]),er=Mi.getComponent,Hi=yn(qe,Ln,Ut,fn),Fr=er(["body","row"],"div"),wr=er(["body","cell"],"div"),Qr=Hi.rowSupportExpand,Or=Hi.expanded,Lr=Hi.rowProps,Xr=Hi.expandedRowRender,He=Hi.expandedRowClassName,xr;if(Qr&&Or){var Ur=Xr(qe,Ut,fn+1,Or),nr=cr(He,qe,Ut,fn),kr={};ln&&(kr={style:(0,Ce.Z)({},"--virtual-width","".concat(si,"px"))});var gr="".concat(Un,"-expanded-row-cell");xr=Ht.createElement(Fr,{className:rn()("".concat(Un,"-expanded-row"),"".concat(Un,"-expanded-row-level-").concat(fn+1),nr)},Ht.createElement(Fe,{component:wr,prefixCls:Un,className:rn()(gr,(0,Ce.Z)({},"".concat(gr,"-fixed"),ln)),additionalProps:kr},Ur))}var co=(0,$t.Z)((0,$t.Z)({},Ai),{},{width:qn});Zn&&(co.position="absolute",co.pointerEvents="none");var io=Ht.createElement(Fr,(0,Wt.Z)({},Lr,dn,{"data-row-key":Ln,ref:Qr?null:un,className:rn()(pn,"".concat(Un,"-row"),Lr==null?void 0:Lr.className,(0,Ce.Z)({},"".concat(Un,"-row-extra"),Zn)),style:(0,$t.Z)((0,$t.Z)({},co),Lr==null?void 0:Lr.style)}),Mn.map(function(Pr,vo){return Ht.createElement(Wi,{key:vo,component:wr,rowInfo:Hi,column:Pr,colIndex:vo,indent:fn,index:Ut,renderIndex:an,record:qe,inverse:Zn,getHeight:Tn})}));return Qr?Ht.createElement("div",{ref:un},io,xr):io}),ce=ct(ae),ne=ce,Ge=Ht.forwardRef(function(Te,un){var Ue=Te.data,Ut=Te.onScroll,pn=re(bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Ln=pn.flattenColumns,Ai=pn.onColumnResize,Zn=pn.getRowKey,Tn=pn.expandedKeys,dn=pn.prefixCls,qe=pn.childrenColumnName,fn=pn.scrollX,an=pn.direction,gn=re(Si),qn=gn.sticky,Mn=gn.scrollY,Un=gn.listItemHeight,ln=gn.getComponent,si=gn.onScroll,Mi=Ht.useRef(),er=On(Ue,qe,Tn,Zn),Hi=Ht.useMemo(function(){var xr=0;return Ln.map(function(Ur){var nr=Ur.width,kr=Ur.key;return xr+=nr,[kr,nr,xr]})},[Ln]),Fr=Ht.useMemo(function(){return Hi.map(function(xr){return xr[2]})},[Hi]);Ht.useEffect(function(){Hi.forEach(function(xr){var Ur=(0,ee.Z)(xr,2),nr=Ur[0],kr=Ur[1];Ai(nr,kr)})},[Hi]),Ht.useImperativeHandle(un,function(){var xr,Ur={scrollTo:function(kr){var gr;(gr=Mi.current)===null||gr===void 0||gr.scrollTo(kr)},nativeElement:(xr=Mi.current)===null||xr===void 0?void 0:xr.nativeElement};return Object.defineProperty(Ur,"scrollLeft",{get:function(){var kr;return((kr=Mi.current)===null||kr===void 0?void 0:kr.getScrollInfo().x)||0},set:function(kr){var gr;(gr=Mi.current)===null||gr===void 0||gr.scrollTo({left:kr})}}),Ur});var wr=function(Ur,nr){var kr,gr=(kr=er[nr])===null||kr===void 0?void 0:kr.record,co=Ur.onCell;if(co){var io,Pr=co(gr,nr);return(io=Pr==null?void 0:Pr.rowSpan)!==null&&io!==void 0?io:1}return 1},Qr=function(Ur){var nr=Ur.start,kr=Ur.end,gr=Ur.getSize,co=Ur.offsetY;if(kr<0)return null;for(var io=Ln.filter(function(so){return wr(so,nr)===0}),Pr=nr,vo=function(di){if(io=io.filter(function(ir){return wr(ir,di)===0}),!io.length)return Pr=di,1},ks=nr;ks>=0&&!vo(ks);ks-=1);for(var us=Ln.filter(function(so){return wr(so,kr)!==1}),Da=kr,Ks=function(di){if(us=us.filter(function(ir){return wr(ir,di)!==1}),!us.length)return Da=Math.max(di-1,kr),1},ar=kr;ar<er.length&&!Ks(ar);ar+=1);for(var rs=[],os=function(di){var ir=er[di];if(!ir)return 1;Ln.some(function(fr){return wr(fr,di)>1})&&rs.push(di)},ji=Pr;ji<=Da;ji+=1)os(ji);var Nr=rs.map(function(so){var di=er[so],ir=Zn(di.record,so),fr=function(Bo){var rr=so+Bo-1,So=Zn(er[rr].record,rr),ao=gr(ir,So);return ao.bottom-ao.top},Rr=gr(ir);return Ht.createElement(ne,{key:so,data:di,rowKey:ir,index:so,style:{top:-co+Rr.top},extra:!0,getHeight:fr})});return Nr},Or=Ht.useMemo(function(){return{columnsOffset:Fr}},[Fr]),Lr="".concat(dn,"-tbody"),Xr=ln(["body","wrapper"]),He={};return qn&&(He.position="sticky",He.bottom=0,(0,Vt.Z)(qn)==="object"&&qn.offsetScroll&&(He.bottom=qn.offsetScroll)),Ht.createElement(vi.Provider,{value:Or},Ht.createElement(Wn.Z,{fullHeight:!1,ref:Mi,prefixCls:"".concat(Lr,"-virtual"),styles:{horizontalScrollBar:He},className:Lr,height:Mn,itemHeight:Un||24,data:er,itemKey:function(Ur){return Zn(Ur.record)},component:Xr,scrollWidth:fn,direction:an,onVirtualScroll:function(Ur){var nr,kr=Ur.x;Ut({currentTarget:(nr=Mi.current)===null||nr===void 0?void 0:nr.nativeElement,scrollLeft:kr})},onScroll:si,extraRender:Qr},function(xr,Ur,nr){var kr=Zn(xr.record,Ur);return Ht.createElement(ne,{data:xr,rowKey:kr,index:Ur,style:nr.style})}))}),Be=ct(Ge),cn=Be,Yn=function(un,Ue){var Ut=Ue.ref,pn=Ue.onScroll;return Ht.createElement(cn,{ref:Ut,data:un,onScroll:pn})};function Xn(Te,un){var Ue=Te.data,Ut=Te.columns,pn=Te.scroll,Ln=Te.sticky,Ai=Te.prefixCls,Zn=Ai===void 0?Vn:Ai,Tn=Te.className,dn=Te.listItemHeight,qe=Te.components,fn=Te.onScroll,an=pn||{},gn=an.x,qn=an.y;typeof gn!="number"&&(gn=1),typeof qn!="number"&&(qn=500);var Mn=(0,Ui.zX)(function(si,Mi){return(0,Bn.Z)(qe,si)||Mi}),Un=(0,Ui.zX)(fn),ln=Ht.useMemo(function(){return{sticky:Ln,scrollY:qn,listItemHeight:dn,getComponent:Mn,onScroll:Un}},[Ln,qn,dn,Mn,Un]);return Ht.createElement(Si.Provider,{value:ln},Ht.createElement(hn,(0,Wt.Z)({},Te,{className:rn()(Tn,"".concat(Zn,"-virtual")),scroll:(0,$t.Z)((0,$t.Z)({},pn),{},{x:gn}),components:(0,$t.Z)((0,$t.Z)({},qe),{},{body:Ue!=null&&Ue.length?Yn:void 0}),columns:Ut,internalHooks:Ct.R,tailor:!0,ref:un})))}var ki=Ht.forwardRef(Xn);function ii(Te){return at(ki,Te)}var be=ii(),yi=null},54451:function(xn,ze,Qt){"use strict";Qt.d(ze,{g:function(){return Ht},v:function(){return de}});var Ct=Qt(20439),ee=Qt(62646),ue=Qt(48736),Se=["expandable"],de="RC_TABLE_INTERNAL_COL_DEFINE";function Ht(ie){var Ae=ie.expandable,re=(0,ee.Z)(ie,Se),Wt;return"expandable"in ie?Wt=(0,Ct.Z)((0,Ct.Z)({},re),Ae):Wt=re,Wt.showExpandColumn===!1&&(Wt.expandIconColumnIndex=-1),Wt}},22711:function(xn,ze,Qt){"use strict";Qt.r(ze),Qt.d(ze,{ResizableTextArea:function(){return fe},default:function(){return Fn}});var Ct=Qt(14809),ee=Qt(4635),ue=Qt(20439),Se=Qt(95190),de=Qt(50298),Ht=Qt(62646),ie=Qt(92310),Ae=Qt.n(ie),re=Qt(36901),Wt=Qt(66003),Ie=Qt(30292),Xt=Qt(18929),Ee=Qt(59301),It=Qt(93664),nt=Qt(29301),et=Qt(34280),At=Qt(16089),at=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,ct=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],pt={},xt;function bt(kn){var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ti=kn.getAttribute("id")||kn.getAttribute("data-reactid")||kn.getAttribute("name");if(Gn&&pt[ti])return pt[ti];var me=window.getComputedStyle(kn),oe=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),Cn=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),li=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),ai=ct.map(function(Rn){return"".concat(Rn,":").concat(me.getPropertyValue(Rn))}).join(";"),sn={sizingStyle:ai,paddingSize:Cn,borderSize:li,boxSizing:oe};return Gn&&ti&&(pt[ti]=sn),sn}function Rt(kn){var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ti=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xt||(xt=document.createElement("textarea"),xt.setAttribute("tab-index","-1"),xt.setAttribute("aria-hidden","true"),xt.setAttribute("name","hiddenTextarea"),document.body.appendChild(xt)),kn.getAttribute("wrap")?xt.setAttribute("wrap",kn.getAttribute("wrap")):xt.removeAttribute("wrap");var oe=bt(kn,Gn),Cn=oe.paddingSize,li=oe.borderSize,ai=oe.boxSizing,sn=oe.sizingStyle;xt.setAttribute("style","".concat(sn,";").concat(at)),xt.value=kn.value||kn.placeholder||"";var Rn=void 0,ri=void 0,Ui,en=xt.scrollHeight;if(ai==="border-box"?en+=li:ai==="content-box"&&(en-=Cn),ti!==null||me!==null){xt.value=" ";var ei=xt.scrollHeight-Cn;ti!==null&&(Rn=ei*ti,ai==="border-box"&&(Rn=Rn+Cn+li),en=Math.max(Rn,en)),me!==null&&(ri=ei*me,ai==="border-box"&&(ri=ri+Cn+li),Ui=en>ri?"":"hidden",en=Math.min(ri,en))}var Fe={height:en,overflowY:Ui,resize:"none"};return Rn&&(Fe.minHeight=Rn),ri&&(Fe.maxHeight=ri),Fe}var Ot=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Vt=1,$t=2,Ce=Ee.forwardRef(function(kn,Gn){var ti=kn,me=ti.prefixCls,oe=ti.defaultValue,Cn=ti.value,li=ti.autoSize,ai=ti.onResize,sn=ti.className,Rn=ti.style,ri=ti.disabled,Ui=ti.onChange,en=ti.onInternalAutoSize,ei=(0,Ht.Z)(ti,Ot),Fe=(0,Xt.Z)(oe,{value:Cn,postState:function(Ki){return Ki!=null?Ki:""}}),ci=(0,de.Z)(Fe,2),Ti=ci[0],jt=ci[1],Mt=function(Ki){jt(Ki.target.value),Ui==null||Ui(Ki)},mt=Ee.useRef();Ee.useImperativeHandle(Gn,function(){return{textArea:mt.current}});var vt=Ee.useMemo(function(){return li&&(0,It.Z)(li)==="object"?[li.minRows,li.maxRows]:[]},[li]),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Le=!!li,xe=function(){try{if(document.activeElement===mt.current){var Ki=mt.current,_r=Ki.selectionStart,Ji=Ki.selectionEnd,Er=Ki.scrollTop;mt.current.setSelectionRange(_r,Ji),mt.current.scrollTop=Er}}catch(yr){}},Xe=Ee.useState($t),Me=(0,de.Z)(Xe,2),De=Me[0],Oe=Me[1],nn=Ee.useState(),mn=(0,de.Z)(nn,2),On=mn[0],yn=mn[1],ui=function(){Oe(Zt)};(0,et.Z)(function(){Le&&ui()},[Cn,Bt,_t,Le]),(0,et.Z)(function(){if(De===Zt)Oe(Vt);else if(De===Vt){var Ri=Rt(mt.current,!1,Bt,_t);Oe($t),yn(Ri)}else xe()},[De]);var oi=Ee.useRef(),gi=function(){At.Z.cancel(oi.current)},bi=function(Ki){De===$t&&(ai==null||ai(Ki),li&&(gi(),oi.current=(0,At.Z)(function(){ui()})))};Ee.useEffect(function(){return gi},[]);var cr=Le?On:null,Ei=(0,ue.Z)((0,ue.Z)({},Rn),cr);return(De===Zt||De===Vt)&&(Ei.overflowY="hidden",Ei.overflowX="hidden"),Ee.createElement(nt.Z,{onResize:bi,disabled:!(li||ai)},Ee.createElement("textarea",(0,Ct.Z)({},ei,{ref:mt,style:Ei,className:Ae()(me,sn,(0,ee.Z)({},"".concat(me,"-disabled"),ri)),disabled:ri,value:Ti,onChange:Mt})))}),fe=Ce,rn=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],tn=Ee.forwardRef(function(kn,Gn){var ti,me=kn.defaultValue,oe=kn.value,Cn=kn.onFocus,li=kn.onBlur,ai=kn.onChange,sn=kn.allowClear,Rn=kn.maxLength,ri=kn.onCompositionStart,Ui=kn.onCompositionEnd,en=kn.suffix,ei=kn.prefixCls,Fe=ei===void 0?"rc-textarea":ei,ci=kn.showCount,Ti=kn.count,jt=kn.className,Mt=kn.style,mt=kn.disabled,vt=kn.hidden,Lt=kn.classNames,Bt=kn.styles,_t=kn.onResize,Le=kn.onClear,xe=kn.onPressEnter,Xe=kn.readOnly,Me=kn.autoSize,De=kn.onKeyDown,Oe=(0,Ht.Z)(kn,rn),nn=(0,Xt.Z)(me,{value:oe,defaultValue:me}),mn=(0,de.Z)(nn,2),On=mn[0],yn=mn[1],ui=On==null?"":String(On),oi=Ee.useState(!1),gi=(0,de.Z)(oi,2),bi=gi[0],cr=gi[1],Ei=Ee.useRef(!1),Ri=Ee.useState(null),Ki=(0,de.Z)(Ri,2),_r=Ki[0],Ji=Ki[1],Er=(0,Ee.useRef)(null),yr=(0,Ee.useRef)(null),Vr=function(){var $i;return($i=yr.current)===null||$i===void 0?void 0:$i.textArea},Zi=function(){Vr().focus()};(0,Ee.useImperativeHandle)(Gn,function(){var fi;return{resizableTextArea:yr.current,focus:Zi,blur:function(){Vr().blur()},nativeElement:((fi=Er.current)===null||fi===void 0?void 0:fi.nativeElement)||Vr()}}),(0,Ee.useEffect)(function(){cr(function(fi){return!mt&&fi})},[mt]);var oo=Ee.useState(null),xo=(0,de.Z)(oo,2),no=xo[0],br=xo[1];Ee.useEffect(function(){if(no){var fi;(fi=Vr()).setSelectionRange.apply(fi,(0,Se.Z)(no))}},[no]);var uo=(0,Wt.Z)(Ti,ci),Tt=(ti=uo.max)!==null&&ti!==void 0?ti:Rn,Gi=Number(Tt)>0,Vi=uo.strategy(ui),xi=!!Tt&&Vi>Tt,Oi=function($i,Mr){var Br=Mr;!Ei.current&&uo.exceedFormatter&&uo.max&&uo.strategy(Mr)>uo.max&&(Br=uo.exceedFormatter(Mr,{max:uo.max}),Mr!==Br&&br([Vr().selectionStart||0,Vr().selectionEnd||0])),yn(Br),(0,Ie.rJ)($i.currentTarget,$i,ai,Br)},zi=function($i){Ei.current=!0,ri==null||ri($i)},or=function($i){Ei.current=!1,Oi($i,$i.currentTarget.value),Ui==null||Ui($i)},Yr=function($i){Oi($i,$i.target.value)},Tr=function($i){$i.key==="Enter"&&xe&&xe($i),De==null||De($i)},je=function($i){cr(!0),Cn==null||Cn($i)},Je=function($i){cr(!1),li==null||li($i)},Ke=function($i){yn(""),Zi(),(0,Ie.rJ)(Vr(),$i,ai)},Ci=en,Ne;uo.show&&(uo.showFormatter?Ne=uo.showFormatter({value:ui,count:Vi,maxLength:Tt}):Ne="".concat(Vi).concat(Gi?" / ".concat(Tt):""),Ci=Ee.createElement(Ee.Fragment,null,Ci,Ee.createElement("span",{className:Ae()("".concat(Fe,"-data-count"),Lt==null?void 0:Lt.count),style:Bt==null?void 0:Bt.count},Ne)));var Qi=function($i){var Mr;_t==null||_t($i),(Mr=Vr())!==null&&Mr!==void 0&&Mr.style.height&&Ji(!0)},Hn=!Me&&!ci&&!sn;return Ee.createElement(re.BaseInput,{ref:Er,value:ui,allowClear:sn,handleReset:Ke,suffix:Ci,prefixCls:Fe,classNames:(0,ue.Z)((0,ue.Z)({},Lt),{},{affixWrapper:Ae()(Lt==null?void 0:Lt.affixWrapper,(0,ee.Z)((0,ee.Z)({},"".concat(Fe,"-show-count"),ci),"".concat(Fe,"-textarea-allow-clear"),sn))}),disabled:mt,focused:bi,className:Ae()(jt,xi&&"".concat(Fe,"-out-of-range")),style:(0,ue.Z)((0,ue.Z)({},Mt),_r&&!Hn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ne=="string"?Ne:void 0}},hidden:vt,readOnly:Xe,onClear:Le},Ee.createElement(fe,(0,Ct.Z)({},Oe,{autoSize:Me,maxLength:Rn,onKeyDown:Tr,onChange:Yr,onFocus:je,onBlur:Je,onCompositionStart:zi,onCompositionEnd:or,className:Ae()(Lt==null?void 0:Lt.textarea),style:(0,ue.Z)((0,ue.Z)({},Bt==null?void 0:Bt.textarea),{},{resize:Mt==null?void 0:Mt.resize}),disabled:mt,prefixCls:Fe,onResize:Qi,ref:yr,readOnly:Xe})))}),Bn=tn,Fn=Bn},639:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return pt}});var Ct=Qt(14809),ee=Qt(4635),ue=Qt(20439),Se=Qt(50298),de=Qt(62646),Ht=Qt(59301),ie=Qt(92310),Ae=Qt.n(ie),re=Qt(26112),Wt=Qt(30699),Ie=function(bt){for(var Rt=bt.prefixCls,Ot=bt.level,Zt=bt.isStart,Vt=bt.isEnd,$t="".concat(Rt,"-indent-unit"),Ce=[],fe=0;fe<Ot;fe+=1)Ce.push(Ht.createElement("span",{key:fe,className:Ae()($t,(0,ee.Z)((0,ee.Z)({},"".concat($t,"-start"),Zt[fe]),"".concat($t,"-end"),Vt[fe]))}));return Ht.createElement("span",{"aria-hidden":"true",className:"".concat(Rt,"-indent")},Ce)},Xt=Ht.memo(Ie),Ee=Qt(65065),It=Qt(34061),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",At="close",at="---",ct=function(bt){var Rt,Ot,Zt,Vt=bt.eventKey,$t=bt.className,Ce=bt.style,fe=bt.dragOver,rn=bt.dragOverGapTop,tn=bt.dragOverGapBottom,Bn=bt.isLeaf,Fn=bt.isStart,kn=bt.isEnd,Gn=bt.expanded,ti=bt.selected,me=bt.checked,oe=bt.halfChecked,Cn=bt.loading,li=bt.domRef,ai=bt.active,sn=bt.data,Rn=bt.onMouseMove,ri=bt.selectable,Ui=(0,de.Z)(bt,nt),en=Ht.useContext(Wt.k),ei=Ht.useContext(Wt.y),Fe=Ht.useRef(null),ci=Ht.useState(!1),Ti=(0,Se.Z)(ci,2),jt=Ti[0],Mt=Ti[1],mt=!!(en.disabled||bt.disabled||(Rt=ei.nodeDisabled)!==null&&Rt!==void 0&&Rt.call(ei,sn)),vt=Ht.useMemo(function(){return!en.checkable||bt.checkable===!1?!1:en.checkable},[en.checkable,bt.checkable]),Lt=function(Vi){mt||en.onNodeSelect(Vi,(0,It.F)(bt))},Bt=function(Vi){mt||!vt||bt.disableCheckbox||en.onNodeCheck(Vi,(0,It.F)(bt),!me)},_t=Ht.useMemo(function(){return typeof ri=="boolean"?ri:en.selectable},[ri,en.selectable]),Le=function(Vi){en.onNodeClick(Vi,(0,It.F)(bt)),_t?Lt(Vi):Bt(Vi)},xe=function(Vi){en.onNodeDoubleClick(Vi,(0,It.F)(bt))},Xe=function(Vi){en.onNodeMouseEnter(Vi,(0,It.F)(bt))},Me=function(Vi){en.onNodeMouseLeave(Vi,(0,It.F)(bt))},De=function(Vi){en.onNodeContextMenu(Vi,(0,It.F)(bt))},Oe=Ht.useMemo(function(){return!!(en.draggable&&(!en.draggable.nodeDraggable||en.draggable.nodeDraggable(sn)))},[en.draggable,sn]),nn=function(Vi){Vi.stopPropagation(),Mt(!0),en.onNodeDragStart(Vi,bt);try{Vi.dataTransfer.setData("text/plain","")}catch(xi){}},mn=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),en.onNodeDragEnter(Vi,bt)},On=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),en.onNodeDragOver(Vi,bt)},yn=function(Vi){Vi.stopPropagation(),en.onNodeDragLeave(Vi,bt)},ui=function(Vi){Vi.stopPropagation(),Mt(!1),en.onNodeDragEnd(Vi,bt)},oi=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),Mt(!1),en.onNodeDrop(Vi,bt)},gi=function(Vi){Cn||en.onNodeExpand(Vi,(0,It.F)(bt))},bi=Ht.useMemo(function(){var Gi=(0,Ee.Z)(en.keyEntities,Vt)||{},Vi=Gi.children;return!!(Vi||[]).length},[en.keyEntities,Vt]),cr=Ht.useMemo(function(){return Bn===!1?!1:Bn||!en.loadData&&!bi||en.loadData&&bt.loaded&&!bi},[Bn,en.loadData,bi,bt.loaded]);Ht.useEffect(function(){Cn||typeof en.loadData=="function"&&Gn&&!cr&&!bt.loaded&&en.onNodeLoad((0,It.F)(bt))},[Cn,en.loadData,en.onNodeLoad,Gn,cr,bt]);var Ei=Ht.useMemo(function(){var Gi;return(Gi=en.draggable)!==null&&Gi!==void 0&&Gi.icon?Ht.createElement("span",{className:"".concat(en.prefixCls,"-draggable-icon")},en.draggable.icon):null},[en.draggable]),Ri=function(Vi){var xi=bt.switcherIcon||en.switcherIcon;return typeof xi=="function"?xi((0,ue.Z)((0,ue.Z)({},bt),{},{isLeaf:Vi})):xi},Ki=function(){if(cr){var Vi=Ri(!0);return Vi!==!1?Ht.createElement("span",{className:Ae()("".concat(en.prefixCls,"-switcher"),"".concat(en.prefixCls,"-switcher-noop"))},Vi):null}var xi=Ri(!1);return xi!==!1?Ht.createElement("span",{onClick:gi,className:Ae()("".concat(en.prefixCls,"-switcher"),"".concat(en.prefixCls,"-switcher_").concat(Gn?et:At))},xi):null},_r=Ht.useMemo(function(){if(!vt)return null;var Gi=typeof vt!="boolean"?vt:null;return Ht.createElement("span",{className:Ae()("".concat(en.prefixCls,"-checkbox"),(0,ee.Z)((0,ee.Z)((0,ee.Z)({},"".concat(en.prefixCls,"-checkbox-checked"),me),"".concat(en.prefixCls,"-checkbox-indeterminate"),!me&&oe),"".concat(en.prefixCls,"-checkbox-disabled"),mt||bt.disableCheckbox)),onClick:Bt,role:"checkbox","aria-checked":oe?"mixed":me,"aria-disabled":mt||bt.disableCheckbox,"aria-label":"Select ".concat(typeof bt.title=="string"?bt.title:"tree node")},Gi)},[vt,me,oe,mt,bt.disableCheckbox,bt.title]),Ji=Ht.useMemo(function(){return cr?null:Gn?et:At},[cr,Gn]),Er=Ht.useMemo(function(){return Ht.createElement("span",{className:Ae()("".concat(en.prefixCls,"-iconEle"),"".concat(en.prefixCls,"-icon__").concat(Ji||"docu"),(0,ee.Z)({},"".concat(en.prefixCls,"-icon_loading"),Cn))})},[en.prefixCls,Ji,Cn]),yr=Ht.useMemo(function(){var Gi=!!en.draggable,Vi=!bt.disabled&&Gi&&en.dragOverNodeKey===Vt;return Vi?en.dropIndicatorRender({dropPosition:en.dropPosition,dropLevelOffset:en.dropLevelOffset,indent:en.indent,prefixCls:en.prefixCls,direction:en.direction}):null},[en.dropPosition,en.dropLevelOffset,en.indent,en.prefixCls,en.direction,en.draggable,en.dragOverNodeKey,en.dropIndicatorRender]),Vr=Ht.useMemo(function(){var Gi=bt.title,Vi=Gi===void 0?at:Gi,xi="".concat(en.prefixCls,"-node-content-wrapper"),Oi;if(en.showIcon){var zi=bt.icon||en.icon;Oi=zi?Ht.createElement("span",{className:Ae()("".concat(en.prefixCls,"-iconEle"),"".concat(en.prefixCls,"-icon__customize"))},typeof zi=="function"?zi(bt):zi):Er}else en.loadData&&Cn&&(Oi=Er);var or;return typeof Vi=="function"?or=Vi(sn):en.titleRender?or=en.titleRender(sn):or=Vi,Ht.createElement("span",{ref:Fe,title:typeof Vi=="string"?Vi:"",className:Ae()(xi,"".concat(xi,"-").concat(Ji||"normal"),(0,ee.Z)({},"".concat(en.prefixCls,"-node-selected"),!mt&&(ti||jt))),onMouseEnter:Xe,onMouseLeave:Me,onContextMenu:De,onClick:Le,onDoubleClick:xe},Oi,Ht.createElement("span",{className:"".concat(en.prefixCls,"-title")},or),yr)},[en.prefixCls,en.showIcon,bt,en.icon,Er,en.titleRender,sn,Ji,Xe,Me,De,Le,xe]),Zi=(0,re.Z)(Ui,{aria:!0,data:!0}),oo=(0,Ee.Z)(en.keyEntities,Vt)||{},xo=oo.level,no=kn[kn.length-1],br=!mt&&Oe,uo=en.draggingNodeKey===Vt,Tt=ri!==void 0?{"aria-selected":!!ri}:void 0;return Ht.createElement("div",(0,Ct.Z)({ref:li,role:"treeitem","aria-expanded":Bn?void 0:Gn,className:Ae()($t,"".concat(en.prefixCls,"-treenode"),(Zt={},(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(Zt,"".concat(en.prefixCls,"-treenode-disabled"),mt),"".concat(en.prefixCls,"-treenode-switcher-").concat(Gn?"open":"close"),!Bn),"".concat(en.prefixCls,"-treenode-checkbox-checked"),me),"".concat(en.prefixCls,"-treenode-checkbox-indeterminate"),oe),"".concat(en.prefixCls,"-treenode-selected"),ti),"".concat(en.prefixCls,"-treenode-loading"),Cn),"".concat(en.prefixCls,"-treenode-active"),ai),"".concat(en.prefixCls,"-treenode-leaf-last"),no),"".concat(en.prefixCls,"-treenode-draggable"),Oe),"dragging",uo),(0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)((0,ee.Z)(Zt,"drop-target",en.dropTargetKey===Vt),"drop-container",en.dropContainerKey===Vt),"drag-over",!mt&&fe),"drag-over-gap-top",!mt&&rn),"drag-over-gap-bottom",!mt&&tn),"filter-node",(Ot=en.filterTreeNode)===null||Ot===void 0?void 0:Ot.call(en,(0,It.F)(bt))),"".concat(en.prefixCls,"-treenode-leaf"),cr))),style:Ce,draggable:br,onDragStart:br?nn:void 0,onDragEnter:Oe?mn:void 0,onDragOver:Oe?On:void 0,onDragLeave:Oe?yn:void 0,onDrop:Oe?oi:void 0,onDragEnd:Oe?ui:void 0,onMouseMove:Rn},Tt,Zi),Ht.createElement(Xt,{prefixCls:en.prefixCls,level:xo,isStart:Fn,isEnd:kn}),Ei,Ki(),_r,Vr)};ct.isTreeNode=1;var pt=ct},30699:function(xn,ze,Qt){"use strict";Qt.d(ze,{k:function(){return ee},y:function(){return ue}});var Ct=Qt(59301),ee=Ct.createContext(null),ue=Ct.createContext({})},29530:function(xn,ze,Qt){"use strict";Qt.d(ze,{OF:function(){return Vt.Z},y6:function(){return At.y},ZP:function(){return mt}});var Ct=Qt(14809),ee=Qt(93664),ue=Qt(20439),Se=Qt(95190),de=Qt(99153),Ht=Qt(84851),ie=Qt(13028),Ae=Qt(19257),re=Qt(93046),Wt=Qt(4635),Ie=Qt(92310),Xt=Qt.n(Ie),Ee=Qt(10228),It=Qt(26112),nt=Qt(48736),et=Qt(59301),At=Qt(30699),at=function(Lt){var Bt=Lt.dropPosition,_t=Lt.dropLevelOffset,Le=Lt.indent,xe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bt){case-1:xe.top=0,xe.left=-_t*Le;break;case 1:xe.bottom=0,xe.left=-_t*Le;break;case 0:xe.bottom=0,xe.left=Le;break}return et.createElement("div",{style:xe})},ct=at;function pt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var xt=Qt(50298),bt=Qt(62646),Rt=Qt(34280),Ot=Qt(65283),Zt=Qt(77900),Vt=Qt(639);function $t(vt,Lt){var Bt=et.useState(!1),_t=(0,xt.Z)(Bt,2),Le=_t[0],xe=_t[1];(0,Rt.Z)(function(){if(Le)return vt(),function(){Lt()}},[Le]),(0,Rt.Z)(function(){return xe(!0),function(){xe(!1)}},[])}var Ce=$t,fe=Qt(34061),rn=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],tn=et.forwardRef(function(vt,Lt){var Bt=vt.className,_t=vt.style,Le=vt.motion,xe=vt.motionNodes,Xe=vt.motionType,Me=vt.onMotionStart,De=vt.onMotionEnd,Oe=vt.active,nn=vt.treeNodeRequiredProps,mn=(0,bt.Z)(vt,rn),On=et.useState(!0),yn=(0,xt.Z)(On,2),ui=yn[0],oi=yn[1],gi=et.useContext(At.k),bi=gi.prefixCls,cr=xe&&Xe!=="hide";(0,Rt.Z)(function(){xe&&cr!==ui&&oi(cr)},[xe]);var Ei=function(){xe&&Me()},Ri=et.useRef(!1),Ki=function(){xe&&!Ri.current&&(Ri.current=!0,De())};Ce(Ei,Ki);var _r=function(Er){cr===Er&&Ki()};return xe?et.createElement(Zt.default,(0,Ct.Z)({ref:Lt,visible:ui},Le,{motionAppear:Xe==="show",onVisibleChanged:_r}),function(Ji,Er){var yr=Ji.className,Vr=Ji.style;return et.createElement("div",{ref:Er,className:Xt()("".concat(bi,"-treenode-motion"),yr),style:Vr},xe.map(function(Zi){var oo=Object.assign({},(pt(Zi.data),Zi.data)),xo=Zi.title,no=Zi.key,br=Zi.isStart,uo=Zi.isEnd;delete oo.children;var Tt=(0,fe.H8)(no,nn);return et.createElement(Vt.Z,(0,Ct.Z)({},oo,Tt,{title:xo,active:Oe,data:Zi.data,key:no,isStart:br,isEnd:uo}))}))}):et.createElement(Vt.Z,(0,Ct.Z)({domRef:Lt,className:Bt,style:_t},mn,{active:Oe}))}),Bn=tn;function Fn(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Bt=vt.length,_t=Lt.length;if(Math.abs(Bt-_t)!==1)return{add:!1,key:null};function Le(xe,Xe){var Me=new Map;xe.forEach(function(Oe){Me.set(Oe,!0)});var De=Xe.filter(function(Oe){return!Me.has(Oe)});return De.length===1?De[0]:null}return Bt<_t?{add:!0,key:Le(vt,Lt)}:{add:!1,key:Le(Lt,vt)}}function kn(vt,Lt,Bt){var _t=vt.findIndex(function(Me){return Me.key===Bt}),Le=vt[_t+1],xe=Lt.findIndex(function(Me){return Me.key===Bt});if(Le){var Xe=Lt.findIndex(function(Me){return Me.key===Le.key});return Lt.slice(xe+1,Xe)}return Lt.slice(xe+1)}var Gn=["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"],ti={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},me=function(){},oe="RC_TREE_MOTION_".concat(Math.random()),Cn={key:oe},li={key:oe,level:0,index:0,pos:"0",node:Cn,nodes:[Cn]},ai={parent:null,children:[],pos:li.pos,data:Cn,title:null,key:oe,isStart:[],isEnd:[]};function sn(vt,Lt,Bt,_t){return Lt===!1||!Bt?vt:vt.slice(0,Math.ceil(Bt/_t)+1)}function Rn(vt){var Lt=vt.key,Bt=vt.pos;return(0,fe.km)(Lt,Bt)}function ri(vt){for(var Lt=String(vt.data.key),Bt=vt;Bt.parent;)Bt=Bt.parent,Lt="".concat(Bt.data.key," > ").concat(Lt);return Lt}var Ui=et.forwardRef(function(vt,Lt){var Bt=vt.prefixCls,_t=vt.data,Le=vt.selectable,xe=vt.checkable,Xe=vt.expandedKeys,Me=vt.selectedKeys,De=vt.checkedKeys,Oe=vt.loadedKeys,nn=vt.loadingKeys,mn=vt.halfCheckedKeys,On=vt.keyEntities,yn=vt.disabled,ui=vt.dragging,oi=vt.dragOverNodeKey,gi=vt.dropPosition,bi=vt.motion,cr=vt.height,Ei=vt.itemHeight,Ri=vt.virtual,Ki=vt.scrollWidth,_r=vt.focusable,Ji=vt.activeItem,Er=vt.focused,yr=vt.tabIndex,Vr=vt.onKeyDown,Zi=vt.onFocus,oo=vt.onBlur,xo=vt.onActiveChange,no=vt.onListChangeStart,br=vt.onListChangeEnd,uo=(0,bt.Z)(vt,Gn),Tt=et.useRef(null),Gi=et.useRef(null);et.useImperativeHandle(Lt,function(){return{scrollTo:function(We){Tt.current.scrollTo(We)},getIndentWidth:function(){return Gi.current.offsetWidth}}});var Vi=et.useState(Xe),xi=(0,xt.Z)(Vi,2),Oi=xi[0],zi=xi[1],or=et.useState(_t),Yr=(0,xt.Z)(or,2),Tr=Yr[0],je=Yr[1],Je=et.useState(_t),Ke=(0,xt.Z)(Je,2),Ci=Ke[0],Ne=Ke[1],Qi=et.useState([]),Hn=(0,xt.Z)(Qi,2),fi=Hn[0],$i=Hn[1],Mr=et.useState(null),Br=(0,xt.Z)(Mr,2),te=Br[0],ke=Br[1],zn=et.useRef(_t);zn.current=_t;function ni(){var _n=zn.current;je(_n),Ne(_n),$i([]),ke(null),br()}(0,Rt.Z)(function(){zi(Xe);var _n=Fn(Oi,Xe);if(_n.key!==null)if(_n.add){var We=Tr.findIndex(function(Li){var Bi=Li.key;return Bi===_n.key}),on=sn(kn(Tr,_t,_n.key),Ri,cr,Ei),An=Tr.slice();An.splice(We+1,0,ai),Ne(An),$i(on),ke("show")}else{var Nn=_t.findIndex(function(Li){var Bi=Li.key;return Bi===_n.key}),Vn=sn(kn(_t,Tr,_n.key),Ri,cr,Ei),Yi=_t.slice();Yi.splice(Nn+1,0,ai),Ne(Yi),$i(Vn),ke("hide")}else Tr!==_t&&(je(_t),Ne(_t))},[Xe,_t]),et.useEffect(function(){ui||ni()},[ui]);var Ye=bi?Ci:_t,Kn={expandedKeys:Xe,selectedKeys:Me,loadedKeys:Oe,loadingKeys:nn,checkedKeys:De,halfCheckedKeys:mn,dragOverNodeKey:oi,dropPosition:gi,keyEntities:On};return et.createElement(et.Fragment,null,Er&&Ji&&et.createElement("span",{style:ti,"aria-live":"assertive"},ri(Ji)),et.createElement("div",null,et.createElement("input",{style:ti,disabled:_r===!1||yn,tabIndex:_r!==!1?yr:null,onKeyDown:Vr,onFocus:Zi,onBlur:oo,value:"",onChange:me,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(Bt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(Bt,"-indent")},et.createElement("div",{ref:Gi,className:"".concat(Bt,"-indent-unit")}))),et.createElement(Ot.Z,(0,Ct.Z)({},uo,{data:Ye,itemKey:Rn,height:cr,fullHeight:!1,virtual:Ri,itemHeight:Ei,scrollWidth:Ki,prefixCls:"".concat(Bt,"-list"),ref:Tt,role:"tree",onVisibleChange:function(We){We.every(function(on){return Rn(on)!==oe})&&ni()}}),function(_n){var We=_n.pos,on=Object.assign({},(pt(_n.data),_n.data)),An=_n.title,Nn=_n.key,Vn=_n.isStart,Yi=_n.isEnd,Li=(0,fe.km)(Nn,We);delete on.key,delete on.children;var Bi=(0,fe.H8)(Li,Kn);return et.createElement(Bn,(0,Ct.Z)({},on,Bi,{title:An,active:!!Ji&&Nn===Ji.key,pos:We,data:_n.data,isStart:Vn,isEnd:Yi,motion:bi,motionNodes:Nn===oe?fi:null,motionType:te,onMotionStart:no,onMotionEnd:ni,treeNodeRequiredProps:Kn,onMouseMove:function(){xo(null)}}))}))}),en=Ui,ei=Qt(82661),Fe=Qt(34643),ci=Qt(65065),Ti=10,jt=function(vt){(0,Ae.Z)(Bt,vt);var Lt=(0,re.Z)(Bt);function Bt(){var _t;(0,de.Z)(this,Bt);for(var Le=arguments.length,xe=new Array(Le),Xe=0;Xe<Le;Xe++)xe[Xe]=arguments[Xe];return _t=Lt.call.apply(Lt,[this].concat(xe)),(0,Wt.Z)((0,ie.Z)(_t),"destroyed",!1),(0,Wt.Z)((0,ie.Z)(_t),"delayedDragEnterLogic",void 0),(0,Wt.Z)((0,ie.Z)(_t),"loadingRetryTimes",{}),(0,Wt.Z)((0,ie.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,fe.w$)()}),(0,Wt.Z)((0,ie.Z)(_t),"dragStartMousePosition",null),(0,Wt.Z)((0,ie.Z)(_t),"dragNodeProps",null),(0,Wt.Z)((0,ie.Z)(_t),"currentMouseOverDroppableNodeKey",null),(0,Wt.Z)((0,ie.Z)(_t),"listRef",et.createRef()),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDragStart",function(Me,De){var Oe=_t.state,nn=Oe.expandedKeys,mn=Oe.keyEntities,On=_t.props.onDragStart,yn=De.eventKey;_t.dragNodeProps=De,_t.dragStartMousePosition={x:Me.clientX,y:Me.clientY};var ui=(0,ei._5)(nn,yn);_t.setState({draggingNodeKey:yn,dragChildrenKeys:(0,ei.wA)(yn,mn),indent:_t.listRef.current.getIndentWidth()}),_t.setExpandedKeys(ui),window.addEventListener("dragend",_t.onWindowDragEnd),On==null||On({event:Me,node:(0,fe.F)(De)})}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDragEnter",function(Me,De){var Oe=_t.state,nn=Oe.expandedKeys,mn=Oe.keyEntities,On=Oe.dragChildrenKeys,yn=Oe.flattenNodes,ui=Oe.indent,oi=_t.props,gi=oi.onDragEnter,bi=oi.onExpand,cr=oi.allowDrop,Ei=oi.direction,Ri=De.pos,Ki=De.eventKey;if(_t.currentMouseOverDroppableNodeKey!==Ki&&(_t.currentMouseOverDroppableNodeKey=Ki),!_t.dragNodeProps){_t.resetDragState();return}var _r=(0,ei.OM)(Me,_t.dragNodeProps,De,ui,_t.dragStartMousePosition,cr,yn,mn,nn,Ei),Ji=_r.dropPosition,Er=_r.dropLevelOffset,yr=_r.dropTargetKey,Vr=_r.dropContainerKey,Zi=_r.dropTargetPos,oo=_r.dropAllowed,xo=_r.dragOverNodeKey;if(On.includes(yr)||!oo){_t.resetDragState();return}if(_t.delayedDragEnterLogic||(_t.delayedDragEnterLogic={}),Object.keys(_t.delayedDragEnterLogic).forEach(function(no){clearTimeout(_t.delayedDragEnterLogic[no])}),_t.dragNodeProps.eventKey!==De.eventKey&&(Me.persist(),_t.delayedDragEnterLogic[Ri]=window.setTimeout(function(){if(_t.state.draggingNodeKey!==null){var no=(0,Se.Z)(nn),br=(0,ci.Z)(mn,De.eventKey);br&&(br.children||[]).length&&(no=(0,ei.L0)(nn,De.eventKey)),_t.props.hasOwnProperty("expandedKeys")||_t.setExpandedKeys(no),bi==null||bi(no,{node:(0,fe.F)(De),expanded:!0,nativeEvent:Me.nativeEvent})}},800)),_t.dragNodeProps.eventKey===yr&&Er===0){_t.resetDragState();return}_t.setState({dragOverNodeKey:xo,dropPosition:Ji,dropLevelOffset:Er,dropTargetKey:yr,dropContainerKey:Vr,dropTargetPos:Zi,dropAllowed:oo}),gi==null||gi({event:Me,node:(0,fe.F)(De),expandedKeys:nn})}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDragOver",function(Me,De){var Oe=_t.state,nn=Oe.dragChildrenKeys,mn=Oe.flattenNodes,On=Oe.keyEntities,yn=Oe.expandedKeys,ui=Oe.indent,oi=_t.props,gi=oi.onDragOver,bi=oi.allowDrop,cr=oi.direction;if(_t.dragNodeProps){var Ei=(0,ei.OM)(Me,_t.dragNodeProps,De,ui,_t.dragStartMousePosition,bi,mn,On,yn,cr),Ri=Ei.dropPosition,Ki=Ei.dropLevelOffset,_r=Ei.dropTargetKey,Ji=Ei.dropContainerKey,Er=Ei.dropTargetPos,yr=Ei.dropAllowed,Vr=Ei.dragOverNodeKey;nn.includes(_r)||!yr||(_t.dragNodeProps.eventKey===_r&&Ki===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():Ri===_t.state.dropPosition&&Ki===_t.state.dropLevelOffset&&_r===_t.state.dropTargetKey&&Ji===_t.state.dropContainerKey&&Er===_t.state.dropTargetPos&&yr===_t.state.dropAllowed&&Vr===_t.state.dragOverNodeKey||_t.setState({dropPosition:Ri,dropLevelOffset:Ki,dropTargetKey:_r,dropContainerKey:Ji,dropTargetPos:Er,dropAllowed:yr,dragOverNodeKey:Vr}),gi==null||gi({event:Me,node:(0,fe.F)(De)}))}}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDragLeave",function(Me,De){_t.currentMouseOverDroppableNodeKey===De.eventKey&&!Me.currentTarget.contains(Me.relatedTarget)&&(_t.resetDragState(),_t.currentMouseOverDroppableNodeKey=null);var Oe=_t.props.onDragLeave;Oe==null||Oe({event:Me,node:(0,fe.F)(De)})}),(0,Wt.Z)((0,ie.Z)(_t),"onWindowDragEnd",function(Me){_t.onNodeDragEnd(Me,null,!0),window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDragEnd",function(Me,De){var Oe=_t.props.onDragEnd;_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Oe==null||Oe({event:Me,node:(0,fe.F)(De)}),_t.dragNodeProps=null,window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDrop",function(Me,De){var Oe,nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,mn=_t.state,On=mn.dragChildrenKeys,yn=mn.dropPosition,ui=mn.dropTargetKey,oi=mn.dropTargetPos,gi=mn.dropAllowed;if(gi){var bi=_t.props.onDrop;if(_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),ui!==null){var cr=(0,ue.Z)((0,ue.Z)({},(0,fe.H8)(ui,_t.getTreeNodeRequiredProps())),{},{active:((Oe=_t.getActiveItem())===null||Oe===void 0?void 0:Oe.key)===ui,data:(0,ci.Z)(_t.state.keyEntities,ui).node}),Ei=On.includes(ui);(0,nt.ZP)(!Ei,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ri=(0,ei.yx)(oi),Ki={event:Me,node:(0,fe.F)(cr),dragNode:_t.dragNodeProps?(0,fe.F)(_t.dragNodeProps):null,dragNodesKeys:[_t.dragNodeProps.eventKey].concat(On),dropToGap:yn!==0,dropPosition:yn+Number(Ri[Ri.length-1])};nn||bi==null||bi(Ki),_t.dragNodeProps=null}}}),(0,Wt.Z)((0,ie.Z)(_t),"cleanDragState",function(){var Me=_t.state.draggingNodeKey;Me!==null&&_t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_t.dragStartMousePosition=null,_t.currentMouseOverDroppableNodeKey=null}),(0,Wt.Z)((0,ie.Z)(_t),"triggerExpandActionExpand",function(Me,De){var Oe=_t.state,nn=Oe.expandedKeys,mn=Oe.flattenNodes,On=De.expanded,yn=De.key,ui=De.isLeaf;if(!(ui||Me.shiftKey||Me.metaKey||Me.ctrlKey)){var oi=mn.filter(function(bi){return bi.key===yn})[0],gi=(0,fe.F)((0,ue.Z)((0,ue.Z)({},(0,fe.H8)(yn,_t.getTreeNodeRequiredProps())),{},{data:oi.data}));_t.setExpandedKeys(On?(0,ei._5)(nn,yn):(0,ei.L0)(nn,yn)),_t.onNodeExpand(Me,gi)}}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeClick",function(Me,De){var Oe=_t.props,nn=Oe.onClick,mn=Oe.expandAction;mn==="click"&&_t.triggerExpandActionExpand(Me,De),nn==null||nn(Me,De)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeDoubleClick",function(Me,De){var Oe=_t.props,nn=Oe.onDoubleClick,mn=Oe.expandAction;mn==="doubleClick"&&_t.triggerExpandActionExpand(Me,De),nn==null||nn(Me,De)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeSelect",function(Me,De){var Oe=_t.state.selectedKeys,nn=_t.state,mn=nn.keyEntities,On=nn.fieldNames,yn=_t.props,ui=yn.onSelect,oi=yn.multiple,gi=De.selected,bi=De[On.key],cr=!gi;cr?oi?Oe=(0,ei.L0)(Oe,bi):Oe=[bi]:Oe=(0,ei._5)(Oe,bi);var Ei=Oe.map(function(Ri){var Ki=(0,ci.Z)(mn,Ri);return Ki?Ki.node:null}).filter(Boolean);_t.setUncontrolledState({selectedKeys:Oe}),ui==null||ui(Oe,{event:"select",selected:cr,node:De,selectedNodes:Ei,nativeEvent:Me.nativeEvent})}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeCheck",function(Me,De,Oe){var nn=_t.state,mn=nn.keyEntities,On=nn.checkedKeys,yn=nn.halfCheckedKeys,ui=_t.props,oi=ui.checkStrictly,gi=ui.onCheck,bi=De.key,cr,Ei={event:"check",node:De,checked:Oe,nativeEvent:Me.nativeEvent};if(oi){var Ri=Oe?(0,ei.L0)(On,bi):(0,ei._5)(On,bi),Ki=(0,ei._5)(yn,bi);cr={checked:Ri,halfChecked:Ki},Ei.checkedNodes=Ri.map(function(Zi){return(0,ci.Z)(mn,Zi)}).filter(Boolean).map(function(Zi){return Zi.node}),_t.setUncontrolledState({checkedKeys:Ri})}else{var _r=(0,Fe.S)([].concat((0,Se.Z)(On),[bi]),!0,mn),Ji=_r.checkedKeys,Er=_r.halfCheckedKeys;if(!Oe){var yr=new Set(Ji);yr.delete(bi);var Vr=(0,Fe.S)(Array.from(yr),{checked:!1,halfCheckedKeys:Er},mn);Ji=Vr.checkedKeys,Er=Vr.halfCheckedKeys}cr=Ji,Ei.checkedNodes=[],Ei.checkedNodesPositions=[],Ei.halfCheckedKeys=Er,Ji.forEach(function(Zi){var oo=(0,ci.Z)(mn,Zi);if(oo){var xo=oo.node,no=oo.pos;Ei.checkedNodes.push(xo),Ei.checkedNodesPositions.push({node:xo,pos:no})}}),_t.setUncontrolledState({checkedKeys:Ji},!1,{halfCheckedKeys:Er})}gi==null||gi(cr,Ei)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeLoad",function(Me){var De,Oe=Me.key,nn=_t.state.keyEntities,mn=(0,ci.Z)(nn,Oe);if(!(mn!=null&&(De=mn.children)!==null&&De!==void 0&&De.length)){var On=new Promise(function(yn,ui){_t.setState(function(oi){var gi=oi.loadedKeys,bi=gi===void 0?[]:gi,cr=oi.loadingKeys,Ei=cr===void 0?[]:cr,Ri=_t.props,Ki=Ri.loadData,_r=Ri.onLoad;if(!Ki||bi.includes(Oe)||Ei.includes(Oe))return null;var Ji=Ki(Me);return Ji.then(function(){var Er=_t.state.loadedKeys,yr=(0,ei.L0)(Er,Oe);_r==null||_r(yr,{event:"load",node:Me}),_t.setUncontrolledState({loadedKeys:yr}),_t.setState(function(Vr){return{loadingKeys:(0,ei._5)(Vr.loadingKeys,Oe)}}),yn()}).catch(function(Er){if(_t.setState(function(Vr){return{loadingKeys:(0,ei._5)(Vr.loadingKeys,Oe)}}),_t.loadingRetryTimes[Oe]=(_t.loadingRetryTimes[Oe]||0)+1,_t.loadingRetryTimes[Oe]>=Ti){var yr=_t.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_t.setUncontrolledState({loadedKeys:(0,ei.L0)(yr,Oe)}),yn()}ui(Er)}),{loadingKeys:(0,ei.L0)(Ei,Oe)}})});return On.catch(function(){}),On}}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeMouseEnter",function(Me,De){var Oe=_t.props.onMouseEnter;Oe==null||Oe({event:Me,node:De})}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeMouseLeave",function(Me,De){var Oe=_t.props.onMouseLeave;Oe==null||Oe({event:Me,node:De})}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeContextMenu",function(Me,De){var Oe=_t.props.onRightClick;Oe&&(Me.preventDefault(),Oe({event:Me,node:De}))}),(0,Wt.Z)((0,ie.Z)(_t),"onFocus",function(){var Me=_t.props.onFocus;_t.setState({focused:!0});for(var De=arguments.length,Oe=new Array(De),nn=0;nn<De;nn++)Oe[nn]=arguments[nn];Me==null||Me.apply(void 0,Oe)}),(0,Wt.Z)((0,ie.Z)(_t),"onBlur",function(){var Me=_t.props.onBlur;_t.setState({focused:!1}),_t.onActiveChange(null);for(var De=arguments.length,Oe=new Array(De),nn=0;nn<De;nn++)Oe[nn]=arguments[nn];Me==null||Me.apply(void 0,Oe)}),(0,Wt.Z)((0,ie.Z)(_t),"getTreeNodeRequiredProps",function(){var Me=_t.state,De=Me.expandedKeys,Oe=Me.selectedKeys,nn=Me.loadedKeys,mn=Me.loadingKeys,On=Me.checkedKeys,yn=Me.halfCheckedKeys,ui=Me.dragOverNodeKey,oi=Me.dropPosition,gi=Me.keyEntities;return{expandedKeys:De||[],selectedKeys:Oe||[],loadedKeys:nn||[],loadingKeys:mn||[],checkedKeys:On||[],halfCheckedKeys:yn||[],dragOverNodeKey:ui,dropPosition:oi,keyEntities:gi}}),(0,Wt.Z)((0,ie.Z)(_t),"setExpandedKeys",function(Me){var De=_t.state,Oe=De.treeData,nn=De.fieldNames,mn=(0,fe.oH)(Oe,Me,nn);_t.setUncontrolledState({expandedKeys:Me,flattenNodes:mn},!0)}),(0,Wt.Z)((0,ie.Z)(_t),"onNodeExpand",function(Me,De){var Oe=_t.state.expandedKeys,nn=_t.state,mn=nn.listChanging,On=nn.fieldNames,yn=_t.props,ui=yn.onExpand,oi=yn.loadData,gi=De.expanded,bi=De[On.key];if(!mn){var cr=Oe.includes(bi),Ei=!gi;if((0,nt.ZP)(gi&&cr||!gi&&!cr,"Expand state not sync with index check"),Oe=Ei?(0,ei.L0)(Oe,bi):(0,ei._5)(Oe,bi),_t.setExpandedKeys(Oe),ui==null||ui(Oe,{node:De,expanded:Ei,nativeEvent:Me.nativeEvent}),Ei&&oi){var Ri=_t.onNodeLoad(De);Ri&&Ri.then(function(){var Ki=(0,fe.oH)(_t.state.treeData,Oe,On);_t.setUncontrolledState({flattenNodes:Ki})}).catch(function(){var Ki=_t.state.expandedKeys,_r=(0,ei._5)(Ki,bi);_t.setExpandedKeys(_r)})}}}),(0,Wt.Z)((0,ie.Z)(_t),"onListChangeStart",function(){_t.setUncontrolledState({listChanging:!0})}),(0,Wt.Z)((0,ie.Z)(_t),"onListChangeEnd",function(){setTimeout(function(){_t.setUncontrolledState({listChanging:!1})})}),(0,Wt.Z)((0,ie.Z)(_t),"onActiveChange",function(Me){var De=_t.state.activeKey,Oe=_t.props,nn=Oe.onActiveChange,mn=Oe.itemScrollOffset,On=mn===void 0?0:mn;De!==Me&&(_t.setState({activeKey:Me}),Me!==null&&_t.scrollTo({key:Me,offset:On}),nn==null||nn(Me))}),(0,Wt.Z)((0,ie.Z)(_t),"getActiveItem",function(){var Me=_t.state,De=Me.activeKey,Oe=Me.flattenNodes;return De===null?null:Oe.find(function(nn){var mn=nn.key;return mn===De})||null}),(0,Wt.Z)((0,ie.Z)(_t),"offsetActiveKey",function(Me){var De=_t.state,Oe=De.flattenNodes,nn=De.activeKey,mn=Oe.findIndex(function(ui){var oi=ui.key;return oi===nn});mn===-1&&Me<0&&(mn=Oe.length),mn=(mn+Me+Oe.length)%Oe.length;var On=Oe[mn];if(On){var yn=On.key;_t.onActiveChange(yn)}else _t.onActiveChange(null)}),(0,Wt.Z)((0,ie.Z)(_t),"onKeyDown",function(Me){var De=_t.state,Oe=De.activeKey,nn=De.expandedKeys,mn=De.checkedKeys,On=De.fieldNames,yn=_t.props,ui=yn.onKeyDown,oi=yn.checkable,gi=yn.selectable;switch(Me.which){case Ee.Z.UP:{_t.offsetActiveKey(-1),Me.preventDefault();break}case Ee.Z.DOWN:{_t.offsetActiveKey(1),Me.preventDefault();break}}var bi=_t.getActiveItem();if(bi&&bi.data){var cr=_t.getTreeNodeRequiredProps(),Ei=bi.data.isLeaf===!1||!!(bi.data[On.children]||[]).length,Ri=(0,fe.F)((0,ue.Z)((0,ue.Z)({},(0,fe.H8)(Oe,cr)),{},{data:bi.data,active:!0}));switch(Me.which){case Ee.Z.LEFT:{Ei&&nn.includes(Oe)?_t.onNodeExpand({},Ri):bi.parent&&_t.onActiveChange(bi.parent.key),Me.preventDefault();break}case Ee.Z.RIGHT:{Ei&&!nn.includes(Oe)?_t.onNodeExpand({},Ri):bi.children&&bi.children.length&&_t.onActiveChange(bi.children[0].key),Me.preventDefault();break}case Ee.Z.ENTER:case Ee.Z.SPACE:{oi&&!Ri.disabled&&Ri.checkable!==!1&&!Ri.disableCheckbox?_t.onNodeCheck({},Ri,!mn.includes(Oe)):!oi&&gi&&!Ri.disabled&&Ri.selectable!==!1&&_t.onNodeSelect({},Ri);break}}}ui==null||ui(Me)}),(0,Wt.Z)((0,ie.Z)(_t),"setUncontrolledState",function(Me){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_t.destroyed){var nn=!1,mn=!0,On={};Object.keys(Me).forEach(function(yn){if(_t.props.hasOwnProperty(yn)){mn=!1;return}nn=!0,On[yn]=Me[yn]}),nn&&(!De||mn)&&_t.setState((0,ue.Z)((0,ue.Z)({},On),Oe))}}),(0,Wt.Z)((0,ie.Z)(_t),"scrollTo",function(Me){_t.listRef.current.scrollTo(Me)}),_t}return(0,Ht.Z)(Bt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Le=this.props,xe=Le.activeKey,Xe=Le.itemScrollOffset,Me=Xe===void 0?0:Xe;xe!==void 0&&xe!==this.state.activeKey&&(this.setState({activeKey:xe}),xe!==null&&this.scrollTo({key:xe,offset:Me}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Le=this.state,xe=Le.focused,Xe=Le.flattenNodes,Me=Le.keyEntities,De=Le.draggingNodeKey,Oe=Le.activeKey,nn=Le.dropLevelOffset,mn=Le.dropContainerKey,On=Le.dropTargetKey,yn=Le.dropPosition,ui=Le.dragOverNodeKey,oi=Le.indent,gi=this.props,bi=gi.prefixCls,cr=gi.className,Ei=gi.style,Ri=gi.showLine,Ki=gi.focusable,_r=gi.tabIndex,Ji=_r===void 0?0:_r,Er=gi.selectable,yr=gi.showIcon,Vr=gi.icon,Zi=gi.switcherIcon,oo=gi.draggable,xo=gi.checkable,no=gi.checkStrictly,br=gi.disabled,uo=gi.motion,Tt=gi.loadData,Gi=gi.filterTreeNode,Vi=gi.height,xi=gi.itemHeight,Oi=gi.scrollWidth,zi=gi.virtual,or=gi.titleRender,Yr=gi.dropIndicatorRender,Tr=gi.onContextMenu,je=gi.onScroll,Je=gi.direction,Ke=gi.rootClassName,Ci=gi.rootStyle,Ne=(0,It.Z)(this.props,{aria:!0,data:!0}),Qi;oo&&((0,ee.Z)(oo)==="object"?Qi=oo:typeof oo=="function"?Qi={nodeDraggable:oo}:Qi={});var Hn={prefixCls:bi,selectable:Er,showIcon:yr,icon:Vr,switcherIcon:Zi,draggable:Qi,draggingNodeKey:De,checkable:xo,checkStrictly:no,disabled:br,keyEntities:Me,dropLevelOffset:nn,dropContainerKey:mn,dropTargetKey:On,dropPosition:yn,dragOverNodeKey:ui,indent:oi,direction:Je,dropIndicatorRender:Yr,loadData:Tt,filterTreeNode:Gi,titleRender:or,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(At.k.Provider,{value:Hn},et.createElement("div",{className:Xt()(bi,cr,Ke,(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)({},"".concat(bi,"-show-line"),Ri),"".concat(bi,"-focused"),xe),"".concat(bi,"-active-focused"),Oe!==null)),style:Ci},et.createElement(en,(0,Ct.Z)({ref:this.listRef,prefixCls:bi,style:Ei,data:Xe,disabled:br,selectable:Er,checkable:!!xo,motion:uo,dragging:De!==null,height:Vi,itemHeight:xi,virtual:zi,focusable:Ki,focused:xe,tabIndex:Ji,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Tr,onScroll:je,scrollWidth:Oi},this.getTreeNodeRequiredProps(),Ne))))}}],[{key:"getDerivedStateFromProps",value:function(Le,xe){var Xe=xe.prevProps,Me={prevProps:Le};function De(Ji){return!Xe&&Le.hasOwnProperty(Ji)||Xe&&Xe[Ji]!==Le[Ji]}var Oe,nn=xe.fieldNames;if(De("fieldNames")&&(nn=(0,fe.w$)(Le.fieldNames),Me.fieldNames=nn),De("treeData")?Oe=Le.treeData:De("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Oe=(0,fe.zn)(Le.children)),Oe){Me.treeData=Oe;var mn=(0,fe.I8)(Oe,{fieldNames:nn});Me.keyEntities=(0,ue.Z)((0,Wt.Z)({},oe,li),mn.keyEntities)}var On=Me.keyEntities||xe.keyEntities;if(De("expandedKeys")||Xe&&De("autoExpandParent"))Me.expandedKeys=Le.autoExpandParent||!Xe&&Le.defaultExpandParent?(0,ei.r7)(Le.expandedKeys,On):Le.expandedKeys;else if(!Xe&&Le.defaultExpandAll){var yn=(0,ue.Z)({},On);delete yn[oe];var ui=[];Object.keys(yn).forEach(function(Ji){var Er=yn[Ji];Er.children&&Er.children.length&&ui.push(Er.key)}),Me.expandedKeys=ui}else!Xe&&Le.defaultExpandedKeys&&(Me.expandedKeys=Le.autoExpandParent||Le.defaultExpandParent?(0,ei.r7)(Le.defaultExpandedKeys,On):Le.defaultExpandedKeys);if(Me.expandedKeys||delete Me.expandedKeys,Oe||Me.expandedKeys){var oi=(0,fe.oH)(Oe||xe.treeData,Me.expandedKeys||xe.expandedKeys,nn);Me.flattenNodes=oi}if(Le.selectable&&(De("selectedKeys")?Me.selectedKeys=(0,ei.BT)(Le.selectedKeys,Le):!Xe&&Le.defaultSelectedKeys&&(Me.selectedKeys=(0,ei.BT)(Le.defaultSelectedKeys,Le))),Le.checkable){var gi;if(De("checkedKeys")?gi=(0,ei.E6)(Le.checkedKeys)||{}:!Xe&&Le.defaultCheckedKeys?gi=(0,ei.E6)(Le.defaultCheckedKeys)||{}:Oe&&(gi=(0,ei.E6)(Le.checkedKeys)||{checkedKeys:xe.checkedKeys,halfCheckedKeys:xe.halfCheckedKeys}),gi){var bi=gi,cr=bi.checkedKeys,Ei=cr===void 0?[]:cr,Ri=bi.halfCheckedKeys,Ki=Ri===void 0?[]:Ri;if(!Le.checkStrictly){var _r=(0,Fe.S)(Ei,!0,On);Ei=_r.checkedKeys,Ki=_r.halfCheckedKeys}Me.checkedKeys=Ei,Me.halfCheckedKeys=Ki}}return De("loadedKeys")&&(Me.loadedKeys=Le.loadedKeys),Me}}]),Bt}(et.Component);(0,Wt.Z)(jt,"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:ct,allowDrop:function(){return!0},expandAction:!1}),(0,Wt.Z)(jt,"TreeNode",Vt.Z);var Mt=jt,mt=Mt},82661:function(xn,ze,Qt){"use strict";Qt.d(ze,{BT:function(){return et},E6:function(){return ct},L0:function(){return Wt},OM:function(){return nt},_5:function(){return re},r7:function(){return pt},wA:function(){return Xt},yx:function(){return Ie}});var Ct=Qt(95190),ee=Qt(93664),ue=Qt(48736),Se=Qt(59301),de=Qt(639),Ht=Qt(65065),ie=Qt(34061),Ae=null;function re(xt,bt){if(!xt)return[];var Rt=xt.slice(),Ot=Rt.indexOf(bt);return Ot>=0&&Rt.splice(Ot,1),Rt}function Wt(xt,bt){var Rt=(xt||[]).slice();return Rt.indexOf(bt)===-1&&Rt.push(bt),Rt}function Ie(xt){return xt.split("-")}function Xt(xt,bt){var Rt=[],Ot=(0,Ht.Z)(bt,xt);function Zt(){var Vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Vt.forEach(function($t){var Ce=$t.key,fe=$t.children;Rt.push(Ce),Zt(fe)})}return Zt(Ot.children),Rt}function Ee(xt){if(xt.parent){var bt=Ie(xt.pos);return Number(bt[bt.length-1])===xt.parent.children.length-1}return!1}function It(xt){var bt=Ie(xt.pos);return Number(bt[bt.length-1])===0}function nt(xt,bt,Rt,Ot,Zt,Vt,$t,Ce,fe,rn){var tn,Bn=xt.clientX,Fn=xt.clientY,kn=xt.target.getBoundingClientRect(),Gn=kn.top,ti=kn.height,me=(rn==="rtl"?-1:1)*(((Zt==null?void 0:Zt.x)||0)-Bn),oe=(me-12)/Ot,Cn=fe.filter(function(mt){var vt;return(vt=Ce[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),li=(0,Ht.Z)(Ce,Rt.eventKey);if(Fn<Gn+ti/2){var ai=$t.findIndex(function(mt){return mt.key===li.key}),sn=ai<=0?0:ai-1,Rn=$t[sn].key;li=(0,Ht.Z)(Ce,Rn)}var ri=li.key,Ui=li,en=li.key,ei=0,Fe=0;if(!Cn.includes(ri))for(var ci=0;ci<oe&&Ee(li);ci+=1)li=li.parent,Fe+=1;var Ti=bt.data,jt=li.node,Mt=!0;return It(li)&&li.level===0&&Fn<Gn+ti/2&&Vt({dragNode:Ti,dropNode:jt,dropPosition:-1})&&li.key===Rt.eventKey?ei=-1:(Ui.children||[]).length&&Cn.includes(en)?Vt({dragNode:Ti,dropNode:jt,dropPosition:0})?ei=0:Mt=!1:Fe===0?oe>-1.5?Vt({dragNode:Ti,dropNode:jt,dropPosition:1})?ei=1:Mt=!1:Vt({dragNode:Ti,dropNode:jt,dropPosition:0})?ei=0:Vt({dragNode:Ti,dropNode:jt,dropPosition:1})?ei=1:Mt=!1:Vt({dragNode:Ti,dropNode:jt,dropPosition:1})?ei=1:Mt=!1,{dropPosition:ei,dropLevelOffset:Fe,dropTargetKey:li.key,dropTargetPos:li.pos,dragOverNodeKey:en,dropContainerKey:ei===0?null:((tn=li.parent)===null||tn===void 0?void 0:tn.key)||null,dropAllowed:Mt}}function et(xt,bt){if(xt){var Rt=bt.multiple;return Rt?xt.slice():xt.length?[xt[0]]:xt}}var At=function(bt){return bt};function at(xt,bt){if(!xt)return[];var Rt=bt||{},Ot=Rt.processProps,Zt=Ot===void 0?At:Ot,Vt=Array.isArray(xt)?xt:[xt];return Vt.map(function($t){var Ce=$t.children,fe=_objectWithoutProperties($t,Ae),rn=at(Ce,bt);return React.createElement(TreeNode,_extends({key:fe.key},Zt(fe)),rn)})}function ct(xt){if(!xt)return null;var bt;if(Array.isArray(xt))bt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,ee.Z)(xt)==="object")bt={checkedKeys:xt.checked||void 0,halfCheckedKeys:xt.halfChecked||void 0};else return(0,ue.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return bt}function pt(xt,bt){var Rt=new Set;function Ot(Zt){if(!Rt.has(Zt)){var Vt=(0,Ht.Z)(bt,Zt);if(Vt){Rt.add(Zt);var $t=Vt.parent,Ce=Vt.node;Ce.disabled||$t&&Ot($t.key)}}}return(xt||[]).forEach(function(Zt){Ot(Zt)}),(0,Ct.Z)(Rt)}},34643:function(xn,ze,Qt){"use strict";Qt.d(ze,{S:function(){return ie}});var Ct=Qt(48736),ee=Qt(65065);function ue(Ae,re){var Wt=new Set;return Ae.forEach(function(Ie){re.has(Ie)||Wt.add(Ie)}),Wt}function Se(Ae){var re=Ae||{},Wt=re.disabled,Ie=re.disableCheckbox,Xt=re.checkable;return!!(Wt||Ie)||Xt===!1}function de(Ae,re,Wt,Ie){for(var Xt=new Set(Ae),Ee=new Set,It=0;It<=Wt;It+=1){var nt=re.get(It)||new Set;nt.forEach(function(ct){var pt=ct.key,xt=ct.node,bt=ct.children,Rt=bt===void 0?[]:bt;Xt.has(pt)&&!Ie(xt)&&Rt.filter(function(Ot){return!Ie(Ot.node)}).forEach(function(Ot){Xt.add(Ot.key)})})}for(var et=new Set,At=Wt;At>=0;At-=1){var at=re.get(At)||new Set;at.forEach(function(ct){var pt=ct.parent,xt=ct.node;if(!(Ie(xt)||!ct.parent||et.has(ct.parent.key))){if(Ie(ct.parent.node)){et.add(pt.key);return}var bt=!0,Rt=!1;(pt.children||[]).filter(function(Ot){return!Ie(Ot.node)}).forEach(function(Ot){var Zt=Ot.key,Vt=Xt.has(Zt);bt&&!Vt&&(bt=!1),!Rt&&(Vt||Ee.has(Zt))&&(Rt=!0)}),bt&&Xt.add(pt.key),Rt&&Ee.add(pt.key),et.add(pt.key)}})}return{checkedKeys:Array.from(Xt),halfCheckedKeys:Array.from(ue(Ee,Xt))}}function Ht(Ae,re,Wt,Ie,Xt){for(var Ee=new Set(Ae),It=new Set(re),nt=0;nt<=Ie;nt+=1){var et=Wt.get(nt)||new Set;et.forEach(function(pt){var xt=pt.key,bt=pt.node,Rt=pt.children,Ot=Rt===void 0?[]:Rt;!Ee.has(xt)&&!It.has(xt)&&!Xt(bt)&&Ot.filter(function(Zt){return!Xt(Zt.node)}).forEach(function(Zt){Ee.delete(Zt.key)})})}It=new Set;for(var At=new Set,at=Ie;at>=0;at-=1){var ct=Wt.get(at)||new Set;ct.forEach(function(pt){var xt=pt.parent,bt=pt.node;if(!(Xt(bt)||!pt.parent||At.has(pt.parent.key))){if(Xt(pt.parent.node)){At.add(xt.key);return}var Rt=!0,Ot=!1;(xt.children||[]).filter(function(Zt){return!Xt(Zt.node)}).forEach(function(Zt){var Vt=Zt.key,$t=Ee.has(Vt);Rt&&!$t&&(Rt=!1),!Ot&&($t||It.has(Vt))&&(Ot=!0)}),Rt||Ee.delete(xt.key),Ot&&It.add(xt.key),At.add(xt.key)}})}return{checkedKeys:Array.from(Ee),halfCheckedKeys:Array.from(ue(It,Ee))}}function ie(Ae,re,Wt,Ie){var Xt=[],Ee;Ie?Ee=Ie:Ee=Se;var It=new Set(Ae.filter(function(at){var ct=!!(0,ee.Z)(Wt,at);return ct||Xt.push(at),ct})),nt=new Map,et=0;Object.keys(Wt).forEach(function(at){var ct=Wt[at],pt=ct.level,xt=nt.get(pt);xt||(xt=new Set,nt.set(pt,xt)),xt.add(ct),et=Math.max(et,pt)}),(0,Ct.ZP)(!Xt.length,"Tree missing follow keys: ".concat(Xt.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var At;return re===!0?At=de(It,nt,et,Ee):At=Ht(It,re.halfCheckedKeys,nt,et,Ee),At}},65065:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ct}});function Ct(ee,ue){return ee[ue]}},34061:function(xn,ze,Qt){"use strict";Qt.d(ze,{F:function(){return pt},H8:function(){return ct},I8:function(){return at},km:function(){return Xt},oH:function(){return et},w$:function(){return Ee},zn:function(){return nt}});var Ct=Qt(93664),ee=Qt(95190),ue=Qt(20439),Se=Qt(62646),de=Qt(11592),Ht=Qt(2738),ie=Qt(48736),Ae=Qt(65065),re=["children"];function Wt(xt,bt){return"".concat(xt,"-").concat(bt)}function Ie(xt){return xt&&xt.type&&xt.type.isTreeNode}function Xt(xt,bt){return xt!=null?xt:bt}function Ee(xt){var bt=xt||{},Rt=bt.title,Ot=bt._title,Zt=bt.key,Vt=bt.children,$t=Rt||"title";return{title:$t,_title:Ot||[$t],key:Zt||"key",children:Vt||"children"}}function It(xt,bt){var Rt=new Map;function Ot(Zt){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Zt||[]).forEach(function($t){var Ce=$t[bt.key],fe=$t[bt.children];warning(Ce!=null,"Tree node must have a certain key: [".concat(Vt).concat(Ce,"]"));var rn=String(Ce);warning(!Rt.has(rn)||Ce===null||Ce===void 0,"Same 'key' exist in the Tree: ".concat(rn)),Rt.set(rn,!0),Ot(fe,"".concat(Vt).concat(rn," > "))})}Ot(xt)}function nt(xt){function bt(Rt){var Ot=(0,de.Z)(Rt);return Ot.map(function(Zt){if(!Ie(Zt))return(0,ie.ZP)(!Zt,"Tree/TreeNode can only accept TreeNode as children."),null;var Vt=Zt.key,$t=Zt.props,Ce=$t.children,fe=(0,Se.Z)($t,re),rn=(0,ue.Z)({key:Vt},fe),tn=bt(Ce);return tn.length&&(rn.children=tn),rn}).filter(function(Zt){return Zt})}return bt(xt)}function et(xt,bt,Rt){var Ot=Ee(Rt),Zt=Ot._title,Vt=Ot.key,$t=Ot.children,Ce=new Set(bt===!0?[]:bt),fe=[];function rn(tn){var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return tn.map(function(Fn,kn){for(var Gn=Wt(Bn?Bn.pos:"0",kn),ti=Xt(Fn[Vt],Gn),me,oe=0;oe<Zt.length;oe+=1){var Cn=Zt[oe];if(Fn[Cn]!==void 0){me=Fn[Cn];break}}var li=Object.assign((0,Ht.Z)(Fn,[].concat((0,ee.Z)(Zt),[Vt,$t])),{title:me,key:ti,parent:Bn,pos:Gn,children:null,data:Fn,isStart:[].concat((0,ee.Z)(Bn?Bn.isStart:[]),[kn===0]),isEnd:[].concat((0,ee.Z)(Bn?Bn.isEnd:[]),[kn===tn.length-1])});return fe.push(li),bt===!0||Ce.has(ti)?li.children=rn(Fn[$t]||[],li):li.children=[],li})}return rn(xt),fe}function At(xt,bt,Rt){var Ot={};(0,Ct.Z)(Rt)==="object"?Ot=Rt:Ot={externalGetKey:Rt},Ot=Ot||{};var Zt=Ot,Vt=Zt.childrenPropName,$t=Zt.externalGetKey,Ce=Zt.fieldNames,fe=Ee(Ce),rn=fe.key,tn=fe.children,Bn=Vt||tn,Fn;$t?typeof $t=="string"?Fn=function(ti){return ti[$t]}:typeof $t=="function"&&(Fn=function(ti){return $t(ti)}):Fn=function(ti,me){return Xt(ti[rn],me)};function kn(Gn,ti,me,oe){var Cn=Gn?Gn[Bn]:xt,li=Gn?Wt(me.pos,ti):"0",ai=Gn?[].concat((0,ee.Z)(oe),[Gn]):[];if(Gn){var sn=Fn(Gn,li),Rn={node:Gn,index:ti,pos:li,key:sn,parentPos:me.node?me.pos:null,level:me.level+1,nodes:ai};bt(Rn)}Cn&&Cn.forEach(function(ri,Ui){kn(ri,Ui,{node:Gn,pos:li,level:me?me.level+1:-1},ai)})}kn(null)}function at(xt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rt=bt.initWrapper,Ot=bt.processEntity,Zt=bt.onProcessFinished,Vt=bt.externalGetKey,$t=bt.childrenPropName,Ce=bt.fieldNames,fe=arguments.length>2?arguments[2]:void 0,rn=Vt||fe,tn={},Bn={},Fn={posEntities:tn,keyEntities:Bn};return Rt&&(Fn=Rt(Fn)||Fn),At(xt,function(kn){var Gn=kn.node,ti=kn.index,me=kn.pos,oe=kn.key,Cn=kn.parentPos,li=kn.level,ai=kn.nodes,sn={node:Gn,nodes:ai,index:ti,key:oe,pos:me,level:li},Rn=Xt(oe,me);tn[me]=sn,Bn[Rn]=sn,sn.parent=tn[Cn],sn.parent&&(sn.parent.children=sn.parent.children||[],sn.parent.children.push(sn)),Ot&&Ot(sn,Fn)},{externalGetKey:rn,childrenPropName:$t,fieldNames:Ce}),Zt&&Zt(Fn),Fn}function ct(xt,bt){var Rt=bt.expandedKeys,Ot=bt.selectedKeys,Zt=bt.loadedKeys,Vt=bt.loadingKeys,$t=bt.checkedKeys,Ce=bt.halfCheckedKeys,fe=bt.dragOverNodeKey,rn=bt.dropPosition,tn=bt.keyEntities,Bn=(0,Ae.Z)(tn,xt),Fn={eventKey:xt,expanded:Rt.indexOf(xt)!==-1,selected:Ot.indexOf(xt)!==-1,loaded:Zt.indexOf(xt)!==-1,loading:Vt.indexOf(xt)!==-1,checked:$t.indexOf(xt)!==-1,halfChecked:Ce.indexOf(xt)!==-1,pos:String(Bn?Bn.pos:""),dragOver:fe===xt&&rn===0,dragOverGapTop:fe===xt&&rn===-1,dragOverGapBottom:fe===xt&&rn===1};return Fn}function pt(xt){var bt=xt.data,Rt=xt.expanded,Ot=xt.selected,Zt=xt.checked,Vt=xt.loaded,$t=xt.loading,Ce=xt.halfChecked,fe=xt.dragOver,rn=xt.dragOverGapTop,tn=xt.dragOverGapBottom,Bn=xt.pos,Fn=xt.active,kn=xt.eventKey,Gn=(0,ue.Z)((0,ue.Z)({},bt),{},{expanded:Rt,selected:Ot,checked:Zt,loaded:Vt,loading:$t,halfChecked:Ce,dragOver:fe,dragOverGapTop:rn,dragOverGapBottom:tn,pos:Bn,active:Fn,key:kn});return"props"in Gn||Object.defineProperty(Gn,"props",{get:function(){return(0,ie.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xt}}),Gn}},8224:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return ee}});var Ct=Qt(4676);function ee(ue,Se,de,Ht){var ie=Ct.unstable_batchedUpdates?function(re){Ct.unstable_batchedUpdates(de,re)}:de;return ue!=null&&ue.addEventListener&&ue.addEventListener(Se,ie,Ht),{remove:function(){ue!=null&&ue.removeEventListener&&ue.removeEventListener(Se,ie,Ht)}}}},24514:function(xn,ze,Qt){"use strict";Qt.d(ze,{G:function(){return Se}});var Ct=Qt(47273),ee=function(Ht){if((0,Ct.Z)()&&window.document.documentElement){var ie=Array.isArray(Ht)?Ht:[Ht],Ae=window.document.documentElement;return ie.some(function(re){return re in Ae.style})}return!1},ue=function(Ht,ie){if(!ee(Ht))return!1;var Ae=document.createElement("div"),re=Ae.style[Ht];return Ae.style[Ht]=ie,Ae.style[Ht]!==re};function Se(de,Ht){return!Array.isArray(de)&&Ht!==void 0?ue(de,Ht):ee(de)}},65283:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ti}});var Ct=Qt(14809),ee=Qt(93664),ue=Qt(20439),Se=Qt(4635),de=Qt(50298),Ht=Qt(62646),ie=Qt(92310),Ae=Qt.n(ie),re=Qt(29301),Wt=Qt(70425),Ie=Qt(34280),Xt=Qt(59301),Ee=Qt(4676),It=Xt.forwardRef(function(jt,Mt){var mt=jt.height,vt=jt.offsetY,Lt=jt.offsetX,Bt=jt.children,_t=jt.prefixCls,Le=jt.onInnerResize,xe=jt.innerProps,Xe=jt.rtl,Me=jt.extra,De={},Oe={display:"flex",flexDirection:"column"};return vt!==void 0&&(De={height:mt,position:"relative",overflow:"hidden"},Oe=(0,ue.Z)((0,ue.Z)({},Oe),{},(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)({transform:"translateY(".concat(vt,"px)")},Xe?"marginRight":"marginLeft",-Lt),"position","absolute"),"left",0),"right",0),"top",0))),Xt.createElement("div",{style:De},Xt.createElement(re.Z,{onResize:function(mn){var On=mn.offsetHeight;On&&Le&&Le()}},Xt.createElement("div",(0,Ct.Z)({style:Oe,className:Ae()((0,Se.Z)({},"".concat(_t,"-holder-inner"),_t)),ref:Mt},xe),Bt,Me)))});It.displayName="Filler";var nt=It;function et(jt){var Mt=jt.children,mt=jt.setRef,vt=Xt.useCallback(function(Lt){mt(Lt)},[]);return Xt.cloneElement(Mt,{ref:vt})}function At(jt,Mt,mt,vt,Lt,Bt,_t,Le){var xe=Le.getKey;return jt.slice(Mt,mt+1).map(function(Xe,Me){var De=Mt+Me,Oe=_t(Xe,De,{style:{width:vt},offsetX:Lt}),nn=xe(Xe);return Xt.createElement(et,{key:nn,setRef:function(On){return Bt(Xe,On)}},Oe)})}function at(jt,Mt,mt,vt){var Lt=mt-jt,Bt=Mt-mt,_t=Math.min(Lt,Bt)*2;if(vt<=_t){var Le=Math.floor(vt/2);return vt%2?mt+Le+1:mt-Le}return Lt>Bt?mt-(vt-Bt):mt+(vt-Lt)}function ct(jt,Mt,mt){var vt=jt.length,Lt=Mt.length,Bt,_t;if(vt===0&&Lt===0)return null;vt<Lt?(Bt=jt,_t=Mt):(Bt=Mt,_t=jt);var Le={__EMPTY_ITEM__:!0};function xe(mn){return mn!==void 0?mt(mn):Le}for(var Xe=null,Me=Math.abs(vt-Lt)!==1,De=0;De<_t.length;De+=1){var Oe=xe(Bt[De]),nn=xe(_t[De]);if(Oe!==nn){Xe=De,Me=Me||Oe!==xe(_t[De+1]);break}}return Xe===null?null:{index:Xe,multiple:Me}}function pt(jt,Mt,mt){var vt=Xt.useState(jt),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Le=Xt.useState(null),xe=(0,de.Z)(Le,2),Xe=xe[0],Me=xe[1];return Xt.useEffect(function(){var De=ct(Bt||[],jt||[],Mt);(De==null?void 0:De.index)!==void 0&&(mt==null||mt(De.index),Me(jt[De.index])),_t(jt)},[jt]),[Xe]}var xt=Qt(16089),bt=(typeof navigator=="undefined"?"undefined":(0,ee.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Rt=bt,Ot=function(jt,Mt,mt,vt){var Lt=(0,Xt.useRef)(!1),Bt=(0,Xt.useRef)(null);function _t(){clearTimeout(Bt.current),Lt.current=!0,Bt.current=setTimeout(function(){Lt.current=!1},50)}var Le=(0,Xt.useRef)({top:jt,bottom:Mt,left:mt,right:vt});return Le.current.top=jt,Le.current.bottom=Mt,Le.current.left=mt,Le.current.right=vt,function(xe,Xe){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,De=xe?Xe<0&&Le.current.left||Xe>0&&Le.current.right:Xe<0&&Le.current.top||Xe>0&&Le.current.bottom;return Me&&De?(clearTimeout(Bt.current),Lt.current=!1):(!De||Lt.current)&&_t(),!Lt.current&&De}};function Zt(jt,Mt,mt,vt,Lt,Bt,_t){var Le=(0,Xt.useRef)(0),xe=(0,Xt.useRef)(null),Xe=(0,Xt.useRef)(null),Me=(0,Xt.useRef)(!1),De=Ot(Mt,mt,vt,Lt);function Oe(oi,gi){if(xt.Z.cancel(xe.current),!De(!1,gi)){var bi=oi;if(!bi._virtualHandled)bi._virtualHandled=!0;else return;Le.current+=gi,Xe.current=gi,Rt||bi.preventDefault(),xe.current=(0,xt.Z)(function(){var cr=Me.current?10:1;_t(Le.current*cr,!1),Le.current=0})}}function nn(oi,gi){_t(gi,!0),Rt||oi.preventDefault()}var mn=(0,Xt.useRef)(null),On=(0,Xt.useRef)(null);function yn(oi){if(jt){xt.Z.cancel(On.current),On.current=(0,xt.Z)(function(){mn.current=null},2);var gi=oi.deltaX,bi=oi.deltaY,cr=oi.shiftKey,Ei=gi,Ri=bi;(mn.current==="sx"||!mn.current&&cr&&bi&&!gi)&&(Ei=bi,Ri=0,mn.current="sx");var Ki=Math.abs(Ei),_r=Math.abs(Ri);mn.current===null&&(mn.current=Bt&&Ki>_r?"x":"y"),mn.current==="y"?Oe(oi,Ri):nn(oi,Ei)}}function ui(oi){jt&&(Me.current=oi.detail===Xe.current)}return[yn,ui]}function Vt(jt,Mt,mt,vt){var Lt=Xt.useMemo(function(){return[new Map,[]]},[jt,mt.id,vt]),Bt=(0,de.Z)(Lt,2),_t=Bt[0],Le=Bt[1],xe=function(Me){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Me,Oe=_t.get(Me),nn=_t.get(De);if(Oe===void 0||nn===void 0)for(var mn=jt.length,On=Le.length;On<mn;On+=1){var yn,ui=jt[On],oi=Mt(ui);_t.set(oi,On);var gi=(yn=mt.get(oi))!==null&&yn!==void 0?yn:vt;if(Le[On]=(Le[On-1]||0)+gi,oi===Me&&(Oe=On),oi===De&&(nn=On),Oe!==void 0&&nn!==void 0)break}return{top:Le[Oe-1]||0,bottom:Le[nn]}};return xe}var $t=Qt(99153),Ce=Qt(84851),fe=function(){function jt(){(0,$t.Z)(this,jt),(0,Se.Z)(this,"maps",void 0),(0,Se.Z)(this,"id",0),(0,Se.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ce.Z)(jt,[{key:"set",value:function(mt,vt){this.diffRecords.set(mt,this.maps[mt]),this.maps[mt]=vt,this.id+=1}},{key:"get",value:function(mt){return this.maps[mt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),jt}(),rn=fe;function tn(jt){var Mt=parseFloat(jt);return isNaN(Mt)?0:Mt}function Bn(jt,Mt,mt){var vt=Xt.useState(0),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Le=(0,Xt.useRef)(new Map),xe=(0,Xt.useRef)(new rn),Xe=(0,Xt.useRef)(0);function Me(){Xe.current+=1}function De(){var nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Me();var mn=function(){var ui=!1;Le.current.forEach(function(oi,gi){if(oi&&oi.offsetParent){var bi=oi.offsetHeight,cr=getComputedStyle(oi),Ei=cr.marginTop,Ri=cr.marginBottom,Ki=tn(Ei),_r=tn(Ri),Ji=bi+Ki+_r;xe.current.get(gi)!==Ji&&(xe.current.set(gi,Ji),ui=!0)}}),ui&&_t(function(oi){return oi+1})};if(nn)mn();else{Xe.current+=1;var On=Xe.current;Promise.resolve().then(function(){On===Xe.current&&mn()})}}function Oe(nn,mn){var On=jt(nn),yn=Le.current.get(On);mn?(Le.current.set(On,mn),De()):Le.current.delete(On),!yn!=!mn&&(mn?Mt==null||Mt(nn):mt==null||mt(nn))}return(0,Xt.useEffect)(function(){return Me},[]),[Oe,De,xe.current,Bt]}var Fn=14/15;function kn(jt,Mt,mt){var vt=(0,Xt.useRef)(!1),Lt=(0,Xt.useRef)(0),Bt=(0,Xt.useRef)(0),_t=(0,Xt.useRef)(null),Le=(0,Xt.useRef)(null),xe,Xe=function(nn){if(vt.current){var mn=Math.ceil(nn.touches[0].pageX),On=Math.ceil(nn.touches[0].pageY),yn=Lt.current-mn,ui=Bt.current-On,oi=Math.abs(yn)>Math.abs(ui);oi?Lt.current=mn:Bt.current=On;var gi=mt(oi,oi?yn:ui,!1,nn);gi&&nn.preventDefault(),clearInterval(Le.current),gi&&(Le.current=setInterval(function(){oi?yn*=Fn:ui*=Fn;var bi=Math.floor(oi?yn:ui);(!mt(oi,bi,!0)||Math.abs(bi)<=.1)&&clearInterval(Le.current)},16))}},Me=function(){vt.current=!1,xe()},De=function(nn){xe(),nn.touches.length===1&&!vt.current&&(vt.current=!0,Lt.current=Math.ceil(nn.touches[0].pageX),Bt.current=Math.ceil(nn.touches[0].pageY),_t.current=nn.target,_t.current.addEventListener("touchmove",Xe,{passive:!1}),_t.current.addEventListener("touchend",Me,{passive:!0}))};xe=function(){_t.current&&(_t.current.removeEventListener("touchmove",Xe),_t.current.removeEventListener("touchend",Me))},(0,Ie.Z)(function(){return jt&&Mt.current.addEventListener("touchstart",De,{passive:!0}),function(){var Oe;(Oe=Mt.current)===null||Oe===void 0||Oe.removeEventListener("touchstart",De),xe(),clearInterval(Le.current)}},[jt])}function Gn(jt){return Math.floor(Math.pow(jt,.5))}function ti(jt,Mt){var mt="touches"in jt?jt.touches[0]:jt;return mt[Mt?"pageX":"pageY"]-window[Mt?"scrollX":"scrollY"]}function me(jt,Mt,mt){Xt.useEffect(function(){var vt=Mt.current;if(jt&&vt){var Lt=!1,Bt,_t,Le=function(){xt.Z.cancel(Bt)},xe=function Oe(){Le(),Bt=(0,xt.Z)(function(){mt(_t),Oe()})},Xe=function(nn){if(!(nn.target.draggable||nn.button!==0)){var mn=nn;mn._virtualHandled||(mn._virtualHandled=!0,Lt=!0)}},Me=function(){Lt=!1,Le()},De=function(nn){if(Lt){var mn=ti(nn,!1),On=vt.getBoundingClientRect(),yn=On.top,ui=On.bottom;if(mn<=yn){var oi=yn-mn;_t=-Gn(oi),xe()}else if(mn>=ui){var gi=mn-ui;_t=Gn(gi),xe()}else Le()}};return vt.addEventListener("mousedown",Xe),vt.ownerDocument.addEventListener("mouseup",Me),vt.ownerDocument.addEventListener("mousemove",De),function(){vt.removeEventListener("mousedown",Xe),vt.ownerDocument.removeEventListener("mouseup",Me),vt.ownerDocument.removeEventListener("mousemove",De),Le()}}},[jt])}var oe=10;function Cn(jt,Mt,mt,vt,Lt,Bt,_t,Le){var xe=Xt.useRef(),Xe=Xt.useState(null),Me=(0,de.Z)(Xe,2),De=Me[0],Oe=Me[1];return(0,Ie.Z)(function(){if(De&&De.times<oe){if(!jt.current){Oe(function(uo){return(0,ue.Z)({},uo)});return}Bt();var nn=De.targetAlign,mn=De.originAlign,On=De.index,yn=De.offset,ui=jt.current.clientHeight,oi=!1,gi=nn,bi=null;if(ui){for(var cr=nn||mn,Ei=0,Ri=0,Ki=0,_r=Math.min(Mt.length-1,On),Ji=0;Ji<=_r;Ji+=1){var Er=Lt(Mt[Ji]);Ri=Ei;var yr=mt.get(Er);Ki=Ri+(yr===void 0?vt:yr),Ei=Ki}for(var Vr=cr==="top"?yn:ui-yn,Zi=_r;Zi>=0;Zi-=1){var oo=Lt(Mt[Zi]),xo=mt.get(oo);if(xo===void 0){oi=!0;break}if(Vr-=xo,Vr<=0)break}switch(cr){case"top":bi=Ri-yn;break;case"bottom":bi=Ki-ui+yn;break;default:{var no=jt.current.scrollTop,br=no+ui;Ri<no?gi="top":Ki>br&&(gi="bottom")}}bi!==null&&_t(bi),bi!==De.lastTop&&(oi=!0)}oi&&Oe((0,ue.Z)((0,ue.Z)({},De),{},{times:De.times+1,targetAlign:gi,lastTop:bi}))}},[De,jt.current]),function(nn){if(nn==null){Le();return}if(xt.Z.cancel(xe.current),typeof nn=="number")_t(nn);else if(nn&&(0,ee.Z)(nn)==="object"){var mn,On=nn.align;"index"in nn?mn=nn.index:mn=Mt.findIndex(function(oi){return Lt(oi)===nn.key});var yn=nn.offset,ui=yn===void 0?0:yn;Oe({times:0,index:mn,offset:ui,originAlign:On})}}}var li=Xt.forwardRef(function(jt,Mt){var mt=jt.prefixCls,vt=jt.rtl,Lt=jt.scrollOffset,Bt=jt.scrollRange,_t=jt.onStartMove,Le=jt.onStopMove,xe=jt.onScroll,Xe=jt.horizontal,Me=jt.spinSize,De=jt.containerSize,Oe=jt.style,nn=jt.thumbStyle,mn=jt.showScrollBar,On=Xt.useState(!1),yn=(0,de.Z)(On,2),ui=yn[0],oi=yn[1],gi=Xt.useState(null),bi=(0,de.Z)(gi,2),cr=bi[0],Ei=bi[1],Ri=Xt.useState(null),Ki=(0,de.Z)(Ri,2),_r=Ki[0],Ji=Ki[1],Er=!vt,yr=Xt.useRef(),Vr=Xt.useRef(),Zi=Xt.useState(mn),oo=(0,de.Z)(Zi,2),xo=oo[0],no=oo[1],br=Xt.useRef(),uo=function(){mn===!0||mn===!1||(clearTimeout(br.current),no(!0),br.current=setTimeout(function(){no(!1)},3e3))},Tt=Bt-De||0,Gi=De-Me||0,Vi=Xt.useMemo(function(){if(Lt===0||Tt===0)return 0;var Ke=Lt/Tt;return Ke*Gi},[Lt,Tt,Gi]),xi=function(Ci){Ci.stopPropagation(),Ci.preventDefault()},Oi=Xt.useRef({top:Vi,dragging:ui,pageY:cr,startTop:_r});Oi.current={top:Vi,dragging:ui,pageY:cr,startTop:_r};var zi=function(Ci){oi(!0),Ei(ti(Ci,Xe)),Ji(Oi.current.top),_t(),Ci.stopPropagation(),Ci.preventDefault()};Xt.useEffect(function(){var Ke=function(Hn){Hn.preventDefault()},Ci=yr.current,Ne=Vr.current;return Ci.addEventListener("touchstart",Ke,{passive:!1}),Ne.addEventListener("touchstart",zi,{passive:!1}),function(){Ci.removeEventListener("touchstart",Ke),Ne.removeEventListener("touchstart",zi)}},[]);var or=Xt.useRef();or.current=Tt;var Yr=Xt.useRef();Yr.current=Gi,Xt.useEffect(function(){if(ui){var Ke,Ci=function(Hn){var fi=Oi.current,$i=fi.dragging,Mr=fi.pageY,Br=fi.startTop;xt.Z.cancel(Ke);var te=yr.current.getBoundingClientRect(),ke=De/(Xe?te.width:te.height);if($i){var zn=(ti(Hn,Xe)-Mr)*ke,ni=Br;!Er&&Xe?ni-=zn:ni+=zn;var Ye=or.current,Kn=Yr.current,_n=Kn?ni/Kn:0,We=Math.ceil(_n*Ye);We=Math.max(We,0),We=Math.min(We,Ye),Ke=(0,xt.Z)(function(){xe(We,Xe)})}},Ne=function(){oi(!1),Le()};return window.addEventListener("mousemove",Ci,{passive:!0}),window.addEventListener("touchmove",Ci,{passive:!0}),window.addEventListener("mouseup",Ne,{passive:!0}),window.addEventListener("touchend",Ne,{passive:!0}),function(){window.removeEventListener("mousemove",Ci),window.removeEventListener("touchmove",Ci),window.removeEventListener("mouseup",Ne),window.removeEventListener("touchend",Ne),xt.Z.cancel(Ke)}}},[ui]),Xt.useEffect(function(){return uo(),function(){clearTimeout(br.current)}},[Lt]),Xt.useImperativeHandle(Mt,function(){return{delayHidden:uo}});var Tr="".concat(mt,"-scrollbar"),je={position:"absolute",visibility:xo?null:"hidden"},Je={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Xe?(je.height=8,je.left=0,je.right=0,je.bottom=0,Je.height="100%",Je.width=Me,Er?Je.left=Vi:Je.right=Vi):(je.width=8,je.top=0,je.bottom=0,Er?je.right=0:je.left=0,Je.width="100%",Je.height=Me,Je.top=Vi),Xt.createElement("div",{ref:yr,className:Ae()(Tr,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Tr,"-horizontal"),Xe),"".concat(Tr,"-vertical"),!Xe),"".concat(Tr,"-visible"),xo)),style:(0,ue.Z)((0,ue.Z)({},je),Oe),onMouseDown:xi,onMouseMove:uo},Xt.createElement("div",{ref:Vr,className:Ae()("".concat(Tr,"-thumb"),(0,Se.Z)({},"".concat(Tr,"-thumb-moving"),ui)),style:(0,ue.Z)((0,ue.Z)({},Je),nn),onMouseDown:zi}))}),ai=li,sn=20;function Rn(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,mt=jt/Mt*jt;return isNaN(mt)&&(mt=0),mt=Math.max(mt,sn),Math.floor(mt)}var ri=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ui=[],en={overflowY:"auto",overflowAnchor:"none"};function ei(jt,Mt){var mt=jt.prefixCls,vt=mt===void 0?"rc-virtual-list":mt,Lt=jt.className,Bt=jt.height,_t=jt.itemHeight,Le=jt.fullHeight,xe=Le===void 0?!0:Le,Xe=jt.style,Me=jt.data,De=jt.children,Oe=jt.itemKey,nn=jt.virtual,mn=jt.direction,On=jt.scrollWidth,yn=jt.component,ui=yn===void 0?"div":yn,oi=jt.onScroll,gi=jt.onVirtualScroll,bi=jt.onVisibleChange,cr=jt.innerProps,Ei=jt.extraRender,Ri=jt.styles,Ki=jt.showScrollBar,_r=Ki===void 0?"optional":Ki,Ji=(0,Ht.Z)(jt,ri),Er=Xt.useCallback(function(dn){return typeof Oe=="function"?Oe(dn):dn==null?void 0:dn[Oe]},[Oe]),yr=Bn(Er,null,null),Vr=(0,de.Z)(yr,4),Zi=Vr[0],oo=Vr[1],xo=Vr[2],no=Vr[3],br=!!(nn!==!1&&Bt&&_t),uo=Xt.useMemo(function(){return Object.values(xo.maps).reduce(function(dn,qe){return dn+qe},0)},[xo.id,xo.maps]),Tt=br&&Me&&(Math.max(_t*Me.length,uo)>Bt||!!On),Gi=mn==="rtl",Vi=Ae()(vt,(0,Se.Z)({},"".concat(vt,"-rtl"),Gi),Lt),xi=Me||Ui,Oi=(0,Xt.useRef)(),zi=(0,Xt.useRef)(),or=(0,Xt.useRef)(),Yr=(0,Xt.useState)(0),Tr=(0,de.Z)(Yr,2),je=Tr[0],Je=Tr[1],Ke=(0,Xt.useState)(0),Ci=(0,de.Z)(Ke,2),Ne=Ci[0],Qi=Ci[1],Hn=(0,Xt.useState)(!1),fi=(0,de.Z)(Hn,2),$i=fi[0],Mr=fi[1],Br=function(){Mr(!0)},te=function(){Mr(!1)},ke={getKey:Er};function zn(dn){Je(function(qe){var fn;typeof dn=="function"?fn=dn(qe):fn=dn;var an=Ii(fn);return Oi.current.scrollTop=an,an})}var ni=(0,Xt.useRef)({start:0,end:xi.length}),Ye=(0,Xt.useRef)(),Kn=pt(xi,Er),_n=(0,de.Z)(Kn,1),We=_n[0];Ye.current=We;var on=Xt.useMemo(function(){if(!br)return{scrollHeight:void 0,start:0,end:xi.length-1,offset:void 0};if(!Tt){var dn;return{scrollHeight:((dn=zi.current)===null||dn===void 0?void 0:dn.offsetHeight)||0,start:0,end:xi.length-1,offset:void 0}}for(var qe=0,fn,an,gn,qn=xi.length,Mn=0;Mn<qn;Mn+=1){var Un=xi[Mn],ln=Er(Un),si=xo.get(ln),Mi=qe+(si===void 0?_t:si);Mi>=je&&fn===void 0&&(fn=Mn,an=qe),Mi>je+Bt&&gn===void 0&&(gn=Mn),qe=Mi}return fn===void 0&&(fn=0,an=0,gn=Math.ceil(Bt/_t)),gn===void 0&&(gn=xi.length-1),gn=Math.min(gn+1,xi.length-1),{scrollHeight:qe,start:fn,end:gn,offset:an}},[Tt,br,je,xi,no,Bt]),An=on.scrollHeight,Nn=on.start,Vn=on.end,Yi=on.offset;ni.current.start=Nn,ni.current.end=Vn,Xt.useLayoutEffect(function(){var dn=xo.getRecord();if(dn.size===1){var qe=Array.from(dn.keys())[0],fn=dn.get(qe),an=xi[Nn];if(an&&fn===void 0){var gn=Er(an);if(gn===qe){var qn=xo.get(qe),Mn=qn-_t;zn(function(Un){return Un+Mn})}}}xo.resetRecord()},[An]);var Li=Xt.useState({width:0,height:Bt}),Bi=(0,de.Z)(Li,2),Ve=Bi[0],tr=Bi[1],dr=function(qe){tr({width:qe.offsetWidth,height:qe.offsetHeight})},qr=(0,Xt.useRef)(),hn=(0,Xt.useRef)(),Wn=Xt.useMemo(function(){return Rn(Ve.width,On)},[Ve.width,On]),Si=Xt.useMemo(function(){return Rn(Ve.height,An)},[Ve.height,An]),vi=An-Bt,mi=(0,Xt.useRef)(vi);mi.current=vi;function Ii(dn){var qe=dn;return Number.isNaN(mi.current)||(qe=Math.min(qe,mi.current)),qe=Math.max(qe,0),qe}var Wi=je<=0,Ar=je>=vi,ae=Ne<=0,ce=Ne>=On,ne=Ot(Wi,Ar,ae,ce),Ge=function(){return{x:Gi?-Ne:Ne,y:je}},Be=(0,Xt.useRef)(Ge()),cn=(0,Wt.zX)(function(dn){if(gi){var qe=(0,ue.Z)((0,ue.Z)({},Ge()),dn);(Be.current.x!==qe.x||Be.current.y!==qe.y)&&(gi(qe),Be.current=qe)}});function Yn(dn,qe){var fn=dn;qe?((0,Ee.flushSync)(function(){Qi(fn)}),cn()):zn(fn)}function Xn(dn){var qe=dn.currentTarget.scrollTop;qe!==je&&zn(qe),oi==null||oi(dn),cn()}var ki=function(qe){var fn=qe,an=On?On-Ve.width:0;return fn=Math.max(fn,0),fn=Math.min(fn,an),fn},ii=(0,Wt.zX)(function(dn,qe){qe?((0,Ee.flushSync)(function(){Qi(function(fn){var an=fn+(Gi?-dn:dn);return ki(an)})}),cn()):zn(function(fn){var an=fn+dn;return an})}),be=Zt(br,Wi,Ar,ae,ce,!!On,ii),yi=(0,de.Z)(be,2),Te=yi[0],un=yi[1];kn(br,Oi,function(dn,qe,fn,an){var gn=an;return ne(dn,qe,fn)?!1:!gn||!gn._virtualHandled?(gn&&(gn._virtualHandled=!0),Te({preventDefault:function(){},deltaX:dn?qe:0,deltaY:dn?0:qe}),!0):!1}),me(Tt,Oi,function(dn){zn(function(qe){return qe+dn})}),(0,Ie.Z)(function(){function dn(fn){var an=Wi&&fn.detail<0,gn=Ar&&fn.detail>0;br&&!an&&!gn&&fn.preventDefault()}var qe=Oi.current;return qe.addEventListener("wheel",Te,{passive:!1}),qe.addEventListener("DOMMouseScroll",un,{passive:!0}),qe.addEventListener("MozMousePixelScroll",dn,{passive:!1}),function(){qe.removeEventListener("wheel",Te),qe.removeEventListener("DOMMouseScroll",un),qe.removeEventListener("MozMousePixelScroll",dn)}},[br,Wi,Ar]),(0,Ie.Z)(function(){if(On){var dn=ki(Ne);Qi(dn),cn({x:dn})}},[Ve.width,On]);var Ue=function(){var qe,fn;(qe=qr.current)===null||qe===void 0||qe.delayHidden(),(fn=hn.current)===null||fn===void 0||fn.delayHidden()},Ut=Cn(Oi,xi,xo,_t,Er,function(){return oo(!0)},zn,Ue);Xt.useImperativeHandle(Mt,function(){return{nativeElement:or.current,getScrollInfo:Ge,scrollTo:function(qe){function fn(an){return an&&(0,ee.Z)(an)==="object"&&("left"in an||"top"in an)}fn(qe)?(qe.left!==void 0&&Qi(ki(qe.left)),Ut(qe.top)):Ut(qe)}}}),(0,Ie.Z)(function(){if(bi){var dn=xi.slice(Nn,Vn+1);bi(dn,xi)}},[Nn,Vn,xi]);var pn=Vt(xi,Er,xo,_t),Ln=Ei==null?void 0:Ei({start:Nn,end:Vn,virtual:Tt,offsetX:Ne,offsetY:Yi,rtl:Gi,getSize:pn}),Ai=At(xi,Nn,Vn,On,Ne,Zi,De,ke),Zn=null;Bt&&(Zn=(0,ue.Z)((0,Se.Z)({},xe?"height":"maxHeight",Bt),en),br&&(Zn.overflowY="hidden",On&&(Zn.overflowX="hidden"),$i&&(Zn.pointerEvents="none")));var Tn={};return Gi&&(Tn.dir="rtl"),Xt.createElement("div",(0,Ct.Z)({ref:or,style:(0,ue.Z)((0,ue.Z)({},Xe),{},{position:"relative"}),className:Vi},Tn,Ji),Xt.createElement(re.Z,{onResize:dr},Xt.createElement(ui,{className:"".concat(vt,"-holder"),style:Zn,ref:Oi,onScroll:Xn,onMouseEnter:Ue},Xt.createElement(nt,{prefixCls:vt,height:An,offsetX:Ne,offsetY:Yi,scrollWidth:On,onInnerResize:oo,ref:zi,innerProps:cr,rtl:Gi,extra:Ln},Ai))),Tt&&An>Bt&&Xt.createElement(ai,{ref:qr,prefixCls:vt,scrollOffset:je,scrollRange:An,rtl:Gi,onScroll:Yn,onStartMove:Br,onStopMove:te,spinSize:Si,containerSize:Ve.height,style:Ri==null?void 0:Ri.verticalScrollBar,thumbStyle:Ri==null?void 0:Ri.verticalScrollBarThumb,showScrollBar:_r}),Tt&&On>Ve.width&&Xt.createElement(ai,{ref:hn,prefixCls:vt,scrollOffset:Ne,scrollRange:On,rtl:Gi,onScroll:Yn,onStartMove:Br,onStopMove:te,spinSize:Wn,containerSize:Ve.width,horizontal:!0,style:Ri==null?void 0:Ri.horizontalScrollBar,thumbStyle:Ri==null?void 0:Ri.horizontalScrollBarThumb,showScrollBar:_r}))}var Fe=Xt.forwardRef(ei);Fe.displayName="List";var ci=Fe,Ti=ci},2637:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),Object.defineProperty(ze,"DraggableCore",{enumerable:!0,get:function(){return Ae.default}}),ze.default=void 0;var Ct=Xt(Qt(59301)),ee=Wt(Qt(12708)),ue=Wt(Qt(4676)),Se=Wt(Qt(57780)),de=Qt(13957),Ht=Qt(60976),ie=Qt(36641),Ae=Wt(Qt(80486)),re=Wt(Qt(94187));function Wt(at){return at&&at.__esModule?at:{default:at}}function Ie(at){if(typeof WeakMap!="function")return null;var ct=new WeakMap,pt=new WeakMap;return(Ie=function(xt){return xt?pt:ct})(at)}function Xt(at,ct){if(!ct&&at&&at.__esModule)return at;if(at===null||typeof at!="object"&&typeof at!="function")return{default:at};var pt=Ie(ct);if(pt&&pt.has(at))return pt.get(at);var xt={},bt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rt in at)if(Rt!=="default"&&Object.prototype.hasOwnProperty.call(at,Rt)){var Ot=bt?Object.getOwnPropertyDescriptor(at,Rt):null;Ot&&(Ot.get||Ot.set)?Object.defineProperty(xt,Rt,Ot):xt[Rt]=at[Rt]}return xt.default=at,pt&&pt.set(at,xt),xt}function Ee(){return Ee=Object.assign?Object.assign.bind():function(at){for(var ct=1;ct<arguments.length;ct++){var pt=arguments[ct];for(var xt in pt)Object.prototype.hasOwnProperty.call(pt,xt)&&(at[xt]=pt[xt])}return at},Ee.apply(this,arguments)}function It(at,ct,pt){return ct=nt(ct),ct in at?Object.defineProperty(at,ct,{value:pt,enumerable:!0,configurable:!0,writable:!0}):at[ct]=pt,at}function nt(at){var ct=et(at,"string");return typeof ct=="symbol"?ct:String(ct)}function et(at,ct){if(typeof at!="object"||at===null)return at;var pt=at[Symbol.toPrimitive];if(pt!==void 0){var xt=pt.call(at,ct||"default");if(typeof xt!="object")return xt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ct==="string"?String:Number)(at)}class At extends Ct.Component{static getDerivedStateFromProps(ct,pt){let{position:xt}=ct,{prevPropsPosition:bt}=pt;return xt&&(!bt||xt.x!==bt.x||xt.y!==bt.y)?((0,re.default)("Draggable: getDerivedStateFromProps %j",{position:xt,prevPropsPosition:bt}),{x:xt.x,y:xt.y,prevPropsPosition:Pd({},xt)}):null}constructor(ct){super(ct),It(this,"onDragStart",(pt,xt)=>{if((0,re.default)("Draggable: onDragStart: %j",xt),this.props.onStart(pt,(0,Ht.createDraggableData)(this,xt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),It(this,"onDrag",(pt,xt)=>{if(!this.state.dragging)return!1;(0,re.default)("Draggable: onDrag: %j",xt);const bt=(0,Ht.createDraggableData)(this,xt),Rt={x:bt.x,y:bt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Zt,y:Vt}=Rt;Rt.x+=this.state.slackX,Rt.y+=this.state.slackY;const[$t,Ce]=(0,Ht.getBoundPosition)(this,Rt.x,Rt.y);Rt.x=$t,Rt.y=Ce,Rt.slackX=this.state.slackX+(Zt-Rt.x),Rt.slackY=this.state.slackY+(Vt-Rt.y),bt.x=Rt.x,bt.y=Rt.y,bt.deltaX=Rt.x-this.state.x,bt.deltaY=Rt.y-this.state.y}if(this.props.onDrag(pt,bt)===!1)return!1;this.setState(Rt)}),It(this,"onDragStop",(pt,xt)=>{if(!this.state.dragging||this.props.onStop(pt,(0,Ht.createDraggableData)(this,xt))===!1)return!1;(0,re.default)("Draggable: onDragStop: %j",xt);const Rt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Zt,y:Vt}=this.props.position;Rt.x=Zt,Rt.y=Vt}this.setState(Rt)}),this.state={dragging:!1,dragged:!1,x:ct.position?ct.position.x:ct.defaultPosition.x,y:ct.position?ct.position.y:ct.defaultPosition.y,prevPropsPosition:Pd({},ct.position),slackX:0,slackY:0,isElementSVG:!1},ct.position&&!(ct.onDrag||ct.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 ct,pt;return(ct=(pt=this.props)===null||pt===void 0||(pt=pt.nodeRef)===null||pt===void 0?void 0:pt.current)!==null&&ct!==void 0?ct:ue.default.findDOMNode(this)}render(){const me=this.props,{axis:ct,bounds:pt,children:xt,defaultPosition:bt,defaultClassName:Rt,defaultClassNameDragging:Ot,defaultClassNameDragged:Zt,position:Vt,positionOffset:$t,scale:Ce}=me,fe=Sw(me,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let rn={},tn=null;const Fn=!!!Vt||this.state.dragging,kn=Vt||bt,Gn={x:(0,Ht.canDragX)(this)&&Fn?this.state.x:kn.x,y:(0,Ht.canDragY)(this)&&Fn?this.state.y:kn.y};this.state.isElementSVG?tn=(0,de.createSVGTransform)(Gn,$t):rn=(0,de.createCSSTransform)(Gn,$t);const ti=(0,Se.default)(xt.props.className||"",Rt,{[Ot]:this.state.dragging,[Zt]:this.state.dragged});return Ct.createElement(Ae.default,Ee({},fe,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),Ct.cloneElement(Ct.Children.only(xt),{className:ti,style:Pd(Pd({},xt.props.style),rn),transform:tn}))}}ze.default=At,It(At,"displayName","Draggable"),It(At,"propTypes",Ay(Pd({},Ae.default.propTypes),{axis:ee.default.oneOf(["both","x","y","none"]),bounds:ee.default.oneOfType([ee.default.shape({left:ee.default.number,right:ee.default.number,top:ee.default.number,bottom:ee.default.number}),ee.default.string,ee.default.oneOf([!1])]),defaultClassName:ee.default.string,defaultClassNameDragging:ee.default.string,defaultClassNameDragged:ee.default.string,defaultPosition:ee.default.shape({x:ee.default.number,y:ee.default.number}),positionOffset:ee.default.shape({x:ee.default.oneOfType([ee.default.number,ee.default.string]),y:ee.default.oneOfType([ee.default.number,ee.default.string])}),position:ee.default.shape({x:ee.default.number,y:ee.default.number}),className:ie.dontSetMe,style:ie.dontSetMe,transform:ie.dontSetMe})),It(At,"defaultProps",Ay(Pd({},Ae.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80486:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Ct=Wt(Qt(59301)),ee=Ae(Qt(12708)),ue=Ae(Qt(4676)),Se=Qt(13957),de=Qt(60976),Ht=Qt(36641),ie=Ae(Qt(94187));function Ae(At){return At&&At.__esModule?At:{default:At}}function re(At){if(typeof WeakMap!="function")return null;var at=new WeakMap,ct=new WeakMap;return(re=function(pt){return pt?ct:at})(At)}function Wt(At,at){if(!at&&At&&At.__esModule)return At;if(At===null||typeof At!="object"&&typeof At!="function")return{default:At};var ct=re(at);if(ct&&ct.has(At))return ct.get(At);var pt={},xt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var bt in At)if(bt!=="default"&&Object.prototype.hasOwnProperty.call(At,bt)){var Rt=xt?Object.getOwnPropertyDescriptor(At,bt):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty(pt,bt,Rt):pt[bt]=At[bt]}return pt.default=At,ct&&ct.set(At,pt),pt}function Ie(At,at,ct){return at=Xt(at),at in At?Object.defineProperty(At,at,{value:ct,enumerable:!0,configurable:!0,writable:!0}):At[at]=ct,At}function Xt(At){var at=Ee(At,"string");return typeof at=="symbol"?at:String(at)}function Ee(At,at){if(typeof At!="object"||At===null)return At;var ct=At[Symbol.toPrimitive];if(ct!==void 0){var pt=ct.call(At,at||"default");if(typeof pt!="object")return pt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(At)}const It={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nt=It.mouse;class et extends Ct.Component{constructor(){super(...arguments),Ie(this,"dragging",!1),Ie(this,"lastX",NaN),Ie(this,"lastY",NaN),Ie(this,"touchIdentifier",null),Ie(this,"mounted",!1),Ie(this,"handleDragStart",at=>{if(this.props.onMouseDown(at),!this.props.allowAnyClick&&typeof at.button=="number"&&at.button!==0)return!1;const ct=this.findDOMNode();if(!ct||!ct.ownerDocument||!ct.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:pt}=ct;if(this.props.disabled||!(at.target instanceof pt.defaultView.Node)||this.props.handle&&!(0,Se.matchesSelectorAndParentsTo)(at.target,this.props.handle,ct)||this.props.cancel&&(0,Se.matchesSelectorAndParentsTo)(at.target,this.props.cancel,ct))return;at.type==="touchstart"&&at.preventDefault();const xt=(0,Se.getTouchIdentifier)(at);this.touchIdentifier=xt;const bt=(0,de.getControlPosition)(at,xt,this);if(bt==null)return;const{x:Rt,y:Ot}=bt,Zt=(0,de.createCoreData)(this,Rt,Ot);(0,ie.default)("DraggableCore: handleDragStart: %j",Zt),(0,ie.default)("calling",this.props.onStart),!(this.props.onStart(at,Zt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Se.addUserSelectStyles)(pt),this.dragging=!0,this.lastX=Rt,this.lastY=Ot,(0,Se.addEvent)(pt,nt.move,this.handleDrag),(0,Se.addEvent)(pt,nt.stop,this.handleDragStop))}),Ie(this,"handleDrag",at=>{const ct=(0,de.getControlPosition)(at,this.touchIdentifier,this);if(ct==null)return;let{x:pt,y:xt}=ct;if(Array.isArray(this.props.grid)){let Ot=pt-this.lastX,Zt=xt-this.lastY;if([Ot,Zt]=(0,de.snapToGrid)(this.props.grid,Ot,Zt),!Ot&&!Zt)return;pt=this.lastX+Ot,xt=this.lastY+Zt}const bt=(0,de.createCoreData)(this,pt,xt);if((0,ie.default)("DraggableCore: handleDrag: %j",bt),this.props.onDrag(at,bt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Ot){const Zt=document.createEvent("MouseEvents");Zt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Zt)}return}this.lastX=pt,this.lastY=xt}),Ie(this,"handleDragStop",at=>{if(!this.dragging)return;const ct=(0,de.getControlPosition)(at,this.touchIdentifier,this);if(ct==null)return;let{x:pt,y:xt}=ct;if(Array.isArray(this.props.grid)){let Zt=pt-this.lastX||0,Vt=xt-this.lastY||0;[Zt,Vt]=(0,de.snapToGrid)(this.props.grid,Zt,Vt),pt=this.lastX+Zt,xt=this.lastY+Vt}const bt=(0,de.createCoreData)(this,pt,xt);if(this.props.onStop(at,bt)===!1||this.mounted===!1)return!1;const Ot=this.findDOMNode();Ot&&this.props.enableUserSelectHack&&(0,Se.removeUserSelectStyles)(Ot.ownerDocument),(0,ie.default)("DraggableCore: handleDragStop: %j",bt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ot&&((0,ie.default)("DraggableCore: Removing handlers"),(0,Se.removeEvent)(Ot.ownerDocument,nt.move,this.handleDrag),(0,Se.removeEvent)(Ot.ownerDocument,nt.stop,this.handleDragStop))}),Ie(this,"onMouseDown",at=>(nt=It.mouse,this.handleDragStart(at))),Ie(this,"onMouseUp",at=>(nt=It.mouse,this.handleDragStop(at))),Ie(this,"onTouchStart",at=>(nt=It.touch,this.handleDragStart(at))),Ie(this,"onTouchEnd",at=>(nt=It.touch,this.handleDragStop(at)))}componentDidMount(){this.mounted=!0;const at=this.findDOMNode();at&&(0,Se.addEvent)(at,It.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const at=this.findDOMNode();if(at){const{ownerDocument:ct}=at;(0,Se.removeEvent)(ct,It.mouse.move,this.handleDrag),(0,Se.removeEvent)(ct,It.touch.move,this.handleDrag),(0,Se.removeEvent)(ct,It.mouse.stop,this.handleDragStop),(0,Se.removeEvent)(ct,It.touch.stop,this.handleDragStop),(0,Se.removeEvent)(at,It.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Se.removeUserSelectStyles)(ct)}}findDOMNode(){var at,ct;return(at=this.props)!==null&&at!==void 0&&at.nodeRef?(ct=this.props)===null||ct===void 0||(ct=ct.nodeRef)===null||ct===void 0?void 0:ct.current:ue.default.findDOMNode(this)}render(){return Ct.cloneElement(Ct.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}ze.default=et,Ie(et,"displayName","DraggableCore"),Ie(et,"propTypes",{allowAnyClick:ee.default.bool,children:ee.default.node.isRequired,disabled:ee.default.bool,enableUserSelectHack:ee.default.bool,offsetParent:function(At,at){if(At[at]&&At[at].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:ee.default.arrayOf(ee.default.number),handle:ee.default.string,cancel:ee.default.string,nodeRef:ee.default.object,onStart:ee.default.func,onDrag:ee.default.func,onStop:ee.default.func,onMouseDown:ee.default.func,scale:ee.default.number,className:Ht.dontSetMe,style:Ht.dontSetMe,transform:Ht.dontSetMe}),Ie(et,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},12911:function(xn,ze,Qt){"use strict";const{default:Ct,DraggableCore:ee}=Qt(2637);xn.exports=Ct,xn.exports.default=Ct,xn.exports.DraggableCore=ee},13957:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.addClassName=bt,ze.addEvent=Ae,ze.addUserSelectStyles=pt,ze.createCSSTransform=nt,ze.createSVGTransform=et,ze.getTouch=at,ze.getTouchIdentifier=ct,ze.getTranslation=At,ze.innerHeight=Xt,ze.innerWidth=Ee,ze.matchesSelector=Ht,ze.matchesSelectorAndParentsTo=ie,ze.offsetXYFromParent=It,ze.outerHeight=Wt,ze.outerWidth=Ie,ze.removeClassName=Rt,ze.removeEvent=re,ze.removeUserSelectStyles=xt;var Ct=Qt(36641),ee=Se(Qt(32092));function ue(Ot){if(typeof WeakMap!="function")return null;var Zt=new WeakMap,Vt=new WeakMap;return(ue=function($t){return $t?Vt:Zt})(Ot)}function Se(Ot,Zt){if(!Zt&&Ot&&Ot.__esModule)return Ot;if(Ot===null||typeof Ot!="object"&&typeof Ot!="function")return{default:Ot};var Vt=ue(Zt);if(Vt&&Vt.has(Ot))return Vt.get(Ot);var $t={},Ce=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var fe in Ot)if(fe!=="default"&&Object.prototype.hasOwnProperty.call(Ot,fe)){var rn=Ce?Object.getOwnPropertyDescriptor(Ot,fe):null;rn&&(rn.get||rn.set)?Object.defineProperty($t,fe,rn):$t[fe]=Ot[fe]}return $t.default=Ot,Vt&&Vt.set(Ot,$t),$t}let de="";function Ht(Ot,Zt){return de||(de=(0,Ct.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Vt){return(0,Ct.isFunction)(Ot[Vt])})),(0,Ct.isFunction)(Ot[de])?Ot[de](Zt):!1}function ie(Ot,Zt,Vt){let $t=Ot;do{if(Ht($t,Zt))return!0;if($t===Vt)return!1;$t=$t.parentNode}while($t);return!1}function Ae(Ot,Zt,Vt,$t){if(!Ot)return;const Ce=Pd({capture:!0},$t);Ot.addEventListener?Ot.addEventListener(Zt,Vt,Ce):Ot.attachEvent?Ot.attachEvent("on"+Zt,Vt):Ot["on"+Zt]=Vt}function re(Ot,Zt,Vt,$t){if(!Ot)return;const Ce=Pd({capture:!0},$t);Ot.removeEventListener?Ot.removeEventListener(Zt,Vt,Ce):Ot.detachEvent?Ot.detachEvent("on"+Zt,Vt):Ot["on"+Zt]=null}function Wt(Ot){let Zt=Ot.clientHeight;const Vt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt+=(0,Ct.int)(Vt.borderTopWidth),Zt+=(0,Ct.int)(Vt.borderBottomWidth),Zt}function Ie(Ot){let Zt=Ot.clientWidth;const Vt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt+=(0,Ct.int)(Vt.borderLeftWidth),Zt+=(0,Ct.int)(Vt.borderRightWidth),Zt}function Xt(Ot){let Zt=Ot.clientHeight;const Vt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt-=(0,Ct.int)(Vt.paddingTop),Zt-=(0,Ct.int)(Vt.paddingBottom),Zt}function Ee(Ot){let Zt=Ot.clientWidth;const Vt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt-=(0,Ct.int)(Vt.paddingLeft),Zt-=(0,Ct.int)(Vt.paddingRight),Zt}function It(Ot,Zt,Vt){const Ce=Zt===Zt.ownerDocument.body?{left:0,top:0}:Zt.getBoundingClientRect(),fe=(Ot.clientX+Zt.scrollLeft-Ce.left)/Vt,rn=(Ot.clientY+Zt.scrollTop-Ce.top)/Vt;return{x:fe,y:rn}}function nt(Ot,Zt){const Vt=At(Ot,Zt,"px");return{[(0,ee.browserPrefixToKey)("transform",ee.default)]:Vt}}function et(Ot,Zt){return At(Ot,Zt,"")}function At(Ot,Zt,Vt){let{x:$t,y:Ce}=Ot,fe="translate(".concat($t).concat(Vt,",").concat(Ce).concat(Vt,")");if(Zt){const rn="".concat(typeof Zt.x=="string"?Zt.x:Zt.x+Vt),tn="".concat(typeof Zt.y=="string"?Zt.y:Zt.y+Vt);fe="translate(".concat(rn,", ").concat(tn,")")+fe}return fe}function at(Ot,Zt){return Ot.targetTouches&&(0,Ct.findInArray)(Ot.targetTouches,Vt=>Zt===Vt.identifier)||Ot.changedTouches&&(0,Ct.findInArray)(Ot.changedTouches,Vt=>Zt===Vt.identifier)}function ct(Ot){if(Ot.targetTouches&&Ot.targetTouches[0])return Ot.targetTouches[0].identifier;if(Ot.changedTouches&&Ot.changedTouches[0])return Ot.changedTouches[0].identifier}function pt(Ot){if(!Ot)return;let Zt=Ot.getElementById("react-draggable-style-el");Zt||(Zt=Ot.createElement("style"),Zt.type="text/css",Zt.id="react-draggable-style-el",Zt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Zt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Ot.getElementsByTagName("head")[0].appendChild(Zt)),Ot.body&&bt(Ot.body,"react-draggable-transparent-selection")}function xt(Ot){if(Ot)try{if(Ot.body&&Rt(Ot.body,"react-draggable-transparent-selection"),Ot.selection)Ot.selection.empty();else{const Zt=(Ot.defaultView||window).getSelection();Zt&&Zt.type!=="Caret"&&Zt.removeAllRanges()}}catch(Zt){}}function bt(Ot,Zt){Ot.classList?Ot.classList.add(Zt):Ot.className.match(new RegExp("(?:^|\\s)".concat(Zt,"(?!\\S)")))||(Ot.className+=" ".concat(Zt))}function Rt(Ot,Zt){Ot.classList?Ot.classList.remove(Zt):Ot.className=Ot.className.replace(new RegExp("(?:^|\\s)".concat(Zt,"(?!\\S)"),"g"),"")}},32092:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.browserPrefixToKey=ee,ze.browserPrefixToStyle=ue,ze.default=void 0,ze.getPrefix=Ct;const Qt=["Moz","Webkit","O","ms"];function Ct(){var Ht;let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const Ae=(Ht=window.document)===null||Ht===void 0||(Ht=Ht.documentElement)===null||Ht===void 0?void 0:Ht.style;if(!Ae||ie in Ae)return"";for(let re=0;re<Qt.length;re++)if(ee(ie,Qt[re])in Ae)return Qt[re];return""}function ee(Ht,ie){return ie?"".concat(ie).concat(Se(Ht)):Ht}function ue(Ht,ie){return ie?"-".concat(ie.toLowerCase(),"-").concat(Ht):Ht}function Se(Ht){let ie="",Ae=!0;for(let re=0;re<Ht.length;re++)Ae?(ie+=Ht[re].toUpperCase(),Ae=!1):Ht[re]==="-"?Ae=!0:ie+=Ht[re];return ie}var de=ze.default=Ct()},94187:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=Qt;function Qt(){}},60976:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.canDragX=de,ze.canDragY=Ht,ze.createCoreData=Ae,ze.createDraggableData=re,ze.getBoundPosition=ue,ze.getControlPosition=ie,ze.snapToGrid=Se;var Ct=Qt(36641),ee=Qt(13957);function ue(Xt,Ee,It){if(!Xt.props.bounds)return[Ee,It];let{bounds:nt}=Xt.props;nt=typeof nt=="string"?nt:Wt(nt);const et=Ie(Xt);if(typeof nt=="string"){const{ownerDocument:At}=et,at=At.defaultView;let ct;if(nt==="parent"?ct=et.parentNode:ct=At.querySelector(nt),!(ct instanceof at.HTMLElement))throw new Error('Bounds selector "'+nt+'" could not find an element.');const pt=ct,xt=at.getComputedStyle(et),bt=at.getComputedStyle(pt);nt={left:-et.offsetLeft+(0,Ct.int)(bt.paddingLeft)+(0,Ct.int)(xt.marginLeft),top:-et.offsetTop+(0,Ct.int)(bt.paddingTop)+(0,Ct.int)(xt.marginTop),right:(0,ee.innerWidth)(pt)-(0,ee.outerWidth)(et)-et.offsetLeft+(0,Ct.int)(bt.paddingRight)-(0,Ct.int)(xt.marginRight),bottom:(0,ee.innerHeight)(pt)-(0,ee.outerHeight)(et)-et.offsetTop+(0,Ct.int)(bt.paddingBottom)-(0,Ct.int)(xt.marginBottom)}}return(0,Ct.isNum)(nt.right)&&(Ee=Math.min(Ee,nt.right)),(0,Ct.isNum)(nt.bottom)&&(It=Math.min(It,nt.bottom)),(0,Ct.isNum)(nt.left)&&(Ee=Math.max(Ee,nt.left)),(0,Ct.isNum)(nt.top)&&(It=Math.max(It,nt.top)),[Ee,It]}function Se(Xt,Ee,It){const nt=Math.round(Ee/Xt[0])*Xt[0],et=Math.round(It/Xt[1])*Xt[1];return[nt,et]}function de(Xt){return Xt.props.axis==="both"||Xt.props.axis==="x"}function Ht(Xt){return Xt.props.axis==="both"||Xt.props.axis==="y"}function ie(Xt,Ee,It){const nt=typeof Ee=="number"?(0,ee.getTouch)(Xt,Ee):null;if(typeof Ee=="number"&&!nt)return null;const et=Ie(It),At=It.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,ee.offsetXYFromParent)(nt||Xt,At,It.props.scale)}function Ae(Xt,Ee,It){const nt=!(0,Ct.isNum)(Xt.lastX),et=Ie(Xt);return nt?{node:et,deltaX:0,deltaY:0,lastX:Ee,lastY:It,x:Ee,y:It}:{node:et,deltaX:Ee-Xt.lastX,deltaY:It-Xt.lastY,lastX:Xt.lastX,lastY:Xt.lastY,x:Ee,y:It}}function re(Xt,Ee){const It=Xt.props.scale;return{node:Ee.node,x:Xt.state.x+Ee.deltaX/It,y:Xt.state.y+Ee.deltaY/It,deltaX:Ee.deltaX/It,deltaY:Ee.deltaY/It,lastX:Xt.state.x,lastY:Xt.state.y}}function Wt(Xt){return{left:Xt.left,top:Xt.top,right:Xt.right,bottom:Xt.bottom}}function Ie(Xt){const Ee=Xt.findDOMNode();if(!Ee)throw new Error("<DraggableCore>: Unmounted during event!");return Ee}},36641:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.dontSetMe=Se,ze.findInArray=Qt,ze.int=ue,ze.isFunction=Ct,ze.isNum=ee;function Qt(de,Ht){for(let ie=0,Ae=de.length;ie<Ae;ie++)if(Ht.apply(Ht,[de[ie],ie,de]))return de[ie]}function Ct(de){return typeof de=="function"||Object.prototype.toString.call(de)==="[object Function]"}function ee(de){return typeof de=="number"&&!isNaN(de)}function ue(de){return parseInt(de,10)}function Se(de,Ht,ie){if(de[Ht])return new Error("Invalid prop ".concat(Ht," passed to ").concat(ie," - do not set this, set it on the child."))}},27774:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.SizeSensorId=ze.SensorTabIndex=ze.SensorClassName=void 0;var Qt="size-sensor-id";ze.SizeSensorId=Qt;var Ct="size-sensor-object";ze.SensorClassName=Ct;var ee="-1";ze.SensorTabIndex=ee},79301:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Qt=function(ee){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,Se=null;return function(){for(var de=this,Ht=arguments.length,ie=new Array(Ht),Ae=0;Ae<Ht;Ae++)ie[Ae]=arguments[Ae];clearTimeout(Se),Se=setTimeout(function(){ee.apply(de,ie)},ue)}};ze.default=Qt},79789:function(xn,ze){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.default=void 0;var Qt=1,Ct=function(){return"".concat(Qt++)};ze.default=Ct},47242:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.ver=ze.clear=ze.bind=void 0;var Ct=Qt(95270),ee=function(Ht,ie){var Ae=(0,Ct.getSensor)(Ht);return Ae.bind(ie),function(){Ae.unbind(ie)}};ze.bind=ee;var ue=function(Ht){var ie=(0,Ct.getSensor)(Ht);(0,Ct.removeSensor)(ie)};ze.clear=ue;var Se="1.0.2";ze.ver=Se},95270:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.removeSensor=ze.getSensor=ze.Sensors=void 0;var Ct=Se(Qt(79789)),ee=Qt(57829),ue=Qt(27774);function Se(re){return re&&re.__esModule?re:{default:re}}var de={};ze.Sensors=de;function Ht(re){re&&de[re]&&delete de[re]}var ie=function(Wt){var Ie=Wt.getAttribute(ue.SizeSensorId);if(Ie&&de[Ie])return de[Ie];var Xt=(0,Ct.default)();Wt.setAttribute(ue.SizeSensorId,Xt);var Ee=(0,ee.createSensor)(Wt,function(){return Ht(Xt)});return de[Xt]=Ee,Ee};ze.getSensor=ie;var Ae=function(Wt){var Ie=Wt.element.getAttribute(ue.SizeSensorId);Wt.destroy(),Ht(Ie)};ze.removeSensor=Ae},57829:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var Ct=Qt(20953),ee=Qt(55202),ue=typeof ResizeObserver!="undefined"?ee.createSensor:Ct.createSensor;ze.createSensor=ue},20953:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var Ct=ue(Qt(79301)),ee=Qt(27774);function ue(de){return de&&de.__esModule?de:{default:de}}var Se=function(Ht,ie){var Ae=void 0,re=[],Wt=function(){getComputedStyle(Ht).position==="static"&&(Ht.style.position="relative");var et=document.createElement("object");return et.onload=function(){et.contentDocument.defaultView.addEventListener("resize",Ie),Ie()},et.style.display="block",et.style.position="absolute",et.style.top="0",et.style.left="0",et.style.height="100%",et.style.width="100%",et.style.overflow="hidden",et.style.pointerEvents="none",et.style.zIndex="-1",et.style.opacity="0",et.setAttribute("class",ee.SensorClassName),et.setAttribute("tabindex",ee.SensorTabIndex),et.type="text/html",Ht.appendChild(et),et.data="about:blank",et},Ie=(0,Ct.default)(function(){re.forEach(function(nt){nt(Ht)})}),Xt=function(et){Ae||(Ae=Wt()),re.indexOf(et)===-1&&re.push(et)},Ee=function(){Ae&&Ae.parentNode&&(Ae.contentDocument&&Ae.contentDocument.defaultView.removeEventListener("resize",Ie),Ae.parentNode.removeChild(Ae),Ht.removeAttribute(ee.SizeSensorId),Ae=void 0,re=[],ie&&ie())},It=function(et){var At=re.indexOf(et);At!==-1&&re.splice(At,1),re.length===0&&Ae&&Ee()};return{element:Ht,bind:Xt,destroy:Ee,unbind:It}};ze.createSensor=Se},55202:function(xn,ze,Qt){"use strict";Object.defineProperty(ze,"__esModule",{value:!0}),ze.createSensor=void 0;var Ct=Qt(27774),ee=ue(Qt(79301));function ue(de){return de&&de.__esModule?de:{default:de}}var Se=function(Ht,ie){var Ae=void 0,re=[],Wt=(0,ee.default)(function(){re.forEach(function(nt){nt(Ht)})}),Ie=function(){var et=new ResizeObserver(Wt);return et.observe(Ht),Wt(),et},Xt=function(et){Ae||(Ae=Ie()),re.indexOf(et)===-1&&re.push(et)},Ee=function(){Ae.disconnect(),re=[],Ae=void 0,Ht.removeAttribute(Ct.SizeSensorId),ie&&ie()},It=function(et){var At=re.indexOf(et);At!==-1&&re.splice(At,1),re.length===0&&Ae&&Ee()};return{element:Ht,bind:Xt,destroy:Ee,unbind:It}};ze.createSensor=Se},93314:function(xn){"use strict";xn.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(xn){"use strict";xn.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(xn){"use strict";xn.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(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(xn,ze,Qt){"use strict";Qt.d(ze,{Z:function(){return Ae}});const Ct=re=>typeof re=="object"&&re!=null&&re.nodeType===1,ee=(re,Wt)=>(!Wt||re!=="hidden")&&re!=="visible"&&re!=="clip",ue=(re,Wt)=>{if(re.clientHeight<re.scrollHeight||re.clientWidth<re.scrollWidth){const Ie=getComputedStyle(re,null);return ee(Ie.overflowY,Wt)||ee(Ie.overflowX,Wt)||(Xt=>{const Ee=(It=>{if(!It.ownerDocument||!It.ownerDocument.defaultView)return null;try{return It.ownerDocument.defaultView.frameElement}catch(nt){return null}})(Xt);return!!Ee&&(Ee.clientHeight<Xt.scrollHeight||Ee.clientWidth<Xt.scrollWidth)})(re)}return!1},Se=(re,Wt,Ie,Xt,Ee,It,nt,et)=>It<re&&nt>Wt||It>re&&nt<Wt?0:It<=re&&et<=Ie||nt>=Wt&&et>=Ie?It-re-Xt:nt>Wt&&et<Ie||It<re&&et>Ie?nt-Wt+Ee:0,de=re=>{const Wt=re.parentElement;return Wt==null?re.getRootNode().host||null:Wt},Ht=(re,Wt)=>{var Ie,Xt,Ee,It;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:At,boundary:at,skipOverflowHiddenElements:ct}=Wt,pt=typeof at=="function"?at:ai=>ai!==at;if(!Ct(re))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,bt=[];let Rt=re;for(;Ct(Rt)&&pt(Rt);){if(Rt=de(Rt),Rt===xt){bt.push(Rt);break}Rt!=null&&Rt===document.body&&ue(Rt)&&!ue(document.documentElement)||Rt!=null&&ue(Rt,ct)&&bt.push(Rt)}const Ot=(Xt=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?Xt:innerWidth,Zt=(It=(Ee=window.visualViewport)==null?void 0:Ee.height)!=null?It:innerHeight,{scrollX:Vt,scrollY:$t}=window,{height:Ce,width:fe,top:rn,right:tn,bottom:Bn,left:Fn}=re.getBoundingClientRect(),{top:kn,right:Gn,bottom:ti,left:me}=(ai=>{const sn=window.getComputedStyle(ai);return{top:parseFloat(sn.scrollMarginTop)||0,right:parseFloat(sn.scrollMarginRight)||0,bottom:parseFloat(sn.scrollMarginBottom)||0,left:parseFloat(sn.scrollMarginLeft)||0}})(re);let oe=et==="start"||et==="nearest"?rn-kn:et==="end"?Bn+ti:rn+Ce/2-kn+ti,Cn=At==="center"?Fn+fe/2-me+Gn:At==="end"?tn+Gn:Fn-me;const li=[];for(let ai=0;ai<bt.length;ai++){const sn=bt[ai],{height:Rn,width:ri,top:Ui,right:en,bottom:ei,left:Fe}=sn.getBoundingClientRect();if(nt==="if-needed"&&rn>=0&&Fn>=0&&Bn<=Zt&&tn<=Ot&&(sn===xt&&!ue(sn)||rn>=Ui&&Bn<=ei&&Fn>=Fe&&tn<=en))return li;const ci=getComputedStyle(sn),Ti=parseInt(ci.borderLeftWidth,10),jt=parseInt(ci.borderTopWidth,10),Mt=parseInt(ci.borderRightWidth,10),mt=parseInt(ci.borderBottomWidth,10);let vt=0,Lt=0;const Bt="offsetWidth"in sn?sn.offsetWidth-sn.clientWidth-Ti-Mt:0,_t="offsetHeight"in sn?sn.offsetHeight-sn.clientHeight-jt-mt:0,Le="offsetWidth"in sn?sn.offsetWidth===0?0:ri/sn.offsetWidth:0,xe="offsetHeight"in sn?sn.offsetHeight===0?0:Rn/sn.offsetHeight:0;if(xt===sn)vt=et==="start"?oe:et==="end"?oe-Zt:et==="nearest"?Se($t,$t+Zt,Zt,jt,mt,$t+oe,$t+oe+Ce,Ce):oe-Zt/2,Lt=At==="start"?Cn:At==="center"?Cn-Ot/2:At==="end"?Cn-Ot:Se(Vt,Vt+Ot,Ot,Ti,Mt,Vt+Cn,Vt+Cn+fe,fe),vt=Math.max(0,vt+$t),Lt=Math.max(0,Lt+Vt);else{vt=et==="start"?oe-Ui-jt:et==="end"?oe-ei+mt+_t:et==="nearest"?Se(Ui,ei,Rn,jt,mt+_t,oe,oe+Ce,Ce):oe-(Ui+Rn/2)+_t/2,Lt=At==="start"?Cn-Fe-Ti:At==="center"?Cn-(Fe+ri/2)+Bt/2:At==="end"?Cn-en+Mt+Bt:Se(Fe,en,ri,Ti,Mt+Bt,Cn,Cn+fe,fe);const{scrollLeft:Xe,scrollTop:Me}=sn;vt=xe===0?0:Math.max(0,Math.min(Me+vt/xe,sn.scrollHeight-Rn/xe+_t)),Lt=Le===0?0:Math.max(0,Math.min(Xe+Lt/Le,sn.scrollWidth-ri/Le+Bt)),oe+=Me-vt,Cn+=Xe-Lt}li.push({el:sn,top:vt,left:Lt})}return li},ie=re=>re===!1?{block:"end",inline:"nearest"}:(Wt=>Wt===Object(Wt)&&Object.keys(Wt).length!==0)(re)?re:{block:"start",inline:"nearest"};function Ae(re,Wt){if(!re.isConnected||!(Ee=>{let It=Ee;for(;It&&It.parentNode;){if(It.parentNode===document)return!0;It=It.parentNode instanceof ShadowRoot?It.parentNode.host:It.parentNode}return!1})(re))return;const Ie=(Ee=>{const It=window.getComputedStyle(Ee);return{top:parseFloat(It.scrollMarginTop)||0,right:parseFloat(It.scrollMarginRight)||0,bottom:parseFloat(It.scrollMarginBottom)||0,left:parseFloat(It.scrollMarginLeft)||0}})(re);if((Ee=>typeof Ee=="object"&&typeof Ee.behavior=="function")(Wt))return Wt.behavior(Ht(re,Wt));const Xt=typeof Wt=="boolean"||Wt==null?void 0:Wt.behavior;for(const{el:Ee,top:It,left:nt}of Ht(re,ie(Wt))){const et=It-Ie.top+Ie.bottom,At=nt-Ie.left+Ie.right;Ee.scroll({top:et,left:At,behavior:Xt})}}}}]);
}());