(self.webpackChunk=self.webpackChunk||[]).push([[4496],{40001:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},26227:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},41464:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},73331:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},15277:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},61485:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},47472:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(96663),de=Ot(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},je=se,Jt=Ot(7657),ue=function(ne,Xe){return de.createElement(Jt.Z,(0,Tt.Z)({},ne,{ref:Xe,icon:je}))},ie=de.forwardRef(ue),Ve=ie},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Ln,En){"use strict";En.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74413:function(){"use strict";function Ln(At,et,nt,ft){nt===void 0&&(nt=0),ft===void 0&&(ft=1/0),this._name=At,this._defaultValue=et,this._minimum=nt,this._maximum=ft}Object.defineProperty(Ln.prototype,"name",{get:function(){return this._name},set:function(At){if(typeof At!="string"||At==="")throw new Error("Shape name must be a valid string.");this._name=At}}),Object.defineProperty(Ln.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("The default value must be a real number, not: "+At);this._defaultValue=At}}),Object.defineProperty(Ln.prototype,"minimum",{get:function(){return this._minimum},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("Minimum must be a real number, not: "+At);this._minimum=At}}),Object.defineProperty(Ln.prototype,"maximum",{get:function(){return this._maximum},set:function(At){if(typeof At!="number"||isNaN(At))throw new Error("Maximum must be a real number, not: "+At);this._maximum=At}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(At,et){var nt=go.Shape._FigureParameters[At];return nt?nt[et]:null},go.Shape.setFigureParameter=function(At,et,nt){if(!(nt instanceof Ln))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValuent.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ft=go.Shape._FigureParameters[At];ft||(ft=[],go.Shape._FigureParameters[At]=ft),ft[et]=nt};var En=[];function Ot(At,et){var nt=En.pop();return nt===void 0?new go.Point(At,et):(nt.x=At,nt.y=et,nt)}function Tt(){var At=En.pop();return At===void 0?new go.Point:At}function de(At){En.push(At)}function se(At,et,nt,ft,lt,pt,vt,wt,Nt){Nt||(Nt=new go.Point);var bt=At-nt,Ht=lt-vt,_t=NaN,Qt=NaN;if(bt===0)if(Ht===0)At===nt&&(_t=At,Qt=et);else{var qt=(pt-wt)/Ht,Se=pt-qt*lt;_t=At,Qt=qt*_t+Se}else if(Ht===0){var he=(et-ft)/bt,Re=et-he*At;_t=lt,Qt=he*_t+Re}else{var he=(et-ft)/bt,qt=(pt-wt)/Ht,Re=et-he*At,Se=pt-qt*lt;_t=(Se-Re)/(he-qt),Qt=he*_t+Re}return Nt.x=_t,Nt.y=Qt,Nt}function je(At,et,nt,ft,lt,pt,vt,wt,Nt,bt,Ht,_t,Qt,qt){var Se=1-Nt,he=Nt,Re=At*Se+nt*he,pe=et*Se+ft*he,Ke=nt*Se+lt*he,Cn=ft*Se+pt*he,ln=lt*Se+vt*he,dn=pt*Se+wt*he,Hn=Re*Se+Ke*he,ae=pe*Se+Cn*he,Ut=Ke*Se+ln*he,hn=Cn*Se+dn*he,Qn=Hn*Se+Ut*he,ti=ae*Se+hn*he;bt.x=Re,bt.y=pe,Ht.x=Hn,Ht.y=ae,_t.x=Qn,_t.y=ti,Qt.x=Ut,Qt.y=hn,qt.x=ln,qt.y=dn}var Jt=new go.Spot(.156,.156),ue=new go.Spot(.844,.844),ie=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Ln("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=5),ft=Math.min(ft,et/3),ft=Math.min(ft,nt/3);var lt=ft*ie,pt=new go.Geometry().add(new go.PathFigure(ft,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ft,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ft,et-lt,0,et,lt)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ft)).add(new go.PathSegment(go.PathSegment.Bezier,et-ft,nt,et,nt-lt,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ft,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ft,lt,nt,0,nt-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ft)).add(new go.PathSegment(go.PathSegment.Bezier,ft,0,0,lt,lt,0).close()));return lt>1&&(pt.spot1=new go.Spot(0,0,lt,lt),pt.spot2=new go.Spot(1,1,-lt,-lt)),pt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(At,et,nt){var ft=new go.Geometry(go.Geometry.Line);return ft.startX=0,ft.startY=nt/2,ft.endX=et,ft.endY=nt/2,ft}),go.Shape.defineFigureGenerator("LineV",function(At,et,nt){var ft=new go.Geometry(go.Geometry.Line);return ft.startX=et/2,ft.startY=0,ft.endX=et/2,ft.endY=nt,ft}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(At,et,nt){var ft=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ft*et,(1-ft)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,ft*nt)).add(new go.PathSegment(go.PathSegment.Move,ft*et,ft*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,(1-ft)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(At,et,nt){var ft=et/2,lt=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ft,ft,ft,ft).close()));return lt.spot1=Jt,lt.spot2=ue,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(At,et,nt){var ft=new go.Geometry(go.Geometry.Line);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}),go.Shape.defineFigureGenerator("Line2",function(At,et,nt){var ft=new go.Geometry(go.Geometry.Line);return ft.startX=et,ft.startY=0,ft.endX=0,ft.endY=nt,ft}),go.Shape.defineFigureGenerator("Curve1",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,ie*et,0,et,(1-ie)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,ie*nt,(1-ie)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,ie*nt,ie*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-ie)*et,0,0,(1-ie)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Ln("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)?ft=.1:ft<-1?ft=-1:ft>1&&(ft=1);var lt=Math.abs(ft)*et;if(ft===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=et,pt.endY=nt,pt}else{var pt=new go.Geometry;return ft>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),ltet&&(ft=et);var lt=Math.abs(ft);if(ft===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=et,pt.endY=nt,pt}else{var pt=new go.Geometry;return ft>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt.5&&(ft=.5);var lt=Math.abs(ft)*et;if(ft===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=et,pt.endY=nt,pt}else{var pt=new go.Geometry;return ft>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),ltet&&(ft=et/2);var lt=Math.abs(ft);if(ft===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=et,pt.endY=nt,pt}else{var pt=new go.Geometry;return ft>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),ltet&&(ft=et/2);var lt=Math.abs(ft);if(ft===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=et,pt.endY=nt,pt}else{var pt=new go.Geometry;return ft>0?pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())):pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),lt0&&(vt.add(new go.PathSegment(go.PathSegment.Move,et/2+wt,et/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,wt,wt).close())),pt.spot1=Jt,pt.spot2=ue,pt.defaultStretch=go.GraphObject.Uniform,pt}),go.Shape.defineFigureGenerator("Cloud",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(At,et,nt){var ft=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ft*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ft*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ft)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ft*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ft)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ft*nt).close())).setSpots(ft/2,ft/2,1-ft/2,1-ft/2)}),go.Shape.setFigureParameter("Pie",0,new Ln("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Ln("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(At,et,nt){var ft=At?At.parameter1:NaN,lt=At?At.parameter2:NaN;isNaN(ft)&&(ft=0),isNaN(lt)&&(lt=315);var pt=ft%360;pt<0&&(pt+=360);var vt=lt%360,wt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(wt,wt).add(new go.PathSegment(go.PathSegment.Arc,pt,vt,wt,wt,wt,wt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(At,et,nt){var ft=ie/Math.SQRT2*.5,lt=Math.SQRT2/2,pt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*et,pt*nt,et,(1-ft)*nt,(lt+ft)*et,(pt+ft)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Ln("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=30);var lt=Math.min(ft,et)/2,pt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(pt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,pt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Ln("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=10);var lt=Math.min(ft,et)/2,pt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(pt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,pt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new Ln("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(At,et,nt){var ft=At?At.parameter1:NaN;if((isNaN(ft)||ft<0)&&(ft=30),et===0||nt===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=et,lt.endY=nt,lt}else{var pt=et/2,vt=nt/2,wt=Math.atan2(nt,et),Nt=ft-Math.min(Math.cos(wt)*ft/2,pt),bt=ft-Math.min(Math.sin(wt)*ft/2,vt),lt=new go.Geometry,Ht=new go.PathFigure(Nt,0,!0);return lt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,pt,.2*nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,et-Nt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,et,bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.8*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,et,nt-bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,et-Nt,nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,pt,.8*nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,Nt,nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,nt-bt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,bt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new Ln("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=10);var lt=new go.Geometry,pt=new go.PathFigure(.1*et,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new Ln("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.2);var lt=new go.Geometry,pt=new go.PathFigure(0,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,ft*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+ft/2)*et,ft*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+ft/2)*et,(1-ft)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ft)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ft)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5-ft/2)*et,(1-ft)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5-ft/2)*et,ft*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,ft*nt).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new Ln("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.5);var lt=new go.Geometry,pt=new go.PathFigure(0,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ft)*et,.25*nt,Math.abs(1-ft)*et,.75*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ft*et,.75*nt,ft*et,.25*nt).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,ie*et,0,et,(.5-ie/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+ie/2)*nt,ie*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.4*et,.6*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var pt=.2,vt=.3,wt=0,Nt=pt*ie;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+pt+wt)*nt,(.5-pt+vt)*et,(.5+Nt+wt)*nt,(.5-Nt+vt)*et,(.5+pt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pt+vt)*et,(.5+wt)*nt,(.5+Nt+vt)*et,(.5+pt+wt)*nt,(.5+pt+vt)*et,(.5+Nt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-pt+wt)*nt,(1-.5+pt+vt)*et,(.5-Nt+wt)*nt,(.5+Nt+vt)*et,(.5-pt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Nt+vt)*et,(.5-pt+wt)*nt,(.5-pt+vt+.05)*et,(.5-Nt+wt-.02)*nt)),pt=.2,vt=0,wt=-.3,Nt=pt*ie,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pt+vt)*et,(.5+wt)*nt,(.5+Nt+vt)*et,(.5+pt+wt)*nt,(.5+pt+vt)*et,(.5+Nt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-pt+wt)*nt,(1-.5+pt+vt)*et,(.5-Nt+wt)*nt,(.5+Nt+vt)*et,(.5-pt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pt+vt)*et,(.5+wt)*nt,(.5-Nt+vt)*et,(.5-pt+wt)*nt,(.5-pt+vt)*et,(.5-Nt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Nt+vt)*et,(.5+pt+wt)*nt,(.5-pt+vt)*et,(.5+Nt+wt)*nt,(.5-Nt+vt)*et,(.5+pt+wt)*nt)),pt=.2,vt=-.3,wt=0,Nt=pt*ie,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-pt+wt)*nt,(1-.5+pt+vt-.05)*et,(.5-Nt+wt-.02)*nt,(.5+Nt+vt)*et,(.5-pt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pt+vt)*et,(.5+wt)*nt,(.5-Nt+vt)*et,(.5-pt+wt)*nt,(.5-pt+vt)*et,(.5-Nt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+pt+wt)*nt,(.5-pt+vt)*et,(.5+Nt+wt)*nt,(.5-Nt+vt)*et,(.5+pt+wt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Nt+vt)*et,(.5+pt+wt)*nt,(.5+pt+vt)*et,(.5+Nt+wt)*nt).close()),ft.setSpots(.06,.33,.93,.68),ft}),go.Shape.defineFigureGenerator("YinYang",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*.5,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var pt=.1,vt=.5,wt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(vt+pt)*et,wt*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*vt,nt*wt,pt*et,pt*et).close()),lt=new go.PathFigure(et*.5,0,!1),ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),wt=.75,lt=new go.PathFigure((vt+pt)*et,wt*nt,!0),ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*vt,nt*wt,pt*et,pt*et).close()),ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("Peace",function(At,et,nt){var ft=.8535533905932737,lt=.5*et,pt=.5*nt;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,pt,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt)).add(new go.PathSegment(go.PathSegment.Move,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,ft*nt)).add(new go.PathSegment(go.PathSegment.Move,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,ft*et,ft*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=.5,vt=.5,wt=.5,Nt=new go.PathFigure(vt*et,(wt-pt)*nt);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),pt=.4,lt=ie*.4;var bt=Tt(),Ht=Tt(),_t=Tt(),Qt=Tt();je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.42,bt,Ht,_t,Qt,Qt);var qt=Tt(),Se=Tt(),he=Tt();je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.58,Qt,Qt,he,qt,Se);var Re=Tt(),pe=Tt(),Ke=Tt();je(vt,wt+pt,vt-lt,wt+pt,vt-pt,wt+lt,vt-pt,wt,.42,Re,pe,Ke,Qt,Qt);var Cn=Tt(),ln=Tt(),dn=Tt();return je(vt,wt+pt,vt-lt,wt+pt,vt-pt,wt+lt,vt-pt,wt,.58,Qt,Qt,dn,Cn,ln),Nt.add(new go.PathSegment(go.PathSegment.Move,dn.x*et,dn.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,Cn.x*et,Cn.y*nt,ln.x*et,ln.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*et,_t.y*nt,bt.x*et,bt.y*nt,Ht.x*et,Ht.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,dn.x*et,dn.y*nt).close()),Nt.add(new go.PathSegment(go.PathSegment.Move,Ke.x*et,Ke.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,he.x*et,he.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,qt.x*et,qt.y*nt,Se.x*et,Se.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*et,Ke.y*nt,Re.x*et,Re.y*nt,pe.x*et,pe.y*nt).close()),de(bt),de(Ht),de(_t),de(Qt),de(qt),de(Se),de(he),de(Re),de(pe),de(Ke),de(Cn),de(ln),de(dn),ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("Fragile",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Ln("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=30),ft>et&&(ft=et);var lt=(et-ft)/2,pt=lt+ft;return new go.Geometry().add(new go.PathFigure(pt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(At,et,nt){var ft=new go.Geometry,lt=ie*.4,pt=.4,vt=.5,wt=.5,Nt=Tt(),bt=Tt(),Ht=Tt(),_t=Tt(),Qt=new go.PathFigure((vt-pt)*et,wt*nt,!1);ft.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt)),je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.44,Ht,_t,bt,Nt,Nt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*et,bt.y*nt,Ht.x*et,Ht.y*nt,_t.x*et,_t.y*nt));var qt=Ot(bt.x,bt.y);je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.56,Nt,Nt,bt,Ht,_t);var Se=Ot(bt.x,bt.y);Qt.add(new go.PathSegment(go.PathSegment.Line,(qt.x*.1+.95*.9)*et,qt.y*.1*nt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.85*et,qt.y*.1*nt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,et,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),Qt.add(new go.PathSegment(go.PathSegment.Line,(Se.x*.1+.9)*et,.15*nt)),Qt.add(new go.PathSegment(go.PathSegment.Line,(Se.x*.1+.9)*et,(Se.y*.1+.05*.9)*nt)),Qt.add(new go.PathSegment(go.PathSegment.Line,Se.x*et,Se.y*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,Ht.x*et,Ht.y*nt,_t.x*et,_t.y*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt)),pt=.35,lt=ie*.35;var he=new go.PathFigure(vt*et,(wt-pt)*nt,!1);ft.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt));var Re=new go.PathFigure((vt-pt)*et,wt*nt,!1);return ft.add(Re),de(Nt),de(bt),de(Ht),de(_t),de(qt),de(Se),ft.spot1=new go.Spot(.202,.257),ft.spot2=new go.Spot(.792,.739),ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("GenderFemale",function(At,et,nt){var ft=new go.Geometry,lt=.375,pt=0,vt=-.125,wt=lt*ie,Nt=new go.PathFigure((.525+pt)*et,(.5+lt+vt)*nt,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+pt)*et,(.5+vt)*nt,(.5+wt+pt)*et,(.5+lt+vt)*nt,(.5+lt+pt)*et,(.5+wt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*et,(.5-lt+vt)*nt,(1-.5+lt+pt)*et,(.5-wt+vt)*nt,(.5+wt+pt)*et,(.5-lt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*et,(.5+vt)*nt,(.5-wt+pt)*et,(.5-lt+vt)*nt,(.5-lt+pt)*et,(.5-wt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+pt)*et,(.5+lt+vt)*nt,(.5-lt+pt)*et,(.5+wt+vt)*nt,(.5-wt+pt)*et,(.5+lt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,pt=0,vt=-.125,wt=lt*ie;var Nt=new go.PathFigure((1-.5+lt+pt)*et,(.5+vt)*nt,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*et,(.5+lt+vt)*nt,(.5+lt+pt)*et,(.5+wt+vt)*nt,(.5+wt+pt)*et,(.5+lt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*et,(.5+vt)*nt,(.5-wt+pt)*et,(.5+lt+vt)*nt,(.5-lt+pt)*et,(.5+wt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*et,(.5-lt+vt)*nt,(.5-lt+pt)*et,(.5-wt+vt)*nt,(.5-wt+pt)*et,(.5-lt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+pt)*et,(.5+vt)*nt,(.5+wt+pt)*et,(.5-lt+vt)*nt,(1-.5+lt+pt)*et,(.5-wt+vt)*nt));var Nt=new go.PathFigure((.525+pt)*et,(.5+lt+vt)*nt,!1);return ft.add(Nt),ft.spot1=new go.Spot(.232,.136),ft.spot2=new go.Spot(.682,.611),ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("LogicImplies",function(At,et,nt){var ft=At?At.parameter1:NaN;return isNaN(ft)&&(ft=.2),new go.Geometry().add(new go.PathFigure((1-ft)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(At,et,nt){var ft=At?At.parameter1:NaN;return isNaN(ft)&&(ft=.2),new go.Geometry().add(new go.PathFigure((1-ft)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ft*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ft*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(At,et,nt){var ft=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("LogicTruth",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(At,et,nt){var ft=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ft*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ft*et,ft*nt,ft*et,ft*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(At,et,nt){var ft=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ft*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ft*et,ft*nt,ft*et,ft*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Ln("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Ln("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.3);var lt=At?At.parameter2:NaN;isNaN(lt)&&(lt=.3);var pt=(1-ft)*et,vt=(.5-lt/2)*nt,wt=(.5+lt/2)*nt,Nt=new go.Geometry,bt=new go.PathFigure(0,vt,!0);Nt.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,pt,vt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,0)),bt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,nt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,wt)),bt.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Nt.spot1=new go.Spot(0,vt/nt);var Ht=se(0,wt/nt,1,wt/nt,pt/et,1,1,.5,Tt());return Nt.spot2=new go.Spot(Ht.x,Ht.y),de(Ht),Nt}),go.Shape.setFigureParameter("Arrow2",0,new Ln("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Ln("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=30),ft>et&&(ft=et);var lt=At?At.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var pt=et-ft,vt=(nt-lt)/2,wt=vt+lt,Nt=new go.Geometry,bt=new go.PathFigure(0,vt,!0);Nt.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,pt,vt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,0)),bt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,nt)),bt.add(new go.PathSegment(go.PathSegment.Line,pt,wt)),bt.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Nt.spot1=new go.Spot(0,vt/nt);var Ht=se(0,wt/nt,1,wt/nt,pt/et,1,1,.5,Tt());return Nt.spot2=new go.Spot(Ht.x,Ht.y),de(Ht),Nt}),go.Shape.defineFigureGenerator("Chevron",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ft}),go.Shape.defineFigureGenerator("DoubleArrow",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ft}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Ln("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.3);var lt=(.5-ft/2)*nt,pt=(.5+ft/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Nt=se(0,.5,.3,0,0,lt/nt,.1,lt/nt,Tt());return vt.spot1=new go.Spot(Nt.x,Nt.y),Nt=se(.7,1,1,.5,0,pt/nt,1,pt/nt,Nt),vt.spot2=new go.Spot(Nt.x,Nt.y),de(Nt),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Ln("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Ln("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=40);var lt=At?At.parameter2:NaN;isNaN(lt)&&(lt=100);var pt=(nt-ft)/2,vt=pt+ft,wt=(nt-lt)/2,Nt=wt+lt;(ft>nt||lt>nt)&&(lt>ft?(ft=ft*nt/lt,pt=(nt-ft)/2,vt=pt+ft,wt=0,Nt=nt):(pt=0,vt=nt,wt=0,Nt=nt));var bt=new go.Geometry,Ht=new go.PathFigure(et,.5*nt,!0);bt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*et,Nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*et,wt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*et,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close());var _t=se(0,.5,.3,wt/nt,0,pt/nt,1,pt/nt,Tt());return bt.spot1=new go.Spot(_t.x,_t.y),_t=se(.7,Nt/nt,1,.5,0,vt/nt,1,vt/nt,_t),bt.spot2=new go.Spot(_t.x,_t.y),de(_t),bt}),go.Shape.setFigureParameter("IBeamArrow",0,new Ln("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.3);var lt=(.5-ft/2)*nt,pt=(.5+ft/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(0,lt/nt);var Nt=se(.7,1,1,.5,0,pt/nt,1,pt/nt,Tt());return vt.spot2=new go.Spot(Nt.x,Nt.y),de(Nt),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Ln("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Ln("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=40);var lt=At?At.parameter2:NaN;isNaN(lt)&&(lt=100);var pt=(nt-ft)/2,vt=pt+ft,wt=(nt-lt)/2,Nt=wt+lt;(ft>nt||lt>nt)&&(lt>ft?(ft=ft*nt/lt,pt=(nt-ft)/2,vt=pt+ft,wt=0,Nt=nt):(pt=0,vt=nt,wt=0,Nt=nt));var bt=new go.Geometry,Ht=new go.PathFigure(et,.5*nt,!0);bt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*et,Nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,Nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,wt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*et,wt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*et,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close()),bt.spot1=new go.Spot(0,pt/nt);var _t=se(.7,Nt/nt,1,.5,0,vt/nt,1,vt/nt,Tt());return bt.spot2=new go.Spot(_t.x,_t.y),de(_t),bt}),go.Shape.setFigureParameter("Pointer",0,new Ln("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.1);var lt=new go.Geometry,pt=new go.PathFigure(et,.5*nt,!0);lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,ft*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ft,.35);var vt=se(.2,.65,1,.65,0,1,1,.5,Tt());return lt.spot2=new go.Spot(vt.x,vt.y),de(vt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new Ln("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.3);var lt=new go.Geometry,pt=new go.PathFigure(et,.5*nt,!0);lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ft*et,.75*nt,ft*et,.25*nt).close()),lt.spot1=new go.Spot(ft,.35);var vt=se(0,.65,1,.65,0,1,1,.5,Tt());return lt.spot2=new go.Spot(vt.x,vt.y),de(vt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new Ln("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.4);var lt=(.5-ft/2)*nt,pt=(.5+ft/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,.3);var Nt=se(.7,1,1,.5,0,pt/nt,1,pt/nt,Tt());return vt.spot2=new go.Spot(Nt.x,Nt.y),de(Nt),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Ln("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=50);var lt=(nt-ft)/2,pt=lt+ft;ft>nt&&(lt=0,pt=nt);var vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,lt/nt);var Nt=se(.7,1,1,.5,0,pt/nt,1,pt/nt,Tt());return vt.spot2=new go.Spot(Nt.x,Nt.y),de(Nt),vt}),go.Shape.setFigureParameter("SquareArrow",0,new Ln("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.7);var lt=new go.Geometry,pt=new go.PathFigure(et,.5*nt,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,ft*et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),pt.add(new go.PathSegment(go.PathSegment.Line,ft*et,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ft,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(0,.9*nt,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+pt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+pt)*nt).close()),ft.spot1=new go.Spot(.25,.5),ft.spot2=new go.Spot(.75,.97),ft}),go.Shape.defineFigureGenerator("Cone2",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.9*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var pt=new go.PathFigure(0,.9*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ft.spot1=new go.Spot(.25,.5),ft.spot2=new go.Spot(.75,.82),ft}),go.Shape.defineFigureGenerator("Cube1",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var pt=new go.PathFigure(.5*et,nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ft.spot1=new go.Spot(0,.3),ft.spot2=new go.Spot(.5,.85),ft}),go.Shape.defineFigureGenerator("Cube2",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.3*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var pt=new go.PathFigure(0,.3*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ft.spot1=new go.Spot(0,.3),ft.spot2=new go.Spot(.7,1),ft}),go.Shape.defineFigureGenerator("Cylinder1",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=5),ft=Math.min(ft,nt/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(0,ft,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ie*ft,(.5-pt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ft,(.5+pt)*et,0,1*et,ie*ft)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ft)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-ie*ft,(.5+pt)*et,1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ft,(.5-pt)*et,1*nt,0,nt-ie*ft)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ft));var wt=new go.PathFigure(et,ft,!1);return lt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ft,1*et,2*ft-ie*ft,(.5+pt)*et,2*ft)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft,(.5-pt)*et,2*ft,0,2*ft-ie*ft)),lt.spot1=new go.Spot(0,0,0,2*ft),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=5),ft=Math.min(ft,nt/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(0,nt-ft,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ft)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ie*ft,(.5-pt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,ft,(.5+pt)*et,0,et,ie*ft)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ft)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-ie*ft,(.5+pt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ft,(.5-pt)*et,nt,0,nt-ie*ft));var wt=new go.PathFigure(0,nt-ft,!1);return lt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ft,0,nt-ft-ie*ft,(.5-pt)*et,nt-2*ft)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ft,(.5+pt)*et,nt-2*ft,et,nt-ft-ie*ft)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ft),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=5),ft=Math.min(ft,et/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(ft,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et-ft,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ie*ft,0,et,(.5-pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ft,nt,et,(.5+pt)*nt,et-ie*ft,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ft,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ie*ft,nt,0,(.5+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft,0,0,(.5-pt)*nt,ie*ft,0));var wt=new go.PathFigure(ft,0,!1);return lt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,2*ft,.5*nt,ft+ie*ft,0,2*ft,(.5-pt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ft,nt,2*ft,(.5+pt)*nt,ft+ie*ft,nt)),lt.spot1=new go.Spot(0,0,2*ft,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=5),ft=Math.min(ft,et/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(et-ft,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ie*ft,0,et,(.5-pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ft,nt,et,(.5+pt)*nt,et-ie*ft,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ft,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ie*ft,nt,0,(.5+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ft,0,0,(.5-pt)*nt,ie*ft,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ft,0));var wt=new go.PathFigure(et-ft,0,!1);return lt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ft,.5*nt,et-ft-ie*ft,0,et-2*ft,(.5-pt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ft,nt,et-2*ft,(.5+pt)*nt,et-ft-ie*ft,nt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ft,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.25*et,.25*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var pt=new go.PathFigure(.25*et,.25*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ft.spot1=new go.Spot(.408,.172),ft.spot2=new go.Spot(.833,.662),ft}),go.Shape.defineFigureGenerator("Prism2",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var pt=new go.PathFigure(0,nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ft.spot1=new go.Spot(.25,.5),ft.spot2=new go.Spot(.75,.75),ft}),go.Shape.defineFigureGenerator("Pyramid1",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var pt=new go.PathFigure(.5*et,0,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ft.spot1=new go.Spot(.25,.367),ft.spot2=new go.Spot(.75,.875),ft}),go.Shape.defineFigureGenerator("Pyramid2",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var pt=new go.PathFigure(.5*et,0,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ft.spot1=new go.Spot(.25,.367),ft.spot2=new go.Spot(.75,.875),ft}),go.Shape.defineFigureGenerator("Actor",function(At,et,nt){var ft=new go.Geometry,lt=.2,pt=.1,vt=ie*lt,wt=ie*pt,Nt=.5,bt=.1,Ht=new go.PathFigure(Nt*et,(bt+pt)*nt,!0);ft.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-lt)*et,bt*nt,(Nt-vt)*et,(bt+pt)*nt,(Nt-lt)*et,(bt+wt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-pt)*nt,(Nt-lt)*et,(bt-wt)*nt,(Nt-vt)*et,(bt-pt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+lt)*et,bt*nt,(Nt+vt)*et,(bt-pt)*nt,(Nt+lt)*et,(bt-wt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt+pt)*nt,(Nt+lt)*et,(bt+wt)*nt,(Nt+vt)*et,(bt+pt)*nt));var _t=.05,Qt=ie*_t;Nt=.05,bt=.25;var qt=new go.PathFigure(.5*et,.2*nt,!0);return ft.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Nt=.95,bt=.25,qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+_t)*et,bt*nt,(Nt+Qt)*et,(bt-_t)*nt,(Nt+_t)*et,(bt-Qt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),_t=.025,Qt=ie*_t,Nt=.825,bt=.35,qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-_t)*nt,(Nt+_t)*et,(bt-Qt)*nt,(Nt+Qt)*et,(bt-_t)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-_t)*et,bt*nt,(Nt-Qt)*et,(bt-_t)*nt,(Nt-_t)*et,(bt-Qt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),_t=.05,Qt=ie*_t,Nt=.5,bt=.7,qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-_t)*nt,(Nt+_t)*et,(bt-Qt)*nt,(Nt+Qt)*et,(bt-_t)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-_t)*et,bt*nt,(Nt-Qt)*et,(bt-_t)*nt,(Nt-_t)*et,(bt-Qt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),_t=.025,Qt=ie*_t,Nt=.175,bt=.35,qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-_t)*nt,(Nt+_t)*et,(bt-Qt)*nt,(Nt+Qt)*et,(bt-_t)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-_t)*et,bt*nt,(Nt-Qt)*et,(bt-_t)*nt,(Nt-_t)*et,(bt-Qt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),_t=.05,Qt=ie*_t,Nt=.05,bt=.25,qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-_t)*nt,(Nt-_t)*et,(bt-Qt)*nt,(Nt-Qt)*et,(bt-_t)*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ft.spot1=new go.Spot(.2,.2),ft.spot2=new go.Spot(.8,.65),ft}),go.Shape.setFigureParameter("Card",0,new Ln("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(At,et,nt){var ft=At?At.parameter1:NaN;isNaN(ft)&&(ft=.2);var lt=new go.Geometry,pt=new go.PathFigure(et,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,ft*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,ft*et,0).close()),lt.spot1=new go.Spot(0,ft),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,.5*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var pt=new go.PathFigure(.5*et,.5*nt,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ft.spot1=new go.Spot(.25,0),ft.spot2=new go.Spot(.75,.25),ft}),go.Shape.defineFigureGenerator("CreateRequest",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,lt*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ft}),go.Shape.defineFigureGenerator("Database",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(et,.1*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+pt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-pt)*nt,(.5-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-pt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+pt)*nt,(.5+lt)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+pt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+pt)*nt,(.5+lt)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+pt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+pt)*nt,(.5+lt)*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-lt)*et,.4*nt,0,(.3+pt)*nt)),ft.spot1=new go.Spot(0,.4),ft.spot2=new go.Spot(1,.9),ft}),go.Shape.defineFigureGenerator("DataStorage",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ft.spot1=new go.Spot(.226,0),ft.spot2=new go.Spot(.81,1),ft}),go.Shape.defineFigureGenerator("DiskStorage",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(et,.1*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+pt)*nt,(.5+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-pt)*nt,(.5-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-pt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+pt)*nt,(.5+lt)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+pt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+pt)*nt,(.5+lt)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+pt)*nt)),ft.spot1=new go.Spot(0,.3),ft.spot2=new go.Spot(1,.9),ft}),go.Shape.defineFigureGenerator("Display",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ft.spot1=new go.Spot(.25,0),ft.spot2=new go.Spot(.75,1),ft}),go.Shape.defineFigureGenerator("DividedEvent",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var pt=ie*.2,vt=new go.PathFigure(0,.2*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-pt)*nt,(.2-pt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+pt)*et,0,et,(.2-pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+pt)*nt,(.8+pt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-pt)*et,nt,0,(.8+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var wt=new go.PathFigure(0,lt*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ft}),go.Shape.defineFigureGenerator("DividedProcess",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,lt*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ft}),go.Shape.defineFigureGenerator("Document",function(At,et,nt){var ft=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ft.spot1=go.Spot.TopLeft,ft.spot2=new go.Spot(1,.6),ft}),go.Shape.defineFigureGenerator("ExternalOrganization",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var pt=new go.PathFigure(0,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(lt*et,0,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,lt*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ft}),go.Shape.defineFigureGenerator("ExternalProcess",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var pt=new go.PathFigure(.1*et,.4*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ft.spot1=new go.Spot(.25,.25),ft.spot2=new go.Spot(.75,.75),ft}),go.Shape.defineFigureGenerator("File",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var pt=new go.PathFigure(.75*et,0,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ft.spot1=new go.Spot(0,.25),ft.spot2=go.Spot.BottomRight,ft}),go.Shape.defineFigureGenerator("Interrupt",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,.5*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var pt=new go.PathFigure(et,.5*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var vt=new go.PathFigure(et,.5*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(.5,.75),ft}),go.Shape.defineFigureGenerator("InternalStorage",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN,pt=At?At.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.1);var vt=new go.PathFigure(0,0,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var wt=new go.PathFigure(lt*et,0,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,pt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,pt*nt)),ft}),go.Shape.defineFigureGenerator("Junction",function(At,et,nt){var ft=new go.Geometry,lt=1/Math.SQRT2,pt=(1-1/Math.SQRT2)/2,vt=ie*.5,wt=.5,Nt=new go.PathFigure(et,wt*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,nt,et,(wt+vt)*nt,(wt+vt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,wt*nt,(wt-vt)*et,nt,0,(wt+vt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,0,0,(wt-vt)*nt,(wt-vt)*et,0)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,wt*nt,(wt+vt)*et,0,et,(wt-vt)*nt));var bt=new go.PathFigure((pt+lt)*et,(pt+lt)*nt,!1);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,pt*et,pt*nt)),bt.add(new go.PathSegment(go.PathSegment.Move,pt*et,(pt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Line,(pt+lt)*et,pt*nt)),ft}),go.Shape.defineFigureGenerator("LinedDocument",function(At,et,nt){var ft=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var pt=new go.PathFigure(.1*et,0,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ft.spot1=new go.Spot(.1,0),ft.spot2=new go.Spot(1,.6),ft}),go.Shape.defineFigureGenerator("LoopLimit",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ft.spot1=new go.Spot(0,.25),ft.spot2=go.Spot.BottomRight,ft}),go.Shape.defineFigureGenerator("MagneticTape",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(.5*et,nt,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*nt,(pt-lt)*et,nt,0,(pt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*et,0,0,(pt-lt)*nt,(pt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,pt*nt,(pt+lt)*et,0,et,(pt-lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+.1)*et,.9*nt,et,(pt+lt)*nt,(pt+lt)*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ft.spot1=new go.Spot(.15,.15),ft.spot2=new go.Spot(.85,.8),ft}),go.Shape.defineFigureGenerator("ManualInput",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ft.spot1=new go.Spot(0,.25),ft.spot2=go.Spot.BottomRight,ft}),go.Shape.defineFigureGenerator("MessageFromUser",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.7);var pt=new go.PathFigure(0,0,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft.spot1=go.Spot.TopLeft,ft}),go.Shape.defineFigureGenerator("MicroformProcessing",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.25);var pt=new go.PathFigure(0,0,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,lt*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-lt)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft}),go.Shape.defineFigureGenerator("MicroformRecording",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(1,.75),ft}),go.Shape.defineFigureGenerator("MultiDocument",function(At,et,nt){var ft=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var pt=new go.PathFigure(.1*et,.2*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(.8,.77),ft}),go.Shape.defineFigureGenerator("MultiProcess",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.1*et,.1*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var pt=new go.PathFigure(.2*et,.1*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ft.spot1=new go.Spot(0,.2),ft.spot2=new go.Spot(.8,1),ft}),go.Shape.defineFigureGenerator("OfflineStorage",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=1-lt,vt=new go.PathFigure(0,0,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var wt=new go.PathFigure(.5*lt*et,lt*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),ft}),go.Shape.defineFigureGenerator("OffPageConnector",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft.spot1=go.Spot.TopLeft,ft.spot2=new go.Spot(.75,1),ft}),go.Shape.defineFigureGenerator("Or",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(et,pt*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*et,nt,et,(pt+lt)*nt,(pt+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*nt,(pt-lt)*et,nt,0,(pt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*et,0,0,(pt-lt)*nt,(pt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,pt*nt,(pt+lt)*et,0,et,(pt-lt)*nt));var wt=new go.PathFigure(et,.5*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ft}),go.Shape.defineFigureGenerator("PaperTape",function(At,et,nt){var ft=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ft.spot1=new go.Spot(0,.49),ft.spot2=new go.Spot(1,.75),ft}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN,pt=At?At.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.3);var vt=new go.PathFigure(0,0,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN,pt=At?At.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.3);var vt=new go.PathFigure(0,0,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft}),go.Shape.defineFigureGenerator("Procedure",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure((1-lt)*et,0,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,lt*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ft}),go.Shape.defineFigureGenerator("Process",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(lt*et,0,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ft.spot2=go.Spot.BottomRight,ft}),go.Shape.defineFigureGenerator("Sort",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var pt=new go.PathFigure(0,.5*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ft.spot1=new go.Spot(.25,.25),ft.spot2=new go.Spot(.75,.5),ft}),go.Shape.defineFigureGenerator("Start",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.25);var pt=new go.PathFigure(lt*et,0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var vt=new go.PathFigure(lt*et,0,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),ft.spot1=new go.Spot(lt,0),ft.spot2=new go.Spot(1-lt,1),ft}),go.Shape.defineFigureGenerator("Terminator",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ft.spot1=new go.Spot(.23,0),ft.spot2=new go.Spot(.77,1),ft}),go.Shape.defineFigureGenerator("TransmittalTape",function(At,et,nt){var ft=new go.Geometry,lt=At?At.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-lt)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*nt).close()),ft.spot1=go.Spot.TopLeft,ft}),go.Shape.defineFigureGenerator("AndGate",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=new go.PathFigure(0,0,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+lt)*et,0,et,(.5-lt)*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+lt)*nt,(.5+lt)*et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft.spot1=go.Spot.TopLeft,ft.spot2=new go.Spot(.55,1),ft}),go.Shape.defineFigureGenerator("Buffer",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(.5,.75),ft}),go.Shape.defineFigureGenerator("Clock",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(et,pt*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*et,nt,et,(pt+lt)*nt,(pt+lt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*nt,(pt-lt)*et,nt,0,(pt+lt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*et,0,0,(pt-lt)*nt,(pt-lt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,pt*nt,(pt+lt)*et,0,et,(pt-lt)*nt));var wt=new go.PathFigure(et,pt*nt,!1);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,pt*nt));var Nt=new go.PathFigure(.8*et,.75*nt,!1);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ft}),go.Shape.defineFigureGenerator("Ground",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ft}),go.Shape.defineFigureGenerator("Inverter",function(At,et,nt){var ft=new go.Geometry,lt=ie*.1,pt=.1,vt=.9,wt=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var bt=new go.PathFigure((vt+pt)*et,wt*nt,!0);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,(vt+lt)*et,(wt-pt)*nt,(vt+pt)*et,(wt-lt)*nt)),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(.4,.75),ft}),go.Shape.defineFigureGenerator("NandGate",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=ie*.4,vt=ie*.1,wt=.1,Nt=.9,bt=.5,Ht=new go.PathFigure(.8*et,.5*nt,!0);ft.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+pt)*nt,(.4+lt)*et,nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+lt)*et,0,.8*et,(.5-pt)*nt));var _t=new go.PathFigure((Nt+wt)*et,bt*nt,!0);return ft.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt+wt)*nt,(Nt+wt)*et,(bt+vt)*nt,(Nt+vt)*et,(bt+wt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt)*et,bt*nt,(Nt-vt)*et,(bt+wt)*nt,(Nt-wt)*et,(bt+vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-wt)*nt,(Nt-wt)*et,(bt-vt)*nt,(Nt-vt)*et,(bt-wt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt)*et,bt*nt,(Nt+vt)*et,(bt-wt)*nt,(Nt+wt)*et,(bt-vt)*nt)),ft.spot1=new go.Spot(0,.05),ft.spot2=new go.Spot(.55,.95),ft}),go.Shape.defineFigureGenerator("NorGate",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*lt,vt=0,wt=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+pt)*et,(wt-lt)*nt,.7*et,(wt-pt)*nt)),lt=.1,pt=ie*.1,vt=.9,wt=.5;var bt=new go.PathFigure((vt-lt)*et,wt*nt,!0);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt)),ft.spot1=new go.Spot(.2,.25),ft.spot2=new go.Spot(.6,.75),ft}),go.Shape.defineFigureGenerator("OrGate",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*lt,vt=0,wt=.5,Nt=new go.PathFigure(0,0,!0);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+pt+pt)*et,(wt-lt)*nt,.8*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(wt+pt)*nt,(vt+pt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ft.spot1=new go.Spot(.2,.25),ft.spot2=new go.Spot(.75,.75),ft}),go.Shape.defineFigureGenerator("XnorGate",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*lt,vt=.2,wt=.5,Nt=new go.PathFigure(.1*et,0,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var bt=new go.PathFigure(.8*et,.5*nt,!0);ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+pt)*et,(wt-lt)*nt,.7*et,(wt-pt)*nt)),lt=.1,pt=ie*.1,vt=.9,wt=.5;var Ht=new go.PathFigure((vt-lt)*et,wt*nt,!0);return ft.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt)),ft.spot1=new go.Spot(.4,.25),ft.spot2=new go.Spot(.65,.75),ft}),go.Shape.defineFigureGenerator("XorGate",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*lt,vt=.2,wt=.5,Nt=new go.PathFigure(.1*et,0,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var bt=new go.PathFigure(.2*et,0,!0);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+pt)*et,(wt-lt)*nt,.9*et,(wt-pt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ft.spot1=new go.Spot(.4,.25),ft.spot2=new go.Spot(.8,.75),ft}),go.Shape.defineFigureGenerator("Capacitor",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft}),go.Shape.defineFigureGenerator("Resistor",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ft}),go.Shape.defineFigureGenerator("Inductor",function(At,et,nt){var ft=new go.Geometry,lt=ie*.1,pt=.1,vt=.1,wt=.5,Nt=new go.PathFigure((vt-lt*.5)*et,nt,!1);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,0,(vt-lt)*et,nt,(vt-pt)*et,0)),vt=.3,Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+pt)*et,0,(vt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,0,(vt-lt)*et,nt,(vt-pt)*et,0)),vt=.5,Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+pt)*et,0,(vt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,0,(vt-lt)*et,nt,(vt-pt)*et,0)),vt=.7,Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+pt)*et,0,(vt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,0,(vt-lt)*et,nt,(vt-pt)*et,0)),vt=.9,Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt*.5)*et,nt,(vt+pt)*et,0,(vt+lt)*et,nt)),ft}),go.Shape.defineFigureGenerator("ACvoltageSource",function(At,et,nt){var ft=new go.Geometry,lt=ie*.5,pt=.5,vt=.5,wt=.5,Nt=new go.PathFigure((vt-pt)*et,wt*nt,!1);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,(vt+lt)*et,(wt-pt)*nt,(vt+pt)*et,(wt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Move,(vt-pt+.1)*et,wt*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt-.1)*et,wt*nt,vt*et,(wt-pt)*nt,vt*et,(wt+pt)*nt)),ft}),go.Shape.defineFigureGenerator("DCvoltageSource",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft}),go.Shape.defineFigureGenerator("Diode",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.spot1=new go.Spot(0,.25),ft.spot2=new go.Spot(.5,.75),ft}),go.Shape.defineFigureGenerator("Wifi",function(At,et,nt){var ft=new go.Geometry,lt=et,pt=nt;et=et*.38,nt=nt*.6;var vt=ie*.8,wt=.8,Nt=0,bt=.5,Ht=(lt-et)/2,_t=(pt-nt)/2,Qt=new go.PathFigure(Nt*et+Ht,(bt+wt)*nt+_t,!0);ft.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt)*et+Ht,bt*nt+_t,(Nt-vt)*et+Ht,(bt+wt)*nt+_t,(Nt-wt)*et+Ht,(bt+vt)*nt+_t)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt-wt)*nt+_t,(Nt-wt)*et+Ht,(bt-vt)*nt+_t,(Nt-vt)*et+Ht,(bt-wt)*nt+_t)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt+vt*.5)*et+Ht,bt*nt+_t,Nt*et+Ht,(bt-wt)*nt+_t,(Nt-wt+vt*.5)*et+Ht,(bt-vt)*nt+_t)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt+wt)*nt+_t,(Nt-wt+vt*.5)*et+Ht,(bt+vt)*nt+_t,Nt*et+Ht,(bt+wt)*nt+_t).close()),vt=ie*.4,wt=.4,Nt=.2,bt=.5;var qt=new go.PathFigure(Nt*et+Ht,(bt+wt)*nt+_t,!0);ft.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt)*et+Ht,bt*nt+_t,(Nt-vt)*et+Ht,(bt+wt)*nt+_t,(Nt-wt)*et+Ht,(bt+vt)*nt+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt-wt)*nt+_t,(Nt-wt)*et+Ht,(bt-vt)*nt+_t,(Nt-vt)*et+Ht,(bt-wt)*nt+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt+vt*.5)*et+Ht,bt*nt+_t,Nt*et+Ht,(bt-wt)*nt+_t,(Nt-wt+vt*.5)*et+Ht,(bt-vt)*nt+_t)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt+wt)*nt+_t,(Nt-wt+vt*.5)*et+Ht,(bt+vt)*nt+_t,Nt*et+Ht,(bt+wt)*nt+_t).close()),vt=ie*.2,wt=.2,Nt=.5,bt=.5;var Se=new go.PathFigure((Nt-wt)*et+Ht,bt*nt+_t,!0);ft.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt-wt)*nt+_t,(Nt-wt)*et+Ht,(bt-vt)*nt+_t,(Nt-vt)*et+Ht,(bt-wt)*nt+_t)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt)*et+Ht,bt*nt+_t,(Nt+vt)*et+Ht,(bt-wt)*nt+_t,(Nt+wt)*et+Ht,(bt-vt)*nt+_t)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt+wt)*nt+_t,(Nt+wt)*et+Ht,(bt+vt)*nt+_t,(Nt+vt)*et+Ht,(bt+wt)*nt+_t)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt)*et+Ht,bt*nt+_t,(Nt-vt)*et+Ht,(bt+wt)*nt+_t,(Nt-wt)*et+Ht,(bt+vt)*nt+_t)),vt=ie*.4,wt=.4,Nt=.8,bt=.5;var he=new go.PathFigure(Nt*et+Ht,(bt-wt)*nt+_t,!0);ft.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt)*et+Ht,bt*nt+_t,(Nt+vt)*et+Ht,(bt-wt)*nt+_t,(Nt+wt)*et+Ht,(bt-vt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt+wt)*nt+_t,(Nt+wt)*et+Ht,(bt+vt)*nt+_t,(Nt+vt)*et+Ht,(bt+wt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt-vt*.5)*et+Ht,bt*nt+_t,Nt*et+Ht,(bt+wt)*nt+_t,(Nt+wt-vt*.5)*et+Ht,(bt+vt)*nt+_t)),he.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt-wt)*nt+_t,(Nt+wt-vt*.5)*et+Ht,(bt-vt)*nt+_t,Nt*et+Ht,(bt-wt)*nt+_t).close()),vt=ie*.8,wt=.8,Nt=1,bt=.5;var Re=new go.PathFigure(Nt*et+Ht,(bt-wt)*nt+_t,!0);return ft.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt)*et+Ht,bt*nt+_t,(Nt+vt)*et+Ht,(bt-wt)*nt+_t,(Nt+wt)*et+Ht,(bt-vt)*nt+_t)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt+wt)*nt+_t,(Nt+wt)*et+Ht,(bt+vt)*nt+_t,(Nt+vt)*et+Ht,(bt+wt)*nt+_t)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt-vt*.5)*et+Ht,bt*nt+_t,Nt*et+Ht,(bt+wt)*nt+_t,(Nt+wt-vt*.5)*et+Ht,(bt+vt)*nt+_t)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Ht,(bt-wt)*nt+_t,(Nt+wt-vt*.5)*et+Ht,(bt-vt)*nt+_t,Nt*et+Ht,(bt-wt)*nt+_t).close()),ft}),go.Shape.defineFigureGenerator("Email",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,0,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,0)),pt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ft}),go.Shape.defineFigureGenerator("Ethernet",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.35*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var pt=new go.PathFigure(.1*et,nt,!0,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var vt=new go.PathFigure(.6*et,nt,!0,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var wt=new go.PathFigure(0,.5*nt,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ft}),go.Shape.defineFigureGenerator("Power",function(At,et,nt){var ft=new go.Geometry,lt=ie*.4,pt=.4,vt=.5,wt=.5,Nt=Tt(),bt=Tt(),Ht=Tt(),_t=Tt();je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.5,Nt,Nt,bt,Ht,_t);var Qt=Ot(bt.x,bt.y),qt=new go.PathFigure(bt.x*et,bt.y*nt,!0);ft.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,Ht.x*et,Ht.y*nt,_t.x*et,_t.y*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,(vt-lt)*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt)),je(vt-pt,wt,vt-pt,wt-lt,vt-lt,wt-pt,vt,wt-pt,.5,Ht,_t,bt,Nt,Nt),qt.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*et,bt.y*nt,Ht.x*et,Ht.y*nt,_t.x*et,_t.y*nt)),lt=ie*.3,pt=.3,je(vt-pt,wt,vt-pt,wt-lt,vt-lt,wt-pt,vt,wt-pt,.5,Ht,_t,bt,Nt,Nt),qt.add(new go.PathSegment(go.PathSegment.Line,bt.x*et,bt.y*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*et,wt*nt,_t.x*et,_t.y*nt,Ht.x*et,Ht.y*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+pt)*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*et,wt*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),je(vt,wt-pt,vt+lt,wt-pt,vt+pt,wt-lt,vt+pt,wt,.5,Nt,Nt,bt,Ht,_t),qt.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*et,bt.y*nt,_t.x*et,_t.y*nt,Ht.x*et,Ht.y*nt).close());var qt=new go.PathFigure(.45*et,0,!0);return ft.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),de(Nt),de(bt),de(Ht),de(_t),de(Qt),ft.spot1=new go.Spot(.25,.45),ft.spot2=new go.Spot(.75,.8),ft}),go.Shape.defineFigureGenerator("Fallout",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt/2,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function pt(vt,wt,Nt){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+wt)*et,(.8+Nt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+wt)*et,(.5+Nt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+wt)*et,(.5+Nt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+wt)*et,(.8+Nt)*nt).close())}return pt(lt,0,0),pt(lt,.4,0),pt(lt,.2,-.3),ft}),go.Shape.defineFigureGenerator("IrritationHazard",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.2*et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ft.spot1=new go.Spot(.3,.3),ft.spot2=new go.Spot(.7,.7),ft}),go.Shape.defineFigureGenerator("ElectricalHazard",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.37*et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ft}),go.Shape.defineFigureGenerator("FireHazard",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.1*et,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ft.spot1=new go.Spot(.07,.445),ft.spot2=new go.Spot(.884,.958),ft}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=0,vt=0,wt=lt*ie,Nt=.4*Math.SQRT2/2+.5,bt=.5-.5*Math.SQRT2/2,Ht=1,_t=.5,Qt=.5,qt=0,Se=new go.PathFigure(Nt*et,(1-bt)*nt,!1);return ft.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,Ht*et,_t*nt,Ht*et,.7*nt,Ht*et,_t*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+pt)*et,(qt+pt)*nt,(.5+lt+pt)*et,(.5-wt+pt)*nt,(.5+wt+pt)*et,(.5-lt+pt)*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*et,(.5+vt)*nt,(.5-wt+pt)*et,(.5-lt+vt)*nt,(.5-lt+pt)*et,(.5-wt+vt)*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.35+pt)*et,.9*nt,(.5-lt+pt)*et,(.5+wt+vt)*nt,(.5-wt+pt)*et,.9*nt)),Se.add(new go.PathSegment(go.PathSegment.Move,(.25+pt)*et,.8*nt)),Se.add(new go.PathSegment(go.PathSegment.Line,(.35+pt)*et,.9*nt)),Se.add(new go.PathSegment(go.PathSegment.Line,(.2+pt)*et,.95*nt)),ft}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);ft.add(lt);var pt=new go.PathFigure(et,nt,!1);ft.add(pt);var vt=new go.PathFigure(0,.5*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ft}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ft}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var lt=new go.PathFigure(0,.2*nt,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ft}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.7*et,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var pt=new go.PathFigure(.45*et,.73*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ft}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);ft.add(lt);var pt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var vt=.5-.285,wt=.5,Nt=vt,bt=Math.PI/4,Ht=4*(1-Math.cos(bt))/(3*Math.sin(bt)),_t=Ht*.5,Qt=vt,qt=vt,Se=Ht*Qt,he=Ht*qt;pt.add(new go.PathSegment(go.PathSegment.Bezier,(wt-Qt)*et,Nt*nt,(wt-(Se+Qt)/2)*et,(Nt+(qt+he)/2)*nt,(wt-Qt)*et,(Nt+he)*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,(Nt-qt)*nt,(wt-Qt)*et,(Nt-he)*nt,(wt-Se)*et,(Nt-qt)*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(wt+Qt)*et,Nt*nt,(wt+Se)*et,(Nt-qt)*nt,(wt+Qt)*et,(Nt-he)*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(wt+Qt)*et,(Nt+he)*nt,(wt+(Se+Qt)/2)*et,(Nt+(qt+he)/2)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Re=new go.PathFigure(.2*et,nt,!1);ft.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var pe=new go.PathFigure(.8*et,nt,!1);return ft.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ft}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.1*et,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var pt=new go.PathFigure(.2*et,.2*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ft}),go.Shape.defineFigureGenerator("BpmnEventError",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ft}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);ft.add(lt);var pt=new go.PathFigure(et,nt,!1);ft.add(pt);var vt=new go.PathFigure(.1*et,nt,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ft}),go.Shape.defineFigureGenerator("Caution",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.05*et,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var pt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-pt)*et,.875*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,pt*et,pt*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ft}),go.Shape.defineFigureGenerator("Recycle",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.45*et,.95*nt,!1);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var pt=new go.PathFigure(.475*et,.2*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var vt=new go.PathFigure(.675*et,.575*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ft}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*.5,vt=new go.PathFigure(et,lt*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+pt)*nt,(lt+pt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-pt)*et,nt,0,(lt+pt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-pt)*nt,(lt-pt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,lt*nt,(lt+pt)*et,0,et,(lt-pt)*nt));var wt=new go.PathFigure(lt*et,0,!1);return ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ft}),go.Shape.defineFigureGenerator("Package",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.15*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var pt=new go.PathFigure(0,.15*nt,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ft.spot1=new go.Spot(0,.1),ft.spot2=new go.Spot(1,1),ft}),go.Shape.defineFigureGenerator("Class",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,.2*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(0,.5*nt,!1);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ft}),go.Shape.defineFigureGenerator("Component",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var pt=new go.PathFigure(0,.2*nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var vt=new go.PathFigure(0,.6*nt,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ft}),go.Shape.defineFigureGenerator("Boat Shipment",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.15*et,.6*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var pt=new go.PathFigure(.15*et,.6*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ft}),go.Shape.defineFigureGenerator("Customer/Supplier",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ft}),go.Shape.defineFigureGenerator("Workcell",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ft}),go.Shape.defineFigureGenerator("Supermarket",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft}),go.Shape.defineFigureGenerator("TruckShipment",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(et,.8*nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var vt=.1,wt=ie*.1,Nt=.2,bt=.9,Ht=new go.PathFigure((Nt-vt)*et,bt*nt,!0);ft.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-vt)*nt,(Nt-vt)*et,(bt-wt)*nt,(Nt-wt)*et,(bt-vt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+vt)*et,bt*nt,(Nt+wt)*et,(bt-vt)*nt,(Nt+vt)*et,(bt-wt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt+vt)*nt,(Nt+vt)*et,(bt+wt)*nt,(Nt+wt)*et,(bt+vt)*nt)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-vt)*et,bt*nt,(Nt-wt)*et,(bt+vt)*nt,(Nt-vt)*et,(bt+wt)*nt).close()),vt=.1,wt=ie*.1,Nt=.8,bt=.9;var _t=new go.PathFigure((Nt-vt)*et,bt*nt,!0);return ft.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt-vt)*nt,(Nt-vt)*et,(bt-wt)*nt,(Nt-wt)*et,(bt-vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+vt)*et,bt*nt,(Nt+wt)*et,(bt-vt)*nt,(Nt+vt)*et,(bt-wt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(bt+vt)*nt,(Nt+vt)*et,(bt+wt)*nt,(Nt+wt)*et,(bt+vt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-vt)*et,bt*nt,(Nt-wt)*et,(bt+vt)*nt,(Nt-vt)*et,(bt+wt)*nt).close()),ft}),go.Shape.defineFigureGenerator("KanbanPost",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.2*et,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ft}),go.Shape.defineFigureGenerator("Forklift",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var pt=new go.PathFigure(0,.5*nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var vt=new go.PathFigure(.5*et,.8*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var wt=new go.PathFigure(.5*et,.7*nt,!1);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Nt=.1,bt=ie*.1,Ht=.1,_t=.9,Qt=new go.PathFigure((Ht-Nt)*et,_t*nt,!0);ft.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*et,(_t-Nt)*nt,(Ht-Nt)*et,(_t-bt)*nt,(Ht-bt)*et,(_t-Nt)*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Nt)*et,_t*nt,(Ht+bt)*et,(_t-Nt)*nt,(Ht+Nt)*et,(_t-bt)*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*et,(_t+Nt)*nt,(Ht+Nt)*et,(_t+bt)*nt,(Ht+bt)*et,(_t+Nt)*nt)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Nt)*et,_t*nt,(Ht-bt)*et,(_t+Nt)*nt,(Ht-Nt)*et,(_t+bt)*nt)),Nt=.1,bt=ie*.1,Ht=.4,_t=.9;var qt=new go.PathFigure((Ht-Nt)*et,_t*nt,!0);return ft.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*et,(_t-Nt)*nt,(Ht-Nt)*et,(_t-bt)*nt,(Ht-bt)*et,(_t-Nt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Nt)*et,_t*nt,(Ht+bt)*et,(_t-Nt)*nt,(Ht+Nt)*et,(_t-bt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*et,(_t+Nt)*nt,(Ht+Nt)*et,(_t+bt)*nt,(Ht+bt)*et,(_t+Nt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Nt)*et,_t*nt,(Ht-bt)*et,(_t+Nt)*nt,(Ht-Nt)*et,(_t+bt)*nt)),ft}),go.Shape.defineFigureGenerator("RailShipment",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.1*et,.4*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var pt=new go.PathFigure(.45*et,.7*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var vt=new go.PathFigure(.55*et,.4*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var Ht=.05,_t=ie*.05,Qt=.175,qt=.95,wt=new go.PathFigure((Qt-Ht)*et,qt*nt,!0);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt-Ht)*nt,(Qt-Ht)*et,(qt-_t)*nt,(Qt-_t)*et,(qt-Ht)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Ht)*et,qt*nt,(Qt+_t)*et,(qt-Ht)*nt,(Qt+Ht)*et,(qt-_t)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt+Ht)*nt,(Qt+Ht)*et,(qt+_t)*nt,(Qt+_t)*et,(qt+Ht)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Ht)*et,qt*nt,(Qt-_t)*et,(qt+Ht)*nt,(Qt-Ht)*et,(qt+_t)*nt));var Ht=.05,_t=ie*.05,Qt=.375,qt=.95,Nt=new go.PathFigure((Qt-Ht)*et,qt*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt-Ht)*nt,(Qt-Ht)*et,(qt-_t)*nt,(Qt-_t)*et,(qt-Ht)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Ht)*et,qt*nt,(Qt+_t)*et,(qt-Ht)*nt,(Qt+Ht)*et,(qt-_t)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt+Ht)*nt,(Qt+Ht)*et,(qt+_t)*nt,(Qt+_t)*et,(qt+Ht)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Ht)*et,qt*nt,(Qt-_t)*et,(qt+Ht)*nt,(Qt-Ht)*et,(qt+_t)*nt));var Ht=.05,_t=ie*.05,Qt=.625,qt=.95,bt=new go.PathFigure((Qt-Ht)*et,qt*nt,!0);ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt-Ht)*nt,(Qt-Ht)*et,(qt-_t)*nt,(Qt-_t)*et,(qt-Ht)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Ht)*et,qt*nt,(Qt+_t)*et,(qt-Ht)*nt,(Qt+Ht)*et,(qt-_t)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt+Ht)*nt,(Qt+Ht)*et,(qt+_t)*nt,(Qt+_t)*et,(qt+Ht)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Ht)*et,qt*nt,(Qt-_t)*et,(qt+Ht)*nt,(Qt-Ht)*et,(qt+_t)*nt));var Ht=.05,_t=ie*.05,Qt=.825,qt=.95,Se=new go.PathFigure((Qt-Ht)*et,qt*nt,!0);ft.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt-Ht)*nt,(Qt-Ht)*et,(qt-_t)*nt,(Qt-_t)*et,(qt-Ht)*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Ht)*et,qt*nt,(Qt+_t)*et,(qt-Ht)*nt,(Qt+Ht)*et,(qt-_t)*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Qt*et,(qt+Ht)*nt,(Qt+Ht)*et,(qt+_t)*nt,(Qt+_t)*et,(qt+Ht)*nt)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Ht)*et,qt*nt,(Qt-_t)*et,(qt+Ht)*nt,(Qt-Ht)*et,(qt+_t)*nt).close());var he=new go.PathFigure(0,nt,!1);return ft.add(he),he.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ft}),go.Shape.defineFigureGenerator("Warehouse",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,.2*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(.15*et,nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var wt=.05,Nt=ie*.05,bt=.35,Ht=.775,_t=new go.PathFigure((bt-wt)*et,Ht*nt,!0);return ft.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,bt*et,(Ht-wt)*nt,(bt-wt)*et,(Ht-Nt)*nt,(bt-Nt)*et,(Ht-wt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(bt+wt)*et,Ht*nt,(bt+Nt)*et,(Ht-wt)*nt,(bt+wt)*et,(Ht-Nt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,bt*et,(Ht+wt)*nt,(bt+wt)*et,(Ht+Nt)*nt,(bt+Nt)*et,(Ht+wt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-wt)*et,Ht*nt,(bt-Nt)*et,(Ht+wt)*nt,(bt-wt)*et,(Ht+Nt)*nt).close()),ft}),go.Shape.defineFigureGenerator("ControlCenter",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ft}),go.Shape.defineFigureGenerator("Bluetooth",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ft}),go.Shape.defineFigureGenerator("Bookmark",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ft}),go.Shape.defineFigureGenerator("Bookmark",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ft}),go.Shape.defineFigureGenerator("Globe",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ft}),go.Shape.defineFigureGenerator("Wave",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ft}),go.Shape.defineFigureGenerator("Operator",function(At,et,nt){var ft=new go.Geometry,lt=.3,pt=ie*.3,vt=.5,wt=.7,Nt=new go.PathFigure((vt-lt)*et,wt*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt));var bt=new go.PathFigure(0,.7*nt,!1);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ft}),go.Shape.defineFigureGenerator("TripleFanBlades",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ft}),go.Shape.defineFigureGenerator("CentrifugalPump",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft}),go.Shape.defineFigureGenerator("Battery",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var pt=new go.PathFigure(0,.6*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ft}),go.Shape.defineFigureGenerator("Delete",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*.5,vt=.5,wt=.5,Nt=new go.PathFigure((vt-lt)*et,wt*nt,!0);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt));var bt=new go.PathFigure(.15*et,.5*nt,!1);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ft}),go.Shape.defineFigureGenerator("Flag",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.1*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ft}),go.Shape.defineFigureGenerator("Help",function(At,et,nt){var ft=new go.Geometry,lt=.5,pt=ie*.5,vt=.5,wt=.5,Nt=new go.PathFigure((vt-lt)*et,wt*nt,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt).close()),lt=.05,pt=ie*.05,vt=.5,wt=.8;var bt=new go.PathFigure((vt-lt)*et,wt*nt,!1);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-lt)*nt,(vt-lt)*et,(wt-pt)*nt,(vt-pt)*et,(wt-lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*et,wt*nt,(vt+pt)*et,(wt-lt)*nt,(vt+lt)*et,(wt-pt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+lt)*nt,(vt+lt)*et,(wt+pt)*nt,(vt+pt)*et,(wt+lt)*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*et,wt*nt,(vt-pt)*et,(wt+lt)*nt,(vt-lt)*et,(wt+pt)*nt).close()),bt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),bt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ft}),go.Shape.defineFigureGenerator("Location",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var pt=new go.PathFigure(.2*et,.5*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ft}),go.Shape.defineFigureGenerator("Unlocked",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var pt=new go.PathFigure(.2*et,.5*nt,!1);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ft}),go.Shape.defineFigureGenerator("Gear",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ft}),go.Shape.defineFigureGenerator("Map",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ft}),go.Shape.defineFigureGenerator("Eject",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var pt=new go.PathFigure(0,nt*.6,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ft}),go.Shape.defineFigureGenerator("Pencil",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*1,nt*1,!1);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var pt=new go.PathFigure(.126*et,.85*nt,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),pt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var vt=new go.PathFigure(.402*et,.85*nt,!1);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var wt=new go.PathFigure(.678*et,.85*nt,!1);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Nt=new go.PathFigure(.5*et,.1*nt,!1);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ft}),go.Shape.defineFigureGenerator("Staircase",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ft}),go.Shape.defineFigureGenerator("5Bars",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var pt=new go.PathFigure(et*.204,nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),pt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),pt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var vt=new go.PathFigure(et*.408,nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var wt=new go.PathFigure(et*.612,nt,!0);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Nt=new go.PathFigure(et*.816,nt,!0);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ft}),go.Shape.defineFigureGenerator("PC",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var pt=new go.PathFigure(et*.055,.07*nt,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var vt=new go.PathFigure(et*.055,.13*nt,!0);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var wt=new go.PathFigure(et*.055,.18*nt,!0);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Nt=new go.PathFigure(et*1,0,!0);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ft}),go.Shape.defineFigureGenerator("Plane",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(.55*et,nt,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ft}),go.Shape.defineFigureGenerator("Key",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*1,nt*.5,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ft}),go.Shape.defineFigureGenerator("FilmTape",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(0,0,!1);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var pt=new go.PathFigure(0,0,!1);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),pt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),pt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var vt=new go.PathFigure(et*.11,nt*.1,!1);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var wt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Nt=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ft}),go.Shape.defineFigureGenerator("FloppyDisk",function(At,et,nt){var ft=new go.Geometry,lt=8,pt=lt*ie,vt=new go.PathFigure(lt,0,!1);ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-pt,et-pt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,pt,nt,0,nt-pt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,pt,pt,0).close());var wt=new go.PathFigure(et*.83,0,!1);ft.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Nt=new go.PathFigure(et*.83,nt*1,!1);ft.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var bt=new go.PathFigure(et*.78,nt*.05,!1);return ft.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),bt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),bt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ft}),go.Shape.defineFigureGenerator("SpeechBubble",function(At,et,nt){var ft=At?At.parameter1:NaN;(isNaN(ft)||ft<0)&&(ft=15),ft=Math.min(ft,et/3),ft=Math.min(ft,nt/3);var lt=ft*ie,pt=nt*.8,vt=new go.Geometry,wt=new go.PathFigure(ft,0,!0);return vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et-ft,0)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,ft,et-lt,0,et,lt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,pt-ft)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ft,pt,et,pt-lt,et-lt,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.55,pt)),wt.add(new go.PathSegment(go.PathSegment.Line,ft,pt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt-ft,lt,pt,0,pt-lt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ft)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ft,0,0,lt,lt,0).close()),lt>1?(vt.spot1=new go.Spot(0,0,lt,lt),vt.spot2=new go.Spot(1,.8,-lt,-lt)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*0,nt*.45,!0);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var pt=new go.PathFigure(et*1,nt*.55,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ft}),go.Shape.defineFigureGenerator("Windows",function(At,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*0,nt*.1,!1);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var pt=new go.PathFigure(et*.1,nt*.2,!0);ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var vt=new go.PathFigure(et*.28,nt*.37,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ft}),go.Shape.defineFigureGenerator("Beaker",function(At,et,nt){var ft=new go.Geometry,lt=15,pt=lt*ie,vt=new go.PathFigure(et*.62,nt*.475,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-pt,et-pt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,pt,nt,0,nt-pt)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),pt>1?(ft.spot1=new go.Spot(0,0,pt,pt),ft.spot2=new go.Spot(1,1,-pt,-pt)):(ft.spot1=go.Spot.TopLeft,ft.spot2=go.Spot.BottomRight),ft}),go.Shape.defineFigureGenerator("Download",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ft.add(lt);var pt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-pt)).close());var vt=new go.PathFigure(et*.4,nt*0,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ft}),go.Shape.defineFigureGenerator("Bin",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ft.add(lt);var pt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-pt)).close()),ft}),go.Shape.defineFigureGenerator("Upload",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ft.add(lt);var pt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-pt)).close());var vt=new go.PathFigure(et*.5,nt*0,!0);return ft.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ft}),go.Shape.defineFigureGenerator("EmptyDrink",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ft}),go.Shape.defineFigureGenerator("Drink",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var pt=new go.PathFigure(et*.235,nt*.28,!0);return ft.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),pt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ft}),go.Shape.defineFigureGenerator("4Arrows",function(At,et,nt){var ft=new go.Geometry,lt=new go.PathFigure(et*.5,nt*0,!0);return ft.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ft}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Ln={},En="5.0",Ot={},Tt=null,de=!1,se=!1,je=null,Jt=!1,ue=null,ie=null,Ve=0;Ve4?parseFloat(Oe):5};Ln.setHTML5Codebase=function(Oe,en){ie=Oe,hn(Oe,en)},Ln.setJavaCodebase=Ln.setJavaCodebaseVersion=Ln.isCompiledInstalled=Ln.setPreCompiledScriptPath=Ln.setPreCompiledResourcePath=function(){},Ln.setHTML5CodebaseVersion=function(Oe,en){var mn=parseFloat(Oe);if(mn!==NaN&&mn<5){console.log("The GeoGebra HTML5 codebase version "+mn+" is deprecated. Using version latest instead.");return}ue=Oe,Ut(Oe,en)},Ln.getHTML5CodebaseVersion=function(){return At},Ln.getParameters=function(){return Ot},Ln.setFontsCSSURL=function(Oe){vt=Oe},Ln.setGiacJSURL=function(Oe){},Ln.setJNLPFile=function(Oe){ne=Oe},Ln.setJNLPBaseDir=function(Oe){},Ln.inject=function(){function Oe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var en="auto",mn=Ot.id,Yn,Pn=!1,Un=0;Un=5)return!0;var Oe=Ln.getAppletObject();return Oe&&typeof Oe.recalculateEnvironments=="function"?(Oe.recalculateEnvironments(),!0):!1},Ln.startAnimation=function(){var Oe=Ln.getAppletObject();return Oe&&typeof Oe.startAnimation=="function"?(Oe.startAnimation(),!0):!1},Ln.stopAnimation=function(){var Oe=Ln.getAppletObject();return Oe&&typeof Oe.stopAnimation=="function"?(Oe.stopAnimation(),!0):!1},Ln.getAppletObject=function(){var Oe=Ot.id!==void 0?Ot.id:"ggbApplet";return window[Oe]},Ln.resize=function(){};var Se=function(Oe,en,mn){var Yn=document.createElement("param");Yn.setAttribute("name",en),Yn.setAttribute("value",mn),Oe.appendChild(Yn)},he=function(Oe){return Oe&&Oe!=="false"},Re=function(Oe,en,mn){Nt(At)<=4.2&&(mn=!0);var Yn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==At||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Yn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Pn=document.createElement("div");Pn.classList.add("appletParameters","notranslate");var Un=en.width,le=en.height;if(en.disableAutoScale=en.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():en.disableAutoScale,en.width!==void 0)if(Nt(At)<=4.4)he(en.showToolBar)&&(en.height-=7),he(en.showAlgebraInput)&&(en.height-=37),en.width<605&&he(en.showToolBar)&&(en.width=605,Un=605);else{var jn=100;(he(en.showToolBar)||he(en.showMenuBar))&&(en.hasOwnProperty("customToolBar")&&(en.customToolbar=en.customToolBar),jn=he(en.showMenuBar)?245:155),Un=5?(en.appletOnLoad=function(fn){var rn=Oe.querySelector(".ggb_preview");rn&&rn.parentNode.removeChild(rn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Dt(fn)},xt||Lt.appendChild(Ft)):Pn.appendChild(Ft),Lt.appendChild(Pn),xt||Oe.appendChild(Lt),setTimeout(function(){Ln.resize()},1)}else{var Gt=document.createElement("div");Gt.className="applet_scaler",Gt.style.position="relative",Gt.style.display="block",Gt.appendChild(Pn),Oe.appendChild(Gt),en.appletOnLoad=function(fn){Ln.resize(),Dt(fn)}}function kt(fn,rn){rn&&typeof rn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(fn,rn.appletOnLoad):renderGGBElement(fn),Qn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",rn)}function ye(fn,rn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:fn,params:rn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Dn){kt(Dn.article,Dn.params)}),html5AppletsToProcess=null)},Nt(At)<5&&(fn.className+=" geogebraweb")):kt(fn,rn)}if(Yn){scriptLoadStarted=!0;for(var Le=0;Le0?(pi.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Dt).append(Lt),window.dispatchEvent(new Event("resize"))):Re(pi,en,!1),window.GGBT_wsf_view.launchFullScreen(Dt)}else an=Yn,Re(Oe,en,!1);if(!window.GGBT_wsf_view)for(le=0;leOe/4*3&&(pi=Oe/4*3),Dt=pi/5.8,jn.setAttribute("src",lt),jn.setAttribute("width",pi),jn.setAttribute("height",Dt);var Lt=(Oe-pi)/2,xt=(en-Dt)/2;jn.style.left=Lt+"px",jn.style.top=xt+"px",Pn.appendChild(jn)}}return Pn.appendChild(le),Pn},Hn=function(Oe){return Oe=Oe.toLowerCase(),Oe==="html5"||Oe==="screenshot"?Oe:"html5"},ae=["web","webSimple","web3d","tablet","tablet3d","phone"],Ut=function(Oe,en){if(At=Oe,en){hn(At,!0);return}var mn=!de;if(mn){var Yn=Nt(At);!isNaN(Yn)&&Yn<4.4&&(mn=!1)}var Pn,Un;window.location.protocol.substr(0,4)==="http"?Pn=window.location.protocol:Pn="http:";var le=At.indexOf("//");le>0?Un=At:le===0?Un=Pn+At:Un="https://www.geogebra.org/apps/5.2.814.0/";for(var jn in ae)if(At.slice(ae[jn].length*-1)===ae[jn]||At.slice((ae[jn].length+1)*-1)===ae[jn]+"/"){hn(Un,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&mn&&!Tt.is3D&&!Tt.AV&&!Tt.SV&&!Tt.CV&&!Tt.EV2&&!Tt.CP&&!Tt.PC&&!Tt.DA&&!Tt.FI&&!Tt.PV&&!he(Ot.showToolBar)&&!he(Ot.showMenuBar)&&!he(Ot.showAlgebraInput)&&!he(Ot.enableRightClick)&&(!Ot.appName||Ot.appName=="classic")?Un+="webSimple/":Un+="web3d/",hn(Un,!1)},hn=function(Oe,en){if(Oe.requirejs){Xe=Oe;return}Oe.slice(-1)!=="/"&&(Oe+="/"),Xe=Oe,en===null&&(en=Oe.indexOf("http")===-1),me=en,et="web.nocache.js",nt=!1;var mn=Xe.split("/");mn.length>1&&(!en&&mn[mn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):ae.indexOf(mn[mn.length-2])>=0&&(et=mn[mn.length-2]+".nocache.js")),mn=Oe.split("/"),At=mn[mn.length-3],At.substr(0,4)==="test"?At=At.substr(4,1)+"."+At.substr(5,1):(At.substr(0,3)==="war"||At.substr(0,4)==="beta")&&(At="5.0");var Yn=parseFloat(At);Yn!==NaN&&Yn<5&&Oe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Yn+" is deprecated. Using version latest instead."),Ut("5.0",en))},Qn=function(Oe,en){window.console&&window.console.log&&(!en||typeof en.showLogging=="undefined"||en.showLogging&&en.showLogging!=="false")&&console.log(Oe)};Ot.material_id!==void 0?_t(ti):ti();function ti(){var Oe=En;ue!==null?Oe=ue:parseFloat(Oe)<5&&(Oe="5.0"),Ut(Oe,!1),ie!==null&&hn(ie,me),Jt=!0}return Ln},GGBAppletUtils=function(){"use strict";function Ln(){return window.GGBT_wsf_edit!==void 0}function En(Jt,ue){ue!=1?(Jt.style.transformOrigin="0% 0% 0px",Jt.style.webkitTransformOrigin="0% 0% 0px",Jt.style.transform="scale("+ue+","+ue+")",Jt.style.webkitTransform="scale("+ue+","+ue+")",Jt.style.maxWidth="initial",Jt.querySelector(".ggb_preview")!==null&&(Jt.querySelector(".ggb_preview").style.maxWidth="initial"),Jt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Jt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Jt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Jt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Jt.style.transform="none",Jt.style.webkitTransform="none")}function Ot(Jt,ue,ie,Ve,Pe,ne){var Xe=null;if(ne!=null&&ne!="")for(var me=Jt.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+ne+" ")>-1){Xe=me;break}else me=me.parentNode;var an=0,At=0,et=0,nt=0,ft=0,lt=0,pt=0;if(Xe)an=Xe.offsetWidth,At=Math.max(Ve?Xe.offsetWidth:0,Xe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(an=Math.min(window.innerWidth,document.documentElement.clientWidth),At=Math.min(window.innerHeight,document.documentElement.clientHeight),et=an):(an=window.innerWidth,At=window.innerHeight,et=window.innerWidth),Jt){var vt=Jt.getBoundingClientRect();vt.left>0&&vt.left<=an&&(Pe===void 0||!Pe)&&(document.dir==="rtl"?(ft=an-vt.width-vt.left,lt=et<=480?10:30):(lt=vt.left,ft=et<=480?10:30),nt=lt+ft)}if(Jt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=Jt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,pt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,pt=40)}}return Jt&&((ie===void 0||!ie)&&ue>0&&ue+nt1&&(ne=!0)),ue&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ne=!0),!(Jt.hasOwnProperty("disableAutoScale")&&Jt.disableAutoScale))Pe=Tt(Jt,ue,ne,ie,Jt.scaleContainerClass);else return Ve;return ne&&(!Jt.hasOwnProperty("scale")||Ve===1)?Pe:Math.min(Ve,Pe)}function se(Jt){var ue=Math.min(window.innerWidth,document.documentElement.clientWidth),ie=Math.min(window.innerHeight,document.documentElement.clientHeight),Ve=Jt.getBoundingClientRect(),Pe=(ue-Ve.width)/2,ne=(ie-Ve.height)/2;ne<0&&(ne=0),Jt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pe<40?Jt.style.left="40px":Jt.style.left=Pe+"px",Jt.style.top=ne+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ne<40?Jt.style.top="40px":Jt.style.top=ne+"px",Jt.style.left=Pe+"px")}function je(Jt,ue){var ie=Jt.querySelector(".appletParameters");if(ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ue.id!==ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Jt)}if(ie.parentElement&&/fullscreen/.test(ie.parentElement.className))return;var Ve=de(ue,Jt);Ln()&&ie.setAttribute("data-param-scale",Ve);for(var Pe=null,ne=0;ne=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(Ln){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ln){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ln){var En=c[Ln];return En==null?null:En},r=d,webModule.__errFn=e}function B(){function Ln(Jt){var ue=Jt.lastIndexOf(rb);ue==-1&&(ue=Jt.length);var ie=Jt.indexOf(sb);ie==-1&&(ie=Jt.length);var Ve=Jt.lastIndexOf(tb,Math.min(ie,ue));return Ve>=O?Jt.substring(O,Ve+P):W}function En(Jt){if(!Jt.match(/^\w+:\/\//)){var ue=o.createElement(ub);ue.src=Jt+vb,Jt=Ln(ue.src)}return Jt}function Ot(){var Jt=__gwt_getMetaProperty(wb);return Jt!=null?Jt:W}function Tt(){for(var Jt=o.getElementsByTagName(_),ue=O;ueO?Jt[Jt.length-P].href:W}function se(){var Jt=o.location;return Jt.href==Jt.protocol+zb+Jt.host+Jt.pathname+Jt.search+Jt.hash}var je=Ot();return je==W&&(je=Tt()),je==W&&(je=de()),je==W&&se()&&(je=Ln(o.location.href)),je=En(je),je}function C(Ln){return Ln.match(/^\//)||Ln.match(/^[a-zA-Z]+:\/\//)?Ln:webModule.__moduleBase+Ln}function D(){var Ln=[],En=O,Ot=[],Tt=[];function de(Jt){var ue=Tt[Jt](),ie=Ot[Jt];if(ue in ie)return ue;var Ve=[];for(var Pe in ie)Ve[ie[Pe]]=Pe;throw r&&r(Jt,Ve,ue),null}if(__gwt_isKnownPropertyValue=function(Jt,ue){return ue in Ot[Jt]},webModule.__getPropMap=function(){var Jt={};for(var ue in Ot)Ot.hasOwnProperty(ue)&&(Jt[ue]=de(ue));return Jt},webModule.__computePropValue=de,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var se;try{se=Cb;var je=se.indexOf(Db);je!=-1&&(En=parseInt(se.substring(je+P),$),se=se.substring(O,je))}catch(Jt){}return webModule.__softPermutationId=En,C(se+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(Ln,En,Ot){"use strict";Ot.d(En,{Ax:function(){return je},Ds:function(){return Jt},KI:function(){return ie},SI:function(){return se},f1:function(){return de}});var Tt=Ot(3294);function de(Ve){let Pe=!0;if(Ve.length>0){for(let ne=0;nenew Promise((et,nt)=>{var ft=vt=>{try{pt(At.next(vt))}catch(wt){nt(wt)}},lt=vt=>{try{pt(At.throw(vt))}catch(wt){nt(wt)}},pt=vt=>vt.done?et(vt.value):Promise.resolve(vt.value).then(ft,lt);pt((At=At.apply(me,an)).next())}),Xe=({data:me,className:an,fullWidth:At,style:et={},onClose:nt,onOk:ft,showFullTools:lt,noAssociationId:pt})=>{const vt=(0,Tt.useRef)(null),wt=(0,Tt.useRef)(null),Nt=(0,Tt.useRef)(null),bt=(0,Tt.useRef)(null),[Ht,_t]=(0,Tt.useState)(!1),[Qt,qt]=(0,Tt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Tt.useEffect)(()=>(Nt.current||(Nt.current=document.createElement("style"),document.head.appendChild(Nt.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),Nt.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&Se()):(document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)),()=>{document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)}),[me==null?void 0:me.visible]);const Se=()=>Pe(void 0,null,function*(){_t(!0),qt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ke=yield(0,Ve.ZJ)(me==null?void 0:me.src);vt.current.src="",vt.current.src=Ke,vt.current.onload=function(){pe()},_t(!1),qt("")}),he=Ke=>Pe(void 0,null,function*(){_t(!0),qt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Cn=yield(0,ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Ke.dataUrl}});Cn!=null&&Cn.id&&!pt?(yield(0,ie.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:Cn==null?void 0:Cn.id,settings:JSON.stringify(Ke.state)}})).status===0&&ft():Cn!=null&&Cn.id&&ft(Cn),_t(!1),qt("")}),Re=()=>{const Ke=document.querySelector('a[href="https://markerjs.com/"]');Ke&&Ke.parentNode&&(Ke.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(ln=>{const dn=document.querySelector(ln.name);dn&&dn.setAttribute("title",ln.title)})},pe=()=>{wt.current=new ue.hP(vt.current),wt.current.targetRoot=bt.current,wt.current.addEventListener("render",he),wt.current.addEventListener("beforeclose",nt),lt&&(wt.current.availableMarkerTypes=wt.current.ALL_MARKER_TYPES,wt.current.uiStyleSettings.redoButtonVisible=!0,wt.current.uiStyleSettings.notesButtonVisible=!0,wt.current.uiStyleSettings.zoomButtonVisible=!0,wt.current.uiStyleSettings.zoomOutButtonVisible=!0,wt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=wt.current.uiStyleSettings,wt.current.show(),me!=null&&me.snapshotData&&wt.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Re()},300)};return Tt.createElement(Tt.Fragment,null,(me==null?void 0:me.visible)&&Tt.createElement(Jt.Z,{spinning:Ht,tip:Qt,style:{position:"absolute",width:"100vw"}},Tt.createElement("div",{ref:bt,className:je()(de.imageDimensions,an,At?de.fullWidth:""),style:et},Tt.createElement("img",{className:de.img,ref:vt}))))}},41588:function(Ln,En,Ot){"use strict";var Tt=Ot(59301),de=Ot(95237),se=Ot(43604),je=Ot(99313),Jt=Ot(3113),ue=Ot(85149),ie=Ot(88010),Ve=Ot(48136),Pe=Ot(59301);const ne=(0,Tt.forwardRef)(({callback:Xe,showSaveButton:me,value:an=""},At)=>{const et=(0,Tt.useRef)(),nt=[{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 "}]}]}],ft=[{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}`}]}]}],lt=wt=>{et.current.setValue(et.current.getValue()+" "+wt.value+" ")},pt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Pe.createElement(de.Z,{className:ie.Z.lists,gutter:[10,10]},nt.map((wt,Nt)=>Pe.createElement(se.Z,{flex:"110px",className:ie.Z.item},Pe.createElement("div",null,Pe.createElement(ue.Z,{value:`$$${wt.value}$$`}),wt.name),Pe.createElement("div",{className:ie.Z.children},wt.children.map((bt,Ht)=>Pe.createElement("div",{key:Ht},Pe.createElement("h1",null,bt.name),Pe.createElement(de.Z,{gutter:[10,10]},bt.data.map((_t,Qt)=>Pe.createElement(se.Z,{key:Qt,onClick:()=>lt(_t),className:ie.Z.diamond},Pe.createElement(ue.Z,{value:"`$$"+_t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Pe.createElement(de.Z,{className:ie.Z.lists,gutter:[10,10]},ft.map((wt,Nt)=>Pe.createElement(se.Z,{flex:"110px",className:ie.Z.item},Pe.createElement("div",null,Pe.createElement(ue.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),Pe.createElement("div",{className:ie.Z.children},wt.children.map((bt,Ht)=>Pe.createElement("div",{key:Ht},bt.name&&Pe.createElement("h1",null,bt.name),Pe.createElement(de.Z,{gutter:[10,10]},bt.data.map((_t,Qt)=>Pe.createElement(se.Z,{key:Qt,onClick:()=>lt(_t),className:ie.Z.diamond},Pe.createElement(ue.Z,{value:"`$$"+_t.value+"$$`"}))))))))))}],vt=()=>{var wt=document.createElement("div");wt.innerHTML=et.current.getValue();var Nt=wt.innerText;return Xe&&Xe(Nt),Nt};return(0,Tt.useImperativeHandle)(At,()=>({getData:vt})),Pe.createElement("div",{className:ie.Z.mathWrap},Pe.createElement(je.default,{defaultActiveKey:"1",items:pt}),Pe.createElement("math-field",{locale:"zh_cn",className:ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},an||""),me&&Pe.createElement("div",{className:ie.Z.button},Pe.createElement(Jt.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});En.Z=ne},8797:function(Ln,En,Ot){"use strict";var Tt=Ot(59301),de=Ot(93314),se=Ot(3113),je=Object.defineProperty,Jt=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,ne=(At,et,nt)=>et in At?je(At,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):At[et]=nt,Xe=(At,et)=>{for(var nt in et||(et={}))Ve.call(et,nt)&&ne(At,nt,et[nt]);if(ie)for(var nt of ie(et))Pe.call(et,nt)&&ne(At,nt,et[nt]);return At},me=(At,et)=>Jt(At,ue(et));const an=({img:At,buttonProps:et={},styles:nt={},customText:ft,ButtonText:lt,ButtonClick:pt,Buttonclass:vt,ButtonTwo:wt,imgStyles:Nt,loading:bt=!1})=>Tt.createElement("section",{className:"tc animated fadeIn",style:Xe(Xe({},{color:"#999",margin:"100px auto",visibility:bt?"hidden":"visible"}),nt)},Tt.createElement("img",{src:At||de,style:me(Xe({},Nt),{pointerEvents:"none",userSelect:"none"})}),Tt.createElement("p",{className:"mt20 font14"},ft||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Tt.createElement(se.ZP,Xe({className:vt,onClick:pt},et),lt),wt&&wt);En.Z=an},23210:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return vt}});var Tt=Ot(59301),de={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},se=Ot(3113),je=Ot(70557),Jt=Ot(23954),ue=Ot(6848),ie=Ot(955),Ve=Ot(94941),Pe=Ot(8797),ne=Ot(3294),Xe=Ot(19381),me=Ot(59301),an=Object.defineProperty,At=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ft=(wt,Nt,bt)=>Nt in wt?an(wt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:bt}):wt[Nt]=bt,lt=(wt,Nt)=>{for(var bt in Nt||(Nt={}))et.call(Nt,bt)&&ft(wt,bt,Nt[bt]);if(At)for(var bt of At(Nt))nt.call(Nt,bt)&&ft(wt,bt,Nt[bt]);return wt},pt=(wt,Nt,bt)=>new Promise((Ht,_t)=>{var Qt=he=>{try{Se(bt.next(he))}catch(Re){_t(Re)}},qt=he=>{try{Se(bt.throw(he))}catch(Re){_t(Re)}},Se=he=>he.done?Ht(he.value):Promise.resolve(he.value).then(Qt,qt);Se((bt=bt.apply(wt,Nt)).next())}),vt=({editOffice:wt="view",data:Nt,theme:bt,type:Ht,filename:_t,monacoEditor:Qt,className:qt,style:Se,close:he,onClose:Re,hasMask:pe,disabledDownload:Ke,onImgDimensions:Cn,showNodata:ln,recordInfo:dn})=>{const[Hn,ae]=(0,Tt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ut,hn]=(0,Tt.useState)(""),[Qn,ti]=(0,Tt.useState)(),Oe=window.ENV==="build"?"/react/build":"",en=location.host.startsWith("localhost")?ne.Z.PROXY_SERVER:ne.Z.API_SERVER,Yn=10*(1024*1024),Pn=(0,Tt.useRef)();Nt!=null&&Nt.startsWith("/api")&&Ht!=="txt"&&(Nt=ne.Z.API_SERVER+Nt);const Un=Dt=>Dt.substring(Dt.lastIndexOf("/")+1).split(".").pop();_t&&Qt&&(Qt.filename=_t),(0,Tt.useEffect)(()=>{var Dt,Lt;const xt=(Lt=(Dt=document.cookie)==null?void 0:Dt.replace(/\s/g,""))==null?void 0:Lt.split(";");xt==null||xt.map(Ft=>{let Gt=Ft.split("=");Gt[0]==="_educoder_session"&&hn(Gt[1])})},[]),(0,Tt.useEffect)(()=>{Ht==="office"&&(Nt.indexOf("bigfilescdn.")>-1||Nt.indexOf("bigfiles1")>-1?ti({url:Nt,fileType:Un(Nt),model:Nt.indexOf("model=edit")?"edit":"view"}):le())},[Ht,Nt]);const le=()=>pt(void 0,null,function*(){console.log("data:",Nt);let Dt=Nt;Nt.startsWith("http")||(Dt=location.origin+Dt);let Lt=new URL(Dt).pathname.split("/").pop();const xt=yield(0,Ve.gJ)({attachment_id:Lt});xt.url=en+xt.url,ti(xt)}),jn=()=>{if(Nt.startsWith("http")||Nt.startsWith("blob:")){pi();return}(0,ie.Sv)(_t||"educoder",Nt,_t)},pi=()=>{dn&&(0,Xe.fc)({id:dn==null?void 0:dn.id,watch_type:1,course_id:dn==null?void 0:dn.course_id}),(0,ie.Nd)(_t||"educoder",decodeURIComponent(Nt))};return me.createElement("div",{style:lt({},Se||{}),className:`${pe&&de.bgBlack} ${Ht?de.wrp:"hide"}`},he&&me.createElement("div",{className:de.close,ref:Pn},!!Cn&&me.createElement(ue.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Pn.current},me.createElement("span",{onClick:()=>{Re(),Cn()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Ke&&me.createElement(ue.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Pn.current},me.createElement("span",{onClick:pi},me.createElement("i",{className:"icon-quxiaozhiding"}))),me.createElement(ue.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Pn.current},me.createElement("span",{className:"",onClick:Re},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${de[qt]} ${qt} ${de.monaco} ${Ht==="txt"?"show":"hide"}`},Ht==="txt"&&me.createElement(me.Fragment,null,me.createElement(Jt.ZP,lt({},Qt)))),Ht==="audio"&&me.createElement("audio",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Nt}`,autoPlay:!0}),Ht==="video"&&me.createElement(me.Fragment,null,(Nt==null?void 0:Nt.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${Nt}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Nt}`,autoPlay:!0})),Ht==="office"&&Qn&&me.createElement("iframe",{src:`${Oe}/office.html?key=${Qn.key}&url=${btoa(Qn.url)}&callbackUrl=${en+(Qn.callbackUrl||"")}&fileType=${Qn.fileType}&title=${Qn.title||""}&model=${wt}&officeServer=${ne.Z.ONLYOFFICE}&disabledDownload=${!!Ke}`}),Ht==="html"&&me.createElement("iframe",{src:Nt+"&disposition=inline"}),Ht==="pdf"&&me.createElement("iframe",{src:`${Oe}/js/pdfview/index.html?filename=${_t||"educoder.pdf"}&url=${encodeURIComponent(Nt)}&disabledDownload=${!!Ke}`}),Ht==="image"&&me.createElement("img",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Nt}`}),(Ht==="other"||Ht==="download")&&me.createElement(me.Fragment,null,ln?me.createElement(Pe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(se.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:jn,disabled:Ke},"\u4E0B\u8F7D")}):me.createElement(se.ZP,{type:"primary",size:"middle",onClick:jn,disabled:Ke},me.createElement(je.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Ln,En,Ot){"use strict";Ot.d(En,{z:function(){return Ht},Z:function(){return _t}});var Tt=Ot(59301),de=Ot(50304),se=Ot(24768),je=Ot(64018),Jt=Ot(40846),ue=Ot(3294),ie=Ot(955),Ve=Ot(15342),Pe=Ot(1012),ne=Ot(23210),Xe=Ot(59301),an=({html:Qt})=>{const qt=(0,Tt.useRef)(null),Se=(0,Tt.useRef)(null),he=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 36px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,Tt.useEffect)(()=>{const Re=qt.current.attachShadow({mode:"open"});Se.current=document.createElement("div"),Se.current.className="markdown-body",Se.current.innerHTML=Qt,Re.appendChild(Se.current);const pe=document.createElement("style");return pe.textContent=he,Re.appendChild(pe),()=>{Re.innerHTML=""}},[]),(0,Tt.useEffect)(()=>{Se.current&&(Se.current.innerHTML=Qt)},[Qt]),Xe.createElement("div",{ref:qt})},At=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,lt=(Qt,qt,Se)=>qt in Qt?At(Qt,qt,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Qt[qt]=Se,pt=(Qt,qt)=>{for(var Se in qt||(qt={}))nt.call(qt,Se)&<(Qt,Se,qt[Se]);if(et)for(var Se of et(qt))ft.call(qt,Se)&<(Qt,Se,qt[Se]);return Qt};const vt="@\u2581\u2581@",wt="@\u2581@",Nt=/]*>/g;function bt(Qt){let qt=document.createElement("div");return qt.innerHTML=Qt,qt.childNodes.length===0?"":qt.childNodes[0].nodeValue}const Ht=(Qt,qt)=>{Qt=Qt||"";const Se=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pe=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return qt?Qt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Se,(Ke,Cn,ln,dn,Hn,ae,Ut)=>{const hn=Cn||dn||ae,Qn=ln||Hn||Ut||"?";return ue.Z.API_SERVER+"/api/attachments/"+hn+Qn+"&t="+(0,ie.Jn)(hn,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qt=Qt.replace(pe,(Ke,Cn,ln,dn,Hn,ae,Ut)=>{const hn=Cn||dn||ae,Qn=ln||Hn||Ut||"?";return ue.Z.API_SERVER+"/attachments/download/"+hn+Qn+"&t="+(0,ie.Jn)(hn,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(Se,(Ke,Cn,ln,dn,Hn,ae,Ut)=>{const hn=Cn||dn||ae,Qn=ln||Hn||Ut||"?";return ue.Z.API_SERVER+"/api/attachments/"+hn+Qn+"&t="+(0,ie.Jn)(hn,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(he,(Ke,Cn,ln,dn,Hn)=>{const ae=Cn||dn,Ut=ln||Hn||"";return'"'+ue.Z.API_SERVER+"/api/attachments/"+ae+Ut+ae+Ut+"&t="+(0,ie.Jn)(ae,Date.now())}).replace(Re,(Ke,Cn,ln,dn,Hn)=>{const ae=Cn||dn,Ut=ln||Hn||"";return"("+ue.Z.API_SERVER+"/files/uploads/"+ae+Ut+ae+Ut+"&t="+(0,ie.Jn)(ae,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,` `),Qt)};var _t=({value:Qt="",className:qt,showTextOnly:Se,showLines:he,style:Re={},stylesPrev:pe={},highlightKeywords:Ke,showProgramFill:Cn,isProgramFill:ln,disabledFill:dn=!1,programFillValue:Hn,onFillChange:ae=Qn=>{},onFillBlur:Ut=()=>{},onFillFocus:hn=()=>{}})=>{let Qn=String(Qt);const[ti,Oe]=(0,Tt.useState)(""),[en,mn]=(0,Tt.useState)("office"),[Yn,Pn]=(0,Tt.useState)([]),Un=(0,Tt.useRef)("a"+(0,Pe.Z)()),le={},jn=(Ee,tn,fn)=>{const rn=document.createElement(Ee===wt?"input":"textarea");rn.style.width="100%",rn.style.height=Ee===wt?"40px":"151px",rn.rows=5,rn.spellcheck=!1,rn.name="edu-program-fill",rn.placeholder="\u8BF7\u8F93\u5165",rn.dataset.id=tn;const Dn=Object.keys(le).length;return le[Dn]=rn,`${rn.outerHTML}`};function pi(Ee){return Ee=Ee.replace(/!\[.*?\]\(.*?\)/g,""),Ee=Ee.replace(/\[.*?\]\(.*?\)/g,""),Ee=Ee.replace(new RegExp("","gs"),""),Ee=Ee.replace(//g,""),Ee=Ee.replace(//g,""),Ee=Ee.replace(new RegExp(".*?<\\/video>","gs"),""),Ee=Ee.replace(new RegExp(".*?<\\/audio>","gs"),""),Ee=Ee.replace(new RegExp(".*?<\\/style>","gs"),""),Ee=Ee.replace(new RegExp(".*?<\\/script>","gs"),""),Ee}const Dt=Ee=>Ee.replace(/([\s\S]+?)<\/style>/gim,function(tn,fn){let rn=fn.replace(/(\n|\r)/g,"").split("}"),Dn=[];return rn.map(Zn=>{Zn!=""&&Dn.push(`.${Un.current} ${Zn}`)}),``}),Lt=(0,Tt.useMemo)(()=>{try{const rn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Dn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Zn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,yn=/\(\/attachments\/download\//g;Qn=Qn.replace(yn,"("+ue.Z.API_SERVER+"/attachments/download/").replace(rn,"("+ue.Z.API_SERVER+"/api/attachments/").replace(Dn,'"'+ue.Z.API_SERVER+"/api/attachments/").replace(Zn,'"'+ue.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(rn){}if(Cn){let rn=-1;return Qn=Qn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Dn,Zn,yn){var Ei;return++rn,jn(Dn,rn,(Ei=Hn==null?void 0:Hn[rn])==null?void 0:Ei.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Dt(Qn||"")}
`}let Ee=Dt(Qn);Ee=(0,se.ZP)(Ee);const tn=(0,se.ez)();Qn.match(/\[TOC\]/)&&(Ee=Ee.replace("

[TOC]

",(0,se.Qv)()),(0,se.Iy)()),Ee=Ee.replace(/(__special_katext_id_\d+__)/g,(rn,Dn)=>{const{type:Zn,expression:yn}=tn[Dn];return(0,Ve.renderToString)(bt(yn)||"",{displayMode:Zn==="block",throwOnError:!1,output:"html"})}),Ee=Ee.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,se.AL)();const fn=document.createElement("div");if(fn.innerHTML=Ee,Se)return fn.innerText;if(Ke){const rn=Ke.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return kt(fn,rn),fn.innerHTML}return setTimeout(()=>xn(),500),fn.innerHTML},[Qn,Ke]);(0,Tt.useEffect)(()=>{ye.current&&ye.current.querySelectorAll(["input","textarea"]).forEach(tn=>{tn.oninput=xt,tn.onblur=Ft,tn.onfocus=Gt})},[Yn]),(0,Tt.useEffect)(()=>{var Ee,tn,fn,rn,Dn;if(Hn!=null&&Hn.length)try{const Zn=ye.current.querySelectorAll(".edu-program-fill-score"),yn=ye.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ei,hi]of yn.entries())hi.value=((Ee=Hn==null?void 0:Hn[Ei])==null?void 0:Ee.value)||"",((tn=Hn==null?void 0:Hn[Ei])==null?void 0:tn.type)==="warning"?hi.className="program-fill-warning":((fn=Hn==null?void 0:Hn[Ei])==null?void 0:fn.type)==="success"?hi.className="program-fill-success":hi.className="";for(const[Ei,hi]of Zn.entries())hi.innerHTML=(rn=Hn==null?void 0:Hn[Ei])!=null&&rn.score?`${(Dn=Hn==null?void 0:Hn[Ei])==null?void 0:Dn.score}\u5206`:"";Pn(Hn)}catch(Zn){console.log(Zn,"error")}},[Hn]);const xt=Ee=>{Yn[Ee.target.dataset.id]=Yn[Ee.target.dataset.id]||{},Yn[Ee.target.dataset.id].value=Ee.target.value,Pn([...Yn]),ae(Yn,Ee.target.dataset.id)},Ft=Ee=>{Yn[Ee.target.dataset.id]=Yn[Ee.target.dataset.id]||{},Yn[Ee.target.dataset.id].value=Ee.target.value,Pn([...Yn]),Ut(Yn,Ee.target.dataset.id)},Gt=Ee=>{Yn[Ee.target.dataset.id]=Yn[Ee.target.dataset.id]||{},Yn[Ee.target.dataset.id].value=Ee.target.value,Pn([...Yn]),hn(Yn,Ee.target.dataset.id)};function kt(Ee,tn){return Ee.childNodes.forEach(fn=>{var rn;if(fn.childNodes.length>0)kt(fn,tn);else if(fn.nodeName!=="IMG")if(fn.innerHTML)fn.innerHTML=(rn=fn.innerHTML)==null?void 0:rn.replace(new RegExp(tn,"gi"),'$&');else{const Dn=document.createElement("span");Dn.innerHTML=fn.textContent.replace(new RegExp(tn,"gi"),'$&'),fn.replaceWith(Dn)}})}const ye=(0,Tt.useRef)();se.jb.WebkitLineClamp=he,he&&(Re=pt(pt({},Re),se.jb));function Le(Ee){let tn=Ee.target;if(tn.tagName.toUpperCase()==="A"){let fn=tn.getAttribute("href");if(fn.indexOf("office")>-1)Ee.preventDefault(),Oe(fn),mn("office");else if(fn.indexOf("application/pdf")>-1)Ee.preventDefault(),Oe(fn),mn("pdf");else if(fn.indexOf("text/html")>-1)Ee.preventDefault(),Oe(fn),mn("html");else if(fn.startsWith("#")){Ee.preventDefault();let rn=document.getElementById(fn.replace("#",""));rn&&rn.scrollIntoView(!0)}}}const xn=()=>{var Ee;const tn=(Ee=ye.current)==null?void 0:Ee.querySelectorAll("video");tn==null||tn.forEach(fn=>{if(fn.oncontextmenu=()=>!1,fn.src.indexOf(".m3u8")>-1&&!fn.canPlayType("application/vnd.apple.mpegurl")){if(Jt.ZP.isSupported()){var rn=new Jt.ZP;rn.loadSource(fn.src),rn.attachMedia(fn)}}})};(0,Tt.useEffect)(()=>{if(ye.current&&Lt&&Lt.match(Nt)&&window.PR.prettyPrint(),ye.current)return ye.current.addEventListener("click",Le),()=>{var Ee;(Ee=ye.current)==null||Ee.removeEventListener("click",Le),(0,se.AL)(),(0,se.Iy)()}},[Lt,ye.current,Le]),(0,Tt.useEffect)(()=>{var Ee;const tn=fn=>{fn.preventDefault(),fn.clipboardData.setData("text",window.getSelection().toString())};return(Ee=ye.current)==null||Ee.addEventListener("copy",tn),()=>{var fn;(fn=ye.current)==null||fn.removeEventListener("copy",tn)}},[ye.current]);const cn=Ee=>//i.test(Ee||"");return Tt.createElement(Tt.Fragment,null,Se&&Tt.createElement("div",{ref:ye},Lt),!Se&&!cn(Lt)&&Tt.createElement("div",{ref:ye,style:pt({},Re),className:`${qt||""} ${dn?"disabled-fill":""} markdown-body ${Un.current}`,dangerouslySetInnerHTML:{__html:Lt}}),!Se&&cn(Lt)&&Tt.createElement(an,{html:Lt}),Tt.createElement(ne.Z,{close:!0,data:ti,type:ti!=null&&ti.length?en:"",style:pt({},pe),onClose:()=>Oe("")}))}},97692:function(Ln,En,Ot){"use strict";Ot.d(En,{h:function(){return wt}});var Tt=Ot(59301),de=Ot(57809),se=Ot(78241),je=Ot(3113),Jt=Ot(89780),ue=Ot.n(Jt),ie=Ot(37036),Ve=Ot(95625),Pe=Object.defineProperty,ne=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,et=(Nt,bt,Ht)=>bt in Nt?Pe(Nt,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Nt[bt]=Ht,nt=(Nt,bt)=>{for(var Ht in bt||(bt={}))an.call(bt,Ht)&&et(Nt,Ht,bt[Ht]);if(me)for(var Ht of me(bt))At.call(bt,Ht)&&et(Nt,Ht,bt[Ht]);return Nt},ft=(Nt,bt)=>ne(Nt,Xe(bt));const lt=de.default.Option,pt={labelCol:{span:4},wrapperCol:{span:20}},vt={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"]};En.Z=({callback:Nt,onCancel:bt})=>{const[Ht,_t]=(0,Tt.useState)("python");function Qt(Se){_t(vt[Se][1])}function qt(Se){Nt(Se)}return Tt.createElement(se.default,ft(nt({},pt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:qt,style:{width:500}}),Tt.createElement(se.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Tt.createElement(de.default,{getPopupContainer:Se=>Se.parentNode,onChange:Qt},Object.keys(vt).map(Se=>Tt.createElement(lt,{key:Se,value:Se},vt[Se][0])))),Tt.createElement(se.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Tt.createElement(wt,{mode:Ht})),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(je.ZP,{type:"ghost",onClick:bt},"\u53D6\u6D88")))};function wt({value:Nt,onChange:bt,mode:Ht,options:_t={}}){const Qt=(0,Tt.useRef)(),[qt,Se]=(0,Tt.useState)();return(0,Tt.useEffect)(()=>{if(qt){let he=function(Re){const pe=Re.getValue();bt&&bt(pe)};return qt.on("change",he),()=>{qt.off("change",he)}}},[qt,bt]),(0,Tt.useEffect)(()=>{qt&&qt.setOption("mode",Ht)},[qt,Ht]),(0,Tt.useEffect)(()=>{qt&&(Nt!==qt.getValue()||Nt==="")&&setTimeout(()=>{qt.setValue(Nt||"")},300)},[qt,Nt]),(0,Tt.useEffect)(()=>{if(Qt.current&&!qt){const he=ue().fromTextArea(Qt.current,nt({mode:Ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_t));Se(he)}},[Qt.current,qt]),Tt.createElement("div",{className:"my-codemirror-container"},Tt.createElement("textarea",{ref:Qt}))}},12290:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Io}});var Tt=Ot(59301),de=Ot(89780),se=Ot.n(de),je=Ot(76374),Jt=Ot(37036),ue=Ot(6313),ie=Ot(25717),Ve=Ot(99498),Pe=Ot(25419),ne=Ot(67549),Xe=Ot(85149),me=({value:be="",className:Me,showTextOnly:Wt,showLines:Ae,style:on={}})=>{const re=(0,Tt.useMemo)(()=>"",[be]);return Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{dangerouslySetInnerHTML:{__html:re}}))},an=Ot(59301),At=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,vt=(be,Me,Wt)=>Me in be?At(be,Me,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):be[Me]=Wt,wt=(be,Me)=>{for(var Wt in Me||(Me={}))lt.call(Me,Wt)&&vt(be,Wt,Me[Wt]);if(ft)for(var Wt of ft(Me))pt.call(Me,Wt)&&vt(be,Wt,Me[Wt]);return be},Nt=(be,Me)=>et(be,nt(Me));let bt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\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 Ht({onActionCallback:be,title:Me,icon:Wt,actionName:Ae,className:on="",children:re}){function Yt(){be(Ae)}return an.createElement("a",{title:Me,className:on,onClick:Yt},an.createElement("i",{className:`${Wt}`}),re)}var _t=({watch:be,showNullButton:Me,showNullProgramButton:Wt,onActionCallback:Ae,fullScreen:on,insertTemp:re,hidetoolBar:Yt,extraUse:Fe})=>{const Je=[...bt,{title:`${be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${be?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return an.createElement("ul",{className:"markdown-toolbar-container"},!Yt&&Je.map((In,bn)=>an.createElement("li",{key:bn},In.actionName?an.createElement(Ht,Nt(wt({},In),{onActionCallback:Ae})):an.createElement("span",{className:"v-line"}))),Me?an.createElement("li",null,an.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ae},an.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Wt?an.createElement(an.Fragment,null,an.createElement("li",null,an.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ae},an.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),an.createElement("li",null,an.createElement(Ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ae},an.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,re&&an.createElement("li",null,an.createElement(Ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${re}`,onActionCallback:Ae},an.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Fe&&an.createElement("li",null,Fe),an.createElement("li",{className:"btn-full-screen"},an.createElement(Ht,{icon:`${on?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:on?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ae})))},Qt=Ot(79346),qt=Ot(78241),Se=Ot(92832),he=Ot(3113),Re=Object.defineProperty,pe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Cn=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,Hn=(be,Me,Wt)=>Me in be?Re(be,Me,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):be[Me]=Wt,ae=(be,Me)=>{for(var Wt in Me||(Me={}))ln.call(Me,Wt)&&Hn(be,Wt,Me[Wt]);if(Cn)for(var Wt of Cn(Me))dn.call(Me,Wt)&&Hn(be,Wt,Me[Wt]);return be},Ut=(be,Me)=>pe(be,Ke(Me));const hn={labelCol:{span:4},wrapperCol:{span:20}};var Qn=({callback:be,onCancel:Me})=>{function Wt(Ae){be(Ae)}return Tt.createElement(qt.default,Ut(ae({},hn),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Wt,style:{width:500}}),Tt.createElement(qt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Tt.createElement(Se.default,null)),Tt.createElement(qt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Tt.createElement(Se.default,null)),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(he.ZP,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},ti=Ot(97692),Oe=Ot(28451),en=Ot(43418),mn=Ot(95237),Yn=Ot(73524),Pn=Ot(59301),Un=({callback:be,onCancel:Me})=>{const Wt=document.createElement("canvas"),Ae=Wt.getContext("2d");Wt.width=1e3,Wt.height=800,Ae.fillStyle="#ffffff",Ae.fillRect(0,0,Wt.width,Wt.height);const on=Wt.toDataURL("image/png");return Pn.createElement(en.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Pn.createElement(mn.Z,{style:{height:"100vh"}},Pn.createElement(Yn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:on,visible:!0,title:String(Date.now())},onOk:re=>{be({src:re.url})},onClose:Me})))},le=Ot(12378);function jn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(jn,go.CommandHandler),jn.prototype.canAlignSelection=function(){var be=this.diagram;return!(be===null||be.isReadOnly||be.isModelReadOnly||be.selection.count<2)},jn.prototype.alignLeft=function(){var be=this.diagram;be.startTransaction("aligning left");var Me=1/0;be.selection.each(function(Wt){Wt instanceof go.Link||(Me=Math.min(Wt.position.x,Me))}),be.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Me,Wt.position.y))}),be.commitTransaction("aligning left")},jn.prototype.alignRight=function(){var be=this.diagram;be.startTransaction("aligning right");var Me=-1/0;be.selection.each(function(Wt){if(!(Wt instanceof go.Link)){var Ae=Wt.actualBounds.x+Wt.actualBounds.width;Me=Math.max(Ae,Me)}}),be.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Me-Wt.actualBounds.width,Wt.position.y))}),be.commitTransaction("aligning right")},jn.prototype.alignTop=function(){var be=this.diagram;be.startTransaction("alignTop");var Me=1/0;be.selection.each(function(Wt){Wt instanceof go.Link||(Me=Math.min(Wt.position.y,Me))}),be.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Wt.position.x,Me))}),be.commitTransaction("alignTop")},jn.prototype.alignBottom=function(){var be=this.diagram;be.startTransaction("aligning bottom");var Me=-1/0;be.selection.each(function(Wt){if(!(Wt instanceof go.Link)){var Ae=Wt.actualBounds.y+Wt.actualBounds.height;Me=Math.max(Ae,Me)}}),be.selection.each(function(Wt){Wt instanceof go.Link||Wt.move(new go.Point(Wt.actualBounds.x,Me-Wt.actualBounds.height))}),be.commitTransaction("aligning bottom")},jn.prototype.alignCenterX=function(){var be=this.diagram,Me=be.selection.first();if(Me){be.startTransaction("aligning Center X");var Wt=Me.actualBounds.x+Me.actualBounds.width/2;be.selection.each(function(Ae){Ae instanceof go.Link||Ae.move(new go.Point(Wt-Ae.actualBounds.width/2,Ae.actualBounds.y))}),be.commitTransaction("aligning Center X")}},jn.prototype.alignCenterY=function(){var be=this.diagram,Me=be.selection.first();if(Me){be.startTransaction("aligning Center Y");var Wt=Me.actualBounds.y+Me.actualBounds.height/2;be.selection.each(function(Ae){Ae instanceof go.Link||Ae.move(new go.Point(Ae.actualBounds.x,Wt-Ae.actualBounds.height/2))}),be.commitTransaction("aligning Center Y")}},jn.prototype.alignColumn=function(be){var Me=this.diagram;Me.startTransaction("align Column"),be===void 0&&(be=0),be=parseFloat(be);var Wt=new Array;Me.selection.each(function(Fe){Fe instanceof go.Link||Wt.push(Fe)});for(var Ae=0;Ae0){for(var Fe=re.elt(Yt-1);Fe!==null&&Fe.isTreeExpanded&&!Fe.isTreeLeaf;){var Je=this._sortTreeChildrenByY(Fe);Fe=Je.last()}Fe!==null&&be.select(Fe)}else be.select(on)}}else if(Wt.key==="Down")if(Me.isTreeExpanded&&!Me.isTreeLeaf){var Ae=this._sortTreeChildrenByY(Me).first();Ae!==null&&be.select(Ae)}else for(;Me!==null;){var on=Me.findTreeParentNode();if(on===null)break;var re=this._sortTreeChildrenByY(on),Yt=re.indexOf(Me);if(Ytre.y?1:on.xre.x?1:0}),Me},jn.prototype.copyToClipboard=function(be){go.CommandHandler.prototype.copyToClipboard.call(this,be),this._lastPasteOffset.set(this.pasteOffset)},jn.prototype.pasteFromClipboard=function(){var be=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(be,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),be},Object.defineProperty(jn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(be){if(be!=="move"&&be!=="select"&&be!=="scroll"&&be!=="tree"&&be!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+be);this._arrowKeyBehavior=be}}),Object.defineProperty(jn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(be){if(!(be instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+be);this._pasteOffset.set(be)}});var pi=jn,Dt=Ot(74413),Lt=Ot(43604),xt=Ot(99064),Ft={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Gt=Ot(24065),kt=Ot(59301),ye=(be,Me,Wt)=>new Promise((Ae,on)=>{var re=Je=>{try{Fe(Wt.next(Je))}catch(In){on(In)}},Yt=Je=>{try{Fe(Wt.throw(Je))}catch(In){on(In)}},Fe=Je=>Je.done?Ae(Je.value):Promise.resolve(Je.value).then(re,Yt);Fe((Wt=Wt.apply(be,Me)).next())});function Le({onCancel:be,callback:Me}){let Wt=(0,Tt.useRef)(),Ae=(0,Tt.useRef)(),on=(0,Tt.useRef)(),re=(0,Tt.useRef)(!1);const Yt=(0,Tt.useRef)(!1),[Fe,Je]=(0,Tt.useState)(0);function In(){const $t=le.bx.make,_e={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"};Wt.current=new le.S0(Ae.current,{padding:20,grid:$t(le.s_,"Grid",$t(le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$t(le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Sn=>{var An=Sn.diagram.commandHandler.addTopLevelParts(Sn.diagram.selection,!0);An||Sn.diagram.currentTool.doCancel()},commandHandler:$t(pi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Sn=>{var An=Sn.subject;An.location=An.location.copy().snapToGridPoint(Sn.diagram.grid.gridOrigin,Sn.diagram.grid.gridCellSize),setTimeout(()=>{Sn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Sn=>{var An=Sn.subject;setTimeout(()=>{Sn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Sn=>{var An=Sn.parameter.part;An.invalidateConnectedLinks();var $n=Sn.subject;Sn.diagram.toolManager.linkingTool.isForwards?$n.toNode.invalidateConnectedLinks():$n.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Wt.current.nodeTemplate=$t(le.NB,"Auto",{locationSpot:le.z6.Center,locationObjectName:"SHAPE",desiredSize:new le.$u(120,60),minSize:new le.$u(40,40),resizable:!0,resizeCellSize:new le.$u(10,10),rotatable:!0},new le.KX("location","loc",le.E9.parse).makeTwoWay(le.E9.stringify),new le.KX("desiredSize","size",le.$u.parse).makeTwoWay(le.$u.stringify),$t(le.bn,{name:"SHAPE",fill:_e.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:le.z6.AllSides,toSpot:le.z6.AllSides},new le.KX("figure"),new le.KX("fill"),new le.KX("stroke","borderColor"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),$t(le.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),$t(le.al,{margin:1,textAlign:"center",overflow:le.al.OverflowEllipsis,editable:!0},new le.KX("text").makeTwoWay(),new le.KX("stroke","color"))),Wt.current.nodeTemplate.toolTip=$t("ToolTip",$t(le.s_,"Vertical",{maxSize:new le.$u(200,NaN)},$t(le.al,{font:"bold 10pt sans-serif",textAlign:"center"},new le.KX("text")),$t(le.al,{font:"10pt sans-serif",textAlign:"center"},new le.KX("text","details"))));function Mn(Sn,An){var $n=(Gn,di)=>{Gn.handled=!0,Gn.diagram.model.commit(Pi=>{var si=di.part.adornedPart,Vn=new le.E9().setRectSpot(si.actualBounds,Sn);Vn.subtract(si.location),Vn.scale(2,2),Vn.x+=Math.sign(Vn.x)*130,Vn.y+=Math.sign(Vn.y)*130,Vn.add(si.location),Vn.snapToGridPoint(Gn.diagram.grid.gridOrigin,Gn.diagram.grid.gridCellSize);var yi=Pi.copyNodeData(si.data);Pi.setGroupKeyForNodeData(yi,Pi.getGroupKeyForNodeData(si.data)),Pi.addNodeData(yi);var Ie={from:si.key,to:Pi.getKeyForNodeData(yi)};Pi.addLinkData(Ie);var Yi=Gn.diagram.findNodeForData(yi);Yi.location=Vn,Gn.diagram.select(Yi),setTimeout(()=>{Gn.diagram.commandHandler.editTextBlock()},20)})};return $t(le.bn,{figure:An,alignment:Sn,alignmentFocus:Sn.opposite(),width:Sn.equals(le.z6.Top)||Sn.equals(le.z6.Bottom)?25:18,height:Sn.equals(le.z6.Top)||Sn.equals(le.z6.Bottom)?18:25,fill:"orange",stroke:_e.white,strokeWidth:4,mouseEnter:(Gn,di)=>di.fill="dodgerblue",mouseLeave:(Gn,di)=>di.fill="orange",isActionable:!0,click:$n,contextClick:$n})}function ei(Sn){return $t(le.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:(An,$n)=>$n.fill="dodgerblue",mouseLeave:(An,$n)=>$n.fill="orange",click:(An,$n)=>{An.diagram.commandHandler.showContextMenu($n.part.adornedPart)}},Sn||{})}Wt.current.nodeTemplate.selectionAdornmentTemplate=$t(le.uz,"Spot",$t(le.Vm,{padding:10}),Mn(le.z6.Top,"TriangleUp"),Mn(le.z6.Left,"TriangleLeft"),Mn(le.z6.Right,"TriangleRight"),Mn(le.z6.Bottom,"TriangleDown"),ei({alignment:new le.z6(.75,0)}));function ve(Sn,An){return($n,Gn)=>{$n.handled=!0,$n.diagram.model.commit(di=>{di.set(Gn.part.adornedPart.data,Sn,An)})}}function Be(Sn,An){return An||(An="color"),$t(le.bn,{width:16,height:16,stroke:"lightgray",fill:Sn,margin:1,background:"transparent",mouseEnter:($n,Gn)=>Gn.stroke="dodgerblue",mouseLeave:($n,Gn)=>Gn.stroke="lightgray",click:ve(An,Sn),contextClick:ve(An,Sn)})}function ge(){return[$t("ContextMenuButton",$t(le.s_,"Horizontal",Be(_e.white,"fill"),Be(_e.beige,"fill"),Be(_e.extralightblue,"fill"),Be(_e.extralightred,"fill"))),$t("ContextMenuButton",$t(le.s_,"Horizontal",Be(_e.lightgray,"fill"),Be(_e.lightgreen,"fill"),Be(_e.lightblue,"fill"),Be(_e.lightred,"fill")))]}function Ne(){return[$t("ContextMenuButton",$t(le.s_,"Horizontal",Be(_e.black),Be(_e.green),Be(_e.blue),Be(_e.red))),$t("ContextMenuButton",$t(le.s_,"Horizontal",Be(_e.white),Be(_e.magenta),Be(_e.purple),Be(_e.orange)))]}function De(Sn,An){return An||(An="thickness"),$t(le.bn,"LineH",{width:16,height:16,strokeWidth:Sn,margin:1,background:"transparent",mouseEnter:($n,Gn)=>Gn.background="dodgerblue",mouseLeave:($n,Gn)=>Gn.background="transparent",click:ve(An,Sn),contextClick:ve(An,Sn)})}function Te(Sn,An){return An||(An="dash"),$t(le.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Sn,margin:1,background:"transparent",mouseEnter:($n,Gn)=>Gn.background="dodgerblue",mouseLeave:($n,Gn)=>Gn.background="transparent",click:ve(An,Sn),contextClick:ve(An,Sn)})}function Ze(){return[$t("ContextMenuButton",$t(le.s_,"Horizontal",De(1),De(2),De(3),De(4))),$t("ContextMenuButton",$t(le.s_,"Horizontal",Te(null),Te([2,4]),Te([4,4])))]}function He(Sn,An){return An||(An="figure"),$t(le.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Sn,margin:1,background:"transparent",mouseEnter:($n,Gn)=>Gn.fill="dodgerblue",mouseLeave:($n,Gn)=>Gn.fill="lightgray",click:ve(An,Sn),contextClick:ve(An,Sn)})}Wt.current.nodeTemplate.contextMenu=$t("ContextMenu",$t("ContextMenuButton",$t(le.s_,"Horizontal",He("Rectangle"),He("RoundedRectangle"),He("Ellipse"),He("Diamond"))),$t("ContextMenuButton",$t(le.s_,"Horizontal",He("Parallelogram2"),He("ManualOperation"),He("Procedure"),He("Cylinder1"))),$t("ContextMenuButton",$t(le.s_,"Horizontal",He("Terminator"),He("CreateRequest"),He("Document"),He("TriangleDown"))),ge(),Ne(),Ze()),Wt.current.groupTemplate=$t(le.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:le.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Sn,An)=>{var $n=An.addMembers(An.diagram.selection,!0);$n||An.diagram.currentTool.doCancel()},avoidable:!1},new le.KX("location","loc",le.E9.parse).makeTwoWay(le.E9.stringify),$t(le.s_,"Auto",{name:"BODY"},$t(le.bn,{parameter1:10,fill:_e.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:le.z6.AllSides,toSpot:le.z6.AllSides},new le.KX("fill"),new le.KX("stroke","color"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),$t(le.Vm,{background:"transparent",margin:20})),$t(le.al,{alignment:le.z6.Top,alignmentFocus:le.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new le.KX("text"),new le.KX("stroke","color"))),Wt.current.groupTemplate.selectionAdornmentTemplate=$t(le.uz,"Spot",$t(le.s_,"Auto",$t(le.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),$t(le.Vm,{margin:1.5})),ei({alignment:le.z6.TopRight,alignmentFocus:le.z6.BottomRight})),Wt.current.groupTemplate.contextMenu=$t("ContextMenu",ge(),Ne(),Ze()),Wt.current.linkTemplate=$t(le.rU,{layerName:"Foreground",routing:le.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new le.KX("fromSpot","fromSpot",le.z6.parse),new le.KX("toSpot","toSpot",le.z6.parse),new le.KX("fromShortLength","dir",Sn=>Sn>=1?10:0),new le.KX("toShortLength","dir",Sn=>Sn>=1?10:0),new le.KX("points").makeTwoWay(),$t(le.bn,{strokeWidth:2},new le.KX("stroke","color"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),$t(le.bn,{segmentIndex:0,segmentOffset:new le.E9(15,0),segmentOrientation:le.rU.OrientAlong,alignmentFocus:le.z6.Right,figure:"circle",width:10,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",Sn=>Sn===1)),$t(le.bn,{segmentIndex:-1,segmentOffset:new le.E9(-10,6),segmentOrientation:le.rU.OrientPlus90,alignmentFocus:le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",Sn=>Sn>=1),new le.KX("width","thickness",Sn=>7+3*Sn),new le.KX("height","thickness",Sn=>7+3*Sn),new le.KX("segmentOffset","thickness",Sn=>new le.E9(-15,4+1.5*Sn))),$t(le.bn,{segmentIndex:0,segmentOffset:new le.E9(15,-6),segmentOrientation:le.rU.OrientMinus90,alignmentFocus:le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",Sn=>Sn===2),new le.KX("width","thickness",Sn=>7+3*Sn),new le.KX("height","thickness",Sn=>7+3*Sn),new le.KX("segmentOffset","thickness",Sn=>new le.E9(-15,4+1.5*Sn))),$t(le.al,{alignmentFocus:new le.z6(0,1,-4,0),editable:!0},new le.KX("text").makeTwoWay(),new le.KX("stroke","color"))),Wt.current.linkTemplate.selectionAdornmentTemplate=$t(le.uz,$t(le.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:nn(2)},new le.KX("pathPattern","thickness",nn)),ei({alignmentFocus:new le.z6(0,0,-6,-4)}));function nn(Sn){return $t(le.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Sn+4).toString()+" H3"})}function sn(Sn){var An="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Sn===0?An="M0 0 M16 16 M0 8 L16 8":Sn===2&&(An="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),$t(le.bn,{geometryString:An,margin:2,background:"transparent",mouseEnter:($n,Gn)=>Gn.background="dodgerblue",mouseLeave:($n,Gn)=>Gn.background="transparent",click:ve("dir",Sn),contextClick:ve("dir",Sn)})}function Xn(Sn){var An=($n,Gn)=>{$n.handled=!0,$n.diagram.model.commit(di=>{var Pi=Gn.part.adornedPart;di.set(Pi.data,Sn?"toSpot":"fromSpot",le.z6.stringify(le.z6.AllSides)),(Sn?Pi.toNode:Pi.fromNode).invalidateConnectedLinks()})};return $t(le.bn,{width:12,height:12,fill:"transparent",mouseEnter:($n,Gn)=>Gn.background="dodgerblue",mouseLeave:($n,Gn)=>Gn.background="transparent",click:An,contextClick:An})}function xe(Sn,An){var $n=0,Gn=le.z6.RightSide;Sn.equals(le.z6.Top)?($n=270,Gn=le.z6.TopSide):Sn.equals(le.z6.Left)?($n=180,Gn=le.z6.LeftSide):Sn.equals(le.z6.Bottom)&&($n=90,Gn=le.z6.BottomSide),An||($n-=180);var di=(Pi,si)=>{Pi.handled=!0,Pi.diagram.model.commit(Vn=>{var yi=si.part.adornedPart;Vn.set(yi.data,An?"toSpot":"fromSpot",le.z6.stringify(Gn)),(An?yi.toNode:yi.fromNode).invalidateConnectedLinks()})};return $t(le.bn,{alignment:Sn,alignmentFocus:Sn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:$n,background:"transparent",mouseEnter:(Pi,si)=>si.background="dodgerblue",mouseLeave:(Pi,si)=>si.background="transparent",click:di,contextClick:di})}Wt.current.linkTemplate.contextMenu=$t("ContextMenu",Ne(),Ze(),$t("ContextMenuButton",$t(le.s_,"Horizontal",sn(0),sn(1),sn(2))),$t("ContextMenuButton",$t(le.s_,"Horizontal",$t(le.s_,"Spot",Xn(!1),xe(le.z6.Top,!1),xe(le.z6.Left,!1),xe(le.z6.Right,!1),xe(le.z6.Bottom,!1)),$t(le.s_,"Spot",{margin:new le.Zt(0,0,0,2)},Xn(!0),xe(le.z6.Top,!0),xe(le.z6.Left,!0),xe(le.z6.Right,!0),xe(le.z6.Bottom,!0)))));const ni=`{ "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 vi=["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 ii(Sn){return console.log("shapeName:",Sn),vi.indexOf(Sn)>=0}var Ce=new le.YI(on.current,{maxSelectionCount:1,linkTemplate:$t(le.rU,{locationSpot:le.z6.Center,selectionAdornmentTemplate:$t(le.uz,"Link",{locationSpot:le.z6.Center},$t(le.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),$t(le.bn,{toArrow:"Standard",stroke:null}))},{routing:le.rU.AvoidsNodes,curve:le.rU.JumpOver,corner:5,toShortLength:4},new le.KX("points"),$t(le.bn,{isPanelMain:!0,strokeWidth:2}),$t(le.bn,{toArrow:"Standard",stroke:null})),model:new le.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...le.bn.getFigureGenerators().toArray().map(Sn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Sn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Wt.current.addDiagramListener("TextEdited",function(Sn){var An;const $n=Sn.subject.part;var Gn=(An=document.activeElement)==null?void 0:An.value;typeof Gn=="string"&&Gn.trim()===""&&Wt.current.model.commit(function(di){di.set($n.data,"text","\u672A\u547D\u540D"),Wt.current.commandHandler.stopCommand()},"increment")}),Ce.nodeTemplate=$t(le.NB,"Auto",{locationSpot:le.z6.Center},new le.KX("location","location",le.E9.parse).makeTwoWay(le.E9.stringify),$t(le.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 le.KX("stroke").makeTwoWay(),new le.KX("fill").makeTwoWay(),new le.KX("figure")),$t(le.al,{margin:new le.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new le.$u(16,16),maxSize:new le.$u(10,NaN),textAlign:"center",editable:!0},new le.KX("key").makeTwoWay())),setTimeout(()=>{Wt.current.grid=$t(le.s_,"Grid",$t(le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$t(le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Wt.current.grid.visible=!0,Wt.current.grid.gridCellStroke="darkgray",Wt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Wt.current,Wt.current}const bn=()=>ye(this,null,function*(){var $t,_e=Wt.current.makeImage();const Mn=yield(0,xt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:_e.src,file_data:JSON.stringify({login:($t=(0,Gt.eY)())==null?void 0:$t.login,data:JSON.parse(Wt.current.model.toJson())})}});Me({src:Mn.url})});return(0,Tt.useEffect)(()=>(setTimeout(()=>{In()},500),Je(Fe+1),()=>{Wt.current=null}),[]),kt.createElement("div",{ref:Yt,className:re.current?`${Ft.maxH60} body-overflow-initial`:"body-overflow-initial"},kt.createElement(en.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Fe,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:kt.createElement(mn.Z,null,kt.createElement(Lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),kt.createElement(Lt.Z,{onClick:()=>{var $t,_e,Mn=Wt.current.selection.first();if(re.current=!re.current,document.activeElement&&Mn){let ei=(_e=($t=document.activeElement)==null?void 0:$t.value)==null?void 0:_e.trim();typeof ei=="string"&&Wt.current.model.commit(function(ve){ve.set(Mn.data,"text",ei||"\u672A\u547D\u540D"),Wt.current.commandHandler.stopCommand()},"increment")}Je(Fe+1)}},kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:be},kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ft.flowChartWrp},kt.createElement("div",{style:{display:"flex",height:"100%"}},kt.createElement("div",{style:{width:"300px",height:"100%"}},kt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),kt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ft.myPaletteDiv,ref:on})),kt.createElement("div",{style:{flex:1,position:"relative"}},kt.createElement("div",{ref:Ae,style:{height:"80vh"}}))),kt.createElement("div",{className:"tr"},kt.createElement(he.ZP,{size:"large",onClick:bn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var xn=Le,cn=Ot(5112),Ee=Ot(5871);const tn=cn.ZP.Group,fn={margin:"0 8px"};var rn=({callback:be,onCancel:Me})=>{function Wt(Ae){be(Ae)}return Tt.createElement(qt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Wt},Tt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Tt.createElement("span",{style:fn},"\u5355\u5143\u683C\u6570\uFF1A"),Tt.createElement("span",{style:fn},"\u884C\u6570"),Tt.createElement(qt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Tt.createElement(Ee.Z,null)),Tt.createElement("span",{style:fn},"\u5217\u6570"),Tt.createElement(qt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Tt.createElement(Ee.Z,null))),Tt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Tt.createElement("span",{style:fn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Tt.createElement(qt.default.Item,{name:"align"},Tt.createElement(tn,null,Tt.createElement(cn.ZP,{value:"default"},Tt.createElement("i",{className:"fa fa-align-justify"})),Tt.createElement(cn.ZP,{value:"left"},Tt.createElement("i",{className:"fa fa-align-left"})),Tt.createElement(cn.ZP,{value:"center"},Tt.createElement("i",{className:"fa fa-align-center"})),Tt.createElement(cn.ZP,{value:"right"},Tt.createElement("i",{className:"fa fa-align-right"}))))),Tt.createElement("div",{className:"flex-container flex-end"},Tt.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Tt.createElement(he.ZP,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},Dn=Ot(78673),Zn=Ot(80727),yn=Ot.n(Zn),hi=(0,Tt.forwardRef)(({use3d:be,width:Me,height:Wt,callback:Ae,showSaveButton:on},re)=>{const Yt=(0,Tt.useRef)(),Fe=(0,Tt.useRef)(),[Je,In]=(0,Tt.useState)(!1),bn=(0,Tt.useRef)({id:Yt,appName:"graphing",width:Me||1e3,height:Wt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Tt.useEffect)(()=>{Fe.current=new(yn())(bn.current,!0),window.onload=function(){Fe.current.inject("applet_container")}},[]);const $t=()=>{var _e=window.ggbApplet.getPNGBase64(1,!0,72);return Ae&&Ae(_e),_e};return(0,Tt.useEffect)(()=>{bn.current.appName=Je?"3D":"graphing",Fe.current.inject("applet_container")},[Je]),(0,Tt.useEffect)(()=>{In(be)},[be]),(0,Tt.useImperativeHandle)(re,()=>({getImgData:$t})),Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Yt}),Tt.createElement(mn.Z,{align:"middle"},Tt.createElement(Lt.Z,{flex:1},Tt.createElement(Dn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Je,onChange:_e=>In(_e)})),Tt.createElement(Lt.Z,null,Tt.createElement(he.ZP,{size:"large",onClick:$t,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),We=Ot(41588),gn=Ot(8591);const Nn="link",_n="upload-image",Jn="add-flowchart",xi="draw-image",Di="add-flowchart",bi="code-block",Ii="add-table",no="------------",qi={default:no,left:`:${no}`,center:`:${no}:`,right:`${no}:`};var io=Ot(58856);function Ao(){}let wo=0;const Do=1e4,fo="\u2581",Li="@\u2581\u2581@",Ct="@\u2581@",Co=` **\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`,$i=["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 Qi(be){return/^\d+$/.test(be)?`${be}px`:be}const Qo=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",cr={[Qo+"-B"]:"bold",[Qo+"-I"]:"italic"},Lo={[Nn]:"\u6DFB\u52A0\u94FE\u63A5",[bi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[_n]:"\u6DFB\u52A0\u56FE\u7247",[xi]:"\u6DFB\u52A0\u753B\u56FE",[Jn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ii]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Io=({defaultValue:be="",onChange:Me,width:Wt="100%",height:Ae=400,miniToolbar:on=!1,isFocus:re=!1,watch:Yt,insertTemp:Fe,mode:Je="markdown",id:In="markdown-editor-id",showResizeBar:bn=!1,noStorage:$t=!1,showNullButton:_e=!1,showNullProgramButton:Mn=!1,hidetoolBar:ei=!1,fullScreen:ve=!1,onBlur:Be,onCMBeforeChange:ge,onFullScreen:Ne,className:De="",disablePaste:Te=!1,disabled:Ze=!1,disabledFill:He=!1,placeholder:nn="",values:sn="",extraUse:Xn})=>{const[xe,ni]=(0,Tt.useState)(null),[vi,ii]=(0,Tt.useState)(be),[Ce,Sn]=(0,Tt.useState)(Yt),[An,$n]=(0,Tt.useState)(ve),[Gn,di]=(0,Tt.useState)(""),[Pi,si]=(0,Tt.useState)(0),[Vn,yi]=(0,Tt.useState)(Ae),[Ie,Yi]=(0,Tt.useState)(!1),[Ge,Ti]=(0,Tt.useState)(0),[bo,Xi]=(0,Tt.useState)(0),Ro=(0,Tt.useRef)(),vo=(0,Tt.useRef)(),ui=(0,Tt.useRef)(),oi=(0,Tt.useRef)();(0,Tt.useEffect)(()=>{const ai=window.scrollY||window.pageYOffset;ii(sn),xe==null||xe.setValue(sn),window.scrollTo(0,ai)},[sn]),(0,Tt.useEffect)(()=>{Ne==null||Ne(An)},[An]),(0,Tt.useEffect)(()=>{if(Ro.current){let ai=function(pn,Si){var oo;if(Te){Si.preventDefault();return}const Zo=Si.clipboardData;if(Zo){const Vo=Zo.types.toString(),$o=Zo.items;if(Vo==="Files"||Zo.types.indexOf("Files")>-1){if(Si.preventDefault(),Je=="stex")return;try{let yr=$o[1];((oo=$o[0])==null?void 0:oo.kind)==="file"&&(yr=$o[0]);const Sr=yr.getAsFile(),gs=Sr.name.split(".").pop();(0,Oe.I)(Sr,Ur=>{var es,ke,Mr;Ur.id?((es=Sr==null?void 0:Sr.type)==null?void 0:es.indexOf("image"))>-1?li.replaceSelection(``):((ke=Sr==null?void 0:Sr.type)==null?void 0:ke.indexOf("video"))>-1?li.replaceSelection(``):((Mr=Sr==null?void 0:Sr.type)==null?void 0:Mr.indexOf("pdf"))>-1?li.replaceSelection(`${Sr.name}`):$i.includes(gs)?li.replaceSelection(`${Sr.name}`):li.replaceSelection(`[${Sr.name}](/api/attachments/${Ur.id}?type=${Ur.content_type})`):(Ur==null?void 0:Ur.status)===401&&(document.location.href="/user/login")})}catch(yr){gn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const li=se().fromTextArea(Ro.current,{mode:Je,lineNumbers:!on,lineWrapping:!0,value:be,autoCloseTags:!0,autoCloseBrackets:!0});return li.on("keyup",function(pn,Si){Si.keyCode===8&&(pn.getValue()==""?li.setOption("placeholder",nn):li.setOption("placeholder",null))}),li.on("keydown",function(pn,Si){if(Si.keyCode===8){var oo=Ji(pn);oo&&Si.preventDefault()}}),re&&li.focus(),li.on("paste",ai),Ze&&li.on("beforeChange",function(pn,Si){(Si.origin==="paste"||Si.origin==="+input")&&Si.cancel()}),ni(li),()=>{li.off("paste",ai)}}},[]);const Ri=(0,Tt.useCallback)(()=>{if(vo.current)try{}catch(ai){console.log(ai,"---- to set md editor body height")}},[Vn,vo,An]);(0,Tt.useEffect)(()=>{function ai(){let li=new je.Z(pn=>{for(let Si of pn)(Si.target.offsetHeight>0||Si.target.offsetWidth>0)&&(Ri(),xe.setSize("100%","100%"),xe.refresh())});return li.observe(Ro.current.parentElement),li}if(xe){const li=ai();return()=>{var pn,Si;(pn=Ro.current)!=null&&pn.parentElement&&li.unobserve((Si=Ro.current)==null?void 0:Si.parentElement)}}},[xe,Ri]),(0,Tt.useEffect)(()=>{if(xe){let ai=[];for(const[li,pn]of Object.entries(cr)){let Si={[li]:()=>{On(pn)}};ai.push(Si),xe.addKeyMap(Si)}return()=>{for(let li of ai)xe.removeKeyMap(li)}}},[xe]),(0,Tt.useEffect)(()=>{ve!==An&&$n(ve)},[ve]),(0,io.Z)(()=>{if(!$t&&Pi>0){let ai=new Date().getTime(),li=window.sessionStorage.getItem(In);ai>=Pi+Do&&(!li||li!==vi)&&(window.sessionStorage.setItem(In,vi),Yi(!0))}},Do),(0,Tt.useEffect)(()=>{Sn(Yt)},[xe,Yt]),(0,Tt.useEffect)(()=>{xe&&re&&xe.focus()},[xe,re]),(0,Tt.useEffect)(()=>{if(Ce&&xe){let ai=function(pn){let Si=pn.target;if(oi.current){let oo=Si.scrollTop/Si.scrollHeight;oi.current.scrollTop=oi.current.scrollHeight*oo}};const li=xe.getScrollerElement();return li.addEventListener("scroll",ai),()=>{li.removeEventListener("scroll",ai)}}},[xe,Ce]),(0,Tt.useEffect)(()=>{if(xe&&ge){let ai=function(li,pn){ge(li,pn)};return xe.on("beforeChange",ai),()=>{xe.off("beforeChange",ai)}}},[xe,ge]),(0,Tt.useEffect)(()=>{if(xe&&Be){let ai=function(){Be(xe.getValue())};return xe.on("blur",ai),()=>{xe.off("blur",ai)}}},[xe,Be]);function Ji(ai,li){var pn=ai.getDoc(),Si=pn.getCursor(),oo=pn.getLine(Si.line),Zo=oo.charAt(Si.ch-1),Vo=oo.lastIndexOf("@\u2581@",Si.ch),$o=oo.lastIndexOf("@\u2581\u2581@",Si.ch),yr=Vo>$o?Vo:$o,Sr=Vo>$o?3:4;if(Li.indexOf(Zo)===-1)return null;if(console.log("change1:",li,ai,oo,Si,yr,Vo,$o,Zo),yr>=0&&Si.ch-yr<5){var gs=yr+Sr;return pn.replaceRange("",{line:Si.line,ch:yr},{line:Si.line,ch:gs}),{line:Si.line,ch:gs}}return null}(0,Tt.useEffect)(()=>{if(xe){let ai=function(li,pn){const Si=li.getValue();ii(Si),si(new Date().getTime()),li.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Me&&(Mn?Me(Si,Ci(Si)):Me(Si))};return xe.on("change",ai),()=>{xe.off("change",ai)}}},[xe,Me]),(0,Tt.useEffect)(()=>{if(xe)if(be==null)xe.setValue(""),ii("");else{const ai=window.scrollY||window.pageYOffset;be!==xe.getValue()&&(xe.setValue(be),ii(be),xe.setCursor(Ze?1:xe.lineCount(),0),window.scrollTo(0,ai))}},[xe,be]);const On=(0,Tt.useCallback)(ai=>{const li=xe.getCursor(),pn=xe.getSelection();let Si=pn.split(` `);switch(ai){case"bold":return xe.replaceSelection("**"+pn+"**"),pn===""&&xe.setCursor(li.line,li.ch+2),xe.focus();case"italic":return xe.replaceSelection("*"+pn+"*"),pn===""&&xe.setCursor(li.line,li.ch+1),xe.focus();case"code":return xe.replaceSelection("`"+pn+"`"),pn===""&&xe.setCursor(li.line,li.ch+1),xe.focus();case"inline-latex":return di("inline-latex"),xe.focus();case"latex":return xe.replaceSelection("```latex\n"+pn+"\n```"),xe.setCursor(li.line+1,pn.length+1),xe.focus();case"line-break":return xe.replaceSelection(`
`),xe.focus();case"list-ul":return pn===""?xe.replaceSelection("- "+pn):xe.replaceSelection(Si.map(oo=>oo===""?"":`- ${oo}`).join(` `)),xe.focus();case"list-ol":return pn===""?xe.replaceSelection("1. "+pn):xe.replaceSelection(Si.map((oo,Zo)=>oo===""?"":`${Zo+1}. ${oo}`).join(` `)),xe.focus();case"add-null-ch":return pn===""&&xe.setCursor(li.line,li.ch),xe.replaceSelection(fo),xe.focus();case"add-signal":return pn===""&&xe.setCursor(li.line,li.ch),xe.replaceSelection(Ct),xe.focus();case"add-multiple":return pn===""&&xe.setCursor(li.line,li.ch),xe.replaceSelection(Li),xe.focus();case"inster-template-1":return pn===""&&xe.setCursor(li.line,li.ch),xe.replaceSelection(Co),xe.focus();case"eraser":return xe.setValue(""),xe.focus();case"trigger-watch":return Sn(!Ce),xe.focus();case"trigger-full-screen":return $n(!An),xe.focus();case Nn:di(Nn);return;case bi:di(bi);return;case _n:di(_n);return;case xi:di(xi);return;case"maths-latex":di("maths-latex");return;case Jn:di(Jn);return;case Ii:di(Ii);return;default:throw new Error}},[xe,Ce,An]),It=(0,Tt.useCallback)((ai,li)=>{var pn,Si,oo,Zo,Vo,$o;switch(di(""),Gn){case Nn:const{title:es,link:ke}=ai;return xe.replaceSelection(`[${es}](${ke})`),xe.focus();case bi:const{language:Mr,content:eu}=ai;return xe.replaceSelection(["```"+Mr,eu,"```"].join(` `)),xe.focus();case"maths-latex":for(var yr=atob(ai),Sr=new Uint8Array(yr.length),gs=0;gs{Fi.id?xe.replaceSelection(`![,](/api/attachments/${Fi.id}?type=${Fi.content_type})`):(Fi==null?void 0:Fi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":xe.replaceSelection("`$$"+ai+"$$`");break;case _n:case xi:case Di:const{src:_s,alt:yo}=ai,to=li,fr=(oo=(Si=(pn=to==null?void 0:to.name)==null?void 0:pn.split("."))==null?void 0:Si.pop)==null?void 0:oo.call(Si);return((Zo=to==null?void 0:to.type)==null?void 0:Zo.indexOf("image"))>-1||!(to!=null&&to.type)?to!=null&&to.align||to!=null&&to.width?xe.replaceSelection(`

${yo||

`):xe.replaceSelection(`${yo||`):((Vo=to==null?void 0:to.type)==null?void 0:Vo.indexOf("video"))>-1?xe.replaceSelection(``):(($o=to==null?void 0:to.type)==null?void 0:$o.indexOf("pdf"))>-1?xe.replaceSelection(`${to.name}`):$i.includes(fr)?xe.replaceSelection(`${to.name}`):xe.replaceSelection(`[${to.name}](${_s})`),xe.focus();case Ii:const{row:jo,col:eo,align:Ko}=ai;let ps=` `;for(let Fi=0;Fi{switch(Gn){case Nn:return Tt.createElement(Qn,{callback:It,onCancel:Mo});case bi:return Tt.createElement(ti.Z,{callback:It,onCancel:Mo});case _n:return Tt.createElement(Oe.Z,{callback:It,onCancel:Mo});case Jn:return Tt.createElement(xn,{callback:It,onCancel:Mo});case Ii:return Tt.createElement(rn,{callback:It,onCancel:Mo});case"maths-latex":return Tt.createElement(hi,{showSaveButton:!0,callback:It});case"inline-latex":return Tt.createElement(We.Z,{showSaveButton:!0,callback:It});default:return null}},[Gn]);function Mo(){di("")}(0,Tt.useEffect)(()=>{if(ui.current){let ai=function(Vo){oo=!0,Zo=Vo.pageY},li=function(){oo=!1},pn=function(Vo){if(oo){let $o=Vo.pageY-Zo;$o<0&&($o=0),$o>300&&($o=300);let yr=Ae+$o+"px";yi(yr)}},Si=ui.current,oo=!1,Zo=0;return Si.addEventListener("mousedown",ai),document.addEventListener("mousemove",pn),document.addEventListener("mouseup",li),()=>{Si.removeEventListener("mousedown",ai),document.removeEventListener("mousemove",pn),document.removeEventListener("mouseup",li)}}},[xe,ui]),(0,Tt.useEffect)(()=>{yi(Ae)},[Ae]);const ji=Qi(Wt),mo=Qi(Vn),Wo={width:ji,height:mo},wi=(0,Tt.useMemo)(()=>{if(Pi){let ai=new Date(Pi),li=ai.getHours(),pn=ai.getMinutes(),Si=ai.getSeconds();return li=li<10?"0"+li:li,pn=pn<10?"0"+pn:pn,Si=Si<10?"0"+Si:Si,`${li}:${pn}:${Si}`}return 0},[Pi]),Ci=ai=>{const li=[];if(Mn){let pn=-1;ai=ai.replace(/(@▁▁@|@▁@)/g,function(Si,oo,Zo){li.push({multiLine:Si!==Ct})})}return li};function Hi(){window.sessionStorage.removeItem(In),Yi(!1),si(0)}function Oi(){Yi(!1),si(0),xe.setValue(window.sessionStorage.getItem(In))}(0,Tt.useEffect)(()=>{Lo[Gn]&&Gn!==xi&&Gn!==Jn&&setTimeout(()=>{const ai=document.getElementsByClassName("markdown-popup-form")[0],li=window.innerWidth/2-ai.offsetWidth/2,pn=window.innerHeight/2-ai.offsetHeight/2;Ti(li),Xi(pn)},0)},[Gn]);const po=ai=>{ai.preventDefault();const li=ai.clientX-Ge,pn=ai.clientY-bo;document.body.onmousemove=Si=>{let oo=Si.clientX-li,Zo=Si.clientY-pn;const Vo=document.getElementsByClassName("markdown-popup-form")[0],$o=window.innerWidth-Vo.offsetWidth,yr=window.innerHeight-Vo.offsetHeight;oo=Math.max(0,Math.min(oo,$o)),Zo=Math.max(0,Math.min(Zo,yr)),Fo(Si.clientX,Si.clientY,li,pn)&&(Ti(oo),Xi(Zo))},document.body.onmouseup=function(){document.body.onmousemove=null}},Fo=(ai,li,pn,Si)=>{const oo=document.body.clientHeight,Zo=document.body.clientWidth;return ai<20&&pn>ai||ai>Zo-20&&pnli||li>oo-20&&Siqt in Qt?Xe(Qt,qt,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Qt[qt]=Se,lt=(Qt,qt)=>{for(var Se in qt||(qt={}))et.call(qt,Se)&&ft(Qt,Se,qt[Se]);if(At)for(var Se of At(qt))nt.call(qt,Se)&&ft(Qt,Se,qt[Se]);return Qt},pt=(Qt,qt)=>me(Qt,an(qt));const{useForm:vt}=Tt.default,wt={width:280,marginRight:10},Nt={labelCol:{span:5},wrapperCol:{span:19}};var bt=({callback:Qt,onCancel:qt})=>{const[Se]=vt();let he=(0,Pe.useRef)();function Re(Cn){he.current.width=Se.getFieldValue("width"),he.current.align=Se.getFieldValue("align"),Qt(Cn,he.current)}function pe(Cn,ln){if(Cn.status===-1){de.ZP.error(Cn.message);return}Se.setFieldsValue({src:`/api/attachments/${Cn.id}`,type:ln.type})}function Ke(Cn){let ln=Cn.target.files[0];he.current=ln,_t(ln,pe)}return ne.createElement(Tt.default,pt(lt({form:Se},Nt),{className:"upload-image-panel",onFinish:Re,style:{width:470,overflow:"hidden"}}),ne.createElement(Tt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ne.createElement("div",{className:"flex-container"},ne.createElement(Tt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ne.createElement(se.default,{style:wt})),ne.createElement(Ht,{onFileChange:Ke}))),ne.createElement(Tt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ne.createElement(se.default,{style:{width:264}})),ne.createElement(Tt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ne.createElement(je.Z,null,ne.createElement(Tt.default.Item,{name:"width",style:{margin:0}},ne.createElement(Jt.Z,{style:{width:264}})),ne.createElement("span",{className:"ml8"},"%"))),ne.createElement(Tt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ne.createElement(ue.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"}]})),ne.createElement("aside",null,ne.createElement(Tt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ne.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(ie.ZP,{type:"default",onClick:qt},"\u53D6\u6D88"))))};function Ht({onFileChange:Qt}){return ne.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ne.createElement("input",{type:"file",onChange:Qt}))}function _t(Qt,qt){if(!Qt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Se=new FormData;Se.append("editormd-image-file",Qt),Se.append("file_param_name","editormd-image-file"),Se.append("byxhr","true");var he=new window.XMLHttpRequest;he.withCredentials=!0,he.addEventListener("load",function(Re){qt(JSON.parse(Re.target.responseText),Qt)},!1),he.addEventListener("error",function(Re){console.error(Re)},!1),he.open("POST",`${Ve.KI}/api/attachments.json`),he.send(Se)}},79346:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return se}});var Tt=Ot(59301),de=Ot(4676);class se extends Tt.Component{constructor(Jt){super(Jt);const ue=window.document;this.node=ue.createElement("div"),ue.body.appendChild(this.node)}render(){const{children:Jt}=this.props;return(0,de.createPortal)(Jt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Ln,En,Ot){"use strict";Ot.d(En,{SV:function(){return ye},ZP:function(){return kt}});var Tt=Ot(59301),de=Ot(76374);const se={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"]},je={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"]},Jt={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 ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},ue={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 Ve=Ot(53184),Pe=Ot.n(Ve),ne=Object.defineProperty,Xe=Object.defineProperties,me=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(Le,xn,cn)=>xn in Le?ne(Le,xn,{enumerable:!0,configurable:!0,writable:!0,value:cn}):Le[xn]=cn,ft=(Le,xn)=>{for(var cn in xn||(xn={}))At.call(xn,cn)&&nt(Le,cn,xn[cn]);if(an)for(var cn of an(xn))et.call(xn,cn)&&nt(Le,cn,xn[cn]);return Le},lt=(Le,xn)=>Xe(Le,me(xn)),pt=(Le,xn,cn)=>new Promise((Ee,tn)=>{var fn=Zn=>{try{Dn(cn.next(Zn))}catch(yn){tn(yn)}},rn=Zn=>{try{Dn(cn.throw(Zn))}catch(yn){tn(yn)}},Dn=Zn=>Zn.done?Ee(Zn.value):Promise.resolve(Zn.value).then(fn,rn);Dn((cn=cn.apply(Le,xn)).next())});const vt={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"]}},wt=(Le,xn)=>xn.map(cn=>({label:cn,kind:Le.languages.CompletionItemKind.Keyword,insertText:cn})),Nt=Le=>Object.keys(vt.tables).map(xn=>({label:xn,kind:Le.languages.CompletionItemKind.Variable,insertText:xn})),bt=(Le,xn)=>{const cn=vt.tables[Le];return cn?cn.map(Ee=>({label:Ee,kind:xn.languages.CompletionItemKind.Field,insertText:Ee})):[]};function Ht(Le,xn,cn,Ee,tn){let fn=xn.getWordUntilPosition(cn),rn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:fn.startColumn,endColumn:fn.endColumn},Dn=Ee.map(Zn=>({label:Zn,kind:Le.languages.CompletionItemKind.Keyword,insertText:Zn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}));return tn.map(Zn=>{Dn.push(lt(ft({},Zn),{range:rn}))}),Dn}var _t=Le=>{vt.languages.map(tn=>(Le.languages.registerDocumentFormattingEditProvider(tn,{provideDocumentFormattingEdits(fn,rn,Dn){return pt(this,null,function*(){const Zn=Pe()(fn.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:fn.getFullModelRange(),text:Zn}]})}}),tn));const xn=Jt.quickKey.map(tn=>({label:tn.label,kind:Le.languages.CompletionItemKind.Method,insertText:tn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet})),cn=ue.quickKey.map(tn=>({label:tn.label,kind:Le.languages.CompletionItemKind.Method,insertText:tn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ee=je.quickKey.map(tn=>({label:tn.label,kind:Le.languages.CompletionItemKind.Method,insertText:tn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Le.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(tn,fn){var rn=tn.getWordUntilPosition(fn),Dn={startLineNumber:fn.lineNumber,endLineNumber:fn.lineNumber,startColumn:rn.startColumn,endColumn:rn.endColumn},Zn=tn.getLineContent(fn.lineNumber).substring(rn.startColumn-2,rn.endColumn);return{suggestions:[...Jt.keywords.map(yn=>({label:yn,kind:Le.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn})),...Jt.quickKey.map(yn=>({label:yn.label,kind:Le.languages.CompletionItemKind.Function,documentation:yn.content,insertText:Zn.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn}))]}}}),Le.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(tn,fn){var rn=tn.getWordUntilPosition(fn),Dn={startLineNumber:fn.lineNumber,endLineNumber:fn.lineNumber,startColumn:rn.startColumn,endColumn:rn.endColumn};return{suggestions:[...se.keywords.map(Zn=>({label:Zn,kind:Le.languages.CompletionItemKind.Function,documentation:Zn,insertText:Zn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn}))]}}}),Le.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(tn,fn){var rn=tn.getWordUntilPosition(fn),Dn={startLineNumber:fn.lineNumber,endLineNumber:fn.lineNumber,startColumn:rn.startColumn,endColumn:rn.endColumn},Zn=tn.getLineContent(fn.lineNumber).substring(rn.startColumn-2,rn.endColumn);return{suggestions:[...je.keywords.map(yn=>({label:yn,kind:Le.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn})),...je.quickKey.map(yn=>({label:yn.label,kind:Le.languages.CompletionItemKind.Function,documentation:yn.content,insertText:Zn.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn}))]}}}),Le.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(tn,fn){var rn=tn.getWordUntilPosition(fn),Dn={startLineNumber:fn.lineNumber,endLineNumber:fn.lineNumber,startColumn:rn.startColumn,endColumn:rn.endColumn},Zn=tn.getLineContent(fn.lineNumber).substring(rn.startColumn-2,rn.endColumn);return{suggestions:[...ie.keywords.map(yn=>({label:yn,kind:Le.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn})),...ie.quickKey.map(yn=>({label:yn.label,kind:Le.languages.CompletionItemKind.Function,documentation:yn.content,insertText:Zn.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn}))]}}}),Le.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(tn,fn){var rn=tn.getWordUntilPosition(fn),Dn={startLineNumber:fn.lineNumber,endLineNumber:fn.lineNumber,startColumn:rn.startColumn,endColumn:rn.endColumn},Zn=tn.getLineContent(fn.lineNumber).substring(rn.startColumn-2,rn.endColumn);return{suggestions:[...ue.keywords.map(yn=>({label:yn,kind:Le.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn})),...ue.quickKey.map(yn=>({label:yn.label,kind:Le.languages.CompletionItemKind.Function,documentation:yn.content,insertText:Zn.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Le.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dn}))]}}})};const Qt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var qt=Object.defineProperty,Se=(Le,xn,cn)=>xn in Le?qt(Le,xn,{enumerable:!0,configurable:!0,writable:!0,value:cn}):Le[xn]=cn,he=(Le,xn,cn)=>Se(Le,typeof xn!="symbol"?xn+"":xn,cn);const Re=class px{constructor(xn,cn,Ee){this.placeholder=xn,this.editor=cn,this.monaco=Ee,cn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.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)}};he(Re,"ID","editor.widget.placeholderHint");var Ke=Re,Cn=Ot(96236),ln=Ot(8591),dn=Ot(6848),Hn=Ot(89392),ae=Ot(34604),Ut=Ot(56102),hn=Object.defineProperty,Qn=Object.defineProperties,ti=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Yn=(Le,xn,cn)=>xn in Le?hn(Le,xn,{enumerable:!0,configurable:!0,writable:!0,value:cn}):Le[xn]=cn,Pn=(Le,xn)=>{for(var cn in xn||(xn={}))en.call(xn,cn)&&Yn(Le,cn,xn[cn]);if(Oe)for(var cn of Oe(xn))mn.call(xn,cn)&&Yn(Le,cn,xn[cn]);return Le},Un=(Le,xn)=>Qn(Le,ti(xn)),le=(Le,xn)=>{var cn={};for(var Ee in Le)en.call(Le,Ee)&&xn.indexOf(Ee)<0&&(cn[Ee]=Le[Ee]);if(Le!=null&&Oe)for(var Ee of Oe(Le))xn.indexOf(Ee)<0&&mn.call(Le,Ee)&&(cn[Ee]=Le[Ee]);return cn},jn=(Le,xn,cn)=>new Promise((Ee,tn)=>{var fn=Zn=>{try{Dn(cn.next(Zn))}catch(yn){tn(yn)}},rn=Zn=>{try{Dn(cn.throw(Zn))}catch(yn){tn(yn)}},Dn=Zn=>Zn.done?Ee(Zn.value):Promise.resolve(Zn.value).then(fn,rn);Dn((cn=cn.apply(Le,xn)).next())});function pi(Le){return/^\d+$/.test(Le)?`${Le}px`:Le}function Dt(){}let Lt=!1;const xt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ft(Le=[]){let xn=Le;if(Array.isArray(Le)){for(let cn=0;cn{var xn=Le,{width:cn="100%",height:Ee="100%",value:tn,language:fn="javascript",style:rn={},options:Dn={},overrideServices:Zn={},theme:yn="vs-dark",onEditBlur:Ei,isCopy:hi=!1,onSave:We,autoHeight:gn=!1,forbidCopy:Nn=!1,onChange:_n=Dt,editorDidMount:Jn=Dt,onFocus:xi=Dt,onBreakPoint:Di=Dt,breakPointValue:bi=[],filename:Ii="educoder.txt",errorLine:no,errorContent:qi="",highlightLine:io,openBreakPoint:Ao=!1,placeholder:wo=""}=xn,Do=le(xn,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const fo=(0,Tt.useRef)(),Li=(0,Tt.useRef)({}),Ct=(0,Tt.useRef)(),Co=(0,Tt.useRef)(),$i=(0,Tt.useRef)([]),Qi=(0,Tt.useRef)(!1),Jo=(0,Tt.useRef)(),Qo=(0,Tt.useRef)(),cr=(0,Tt.useRef)(!1),[Lo,Io]=(0,Tt.useState)(!1);function be(){let ve;return fo.current&&(ve=new de.Z(Be=>{for(let ge of Be)(ge.target.offsetHeight>0||ge.target.offsetWidth>0)&&Li.current.instance.layout()}),ve.observe(fo.current)),ve}function Me(){ln.ZP.warning({content:decodeURIComponent(Qt),key:"monaco-editor-tip"})}const Wt=()=>{let ve=Li.current.instance;if(tn!=null&&ve&&Lo){const Be=ve.getModel();Be&&tn!==Be.getValue()&&(Lt=!0,Be.setValue(tn),ve.layout(),Lt=!1)}};(0,Tt.useEffect)(()=>{const ve=ae.Z.subscribe("formatDocument",Be=>{var ge;let Ne=Li.current.instance;(ge=Ne==null?void 0:Ne.getAction)==null||ge.call(Ne,"editor.action.formatDocument").run()});return window.updateMonacoValue=Be=>{_n(Be)},ve},[]),(0,Tt.useEffect)(()=>{var ve;let Be=Li.current.instance;Co.current&&clearTimeout(Co.current),Co.current=setTimeout(()=>{Wt()},500),tn&&(tn!=null&&tn.length)&&((ve=Be==null?void 0:Be.updateOptions)==null||ve.call(Be,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(tn.split(/\r\n|\r|\n/g).length))+3,5)}))},[tn,Lo,Li.current]),(0,Tt.useEffect)(()=>{if(no&&Li.current&&Li.current.instance){let Be=Li.current.instance;Be.changeViewZones(function(ge){var Ne=document.createElement("div");Ne.style.padding="10px 20px",Ne.style.width="calc(100% - 20px)",Ne.className="my-error-line-wrp",Ne.innerHTML=qi,ge.addZone({afterLineNumber:no||11,heightInLines:3,domNode:Ne})});var ve={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}};Be.addOverlayWidget(ve),Be.revealPositionInCenter({lineNumber:20,column:1})}},[no,Li.current,Lo]);const Ae=(ve="",Be)=>{if(!ve||ve.trim()==="")return!0;const Ne=Li.current.instance.getModel().getLineTokens(Be);let De=!1;for(let Te=0;Te<2;Te++)Ne.getStandardTokenType(Te)===1&&(De=!0);return De};(0,Tt.useEffect)(()=>{var ve;const Be=(ve=Li.current)==null?void 0:ve.instance;if(Be&&Lo&&Nn){const ge=Be.onDidBlurEditorWidget(()=>{cr.current=!1}),Ne=Be.onDidFocusEditorText(()=>{cr.current=!0});return()=>{ge.dispose(),Ne.dispose()}}},[Li.current,Lo,Nn]),(0,Tt.useEffect)(()=>{var ve;if((ve=Li.current)!=null&&ve.instance&&Lo&&Ao){let Be=Li.current.instance,ge=Be.getModel();if(!ge)return;(()=>{var ii;let Ce=[],Sn=[];const An=ge.getAllDecorations();for(let Gn of An)Gn.options.className==="highlighted-line"&&(Ce.push((ii=Gn==null?void 0:Gn.range)==null?void 0:ii.startLineNumber),Sn.push(Gn==null?void 0:Gn.id));if(io===Ce[0])return;ge.deltaDecorations(Sn,[]);const $n=ge.getLineCount();io&&io<=$n&&(Be.deltaDecorations([],[{range:new Gt.Range(io,1,io,ge.getLineMaxColumn(io)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Be.revealLineInCenter(io))})();const De=(ii=!1)=>{var Ce;let Sn=[],An=[];const $n=ge.getAllDecorations();for(let Gn of $n)Gn.options.linesDecorationsClassName==="breakpoints-select"&&(Sn.push((Ce=Gn==null?void 0:Gn.range)==null?void 0:Ce.startLineNumber),An.push(Gn==null?void 0:Gn.id));if(ii)return{lines:Sn,ids:An};Di(Sn)},Te=ii=>jn(void 0,null,function*(){let Ce={range:new Gt.Range(ii,1,ii,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ge.deltaDecorations([],[Ce]),De()}),Ze=ii=>jn(void 0,null,function*(){let Ce=[];const Sn=Be.getLineDecorations(ii);for(let An of Sn)An.options.linesDecorationsClassName==="breakpoints-select"&&Ce.push(An.id);yield ge.deltaDecorations(Ce,[]),De()}),He=ii=>{let Ce=Be.getLineDecorations(ii);for(let Sn of Ce)if(Sn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Hn.isEqual)(bi,De(!0).lines)){ge.deltaDecorations(De(!0).ids,[]);const ii=bi.map(Ce=>({range:new Gt.Range(Ce,1,Ce,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ge.deltaDecorations([],ii)}const nn=Be.onDidChangeModelContent(ii=>{let Ce=Be.getPosition();if(Ce){let Sn=Ce.lineNumber;clearTimeout(Qo.current),Qo.current=setTimeout(()=>{Ae(ge.getLineContent(Sn),Sn)?Ze(Sn):He(Sn)?(Ze(Sn),Te(Sn)):De()},100)}}),sn=Be.onMouseDown(ii=>{var Ce,Sn,An;if(ii.target.detail&&((An=(Sn=(Ce=ii.target)==null?void 0:Ce.element)==null?void 0:Sn.className)!=null&&An.includes("line-numbers"))){let $n=ii.target.position.lineNumber;if(Ae(ge.getLineContent($n),$n))return;He($n)?Ze($n):Te($n)}}),Xn=ii=>{let Ce={range:new Gt.Range(ii,1,ii,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};$i.current=Be.deltaDecorations($i.current,[Ce])},xe=()=>{$i.current=Be.deltaDecorations($i.current,[])},ni=Be.onMouseMove(ii=>{var Ce,Sn,An;if(xe(),ii.target.detail&&((An=(Sn=(Ce=ii.target)==null?void 0:Ce.element)==null?void 0:Sn.className)!=null&&An.includes("line-numbers"))){let $n=ii.target.position.lineNumber;if(Ae(ge.getLineContent($n),$n))return;Xn($n)}}),vi=Be.onMouseLeave(()=>{xe()});return()=>{nn.dispose(),sn.dispose(),ni.dispose(),vi.dispose()}}},[Li.current,Lo,bi,io,Ao,fn]),(0,Tt.useEffect)(()=>{var ve;(ve=Li.current)!=null&&ve.instance&&Ao&&Li.current.instance.setPosition({lineNumber:0,column:0})},[io]);function on(){let ve=Li.current.instance;if(ve){const Be=ve.getSelection(),ge=Li.current.pastePos||{},Ne=new Gt.Range(ge.startLineNumber||Be.endLineNumber,ge.startColumn||Be.endColumn,ge.endLineNumber||Be.endLineNumber,ge.endColumn||Be.endColumn);setTimeout(()=>{ve.executeEdits("",[{range:Ne,text:""}])},300)}}function re(ve){(window.navigator.platform.match("Mac")?ve.metaKey:ve.ctrlKey)&&ve.keyCode==83&&(ve.preventDefault(),We())}const Yt=()=>{if(gn&&Li.current.instance){const ve=Li.current.instance.getContentHeight();Mn(ve{if(!cr.current)return;const{keyCode:Be,ctrlKey:ge,metaKey:Ne,target:De,type:Te}=ve;return(Te==="paste"||(Be===67||Be===86)&&(Ne||ge))&&De.nodeName==="TEXTAREA"&&(Me(),ve.preventDefault()),!1};function In(ve,Be){var ge=window.URL||window.webkitURL||window,Ne=new Blob([Be]),De=document.createElementNS("http://www.w3.org/1999/xhtml","a");De.href=ge.createObjectURL(Ne),De.download=ve,Fe(De)}(0,Tt.useEffect)(()=>{Yt()},[Yt]),(0,Tt.useEffect)(()=>{fo.current&&!Lo&&Promise.all([Ot.e(8909),Ot.e(3267)]).then(Ot.bind(Ot,71448)).then(ve=>{try{Gt=ve,Li.current.instance=Gt.editor.create(fo.current,{value:tn,language:Ft(fn),theme:yn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Zn);const Be=Li.current.instance;let De=[...Cn.BH._menuItems].find(nn=>nn[0]._debugName=="EditorContext")[1],Te=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ze=(nn,sn)=>{var Xn,xe;let ni=nn._first;do sn.includes((xe=(Xn=ni.element)==null?void 0:Xn.command)==null?void 0:xe.id)&&nn._remove(ni);while(ni=ni.next)};if(Jn(Be,Gt),setTimeout(()=>{Yt(),Li.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{In(Ii||"educoder.txt",Be.getValue())}})},500),Li.current.subscription=Be.onDidChangeModelContent(nn=>{Qi.current?clearTimeout(Jo.current):(Yt(),_n(Be.getValue(),nn)),Jo.current=setTimeout(()=>{Qi.current=!1},500)}),window.Monaco||_t(Gt,Ft(fn)),Nn&&(Ze(De,Te),fo.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Je),window.removeEventListener("paste",Je),window.addEventListener("keydown",Je),window.addEventListener("paste",Je)),window.Monaco=Gt,Ei&&Be.onDidBlurEditorWidget(()=>{Ei(Be.getValue())}),xi&&Be.onDidFocusEditorText(()=>{xi(Be.getValue())}),Nn)try{Be.onDidPaste(nn=>{const sn=Be.getSelection(),Xn=Li.current.pastePos||{},xe=new Gt.Range(Xn.startLineNumber||sn.endLineNumber,Xn.startColumn||sn.endColumn,Xn.endLineNumber||sn.endLineNumber,Xn.endColumn||sn.endColumn);Be.executeEdits("",[{range:nn.range,text:""}])})}catch(nn){}let He=be();return wo&&typeof wo=="string"&&new Ke(wo,Be,Gt),Io(!0),()=>{const nn=Li.current.instance;nn.dispose();const sn=nn.getModel();sn&&sn.dispose(),Li.current.subscription&&Li.current.subscription.dispose(),He.unobserve(fo.current)}}catch(Be){}})},[]),(0,Tt.useEffect)(()=>{if(Li.current.instance&&Lo)return document.addEventListener("keydown",re,!1),()=>{document.removeEventListener("keydown",re)}},[We,Lo]),(0,Tt.useEffect)(()=>{let ve=Li.current.instance;if(ve&&Lo){let Be=Ft(fn);Gt.editor.setModelLanguage(ve.getModel(),Be)}},[fn,Lo]),(0,Tt.useEffect)(()=>{Li.current.instance&&Lo&&Gt.editor.setTheme(yn)},[yn,Lo]),(0,Tt.useEffect)(()=>{let ve=Li.current.instance;Ct.current=Dn,ve&&Lo&&(ve.updateOptions(Pn({},Dn)),setTimeout(()=>{ve.getModel().updateOptions(Pn({},Dn))},200))},[JSON.stringify(Dn),Lo]),(0,Tt.useEffect)(()=>{let ve=Li.current.instance;ve&&Lo&&ve.layout()},[cn,Ee,Lo]);const[bn,$t]=(0,Tt.useState)(pi(cn)),[_e,Mn]=(0,Tt.useState)(pi(Ee)),ei=Un(Pn({},rn),{width:bn,height:_e,position:"relative"});return Tt.createElement("div",{className:"my-monaco-editor",ref:fo,style:ei},hi&&Tt.createElement(Ut.CopyToClipboard,{text:tn,onCopy:()=>ln.ZP.success("\u590D\u5236\u6210\u529F")},Tt.createElement(dn.Z,{title:"\u590D\u5236\u4EE3\u7801"},Tt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Tt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ye({width:Le="100%",height:xn="100%",original:cn,modified:Ee,language:tn,options:fn={}}){const rn=(0,Tt.useRef)(),[Dn,Zn]=(0,Tt.useState)(null);function yn(gn){let Nn;return rn.current&&(Nn=new de.Z(_n=>{for(let Jn of _n)(Jn.target.offsetHeight>0||Jn.target.offsetWidth>0)&&gn.layout()}),Nn.observe(rn.current)),Nn}(0,Tt.useEffect)(()=>(rn.current&&Promise.all([Ot.e(8909),Ot.e(9404)]).then(Ot.bind(Ot,2550)).then(gn=>{Gt=gn;const Nn=Gt.editor.createDiffEditor(rn.current,Un(Pn({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},fn),{wordWrap:!0}));Zn(Nn);let _n=yn(Nn);return()=>{Nn.dispose();const Jn=Nn.getModel();Jn&&Jn.dispose(),_n.unobserve(rn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Tt.useEffect)(()=>{Dn&&Dn.setModel({original:Gt.editor.createModel(cn,tn),modified:Gt.editor.createModel(Ee,tn)})},[cn,Ee,tn,Dn]);const Ei=pi(Le),hi=pi(xn),We={width:Ei,height:hi};return Tt.createElement("div",{className:"my-diff-editor",ref:rn,style:We})}},58856:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return de}});var Tt=Ot(59301);function de(se,je){const Jt=(0,Tt.useRef)();(0,Tt.useEffect)(()=>{Jt.current=se}),(0,Tt.useEffect)(()=>{function ue(){Jt.current()}if(je!==null){let ie=setInterval(ue,je);return()=>clearInterval(ie)}},[je])}},62459:function(Ln,En,Ot){"use strict";Ot.r(En),Ot.d(En,{default:function(){return _t}});var Tt=Ot(59301),de=Ot(12290),se=Ot(8591),je=Ot(92832),Jt=Ot(3113),ue=Ot(99064),ie=(Qt,qt,Se)=>new Promise((he,Re)=>{var pe=ln=>{try{Cn(Se.next(ln))}catch(dn){Re(dn)}},Ke=ln=>{try{Cn(Se.throw(ln))}catch(dn){Re(dn)}},Cn=ln=>ln.done?he(ln.value):Promise.resolve(ln.value).then(pe,Ke);Cn((Se=Se.apply(Qt,qt)).next())});function Ve({setIscreate:Qt,init:qt,UpdateItem:Se}){const[he,Re]=(0,Tt.useState)(""),[pe,Ke]=(0,Tt.useState)("");(0,Tt.useEffect)(()=>{Se&&(Re(Se&&Se.name),Ke(Se&&Se.description))},[Se]);function Cn(){return ie(this,null,function*(){if(!he){se.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!pe){se.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(Se){ln();return}(yield(0,ue.ZP)("/api/hpc_courses.json",{method:"post",body:{name:he,description:pe,container_type:window.location.pathname.split("/")[1]}}))&&(se.ZP.info("\u521B\u5EFA\u6210\u529F"),Qt(!1),qt("add"))})}function ln(){return ie(this,null,function*(){(yield(0,ue.ZP)(`/api/hpc_courses/${Se.id}.json`,{method:"put",body:{name:he,description:pe,container_type:window.location.pathname.split("/")[1]}}))&&(se.ZP.info("\u7F16\u8F91\u6210\u529F"),Qt(!1),qt(""))})}return Tt.createElement("div",null,Tt.createElement(je.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:he,maxLength:60,addonAfter:String(he.length)+"/60",onChange:dn=>Re(dn.target.value)}),Tt.createElement(de.Z,{id:"courseContentMD",defaultValue:pe,onChange:dn=>Ke(dn)}),Tt.createElement("div",{className:"clearfix mt30 mb30"},Tt.createElement(Jt.ZP,{type:"primary",onClick:()=>Cn(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),Tt.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Qt(!1)},"\u53D6\u6D88")))}var Pe=Ve,ne=Ot(85149),Xe=(Qt,qt,Se)=>new Promise((he,Re)=>{var pe=ln=>{try{Cn(Se.next(ln))}catch(dn){Re(dn)}},Ke=ln=>{try{Cn(Se.throw(ln))}catch(dn){Re(dn)}},Cn=ln=>ln.done?he(ln.value):Promise.resolve(ln.value).then(pe,Ke);Cn((Se=Se.apply(Qt,qt)).next())});function me({CourseItem:Qt,userId:qt,init:Se,ItemUpdate:he,setSee:Re,UserInfo:pe}){function Ke(){return Xe(this,null,function*(){(yield(0,ue.ZP)(`/api/hpc_courses/${Qt.id}.json`,{method:"delete"}))&&(se.ZP.info("\u5220\u9664\u6210\u529F"),Se("delete"),Re(!1))})}function Cn(){he(Qt)}return Tt.createElement("div",null,qt===299635||qt===301458||pe!=null&&pe.admin||pe!=null&&pe.business?Tt.createElement("div",{style:{textAlign:"right"}},Tt.createElement(Jt.ZP,{onClick:()=>Cn()},"\u7F16\u8F91"),Tt.createElement(Jt.ZP,{onClick:()=>Ke(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,Tt.createElement("h1",null,Qt==null?void 0:Qt.name),Tt.createElement(ne.Z,{value:Qt==null?void 0:Qt.description}))}var an=me,At=Ot(54580),et=Ot(3294),nt=Ot(89070),ft=Object.defineProperty,lt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,wt=(Qt,qt,Se)=>qt in Qt?ft(Qt,qt,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Qt[qt]=Se,Nt=(Qt,qt)=>{for(var Se in qt||(qt={}))pt.call(qt,Se)&&wt(Qt,Se,qt[Se]);if(lt)for(var Se of lt(qt))vt.call(qt,Se)&&wt(Qt,Se,qt[Se]);return Qt},bt=(Qt,qt,Se)=>new Promise((he,Re)=>{var pe=ln=>{try{Cn(Se.next(ln))}catch(dn){Re(dn)}},Ke=ln=>{try{Cn(Se.throw(ln))}catch(dn){Re(dn)}},Cn=ln=>ln.done?he(ln.value):Promise.resolve(ln.value).then(pe,Ke);Cn((Se=Se.apply(Qt,qt)).next())});function Ht({user:Qt,dispatch:qt}){var Se,he,Re,pe,Ke,Cn,ln,dn,Hn;const[ae,Ut]=(0,Tt.useState)(1),[hn,Qn]=(0,Tt.useState)(100),[ti,Oe]=(0,Tt.useState)([]),[en,mn]=(0,Tt.useState)(!1),[Yn,Pn]=(0,Tt.useState)(!1),[Un,le]=(0,Tt.useState)(""),[jn,pi]=(0,Tt.useState)(""),[Dt,Lt]=(0,Tt.useState)("");let{itemname:xt}=(0,nt.useParams)();const[Ft,Gt]=(0,Tt.useState)("");(0,Tt.useEffect)(()=>{qt({type:"globalSetting/headerToggle",payload:!1}),ae&&kt("")},[ae]);function kt(Ee){return bt(this,null,function*(){var tn,fn;const rn=yield(0,ue.ZP)("/api/hpc_courses.json",{method:"get",params:{page:ae,per_page:hn,container_type:window.location.pathname.split("/")[1]}});if(rn){let Dn=rn.data.hpc_courses.length;if(Oe(rn.data.hpc_courses),Lt(rn.data.file_url),pi(""),!Dn)return;if(Ft)if(Ee==="delete"){if(Dn===0){Pn(!1);return}le(rn.data.hpc_courses[0]),Pn(!0),Gt(rn.data.hpc_courses[0].id)}else Ee==="add"?(le(rn.data.hpc_courses[Dn-1]),Pn(!0),Gt(rn.data.hpc_courses[Dn-1].id)):(le(rn.data.hpc_courses.filter(Zn=>Zn.id===Ft)[0]),Pn(!0),Gt(Ft));else if(xt){let Zn=0;(fn=(tn=rn==null?void 0:rn.data)==null?void 0:tn.hpc_courses)==null||fn.map((yn,Ei)=>{var hi;(xt==null?void 0:xt.toLocaleLowerCase())===((hi=yn==null?void 0:yn.name)==null?void 0:hi.toLocaleLowerCase())&&(Zn=Ei)}),le(rn.data.hpc_courses[Zn]),Pn(!0),Gt(rn.data.hpc_courses[Zn].id),(xt==null?void 0:xt.toLocaleLowerCase())==="resources"&&(le(rn.data.hpc_courses.filter(yn=>yn.id===15)[0]),Pn(!0),Gt(15))}else le(rn.data.hpc_courses[0]),Pn(!0),Gt(rn.data.hpc_courses[0].id)}})}function ye(Ee){mn(!1),Pn(!0),le(Ee),Gt(Ee.id)}function Le(Ee){pi(Ee),mn(!0),Pn(!1)}function xn(){pi(""),mn(!0),Pn(!1)}const cn={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(Ee){const{status:tn}=Ee.file;tn==="done"?(se.ZP.success(`${Ee.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),kt("")):tn==="error"&&se.ZP.error(`${Ee.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:Ee=>{const tn=Ee.size/1024/1024<150;return tn||se.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),tn}};return Tt.createElement("div",{style:{marginBottom:"40px"}},Tt.createElement("div",{className:"bannterdiv",style:{background:`url(${et.Z.IMG_SERVER+`/${Dt}`})`}}),Tt.createElement("img",{style:{width:"100%"},src:et.Z.IMG_SERVER+`/${Dt}`}),Tt.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},Tt.createElement("div",{style:{flex:"1",marginTop:"17px"}},ti&&ti.map((Ee,tn)=>Tt.createElement("p",{key:tn,onClick:()=>ye(Ee),className:Ft===Ee.id?"menuitemselect":"menuitem task-hide"},Ee.name)),((Se=Qt==null?void 0:Qt.userInfo)==null?void 0:Se.user_id)===299635||((he=Qt==null?void 0:Qt.userInfo)==null?void 0:he.user_id)===301458||(Re=Qt==null?void 0:Qt.userInfo)!=null&&Re.admin||(pe=Qt==null?void 0:Qt.userInfo)!=null&&pe.business?Tt.createElement("p",{onClick:()=>xn(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},Tt.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),Tt.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},en?Tt.createElement(Pe,{UpdateItem:jn,setIscreate:mn,init:kt}):null,Yn?Tt.createElement(an,{UserInfo:Qt==null?void 0:Qt.userInfo,setSee:Pn,userId:(Ke=Qt==null?void 0:Qt.userInfo)==null?void 0:Ke.user_id,ItemUpdate:Le,CourseItem:Un,init:kt}):null)),((Cn=Qt==null?void 0:Qt.userInfo)==null?void 0:Cn.user_id)===299635||((ln=Qt==null?void 0:Qt.userInfo)==null?void 0:ln.user_id)===301458||(dn=Qt==null?void 0:Qt.userInfo)!=null&&dn.admin||(Hn=Qt==null?void 0:Qt.userInfo)!=null&&Hn.business?Tt.createElement(At.default,Nt({},cn),Tt.createElement(Jt.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var _t=(0,nt.connect)(({user:Qt})=>({user:Qt}))(Ht)},24768:function(Ln,En,Ot){"use strict";Ot.d(En,{AL:function(){return wt},Iy:function(){return Xe},Qv:function(){return At},ez:function(){return vt},jb:function(){return me}});var Tt=Ot(32834),de=Ot.n(Tt),se=Ot(11690),je=Ot.n(se);let Jt=1;function ue(Qt,qt){const Se=Qt.match(/^(\s+)(?:```)/);if(Se===null)return qt;const he=Se[1];return qt.split(` `).map(Re=>{const pe=Re.match(/^\s+/);if(pe===null)return Re;const[Ke]=pe;return Ke.length>=he.length?Re.slice(he.length):Re}).join(` `)}let ie=[],Ve=["
    "];const Pe=new(de()).Renderer,ne=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Xe(){ie.length=0,Ve=["
      "]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function an(Qt,qt,Se,he){if(qt>=Qt.length||Qt[qt].level<=Se)return qt;var Re=Qt[qt];he.push("
    • "+Re.text+""),qt++;var pe=[];return qt=an(Qt,qt,Re.level,pe),pe.length>0&&(he.push("
        "),pe.forEach(function(Ke){he.push(Ke)}),he.push("
      ")),he.push("
    • "),qt=an(Qt,qt,Se,he),qt}function At(){return an(ie,0,0,Ve),Ve.push("
    "),Ve.join("")}const et={heading(Qt){const qt=ne.exec(Qt);if(Jt+=1,qt)return{type:"heading",raw:qt[0],depth:qt[1].length,text:qt[2]}},fences(Qt){const qt=this.rules.block.fences.exec(Qt);if(qt){const Se=qt[0];let he=ue(Se,qt[3]||"");const Re=qt[2]?qt[2].trim():qt[2];if(["latex","katex","math"].indexOf(Re)>=0){const pe=lt(),Ke=he;he=pe,pt[pe]={type:"block",expression:Ke}}return{type:"code",raw:Se,lang:Re,text:he}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ft=0;const lt=()=>`__special_katext_id_${ft++}__`;let pt={};function vt(){return pt}function wt(){ft=0,pt={}}function Nt(Qt){return Qt=Qt.replace(nt,(qt,Se)=>{const he=lt();return pt[he]={type:"inline",expression:Se},he}),Qt}const bt=Pe.listitem;Pe.listitem=function(Qt){return bt(Nt(Qt))};const Ht=Pe.paragraph;Pe.paragraph=function(Qt){return Ht(Nt(Qt))};const _t=Pe.tablecell;Pe.tablecell=function(Qt,qt){return _t(Nt(Qt),qt)},Pe.code=function(Qt,qt,Se){const he=(qt||"").match(/\S*/)[0];return he?["latex","katex","math"].indexOf(he)>=0?`

    ${Qt}

    `:`
    ${Se?Qt:(0,se.escape)(Qt,!0)}
    `:'
    '+(Se?Qt:(0,se.escape)(Qt,!0))+"
    "},Pe.heading=function(Qt,qt,Se){let he=this.options.headerPrefix+Se.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:he,level:qt,text:Qt}),"'+Qt+""},de().setOptions({silent:!0,gfm:!0,pedantic:!1}),de().use({tokenizer:et,renderer:Pe}),En.ZP=de()},56762:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return de}});var Tt=Ot(59301);function de(){const[,se]=Tt.useReducer(je=>je+1,0);return se}},93891:function(Ln,En,Ot){"use strict";var Tt=Ot(59301),de=Ot(36355),se=Ot(64165);const je=Jt=>{const{componentName:ue}=Jt,{getPrefixCls:ie}=(0,Tt.useContext)(de.E_),Ve=ie("empty");switch(ue){case"Table":case"List":return Tt.createElement(se.Z,{image:se.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Tt.createElement(se.Z,{image:se.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ve}-small`});default:return Tt.createElement(se.Z,null)}};En.Z=je},64165:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return vt}});var Tt=Ot(92310),de=Ot.n(Tt),se=Ot(59301),je=Ot(36355),Jt=Ot(9763),ue=Ot(64993),ie=Ot(88088),Pe=()=>{const[,wt]=(0,ie.Z)(),bt=new ue.C(wt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return se.createElement("svg",{style:bt,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},se.createElement("g",{fill:"none",fillRule:"evenodd"},se.createElement("g",{transform:"translate(24 31.67)"},se.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),se.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),se.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),se.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),se.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),se.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),se.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},se.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),se.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Xe=()=>{const[,wt]=(0,ie.Z)(),{colorFill:Nt,colorFillTertiary:bt,colorFillQuaternary:Ht,colorBgContainer:_t}=wt,{borderColor:Qt,shadowColor:qt,contentColor:Se}=(0,se.useMemo)(()=>({borderColor:new ue.C(Nt).onBackground(_t).toHexShortString(),shadowColor:new ue.C(bt).onBackground(_t).toHexShortString(),contentColor:new ue.C(Ht).onBackground(_t).toHexShortString()}),[Nt,bt,Ht,_t]);return se.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},se.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},se.createElement("ellipse",{fill:qt,cx:"32",cy:"33",rx:"32",ry:"7"}),se.createElement("g",{fillRule:"nonzero",stroke:Qt},se.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),se.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Se}))))},me=Ot(83116),an=Ot(37613);const At=wt=>{const{componentCls:Nt,margin:bt,marginXS:Ht,marginXL:_t,fontSize:Qt,lineHeight:qt}=wt;return{[Nt]:{marginInline:Ht,fontSize:Qt,lineHeight:qt,textAlign:"center",[`${Nt}-image`]:{height:wt.emptyImgHeight,marginBottom:Ht,opacity:wt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Nt}-description`]:{color:wt.colorText},[`${Nt}-footer`]:{marginTop:bt},"&-normal":{marginBlock:_t,color:wt.colorTextDisabled,[`${Nt}-description`]:{color:wt.colorTextDisabled},[`${Nt}-image`]:{height:wt.emptyImgHeightMD}},"&-small":{marginBlock:Ht,color:wt.colorTextDisabled,[`${Nt}-image`]:{height:wt.emptyImgHeightSM}}}}};var et=(0,me.Z)("Empty",wt=>{const{componentCls:Nt,controlHeightLG:bt}=wt,Ht=(0,an.TS)(wt,{emptyImgCls:`${Nt}-img`,emptyImgHeight:bt*2.5,emptyImgHeightMD:bt,emptyImgHeightSM:bt*.875});return[At(Ht)]}),nt=function(wt,Nt){var bt={};for(var Ht in wt)Object.prototype.hasOwnProperty.call(wt,Ht)&&Nt.indexOf(Ht)<0&&(bt[Ht]=wt[Ht]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ht=Object.getOwnPropertySymbols(wt);_t{var{className:Nt,rootClassName:bt,prefixCls:Ht,image:_t=ft,description:Qt,children:qt,imageStyle:Se,style:he}=wt,Re=nt(wt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:pe,direction:Ke,empty:Cn}=se.useContext(je.E_),ln=pe("empty",Ht),[dn,Hn]=et(ln),[ae]=(0,Jt.Z)("Empty"),Ut=typeof Qt!="undefined"?Qt:ae==null?void 0:ae.description,hn=typeof Ut=="string"?Ut:"empty";let Qn=null;return typeof _t=="string"?Qn=se.createElement("img",{alt:hn,src:_t}):Qn=_t,dn(se.createElement("div",Object.assign({className:de()(Hn,ln,Cn==null?void 0:Cn.className,{[`${ln}-normal`]:_t===lt,[`${ln}-rtl`]:Ke==="rtl"},Nt,bt),style:Object.assign(Object.assign({},Cn==null?void 0:Cn.style),he)},Re),se.createElement("div",{className:`${ln}-image`,style:Se},Qn),Ut&&se.createElement("div",{className:`${ln}-description`},Ut),qt&&se.createElement("div",{className:`${ln}-footer`},qt)))};pt.PRESENTED_IMAGE_DEFAULT=ft,pt.PRESENTED_IMAGE_SIMPLE=lt;var vt=pt},78241:function(Ln,En,Ot){"use strict";Ot.d(En,{default:function(){return Me}});var Tt=Ot(19127),de=Ot(92310),se=Ot.n(de),je=Ot(77900),Jt=Ot(59301),ue=Ot(62892),ie=Ot(32441);function Ve(Wt){const[Ae,on]=Jt.useState(Wt);return Jt.useEffect(()=>{const re=setTimeout(()=>{on(Wt)},Wt.length?0:10);return()=>{clearTimeout(re)}},[Wt]),Ae}var Pe=Ot(17313),ne=Ot(29878),Xe=Ot(8378),me=Ot(37613),an=Ot(83116),et=Wt=>{const{componentCls:Ae}=Wt,on=`${Ae}-show-help`,re=`${Ae}-show-help-item`;return{[on]:{transition:`opacity ${Wt.motionDurationSlow} ${Wt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[re]:{overflow:"hidden",transition:`height ${Wt.motionDurationSlow} ${Wt.motionEaseInOut}, opacity ${Wt.motionDurationSlow} ${Wt.motionEaseInOut}, transform ${Wt.motionDurationSlow} ${Wt.motionEaseInOut} !important`,[`&${re}-appear, &${re}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${re}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=Wt=>({legend:{display:"block",width:"100%",marginBottom:Wt.marginLG,padding:0,color:Wt.colorTextDescription,fontSize:Wt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Wt.lineWidth}px ${Wt.lineType} ${Wt.colorBorder}`},label:{fontSize:Wt.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Wt.controlOutlineWidth}px ${Wt.controlOutline}`},output:{display:"block",paddingTop:15,color:Wt.colorText,fontSize:Wt.fontSize,lineHeight:Wt.lineHeight}}),ft=(Wt,Ae)=>{const{formItemCls:on}=Wt;return{[on]:{[`${on}-label > label`]:{height:Ae},[`${on}-control-input`]:{minHeight:Ae}}}},lt=Wt=>{const{componentCls:Ae}=Wt;return{[Wt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Pe.Wf)(Wt)),nt(Wt)),{[`${Ae}-text`]:{display:"inline-block",paddingInlineEnd:Wt.paddingSM},"&-small":Object.assign({},ft(Wt,Wt.controlHeightSM)),"&-large":Object.assign({},ft(Wt,Wt.controlHeightLG))})}},pt=Wt=>{const{formItemCls:Ae,iconCls:on,componentCls:re,rootPrefixCls:Yt,labelRequiredMarkColor:Fe,labelColor:Je,labelFontSize:In,labelHeight:bn,labelColonMarginInlineStart:$t,labelColonMarginInlineEnd:_e,itemMarginBottom:Mn}=Wt;return{[Ae]:Object.assign(Object.assign({},(0,Pe.Wf)(Wt)),{marginBottom:Mn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, &-hidden.${Yt}-row`]:{display:"none"},"&-has-warning":{[`${Ae}-split`]:{color:Wt.colorError}},"&-has-error":{[`${Ae}-split`]:{color:Wt.colorWarning}},[`${Ae}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Wt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:bn,color:Je,fontSize:In,[`> ${on}`]:{fontSize:Wt.fontSize,verticalAlign:"top"},[`&${Ae}-required:not(${Ae}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Wt.marginXXS,color:Fe,fontSize:Wt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${re}-hide-required-mark &`]:{display:"none"}},[`${Ae}-optional`]:{display:"inline-block",marginInlineStart:Wt.marginXXS,color:Wt.colorTextDescription,[`${re}-hide-required-mark &`]:{display:"none"}},[`${Ae}-tooltip`]:{color:Wt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Wt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:$t,marginInlineEnd:_e},[`&${Ae}-no-colon::after`]:{content:'"\\a0"'}}},[`${Ae}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Yt}-col-'"]):not([class*="' ${Yt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Wt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Ae]:{"&-explain, &-extra":{clear:"both",color:Wt.colorTextDescription,fontSize:Wt.fontSize,lineHeight:Wt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Wt.controlHeightSM,transition:`color ${Wt.motionDurationMid} ${Wt.motionEaseOut}`},"&-explain":{"&-error":{color:Wt.colorError},"&-warning":{color:Wt.colorWarning}}},[`&-with-help ${Ae}-explain`]:{height:"auto",opacity:1},[`${Ae}-feedback-icon`]:{fontSize:Wt.fontSize,textAlign:"center",visibility:"visible",animationName:ne.kr,animationDuration:Wt.motionDurationMid,animationTimingFunction:Wt.motionEaseOutBack,pointerEvents:"none","&-success":{color:Wt.colorSuccess},"&-error":{color:Wt.colorError},"&-warning":{color:Wt.colorWarning},"&-validating":{color:Wt.colorPrimary}}})}},vt=Wt=>{const{componentCls:Ae,formItemCls:on}=Wt;return{[`${Ae}-horizontal`]:{[`${on}-label`]:{flexGrow:0},[`${on}-control`]:{flex:"1 1 0",minWidth:0},[`${on}-label[class$='-24'], ${on}-label[class*='-24 ']`]:{[`& + ${on}-control`]:{minWidth:"unset"}}}}},wt=Wt=>{const{componentCls:Ae,formItemCls:on}=Wt;return{[`${Ae}-inline`]:{display:"flex",flexWrap:"wrap",[on]:{flex:"none",marginInlineEnd:Wt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${on}-label, > ${on}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${on}-label`]:{flex:"none"},[`${Ae}-text`]:{display:"inline-block"},[`${on}-has-feedback`]:{display:"inline-block"}}}}},Nt=Wt=>({padding:Wt.verticalLabelPadding,margin:Wt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),bt=Wt=>{const{componentCls:Ae,formItemCls:on,rootPrefixCls:re}=Wt;return{[`${on} ${on}-label`]:Nt(Wt),[Ae]:{[on]:{flexWrap:"wrap",[`${on}-label, ${on}-control`]:{[`&:not([class*=" ${re}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ht=Wt=>{const{componentCls:Ae,formItemCls:on,rootPrefixCls:re}=Wt;return{[`${Ae}-vertical`]:{[on]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Ae}-item-control`]:{width:"100%"}}},[`${Ae}-vertical ${on}-label, .${re}-col-24${on}-label, .${re}-col-xl-24${on}-label`]:Nt(Wt),[`@media (max-width: ${Wt.screenXSMax}px)`]:[bt(Wt),{[Ae]:{[`.${re}-col-xs-24${on}-label`]:Nt(Wt)}}],[`@media (max-width: ${Wt.screenSMMax}px)`]:{[Ae]:{[`.${re}-col-sm-24${on}-label`]:Nt(Wt)}},[`@media (max-width: ${Wt.screenMDMax}px)`]:{[Ae]:{[`.${re}-col-md-24${on}-label`]:Nt(Wt)}},[`@media (max-width: ${Wt.screenLGMax}px)`]:{[Ae]:{[`.${re}-col-lg-24${on}-label`]:Nt(Wt)}}}},_t=(Wt,Ae)=>(0,me.TS)(Wt,{formItemCls:`${Wt.componentCls}-item`,rootPrefixCls:Ae});var Qt=(0,an.Z)("Form",(Wt,Ae)=>{let{rootPrefixCls:on}=Ae;const re=_t(Wt,on);return[lt(re),pt(re),et(re),vt(re),wt(re),Ht(re),(0,Xe.Z)(re),ne.kr]},Wt=>({labelRequiredMarkColor:Wt.colorError,labelColor:Wt.colorTextHeading,labelFontSize:Wt.fontSize,labelHeight:Wt.controlHeight,labelColonMarginInlineStart:Wt.marginXXS/2,labelColonMarginInlineEnd:Wt.marginXS,itemMarginBottom:Wt.marginLG,verticalLabelPadding:`0 0 ${Wt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const qt=[];function Se(Wt,Ae,on){let re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Wt=="string"?Wt:`${Ae}-${re}`,error:Wt,errorStatus:on}}var Re=Wt=>{let{help:Ae,helpStatus:on,errors:re=qt,warnings:Yt=qt,className:Fe,fieldId:Je,onVisibleChanged:In}=Wt;const{prefixCls:bn}=Jt.useContext(ie.Rk),$t=`${bn}-item-explain`,[,_e]=Qt(bn),Mn=(0,Jt.useMemo)(()=>(0,ue.Z)(bn),[bn]),ei=Ve(re),ve=Ve(Yt),Be=Jt.useMemo(()=>Ae!=null?[Se(Ae,"help",on)]:[].concat((0,Tt.Z)(ei.map((Ne,De)=>Se(Ne,"error","error",De))),(0,Tt.Z)(ve.map((Ne,De)=>Se(Ne,"warning","warning",De)))),[Ae,on,ei,ve]),ge={};return Je&&(ge.id=`${Je}_help`),Jt.createElement(je.default,{motionDeadline:Mn.motionDeadline,motionName:`${bn}-show-help`,visible:!!Be.length,onVisibleChanged:In},Ne=>{const{className:De,style:Te}=Ne;return Jt.createElement("div",Object.assign({},ge,{className:se()($t,De,Fe,_e),style:Te,role:"alert"}),Jt.createElement(je.CSSMotionList,Object.assign({keys:Be},(0,ue.Z)(bn),{motionName:`${bn}-show-help-item`,component:!1}),Ze=>{const{key:He,error:nn,errorStatus:sn,className:Xn,style:xe}=Ze;return Jt.createElement("div",{key:He,className:se()(Xn,{[`${$t}-${sn}`]:sn}),style:xe},nn)}))})},pe=Ot(95013),Ke=Ot(36355),Cn=Ot(1684),ln=Ot(52946),dn=Ot(19716),Hn=Ot(16722);const ae=["parentNode"],Ut="form_item";function hn(Wt){return Wt===void 0||Wt===!1?[]:Array.isArray(Wt)?Wt:[Wt]}function Qn(Wt,Ae){if(!Wt.length)return;const on=Wt.join("_");return Ae?`${Ae}_${on}`:ae.includes(on)?`${Ut}_${on}`:on}function ti(Wt,Ae,on,re,Yt,Fe){let Je=re;return Fe!==void 0?Je=Fe:on.validating?Je="validating":Wt.length?Je="error":Ae.length?Je="warning":(on.touched||Yt&&on.validated)&&(Je="success"),Je}function Oe(Wt){return hn(Wt).join("_")}function en(Wt){const[Ae]=(0,pe.useForm)(),on=Jt.useRef({}),re=Jt.useMemo(()=>Wt!=null?Wt:Object.assign(Object.assign({},Ae),{__INTERNAL__:{itemRef:Yt=>Fe=>{const Je=Oe(Yt);Fe?on.current[Je]=Fe:delete on.current[Je]}},scrollToField:function(Yt){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Je=hn(Yt),In=Qn(Je,re.__INTERNAL__.name),bn=In?document.getElementById(In):null;bn&&(0,Hn.Z)(bn,Object.assign({scrollMode:"if-needed",block:"nearest"},Fe))},getFieldInstance:Yt=>{const Fe=Oe(Yt);return on.current[Fe]}}),[Wt,Ae]);return[re]}var mn=Ot(28726),Yn=function(Wt,Ae){var on={};for(var re in Wt)Object.prototype.hasOwnProperty.call(Wt,re)&&Ae.indexOf(re)<0&&(on[re]=Wt[re]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,re=Object.getOwnPropertySymbols(Wt);Yt{const on=Jt.useContext(Cn.Z),{getPrefixCls:re,direction:Yt,form:Fe}=Jt.useContext(Ke.E_),{prefixCls:Je,className:In,rootClassName:bn,size:$t,disabled:_e=on,form:Mn,colon:ei,labelAlign:ve,labelWrap:Be,labelCol:ge,wrapperCol:Ne,hideRequiredMark:De,layout:Te="horizontal",scrollToFirstError:Ze,requiredMark:He,onFinishFailed:nn,name:sn,style:Xn,feedbackIcons:xe}=Wt,ni=Yn(Wt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),vi=(0,dn.Z)($t),ii=Jt.useContext(mn.Z),Ce=(0,Jt.useMemo)(()=>He!==void 0?He:Fe&&Fe.requiredMark!==void 0?Fe.requiredMark:!De,[De,He,Fe]),Sn=ei!=null?ei:Fe==null?void 0:Fe.colon,An=re("form",Je),[$n,Gn]=Qt(An),di=se()(An,`${An}-${Te}`,{[`${An}-hide-required-mark`]:Ce===!1,[`${An}-rtl`]:Yt==="rtl",[`${An}-${vi}`]:vi},Gn,Fe==null?void 0:Fe.className,In,bn),[Pi]=en(Mn),{__INTERNAL__:si}=Pi;si.name=sn;const Vn=(0,Jt.useMemo)(()=>({name:sn,labelAlign:ve,labelCol:ge,labelWrap:Be,wrapperCol:Ne,vertical:Te==="vertical",colon:Sn,requiredMark:Ce,itemRef:si.itemRef,form:Pi,feedbackIcons:xe}),[sn,ve,ge,Ne,Te,Sn,Ce,Pi,xe]);Jt.useImperativeHandle(Ae,()=>Pi);const yi=(Yi,Ge)=>{if(Yi){let Ti={block:"nearest"};typeof Yi=="object"&&(Ti=Yi),Pi.scrollToField(Ge,Ti)}},Ie=Yi=>{if(nn==null||nn(Yi),Yi.errorFields.length){const Ge=Yi.errorFields[0].name;if(Ze!==void 0){yi(Ze,Ge);return}Fe&&Fe.scrollToFirstError!==void 0&&yi(Fe.scrollToFirstError,Ge)}};return $n(Jt.createElement(Cn.n,{disabled:_e},Jt.createElement(ln.q,{size:vi},Jt.createElement(ie.RV,Object.assign({},{validateMessages:ii}),Jt.createElement(ie.q3.Provider,{value:Vn},Jt.createElement(pe.default,Object.assign({id:sn},ni,{name:sn,onFinishFailed:Ie,form:Pi,style:Object.assign(Object.assign({},Fe==null?void 0:Fe.style),Xn),className:di})))))))};var le=Jt.forwardRef(Pn),jn=Ot(41799),pi=Ot(8654),Dt=Ot(92343),Lt=Ot(11592);function xt(Wt){if(typeof Wt=="function")return Wt;const Ae=(0,Lt.Z)(Wt);return Ae.length<=1?Ae[0]:Ae}const Ft=()=>{const{status:Wt,errors:Ae=[],warnings:on=[]}=(0,Jt.useContext)(ie.aM);return{status:Wt,errors:Ae,warnings:on}};Ft.Context=ie.aM;var Gt=Ft,kt=Ot(16089);function ye(Wt){const[Ae,on]=Jt.useState(Wt),re=(0,Jt.useRef)(null),Yt=(0,Jt.useRef)([]),Fe=(0,Jt.useRef)(!1);Jt.useEffect(()=>(Fe.current=!1,()=>{Fe.current=!0,kt.Z.cancel(re.current),re.current=null}),[]);function Je(In){Fe.current||(re.current===null&&(Yt.current=[],re.current=(0,kt.Z)(()=>{re.current=null,on(bn=>{let $t=bn;return Yt.current.forEach(_e=>{$t=_e($t)}),$t})})),Yt.current.push(In))}return[Ae,Je]}function Le(){const{itemRef:Wt}=Jt.useContext(ie.q3),Ae=Jt.useRef({});function on(re,Yt){const Fe=Yt&&typeof Yt=="object"&&Yt.ref,Je=re.join("_");return(Ae.current.name!==Je||Ae.current.originRef!==Fe)&&(Ae.current.name=Je,Ae.current.originRef=Fe,Ae.current.ref=(0,pi.sQ)(Wt(re),Fe)),Ae.current.ref}return on}var xn=Ot(29194),cn=Ot(34280),Ee=Ot(2738),tn=Ot(27382),fn=Ot(37028);const rn=Wt=>{const{formItemCls:Ae}=Wt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Ae}-control`]:{display:"flex"}}}};var Dn=(0,an.b)(["Form","item-item"],(Wt,Ae)=>{let{rootPrefixCls:on}=Ae;const re=_t(Wt,on);return[rn(re)]}),yn=Wt=>{const{prefixCls:Ae,status:on,wrapperCol:re,children:Yt,errors:Fe,warnings:Je,_internalItemRender:In,extra:bn,help:$t,fieldId:_e,marginBottom:Mn,onErrorVisibleChanged:ei}=Wt,ve=`${Ae}-item`,Be=Jt.useContext(ie.q3),ge=re||Be.wrapperCol||{},Ne=se()(`${ve}-control`,ge.className),De=Jt.useMemo(()=>Object.assign({},Be),[Be]);delete De.labelCol,delete De.wrapperCol;const Te=Jt.createElement("div",{className:`${ve}-control-input`},Jt.createElement("div",{className:`${ve}-control-input-content`},Yt)),Ze=Jt.useMemo(()=>({prefixCls:Ae,status:on}),[Ae,on]),He=Mn!==null||Fe.length||Je.length?Jt.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Jt.createElement(ie.Rk.Provider,{value:Ze},Jt.createElement(Re,{fieldId:_e,errors:Fe,warnings:Je,help:$t,helpStatus:on,className:`${ve}-explain-connected`,onVisibleChanged:ei})),!!Mn&&Jt.createElement("div",{style:{width:0,height:Mn}})):null,nn={};_e&&(nn.id=`${_e}_extra`);const sn=bn?Jt.createElement("div",Object.assign({},nn,{className:`${ve}-extra`}),bn):null,Xn=In&&In.mark==="pro_table_render"&&In.render?In.render(Wt,{input:Te,errorList:He,extra:sn}):Jt.createElement(Jt.Fragment,null,Te,He,sn);return Jt.createElement(ie.q3.Provider,{value:De},Jt.createElement(fn.Z,Object.assign({},ge,{className:Ne}),Xn),Jt.createElement(Dn,{prefixCls:Ae}))},Ei=Ot(61485),hi=Ot(31724),We=Ot(9763),gn=Ot(6848),Nn=function(Wt,Ae){var on={};for(var re in Wt)Object.prototype.hasOwnProperty.call(Wt,re)&&Ae.indexOf(re)<0&&(on[re]=Wt[re]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,re=Object.getOwnPropertySymbols(Wt);Yt{let{prefixCls:Ae,label:on,htmlFor:re,labelCol:Yt,labelAlign:Fe,colon:Je,required:In,requiredMark:bn,tooltip:$t}=Wt;var _e;const[Mn]=(0,We.Z)("Form"),{vertical:ei,labelAlign:ve,labelCol:Be,labelWrap:ge,colon:Ne}=Jt.useContext(ie.q3);if(!on)return null;const De=Yt||Be||{},Te=Fe||ve,Ze=`${Ae}-item-label`,He=se()(Ze,Te==="left"&&`${Ze}-left`,De.className,{[`${Ze}-wrap`]:!!ge});let nn=on;const sn=Je===!0||Ne!==!1&&Je!==!1;sn&&!ei&&typeof on=="string"&&on.trim()!==""&&(nn=on.replace(/[:|:]\s*$/,""));const xe=_n($t);if(xe){const{icon:Ce=Jt.createElement(Ei.Z,null)}=xe,Sn=Nn(xe,["icon"]),An=Jt.createElement(gn.Z,Object.assign({},Sn),Jt.cloneElement(Ce,{className:`${Ae}-item-tooltip`,title:""}));nn=Jt.createElement(Jt.Fragment,null,nn,An)}const ni=bn==="optional",vi=typeof bn=="function";vi?nn=bn(nn,{required:!!In}):ni&&!In&&(nn=Jt.createElement(Jt.Fragment,null,nn,Jt.createElement("span",{className:`${Ae}-item-optional`,title:""},(Mn==null?void 0:Mn.optional)||((_e=hi.Z.Form)===null||_e===void 0?void 0:_e.optional))));const ii=se()({[`${Ae}-item-required`]:In,[`${Ae}-item-required-mark-optional`]:ni||vi,[`${Ae}-item-no-colon`]:!sn});return Jt.createElement(fn.Z,Object.assign({},De,{className:He}),Jt.createElement("label",{htmlFor:re,className:ii,title:typeof on=="string"?on:""},nn))},Di=Ot(29679),bi=Ot(19248),Ii=Ot(96512),no=Ot(58617);const qi={success:Di.Z,warning:Ii.Z,error:bi.Z,validating:no.Z};function io(Wt){let{children:Ae,errors:on,warnings:re,hasFeedback:Yt,validateStatus:Fe,prefixCls:Je,meta:In,noStyle:bn}=Wt;const $t=`${Je}-item`,{feedbackIcons:_e}=Jt.useContext(ie.q3),Mn=ti(on,re,In,null,!!Yt,Fe),{isFormItemInput:ei,status:ve}=Jt.useContext(ie.aM),Be=Jt.useMemo(()=>{var ge;let Ne;if(Yt){const Ze=Yt!==!0&&Yt.icons||_e,He=Mn&&((ge=Ze==null?void 0:Ze({status:Mn,errors:on,warnings:re}))===null||ge===void 0?void 0:ge[Mn]),nn=Mn&&qi[Mn];Ne=He!==!1&&nn?Jt.createElement("span",{className:se()(`${$t}-feedback-icon`,`${$t}-feedback-icon-${Mn}`)},He||Jt.createElement(nn,null)):null}let De=!0,Te=Mn||"";return bn&&(De=ei,Te=(Mn!=null?Mn:ve)||""),{status:Te,errors:on,warnings:re,hasFeedback:!!Yt,feedbackIcon:Ne,isFormItemInput:De}},[Mn,Yt,bn,ei,ve]);return Jt.createElement(ie.aM.Provider,{value:Be},Ae)}var Ao=function(Wt,Ae){var on={};for(var re in Wt)Object.prototype.hasOwnProperty.call(Wt,re)&&Ae.indexOf(re)<0&&(on[re]=Wt[re]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Yt=0,re=Object.getOwnPropertySymbols(Wt);Yt{if(xe&&He.current){const Gn=getComputedStyle(He.current);ii(parseInt(Gn.marginBottom,10))}},[xe,ni]);const Ce=Gn=>{Gn||ii(null)},An=function(){let Gn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const di=Gn?nn:$t.errors,Pi=Gn?sn:$t.warnings;return ti(di,Pi,$t,"",!!_e,bn)}(),$n=se()(Te,on,re,{[`${Te}-with-help`]:Xn||nn.length||sn.length,[`${Te}-has-feedback`]:An&&_e,[`${Te}-has-success`]:An==="success",[`${Te}-has-warning`]:An==="warning",[`${Te}-has-error`]:An==="error",[`${Te}-is-validating`]:An==="validating",[`${Te}-hidden`]:Mn});return Jt.createElement("div",{className:$n,style:Yt,ref:He},Jt.createElement(tn.Z,Object.assign({className:`${Te}-row`},(0,Ee.Z)(De,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),Jt.createElement(xi,Object.assign({htmlFor:ve},Wt,{requiredMark:Ze,required:Be!=null?Be:ge,prefixCls:Ae})),Jt.createElement(yn,Object.assign({},Wt,$t,{errors:nn,warnings:sn,prefixCls:Ae,status:An,help:Fe,marginBottom:vi,onErrorVisibleChanged:Ce}),Jt.createElement(ie.qI.Provider,{value:Ne},Jt.createElement(io,{prefixCls:Ae,meta:$t,errors:$t.errors,warnings:$t.warnings,hasFeedback:_e,validateStatus:An},ei)))),!!vi&&Jt.createElement("div",{className:`${Te}-margin-offset`,style:{marginBottom:-vi}}))}const Do="__SPLIT__",fo=null,Li=Jt.memo(Wt=>{let{children:Ae}=Wt;return Ae},(Wt,Ae)=>Wt.value===Ae.value&&Wt.update===Ae.update&&Wt.childProps.length===Ae.childProps.length&&Wt.childProps.every((on,re)=>on===Ae.childProps[re]));function Ct(Wt){return Wt!=null}function Co(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function $i(Wt){const{name:Ae,noStyle:on,className:re,dependencies:Yt,prefixCls:Fe,shouldUpdate:Je,rules:In,children:bn,required:$t,label:_e,messageVariables:Mn,trigger:ei="onChange",validateTrigger:ve,hidden:Be,help:ge}=Wt,{getPrefixCls:Ne}=Jt.useContext(Ke.E_),{name:De}=Jt.useContext(ie.q3),Te=xt(bn),Ze=typeof Te=="function",He=Jt.useContext(ie.qI),{validateTrigger:nn}=Jt.useContext(pe.FieldContext),sn=ve!==void 0?ve:nn,Xn=Ct(Ae),xe=Ne("form",Fe),[ni,vi]=Qt(xe),ii=Jt.useContext(pe.ListContext),Ce=Jt.useRef(),[Sn,An]=ye({}),[$n,Gn]=(0,jn.Z)(()=>Co()),di=Ge=>{const Ti=ii==null?void 0:ii.getKey(Ge.name);if(Gn(Ge.destroy?Co():Ge,!0),on&&ge!==!1&&He){let bo=Ge.name;if(Ge.destroy)bo=Ce.current||bo;else if(Ti!==void 0){const[Xi,Ro]=Ti;bo=[Xi].concat((0,Tt.Z)(Ro)),Ce.current=bo}He(Ge,bo)}},Pi=(Ge,Ti)=>{An(bo=>{const Xi=Object.assign({},bo),vo=[].concat((0,Tt.Z)(Ge.name.slice(0,-1)),(0,Tt.Z)(Ti)).join(Do);return Ge.destroy?delete Xi[vo]:Xi[vo]=Ge,Xi})},[si,Vn]=Jt.useMemo(()=>{const Ge=(0,Tt.Z)($n.errors),Ti=(0,Tt.Z)($n.warnings);return Object.values(Sn).forEach(bo=>{Ge.push.apply(Ge,(0,Tt.Z)(bo.errors||[])),Ti.push.apply(Ti,(0,Tt.Z)(bo.warnings||[]))}),[Ge,Ti]},[Sn,$n.errors,$n.warnings]),yi=Le();function Ie(Ge,Ti,bo){return on&&!Be?Jt.createElement(io,{prefixCls:xe,hasFeedback:Wt.hasFeedback,validateStatus:Wt.validateStatus,meta:$n,errors:si,warnings:Vn,noStyle:!0},Ge):Jt.createElement(wo,Object.assign({key:"row"},Wt,{className:se()(re,vi),prefixCls:xe,fieldId:Ti,isRequired:bo,errors:si,warnings:Vn,meta:$n,onSubItemMetaChange:Pi}),Ge)}if(!Xn&&!Ze&&!Yt)return ni(Ie(Te));let Yi={};return typeof _e=="string"?Yi.label=_e:Ae&&(Yi.label=String(Ae)),Mn&&(Yi=Object.assign(Object.assign({},Yi),Mn)),ni(Jt.createElement(pe.Field,Object.assign({},Wt,{messageVariables:Yi,trigger:ei,validateTrigger:sn,onMetaChange:di}),(Ge,Ti,bo)=>{const Xi=hn(Ae).length&&Ti?Ti.name:[],Ro=Qn(Xi,De),vo=$t!==void 0?$t:!!(In&&In.some(Ri=>{if(Ri&&typeof Ri=="object"&&Ri.required&&!Ri.warningOnly)return!0;if(typeof Ri=="function"){const Ji=Ri(bo);return Ji&&Ji.required&&!Ji.warningOnly}return!1})),ui=Object.assign({},Ge);let oi=null;if(Array.isArray(Te)&&Xn)oi=Te;else if(!(Ze&&(!(Je||Yt)||Xn))){if(!(Yt&&!Ze&&!Xn))if((0,Dt.l$)(Te)){const Ri=Object.assign(Object.assign({},Te.props),ui);if(Ri.id||(Ri.id=Ro),ge||si.length>0||Vn.length>0||Wt.extra){const It=[];(ge||si.length>0)&&It.push(`${Ro}_help`),Wt.extra&&It.push(`${Ro}_extra`),Ri["aria-describedby"]=It.join(" ")}si.length>0&&(Ri["aria-invalid"]="true"),vo&&(Ri["aria-required"]="true"),(0,pi.Yr)(Te)&&(Ri.ref=yi(Xi,Te)),new Set([].concat((0,Tt.Z)(hn(ei)),(0,Tt.Z)(hn(sn)))).forEach(It=>{Ri[It]=function(){for(var Wi,Mo,ji,mo,Wo,wi=arguments.length,Ci=new Array(wi),Hi=0;Hi{var{prefixCls:Ae,children:on}=Wt,re=Qo(Wt,["prefixCls","children"]);const{getPrefixCls:Yt}=Jt.useContext(Ke.E_),Fe=Yt("form",Ae),Je=Jt.useMemo(()=>({prefixCls:Fe,status:"error"}),[Fe]);return Jt.createElement(pe.List,Object.assign({},re),(In,bn,$t)=>Jt.createElement(ie.Rk.Provider,{value:Je},on(In.map(_e=>Object.assign(Object.assign({},_e),{fieldKey:_e.key})),bn,{errors:$t.errors,warnings:$t.warnings})))};function Io(){const{form:Wt}=(0,Jt.useContext)(ie.q3);return Wt}const be=le;be.Item=Jo,be.List=Lo,be.ErrorList=Re,be.useForm=en,be.useFormInstance=Io,be.useWatch=pe.useWatch,be.Provider=ie.RV,be.create=()=>{};var Me=be},9432:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return pt},n:function(){return ft}});var Tt=Ot(19248),de=Ot(92310),se=Ot.n(de),je=Ot(93681),Jt=Ot(8654),ue=Ot(59301),ie=Ot(19080),Ve=Ot(36355),Pe=Ot(1684),ne=Ot(19716),Xe=Ot(32441),me=Ot(33234),an=Ot(59412),At=Ot(9937);function et(vt){return!!(vt.prefix||vt.suffix||vt.allowClear)}var nt=function(vt,wt){var Nt={};for(var bt in vt)Object.prototype.hasOwnProperty.call(vt,bt)&&wt.indexOf(bt)<0&&(Nt[bt]=vt[bt]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ht=0,bt=Object.getOwnPropertySymbols(vt);Ht{var Nt;const{prefixCls:bt,bordered:Ht=!0,status:_t,size:Qt,disabled:qt,onBlur:Se,onFocus:he,suffix:Re,allowClear:pe,addonAfter:Ke,addonBefore:Cn,className:ln,style:dn,styles:Hn,rootClassName:ae,onChange:Ut,classNames:hn}=vt,Qn=nt(vt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ti,direction:Oe,input:en}=ue.useContext(Ve.E_),mn=ti("input",bt),Yn=(0,ue.useRef)(null),[Pn,Un]=(0,At.ZP)(mn),{compactSize:le,compactItemClassnames:jn}=(0,me.ri)(mn,Oe),pi=(0,ne.Z)(Dn=>{var Zn;return(Zn=Qt!=null?Qt:le)!==null&&Zn!==void 0?Zn:Dn}),Dt=ue.useContext(Pe.Z),Lt=qt!=null?qt:Dt,{status:xt,hasFeedback:Ft,feedbackIcon:Gt}=(0,ue.useContext)(Xe.aM),kt=(0,ie.F)(xt,_t),ye=et(vt)||!!Ft,Le=(0,ue.useRef)(ye);(0,ue.useEffect)(()=>{var Dn;ye&&Le.current,Le.current=ye},[ye]);const xn=(0,an.Z)(Yn,!0),cn=Dn=>{xn(),Se==null||Se(Dn)},Ee=Dn=>{xn(),he==null||he(Dn)},tn=Dn=>{xn(),Ut==null||Ut(Dn)},fn=(Ft||Re)&&ue.createElement(ue.Fragment,null,Re,Ft&&Gt);let rn;return typeof pe=="object"&&(pe!=null&&pe.clearIcon)?rn=pe:pe&&(rn={clearIcon:ue.createElement(Tt.Z,null)}),Pn(ue.createElement(je.default,Object.assign({ref:(0,Jt.sQ)(wt,Yn),prefixCls:mn,autoComplete:en==null?void 0:en.autoComplete},Qn,{disabled:Lt,onBlur:cn,onFocus:Ee,style:Object.assign(Object.assign({},en==null?void 0:en.style),dn),styles:Object.assign(Object.assign({},en==null?void 0:en.styles),Hn),suffix:fn,allowClear:rn,className:se()(ln,ae,jn,en==null?void 0:en.className),onChange:tn,addonAfter:Ke&&ue.createElement(me.BR,null,ue.createElement(Xe.Ux,{override:!0,status:!0},Ke)),addonBefore:Cn&&ue.createElement(me.BR,null,ue.createElement(Xe.Ux,{override:!0,status:!0},Cn)),classNames:Object.assign(Object.assign(Object.assign({},hn),en==null?void 0:en.classNames),{input:se()({[`${mn}-sm`]:pi==="small",[`${mn}-lg`]:pi==="large",[`${mn}-rtl`]:Oe==="rtl",[`${mn}-borderless`]:!Ht},!ye&&(0,ie.Z)(mn,kt),hn==null?void 0:hn.input,(Nt=en==null?void 0:en.classNames)===null||Nt===void 0?void 0:Nt.input,Un)}),classes:{affixWrapper:se()({[`${mn}-affix-wrapper-sm`]:pi==="small",[`${mn}-affix-wrapper-lg`]:pi==="large",[`${mn}-affix-wrapper-rtl`]:Oe==="rtl",[`${mn}-affix-wrapper-borderless`]:!Ht},(0,ie.Z)(`${mn}-affix-wrapper`,kt,Ft),Un),wrapper:se()({[`${mn}-group-rtl`]:Oe==="rtl"},Un),group:se()({[`${mn}-group-wrapper-sm`]:pi==="small",[`${mn}-group-wrapper-lg`]:pi==="large",[`${mn}-group-wrapper-rtl`]:Oe==="rtl",[`${mn}-group-wrapper-disabled`]:Lt},(0,ie.Z)(`${mn}-group-wrapper`,kt,Ft),Un)}})))})},1643:function(Ln,En,Ot){"use strict";var Tt=Ot(19248),de=Ot(92310),se=Ot.n(de),je=Ot(9296),Jt=Ot(59301),ue=Ot(19080),ie=Ot(36355),Ve=Ot(1684),Pe=Ot(19716),ne=Ot(32441),Xe=Ot(9432),me=Ot(9937),an=function(et,nt){var ft={};for(var lt in et)Object.prototype.hasOwnProperty.call(et,lt)&&nt.indexOf(lt)<0&&(ft[lt]=et[lt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,lt=Object.getOwnPropertySymbols(et);pt{const{prefixCls:ft,bordered:lt=!0,size:pt,disabled:vt,status:wt,allowClear:Nt,showCount:bt,classNames:Ht,rootClassName:_t,className:Qt}=et,qt=an(et,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Se,direction:he}=Jt.useContext(ie.E_),Re=(0,Pe.Z)(pt),pe=Jt.useContext(Ve.Z),Ke=vt!=null?vt:pe,{status:Cn,hasFeedback:ln,feedbackIcon:dn}=Jt.useContext(ne.aM),Hn=(0,ue.F)(Cn,wt),ae=Jt.useRef(null);Jt.useImperativeHandle(nt,()=>{var Oe;return{resizableTextArea:(Oe=ae.current)===null||Oe===void 0?void 0:Oe.resizableTextArea,focus:en=>{var mn,Yn;(0,Xe.n)((Yn=(mn=ae.current)===null||mn===void 0?void 0:mn.resizableTextArea)===null||Yn===void 0?void 0:Yn.textArea,en)},blur:()=>{var en;return(en=ae.current)===null||en===void 0?void 0:en.blur()}}});const Ut=Se("input",ft);let hn;typeof Nt=="object"&&(Nt!=null&&Nt.clearIcon)?hn=Nt:Nt&&(hn={clearIcon:Jt.createElement(Tt.Z,null)});const[Qn,ti]=(0,me.ZP)(Ut);return Qn(Jt.createElement(je.default,Object.assign({},qt,{disabled:Ke,allowClear:hn,className:se()(Qt,_t),classes:{affixWrapper:se()(`${Ut}-textarea-affix-wrapper`,{[`${Ut}-affix-wrapper-rtl`]:he==="rtl",[`${Ut}-affix-wrapper-borderless`]:!lt,[`${Ut}-affix-wrapper-sm`]:Re==="small",[`${Ut}-affix-wrapper-lg`]:Re==="large",[`${Ut}-textarea-show-count`]:bt},(0,ue.Z)(`${Ut}-affix-wrapper`,Hn),ti)},classNames:Object.assign(Object.assign({},Ht),{textarea:se()({[`${Ut}-borderless`]:!lt,[`${Ut}-sm`]:Re==="small",[`${Ut}-lg`]:Re==="large"},(0,ue.Z)(Ut,Hn),ti,Ht==null?void 0:Ht.textarea)}),prefixCls:Ut,suffix:ln&&Jt.createElement("span",{className:`${Ut}-textarea-suffix`},dn),showCount:bt,ref:ae})))});En.Z=At},59412:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return de}});var Tt=Ot(59301);function de(se,je){const Jt=(0,Tt.useRef)([]),ue=()=>{Jt.current.push(setTimeout(()=>{var ie,Ve,Pe,ne;!((ie=se.current)===null||ie===void 0)&&ie.input&&((Ve=se.current)===null||Ve===void 0?void 0:Ve.input.getAttribute("type"))==="password"&&(!((Pe=se.current)===null||Pe===void 0)&&Pe.input.hasAttribute("value"))&&((ne=se.current)===null||ne===void 0||ne.input.removeAttribute("value"))}))};return(0,Tt.useEffect)(()=>(je&&ue(),()=>Jt.current.forEach(ie=>{ie&&clearTimeout(ie)})),[]),ue}},92832:function(Ln,En,Ot){"use strict";Ot.d(En,{default:function(){return Re}});var Tt=Ot(92310),de=Ot.n(Tt),se=Ot(59301),je=Ot(36355),Jt=Ot(32441),ue=Ot(9937),Ve=pe=>{const{getPrefixCls:Ke,direction:Cn}=(0,se.useContext)(je.E_),{prefixCls:ln,className:dn}=pe,Hn=Ke("input-group",ln),ae=Ke("input"),[Ut,hn]=(0,ue.ZP)(ae),Qn=de()(Hn,{[`${Hn}-lg`]:pe.size==="large",[`${Hn}-sm`]:pe.size==="small",[`${Hn}-compact`]:pe.compact,[`${Hn}-rtl`]:Cn==="rtl"},hn,dn),ti=(0,se.useContext)(Jt.aM),Oe=(0,se.useMemo)(()=>Object.assign(Object.assign({},ti),{isFormItemInput:!1}),[ti]);return Ut(se.createElement("span",{className:Qn,style:pe.style,onMouseEnter:pe.onMouseEnter,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur},se.createElement(Jt.aM.Provider,{value:Oe},pe.children)))},Pe=Ot(9432),ne=Ot(73331),Xe=Ot(15277),me=Ot(2738),an=Ot(8654),At=Ot(59412),et=function(pe,Ke){var Cn={};for(var ln in pe)Object.prototype.hasOwnProperty.call(pe,ln)&&Ke.indexOf(ln)<0&&(Cn[ln]=pe[ln]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dn=0,ln=Object.getOwnPropertySymbols(pe);dnpe?se.createElement(Xe.Z,null):se.createElement(ne.Z,null),ft={click:"onClick",hover:"onMouseOver"};var pt=se.forwardRef((pe,Ke)=>{const{visibilityToggle:Cn=!0}=pe,ln=typeof Cn=="object"&&Cn.visible!==void 0,[dn,Hn]=(0,se.useState)(()=>ln?Cn.visible:!1),ae=(0,se.useRef)(null);se.useEffect(()=>{ln&&Hn(Cn.visible)},[ln,Cn]);const Ut=(0,At.Z)(ae),hn=()=>{const{disabled:Lt}=pe;Lt||(dn&&Ut(),Hn(xt=>{var Ft;const Gt=!xt;return typeof Cn=="object"&&((Ft=Cn.onVisibleChange)===null||Ft===void 0||Ft.call(Cn,Gt)),Gt}))},Qn=Lt=>{const{action:xt="click",iconRender:Ft=nt}=pe,Gt=ft[xt]||"",kt=Ft(dn),ye={[Gt]:hn,className:`${Lt}-icon`,key:"passwordIcon",onMouseDown:Le=>{Le.preventDefault()},onMouseUp:Le=>{Le.preventDefault()}};return se.cloneElement(se.isValidElement(kt)?kt:se.createElement("span",null,kt),ye)},{className:ti,prefixCls:Oe,inputPrefixCls:en,size:mn}=pe,Yn=et(pe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Pn}=se.useContext(je.E_),Un=Pn("input",en),le=Pn("input-password",Oe),jn=Cn&&Qn(le),pi=de()(le,ti,{[`${le}-${mn}`]:!!mn}),Dt=Object.assign(Object.assign({},(0,me.Z)(Yn,["suffix","iconRender","visibilityToggle"])),{type:dn?"text":"password",className:pi,prefixCls:Un,suffix:jn});return mn&&(Dt.size=mn),se.createElement(Pe.Z,Object.assign({ref:(0,an.sQ)(Ke,ae)},Dt))}),vt=Ot(47472),wt=Ot(92343),Nt=Ot(3113),bt=Ot(19716),Ht=Ot(33234),_t=function(pe,Ke){var Cn={};for(var ln in pe)Object.prototype.hasOwnProperty.call(pe,ln)&&Ke.indexOf(ln)<0&&(Cn[ln]=pe[ln]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dn=0,ln=Object.getOwnPropertySymbols(pe);dn{const{prefixCls:Cn,inputPrefixCls:ln,className:dn,size:Hn,suffix:ae,enterButton:Ut=!1,addonAfter:hn,loading:Qn,disabled:ti,onSearch:Oe,onChange:en,onCompositionStart:mn,onCompositionEnd:Yn}=pe,Pn=_t(pe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Un,direction:le}=se.useContext(je.E_),jn=se.useRef(!1),pi=Un("input-search",Cn),Dt=Un("input",ln),{compactSize:Lt}=(0,Ht.ri)(pi,le),xt=(0,bt.Z)(yn=>{var Ei;return(Ei=Hn!=null?Hn:Lt)!==null&&Ei!==void 0?Ei:yn}),Ft=se.useRef(null),Gt=yn=>{yn&&yn.target&&yn.type==="click"&&Oe&&Oe(yn.target.value,yn,{source:"clear"}),en&&en(yn)},kt=yn=>{var Ei;document.activeElement===((Ei=Ft.current)===null||Ei===void 0?void 0:Ei.input)&&yn.preventDefault()},ye=yn=>{var Ei,hi;Oe&&Oe((hi=(Ei=Ft.current)===null||Ei===void 0?void 0:Ei.input)===null||hi===void 0?void 0:hi.value,yn,{source:"input"})},Le=yn=>{jn.current||Qn||ye(yn)},xn=typeof Ut=="boolean"?se.createElement(vt.Z,null):null,cn=`${pi}-button`;let Ee;const tn=Ut||{},fn=tn.type&&tn.type.__ANT_BUTTON===!0;fn||tn.type==="button"?Ee=(0,wt.Tm)(tn,Object.assign({onMouseDown:kt,onClick:yn=>{var Ei,hi;(hi=(Ei=tn==null?void 0:tn.props)===null||Ei===void 0?void 0:Ei.onClick)===null||hi===void 0||hi.call(Ei,yn),ye(yn)},key:"enterButton"},fn?{className:cn,size:xt}:{})):Ee=se.createElement(Nt.ZP,{className:cn,type:Ut?"primary":void 0,size:xt,disabled:ti,key:"enterButton",onMouseDown:kt,onClick:ye,loading:Qn,icon:xn},Ut),hn&&(Ee=[Ee,(0,wt.Tm)(hn,{key:"addonAfter"})]);const rn=de()(pi,{[`${pi}-rtl`]:le==="rtl",[`${pi}-${xt}`]:!!xt,[`${pi}-with-button`]:!!Ut},dn),Dn=yn=>{jn.current=!0,mn==null||mn(yn)},Zn=yn=>{jn.current=!1,Yn==null||Yn(yn)};return se.createElement(Pe.Z,Object.assign({ref:(0,an.sQ)(Ft,Ke),onPressEnter:Le},Pn,{size:xt,onCompositionStart:Dn,onCompositionEnd:Zn,prefixCls:Dt,addonAfter:Ee,suffix:ae,onChange:Gt,className:rn,disabled:ti}))}),Se=Ot(1643);const he=Pe.Z;he.Group=Ve,he.Search=qt,he.TextArea=Se.Z,he.Password=pt;var Re=he},93948:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return hi}});var Tt=Ot(59301),de=Ot(29679),se=Ot(40001),je=Ot(19248),Jt=Ot(99267),ue=Ot(92310),ie=Ot.n(ue),Ve=Ot(2738),Pe=Ot(36355),ne=Ot(96663),Xe=Ot(44127),me=Ot(6620),an={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},At=function(){var gn=(0,Tt.useRef)([]),Nn=(0,Tt.useRef)(null);return(0,Tt.useEffect)(function(){var _n=Date.now(),Jn=!1;gn.current.forEach(function(xi){if(xi){Jn=!0;var Di=xi.style;Di.transitionDuration=".3s, .3s, .3s, .06s",Nn.current&&_n-Nn.current<100&&(Di.transitionDuration="0s, 0s")}}),Jn&&(Nn.current=Date.now())}),gn.current},et=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],nt=function(gn){var Nn=(0,Xe.Z)((0,Xe.Z)({},an),gn),_n=Nn.className,Jn=Nn.percent,xi=Nn.prefixCls,Di=Nn.strokeColor,bi=Nn.strokeLinecap,Ii=Nn.strokeWidth,no=Nn.style,qi=Nn.trailColor,io=Nn.trailWidth,Ao=Nn.transition,wo=(0,me.Z)(Nn,et);delete wo.gapPosition;var Do=Array.isArray(Jn)?Jn:[Jn],fo=Array.isArray(Di)?Di:[Di],Li=At(),Ct=Ii/2,Co=100-Ii/2,$i="M ".concat(bi==="round"?Ct:0,",").concat(Ct,` L `).concat(bi==="round"?Co:100,",").concat(Ct),Qi="0 0 100 ".concat(Ii),Jo=0;return Tt.createElement("svg",(0,ne.Z)({className:ie()("".concat(xi,"-line"),_n),viewBox:Qi,preserveAspectRatio:"none",style:no},wo),Tt.createElement("path",{className:"".concat(xi,"-line-trail"),d:$i,strokeLinecap:bi,stroke:qi,strokeWidth:io||Ii,fillOpacity:"0"}),Do.map(function(Qo,cr){var Lo=1;switch(bi){case"round":Lo=1-Ii/100;break;case"square":Lo=1-Ii/2/100;break;default:Lo=1;break}var Io={strokeDasharray:"".concat(Qo*Lo,"px, 100px"),strokeDashoffset:"-".concat(Jo,"px"),transition:Ao||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},be=fo[cr]||fo[fo.length-1];return Jo+=Qo,Tt.createElement("path",{key:cr,className:"".concat(xi,"-line-path"),d:$i,strokeLinecap:bi,stroke:be,strokeWidth:Ii,fillOpacity:"0",ref:function(Wt){Li[cr]=Wt},style:Io})}))},ft=nt,lt=Ot(20135),pt=Ot(72071),vt=Ot(47273),wt=0,Nt=(0,vt.Z)();function bt(){var We;return Nt?(We=wt,wt+=1):We="TEST_OR_SSR",We}var Ht=function(We){var gn=Tt.useState(),Nn=(0,pt.Z)(gn,2),_n=Nn[0],Jn=Nn[1];return Tt.useEffect(function(){Jn("rc_progress_".concat(bt()))},[]),We||_n},_t=function(gn){var Nn=gn.bg,_n=gn.children;return Tt.createElement("div",{style:{width:"100%",height:"100%",background:Nn}},_n)};function Qt(We,gn){return Object.keys(We).map(function(Nn){var _n=parseFloat(Nn),Jn="".concat(Math.floor(_n*gn),"%");return"".concat(We[Nn]," ").concat(Jn)})}var qt=Tt.forwardRef(function(We,gn){var Nn=We.prefixCls,_n=We.color,Jn=We.gradientId,xi=We.radius,Di=We.style,bi=We.ptg,Ii=We.strokeLinecap,no=We.strokeWidth,qi=We.size,io=We.gapDegree,Ao=_n&&(0,lt.Z)(_n)==="object",wo=Ao?"#FFF":void 0,Do=qi/2,fo=Tt.createElement("circle",{className:"".concat(Nn,"-circle-path"),r:xi,cx:Do,cy:Do,stroke:wo,strokeLinecap:Ii,strokeWidth:no,opacity:bi===0?0:1,style:Di,ref:gn});if(!Ao)return fo;var Li="".concat(Jn,"-conic"),Ct=io?"".concat(180+io/2,"deg"):"0deg",Co=Qt(_n,(360-io)/360),$i=Qt(_n,1),Qi="conic-gradient(from ".concat(Ct,", ").concat(Co.join(", "),")"),Jo="linear-gradient(to ".concat(io?"bottom":"top",", ").concat($i.join(", "),")");return Tt.createElement(Tt.Fragment,null,Tt.createElement("mask",{id:Li},fo),Tt.createElement("foreignObject",{x:0,y:0,width:qi,height:qi,mask:"url(#".concat(Li,")")},Tt.createElement(_t,{bg:Jo},Tt.createElement(_t,{bg:Qi}))))}),Se=qt,he=100,Re=function(gn,Nn,_n,Jn,xi,Di,bi,Ii,no,qi){var io=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ao=_n/100*360*((360-Di)/360),wo=Di===0?0:{bottom:0,top:180,left:90,right:-90}[bi],Do=(100-Jn)/100*Nn;no==="round"&&Jn!==100&&(Do+=qi/2,Do>=Nn&&(Do=Nn-.01));var fo=he/2;return{stroke:typeof Ii=="string"?Ii:void 0,strokeDasharray:"".concat(Nn,"px ").concat(gn),strokeDashoffset:Do+io,transform:"rotate(".concat(xi+Ao+wo,"deg)"),transformOrigin:"".concat(fo,"px ").concat(fo,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},pe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ke(We){var gn=We!=null?We:[];return Array.isArray(gn)?gn:[gn]}var Cn=function(gn){var Nn=(0,Xe.Z)((0,Xe.Z)({},an),gn),_n=Nn.id,Jn=Nn.prefixCls,xi=Nn.steps,Di=Nn.strokeWidth,bi=Nn.trailWidth,Ii=Nn.gapDegree,no=Ii===void 0?0:Ii,qi=Nn.gapPosition,io=Nn.trailColor,Ao=Nn.strokeLinecap,wo=Nn.style,Do=Nn.className,fo=Nn.strokeColor,Li=Nn.percent,Ct=(0,me.Z)(Nn,pe),Co=he/2,$i=Ht(_n),Qi="".concat($i,"-gradient"),Jo=Co-Di/2,Qo=Math.PI*2*Jo,cr=no>0?90+no/2:-90,Lo=Qo*((360-no)/360),Io=(0,lt.Z)(xi)==="object"?xi:{count:xi,space:2},be=Io.count,Me=Io.space,Wt=Ke(Li),Ae=Ke(fo),on=Ae.find(function($t){return $t&&(0,lt.Z)($t)==="object"}),re=on&&(0,lt.Z)(on)==="object",Yt=re?"butt":Ao,Fe=Re(Qo,Lo,0,100,cr,no,qi,io,Yt,Di),Je=At(),In=function(){var _e=0;return Wt.map(function(Mn,ei){var ve=Ae[ei]||Ae[Ae.length-1],Be=Re(Qo,Lo,_e,Mn,cr,no,qi,ve,Yt,Di);return _e+=Mn,Tt.createElement(Se,{key:ei,color:ve,ptg:Mn,radius:Jo,prefixCls:Jn,gradientId:Qi,style:Be,strokeLinecap:Yt,strokeWidth:Di,gapDegree:no,ref:function(Ne){Je[ei]=Ne},size:he})}).reverse()},bn=function(){var _e=Math.round(be*(Wt[0]/100)),Mn=100/be,ei=0;return new Array(be).fill(null).map(function(ve,Be){var ge=Be<=_e-1?Ae[0]:io,Ne=ge&&(0,lt.Z)(ge)==="object"?"url(#".concat(Qi,")"):void 0,De=Re(Qo,Lo,ei,Mn,cr,no,qi,ge,"butt",Di,Me);return ei+=(Lo-De.strokeDashoffset+Me)*100/Lo,Tt.createElement("circle",{key:Be,className:"".concat(Jn,"-circle-path"),r:Jo,cx:Co,cy:Co,stroke:Ne,strokeWidth:Di,opacity:1,style:De,ref:function(Ze){Je[Be]=Ze}})})};return Tt.createElement("svg",(0,ne.Z)({className:ie()("".concat(Jn,"-circle"),Do),viewBox:"0 0 ".concat(he," ").concat(he),style:wo,id:_n,role:"presentation"},Ct),!be&&Tt.createElement("circle",{className:"".concat(Jn,"-circle-trail"),r:Jo,cx:Co,cy:Co,stroke:io,strokeLinecap:Yt,strokeWidth:bi||Di,style:Fe}),be?bn():In())},ln=Cn,dn={Line:ft,Circle:ln},Hn=Ot(6848),ae=Ot(93398);function Ut(We){return!We||We<0?0:We>100?100:We}function hn(We){let{success:gn,successPercent:Nn}=We,_n=Nn;return gn&&"progress"in gn&&(_n=gn.progress),gn&&"percent"in gn&&(_n=gn.percent),_n}const Qn=We=>{let{percent:gn,success:Nn,successPercent:_n}=We;const Jn=Ut(hn({success:Nn,successPercent:_n}));return[Jn,Ut(Ut(gn)-Jn)]},ti=We=>{let{success:gn={},strokeColor:Nn}=We;const{strokeColor:_n}=gn;return[_n||ae.presetPrimaryColors.green,Nn||null]},Oe=(We,gn,Nn)=>{var _n,Jn,xi,Di;let bi=-1,Ii=-1;if(gn==="step"){const no=Nn.steps,qi=Nn.strokeWidth;typeof We=="string"||typeof We=="undefined"?(bi=We==="small"?2:14,Ii=qi!=null?qi:8):typeof We=="number"?[bi,Ii]=[We,We]:[bi=14,Ii=8]=We,bi*=no}else if(gn==="line"){const no=Nn==null?void 0:Nn.strokeWidth;typeof We=="string"||typeof We=="undefined"?Ii=no||(We==="small"?6:8):typeof We=="number"?[bi,Ii]=[We,We]:[bi=-1,Ii=8]=We}else(gn==="circle"||gn==="dashboard")&&(typeof We=="string"||typeof We=="undefined"?[bi,Ii]=We==="small"?[60,60]:[120,120]:typeof We=="number"?[bi,Ii]=[We,We]:(bi=(Jn=(_n=We[0])!==null&&_n!==void 0?_n:We[1])!==null&&Jn!==void 0?Jn:120,Ii=(Di=(xi=We[0])!==null&&xi!==void 0?xi:We[1])!==null&&Di!==void 0?Di:120));return[bi,Ii]},en=3,mn=We=>en/We*100;var Pn=We=>{const{prefixCls:gn,trailColor:Nn=null,strokeLinecap:_n="round",gapPosition:Jn,gapDegree:xi,width:Di=120,type:bi,children:Ii,success:no,size:qi=Di}=We,[io,Ao]=Oe(qi,"circle");let{strokeWidth:wo}=We;wo===void 0&&(wo=Math.max(mn(io),6));const Do={width:io,height:Ao,fontSize:io*.15+6},fo=Tt.useMemo(()=>{if(xi||xi===0)return xi;if(bi==="dashboard")return 75},[xi,bi]),Li=Jn||bi==="dashboard"&&"bottom"||void 0,Ct=Object.prototype.toString.call(We.strokeColor)==="[object Object]",Co=ti({success:no,strokeColor:We.strokeColor}),$i=ie()(`${gn}-inner`,{[`${gn}-circle-gradient`]:Ct}),Qi=Tt.createElement(ln,{percent:Qn(We),strokeWidth:wo,trailWidth:wo,strokeColor:Co,strokeLinecap:_n,trailColor:Nn,prefixCls:gn,gapDegree:fo,gapPosition:Li});return Tt.createElement("div",{className:$i,style:Do},io<=20?Tt.createElement(Hn.Z,{title:Ii},Tt.createElement("span",null,Qi)):Tt.createElement(Tt.Fragment,null,Qi,Ii))},Un=function(We,gn){var Nn={};for(var _n in We)Object.prototype.hasOwnProperty.call(We,_n)&&gn.indexOf(_n)<0&&(Nn[_n]=We[_n]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jn=0,_n=Object.getOwnPropertySymbols(We);Jn<_n.length;Jn++)gn.indexOf(_n[Jn])<0&&Object.prototype.propertyIsEnumerable.call(We,_n[Jn])&&(Nn[_n[Jn]]=We[_n[Jn]]);return Nn};const le=We=>{let gn=[];return Object.keys(We).forEach(Nn=>{const _n=parseFloat(Nn.replace(/%/g,""));isNaN(_n)||gn.push({key:_n,value:We[Nn]})}),gn=gn.sort((Nn,_n)=>Nn.key-_n.key),gn.map(Nn=>{let{key:_n,value:Jn}=Nn;return`${Jn} ${_n}%`}).join(", ")},jn=(We,gn)=>{const{from:Nn=ae.presetPrimaryColors.blue,to:_n=ae.presetPrimaryColors.blue,direction:Jn=gn==="rtl"?"to left":"to right"}=We,xi=Un(We,["from","to","direction"]);if(Object.keys(xi).length!==0){const Di=le(xi);return{backgroundImage:`linear-gradient(${Jn}, ${Di})`}}return{backgroundImage:`linear-gradient(${Jn}, ${Nn}, ${_n})`}};var Dt=We=>{const{prefixCls:gn,direction:Nn,percent:_n,size:Jn,strokeWidth:xi,strokeColor:Di,strokeLinecap:bi="round",children:Ii,trailColor:no=null,success:qi}=We,io=Di&&typeof Di!="string"?jn(Di,Nn):{backgroundColor:Di},Ao=bi==="square"||bi==="butt"?0:void 0,wo={backgroundColor:no||void 0,borderRadius:Ao},Do=Jn!=null?Jn:[-1,xi||(Jn==="small"?6:8)],[fo,Li]=Oe(Do,"line",{strokeWidth:xi}),Ct=Object.assign({width:`${Ut(_n)}%`,height:Li,borderRadius:Ao},io),Co=hn(We),$i={width:`${Ut(Co)}%`,height:Li,borderRadius:Ao,backgroundColor:qi==null?void 0:qi.strokeColor},Qi={width:fo<0?"100%":fo,height:Li};return Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{className:`${gn}-outer`,style:Qi},Tt.createElement("div",{className:`${gn}-inner`,style:wo},Tt.createElement("div",{className:`${gn}-bg`,style:Ct}),Co!==void 0?Tt.createElement("div",{className:`${gn}-success-bg`,style:$i}):null)),Ii)},xt=We=>{const{size:gn,steps:Nn,percent:_n=0,strokeWidth:Jn=8,strokeColor:xi,trailColor:Di=null,prefixCls:bi,children:Ii}=We,no=Math.round(Nn*(_n/100)),qi=gn==="small"?2:14,io=gn!=null?gn:[qi,Jn],[Ao,wo]=Oe(io,"step",{steps:Nn,strokeWidth:Jn}),Do=Ao/Nn,fo=new Array(Nn);for(let Li=0;Li{const gn=We?"100%":"-100%";return new Ft.Keyframes(`antProgress${We?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${gn}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${gn}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},xn=We=>{const{componentCls:gn,iconCls:Nn}=We;return{[gn]:Object.assign(Object.assign({},(0,Gt.Wf)(We)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:We.fontSize,marginInlineEnd:We.marginXS,marginBottom:We.marginXS},[`${gn}-outer`]:{display:"inline-block",width:"100%"},[`&${gn}-show-info`]:{[`${gn}-outer`]:{marginInlineEnd:`calc(-2em - ${We.marginXS}px)`,paddingInlineEnd:`calc(2em + ${We.paddingXS}px)`}},[`${gn}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:We.remainingColor,borderRadius:We.lineBorderRadius},[`${gn}-inner:not(${gn}-circle-gradient)`]:{[`${gn}-circle-path`]:{stroke:We.defaultColor}},[`${gn}-success-bg, ${gn}-bg`]:{position:"relative",backgroundColor:We.defaultColor,borderRadius:We.lineBorderRadius,transition:`all ${We.motionDurationSlow} ${We.motionEaseInOutCirc}`},[`${gn}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:We.colorSuccess},[`${gn}-text`]:{display:"inline-block",width:"2em",marginInlineStart:We.marginXS,color:We.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Nn]:{fontSize:We.fontSize}},[`&${gn}-status-active`]:{[`${gn}-bg::before`]:{position:"absolute",inset:0,backgroundColor:We.colorBgContainer,borderRadius:We.lineBorderRadius,opacity:0,animationName:Le(),animationDuration:We.progressActiveMotionDuration,animationTimingFunction:We.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${gn}-rtl${gn}-status-active`]:{[`${gn}-bg::before`]:{animationName:Le(!0)}},[`&${gn}-status-exception`]:{[`${gn}-bg`]:{backgroundColor:We.colorError},[`${gn}-text`]:{color:We.colorError}},[`&${gn}-status-exception ${gn}-inner:not(${gn}-circle-gradient)`]:{[`${gn}-circle-path`]:{stroke:We.colorError}},[`&${gn}-status-success`]:{[`${gn}-bg`]:{backgroundColor:We.colorSuccess},[`${gn}-text`]:{color:We.colorSuccess}},[`&${gn}-status-success ${gn}-inner:not(${gn}-circle-gradient)`]:{[`${gn}-circle-path`]:{stroke:We.colorSuccess}}})}},cn=We=>{const{componentCls:gn,iconCls:Nn}=We;return{[gn]:{[`${gn}-circle-trail`]:{stroke:We.remainingColor},[`&${gn}-circle ${gn}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${gn}-circle ${gn}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:We.circleTextColor,fontSize:We.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Nn]:{fontSize:`${We.fontSize/We.fontSizeSM}em`}},[`${gn}-circle&-status-exception`]:{[`${gn}-text`]:{color:We.colorError}},[`${gn}-circle&-status-success`]:{[`${gn}-text`]:{color:We.colorSuccess}}},[`${gn}-inline-circle`]:{lineHeight:1,[`${gn}-inner`]:{verticalAlign:"bottom"}}}},Ee=We=>{const{componentCls:gn}=We;return{[gn]:{[`${gn}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:We.progressStepMinWidth,marginInlineEnd:We.progressStepMarginInlineEnd,backgroundColor:We.remainingColor,transition:`all ${We.motionDurationSlow}`,"&-active":{backgroundColor:We.defaultColor}}}}}},tn=We=>{const{componentCls:gn,iconCls:Nn}=We;return{[gn]:{[`${gn}-small&-line, ${gn}-small&-line ${gn}-text ${Nn}`]:{fontSize:We.fontSizeSM}}}};var fn=(0,kt.Z)("Progress",We=>{const gn=We.marginXXS/2,Nn=(0,ye.TS)(We,{progressStepMarginInlineEnd:gn,progressStepMinWidth:gn,progressActiveMotionDuration:"2.4s"});return[xn(Nn),cn(Nn),Ee(Nn),tn(Nn)]},We=>({circleTextColor:We.colorText,defaultColor:We.colorInfo,remainingColor:We.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),rn=function(We,gn){var Nn={};for(var _n in We)Object.prototype.hasOwnProperty.call(We,_n)&&gn.indexOf(_n)<0&&(Nn[_n]=We[_n]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Jn=0,_n=Object.getOwnPropertySymbols(We);Jn<_n.length;Jn++)gn.indexOf(_n[Jn])<0&&Object.prototype.propertyIsEnumerable.call(We,_n[Jn])&&(Nn[_n[Jn]]=We[_n[Jn]]);return Nn};const Dn=null,Zn=["normal","exception","active","success"];var Ei=Tt.forwardRef((We,gn)=>{const{prefixCls:Nn,className:_n,rootClassName:Jn,steps:xi,strokeColor:Di,percent:bi=0,size:Ii="default",showInfo:no=!0,type:qi="line",status:io,format:Ao,style:wo}=We,Do=rn(We,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),fo=Tt.useMemo(()=>{var Wt,Ae;const on=hn(We);return parseInt(on!==void 0?(Wt=on!=null?on:0)===null||Wt===void 0?void 0:Wt.toString():(Ae=bi!=null?bi:0)===null||Ae===void 0?void 0:Ae.toString(),10)},[bi,We.success,We.successPercent]),Li=Tt.useMemo(()=>!Zn.includes(io)&&fo>=100?"success":io||"normal",[io,fo]),{getPrefixCls:Ct,direction:Co,progress:$i}=Tt.useContext(Pe.E_),Qi=Ct("progress",Nn),[Jo,Qo]=fn(Qi),cr=Tt.useMemo(()=>{if(!no)return null;const Wt=hn(We);let Ae;const on=Ao||(Yt=>`${Yt}%`),re=qi==="line";return Ao||Li!=="exception"&&Li!=="success"?Ae=on(Ut(bi),Ut(Wt)):Li==="exception"?Ae=re?Tt.createElement(je.Z,null):Tt.createElement(Jt.Z,null):Li==="success"&&(Ae=re?Tt.createElement(de.Z,null):Tt.createElement(se.Z,null)),Tt.createElement("span",{className:`${Qi}-text`,title:typeof Ae=="string"?Ae:void 0},Ae)},[no,bi,fo,Li,qi,Qi,Ao]),Lo=Array.isArray(Di)?Di[0]:Di,Io=typeof Di=="string"||Array.isArray(Di)?Di:void 0;let be;qi==="line"?be=xi?Tt.createElement(xt,Object.assign({},We,{strokeColor:Io,prefixCls:Qi,steps:xi}),cr):Tt.createElement(Dt,Object.assign({},We,{strokeColor:Lo,prefixCls:Qi,direction:Co}),cr):(qi==="circle"||qi==="dashboard")&&(be=Tt.createElement(Pn,Object.assign({},We,{strokeColor:Lo,prefixCls:Qi,progressStatus:Li}),cr));const Me=ie()(Qi,`${Qi}-status-${Li}`,`${Qi}-${qi==="dashboard"&&"circle"||xi&&"steps"||qi}`,{[`${Qi}-inline-circle`]:qi==="circle"&&Oe(Ii,"circle")[0]<=20,[`${Qi}-show-info`]:no,[`${Qi}-${Ii}`]:typeof Ii=="string",[`${Qi}-rtl`]:Co==="rtl"},$i==null?void 0:$i.className,_n,Jn,Qo);return Jo(Tt.createElement("div",Object.assign({ref:gn,style:Object.assign(Object.assign({},$i==null?void 0:$i.style),wo),className:Me,role:"progressbar","aria-valuenow":fo},(0,Ve.Z)(Do,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),be))}),hi=Ei},57809:function(Ln,En,Ot){"use strict";var Tt=Ot(92310),de=Ot.n(Tt),se=Ot(77861),je=Ot(2738),Jt=Ot(59301),ue=Ot(53487),ie=Ot(62892),Ve=Ot(19080),Pe=Ot(36355),ne=Ot(1684),Xe=Ot(93891),me=Ot(19716),an=Ot(32441),At=Ot(33234),et=Ot(14154),nt=Ot(58582),ft=Ot(84443),lt=Ot(66339),pt=function(Ht,_t){var Qt={};for(var qt in Ht)Object.prototype.hasOwnProperty.call(Ht,qt)&&_t.indexOf(qt)<0&&(Qt[qt]=Ht[qt]);if(Ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,qt=Object.getOwnPropertySymbols(Ht);Se{var Qt,{prefixCls:qt,bordered:Se=!0,className:he,rootClassName:Re,getPopupContainer:pe,popupClassName:Ke,dropdownClassName:Cn,listHeight:ln=256,placement:dn,listItemHeight:Hn=24,size:ae,disabled:Ut,notFoundContent:hn,status:Qn,builtinPlacements:ti,dropdownMatchSelectWidth:Oe,popupMatchSelectWidth:en,direction:mn,style:Yn,allowClear:Pn}=Ht,Un=pt(Ht,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:le,getPrefixCls:jn,renderEmpty:pi,direction:Dt,virtual:Lt,popupMatchSelectWidth:xt,popupOverflow:Ft,select:Gt}=Jt.useContext(Pe.E_),kt=jn("select",qt),ye=jn(),Le=mn!=null?mn:Dt,{compactSize:xn,compactItemClassnames:cn}=(0,At.ri)(kt,Le),[Ee,tn]=(0,et.Z)(kt),fn=Jt.useMemo(()=>{const{mode:Li}=Un;if(Li!=="combobox")return Li===vt?"combobox":Li},[Un.mode]),rn=fn==="multiple"||fn==="tags",Dn=(0,ft.Z)(Un.suffixIcon,Un.showArrow),Zn=(Qt=en!=null?en:Oe)!==null&&Qt!==void 0?Qt:xt,{status:yn,hasFeedback:Ei,isFormItemInput:hi,feedbackIcon:We}=Jt.useContext(an.aM),gn=(0,Ve.F)(yn,Qn);let Nn;hn!==void 0?Nn=hn:fn==="combobox"?Nn=null:Nn=(pi==null?void 0:pi("Select"))||Jt.createElement(Xe.Z,{componentName:"Select"});const{suffixIcon:_n,itemIcon:Jn,removeIcon:xi,clearIcon:Di}=(0,lt.Z)(Object.assign(Object.assign({},Un),{multiple:rn,hasFeedback:Ei,feedbackIcon:We,showSuffixIcon:Dn,prefixCls:kt,showArrow:Un.showArrow,componentName:"Select"})),bi=Pn===!0?{clearIcon:Di}:Pn,Ii=(0,je.Z)(Un,["suffixIcon","itemIcon"]),no=de()(Ke||Cn,{[`${kt}-dropdown-${Le}`]:Le==="rtl"},Re,tn),qi=(0,me.Z)(Li=>{var Ct;return(Ct=ae!=null?ae:xn)!==null&&Ct!==void 0?Ct:Li}),io=Jt.useContext(ne.Z),Ao=Ut!=null?Ut:io,wo=de()({[`${kt}-lg`]:qi==="large",[`${kt}-sm`]:qi==="small",[`${kt}-rtl`]:Le==="rtl",[`${kt}-borderless`]:!Se,[`${kt}-in-form-item`]:hi},(0,Ve.Z)(kt,gn,Ei),cn,Gt==null?void 0:Gt.className,he,Re,tn),Do=Jt.useMemo(()=>dn!==void 0?dn:Le==="rtl"?"bottomRight":"bottomLeft",[dn,Le]),fo=(0,nt.Z)(ti,Ft);return Ee(Jt.createElement(se.ZP,Object.assign({ref:_t,virtual:Lt,showSearch:Gt==null?void 0:Gt.showSearch},Ii,{style:Object.assign(Object.assign({},Gt==null?void 0:Gt.style),Yn),dropdownMatchSelectWidth:Zn,builtinPlacements:fo,transitionName:(0,ie.m)(ye,"slide-up",Un.transitionName),listHeight:ln,listItemHeight:Hn,mode:fn,prefixCls:kt,placement:Do,direction:Le,suffixIcon:_n,menuItemSelectedIcon:Jn,removeIcon:xi,allowClear:bi,notFoundContent:Nn,className:wo,getPopupContainer:pe||le,dropdownClassName:no,disabled:Ao})))},Nt=Jt.forwardRef(wt),bt=(0,ue.Z)(Nt);Nt.SECRET_COMBOBOX_MODE_DO_NOT_USE=vt,Nt.Option=se.Wx,Nt.OptGroup=se.Xo,Nt._InternalPanelDoNotUseOrYouWillBeFired=bt,En.default=Nt},14154:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Nt}});var Tt=Ot(17313),de=Ot(74207),se=Ot(37613),je=Ot(83116),Jt=Ot(13826),ue=Ot(92899);const ie=bt=>{const{optionHeight:Ht,optionFontSize:_t,optionLineHeight:Qt,optionPadding:qt}=bt;return{position:"relative",display:"block",minHeight:Ht,padding:qt,color:bt.colorText,fontWeight:"normal",fontSize:_t,lineHeight:Qt,boxSizing:"border-box"}};var Pe=bt=>{const{antCls:Ht,componentCls:_t}=bt,Qt=`${_t}-item`,qt=`&${Ht}-slide-up-enter${Ht}-slide-up-enter-active`,Se=`&${Ht}-slide-up-appear${Ht}-slide-up-appear-active`,he=`&${Ht}-slide-up-leave${Ht}-slide-up-leave-active`,Re=`${_t}-dropdown-placement-`;return[{[`${_t}-dropdown`]:Object.assign(Object.assign({},(0,Tt.Wf)(bt)),{position:"absolute",top:-9999,zIndex:bt.zIndexPopup,boxSizing:"border-box",padding:bt.paddingXXS,overflow:"hidden",fontSize:bt.fontSize,fontVariant:"initial",backgroundColor:bt.colorBgElevated,borderRadius:bt.borderRadiusLG,outline:"none",boxShadow:bt.boxShadowSecondary,[` ${qt}${Re}bottomLeft, ${Se}${Re}bottomLeft `]:{animationName:Jt.fJ},[` ${qt}${Re}topLeft, ${Se}${Re}topLeft, ${qt}${Re}topRight, ${Se}${Re}topRight `]:{animationName:Jt.Qt},[`${he}${Re}bottomLeft`]:{animationName:Jt.Uw},[` ${he}${Re}topLeft, ${he}${Re}topRight `]:{animationName:Jt.ly},"&-hidden":{display:"none"},[`${Qt}`]:Object.assign(Object.assign({},ie(bt)),{cursor:"pointer",transition:`background ${bt.motionDurationSlow} ease`,borderRadius:bt.borderRadiusSM,"&-group":{color:bt.colorTextDescription,fontSize:bt.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Tt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Qt}-option-disabled)`]:{backgroundColor:bt.optionActiveBg},[`&-selected:not(${Qt}-option-disabled)`]:{color:bt.optionSelectedColor,fontWeight:bt.optionSelectedFontWeight,backgroundColor:bt.optionSelectedBg,[`${Qt}-option-state`]:{color:bt.colorPrimary}},"&-disabled":{[`&${Qt}-option-selected`]:{backgroundColor:bt.colorBgContainerDisabled},color:bt.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:bt.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Jt.oN)(bt,"slide-up"),(0,Jt.oN)(bt,"slide-down"),(0,ue.Fm)(bt,"move-up"),(0,ue.Fm)(bt,"move-down")]};const ne=2,Xe=bt=>{let{controlHeightSM:Ht,controlHeight:_t,lineWidth:Qt}=bt;const qt=(_t-Ht)/2-Qt,Se=Math.ceil(qt/2);return[qt,Se]};function me(bt,Ht){const{componentCls:_t,iconCls:Qt}=bt,qt=`${_t}-selection-overflow`,Se=bt.multipleSelectItemHeight,[he]=Xe(bt),Re=Ht?`${_t}-${Ht}`:"";return{[`${_t}-multiple${Re}`]:{fontSize:bt.fontSize,[qt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${_t}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${he-ne}px ${ne*2}px`,borderRadius:bt.borderRadius,[`${_t}-show-search&`]:{cursor:"text"},[`${_t}-disabled&`]:{background:bt.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ne}px 0`,lineHeight:`${Se}px`,visibility:"hidden",content:'"\\a0"'}},[` &${_t}-show-arrow ${_t}-selector, &${_t}-allow-clear ${_t}-selector `]:{paddingInlineEnd:bt.fontSizeIcon+bt.controlPaddingHorizontal},[`${_t}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Se,marginTop:ne,marginBottom:ne,lineHeight:`${Se-bt.lineWidth*2}px`,background:bt.multipleItemBg,border:`${bt.lineWidth}px ${bt.lineType} ${bt.multipleItemBorderColor}`,borderRadius:bt.borderRadiusSM,cursor:"default",transition:`font-size ${bt.motionDurationSlow}, line-height ${bt.motionDurationSlow}, height ${bt.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ne*2,paddingInlineStart:bt.paddingXS,paddingInlineEnd:bt.paddingXS/2,[`${_t}-disabled&`]:{color:bt.multipleItemColorDisabled,borderColor:bt.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:bt.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Tt.Ro)()),{display:"inline-flex",alignItems:"center",color:bt.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Qt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:bt.colorIconHover}})},[`${qt}-item + ${qt}-item`]:{[`${_t}-selection-search`]:{marginInlineStart:0}},[`${_t}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:bt.inputPaddingHorizontalBase-he,"\n &-input,\n &-mirror\n ":{height:Se,fontFamily:bt.fontFamily,lineHeight:`${Se}px`,transition:`all ${bt.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${_t}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:bt.inputPaddingHorizontalBase,insetInlineEnd:bt.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${bt.motionDurationSlow}`}}}}var At=bt=>{const{componentCls:Ht}=bt,_t=(0,se.TS)(bt,{controlHeight:bt.controlHeightSM,multipleSelectItemHeight:bt.controlHeightXS,borderRadius:bt.borderRadiusSM,borderRadiusSM:bt.borderRadiusXS}),Qt=(0,se.TS)(bt,{fontSize:bt.fontSizeLG,controlHeight:bt.controlHeightLG,multipleSelectItemHeight:bt.multipleItemHeightLG,borderRadius:bt.borderRadiusLG,borderRadiusSM:bt.borderRadius}),[,qt]=Xe(bt);return[me(bt),me(_t,"sm"),{[`${Ht}-multiple${Ht}-sm`]:{[`${Ht}-selection-placeholder`]:{insetInline:bt.controlPaddingHorizontalSM-bt.lineWidth},[`${Ht}-selection-search`]:{marginInlineStart:qt}}},me(Qt,"lg")]};function et(bt,Ht){const{componentCls:_t,inputPaddingHorizontalBase:Qt,borderRadius:qt}=bt,Se=bt.controlHeight-bt.lineWidth*2,he=Math.ceil(bt.fontSize*1.25),Re=Ht?`${_t}-${Ht}`:"";return{[`${_t}-single${Re}`]:{fontSize:bt.fontSize,[`${_t}-selector`]:Object.assign(Object.assign({},(0,Tt.Wf)(bt)),{display:"flex",borderRadius:qt,[`${_t}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Qt,insetInlineEnd:Qt,bottom:0,"&-input":{width:"100%"}},[` ${_t}-selection-item, ${_t}-selection-placeholder `]:{padding:0,lineHeight:`${Se}px`,transition:`all ${bt.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Se}px`}},[`${_t}-selection-item`]:{position:"relative",userSelect:"none"},[`${_t}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${_t}-selection-item:after`,`${_t}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` &${_t}-show-arrow ${_t}-selection-item, &${_t}-show-arrow ${_t}-selection-placeholder `]:{paddingInlineEnd:he},[`&${_t}-open ${_t}-selection-item`]:{color:bt.colorTextPlaceholder},[`&:not(${_t}-customize-input)`]:{[`${_t}-selector`]:{width:"100%",height:bt.controlHeight,padding:`0 ${Qt}px`,[`${_t}-selection-search-input`]:{height:Se},"&:after":{lineHeight:`${Se}px`}}},[`&${_t}-customize-input`]:{[`${_t}-selector`]:{"&:after":{display:"none"},[`${_t}-selection-search`]:{position:"static",width:"100%"},[`${_t}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Qt}px`,"&:after":{display:"none"}}}}}}}function nt(bt){const{componentCls:Ht}=bt,_t=bt.controlPaddingHorizontalSM-bt.lineWidth;return[et(bt),et((0,se.TS)(bt,{controlHeight:bt.controlHeightSM,borderRadius:bt.borderRadiusSM}),"sm"),{[`${Ht}-single${Ht}-sm`]:{[`&:not(${Ht}-customize-input)`]:{[`${Ht}-selection-search`]:{insetInlineStart:_t,insetInlineEnd:_t},[`${Ht}-selector`]:{padding:`0 ${_t}px`},[`&${Ht}-show-arrow ${Ht}-selection-search`]:{insetInlineEnd:_t+bt.fontSize*1.5},[` &${Ht}-show-arrow ${Ht}-selection-item, &${Ht}-show-arrow ${Ht}-selection-placeholder `]:{paddingInlineEnd:bt.fontSize*1.5}}}},et((0,se.TS)(bt,{controlHeight:bt.singleItemHeightLG,fontSize:bt.fontSizeLG,borderRadius:bt.borderRadiusLG}),"lg")]}const ft=bt=>{const{componentCls:Ht,selectorBg:_t}=bt;return{position:"relative",backgroundColor:_t,border:`${bt.lineWidth}px ${bt.lineType} ${bt.colorBorder}`,transition:`all ${bt.motionDurationMid} ${bt.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ht}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ht}-disabled&`]:{color:bt.colorTextDisabled,background:bt.colorBgContainerDisabled,cursor:"not-allowed",[`${Ht}-multiple&`]:{background:bt.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},lt=function(bt,Ht){let _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Qt,borderHoverColor:qt,outlineColor:Se,antCls:he}=Ht,Re=_t?{[`${Qt}-selector`]:{borderColor:qt}}:{};return{[bt]:{[`&:not(${Qt}-disabled):not(${Qt}-customize-input):not(${he}-pagination-size-changer)`]:Object.assign(Object.assign({},Re),{[`${Qt}-focused& ${Qt}-selector`]:{borderColor:qt,boxShadow:`0 0 0 ${Ht.controlOutlineWidth}px ${Se}`,outline:0},[`&:hover ${Qt}-selector`]:{borderColor:qt}})}}},pt=bt=>{const{componentCls:Ht}=bt;return{[`${Ht}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},vt=bt=>{const{componentCls:Ht,inputPaddingHorizontalBase:_t,iconCls:Qt}=bt;return{[Ht]:Object.assign(Object.assign({},(0,Tt.Wf)(bt)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ht}-customize-input) ${Ht}-selector`]:Object.assign(Object.assign({},ft(bt)),pt(bt)),[`${Ht}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Tt.vS),[`${Ht}-selection-placeholder`]:Object.assign(Object.assign({},Tt.vS),{flex:1,color:bt.colorTextPlaceholder,pointerEvents:"none"}),[`${Ht}-arrow`]:Object.assign(Object.assign({},(0,Tt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,height:bt.fontSizeIcon,marginTop:-bt.fontSizeIcon/2,color:bt.colorTextQuaternary,fontSize:bt.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Qt]:{verticalAlign:"top",transition:`transform ${bt.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ht}-suffix)`]:{pointerEvents:"auto"}},[`${Ht}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ht}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_t,zIndex:1,display:"inline-block",width:bt.fontSizeIcon,height:bt.fontSizeIcon,marginTop:-bt.fontSizeIcon/2,color:bt.colorTextQuaternary,fontSize:bt.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:bt.clearBg,cursor:"pointer",opacity:0,transition:`color ${bt.motionDurationMid} ease, opacity ${bt.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:bt.colorTextTertiary}},"&:hover":{[`${Ht}-clear`]:{opacity:1}}}),[`${Ht}-has-feedback`]:{[`${Ht}-clear`]:{insetInlineEnd:_t+bt.fontSize+bt.paddingXS}}}},wt=bt=>{const{componentCls:Ht}=bt;return[{[Ht]:{[`&-borderless ${Ht}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ht}-in-form-item`]:{width:"100%"}}},vt(bt),nt(bt),At(bt),Pe(bt),{[`${Ht}-rtl`]:{direction:"rtl"}},lt(Ht,(0,se.TS)(bt,{borderHoverColor:bt.colorPrimaryHover,outlineColor:bt.controlOutline})),lt(`${Ht}-status-error`,(0,se.TS)(bt,{borderHoverColor:bt.colorErrorHover,outlineColor:bt.colorErrorOutline}),!0),lt(`${Ht}-status-warning`,(0,se.TS)(bt,{borderHoverColor:bt.colorWarningHover,outlineColor:bt.colorWarningOutline}),!0),(0,de.c)(bt,{borderElCls:`${Ht}-selector`,focusElCls:`${Ht}-focused`})]};var Nt=(0,je.Z)("Select",(bt,Ht)=>{let{rootPrefixCls:_t}=Ht;const Qt=(0,se.TS)(bt,{rootPrefixCls:_t,inputPaddingHorizontalBase:bt.paddingSM-1,multipleSelectItemHeight:bt.multipleItemHeight});return[wt(Qt)]},bt=>{const{fontSize:Ht,lineHeight:_t,controlHeight:Qt,controlPaddingHorizontal:qt,zIndexPopupBase:Se,colorText:he,fontWeightStrong:Re,controlItemBgActive:pe,controlItemBgHover:Ke,colorBgContainer:Cn,colorFillSecondary:ln,controlHeightLG:dn,controlHeightSM:Hn,colorBgContainerDisabled:ae,colorTextDisabled:Ut}=bt;return{zIndexPopup:Se+50,optionSelectedColor:he,optionSelectedFontWeight:Re,optionSelectedBg:pe,optionActiveBg:Ke,optionPadding:`${(Qt-Ht*_t)/2}px ${qt}px`,optionFontSize:Ht,optionLineHeight:_t,optionHeight:Qt,selectorBg:Cn,clearBg:Cn,singleItemHeightLG:dn,multipleItemBg:ln,multipleItemBorderColor:"transparent",multipleItemHeight:Hn,multipleItemHeightLG:Qt,multipleSelectorBgDisabled:ae,multipleItemColorDisabled:Ut,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return de}});const Tt=se=>{const Jt={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:se==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Jt),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Jt),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Jt),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Jt),{points:["br","tr"],offset:[0,-4]})}};function de(se,je){return se||Tt(je)}},84443:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Tt}});function Tt(de,se){return se!==void 0?se:de!==null}},66339:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});var Tt=Ot(40001),de=Ot(19248),se=Ot(99267),je=Ot(84105),Jt=Ot(58617),ue=Ot(47472),ie=Ot(59301);function Ve(Pe){let{suffixIcon:ne,clearIcon:Xe,menuItemSelectedIcon:me,removeIcon:an,loading:At,multiple:et,hasFeedback:nt,prefixCls:ft,showSuffixIcon:lt,feedbackIcon:pt,showArrow:vt,componentName:wt}=Pe;const Nt=Xe!=null?Xe:ie.createElement(de.Z,null),bt=qt=>ne===null&&!nt&&!vt?null:ie.createElement(ie.Fragment,null,lt!==!1&&qt,nt&&pt);let Ht=null;if(ne!==void 0)Ht=bt(ne);else if(At)Ht=bt(ie.createElement(Jt.Z,{spin:!0}));else{const qt=`${ft}-suffix`;Ht=Se=>{let{open:he,showSearch:Re}=Se;return bt(he&&Re?ie.createElement(ue.Z,{className:qt}):ie.createElement(je.Z,{className:qt}))}}let _t=null;me!==void 0?_t=me:et?_t=ie.createElement(Tt.Z,null):_t=null;let Qt=null;return an!==void 0?Qt=an:Qt=ie.createElement(se.Z,null),{clearIcon:Nt,suffixIcon:Ht,itemIcon:_t,removeIcon:Qt}}},81327:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return ft}});var Tt=Ot(59301),de=Ot(92310),se=Ot.n(de),je=Ot(11592),Jt=Ot(36355),ue=Ot(33234);const ie=Tt.createContext({latestIndex:0}),Ve=ie.Provider;var ne=lt=>{let{className:pt,index:vt,children:wt,split:Nt,style:bt}=lt;const{latestIndex:Ht}=Tt.useContext(ie);return wt==null?null:Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{className:pt,style:bt},wt),vt{var vt,wt;const{getPrefixCls:Nt,space:bt,direction:Ht}=Tt.useContext(Jt.E_),{size:_t=(bt==null?void 0:bt.size)||"small",align:Qt,className:qt,rootClassName:Se,children:he,direction:Re="horizontal",prefixCls:pe,split:Ke,style:Cn,wrap:ln=!1,classNames:dn,styles:Hn}=lt,ae=At(lt,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ut,hn]=Array.isArray(_t)?_t:[_t,_t],Qn=me(hn),ti=me(Ut),Oe=an(hn),en=an(Ut),mn=(0,je.Z)(he,{keepEmpty:!0}),Yn=Qt===void 0&&Re==="horizontal"?"center":Qt,Pn=Nt("space",pe),[Un,le]=(0,Xe.Z)(Pn),jn=se()(Pn,bt==null?void 0:bt.className,le,`${Pn}-${Re}`,{[`${Pn}-rtl`]:Ht==="rtl",[`${Pn}-align-${Yn}`]:Yn,[`${Pn}-gap-row-${hn}`]:Qn,[`${Pn}-gap-col-${Ut}`]:ti},qt,Se),pi=se()(`${Pn}-item`,(vt=dn==null?void 0:dn.item)!==null&&vt!==void 0?vt:(wt=bt==null?void 0:bt.classNames)===null||wt===void 0?void 0:wt.item);let Dt=0;const Lt=mn.map((Gt,kt)=>{var ye,Le;Gt!=null&&(Dt=kt);const xn=Gt&&Gt.key||`${pi}-${kt}`;return Tt.createElement(ne,{className:pi,key:xn,index:kt,split:Ke,style:(ye=Hn==null?void 0:Hn.item)!==null&&ye!==void 0?ye:(Le=bt==null?void 0:bt.styles)===null||Le===void 0?void 0:Le.item},Gt)}),xt=Tt.useMemo(()=>({latestIndex:Dt}),[Dt]);if(mn.length===0)return null;const Ft={};return ln&&(Ft.flexWrap="wrap"),!ti&&en&&(Ft.columnGap=Ut),!Qn&&Oe&&(Ft.rowGap=hn),Un(Tt.createElement("div",Object.assign({ref:pt,className:jn,style:Object.assign(Object.assign(Object.assign({},Ft),bt==null?void 0:bt.style),Cn)},ae),Tt.createElement(Ve,{value:xt},Lt)))});nt.Compact=ue.ZP;var ft=nt},78673:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Re}});var Tt=Ot(58617),de=Ot(92310),se=Ot.n(de),je=Ot(96663),Jt=Ot(90493),ue=Ot(72071),ie=Ot(6620),Ve=Ot(59301),Pe=Ot(18929),ne=Ot(10228),Xe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],me=Ve.forwardRef(function(pe,Ke){var Cn,ln=pe.prefixCls,dn=ln===void 0?"rc-switch":ln,Hn=pe.className,ae=pe.checked,Ut=pe.defaultChecked,hn=pe.disabled,Qn=pe.loadingIcon,ti=pe.checkedChildren,Oe=pe.unCheckedChildren,en=pe.onClick,mn=pe.onChange,Yn=pe.onKeyDown,Pn=(0,ie.Z)(pe,Xe),Un=(0,Pe.Z)(!1,{value:ae,defaultValue:Ut}),le=(0,ue.Z)(Un,2),jn=le[0],pi=le[1];function Dt(Gt,kt){var ye=jn;return hn||(ye=Gt,pi(ye),mn==null||mn(ye,kt)),ye}function Lt(Gt){Gt.which===ne.Z.LEFT?Dt(!1,Gt):Gt.which===ne.Z.RIGHT&&Dt(!0,Gt),Yn==null||Yn(Gt)}function xt(Gt){var kt=Dt(!jn,Gt);en==null||en(kt,Gt)}var Ft=se()(dn,Hn,(Cn={},(0,Jt.Z)(Cn,"".concat(dn,"-checked"),jn),(0,Jt.Z)(Cn,"".concat(dn,"-disabled"),hn),Cn));return Ve.createElement("button",(0,je.Z)({},Pn,{type:"button",role:"switch","aria-checked":jn,disabled:hn,className:Ft,ref:Ke,onKeyDown:Lt,onClick:xt}),Qn,Ve.createElement("span",{className:"".concat(dn,"-inner")},Ve.createElement("span",{className:"".concat(dn,"-inner-checked")},ti),Ve.createElement("span",{className:"".concat(dn,"-inner-unchecked")},Oe)))});me.displayName="Switch";var an=me,At=Ot(14088),et=Ot(36355),nt=Ot(1684),ft=Ot(19716),lt=Ot(64993),pt=Ot(17313),vt=Ot(83116),wt=Ot(37613);const Nt=pe=>{const{componentCls:Ke,trackHeightSM:Cn,trackPadding:ln,trackMinWidthSM:dn,innerMinMarginSM:Hn,innerMaxMarginSM:ae,handleSizeSM:Ut}=pe,hn=`${Ke}-inner`;return{[Ke]:{[`&${Ke}-small`]:{minWidth:dn,height:Cn,lineHeight:`${Cn}px`,[`${Ke}-inner`]:{paddingInlineStart:ae,paddingInlineEnd:Hn,[`${hn}-checked`]:{marginInlineStart:`calc(-100% + ${Ut+ln*2}px - ${ae*2}px)`,marginInlineEnd:`calc(100% - ${Ut+ln*2}px + ${ae*2}px)`},[`${hn}-unchecked`]:{marginTop:-Cn,marginInlineStart:0,marginInlineEnd:0}},[`${Ke}-handle`]:{width:Ut,height:Ut},[`${Ke}-loading-icon`]:{top:(Ut-pe.switchLoadingIconSize)/2,fontSize:pe.switchLoadingIconSize},[`&${Ke}-checked`]:{[`${Ke}-inner`]:{paddingInlineStart:Hn,paddingInlineEnd:ae,[`${hn}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${hn}-unchecked`]:{marginInlineStart:`calc(100% - ${Ut+ln*2}px + ${ae*2}px)`,marginInlineEnd:`calc(-100% + ${Ut+ln*2}px - ${ae*2}px)`}},[`${Ke}-handle`]:{insetInlineStart:`calc(100% - ${Ut+ln}px)`}},[`&:not(${Ke}-disabled):active`]:{[`&:not(${Ke}-checked) ${hn}`]:{[`${hn}-unchecked`]:{marginInlineStart:pe.marginXXS/2,marginInlineEnd:-pe.marginXXS/2}},[`&${Ke}-checked ${hn}`]:{[`${hn}-checked`]:{marginInlineStart:-pe.marginXXS/2,marginInlineEnd:pe.marginXXS/2}}}}}}},bt=pe=>{const{componentCls:Ke,handleSize:Cn}=pe;return{[Ke]:{[`${Ke}-loading-icon${pe.iconCls}`]:{position:"relative",top:(Cn-pe.fontSize)/2,color:pe.switchLoadingIconColor,verticalAlign:"top"},[`&${Ke}-checked ${Ke}-loading-icon`]:{color:pe.switchColor}}}},Ht=pe=>{const{componentCls:Ke,motion:Cn,trackPadding:ln,handleBg:dn,handleShadow:Hn,handleSize:ae}=pe,Ut=`${Ke}-handle`;return{[Ke]:{[Ut]:{position:"absolute",top:ln,insetInlineStart:ln,width:ae,height:ae,transition:`all ${pe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:dn,borderRadius:ae/2,boxShadow:Hn,transition:`all ${pe.switchDuration} ease-in-out`,content:'""'}},[`&${Ke}-checked ${Ut}`]:{insetInlineStart:`calc(100% - ${ae+ln}px)`},[`&:not(${Ke}-disabled):active`]:Cn?{[`${Ut}::before`]:{insetInlineEnd:pe.switchHandleActiveInset,insetInlineStart:0},[`&${Ke}-checked ${Ut}::before`]:{insetInlineEnd:0,insetInlineStart:pe.switchHandleActiveInset}}:{}}}},_t=pe=>{const{componentCls:Ke,trackHeight:Cn,trackPadding:ln,innerMinMargin:dn,innerMaxMargin:Hn,handleSize:ae}=pe,Ut=`${Ke}-inner`;return{[Ke]:{[Ut]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Hn,paddingInlineEnd:dn,transition:`padding-inline-start ${pe.switchDuration} ease-in-out, padding-inline-end ${pe.switchDuration} ease-in-out`,[`${Ut}-checked, ${Ut}-unchecked`]:{display:"block",color:pe.colorTextLightSolid,fontSize:pe.fontSizeSM,transition:`margin-inline-start ${pe.switchDuration} ease-in-out, margin-inline-end ${pe.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ut}-checked`]:{marginInlineStart:`calc(-100% + ${ae+ln*2}px - ${Hn*2}px)`,marginInlineEnd:`calc(100% - ${ae+ln*2}px + ${Hn*2}px)`},[`${Ut}-unchecked`]:{marginTop:-Cn,marginInlineStart:0,marginInlineEnd:0}},[`&${Ke}-checked ${Ut}`]:{paddingInlineStart:dn,paddingInlineEnd:Hn,[`${Ut}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ut}-unchecked`]:{marginInlineStart:`calc(100% - ${ae+ln*2}px + ${Hn*2}px)`,marginInlineEnd:`calc(-100% + ${ae+ln*2}px - ${Hn*2}px)`}},[`&:not(${Ke}-disabled):active`]:{[`&:not(${Ke}-checked) ${Ut}`]:{[`${Ut}-unchecked`]:{marginInlineStart:ln*2,marginInlineEnd:-ln*2}},[`&${Ke}-checked ${Ut}`]:{[`${Ut}-checked`]:{marginInlineStart:-ln*2,marginInlineEnd:ln*2}}}}}},Qt=pe=>{const{componentCls:Ke,trackHeight:Cn,trackMinWidth:ln}=pe;return{[Ke]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,pt.Wf)(pe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:ln,height:Cn,lineHeight:`${Cn}px`,verticalAlign:"middle",background:pe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${pe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ke}-disabled)`]:{background:pe.colorTextTertiary}}),(0,pt.Qy)(pe)),{[`&${Ke}-checked`]:{background:pe.switchColor,[`&:hover:not(${Ke}-disabled)`]:{background:pe.colorPrimaryHover}},[`&${Ke}-loading, &${Ke}-disabled`]:{cursor:"not-allowed",opacity:pe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ke}-rtl`]:{direction:"rtl"}})}};var qt=(0,vt.Z)("Switch",pe=>{const Ke=(0,wt.TS)(pe,{switchDuration:pe.motionDurationMid,switchColor:pe.colorPrimary,switchDisabledOpacity:pe.opacityLoading,switchLoadingIconSize:pe.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${pe.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Qt(Ke),_t(Ke),Ht(Ke),bt(Ke),Nt(Ke)]},pe=>{const{fontSize:Ke,lineHeight:Cn,controlHeight:ln,colorWhite:dn}=pe,Hn=Ke*Cn,ae=ln/2,Ut=2,hn=Hn-Ut*2,Qn=ae-Ut*2;return{trackHeight:Hn,trackHeightSM:ae,trackMinWidth:hn*2+Ut*4,trackMinWidthSM:Qn*2+Ut*2,trackPadding:Ut,handleBg:dn,handleSize:hn,handleSizeSM:Qn,handleShadow:`0 2px 4px 0 ${new lt.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:hn/2,innerMaxMargin:hn+Ut+Ut*2,innerMinMarginSM:Qn/2,innerMaxMarginSM:Qn+Ut+Ut*2}}),Se=function(pe,Ke){var Cn={};for(var ln in pe)Object.prototype.hasOwnProperty.call(pe,ln)&&Ke.indexOf(ln)<0&&(Cn[ln]=pe[ln]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dn=0,ln=Object.getOwnPropertySymbols(pe);dn{const{prefixCls:Cn,size:ln,disabled:dn,loading:Hn,className:ae,rootClassName:Ut,style:hn}=pe,Qn=Se(pe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:ti,direction:Oe,switch:en}=Ve.useContext(et.E_),mn=Ve.useContext(nt.Z),Yn=(dn!=null?dn:mn)||Hn,Pn=ti("switch",Cn),Un=Ve.createElement("div",{className:`${Pn}-handle`},Hn&&Ve.createElement(Tt.Z,{className:`${Pn}-loading-icon`})),[le,jn]=qt(Pn),pi=(0,ft.Z)(ln),Dt=se()(en==null?void 0:en.className,{[`${Pn}-small`]:pi==="small",[`${Pn}-loading`]:Hn,[`${Pn}-rtl`]:Oe==="rtl"},ae,Ut,jn),Lt=Object.assign(Object.assign({},en==null?void 0:en.style),hn);return le(Ve.createElement(At.Z,{component:"Switch"},Ve.createElement(an,Object.assign({},Qn,{prefixCls:Pn,className:Dt,style:Lt,disabled:Yn,ref:Ke,loadingIcon:Un}))))});he.__ANT_SWITCH=!0;var Re=he},54580:function(Ln,En,Ot){"use strict";Ot.d(En,{default:function(){return Be}});var Tt=Ot(59301),de=Ot(19127),se=Ot(92310),je=Ot.n(se),Jt=Ot(96663),ue=Ot(52884),ie=Ot(95727),Ve=Ot(65711),Pe=Ot(85745),ne=Ot(90493),Xe=Ot(6620),me=Ot(49581),an=Ot(20135),At=Ot(73324),et=Ot(26112);function nt(ge,Ne){var De="cannot ".concat(ge.method," ").concat(ge.action," ").concat(Ne.status,"'"),Te=new Error(De);return Te.status=Ne.status,Te.method=ge.method,Te.url=ge.action,Te}function ft(ge){var Ne=ge.responseText||ge.response;if(!Ne)return Ne;try{return JSON.parse(Ne)}catch(De){return Ne}}function lt(ge){var Ne=new XMLHttpRequest;ge.onProgress&&Ne.upload&&(Ne.upload.onprogress=function(He){He.total>0&&(He.percent=He.loaded/He.total*100),ge.onProgress(He)});var De=new FormData;ge.data&&Object.keys(ge.data).forEach(function(Ze){var He=ge.data[Ze];if(Array.isArray(He)){He.forEach(function(nn){De.append("".concat(Ze,"[]"),nn)});return}De.append(Ze,He)}),ge.file instanceof Blob?De.append(ge.filename,ge.file,ge.file.name):De.append(ge.filename,ge.file),Ne.onerror=function(He){ge.onError(He)},Ne.onload=function(){return Ne.status<200||Ne.status>=300?ge.onError(nt(ge,Ne),ft(Ne)):ge.onSuccess(ft(Ne),Ne)},Ne.open(ge.method,ge.action,!0),ge.withCredentials&&"withCredentials"in Ne&&(Ne.withCredentials=!0);var Te=ge.headers||{};return Te["X-Requested-With"]!==null&&Ne.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Te).forEach(function(Ze){Te[Ze]!==null&&Ne.setRequestHeader(Ze,Te[Ze])}),Ne.send(De),{abort:function(){Ne.abort()}}}var pt=+new Date,vt=0;function wt(){return"rc-upload-".concat(pt,"-").concat(++vt)}var Nt=Ot(48736),bt=function(ge,Ne){if(ge&&Ne){var De=Array.isArray(Ne)?Ne:Ne.split(","),Te=ge.name||"",Ze=ge.type||"",He=Ze.replace(/\/.*$/,"");return De.some(function(nn){var sn=nn.trim();if(/^\*(\/\*)?$/.test(nn))return!0;if(sn.charAt(0)==="."){var Xn=Te.toLowerCase(),xe=sn.toLowerCase(),ni=[xe];return(xe===".jpg"||xe===".jpeg")&&(ni=[".jpg",".jpeg"]),ni.some(function(vi){return Xn.endsWith(vi)})}return/\/\*$/.test(sn)?He===sn.replace(/\/.*$/,""):Ze===sn?!0:/^\w+$/.test(sn)?((0,Nt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(sn,"'.Skip for check.")),!0):!1})}return!0};function Ht(ge,Ne){var De=ge.createReader(),Te=[];function Ze(){De.readEntries(function(He){var nn=Array.prototype.slice.apply(He);Te=Te.concat(nn);var sn=!nn.length;sn?Ne(Te):Ze()})}Ze()}var _t=function(Ne,De,Te){var Ze=function He(nn,sn){nn&&(nn.path=sn||"",nn.isFile?nn.file(function(Xn){Te(Xn)&&(nn.fullPath&&!Xn.webkitRelativePath&&(Object.defineProperties(Xn,{webkitRelativePath:{writable:!0}}),Xn.webkitRelativePath=nn.fullPath.replace(/^\//,""),Object.defineProperties(Xn,{webkitRelativePath:{writable:!1}})),De([Xn]))}):nn.isDirectory&&Ht(nn,function(Xn){Xn.forEach(function(xe){He(xe,"".concat(sn).concat(nn.name,"/"))})}))};Ne.forEach(function(He){Ze(He.webkitGetAsEntry())})},Qt=_t,qt=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Se=function(ge){(0,Ve.Z)(De,ge);var Ne=(0,Pe.Z)(De);function De(){var Te;(0,ue.Z)(this,De);for(var Ze=arguments.length,He=new Array(Ze),nn=0;nn{let{uid:He}=Ze;return He===ge.uid});return Te===-1?De.push(ge):De[Te]=ge,De}function rn(ge,Ne){const De=ge.uid!==void 0?"uid":"name";return Ne.filter(Te=>Te[De]===ge[De])[0]}function Dn(ge,Ne){const De=ge.uid!==void 0?"uid":"name",Te=Ne.filter(Ze=>Ze[De]!==ge[De]);return Te.length===Ne.length?null:Te}const Zn=function(){const Ne=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Te=Ne[Ne.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Te)||[""])[0]},yn=ge=>ge.indexOf("image/")===0,Ei=ge=>{if(ge.type&&!ge.thumbUrl)return yn(ge.type);const Ne=ge.thumbUrl||ge.url||"",De=Zn(Ne);return/^data:image\//.test(Ne)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(De)?!0:!(/^data:/.test(Ne)||De)},hi=200;function We(ge){return new Promise(Ne=>{if(!ge.type||!yn(ge.type)){Ne("");return}const De=document.createElement("canvas");De.width=hi,De.height=hi,De.style.cssText=`position: fixed; left: 0; top: 0; width: ${hi}px; height: ${hi}px; z-index: 9999; display: none;`,document.body.appendChild(De);const Te=De.getContext("2d"),Ze=new Image;if(Ze.onload=()=>{const{width:He,height:nn}=Ze;let sn=hi,Xn=hi,xe=0,ni=0;He>nn?(Xn=nn*(hi/He),ni=-(Xn-sn)/2):(sn=He*(hi/nn),xe=-(sn-Xn)/2),Te.drawImage(Ze,xe,ni,sn,Xn);const vi=De.toDataURL();document.body.removeChild(De),window.URL.revokeObjectURL(Ze.src),Ne(vi)},Ze.crossOrigin="anonymous",ge.type.startsWith("image/svg+xml")){const He=new FileReader;He.onload=()=>{He.result&&(Ze.src=He.result)},He.readAsDataURL(ge)}else if(ge.type.startsWith("image/gif")){const He=new FileReader;He.onload=()=>{He.result&&Ne(He.result)},He.readAsDataURL(ge)}else Ze.src=window.URL.createObjectURL(ge)})}var gn=Ot(26227),Nn=Ot(41464),_n=Ot(15277),Jn=Ot(93948),xi=Ot(6848),bi=Tt.forwardRef((ge,Ne)=>{let{prefixCls:De,className:Te,style:Ze,locale:He,listType:nn,file:sn,items:Xn,progress:xe,iconRender:ni,actionIconRender:vi,itemRender:ii,isImgUrl:Ce,showPreviewIcon:Sn,showRemoveIcon:An,showDownloadIcon:$n,previewIcon:Gn,removeIcon:di,downloadIcon:Pi,onPreview:si,onDownload:Vn,onClose:yi}=ge;var Ie,Yi;const{status:Ge}=sn,[Ti,bo]=Tt.useState(Ge);Tt.useEffect(()=>{Ge!=="removed"&&bo(Ge)},[Ge]);const[Xi,Ro]=Tt.useState(!1);Tt.useEffect(()=>{const Fo=setTimeout(()=>{Ro(!0)},300);return()=>{clearTimeout(Fo)}},[]);const vo=ni(sn);let ui=Tt.createElement("div",{className:`${De}-icon`},vo);if(nn==="picture"||nn==="picture-card"||nn==="picture-circle")if(Ti==="uploading"||!sn.thumbUrl&&!sn.url){const Fo=je()(`${De}-list-item-thumbnail`,{[`${De}-list-item-file`]:Ti!=="uploading"});ui=Tt.createElement("div",{className:Fo},vo)}else{const Fo=Ce!=null&&Ce(sn)?Tt.createElement("img",{src:sn.thumbUrl||sn.url,alt:sn.name,className:`${De}-list-item-image`,crossOrigin:sn.crossOrigin}):vo,ai=je()(`${De}-list-item-thumbnail`,{[`${De}-list-item-file`]:Ce&&!Ce(sn)});ui=Tt.createElement("a",{className:ai,onClick:li=>si(sn,li),href:sn.url||sn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Fo)}const oi=je()(`${De}-list-item`,`${De}-list-item-${Ti}`),Ri=typeof sn.linkProps=="string"?JSON.parse(sn.linkProps):sn.linkProps,Ji=An?vi((typeof di=="function"?di(sn):di)||Tt.createElement(gn.Z,null),()=>yi(sn),De,He.removeFile):null,On=$n&&Ti==="done"?vi((typeof Pi=="function"?Pi(sn):Pi)||Tt.createElement(Nn.Z,null),()=>Vn(sn),De,He.downloadFile):null,It=nn!=="picture-card"&&nn!=="picture-circle"&&Tt.createElement("span",{key:"download-delete",className:je()(`${De}-list-item-actions`,{picture:nn==="picture"})},On,Ji),Wi=je()(`${De}-list-item-name`),Mo=sn.url?[Tt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Wi,title:sn.name},Ri,{href:sn.url,onClick:Fo=>si(sn,Fo)}),sn.name),It]:[Tt.createElement("span",{key:"view",className:Wi,onClick:Fo=>si(sn,Fo),title:sn.name},sn.name),It],ji={pointerEvents:"none",opacity:.5},mo=Sn?Tt.createElement("a",{href:sn.url||sn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:sn.url||sn.thumbUrl?void 0:ji,onClick:Fo=>si(sn,Fo),title:He.previewFile},typeof Gn=="function"?Gn(sn):Gn||Tt.createElement(_n.Z,null)):null,Wo=(nn==="picture-card"||nn==="picture-circle")&&Ti!=="uploading"&&Tt.createElement("span",{className:`${De}-list-item-actions`},mo,Ti==="done"&&On,Ji),{getPrefixCls:wi}=Tt.useContext(Hn.E_),Ci=wi(),Hi=Tt.createElement("div",{className:oi},ui,Mo,Wo,Xi&&Tt.createElement(ye.default,{motionName:`${Ci}-fade`,visible:Ti==="uploading",motionDeadline:2e3},Fo=>{let{className:ai}=Fo;const li="percent"in sn?Tt.createElement(Jn.Z,Object.assign({},xe,{type:"line",percent:sn.percent,"aria-label":sn["aria-label"],"aria-labelledby":sn["aria-labelledby"]})):null;return Tt.createElement("div",{className:je()(`${De}-list-item-progress`,ai)},li)})),Oi=sn.response&&typeof sn.response=="string"?sn.response:((Ie=sn.error)===null||Ie===void 0?void 0:Ie.statusText)||((Yi=sn.error)===null||Yi===void 0?void 0:Yi.message)||He.uploadError,po=Ti==="error"?Tt.createElement(xi.Z,{title:Oi,getPopupContainer:Fo=>Fo.parentNode},Hi):Hi;return Tt.createElement("div",{className:je()(`${De}-list-item-container`,Te),style:Ze,ref:Ne},ii?ii(po,sn,Xn,{download:Vn.bind(null,sn),preview:si.bind(null,sn),remove:yi.bind(null,sn)}):po)});const Ii=(ge,Ne)=>{const{listType:De="text",previewFile:Te=We,onPreview:Ze,onDownload:He,onRemove:nn,locale:sn,iconRender:Xn,isImageUrl:xe=Ei,prefixCls:ni,items:vi=[],showPreviewIcon:ii=!0,showRemoveIcon:Ce=!0,showDownloadIcon:Sn=!1,removeIcon:An,previewIcon:$n,downloadIcon:Gn,progress:di={size:[-1,2],showInfo:!1},appendAction:Pi,appendActionVisible:si=!0,itemRender:Vn,disabled:yi}=ge,Ie=(0,Le.Z)(),[Yi,Ge]=Tt.useState(!1);Tt.useEffect(()=>{De!=="picture"&&De!=="picture-card"&&De!=="picture-circle"||(vi||[]).forEach(ji=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(ji.originFileObj instanceof File||ji.originFileObj instanceof Blob)||ji.thumbUrl!==void 0||(ji.thumbUrl="",Te&&Te(ji.originFileObj).then(mo=>{ji.thumbUrl=mo||"",Ie()}))})},[De,vi,Te]),Tt.useEffect(()=>{Ge(!0)},[]);const Ti=(ji,mo)=>{if(Ze)return mo==null||mo.preventDefault(),Ze(ji)},bo=ji=>{typeof He=="function"?He(ji):ji.url&&window.open(ji.url)},Xi=ji=>{nn==null||nn(ji)},Ro=ji=>{if(Xn)return Xn(ji,De);const mo=ji.status==="uploading",Wo=xe&&xe(ji)?Tt.createElement(kt,null):Tt.createElement(Yn,null);let wi=mo?Tt.createElement(Pn.Z,null):Tt.createElement(Dt,null);return De==="picture"?wi=mo?Tt.createElement(Pn.Z,null):Wo:(De==="picture-card"||De==="picture-circle")&&(wi=mo?sn.uploading:Wo),wi},vo=(ji,mo,Wo,wi)=>{const Ci={type:"text",size:"small",title:wi,onClick:Hi=>{mo(),(0,cn.l$)(ji)&&ji.props.onClick&&ji.props.onClick(Hi)},className:`${Wo}-list-item-action`,disabled:yi};if((0,cn.l$)(ji)){const Hi=(0,cn.Tm)(ji,Object.assign(Object.assign({},ji.props),{onClick:()=>{}}));return Tt.createElement(Ee.ZP,Object.assign({},Ci,{icon:Hi}))}return Tt.createElement(Ee.ZP,Object.assign({},Ci),Tt.createElement("span",null,ji))};Tt.useImperativeHandle(Ne,()=>({handlePreview:Ti,handleDownload:bo}));const{getPrefixCls:ui}=Tt.useContext(Hn.E_),oi=ui("upload",ni),Ri=ui(),Ji=je()(`${oi}-list`,`${oi}-list-${De}`),On=(0,de.Z)(vi.map(ji=>({key:ji.uid,file:ji})));let Wi={motionDeadline:2e3,motionName:`${oi}-${De==="picture-card"||De==="picture-circle"?"animate-inline":"animate"}`,keys:On,motionAppear:Yi};const Mo=Tt.useMemo(()=>{const ji=Object.assign({},(0,xn.Z)(Ri));return delete ji.onAppearEnd,delete ji.onEnterEnd,delete ji.onLeaveEnd,ji},[Ri]);return De!=="picture-card"&&De!=="picture-circle"&&(Wi=Object.assign(Object.assign({},Mo),Wi)),Tt.createElement("div",{className:Ji},Tt.createElement(ye.CSSMotionList,Object.assign({},Wi,{component:!1}),ji=>{let{key:mo,file:Wo,className:wi,style:Ci}=ji;return Tt.createElement(bi,{key:mo,locale:sn,prefixCls:oi,className:wi,style:Ci,file:Wo,items:vi,progress:di,listType:De,isImgUrl:xe,showPreviewIcon:ii,showRemoveIcon:Ce,showDownloadIcon:Sn,removeIcon:An,previewIcon:$n,downloadIcon:Gn,iconRender:Ro,actionIconRender:vo,itemRender:Vn,onPreview:Ti,onDownload:bo,onClose:Xi})}),Pi&&Tt.createElement(ye.default,Object.assign({},Wi,{visible:si,forceRender:!0}),ji=>{let{className:mo,style:Wo}=ji;return(0,cn.Tm)(Pi,wi=>({className:je()(wi.className,mo),style:Object.assign(Object.assign(Object.assign({},Wo),{pointerEvents:mo?"none":void 0}),wi.style)}))}))};var qi=Tt.forwardRef(Ii),io=Ot(17313),Ao=Ot(8378),wo=Ot(83116),Do=Ot(37613),Li=ge=>{const{componentCls:Ne,iconCls:De}=ge;return{[`${Ne}-wrapper`]:{[`${Ne}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:ge.colorFillAlter,border:`${ge.lineWidth}px dashed ${ge.colorBorder}`,borderRadius:ge.borderRadiusLG,cursor:"pointer",transition:`border-color ${ge.motionDurationSlow}`,[Ne]:{padding:`${ge.padding}px 0`},[`${Ne}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${Ne}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${Ne}-disabled):hover`]:{borderColor:ge.colorPrimaryHover},[`p${Ne}-drag-icon`]:{marginBottom:ge.margin,[De]:{color:ge.colorPrimary,fontSize:ge.uploadThumbnailSize}},[`p${Ne}-text`]:{margin:`0 0 ${ge.marginXXS}px`,color:ge.colorTextHeading,fontSize:ge.fontSizeLG},[`p${Ne}-hint`]:{color:ge.colorTextDescription,fontSize:ge.fontSize},[`&${Ne}-disabled`]:{cursor:"not-allowed",[`p${Ne}-drag-icon ${De}, p${Ne}-text, p${Ne}-hint `]:{color:ge.colorTextDisabled}}}}}},Co=ge=>{const{componentCls:Ne,antCls:De,iconCls:Te,fontSize:Ze,lineHeight:He}=ge,nn=`${Ne}-list-item`,sn=`${nn}-actions`,Xn=`${nn}-action`,xe=Math.round(Ze*He);return{[`${Ne}-wrapper`]:{[`${Ne}-list`]:Object.assign(Object.assign({},(0,io.dF)()),{lineHeight:ge.lineHeight,[nn]:{position:"relative",height:ge.lineHeight*Ze,marginTop:ge.marginXS,fontSize:Ze,display:"flex",alignItems:"center",transition:`background-color ${ge.motionDurationSlow}`,"&:hover":{backgroundColor:ge.controlItemBgHover},[`${nn}-name`]:Object.assign(Object.assign({},io.vS),{padding:`0 ${ge.paddingXS}px`,lineHeight:He,flex:"auto",transition:`all ${ge.motionDurationSlow}`}),[sn]:{[Xn]:{opacity:0},[`${Xn}${De}-btn-sm`]:{height:xe,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${Xn}:focus-visible, &.picture ${Xn} `]:{opacity:1},[Te]:{color:ge.actionsColor,transition:`all ${ge.motionDurationSlow}`},[`&:hover ${Te}`]:{color:ge.colorText}},[`${Ne}-icon ${Te}`]:{color:ge.colorTextDescription,fontSize:Ze},[`${nn}-progress`]:{position:"absolute",bottom:-ge.uploadProgressOffset,width:"100%",paddingInlineStart:Ze+ge.paddingXS,fontSize:Ze,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${nn}:hover ${Xn}`]:{opacity:1,color:ge.colorText},[`${nn}-error`]:{color:ge.colorError,[`${nn}-name, ${Ne}-icon ${Te}`]:{color:ge.colorError},[sn]:{[`${Te}, ${Te}:hover`]:{color:ge.colorError},[Xn]:{opacity:1}}},[`${Ne}-list-item-container`]:{transition:`opacity ${ge.motionDurationSlow}, height ${ge.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},$i=Ot(93083),Qi=Ot(1950);const Jo=new $i.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Qo=new $i.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Lo=ge=>{const{componentCls:Ne}=ge,De=`${Ne}-animate-inline`;return[{[`${Ne}-wrapper`]:{[`${De}-appear, ${De}-enter, ${De}-leave`]:{animationDuration:ge.motionDurationSlow,animationTimingFunction:ge.motionEaseInOutCirc,animationFillMode:"forwards"},[`${De}-appear, ${De}-enter`]:{animationName:Jo},[`${De}-leave`]:{animationName:Qo}}},{[`${Ne}-wrapper`]:(0,Qi.J$)(ge)},Jo,Qo]},Io=Ot(93398),be=Ot(64993);const Me=ge=>{const{componentCls:Ne,iconCls:De,uploadThumbnailSize:Te,uploadProgressOffset:Ze}=ge,He=`${Ne}-list`,nn=`${He}-item`;return{[`${Ne}-wrapper`]:{[` ${He}${He}-picture, ${He}${He}-picture-card, ${He}${He}-picture-circle `]:{[nn]:{position:"relative",height:Te+ge.lineWidth*2+ge.paddingXS*2,padding:ge.paddingXS,border:`${ge.lineWidth}px ${ge.lineType} ${ge.colorBorder}`,borderRadius:ge.borderRadiusLG,"&:hover":{background:"transparent"},[`${nn}-thumbnail`]:Object.assign(Object.assign({},io.vS),{width:Te,height:Te,lineHeight:`${Te+ge.paddingSM}px`,textAlign:"center",flex:"none",[De]:{fontSize:ge.fontSizeHeading2,color:ge.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${nn}-progress`]:{bottom:Ze,width:`calc(100% - ${ge.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Te+ge.paddingXS}},[`${nn}-error`]:{borderColor:ge.colorError,[`${nn}-thumbnail ${De}`]:{[`svg path[fill='${Io.blue[0]}']`]:{fill:ge.colorErrorBg},[`svg path[fill='${Io.blue.primary}']`]:{fill:ge.colorError}}},[`${nn}-uploading`]:{borderStyle:"dashed",[`${nn}-name`]:{marginBottom:Ze}}},[`${He}${He}-picture-circle ${nn}`]:{[`&, &::before, ${nn}-thumbnail`]:{borderRadius:"50%"}}}}},Wt=ge=>{const{componentCls:Ne,iconCls:De,fontSizeLG:Te,colorTextLightSolid:Ze}=ge,He=`${Ne}-list`,nn=`${He}-item`,sn=ge.uploadPicCardSize;return{[` ${Ne}-wrapper${Ne}-picture-card-wrapper, ${Ne}-wrapper${Ne}-picture-circle-wrapper `]:Object.assign(Object.assign({},(0,io.dF)()),{display:"inline-block",width:"100%",[`${Ne}${Ne}-select`]:{width:sn,height:sn,marginInlineEnd:ge.marginXS,marginBottom:ge.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:ge.colorFillAlter,border:`${ge.lineWidth}px dashed ${ge.colorBorder}`,borderRadius:ge.borderRadiusLG,cursor:"pointer",transition:`border-color ${ge.motionDurationSlow}`,[`> ${Ne}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Ne}-disabled):hover`]:{borderColor:ge.colorPrimary}},[`${He}${He}-picture-card, ${He}${He}-picture-circle`]:{[`${He}-item-container`]:{display:"inline-block",width:sn,height:sn,marginBlock:`0 ${ge.marginXS}px`,marginInline:`0 ${ge.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[nn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${ge.paddingXS*2}px)`,height:`calc(100% - ${ge.paddingXS*2}px)`,backgroundColor:ge.colorBgMask,opacity:0,transition:`all ${ge.motionDurationSlow}`,content:'" "'}},[`${nn}:hover`]:{[`&::before, ${nn}-actions`]:{opacity:1}},[`${nn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${ge.motionDurationSlow}`,[`${De}-eye, ${De}-download, ${De}-delete`]:{zIndex:10,width:Te,margin:`0 ${ge.marginXXS}px`,fontSize:Te,cursor:"pointer",transition:`all ${ge.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${nn}-actions, ${nn}-actions:hover`]:{[`${De}-eye, ${De}-download, ${De}-delete`]:{color:new be.C(Ze).setAlpha(.65).toRgbString(),"&:hover":{color:Ze}}},[`${nn}-thumbnail, ${nn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${nn}-name`]:{display:"none",textAlign:"center"},[`${nn}-file + ${nn}-name`]:{position:"absolute",bottom:ge.margin,display:"block",width:`calc(100% - ${ge.paddingXS*2}px)`},[`${nn}-uploading`]:{[`&${nn}`]:{backgroundColor:ge.colorFillAlter},[`&::before, ${De}-eye, ${De}-download, ${De}-delete`]:{display:"none"}},[`${nn}-progress`]:{bottom:ge.marginXL,width:`calc(100% - ${ge.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${Ne}-wrapper${Ne}-picture-circle-wrapper`]:{[`${Ne}${Ne}-select`]:{borderRadius:"50%"}}}};var on=ge=>{const{componentCls:Ne}=ge;return{[`${Ne}-rtl`]:{direction:"rtl"}}};const re=ge=>{const{componentCls:Ne,colorTextDisabled:De}=ge;return{[`${Ne}-wrapper`]:Object.assign(Object.assign({},(0,io.Wf)(ge)),{[Ne]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Ne}-select`]:{display:"inline-block"},[`${Ne}-disabled`]:{color:De,cursor:"not-allowed"}})}};var Yt=(0,wo.Z)("Upload",ge=>{const{fontSizeHeading3:Ne,fontSize:De,lineHeight:Te,lineWidth:Ze,controlHeightLG:He}=ge,nn=Math.round(De*Te),sn=(0,Do.TS)(ge,{uploadThumbnailSize:Ne*2,uploadProgressOffset:nn/2+Ze,uploadPicCardSize:He*2.55});return[re(sn),Li(sn),Me(sn),Wt(sn),Co(sn),Lo(sn),on(sn),(0,Ao.Z)(sn)]},ge=>({actionsColor:ge.colorTextDescription})),Fe=function(ge,Ne,De,Te){function Ze(He){return He instanceof De?He:new De(function(nn){nn(He)})}return new(De||(De=Promise))(function(He,nn){function sn(ni){try{xe(Te.next(ni))}catch(vi){nn(vi)}}function Xn(ni){try{xe(Te.throw(ni))}catch(vi){nn(vi)}}function xe(ni){ni.done?He(ni.value):Ze(ni.value).then(sn,Xn)}xe((Te=Te.apply(ge,Ne||[])).next())})};const Je=`__LIST_IGNORE_${Date.now()}__`,In=(ge,Ne)=>{const{fileList:De,defaultFileList:Te,onRemove:Ze,showUploadList:He=!0,listType:nn="text",onPreview:sn,onDownload:Xn,onChange:xe,onDrop:ni,previewFile:vi,disabled:ii,locale:Ce,iconRender:Sn,isImageUrl:An,progress:$n,prefixCls:Gn,className:di,type:Pi="select",children:si,style:Vn,itemRender:yi,maxCount:Ie,data:Yi={},multiple:Ge=!1,action:Ti="",accept:bo="",supportServerRender:Xi=!0,rootClassName:Ro}=ge,vo=Tt.useContext(ae.Z),ui=ii!=null?ii:vo,[oi,Ri]=(0,ln.Z)(Te||[],{value:De,postState:yo=>yo!=null?yo:[]}),[Ji,On]=Tt.useState("drop"),It=Tt.useRef(null);Tt.useMemo(()=>{const yo=Date.now();(De||[]).forEach((to,fr)=>{!to.uid&&!Object.isFrozen(to)&&(to.uid=`__AUTO__${yo}_${fr}__`)})},[De]);const Wi=(yo,to,fr)=>{let jo=(0,de.Z)(to),eo=!1;Ie===1?jo=jo.slice(-1):Ie&&(eo=jo.length>Ie,jo=jo.slice(0,Ie)),(0,dn.flushSync)(()=>{Ri(jo)});const Ko={file:yo,fileList:jo};fr&&(Ko.event=fr),(!eo||jo.some(ps=>ps.uid===yo.uid))&&(0,dn.flushSync)(()=>{xe==null||xe(Ko)})},Mo=(yo,to)=>Fe(void 0,void 0,void 0,function*(){const{beforeUpload:fr,transformFile:jo}=ge;let eo=yo;if(fr){const Ko=yield fr(yo,to);if(Ko===!1)return!1;if(delete yo[Je],Ko===Je)return Object.defineProperty(yo,Je,{value:!0,configurable:!0}),!1;typeof Ko=="object"&&Ko&&(eo=Ko)}return jo&&(eo=yield jo(eo)),eo}),ji=yo=>{const to=yo.filter(eo=>!eo.file[Je]);if(!to.length)return;const fr=to.map(eo=>tn(eo.file));let jo=(0,de.Z)(oi);fr.forEach(eo=>{jo=fn(eo,jo)}),fr.forEach((eo,Ko)=>{let ps=eo;if(to[Ko].parsedFile)eo.status="uploading";else{const{originFileObj:Fi}=eo;let ho;try{ho=new File([Fi],Fi.name,{type:Fi.type})}catch(ro){ho=new Blob([Fi],{type:Fi.type}),ho.name=Fi.name,ho.lastModifiedDate=new Date,ho.lastModified=new Date().getTime()}ho.uid=eo.uid,ps=ho}Wi(ps,jo)})},mo=(yo,to,fr)=>{try{typeof yo=="string"&&(yo=JSON.parse(yo))}catch(Ko){}if(!rn(to,oi))return;const jo=tn(to);jo.status="done",jo.percent=100,jo.response=yo,jo.xhr=fr;const eo=fn(jo,oi);Wi(jo,eo)},Wo=(yo,to)=>{if(!rn(to,oi))return;const fr=tn(to);fr.status="uploading",fr.percent=yo.percent;const jo=fn(fr,oi);Wi(fr,jo,yo)},wi=(yo,to,fr)=>{if(!rn(fr,oi))return;const jo=tn(fr);jo.error=yo,jo.response=to,jo.status="error";const eo=fn(jo,oi);Wi(jo,eo)},Ci=yo=>{let to;Promise.resolve(typeof Ze=="function"?Ze(yo):Ze).then(fr=>{var jo;if(fr===!1)return;const eo=Dn(yo,oi);eo&&(to=Object.assign(Object.assign({},yo),{status:"removed"}),oi==null||oi.forEach(Ko=>{const ps=to.uid!==void 0?"uid":"name";Ko[ps]===to[ps]&&!Object.isFrozen(Ko)&&(Ko.status="removed")}),(jo=It.current)===null||jo===void 0||jo.abort(to),Wi(to,eo))})},Hi=yo=>{On(yo.type),yo.type==="drop"&&(ni==null||ni(yo))};Tt.useImperativeHandle(Ne,()=>({onBatchStart:ji,onSuccess:mo,onProgress:Wo,onError:wi,fileList:oi,upload:It.current}));const{getPrefixCls:Oi,direction:po,upload:Fo}=Tt.useContext(Hn.E_),ai=Oi("upload",Gn),li=Object.assign(Object.assign({onBatchStart:ji,onError:wi,onProgress:Wo,onSuccess:mo},ge),{data:Yi,multiple:Ge,action:Ti,accept:bo,supportServerRender:Xi,prefixCls:ai,disabled:ui,beforeUpload:Mo,onChange:void 0});delete li.className,delete li.style,(!si||ui)&&delete li.id;const[pn,Si]=Yt(ai),[oo]=(0,Ut.Z)("Upload",hn.Z.Upload),{showRemoveIcon:Zo,showPreviewIcon:Vo,showDownloadIcon:$o,removeIcon:yr,previewIcon:Sr,downloadIcon:gs}=typeof He=="boolean"?{}:He,Ur=(yo,to)=>He?Tt.createElement(qi,{prefixCls:ai,listType:nn,items:oi,previewFile:vi,onPreview:sn,onDownload:Xn,onRemove:Ci,showRemoveIcon:!ui&&Zo,showPreviewIcon:Vo,showDownloadIcon:$o,removeIcon:yr,previewIcon:Sr,downloadIcon:gs,iconRender:Sn,locale:Object.assign(Object.assign({},oo),Ce),isImageUrl:An,progress:$n,appendAction:yo,appendActionVisible:to,itemRender:yi,disabled:ui}):yo,es=je()(`${ai}-wrapper`,di,Ro,Si,Fo==null?void 0:Fo.className,{[`${ai}-rtl`]:po==="rtl",[`${ai}-picture-card-wrapper`]:nn==="picture-card",[`${ai}-picture-circle-wrapper`]:nn==="picture-circle"}),ke=Object.assign(Object.assign({},Fo==null?void 0:Fo.style),Vn);if(Pi==="drag"){const yo=je()(Si,ai,`${ai}-drag`,{[`${ai}-drag-uploading`]:oi.some(to=>to.status==="uploading"),[`${ai}-drag-hover`]:Ji==="dragover",[`${ai}-disabled`]:ui,[`${ai}-rtl`]:po==="rtl"});return pn(Tt.createElement("span",{className:es},Tt.createElement("div",{className:yo,style:ke,onDrop:Hi,onDragOver:Hi,onDragLeave:Hi},Tt.createElement(Cn,Object.assign({},li,{ref:It,className:`${ai}-btn`}),Tt.createElement("div",{className:`${ai}-drag-container`},si))),Ur()))}const Mr=je()(ai,`${ai}-select`,{[`${ai}-disabled`]:ui}),_s=(yo=>Tt.createElement("div",{className:Mr,style:yo},Tt.createElement(Cn,Object.assign({},li,{ref:It}))))(si?void 0:{display:"none"});return pn(nn==="picture-card"||nn==="picture-circle"?Tt.createElement("span",{className:es},Ur(_s,!!si)):Tt.createElement("span",{className:es},_s,Ur()))};var $t=Tt.forwardRef(In),_e=function(ge,Ne){var De={};for(var Te in ge)Object.prototype.hasOwnProperty.call(ge,Te)&&Ne.indexOf(Te)<0&&(De[Te]=ge[Te]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Te=Object.getOwnPropertySymbols(ge);Ze{var{style:De,height:Te}=ge,Ze=_e(ge,["style","height"]);return Tt.createElement($t,Object.assign({ref:Ne},Ze,{type:"drag",style:Object.assign(Object.assign({},De),{height:Te})}))});const ve=$t;ve.Dragger=ei,ve.LIST_IGNORE=Je;var Be=ve},99498:function(Ln,En,Ot){(function(Tt){Tt(Ot(89780))})(function(Tt){Tt.defineOption("placeholder","",function(Ve,Pe,ne){var Xe=ne&&ne!=Tt.Init;if(Pe&&!Xe)Ve.on("blur",Jt),Ve.on("change",ue),Ve.on("swapDoc",ue),Tt.on(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose=function(){je(Ve)}),ue(Ve);else if(!Pe&&Xe){Ve.off("blur",Jt),Ve.off("change",ue),Ve.off("swapDoc",ue),Tt.off(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose),de(Ve);var me=Ve.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}Pe&&!Ve.hasFocus()&&Jt(Ve)});function de(Ve){Ve.state.placeholder&&(Ve.state.placeholder.parentNode.removeChild(Ve.state.placeholder),Ve.state.placeholder=null)}function se(Ve){de(Ve);var Pe=Ve.state.placeholder=document.createElement("pre");Pe.style.cssText="height: 0; overflow: visible",Pe.style.direction=Ve.getOption("direction"),Pe.className="CodeMirror-placeholder CodeMirror-line-like";var ne=Ve.getOption("placeholder");typeof ne=="string"&&(ne=document.createTextNode(ne)),Pe.appendChild(ne),Ve.display.lineSpace.insertBefore(Pe,Ve.display.lineSpace.firstChild)}function je(Ve){setTimeout(function(){var Pe=!1,ne=Ve.getInputField();ne.nodeName=="TEXTAREA"?Pe=!ne.value:Ve.lineCount()==1&&(Pe=!/[^\u200b]/.test(ne.querySelector(".CodeMirror-line").textContent)),Pe?se(Ve):de(Ve)},20)}function Jt(Ve){ie(Ve)&&se(Ve)}function ue(Ve){var Pe=Ve.getWrapperElement(),ne=ie(Ve);Pe.className=Pe.className.replace(" CodeMirror-empty","")+(ne?" CodeMirror-empty":""),ne?se(Ve):de(Ve)}function ie(Ve){return Ve.lineCount()===1&&Ve.getLine(0)===""}})},25717:function(Ln,En,Ot){(function(Tt){Tt(Ot(89780))})(function(Tt){var de={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},se=Tt.Pos;Tt.defineOption("autoCloseBrackets",!1,function(et,nt,ft){ft&&ft!=Tt.Init&&(et.removeKeyMap(Jt),et.state.closeBrackets=null),nt&&(ue(je(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(Jt))});function je(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:de[nt]}var Jt={Backspace:Pe,Enter:ne};function ue(et){for(var nt=0;nt=0;pt--){var wt=lt[pt].head;et.replaceRange("",se(wt.line,wt.ch-1),se(wt.line,wt.ch+1),"+delete")}}function ne(et){var nt=Ve(et),ft=nt&&je(nt,"explode");if(!ft||et.getOption("disableInput"))return Tt.Pass;for(var lt=et.listSelections(),pt=0;pt0;return{anchor:new se(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new se(et.head.line,et.head.ch+(nt?1:-1))}}function me(et,nt){var ft=Ve(et);if(!ft||et.getOption("disableInput"))return Tt.Pass;var lt=je(ft,"pairs"),pt=lt.indexOf(nt);if(pt==-1)return Tt.Pass;for(var vt=je(ft,"closeBefore"),wt=je(ft,"triples"),Nt=lt.charAt(pt+1)==nt,bt=et.listSelections(),Ht=pt%2==0,_t,Qt=0;Qt=0&&et.getRange(Se,se(Se.line,Se.ch+3))==nt+nt+nt?he="skipThree":he="skip";else if(Nt&&Se.ch>1&&wt.indexOf(nt)>=0&&et.getRange(se(Se.line,Se.ch-2),Se)==nt+nt){if(Se.ch>2&&/\bstring/.test(et.getTokenTypeAt(se(Se.line,Se.ch-2))))return Tt.Pass;he="addFour"}else if(Nt){var pe=Se.ch==0?" ":et.getRange(se(Se.line,Se.ch-1),Se);if(!Tt.isWordChar(Re)&&pe!=nt&&!Tt.isWordChar(pe))he="both";else return Tt.Pass}else if(Ht&&(Re.length===0||/\s/.test(Re)||vt.indexOf(Re)>-1))he="both";else return Tt.Pass;if(!_t)_t=he;else if(_t!=he)return Tt.Pass}var Ke=pt%2?lt.charAt(pt-1):nt,Cn=pt%2?nt:lt.charAt(pt+1);et.operation(function(){if(_t=="skip")et.execCommand("goCharRight");else if(_t=="skipThree")for(var ln=0;ln<3;ln++)et.execCommand("goCharRight");else if(_t=="surround"){for(var dn=et.getSelections(),ln=0;ln'"]=function(an){return je(an)}),Pe.addKeyMap(me)}});var de=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],se=["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 je(Pe){if(Pe.getOption("disableInput"))return Tt.Pass;for(var ne=Pe.listSelections(),Xe=[],me=Pe.getOption("autoCloseTags"),an=0;anAt.ch&&(pt=pt.slice(0,pt.length-et.end+At.ch));var bt=pt.toLowerCase();if(!pt||et.type=="string"&&(et.end!=At.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&<.close||et.string.indexOf("/")==At.ch-et.start-1||wt&&ie(wt,bt)>-1||Ve(Pe,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ft)||[],pt,At,!0))return Tt.Pass;var Ht=typeof me=="object"&&me.emptyTags;if(Ht&&ie(Ht,pt)>-1){Xe[an]={text:"/>",newPos:Tt.Pos(At.line,At.ch+2)};continue}var _t=Nt&&ie(Nt,bt)>-1;Xe[an]={indent:_t,text:">"+(_t?` `:"")+"",newPos:_t?Tt.Pos(At.line+1,0):Tt.Pos(At.line,At.ch+1)}}for(var Qt=typeof me=="object"&&me.dontIndentOnAutoClose,an=ne.length-1;an>=0;an--){var qt=Xe[an];Pe.replaceRange(qt.text,ne[an].head,ne[an].anchor,"+insert");var Se=Pe.listSelections().slice(0);Se[an]={head:qt.newPos,anchor:qt.newPos},Pe.setSelections(Se),!Qt&&qt.indent&&(Pe.indentLine(qt.newPos.line,null,!0),Pe.indentLine(qt.newPos.line+1,null,!0))}}function Jt(Pe,ne){for(var Xe=Pe.listSelections(),me=[],an=ne?"/":""&&(wt+=">"),me[nt]=wt}if(Pe.replaceSelections(me),Xe=Pe.listSelections(),!et)for(var nt=0;nt=0&&ne[ft]==Xe;ft--)++nt;me=et.to;for(var ft=1;ft=ft.max))return ft.ch=0,ft.text=ft.cm.getLine(++ft.line),!0}function ne(ft){if(!(ft.line<=ft.min))return ft.text=ft.cm.getLine(--ft.line),ft.ch=ft.text.length,!0}function Xe(ft){for(;;){var lt=ft.text.indexOf(">",ft.ch);if(lt==-1){if(Pe(ft))continue;return}if(!Ve(ft,lt+1)){ft.ch=lt+1;continue}var pt=ft.text.lastIndexOf("/",lt),vt=pt>-1&&!/\S/.test(ft.text.slice(pt+1,lt));return ft.ch=lt+1,vt?"selfClose":"regular"}}function me(ft){for(;;){var lt=ft.ch?ft.text.lastIndexOf("<",ft.ch-1):-1;if(lt==-1){if(ne(ft))continue;return}if(!Ve(ft,lt+1)){ft.ch=lt;continue}ue.lastIndex=lt,ft.ch=lt;var pt=ue.exec(ft.text);if(pt&&pt.index==lt)return pt}}function an(ft){for(;;){ue.lastIndex=ft.ch;var lt=ue.exec(ft.text);if(!lt){if(Pe(ft))continue;return}if(!Ve(ft,lt.index+1)){ft.ch=lt.index+1;continue}return ft.ch=lt.index+lt[0].length,lt}}function At(ft){for(;;){var lt=ft.ch?ft.text.lastIndexOf(">",ft.ch-1):-1;if(lt==-1){if(ne(ft))continue;return}if(!Ve(ft,lt+1)){ft.ch=lt;continue}var pt=ft.text.lastIndexOf("/",lt),vt=pt>-1&&!/\S/.test(ft.text.slice(pt+1,lt));return ft.ch=lt+1,vt?"selfClose":"regular"}}function et(ft,lt){for(var pt=[];;){var vt=an(ft),wt,Nt=ft.line,bt=ft.ch-(vt?vt[0].length:0);if(!vt||!(wt=Xe(ft)))return;if(wt!="selfClose")if(vt[1]){for(var Ht=pt.length-1;Ht>=0;--Ht)if(pt[Ht]==vt[2]){pt.length=Ht;break}if(Ht<0&&(!lt||lt==vt[2]))return{tag:vt[2],from:de(Nt,bt),to:de(ft.line,ft.ch)}}else pt.push(vt[2])}}function nt(ft,lt){for(var pt=[];;){var vt=At(ft);if(!vt)return;if(vt=="selfClose"){me(ft);continue}var wt=ft.line,Nt=ft.ch,bt=me(ft);if(!bt)return;if(bt[1])pt.push(bt[2]);else{for(var Ht=pt.length-1;Ht>=0;--Ht)if(pt[Ht]==bt[2]){pt.length=Ht;break}if(Ht<0&&(!lt||lt==bt[2]))return{tag:bt[2],from:de(ft.line,ft.ch),to:de(wt,Nt)}}}}Tt.registerHelper("fold","xml",function(ft,lt){for(var pt=new ie(ft,lt.line,0);;){var vt=an(pt);if(!vt||pt.line!=lt.line)return;var wt=Xe(pt);if(!wt)return;if(!vt[1]&&wt!="selfClose"){var Nt=de(pt.line,pt.ch),bt=et(pt,vt[2]);return bt&&se(bt.from,Nt)>0?{from:Nt,to:bt.from}:null}}}),Tt.findMatchingTag=function(ft,lt,pt){var vt=new ie(ft,lt.line,lt.ch,pt);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var wt=Xe(vt),Nt=wt&&de(vt.line,vt.ch),bt=wt&&me(vt);if(!(!wt||!bt||se(vt,lt)>0)){var Ht={from:de(vt.line,vt.ch),to:Nt,tag:bt[2]};return wt=="selfClose"?{open:Ht,close:null,at:"open"}:bt[1]?{open:nt(vt,bt[2]),close:Ht,at:"close"}:(vt=new ie(ft,Nt.line,Nt.ch,pt),{open:Ht,close:et(vt,bt[2]),at:"open"})}}},Tt.findEnclosingTag=function(ft,lt,pt,vt){for(var wt=new ie(ft,lt.line,lt.ch,pt);;){var Nt=nt(wt,vt);if(!Nt)break;var bt=new ie(ft,lt.line,lt.ch,pt),Ht=et(bt,Nt.tag);if(Ht)return{open:Nt,close:Ht}}},Tt.scanForClosingTag=function(ft,lt,pt,vt){var wt=new ie(ft,lt.line,lt.ch,vt?{from:0,to:vt}:null);return et(wt,pt)}})},89780:function(Ln){(function(En,Ot){Ln.exports=Ot()})(this,function(){"use strict";var En=navigator.userAgent,Ot=navigator.platform,Tt=/gecko\/\d/i.test(En),de=/MSIE \d/.test(En),se=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(En),je=/Edge\/(\d+)/.exec(En),Jt=de||se||je,ue=Jt&&(de?document.documentMode||6:+(je||se)[1]),ie=!je&&/WebKit\//.test(En),Ve=ie&&/Qt\/\d+\.\d+/.test(En),Pe=!je&&/Chrome\//.test(En),ne=/Opera\//.test(En),Xe=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(En),an=/PhantomJS/.test(En),At=!je&&/AppleWebKit/.test(En)&&/Mobile\/\w+/.test(En),et=/Android/.test(En),nt=At||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(En),ft=At||/Mac/.test(Ot),lt=/\bCrOS\b/.test(En),pt=/win/i.test(Ot),vt=ne&&En.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(ne=!1,ie=!0);var wt=ft&&(Ve||ne&&(vt==null||vt<12.11)),Nt=Tt||Jt&&ue>=9;function bt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ht=function(it,st){var dt=it.className,ht=bt(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 _t(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Qt(it,st){return _t(it).appendChild(st)}function qt(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 Pt=0;Pt=st)return Et+(st-Pt);Et+=jt-Pt,Et+=dt-Et%dt,Pt=jt+1}}var Ut=function(){this.id=null,this.f=null,this.time=0,this.handler=dn(this.onTimeout,this)};Ut.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Ut.prototype.set=function(it,st){this.f=st;var dt=+new Date+it;(!this.id||dt=st)return ht+Math.min(Et,st-gt);if(gt+=Pt-ht,gt+=dt-gt%dt,ht=Pt+1,gt>=st)return ht}}var Pn=[""];function Un(it){for(;Pn.length<=it;)Pn.push(le(Pn)+" ");return Pn[it]}function le(it){return it[it.length-1]}function jn(it,st){for(var dt=[],ht=0;ht"\x80"&&(it.toUpperCase()!=it.toLowerCase()||xt.test(it))}function Gt(it,st){return st?st.source.indexOf("\\w")>-1&&Ft(it)?!0:st.test(it):Ft(it)}function kt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var ye=/[\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&&ye.test(it)}function xn(it,st,dt){for(;(dt<0?st>0:stdt?-1:1;;){if(st==dt)return st;var gt=(st+dt)/2,Pt=ht<0?Math.ceil(gt):Math.floor(gt);if(Pt==st)return it(Pt)?st:dt;it(Pt)?dt=Pt:st=Pt+ht}}function Ee(it,st,dt,ht){if(!it)return ht(st,dt,"ltr",0);for(var gt=!1,Pt=0;Ptst||st==dt&&Et.to==st)&&(ht(Math.max(Et.from,st),Math.min(Et.to,dt),Et.level==1?"rtl":"ltr",Pt),gt=!0)}gt||ht(st,dt,"ltr")}var tn=null;function fn(it,st,dt){var ht;tn=null;for(var gt=0;gtst)return gt;Pt.to==st&&(Pt.from!=Pt.to&&dt=="before"?ht=gt:tn=gt),Pt.from==st&&(Pt.from!=Pt.to&&dt!="before"?ht=gt:tn=gt)}return ht!=null?ht:tn}var rn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(Xt){return Xt<=247?it.charAt(Xt):1424<=Xt&&Xt<=1524?"R":1536<=Xt&&Xt<=1785?st.charAt(Xt-1536):1774<=Xt&&Xt<=2220?"r":8192<=Xt&&Xt<=8203?"w":Xt==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,gt=/[stwN]/,Pt=/[LRr]/,Et=/[Lb1n]/,jt=/[1n]/;function Rt(Xt,we,ee){this.level=Xt,this.from=we,this.to=ee}return function(Xt,we){var ee=we=="ltr"?"L":"R";if(Xt.length==0||we=="ltr"&&!ht.test(Xt))return!1;for(var Ye=Xt.length,Ue=[],Fn=0;Fn-1&&(ht[st]=gt.slice(0,Pt).concat(gt.slice(Pt+1)))}}}function We(it,st){var dt=Ei(it,st);if(dt.length)for(var ht=Array.prototype.slice.call(arguments,2),gt=0;gt0}function Jn(it){it.prototype.on=function(st,dt){yn(this,st,dt)},it.prototype.off=function(st,dt){hi(this,st,dt)}}function xi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Di(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function bi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Ii(it){xi(it),Di(it)}function no(it){return it.target||it.srcElement}function qi(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ft&&it.ctrlKey&&st==1&&(st=3),st}var io=function(){if(Jt&&ue<9)return!1;var it=qt("div");return"draggable"in it||"dragDrop"in it}(),Ao;function wo(it){if(Ao==null){var st=qt("span","\u200B");Qt(it,qt("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Ao=st.offsetWidth<=1&&st.offsetHeight>2&&!(Jt&&ue<8))}var dt=Ao?qt("span","\u200B"):qt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Do;function fo(it){if(Do!=null)return Do;var st=Qt(it,document.createTextNode("A\u062EA")),dt=he(st,0,1).getBoundingClientRect(),ht=he(st,1,2).getBoundingClientRect();return _t(it),!dt||dt.left==dt.right?!1:Do=ht.right-dt.right<3}var Li=` 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 Pt=it.slice(st,it.charAt(gt-1)=="\r"?gt-1:gt),Et=Pt.indexOf("\r");Et!=-1?(dt.push(Pt.slice(0,Et)),st+=Et+1):(dt.push(Pt),st=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Ct=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},Co=function(){var it=qt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),$i=null;function Qi(it){if($i!=null)return $i;var st=Qt(it,qt("span","x")),dt=st.getBoundingClientRect(),ht=he(st,0,1).getBoundingClientRect();return $i=Math.abs(dt.left-ht.left)>1}var Jo={},Qo={};function cr(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Jo[it]=st}function Lo(it,st){Qo[it]=st}function Io(it){if(typeof it=="string"&&Qo.hasOwnProperty(it))it=Qo[it];else if(it&&typeof it.name=="string"&&Qo.hasOwnProperty(it.name)){var st=Qo[it.name];typeof st=="string"&&(st={name:st}),it=Lt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Io("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Io("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function be(it,st){st=Io(st);var dt=Jo[st.name];if(!dt)return be(it,"text/plain");var ht=dt(it,st);if(Me.hasOwnProperty(st.name)){var gt=Me[st.name];for(var Pt in gt)gt.hasOwnProperty(Pt)&&(ht.hasOwnProperty(Pt)&&(ht["_"+Pt]=ht[Pt]),ht[Pt]=gt[Pt])}if(ht.name=st.name,st.helperType&&(ht.helperType=st.helperType),st.modeProps)for(var Et in st.modeProps)ht[Et]=st.modeProps[Et];return ht}var Me={};function Wt(it,st){var dt=Me.hasOwnProperty(it)?Me[it]:Me[it]={};Hn(st,dt)}function Ae(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 on(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 re(it,st,dt){return it.startState?it.startState(st,dt):!0}var Yt=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};Yt.prototype.eol=function(){return this.pos>=this.string.length},Yt.prototype.sol=function(){return this.pos==this.lineStart},Yt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yt.prototype.next=function(){if(this.posst},Yt.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Yt.prototype.skipToEnd=function(){this.pos=this.string.length},Yt.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Yt.prototype.backUp=function(it){this.pos-=it},Yt.prototype.column=function(){return this.lastColumnPos0?null:(Pt&&st!==!1&&(this.pos+=Pt[0].length),Pt)}},Yt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yt.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Yt.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Yt.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Fe(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],Pt=gt.chunkSize();if(st=it.first&&stdt?ve(dt,Fe(it,dt).text.length):nn(st,Fe(it,st.line).text.length)}function nn(it,st){var dt=it.ch;return dt==null||dt>st?ve(it.line,st):dt<0?ve(it.line,0):it}function sn(it,st){for(var dt=[],ht=0;htthis.maxLookAhead&&(this.maxLookAhead=it),st},xe.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}},xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xe.fromSaved=function(it,st,dt){return st instanceof Xn?new xe(it,Ae(it.mode,st.state),dt,st.lookAhead):new xe(it,Ae(it.mode,st),dt)},xe.prototype.save=function(it){var st=it!==!1?Ae(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xn(st,this.maxLookAhead):st};function ni(it,st,dt,ht){var gt=[it.state.modeGen],Pt={};Pi(it,st.text,it.doc.mode,dt,function(Xt,we){return gt.push(Xt,we)},Pt,ht);for(var Et=dt.state,jt=function(Xt){dt.baseTokens=gt;var we=it.state.overlays[Xt],ee=1,Ye=0;dt.state=!0,Pi(it,st.text,we.mode,dt,function(Ue,Fn){for(var zn=ee;YeUe&>.splice(ee,1,Ue,gt[ee+1],qn),ee+=2,Ye=Math.min(Ue,qn)}if(Fn)if(we.opaque)gt.splice(zn,ee-zn,Ue,"overlay "+Fn),ee=zn+2;else for(;znit.options.maxHighlightLength&&Ae(it.doc.mode,ht.state),Pt=ni(it,st,ht);gt&&(ht.state=gt),st.stateAfter=ht.save(!gt),st.styles=Pt.styles,Pt.classes?st.styleClasses=Pt.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 ii(it,st,dt){var ht=it.doc,gt=it.display;if(!ht.mode.startState)return new xe(ht,!0,st);var Pt=si(it,st,dt),Et=Pt>ht.first&&Fe(ht,Pt-1).stateAfter,jt=Et?xe.fromSaved(ht,Et,Pt):new xe(ht,re(ht.mode),Pt);return ht.iter(Pt,st,function(Rt){Ce(it,Rt.text,jt);var Xt=jt.line;Rt.stateAfter=Xt==st-1||Xt%5==0||Xt>=gt.viewFrom&&Xtst.start)return Pt}throw new Error("Mode "+it.name+" failed to advance stream.")}var $n=function(it,st,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=dt};function Gn(it,st,dt,ht){var gt=it.doc,Pt=gt.mode,Et;st=He(gt,st);var jt=Fe(gt,st.line),Rt=ii(it,st.line,dt),Xt=new Yt(jt.text,it.options.tabSize,Rt),we;for(ht&&(we=[]);(ht||Xt.posit.options.maxHighlightLength?(jt=!1,Et&&Ce(it,st,ht,we.pos),we.pos=st.length,ee=null):ee=di(An(dt,we,ht.state,Ye),Pt),Ye){var Ue=Ye[0].name;Ue&&(ee="m-"+(ee?Ue+" "+ee:Ue))}if(!jt||Xt!=ee){for(;RtEt;--jt){if(jt<=Pt.first)return Pt.first;var Rt=Fe(Pt,jt-1),Xt=Rt.stateAfter;if(Xt&&(!dt||jt+(Xt instanceof Xn?Xt.lookAhead:0)<=Pt.modeFrontier))return jt;var we=ae(Rt.text,null,it.options.tabSize);(gt==null||ht>we)&&(gt=jt-1,ht=we)}return gt}function Vn(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontierdt;ht--){var gt=Fe(it,ht).stateAfter;if(gt&&(!(gt instanceof Xn)||ht+gt.lookAhead=st:Pt.to>st);(ht||(ht=[])).push(new Ti(Et,Pt.from,Rt?null:Pt.to))}}return ht}function ui(it,st,dt){var ht;if(it)for(var gt=0;gt=st:Pt.to>st);if(jt||Pt.from==st&&Et.type=="bookmark"&&(!dt||Pt.marker.insertLeft)){var Rt=Pt.from==null||(Et.inclusiveLeft?Pt.from<=st:Pt.from0&&jt)for(var Gi=0;Gi0)){var we=[Rt,1],ee=Be(Xt.from,jt.from),Ye=Be(Xt.to,jt.to);(ee<0||!Et.inclusiveLeft&&!ee)&&we.push({from:Xt.from,to:jt.from}),(Ye>0||!Et.inclusiveRight&&!Ye)&&we.push({from:jt.to,to:Xt.to}),gt.splice.apply(gt,we),Rt+=we.length-3}}return gt}function On(it){var st=it.markedSpans;if(st){for(var dt=0;dtst)&&(!ht||ji(ht,Pt.marker)<0)&&(ht=Pt.marker)}return ht}function Hi(it,st,dt,ht,gt){var Pt=Fe(it,st),Et=Ie&&Pt.markedSpans;if(Et)for(var jt=0;jt=0&&ee<=0||we<=0&&ee>=0)&&(we<=0&&(Rt.marker.inclusiveRight&>.inclusiveLeft?Be(Xt.to,dt)>=0:Be(Xt.to,dt)>0)||we>=0&&(Rt.marker.inclusiveRight&>.inclusiveLeft?Be(Xt.from,ht)<=0:Be(Xt.from,ht)<0)))return!0}}}function Oi(it){for(var st;st=Wo(it);)it=st.find(-1,!0).line;return it}function po(it){for(var st;st=wi(it);)it=st.find(1,!0).line;return it}function Fo(it){for(var st,dt;st=wi(it);)it=st.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function ai(it,st){var dt=Fe(it,st),ht=Oi(dt);return dt==ht?st:$t(ht)}function li(it,st){if(st>it.lastLine())return st;var dt=Fe(it,st),ht;if(!pn(it,dt))return st;for(;ht=wi(dt);)dt=ht.find(1,!0).line;return $t(dt)+1}function pn(it,st){var dt=Ie&&st.markedSpans;if(dt){for(var ht=void 0,gt=0;gtst.maxLineLength&&(st.maxLineLength=gt,st.maxLine=ht)})}var $o=function(it,st,dt){this.text=it,It(this,st),this.height=dt?dt(this):1};$o.prototype.lineNo=function(){return $t(this)},Jn($o);function yr(it,st,dt,ht){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),On(it),It(it,dt);var gt=ht?ht(it):1;gt!=it.height&&bn(it,gt)}function Sr(it){it.parent=null,On(it)}var gs={},Ur={};function es(it,st){if(!it||/^\s*$/.test(it))return null;var dt=st.addModeClass?Ur:gs;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function ke(it,st){var dt=Se("span",null,null,ie?"padding-right: .1px":null),ht={pre:Se("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 Pt=gt?st.rest[gt-1]:st.line,Et=void 0;ht.pos=0,ht.addToken=eu,fo(it.display.measure)&&(Et=Dn(Pt,it.doc.direction))&&(ht.addToken=yo(ht.addToken,Et)),ht.map=[];var jt=st!=it.display.externalMeasured&&$t(Pt);fr(Pt,ht,vi(it,Pt,jt)),Pt.styleClasses&&(Pt.styleClasses.bgClass&&(ht.bgClass=Cn(Pt.styleClasses.bgClass,ht.bgClass||"")),Pt.styleClasses.textClass&&(ht.textClass=Cn(Pt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(wo(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 Rt=ht.content.lastChild;(/\bcm-tab\b/.test(Rt.className)||Rt.querySelector&&Rt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return We(it,"renderLine",it,st.line,ht.pre),ht.pre.className&&(ht.textClass=Cn(ht.pre.className,ht.textClass||"")),ht}function Mr(it){var st=qt("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function eu(it,st,dt,ht,gt,Pt,Et){if(st){var jt=it.splitSpaces?_s(st,it.trailingSpace):st,Rt=it.cm.state.specialChars,Xt=!1,we;if(!Rt.test(st))it.col+=st.length,we=document.createTextNode(jt),it.map.push(it.pos,it.pos+st.length,we),Jt&&ue<9&&(Xt=!0),it.pos+=st.length;else{we=document.createDocumentFragment();for(var ee=0;;){Rt.lastIndex=ee;var Ye=Rt.exec(st),Ue=Ye?Ye.index-ee:st.length-ee;if(Ue){var Fn=document.createTextNode(jt.slice(ee,ee+Ue));Jt&&ue<9?we.appendChild(qt("span",[Fn])):we.appendChild(Fn),it.map.push(it.pos,it.pos+Ue,Fn),it.col+=Ue,it.pos+=Ue}if(!Ye)break;ee+=Ue+1;var zn=void 0;if(Ye[0]==" "){var qn=it.cm.options.tabSize,gi=qn-it.col%qn;zn=we.appendChild(qt("span",Un(gi),"cm-tab")),zn.setAttribute("role","presentation"),zn.setAttribute("cm-text"," "),it.col+=gi}else Ye[0]=="\r"||Ye[0]==` `?(zn=we.appendChild(qt("span",Ye[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),zn.setAttribute("cm-text",Ye[0]),it.col+=1):(zn=it.cm.options.specialCharPlaceholder(Ye[0]),zn.setAttribute("cm-text",Ye[0]),Jt&&ue<9?we.appendChild(qt("span",[zn])):we.appendChild(zn),it.col+=1);it.map.push(it.pos,it.pos+1,zn),it.pos++}}if(it.trailingSpace=jt.charCodeAt(st.length-1)==32,dt||ht||gt||Xt||Pt||Et){var Bi=dt||"";ht&&(Bi+=ht),gt&&(Bi+=gt);var ki=qt("span",[we],Bi,Pt);if(Et)for(var Gi in Et)Et.hasOwnProperty(Gi)&&Gi!="style"&&Gi!="class"&&ki.setAttribute(Gi,Et[Gi]);return it.content.appendChild(ki)}it.content.appendChild(we)}}function _s(it,st){if(it.length>1&&!/ /.test(it))return it;for(var dt=st,ht="",gt=0;gtXt&&ee.from<=Xt));Ye++);if(ee.to>=we)return it(dt,ht,gt,Pt,Et,jt,Rt);it(dt,ht.slice(0,ee.to-Xt),gt,Pt,null,jt,Rt),Pt=null,ht=ht.slice(ee.to-Xt),Xt=ee.to}}}function to(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 fr(it,st,dt){var ht=it.markedSpans,gt=it.text,Pt=0;if(!ht){for(var Et=1;EtRt||Eo.collapsed&&Mi.to==Rt&&Mi.from==Rt)){if(Mi.to!=null&&Mi.to!=Rt&&Ue>Mi.to&&(Ue=Mi.to,zn=""),Eo.className&&(Fn+=" "+Eo.className),Eo.css&&(Ye=(Ye?Ye+";":"")+Eo.css),Eo.startStyle&&Mi.from==Rt&&(qn+=" "+Eo.startStyle),Eo.endStyle&&Mi.to==Ue&&(Gi||(Gi=[])).push(Eo.endStyle,Mi.to),Eo.title&&((Bi||(Bi={})).title=Eo.title),Eo.attributes)for(var Ar in Eo.attributes)(Bi||(Bi={}))[Ar]=Eo.attributes[Ar];Eo.collapsed&&(!gi||ji(gi.marker,Eo)<0)&&(gi=Mi)}else Mi.from>Rt&&Ue>Mi.from&&(Ue=Mi.from)}if(Gi)for(var hs=0;hs=jt)break;for(var fa=Math.min(jt,Ue);;){if(we){var Vs=Rt+we.length;if(!gi){var os=Vs>fa?we.slice(0,fa-Rt):we;st.addToken(st,os,ee?ee+Fn:Fn,qn,Rt+os.length==Ue?zn:"",Ye,Bi)}if(Vs>=fa){we=we.slice(fa-Rt),Rt=fa;break}Rt=Vs,qn=""}we=gt.slice(Pt,Pt=dt[Xt++]),ee=es(dt[Xt++],st.cm.options)}}}function jo(it,st,dt){this.line=st,this.rest=Fo(st),this.size=this.rest?$t(le(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=pn(it,st)}function eo(it,st,dt){for(var ht=[],gt,Pt=st;Pt2&&Pt.push((Rt.bottom+Xt.top)/2-dt.top)}}Pt.push(dt.bottom-dt.top)}}function ch(it,st,dt){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;htdt)return{map:it.measure.maps[gt],cache:it.measure.caches[gt],before:!0}}function Wd(it,st){st=Oi(st);var dt=$t(st),ht=it.display.externalMeasured=new jo(it.doc,st,dt);ht.lineN=dt;var gt=ht.built=ke(it,ht);return ht.text=gt.pre,Qt(it.display.lineMeasure,gt.pre),ht}function fh(it,st,dt,ht){return Ia(it,Dl(it,st),dt,ht)}function gh(it,st){if(st>=it.display.viewFrom&&st=dt.lineN&&stst)&&(Pt=Rt-jt,gt=Pt-1,st>=Rt&&(Et="right")),gt!=null){if(ht=it[Xt+2],jt==Rt&&dt==(ht.insertLeft?"left":"right")&&(Et=dt),dt=="left"&>==0)for(;Xt&&it[Xt-2]==it[Xt-3]&&it[Xt-1].insertLeft;)ht=it[(Xt-=3)+2],Et="left";if(dt=="right"&>==Rt-jt)for(;Xt=0&&(dt=it[gt]).left==dt.right;gt--);return dt}function ao(it,st,dt,ht){var gt=ph(st.map,dt,ht),Pt=gt.node,Et=gt.start,jt=gt.end,Rt=gt.collapse,Xt;if(Pt.nodeType==3){for(var we=0;we<4;we++){for(;Et&&Le(st.line.text.charAt(gt.coverStart+Et));)--Et;for(;gt.coverStart+jt0&&(Rt=ht="right");var ee;it.options.lineWrapping&&(ee=Pt.getClientRects()).length>1?Xt=ee[ht=="right"?ee.length-1:0]:Xt=Pt.getBoundingClientRect()}if(Jt&&ue<9&&!Et&&(!Xt||!Xt.left&&!Xt.right)){var Ye=Pt.parentNode.getClientRects()[0];Ye?Xt={left:Ye.left,right:Ye.left+vh(it.display),top:Ye.top,bottom:Ye.bottom}:Xt=rd}for(var Ue=Xt.top-st.rect.top,Fn=Xt.bottom-st.rect.top,zn=(Ue+Fn)/2,qn=st.view.measure.heights,gi=0;gi=ht.text.length?(Rt=ht.text.length,Xt="before"):Rt<=0&&(Rt=0,Xt="after"),!jt)return Et(Xt=="before"?Rt-1:Rt,Xt=="before");function we(Fn,zn,qn){var gi=jt[zn],Bi=gi.level==1;return Et(qn?Fn-1:Fn,Bi!=qn)}var ee=fn(jt,Rt,Xt),Ye=tn,Ue=we(Rt,ee,Xt=="before");return Ye!=null&&(Ue.other=we(Rt,Ye,Xt!="before")),Ue}function Dc(it,st){var dt=0;st=He(it.doc,st),it.options.lineWrapping||(dt=vh(it.display)*st.ch);var ht=Fe(it.doc,st.line),gt=oo(ht)+Qs(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ht.height}}function Ic(it,st,dt,ht,gt){var Pt=ve(it,st,dt);return Pt.xRel=gt,ht&&(Pt.outside=ht),Pt}function Rc(it,st,dt){var ht=it.doc;if(dt+=it.display.viewOffset,dt<0)return Ic(ht.first,0,null,-1,-1);var gt=_e(ht,dt),Pt=ht.first+ht.size-1;if(gt>Pt)return Ic(ht.first+ht.size-1,Fe(ht,Pt).text.length,null,1,1);st<0&&(st=0);for(var Et=Fe(ht,gt);;){var jt=un(it,Et,gt,st,dt),Rt=Ci(Et,jt.ch+(jt.xRel>0||jt.outside>0?1:0));if(!Rt)return jt;var Xt=Rt.find(1);if(Xt.line==gt)return Xt;Et=Fe(ht,gt=Xt.line)}}function Ni(it,st,dt,ht){ht-=Gr(st);var gt=st.text.length,Pt=cn(function(Et){return Ia(it,dt,Et-1).bottom<=ht},gt,0);return gt=cn(function(Et){return Ia(it,dt,Et).top>ht},Pt,gt),{begin:Pt,end:gt}}function Jf(it,st,dt,ht){dt||(dt=Dl(it,st));var gt=Dr(it,st,Ia(it,dt,ht),"line").top;return Ni(it,st,dt,gt)}function oe(it,st,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>st}function un(it,st,dt,ht,gt){gt-=oo(st);var Pt=Dl(it,st),Et=Gr(st),jt=0,Rt=st.text.length,Xt=!0,we=Dn(st,it.doc.direction);if(we){var ee=(it.options.lineWrapping?Op:Ap)(it,st,dt,Pt,we,ht,gt);Xt=ee.level!=1,jt=Xt?ee.from:ee.to-1,Rt=Xt?ee.to:ee.from-1}var Ye=null,Ue=null,Fn=cn(function(co){var Mi=Ia(it,Pt,co);return Mi.top+=Et,Mi.bottom+=Et,oe(Mi,ht,gt,!1)?(Mi.top<=gt&&Mi.left<=ht&&(Ye=co,Ue=Mi),!0):!1},jt,Rt),zn,qn,gi=!1;if(Ue){var Bi=ht-Ue.left=Gi.bottom?1:0}return Fn=xn(st.text,Fn,1),Ic(dt,Fn,qn,gi,ht-zn)}function Ap(it,st,dt,ht,gt,Pt,Et){var jt=cn(function(ee){var Ye=gt[ee],Ue=Ye.level!=1;return oe(Lr(it,ve(dt,Ue?Ye.to:Ye.from,Ue?"before":"after"),"line",st,ht),Pt,Et,!0)},0,gt.length-1),Rt=gt[jt];if(jt>0){var Xt=Rt.level!=1,we=Lr(it,ve(dt,Xt?Rt.from:Rt.to,Xt?"after":"before"),"line",st,ht);oe(we,Pt,Et,!0)&&we.top>Et&&(Rt=gt[jt-1])}return Rt}function Op(it,st,dt,ht,gt,Pt,Et){var jt=Ni(it,st,ht,Et),Rt=jt.begin,Xt=jt.end;/\s/.test(st.text.charAt(Xt-1))&&Xt--;for(var we=null,ee=null,Ye=0;Ye=Xt||Ue.to<=Rt)){var Fn=Ue.level!=1,zn=Ia(it,ht,Fn?Math.min(Xt,Ue.to)-1:Math.max(Rt,Ue.from)).right,qn=znqn)&&(we=Ue,ee=qn)}}return we||(we=gt[gt.length-1]),we.fromXt&&(we={from:we.from,to:Xt,level:we.level}),we}var ou;function ru(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(ou==null){ou=qt("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)ou.appendChild(document.createTextNode("x")),ou.appendChild(qt("br"));ou.appendChild(document.createTextNode("x"))}Qt(it.measure,ou);var dt=ou.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),_t(it.measure),dt||1}function vh(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=qt("span","xxxxxxxxxx"),dt=qt("pre",[st],"CodeMirror-line-like");Qt(it.measure,dt);var ht=st.getBoundingClientRect(),gt=(ht.right-ht.left)/10;return gt>2&&(it.cachedCharWidth=gt),gt||10}function zc(it){for(var st=it.display,dt={},ht={},gt=st.gutters.clientLeft,Pt=st.gutters.firstChild,Et=0;Pt;Pt=Pt.nextSibling,++Et){var jt=it.display.gutterSpecs[Et].className;dt[jt]=Pt.offsetLeft+Pt.clientLeft+gt,ht[jt]=Pt.clientWidth}return{fixedPos:Vd(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ht,wrapperWidth:st.wrapper.clientWidth}}function Vd(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Er(it){var st=ru(it.display),dt=it.options.lineWrapping,ht=dt&&Math.max(5,it.display.scroller.clientWidth/vh(it.display)-3);return function(gt){if(pn(it.doc,gt))return 0;var Pt=0;if(gt.widgets)for(var Et=0;Et0&&(Xt=Fe(it.doc,Rt.line).text).length==Rt.ch){var we=ae(Xt,Xt.length,it.options.tabSize)-Xt.length;Rt=ve(Rt.line,Math.max(0,Math.round((Pt-iu(it.display).left)/vh(it.display))-we))}return Rt}function za(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var dt=it.display.view,ht=0;htst)&&(gt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=gt.viewTo)Ie&&ai(it.doc,st)gt.viewFrom?$r(it):(gt.viewFrom+=ht,gt.viewTo+=ht);else if(st<=gt.viewFrom&&dt>=gt.viewTo)$r(it);else if(st<=gt.viewFrom){var Pt=ha(it,dt,dt+ht,1);Pt?(gt.view=gt.view.slice(Pt.index),gt.viewFrom=Pt.lineN,gt.viewTo+=ht):$r(it)}else if(dt>=gt.viewTo){var Et=ha(it,st,st,-1);Et?(gt.view=gt.view.slice(0,Et.index),gt.viewTo=Et.lineN):$r(it)}else{var jt=ha(it,st,st,-1),Rt=ha(it,dt,dt+ht,1);jt&&Rt?(gt.view=gt.view.slice(0,jt.index).concat(eo(it,jt.lineN,Rt.lineN)).concat(gt.view.slice(Rt.index)),gt.viewTo+=ht):$r(it)}var Xt=gt.externalMeasured;Xt&&(dt=gt.lineN&&st=ht.viewTo)){var Pt=ht.view[za(it,st)];if(Pt.node!=null){var Et=Pt.changes||(Pt.changes=[]);hn(Et,dt)==-1&&Et.push(dt)}}}function $r(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function ha(it,st,dt,ht){var gt=za(it,st),Pt,Et=it.display.view;if(!Ie||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var jt=it.display.viewFrom,Rt=0;Rt0){if(gt==Et.length-1)return null;Pt=jt+Et[gt].size-st,gt++}else Pt=jt-st;st+=Pt,dt+=Pt}for(;ai(it.doc,dt)!=dt;){if(gt==(ht<0?0:Et.length-1))return null;dt+=ht*Et[gt-(ht<0?1:0)].size,gt+=ht}return{index:gt,lineN:dt}}function dr(it,st,dt){var ht=it.display,gt=ht.view;gt.length==0||st>=ht.viewTo||dt<=ht.viewFrom?(ht.view=eo(it,st,dt),ht.viewFrom=st):(ht.viewFrom>st?ht.view=eo(it,st,ht.viewFrom).concat(ht.view):ht.viewFromdt&&(ht.view=ht.view.slice(0,za(it,dt)))),ht.viewTo=dt}function Pa(it){for(var st=it.display.view,dt=0,ht=0;ht=it.display.viewTo||jt.to().line0?st.blinker=setInterval(function(){it.hasFocus()||yh(it),st.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function Pr(it){it.state.focused||(it.display.input.focus(),Yo(it))}function Ir(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,yh(it))},100)}function Yo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(We(it,"focus",it,st),it.state.focused=!0,Ke(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()),rr(it))}function yh(it,st){it.state.delayingBlurEvent||(it.state.focused&&(We(it,"blur",it,st),it.state.focused=!1,Ht(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Ui(it){for(var st=it.display,dt=st.lineDiv.offsetTop,ht=0;ht.005||we<-.005)&&(bn(gt.line,Et),Bp(gt.line),gt.rest))for(var ee=0;eeit.display.sizerWidth){var Ye=Math.ceil(jt/vh(it.display));Ye>it.display.maxLineLength&&(it.display.maxLineLength=Ye,it.display.maxLine=gt.line,it.display.maxLineChanged=!0)}}}}function Bp(it){if(it.widgets)for(var st=0;st=Et&&(Pt=_e(st,oo(Fe(st,Rt))-it.wrapper.clientHeight),Et=Rt)}return{from:Pt,to:Math.max(Et,Pt+1)}}function Dp(it,st){if(!gn(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&&!an){var Pt=qt("div","\u200B",null,`position: absolute; top: `+(st.top-dt.viewOffset-Qs(it.display))+`px; height: `+(st.bottom-st.top+qs(it)+dt.barHeight)+`px; left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Pt),Pt.scrollIntoView(gt),it.display.lineSpace.removeChild(Pt)}}}function sd(it,st,dt,ht){ht==null&&(ht=0);var gt;!it.options.lineWrapping&&st==dt&&(st=st.ch?ve(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,dt=st.sticky=="before"?ve(st.line,st.ch+1,"before"):st);for(var Pt=0;Pt<5;Pt++){var Et=!1,jt=Lr(it,st),Rt=!dt||dt==st?jt:Lr(it,dt);gt={left:Math.min(jt.left,Rt.left),top:Math.min(jt.top,Rt.top)-ht,right:Math.max(jt.left,Rt.left),bottom:Math.max(jt.bottom,Rt.bottom)+ht};var Xt=Qf(it,gt),we=it.doc.scrollTop,ee=it.doc.scrollLeft;if(Xt.scrollTop!=null&&(xh(it,Xt.scrollTop),Math.abs(it.doc.scrollTop-we)>1&&(Et=!0)),Xt.scrollLeft!=null&&(au(it,Xt.scrollLeft),Math.abs(it.doc.scrollLeft-ee)>1&&(Et=!0)),!Et)break}return gt}function Ud(it,st){var dt=Qf(it,st);dt.scrollTop!=null&&xh(it,dt.scrollTop),dt.scrollLeft!=null&&au(it,dt.scrollLeft)}function Qf(it,st){var dt=it.display,ht=ru(it.display);st.top<0&&(st.top=0);var gt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Pt=dh(it),Et={};st.bottom-st.top>Pt&&(st.bottom=st.top+Pt);var jt=it.doc.height+Bl(dt),Rt=st.topjt-ht;if(st.topgt+Pt){var we=Math.min(st.top,(Xt?jt:st.bottom)-Pt);we!=gt&&(Et.scrollTop=we)}var ee=it.options.fixedGutter?0:dt.gutters.offsetWidth,Ye=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-ee,Ue=xa(it)-dt.gutters.offsetWidth,Fn=st.right-st.left>Ue;return Fn&&(st.right=st.left+Ue),st.left<10?Et.scrollLeft=0:st.leftUe+Ye-3&&(Et.scrollLeft=st.right+(Fn?0:10)-Ue),Et}function jc(it,st){st!=null&&(Il(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function su(it){Il(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function Sh(it,st,dt){(st!=null||dt!=null)&&Il(it),st!=null&&(it.curOp.scrollLeft=st),dt!=null&&(it.curOp.scrollTop=dt)}function Xo(it,st){Il(it),it.curOp.scrollToPos=st}function Il(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var dt=Dc(it,st.from),ht=Dc(it,st.to);Gc(it,dt,ht,st.margin)}}function Gc(it,st,dt,ht){var gt=Qf(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});Sh(it,gt.scrollLeft,gt.scrollTop)}function xh(it,st){Math.abs(it.doc.scrollTop-st)<2||(Tt||Fu(it,{top:st}),qf(it,st,!0),Tt&&Fu(it),ad(it,100))}function qf(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 au(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,Vc(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function $a(it){var st=it.display,dt=st.gutters.offsetWidth,ht=Math.round(it.doc.height+Bl(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+qs(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:dt}}var ku=function(it,st,dt){this.cm=dt;var ht=this.vert=qt("div",[qt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),gt=this.horiz=qt("div",[qt("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,Jt&&ue<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ku.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 Pt=it.viewWidth-it.barLeft-(dt?ht:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Pt)+"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}},ku.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ku.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ku.prototype.zeroWidthHack=function(){var it=ft&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ut,this.disableVert=new Ut},ku.prototype.enableZeroWidthBar=function(it,st,dt){it.style.pointerEvents="auto";function ht(){var gt=it.getBoundingClientRect(),Pt=dt=="vert"?document.elementFromPoint(gt.right-1,(gt.top+gt.bottom)/2):document.elementFromPoint((gt.right+gt.left)/2,gt.bottom-1);Pt!=it?it.style.pointerEvents="none":st.set(1e3,ht)}st.set(1e3,ht)},ku.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var wl=function(){};wl.prototype.update=function(){return{bottom:0,right:0}},wl.prototype.setScrollLeft=function(){},wl.prototype.setScrollTop=function(){},wl.prototype.clear=function(){};function bu(it,st){st||(st=$a(it));var dt=it.display.barWidth,ht=it.display.barHeight;Hc(it,st);for(var gt=0;gt<4&&dt!=it.display.barWidth||ht!=it.display.barHeight;gt++)dt!=it.display.barWidth&&it.options.lineWrapping&&Ui(it),Hc(it,$a(it)),dt=it.display.barWidth,ht=it.display.barHeight}function Hc(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 tg={native:ku,null:wl};function eg(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ht(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new tg[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"?au(it,st):xh(it,st)},it),it.display.scrollbars.addClass&&Ke(it.display.wrapper,it.display.scrollbars.addClass)}var Ip=0;function Tu(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:++Ip},ps(it.curOp)}function Nu(it){var st=it.curOp;st&&ho(st,function(dt){for(var ht=0;ht=dt.viewTo)||dt.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new Ph(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function Q0(it){it.updatedDisplay=it.mustUpdate&&Wc(it.cm,it.update)}function Rp(it){var st=it.cm,dt=st.display;it.updatedDisplay&&Ui(st),it.barMeasure=$a(st),dt.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=fh(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+qs(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-xa(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Zr(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=ii(it,st.highlightFrontier),gt=[];st.iter(ht.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Pt){if(ht.line>=it.display.viewFrom){var Et=Pt.styles,jt=Pt.text.length>it.options.maxHighlightLength?Ae(st.mode,ht.state):null,Rt=ni(it,Pt,ht,!0);jt&&(ht.state=jt),Pt.styles=Rt.styles;var Xt=Pt.styleClasses,we=Rt.classes;we?Pt.styleClasses=we:Xt&&(Pt.styleClasses=null);for(var ee=!Et||Et.length!=Pt.styles.length||Xt!=we&&(!Xt||!we||Xt.bgClass!=we.bgClass||Xt.textClass!=we.textClass),Ye=0;!ee&&Yedt)return ad(it,it.options.workDelay),!0}),st.highlightFrontier=ht.line,st.modeFrontier=Math.max(st.modeFrontier,ht.line),gt.length&&er(it,function(){for(var Pt=0;Pt=dt.viewFrom&&st.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&Pa(it)==0)return!1;ns(it)&&($r(it),st.dims=zc(it));var gt=ht.first+ht.size,Pt=Math.max(st.visible.from-it.options.viewportMargin,ht.first),Et=Math.min(gt,st.visible.to+it.options.viewportMargin);dt.viewFromEt&&dt.viewTo-Et<20&&(Et=Math.min(gt,dt.viewTo)),Ie&&(Pt=ai(it.doc,Pt),Et=li(it.doc,Et));var jt=Pt!=dt.viewFrom||Et!=dt.viewTo||dt.lastWrapHeight!=st.wrapperHeight||dt.lastWrapWidth!=st.wrapperWidth;dr(it,Pt,Et),dt.viewOffset=oo(Fe(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Rt=Pa(it);if(!jt&&Rt==0&&!st.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var Xt=jp(it);return Rt>4&&(dt.lineDiv.style.display="none"),ng(it,dt.updateLineNumbers,st.dims),Rt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,da(Xt),_t(dt.cursorDiv),_t(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,jt&&(dt.lastWrapHeight=st.wrapperHeight,dt.lastWrapWidth=st.wrapperWidth,ad(it,400)),dt.updateLineNumbers=null,!0}function sr(it,st){for(var dt=st.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||st.oldDisplayWidth==xa(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Bl(it.display)-dh(it),dt.top)}),st.visible=zo(it.display,it.doc,dt),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ht&&(st.visible=zo(it.display,it.doc,dt));if(!Wc(it,st))break;Ui(it);var gt=$a(it);as(it),bu(it,gt),Ou(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 Fu(it,st){var dt=new Ph(it,st);if(Wc(it,dt)){Ui(it),sr(it,dt);var ht=$a(it);as(it),bu(it,ht),Ou(it,ht),dt.finish()}}function ng(it,st,dt){var ht=it.display,gt=it.options.lineNumbers,Pt=ht.lineDiv,Et=Pt.firstChild;function jt(Fn){var zn=Fn.nextSibling;return ie&&ft&&it.display.currentWheelTarget==Fn?Fn.style.display="none":Fn.parentNode.removeChild(Fn),zn}for(var Rt=ht.view,Xt=ht.viewFrom,we=0;we-1&&(Ue=!1),br(it,ee,Xt,dt)),Ue&&(_t(ee.lineNumber),ee.lineNumber.appendChild(document.createTextNode(ei(it.options,Xt)))),Et=ee.node.nextSibling}Xt+=ee.size}for(;Et;)Et=jt(Et)}function Au(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function Ou(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+qs(it)+"px"}function Vc(it){var st=it.display,dt=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ht=Vd(st)-st.scroller.scrollLeft+it.doc.scrollLeft,gt=st.gutters.offsetWidth,Pt=ht+"px",Et=0;EtEt.clientWidth,Rt=Et.scrollHeight>Et.clientHeight;if(ht&&jt||gt&&Rt){if(gt&&ft&&ie){t:for(var Xt=st.target,we=Pt.view;Xt!=Et;Xt=Xt.parentNode)for(var ee=0;ee=0&&Be(it,ht.to())<=0)return dt}return-1};var ar=function(it,st){this.anchor=it,this.head=st};ar.prototype.from=function(){return Te(this.anchor,this.head)},ar.prototype.to=function(){return De(this.anchor,this.head)},ar.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function hl(it,st,dt){var ht=it&&it.options.selectionsMayTouch,gt=st[dt];st.sort(function(Ye,Ue){return Be(Ye.from(),Ue.from())}),dt=hn(st,gt);for(var Pt=1;Pt0:Rt>=0){var Xt=Te(jt.from(),Et.from()),we=De(jt.to(),Et.to()),ee=jt.empty()?Et.from()==Et.head:jt.from()==jt.head;Pt<=dt&&--dt,st.splice(--Pt,2,new ar(ee?we:Xt,ee?Xt:we))}}return new Ja(st,dt)}function lu(it,st){return new Ja([new ar(it,st||it)],0)}function Du(it){return it.text?ve(it.from.line+it.text.length-1,le(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Ch(it,st){if(Be(it,st.from)<0)return it;if(Be(it,st.to)<=0)return Du(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+=Du(st).ch-st.to.ch),ve(dt,ht)}function Zd(it,st){for(var dt=[],ht=0;ht1&&it.remove(jt.line+1,Fn-1),it.insert(jt.line+1,gi)}Kn(it,"change",it,st)}function Ll(it,st,dt){function ht(gt,Pt,Et){if(gt.linked)for(var jt=0;jt1&&!it.done[it.done.length-2].ranges)return it.done.pop(),le(it.done)}function $d(it,st,dt,ht){var gt=it.history;gt.undone.length=0;var Pt=+new Date,Et,jt;if((gt.lastOp==ht||gt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&>.lastModTime>Pt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Et=_d(gt,gt.lastOp==ht)))jt=le(Et.changes),Be(st.from,st.to)==0&&Be(st.from,jt.to)==0?jt.to=Du(st):Et.changes.push(Kc(it,st));else{var Rt=le(gt.done);for((!Rt||!Rt.ranges)&&dd(it.sel,gt.done),Et={changes:[Kc(it,st)],generation:gt.generation},gt.done.push(Et);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=Pt,gt.lastOp=gt.lastSelOp=ht,gt.lastOrigin=gt.lastSelOrigin=st.origin,jt||We(it,"historyAdded")}function og(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 Jd(it,st,dt,ht){var gt=it.history,Pt=ht&&ht.origin;dt==gt.lastSelOp||Pt&>.lastSelOrigin==Pt&&(gt.lastModTime==gt.lastSelTime&>.lastOrigin==Pt||og(it,Pt,le(gt.done),st))?gt.done[gt.done.length-1]=st:dd(st,gt.done),gt.lastSelTime=+new Date,gt.lastSelOrigin=Pt,gt.lastSelOp=dt,ht&&ht.clearRedo!==!1&&hd(gt.undone)}function dd(it,st){var dt=le(st);dt&&dt.ranges&&dt.equals(it)||st.push(it)}function Iu(it,st,dt,ht){var gt=st["spans_"+it.id],Pt=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ht),function(Et){Et.markedSpans&&((gt||(gt=st["spans_"+it.id]={}))[Pt]=Et.markedSpans),++Pt})}function na(it){if(!it)return null;for(var st,dt=0;dt-1&&(le(jt)[ee]=Xt[ee],delete Xt[ee])}}return ht}function Xc(it,st,dt,ht){if(ht){var gt=it.anchor;if(dt){var Pt=Be(st,gt)<0;Pt!=Be(dt,gt)<0?(gt=st,st=dt):Pt!=Be(st,dt)<0&&(st=dt)}return new ar(gt,st)}else return new ar(dt||st,st)}function _c(it,st,dt,ht,gt){gt==null&&(gt=it.cm&&(it.cm.display.shift||it.extend)),Ws(it,new Ja([Xc(it.sel.primary(),st,dt,gt)],0),ht)}function Gp(it,st,dt){for(var ht=[],gt=it.cm&&(it.cm.display.shift||it.extend),Pt=0;Pt=st.ch:jt.to>st.ch))){if(gt&&(We(Rt,"beforeCursorEnter"),Rt.explicitlyCleared))if(Pt.markedSpans){--Et;continue}else break;if(!Rt.atomic)continue;if(dt){var ee=Rt.find(ht<0?1:-1),Ye=void 0;if((ht<0?we:Xt)&&(ee=sg(it,ee,-ht,ee&&ee.line==st.line?Pt:null)),ee&&ee.line==st.line&&(Ye=Be(ee,dt))&&(ht<0?Ye<0:Ye>0))return hu(it,ee,st,ht,gt)}var Ue=Rt.find(ht<0?-1:1);return(ht<0?Xt:we)&&(Ue=sg(it,Ue,ht,Ue.line==st.line?Pt:null)),Ue?hu(it,Ue,st,ht,gt):null}}return st}function tc(it,st,dt,ht,gt){var Pt=ht||1,Et=hu(it,st,dt,Pt,gt)||!gt&&hu(it,st,dt,Pt,!0)||hu(it,st,dt,-Pt,gt)||!gt&&hu(it,st,dt,-Pt,!0);return Et||(it.cantEdit=!0,ve(it.first,0))}function sg(it,st,dt,ht){return dt<0&&st.ch==0?st.line>it.first?He(it,ve(st.line-1)):null:dt>0&&st.ch==(ht||Fe(it,st.line)).text.length?st.line=0;--gt)kh(it,{from:ht[gt].from,to:ht[gt].to,text:gt?[""]:st.text,origin:st.origin});else kh(it,st)}}function kh(it,st){if(!(st.text.length==1&&st.text[0]==""&&Be(st.from,st.to)==0)){var dt=Zd(it,st);$d(it,st,dt,it.cm?it.cm.curOp.id:NaN),cd(it,st,dt,oi(it,st));var ht=[];Ll(it,function(gt,Pt){!Pt&&hn(ht,gt.history)==-1&&(lg(gt.history,st),ht.push(gt.history)),cd(gt,st,null,oi(gt,st))})}}function nc(it,st,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var gt=it.history,Pt,Et=it.sel,jt=st=="undo"?gt.done:gt.undone,Rt=st=="undo"?gt.undone:gt.done,Xt=0;Xt=0;--Ue){var Fn=Ye(Ue);if(Fn)return Fn.v}}}}function ag(it,st){if(st!=0&&(it.first+=st,it.sel=new Ja(jn(it.sel.ranges,function(gt){return new ar(ve(gt.anchor.line+st,gt.anchor.ch),ve(gt.head.line+st,gt.head.ch))}),it.sel.primIndex),it.cm)){Fr(it.cm,it.first,it.first-st,st);for(var dt=it.cm.display,ht=dt.viewFrom;htit.lastLine())){if(st.from.linePt&&(st={from:st.from,to:ve(Pt,Fe(it,Pt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Je(it,st.from,st.to),dt||(dt=Zd(it,st)),it.cm?Wp(it.cm,st,ht):Uc(it,st,ht),Mh(it,dt,Oe),it.cantEdit&&tc(it,ve(it.firstLine(),0))&&(it.cantEdit=!1)}}function Wp(it,st,dt){var ht=it.doc,gt=it.display,Pt=st.from,Et=st.to,jt=!1,Rt=Pt.line;it.options.lineWrapping||(Rt=$t(Oi(Fe(ht,Pt.line))),ht.iter(Rt,Et.line+1,function(Ue){if(Ue==gt.maxLine)return jt=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&Nn(it),Uc(ht,st,dt,Er(it)),it.options.lineWrapping||(ht.iter(Rt,Pt.line+st.text.length,function(Ue){var Fn=Zo(Ue);Fn>gt.maxLineLength&&(gt.maxLine=Ue,gt.maxLineLength=Fn,gt.maxLineChanged=!0,jt=!1)}),jt&&(it.curOp.updateMaxLine=!0)),Vn(ht,Pt.line),ad(it,400);var Xt=st.text.length-(Et.line-Pt.line)-1;st.full?Fr(it):Pt.line==Et.line&&st.text.length==1&&!ig(it.doc,st)?To(it,Pt.line,"text"):Fr(it,Pt.line,Et.line+1,Xt);var we=_n(it,"changes"),ee=_n(it,"change");if(ee||we){var Ye={from:Pt,to:Et,text:st.text,removed:st.removed,origin:st.origin};ee&&Kn(it,"change",it,Ye),we&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Ye)}it.display.selForContextMenu=null}function bh(it,st,dt,ht,gt){var Pt;ht||(ht=dt),Be(ht,dt)<0&&(Pt=[ht,dt],dt=Pt[0],ht=Pt[1]),typeof st=="string"&&(st=it.splitLines(st)),zu(it,{from:dt,to:ht,text:st,origin:gt})}function Qa(it,st,dt,ht){dt1||!(this.children[0]instanceof fd))){var jt=[];this.collapse(jt),this.children=[new fd(jt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st50){for(var Et=gt.lines.length%25+25,jt=Et;jt10);it.parent.maybeSpill()}},iterN:function(it,st,dt){for(var ht=0;htit.display.maxLineLength&&(it.display.maxLine=Xt,it.display.maxLineLength=we,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&Fr(it,ht,gt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Qd(it.doc)),it&&Kn(it,"markerCleared",it,this,ht,gt),st&&Nu(it),this.parent&&this.parent.clear()}},fe.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ht,gt=0;gt0||Et==0&&Pt.clearWhenEmpty!==!1)return Pt;if(Pt.replacedWith&&(Pt.collapsed=!0,Pt.widgetNode=Se("span",[Pt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Pt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Pt.widgetNode.insertLeft=!0)),Pt.collapsed){if(Hi(it,st.line,st,dt,Pt)||st.line!=dt.line&&Hi(it,dt.line,st,dt,Pt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ge()}Pt.addToHistory&&$d(it,{from:st,to:dt,origin:"markText"},it.sel,NaN);var jt=st.line,Rt=it.cm,Xt;if(it.iter(jt,dt.line+1,function(ee){Rt&&Pt.collapsed&&!Rt.options.lineWrapping&&Oi(ee)==Rt.display.maxLine&&(Xt=!0),Pt.collapsed&&jt!=st.line&&bn(ee,0),Ro(ee,new Ti(Pt,jt==st.line?st.ch:null,jt==dt.line?dt.ch:null)),++jt}),Pt.collapsed&&it.iter(st.line,dt.line+1,function(ee){pn(it,ee)&&bn(ee,0)}),Pt.clearOnEnter&&yn(Pt,"beforeCursorEnter",function(){return Pt.clear()}),Pt.readOnly&&(Yi(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Pt.collapsed&&(Pt.id=++Zp,Pt.atomic=!0),Rt){if(Xt&&(Rt.curOp.updateMaxLine=!0),Pt.collapsed)Fr(Rt,st.line,dt.line+1);else if(Pt.className||Pt.startStyle||Pt.endStyle||Pt.css||Pt.attributes||Pt.title)for(var we=st.line;we<=dt.line;we++)To(Rt,we,"text");Pt.atomic&&Qd(Rt.doc),Kn(Rt,"markerAdded",Rt,Pt)}return Pt}var zl=function(it,st){this.markers=it,this.primary=st;for(var dt=0;dt=0;Rt--)zu(this,ht[Rt]);jt?$c(this,jt):this.cm&&su(this.cm)}),undo:xs(function(){nc(this,"undo")}),redo:xs(function(){nc(this,"redo")}),undoSelection:xs(function(){nc(this,"undo",!0)}),redoSelection:xs(function(){nc(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.ch)&&st.push(gt.marker.parent||gt.marker)}return st},findMarks:function(it,st,dt){it=He(this,it),st=He(this,st);var ht=[],gt=it.line;return this.iter(it.line,st.line+1,function(Pt){var Et=Pt.markedSpans;if(Et)for(var jt=0;jt=Rt.to||Rt.from==null&>!=it.line||Rt.from!=null&>==st.line&&Rt.from>=st.ch)&&(!dt||dt(Rt.marker))&&ht.push(Rt.marker.parent||Rt.marker)}++gt}),ht},getAllMarks:function(){var it=[];return this.iter(function(st){var dt=st.markedSpans;if(dt)for(var ht=0;htit)return st=it,!0;it-=Pt,++dt}),He(this,ve(dt,st))},indexFromPos:function(it){it=He(this,it);var st=it.ch;if(it.linest&&(st=it.from),it.to!=null&&it.to-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var we=it.dataTransfer.getData("Text");if(we){var ee;if(st.state.draggingText&&!st.state.draggingText.copy&&(ee=st.listSelections()),Mh(st.doc,lu(dt,dt)),ee)for(var Ye=0;Ye=0;jt--)bh(it.doc,"",ht[jt].from,ht[jt].to,"+delete");su(it)})}function vg(it,st,dt){var ht=xn(it.text,st+dt,dt);return ht<0||ht>it.text.length?null:ht}function qr(it,st,dt){var ht=vg(it,st.ch,dt);return ht==null?null:new ve(st.line,ht,dt<0?"after":"before")}function sc(it,st,dt,ht,gt){if(it){st.doc.direction=="rtl"&&(gt=-gt);var Pt=Dn(dt,st.doc.direction);if(Pt){var Et=gt<0?le(Pt):Pt[0],jt=gt<0==(Et.level==1),Rt=jt?"after":"before",Xt;if(Et.level>0||st.doc.direction=="rtl"){var we=Dl(st,dt);Xt=gt<0?dt.text.length-1:0;var ee=Ia(st,we,Xt).top;Xt=cn(function(Ye){return Ia(st,we,Ye).top==ee},gt<0==(Et.level==1)?Et.from:Et.to-1,Xt),Rt=="before"&&(Xt=vg(dt,Xt,1))}else Xt=gt<0?Et.to:Et.from;return new ve(ht,Xt,Rt)}}return new ve(ht,gt<0?dt.text.length:0,gt<0?"before":"after")}function qc(it,st,dt,ht){var gt=Dn(st,it.doc.direction);if(!gt)return qr(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 Pt=fn(gt,dt.ch,dt.sticky),Et=gt[Pt];if(it.doc.direction=="ltr"&&Et.level%2==0&&(ht>0?Et.to>dt.ch:Et.from=Et.from&&Ye>=we.begin)){var Ue=ee?"before":"after";return new ve(dt.line,Ye,Ue)}}var Fn=function(gi,Bi,ki){for(var Gi=function(Ar,hs){return hs?new ve(dt.line,jt(Ar,1),"before"):new ve(dt.line,Ar,"after")};gi>=0&&gi0==(co.level!=1),Eo=Mi?ki.begin:jt(ki.end,-1);if(co.from<=Eo&&Eo0?we.end:jt(we.begin,-1);return qn!=null&&!(ht>0&&qn==st.text.length)&&(zn=Fn(ht>0?0:gt.length-1,ht,Xt(qn)),zn)?zn:null}var ju={selectAll:Qr,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Oe)},killLine:function(it){return La(it,function(st){if(st.empty()){var dt=Fe(it.doc,st.head.line).text.length;return st.head.ch==dt&&st.head.line0)gt=new ve(gt.line,gt.ch+1),it.replaceRange(Pt.charAt(gt.ch-1)+Pt.charAt(gt.ch-2),ve(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Et=Fe(it.doc,gt.line-1).text;Et&&(gt=new ve(gt.line,1),it.replaceRange(Pt.charAt(0)+it.doc.lineSeparator()+Et.charAt(Et.length-1),ve(gt.line-1,Et.length-1),gt,"+transpose"))}}dt.push(new ar(gt,gt))}it.setSelections(dt)})},newlineAndIndent:function(it){return er(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;htit&&Be(st,this.pos)==0&&dt==this.button};var Sd,Oh;function Lg(it,st){var dt=+new Date;return Oh&&Oh.compare(dt,it,st)?(Sd=Oh=null,"triple"):Sd&&Sd.compare(dt,it,st)?(Oh=new Cg(dt,it,st),Sd=null,"double"):(Sd=new Cg(dt,it,st),Oh=null,"single")}function kl(it){var st=this,dt=st.display;if(!(gn(st,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,Js(dt,it)){ie||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!sf(st,it)){var ht=ta(st,it),gt=qi(it),Pt=ht?Lg(ht,gt):"single";window.focus(),gt==1&&st.state.selectingText&&st.state.selectingText(it),!(ht&&Mg(st,gt,ht,Pt,it))&&(gt==1?ht?tm(st,ht,Pt,it):no(it)==dt.scroller&&xi(it):gt==2?(ht&&_c(st.doc,ht),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(Nt?st.display.input.onContextMenu(it):Ir(st)))}}}function Mg(it,st,dt,ht,gt){var Pt="Click";return ht=="double"?Pt="Double"+Pt:ht=="triple"&&(Pt="Triple"+Pt),Pt=(st==1?"Left":st==2?"Middle":"Right")+Pt,Fh(it,mg(Pt,gt),gt,function(Et){if(typeof Et=="string"&&(Et=ju[Et]),!Et)return!1;var jt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),jt=Et(it,dt)!=ti}finally{it.state.suppressEdits=!1}return jt})}function of(it,st,dt){var ht=it.getOption("configureMouse"),gt=ht?ht(it,st,dt):{};if(gt.unit==null){var Pt=lt?dt.shiftKey&&dt.metaKey:dt.altKey;gt.unit=Pt?"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=ft?dt.metaKey:dt.ctrlKey),gt.moveOnDrag==null&&(gt.moveOnDrag=!(ft?dt.altKey:dt.ctrlKey)),gt}function tm(it,st,dt,ht){Jt?setTimeout(dn(Pr,it),0):it.curOp.focus=pe();var gt=of(it,dt,ht),Pt=it.doc.sel,Et;it.options.dragDrop&&io&&!it.isReadOnly()&&dt=="single"&&(Et=Pt.contains(st))>-1&&(Be((Et=Pt.ranges[Et]).from(),st)<0||st.xRel>0)&&(Be(Et.to(),st)>0||st.xRel<0)?kg(it,ht,st,gt):ev(it,ht,st,gt)}function kg(it,st,dt,ht){var gt=it.display,Pt=!1,Et=ls(it,function(Xt){ie&&(gt.scroller.draggable=!1),it.state.draggingText=!1,hi(gt.wrapper.ownerDocument,"mouseup",Et),hi(gt.wrapper.ownerDocument,"mousemove",jt),hi(gt.scroller,"dragstart",Rt),hi(gt.scroller,"drop",Et),Pt||(xi(Xt),ht.addNew||_c(it.doc,dt,null,null,ht.extend),ie&&!Xe||Jt&&ue==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),jt=function(Xt){Pt=Pt||Math.abs(st.clientX-Xt.clientX)+Math.abs(st.clientY-Xt.clientY)>=10},Rt=function(){return Pt=!0};ie&&(gt.scroller.draggable=!0),it.state.draggingText=Et,Et.copy=!ht.moveOnDrag,gt.scroller.dragDrop&>.scroller.dragDrop(),yn(gt.wrapper.ownerDocument,"mouseup",Et),yn(gt.wrapper.ownerDocument,"mousemove",jt),yn(gt.scroller,"dragstart",Rt),yn(gt.scroller,"drop",Et),Ir(it),setTimeout(function(){return gt.input.focus()},20)}function bg(it,st,dt){if(dt=="char")return new ar(st,st);if(dt=="word")return it.findWordAt(st);if(dt=="line")return new ar(ve(st.line,0),He(it.doc,ve(st.line+1,0)));var ht=dt(it,st);return new ar(ht.from,ht.to)}function ev(it,st,dt,ht){var gt=it.display,Pt=it.doc;xi(st);var Et,jt,Rt=Pt.sel,Xt=Rt.ranges;if(ht.addNew&&!ht.extend?(jt=Pt.sel.contains(dt),jt>-1?Et=Xt[jt]:Et=new ar(dt,dt)):(Et=Pt.sel.primary(),jt=Pt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Et=new ar(dt,dt)),dt=ta(it,st,!0,!0),jt=-1;else{var we=bg(it,dt,ht.unit);ht.extend?Et=Xc(Et,we.anchor,we.head,ht.extend):Et=we}ht.addNew?jt==-1?(jt=Xt.length,Ws(Pt,hl(it,Xt.concat([Et]),jt),{scroll:!1,origin:"*mouse"})):Xt.length>1&&Xt[jt].empty()&&ht.unit=="char"&&!ht.extend?(Ws(Pt,hl(it,Xt.slice(0,jt).concat(Xt.slice(jt+1)),0),{scroll:!1,origin:"*mouse"}),Rt=Pt.sel):Ru(Pt,jt,Et,en):(jt=0,Ws(Pt,new Ja([Et],0),en),Rt=Pt.sel);var ee=dt;function Ye(ki){if(Be(ee,ki)!=0)if(ee=ki,ht.unit=="rectangle"){for(var Gi=[],co=it.options.tabSize,Mi=ae(Fe(Pt,dt.line).text,dt.ch,co),Eo=ae(Fe(Pt,ki.line).text,ki.ch,co),Ar=Math.min(Mi,Eo),hs=Math.max(Mi,Eo),Wr=Math.min(dt.line,ki.line),fa=Math.min(it.lastLine(),Math.max(dt.line,ki.line));Wr<=fa;Wr++){var Vs=Fe(Pt,Wr).text,os=Yn(Vs,Ar,co);Ar==hs?Gi.push(new ar(ve(Wr,os),ve(Wr,os))):Vs.length>os&&Gi.push(new ar(ve(Wr,os),ve(Wr,Yn(Vs,hs,co))))}Gi.length||Gi.push(new ar(dt,dt)),Ws(Pt,hl(it,Rt.ranges.slice(0,jt).concat(Gi),jt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(ki)}else{var Ma=Et,Is=bg(it,ki,ht.unit),rs=Ma.anchor,tr;Be(Is.anchor,rs)>0?(tr=Is.head,rs=Te(Ma.from(),Is.anchor)):(tr=Is.anchor,rs=De(Ma.to(),Is.head));var Kr=Rt.ranges.slice(0);Kr[jt]=em(it,new ar(He(Pt,rs),tr)),Ws(Pt,hl(it,Kr,jt),en)}}var Ue=gt.wrapper.getBoundingClientRect(),Fn=0;function zn(ki){var Gi=++Fn,co=ta(it,ki,!0,ht.unit=="rectangle");if(co)if(Be(co,ee)!=0){it.curOp.focus=pe(),Ye(co);var Mi=zo(gt,Pt);(co.line>=Mi.to||co.lineUe.bottom?20:0;Eo&&setTimeout(ls(it,function(){Fn==Gi&&(gt.scroller.scrollTop+=Eo,zn(ki))}),50)}}function qn(ki){it.state.selectingText=!1,Fn=1/0,ki&&(xi(ki),gt.input.focus()),hi(gt.wrapper.ownerDocument,"mousemove",gi),hi(gt.wrapper.ownerDocument,"mouseup",Bi),Pt.history.lastSelOrigin=null}var gi=ls(it,function(ki){ki.buttons===0||!qi(ki)?qn(ki):zn(ki)}),Bi=ls(it,qn);it.state.selectingText=Bi,yn(gt.wrapper.ownerDocument,"mousemove",gi),yn(gt.wrapper.ownerDocument,"mouseup",Bi)}function em(it,st){var dt=st.anchor,ht=st.head,gt=Fe(it.doc,dt.line);if(Be(dt,ht)==0&&dt.sticky==ht.sticky)return st;var Pt=Dn(gt);if(!Pt)return st;var Et=fn(Pt,dt.ch,dt.sticky),jt=Pt[Et];if(jt.from!=dt.ch&&jt.to!=dt.ch)return st;var Rt=Et+(jt.from==dt.ch==(jt.level!=1)?0:1);if(Rt==0||Rt==Pt.length)return st;var Xt;if(ht.line!=dt.line)Xt=(ht.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var we=fn(Pt,ht.ch,ht.sticky),ee=we-Et||(ht.ch-dt.ch)*(jt.level==1?-1:1);we==Rt-1||we==Rt?Xt=ee<0:Xt=ee>0}var Ye=Pt[Rt+(Xt?-1:0)],Ue=Xt==(Ye.level==1),Fn=Ue?Ye.from:Ye.to,zn=Ue?"after":"before";return dt.ch==Fn&&dt.sticky==zn?st:new ar(new ve(dt.line,Fn,zn),ht)}function rf(it,st,dt,ht){var gt,Pt;if(st.touches)gt=st.touches[0].clientX,Pt=st.touches[0].clientY;else try{gt=st.clientX,Pt=st.clientY}catch(Ye){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&xi(st);var Et=it.display,jt=Et.lineDiv.getBoundingClientRect();if(Pt>jt.bottom||!_n(it,dt))return bi(st);Pt-=jt.top-Et.viewOffset;for(var Rt=0;Rt=gt){var we=_e(it.doc,Pt),ee=it.display.gutterSpecs[Rt];return We(it,dt,it,we,ee.className,st),bi(st)}}}function sf(it,st){return rf(it,st,"gutterClick",!0)}function af(it,st){Js(it.display,st)||nm(it,st)||gn(it,st,"contextmenu")||Nt||it.display.input.onContextMenu(st)}function nm(it,st){return _n(it,"gutterContextMenu")?rf(it,st,"gutterContextMenu",!1):!1}function lf(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jr(it)}var Gu={toString:function(){return"CodeMirror.Init"}},Tg={},ac={};function im(it){var st=it.optionHandlers;function dt(ht,gt,Pt,Et){it.defaults[ht]=gt,Pt&&(st[ht]=Et?function(jt,Rt,Xt){Xt!=Gu&&Pt(jt,Rt,Xt)}:Pt)}it.defineOption=dt,it.Init=Gu,dt("value","",function(ht,gt){return ht.setValue(gt)},!0),dt("mode",null,function(ht,gt){ht.doc.modeOption=gt,No(ht)},!0),dt("indentUnit",2,No,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ht){Yd(ht),jr(ht),Fr(ht)},!0),dt("lineSeparator",null,function(ht,gt){if(ht.doc.lineSep=gt,!!gt){var Pt=[],Et=ht.doc.first;ht.doc.iter(function(Rt){for(var Xt=0;;){var we=Rt.text.indexOf(gt,Xt);if(we==-1)break;Xt=we+gt.length,Pt.push(ve(Et,we))}Et++});for(var jt=Pt.length-1;jt>=0;jt--)bh(ht.doc,gt,Pt[jt],ve(Pt[jt].line,Pt[jt].ch+gt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,gt,Pt){ht.state.specialChars=new RegExp(gt.source+(gt.test(" ")?"":"| "),"g"),Pt!=Gu&&ht.refresh()}),dt("specialCharPlaceholder",Mr,function(ht){return ht.refresh()},!0),dt("electricChars",!0),dt("inputStyle",nt?"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",!pt),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ht){lf(ht),ja(ht)},!0),dt("keyMap","default",function(ht,gt,Pt){var Et=Eh(gt),jt=Pt!=Gu&&Eh(Pt);jt&&jt.detach&&jt.detach(ht,Et),Et.attach&&Et.attach(ht,jt||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,om,!0),dt("gutters",[],function(ht,gt){ht.display.gutterSpecs=ws(gt,ht.options.lineNumbers),ja(ht)},!0),dt("fixedGutter",!0,function(ht,gt){ht.display.gutters.style.left=gt?Vd(ht.display)+"px":"0",ht.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ht){return bu(ht)},!0),dt("scrollbarStyle","native",function(ht){eg(ht),bu(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=ws(ht.options.gutters,gt),ja(ht)},!0),dt("firstLineNumber",1,ja,!0),dt("lineNumberFormatter",function(ht){return ht},ja,!0),dt("showCursorWhenSelecting",!1,as,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ht,gt){gt=="nocursor"&&(yh(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,uf),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,as,!0),dt("singleCursorHeightPerLine",!0,as,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,Yd,!0),dt("addModeClass",!1,Yd,!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,Yd,!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 uf(it,st,dt){var ht=dt&&dt!=Gu;if(!st!=!ht){var gt=it.display.dragFunctions,Pt=st?yn:hi;Pt(it.display.scroller,"dragstart",gt.start),Pt(it.display.scroller,"dragenter",gt.enter),Pt(it.display.scroller,"dragover",gt.over),Pt(it.display.scroller,"dragleave",gt.leave),Pt(it.display.scroller,"drop",gt.drop)}}function om(it){it.options.lineWrapping?(Ke(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ht(it.display.wrapper,"CodeMirror-wrap"),Vo(it)),Ki(it),Fr(it),jr(it),setTimeout(function(){return bu(it)},100)}function qo(it,st){var dt=this;if(!(this instanceof qo))return new qo(it,st);this.options=st=st?Hn(st):{},Hn(Tg,st,!1);var ht=st.value;typeof ht=="string"?ht=new Ds(ht,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ht.modeOption=st.mode),this.doc=ht;var gt=new qo.inputStyles[st.inputStyle](this),Pt=this.display=new Bu(it,ht,gt,st);Pt.wrapper.CodeMirror=this,lf(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),eg(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 Ut,keySeq:null,specialChars:null},st.autofocus&&!nt&&Pt.input.focus(),Jt&&ue<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),xd(this),Ha(),Tu(this),this.curOp.forceUpdate=!0,Zc(this,ht),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&Yo(dt)},20):yh(this);for(var Et in ac)ac.hasOwnProperty(Et)&&ac[Et](this,st[Et],Gu);ns(this),st.finishInit&&st.finishInit(this);for(var jt=0;jt20*20}yn(st.scroller,"touchstart",function(Rt){if(!gn(it,Rt)&&!Pt(Rt)&&!sf(it,Rt)){st.input.ensurePolled(),clearTimeout(dt);var Xt=+new Date;st.activeTouch={start:Xt,moved:!1,prev:Xt-ht.end<=300?ht:null},Rt.touches.length==1&&(st.activeTouch.left=Rt.touches[0].pageX,st.activeTouch.top=Rt.touches[0].pageY)}}),yn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),yn(st.scroller,"touchend",function(Rt){var Xt=st.activeTouch;if(Xt&&!Js(st,Rt)&&Xt.left!=null&&!Xt.moved&&new Date-Xt.start<300){var we=it.coordsChar(st.activeTouch,"page"),ee;!Xt.prev||Et(Xt,Xt.prev)?ee=new ar(we,we):!Xt.prev.prev||Et(Xt,Xt.prev.prev)?ee=it.findWordAt(we):ee=new ar(ve(we.line,0),He(it.doc,ve(we.line+1,0))),it.setSelection(ee.anchor,ee.head),it.focus(),xi(Rt)}gt()}),yn(st.scroller,"touchcancel",gt),yn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(xh(it,st.scroller.scrollTop),au(it,st.scroller.scrollLeft,!0),We(it,"scroll",it))}),yn(st.scroller,"mousewheel",function(Rt){return Cs(it,Rt)}),yn(st.scroller,"DOMMouseScroll",function(Rt){return Cs(it,Rt)}),yn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Rt){gn(it,Rt)||Ii(Rt)},over:function(Rt){gn(it,Rt)||(_p(it,Rt),Ii(Rt))},start:function(Rt){return Xp(it,Rt)},drop:ls(it,dg),leave:function(Rt){gn(it,Rt)||$p(it)}};var jt=st.input.getField();yn(jt,"keyup",function(Rt){return wg.call(it,Rt)}),yn(jt,"keydown",ls(it,xg)),yn(jt,"keypress",ls(it,Ml)),yn(jt,"focus",function(Rt){return Yo(it,Rt)}),yn(jt,"blur",function(Rt){return yh(it,Rt)})}var Bh=[];qo.defineInitHook=function(it){return Bh.push(it)};function us(it,st,dt,ht){var gt=it.doc,Pt;dt==null&&(dt="add"),dt=="smart"&&(gt.mode.indent?Pt=ii(it,st).state:dt="prev");var Et=it.options.tabSize,jt=Fe(gt,st),Rt=ae(jt.text,null,Et);jt.stateAfter&&(jt.stateAfter=null);var Xt=jt.text.match(/^\s*/)[0],we;if(!ht&&!/\S/.test(jt.text))we=0,dt="not";else if(dt=="smart"&&(we=gt.mode.indent(Pt,jt.text.slice(Xt.length),jt.text),we==ti||we>150)){if(!ht)return;dt="prev"}dt=="prev"?st>gt.first?we=ae(Fe(gt,st-1).text,null,Et):we=0:dt=="add"?we=Rt+it.options.indentUnit:dt=="subtract"?we=Rt-it.options.indentUnit:typeof dt=="number"&&(we=Rt+dt),we=Math.max(0,we);var ee="",Ye=0;if(it.options.indentWithTabs)for(var Ue=Math.floor(we/Et);Ue;--Ue)Ye+=Et,ee+=" ";if(YeEt,Rt=Li(st),Xt=null;if(jt&&ht.ranges.length>1)if(ca&&ca.text.join(` `)==st){if(ht.ranges.length%ca.text.length==0){Xt=[];for(var we=0;we=0;Ye--){var Ue=ht.ranges[Ye],Fn=Ue.from(),zn=Ue.to();Ue.empty()&&(dt&&dt>0?Fn=ve(Fn.line,Fn.ch-dt):it.state.overwrite&&!jt?zn=ve(zn.line,Math.min(Fe(Pt,zn.line).text.length,zn.ch+le(Rt).length)):jt&&ca&&ca.lineWise&&ca.text.join(` `)==Rt.join(` `)&&(Fn=zn=ve(Fn.line,0)));var qn={from:Fn,to:zn,text:Xt?Xt[Ye%Xt.length]:Rt,origin:gt||(jt?"paste":it.state.cutIncoming>Et?"cut":"+input")};zu(it.doc,qn),Kn(it,"inputRead",it,qn)}st&&!jt&&Eg(it,st),su(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ee),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Ng(it,st){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&er(st,function(){return lc(st,dt,0,null,"paste")}),!0}function Eg(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 Pt=it.getModeAt(gt.head),Et=!1;if(Pt.electricChars){for(var jt=0;jt-1){Et=us(it,gt.head.line,"smart");break}}else Pt.electricInput&&Pt.electricInput.test(Fe(it.doc,gt.head.line).text.slice(0,gt.head.ch))&&(Et=us(it,gt.head.line,"smart"));Et&&Kn(it,"electricInput",it,gt.head.line)}}}function Fg(it){for(var st=[],dt=[],ht=0;htPt&&(us(this,jt.head.line,ht,!0),Pt=jt.head.line,Et==this.doc.sel.primIndex&&su(this));else{var Rt=jt.from(),Xt=jt.to(),we=Math.max(Pt,Rt.line);Pt=Math.min(this.lastLine(),Xt.line-(Xt.ch?0:1))+1;for(var ee=we;ee0&&Ru(this.doc,Et,new ar(Rt,Ye[Et].to()),Oe)}}}),getTokenAt:function(ht,gt){return Gn(this,ht,gt)},getLineTokens:function(ht,gt){return Gn(this,ve(ht),gt,!0)},getTokenTypeAt:function(ht){ht=He(this.doc,ht);var gt=vi(this,Fe(this.doc,ht.line)),Pt=0,Et=(gt.length-1)/2,jt=ht.ch,Rt;if(jt==0)Rt=gt[2];else for(;;){var Xt=Pt+Et>>1;if((Xt?gt[Xt*2-1]:0)>=jt)Et=Xt;else if(gt[Xt*2+1]Rt&&(ht=Rt,Et=!0),jt=Fe(this.doc,ht)}else jt=ht;return Dr(this,jt,{top:0,left:0},gt||"page",Pt||Et).top+(Et?this.doc.height-oo(jt):0)},defaultTextHeight:function(){return ru(this.display)},defaultCharWidth:function(){return vh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,gt,Pt,Et,jt){var Rt=this.display;ht=Lr(this,He(this.doc,ht));var Xt=ht.bottom,we=ht.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Rt.sizer.appendChild(gt),Et=="over")Xt=ht.top;else if(Et=="above"||Et=="near"){var ee=Math.max(Rt.wrapper.clientHeight,this.doc.height),Ye=Math.max(Rt.sizer.clientWidth,Rt.lineSpace.clientWidth);(Et=="above"||ht.bottom+gt.offsetHeight>ee)&&ht.top>gt.offsetHeight?Xt=ht.top-gt.offsetHeight:ht.bottom+gt.offsetHeight<=ee&&(Xt=ht.bottom),we+gt.offsetWidth>Ye&&(we=Ye-gt.offsetWidth)}gt.style.top=Xt+"px",gt.style.left=gt.style.right="",jt=="right"?(we=Rt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):(jt=="left"?we=0:jt=="middle"&&(we=(Rt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=we+"px"),Pt&&Ud(this,{left:we,top:Xt,right:we+gt.offsetWidth,bottom:Xt+gt.offsetHeight})},triggerOnKeyDown:Ss(xg),triggerOnKeyPress:Ss(Ml),triggerOnKeyUp:wg,triggerOnMouseDown:Ss(kl),execCommand:function(ht){if(ju.hasOwnProperty(ht))return ju[ht].call(null,this)},triggerElectric:Ss(function(ht){Eg(this,ht)}),findPosH:function(ht,gt,Pt,Et){var jt=1;gt<0&&(jt=-1,gt=-gt);for(var Rt=He(this.doc,ht),Xt=0;Xt0&&we(Pt.charAt(Et-1));)--Et;for(;jt.5||this.options.lineWrapping)&&Ki(this),We(this,"refresh",this)}),swapDoc:Ss(function(ht){var gt=this.doc;return gt.cm=null,this.state.selectingText&&this.state.selectingText(),Zc(this,ht),jr(this),this.display.input.reset(),Sh(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,Kn(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}},Jn(it),it.registerHelper=function(ht,gt,Pt){dt.hasOwnProperty(ht)||(dt[ht]=it[ht]={_global:[]}),dt[ht][gt]=Pt},it.registerGlobalHelper=function(ht,gt,Pt,Et){it.registerHelper(ht,gt,Et),dt[ht]._global.push({pred:Pt,val:Et})}}function uc(it,st,dt,ht,gt){var Pt=st,Et=dt,jt=Fe(it,st.line),Rt=gt&&it.direction=="rtl"?-dt:dt;function Xt(){var Bi=st.line+Rt;return Bi=it.first+it.size?!1:(st=new ve(Bi,st.ch,st.sticky),jt=Fe(it,Bi))}function we(Bi){var ki;if(ht=="codepoint"){var Gi=jt.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(Gi)?ki=null:ki=new ve(st.line,Math.max(0,Math.min(jt.text.length,st.ch+dt*(Gi>=55296&&Gi<56320?2:1))),-dt)}else gt?ki=qc(it.cm,jt,st,dt):ki=qr(jt,st,dt);if(ki==null)if(!Bi&&Xt())st=sc(gt,it.cm,jt,st.line,Rt);else return!1;else st=ki;return!0}if(ht=="char"||ht=="codepoint")we();else if(ht=="column")we(!0);else if(ht=="word"||ht=="group")for(var ee=null,Ye=ht=="group",Ue=it.cm&&it.cm.getHelper(st,"wordChars"),Fn=!0;!(dt<0&&!we(!Fn));Fn=!1){var zn=jt.text.charAt(st.ch)||` `,qn=Gt(zn,Ue)?"w":Ye&&zn==` `?"n":!Ye||/\s/.test(zn)?null:"p";if(Ye&&!Fn&&!qn&&(qn="s"),ee&&ee!=qn){dt<0&&(dt=1,we(),st.sticky="after");break}if(qn&&(ee=qn),dt>0&&!we(!Fn))break}var gi=tc(it,st,Pt,Et,!0);return ge(Pt,gi)&&(gi.hitSide=!0),gi}function Wu(it,st,dt,ht){var gt=it.doc,Pt=st.left,Et;if(ht=="page"){var jt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Rt=Math.max(jt-.5*ru(it.display),3);Et=(dt>0?st.bottom:st.top)+dt*Rt}else ht=="line"&&(Et=dt>0?st.bottom+3:st.top-3);for(var Xt;Xt=Rc(it,Pt,Et),!!Xt.outside;){if(dt<0?Et<=0:Et>=gt.height){Xt.hitSide=!0;break}Et+=dt*5}return Xt}var gr=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ut,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};gr.prototype.init=function(it){var st=this,dt=this,ht=dt.cm,gt=dt.div=it.lineDiv;Ag(gt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Pt(jt){for(var Rt=jt.target;Rt;Rt=Rt.parentNode){if(Rt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Rt.className))break}return!1}yn(gt,"paste",function(jt){!Pt(jt)||gn(ht,jt)||Ng(jt,ht)||ue<=11&&setTimeout(ls(ht,function(){return st.updateFromDOM()}),20)}),yn(gt,"compositionstart",function(jt){st.composing={data:jt.data,done:!1}}),yn(gt,"compositionupdate",function(jt){st.composing||(st.composing={data:jt.data,done:!1})}),yn(gt,"compositionend",function(jt){st.composing&&(jt.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 Et(jt){if(!(!Pt(jt)||gn(ht,jt))){if(ht.somethingSelected())Dh({lineWise:!1,text:ht.getSelections()}),jt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Rt=Fg(ht);Dh({lineWise:!0,text:Rt.text}),jt.type=="cut"&&ht.operation(function(){ht.setSelections(Rt.ranges,0,Oe),ht.replaceSelection("",null,"cut")})}else return;if(jt.clipboardData){jt.clipboardData.clearData();var Xt=ca.text.join(` `);if(jt.clipboardData.setData("Text",Xt),jt.clipboardData.getData("Text")==Xt){jt.preventDefault();return}}var we=Og(),ee=we.firstChild;ht.display.lineSpace.insertBefore(we,ht.display.lineSpace.firstChild),ee.value=ca.text.join(` `);var Ye=document.activeElement;ln(ee),setTimeout(function(){ht.display.lineSpace.removeChild(we),Ye.focus(),Ye==gt&&dt.showPrimarySelection()},50)}}yn(gt,"copy",Et),yn(gt,"cut",Et)},gr.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},gr.prototype.prepareSelection=function(){var it=Mu(this.cm,!1);return it.focus=document.activeElement==this.div,it},gr.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},gr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},gr.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&&hf(st,ht)||{node:jt[0].measure.map[2],offset:0},Xt=gt.lineit.firstLine()&&(ht=ve(ht.line-1,Fe(it.doc,ht.line-1).length)),gt.ch==Fe(it.doc,gt.line).text.length&>.linest.viewTo-1)return!1;var Pt,Et,jt;ht.line==st.viewFrom||(Pt=za(it,ht.line))==0?(Et=$t(st.view[0].line),jt=st.view[0].node):(Et=$t(st.view[Pt].line),jt=st.view[Pt-1].node.nextSibling);var Rt=za(it,gt.line),Xt,we;if(Rt==st.view.length-1?(Xt=st.viewTo-1,we=st.lineDiv.lastChild):(Xt=$t(st.view[Rt+1].line)-1,we=st.view[Rt+1].node.previousSibling),!jt)return!1;for(var ee=it.doc.splitLines(wd(it,jt,we,Et,Xt)),Ye=Je(it.doc,ve(Et,0),ve(Xt,Fe(it.doc,Xt).text.length));ee.length>1&&Ye.length>1;)if(le(ee)==le(Ye))ee.pop(),Ye.pop(),Xt--;else if(ee[0]==Ye[0])ee.shift(),Ye.shift(),Et++;else break;for(var Ue=0,Fn=0,zn=ee[0],qn=Ye[0],gi=Math.min(zn.length,qn.length);Ueht.ch&&Bi.charCodeAt(Bi.length-Fn-1)==ki.charCodeAt(ki.length-Fn-1);)Ue--,Fn++;ee[ee.length-1]=Bi.slice(0,Bi.length-Fn).replace(/^\u200b+/,""),ee[0]=ee[0].slice(Ue).replace(/\u200b+$/,"");var co=ve(Et,Ue),Mi=ve(Xt,Ye.length?le(Ye).length-Fn:0);if(ee.length>1||ee[0]||Be(co,Mi))return bh(it.doc,ee,co,Mi,"+input"),!0},gr.prototype.ensurePolled=function(){this.forceCompositionEnd()},gr.prototype.reset=function(){this.forceCompositionEnd()},gr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},gr.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))},gr.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&er(this.cm,function(){return Fr(it.cm)})},gr.prototype.setUneditable=function(it){it.contentEditable="false"},gr.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||ls(this.cm,lc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},gr.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},gr.prototype.onContextMenu=function(){},gr.prototype.resetPosition=function(){},gr.prototype.needsContentAttribute=!0;function hf(it,st){var dt=gh(it,st.line);if(!dt||dt.hidden)return null;var ht=Fe(it.doc,st.line),gt=ch(dt,ht,st.line),Pt=Dn(ht,it.doc.direction),Et="left";if(Pt){var jt=fn(Pt,st.ch);Et=jt%2?"right":"left"}var Rt=ph(gt.map,st.ch,Et);return Rt.offset=Rt.collapse=="right"?Rt.end:Rt.start,Rt}function Bg(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Pd(it,st){return st&&(it.bad=!0),it}function wd(it,st,dt,ht,gt){var Pt="",Et=!1,jt=it.doc.lineSeparator(),Rt=!1;function Xt(Ue){return function(Fn){return Fn.id==Ue}}function we(){Et&&(Pt+=jt,Rt&&(Pt+=jt),Et=Rt=!1)}function ee(Ue){Ue&&(we(),Pt+=Ue)}function Ye(Ue){if(Ue.nodeType==1){var Fn=Ue.getAttribute("cm-text");if(Fn){ee(Fn);return}var zn=Ue.getAttribute("cm-marker"),qn;if(zn){var gi=it.findMarks(ve(ht,0),ve(gt+1,0),Xt(+zn));gi.length&&(qn=gi[0].find(0))&&ee(Je(it.doc,qn.from,qn.to).join(jt));return}if(Ue.getAttribute("contenteditable")=="false")return;var Bi=/^(pre|div|p|li|table|br)$/i.test(Ue.nodeName);if(!/^br$/i.test(Ue.nodeName)&&Ue.textContent.length==0)return;Bi&&we();for(var ki=0;ki=9&&st.hasSelection&&(st.hasSelection=null),dt.poll()}),yn(gt,"paste",function(Et){gn(ht,Et)||Ng(Et,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Pt(Et){if(!gn(ht,Et)){if(ht.somethingSelected())Dh({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var jt=Fg(ht);Dh({lineWise:!0,text:jt.text}),Et.type=="cut"?ht.setSelections(jt.ranges,null,Oe):(dt.prevInput="",gt.value=jt.text.join(` `),ln(gt))}else return;Et.type=="cut"&&(ht.state.cutIncoming=+new Date)}}yn(gt,"cut",Pt),yn(gt,"copy",Pt),yn(it.scroller,"paste",function(Et){if(!(Js(it,Et)||gn(ht,Et))){if(!gt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var jt=new Event("paste");jt.clipboardData=Et.clipboardData,gt.dispatchEvent(jt)}}),yn(it.lineSpace,"selectstart",function(Et){Js(it,Et)||xi(Et)}),yn(gt,"compositionstart",function(){var Et=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Et,range:ht.markText(Et,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),yn(gt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},is.prototype.createField=function(it){this.wrapper=Og(),this.textarea=this.wrapper.firstChild},is.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var it=this.cm,st=it.display,dt=it.doc,ht=Mu(it);if(it.options.moveInputWithCursor){var gt=Lr(it,dt.sel.primary().head,"div"),Pt=st.wrapper.getBoundingClientRect(),Et=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,gt.top+Et.top-Pt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,gt.left+Et.left-Pt.left))}return ht},is.prototype.showSelection=function(it){var st=this.cm,dt=st.display;Qt(dt.cursorDiv,it.cursors),Qt(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},is.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&&ln(this.textarea),Jt&&ue>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",Jt&&ue>=9&&(this.hasSelection=null))}},is.prototype.getField=function(){return this.textarea},is.prototype.supportsTouch=function(){return!1},is.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||pe()!=this.textarea))try{this.textarea.focus()}catch(it){}},is.prototype.blur=function(){this.textarea.blur()},is.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},is.prototype.receivedFocus=function(){this.slowPoll()},is.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},is.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)},is.prototype.poll=function(){var it=this,st=this.cm,dt=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!st.state.focused||Ct(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(Jt&&ue>=9&&this.hasSelection===gt||ft&&/[\uf700-\uf7ff]/.test(gt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Pt=gt.charCodeAt(0);if(Pt==8203&&!ht&&(ht="\u200B"),Pt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Et=0,jt=Math.min(ht.length,gt.length);Et1e3||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},is.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},is.prototype.onKeyPress=function(){Jt&&ue>=9&&(this.hasSelection=null),this.fastPoll()},is.prototype.onContextMenu=function(it){var st=this,dt=st.cm,ht=dt.display,gt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Pt=ta(dt,it),Et=ht.scroller.scrollTop;if(!Pt||ne)return;var jt=dt.options.resetSelectionOnContextMenu;jt&&dt.doc.sel.contains(Pt)==-1&&ls(dt,Ws)(dt.doc,lu(Pt),Oe);var Rt=gt.style.cssText,Xt=st.wrapper.style.cssText,we=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(it.clientY-we.top-5)+"px; left: "+(it.clientX-we.left-5)+`px; z-index: 1000; background: `+(Jt?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ee;ie&&(ee=window.scrollY),ht.input.focus(),ie&&window.scrollTo(null,ee),ht.input.reset(),dt.somethingSelected()||(gt.value=st.prevInput=" "),st.contextMenuPending=Ue,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function Ye(){if(gt.selectionStart!=null){var zn=dt.somethingSelected(),qn="\u200B"+(zn?gt.value:"");gt.value="\u21DA",gt.value=qn,st.prevInput=zn?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=qn.length,ht.selForContextMenu=dt.doc.sel}}function Ue(){if(st.contextMenuPending==Ue&&(st.contextMenuPending=!1,st.wrapper.style.cssText=Xt,gt.style.cssText=Rt,Jt&&ue<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Et),gt.selectionStart!=null)){(!Jt||Jt&&ue<9)&&Ye();var zn=0,qn=function(){ht.selForContextMenu==dt.doc.sel&>.selectionStart==0&>.selectionEnd>0&&st.prevInput=="\u200B"?ls(dt,Qr)(dt):zn++<10?ht.detectingSelectAll=setTimeout(qn,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(qn,200)}}if(Jt&&ue>=9&&Ye(),Nt){Ii(it);var Fn=function(){hi(window,"mouseup",Fn),setTimeout(Ue,20)};yn(window,"mouseup",Fn)}else setTimeout(Ue,50)},is.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},is.prototype.setUneditable=function(){},is.prototype.needsContentAttribute=!1;function sm(it,st){if(st=st?Hn(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=pe();st.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=jt.getValue()}var gt;if(it.form&&(yn(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Pt=it.form;gt=Pt.submit;try{var Et=Pt.submit=function(){ht(),Pt.submit=gt,Pt.submit(),Pt.submit=Et}}catch(Rt){}}st.finishInit=function(Rt){Rt.save=ht,Rt.getTextArea=function(){return it},Rt.toTextArea=function(){Rt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Rt.getWrapperElement()),it.style.display="",it.form&&(hi(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var jt=qo(function(Rt){return it.parentNode.insertBefore(Rt,it.nextSibling)},st);return jt}function Cd(it){it.off=hi,it.on=yn,it.wheelEventPixels=Ga,it.Doc=Ds,it.splitLines=Li,it.countColumn=ae,it.findColumn=Yn,it.isWordChar=Ft,it.Pass=ti,it.signal=We,it.Line=$o,it.changeEnd=Du,it.scrollbarModel=tg,it.Pos=ve,it.cmpPos=Be,it.modes=Jo,it.mimeModes=Qo,it.resolveMode=Io,it.getMode=be,it.modeExtensions=Me,it.extendMode=Wt,it.copyState=Ae,it.startState=re,it.innerMode=on,it.commands=ju,it.keyMap=Ca,it.keyName=Qp,it.isModifierKey=pd,it.lookupKey=qa,it.normalizeKeyMap=pg,it.StringStream=Yt,it.SharedTextMarker=zl,it.TextMarker=fe,it.LineWidget=du,it.e_preventDefault=xi,it.e_stopPropagation=Di,it.e_stop=Ii,it.addClass=Ke,it.contains=Re,it.rmClass=Ht,it.keyNames=jl}im(qo),Hu(qo);var cu="iter insert remove copy getEditor constructor".split(" ");for(var dc in Ds.prototype)Ds.prototype.hasOwnProperty(dc)&&hn(cu,dc)<0&&(qo.prototype[dc]=function(it){return function(){return it.apply(this.doc,arguments)}}(Ds.prototype[dc]));return Jn(Ds),qo.inputStyles={textarea:is,contenteditable:gr},qo.defineMode=function(it){!qo.defaults.mode&&it!="null"&&(qo.defaults.mode=it),cr.apply(this,arguments)},qo.defineMIME=Lo,qo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),qo.defineMIME("text/plain","null"),qo.defineExtension=function(it,st){qo.prototype[it]=st},qo.defineDocExtension=function(it,st){Ds.prototype[it]=st},qo.fromTextArea=sm,Cd(qo),qo.version="5.58.2",qo})},25419:function(Ln,En,Ot){(function(Tt){Tt(Ot(89780),Ot(15525),Ot(98101))})(function(Tt){"use strict";Tt.defineMode("markdown",function(de,se){var je=Tt.getMode(de,"text/html"),Jt=je.name=="null";function ue(ae){if(Tt.findModeByName){var Ut=Tt.findModeByName(ae);Ut&&(ae=Ut.mime||Ut.mimes[0])}var hn=Tt.getMode(de,ae);return hn.name=="null"?null:hn}se.highlightFormatting===void 0&&(se.highlightFormatting=!1),se.maxBlockquoteDepth===void 0&&(se.maxBlockquoteDepth=0),se.taskLists===void 0&&(se.taskLists=!1),se.strikethrough===void 0&&(se.strikethrough=!1),se.emoji===void 0&&(se.emoji=!1),se.fencedCodeBlockHighlighting===void 0&&(se.fencedCodeBlockHighlighting=!0),se.fencedCodeBlockDefaultMode===void 0&&(se.fencedCodeBlockDefaultMode="text/plain"),se.xml===void 0&&(se.xml=!0),se.tokenTypeOverrides===void 0&&(se.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 Ve in ie)ie.hasOwnProperty(Ve)&&se.tokenTypeOverrides[Ve]&&(ie[Ve]=se.tokenTypeOverrides[Ve]);var Pe=/^([*\-_])(?:\s*\1){2,}\s*$/,ne=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Xe=/^\[(x| )\](?=\s)/i,me=se.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,an=/^ {0,3}(?:\={1,}|-{2,})\s*$/,At=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,ft=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,lt=" ";function pt(ae,Ut,hn){return Ut.f=Ut.inline=hn,hn(ae,Ut)}function vt(ae,Ut,hn){return Ut.f=Ut.block=hn,hn(ae,Ut)}function wt(ae){return!ae||!/\S/.test(ae.string)}function Nt(ae){if(ae.linkTitle=!1,ae.linkHref=!1,ae.linkText=!1,ae.em=!1,ae.strong=!1,ae.strikethrough=!1,ae.quote=0,ae.indentedCode=!1,ae.f==Ht){var Ut=Jt;if(!Ut){var hn=Tt.innerMode(je,ae.htmlState);Ut=hn.mode.name=="xml"&&hn.state.tagStart===null&&!hn.state.context&&hn.state.tokenize.isInText}Ut&&(ae.f=Se,ae.block=bt,ae.htmlState=null)}return ae.trailingSpace=0,ae.trailingSpaceNewLine=!1,ae.prevLine=ae.thisLine,ae.thisLine={stream:null},null}function bt(ae,Ut){var hn=ae.column()===Ut.indentation,Qn=wt(Ut.prevLine.stream),ti=Ut.indentedCode,Oe=Ut.prevLine.hr,en=Ut.list!==!1,mn=(Ut.listStack[Ut.listStack.length-1]||0)+3;Ut.indentedCode=!1;var Yn=Ut.indentation;if(Ut.indentationDiff===null&&(Ut.indentationDiff=Ut.indentation,en)){for(Ut.list=null;Yn=4&&(ti||Ut.prevLine.fencedCodeEnd||Ut.prevLine.header||Qn))return ae.skipToEnd(),Ut.indentedCode=!0,ie.code;if(ae.eatSpace())return null;if(hn&&Ut.indentation<=mn&&(le=ae.match(me))&&le[1].length<=6)return Ut.quote=0,Ut.header=le[1].length,Ut.thisLine.header=!0,se.highlightFormatting&&(Ut.formatting="header"),Ut.f=Ut.inline,Qt(Ut);if(Ut.indentation<=mn&&ae.eat(">"))return Ut.quote=hn?1:Ut.quote+1,se.highlightFormatting&&(Ut.formatting="quote"),ae.eatSpace(),Qt(Ut);if(!Un&&!Ut.setext&&hn&&Ut.indentation<=mn&&(le=ae.match(ne))){var jn=le[1]?"ol":"ul";return Ut.indentation=Yn+ae.current().length,Ut.list=!0,Ut.quote=0,Ut.listStack.push(Ut.indentation),Ut.em=!1,Ut.strong=!1,Ut.code=!1,Ut.strikethrough=!1,se.taskLists&&ae.match(Xe,!1)&&(Ut.taskList=!0),Ut.f=Ut.inline,se.highlightFormatting&&(Ut.formatting=["list","list-"+jn]),Qt(Ut)}else{if(hn&&Ut.indentation<=mn&&(le=ae.match(et,!0)))return Ut.quote=0,Ut.fencedEndRE=new RegExp(le[1]+"+ *$"),Ut.localMode=se.fencedCodeBlockHighlighting&&ue(le[2]||se.fencedCodeBlockDefaultMode),Ut.localMode&&(Ut.localState=Tt.startState(Ut.localMode)),Ut.f=Ut.block=_t,se.highlightFormatting&&(Ut.formatting="code-block"),Ut.code=-1,Qt(Ut);if(Ut.setext||(!Pn||!en)&&!Ut.quote&&Ut.list===!1&&!Ut.code&&!Un&&!nt.test(ae.string)&&(le=ae.lookAhead(1))&&(le=le.match(an)))return Ut.setext?(Ut.header=Ut.setext,Ut.setext=0,ae.skipToEnd(),se.highlightFormatting&&(Ut.formatting="header")):(Ut.header=le[0].charAt(0)=="="?1:2,Ut.setext=Ut.header),Ut.thisLine.header=!0,Ut.f=Ut.inline,Qt(Ut);if(Un)return ae.skipToEnd(),Ut.hr=!0,Ut.thisLine.hr=!0,ie.hr;if(ae.peek()==="[")return pt(ae,Ut,Cn)}return pt(ae,Ut,Ut.inline)}function Ht(ae,Ut){var hn=je.token(ae,Ut.htmlState);if(!Jt){var Qn=Tt.innerMode(je,Ut.htmlState);(Qn.mode.name=="xml"&&Qn.state.tagStart===null&&!Qn.state.context&&Qn.state.tokenize.isInText||Ut.md_inside&&ae.current().indexOf(">")>-1)&&(Ut.f=Se,Ut.block=bt,Ut.htmlState=null)}return hn}function _t(ae,Ut){var hn=Ut.listStack[Ut.listStack.length-1]||0,Qn=Ut.indentation=ae.quote?Ut.push(ie.formatting+"-"+ae.formatting[hn]+"-"+ae.quote):Ut.push("error"))}if(ae.taskOpen)return Ut.push("meta"),Ut.length?Ut.join(" "):null;if(ae.taskClosed)return Ut.push("property"),Ut.length?Ut.join(" "):null;if(ae.linkHref?Ut.push(ie.linkHref,"url"):(ae.strong&&Ut.push(ie.strong),ae.em&&Ut.push(ie.em),ae.strikethrough&&Ut.push(ie.strikethrough),ae.emoji&&Ut.push(ie.emoji),ae.linkText&&Ut.push(ie.linkText),ae.code&&Ut.push(ie.code),ae.image&&Ut.push(ie.image),ae.imageAltText&&Ut.push(ie.imageAltText,"link"),ae.imageMarker&&Ut.push(ie.imageMarker)),ae.header&&Ut.push(ie.header,ie.header+"-"+ae.header),ae.quote&&(Ut.push(ie.quote),!se.maxBlockquoteDepth||se.maxBlockquoteDepth>=ae.quote?Ut.push(ie.quote+"-"+ae.quote):Ut.push(ie.quote+"-"+se.maxBlockquoteDepth)),ae.list!==!1){var Qn=(ae.listStack.length-1)%3;Qn?Qn===1?Ut.push(ie.list2):Ut.push(ie.list3):Ut.push(ie.list1)}return ae.trailingSpaceNewLine?Ut.push("trailing-space-new-line"):ae.trailingSpace&&Ut.push("trailing-space-"+(ae.trailingSpace%2?"a":"b")),Ut.length?Ut.join(" "):null}function qt(ae,Ut){if(ae.match(At,!0))return Qt(Ut)}function Se(ae,Ut){var hn=Ut.text(ae,Ut);if(typeof hn!="undefined")return hn;if(Ut.list)return Ut.list=null,Qt(Ut);if(Ut.taskList){var Qn=ae.match(Xe,!0)[1]===" ";return Qn?Ut.taskOpen=!0:Ut.taskClosed=!0,se.highlightFormatting&&(Ut.formatting="task"),Ut.taskList=!1,Qt(Ut)}if(Ut.taskOpen=!1,Ut.taskClosed=!1,Ut.header&&ae.match(/^#+$/,!0))return se.highlightFormatting&&(Ut.formatting="header"),Qt(Ut);var ti=ae.next();if(Ut.linkTitle){Ut.linkTitle=!1;var Oe=ti;ti==="("&&(Oe=")"),Oe=(Oe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var en="^\\s*(?:[^"+Oe+"\\\\]+|\\\\\\\\|\\\\.)"+Oe;if(ae.match(new RegExp(en),!0))return ie.linkHref}if(ti==="`"){var mn=Ut.formatting;se.highlightFormatting&&(Ut.formatting="code"),ae.eatWhile("`");var Yn=ae.current().length;if(Ut.code==0&&(!Ut.quote||Yn==1))return Ut.code=Yn,Qt(Ut);if(Yn==Ut.code){var Pn=Qt(Ut);return Ut.code=0,Pn}else return Ut.formatting=mn,Qt(Ut)}else if(Ut.code)return Qt(Ut);if(ti==="\\"&&(ae.next(),se.highlightFormatting)){var Un=Qt(Ut),le=ie.formatting+"-escape";return Un?Un+" "+le:le}if(ti==="!"&&ae.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ut.imageMarker=!0,Ut.image=!0,se.highlightFormatting&&(Ut.formatting="image"),Qt(Ut);if(ti==="["&&Ut.imageMarker&&ae.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ut.imageMarker=!1,Ut.imageAltText=!0,se.highlightFormatting&&(Ut.formatting="image"),Qt(Ut);if(ti==="]"&&Ut.imageAltText){se.highlightFormatting&&(Ut.formatting="image");var Un=Qt(Ut);return Ut.imageAltText=!1,Ut.image=!1,Ut.inline=Ut.f=Re,Un}if(ti==="["&&!Ut.image)return Ut.linkText&&ae.match(/^.*?\]/)||(Ut.linkText=!0,se.highlightFormatting&&(Ut.formatting="link")),Qt(Ut);if(ti==="]"&&Ut.linkText){se.highlightFormatting&&(Ut.formatting="link");var Un=Qt(Ut);return Ut.linkText=!1,Ut.inline=Ut.f=ae.match(/\(.*?\)| ?\[.*?\]/,!1)?Re:Se,Un}if(ti==="<"&&ae.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ut.f=Ut.inline=he,se.highlightFormatting&&(Ut.formatting="link");var Un=Qt(Ut);return Un?Un+=" ":Un="",Un+ie.linkInline}if(ti==="<"&&ae.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ut.f=Ut.inline=he,se.highlightFormatting&&(Ut.formatting="link");var Un=Qt(Ut);return Un?Un+=" ":Un="",Un+ie.linkEmail}if(se.xml&&ti==="<"&&ae.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var jn=ae.string.indexOf(">",ae.pos);if(jn!=-1){var pi=ae.string.substring(ae.start,jn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pi)&&(Ut.md_inside=!0)}return ae.backUp(1),Ut.htmlState=Tt.startState(je),vt(ae,Ut,Ht)}if(se.xml&&ti==="<"&&ae.match(/^\/\w*?>/))return Ut.md_inside=!1,"tag";if(ti==="*"||ti==="_"){for(var Dt=1,Lt=ae.pos==1?" ":ae.string.charAt(ae.pos-2);Dt<3&&ae.eat(ti);)Dt++;var xt=ae.peek()||" ",Ft=!/\s/.test(xt)&&(!ft.test(xt)||/\s/.test(Lt)||ft.test(Lt)),Gt=!/\s/.test(Lt)&&(!ft.test(Lt)||/\s/.test(xt)||ft.test(xt)),kt=null,ye=null;if(Dt%2&&(!Ut.em&&Ft&&(ti==="*"||!Gt||ft.test(Lt))?kt=!0:Ut.em==ti&&Gt&&(ti==="*"||!Ft||ft.test(xt))&&(kt=!1)),Dt>1&&(!Ut.strong&&Ft&&(ti==="*"||!Gt||ft.test(Lt))?ye=!0:Ut.strong==ti&&Gt&&(ti==="*"||!Ft||ft.test(xt))&&(ye=!1)),ye!=null||kt!=null){se.highlightFormatting&&(Ut.formatting=kt==null?"strong":ye==null?"em":"strong em"),kt===!0&&(Ut.em=ti),ye===!0&&(Ut.strong=ti);var Pn=Qt(Ut);return kt===!1&&(Ut.em=!1),ye===!1&&(Ut.strong=!1),Pn}}else if(ti===" "&&(ae.eat("*")||ae.eat("_"))){if(ae.peek()===" ")return Qt(Ut);ae.backUp(1)}if(se.strikethrough){if(ti==="~"&&ae.eatWhile(ti)){if(Ut.strikethrough){se.highlightFormatting&&(Ut.formatting="strikethrough");var Pn=Qt(Ut);return Ut.strikethrough=!1,Pn}else if(ae.match(/^[^\s]/,!1))return Ut.strikethrough=!0,se.highlightFormatting&&(Ut.formatting="strikethrough"),Qt(Ut)}else if(ti===" "&&ae.match(/^~~/,!0)){if(ae.peek()===" ")return Qt(Ut);ae.backUp(2)}}if(se.emoji&&ti===":"&&ae.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ut.emoji=!0,se.highlightFormatting&&(Ut.formatting="emoji");var Le=Qt(Ut);return Ut.emoji=!1,Le}return ti===" "&&(ae.match(/^ +$/,!1)?Ut.trailingSpace++:Ut.trailingSpace&&(Ut.trailingSpaceNewLine=!0)),Qt(Ut)}function he(ae,Ut){var hn=ae.next();if(hn===">"){Ut.f=Ut.inline=Se,se.highlightFormatting&&(Ut.formatting="link");var Qn=Qt(Ut);return Qn?Qn+=" ":Qn="",Qn+ie.linkInline}return ae.match(/^[^>]+/,!0),ie.linkInline}function Re(ae,Ut){if(ae.eatSpace())return null;var hn=ae.next();return hn==="("||hn==="["?(Ut.f=Ut.inline=Ke(hn==="("?")":"]"),se.highlightFormatting&&(Ut.formatting="link-string"),Ut.linkHref=!0,Qt(Ut)):"error"}var pe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ke(ae){return function(Ut,hn){var Qn=Ut.next();if(Qn===ae){hn.f=hn.inline=Se,se.highlightFormatting&&(hn.formatting="link-string");var ti=Qt(hn);return hn.linkHref=!1,ti}return Ut.match(pe[ae]),hn.linkHref=!0,Qt(hn)}}function Cn(ae,Ut){return ae.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ut.f=ln,ae.next(),se.highlightFormatting&&(Ut.formatting="link"),Ut.linkText=!0,Qt(Ut)):pt(ae,Ut,Se)}function ln(ae,Ut){if(ae.match(/^\]:/,!0)){Ut.f=Ut.inline=dn,se.highlightFormatting&&(Ut.formatting="link");var hn=Qt(Ut);return Ut.linkText=!1,hn}return ae.match(/^([^\]\\]|\\.)+/,!0),ie.linkText}function dn(ae,Ut){return ae.eatSpace()?null:(ae.match(/^[^\s]+/,!0),ae.peek()===void 0?Ut.linkTitle=!0:ae.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ut.f=Ut.inline=Se,ie.linkHref+" url")}var Hn={startState:function(){return{f:bt,prevLine:{stream:null},thisLine:{stream:null},block:bt,htmlState:null,indentation:0,inline:Se,text:qt,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(ae){return{f:ae.f,prevLine:ae.prevLine,thisLine:ae.thisLine,block:ae.block,htmlState:ae.htmlState&&Tt.copyState(je,ae.htmlState),indentation:ae.indentation,localMode:ae.localMode,localState:ae.localMode?Tt.copyState(ae.localMode,ae.localState):null,inline:ae.inline,text:ae.text,formatting:!1,linkText:ae.linkText,linkTitle:ae.linkTitle,linkHref:ae.linkHref,code:ae.code,em:ae.em,strong:ae.strong,strikethrough:ae.strikethrough,emoji:ae.emoji,header:ae.header,setext:ae.setext,hr:ae.hr,taskList:ae.taskList,list:ae.list,listStack:ae.listStack.slice(0),quote:ae.quote,indentedCode:ae.indentedCode,trailingSpace:ae.trailingSpace,trailingSpaceNewLine:ae.trailingSpaceNewLine,md_inside:ae.md_inside,fencedEndRE:ae.fencedEndRE}},token:function(ae,Ut){if(Ut.formatting=!1,ae!=Ut.thisLine.stream){if(Ut.header=0,Ut.hr=!1,ae.match(/^\s*$/,!0))return Nt(Ut),null;if(Ut.prevLine=Ut.thisLine,Ut.thisLine={stream:ae},Ut.taskList=!1,Ut.trailingSpace=0,Ut.trailingSpaceNewLine=!1,!Ut.localState&&(Ut.f=Ut.block,Ut.f!=Ht)){var hn=ae.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Ut.indentation=hn,Ut.indentationDiff=null,hn>0)return null}}return Ut.f(ae,Ut)},innerMode:function(ae){return ae.block==Ht?{state:ae.htmlState,mode:je}:ae.localState?{state:ae.localState,mode:ae.localMode}:{state:ae,mode:Hn}},indent:function(ae,Ut,hn){return ae.block==Ht&&je.indent?je.indent(ae.htmlState,Ut,hn):ae.localState&&ae.localMode.indent?ae.localMode.indent(ae.localState,Ut,hn):Tt.Pass},blankLine:Nt,getType:Qt,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Hn},"xml"),Tt.defineMIME("text/markdown","markdown"),Tt.defineMIME("text/x-markdown","markdown")})},98101:function(Ln,En,Ot){(function(Tt){Tt(Ot(89780))})(function(Tt){"use strict";Tt.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 de=0;de-1&&je.substring(ie+1,je.length);if(Ve)return Tt.findModeByExtension(Ve)},Tt.findModeByName=function(je){je=je.toLowerCase();for(var Jt=0;Jt0?At.cmdState[At.cmdState.length-1]:null}function ue(At){var et=At.cmdState.pop();et&&et.closeBracket()}function ie(At){for(var et=At.cmdState,nt=et.length-1;nt>=0;nt--){var ft=et[nt];if(ft.name!="DEFAULT")return ft}return{styleIdentifier:function(){return null}}}function Ve(At,et,nt){return function(){this.name=At,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Pe={};Pe.importmodule=Ve("importmodule","tag",["string","builtin"]),Pe.documentclass=Ve("documentclass","tag",["","atom"]),Pe.usepackage=Ve("usepackage","tag",["atom"]),Pe.begin=Ve("begin","tag",["atom"]),Pe.end=Ve("end","tag",["atom"]),Pe.label=Ve("label","tag",["atom"]),Pe.ref=Ve("ref","tag",["atom"]),Pe.eqref=Ve("eqref","tag",["atom"]),Pe.cite=Ve("cite","tag",["atom"]),Pe.bibitem=Ve("bibitem","tag",["atom"]),Pe.Bibitem=Ve("Bibitem","tag",["atom"]),Pe.RBibitem=Ve("RBibitem","tag",["atom"]),Pe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ne(At,et){At.f=et}function Xe(At,et){var nt;if(At.match(/^\\[a-zA-Z@]+/)){var ft=At.current().slice(1);return nt=Pe.hasOwnProperty(ft)?Pe[ft]:Pe.DEFAULT,nt=new nt,je(et,nt),ne(et,an),nt.style}if(At.match(/^\\[$&%#{}_]/)||At.match(/^\\[,;!\/\\]/))return"tag";if(At.match("\\["))return ne(et,function(pt,vt){return me(pt,vt,"\\]")}),"keyword";if(At.match("\\("))return ne(et,function(pt,vt){return me(pt,vt,"\\)")}),"keyword";if(At.match("$$"))return ne(et,function(pt,vt){return me(pt,vt,"$$")}),"keyword";if(At.match("$"))return ne(et,function(pt,vt){return me(pt,vt,"$")}),"keyword";var lt=At.next();if(lt=="%")return At.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=Jt(et),nt)nt.closeBracket(lt),ne(et,an);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=Pe.DEFAULT,nt=new nt,je(et,nt),"bracket"):/\d/.test(lt)?(At.eatWhile(/[\w.%]/),"atom"):(At.eatWhile(/[\w\-_]/),nt=ie(et),nt.name=="begin"&&(nt.argument=At.current()),nt.styleIdentifier())}function me(At,et,nt){if(At.eatSpace())return null;if(nt&&At.match(nt))return ne(et,Xe),"keyword";if(At.match(/^\\[a-zA-Z@]+/))return"tag";if(At.match(/^[a-zA-Z]+/))return"variable-2";if(At.match(/^\\[$&%#{}_]/)||At.match(/^\\[,;!\/]/)||At.match(/^[\^_&]/))return"tag";if(At.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(At.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ft=At.next();return ft=="{"||ft=="}"||ft=="["||ft=="]"||ft=="("||ft==")"?"bracket":ft=="%"?(At.skipToEnd(),"comment"):"error"}function an(At,et){var nt=At.peek(),ft;return nt=="{"||nt=="["?(ft=Jt(et),ft.openBracket(nt),At.eat(nt),ne(et,Xe),"bracket"):/[ \t\r]/.test(nt)?(At.eat(nt),null):(ne(et,Xe),ue(et),Xe(At,et))}return{startState:function(){var At=se.inMathMode?function(et,nt){return me(et,nt)}:Xe;return{cmdState:[],f:At}},copyState:function(At){return{cmdState:At.cmdState.slice(),f:At.f}},token:function(At,et){return et.f(At,et)},blankLine:function(At){At.f=Xe,At.cmdState.length=0},lineComment:"%"}}),Tt.defineMIME("text/x-stex","stex"),Tt.defineMIME("text/x-latex","stex")})},15525:function(Ln,En,Ot){(function(Tt){Tt(Ot(89780))})(function(Tt){"use strict";var de={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},se={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Tt.defineMode("xml",function(je,Jt){var ue=je.indentUnit,ie={},Ve=Jt.htmlMode?de:se;for(var Pe in Ve)ie[Pe]=Ve[Pe];for(var Pe in Jt)ie[Pe]=Jt[Pe];var ne,Xe;function me(he,Re){function pe(ln){return Re.tokenize=ln,ln(he,Re)}var Ke=he.next();if(Ke=="<")return he.eat("!")?he.eat("[")?he.match("CDATA[")?pe(et("atom","]]>")):null:he.match("--")?pe(et("comment","-->")):he.match("DOCTYPE",!0,!0)?(he.eatWhile(/[\w\._\-]/),pe(nt(1))):null:he.eat("?")?(he.eatWhile(/[\w\._\-]/),Re.tokenize=et("meta","?>"),"meta"):(ne=he.eat("/")?"closeTag":"openTag",Re.tokenize=an,"tag bracket");if(Ke=="&"){var Cn;return he.eat("#")?he.eat("x")?Cn=he.eatWhile(/[a-fA-F\d]/)&&he.eat(";"):Cn=he.eatWhile(/[\d]/)&&he.eat(";"):Cn=he.eatWhile(/[\w\.\-:]/)&&he.eat(";"),Cn?"atom":"error"}else return he.eatWhile(/[^&<]/),null}me.isInText=!0;function an(he,Re){var pe=he.next();if(pe==">"||pe=="/"&&he.eat(">"))return Re.tokenize=me,ne=pe==">"?"endTag":"selfcloseTag","tag bracket";if(pe=="=")return ne="equals",null;if(pe=="<"){Re.tokenize=me,Re.state=vt,Re.tagName=Re.tagStart=null;var Ke=Re.tokenize(he,Re);return Ke?Ke+" tag error":"tag error"}else return/[\'\"]/.test(pe)?(Re.tokenize=At(pe),Re.stringStartCol=he.column(),Re.tokenize(he,Re)):(he.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function At(he){var Re=function(pe,Ke){for(;!pe.eol();)if(pe.next()==he){Ke.tokenize=an;break}return"string"};return Re.isInAttribute=!0,Re}function et(he,Re){return function(pe,Ke){for(;!pe.eol();){if(pe.match(Re)){Ke.tokenize=me;break}pe.next()}return he}}function nt(he){return function(Re,pe){for(var Ke;(Ke=Re.next())!=null;){if(Ke=="<")return pe.tokenize=nt(he+1),pe.tokenize(Re,pe);if(Ke==">")if(he==1){pe.tokenize=me;break}else return pe.tokenize=nt(he-1),pe.tokenize(Re,pe)}return"meta"}}function ft(he,Re,pe){this.prev=he.context,this.tagName=Re,this.indent=he.indented,this.startOfLine=pe,(ie.doNotIndent.hasOwnProperty(Re)||he.context&&he.context.noIndent)&&(this.noIndent=!0)}function lt(he){he.context&&(he.context=he.context.prev)}function pt(he,Re){for(var pe;;){if(!he.context||(pe=he.context.tagName,!ie.contextGrabbers.hasOwnProperty(pe)||!ie.contextGrabbers[pe].hasOwnProperty(Re)))return;lt(he)}}function vt(he,Re,pe){return he=="openTag"?(pe.tagStart=Re.column(),wt):he=="closeTag"?Nt:vt}function wt(he,Re,pe){return he=="word"?(pe.tagName=Re.current(),Xe="tag",_t):ie.allowMissingTagName&&he=="endTag"?(Xe="tag bracket",_t(he,Re,pe)):(Xe="error",wt)}function Nt(he,Re,pe){if(he=="word"){var Ke=Re.current();return pe.context&&pe.context.tagName!=Ke&&ie.implicitlyClosed.hasOwnProperty(pe.context.tagName)&<(pe),pe.context&&pe.context.tagName==Ke||ie.matchClosing===!1?(Xe="tag",bt):(Xe="tag error",Ht)}else return ie.allowMissingTagName&&he=="endTag"?(Xe="tag bracket",bt(he,Re,pe)):(Xe="error",Ht)}function bt(he,Re,pe){return he!="endTag"?(Xe="error",bt):(lt(pe),vt)}function Ht(he,Re,pe){return Xe="error",bt(he,Re,pe)}function _t(he,Re,pe){if(he=="word")return Xe="attribute",Qt;if(he=="endTag"||he=="selfcloseTag"){var Ke=pe.tagName,Cn=pe.tagStart;return pe.tagName=pe.tagStart=null,he=="selfcloseTag"||ie.autoSelfClosers.hasOwnProperty(Ke)?pt(pe,Ke):(pt(pe,Ke),pe.context=new ft(pe,Ke,Cn==pe.indented)),vt}return Xe="error",_t}function Qt(he,Re,pe){return he=="equals"?qt:(ie.allowMissing||(Xe="error"),_t(he,Re,pe))}function qt(he,Re,pe){return he=="string"?Se:he=="word"&&ie.allowUnquoted?(Xe="string",_t):(Xe="error",_t(he,Re,pe))}function Se(he,Re,pe){return he=="string"?Se:_t(he,Re,pe)}return{startState:function(he){var Re={tokenize:me,state:vt,indented:he||0,tagName:null,tagStart:null,context:null};return he!=null&&(Re.baseIndent=he),Re},token:function(he,Re){if(!Re.tagName&&he.sol()&&(Re.indented=he.indentation()),he.eatSpace())return null;ne=null;var pe=Re.tokenize(he,Re);return(pe||ne)&&pe!="comment"&&(Xe=null,Re.state=Re.state(ne||pe,he,Re),Xe&&(pe=Xe=="error"?pe+" error":Xe)),pe},indent:function(he,Re,pe){var Ke=he.context;if(he.tokenize.isInAttribute)return he.tagStart==he.indented?he.stringStartCol+1:he.indented+ue;if(Ke&&Ke.noIndent)return Tt.Pass;if(he.tokenize!=an&&he.tokenize!=me)return pe?pe.match(/^(\s*)/)[0].length:0;if(he.tagName)return ie.multilineTagIndentPastTag!==!1?he.tagStart+he.tagName.length+2:he.tagStart+ue*(ie.multilineTagIndentFactor||1);if(ie.alignCDATA&&/$/,blockCommentStart:"",configuration:ie.htmlMode?"html":"xml",helperType:ie.htmlMode?"html":"xml",skipAttribute:function(he){he.state==qt&&(he.state=_t)},xmlCurrentTag:function(he){return he.tagName?{name:he.tagName,close:he.type=="closeTag"}:null},xmlCurrentContext:function(he){for(var Re=[],pe=he.context;pe;pe=pe.prev)pe.tagName&&Re.push(pe.tagName);return Re.reverse()}}}),Tt.defineMIME("text/xml","xml"),Tt.defineMIME("application/xml","xml"),Tt.mimeModes.hasOwnProperty("text/html")||Tt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Ln,En,Ot){"use strict";Ot.d(En,{$u:function(){return Pe},BD:function(){return Dt},E9:function(){return Ve},FF:function(){return Ao},FJ:function(){return vt},Hn:function(){return pt},KX:function(){return Nt},NB:function(){return Ee},S0:function(){return le},UL:function(){return ne},Vk:function(){return lt},Vm:function(){return fn},YI:function(){return jn},ZA:function(){return se},Zt:function(){return Xe},al:function(){return kt},bn:function(){return Gt},bx:function(){return Lt},g2:function(){return pi},h1:function(){return qt},hD:function(){return Jn},l4:function(){return ue},rU:function(){return tn},s_:function(){return xt},uz:function(){return cn},z6:function(){return me}}),Ln=Ot.hmd(Ln),function(){var Ct;function Co(a){var y=0;return function(){return yx&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x=a.length?a.push(x):a.splice(y,0,x):$t("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function De(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):$t("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Te(){var a=ii.pop();return a===void 0?[]:a}function Ze(a){a.length=0,ii.push(a)}function He(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(ve(a)&&a.constructor)return He(a.constructor);return typeof a}function nn(a){var y=a;return ve(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 sn(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 Xn(a,y,x){Object.defineProperty(zo.prototype,a,{get:y,set:x})}function xe(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;Ex;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var z="",tt=0;tt-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 ni=Yt.navigator!==void 0&&0this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;xthis.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},yi.prototype.Ad=function(){return this.next()},yi.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},yi.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},yi.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},yi.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},yi.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Ie,a.s=x,a.xb(),a.iterator},yi.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Ie,a.s=x,a.xb(),a.iterator},yi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},yi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Wt.Object.defineProperties(yi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function Ie(a){Ti(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=Ie.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999a||a>=y.length)&&Mn(a,"0 <= i < length",Ie,"elt:i"),y[a]},Ct.get=function(a){return this.M(a)},Ct.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Mn(a,"0 <= i < length",Ie,"setElt:i"),this._isFrozen&&_e(this,a),x[a]=y},Ct.set=function(a,y){this.cd(a,y)},Ct.first=function(){var a=this.s;return a.length===0?null:a[0]},Ct.jc=function(){var a=this.s,y=a.length;return 0a&&Mn(a,">= 0",Ie,"insertAt:i"),this._isFrozen&&_e(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&_e(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)},Ct.delete=function(a){return this.remove(a)},Ct.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Mn(a,"0 <= i < length",Ie,"removeAt:i"),this._isFrozen&&_e(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ct.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&_e(this);for(var E=a,z=y+1;z=z)return this;if((0>y||y>=E-1)&&Mn(y,"0 <= from < length",Ie,"sortRange:from"),z===2)return x=b[y],E=b[y+1],0=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a=E)for(x=b.slice(y),x.sort(a),a=y;a=this.s.length)return Pi;var a=this.Sa;return a!==null?(a.reset(),a):new Vn(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Pi;var a=this.Hg;return a!==null?(a.reset(),a):new yi(this)}}}),Ie.prototype.reverse=Ie.prototype.reverse,Ie.prototype.sortRange=Ie.prototype.zi,Ie.prototype.sort=Ie.prototype.sort,Ie.prototype.toSet=Ie.prototype.Iv,Ie.prototype.toArray=Ie.prototype.Fa,Ie.prototype.removeRange=Ie.prototype.removeRange,Ie.prototype.removeAt=Ie.prototype.mb,Ie.prototype.delete=Ie.prototype.delete,Ie.prototype.remove=Ie.prototype.remove,Ie.prototype.insertAt=Ie.prototype.Gb,Ie.prototype.pop=Ie.prototype.pop,Ie.prototype.last=Ie.prototype.jc,Ie.prototype.first=Ie.prototype.first,Ie.prototype.set=Ie.prototype.set,Ie.prototype.setElt=Ie.prototype.cd,Ie.prototype.get=Ie.prototype.get,Ie.prototype.elt=Ie.prototype.M,Ie.prototype.indexOf=Ie.prototype.indexOf,Ie.prototype.has=Ie.prototype.has,Ie.prototype.contains=Ie.prototype.contains,Ie.prototype.clear=Ie.prototype.clear,Ie.prototype.addAll=Ie.prototype.addAll,Ie.prototype.push=Ie.prototype.push,Ie.prototype.add=Ie.prototype.add,Ie.prototype.thaw=Ie.prototype.ka,Ie.prototype.freeze=Ie.prototype.freeze,Ie.className="List";function Yi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Yi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Yi.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)},Yi.prototype.Ad=function(){return this.next()},Yi.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},Yi.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},Yi.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},Yi.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},Yi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ie;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.eg;y.Sa=null;var x=new Ie;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Yi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Yi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Wt.Object.defineProperties(Yi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.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="SetIterator";function Ge(a){Ti(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=Ge.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999=this.Sb)return Pi;var a=this.Sa;return a!==null?(a.reset(),a):new Yi(this)}}}),Ge.prototype.toList=Ge.prototype.Hv,Ge.prototype.toArray=Ge.prototype.Fa,Ge.prototype.clear=Ge.prototype.clear,Ge.prototype.retainAll=Ge.prototype.pA,Ge.prototype.removeAll=Ge.prototype.hp,Ge.prototype.delete=Ge.prototype.delete,Ge.prototype.remove=Ge.prototype.remove,Ge.prototype.first=Ge.prototype.first,Ge.prototype.containsAny=Ge.prototype.Ty,Ge.prototype.containsAll=Ge.prototype.Sy,Ge.prototype.has=Ge.prototype.has,Ge.prototype.contains=Ge.prototype.contains,Ge.prototype.addAll=Ge.prototype.addAll,Ge.prototype.add=Ge.prototype.add,Ge.prototype.thaw=Ge.prototype.ka,Ge.prototype.freeze=Ge.prototype.freeze;var Ro=1;Ge.className="Set",Ge.uniqueHash=Ti,Ge.hashIdUnique=bo,Ge.hashId=Xi;function vo(a){this.ma=a,this.qa=a.Ja,this.sa=null}vo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},vo.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)},vo.prototype.Ad=function(){return this.next()},vo.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},vo.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},vo.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},vo.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},vo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ie;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},vo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ie;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},vo.prototype.de=function(){this.value=this.key=null,this.qa=-1},vo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Wt.Object.defineProperties(vo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),vo.prototype.first=vo.prototype.first,vo.prototype.hasNext=vo.prototype.Ad,vo.prototype.next=vo.prototype.next,vo.prototype.reset=vo.prototype.reset,vo.className="MapKeySetIterator";function ui(a){Ge.call(this),Ti(this),this._isFrozen=!0,this.ma=a}Me(ui,Ge),Ct=ui.prototype,Ct.freeze=function(){return this},Ct.ka=function(){return this},Ct.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ct.add=function(){$t("This Set is read-only: "+this.toString())},Ct.contains=function(a){return this.ma.contains(a)},Ct.has=function(a){return this.contains(a)},Ct.remove=function(){$t("This Set is read-only: "+this.toString())},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){$t("This Set is read-only: "+this.toString())},Ct.first=function(){var a=this.ma.ea;return a!==null?a.key:null},ui.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},ui.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},ui.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},ui.prototype.map=function(a){for(var y=new Ge,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},ui.prototype.filter=function(a){for(var y=new Ge,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},ui.prototype.copy=function(){return new ui(this.ma)},ui.prototype.Iv=function(){var a=new Ge,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ui.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},ui.prototype.Hv=function(){var a=new Ie,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Wt.Object.defineProperties(ui.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Pi:new vo(this.ma)}}}),ui.prototype.toList=ui.prototype.Hv,ui.prototype.toArray=ui.prototype.Fa,ui.prototype.toSet=ui.prototype.Iv,ui.prototype.first=ui.prototype.first,ui.prototype.clear=ui.prototype.clear,ui.prototype.delete=ui.prototype.delete,ui.prototype.remove=ui.prototype.remove,ui.prototype.has=ui.prototype.has,ui.prototype.contains=ui.prototype.contains,ui.prototype.add=ui.prototype.add,ui.prototype.thaw=ui.prototype.ka,ui.prototype.freeze=ui.prototype.freeze,ui.className="MapKeySet";function oi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}oi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},oi.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)},oi.prototype.Ad=function(){return this.next()},oi.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},oi.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},oi.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},oi.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},oi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ie;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},oi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ie;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},oi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Wt.Object.defineProperties(oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oi.prototype.first=oi.prototype.first,oi.prototype.hasNext=oi.prototype.Ad,oi.prototype.next=oi.prototype.next,oi.prototype.reset=oi.prototype.reset,oi.className="MapValueSetIterator";function Ri(a,y){this.key=a,this.value=y,this.ll=this.va=null}Ri.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Ri.className="KeyValuePair";function Ji(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ji.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Ji.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Ji.prototype.Ad=function(){return this.next()},Ji.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Ji.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},Ji.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},Ji.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},Ji.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ie;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Ji.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ie;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Ji.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Ji.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Wt.Object.defineProperties(Ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ji.prototype.first=Ji.prototype.first,Ji.prototype.hasNext=Ji.prototype.Ad,Ji.prototype.next=Ji.prototype.next,Ji.prototype.reset=Ji.prototype.reset,Ji.className="MapIterator";function On(a){Ti(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"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=On.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999=this.count)return Pi;var a=this.Sa;return a!==null?(a.reset(),a):new Ji(this)}},iteratorKeys:{get:function(){return 0>=this.count?Pi:new vo(this)}},iteratorValues:{get:function(){if(0>=this.count)return Pi;var a=this.jf;return a!==null?(a.reset(),a):new oi(this)}}}),On.prototype.toKeySet=On.prototype.Lf,On.prototype.toArray=On.prototype.Fa,On.prototype.clear=On.prototype.clear,On.prototype.delete=On.prototype.delete,On.prototype.remove=On.prototype.remove,On.prototype.get=On.prototype.get,On.prototype.getValue=On.prototype.I,On.prototype.has=On.prototype.has,On.prototype.contains=On.prototype.contains,On.prototype.first=On.prototype.first,On.prototype.addAll=On.prototype.addAll,On.prototype.set=On.prototype.set,On.prototype.add=On.prototype.add,On.prototype.thaw=On.prototype.ka,On.prototype.freeze=On.prototype.freeze,On.className="Map";function It(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):$t("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Wi,Mo,ji,mo,Wo;It.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.h=function(a,y){return this.x=a,this.y=y,this},It.prototype.sg=function(a,y){return this.x=a,this.y=y,this},It.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.copy=function(){var a=new It;return a.x=this.x,a.y=this.y,a},Ct=It.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function wi(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new It(x,E)}return new It}function Ci(a){return a.x.toString()+" "+a.y.toString()}Ct.toString=function(){return"Point("+this.x+","+this.y+")"},Ct.D=function(a){return a instanceof It?this.x===a.x&&this.y===a.y:!1},Ct.hi=function(a,y){return this.x===a&&this.y===y},Ct.Xa=function(a){return oe.B(this.x,a.x)&&oe.B(this.y,a.y)},Ct.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ct.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},It.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},Ct=It.prototype,Ct.scale=function(a,y){return this.x*=a,this.y*=y,this},Ct.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ct.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ct.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0y?270:0;if(y===0)return 0a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Ct.Ry=function(a,y){return oe.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ct.fA=function(a,y,x,b){return oe.qh(a,y,x,b,this.x,this.y,this),this},Ct.gA=function(a,y){return oe.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ct.uA=function(a,y,x,b){return oe.No(this.x,this.y,a,y,x,b,this),this},Ct.vA=function(a,y){return oe.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ct.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},Ct.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Ct.transform=function(a){return a.Ga(this),this};function Oi(a,y){return y.Cd(a),a}function po(a,y,x,b,E,z){var tt=E-x,ot=z-b,rt=tt*tt+ot*ot;x-=a,b-=y;var at=-x*tt-b*ot;return 0>=at||at>=rt?(tt=E-a,ot=z-y,Math.min(x*x+b*b,tt*tt+ot*ot)):(a=tt*b-ot*x,a*a/rt)}function Fo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ai(a,y,x,b){return a=x-a,y=b-y,a===0?0y?270:0:y===0?0a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)},It.alloc=function(){var a=li.pop();return a===void 0?new It:a},It.allocAt=function(a,y){var x=li.pop();return x===void 0?new It(a,y):(x.x=a,x.y=y,x)},It.free=function(a){li.push(a)},It.prototype.isReal=It.prototype.w,It.prototype.setSpot=It.prototype.yi,It.prototype.setRectSpot=It.prototype.xi,It.prototype.snapToGridPoint=It.prototype.vA,It.prototype.snapToGrid=It.prototype.uA,It.prototype.projectOntoLineSegmentPoint=It.prototype.gA,It.prototype.projectOntoLineSegment=It.prototype.fA,It.intersectingLineSegments=function(a,y,x,b,E,z,tt,ot){return oe.Rl(a,y,x,b,E,z,tt,ot)},It.prototype.compareWithLineSegmentPoint=It.prototype.Ry,It.compareWithLineSegment=function(a,y,x,b,E,z){return oe.Fl(a,y,x,b,E,z)},It.prototype.direction=It.prototype.direction,It.prototype.directionPoint=It.prototype.ab,It.prototype.normalize=It.prototype.normalize,It.prototype.distanceSquared=It.prototype.zd,It.prototype.distanceSquaredPoint=It.prototype.Bf,It.prototype.scale=It.prototype.scale,It.prototype.rotate=It.prototype.rotate,It.prototype.offset=It.prototype.offset,It.prototype.subtract=It.prototype.re,It.prototype.add=It.prototype.add,It.prototype.equalsApprox=It.prototype.Xa,It.prototype.equalTo=It.prototype.hi,It.prototype.equals=It.prototype.D,It.prototype.set=It.prototype.set,It.prototype.setTo=It.prototype.sg;var li=[];It.className="Point",It.parse=wi,It.stringify=Ci,It.distanceLineSegmentSquared=po,It.distanceSquared=Fo,It.direction=ai,It.Origin=Wi=new It(0,0).ja(),It.InfiniteTopLeft=Mo=new It(-1/0,-1/0).ja(),It.InfiniteBottomRight=ji=new It(1/0,1/0).ja(),It.SixPoint=mo=new It(6,6).ja(),It.NoPoint=Wo=new It(NaN,NaN).ja(),It.parse=wi,It.stringify=Ci,It.distanceLineSegmentSquared=po,It.distanceSquared=Fo,It.direction=ai;function pn(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):$t("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Si,oo,Zo,Vo,$o,yr,Sr;pn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.h=function(a,y){return this.width=a,this.height=y,this},pn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},pn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.copy=function(){var a=new pn;return a.width=this.width,a.height=this.height,a},Ct=pn.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function gs(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new pn(x,E)}return new pn}function Ur(a){return a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Size("+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof pn?this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y){return this.width===a&&this.height===y},Ct.Xa=function(a){return oe.B(this.width,a.width)&&oe.B(this.height,a.height)},Ct.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},Ct.w=function(){return isFinite(this.width)&&isFinite(this.height)},pn.alloc=function(){var a=es.pop();return a===void 0?new pn:a},pn.free=function(a){es.push(a)},pn.prototype.isReal=pn.prototype.w,pn.prototype.inflate=pn.prototype.Bc,pn.prototype.equalsApprox=pn.prototype.Xa,pn.prototype.equalTo=pn.prototype.hi,pn.prototype.equals=pn.prototype.D,pn.prototype.set=pn.prototype.set,pn.prototype.setTo=pn.prototype.sg;var es=[];pn.className="Size",pn.parse=gs,pn.stringify=Ur,pn.ZeroSize=Si=new pn(0,0).ja(),pn.OneSize=oo=new pn(1,1).ja(),pn.SixSize=Zo=new pn(6,6).ja(),pn.EightSize=Vo=new pn(8,8).ja(),pn.TenSize=$o=new pn(10,10).ja(),pn.InfiniteSize=yr=new pn(1/0,1/0).ja(),pn.NoSize=Sr=new pn(NaN,NaN).ja(),pn.parse=gs,pn.stringify=Ur;function ke(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof It?(x=a.x,a=a.y,y instanceof It?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof pn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):$t("Incorrect second argument supplied to Rect constructor "+y)):$t("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ct=ke.prototype,Ct.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Mr(a,y,x){a.width=y,a.height=x}Ct.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Ct.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.dd=function(a){return this.x=a.x,this.y=a.y,this},Ct.tA=function(a){return this.width=a.width,this.height=a.height,this},ke.prototype.copy=function(){var a=new ke;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ct=ke.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function eu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),new ke(x,E,z,tt)}return new ke}function _s(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof ke?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Ct.Xa=function(a){return oe.B(this.x,a.x)&&oe.B(this.y,a.y)&&oe.B(this.width,a.width)&&oe.B(this.height,a.height)};function yo(a,y){return oe.$(a.x,y.x)&&oe.$(a.y,y.y)&&oe.$(a.width,y.width)&&oe.$(a.height,y.height)}Ct.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ct.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},Ct.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Ct.Bc=function(a,y){return to(this,y,a,y,a)},Ct.Co=function(a){return to(this,a.top,a.right,a.bottom,a.left)},Ct.Fv=function(a){return to(this,-a.top,-a.right,-a.bottom,-a.left)},Ct.Hz=function(a,y,x,b){return to(this,a,y,x,b)};function to(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}Ct.Ex=function(a){return fr(this,a.x,a.y,a.width,a.height)},Ct.Uu=function(a,y,x,b){return fr(this,a,y,x,b)};function fr(a,y,x,b,E){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Ct.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ct.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function jo(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}Ct.Ye=function(a){return eo(this,a.x,a.y,0,0)},Ct.ed=function(a){return eo(this,a.x,a.y,a.width,a.height)},Ct.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),eo(this,a,y,x,b)};function eo(a,y,x,b,E){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Ct.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 Ko(a,y,x,b,E,z,tt,ot){return tt===void 0&&(tt=0),ot===void 0&&(ot=0),a<=E&&E+tt<=a+x&&y<=z&&z+ot<=y+b}function ps(a,y,x,b,E,z,tt,ot){return a>tt+E||E>x+a?!1:!(y>ot+z||z>b+y)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ct.Mz=function(){return this.width===0&&this.height===0},ke.alloc=function(){var a=ro.pop();return a===void 0?new ke:a},ke.allocAt=function(a,y,x,b){var E=ro.pop();return E===void 0?new ke(a,y,x,b):E.h(a,y,x,b)},ke.free=function(a){ro.push(a)},Wt.Object.defineProperties(ke.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 It(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new pn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new It(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}}}),ke.prototype.isEmpty=ke.prototype.Mz,ke.prototype.isReal=ke.prototype.w,ke.intersectsLineSegment=function(a,y,x,b,E,z,tt,ot){return oe.Fx(a,y,x,b,E,z,tt,ot)},ke.prototype.setSpot=ke.prototype.yi,ke.prototype.union=ke.prototype.Kv,ke.prototype.unionRect=ke.prototype.ed,ke.prototype.unionPoint=ke.prototype.Ye,ke.prototype.intersects=ke.prototype.Vu,ke.prototype.intersectsRect=ke.prototype.Yc,ke.prototype.intersect=ke.prototype.Uu,ke.prototype.intersectRect=ke.prototype.Ex,ke.prototype.grow=ke.prototype.Hz,ke.prototype.subtractMargin=ke.prototype.Fv,ke.prototype.addMargin=ke.prototype.Co,ke.prototype.inflate=ke.prototype.Bc,ke.prototype.offset=ke.prototype.offset,ke.prototype.contains=ke.prototype.contains,ke.prototype.containsRect=ke.prototype.Re,ke.prototype.containsPoint=ke.prototype.ca,ke.prototype.equalsApprox=ke.prototype.Xa,ke.prototype.equalTo=ke.prototype.hi,ke.prototype.equals=ke.prototype.D,ke.prototype.setSize=ke.prototype.tA,ke.prototype.setPoint=ke.prototype.dd,ke.prototype.set=ke.prototype.set,ke.prototype.setTo=ke.prototype.sg;var Fi=null,ho=null,ro=[];ke.className="Rect",ke.parse=eu,ke.stringify=_s,ke.contains=Ko,ke.intersects=ps,ke.ZeroRect=Fi=new ke(0,0,0,0).ja(),ke.NoRect=ho=new ke(NaN,NaN,NaN,NaN).ja(),ke.parse=eu,ke.stringify=_s,ke.contains=Ko,ke.intersects=ps;function Kn(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):$t("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Kn.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Kn.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Kn.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Kn.prototype.copy=function(){var a=new Kn;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ct=Kn.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function kr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Kn;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Kn(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new Kn(x,E);for(var tt=NaN;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),isNaN(tt)?new Kn(x,E):new Kn(x,E,z,tt)}return new Kn}function br(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ct.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ct.D=function(a){return a instanceof Kn?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ct.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Ct.Xa=function(a){return oe.B(this.top,a.top)&&oe.B(this.right,a.right)&&oe.B(this.bottom,a.bottom)&&oe.B(this.left,a.left)},Ct.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Kn.alloc=function(){var a=ul.pop();return a===void 0?new Kn:a},Kn.free=function(a){ul.push(a)},Kn.prototype.isReal=Kn.prototype.w,Kn.prototype.equalsApprox=Kn.prototype.Xa,Kn.prototype.equalTo=Kn.prototype.hi,Kn.prototype.equals=Kn.prototype.D,Kn.prototype.set=Kn.prototype.set,Kn.prototype.setTo=Kn.prototype.sg;var ms=null,Ba=null,ul=[];Kn.className="Margin",Kn.parse=kr,Kn.stringify=br,Kn.ZeroMargin=ms=new Kn(0,0,0,0).ja(),Kn.TwoMargin=Ba=new Kn(2,2,2,2).ja(),Kn.parse=kr,Kn.stringify=br;function Rn(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ir,Tr,Sa,nu,Da,Vi,hh,$s,Js,Qs,Bl,iu,qs,xa,dh,od,ch,Wd,fh,gh,Dl,Ia,rd,ph,mh,ao,Go,vs,ys,jr,xr,Nr,Gr,Dr,Pl,Ra;Rn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Rn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Rn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Rn.prototype.copy=function(){var a=new Rn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ct=Rn.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lr(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Dc(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ir;if(a==="TopLeft")return Tr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Sa;if(a==="TopRight")return nu;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Da;if(a==="Center")return Vi;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return hh;if(a==="BottomLeft")return $s;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Js;if(a==="BottomRight")return Qs;if(a==="TopSide")return Bl;if(a==="LeftSide")return iu;if(a==="RightSide")return qs;if(a==="BottomSide")return xa;if(a==="TopBottomSides")return dh;if(a==="LeftRightSides")return od;if(a==="TopLeftSides")return ch;if(a==="TopRightSides")return Wd;if(a==="BottomLeftSides")return fh;if(a==="BottomRightSides")return gh;if(a==="NotTopSide")return Dl;if(a==="NotLeftSide")return Ia;if(a==="NotRightSide")return rd;if(a==="NotBottomSide")return ph;if(a==="AllSides")return mh;if(a==="Default")return ao;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,z=this.m11*-b+this.m21*a,tt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Ct=Ni.prototype,Ct.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ct.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ct.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)},Ct.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,tt=this.m12,ot=this.m21,rt=this.m22,at=this.dx,ut=this.dy,ct=y*z+x*ot+at,mt=y*tt+x*rt+ut,yt=b*z+x*ot+at,St=b*tt+x*rt+ut;return x=y*z+E*ot+at,y=y*tt+E*rt+ut,z=b*z+E*ot+at,b=b*tt+E*rt+ut,E=Math.min(ct,yt),ct=Math.max(ct,yt),yt=Math.min(mt,St),mt=Math.max(mt,St),E=Math.min(E,x),ct=Math.max(ct,x),yt=Math.min(yt,y),mt=Math.max(mt,y),E=Math.min(E,z),ct=Math.max(ct,z),yt=Math.min(yt,b),mt=Math.max(mt,b),a.h(E,yt,ct-E,mt-yt),a},Ni.alloc=function(){var a=Jf.pop();return a===void 0?new Ni:a},Ni.free=function(a){Jf.push(a)},Ni.prototype.transformRect=Ni.prototype.pp,Ni.prototype.transformPoint=Ni.prototype.Ga,Ni.prototype.scale=Ni.prototype.scale,Ni.prototype.translate=Ni.prototype.translate,Ni.prototype.rotate=Ni.prototype.rotate,Ni.prototype.invert=Ni.prototype.Vj,Ni.prototype.multiplyInverted=Ni.prototype.bv,Ni.prototype.multiply=Ni.prototype.multiply,Ni.prototype.reset=Ni.prototype.reset,Ni.prototype.isIdentity=Ni.prototype.ws,Ni.prototype.equals=Ni.prototype.D,Ni.prototype.setTransform=Ni.prototype.setTransform,Ni.prototype.set=Ni.prototype.set;var Jf=[];Ni.className="Transform",Ni.xF="54a702f3e53909c447824c6706603faf4c";var oe={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=oe.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);oe.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&&-.5a&&-5e-8=E&&(E=1e-6),aut-at)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=tt&&tt<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(tt=(x-a)/(b-y)*(tt-y)+a,tt-E<=z&&z<=tt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,tt,ot,rt,at,ut,ct){if(oe.Yb(a,y,tt,ot,ct,x,b)&&oe.Yb(a,y,tt,ot,ct,E,z))return oe.Yb(a,y,tt,ot,ct,at,ut);var mt=(a+x)/2,yt=(y+b)/2,St=(x+E)/2,Mt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(mt+St)/2,x=(yt+Mt)/2,St=(St+E)/2,Mt=(Mt+z)/2;var zt=(b+St)/2,Bt=(x+Mt)/2;return oe.cs(a,y,mt,yt,b,x,zt,Bt,rt,at,ut,ct)||oe.cs(zt,Bt,St,Mt,E,z,tt,ot,rt,at,ut,ct)},ax:function(a,y,x,b,E,z,tt,ot,rt){var at=(x+E)/2,ut=(b+z)/2;return rt.h((((a+x)/2+at)/2+(at+(E+tt)/2)/2)/2,(((y+b)/2+ut)/2+(ut+(z+ot)/2)/2)/2),rt},My:function(a,y,x,b,E,z,tt,ot){var rt=(x+E)/2,at=(b+z)/2;return ai(((a+x)/2+rt)/2,((y+b)/2+at)/2,(rt+(E+tt)/2)/2,(at+(z+ot)/2)/2)},Dl:function(a,y,x,b,E,z,tt,ot,rt,at){if(oe.Yb(a,y,tt,ot,rt,x,b)&&oe.Yb(a,y,tt,ot,rt,E,z))eo(at,a,y,0,0),eo(at,tt,ot,0,0);else{var ut=(a+x)/2,ct=(y+b)/2,mt=(x+E)/2,yt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+mt)/2,x=(ct+yt)/2,mt=(mt+E)/2,yt=(yt+z)/2;var St=(b+mt)/2,Mt=(x+yt)/2;oe.Dl(a,y,ut,ct,b,x,St,Mt,rt,at),oe.Dl(St,Mt,mt,yt,E,z,tt,ot,rt,at)}return at},Qe:function(a,y,x,b,E,z,tt,ot,rt,at){if(oe.Yb(a,y,tt,ot,rt,x,b)&&oe.Yb(a,y,tt,ot,rt,E,z))at.length===0&&(at.push(a),at.push(y)),at.push(tt),at.push(ot);else{var ut=(a+x)/2,ct=(y+b)/2,mt=(x+E)/2,yt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+mt)/2,x=(ct+yt)/2,mt=(mt+E)/2,yt=(yt+z)/2;var St=(b+mt)/2,Mt=(x+yt)/2;oe.Qe(a,y,ut,ct,b,x,St,Mt,rt,at),oe.Qe(St,Mt,mt,yt,E,z,tt,ot,rt,at)}return at},jv:function(a,y,x,b,E,z,tt,ot,rt,at){if(oe.Yb(a,y,E,z,at,x,b))return oe.Yb(a,y,E,z,at,ot,rt);var ut=(a+x)/2,ct=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var mt=(ut+x)/2,yt=(ct+b)/2;return oe.jv(a,y,ut,ct,mt,yt,tt,ot,rt,at)||oe.jv(mt,yt,x,b,E,z,tt,ot,rt,at)},OA:function(a,y,x,b,E,z,tt){return tt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),tt},iv:function(a,y,x,b,E,z,tt,ot){if(oe.Yb(a,y,E,z,tt,x,b))eo(ot,a,y,0,0),eo(ot,E,z,0,0);else{var rt=(a+x)/2,at=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,ct=(at+b)/2;oe.iv(a,y,rt,at,ut,ct,tt,ot),oe.iv(ut,ct,x,b,E,z,tt,ot)}return ot},ep:function(a,y,x,b,E,z,tt,ot){if(oe.Yb(a,y,E,z,tt,x,b))ot.length===0&&(ot.push(a),ot.push(y)),ot.push(E),ot.push(z);else{var rt=(a+x)/2,at=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,ct=(at+b)/2;oe.ep(a,y,rt,at,ut,ct,tt,ot),oe.ep(ut,ct,x,b,E,z,tt,ot)}return ot},Eo:function(a,y,x,b,E,z,tt,ot,rt,at,ut,ct,mt,yt){if(oe.Yb(a,y,tt,ot,mt,x,b)&&oe.Yb(a,y,tt,ot,mt,E,z))return!oe.Rl(a,y,tt,ot,rt,at,ut,ct)||(mt=(a-tt)*(at-ct)-(y-ot)*(rt-ut),mt===0)?!1:(yt.h(((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*ct-at*ut))/mt,((a*ot-y*tt)*(at-ct)-(y-ot)*(rt*ct-at*ut))/mt),!0);var St=(a+x)/2,Mt=(y+b)/2,zt=(x+E)/2,Bt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(St+zt)/2,x=(Mt+Bt)/2,zt=(zt+E)/2,Bt=(Bt+z)/2;var Vt=(b+zt)/2,Zt=(x+Bt)/2,Kt=1/0,te=!1,ce=0,vn=0;return oe.Eo(a,y,St,Mt,b,x,Vt,Zt,rt,at,ut,ct,mt,yt)&&(a=(yt.x-rt)*(yt.x-rt)+(yt.y-at)*(yt.y-at),a=ut)return yt;if((rt>ut?rt-ut:ut-rt)<(at>ct?at-ct:ct-at)){if(ya)return yt}else if(aa)return yt;0mt&&yt--}else{St=(a+x)/2,Mt=(y+b)/2;var zt=(x+E)/2,Bt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(St+zt)/2,x=(Mt+Bt)/2,zt=(zt+E)/2,Bt=(Bt+z)/2;var Vt=(b+zt)/2,Zt=(x+Bt)/2;yt+=oe.Fo(a,y,St,Mt,b,x,Vt,Zt,rt,at,ut,ct,mt),yt+=oe.Fo(Vt,Zt,zt,Bt,E,z,tt,ot,rt,at,ut,ct,mt)}return yt},qh:function(a,y,x,b,E,z,tt){return oe.$(a,x)?(yy?(tt.h(a,y),!1):(tt.h(a,z),!0)):oe.$(y,b)?(aa?(tt.h(a,y),!1):(tt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(tt.h(a,y),!1):1.000005y?(rt.h(a,y),!1):(rt.h(a,x),!0)):(tt=(b-y)/(x-a),oe.$(ot,tt)?(oe.qh(a,y,x,b,E,z,rt),!1):(E=(tt*a-ot*E+z-y)/(tt-ot),oe.$(tt,0)?(aa?(rt.h(a,y),!1):(rt.h(E,y),!0)):oe.qh(a,y,x,b,E,tt*(E-a)+y,rt))))},MA:function(a,y,x,b,E){return oe.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,z,tt,ot,rt,at){function ut(zt,Bt){var Vt=(zt-a)*(zt-a)+(Bt-y)*(Bt-y);Vt(x>a?x-a:a-x)){if(mt=1-(x-E)*(x-E)/(mt*mt),0>mt)return rt;mt=Math.sqrt(mt),b=-at*mt+z,ut(x,at*mt+z),ut(x,b)}else{if(x=(b-y)/(x-a),b=1/(mt*mt)+x*x/(at*at),ot=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*E/(mt*mt),mt=ot*ot-4*b*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+E*E/(mt*mt)-1+(y-x*a)*(y-x*a)/(at*at)),0>mt)return rt;mt=Math.sqrt(mt),at=(-ot+mt)/(2*b),ut(at,x*at-x*a+y),mt=(-ot-mt)/(2*b),ut(mt,x*mt-x*a+y)}return rt},Ff:function(a,y,x,b,E,z,tt,ot,rt){var at=1e21,ut=a,ct=y;if(oe.Ve(a,y,a,b,E,z,tt,ot,rt)){var mt=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z);mtat},us:function(a,y,x){return oe.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,tt,ot){var rt=a+x,at=y+b;return E===tt?(z=y):z===ot?(E=a):!!(Ko(a,y,x,b,E,z)||Ko(a,y,x,b,tt,ot)||oe.Rl(a,y,rt,y,E,z,tt,ot)||oe.Rl(rt,y,rt,at,E,z,tt,ot)||oe.Rl(rt,at,a,at,E,z,tt,ot)||oe.Rl(a,at,a,y,E,z,tt,ot))},Rl:function(a,y,x,b,E,z,tt,ot){return a===x&&y===b&&E===tt&&z===ot?a===E&&y===z:0>=oe.Fl(a,y,x,b,E,z)*oe.Fl(a,y,x,b,tt,ot)&&0>=oe.Fl(E,z,tt,ot,a,y)*oe.Fl(E,z,tt,ot,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var tt=Math.PI;z||(b*=tt/180,E*=tt/180);var ot=b>E?-1:1;z=[];var rt=tt/2,at=b;if(b=Math.min(2*tt,Math.abs(E-b)),1e-5>b)return rt=at+ot*Math.min(b,rt),ot=a+x*Math.cos(at),at=y+x*Math.sin(at),a+=x*Math.cos(rt),y+=x*Math.sin(rt),x=(ot+a)/2,rt=(at+y)/2,z.push([ot,at,x,rt,x,rt,a,y]),z;for(;1e-5x,z=0>b;if(aat&&(y=.5*(ot+rt),!(y===ot||y===rt));++at){var ut=a/(y+E),ct=tt/(y+z);if(ut=ut*ut+ct*ct-1,0ut)rt=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,za?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case un.u:var y=new ke(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case un.F:if(y=new ke(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case un.o:y="",x=this.figures.s;for(var b=x.length,E=0;E=Kt-1?!0:at[Mt+1].match(te)!==null}function b(){return Mt++,at[Mt]}function E(ci){var ri=parseFloat(b()),_i=parseFloat(b());zt===zt.toLowerCase()&&(ri=Zt.x+ri,_i=Zt.y+_i),ci.h(ri,_i)}function z(){return E(Zt),Zt}function tt(){return E(Vt),Vt}function ot(){var ci=Bt.toLowerCase();return ci!=="c"&&ci!=="s"&&ci!=="q"&&ci!=="t"?Zt:new It(2*Zt.x-Vt.x,2*Zt.y-Vt.y)}y===void 0&&(y=!1);var rt=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(rt,"$1 $2"),a=a.replace(rt,"$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 at=a.split(" ");for(a=0;a=Kt-1);)if(Bt=zt,zt=b(),zt!=="")switch(zt.toUpperCase()){case"X":yt=!0,ct=ut=!1;break;case"M":for(St=z(),a.mc===null||yt===!0?(Lf(a,St.x,St.y,ut,!ct,mt),yt=!1):a.moveTo(St.x,St.y),rt.assign(Zt);!x();)St=z(),a.lineTo(St.x,St.y);break;case"L":for(;!x();)St=z(),a.lineTo(St.x,St.y);break;case"H":for(;!x();)Zt=new It((zt===zt.toLowerCase()?Zt.x:0)+parseFloat(b()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new It(Zt.x,(zt===zt.toLowerCase()?Zt.y:0)+parseFloat(b())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){St=new It,E(St);var ce=tt(),vn=z();Ku(a,St.x,St.y,ce.x,ce.y,vn.x,vn.y)}break;case"S":for(;!x();)St=ot(),ce=tt(),vn=z(),Ku(a,St.x,St.y,ce.x,ce.y,vn.x,vn.y);break;case"Q":for(;!x();)St=tt(),ce=z(),Im(a,St.x,St.y,ce.x,ce.y);break;case"T":for(;!x();)Vt=St=ot(),ce=z(),Im(a,St.x,St.y,ce.x,ce.y);break;case"B":for(;!x();){St=parseFloat(b()),ce=parseFloat(b()),vn=parseFloat(b());var Tn=parseFloat(b()),kn=parseFloat(b()),Qe=kn,ze=!1;x()||(Qe=parseFloat(b()),x()||(ze=parseFloat(b())!==0)),zt===zt.toLowerCase()&&(vn+=Zt.x,Tn+=Zt.y),a.arcTo(St,ce,vn,Tn,kn,Qe,ze)}break;case"A":for(;!x();)St=Math.abs(parseFloat(b())),ce=Math.abs(parseFloat(b())),vn=parseFloat(b()),kn=Tn=!1,ze=Qe=0,Qe=b(),Qe.length===1?(Tn=!!parseFloat(Qe),kn=!!parseFloat(b()),Qe=parseFloat(b())):Qe.length===2?(Tn=!!parseFloat(Qe[0]),kn=!!parseFloat(Qe[1]),Qe=parseFloat(b())):(Tn=!!parseFloat(Qe[0]),kn=!!parseFloat(Qe[1]),Qe=parseFloat(Qe.slice(2))),ze=parseFloat(b()),zt===zt.toLowerCase()&&(Qe=Zt.x+Qe,ze=Zt.y+ze),Zt.h(Qe,ze),wx(a,St,ce,vn,Tn,kn,Qe,ze);break;case"Z":Px(a),Zt.assign(rt);break;case"F":for(St="",ce=1;at[Mt+ce];)if(at[Mt+ce]==="0")mt=!0,ce++;else if(at[Mt+ce].match(/[Uu]/)!==null)ce++;else if(at[Mt+ce].match(te)===null)ce++;else{St=at[Mt+ce];break}St.match(/[Mm]/)?ut=!0:0tt&&(tt+=360),St.startAngle+=tt),0>a&&(St.startAngle=180-St.startAngle,St.sweepAngle=-St.sweepAngle),0>b&&(St.startAngle=-St.startAngle,St.sweepAngle=-St.sweepAngle),St.radiusX*=Math.sqrt(a*a+x*x),St.radiusY!==void 0&&(St.radiusY*=Math.sqrt(y*y+b*b));break;case Pa:if(tt=St.endX,ot=St.endY,St.endX=tt*a+ot*x+E,St.endY=tt*y+ot*b+z,St.radiusX===0||St.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),St.xAxisRotation+=tt),0>a&&(St.xAxisRotation=180-St.xAxisRotation,St.isClockwiseArc=!St.isClockwiseArc),0>b&&(St.xAxisRotation=-St.xAxisRotation,St.isClockwiseArc=!St.isClockwiseArc),St.radiusX*=Math.sqrt(a*a+x*x),St.radiusY*=Math.sqrt(y*y+b*b);break;default:$t("Unknown Segment type: "+St.type)}}}}return this._isInvalidBounds=!0,this},Ct.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case un.j:return oe.Yb(x,b,E,z,y,a.x,a.y);case un.u:var tt=ke.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=tt.ca(a),ke.free(tt),a;case un.F:tt=Math.min(x,E)-y;var ot=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),ot=a.y-(ot+y),1>=tt*tt/(x*x)+ot*ot/(y*y));case un.o:return ou(this,a,y,!0,!1);default:return!1}};function ou(a,y,x,b,E){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,ot=0,rt,at,ut,ct,mt=a.figures.s,yt=mt.length,St=0;St=a)return 0;if((E>tt?E-tt:tt-E)<(z>ot?z-ot:ot-z)){if(zot)return 0}else if(yz)return 0}else if(Ett)return 0}else if(atE)return 0;return 0a?a=0:1=z)return b=z-tt,b=ut===0?0:b/ut,x=x[ot],ot=x[2*a],E=x[2*a+1],y.h(ot+(x[2*a+2]-ot)*b,E+(x[2*a+3]-E)*b),y;tt+=ut}}return y},Ct.wx=function(a){if(0>a?a=0:1=E)return E=y[tt],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;z+=at}}return NaN},Ct.Qu=function(a,y){if(0>a?a=0:1=z)return b=z-tt,b=ut===0?0:b/ut,ut=x[ot],x=ut[2*a],ot=ut[2*a+1],E=ut[2*a+2],a=ut[2*a+3],y[0]=x+(E-x)*b,y[1]=ot+(a-ot)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ot)?0:1>Math.abs(E-x)?0<=a-ot?90:270:1>Math.abs(a-ot)?0<=E-x?0:180:180*Math.atan2(a-ot,E-x)/Math.PI,y;tt+=ut}}return y},Ct.xx=function(a){if(this.type===un.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x=b?b===x?0:1:Math.abs(a-x)/(b-tt)}if(x===E)return y=b?b===y?0:1:Math.abs(z-y)/(b-tt);tt=(b-y)*(b-y)+(E-x)*(E-x);var ot=It.alloc();return oe.qh(y,x,b,E,z,a,ot),a=ot.x,z=ot.y,It.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===un.u){tt=this.startX,ot=this.startY;var rt=this.endX;if(E=this.endY,tt!==rt||ot!==E){y=rt-tt,x=E-ot,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,tt),rt),a=Math.min(Math.max(a,ot),E),tt=Math.abs(b-tt),rt=Math.abs(b-rt),ot=Math.abs(a-ot),E=Math.abs(a-E);var at=Math.min(tt,rt,ot,E);if(at===ot)return b/z;if(at===rt)return(y+a)/z;if(at===E)return(2*y+x-b)/z;if(at===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=It.alloc(),E=1/0,ot=tt=0,rt=y.length;for(var ut=at=0,ct=0;cta?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;Ea&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),ot&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===dr&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===dr&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Ki.prototype.copy=function(){var a=new Ki;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},Ct=Ki.prototype,Ct.Xa=function(a){if(!(a instanceof Ki)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fr:case To:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY);case $r:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.point1X,a.point1X)&&oe.B(this.point1Y,a.point1Y)&&oe.B(this.point2X,a.point2X)&&oe.B(this.point2Y,a.point2Y);case ha:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.point1X,a.point1X)&&oe.B(this.point1Y,a.point1Y);case dr:return oe.B(this.startAngle,a.startAngle)&&oe.B(this.sweepAngle,a.sweepAngle)&&oe.B(this.centerX,a.centerX)&&oe.B(this.centerY,a.centerY)&&oe.B(this.radiusX,a.radiusX)&&oe.B(this.radiusY,a.radiusY);case Pa:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&oe.B(this.xAxisRotation,a.xAxisRotation)&&oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.radiusX,a.radiusX)&&oe.B(this.radiusY,a.radiusY);default:return!1}},Ct.qb=function(a){a.classType===Ki&&(this.type=a)},Ct.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fr:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case To:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case $r: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 ha: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 dr: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 Pa: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":"")},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.close=function(){return this.isClosed=!0,this};function ta(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,z=oe.jx(0,0,x=yt?tt=Math.PI:1<=yt&&(tt=0),!rt&&0tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,yt=y>z?z/y:1,y=oe.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Ni.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(rt,yt),un.Ha(y,z),Ni.free(z),a.ae=y,a.ae}Wt.Object.defineProperties(Ki.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&&_e(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&_e(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&_e(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&_e(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&_e(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&_e(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&_e(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&_e(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&_e(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Mn(a,">= zero",Ki,"radiusX"),this._isFrozen&&_e(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",Ki,"radiusY"),this._isFrozen&&_e(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&_e(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&&_e(this,a),360a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&_e(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&&_e(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&&_e(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ki.prototype.equalsApprox=Ki.prototype.Xa;var Fr=new Ce(Ki,"Move",0),To=new Ce(Ki,"Line",1),$r=new Ce(Ki,"Bezier",2),ha=new Ce(Ki,"QuadraticBezier",3),dr=new Ce(Ki,"Arc",4),Pa=new Ce(Ki,"SvgArc",4);Ki.className="PathSegment",Ki.Move=Fr,Ki.Line=To,Ki.Bezier=$r,Ki.QuadraticBezier=ha,Ki.Arc=dr,Ki.SvgArc=Pa;function as(){this.H=null,this.xu=new It(0,0).freeze(),this.mt=new It(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}as.prototype.copy=function(){var a=new as;return this.clone(a)},as.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},as.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},as.prototype.So=function(a,y){var x=this.diagram;return x===null||mg(x,a,y),y},as.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(mg(x,a,y),y.assign(x.Ps(y))),y},Wt.Object.defineProperties(as.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}}}),as.prototype.getMultiTouchDocumentPoint=as.prototype.Bz,as.prototype.getMultiTouchViewPoint=as.prototype.So,as.className="InputEvent";function Mu(){this.H=null,this.xa="",this.ar=this.Lr=null}Mu.prototype.copy=function(){var a=new Mu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Mu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Wt.Object.defineProperties(Mu.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}}}),Mu.className="DiagramEvent";function Uo(){this.Fm=Ho,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Uo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Uo.prototype.copy=function(){var a=new Uo;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=ve(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=ve(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=ve(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=ve(y)&&typeof y.J=="function"?y.J():y,a},Uo.prototype.qb=function(a){a.classType===Uo&&(this.change=a)},Uo.prototype.toString=function(){var a="";return a=this.change===ea?a+"* ":this.change===Ho?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+=nn(this.object)),this.oldValue!==null&&(a+=" old: "+nn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+nn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Uo.prototype.I=function(a){return a?this.oldValue:this.newValue},Uo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Uo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Uo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Uo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Uo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Wt.Object.defineProperties(Uo.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}}}),Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.canRedo=Uo.prototype.canRedo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.getParam=Uo.prototype.Dz,Uo.prototype.getValue=Uo.prototype.I,Uo.prototype.clear=Uo.prototype.clear;var ea=new Ce(Uo,"Transaction",-1),Ho=new Ce(Uo,"Property",0),rr=new Ce(Uo,"Insert",1),Pr=new Ce(Uo,"Remove",2);Uo.className="ChangedEvent",Uo.Transaction=ea,Uo.Property=Ho,Uo.Insert=rr,Uo.Remove=Pr;function Ir(){this.o=new Ie().freeze(),this.xa="",this.j=!1}Ir.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Wt.Object.defineProperties(Ir.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}}}),Ir.prototype.optimize=Ir.prototype.ak,Ir.prototype.redo=Ir.prototype.redo,Ir.prototype.canRedo=Ir.prototype.canRedo,Ir.prototype.undo=Ir.prototype.undo,Ir.prototype.canUndo=Ir.prototype.canUndo,Ir.prototype.clear=Ir.prototype.clear,Ir.className="Transaction";function Yo(){this.Pt=new Ge,this.Jd=!1,this.u=new Ie().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ie().freeze(),this.hl=new Ie,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Yo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;ba.transactionLevel&&ei("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var z=0;if(0=b&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=z,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}Ct.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()}},Yo.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||ei("Change not within a transaction: "+x.toString()))}},Yo.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},Wt.Object.defineProperties(Yo.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.historyIndexE||Math.abs(y.y-a.y)>b},Wt.Object.defineProperties(Ui.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof fe&&(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}}}),Ui.prototype.startTransaction=Ui.prototype.Ea,Ui.className="Tool";function zo(){Ui.call(this),this.name="ToolManager",this.hb=new Ie,this.ob=new Ie,this.Hb=new Ie,this.F=this.V=850,this.o=new pn(2,2).ja(),this.Ha=5e3,this.ia=sd,this.u=jc,this.Mp=this.j=null,this.zj=-1}Me(zo,Ui),zo.prototype.initializeStandardTools=function(){},zo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Zi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},zo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===su&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Sh){y.bubbles=!0;return}if(this.gestureBehavior===su)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;bE.right&&(x.x-=b.width+5/y.scale),x.xE.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.yx.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var z=null,tt=null;x.fromNode===null&&(z=Ip(a,x.i(0),!1),z!==null&&(tt=z.part));var ot=null,rt=null;x.toNode===null&&(ot=Ip(a,x.i(x.pointsCount-1),!0),ot!==null&&(rt=ot.part)),E.isValidLink(tt,z,rt,ot)?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=rt,ot!==null&&(x.toPortId=ot.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Wc(E,tt,z,rt,ot):Wc(E,null,null,null,null)}}}}Xo.prototype.doDragOver=function(){};function Nu(a,y){var x=a.diagram;a.dragsLink&&Tu(a,!0),xh(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(E,z),E.handled))break;$0(a,E,z),z=eg(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||Zr!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof wn&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Zr!==null){for(a=ke.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof wn&&J0(x,b,a);ke.free(a)}}}function $0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof fi||(x=a.mouseDrop,x!==null&&x(y))}function J0(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof qe},!0,function(E){return E instanceof qe},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Xo.prototype.doDropOnto=function(){},Xo.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()?(au(this,!1),nf(a,this.copiedParts),wl(this,this.copiedParts,!1),Ah(a,this.copiedParts)):this.mayMove()?($a(this),wl(this,this.draggedParts,!0)):this.mayDragOut()?(au(this,!1),wl(this,this.copiedParts,!1)):$a(this),Hc(this,a.lastInput.documentPoint))}},Xo.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?($a(this),au(this,!0),nf(a,this.copiedParts),wl(this,this.copiedParts,!1),Ah(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,$a(this),this.mayMove()&&(wl(this,this.draggedParts,!0),Hc(this,a.lastInput.documentPoint))),this.Ym=!0,Nu(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Q0(this),a.Ya(),Ah(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Xo.prototype.simulatedMouseMove=function(a,y,x){if(Zr===null)return!1;var b=Zr.diagram;x instanceof fe||(x=null);var E=Eu;return x!==E&&(E!==null&&E!==b&&(E.ug(),Zr.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Eu=x,x!==null&&x!==b&&(qf(),E=x.toolManager.findTool("Dragging"),E!==null&&(Il.contains(E)||Il.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0tt&&(tt=at),ut>ot&&(ot=ut))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,tt-b,ot-E),b=z.x+z.width/2,E=z.y+z.height/2,ke.free(z),z=a.Fr,tt=new On,ot=It.alloc(),rt=y.iterator;rt.next();)at=rt.value,at instanceof qe&&at.canCopy()&&(ut=x.I(at),ut!==null&&(ut.points=at.points,_u(ut,z.x-b,z.y-E),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)at=y.value,at.Zc()&&at.canCopy()&&(rt=x.I(at),rt!==null&&(at=at.location,ot.h(z.x-(b-at.x),z.y-(E-at.y)),rt.location=ot,rt.Va(),tt.add(rt,a.Pd(ot))));It.free(ot),a.copiedParts=tt,Gc(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,_u(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Xo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Xo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new It},Wt.Object.defineProperties(Xo.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}}}),Xo.prototype.getDraggingSource=Xo.prototype.Az;var Zr=null,Eu=null;Xo.className="DraggingTool",Il=new Ie,Xn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),zo.prototype.doCancel=function(){Zr!==null&&Zr.doCancel(),Ui.prototype.doCancel.call(this)};function er(){Ui.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new qe,y=new mi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new mi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new wn,y=new mi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=oo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new wn,y=new mi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=oo,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 On,this.Of=this.gj=this.Pf=null}Me(er,Ui),er.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},er.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),tt=pn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,b.desiredSize=tt,pn.free(tt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Vi,z=It.alloc(),x.location=y.ga(Vi,z),It.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},er.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=oo,y.fromSpot=ir,y.toSpot=ir),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},er.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},er.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof wn){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)}},er.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof wn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof wn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},er.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(ct){return E.findValidLinkablePort(ct,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,ot=tt.part;if(ot instanceof wn){var rt=tt.ga(Vi,It.alloc()),at=x.x-rt.x,ut=x.y-rt.y;It.free(rt),rt=at*at+ut*ut,rtx){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},er.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},er.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},er.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof wn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof wn))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},er.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},er.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new Ge;return b.add(a),ls(this,x,y,b)};function ls(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),ls(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),ls(a,y.labeledLink,x,b))))}er.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==lc){if(b===Ag){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Ss(this,a,y,x,!0)}if(b===Og){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Ss(this,a,y,x,!0)}if(b===Ng)return a===y?a=!0:(b=new Ge,b.add(y),a=xs(this,b,a,y,x)),!a;if(b===Eg)return!Ss(this,a,y,x,!1);if(b===Fg)return a===y?a=!0:(b=new Ge,b.add(y),a=ad(this,b,a,y,x)),!a}return!0};function Ss(a,y,x,b,E){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!==b&&(!E||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Ss(a,tt,x,b,E)))return!0}return!1}function xs(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&xs(a,y,tt,b,E)))return!0}return!1}function ad(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E){var ot=tt.fromNode;if(tt=tt.toNode,ot=ot===x?tt:ot,ot!==x&&ad(a,y,ot,b,E))return!0}}return!1}Wt.Object.defineProperties(er.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}}}),er.className="LinkingBaseTool";function Ps(){er.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ph,this.Xd=null}Me(Ps,er),Ps.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},Ps.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 wn)))return null;var x=this.direction;if(x===Ph||x===zp){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Ph||x===jp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ps.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 wn&&(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 wn&&(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)},Ps.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()},Ps.prototype.doStop=function(){er.prototype.doStop.call(this),this.startObject=null},Ps.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var ot=tt.part;ot instanceof wn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ot,E=tt):(y=ot,x=tt,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(z=this.insertLink(y,x,b,E),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,b,E)):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)}}},Ps.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof qe)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)},Ps.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ps.prototype.doNoLink=function(){},Wt.Object.defineProperties(Ps.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 Ph=new Ce(Ps,"Either",0),zp=new Ce(Ps,"ForwardsOnly",0),jp=new Ce(Ps,"BackwardsOnly",0);Ps.className="LinkingTool",Ps.Either=Ph,Ps.ForwardsOnly=zp,Ps.BackwardsOnly=jp;function da(){er.call(this),this.name="Relinking";var a=new mi;a.figure="Diamond",a.desiredSize=Vo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new mi,a.figure="Diamond",a.desiredSize=Vo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new ke}Me(da,er),da.prototype.updateAdornments=function(a){if(a!==null&&a instanceof qe){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},da.prototype.makeAdornment=function(a,y){var x=new Zi;return x.type=$e.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},da.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},da.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 Zi&&x.adornedPart instanceof qe))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&&0y.firstPickIndex+1&&x=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 $e)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ns.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},ns.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))},ns.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ns.prototype.stopTransaction=function(){var a=this.diagram,y=Ui.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ns.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ns.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,It.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),It.free(E)}},ns.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,It.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),It.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ns.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 fi){var b=new Ie;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new st;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},ns.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=Vi);var tt=this.adornedObject.naturalBounds,ot=tt.x,rt=tt.y,at=tt.x+tt.width,ut=tt.y+tt.height,ct=1;if(!z){ct=tt.width;var mt=tt.height;0>=ct&&(ct=1),0>=mt&&(mt=1),ct=mt/ct}return mt=It.alloc(),oe.No(a.x,a.y,ot,rt,E.width,E.height,mt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(mt.x,at-b.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.y=Math.max(mt.y,ut-b.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(ct*a.width,b.height),x.height),a.width=a.height/ct):(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width),a.x=at-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(mt.x,at-b.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.height=Math.max(Math.min(mt.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ct*a.width,b.height),x.height),a.width=a.height/ct):(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width),a.x=at-a.width)):(a.x=Math.max(mt.x,at-b.width),a.x=Math.min(a.x,at-x.width),a.width=at-a.x,z||(a.height=Math.max(Math.min(ct*a.width,b.height),x.height),a.width=a.height/ct,a.y=rt+.5*(ut-rt-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(mt.x-ot,b.width),x.width),a.y=Math.max(mt.y,ut-b.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(ct*a.width,b.height),x.height),a.width=a.height/ct):(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(mt.x-ot,b.width),x.width),a.height=Math.max(Math.min(mt.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ct*a.width,b.height),x.height),a.width=a.height/ct):(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width))):(a.width=Math.max(Math.min(mt.x-ot,b.width),x.width),z||(a.height=Math.max(Math.min(ct*a.width,b.height),x.height),a.width=a.height/ct,a.y=rt+.5*(ut-rt-a.height))):0>=y.y?(a.y=Math.max(mt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width,a.x=ot+.5*(at-ot-a.width))):1<=y.y&&(a.height=Math.max(Math.min(mt.y-rt,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/ct,b.width),x.width),a.height=ct*a.width,a.x=ot+.5*(at-ot-a.width))),It.free(mt),a},ns.prototype.computeReshape=function(){var a=Ue;return this.adornedObject instanceof mi&&(a=Lv(this.adornedObject)),!(a===Fn||this.diagram.lastInput.shift)},ns.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},ns.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.widthx?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},ws.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new It(NaN,NaN),this.isActive=a.isMouseCaptured=!1},ws.prototype.stopTransaction=function(){var a=this.diagram,y=Ui.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ws.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},ws.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},ws.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()},ws.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},ws.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&&0y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Wt.Object.defineProperties(ws.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 Zi))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 Zi)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}}}),ws.className="RotatingTool",Xn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function wh(){Ui.call(this),this.name="ClickSelecting"}Me(wh,Ui),wh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},wh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},wh.className="ClickSelectingTool";function ja(){Ui.call(this),this.name="Action",this.pk=null}Me(ja,Ui),ja.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ja.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()},ja.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))}},ja.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()},ja.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())},ja.prototype.doStop=function(){this.pk=null},ja.className="ActionTool";function Bu(){Ui.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new It(0,0)}Me(Bu,Ui),Bu.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)},Bu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Bu.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Wn)x.Zc()&&(Ua(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);ve(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=It.allocAt(a.x,a.y);this.isGridSnapEnabled&&ef(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),It.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Wt.Object.defineProperties(Bu.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}}}),Bu.className="ClickCreatingTool";function wa(){Ui.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Wn;a.layerName="Tool",a.selectable=!1;var y=new mi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Me(wa,Ui),wa.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.timestampE.right&&(x.x-=b.width+5/y.scale),x.xE.bottom&&(x.y-=b.height+5/y.scale),x.ya.lastInput.clickCount)):!1},No.prototype.doStart=function(){Iu=this,this.textBlock!==null&&this.doActivate()},No.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 xo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=_d;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new ke(this.textBlock.ga(Tr),this.textBlock.ga(Qs));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},No.prototype.doCancel=function(){this.stopTool()},No.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},No.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ll)},No.prototype.acceptText=function(a){switch(a){case Ll:this.qa===dd?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===_d||this.qa===Jd||this.qa===$d)&&(this.qa=og,ig(this));break;case Uc:case Xd:case Zc:(Xd!==a||this.textBlock.isMultiline!==!0)&&(this.qa===_d||this.qa===Jd||this.qa===$d)&&(this.qa=og,ig(this))}};function ig(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=dd,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Jd,a.doError(E,z))}}No.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)},No.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},No.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=hd,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},No.prototype.doStop=function(){Iu=null},No.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},No.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Wt.Object.defineProperties(No.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)}}}),No.prototype.measureTemporaryTextBlock=No.prototype.Lx;var Uc=new Ce(No,"LostFocus",0),Ll=new Ce(No,"MouseDown",1),Zc=new Ce(No,"Tab",2),Xd=new Ce(No,"Enter",3),q0=new Ce(No,"SingleClick",0),ud=new Ce(No,"SingleClickSelected",1),Kc=new Ce(No,"DoubleClick",2),hd=new Ce(No,"StateNone",0),_d=new Ce(No,"StateActive",1),$d=new Ce(No,"StateEditing",2),og=new Ce(No,"StateValidating",3),Jd=new Ce(No,"StateInvalid",4),dd=new Ce(No,"StateValidated",5),Iu=null;No.className="TextEditingTool",No.LostFocus=Uc,No.MouseDown=Ll,No.Tab=Zc,No.Enter=Xd,No.SingleClick=q0,No.SingleClickSelected=ud,No.DoubleClick=Kc,No.StateNone=hd,No.StateActive=_d,No.StateEditing=$d,No.StateValidating=og,No.StateInvalid=Jd,No.StateValidated=dd,Xn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function na(a){qd||(rg(),qd=!0),this.H=zl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=hu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ge,this.ce=new Qr,this.ce.Yd=this,this.Ei=new Ge,this.pu=new Ge,this.Sr=new Ge,this.pr=new Ge,a&&Object.assign(this,a)}na.prototype.Xe=function(a){this.H=a},na.prototype.canStart=function(){return!0};function Rl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),qr(a.H),a.zb=!0)}function Yc(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===hu?(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===sg&&y.vc.clear(),a.Qw=!!(a.Pk===tc&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),ec(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==us&&b!==null&&(delete b.start.scale,delete b.end.scale),Yt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ds(x),dg(x),a.zb=!1,y.start(),y.bc&&(Ru(a),x.Ya(),ag(y,0),La(x,!0),Lh(a),x.R("AnimationStarting",a)))}))}}function uu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Xc(a,y,x,b){a.isTicking||uu(a)||y instanceof qe&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Ct=na.prototype,Ct.fv=function(a){return this.ce.fv(a)},Ct.Xu=function(a){return this.ce.Xu(a)};function _c(a,y){function x(){if(0z?z+=360:rt+=360),z=E(x,z,rt-z,b)%360,tt=E(x,tt,at-tt,b),ot=E(x,ot,ut-ot,b),x=E(x,a,y-a,b),"hsla("+z+", "+tt+"%, "+ot+"%, "+x+")"}function rg(){function a(x,b,E,z,tt,ot){x.position=new It(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}var y=new On;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,tt,ot){tta&&Mn(a,">= 1",na,"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}}}),na.prototype.stopAnimation=na.prototype.Cc;var Qd=null,qd=!1,hu=new Ce(na,"Default",1),tc=new Ce(na,"AnimateLocations",2),sg=new Ce(na,"None",3);na.className="AnimationManager",na.defineAnimationEffect=function(a,y){qd||(rg(),qd=!0),Qd.add(a,y)},na.Default=hu,na.AnimateLocations=tc,na.None=sg;function Qr(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=cd,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Wi,this.vc=new On,this.Tt=new On,this.yl=new Ge,this.Ut=new Ge,this.dw=Hu,a&&Object.assign(this,a)}Qr.prototype.suspend=function(){this.Xk=!0},Qr.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,nc(this,!0),Ru(this.Yd),La(this.H),Lh(this.Yd),this.H.redraw()};function ec(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,Ea.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function ag(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof ee&&z.diagram===null)){var tt=b.value,ot=E?tt.end:tt.start;tt=E?tt.start:tt.end;var rt=Qd,at;for(at in tt)at==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||rt.get(at)===null||rt.get(at)(z,ot[at],tt[at],a.Lp,y,x,a)}}}Ct.stop=function(){return this.bc?(this.Ml(!0),this):this},Ct.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,Ru(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var z=Qd;b.next();){var tt=b.key,ot=b.value,rt=E?ot.end:ot.start,at=E?ot.start:ot.end,ut=ot.Ku,ct;for(ct in at)if(z.get(ct)!==null){var mt=ct;!ot.Hu||mt!=="position:nodeCollapse"&&mt!=="position:placeholder"||(mt="position"),z.get(mt)(tt,rt[ct],ut[ct]!==void 0?ut[ct]:ot.Hu?rt[ct]:at[ct],this.Lp,this.Gd,this.Gd,this)}ot.Hu&&ut.location!==void 0&&tt instanceof Wn&&(tt.location=ut.location),ot.nv&&tt instanceof Wn&&tt.Zb(!1)}if(y.As.clear(),ic(y,!1),y.Ya(),y.N(),La(y,!0),x.defaultAnimation===this){for(ct=x.pr.iterator;ct.next();)E=ct.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}La(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Lh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ec(this,null),x.Ml(this),y.$b())}},Ct.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof fi&&(b=y.placeholder),b!==null?(x=b.ga(Tr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new It(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof fi)for(a=a.memberParts;a.next();)b=a.value,b instanceof wn&&this.Cj(b,y)},Ct.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof fi&&(x=y.placeholder),x!==null){var b=x.ga(Tr);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof fi)for(a=a.memberParts;a.next();)b=a.value,b instanceof wn&&this.Aj(b,y)}},Ct.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Wt.Object.defineProperties(Qr.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Qr,"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){0a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wp(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Qr.className="Animation",Qr.EaseLinear=function(a,y,x,b){return x*a/b+y},Qr.EaseInOutQuad=cd,Qr.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Qr.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Qr.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Qr.EaseOutExpo=Wp;function bh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}bh.className="AnimationState";function Qa(a,y,x){this.xd=null,this.rf=a,this.so=x||lg,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Th))}Qa.prototype.copy=function(){var a=new Qa(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 Vp(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))}Wt.Object.defineProperties(Qa.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 lg=new Ce(Qa,"Default",1),Th=new Ce(Qa,"Immediate",2),fd=new Ce(Qa,"Bundled",3);Qa.className="AnimationTrigger",Qa.Default=lg,Qa.Immediate=Th,Qa.Bundled=fd;function Hr(a){Ti(this),this.H=null,this.Pa=new Ie,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)}Ct=Hr.prototype,Ct.clear=function(){for(var a=this.Pa,y=0;y=a)return y;for(var x=0,b=0,E=0,z=0,tt=0,ot=this.Pa.iterator;ot.next();){var rt=ot.value;rt instanceof fi?E++:rt instanceof wn?b++:rt instanceof qe?z++:rt instanceof Zi?tt++:x++}if(ot="",0x.Oq||ot.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(tr(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(tr(y,a,"rgba(0,0,0,0.3)",!0,!1,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),tr(y,a,y.background,!0,!1,z,E),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)))))),b&&(a.restore(),a.Vc(!0))}},Ct.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(Ho,a,this,y,x,b,E)},Ct.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&rs(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Jc(this,a,y),a},Ct.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,rs(y),a};function Jc(a,y,x){if(y=Zp(a,y,x),x instanceof fi&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,tt=0;ttb&&ot.containingGroup===x&&(b=tt,0<=y))break}!(0>b)&&b=E)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 ot=y+1,rt=NaN;otb)for(;;){if(z===-1||tt<=b){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(rt)&&rt=b){if(ot--,ot===y)break;return a.mb(y),a.Gb(ot,x),ot}for(rt=NaN;++ota||1=a)return y;for(var x=this.Wa.iterator;x.next();)y+=` `+x.value.toString(a-1);return y};function hg(a,y){if(qo){if(y!=null||$t("Diagram setup requires an argument DIV."),a.Ka!==null&&$t("Diagram has already completed setup."),typeof y=="string"?a.Ka=Yt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:$t("No DIV or DIV id supplied: "+y),a.Ka===null&&$t("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&$t("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Yt.ResizeObserver){var x=Je(function(){a.$b()},250);a.ol=new Yt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Yt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Yt.go;var E=new Va(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Yt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),yg(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Va(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,qo){E=bn("div");var z=bn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=$p,E.addEventListener("pointerdown",Jp),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=Je(function(){a.Yh=null,a.N()},300),a.Ov=Je(function(){dg(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var ot=Ca(a,tt,!0);ot.bubbles=!0;var rt=0,at=0;ot.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(rt=0Math.abs(tt.deltaY)?-rt:-at):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(rt=0Math.abs(tt.wheelDeltaY)?-rt:-at):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(ot.delta=0ot||Math.abs(at.y-tt.screenY)>ot)?a.yq++:a.yq=1,rt.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():qa(rt,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.oj;if(ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType){if(ot[1]!==null&&ot[1].pointerId===tt.pointerId){ot[1]=tt;return}if(ot[0]===null)ot[0]=tt;else return}else ot[0]=tt;if(ot[0].pointerId===tt.pointerId){ot=pg(a,tt,!1,!1,!1,ot[1]!==null);var rt=Yt.document.elementFromPoint(tt.clientX,tt.clientY)||null;rt!==null&&rt.shadowRoot!==void 0&&rt.shadowRoot!==null&&(rt=rt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var at=a,ut=tt;rt&&rt.H&&(ut=tt,at=rt.H),ot.targetDiagram=at,pd(a,ut,ot),ot.targetObject=null,a.doMouseMove(),qa(ot,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=tt.pointerType==="touch"||tt.pointerType==="pen",rt=a.Yt;if(ot&&a.qu)delete rt[tt.pointerId],tt.preventDefault();else if(rt=a.oj,rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null);else{rt[0]=null,rt=pg(a,tt,!1,!0,!0,!1);var at=Yt.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),at!==null&&at.H instanceof fe&&at.H!==a&&pd(at.H,tt,rt),at===null&&(at=tt.target),pd(a,tt,rt),rt.clickCount=a.yq,rt.targetDiagram=gg(tt,at),rt.targetObject=null,a.doMouseUp(),qa(rt,tt),ot&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var ot=a.Yt;ot[tt.pointerId]&&delete ot[tt.pointerId],ot=a.oj,ot[0]!==null&&ot[0].pointerId===tt.pointerId&&(ot[0]=null),ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var ot=a.oj;ot[0]!==null&&ot[0].pointerId===tt.pointerId?(ot[0]=null,a.wq=!1):ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null)},a.Vp=b.Z["d"+dc[1]+dc[2]+"wI"+wd.slice(1,5)]["b"+Ax.slice(1,y)](b.Z,hc,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}fe.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},fe.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(Yt,"resize",a.Ov,!1)}function Ds(a){30St&&(this.position=zt.h(-(y.scrollWidth-this.Aa)+Bt-this.Aa/E+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(otMt&&(this.position=zt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),It.free(zt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ut=b.right,St=E.right,z=b.bottom,Mt=E.bottom,tt=b.x,ct=E.x,ot=b.y,b=E.y,mt>=rt&&tt>=ct&&ut<=St&&(x.style.width="1px"),yt>=at&&ot>=b&&z<=Mt&&(x.style.height="1px"))}},fe.prototype.computeBounds=function(a){return a===void 0&&(a=new ke),qr(this),cg(this,a)};function cg(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,z=0;zx&&(y=x),ya.maxScale&&(y=a.maxScale),y):y===Dh?(y=rt>ot?(tt-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),ya.maxScale&&(y=a.maxScale),y):a.scale}fe.prototype.zoomToFit=function(){var a=this.sj;this.sj=Hu,this.scale=gd(this,ca),a!==Hu&&(Ha(this,!1),fg(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ct=fe.prototype,Ct.BA=function(a,y){y===void 0&&(y=ca);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ca||y===Dh)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var z=this.ya;E=y===Dh?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new It(a.x,a.y)}},Ct.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new It(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},Ct.zz=function(a){if(a instanceof ee){this.eq=a;var y=It.alloc();this.fq=this.op(a.ga(Tr,y)),It.free(y)}else this.eq=null,this.fq=Wo};function fg(a,y,x,b,E,z){var tt=It.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var at=It.alloc();at=a.eq.ga(Tr,at),ot=at.x-a.fq.x/a.scale,rt=at.y-a.fq.y/a.scale,E=ir,It.free(at)}(z||a.scrollMode===Hu)&&(E.sb()&&(x>y.width&&(ot=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(rt=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,xy.left?ot=y.left:oty.top?rt=y.top:rty;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Ge,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof fi&&b.U&65536&&(b.U=b.U^65536)})}}Ct.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof fi||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof fi&&x.isVisible()&&sc(this,x);for(a.reset();a.next();)x=a.value,x instanceof qe&&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 Zi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function sc(a,y){for(var x=Te(),b=Te(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof fi?(ga(z)||Ms(z)||Rh(z))&&sc(a,z):z instanceof qe?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;Ete&&(Bt=vn.left,Vt=vn.right),zt.height>ce&&(Zt=vn.top,Kt=vn.bottom)):(Bt=vn.left,Vt=vn.right,Zt=vn.top,Kt=vn.bottom);var Tn=zt.width+Bt+Vt,kn=zt.height+Zt+Kt;vn=a.scale;var Qe=Tn>rt/vn,ze=kn>at/vn;if(!(z||a.gf||a.Be||Qe||ze))return!0;Bt=zt.x-Bt,rt=ut.x,Vt=zt.right+Vt,at=ut.right+tt,Zt=zt.y-Zt;var ci=ut.y;zt=zt.bottom+Kt,ut=ut.bottom+ot;var ri="1px";if(Kt="1px",a.scrollMode===Hu&&(Qe||ze)&&(Qe&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qe=1,Bt+1at+1&&(Qe=Math.max((Vt-at)*vn+a.Aa,Qe)),te+tt+1ut+1&&(Qe=Math.max((zt-ut)*vn+a.ya,Qe)),ce+ot+1at+1&&(tt=Math.max((Vt-at)*vn+a.Aa,tt)),te+1ut+1&&(ot=Math.max((zt-ut)*vn+tt,ot)),ce+1at+1&&(y=a.position.x*vn)),a.tn)switch(a.bu){case"negative":y=-(St.scrollWidth-y-St.clientWidth);break;case"reverse":y=St.scrollWidth-y-St.clientWidth}return St.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(ce+1ut+1&&(St.scrollTop=a.position.y*vn)),rt=a.Aa,at=a.ya,St.style.width=rt+(a.gf?a.Db:0)+"px",St.style.height=at+(a.Be?a.Db:0)+"px",x!==rt||b!==at||a.animationManager.zb?(x=ke.allocAt(E,ct,mt,yt),a.onViewportBoundsChanged(x,a.viewportBounds,vn,z),ke.free(x),!1):!0}Ct=fe.prototype,Ct.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&$t("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&&$t('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(rr,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ct.oi=function(a){this.partManager.oi(a);var y=this;bd(a,function(x){Sd(y,x)}),(a instanceof Zi||a instanceof fi&&a.placeholder!==null)&&a.v(),a.data!==null&&bd(a,function(x){ay(y.partManager,x)}),Ms(a)!==!0&&Rh(a)!==!0||this.De.add(a),R1(a,!0,this),j1(a)?(a.actualBounds.w()&&this.N(Ed(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Ed(a,a.actualBounds)),this.$b()},Ct.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&bd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),j1(a)?(a.actualBounds.w()&&this.N(Ed(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Ed(a,a.actualBounds)),this.$b()},Ct.remove=function(a){Sg(this,a,!0)};function Sg(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Pr,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Ct.Is=function(a,y){if(y===void 0&&(y=!1),Be(a))for(var x=a.length,b=0;bb&&this.Ya(),this},Ct.Cy=function(a,y){Pg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Pr,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;zb&&this.Ya(),this},Ct.kA=function(a){if(a.diagram!==this&&$t("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Pr,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ct.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ct.Yw=function(a){return this.pf===null&&(this.pf=new Ie),this.pf.add(a),this.model.Pe(a),this},Ct.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ct.Pe=function(a){return this.zg===null&&(this.zg=new Ie),this.zg.add(a),this},Ct.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ct.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;bct.Pa.indexOf(yt)&&ct.oi(mt,yt,St):(yt.isSelected=!1,yt.isHighlighted=!1,yt.Wb(),ct.pc(St?mt:-1,yt,St)))}else ct instanceof fe?typeof mt=="number"&&yt instanceof Hr&&(y?(yt.Xe(this),this.Wa.Gb(mt,yt)):this.Wa.mb(mt)):$t("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ea&&$t("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},fe.prototype.Ea=function(a){return this.undoManager.Ea(a)},fe.prototype.eb=function(a){return this.undoManager.eb(a)},fe.prototype.Kf=function(){return this.undoManager.Kf()},fe.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},fe.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},fe.prototype.rp=function(){this.partManager.rp()};function wg(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,kl(a),a.N(),a.Ee=!0,b.zb&&(uu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,kl(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,ot=a.zoomPoint.x,rt=a.zoomPoint.y,at=a.contentAlignment;isNaN(ot)&&(at.$c()?at.Hf(iu)?ot=0:at.Hf(qs)&&(ot=z-1):ot=at.sb()?at.x*(z-1):z/2),isNaN(rt)&&(at.$c()?at.Hf(Bl)?rt=0:at.Hf(xa)&&(rt=tt-1):rt=at.sb()?at.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),xa.maxScale&&(x=a.maxScale),z=It.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,It.free(z),a.Ca=x,kl(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Ha(a,!1),b.zb&&(uu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}fe.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==us||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof zo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Dp(E,this)),this.vb||this.invalidateViewport(a,y),Ml(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Ml(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=pn.alloc(),E=1,z=1,tt=x.O.s,ot=tt.length,rt=0;rtut||(pv(at.figure)?z=z*ut/oe.vx(z,ut):E=E*ut/oe.vx(E,ut))}if(tt=x.gridCellSize,b.h(z*tt.width,E*tt.height),y!==void 0)E=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=ke.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){ke.free(y);return}E=y.width,z=y.height,a=y.x,tt=y.y,ke.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=It.alloc(),oe.No(a,tt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),pn.free(b),x.part.location=y,It.free(y)}}fe.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Rl(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)bg(a,tt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),qr(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Yc(z),a.aa=x}}}function bg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)bg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),sc(a,y),E.isValidLayout=!0):a.xh=!0)}}Ct.yz=function(){for(var a=new Ie,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function ev(a){function y(E){var z=E.toLowerCase(),tt=new Ie;x.add(E,tt),x.add(z,tt),b.add(E,E),b.add(z,E)}var x=new On,b=new On;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function em(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function rf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;$t("Unknown DiagramEvent name: "+y)}Ct.Bj=function(a,y){return a=rf(this,a),a!==null&&a.add(y),this},Ct.am=function(a,y){a=rf(this,a),a!==null&&a.remove(y)},Ct.R=function(a,y,x){var b=rf(this,a),E=new Mu;if(E.diagram=this,a=em(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=ke.allocAt(0,0,b.width*E,b.height*E);var z=It.allocAt(0,0);if(a.x>=b.x&&a.xb.x+b.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>b.x+b.width-x.right/2&&(z.x+=tt),a.x>b.x+b.width-x.right/4&&(z.x+=4*tt));return a.y>=b.y&&a.yb.y+b.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>b.y+b.height-x.bottom/2&&(z.y+=tt),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Wi)||(y=new It(y.x+z.x/E,y.y+z.y/E)),ke.free(b),It.free(z),y},Ct=fe.prototype,Ct.Cs=function(){return null},Ct.av=function(){return null},Ct.bs=function(a,y){this.pj.add(a,y)},Ct.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof fi&&(y.$p=null)})};function ac(a,y,x){function b(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-at>rt?y(x,E,ot):Yt.requestAnimationFrame(b)}for(var E=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var ot=a,rt=x.callbackTimeout||300,at=+new Date;return Yt.requestAnimationFrame(function(){b()}),null}Ct.Wz=function(a){return qo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ct.Jx=function(a){return a===void 0&&(a={}),ac(this,this.Xz,a)},Ct.Xz=function(a,y,x){var b=im(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case wd+"data":E=b.getImageData(0,0,x.width,x.height);break;case wd:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&$t('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&$t("properties argument must be an Object.");var E=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 pn(1/0,1/0):new pn(2e3,2e3));var ot=y.position||null,rt=y.parts||null,at=y.padding===void 0?1:y.padding,ut=y.background||null,ct=y.omitTemporary;ct===void 0&&(ct=!0);var mt=y.document||document,yt=y.elementFinished||null,St=y.showTemporary;St===void 0&&(St=!ct),y=y.showGrid,y===void 0&&(y=St),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof at=="number"?at=new Kn(at):at instanceof Kn||$t("MakeImage padding must be a Margin or a number."),at.left=Math.max(at.left,0),at.right=Math.max(at.right,0),at.top=Math.max(at.top,0),at.bottom=Math.max(at.bottom,0),a.ib.Vc(!0),ct=new Va(null,mt,void 0,!0);var Mt=ct.context;if(!(E||z||rt||ot))return ct.width=a.Aa+Math.ceil(at.left+at.right),ct.height=a.ya+Math.ceil(at.top+at.bottom),x==="SVG"?b===null?null:(b.resize(ct.width,ct.height,ct.width,ct.height),b.ownerDocument=mt,b.hs=yt,qc(a,b.context,at,new pn(ct.width,ct.height),a.Ca,a.pa,rt,ut,St,y),b.context):(a.Xm=!1,qc(a,Mt,at,new pn(ct.width,ct.height),a.Ca,a.pa,rt,ut,St,y),a.Xm=!0,ct.context);var zt=a.Pp,Bt=a.documentBounds.copy();if(Bt.Fv(a.yb),St)for(var Vt=a.Wa.s,Zt=Vt.length,Kt=0;Ktzt?(z=zt,E=Bt.width,Bt=Bt.height):(E=tt.width,Bt=tt.height)):(E=Bt.width*z,Bt=Bt.height*z):(z=zt,E=Bt.width,Bt=Bt.height),at!==null?(E+=ot,Bt+=Zt):at=new Kn(0),tt!==null&&(zt=tt.width,tt=tt.height,isNaN(zt)&&(zt=2e3),isNaN(tt)&&(tt=2e3),isFinite(zt)&&(E=Math.min(E,zt)),isFinite(tt)&&(Bt=Math.min(Bt,tt))),ct.width=Math.ceil(E),ct.height=Math.ceil(Bt),x==="SVG"?b===null?null:(b.resize(ct.width,ct.height,ct.width,ct.height),b.ownerDocument=mt,b.hs=yt,qc(a,b.context,at,new pn(Math.ceil(E),Math.ceil(Bt)),z,Vt,rt,ut,St,y),b.context):(a.Xm=!1,qc(a,Mt,at,new pn(Math.ceil(E),Math.ceil(Bt)),z,Vt,rt,ut,St,y),a.Xm=!0,ct.context)}Wt.Object.defineProperties(fe.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 bl(this,Yt.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 bl(this,Yt.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(Yt,"resize",this.Ov,!1),this.removeEventListener(Yt,"wheel",this.$j,!0),zl===this&&(zl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),hg(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||1a&&Mn(a,">= 0",fe,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Mn(a,">= 0",fe,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",fe,"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||qp(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&&$t("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=ug(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Rl(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=Cg(this.cc.type);for(var E=0;Ethis.scale&&(this.scale=a)):Mn(a,"> 0",fe,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0 0",fe,"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),Ha(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 Kn(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&&$t("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();)Kg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Wu&&a!==gr&&a!==hf&&$t("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 pn(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 Kn(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Wt.Object.defineProperties(fe,{licenseKey:{get:function(){return Bg.jc()},set:function(a){Bg.add(a.replace(/\s/g,""))}},version:{get:function(){return Pd}}}),fe.prototype.makeImageData=fe.prototype.Jx,fe.prototype.makeImage=fe.prototype.Wz,fe.prototype.cacheGroupExternalLinks=fe.prototype.Fu,fe.prototype.addRenderer=fe.prototype.bs,fe.prototype.makeSVG=fe.prototype.av,fe.prototype.makeSvg=fe.prototype.Cs,fe.prototype.stopAutoScroll=fe.prototype.ug,fe.prototype.doAutoScroll=fe.prototype.gs,fe.prototype.isUnoccupied=fe.prototype.Yj,fe.prototype.raiseDiagramEvent=fe.prototype.R,fe.prototype.removeDiagramListener=fe.prototype.am,fe.prototype.addDiagramListener=fe.prototype.Bj,fe.prototype.findTreeRoots=fe.prototype.yz,fe.prototype.layoutDiagram=fe.prototype.Uz,fe.prototype.findTopLevelGroups=fe.prototype.qz,fe.prototype.findTopLevelNodesAndLinks=fe.prototype.rz,fe.prototype.ensureBounds=fe.prototype.Va,fe.prototype.findLinksByExample=fe.prototype.ls,fe.prototype.findNodesByExample=fe.prototype.ms,fe.prototype.findLinkForData=fe.prototype.Kc,fe.prototype.findNodeForData=fe.prototype.ii,fe.prototype.findPartForData=fe.prototype.Lc,fe.prototype.findLinkForKey=fe.prototype.findLinkForKey,fe.prototype.findNodeForKey=fe.prototype.Vb,fe.prototype.findPartForKey=fe.prototype.findPartForKey,fe.prototype.rebuildParts=fe.prototype.Wd,fe.prototype.transformViewToDoc=fe.prototype.Ps,fe.prototype.transformRectDocToView=fe.prototype.zA,fe.prototype.transformDocToView=fe.prototype.op,fe.prototype.centerRect=fe.prototype.es,fe.prototype.scrollToRect=fe.prototype.tv,fe.prototype.scroll=fe.prototype.scroll,fe.prototype.highlightCollection=fe.prototype.Jz,fe.prototype.highlight=fe.prototype.Iz,fe.prototype.selectCollection=fe.prototype.rA,fe.prototype.select=fe.prototype.select,fe.prototype.updateAllRelationshipsFromData=fe.prototype.rp,fe.prototype.updateAllTargetBindings=fe.prototype.updateAllTargetBindings,fe.prototype.commit=fe.prototype.commit,fe.prototype.rollbackTransaction=fe.prototype.Kf,fe.prototype.commitTransaction=fe.prototype.eb,fe.prototype.startTransaction=fe.prototype.Ea,fe.prototype.raiseChanged=fe.prototype.g,fe.prototype.raiseChangedEvent=fe.prototype.cb,fe.prototype.removeChangedListener=fe.prototype.ik,fe.prototype.addChangedListener=fe.prototype.Pe,fe.prototype.removeModelChangedListener=fe.prototype.mA,fe.prototype.addModelChangedListener=fe.prototype.Yw,fe.prototype.findLayer=fe.prototype.Qj,fe.prototype.removeLayer=fe.prototype.kA,fe.prototype.addLayerAfter=fe.prototype.Cy,fe.prototype.addLayerBefore=fe.prototype.Ww,fe.prototype.addLayer=fe.prototype.Al,fe.prototype.moveParts=fe.prototype.moveParts,fe.prototype.copyParts=fe.prototype.Kj,fe.prototype.removeParts=fe.prototype.Is,fe.prototype.remove=fe.prototype.remove,fe.prototype.add=fe.prototype.add,fe.prototype.clearDelayedGeometries=fe.prototype.bx,fe.prototype.setProperties=fe.prototype.nm,fe.prototype.attach=fe.prototype.Du,fe.prototype.set=fe.prototype.set,fe.prototype.resetInputOptions=fe.prototype.Sx,fe.prototype.setInputOption=fe.prototype.sA,fe.prototype.getInputOption=fe.prototype.Ql,fe.prototype.resetRenderingHints=fe.prototype.Tx,fe.prototype.setRenderingHint=fe.prototype.Xx,fe.prototype.getRenderingHint=fe.prototype.Gf,fe.prototype.maybeUpdate=fe.prototype.bd,fe.prototype.requestUpdate=fe.prototype.$b,fe.prototype.delayInitialization=fe.prototype.Xy,fe.prototype.isUpdateRequested=fe.prototype.Pz,fe.prototype.invalidateDocumentBounds=fe.prototype.Ya,fe.prototype.findObjectsNear=fe.prototype.og,fe.prototype.findPartsNear=fe.prototype.mz,fe.prototype.findObjectsIn=fe.prototype.Cf,fe.prototype.findPartsIn=fe.prototype.ux,fe.prototype.findObjectsAt=fe.prototype.ji,fe.prototype.findPartsAt=fe.prototype.lz,fe.prototype.findObjectAt=fe.prototype.ic,fe.prototype.findPartAt=fe.prototype.Ol,fe.prototype.focusObject=fe.prototype.zz,fe.prototype.alignDocument=fe.prototype.Jy,fe.prototype.zoomToRect=fe.prototype.BA,fe.prototype.zoomToFit=fe.prototype.zoomToFit,fe.prototype.diagramScroll=fe.prototype.kx,fe.prototype.focus=fe.prototype.focus;var uf=new On,om=null,qo=Yt.document!==void 0,xd=null,Bh="",us=new Ce(fe,"None",0),ca=new Ce(fe,"Uniform",1),Dh=new Ce(fe,"UniformToFill",2),lc=new Ce(fe,"CycleAll",10),Ng=new Ce(fe,"CycleNotDirected",11),Eg=new Ce(fe,"CycleNotDirectedFast",12),Fg=new Ce(fe,"CycleNotUndirected",13),Ag=new Ce(fe,"CycleDestinationTree",14),Og=new Ce(fe,"CycleSourceTree",15),Hu=new Ce(fe,"DocumentScroll",1),uc=new Ce(fe,"InfiniteScroll",2),Wu=new Ce(fe,"TreeParentCollapsed",21),gr=new Ce(fe,"AllParentsCollapsed",22),hf=new Ce(fe,"AnyParentsCollapsed",23),Bg=new Ie,Pd="2.3.10",wd="image",hc=null,rm=!1;function is(){if(qo){var a=Yt.document.createElement("canvas"),y=a.getContext("2d"),x=xe("7ca11abfd022028846");y[x]=xe("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Fe.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ni.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",oe.za],E=1;5>E;E++)y[xe("7ca11abfd7330390")](xe(b[E-1]),10,15*E);for(y[x]=xe("39f046ebb36e4b"),x=1;5>x;x++)y[xe("7ca11abfd7330390")](xe(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Ni.prototype.Cd=Ni.prototype.Eu),hc=a}}fe.className="Diagram",fe.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Yt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof fe?y.H:null},fe.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},fe.useDOM=function(a){qo=a?Yt.document!==void 0:!1},fe.isUsingDOM=function(){return qo},fe.None=us,fe.Uniform=ca,fe.UniformToFill=Dh,fe.CycleAll=lc,fe.CycleNotDirected=Ng,fe.CycleNotDirectedFast=Eg,fe.CycleNotUndirected=Fg,fe.CycleDestinationTree=Ag,fe.CycleSourceTree=Og,fe.DocumentScroll=Hu,fe.InfiniteScroll=uc,fe.TreeParentCollapsed=Wu,fe.AllParentsCollapsed=gr,fe.AnyParentsCollapsed=hf;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Cd(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=Yt[xe("76a715b2f73f148a")][xe("72ba13b5")]||"";if(a.Rc=!0,qo){var b=fe[xe("76a115b6ed251eaf4692")];if(b)for(var E=Bg.iterator;E.next()&&(b=E.value,b=xe(b).split(xe("39e9")),!(6>b.length));){var z=xe(b[1]).split(".");if(b[4]!=="7da71ca0")break;var tt=xe(Fe[xe("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var ot=Yt[xe("74a900bae4370f8b51")][xe("6fbb13a1c2311e8a57")].toLowerCase();if(tt=ot[xe("73a612b6fb191d")](xe("3aad1ab6e022098b4dc4")),z=xe(b[2]),-1tt&&z!==xe("7da71ca0ad381e90")&&(tt=y[xe("73a612b6fb191d")](xe("76a715b2ef3e149757"))),0>tt&&(tt=y[xe("73a612b6fb191d")](xe("76a715b2ef3e149757"))),0>tt&&(tt=y[xe("73a612b6fb191d")](xe("2bfa41fdb3784bca12"))),0>tt&&(tt=x[xe("73a612b6fb191d")](xe("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&ttot),!a.Rc)))break;if(z[0]==="#"){tt=Yt.document.createElement("div");for(var rt=b[0].replace(/[A-Za-z]/g,"");4>rt.length;)rt+="9";if(ot=rt,rt=rt.substr(rt.length-4),b="",b+=["gsh","gsf"][parseInt(rt.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(rt.substr(0,1),10)%4],tt[xe("79a417a0f0181a8946")]=b,Yt.document[xe("78a712aa")]){Yt.document[xe("78a712aa")][xe("7bb806b6ed32388c4a875b")](tt),rt=Yt.getComputedStyle(tt).getPropertyValue(xe("78a704b7e62456904c9b12701b6532a8"));var at=Yt.getComputedStyle(tt).getPropertyValue(xe("75b817b0ea2202"));if(Yt.document[xe("78a712aa")][xe("68ad1bbcf533388c4a875b")](tt),rt){if(tt=Yt[xe("77a902b0eb1b1e804a8a")],at==="0."+parseInt(ot,10)%100||rt.indexOf(parseInt(z[1]+z[2],16))!==-1&&rt.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(xe("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;zb.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&Et(b)},x.autoScale=ca,x.vb=!1,y&&Object.assign(x,y),x}Me(gt,fe),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(vd(this),this.ql===null){var x=new Va(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),Pt(this)}finally{this.ta=a,this.ib=y}}}fe.prototype.redraw.call(this)},gt.prototype.gc=function(){if(this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!(this.ta instanceof bl)&&(Dv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){vd(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?Pt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;ba&&(a=0),this.ia!==a&&(this.ia=a)}}}),gt.className="Overview";function jt(){Xo.call(this),this.j=null}Me(jt,Xo),jt.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.timestampy.maxScale||(y.scale=a))},Rt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==us?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Rt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===us&&(a=y.scale*a,ay.maxScale||(y.scale=a))},Rt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==us?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Rt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;ay.maxScale||(y.scale=a)},Rt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return ay.maxScale?!1:y.allowZoom},Rt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Rl(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Fi):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Yc(y)},Rt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Rt.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(rt){this.cg=null}a===null&&(0a&&(a+=360)),a},Ct.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ct.qs=function(a,y){return y===void 0&&(y=new It),y.assign(a),this.oe.Cd(y),y},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,at=-z.m21*tt,ut=z.m11*tt,ct=tt*(z.m21*z.dy-z.m22*z.dx),mt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,oe.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(tt=a*ot+y*at+ct,a=a*rt+y*ut+mt,y=x*ot+b*at+ct,x=x*rt+b*ut+mt,E.h(0,0),b=this.naturalBounds,x=oe.Ff(0,0,b.width,b.height,tt,a,y,x,E),E.transform(z),x)},ee.prototype.measure=function(a,y,x,b){if(ga(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+tt:a,y=isFinite(E.width)?E.width+tt:y):(a=isFinite(E.width)?E.width+tt:a,y=isFinite(E.height)?E.height+tt:y),E=x||0,tt=b||0;var ot=this instanceof $e;switch(Rs(this,!0)){case Ue:tt=E=0,ot&&(y=a=1/0);break;case Ye:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(tt=y);break;case zn:isFinite(a)&&a>x&&(E=a),tt=0,ot&&(y=1/0);break;case qn:isFinite(y)&&y>b&&(tt=y),E=0,ot&&(a=1/0)}ot=this.maxSize;var rt=this.minSize;E>ot.width&&rt.widthot.height&&rt.heighta.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||$t("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Hl(this,!1),ke.free(z)},Ct=ee.prototype,Ct.eh=function(){};function hs(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!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,b+=y,E+=tt,y=Rs(a,!0),x===b&&z===E&&(y=Ue),y){case Ue:(x>b||z>E)&&(pr(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case Ye:pr(a,!0),a.measure(b,E,0,0);break;case zn:pr(a,!0),a.measure(b,z,0,0);break;case qn:pr(a,!0),a.measure(x,E,0,0)}}}Ct.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||zv(x,!0),this.N(),yo(a,y)||(x.oh(),this.Pn(x)))},Ct.Pn=function(a){this.portId!==null&&(zv(a,!0),a instanceof wn&&V1(a,this))},Ct.gc=function(a,y){if(!Ma(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var z=this instanceof $e&&Zu(this),tt=this.Ib;if(z){var ot=this.Ib,rt=this.dc,at=this.areaBackground,ut=this.Ma;at===null&&ut===null||a.yc(),at!==null&&(tr(this,a,at,!0,!0,rt,ot),at instanceof so&&at.type===Ta?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(at)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),ut!==null&&(tr(this,a,ut,!0,!1,rt,ot),ut instanceof so&&ut.type===Ta?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(ut)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,ot=this.panel,this.l&4096&&Kr(this),at=this.part,rt=!1;var ct=0;at&&y.Gf("drawShadows")&&(rt=at.isShadowed)&&(ut=at.shadowOffset,ct=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var mt;if(!(mt=y.$i||!ut)){var yt=this.naturalBounds;mt=this.wh;var St=mt.m11,Mt=mt.m21,zt=mt.dx,Bt=mt.m12,Vt=mt.m22,Zt=mt.dy,Kt,te=Kt=0;mt=Kt*St+te*Mt+zt;var ce=Kt*Bt+te*Vt+Zt;Kt=yt.width+ct,te=0;var vn=Kt*St+te*Mt+zt;Kt=Kt*Bt+te*Vt+Zt,te=Math.min(mt,vn);var Tn=Math.min(ce,Kt),kn=Math.max(mt+0,vn)-te,Qe=Math.max(ce+0,Kt)-Tn;mt=te,ce=Tn,Kt=yt.width+ct,te=yt.height+ct,vn=Kt*St+te*Mt+zt,Kt=Kt*Bt+te*Vt+Zt,te=Math.min(mt,vn),Tn=Math.min(ce,Kt),kn=Math.max(mt+kn,vn)-te,Qe=Math.max(ce+Qe,Kt)-Tn,mt=te,ce=Tn,Kt=0,te=yt.height+ct,vn=Kt*St+te*Mt+zt,Kt=Kt*Bt+te*Vt+Zt,te=Math.min(mt,vn),Tn=Math.min(ce,Kt),kn=Math.max(mt+kn,vn)-te,Qe=Math.max(ce+Qe,Kt)-Tn,mt=te,ce=Tn,ct=y.viewportBounds,yt=ct.x,St=ct.y,mt=!(mt>ct.width+yt||yt>kn+mt||ce>ct.height+St||St>Qe+ce)}if(mt){if(mt=(this.l&256)!==0,a.clipInsteadOfFill&&(mt=!1),this instanceof xo&&(a.font=this.font),mt){if(ce=ot.se()?ot.naturalBounds:ot.actualBounds,kn=Math.max(tt.x,ce.x),Qe=Math.max(tt.y,ce.y),ct=Math.min(tt.right,ce.right)-kn,yt=Math.min(tt.bottom,ce.bottom)-Qe,St=this.tb,St!==null&&(kn=St.x,Qe=St.y,ct=St.width,yt=St.height),kn>tt.width+tt.x||tt.x>ce.width+ce.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(kn,Qe,ct,yt),a.clip()}if(ut){if(!at.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}rt&&(ce=at.shadowOffset,a.Ev(ce.x*y.scale*this.scale*y.Mb,ce.y*y.scale*this.scale*y.Mb,at.shadowBlur),fu(a),a.shadowColor=at.shadowColor)}rt&&this.shadowVisible===!0?fu(a):rt&&this.shadowVisible===!1&&Wl(a),at=this.naturalBounds,this.areaBackground!==null&&(a.yc(),fa(this,a,at,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),rt&&Wr(this,ot)&&this.shadowVisible===null&&Wl(a),this.Ma!==null&&(a.yc(),Vs(this,a,at,tt)),rt&&(this.Ma!==null||this.areaBackground!==null||Wr(this,ot))?(tl(this,!0),this.shadowVisible===null&&Wl(a)):tl(this,!1),this.hh(a,y),rt&&this.l&512&&fu(a),ut&&rt&&Wl(a),mt&&(a.restore(),a.Vc(this instanceof $e)),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=b),this.filter!==""&&(a.filter=E)}}};function Wr(a,y){return y===null?!1:(Zu(y)&&(y=y.panel),(y.l&512)!==0||(y.type===$e.Auto||y.type===$e.Spot)&&y.Pb()!==a)}Ct.Dv=function(){};function fa(a,y,x,b){tr(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof so&&a.areaBackground.type===Ta?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function Vs(a,y,x,b){var E=a.kq(),z=x.x,tt=x.y,ot=x.width+E,rt=x.height+E;tr(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof so&&a.Ma.type===Ta?(y.beginPath(),y.rect(z-E/2,tt-E/2,ot,rt),y.ng(a.Ma)):y.fillRect(z-E/2,tt-E/2,ot,rt)}function os(a,y,x){for(var b=y.O.s,E=b.length,z=-1,tt=0;ttE)&&$t("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&$t("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new $n;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);md(a,E)}else md(a,y);else $t('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Vu(a,y){df.add(a,y)}function am(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Wt.Object.defineProperties(ee.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new fc),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 fc),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 fc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Mi(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&&(Mi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ts},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Ih),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ts&&(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 Ih),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:1a||1=a&&$t("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,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof mi&&this.qc(),this.g("desiredSize",b,a),_r(this)&&(a=this.part,a!==null&&(Eo(this,a,"width"),Eo(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new pn(a,this.jd.height).freeze(),this.v(),this instanceof mi&&this.qc(),this.g("desiredSize",y,a),_r(this)&&(a=this.part,a!==null&&Eo(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new pn(this.jd.width,a).freeze(),this.v(),this instanceof mi&&this.qc(),this.g("desiredSize",y,a),_r(this)&&(a=this.part,a!==null&&Eo(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(),Mi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:yr},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(),Mi(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 Kn(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&&Kr(this),this.Ab}},oe:{get:function(){return this.l&4096&&Kr(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Mi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Ue},set:function(a){this.reshapingBehavior!==a&&(Mi(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()&&$t("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ls(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Mn(a,">= 0",ee,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Mn(a,">= 1",ee,"columnSpan"),Mi(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Mn(a,">= 0",ee,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Mn(a,">= 1",ee,"rowSpan"),Mi(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&&(Mi(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 wn||$t("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Wv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(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),Ld(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",ee,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Ld(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),Ld(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",ee,"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),Ld(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",ee,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Ld(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),Ld(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",ee,"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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(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&&(Mi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ee.prototype.trigger=ee.prototype.Jv,ee.prototype.findBindingPanel=ee.prototype.ih,ee.prototype.findTemplateBinder=ee.prototype.pz,ee.prototype.setProperties=ee.prototype.nm,ee.prototype.apply=ee.prototype.apply,ee.prototype.attach=ee.prototype.Du,ee.prototype.set=ee.prototype.set,ee.prototype.isEnabledObject=ee.prototype.If,ee.prototype.isVisibleObject=ee.prototype.Ed,ee.prototype.isContainedBy=ee.prototype.rg,ee.prototype.getNearestIntersectionPoint=ee.prototype.rs,ee.prototype.getLocalPoint=ee.prototype.qs,ee.prototype.getDocumentScale=ee.prototype.Df,ee.prototype.getDocumentAngle=ee.prototype.li,ee.prototype.getDocumentBounds=ee.prototype.mi,ee.prototype.getDocumentPoint=ee.prototype.ga,ee.prototype.intersectsRect=ee.prototype.Yc,ee.prototype.containedInRect=ee.prototype.fh,ee.prototype.containsRect=ee.prototype.Re,ee.prototype.containsPoint=ee.prototype.ca,ee.prototype.raiseChanged=ee.prototype.g,ee.prototype.raiseChangedEvent=ee.prototype.cb,ee.prototype.addCopyProperty=ee.prototype.Vw;var df=null;ee.className="GraphObject",df=new On,Vu("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=ba($e,$e.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof $e){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},ba(mi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Rn(0,0,2.76142374915397,2.761423749153969),spot2:new Rn(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof $e&&(x=b.fb("ButtonBorder"),x instanceof mi)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof $e&&(x=b.fb("ButtonBorder"),x instanceof mi&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof $e&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof mi){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=tt,tt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof $e&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof mi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof $e&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof mi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof $e&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof mi))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var tt=b._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=b._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),E.skipsUndoManager=z}}},y}),Vu("TreeExpanderButton",function(){var a=ba("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ba(mi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Vo},new lr("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new lr("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Zi&&(x=x.adornedPart),x instanceof wn){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Vu("SubGraphExpanderButton",function(){var a=ba("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ba(mi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Vo},new lr("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 Zi&&(x=x.adornedPart),x instanceof fi){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Vu("ToolTip",function(){return ba(Zi,$e.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},ba(mi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Rn(0,0,4,6),spot2:new Rn(1,1,-4,-4)}))}),Vu("ContextMenu",function(){return ba(Zi,$e.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},new lr("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Vu("ContextMenuButton",function(){var a=ba("Button");a.stretch=zn;var y=a.fb("ButtonBorder");return y instanceof mi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Rn(0,0,2,3),y.spot2=new Rn(1,1,-2,-2)),a}),Vu("PanelExpanderButton",function(a){var y=am(a,"COLLAPSIBLE"),x=ba("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},ba(mi,{name:"ButtonIcon",strokeWidth:2},new lr("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof mi&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var tt=E.ih();tt===null&&(tt=E.part),tt!==null&&(E=tt.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),Vu("CheckBoxButton",function(a){var y=am(a);return a=ba("Button",{desiredSize:new pn(14,14)},ba(mi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ye,geometryStretch:Fn,visible:!1},y!==""?new lr("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof $e){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Vu("CheckBox",function(a){a=am(a),a=ba("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Kn(0,1,0,0)});var y=ba($e,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Kn(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}),ee.None=Ue=new Ce(ee,"None",0),ee.Default=gi=new Ce(ee,"Default",0),ee.Vertical=qn=new Ce(ee,"Vertical",4),ee.Horizontal=zn=new Ce(ee,"Horizontal",5),ee.Fill=Ye=new Ce(ee,"Fill",3),ee.Uniform=Fn=new Ce(ee,"Uniform",1),ee.UniformToFill=Bi=new Ce(ee,"UniformToFill",2),ee.FlipVertical=ki=new Ce(ee,"FlipVertical",1),ee.FlipHorizontal=Gi=new Ce(ee,"FlipHorizontal",2),ee.FlipBoth=co=new Ce(ee,"FlipBoth",3),ee.make=ba,ee.getBuilders=function(){var a=new On,y;for(y in df)if(y!==y.toLowerCase()){var x=df.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ee.defineBuilder=Vu,ee.build=function(a,y,x){for(var b=[],E=2;Ea&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,z=this.ha[0]*-b+this.ha[2]*a,tt=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Md.className="STransform";function gc(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}gc.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},gc.className="SGradient";function bl(a,y,x){this.ownerDocument=a=y===void 0?Yt.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 ia(this,x)}bl.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},bl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),ve(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},bl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},bl.prototype.focus=function(){this.Oa.focus()},bl.prototype.mx=function(){this.ownerDocument=null},Wt.Object.defineProperties(bl.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}}}),bl.className="SVGSurface";function ia(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 Md,this.j=lm(this),this.Nj=lm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ro++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,b,E,z,tt){a.Nj===void 0?Ig(a,y,x,b,E,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+tt+")")}Ct=ia.prototype,Ct.arc=function(a,y,x,b,E,z,tt,ot){var rt=2*Math.PI,at=rt-1e-6,ut=x*Math.cos(b),ct=x*Math.sin(b),mt=a+ut,yt=y+ct,St=z?0:1;b=z?b-E:E-b,(1e-6b&&(b=b%rt+rt),b>at?(this.path.push(["A",x,x,0,1,St,a-ut,y-ct]),this.path.push(["A",x,x,0,1,St,mt,yt])):1e-6=Math.PI),St,a+x*Math.cos(E),y+x*Math.sin(E)])},Ct.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ct.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ct.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Ct.clearRect=function(){},Ct.clip=function(){this.Yl.clipPath=!0},Ct.closePath=function(){this.path.push(["z"])},Ct.createLinearGradient=function(a,y,x,b){var E=new gc("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Ct.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Ro++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(wd,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Ct.createRadialGradient=function(a,y,x,b,E,z){var tt=new gc("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=b,tt.y2=E,tt.r2=z,tt};function _y(a,y,x,b,E,z,tt,ot,rt){b=ot/b,E=rt/E,z===0&&tt===0||a.rb.translate(z,tt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Ct.drawImage=function(a,y,x,b,E,z,tt,ot,rt){var at="";a instanceof HTMLCanvasElement&&(at=a.toDataURL()),a instanceof HTMLImageElement&&(at=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,tt=x,ot=b=ut,rt=E=a),b=b||0,E=E||0,ot=ot||0,rt=rt||0,_y(this,y,x,b,E,z||0,tt||0,ot,rt),z={x:0,y:0,width:ut||b,height:a||E,href:at},oe.$(b,ot)&&oe.$(E,rt)?at.toLowerCase().indexOf(".svg")===-1&&at.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ut||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),cf(this,wd,z,this.rb),this.addElement(wd,z)},Ct.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Ct.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ct.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},cf(this,"fill",a,this.rb),this.addElement("rect",a)},Ct.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},cf(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Ct.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},cf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ct.lineTo=function(a,y){this.path.push(["L",a,y])},Ct.moveTo=function(a,y){this.path.push(["M",a,y])},Ct.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Ct.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},Ct.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},Ct.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;yut.offset?1:-1}),E=0;Ex?(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)},Ct.jk=function(){this.Hm||this.stroke()},Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ct.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ct.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},Ct.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ct.Hs=function(){},Wt.Object.defineProperties(kd.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 mx=Object.freeze([]);kd.className="CanvasSurfaceContext";function Rg(){this.F=this.o=this.u=this.j=0}Rg.className="ColorNumbers";function so(a,y){mf||(hv(),mf=!0),Ti(this),this._isFrozen=!1,a===void 0?(this.na=Uu,this.xk="black"):typeof a=="string"?(this.na=Uu,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===pu?(this.Qd=Sa,this.Lk=Js):this.Lk=a===Ta?this.Qd=Vi: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)}so.prototype.copy=function(){var a=new so;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},Ct=so.prototype,Ct.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ct.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ct.qb=function(a){a.classType===so&&(this.type=a)},Ct.toString=function(){var a="Brush(";if(this.type===Uu)a+=this.color;else if(a=this.type===pu?a+"Linear ":this.type===Ta?a+"Radial ":this.type===vf?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+")"},Ct.addColorStop=function(a,y){return this._isFrozen&&_e(this),(typeof a!="number"||!isFinite(a)||1a)&&Mn(a,"0 <= loc <= 1",so,"addColorStop:loc"),this.we===null&&(this.we=new On),this.we.add(a,y),this.na===Uu&&(this.type=pu),this.xe=null,this},Ct.Vz=function(a,y){if(this._isFrozen&&_e(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?yf:y,this.type===Uu)gu(this.color),this.color=gf(a,y);else if((this.type===pu||this.type===Ta)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)gu(x.value),this.addColorStop(x.key,gf(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?yf:x,gu(a),gf(y,x)}Ct.Wy=function(a,y){if(this._isFrozen&&_e(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?yf:y,this.type===Uu)gu(this.color),this.color=gf(-a,y);else if((this.type===pu||this.type===Ta)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)gu(x.value),this.addColorStop(x.key,gf(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?yf:x,gu(a),gf(-y,x)}function rv(a,y,x){gu(a),a=ko.j;var b=ko.u,E=ko.o,z=ko.F;return gu(y),x===void 0&&(x=.5),"rgba("+Math.round((ko.j-a)*x+a)+", "+Math.round((ko.u-b)*x+b)+", "+Math.round((ko.o-E)*x+E)+", "+Math.round((ko.F-z)*x+z)+")"}Ct.Gx=function(){if(this.type===Uu)return ff(this.color);if((this.type===pu||this.type===Ta)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ta)return ff(a.first().value);if(a.get(.5)!==null)return ff(a.get(.5));if(a.count===2)return a=a.Fa(),ff(rv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var tt=y.key,ot=Math.abs(.5-y.key);E>z&&ot=E&&otb&&(z=x,x=b,b=z,z=E),E=b-x,ff(rv(a.get(x),a.get(b),1-z/E))}return!1};function ff(a){return a?a instanceof so?a.Gx():(gu(a),128>(299*ko.j+587*ko.u+114*ko.o)/1e3):!1}function gf(a,y){switch(y){case yf:y=100*av(ko.j);var x=100*av(ko.u),b=100*av(ko.o);return ks.j=.4124564*y+.3575761*x+.1804375*b,ks.u=.2126729*y+.7151522*x+.072175*b,ks.o=.0193339*y+.119192*x+.9503041*b,ks.F=ko.F,y=uv(ks.j/pf[0]),x=uv(ks.u/pf[1]),b=uv(ks.o/pf[2]),Vl.j=116*x-16,Vl.u=500*(y-x),Vl.o=200*(x-b),Vl.F=ks.F,Vl.j=Math.min(100,Math.max(0,Vl.j+100*a)),a=(Vl.j+16)/116,y=a-Vl.o/200,ks.j=pf[0]*e1(Vl.u/500+a),ks.u=pf[1]*(Vl.j>hm*dv?Math.pow(a,3):Vl.j/hm),ks.o=pf[2]*e1(y),ks.F=Vl.F,a=-.969266*ks.j+1.8760108*ks.u+.041556*ks.o,y=.0556434*ks.j+-.2040259*ks.u+1.0572252*ks.o,ko.j=255*lv((3.2404542*ks.j+-1.5371385*ks.u+-.4985314*ks.o)/100),ko.u=255*lv(a/100),ko.o=255*lv(y/100),ko.F=ks.F,ko.j=Math.round(ko.j),255ko.j&&(ko.j=0),ko.u=Math.round(ko.u),255ko.u&&(ko.u=0),ko.o=Math.round(ko.o),255ko.o&&(ko.o=0),"rgba("+ko.j+", "+ko.u+", "+ko.o+", "+ko.F+")";case n1:return sv(),pa.o=Math.min(100,Math.max(0,pa.o+100*a)),"hsla("+pa.j+", "+pa.u+"%, "+pa.o+"%, "+pa.F+")";default:$t("Unknown color space: "+y)}}function gu(a){mf||(hv(),mf=!0);var y=cv;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,ko.j=a[0],ko.u=a[1],ko.o=a[2],ko.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ko.j=0,ko.u=0,ko.o=0,ko.F=1)}}function sv(){var a=ko.j/255,y=ko.u/255,x=ko.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var tt=a=0;else{switch(b){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*E-1))}pa.j=Math.round(tt),pa.u=Math.round(100*a),pa.o=Math.round(100*E),pa.F=ko.F}function av(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>dv?Math.pow(a,1/3):(hm*a+16)/116}function e1(a){var y=a*a*a;return y>dv?y:(116*a-16)/hm}function pc(a,y){typeof a!="string"&&(a instanceof so||$t("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=qo?new Va(null,void 0,{willReadFrequently:!0}).context:null}Wt.Object.defineProperties(so.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&_e(this,a),this.na=a,this.start.Mc()&&(a===pu?this.start=Sa:a===Ta&&(this.start=Vi)),this.end.Mc()&&(a===pu?this.end=Js:a===Ta&&(this.end=Vi)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&_e(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&_e(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&_e(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&_e(this,a),0>a&&Mn(a,">= zero",so,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&_e(this,a),0>a&&Mn(a,">= zero",so,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&_e(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&_e(this,a),this.cr=a,this.xe=null}}}),so.prototype.isDark=so.prototype.Gx,so.prototype.darkenBy=so.prototype.Wy,so.prototype.lightenBy=so.prototype.Vz,so.prototype.addColorStop=so.prototype.addColorStop;var dv=216/24389,hm=24389/27,pf=[95.047,100,108.883],cv=null,ko=new Rg,pa=new Rg,ks=new Rg,Vl=new Rg,mf=!1;so.className="Brush";var Uu;so.Solid=Uu=new Ce(so,"Solid",0);var pu;so.Linear=pu=new Ce(so,"Linear",1);var Ta;so.Radial=Ta=new Ce(so,"Radial",2);var vf;so.Pattern=vf=new Ce(so,"Pattern",4);var yf;so.Lab=yf=new Ce(so,"Lab",5);var n1;so.HSL=n1=new Ce(so,"HSL",6),so.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},so.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;mf||(hv(),mf=!0);var y=cv;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)},so.lighten=function(a){return qy(a)},so.lightenBy=qy,so.darken=function(a){return t1(a)},so.darkenBy=t1,so.mix=rv,so.isDark=ff;function wr(){this.xa="Base"}wr.prototype.measure=function(){},wr.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},wr.prototype.arrange=function(){},wr.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},wr.prototype.iA=function(a){a.Uj()},wr.prototype.gc=function(){},Wt.Object.defineProperties(wr.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return $e}}}),wr.prototype.remeasureObject=wr.prototype.iA,wr.prototype.arrangeElement=wr.prototype.Ly,wr.prototype.measureElement=wr.prototype.Yz,wr.className="PanelLayout";function dm(){this.xa="Base"}Me(dm,wr),dm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length;a=mu(a);for(var rt=0;rtTn&&(Br=Math.max(Tn-Jh,0));var j0=ze.oa===0;ze.oc=ze.oc+Br,ze.actual=ze.oa+Br,Tn=Math.max(Tn-(Br+(j0?Jh:0)),0)}if(Zs.columnSpan===1&&(fs===Ue||fs===qn)){ze=a.Eb(cs);var Mp=ze.Wc();Br=Math.max(Dd-ze.actual,0),Br+Mp>vn&&(Br=Math.max(vn-Mp,0));var Gy=ze.oa===0;ze.oc=ze.oc+Br,ze.actual=ze.oa+Br,vn=Math.max(vn-(Br+(Gy?Mp:0)),0)}$h&&Zs.Uj()}}}}}Ze(Vt);var Ql=0,Su=0;z=a.columnCount;for(var Tc=0;Tc=a.rowCount);rh++)ze=a.Fb(nr.row+rh),Br=0,Br=fs===Ye||fs===qn?Math.max(ze.minimum,Sl[nr.row+rh]===0?ze.maximum:Math.min(Sl[nr.row+rh],ze.maximum)):Math.max(ze.minimum,isNaN(ze.Hc)?ze.maximum:Math.min(ze.Hc,ze.maximum)),wu.height+=Br,ua+=ze.minimum;for(var _a=1;_a=a.columnCount);_a++)ze=a.Eb(nr.column+_a),Br=0,Br=fs===Ye||fs===zn?Math.max(ze.minimum,Oa[nr.column+_a]===0?ze.maximum:Math.min(Oa[nr.column+_a],ze.maximum)):Math.max(ze.minimum,isNaN(ze.Hc)?ze.maximum:Math.min(ze.Hc,ze.maximum)),wu.width+=Br,V0+=ze.minimum;Xr.width+=wu.width,Xr.height+=wu.height;var Xf=nr.margin,nd=Xf.right+Xf.left,bp=Xf.top+Xf.bottom;nr.measure(Xr.width,Xr.height,V0,ua);for(var _f=nr.measuredBounds,Ol=Math.max(_f.width+nd,0),jd=Math.max(_f.height+bp,0),id=0,$f=0;$f=a.rowCount);$f++)ze=a.Fb(nr.row+$f),id+=ze.total||0;if(id=sh)&&!(nr.row+Cu>=a.rowCount);Cu++){ze=a.Fb(nr.row+Cu);var lh=ze.oa||0,Gd=ah(nr,ze,tu);ze.actual=Math.min(ze.maximum,lh+Gd),ze.oa!==lh&&(sh-=ze.oa-lh)}for(;0xl&&(ze.actual=Math.min(ze.maximum,xl+sh),ze.oa!==xl&&(sh-=ze.oa-xl)),ze.index===0)break;ze=a.Fb(ze.index-1)}}for(var Fc=0,uh=0;uh=a.columnCount);uh++)ze=a.Eb(nr.column+uh),Fc+=ze.total||0;if(Fc=Ac)&&!(nr.column+Hd>=a.columnCount);Hd++){ze=a.Eb(nr.column+Hd);var Tp=ze.oa||0,Vy=Lu(nr,ze,Wy);ze.actual=Math.min(ze.maximum,Tp+Vy),ze.oa!==Tp&&(Ac-=ze.oa-Tp)}for(;0U0&&(ze.actual=Math.min(ze.maximum,U0+Ac),ze.oa!==U0&&(Ac-=ze.oa-U0)),ze.index===0)break;ze=a.Eb(ze.index-1)}}}}Ze(Zt),pn.free(wu),pn.free(Xr),Sl!==void 0&&Ze(Sl),Oa!==void 0&&Ze(Oa);var Oc=0,Bc=0,Z0=a.desiredSize,gx=a.maxSize;fs=Rs(a,!0);var Np=Su=Ql=0,Ep=0;z=a.columnCount;for(var K0=0;K0=a.rowCount);ze++){var ci=a.Fb(Vt+ze);ci.oa!==0&&(Bt.height+=ci.total)}for(ze=1;ze=a.columnCount);ze++)ci=a.Eb(Kt+ze),ci.oa!==0&&(Bt.width+=ci.total);var ri=te.oa+Bt.width,_i=Zt.oa+Bt.height;ze=ot,ci=rt;var So=ri,Or=_i,zr=ot,ds=rt,Br=ri,eh=_i;ot+ri>x.width&&(Br=Math.max(x.width-ot,0)),rt+_i>x.height&&(eh=Math.max(x.height-rt,0));var ur=kn.alignment;if(ur.Xb()){ur=a.defaultAlignment,ur.sb()||(ur=Vi);var ml=ur.x,cs=ur.y,nh=ur.offsetX;ur=ur.offsetY;var ya=te.alignment,Ya=Zt.alignment;ya.sb()&&(ml=ya.x,nh=ya.offsetX),Ya.sb()&&(cs=Ya.y,ur=Ya.offsetY)}else ml=ur.x,cs=ur.y,nh=ur.offsetX,ur=ur.offsetY;(isNaN(ml)||isNaN(cs))&&(cs=ml=.5,ur=nh=0),ya=Qe.width,Ya=Qe.height;var sa=kn.margin,Zs=sa.left+sa.right,$h=sa.top+sa.bottom,vl=dl(kn,Zt,te,!1);!isNaN(kn.desiredSize.width)||vl!==Ye&&vl!==zn||(ya=Math.max(ri-Zs,0)),!isNaN(kn.desiredSize.height)||vl!==Ye&&vl!==qn||(Ya=Math.max(_i-$h,0)),ri=kn.maxSize,_i=kn.minSize,ya=Math.min(ri.width,ya),Ya=Math.min(ri.height,Ya),ya=Math.max(_i.width,ya),Ya=Math.max(_i.height,Ya),ri=Ya+$h,ze+=So*ml-(ya+Zs)*ml+nh+sa.left,ci+=Or*cs-ri*cs+ur+sa.top,kn.visible&&(Ko(zr,ds,Br,eh,ze,ci,Qe.width,Qe.height)?kn.arrange(ze,ci,ya,Ya):kn.arrange(ze,ci,ya,Ya,new ke(zr,ds,Br,eh)))}}}for(pn.free(Bt),a=0;a=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var z=a.naturalBounds,tt=a.actualBounds,ot=z.width,rt=z.height,at=Math.ceil(ot/E),ut=Math.ceil(rt/b),ct=a.gridOrigin,mt=ct.x;ct=ct.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var yt=[],St=a.O.s,Mt=St.length,zt=0;ztZt)){Bt=pv(Bt.figure);for(var Kt=0;KtZt&&Vt.push(te))}}}}for(St=a.O.s,Mt=St.length,zt=0;ztE*Bt*x))){if(Zt=ce.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Bt-Math.min(-Zt,Bt)),Zt=Math.round(Zt%Bt),Bt=ce.opacity,Kt=1,Bt!==1){if(Bt===0)continue;Kt=y.globalAlpha,y.globalAlpha=Kt*Bt}te=yt[zt];var vn=!1,Tn=ce.strokeDashArray;if(Tn!==null&&(vn=!0,y.js(Tn,ce.strokeDashOffset)),ce.figure==="LineV"&&ce.stroke!==null&&0y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;Ect)Vt.measure(1/0,1/0,0,0),Zt=Vt.measuredBounds,x.ed(Zt),yt.push(Zt);else{var Kt=Vt.segmentIndex,te=Vt.segmentFraction,ce=Vt.alignmentFocus;ce.Mc()&&(ce=Vi);var vn=Vt.segmentOrientation,Tn=Vt.segmentOffset;if(isNaN(Kt)){var kn=rt.ua;Zt=Te(),kn.Qu(te,Zt);var Qe=It.allocAt(Zt[0],Zt[1]);if(Qe.add(rt.i(0)),kn.type===un.j?Qe.offset(-kn.startX,-kn.startY):(kn=kn.figures.first(),kn!==null&&Qe.offset(-kn.startX,-kn.startY)),kn=Zt[2],vn!==Ts){var ze=rt.computeAngle(Vt,vn,kn);Vt.Kb=ze}ze=Qe.x-y.x;var ci=Qe.y-y.y;It.free(Qe),Ze(Zt)}else if(Kt<-ct||Kt>=ct)Zt=It.alloc(),rt.vg(),rt.computeMidPoint(Zt),kn=rt.midAngle,vn!==Ts&&(ze=rt.computeAngle(Vt,vn,kn),Vt.Kb=ze),ze=Zt.x-y.x,ci=Zt.y-y.y,It.free(Zt);else{if(ze=0,0<=Kt?(ci=ut.M(Kt),Zt=Ktri+10?0<=Kt?kn.ab(ci):ci.ab(kn):ri>Qe+10?0<=Kt?Zt.ab(ze):ze.ab(Zt):0<=Kt?kn.ab(ze):ze.ab(kn)}else kn=0<=Kt?ci.ab(Zt):Zt.ab(ci);vn!==Ts&&(ze=rt.computeAngle(Vt,vn,kn),Vt.Kb=ze),ze=ci.x+(Zt.x-ci.x)*te-y.x,ci=ci.y+(Zt.y-ci.y)*te-y.y}Vt.measure(1/0,1/0,0,0),Zt=Vt.measuredBounds,Qe=Vt.naturalBounds;var _i=0;Vt instanceof mi&&(_i=Vt.strokeWidth),ri=Qe.width+_i;var So=Qe.height+_i;St.reset(),St.translate(-Zt.x,-Zt.y),St.scale(Vt.scale,Vt.scale),St.rotate(vn===Ts?Vt.angle:kn,ri/2,So/2),vn!==Jg&&vn!==qg||St.rotate(90,ri/2,So/2),vn!==Qg&&vn!==tp||St.rotate(-90,ri/2,So/2),vn===Jm&&(45kn||225kn)&&St.rotate(-kn,ri/2,So/2),Qe=new ke(0,0,ri,So),Mt.xi(Qe,ce),St.Ga(Mt),ce=-Mt.x+_i/2*Vt.scale,Vt=-Mt.y+_i/2*Vt.scale,zt.assign(Tn),_i=isNaN(Tn.x);var Or=isNaN(Tn.y);if(_i||Or){ri=ri/2+3,So=So/2+3;var zr=45<=kn&&135>=kn,ds=225<=kn&&315>=kn;vn===Ts&&(zr||ds)?(zt.x=Or?ri:Tn.y,zt.y=_i?So:Tn.x,zr?0<=Kt||isNaN(Kt)&&.5>te||!_i||(zt.y=-So):ds&&((0<=Kt||isNaN(Kt)&&.5>te)&&_i&&(zt.y=-So),Or&&(zt.x=-ri))):(_i&&(zt.x=0<=Kt||isNaN(Kt)&&.5>te?ri:-ri),Or&&(zt.y=-So),zt.rotate(kn))}else zt.rotate(kn);ze+=zt.x,ci+=zt.y,Qe.set(Zt),Qe.h(ze+ce,ci+Vt,Zt.width,Zt.height),yt.push(Qe),x.ed(Qe)}}if(tt!==null)for(b=tt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Mr(E,x.width||0,x.height||0),Ni.free(St),It.free(Mt),It.free(zt)}}}},Pm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Zi||a instanceof qe){var b=a,E=null;a instanceof Zi&&(E=a,b=E.adornedPart);var z=a instanceof Zi?null:b.path,tt=a.j;if(tt.length!==0){var ot=0;if(z!==null&&ot=x)St=It.alloc(),yt=ct,zt=St,yt.vg(),yt.computeMidPoint(zt),yt=ct.midAngle,at!==Ts&&(ct=ct.computeAngle(tt,at,yt),tt.angle=ct),ct=St.x,zt=St.y,It.free(St);else{if(Mt=0,0<=ot?(St=y.s[ot],zt=otVt+10?0<=ot?yt.ab(St):St.ab(yt):Vt>Bt+10?0<=ot?zt.ab(Mt):Mt.ab(zt):0<=ot?yt.ab(Mt):Mt.ab(yt)}else yt=0<=ot?St.ab(zt):zt.ab(St);at!==Ts&&(ct=ct.computeAngle(tt,at,yt),tt.angle=ct),ct=St.x+(zt.x-St.x)*rt,zt=St.y+(zt.y-St.y)*rt}if(mt.ys())tt.location=new It(ct,zt);else{mt.Mc()&&(mt=Vi),St=Ni.alloc(),St.reset(),St.scale(tt.scale,tt.scale),St.rotate(tt.angle,0,0);var Zt=tt.naturalBounds;Mt=ke.allocAt(0,0,Zt.width,Zt.height),Bt=It.alloc(),Bt.xi(Mt,mt),St.Ga(Bt),mt=-Bt.x,Vt=-Bt.y;var Kt=Zt.width,te=Zt.height;Zt=It.alloc(),Zt.assign(ut);var ce=isNaN(ut.x),vn=isNaN(ut.y);if(ce||vn){Kt=Kt/2+3,te=te/2+3;var Tn=45<=yt&&135>=yt,kn=225<=yt&&315>=yt;at===Ts&&(Tn||kn)?(Zt.x=vn?Kt:ut.y,Zt.y=ce?te:ut.x,Tn?0<=ot||isNaN(ot)&&.5>rt||!ce||(Zt.y=-te):kn&&((0<=ot||isNaN(ot)&&.5>rt)&&ce&&(Zt.y=-te),vn&&(Zt.x=-Kt))):(ce&&(Zt.x=0<=ot||isNaN(ot)&&.5>rt?Kt:-Kt),vn&&(Zt.y=-te),Zt.rotate(yt))}else Zt.rotate(yt);ct+=Zt.x,zt+=Zt.y,St.pp(Mt),mt+=Mt.x,Vt+=Mt.y,ot=It.allocAt(ct+mt,zt+Vt),tt.move(ot),It.free(ot),It.free(Zt),It.free(Bt),ke.free(Mt),Ni.free(St)}}E!==null?E.Ul(!1):b.Ul(!1),b=A1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),It.free(b)}};function i1(a,y,x,b){if(ga(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Zi&&a.type===$e.Link&&a.adornedObject instanceof mi&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof qe&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Zi&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),pr(b,!1)}}function jg(){this.xa="Base"}Me(jg,wr),jg.prototype.measure=function(a,y,x,b,E,z,tt){var ot=a.Pb();a.graduatedBounds=[];var rt=ot.margin,at=rt.right+rt.left,ut=rt.top+rt.bottom;ot.measure(y,x,z,tt);var ct=ot.measuredBounds,mt=new ke(-rt.left,-rt.top,Math.max(ct.width+at,0),Math.max(ct.height+ut,0));a.graduatedBounds.push(mt),E.assign(mt);for(var yt=ot.geometry,St=ot.strokeWidth,Mt=yt.flattenedSegments,zt=yt.flattenedLengths,Bt=yt.flattenedTotalLength,Vt=Mt.length,Zt=0,Kt=0,te=Te(),ce=0;ceri&&(ri+=360),Tn.push(ri)}Zt=ze,Kt=ci}te.push(Tn)}if(a.graduatedIntervals===null){for(var _i=[],So=a.O.s,Or=So.length,zr=0;zreh)){for(var ur=0;ureh&&Br.push(cs)}}}}}a.graduatedIntervals=_i}var nh=a.graduatedIntervals,ya=a.O.s,Ya=ya.length,sa=0,Zs=0,$h=Bt;a.graduatedMarks=[];for(var vl,Hf=0;HfLp*fs*Bt/a.graduatedRange&&aa.graduatedSkip===null)){var bc=zt[0][0],El=0,Ks=0;Zs=Bt*aa.graduatedStart-1e-4,$h=Bt*aa.graduatedEnd+1e-4;var Dd=Lp*fs,la=a.graduatedTickBase;if(laa.graduatedMin+Dd&&(la-=Math.floor((la-a.graduatedMin)/Dd)*Dd);for(var j0=nh[Hf],Mp=la,Gy=1e-6*a.graduatedMax,Ql=1;la<=a.graduatedMax+Gy;Ql++){t:{for(var Su=j0.length,Tc=0;Tc-Wf){var qh=!1;break t}}qh=!0}if(qh&&(la>a.graduatedMax&&(la=a.graduatedMax),aa.graduatedSkip===null||aa instanceof xo&&!aa.graduatedSkip(la,aa)||aa instanceof mi&&!aa.graduatedSkip(la,aa))&&(sa=(la-a.graduatedMin)*Bt/a.graduatedRange,sa>Bt&&(sa=Bt),Zs<=sa&&sa<=$h)){for(var ql=te[El][Ks],ih=zt[El][Ks];Elbc&&Ksxu&&.4995xu?0xu||.9995Nc){var Uf=1-Math.abs(.5-xu);ql=(yl*Uf+Al*(1-Uf))%360;break t}}}ql=yl}if(aa instanceof xo){var al="";aa.graduatedFunction!==null?(al=aa.graduatedFunction(la,aa),al=al!=null?al.toString():""):al=(+la.toFixed(2)).toString(),al!==""&&vl.push({$l:Vf,angle:ql,text:al})}else vl.push({$l:Vf,angle:ql})}la=Mp+Ql*Dd}}}a.graduatedMarks.push(vl)}Ze(te);var Xr=a.graduatedMarks;if(Xr!==null)for(var kp=b.length,Os=0;Osll;ll++){switch(ll){case 0:Xs.h(wu,Sl);break;case 1:Xs.h(wu+Zf,Sl);break;case 2:Xs.h(wu,Sl+zd);break;case 3:Xs.h(wu+Zf,Sl+zd)}Xs.rotate(nr+hr.angle),Xs.offset(W0,Yf),Kf===0&&ll===0?Oa.h(Xs.x,Xs.y,0,0):Oa.Ye(Xs),Xs.offset(-W0,-Yf),Xs.rotate(-nr-hr.angle)}It.free(Xs),Pu.graduatedBounds!==null&&Pu.graduatedBounds.push(Oa),eo(oh,Oa.x,Oa.y,Oa.width,Oa.height)}else if(hr instanceof xo){var Xa=a,V0=E;Xa.temporaryTextBlock===null&&(Xa.temporaryTextBlock=new xo);var ua=Xa.temporaryTextBlock;y1(ua,hr);var rh=hr.alignmentFocus;rh.Mc()&&(rh=Sa);for(var _a=hr.segmentOrientation,Xf=hr.segmentOffset,nd=new ke,bp=0,_f=0,Ol=0,jd=0,id=0,$f=Bs.length,sh=0;sh<$f;sh++){var tu=Bs[sh];bp=tu.$l.x,_f=tu.$l.y,Ol=tu.angle,id=jd=hr.angle,_a!==Ts&&(id=_a===$g||_a===$m?Ol+hr.angle:Ol,jd=qe.computeAngle(_a,id)),ua.Kb=jd,ua.text=tu.text||"",ua.measure(1/0,1/0,0,0);var ah=ua.measuredBounds,Cu=ua.naturalBounds,lh=Cu.width,Gd=Cu.height,xl=Ni.alloc();xl.reset(),xl.translate(-ah.x,-ah.y),xl.scale(ua.scale,ua.scale),xl.rotate(id,lh/2,Gd/2),_a!==Jg&&_a!==qg||xl.rotate(90,lh/2,Gd/2),_a!==Qg&&_a!==tp||xl.rotate(-90,lh/2,Gd/2),_a===Jm&&(45Ol||225Ol)&&xl.rotate(-Ol,lh/2,Gd/2);var Fc=ke.allocAt(0,0,lh,Gd),uh=It.alloc();uh.xi(Fc,rh),xl.Ga(uh);var Ac=-uh.x,Wy=-uh.y,Lu=It.alloc();Lu.assign(Xf),isNaN(Lu.x)&&(Lu.x=lh/2+3),isNaN(Lu.y)&&(Lu.y=-(Gd/2+3)),Lu.rotate(Ol),bp+=Lu.x+Ac,_f+=Lu.y+Wy;var Hd=new ke(bp,_f,ah.width,ah.height),Tp=new ke(ah.x,ah.y,ah.width,ah.height),Vy=new ke(Cu.x,Cu.y,Cu.width,Cu.height);tu.Sz=jd,tu.lineCount=ua.lineCount,tu.lines=[ua.Cb,ua.Ih,ua.df,ua.Le,ua.Qc,ua.Qb,ua.ze],tu.actualBounds=Hd,tu.measuredBounds=Tp,tu.naturalBounds=Vy,sh===0?nd.assign(Hd):nd.ed(Hd),It.free(Lu),It.free(uh),ke.free(Fc),Ni.free(xl)}Xa.graduatedBounds!==null&&Xa.graduatedBounds.push(nd),eo(V0,nd.x,nd.y,nd.width,nd.height)}pr(hr,!1)}}},jg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,tt=0,ot=z[tt];tt++,b!==null&&b.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height);for(var rt=y.length,at=0;at=tt&&(tt=1);for(var ot=z.actualBounds,rt=a.O.s,at=a.graduatedMarks,ut=rt.length,ct=0;cta.graduatedTickUnit*mt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&mt.graduatedSkip===null)){var Mt=mt.measuredBounds,zt=mt.strokeWidth*mt.scale,Bt=mt.alignmentFocus;Bt.Mc()&&(Bt=Sa);for(var Vt=0;Vttt.height)continue}else if(at.position>tt.width)continue;var ut=at.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=at.separatorStroke;if(ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ct!==null){tr(a,y,ct,!1,!1,tt,z),ct=!1;var mt=at.separatorDashArray;mt===null&&(mt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),mt!==null&&(ct=!0,y.js(mt,0)),y.beginPath(),mt=at.position+ut,x?mt>tt.height&&(ut-=mt-tt.height):mt>tt.width&&(ut-=mt-tt.width),at=at.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(at+=ut.top,mt=tt.width-ut.right,y.moveTo(ut.left,at),y.lineTo(mt,at)):(at+=ut.left,mt=tt.height-ut.bottom,y.moveTo(at,ut.top),y.lineTo(at,mt)),y.stroke(),y.Se(),ct&&y.fs()}}}}function wm(a,y,x,b,E){for(var z=b.length,tt=a.actualBounds,ot=a.naturalBounds,rt=r1(a,!0),at=r1(a,!1),ut=0;utmt)){var yt=ct.Wc(),St=ct.separatorStrokeWidth;isNaN(St)&&(St=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=ct.separatorStroke;Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Mt===null||ct.index===(x?rt:at))&&(St=0),yt-=St,St=ct.position+St,yt+=ct.actual,St+yt>mt&&(yt=mt-St),0>=yt||(mt=a.yb,tr(a,y,ct.background,!0,!1,ot,tt),x?y.fillRect(mt.left,St+mt.top,tt.width-(mt.left+mt.right),yt):y.fillRect(St+mt.left,mt.top,yt,tt.height-(mt.top+mt.bottom)))}}}}function r1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;bb&&E.set(St),It.free(St)),It.free(ut),z&&E.transform(tt),at},Ct.Gj=function(){for(var a=this.O.s,y=a.length,x=0;xx||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case Ye:this.v(!0),this.measure(x+ot,b+tt,0,0);break;case zn:this.v(!0),this.measure(x+ot,z+tt,0,0);break;case qn:this.v(!0),this.measure(y+ot,b+tt,0,0)}}this.na.arrange(this,E,this.jg)}},Ct.gh=function(a){var y=this.naturalBounds,x=mu(this);if(Ko(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=It.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Oi(E.set(a),z.transform),z.ca(E)))return It.free(E),!0}return It.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Ct.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;bmt.width||ct.y>mt.height||0>ct.x+ct.width||0>ct.y+ct.height||(ct=ut,ut=ut instanceof $e?ut:null,mt=Ni.alloc(),mt.set(tt),(ut!==null?ut.Cf(a,y,x,b,E,mt):Ar(ct,a,b,mt))&&(y!==null&&(ct=y(ct)),ct===null||x!==null&&!x(ct)||E.add(ct)),Ni.free(mt))}}return z===void 0&&Ni.free(tt),b}return z===void 0&&Ni.free(tt),!1};function mv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var tt=E[z];if(tt.visible){var ot=tt.actualBounds,rt=a.naturalBounds;ot.x>rt.width||ot.y>rt.height||0>ot.x+ot.width||0>ot.y+ot.height||(tt instanceof $e&&mv(tt,y,x,b),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||b.add(tt))}}}Ct.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var tt=this.naturalBounds,ot=this.se(),rt=ot?a:Oi(It.allocAt(a.x,a.y),this.transform),at=ot?y:Oi(It.allocAt(y.x,y.y),this.transform),ut=rt.Bf(at),ct=0zt.width||Mt.y>zt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height))&&(St.se()?(Mt=St.transform,Oi(rt.set(a),Mt),Oi(at.set(y),Mt)):(rt.set(a),at.set(y)),Mt=St,St=St instanceof $e?St:null,(St!==null?St.og(rt,at,x,b,E,z):Mt.tx(rt,at,E))&&(x!==null&&(Mt=x(Mt)),Mt===null||b!==null&&!b(Mt)||z.add(Mt)))}}It.free(rt),It.free(at)}return E?ct:tt}return!1};function vv(a){var y=null;return a instanceof mi&&(y=a.spot1,y===ao&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Tr),y}function yv(a){var y=null;return a instanceof mi&&(y=a.spot2,y===ao&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Qs),y}Ct.add=function(a){for(var y=[],x=0;x=E.count&&a>=E.count)return;E.mb(z),b=z}else $t("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),ga(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof $e&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Lm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof wn&&(x.Te=!0),x.Te&&x instanceof wn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Pr,"elements",this,y,null,b,null),x.cb(rr,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ct.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;Ea&&Mn(a,">= 0",$e,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new mr;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(rr,"rowdefs",this,null,x,null,a)}return y[a]},Ct.oA=function(a){if(0>a&&Mn(a,">= 0",$e,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Pr,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof mr?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ct.Eb=function(a){0>a&&Mn(a,">= 0",$e,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new mr;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(rr,"coldefs",this,null,x,null,a)}return y[a]},Ct.jA=function(a){if(0>a&&Mn(a,">= 0",$e,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Pr,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof mr?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ct.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Mm(y,a),this},Ct.Hy=function(a,y){return(a=this.Fb(a))&&Mm(a,new mr(y)),this},Ct.By=function(a,y){return(a=this.Eb(a))&&Mm(a,new mr(y)),this},Ct.nz=function(a){if(0>a||this.type!==$e.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;Ea||this.type!==$e.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;Ea;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=Gg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;bx)){var E=Pv(a,y);if(E=wv(a,E),E!==null){if(Ua(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new On),a.ge.add(y,E)),z=x+Gg(a),a.Gb(z,E),b&&(E.ub=y,xv(a,z,x),E.ub=null),E.data=y}}}function xv(a,y,x){for(a=a.O;ya&&Mn(a,">= 0",$e,"padding"),a=new Kn(a)):(0>a.left&&Mn(a.left,">= 0",$e,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",$e,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",$e,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",$e,"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:ms},set:function(a){typeof a=="number"&&(a=new Kn(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Na),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 so)&&(a instanceof so&&a.freeze(),this.T===null&&(this.T=new Na),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 Na),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;Ea)&&$t("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Na),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)&&$t("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Na),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 Wn&&!(this instanceof Zi);Ua(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof qe?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Wn&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new fc),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ay(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(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 On}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Wn||a.isPanelMain)&&$t("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(););Mi(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&&(Mi(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 fi&&(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&&Lm(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))}}}),Wt.Object.defineProperties($e,{Position:{get:function(){return el.I("Position")}},Horizontal:{get:function(){return el.I("Horizontal")}},Vertical:{get:function(){return el.I("Vertical")}},Spot:{get:function(){return el.I("Spot")}},Auto:{get:function(){return el.I("Auto")}},Table:{get:function(){return el.I("Table")}},Viewbox:{get:function(){return el.I("Viewbox")}},TableRow:{get:function(){return el.I("TableRow")}},TableColumn:{get:function(){return el.I("TableColumn")}},Link:{get:function(){return el.I("Link")}},Grid:{get:function(){return el.I("Grid")}},Graduated:{get:function(){return el.I("Graduated")}}}),$e.prototype.rebuildItemElements=$e.prototype.mv,$e.prototype.findItemPanelForData=$e.prototype.sx,$e.prototype.updateTargetBindings=$e.prototype.La,$e.prototype.copyTemplate=$e.prototype.Uy,$e.prototype.graduatedValueForPoint=$e.prototype.Gz,$e.prototype.graduatedPointForValue=$e.prototype.Fz,$e.prototype.findColumnForLocalX=$e.prototype.fz,$e.prototype.findRowForLocalY=$e.prototype.nz,$e.prototype.addColumnDefinition=$e.prototype.By,$e.prototype.addRowDefinition=$e.prototype.Hy,$e.prototype.addRowColumnDefinition=$e.prototype.Gy,$e.prototype.removeColumnDefinition=$e.prototype.jA,$e.prototype.getColumnDefinition=$e.prototype.Eb,$e.prototype.removeRowDefinition=$e.prototype.oA,$e.prototype.getRowDefinition=$e.prototype.Fb,$e.prototype.removeAt=$e.prototype.mb,$e.prototype.remove=$e.prototype.remove,$e.prototype.insertAt=$e.prototype.Gb,$e.prototype.elt=$e.prototype.M,$e.prototype.add=$e.prototype.add,$e.prototype.findObject=$e.prototype.fb,$e.prototype.findInVisualTree=$e.prototype.Nl,$e.prototype.walkVisualTreeFrom=$e.prototype.qm,$e.prototype.findMainElement=$e.prototype.Pb;var g1=!1,p1=null,el=new On;$e.className="Panel",$e.definePanelLayout=Tl,Tl("Position",new dm),Tl("Vertical",new fm),Tl("Auto",new pm),Tl("Link",new Pm);function vu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}vu.prototype.copy=function(){var a=new vu;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},vu.className="GradPanelSettings";function Na(){this.Pc=[],this.Oc=[],this.j=this.ob=bm,this.hb=this.Hb=0,this.Qp=ms,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Na.prototype.copy=function(a){for(var y=new Na,x=this.Pc,b=x.length,E=y.Pc,z=0;za&&Mn(a,">= 0",mr,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",mr,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Mn(a,">= 0",mr,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Mn(a,">= 0",mr,"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 Kn(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&&pc(a,"RowColumnDefinition.separatorStroke"),a instanceof so&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;EE)){var z=b.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var ot=x[0],rt=x[1],at,ut,ct,mt,yt,St,Mt=0,zt=Te(),Bt=2;Btct&&(ct=1),E=x=ct,at=tt/2,ut=at!==0,Bt=0,St=zt[Bt],ct=St[0],yt=St[1],mt=St[2],St=St[3];for(var Vt=0;.1<=Mt;){if(Vt===0&&(ut?(E=x,E-=at,Mt-=at,ut=!1):E=x,E===0&&(E=1)),E>Mt){Ze(zt);return}E>St?(Vt=E-St,E=St):Vt=0;var Zt=Math.sqrt(E*E/(1+mt*mt));if(0>ct&&(Zt=-Zt),ot+=Zt,rt+=mt*Zt,a.translate(ot,rt),a.rotate(yt),a.translate(-(tt/2),-(z/2)),Vt===0&&b.hh(a,y),a.translate(tt/2,z/2),a.rotate(-yt),a.translate(-ot,-rt),Mt-=E,St-=E,Vt!==0){if(Bt++,Bt===zt.length){Ze(zt);return}St=zt[Bt],ct=St[0],yt=St[1],mt=St[2],St=St[3],E=Vt}}Ze(zt)}}Ct.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;b!==null&&tr(this,a,b,!0,!1,tt,z);var ot=this.part,rt=this.ig;if(x===null||rt!==0||ot===null||!this.isPanelMain&&ot.Pb()!==this||(rt=ot.type===$e.Link&&ot instanceof Zi&&ot.category==="Selection"&&ot.adornedObject instanceof mi&&ot.adornedPart.Pb()===ot.adornedObject?ot.adornedObject.strokeWidth:0),rt===0&&(x=null),x!==null&&rt!==0&&(tr(this,a,x,!1,!1,tt,z),a.lineWidth=rt,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,ot&&y.Gf("drawShadows")&&(z=ot.isShadowed),a.Il===!1&&(z=!1),ot=!0,x===null||b!==null&&b!=="transparent"||(ot=!1),tt=!1,rt=this.strokeDashArray,rt!==null&&(tt=!0,a.js(rt,this.strokeDashOffset)),E.type===un.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===un.u){var at=E.startX;rt=E.startY;var ut=E.endX,ct=E.endY;E=Math.min(at,ut);var mt=Math.min(rt,ct);at=Math.abs(ut-at),rt=Math.abs(ct-rt),a.beginPath(),a.rect(E,mt,at,rt),b!==null&&a.ng(b),x!==null&&(ot&&z&&Wl(a),a.jk(),ot&&z&&fu(a)),a.Se()}else if(E.type===un.F)at=E.startX,rt=E.startY,ut=E.endX,ct=E.endY,E=Math.abs(ut-at)/2,mt=Math.abs(ct-rt)/2,at=Math.min(at,ut)+E,rt=Math.min(rt,ct)+mt,a.beginPath(),a.moveTo(at,rt-mt),a.bezierCurveTo(at+oe.wg*E,rt-mt,at+E,rt-oe.wg*mt,at+E,rt),a.bezierCurveTo(at+E,rt+oe.wg*mt,at+oe.wg*E,rt+mt,at,rt+mt),a.bezierCurveTo(at-oe.wg*E,rt+mt,at-E,rt+oe.wg*mt,at-E,rt),a.bezierCurveTo(at-E,rt-oe.wg*mt,at-oe.wg*E,rt-mt,at,rt-mt),a.closePath(),b!==null&&a.ng(b),x!==null&&(ot&&z&&Wl(a),a.jk(),ot&&z&&fu(a)),a.Se();else if(E.type===un.o)for(E=E.figures,rt=E.length,mt=0;mtMt.sweepAngle,yt!==null?yt.endX:at.startX,yt!==null?yt.endY:at.startY)}else if(yt=ta(Mt,at),zt=yt.length,zt===0)a.lineTo(Mt.centerX,Mt.centerY);else for(var Bt=0;Bt(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(ke.free(z),oe.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===un.u){y=x.startX;var tt=x.startY,ot=x.endX;if(x=x.endY,z.x=Math.min(y,ot),z.y=Math.min(tt,x),z.width=Math.abs(ot-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return ke.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),ke.free(z),a}if(x.type===un.F){tt=x.startX,E=x.startY,ot=x.endX;var rt=x.endY;if(x=Math.min(tt,ot),y=Math.min(E,rt),tt=Math.abs(ot-tt)/2,E=Math.abs(rt-E)/2,x=a.x-(x+tt),y=a.y-(y+E),this.fill===null){if(tt-=b,E-=b,0>=tt||0>=E||1>=x*x/(tt*tt)+y*y/(E*E))return ke.free(z),!1;tt+=b,E+=b}return this.stroke!==null&&(tt+=b,E+=b),ke.free(z),0>=tt||0>=E?!1:1>=x*x/(tt*tt)+y*y/(E*E)}if(x.type===un.o)return ke.free(z),this.fill===null?vh(x,a.x,a.y,E):ou(x,a,E,1=this.strokeWidth)ut=oe.Ve(at.startX,at.startY,at.endX,at.endY,z,tt,ot,rt,E);else{if(at.startX===at.endX?(b=ct,ut=0):(y=(at.endY-at.startY)/(at.endX-at.startX),ut=ct/Math.sqrt(1+y*y),b=ut*y),y=Te(),a=new It,oe.Ve(at.startX+b,at.startY+ut,at.endX+b,at.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new It,oe.Ve(at.startX-b,at.startY-ut,at.endX-b,at.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new It,oe.Ve(at.startX+b,at.startY+ut,at.startX-b,at.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new It,oe.Ve(at.endX+b,at.endY+ut,at.endX-b,at.endY-ut,z,tt,ot,rt,a)&&y.push(a),ot=y.length,ot===0)return Ze(y),!1;for(ut=!0,rt=1/0,b=0;bMath.abs(x)){if(rt=tt-ut-x*(z-b),0>a*a*x*x+at*at-rt*rt){E.x=NaN,E.y=NaN,ut=!1;break t}ct=Math.sqrt(a*a*x*x+at*at-rt*rt),ot=(-(a*a*x*rt)+a*at*ct)/(at*at+a*a*x*x)+b,a=(-(a*a*x*rt)-a*at*ct)/(at*at+a*a*x*x)+b,at=x*(ot-b)+rt+ut,rt=x*(a-b)+rt+ut,Math.abs((z-ot)*(z-ot))+Math.abs((tt-at)*(tt-at))ot){E.x=NaN,E.y=NaN,ut=!1;break t}rt=Math.sqrt(ot),ot=ut+rt,rt=ut-rt,Math.abs(ot-tt)Math.abs(St)?(Mt*=.5/St,St=.5):Mt!==0&&.5>Math.abs(Mt)&&(St*=.5/Mt,Mt=.5),Bt-=St,Vt-=Mt;yt.contains(Bt,Vt);)Bt-=St,Vt-=Mt;for(E.x=ot,E.y=rt,Mt=0;Mtx?a-x:x-a)<(y>b?y-b:b-y)?(a=ya||oe.$(rt.y,a))&&(rt.yy||oe.$(rt.x,y))&&(rt.x=a&&b<=y):(a=b&&x<=a)}Ct.tx=function(a,y,x){function b(zt,Bt){for(var Vt=zt.length,Zt=0;ZtE)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=E;if(1.5=E||Fo(y,z,0,-ct)>=E||Fo(y,z,0,ct)>=E||Fo(y,z,ut,0)>=E)}else if(y.type===un.o){if(at=y.bounds,z=at.x,ot=at.y,rt=at.x+at.width,at=at.y+at.height,a.x>rt&&a.xat&&a.yE&&po(a.x,a.y,z,ot,rt,ot)>E&&po(a.x,a.y,rt,at,z,at)>E&&po(a.x,a.y,rt,at,rt,ot)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?vh(y,a.x,a.y,z):ou(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;yE)return!1;for(ot=z.segments.s,rt=ot.length,at=0;atE)return!1;break;case $r:var mt=Te();if(oe.Qe(tt,ut,ct.point1X,ct.point1Y,ct.point2X,ct.point2Y,ct.endX,ct.endY,.8,mt),tt=b(mt,a),Ze(mt),tt||(tt=ct.endX,ut=ct.endY,a.zd(tt,ut)>E))return!1;break;case ha:if(mt=Te(),oe.ep(tt,ut,ct.point1X,ct.point1Y,ct.endX,ct.endY,.8,mt),tt=b(mt,a),Ze(mt),tt||(tt=ct.endX,ut=ct.endY,a.zd(tt,ut)>E))return!1;break;case dr:case Pa:mt=ct.type===dr?ta(ct,z):za(ct,z,tt,ut);var yt=mt.length;if(yt===0){if(tt=ct.type===dr?ct.centerX:ct.endX,ut=ct.type===dr?ct.centerY:ct.endY,a.zd(tt,ut)>E)return!1;break}ct=null;for(var St=Te(),Mt=0;Mt= 0",mi,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Mn(a,'"butt", "round", or "square"',mi,"strokeCap"):(Td(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Mn(a,'"miter", "bevel", or "round"',mi,"strokeJoin"):(Td(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){Td(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;Ea?a=0:1a?a=0:1(ct*ct+ut*ut)*mt*mt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ia&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ct=this.spacingBelow,this.flip){case Gi:a.translate(E,0),a.scale(-1,1);break;case ki:a.translate(0,z),a.scale(1,-1);break;case co:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,mt=(y+tt+ct)*ut,z>mt&&(b=this.verticalAlignment,b=b.y*z-b.y*mt+b.offsetY),ut===1&&this.ze!==null)ct=this.Cb,ct>E&&(ct=E),this.Oj(this.ze,a,0,b+y,E,tt,ct,x,ot,rt,at);else if(this.Qc!==null&&this.Qb!==null)for(mt=0;mtE&&(yt=E),b+=y,this.Oj(this.Qb[mt],a,0,b,E,tt,yt,x,ot,rt,at),b+=tt+ct}switch(this.flip){case Gi:a.scale(-1,1),a.translate(-E,0);break;case ki:a.scale(1,-1),a.translate(0,-z);break;case co:a.scale(-1,-1),a.translate(-E,-z)}}},Ct.Oj=function(a,y,x,b,E,z,tt,ot,rt,at,ut){var ct=0;if(ot)rt==="left"?ct=0:rt==="right"?ct=E-tt:rt==="center"&&(ct=(E-tt)/2),y.fillRect(x+ct,b+.25*z,tt,1);else{if(rt==="left"?ct=0:rt==="right"?ct=E:rt==="center"&&(ct=E/2),E=Em!==null?Em(this,z):.75*z,y.fillText(a,x+ct,b+E),a=z/20|0,a===0&&(a=1),rt==="right"?ct-=tt:rt==="center"&&(ct-=tt/2),at){ot=Fm!==null?Fm(this,z):.8*z,rt=x+ct,at=b+ot,E=x+ct+tt,ot=b+ot;var mt=a;y.beginPath(),y.lineWidth=mt,y.moveTo(rt,at),y.lineTo(E,ot),y.stroke(),y.Se(),y instanceof ia&&y.ad.classList.add("gojs-td")}ut&&(ut=b+z-z/2.2|0,a%2!==0&&(ut+=.5),b=x+ct,z=ut,x=x+ct+tt,tt=ut,ct=a,y.beginPath(),y.lineWidth=ct,y.moveTo(b,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof ia&&y.ad.classList.add("gojs-td"))}},Ct.kk=function(a,y,x){if(!ee.prototype.kk.call(this,a,y,x))return!1;if(tr(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=this.Qb.length))){for(this.l|=16777216,at=this.Qb[rt],y=Math.max(1,a-y);nl(at)>y&&1a.maxLines&&(a.l|=16777216))}function bv(a,y,x,b){var E=a.formatting===Ug;E&&(y=y.trim());var z=0,tt=a.Ae,ot=a.spacingAbove+a.spacingBelow;ot=Math.max(0,Vg(a)+ot);var rt=a.overflow===Am?S1(tt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ot);else if(tt=y,a.wrap===Tv){a.Le=1;var at=nl(y);if(rt===0||at<=x)a.Cb=Math.max(a.Cb,at),Wg(a,y,a.Cb),b!==null&&b.h(at,ot);else{for(z=xf(a,tt),tt=tt.substr(z.length),y=xf(a,tt),at=nl(z+y);0x&&1x;){var ct=1;for(at=nl(y.substr(0,ct)),ut=0;at<=x;)ct++,ut=at,at=nl(y.substr(0,ct));if(ct===1){var mt=at;z=Math.max(z,at)}else mt=ut,z=Math.max(z,ut);if(ct--,1>ct&&(ct=1),Wg(a,y.substr(0,ct),mt),rt++,y=y.substr(ct),a.Gc+rt>a.maxLines)break}for(ut=xf(a,tt),at=nl(y+ut);0a.maxLines))break}a.Le=Math.min(a.maxLines,rt),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,ot*a.Le)}}function xf(a,y){if(a.wrap===w1)return y.substr(0,1);for(var x=y.length,b=0,E=Sx;b=y.length?y:y.substr(0,b)}function nl(a){return zs===null?8*a.length:zs.measureText(a).width}function Vg(a){if(a.df!==null)return a.df;var y=a.Ae;if(zs===null){var x=16;return a.df=x}return Fv[y]!==void 0&&5e3>L1?x=Fv[y]:(x=1.3*zs.measureText("M").width,Fv[y]=x,L1++),a.df=x}function S1(a){if(zs===null)return 6;if(Om[a]!==void 0&&5e3>Av)var y=Om[a];else y=zs.measureText(Zg).width,Om[a]=y,Av++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,` `).replace(/\r/g,` `),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Vg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(` `,0);0<=E&&(x=x.substr(0,E))}E=0;for(var z=a.Gc=0,tt,ot=!1;!ot;){if(tt=x.indexOf(` `,z),tt===-1&&(tt=x.length,ot=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Tv){a.Le=0;var rt=pn.alloc();bv(a,z,y,rt),E+=rt.height,pn.free(rt),a.Gc+=a.Le}else bv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ot=!0)}z=tt+1}return a.Lq=E}Wt.Object.defineProperties(xo.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"||(Nl(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Ue},set:function(a){var y=this.flip;y!==a&&(Nl(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ys},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Nl(this),this.da.Yr=a,Ls(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=pn.alloc();bv(this,this.ec,999999,a);var y=a.width;pn.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Mr(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:Nv},set:function(a){var y=this.wrap;y!==a&&(Nl(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Ev},set:function(a){var y=this.overflow;y!==a&&(Nl(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&&pc(a,"TextBlock.stroke"),a instanceof so&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Vg(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&&(Nl(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&&(Nl(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 Zl),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:1a?a=0:1=a&&Mn(a,"> 0",xo,"maxLines"),Nl(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 Em=null,Fm=null,Tv=new Ce(xo,"None",0),P1=new Ce(xo,"WrapFit",1),Nv=new Ce(xo,"WrapDesiredSize",2),w1=new Ce(xo,"WrapBreakAll",3),Ev=new Ce(xo,"OverflowClip",0),Am=new Ce(xo,"OverflowEllipsis",1),Ug=new Ce(xo,"FormatTrim",0),C1=new Ce(xo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Fv=new $n,L1=0,Om=new $n,Av=0,Zg="...",M1="",zs=null,Bm=!1;xo.className="TextBlock";function Ov(){this.nc=!1,this.Hd=null,this.Xf=Ue,this.gq=Ug,this.Jq=1/0,this.$q=Ev,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ys,this.$r=Nv}Ov.prototype.copy=function(){var a=new Ov;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},xo.getEllipsis=function(){return Zg},xo.setEllipsis=function(a){Zg=a,Om=new $n,Av=0},xo.getBaseline=function(){return Em},xo.setBaseline=function(a){Em=a},xo.getUnderline=function(){return Fm},xo.setUnderline=function(a){Fm=a},xo.isValidFont=function(a){if(Bm||(zs=qo?new Va(null).context:null,Bm=!0),zs===null)return!0;var y=zs.font;if(a===y||a==="10px sans-serif")return!0;zs.font="10px sans-serif",zs.font=a;var x=zs.font;if(x!=="10px sans-serif")return zs.font=y,!0;zs.font="19px serif";var b=zs.font;return zs.font=a,x=zs.font,zs.font=y,x!==b},xo.FormatNone=C1,xo.FormatTrim=Ug,xo.None=Tv,xo.OverflowClip=Ev,xo.OverflowEllipsis=Am,xo.WrapBreakAll=w1,xo.WrapDesiredSize=Nv,xo.WrapFit=P1;function Zl(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Zl.prototype.copy=function(){var a=new Zl;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Zl.className="GradElementSettings";function js(a,y){ee.call(this),this.Eg=null,this.qo="",this.Xg=ho,this.Nk=Ye,this.Zg=this.Hd=null,this.Mk=Vi,this.Xf=Ue,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 Pf;Me(js,ee),js.prototype.cloneProtected=function(a){ee.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},js.prototype.qb=function(a){a===Ue||a===Fn||a===Bi?this.imageStretch=a:ee.prototype.qb.call(this,a)},js.prototype.toString=function(){return"Picture("+this.source+")#"+Xi(this)};function wf(a){a===void 0&&(a=""),a!==""?Pf[a]&&(delete Pf[a],Dm--):(Pf=new $n,Dm=0)}function k1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null)for(var ot=tt.length,rt=0;rt=b.width&&(z=z+St.offsetX+(ct*St.x-b.width*St.x)),mt>=b.height&&(tt=tt+St.offsetY+(mt*St.y-b.height*St.y)),rt=Math.min(b.width,ct),ot=Math.min(b.height,mt);break;case Ye:ct=b.width,mt=b.height;break;case Fn:case Bi:yt===Fn?(yt=Math.min(b.height/mt,b.width/ct),ct*=yt,mt*=yt):yt===Bi&&(yt=Math.max(b.height/mt,b.width/ct),ct*=yt,mt*=yt,ct>=b.width&&(z=(z+St.offsetX+(ct*St.x-b.width*St.x)/ct)*rt),mt>=b.height&&(tt=(tt+St.offsetY+(mt*St.y-b.height*St.y)/mt)*ot),rt*=1/(ct/b.width),ot*=1/(mt/b.height),ct=b.width,mt=b.height)}yt=this.Df()*y.scale;var Mt=ct*yt*mt*yt,zt=rt*ot/Mt,Bt=x.__goCache;yt=null;var Vt=xx;if(!E){if(x.sq&&Bt!==void 0&&4Vt*Vt)for(Bt.gi===null&&(T1(Bt,4,at,ut,x),T1(Bt,16,at,ut,x)),E=Bt.gi,at=E.length,ut=0;uta)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=oe.Mf[b];if(E!==void 0)return E;var z=a*oe.wg;return E=new un().add(new Er(a,0,!0).add(new Ki(To,y-a,0)).add(new Ki($r,y,a,y-z,0,y,z)).add(new Ki(To,y,x-a)).add(new Ki($r,y-a,x,y,x-z,y-z,x)).add(new Ki(To,a,x)).add(new Ki($r,0,x-a,z,x,0,x-z)).add(new Ki(To,0,a)).add(new Ki($r,a,0,0,z,z,0).close())),1E.x&&a.y>E.y&&a.rightE.x&&y.y>E.y&&y.right=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Gs(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&&(Gs(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&&(Gs(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 qe?(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&&(Gs(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&&(Gs(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&&(Gs(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:Sr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Gs(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&&(Gs(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&&(Gs(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:ao},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Gs(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&&$t("Cannot make a Group a member of itself: "+this.toString()),$t("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Zv(y,this):this instanceof fi&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Uv(a,this):this instanceof fi&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var z=E.wa(a!==null?a.data:null);E.mp(b,z)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof fi){for(x=new Ge,jh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof wn)for(b=b.linksConnected;b.next();)Mf(b.value)}if(this instanceof wn){for(x=this.linksConnected;x.next();)Mf(x.value);x=this.labeledLink,x!==null&&Mf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Jc(y,-1,a))}}else $t("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&&(Gs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof wn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Gs(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&&(Gs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:mo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Gs(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&&(Gs(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&&(Gs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Wn.prototype.invalidateLayout=Wn.prototype.C,Wn.prototype.findCommonContainingGroup=Wn.prototype.px,Wn.prototype.isMemberOf=Wn.prototype.Td,Wn.prototype.findTopLevelPart=Wn.prototype.sz,Wn.prototype.findSubGraphLevel=Wn.prototype.oz,Wn.prototype.ensureBounds=Wn.prototype.Va,Wn.prototype.getDocumentBounds=Wn.prototype.mi,Wn.prototype.findObject=Wn.prototype.fb,Wn.prototype.moveTo=Wn.prototype.moveTo,Wn.prototype.invalidateAdornments=Wn.prototype.Wb,Wn.prototype.clearAdornments=Wn.prototype.Ej,Wn.prototype.removeAdornment=Wn.prototype.Jf,Wn.prototype.addAdornment=Wn.prototype.bh,Wn.prototype.findAdornment=Wn.prototype.Pj,Wn.prototype.updateTargetBindings=Wn.prototype.La;var G1=!1;Wn.className="Part",Wn.LayoutNone=0,Wn.LayoutAdded=1,Wn.LayoutRemoved=2,Wn.LayoutShown=4,Wn.LayoutHidden=8,Wn.LayoutNodeSized=16,Wn.LayoutGroupLayout=32,Wn.LayoutNodeReplaced=64,Wn.LayoutStandard=127,Wn.LayoutAll=16777215;function Zi(a,y){a===void 0||a instanceof wr||typeof a=="string"?Wn.call(this,a):(Wn.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)}Me(Zi,Wn),Zi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Zi.prototype.updateRelationshipsFromData=function(){},Zi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof qe&&y instanceof mi){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;ba&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ge;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Wu),y.Ue=!1}};function X1(a,y,x,b,E,z,tt){if(1a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ge;x.add(this),$1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Wu),y.Ue=!1}};function $1(a,y,x,b,E,z,tt){for(var ot=z===a?!1:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),at={};rt.next();){var ut=rt.value;if(ut.isTreeLink&&(ot||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!ot){ut.Zb(!0),ut.oh();var ct=x?ut.Oo():ut.Po();at.vv=a,ct.all(function(mt){return function(yt){return yt===mt.vv||!yt.isTreeExpanded}}(at))&&E.Cj(ut,z)}(2E&&(E=ot.right),ot.bottom>z&&(z=ot.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Wt.Object.defineProperties(bs.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Kn(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),bs.className="Placeholder";function qe(a){Wn.call(this,$e.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ts,this.Om=0,this.Qm=Ts,this.Rm=NaN,this.qj=$v,this.po=.5,this.wd=null,this.Nb=new Ie().freeze(),this.Tg=this.Mg=null,this.ml=new ke,this.ua=new un,this.u=this.o=this.Sf=this.Wf=null,this.su=new It,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Me(qe,Wn),qe.prototype.cloneProtected=function(a){Wn.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())},Ct=qe.prototype,Ct.Af=function(a){Wn.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&&oa(y),a=a.toPort,a!==null&&oa(a)},Ct.qb=function(a){a.classType===qe?(a.value&2)===2?this.routing=a:a===ma||a===$u||a===bf?this.curve=a:a===_g||a===Xm||a===_m?this.adjusting=a:a!==$v&&a!==Ts&&$t("Unknown Link enum value for a Link property: "+a):Wn.prototype.qb.call(this,a)},Ct.Xc=function(){this.ba===null&&(this.ba=new Dg)},Ct.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ms(a)||Rh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ms(a)||Rh(a)))},Ct.zv=function(){return!1},Ct.Av=function(){},Ct.Zc=function(){return!1},qe.prototype.computeAngle=function(a,y,x){return qe.computeAngle(y,x)},qe.computeAngle=function(a,y){switch(a){default:case Ts:a=0;break;case $g:a=y;break;case Jg:a=y+90;break;case Qg:a=y-90;break;case Jv:a=y+180;break;case $m:a=oe.bp(y),90a&&(a-=180);break;case qg:a=oe.bp(y+90),90a&&(a-=180);break;case tp:a=oe.bp(y-90),90a&&(a-=180);break;case Jm:if(a=oe.bp(y),45a||225a)return 0;90a&&(a-=180)}return oe.bp(a)};function Mf(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Zv(x,a),a.Ah=y,y!==null&&Uv(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(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=b}Ct=qe.prototype,Ct.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Wn.prototype.oh.call(this)},Ct.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ct.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function q1(a,y){a.wd===null&&(a.wd=new Ge),a.wd.add(y),a.v()}Ct.Vo=function(a){if(Wn.prototype.Vo.call(this,a),Fd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}Yg(this)}},Ct.Wo=function(a){if(Wn.prototype.Wo.call(this,a),Fd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Hm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Hm(x,this,b)}Xg(this)}},Ct.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))},qe.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},qe.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Wn.prototype.move.call(this,a,!1):(a=It.allocAt(x.x+b,x.y+E),Wn.prototype.move.call(this,a,!1),It.free(a)),_u(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},qe.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},qe.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},qe.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Wo),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ma))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()===ma){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return oe.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),oe.ax(b.x,b.y,E.x,E.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,E=z=b=0;bx/2));)b+=E,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-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},qe.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()===ma))return this.ua.wx(.5);if(this.computeCurve()===ma&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),oe.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0b/2));)E+=z,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},Ct=qe.prototype,Ct.i=function(a){return this.Nb.s[a]},Ct.dd=function(a,y){this.Nb.cd(a,y)},Ct.L=function(a,y,x){this.Nb.cd(a,new It(y,x))},Ct.Kz=function(a,y){this.Nb.Gb(a,y)},Ct.m=function(a,y,x){this.Nb.Gb(a,new It(y,x))},Ct.ne=function(a){this.Nb.add(a)},Ct.yf=function(a,y){this.Nb.add(new It(a,y))},Ct.pv=function(a){this.Nb.mb(a)},Ct.Fj=function(){this.Nb.clear()};function _u(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new Ie,z=a.Nb.iterator;z.next();){var tt=z.value;E.add(new It(tt.x+y,tt.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,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),Ls(a)),b?Vm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&$c(tt.animationManager,a,E),a.g("points",z,E)}}Ct.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ct.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,tt=0;ttat&&(ct=-ct),Mt=(0>rt?-1:1)*ct+yt,zt=ut*(Mt-yt)+St),yt=z.x+2*ot/3,St=z.y+2*rt/3;var Bt=yt,Vt=St;oe.B(rt,0)?Vt=0rt?-1:1)*ct+yt,Vt=ut*(Bt-yt)+St),this.Fj(),this.ne(z),this.yf(Mt,zt),this.yf(Bt,Vt),this.ne(mt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,mt=E,b=this.getLinkPoint(a,y,tt,!0,!1,z,mt),E=this.getLinkPoint(z,mt,x,!1,!1,a,y),this.hasCurviness()?(mt=E.x-b.x,x=E.y-b.y,tt=this.computeCurviness(),a=b.x+mt/2,y=b.y+x/2,z=a,ot=y,oe.B(x,0)?ot=0tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=mt*(z-a)+y),this.ne(b),this.yf(z,ot),this.ne(E)):(this.ne(b),this.ne(E),ot=ke.alloc(),y.mi(ot),rt=ot.ca(E),mt.mi(ot),at=ot.ca(b),(rt||at)&&(tt=y.ga(Zm(tt),new It),this.dd(0,this.getLinkPointFromPoint(a,y,tt,E,!0,tt)),x=mt.ga(Zm(x),new It),this.dd(1,this.getLinkPointFromPoint(z,mt,x,b,!1,x))),ke.free(ot))}else{ct=this.isAvoiding,mt&&(ut&&ct||at)&&this.Fj();var Zt=at?this.computeCurviness():0;ct=this.getLinkPoint(a,y,tt,!0,ut,b,E),yt=Mt=St=0,(ut||!ot||at)&&(zt=this.computeEndSegmentLength(a,y,tt,!0),yt=this.getLinkDirection(a,y,ct,tt,!0,ut,b,E),at&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(yt-=ut?90:30,0>Zt&&(yt-=180)),0>yt?yt+=360:360<=yt&&(yt-=360),at&&(zt+=Math.abs(Zt)*(ut?1:2)),yt===0?St=zt:yt===90?Mt=zt:yt===180?St=-zt:yt===270?Mt=-zt:(St=zt*Math.cos(yt*Math.PI/180),Mt=zt*Math.sin(yt*Math.PI/180)),tt.Mc()&&at&&(zt=y.ga(Vi,It.alloc()),Bt=It.allocAt(zt.x+1e3*St,zt.y+1e3*Mt),this.getLinkPointFromPoint(a,y,zt,Bt,!0,ct),It.free(zt),It.free(Bt))),zt=this.getLinkPoint(b,E,x,!1,ut,a,y);var Kt=Vt=Bt=0;if(ut||!rt||at){var te=this.computeEndSegmentLength(b,E,x,!1);Kt=this.getLinkDirection(b,E,zt,x,!1,ut,a,y),at&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Kt+=ut?0:30,0>Zt&&(Kt+=180)),0>Kt?Kt+=360:360<=Kt&&(Kt-=360),at&&(te+=Math.abs(Zt)*(ut?1:2)),Kt===0?Bt=te:Kt===90?Vt=te:Kt===180?Bt=-te:Kt===270?Vt=-te:(Bt=te*Math.cos(Kt*Math.PI/180),Vt=te*Math.sin(Kt*Math.PI/180)),x.Mc()&&at&&(x=E.ga(Vi,It.alloc()),tt=It.allocAt(x.x+1e3*Bt,x.y+1e3*Vt),this.getLinkPointFromPoint(b,E,x,tt,!1,zt),It.free(x),It.free(tt))}x=ct,(ut||!ot||at)&&(x=new It(ct.x+St,ct.y+Mt)),tt=zt,(ut||!rt||at)&&(tt=new It(zt.x+Bt,zt.y+Vt)),!mt&&!ut&&ot&&3Math.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}qe.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new It),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var tt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*E;var ot=-a.m12*E,rt=-a.m21*E,at=a.m11*E,ut=E*(a.m21*a.dy-a.m22*a.dx),ct=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*tt+b.y*rt+ut,b=b.x*ot+b.y*at+ct,tt=x.x*tt+x.y*rt+ut,x=x.x*ot+x.y*at+ct}return y.Sj(E,b,tt,x,z),a!==null&&z.transform(a),z};function Um(a,y){var x=y.Zn;return x===null&&(x=new xc,x.port=y,x.node=y.part,y.Zn=x),aS(x,a)}qe.prototype.getLinkPoint=function(a,y,x,b,E,z,tt,ot){if(ot===void 0&&(ot=new It),x.sb()&&!kf(x))return y.ga(x,ot),ot;if(x.$c()){var rt=Um(this,y);if(rt!==null){if(ot.assign(rt.Zo),E&&this.routing===eS){var at=Um(this,tt);if(at!==null&&rt.Gl=ut.y&&a.y<=ut.y+ut.height?ot.y=a.y:(x.Hf(Bl)||x.Hf(xa))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(ot.x=a.x),It.free(rt),It.free(at)}}return ot}}return x=y.ga(Zm(x),It.alloc()),this.pointsCount>(E?6:2)?(tt=b?this.i(1):this.i(this.pointsCount-2),E&&(tt=Kv(x,tt.copy()))):(rt=this.computeSpot(!b,tt),z=It.alloc(),tt=tt.ga(Zm(rt),z),E&&(tt=Kv(x,tt)),It.free(z)),this.getLinkPointFromPoint(a,y,x,tt,b,ot),It.free(x),ot},qe.prototype.getLinkDirection=function(a,y,x,b,E,z,tt,ot){t:if(b.sb())var rt=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5(z?6:2)?(ot=E?this.i(1):this.i(this.pointsCount-2),ot=z?Kv(rt,ot.copy()):x):(x=It.alloc(),ot=ot.ga(Vi,x),It.free(x)),x=Math.abs(ot.x-rt.x)>Math.abs(ot.y-rt.y)?ot.x>=rt.x?0:180:ot.y>=rt.y?90:270,It.free(rt),rt=x}return b.Mc()&&tt.Td(a)&&(rt+=180,360<=rt&&(rt-=360)),kf(b)||(a=y.li(),a===0)||(45<=a&&135>a?rt+=90:135<=a&&225>a?rt+=180:225<=a&&315>a&&(rt+=270),360<=rt&&(rt-=360)),rt},qe.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Um(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},qe.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Vi:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ao?ir:y)):(a=y||this.toPort,a===null?a=Vi:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ao?ir:y)),a};function kf(a){return a===ir||a.x===.5&&a.y===.5}function Zm(a){return a.x===.5&&a.y===.5?a:Vi}qe.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ts&&4mt.width||ct.y>mt.height||0>ct.x+ct.width||0>ct.y+ct.height)){if(ct=Ni.alloc(),ct.set(tt),ut instanceof $e)ot=ut.Cf(a,y,x,b,E,ct);else if(this.path===ut){if(ut instanceof mi)if(ot=a,mt=b,ut.pickable===!1)ot=!1;else if(ct.multiply(ut.transform),mt)t:{var yt=ot,St=ct;if(ut.fh(yt,St))ot=!0;else{if(St===void 0&&(St=ut.transform,yt.Re(ut.actualBounds))){ot=!0;break t}ot=yt.left,mt=yt.right;var Mt=yt.top;yt=yt.bottom;var zt=It.alloc(),Bt=It.alloc(),Vt=It.alloc(),Zt=Ni.alloc();Zt.set(St),Zt.bv(ut.transform),Zt.Vj(),Bt.x=mt,Bt.y=Mt,Bt.transform(Zt),zt.x=ot,zt.y=Mt,zt.transform(Zt),St=!1,Nd(ut,zt,Bt,Vt)?St=!0:(zt.x=mt,zt.y=yt,zt.transform(Zt),Nd(ut,zt,Bt,Vt)?St=!0:(Bt.x=ot,Bt.y=yt,Bt.transform(Zt),Nd(ut,zt,Bt,Vt)?St=!0:(zt.x=ot,zt.y=Mt,zt.transform(Zt),Nd(ut,zt,Bt,Vt)&&(St=!0)))),Ni.free(Zt),It.free(zt),It.free(Bt),It.free(Vt),ot=St}}else ot=ut.fh(ot,ct)}else ot=Ar(ut,a,b,ct);ot&&(mt=ut,y!==null&&(mt=y(ut)),mt&&(x===null||x(mt))&&E.add(mt)),Ni.free(ct)}}}return z===void 0&&Ni.free(tt),ot||this.background!==null||this.areaBackground!==null}return z===void 0&&Ni.free(tt),!1},qe.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?ma:this.curve},qe.prototype.computeCorner=function(){if(this.curve===ma)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},qe.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;brt?-Math.PI/2:Math.PI/2;else ut=Math.atan(rt/Math.abs(ot)),0>ot&&(ut=Math.PI-ut);tt=y.x;var ct=y.y;ot=b.x-tt;var mt=b.y-ct;for(rt=Math.sqrt(ot*ot+mt*mt),oe.$(ot,0)?mt=0>mt?-Math.PI/2:Math.PI/2:(mt=Math.atan(mt/Math.abs(ot)),0>ot&&(mt=Math.PI-mt)),at=rt/at,ut=mt-ut,this.dd(a,y),a+=1;art?-Math.PI/2:Math.PI/2:(rt=Math.atan(rt/Math.abs(ot)),0>ot&&(rt=Math.PI-rt)),ot=rt+ut,y*=at,this.L(a,tt+y*Math.cos(ot),ct+y*Math.sin(ot)));this.dd(x,b)}}return!0;case _m:if(z=this.i(a),ct=this.i(x),!z.Xa(y)||!ct.Xa(b)){E=z.x,z=z.y,tt=ct.x,ct=ct.y,at=(tt-E)*(tt-E)+(ct-z)*(ct-z),ot=y.x,ut=y.y,rt=b.x,mt=b.y;var yt=1;if(rt-ot!==0){var St=(mt-ut)/(rt-ot);yt=Math.sqrt(1+1/(St*St))}else St=9e9;for(this.dd(a,y),a+=1;ay?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var tt=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ot=E.actualBounds.copy(),rt=z.actualBounds.copy();if(ot.w()&&rt.w()){ot.Bc(ep,ep),rt.Bc(ep,ep),ot.Ye(a),rt.Ye(x);var at=It.alloc(),ut=It.alloc();y===0?x.x>a.x||b===270&&x.ya.x||b===90&&x.y>a.y&&rt.right>a.x?(at.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===180?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=at.x,ut.y=x.y):b===270&&x.ya.y?(at.x=a.xrt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.right,ut.x=at.x,ut.y=x.y):b===0&&a.xrt.top&&a.yot.bottom)&&(b===180&&(rt.ca(a)||ot.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(b===180||b===270)&&(at.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=at.y),at.y>ot.top&&at.y=ot.left&&x.x<=a.x||a.x<=rt.right&&a.x>=x.x?(b===90||b===270)&&(at.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(at.x,x.y)):(at.y=b===270||(b===0||b===180)&&x.ya.y&&rt.lefta.y?(at.x=a.x>rt.right?this.computeMidOrthoPosition(a.x,a.y,rt.right,x.y,!1):a.x>rt.left&&(b===270&&a.yrt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.left,ut.x=at.x,ut.y=x.y):b===180&&a.x>rt.right&&a.y>rt.top&&a.yot.bottom)&&(b===0&&(rt.ca(a)||ot.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(b===0||b===270)&&(at.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=at.y),at.y>ot.top&&at.y=a.x||a.x>=rt.left&&a.x<=x.x?(b===90||b===270)&&(at.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(at.x,x.y)):(at.y=b===270||(b===0||b===180)&&x.ya.y||b===180&&x.xa.y||b===0&&x.x>a.x&&rt.bottom>a.y?(at.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===270?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=at.y):b===180&&x.xa.x?(at.y=a.yrt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.bottom,ut.x=x.x,ut.y=at.y):b===90&&a.yrt.left&&a.xot.right)&&(b===270&&(rt.ca(a)||ot.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(b===270||b===180)&&(at.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=at.x,ut.y=x.y),at.x>ot.left&&at.x=ot.top&&x.y<=a.y||a.y<=rt.bottom&&a.y>=x.y?(b===0||b===180)&&(at.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,at.y)):(at.x=b===180||(b===90||b===270)&&x.xa.x&&rt.top=a.x?(at.y=a.y>rt.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.bottom,!0):a.y>rt.top&&(b===180&&a.xrt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.top,ut.x=x.x,ut.y=at.y):b===270&&a.y>rt.bottom&&a.x>rt.left&&a.xot.right)&&(b===90&&(rt.ca(a)||ot.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(b===90||b===180)&&(at.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=at.x,ut.y=x.y),at.x>ot.left&&at.x=a.y||a.y>=rt.top&&a.y<=x.y?(b===0||b===180)&&(at.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,at.y)):(at.x=b===180||(b===90||b===270)&&x.x=Nf&&(oS(yt),ot.Bc(yt.Ho*yt.Hx,yt.Go*yt.Ix),rS(yt,a,y,ct,b,ot,!1),rt=Kl(yt,ct.x,ct.y)),!yt.abort&&rtthis.pointsCount?(y===0||y===180?(ot.x=a.x,ot.y=ct.y):(ot.x=ct.x,ot.y=a.y),this.L(2,ot.x,ot.y),this.m(3,ot.x,ot.y)):(tt=this.i(3),y===0||y===180?oe.B(ot.x,tt.x)?(ot=y===0?Math.max(ot.x,a.x):Math.min(ot.x,a.x),this.L(2,ot,a.y),this.L(3,ot,tt.y)):oe.B(ot.y,tt.y)?(Math.abs(a.y-ot.y)<=yt.Go/2&&(this.L(2,ot.x,a.y),this.L(3,tt.x,a.y)),this.m(2,ot.x,a.y)):this.L(2,a.x,ot.y):(y===90||y===270)&&(oe.B(ot.y,tt.y)?(ot=y===90?Math.max(ot.y,a.y):Math.min(ot.y,a.y),this.L(2,a.x,ot),this.L(3,tt.x,ot)):oe.B(ot.x,tt.x)?(Math.abs(a.x-ot.x)<=yt.Ho/2&&(this.L(2,a.x,ot.y),this.L(3,a.x,tt.y)),this.m(2,a.x,ot.y)):this.L(2,ot.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,E.x,x.y):this.m(2,x.x,E.y)),St!==null&&(b===0||b===180?this.yf(z.x,St.y):this.yf(St.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(at.copy()),this.ne(ut.copy())),It.free(at),It.free(ut)}},qe.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function Yv(a){if(a.diagram===null||!a.isAvoiding||!sf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=af(a.diagram,!0,a.containingGroup,null);for(var b=1;bAd&&Kl(y,ut,ct)!==at-1&&(Kl(y,x-ot,b)===at-1?(E=180,ut=x-ot,ct=b):Kl(y,x+ot,b)===at-1?(E=0,ut=x+ot,ct=b):Kl(y,x,b-rt)===at-1?(E=270,ut=x,ct=b-rt):Kl(y,x,b+rt)===at-1&&(E=90,ut=x,ct=b+rt));at>Ad&&Kl(y,ut,ct)===at-1;)x=ut,b=ct,E===0?ut+=ot:E===90?ct+=rt:E===180?ut-=ot:ct-=rt,--at;z?at>Ad&&(E===180||E===0?x=Math.floor(x/ot)*ot+ot/2:(E===90||E===270)&&(b=Math.floor(b/rt)*rt+rt/2)):(x=Math.floor(x/ot)*ot+ot/2,b=Math.floor(b/rt)*rt+rt/2),at>Ad&&(z=E,tt=x,ut=b,E===0?(z=90,ut+=rt):E===90?(z=180,tt-=ot):E===180?(z=270,ut-=rt):E===270&&(z=0,tt+=ot),Kl(y,tt,ut)===at-1?Xv(a,y,tt,ut,z,!1,z):(tt=x,ut=b,E===0?(z=270,ut-=rt):E===90?(z=0,tt+=ot):E===180?(z=90,ut+=rt):E===270&&(z=180,tt-=ot),Kl(y,tt,ut)===at-1&&Xv(a,y,tt,ut,z,!1,z))),a.yf(x,b)}qe.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=po(y,a,x.x,x.y,b.x,b.y),z=0,tt=1;ttthis.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b=y&&(b=y-1),rt=this.i(b),z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);b=z.x,rt=z.y}else{for(rt=0;rtzt?St>yt?(z.x=Bt-Zt,z.y=yt-Zt,E.x=Bt+Mt,E.y=yt+Mt):(z.x=Bt-Zt,z.y=yt+Zt,E.x=Bt+Mt,E.y=yt-Mt):St>yt?(z.x=Bt+Zt,z.y=yt-Zt,E.x=Bt-Mt,E.y=yt+Mt):(z.x=Bt+Zt,z.y=yt+Zt,E.x=Bt-Mt,E.y=yt-Mt)),oe.$(zt,Bt)&&oe.$(yt,St)&&(yt>mt?(Vt>Bt?(z.x=Bt-Zt,z.y=yt-Zt,E.x=Bt+Mt):(z.x=Bt+Zt,z.y=yt-Zt,E.x=Bt-Mt),E.y=yt+Mt):(Vt>Bt?(z.x=Bt-Zt,z.y=yt+Zt,E.x=Bt+Mt):(z.x=Bt+Zt,z.y=yt+Zt,E.x=Bt-Mt),E.y=yt-Mt)),(oe.$(zt,Bt)&&oe.$(Bt,Vt)||oe.$(mt,yt)&&oe.$(yt,St))&&(zt=.5*(zt+Vt),mt=.5*(mt+St),z.x=zt,z.y=mt,E.x=zt,E.y=mt),(ct===1||ct===2&&oe.$(tt.x,this.i(0).x)&&oe.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+at.x),x.y=.5*(tt.y+at.y)),Ku(ot,x.x-b,x.y-rt,z.x-b,z.y-rt,at.x-b,at.y-rt),y.set(z),x.set(E),tt=at}}at=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=mc(this,ut.copy(),!1,Wi)),at=.5*(at+ut.x),tt=.5*(tt+ut.y),Ku(ot,E.x-b,E.y-rt,at-b,tt-rt,ut.x-b,ut.y-rt),It.free(y),It.free(x),It.free(z),It.free(E)}else for(x=3;x=y&&(x=y-1),E=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=mc(this,tt.copy(),!1,Wi)),Ku(ot,z.x-b,z.y-rt,E.x-b,E.y-rt,tt.x-b,tt.y-rt);else{for(z=It.alloc(),z.assign(this.i(0)),E=It.alloc(),E.assign(z),tt=this.computeCorner(),ct=1,at=0;ct=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=mc(this,ut.copy(),!1,Wi)),vc(this,ot,-b,-rt,z,ut,x);else if(at===0)for(ct=1;ctz.x?Kt=mt.x-St:Kt=mt.x+St,Bt.y>mt.y?Vt=mt.y+Zt:Vt=mt.y-Zt,Bt=It.allocAt(Kt,te),vc(this,ot,ct,zt,z,Bt,Mt),It.free(Bt),Im(ot,mt.x+ct,mt.y+zt,yt+ct,Vt+zt),z.h(yt,Vt)}else oe.B(z.x,mt.x)&&oe.B(mt.y,Bt.y)?(St=Math.min(tt,Math.abs(mt.y-E.y)/2),St=Zt=Math.min(St,Math.abs(Bt.x-mt.x)/2),oe.B(Zt,0)?(vc(this,ot,ct,zt,z,mt,Mt),z.assign(mt)):(Kt=mt.x,te=mt.y,yt=Kt,Vt=te,mt.y>z.y?te=mt.y-St:te=mt.y+St,Bt.x>mt.x?yt=mt.x+Zt:yt=mt.x-Zt,Bt=It.allocAt(Kt,te),vc(this,ot,ct,zt,z,Bt,Mt),It.free(Bt),Im(ot,mt.x+ct,mt.y+zt,yt+ct,Vt+zt),z.h(yt,Vt))):(vc(this,ot,ct,zt,z,mt,Mt),z.assign(mt));E.assign(ut),ct=at}It.free(z)}Rm=ot}else ot=this.i(1).copy(),ot.x-=b,ot.y-=rt,this.computeShortLength(!0)!==0&&(E=mc(this,E,!0,z)),this.computeShortLength(!1)!==0&&(ot=mc(this,ot,!1,z)),a.type=un.j,a.startX=E.x,a.startY=E.y,a.endX=ot.x,a.endY=ot.y;return this.lk=!0,a};function Km(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),oe.$(a,0)?y:oe.$(y,0)?a:Math.sqrt(a*a+y*y)))}function mc(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=Km(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=Km(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function _v(a,y,x,b){for(var E=a.pointsCount,z=y;oe.$(y.x,z.x)&&oe.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!oe.$(y.x,z.x)&&!oe.$(y.y,z.y))return x-1;for(var tt=z;oe.$(y.x,z.x)&&oe.$(z.x,tt.x)&&(!b||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||oe.$(y.y,z.y)&&oe.$(z.y,tt.y)&&(!b||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=E)return E-1;tt=a.i(x++)}return x-2}qe.prototype.computeJumpLength=function(){return 10};function vc(a,y,x,b,E,z,tt){if(!tt&&Fd(a)){tt=a.computeJumpLength();var ot=tt/2,rt=[],at=0;if(a.isVisible()&&(at=Mx(a,E,z,rt)),0ct-tt);)at--,ct=Math.max(ut-ot,z.x);ut=z.y-tt+b,ct+=x,yt=z.y+b,a.curve===$u?Lf(y,ct,yt,!1):Ku(y,mt,ut,ct,ut,ct,yt)}else if(oe.B(E.x,z.x))if(E.yut-tt);)at--,ut=Math.max(ct-ot,z.y);ct=z.x-tt+x,yt=z.x+x,ut+=b,a.curve===$u?Lf(y,yt,ut,!1):Ku(y,ct,mt,ct,ut,yt,ut)}}}y.lineTo(z.x+x,z.y+b)}function Mx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,ot=0;ottt.x&&ut.x>=at.x||at.xtt.y&&ut.y>=at.y||at.ytt&&Math.min(St,Mt)ut&&!oe.B(St,Mt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(oe.B(ct,yt)&&oe.B(St,Mt)&&Math.min(ut,mt)St&&Math.min(tt,zt)ct&&!oe.B(tt,zt)){ot.x=St,ot.y=ct,ut=!0;break t}ot.x=0,ot.y=0,ut=!1}ut&&(E?x.push(ot.x):x.push(ot.y)),tt=at}It.free(ot)}function Fd(a){return a=a.curve,a===bf||a===$u}function Ym(a,y){(y||Fd(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()))}qe.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var z=!1;E=E.Pa.s;for(var tt=E.length,ot=0;ota&&Mn(a,">= 0",qe,"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:ao},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&&oa(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",qe,"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=b&&(z=b-1);var ot=this.i(z-1),rt=this.i(z);oe.Dl(E.x,E.y,tt.x,tt.y,ot.x,ot.y,rt.x,rt.y,.5,a),y=Math.min(rt.x,y),x=Math.min(rt.y,x),E=rt}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;Eb&&(b=-b)):oe.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;bthis.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!kf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!kf(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(),Ym(this,y===$u||y===bf||a===$u||a===bf),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(),Ym(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)}}}),qe.prototype.invalidateOtherJumpOvers=qe.prototype.Xo,qe.prototype.findClosestSegment=qe.prototype.ez,qe.prototype.updateRoute=qe.prototype.vg,qe.prototype.invalidateRoute=qe.prototype.bb,qe.prototype.rollbackRoute=qe.prototype.rv,qe.prototype.commitRoute=qe.prototype.zf,qe.prototype.startRoute=qe.prototype.uh,qe.prototype.clearPoints=qe.prototype.Fj,qe.prototype.removePoint=qe.prototype.pv,qe.prototype.addPointAt=qe.prototype.yf,qe.prototype.addPoint=qe.prototype.ne,qe.prototype.insertPointAt=qe.prototype.m,qe.prototype.insertPoint=qe.prototype.Kz,qe.prototype.setPointAt=qe.prototype.L,qe.prototype.setPoint=qe.prototype.dd,qe.prototype.getPoint=qe.prototype.i,qe.prototype.getOtherPort=qe.prototype.Cz,qe.prototype.getOtherNode=qe.prototype.To;var yc=null,Sc=null,$v=new Ce(qe,"Normal",1),bx=new Ce(qe,"Orthogonal",2),Tx=new Ce(qe,"AvoidsNodes",6),eS=new Ce(qe,"AvoidsNodesStraight",7),Ts=new Ce(qe,"None",0),ma=new Ce(qe,"Bezier",9),$u=new Ce(qe,"JumpGap",10),bf=new Ce(qe,"JumpOver",11),_g=new Ce(qe,"End",17),Xm=new Ce(qe,"Scale",18),_m=new Ce(qe,"Stretch",19),$g=new Ce(qe,"OrientAlong",21),Jg=new Ce(qe,"OrientPlus90",22),Qg=new Ce(qe,"OrientMinus90",23),Jv=new Ce(qe,"OrientOpposite",24),$m=new Ce(qe,"OrientUpright",25),qg=new Ce(qe,"OrientPlus90Upright",26),tp=new Ce(qe,"OrientMinus90Upright",27),Jm=new Ce(qe,"OrientUpright45",28),nS=16,iS=14,ep=8;qe.className="Link",qe.Normal=$v,qe.Orthogonal=bx,qe.AvoidsNodes=Tx,qe.AvoidsNodesStraight=eS,qe.None=Ts,qe.Bezier=ma,qe.JumpGap=$u,qe.JumpOver=bf,qe.End=_g,qe.Scale=Xm,qe.Stretch=_m,qe.OrientAlong=$g,qe.OrientPlus90=Jg,qe.OrientMinus90=Qg,qe.OrientOpposite=Jv,qe.OrientUpright=$m,qe.OrientPlus90Upright=qg,qe.OrientMinus90Upright=tp,qe.OrientUpright45=Jm,qe.EndSegmentStep=8,qe.CurvinessStart=nS,qe.SpacingMin=iS,qe.OrthoShortCut=ep;function Qm(a,y,x,b){Ti(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}Qm.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di=Ad&&(x[b]=Qv)}np.prototype.Yj=function(a,y,x,b){if(a>this.En||a+xthis.Fn||y+ba&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var z=y;z<=x;z++)if(E[z]===Ju)return!1}return!0};function Yl(a,y,x,b,E,z,tt,ot,rt){if(!(ytt||xrt)){var at=y|0,ut=x|0,ct=a.ac[at][ut];if(ct>=Ad&&ct=a.ac[at][ut]);)a.ac[at][ut]=ct,ct+=1,E?ut+=b:at+=b;if(at=E?ut:at,E)if(0at;x+=b)Yl(a,y,x,1,!E,z,tt,ot,rt),Yl(a,y,x,-1,!E,z,tt,ot,rt);else if(0at;y+=b)Yl(a,y,x,1,!E,z,tt,ot,rt),Yl(a,y,x,-1,!E,z,tt,ot,rt)}}function qm(a,y,x,b,E,z,tt,ot,rt){y|=0,x|=0;var at=Ju,ut=Ad;for(a.ac[y][x]=ut;at===Ju&&y>z&&yot&&xz&&yot&&x=Math.abs(ot-at)&&1>=Math.abs(rt-ut))a.abort=!0;else{var ct=z.x;b=z.y,y=z.x+z.width;var mt=z.y+z.height;ct-=a.Nd,ct/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,mt-=a.Od,mt/=a.sc,z=Math.max(0,Math.min(a.di,ct|0)),y=Math.min(a.di,Math.max(0,y|0)),ct=Math.max(0,Math.min(a.ei,b|0)),mt=Math.min(a.ei,Math.max(0,mt|0)),b=a.ac,ot|=0,rt|=0,at|=0,ut|=0;var yt=x===0||x===90?1:-1;if(x=x===90||x===270,b[ot][rt]===Ju?(qm(a,ot,rt,yt,x,z,y,ct,mt),qm(a,ot,rt,1,!x,z,y,ct,mt),qm(a,ot,rt,-1,!x,z,y,ct,mt)):qm(a,ot,rt,yt,x,ot,rt,ot,rt),b[at][ut]===Ju?(t0(a,at,ut,E===0||E===90?1:-1,E===90||E===270,z,y,ct,mt),t0(a,at,ut,1,!(E===90||E===270),z,y,ct,mt),t0(a,at,ut,-1,!(E===90||E===270),z,y,ct,mt)):t0(a,at,ut,yt,x,at,ut,at,ut),x=Te(),tt&&sS(a,at,ut,E,ot,rt,x))for((x[0]!==at||x[1]!==ut)&&(x.unshift(ut),x.unshift(at)),(x[x.length-2]!==ot||x[x.length-1]!==rt)&&(x.push(ot),x.push(rt)),a=Ad,E=x[x.length-2],tt=x[x.length-1],b[E][tt]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],tt=x[z+3],y=x[z],at=x[z+1];y>E?E++:ytt?tt++:atE)ut--;else break;else if(ct>z)ct--;else break;var mt=ot[ut][ct];if(mt===0||mt===qv)break;rt=ut,at=ct}for(;;){if(ut=b,ct=rt,mt=at,b===0?mtz&&(ut=270,mt--):b===90?ctE&&(ut=180,ct--):b===180?mtz&&(ut=270,mt--):ctE&&(ut=180,ct--),ct=ot[ct][mt],ut!==b&&ct!==0&&ct!==qv){if(tt.push(rt),tt.push(at),sS(a,rt,at,ut,E,z,tt))return!0;tt.pop(),tt.pop()}if(ot[rt][at]=qv,b===0){if(rt===y)return!1;rt--}else if(b===90){if(at===x)return!1;at--}else if(b===180){if(rt===y)return!1;rt++}else{if(at===x)return!1;at++}}}Wt.Object.defineProperties(np.prototype,{bounds:{get:function(){return new ke(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0=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 90180+a&&x<=360-a?270:0;case 13:return 180a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}xc.prototype.Sl=function(){this.pe.length=0};function aS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof fi?E:null;if(z===null||z.isSubGraphExpanded)var tt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}b=z,tt=b.Lu()}z=a.pe.length=0;var ot=a.port.ga(Tr,It.alloc()),rt=a.port.ga(Qs,It.alloc());for(E=ke.allocAt(ot.x,ot.y,0,0),E.Ye(rt),It.free(ot),It.free(rt),ot=It.allocAt(E.x+E.width/2,E.y+E.height/2),rt=a.port.li(),tt=tt.iterator;tt.next();){var at=tt.value;if(at.isVisible()&&at.fromPort!==at.toPort){var ut=at.fromPort===a.port||at.fromNode!==null&&at.fromNode.Td(b),ct=at.computeSpot(ut,a.port);if(ct.$c()&&(ut=ut?at.toPort:at.fromPort,ut!==null)){var mt=ut.part;if(mt!==null){var yt=mt.findVisibleNode();yt!==null&&yt!==mt&&(mt=yt,ut=mt.port),ut=at.computeOtherPoint(mt,ut),mt=ot.ab(ut),mt-=rt,0>mt?mt+=360:360<=mt&&(mt-=360),ct=Nx(E,ct,mt,at.isOrthogonal),ct===0?(ct=4,180mt&&(mt+=360)),yt=a.pe[z],yt===void 0?(yt=new ty(at,mt,ct),a.pe[z]=yt):(yt.link=at,yt.angle=mt,yt.Nc=ct),yt.hv.set(ut),z++}}}}for(It.free(ot),a.pe.sort(xc.prototype.j),rt=a.pe.length,b=-1,z=ot=0;zMath.abs(Mt)?(Vt=Math.abs(Mt)/mt,mt=Math.abs(Mt)):Vt=1;break;case 2:yt>Math.abs(Zt)?(Vt=Math.abs(Zt)/yt,yt=Math.abs(Zt)):Vt=1;break;case 1:ct>Math.abs(Mt)?(Vt=Math.abs(Mt)/ct,ct=Math.abs(Mt)):Vt=1;break;default:case 4:ut>Math.abs(Zt)?(Vt=Math.abs(Zt)/ut,ut=Math.abs(Zt)):Vt=1}Bt=0}var ce=Kt.Zo;if(b===Vv){switch(Kt=Kt.link.computeThickness(),Kt*=Vt,ce.set(te),St){case 8:ce.x=te.x+Mt/2+mt/2-Bt-Kt/2;break;case 2:ce.y=te.y+Zt/2+yt/2-Bt-Kt/2;break;case 1:ce.x=te.x+Mt/2-ct/2+Bt+Kt/2;break;default:case 4:ce.y=te.y+Zt/2-ut/2+Bt+Kt/2}Bt+=Kt}else{var vn=.5;b===Wm&&(vn=(Kt.Uo+1)/(Kt.Gl+1)),ce.x=te.x+Mt*vn,ce.y=te.y+Zt*vn}}}for(It.free(ot),It.free(rt),It.free(tt),It.free(at),te=a.pe,z=0;zy.Nc?1:a.angley.angle?1:0},xc.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ir,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y=y-1?(z=0,b=x,E+=tt+20,tt=0):z++}},Bo.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value.node;if(!(ot===null||ot instanceof qe)&&(ip(ot),this.rh(ot))){var rt=ot.measuredBounds,at=rt.width;rt=rt.height,ot.moveTo(x,b),ot instanceof fi&&(ot.rh=!1),x+=Math.max(at,50)+20,z=Math.max(z,Math.max(rt,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},Bo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof fi&&a.rh)};function Gh(a,y,x,b,E,z,tt,ot){for(x=x.iterator;x.next();){var rt=x.value;b&&!rt.isTopLevel||E!==null&&!E(rt)||!rt.canLayout()||(z&&rt instanceof wn?rt.isLinkLabel||(rt instanceof fi&&rt.layout===null?Gh(a,y,rt.memberParts,!1,E,z,tt,ot):(ip(rt),y.add(rt))):tt&&rt instanceof qe?y.add(rt):!ot||!rt.Zc()||rt instanceof wn||(ip(rt),y.add(rt)))}}function ip(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Bo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new ke),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Bo.prototype.ex=function(a){var y=new Ge;return a instanceof fe?(Gh(this,y,a.nodes,!0,null,!0,!0,!0),Gh(this,y,a.links,!0,null,!0,!0,!0),Gh(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof fi?Gh(this,y,a.memberParts,!1,null,!0,!0,!0):Gh(this,y,a.iterator,!1,null,!0,!0,!0),y},Bo.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(Tr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Wt.Object.defineProperties(Bo.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())}}}),Bo.prototype.collectParts=Bo.prototype.ex,Bo.prototype.getLayoutBounds=Bo.prototype.ni,Bo.prototype.invalidateLayout=Bo.prototype.C,Bo.className="Layout";function Po(a){Ti(this),this.Sc=a,this.wf=new Ge,this.ye=new Ge,this.Es=new On,this.zs=new On}Po.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 Ge,this.ye=new Ge,this.Es=new On,this.zs=new On},Po.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,1y?1:0):1:y!==null?-1:0}Wt.Object.defineProperties(Cr.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=ke.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),ke.free(x),!(a instanceof fi)&&(a=a.locationObject.ga(Vi),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Ge,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ge,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ge,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 Ie,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}}}),Cr.prototype.deleteDestinationEdge=Cr.prototype.Jl,Cr.prototype.addDestinationEdge=Cr.prototype.zl,Cr.prototype.deleteSourceEdge=Cr.prototype.Kl,Cr.prototype.addSourceEdge=Cr.prototype.Cl,Cr.className="LayoutVertex",Cr.standardComparer=oy,Cr.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 "+(this.qd?this.qd.toString():"null"))),y},ra.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ra.prototype.commit=function(){},ra.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Wt.Object.defineProperties(ra.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)}}}),ra.prototype.getOtherVertex=ra.prototype.Ax,ra.className="LayoutEdge";function Yr(a){Bo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new pn(NaN,NaN).freeze(),this.tf=new pn(10,10).freeze(),this.Jb=op,this.Rb=n0,this.nd=rp,this.hd=uS,a&&Object.assign(this,a)}Me(Yr,Bo),Yr.prototype.cloneProtected=function(a){Bo.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},Yr.prototype.qb=function(a){a.classType===Yr?a===rp||a===o0||a===ry||a===i0?this.sorting=a:a===n0||a===cl?this.arrangement=a:a===op||a===e0?this.alignment=a:$t("Unknown enum value: "+a):Bo.prototype.qb.call(this,a)},Yr.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof fi)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case i0:E.reverse();break;case rp:E.sort(this.comparer);break;case o0:E.sort(this.comparer),E.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"),b=[],this.alignment){case e0:var ot=y,rt=x,at=ke.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ct=ut=0;ctz-1||0tt)&&(b.push(new ke(0,Mt,tt+ot,Bt)),zt=0,St=yt,Mt+=Bt,Bt=0),Bt=Math.max(Bt,ce),mt){case cl:Kt=-Kt.width;break;default:Kt=0}switch(Zt.moveTo(St+Kt,Mt),mt){case cl:St-=te;break;default:St+=te}zt++}b.push(new ke(0,Mt,tt+ot,Bt)),ke.free(at);break;case op:for(rt=tt,ut=z,ct=y,mt=x,tt=ke.alloc(),yt=Math.max(this.cellSize.width,1),z=Mt=at=0,ot=It.alloc(),St=0;St=at&&(rt-=at),at=Zt=0,te=Math.max(this.cellSize.height,1),Kt=z=0,ce=!0,zt=It.alloc(),vn=0;vnut-1||0rt){for(b.push(new ke(0,ce?Vt-z:Vt,rt+ct,Kt+z+mt)),Tn=0;Tnat&&(z.width+=z.x-at,z.x=at);ke.free(tt)}for(ot=z=tt=E=0;oty?1:0}Wt.Object.defineProperties(Yr.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0ct)){var Mt=ct+Gg(St);St.pc(Mt,!0),xv(St,Mt,ct)}}y.isModified=!0}}finally{y.aa=!0}}}}},lo.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)},lo.prototype.rp=function(){for(var a=this.H.model,y=new Ge,x=a.nodeDataArray,b=0;b=b)return"[]";var E=new An;E.add("["),x&&1b)return;De(a.Tc,b)}vr(a,"nodeDataArray",Pr,"nodeDataArray",a,y,null,b,null),a.qp(y)}Ct.nA=function(a){if(Be(a))for(var y=a.length,x=0;xy&&(y=a.length),Ne(a,y,x),vr(this,"",rr,"",a,null,x,null,y)},Ct.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&$t("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];De(a,y),vr(this,"",Pr,"",a,x,null,y,null)},Ct.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=or(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ct.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=or(a,x);b===void 0&&(b=""),b!==y&&(Oo(a,x,y),vr(this,"nodeCategory",Ho,x,a,b,y))}else Oo(a,x,y)}},Ct.lm=function(a,y){this.jm(y,this.Ro(a))},Ct.Tl=function(){return!1},Ct.Wj=function(){return!1},Ct.ri=function(){return!1},Ct.xs=function(){return!1},Ct.Xj=function(){return!1};function hy(){return new Bn}function ap(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 ap(a,y.constructor);return typeof y}function dy(a){return il[a]?il[a]:Yt.go!==void 0&&Yt.go[a]?Yt.go[a]:null}function or(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function Oo(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Wt.Object.defineProperties(Bn.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===""&&$t("Model.nodeKeyProperty may not be the empty string"),0"+va(this,E,!1)}return y},Ct.Qv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Bn.prototype.Qv.call(this,a,y),b=this,E=new Ge,z=new Ge,tt=new Ge,ot=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===rr?E.add(ut.newValue):ut.change===Pr&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ct){b.Jc(ct)&&z.add(ct)}):ut.object instanceof Bn||b.lb(ut.object)||TS(b,ut.object).each(function(ct){z.add(ct)})))});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(b.Ac(ut)),y||z.add(ut)});var at=this.kl;return at.clear(),tt.each(function(ut){at.add(b.Ac(ut)),y&&z.add(ut)}),a=b.cloneDeep(z.Fa()),0b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Pr){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,ve(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}Bn.prototype.changeState.call(this,a,y)}},Ct=zi.prototype,Ct.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),Oo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ct.yx=function(a){return va(this,a,!0)},Ct.wv=function(a,y){Ff(this,a,y,!0)},Ct.Bx=function(a){return va(this,a,!1)},Ct.Bv=function(a,y){Ff(this,a,y,!1)};function va(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=or(y,a),a!==void 0))){if(Wh(a))return a;$t((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ff(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var z=or(y,E);z!==x&&(gl(a,z,y),Oo(y,E,x),a.hc(x)===null&&fl(a,x,y),vr(a,b?"linkFromKey":"linkToKey",Ho,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Oo(y,E,x)}}Ct.zx=function(a){return u0(this,a,!0)},Ct.xv=function(a,y){Af(this,a,y,!0)},Ct.Cx=function(a){return u0(this,a,!1)},Ct.Cv=function(a,y){Af(this,a,y,!1)};function u0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=or(y,a),y===void 0?"":y)}function Af(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=or(y,E);z===void 0&&(z=""),z!==x&&(Oo(y,E,x),vr(a,b?"linkFromPortId":"linkToPortId",Ho,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Oo(y,E,x)}}Ct.Ef=function(a){if(a===null)return h0;var y=this.je;return y===""?h0:(a=or(a,y),a===void 0?h0:a)},Ct.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=or(a,x);if(b===void 0&&(b=h0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;zE||(b.splice(E,1),this.Jc(a)&&(gl(this,y,a),vr(this,"linkLabelKeys",Pr,x,a,y,null,E,null)))}else b!==void 0&&$t(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ct.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=or(a,y),y!==void 0)){if(Wh(y))return y;$t("Key value for link data "+a+" is not a number or a string: "+y)}}},Ct.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=or(a,x);b!==y&&this.jh(y)===null&&(Oo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),vr(this,"linkKey",Ho,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Oo(a,x,y)}},Ct.jh=function(a){return a===null&&$t("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Wh(a)?this.wb.I(a):null},Ct.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){Oo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Oo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Oo(a,y,x)}}}}},Ct.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ct.fi=function(a){a!==null&&(bo(a),this.Jc(a)||NS(this,a,!0))};function NS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&$t("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),vr(a,"linkDataArray",rr,"linkDataArray",a,null,y,null,b),cy(a,y)}Ct.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;xb)return;a.md.splice(b,1)}if(vr(a,"linkDataArray",Pr,"linkDataArray",a,y,null,b,null),x=va(a,y,!0),gl(a,x,y),x=va(a,y,!1),gl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Ie;y.addAll(a.iterator),a=new Ie;var x=new Ie,b=this.sort(y),E,z,tt=this.Jp,ot=this.arrangement,rt=this.nodeDiameterFormula,at=this.radius;(!isFinite(at)||0>=at)&&(at=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ct=this.startAngle;isFinite(ct)||(ct=0);var mt=this.sweepAngle;if((!isFinite(mt)||360mt)&&(mt=360),y=this.spacing,isFinite(y)||(y=NaN),ot===rl&&rt===Pc?ot=ol:ot===rl&&rt!==Pc&&(ot=this.arrangement),(this.direction===Od||this.direction===Of)&&this.sorting!==Bf){for(rt=0;!(rt>=b.length)&&(a.add(b.M(rt)),!(rt+1>=b.length));rt+=2)x.add(b.M(rt+1));this.direction===Od?(this.arrangement===rl&&a.reverse(),b=new Ie,b.addAll(a),b.addAll(x)):(this.arrangement===rl&&x.reverse(),b=new Ie,b.addAll(x),b.addAll(a))}rt=b.length;for(var yt=z=E=0;ytmt&&(yt===0||yt===b.length-1)&&(Mt/=2),E+=Mt,z++}if(isNaN(at)||ot===rl){if(isNaN(y)&&(y=6),ot!==ol&&ot!==rl){for(z=-1/0,tt=0;ttat?(at=E,z=at*ut):tt=yt/(360<=mt?rt:rt-1)}if(this.kw=ot,this.lc=at,this.Zm=ut,this.lw=ct,this.Wp=mt,this.Ti=y,this.me=z,this.Jp=tt,y=b,b=this.kw,ot=this.lc,at=this.lw,ut=this.Wp,ct=this.Ti,mt=this.me,rt=this.Jp,this.direction!==Od&&this.direction!==Of||b!==rl)if(this.direction===Od||this.direction===Of){switch(tt=0,b){case Vh:tt=180*c0(this,ot,mt,at,rt)/Math.PI;break;case ol:rt=y=0,tt=a.first(),tt!==null&&(y=Zh(tt,Math.PI/2)),tt=x.first(),tt!==null&&(rt=Zh(tt,Math.PI/2)),tt=180*c0(this,ot,mt,at,ct+(y+rt)/2)/Math.PI;break;case Qu:tt=ut/y.length}if(this.direction===Od){switch(b){case Vh:dp(this,a,at,Uh);break;case ol:hp(this,a,at,Uh);break;case Qu:up(this,a,ut/2,at,Uh)}switch(b){case Vh:dp(this,x,at+tt,As);break;case ol:hp(this,x,at+tt,As);break;case Qu:up(this,x,ut/2,at+tt,As)}}else{switch(b){case Vh:dp(this,x,at,Uh);break;case ol:hp(this,x,at,Uh);break;case Qu:up(this,x,ut/2,at,Uh)}switch(b){case Vh:dp(this,a,at+tt,As);break;case ol:hp(this,a,at+tt,As);break;case Qu:up(this,a,ut/2,at+tt,As)}}}else switch(b){case Vh:dp(this,y,at,this.direction);break;case ol:hp(this,y,at,this.direction);break;case Qu:up(this,y,ut,at,this.direction);break;case rl:AS(this,y,ut,at,this.direction)}else AS(this,y,ut,at-ut/2,As)}this.updateParts(),this.network=null,this.isValidLayout=!0};function up(a,y,x,b,E){var z=a.Wp,tt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ot=y.length,rt=0;rtx){for(z=b+(E===As?z:-z);0>z;)z+=360;z%=360,180=ut.length-1));ct++)DS(a,rt,at,ut,ct,E,z)||IS(a,rt,at,ut,ct,E,z),rt=z.x,at=z.y;if(It.free(z),a.mj++,!(23Math.abs(yt)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0Math.abs(mt)?0:mt,rt=Math.abs(z)>Math.abs(ct)?0ct:0a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10=ct.length-1));mt++)DS(a,rt,at,ct,mt,E,ut)||IS(a,rt,at,ct,mt,E,ut),rt=ut.x,at=ut.y;if(It.free(ut),a.mj++,!(23a.mj?a.lc-z/(2*Math.PI):a.lc-(0ot){if(z=y-a,z<-ot)return tt.x=z,tt.y=at,!1;ut=!0}}else if(z=y-a,z<-ot){if(z=y+a,z>ot)return tt.x=z,tt.y=at,!1;ut=!0}return at=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>x!==ut&&(at=-at),Math.abs(x-at)>(b[E].height+b[E+1].height)/2?(tt.x=z,tt.y=at,!1):(tt.x=z,tt.y=at,!0)}function IS(a,y,x,b,E,z,tt){var ot=a.lc,rt=a.me,at=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===As)){if(z=x-a,z<-rt){if(z=x+a,z>rt){tt.x=at,tt.y=z;return}b=!0}}else if(z=x+a,z>rt){if(z=x-a,z<-rt){tt.x=at,tt.y=z;return}b=!0}at=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>y!==b&&(at=-at),tt.x=at,tt.y=z}_o.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},_o.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 It(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},_o.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,b,E){var z=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,ot=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),rt=0,at=0;at<=z;at++){b!==void 0&&E!==void 0?rt=b+at*E/z:rt=at*Math.PI/(2*z);var ut=Math.sin(rt);tt+=Math.sqrt(1-a*a*ut*ut)*ot}return b!==void 0&&E!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function d0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?fy(a,1,x,b,E):fy(a,1,x))}function c0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/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&&(b+=Math.PI/2);for(var ot=0;;ot++){var rt=Math.sin(b+ot*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*rt*rt)*a,tt>=E)return ot*a}}_o.prototype.sort=function(a){switch(this.sorting){case f0:break;case g0:a.reverse();break;case p0:a.sort(this.comparer);break;case m0:a.sort(this.comparer),a.reverse();break;case Bf:return this.ak(Ox(a));default:$t("Invalid sorting type.")}return a};function Ox(a){for(var y=[],x=0;xE&&(E=ot,z=tt)}else for(tt=0;ttE&&(E=ot,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)E=a.indexOf(tt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}_o.prototype.ak=function(a){for(var y=[],x=0;xy[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(z=[],x=0;xy[x[St]].indexOf(x[St===x.length-1?0:St+1])&&yt.push(St===x.length-1?0:St+1);if(yt.length===0)for(St=0;Stx.indexOf(ce)||tex.indexOf(ce)||te=Mt?te+1:te)),Bt+=te=Mt&&te++,Zt>=Mt&&Zt++,te>Zt&&(Kt=Zt,Zt=te,te=Kt),Zt-te<(x.length+2)/2==(teyt||yt===ut||(St=yt>ut?yt-ut:ut-yt,ct+=yttt-St?1:-1);x.splice(0>ct?ut:ut+1,0,rt),b.splice(ot,1),ot--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==rl&&a!==ol&&a!==Vh&&a!==Qu||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==As&&a!==Uh&&a!==Od&&a!==Of||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==f0&&a!==g0&&a!==p0&&!m0&&a!==Bf||(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!==v0&&a!==Pc||(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 ol=new Ce(_o,"ConstantSpacing",0),Vh=new Ce(_o,"ConstantDistance",1),Qu=new Ce(_o,"ConstantAngle",2),rl=new Ce(_o,"Packed",3),As=new Ce(_o,"Clockwise",4),Uh=new Ce(_o,"Counterclockwise",5),Od=new Ce(_o,"BidirectionalLeft",6),Of=new Ce(_o,"BidirectionalRight",7),f0=new Ce(_o,"Forwards",8),g0=new Ce(_o,"Reverse",9),p0=new Ce(_o,"Ascending",10),m0=new Ce(_o,"Descending",11),Bf=new Ce(_o,"Optimized",12),v0=new Ce(_o,"Pythagorean",13),Pc=new Ce(_o,"Circular",14);_o.className="CircularLayout",_o.ConstantSpacing=ol,_o.ConstantDistance=Vh,_o.ConstantAngle=Qu,_o.Packed=rl,_o.Clockwise=As,_o.Counterclockwise=Uh,_o.BidirectionalLeft=Od,_o.BidirectionalRight=Of,_o.Forwards=f0,_o.Reverse=g0,_o.Ascending=p0,_o.Descending=m0,_o.Optimized=Bf,_o.Pythagorean=v0,_o.Circular=Pc;function cp(){this.Pl=-1/0,this.tm=this.mk=null}cp.prototype.compare=function(a,y){if(0this.Pl||Math.abs(a)a&&0ot?(E=mt.x+mt.width/2,z=mt.y+mt.height/2,at[0]=new It(mt.x+mt.width+b.width,mt.y),at[1]=new It(mt.x,mt.y+mt.height+b.height),ot=2):(rt=zS(at,ot,E,z,mt.width,mt.height,b),ct=at[rt],yt=new It(ct.x+mt.width+b.width,ct.y),mt=new It(ct.x,ct.y+mt.height+b.height),rt+1this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1=tt))){for(var at=ot=0,ut=rt.count-tt;utyt&&(yt=1),ot=oe.sqrt((ot+yt+at*at*4/(tt*tt))/yt),tt=(ot-1)*ut/2,ot=(ot-1)*ct/2,E.bounds=new ke(z-mt.x-tt,rt-mt.y-ot,ut+2*tt,ct+2*ot),E.focus=new It(mt.x+tt,mt.y+ot)}}return a.network=b,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var z=E.Sv,tt=E.Tv;b.bounds=new ke(b.centerX-z,b.centerY-tt,E.Ss,E.Qs),b.focus=new It(z,tt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,tt=y.height;y.We!==null&&0=ct.Vd?rt++:(ot=!0,at++,tt+=Math.atan2(y.centerY-ct.centerY,y.centerX-ct.centerX))}if(rt!==0){for(0>1)+at)*(ot%2===0?1:-1),rt.centerX=b+ut*Math.cos(ct),rt.centerY=E+ut*Math.sin(ct),ot++}}}}function zS(a,y,x,b,E,z,tt){var ot=9e19,rt=-1,at=0;t:for(;atut.y&&a[mt].x-ut.xut.x&&a[mt].y-ut.yy+z?(x=b+E-tt,a=a-y-z,oe.sqrt(x*x+a*a)):a+xtt+ot?a>y+z?(x=b-tt-ot,a=a-y-z,oe.sqrt(x*x+a*a)):a+xy+z?a-(y+z):a+x=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,tt=1;ttz-x)?y.sort(function(Mt,zt){return Mt===null||zt===null||Mt===zt?0:Mt.centerX-zt.centerX}):y.sort(function(Mt,zt){return Mt===null||zt===null||Mt===zt?0:Mt.centerY-zt.centerY}),x=a.Zf;var at=b=ot=0;for(z=0;zx||at-rt>x){if(E)break}else if(ut-yt>x||yt-ut>x){if(!E)break}else{var St=jS(tt,mt);1>St?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new S0),St=b.random(),ot=b.random(),rt>at?(b=Math.abs(mt.bounds.right-tt.bounds.x),b=(1+b)*St):rtyt?(at=Math.abs(mt.bounds.bottom-tt.bounds.y),at=(1+at)*ot):rtct?(ct=a.randomNumberGenerator,ct===null&&(a.randomNumberGenerator=ct=new S0),ot=ct.random(),ct=ct.random(),b=(b>rt?1:-1)*(1+(z.width>x.width?z.width:x.width))*ot,at=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ct):(ot=ot.stiffness*(ct-ot.length),b=(rt-b)/ct*ot,at=(ut-tt)/ct*ot),x.forceX+=b,x.forceY+=at,z.forceX-=b,z.forceY-=at;for(E=b=0;Ea.epsilonDistance*a.epsilonDistance}ts.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},ts.prototype.moveFixedVertex=function(){},ts.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ts.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ao,y.toSpot=ao)}},ts.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=ke.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,ke.free(x)}x=ke.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}ke.free(x)},ts.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ts.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ts.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ts.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ts.prototype.electricalFieldX=function(){return 0},ts.prototype.electricalFieldY=function(){return 0},ts.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ts.prototype.gravitationalFieldX=function(){return 0},ts.prototype.gravitationalFieldY=function(){return 0},ts.prototype.isFixed=function(a){return a.isFixed},Wt.Object.defineProperties(ts.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&&0Mt&&0Mt&&0a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]tt)for(var ut=tt+1;utrt;ut--)ct=b[ut],ct.near===at&&ct.Dj===at.Dj||ot++;var mt;if(0<=x)for(rt=b[tt].sourceEdgesArrayAccess,at=0;atMt||ct===Mt&&yt>St)&&ot++,ztct||Mt===ct&&St>yt)&&ot++}}}if(0>=x){for(rt=b[tt].destinationEdgesArrayAccess,at=0;atMt||ct===Mt&&ut>zt)&&ot++,Stct||Mt===ct&&zt>ut)&&ot++)}for(z[tt*E+tt]=ot,rt=tt+1;rt=x){for(ot=b[tt].destinationEdgesArrayAccess,Zt=b[rt].destinationEdgesArrayAccess,at=0;at=x&&(rt=ot.sourceEdgesArrayAccess);var at=null;0<=x&&(at=ot.destinationEdgesArrayAccess);var ut=0,ct=0,mt=ot.near;if(mt!==null&&mt.layer===ot.layer&&(ut+=mt.column-1,ct++),rt!==null)for(mt=0;mt=x&&(rt=ot.sourceEdgesArrayAccess);var at=null;0<=x&&(at=ot.destinationEdgesArrayAccess);var ut=0,ct=[],mt=ot.near;if(mt!==null&&mt.layer===ot.layer&&(ct[ut]=mt.column-1,ut++),ot=void 0,rt!==null)for(mt=0;mt>1,z[tt]=ut&1?ct[at]:ct[at-1]+ct[at]>>1)}return Yh(a,y,b),z}function mp(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();){var ot=tt.value,rt=ot.toVertex,at=y.layer-rt.layer;ot=a.linkMinLength(ot),at===ot&&mp(a,rt,x,b,E,z)}if(z)for(tt=y.sourceEdges;tt.next();)ot=tt.value,rt=ot.fromVertex,at=rt.layer-y.layer,ot=a.linkMinLength(ot),at===ot&&mp(a,rt,x,b,E,z)}}function my(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,b,E,z)}}uo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;jx(a)!==null;){for(E=US(a);E!==null;)b[x]=E,x--,E.valid=!1,E=US(a);for(E=ZS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=ZS(a);E=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value;if(ot.valid){for(var rt=0,at=ot.destinationEdges;at.next();)at.value.toVertex.valid&&rt++;at=0;for(var ut=ot.sourceEdges;ut.next();)ut.value.fromVertex.valid&&at++;(E===null||zy.toVertex.index&&(a.gm(y),y.rev=!0);break;case L0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&vy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Llb){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;xtt&&mp(a,ot,0,-1,!0,!1)}for(mp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,ot=0,rt=null,tt=a.network.vertexes.iterator;tt.next();){var at=tt.value;if(at.component===1){var ut=0,ct=!1,mt=at.sourceEdgesArrayAccess;E=mt.length;for(var yt=0;ytz)&&!ut&&(ot=tt,z=at)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ot.component=0}}}function $S(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}uo.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case k0: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&&JS(this,x);break;case wy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x)}};function JS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;bz.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;xz.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x=tt;b--)z=Za(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Za(this,b,1)||z;for(E=this.countCrossings(),E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,1)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,-1)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Za(this,b,0)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,0)||z;E>=a?Fa(this,y):(a=E,y=Hs(this))}break;default:case b0:for(x=this.Ia,tt=0,ot=a+1;(b=this.countCrossings())=tt;b--)z=Za(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Za(this,b,1)||z;for(E=this.countCrossings(),E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,1)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,-1)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Za(this,b,0)||z;for(E>=a?Fa(this,y):(a=E,y=Hs(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Za(this,b,0)||z;E>=a?Fa(this,y):(a=E,y=Hs(this))}}Fa(this,y)};function P0(a,y,x){var b=Kh(a,y),E=a.tc[y],z=VS(a,y,x),tt=py(a,y,x);for(x=0;xz+1&&(mt+=4*(Vt-z),yt+=4*(Vt-(z+1)))}for(Kt=b[z].destinationEdges.iterator,Kt.reset();Kt.next();)if(Vt=Kt.value,Zt=Vt.toVertex,Vt.valid&&Zt.layer===y){for(Vt=0;b[Vt]!==Zt;)Vt++;Vt===z+1&&(yt+=1)}for(Kt=b[z+1].sourceEdges.iterator,Kt.reset();Kt.next();)if(Vt=Kt.value,Zt=Vt.fromVertex,Vt.valid&&Zt.layer===y){for(Vt=0;b[Vt]!==Zt;)Vt++;Vtz+1&&(mt+=4*(Vt-(z+1)),yt+=4*(Vt-z))}for(Kt=b[z+1].destinationEdges.iterator,Kt.reset();Kt.next();)if(Vt=Kt.value,Zt=Vt.toVertex,Vt.valid&&Zt.layer===y){for(Vt=0;b[Vt]!==Zt;)Vt++;Vt===z&&(mt+=1)}Vt=Zt=0,Kt=tt[b[z].index];var te=ot[b[z].index],ce=tt[b[z+1].index],vn=ot[b[z+1].index];Kt!==-1&&(Zt+=Math.abs(Kt-St),Vt+=Math.abs(Kt-Bt)),te!==-1&&(Zt+=Math.abs(te-St),Vt+=Math.abs(te-Bt)),ce!==-1&&(Zt+=Math.abs(ce-Mt),Vt+=Math.abs(ce-zt)),vn!==-1&&(Zt+=Math.abs(vn-Mt),Vt+=Math.abs(vn-zt)),(yt>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=If(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=If(this,y,-1)||x;x=If(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&(qS(this,-1),qS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=If(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=If(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=If(this,y,0)||x}}else Vx(this)};function If(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=Kh(a,y),z=a.tc[y],tt=py(a,y,-1);if(0x)for(b=0;bb-1||ut-E[b-1].column-1>ct+a.nodeMinColumnSpace(E[b-1],!1)?yt=ut-1:yt=ut,ct=b+1>=z||E[b+1].column-ut-1>mt+a.nodeMinColumnSpace(E[b+1],!0)?ut+1:ut;var St=mt=0,Mt=0;if(0>=x)for(var zt=E[b].sourceEdges.iterator;zt.next();){var Bt=zt.value,Vt=Bt.fromVertex;if(Bt.valid&&Vt.layer!==y){var Zt=gy(Bt),Kt=Bt.portFromColOffset;Bt=Bt.portToColOffset,Vt=Vt.column,mt+=(Math.abs(ut+Bt-(Vt+Kt))+1)*Zt,St+=(Math.abs(yt+Bt-(Vt+Kt))+1)*Zt,Mt+=(Math.abs(ct+Bt-(Vt+Kt))+1)*Zt}}if(0<=x)for(zt=E[b].destinationEdges.iterator;zt.next();)Bt=zt.value,Vt=Bt.toVertex,Bt.valid&&Vt.layer!==y&&(Zt=gy(Bt),Kt=Bt.portFromColOffset,Bt=Bt.portToColOffset,Vt=Vt.column,mt+=(Math.abs(ut+Kt-(Vt+Bt))+1)*Zt,St+=(Math.abs(yt+Kt-(Vt+Bt))+1)*Zt,Mt+=(Math.abs(ct+Kt-(Vt+Bt))+1)*Zt);Bt=Kt=Zt=0,zt=tt[E[b].index],Vt=ot[E[b].index],zt!==-1&&(Zt+=Math.abs(zt-ut),Kt+=Math.abs(zt-yt),Bt+=Math.abs(zt-ct)),Vt!==-1&&(Zt+=Math.abs(Vt-ut),Kt+=Math.abs(Vt-yt),Bt+=Math.abs(Vt-ct)),St=tt[x]?ut=rt:at<=tt[x]&&(ut=at));ut!==ot&&(z=!0,b[x].column=ut)}Yh(a,y,b),a.normalize()}function Hx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),tt=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+tt>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){b=tt.value;var ot=b.column-a.nodeMinColumnSpace(b,!0),rt=b.column+a.nodeMinColumnSpace(b,!1);ot<=y&&rt>=y&&(E[b.layer]=!0),ot<=x&&rt>=x&&(z[b.layer]=!0)}for(ot=!0,x=!1,b=0;b<=a.Ia;b++)ot=ot&&!(E[b]&&z[b]);if(ot)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;xz?Fa(a,E):tty)for(x=a.Ra;0<=x;x--)for(E=Hs(a),z=x0(a),b=z+1;zz?Fa(a,E):ttx)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;zx)for(tt=a.Ra;0x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Vx(a){for(var y=Te(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new Ge,Ux(y,x);var z=null,tt=null,ot=null,rt=null,at=(a.ve&1)!==0,ut=(a.ve&2)!==0,ct=(a.ve&4)!==0,mt=(a.ve&8)!==0;for(at&&(a.verticalAlignment(y,x,!0),z=w0(a,y,!0,!1)),y.reverse(),ct&&(a.verticalAlignment(y,x,!1),ot=w0(a,y,!1,!1)),b=$i(y),E=b.next();!E.done;E=b.next())E.value.reverse();mt&&(a.verticalAlignment(y,x,!1),rt=w0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=w0(a,y,!0,!0)),Ze(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(yt){var St=Te();at&&St.push(z.get(yt)),ut&&St.push(tt.get(yt)),ct&&St.push(ot.get(yt)),mt&&St.push(rt.get(yt)),St.sort(function(zt,Bt){return zt-Bt});var Mt=St.length;Mt=(St[Math.floor((Mt-1)/2)]+St[Math.ceil((Mt-1)/2)])/2,Ze(St),yt.zc=Mt})}function Ux(a,y){for(var x=a.length,b=1;but)&&y.add(ct);z++}E=ut}}}uo.prototype.verticalAlignment=function(a,y,x){Zx(a),a=$i(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=$i(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var tt=x?ky(z):Xx(z),ot=tt.length;if(0=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,ot=0;do{for(z=y[tt][ot];z.align!==z.root;)z=z.align,tt++,0a&&$t("Could not determine previous vertex in layer"),y[x][a-1]}uo.prototype.u=function(a){for(var y=[],x=0;xtt;tt++)if(y[tt]){var ot=Kx(this,y[tt],b,E,tt);ottt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?b[x]-b[tt]:E[x]-E[tt],z.delta!==0&&y[tt].each(function(rt){return function(at){at.value+=rt.delta}}(z)));Ze(b),Ze(E)};function Kx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(ot){var rt=ot.key;ot=ot.value,rt=a.K===90||a.K===270?rt.width:rt.height,ottt&&(tt=ot+rt)}),x[E]=z,b[E]=tt,tt-z}uo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=C0(this,!0),y=C0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function C0(a,y){return a.K===270?y?xr:Dr:a.K===90?y?Dr:xr:a.K===180?y?Nr:Gr:y?Gr:Nr}uo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0=ct.bounds.bottom?(ct=ct.bounds.y+ct.bounds.height,y.m(Mt++,Kt,ct+ce),y.m(Mt++,Kt,ct),y.m(Mt++,Kt,ct-Zt)):(y.m(Mt++,Kt,te+ce),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te-Zt)):this.K===270?te<=ct.bounds.y?(ct=ct.bounds.y,y.m(Mt++,Kt,ct-Zt),y.m(Mt++,Kt,ct),y.m(Mt++,Kt,ct+ce)):(y.m(Mt++,Kt,te-Zt),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te+ce)):this.K===0&&(Kt>=ct.bounds.right?(ct=ct.bounds.x+ct.bounds.width,y.m(Mt++,ct+ce,te),y.m(Mt++,ct,te),y.m(Mt++,ct-Zt,te)):(y.m(Mt++,Kt+ce,te),y.m(Mt++,Kt,te),y.m(Mt++,Kt-Zt,te)));else{y.m(Mt++,Bt,Vt);var vn=0;this.K===180||this.K===0?((this.K===180?Kt>=ct.bounds.right:Kt<=ct.bounds.x)&&(vn=(this.K===0?-Zt:ce)/2),y.m(Mt++,Bt+vn,te)):((this.K===270?te>=ct.bounds.bottom:te<=ct.bounds.y)&&(vn=(this.K===90?-Zt:ce)/2),y.m(Mt++,Kt,Vt+vn)),y.m(Mt++,Kt,te)}}else Zt=Math.max(10,this.he[zt.layer]),ce=Math.max(10,this.Ld[zt.layer]),mt?this.K===180?(y.m(Mt++,Kt-Zt-St,te),y.m(Mt++,Math.min(Kt-Zt+St/2,Kt),te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Math.max(Kt+ce-St/2,Kt),te),y.m(Mt++,Kt+ce+St,te)):this.K===90?(y.m(Mt++,Kt,te+ce+St),y.m(Mt++,Kt,Math.max(te+ce-St/2,te)),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,Math.min(te-Zt+St/2,te)),y.m(Mt++,Kt,te-Zt-St)):this.K===270?(y.m(Mt++,Kt,te-Zt-St),y.m(Mt++,Kt,Math.min(te-Zt+St/2,te)),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,Math.max(te+ce-St/2,te)),y.m(Mt++,Kt,te+ce+St)):(y.m(Mt++,Kt+ce+St,te),y.m(Mt++,Math.max(Kt+ce-St/2,Kt),te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Math.min(Kt-Zt+St/2,Kt),te),y.m(Mt++,Kt-Zt-St,te)):y.m(Mt++,Kt,te)}ct=zt}(ot===null||at!==ir||yt)&&(Bt=y.i(Mt-1).x,Vt=y.i(Mt-1).y,Kt=y.i(Mt).x,te=y.i(Mt).y,yt?(St=this.Ld[ut.layer],this.K===180||this.K===0?(yt=Vt,yt>=ut.bounds.y&&yt<=ut.bounds.bottom&&(this.K===180?Kt>=ut.bounds.x:Kt<=ut.bounds.right)&&(ct=ut.centerX+(this.K===180?-St:St),yt=ut.bounds.x&&yt<=ut.bounds.right&&(this.K===270?te>=ut.bounds.y:te<=ut.bounds.bottom)&&(ct=ut.centerY+(this.K===270?-St:St),yt=ut.bounds.x?(ct=ut.bounds.x+ut.bounds.width,y.L(Mt-2,ct,Vt),y.L(Mt-1,ct+ce,Vt)):this.K===90&&te<=ut.bounds.bottom?(ct=ut.bounds.y,y.L(Mt-2,Bt,ct),y.L(Mt-1,Bt,ct-Zt)):this.K===270&&te>=ut.bounds.y?(ct=ut.bounds.y+ut.bounds.height,y.L(Mt-2,Bt,ct),y.L(Mt-1,Bt,ct+ce)):this.K===0&&Kt<=ut.bounds.right&&(ct=ut.bounds.x,y.L(Mt-2,ct,Vt),y.L(Mt-1,ct-Zt,Vt))):(Zt=Math.max(10,this.he[ut.layer]),ce=Math.max(10,this.Ld[ut.layer]),yt=0,this.K===180||this.K===0?((this.K===180?Kt<=ut.bounds.x:Kt>=ut.bounds.right)&&(yt=(this.K===0?ce:-Zt)/2),y.m(Mt++,Kt+yt,Vt)):((this.K===270?te<=ut.bounds.y:te>=ut.bounds.bottom)&&(yt=(this.K===90?ce:-Zt)/2),y.m(Mt++,Bt,te+yt)),y.m(Mt++,Kt,te)))}else{for(;ut!==null&&ut!==ct;){for(Zt=zt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Bt=ut.value,Bt.link!==x.link||(zt=Bt.toVertex,Zt=Bt.fromVertex,Zt.node!==null&&(Zt=null),zt.node!==null)););if(zt===null)break;zt!==ct&&(Bt=y.i(Mt-1).x,Vt=y.i(Mt-1).y,Kt=zt.centerX,te=zt.centerY,yt?this.K===180||this.K===0?(Zt!==null?Zt.centerY:Vt)!==te&&(Zt=this.Ta[zt.layer]+this.Rf.x,Mt===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Bt):Math.min(Zt,Bt)),y.m(Mt++,Zt,Vt),y.m(Mt++,Zt,te)):(Zt!==null?Zt.centerX:Bt)!==Kt&&(Zt=this.Ta[zt.layer]+this.Rf.y,Mt===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,Vt):Math.min(Zt,Vt)),y.m(Mt++,Bt,Zt),y.m(Mt++,Kt,Zt)):(Zt=Math.max(10,this.he[zt.layer]),ce=Math.max(10,this.Ld[zt.layer]),mt?this.K===180?(y.m(Mt++,Kt+ce+St,te),y.m(Mt++,Math.max(Kt+ce-St/2,Kt),te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Math.min(Kt-Zt+St/2,Kt),te),y.m(Mt++,Kt-Zt-St,te)):this.K===90?(y.m(Mt++,Kt,te-Zt-St),y.m(Mt++,Kt,Math.min(te-Zt+St/2,te)),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,Math.max(te+ce-St/2,te)),y.m(Mt++,Kt,te+ce+St)):this.K===270?(y.m(Mt++,Kt,te+ce+St),y.m(Mt++,Kt,Math.max(te+ce-St/2,te)),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,Math.min(te-Zt+St/2,te)),y.m(Mt++,Kt,te-Zt-St)):(y.m(Mt++,Kt-Zt-St,te),y.m(Mt++,Math.min(Kt-Zt+St/2,Kt),te),y.m(Mt++,Kt,te),y.m(Mt++,Kt,te),y.m(Mt++,Math.max(Kt+ce-St/2,Kt),te),y.m(Mt++,Kt+ce+St,te)):this.K===180?(y.m(Mt++,Kt+ce,te),y.m(Mt++,Kt-Zt,te)):this.K===90?(y.m(Mt++,Kt,te-Zt),y.m(Mt++,Kt,te+ce)):this.K===270?(y.m(Mt++,Kt,te+ce),y.m(Mt++,Kt,te-Zt)):(y.m(Mt++,Kt-Zt,te),y.m(Mt++,Kt+ce,te)))),ut=zt}yt&&(Bt=y.i(Mt-1).x,Vt=y.i(Mt-1).y,Kt=y.i(Mt).x,te=y.i(Mt).y,this.K===180||this.K===0?Vt!==te&&(Zt=this.K===0?Math.min(Math.max((Kt+Bt)/2,this.Ta[ct.layer]+this.Rf.x),Kt):Math.max(Math.min((Kt+Bt)/2,this.Ta[ct.layer]+this.Rf.x),Kt),y.m(Mt++,Zt,Vt),y.m(Mt++,Zt,te)):Bt!==Kt&&(Zt=this.K===90?Math.min(Math.max((te+Vt)/2,this.Ta[ct.layer]+this.Rf.y),te):Math.max(Math.min((te+Vt)/2,this.Ta[ct.layer]+this.Rf.y),te),y.m(Mt++,Bt,Zt),y.m(Mt++,Kt,Zt)))}b!==null&&mt&&4<=y.pointsCount&&(tt!==null&&(tt=at===ir?y.getLinkPointFromPoint(E,tt,tt.ga(Vi),y.i(3),!0):y.i(0),at===ir&&(at=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+at.x)/2,at.y),y.L(2,b.x,(at.y+b.y)/2)):(y.L(1,at.x,(tt.y+at.y)/2),y.L(2,(at.x+b.x)/2,b.y))),tt.w()||tt.set(E.actualBounds.center),y.L(0,tt.x,tt.y)),ot!==null&&(E=rt===ir?y.getLinkPointFromPoint(z,ot,ot.ga(Vi),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),rt===ir&&(ot=y.i(y.pointsCount-3),rt=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ot.x)/2,ot.y),y.L(y.pointsCount-2,rt.x,(ot.y+rt.y)/2)):(y.L(y.pointsCount-2,ot.x,(E.y+ot.y)/2),y.L(y.pointsCount-3,(ot.x+rt.x)/2,rt.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},uo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ie,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0z.y&&(ut=at.y>z.y?0:tt.xz.x&&(ut=at.x>z.x?0:tt.yy.layer?1:a.rdy.rd?1:a.Icy.Ic?1:0:0},Ct.Ux=function(a,y){return a instanceof Xh&&y instanceof Xh&&a!==y?a.firsty.first||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},Ct.Js=function(a,y){return a instanceof Xh&&y instanceof Xh&&a!==y?a.jcy.jc||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},Ct.B=function(a,y){return a-=y,-1a},Ct.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&$t("not in range 0 <= from < length: "+x),z===2)b=a[x],E=a[x+1],0=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y=E)for(b=a.slice(x),b.sort(y),y=x;y=a.He.length){for(var b=[],E=0;Ea&&(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 L0=new Ce(uo,"CycleDepthFirst",0),Sy=new Ce(uo,"CycleGreedy",1),vp=new Ce(uo,"CycleFromLayers",2),M0=new Ce(uo,"LayerOptimalLinkLength",0),xy=new Ce(uo,"LayerLongestPathSink",1),Py=new Ce(uo,"LayerLongestPathSource",2),k0=new Ce(uo,"InitDepthFirstOut",0),wy=new Ce(uo,"InitDepthFirstIn",1),Cy=new Ce(uo,"InitNaive",2),Ly=new Ce(uo,"AggressiveNone",0),b0=new Ce(uo,"AggressiveLess",1),My=new Ce(uo,"AggressiveMore",2),Yx=8;uo.className="LayeredDigraphLayout",uo.CycleDepthFirst=L0,uo.CycleGreedy=Sy,uo.CycleFromLayers=vp,uo.LayerOptimalLinkLength=M0,uo.LayerLongestPathSink=xy,uo.LayerLongestPathSource=Py,uo.InitDepthFirstOut=k0,uo.InitDepthFirstIn=wy,uo.InitNaive=Cy,uo.AggressiveNone=Ly,uo.AggressiveLess=b0,uo.AggressiveMore=My,uo.PackNone=0,uo.PackExpand=1,uo.PackStraighten=2,uo.PackMedian=4,uo.PackAll=15,uo.AlignNone=0,uo.AlignUpperLeft=1,uo.AlignUpperRight=2,uo.AlignLowerLeft=4,uo.AlignLowerRight=8,uo.AlignAll=15;function Xh(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Xh.className="SegInfo";function Rf(a){Po.call(this,a)}Me(Rf,Po),Rf.prototype.createVertex=function(){return new Aa(this)},Rf.prototype.createEdge=function(){return new yp(this)},Rf.className="LayeredDigraphNetwork";function Aa(a){Cr.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}Me(Aa,Cr);function ix(a,y){return a.index-y.index}function T0(a,y){if(!a.$n){for(var x=[],b=$i(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=$i(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;$t("Unable to find destination edge to given vertex")}function ky(a){if(!a.co){for(var y=[],x=$i(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=$i(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}Aa.prototype.Cl=function(a){Cr.prototype.Cl.call(this,a),this.bo=this.co=null},Aa.prototype.Kl=function(a){Cr.prototype.Kl.call(this,a),this.bo=this.co=null},Aa.prototype.zl=function(a){Cr.prototype.zl.call(this,a),this.$n=this.ao=null},Aa.prototype.Jl=function(a){Cr.prototype.Jl.call(this,a),this.$n=this.ao=null},Wt.Object.defineProperties(Aa.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Aa.prototype.deleteDestinationEdge=Aa.prototype.Jl,Aa.prototype.addDestinationEdge=Aa.prototype.zl,Aa.prototype.deleteSourceEdge=Aa.prototype.Kl,Aa.prototype.addSourceEdge=Aa.prototype.Cl,Aa.className="LayeredDigraphVertex";function yp(a){ra.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Me(yp,ra),Wt.Object.defineProperties(yp.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)}}}),yp.className="LayeredDigraphEdge";function Ai(a){Bo.call(this),this.Ub=new Ge,this.Wn=A0,this.ud=Xl,this.vo=B0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=D0,this.$d=new pn(10,10).freeze();var y=new kc(this);this.W=new Ka(y),this.Y=new Ka(y),this.ru=[],a&&Object.assign(this,a)}Me(Ai,Bo),Ai.prototype.cloneProtected=function(a){Bo.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)},Ai.prototype.qb=function(a){a.classType===Ai?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:$t("Unknown enum value: "+a):Bo.prototype.qb.call(this,a)},Ai.prototype.createNetwork=function(){return new kc(this)},Ai.prototype.makeNetwork=function(a){function y(b){if(b instanceof wn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof qe){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof fe?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof fi?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ai.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==I0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof fe&&(y=a),this.path===A0&&y!==null?this.ud=y.isTreePathToChildren?Xl:Lc:this.ud=this.path===A0?Xl:this.path,0y.level)return!1;a.removeChild(x.parent,x)}return!0}Ai.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;EE?hx(this,a,tt,ri,Bt,Vt):dx(this,a,tt,ri,Bt,Vt),ri=Vt.x,Bt=Vt.width,Vt=Vt.height;break;case th:for(Kt=0;Ktct&&(Tnzr&&(Cc(a,-zr,0,ci,_i-1),F0(Kt,-zr,0),F0(te,-zr,0),zr=0)}So.S.h(zr,kn),Bt=Math.max(Bt,ce),Vt=Math.max(Vt,Zt+(Qe===0?0:St)+Or.height),Tn=ce}else 0ct&&(knzr&&(Cc(a,0,-zr,ci,_i-1),F0(Kt,0,-zr),F0(te,0,-zr),zr=0)),So.S.h(Tn,zr),Vt=Math.max(Vt,vn),Bt=Math.max(Bt,Zt+(Qe===0?0:St)+Or.width),kn=vn;ze++}switch(0at&&(at=0),135Mt&&(Mt=0),rt===yu&&(ot+=mt/2+a.focus.y),tt+=b+x):y?(a.comments===null?b>Bt&&(Bt=Fy(rt,b-Bt,0),tt=Bt.x,ot=Bt.y,Bt=b,at=0):Bt=Ny(a,Bt,at),0>at&&(tt-=at,at=0),135Vt&&(Vt=Fy(rt,0,zt-Vt),tt=Vt.x,ot=Vt.y,Vt=zt,Mt=0):Vt=Ey(a,Vt,Mt),0>Mt&&(ot-=Mt,Mt=0),tt+=b+x),0E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].yE[0].x?E[3].assign(E[2]):E[2].assign(E[3])),Qe[0].h(at+b,0),Qe[1].h(Qe[0].x,zt),Qe[2].yE[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].xE[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Qe[0].h(0,Mt+zt),Qe[1].h(b,Qe[0].y),Qe[2].xb?hx(a,y,E,ze,Zt,Kt):dx(a,y,E,ze,Zt,Kt),ze=Kt.x,Zt=Kt.width,Kt=Kt.height;break;case th:for(mt=0;mtmt&&(cemt&&(vnct&&(ct=0),135Bt&&(Bt=0)),y.la.h(ct,Bt),y.Da.h(Zt,Kt)}}Ai.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function hx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new ke(b,0,E,z);if(tt===1)return y=x[0],E=y.Da.width,z=y.Da.height,new ke(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=sl(y)===90,ut=0,ct=0,mt=0,yt=0;ytat&&(E-=at),z=Math.max(z,Math.max(yt,mt)+a+tt.height),0>x.S.x&&(b=N0(y,x.S.x,!1,b,ot))):(x.S.h(E+a,b+ot/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(St,ct)+a+tt.width),mt=b+ot/2-x.focus.y-x.la.y,z=Math.max(z,mt+tt.height),0>mt&&(z-=mt),0>x.S.y&&(b=N0(y,x.S.y,!0,b,ot)))),new ke(b,0,E,z)}function dx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new ke(b,0,E,z);if(tt===1)return x=x[0],E=x.Da.width,z=x.Da.height,new ke(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,at=sl(y)===270,ut=0,ct=0,mt=0,yt=0;ytct&&(E-=ct),z=Math.max(z,Math.abs(Math.min(yt,mt))+a+ut.height),0>rt.S.x&&(b=N0(y,rt.S.x,!1,b,ot))):(rt.S.h(-E-ut.width-a,b+ot/2-rt.focus.y-rt.la.y),E=Math.max(E,Math.abs(Math.min(St,ct))+a+ut.width),mt=b+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,mt+ut.height),0>mt&&(z-=mt),0>rt.S.y&&(b=N0(y,rt.S.y,!0,b,ot)))),y=0;yy&&(y=x+a.width),0>x&&(y-=x),y;case _l:return a.width>y?a.width:y;case $l:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case qu:case Jl:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case th:return a.width-a.focus.x+a.nodeSpacing/2+y;case yu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ey(a,y,x){switch(a.alignment){case Mc:case jf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case _l:return a.height>y?a.height:y;case $l:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case qu:case Jl:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case th:return a.height-a.focus.y+a.nodeSpacing/2+y;case yu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Fy(a,y,x){switch(a){case jf:y/=2,x/=2;break;case Mc:y/=2,x/=2;break;case _l:x=y=0;break;case $l:break;default:$t("Unhandled alignment value "+a.toString())}return new It(y,x)}function Bd(a,y,x,b,E,z){y=Fy(y,x,b),Cc(a,y.x,y.y,E,z)}function Cc(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function E0(a,y,x,b){var E=y.parent;switch(a.ud){case Xl:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Lc:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:$t("Unhandled path value "+a.ud.toString())}}function F0(a,y,x){for(var b=0;bct.length||yt===null||2>yt.length))for(E=x=0;xat&&z.yz.y&&aty.length||x===null||2>x.length)b=null;else{for(ut=Us(a,y.length+x.length),b=z=rt=0;zrt;)at=x[z++],ut[b++].h(at.x+E,at.y);for(x=Us(a,b),rt=0;rtct.length||z===null||2>z.length)E=null;else{for(ut=Us(a,ct.length+z.length),E=at=x=0;xz;)rt=ct[x++],ut[E++].h(rt.x,rt.y);for(z=Us(a,E),x=0;xct.length||yt===null||2>yt.length))for(E=x=0;xrt&&z.xz.x&&rty.length||x===null||2>x.length)b=null;else{for(ut=Us(a,y.length+x.length),b=z=rt=0;zrt;)at=x[z++],ut[b++].h(at.x,at.y+E);for(x=Us(a,b),rt=0;rtct.length||z===null||2>z.length)E=null;else{for(ut=Us(a,ct.length+z.length),E=at=x=0;xz;)rt=ct[x++],ut[E++].h(rt.x,rt.y);for(z=Us(a,E),x=0;x=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ai.prototype.computeLayerSpacing=function(a){var y=sl(a);y=y===90||y===270;var x=a.layerSpacing;if(0=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!==O0&&a!==Cp||(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!==zf&&a!==xp&&a!==Pp&&!wp||(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!==O0&&a!==Cp||(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 A0=new Ce(Ai,"PathDefault",-1),Xl=new Ce(Ai,"PathDestination",0),Lc=new Ce(Ai,"PathSource",1),zf=new Ce(Ai,"SortingForwards",10),xp=new Ce(Ai,"SortingReverse",11),Pp=new Ce(Ai,"SortingAscending",12),wp=new Ce(Ai,"SortingDescending",13),jf=new Ce(Ai,"AlignmentCenterSubtrees",20),Mc=new Ce(Ai,"AlignmentCenterChildren",21),_l=new Ce(Ai,"AlignmentStart",22),$l=new Ce(Ai,"AlignmentEnd",23),qu=new Ce(Ai,"AlignmentBus",24),Jl=new Ce(Ai,"AlignmentBusBranching",25),th=new Ce(Ai,"AlignmentTopLeftBus",26),yu=new Ce(Ai,"AlignmentBottomRightBus",27),O0=new Ce(Ai,"CompactionNone",30),Cp=new Ce(Ai,"CompactionBlock",31),B0=new Ce(Ai,"StyleLayered",40),Oy=new Ce(Ai,"StyleLastParents",41),By=new Ce(Ai,"StyleAlternating",42),Dy=new Ce(Ai,"StyleRootOnly",43),D0=new Ce(Ai,"ArrangementVertical",50),Iy=new Ce(Ai,"ArrangementHorizontal",51),I0=new Ce(Ai,"ArrangementFixedRoots",52),Ry=new Ce(Ai,"LayerIndividual",60),zy=new Ce(Ai,"LayerSiblings",61),R0=new Ce(Ai,"LayerUniform",62);Ai.className="TreeLayout",Ai.PathDefault=A0,Ai.PathDestination=Xl,Ai.PathSource=Lc,Ai.SortingForwards=zf,Ai.SortingReverse=xp,Ai.SortingAscending=Pp,Ai.SortingDescending=wp,Ai.AlignmentCenterSubtrees=jf,Ai.AlignmentCenterChildren=Mc,Ai.AlignmentStart=_l,Ai.AlignmentEnd=$l,Ai.AlignmentBus=qu,Ai.AlignmentBusBranching=Jl,Ai.AlignmentTopLeftBus=th,Ai.AlignmentBottomRightBus=yu,Ai.CompactionNone=O0,Ai.CompactionBlock=Cp,Ai.StyleLayered=B0,Ai.StyleLastParents=Oy,Ai.StyleAlternating=By,Ai.StyleRootOnly=Dy,Ai.ArrangementVertical=D0,Ai.ArrangementHorizontal=Iy,Ai.ArrangementFixedRoots=I0,Ai.LayerIndividual=Ry,Ai.LayerSiblings=zy,Ai.LayerUniform=R0;function kc(a){Po.call(this,a)}Me(kc,Po),kc.prototype.createVertex=function(){return new Ka(this)},kc.prototype.createEdge=function(){return new Gf(this)},kc.className="TreeNetwork";function Ka(a){Cr.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 It(0,0),this.Da=new pn(0,0),this.la=new It(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=zf,this.hd=oy,this.Kb=0,this.Jb=Mc,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Cp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=ao,this.wr=!0,this.Dp=ao}Me(Ka,Cr),Ka.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)},Wt.Object.defineProperties(Ka.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;xyt.y+x.rowIndent&&(z=Math.min(z,Math.max(ct.y,z-y.computeNodeIndent(x))))):x.alignment===_l?(z=b.top+E.y,E.y===0&&ct.yyt.x+x.rowIndent&&(z=Math.min(z,Math.max(ct.x,z-y.computeNodeIndent(x))))):x.alignment===_l?(z=b.left+E.x,E.x===0&&ct.xyt.y+x.rowIndent&&(z=Math.min(z,Math.max(ct.y,z-y.computeNodeIndent(x))))):x.alignment===_l?(z=b.top+E.y,E.y===0&&ct.yyt.x+x.rowIndent&&(z=Math.min(z,Math.max(ct.x,z-y.computeNodeIndent(x))))):x.alignment===_l?(z=b.left+E.x,E.x===0&&ct.x0&&Gt[Gt.length-1])||Ee[0]!==6&&Ee[0]!==2)){ye=0;continue}if(Ee[0]===3&&(!Gt||Ee[1]>Gt[0]&&Ee[1]',"select"),this.addActionButton(Ft,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ft,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ft,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ft,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ft,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ft,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ft,'',"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(kt){var ye=document.createElement("div");ye.className=""+xt.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",kt.typeName),ye.innerHTML=kt.icon,ye.addEventListener("click",function(){xt.markerToolbarButtonClicked(ye,kt)}),xt.buttons.push(ye),xt.markerButtons.push(ye)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Gt=document.createElement("div");Gt.className=this.toolbarBlockStyleClass.name,Gt.style.whiteSpace="nowrap",Gt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Gt),this.addActionButton(Gt,'',"render"),this.addActionButton(Gt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Dt.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},Dt.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Dt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Dt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Lt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var xt=0;xt0&&this.buttonClickListeners.forEach(function(Ft){return Ft("marker",xt)}),this.markerButtonOverflowBlock.style.display="none"},Dt.prototype.actionToolbarButtonClicked=function(Lt,xt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ft){return Ft("action",xt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Dt.prototype.setActiveButton=function(Lt){this.resetButtonStyles(),Lt.className=Lt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Dt.prototype.setActiveMarkerButton=function(Lt){var xt=this.markerButtons.find(function(Ft){return Ft.getAttribute("data-type-name")===Lt});xt&&this.setActiveButton(xt)},Dt.prototype.setCurrentMarker=function(Lt){var xt=this;this.currentMarker=Lt,this.buttons.filter(function(Ft){return/delete|notes/.test(Ft.getAttribute("data-action"))}).forEach(function(Ft){xt.currentMarker===void 0?(Ft.style.fillOpacity="0.4",Ft.style.pointerEvents="none"):(Ft.style.fillOpacity="1",Ft.style.pointerEvents="all")})},Dt}(),At=function(){function Dt(Lt,xt,Ft,Gt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=xt,this.uiStyleSettings=Ft,this.styles=Gt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Dt.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new me("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 me("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var xt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("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 me("toolbox-panel-row_colors",` background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px; padding: `+xt+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Xe("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Xe("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},Dt.prototype.show=function(Lt){var xt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&xt!==void 0?xt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Dt.prototype.setPanelButtons=function(Lt){var xt,Ft,Gt=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&xt!==void 0?xt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ft=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ft!==void 0?Ft:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var ye;kt.uiStyleSettings=Gt.uiStyleSettings;var Le=document.createElement("div");Le.className=Gt.toolboxButtonStyleClass.name+" "+((ye=Gt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:Gt.toolboxButtonStyleColorsClass.name),Le.innerHTML=kt.icon,Le.title=kt.title,Le.addEventListener("click",function(){Gt.panelButtonClick(kt)}),Gt.panelButtons.push(Le),Gt.buttonRow.appendChild(Le)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Dt.prototype.panelButtonClick=function(Lt){var xt=this,Ft=-1;if(Lt!==this.activePanel){Ft=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Gt=Lt.getUi();Gt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Gt),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=Lt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){xt.displayMode==="inline"?xt.panelRow.style.display="none":xt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,ye){var Le,xn;kt.className=xt.toolboxButtonStyleClass.name+" "+(ye===Ft?""+((Le=xt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Le!==void 0?Le:xt.toolboxActiveButtonStyleColorsClass.name):""+((xn=xt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xn!==void 0?xn:xt.toolboxButtonStyleColorsClass.name))})},Dt}(),et=function(Dt,Lt){this.title=Dt,this.icon=Lt},nt=function(Dt){function Lt(xt,Ft,Gt,kt){var ye=Dt.call(this,xt,kt||'')||this;return ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=Ft,ye.currentColor=Gt,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.style.whiteSpace="nowrap",this.colors.forEach(function(Gt){var kt=xt.getColorBox(Gt);Ft.appendChild(kt),xt.colorBoxes.push(kt)}),Ft},Lt.prototype.getColorBox=function(xt){var Ft=this,Gt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Gt,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=kt-2+"px",ye.style.height=kt-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(kt+2)/2+"px",ye.style.borderColor=xt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Ft.setCurrentColor(xt,ye)});var Le=document.createElement("div");return Le.style.display="inline-block",Le.style.width=kt-2+"px",Le.style.height=kt-2+"px",Le.style.backgroundColor=xt,Le.style.borderRadius=kt/2+"px",xt==="transparent"&&(Le.style.fill=this.uiStyleSettings.toolboxAccentColor,Le.innerHTML=` `),ye.appendChild(Le),ye},Lt.prototype.setCurrentColor=function(xt,Ft){var Gt=this;this.currentColor=xt,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(xt)},Lt}(et),ft=function(){function Dt(Lt,xt,Ft){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=xt,this.globalSettings=Ft,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Dt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Dt.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(Dt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Dt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Dt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Dt.prototype.pointerDown=function(Lt,xt){},Dt.prototype.dblClick=function(Lt,xt){},Dt.prototype.manipulate=function(Lt){},Dt.prototype.pointerUp=function(Lt){this.stateChanged()},Dt.prototype.dispose=function(){},Dt.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Dt.prototype.getState=function(){return{typeName:Dt.typeName,state:this.state,notes:this.notes}},Dt.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Dt.prototype.scale=function(Lt,xt){},Dt.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Dt.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Dt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Lt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Lt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Lt)&&this.onStateChanged(this)}},Dt.typeName="MarkerBase",Dt}(),lt=function(){function Dt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Dt.prototype.findGripByVisual=function(Lt){return this.topLeft.ownsTarget(Lt)?this.topLeft:this.topCenter.ownsTarget(Lt)?this.topCenter:this.topRight.ownsTarget(Lt)?this.topRight:this.centerLeft.ownsTarget(Lt)?this.centerLeft:this.centerRight.ownsTarget(Lt)?this.centerRight:this.bottomLeft.ownsTarget(Lt)?this.bottomLeft:this.bottomCenter.ownsTarget(Lt)?this.bottomCenter:this.bottomRight.ownsTarget(Lt)?this.bottomRight:void 0},Dt}(),pt=function(){function Dt(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Dt.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Dt}(),vt=function(){function Dt(){}return Dt.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Dt.toSVGMatrix=function(Lt,xt){return Lt.a=xt.a,Lt.b=xt.b,Lt.c=xt.c,Lt.d=xt.d,Lt.e=xt.e,Lt.f=xt.f,Lt},Dt}(),wt=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.left=0,kt.top=0,kt.width=0,kt.height=0,kt.defaultSize={x:50,y:20},kt.offsetX=0,kt.offsetY=0,kt.rotationAngle=0,kt.CB_DISTANCE=10,kt._suppressMarkerCreateEvent=!1,kt.container.transform.baseVal.appendItem(ue.createTransform()),kt.setupControlBox(),kt}return de(Lt,Dt),Object.defineProperty(Lt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"visual",{get:function(){return this._visual},set:function(xt){this._visual=xt;var Ft=ue.createTransform();this._visual.transform.baseVal.appendItem(Ft)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(xt){return!!Dt.prototype.ownsTarget.call(this,xt)||!!(this.controlGrips.findGripByVisual(xt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(xt))},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.left=xt.x,this.top=xt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Gt=this.unrotatePoint(xt);if(this.manipulationStartX=Gt.x,this.manipulationStartY=Gt.y,this.offsetX=Gt.x-this.left,this.offsetY=Gt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ft),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ft)){this.activeGrip=this.rotatorGrip;var kt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=kt.x-this.width/2,this.top=kt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(xt){var Ft=this.state;Dt.prototype.pointerUp.call(this,xt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(xt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(xt){this.visual.style.transform="translate("+xt.x+"px, "+xt.y+"px)"},Lt.prototype.manipulate=function(xt){var Ft=this.unrotatePoint(xt);this.state==="creating"?this.resize(xt):this.state==="move"?(this.left=this.manipulationStartLeft+(Ft.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ft.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ft):this.state==="rotate"&&this.rotate(xt)},Lt.prototype.resize=function(xt){var Ft=this.manipulationStartLeft,Gt=this.manipulationStartWidth,kt=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ft=this.manipulationStartLeft+xt.x-this.manipulationStartX,Gt=this.manipulationStartWidth+this.manipulationStartLeft-Ft;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Gt=this.manipulationStartWidth+xt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+xt.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+xt.y-this.manipulationStartY}Gt>=0?(this.left=Ft,this.width=Gt):(this.left=Ft+Gt,this.width=-Gt),ye>=0?(this.top=kt,this.height=ye):(this.top=kt+ye,this.height=-ye),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(xt){if(Math.abs(xt.x-this.centerX)>.1){var Ft=Math.sign(xt.x-this.centerX);this.rotationAngle=180*Math.atan((xt.y-this.centerY)/(xt.x-this.centerX))/Math.PI+90*Ft,this.applyRotation()}},Lt.prototype.applyRotation=function(){var xt=this.container.transform.baseVal.getItem(0);xt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xt,0)},Lt.prototype.rotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Ft=this.container.getCTM(),Gt=ue.createPoint(xt.x,xt.y);return{x:(Gt=Gt.matrixTransform(Ft)).x,y:Gt.y}},Lt.prototype.unrotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Ft=this.container.getCTM();Ft=Ft.inverse();var Gt=ue.createPoint(xt.x,xt.y);return{x:(Gt=Gt.matrixTransform(Ft)).x,y:Gt.y}},Lt.prototype.select=function(){Dt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Dt.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var xt=ue.createTransform();xt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(xt),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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 lt,this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){var xt=this.controlBox.transform.baseVal.getItem(0);xt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(xt,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()},Lt.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()},Lt.prototype.createGrip=function(){var xt=new pt;return xt.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(xt.visual),xt},Lt.prototype.positionGrips=function(){var xt=this.controlGrips.topLeft.GRIP_SIZE,Ft=-xt/2,Gt=Ft,kt=(this.width+this.CB_DISTANCE)/2-xt/2,ye=(this.height+this.CB_DISTANCE)/2-xt/2,Le=this.height+this.CB_DISTANCE-xt/2,xn=this.width+this.CB_DISTANCE-xt/2;this.positionGrip(this.controlGrips.topLeft.visual,Ft,Gt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Gt),this.positionGrip(this.controlGrips.topRight.visual,xn,Gt),this.positionGrip(this.controlGrips.centerLeft.visual,Ft,ye),this.positionGrip(this.controlGrips.centerRight.visual,xn,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,Ft,Le),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,Le),this.positionGrip(this.controlGrips.bottomRight.visual,xn,Le),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Gt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(xt,Ft,Gt){var kt=xt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Gt),xt.transform.baseVal.replaceItem(kt,0)},Lt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Lt.prototype.showControlBox=function(){this.controlBox.style.display=""},Lt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:vt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:vt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Dt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt);var Ft=xt;this.left=Ft.left,this.top=Ft.top,this.width=Ft.width,this.height=Ft.height,this.rotationAngle=Ft.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ft.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ft.containerTransformMatrix))},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft);var Gt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Gt.x*xt,y:Gt.y*Ft});this.left=kt.x,this.top=kt.y,this.width=this.width*xt,this.height=this.height*Ft,this.adjustControlBox()},Lt}(ft),Nt=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=ue.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)},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.manipulate=function(xt){Dt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){Dt.prototype.resize.call(this,xt),this.setSize()},Lt.prototype.setSize=function(){Dt.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(xt){Dt.prototype.pointerUp.call(this,xt),this.setSize()},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},Lt.prototype.setFillColor=function(xt){this.fillColor=xt,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Dt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){var Ft=xt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.opacity=Ft.opacity,this.createVisual(),Dt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft),this.setSize()},Lt.title="Rectangle marker",Lt}(wt),bt=function(Dt){function Lt(xt,Ft,Gt,kt){var ye=Dt.call(this,xt,kt||'')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=Ft,ye.currentWidth=Gt,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.widths.forEach(function(Gt){var kt=document.createElement("div");kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Gt===xt.currentWidth?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentWidth(Gt,kt)}),Ft.appendChild(kt);var ye=document.createElement("div");ye.innerText=Gt.toString(),ye.style.marginRight="5px",kt.appendChild(ye);var Le=document.createElement("div");Le.style.minHeight="20px",Le.style.flexGrow="2",Le.style.display="flex",Le.style.alignItems="center";var xn=document.createElement("hr");xn.style.minWidth="20px",xn.style.border="0px",xn.style.borderTop=Gt+"px solid "+xt.uiStyleSettings.toolboxColor,xn.style.flexGrow="2",Le.appendChild(xn),kt.appendChild(Le),xt.widthBoxes.push(kt)}),Ft},Lt.prototype.setCurrentWidth=function(xt,Ft){var Gt=this;this.currentWidth=xt,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(et),Ht=function(Dt){function Lt(xt,Ft,Gt,kt){var ye=Dt.call(this,xt,kt||'')||this;return ye.styles=[],ye.styleBoxes=[],ye.styles=Ft,ye.currentStyle=Gt,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.styles.forEach(function(Gt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/xt.styles.length-5+"%",kt.style.borderColor=Gt===xt.currentStyle?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentStyle(Gt,kt)}),Ft.appendChild(kt);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var Le=` `;ye.innerHTML=Le,kt.appendChild(ye),xt.styleBoxes.push(kt)}),Ft},Lt.prototype.setCurrentStyle=function(xt,Ft){var Gt=this;this.currentStyle=xt,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(et),_t=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new bt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return de(Lt,Dt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Dt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='',Lt}(Nt),Qt=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"},qt=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.x1=0,kt.y1=0,kt.x2=0,kt.y2=0,kt.defaultLength=50,kt.manipulationStartX=0,kt.manipulationStartY=0,kt.manipulationStartX1=0,kt.manipulationStartY1=0,kt.manipulationStartX2=0,kt.manipulationStartY2=0,kt.setupControlBox(),kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!!Dt.prototype.ownsTarget.call(this,xt)||!(!this.grip1.ownsTarget(xt)&&!this.grip2.ownsTarget(xt))},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.manipulationStartX=xt.x,this.manipulationStartY=xt.y,this.state==="new"&&(this.x1=xt.x,this.y1=xt.y,this.x2=xt.x,this.y2=xt.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(Ft)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ft)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(xt){var Ft=this.state;Dt.prototype.pointerUp.call(this,xt),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(xt),this._state="select",Ft==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(xt){this.state==="creating"?this.resize(xt):this.state==="move"?(this.x1=this.manipulationStartX1+xt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+xt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+xt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+xt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(xt)},Lt.prototype.resize=function(xt){switch(this.activeGrip){case this.grip1:this.x1=xt.x,this.y1=xt.y;break;case this.grip2:case void 0:this.x2=xt.x,this.y2=xt.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){Dt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Dt.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){this.positionGrips()},Lt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Lt.prototype.createGrip=function(){var xt=new pt;return xt.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(xt.visual),xt},Lt.prototype.positionGrips=function(){var xt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-xt/2,this.y1-xt/2),this.positionGrip(this.grip2.visual,this.x2-xt/2,this.y2-xt/2)},Lt.prototype.positionGrip=function(xt,Ft,Gt){var kt=xt.transform.baseVal.getItem(0);kt.setTranslate(Ft,Gt),xt.transform.baseVal.replaceItem(kt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Dt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt);var Ft=xt;this.x1=Ft.x1,this.y1=Ft.y1,this.x2=Ft.x2,this.y2=Ft.y2},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft),this.x1=this.x1*xt,this.y1=this.y1*Ft,this.x2=this.x2*xt,this.y2=this.y2*Ft,this.adjustVisual(),this.adjustControlBox()},Lt}(ft),Se=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new bt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorLine&&xt!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Lt.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Dt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt);var Ft=xt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='',Lt}(qt),he=function(Dt){function Lt(xt,Ft,Gt,kt){var ye=Dt.call(this,xt,kt||'')||this;return ye.fonts=[],ye.fontBoxes=[],ye.fonts=Ft,ye.currentFont=Gt,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.overflow="hidden",Ft.style.flexGrow="2",this.fonts.forEach(function(Gt){var kt=document.createElement("div");kt.style.display="inline-block",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/xt.fonts.length-5+"%",kt.style.borderColor=Gt===xt.currentFont?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentFont(Gt,kt)}),Ft.appendChild(kt);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=Gt,ye.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",ye.appendChild(Le),kt.appendChild(ye),xt.fontBoxes.push(kt)}),Ft},Lt.prototype.setCurrentFont=function(xt,Ft){var Gt=this;this.currentFont=xt,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(et),Re=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.color="transparent",kt.padding=5,kt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",kt.text=kt.DEFAULT_TEXT,kt.isMoved=!1,kt.color=Gt.defaultColor,kt.fontFamily=Gt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setColor=kt.setColor.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.renderText=kt.renderText.bind(kt),kt.sizeText=kt.sizeText.bind(kt),kt.textEditDivClicked=kt.textEditDivClicked.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.setSize=kt.setSize.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.colorPanel=new nt("Color",Gt.defaultColorSet,Gt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){if(Dt.prototype.ownsTarget.call(this,xt)||xt===this.visual||xt===this.textElement||xt===this.bgRectangle)return!0;var Ft=!1;return this.textElement.childNodes.forEach(function(Gt){Gt===xt&&(Ft=!0)}),Ft},Lt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.renderText=function(){var xt=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(Ft){xt.textElement.appendChild(ue.createTSpan(Ft.trim()===""?" ":Ft.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var xt=this.textElement.getBBox(),Ft=1;if(xt.width>0&&xt.height>0){var Gt=(1*this.width-this.width*this.padding*2/100)/xt.width,kt=(1*this.height-this.height*this.padding*2/100)/xt.height;Ft=Math.min(Gt,kt)}return Ft},Lt.prototype.getTextPosition=function(xt){var Ft=this.textElement.getBBox(),Gt=0,kt=0;return Ft.width>0&&Ft.height>0&&(Gt=(this.width-Ft.width*xt)/2,kt=this.height/2-Ft.height*xt/2),{x:Gt,y:kt}},Lt.prototype.sizeText=function(){var xt=this.textElement.getBBox(),Ft=this.getTextScale(),Gt=this.getTextPosition(Ft);Gt.y-=xt.y*Ft,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Gt.x+"px, "+Gt.y+"px) scale("+Ft+", "+Ft+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Gt.x,Gt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ft,Ft))},Lt.prototype.manipulate=function(xt){Dt.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(xt){Dt.prototype.resize.call(this,xt),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Dt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(xt){var Ft=this.state;Ft==="creating"&&(this._suppressMarkerCreateEvent=!0),Dt.prototype.pointerUp.call(this,xt),this.setSize(),(Ft==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var xt=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(Ft){Ft.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ft=Number.parseFloat(xt.textEditor.style.fontSize);xt.textEditor.clientWidth>=Number.parseInt(xt.textEditor.style.maxWidth)&&Ft>.9;)Ft-=.1,xt.textEditor.style.fontSize=Math.max(Ft,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ft){Ft.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ft){if(Ft.clipboardData){var Gt=Ft.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Gt)),Ft.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){xt.textEditDivClicked(xt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Lt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var xt=this.getTextScale(),Ft=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Gt=this.textElement.getBBox(),kt={x:Gt.width*xt,y:Gt.height*xt};Ft.x-=kt.x/2,Ft.y-=kt.y/2,this.textEditor.style.top=Ft.y+"px",this.textEditor.style.left=Ft.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ft.x+"px",this.textEditor.style.fontSize=Math.max(16*xt,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(xt){this.text=xt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){Dt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Dt.prototype.deselect.call(this)},Lt.prototype.dblClick=function(xt,Ft){Dt.prototype.dblClick.call(this,xt,Ft),this.showTextEditor()},Lt.prototype.setColor=function(xt){this.textElement&&ue.setAttributes(this.textElement,[["fill",xt]]),this.color=xt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(xt)},Lt.prototype.setFont=function(xt){this.textElement&&ue.setAttributes(this.textElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Lt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Lt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Dt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){var Ft=xt;this.color=Ft.color,this.fontFamily=Ft.fontFamily,this.padding=Ft.padding,this.text=Ft.text,this.createVisual(),Dt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.icon='',Lt}(wt),pe=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=Gt.defaultColor,kt.lineWidth=Gt.defaultStrokeWidth,kt.pixelRatio=Gt.freehandPixelRatio,kt.setColor=kt.setColor.bind(kt),kt.addCanvas=kt.addCanvas.bind(kt),kt.finishCreation=kt.finishCreation.bind(kt),kt.setLineWidth=kt.setLineWidth.bind(kt),kt.colorPanel=new nt("Color",Gt.defaultColorSet,Gt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new bt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var xt=ue.createTransform();this.visual.transform.baseVal.appendItem(xt),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(xt,Ft){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(xt.x,xt.y),this.drawing=!0):Dt.prototype.pointerDown.call(this,xt,Ft)},Lt.prototype.manipulate=function(xt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(xt.x,xt.y),this.canvasContext.stroke()):Dt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){Dt.prototype.resize.call(this,xt),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(xt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Dt.prototype.pointerUp.call(this,xt)},Lt.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)},Lt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Dt.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Dt.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var xt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ft=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Gt=Ft[0],kt=Ft[1],ye=Ft[2],Le=Ft[3],xn=!1,cn=0;cn0&&(xn=!0,cnLe&&(Le=cn),Ee>ye&&(ye=Ee));if(xn){this.left=Gt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(ye-Gt)/this.pixelRatio,this.height=(Le-kt)/this.pixelRatio;var tn=document.createElement("canvas");tn.width=ye-Gt,tn.height=Le-kt,tn.getContext("2d").putImageData(this.canvasContext.getImageData(Gt,kt,ye-Gt,Le-kt),0,0),this.drawingImgUrl=tn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(xt){this.color=xt,this.colorChanged(xt)},Lt.prototype.setLineWidth=function(xt){this.lineWidth=xt},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({drawingImgUrl:this.drawingImgUrl},Dt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){this.createVisual(),Dt.prototype.restoreState.call(this,xt),this.drawingImgUrl=xt.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.icon='',Lt}(wt),Ke=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Gt||'')||this;return kt.typeBoxes=[],kt.currentType=Ft,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2";for(var Gt=function(Le){var xn="both";switch(Le){case 0:xn="both";break;case 1:xn="start";break;case 2:xn="end";break;case 3:xn="none"}var cn=document.createElement("div");if(cn.style.display="flex",cn.style.flexGrow="2",cn.style.alignItems="center",cn.style.justifyContent="space-between",cn.style.padding="5px",cn.style.borderWidth="2px",cn.style.borderStyle="solid",cn.style.borderColor=xn===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",cn.addEventListener("click",function(){xt.setCurrentType(xn,cn)}),Ft.appendChild(cn),xn==="both"||xn==="start"){var Ee=document.createElement("div");Ee.style.display="flex",Ee.style.alignItems="center",Ee.style.minHeight="20px",Ee.innerHTML=` `,Ee.style.marginLeft="5px",cn.appendChild(Ee)}var tn=document.createElement("div");tn.style.display="flex",tn.style.alignItems="center",tn.style.minHeight="20px",tn.style.flexGrow="2";var fn=document.createElement("hr");if(fn.style.minWidth="20px",fn.style.border="0px",fn.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),fn.style.flexGrow="2",tn.appendChild(fn),cn.appendChild(tn),xn==="both"||xn==="end"){var rn=document.createElement("div");rn.style.display="flex",rn.style.alignItems="center",rn.style.minHeight="20px",rn.innerHTML=` `,rn.style.marginRight="5px",cn.appendChild(rn)}kt.typeBoxes.push(cn)},kt=this,ye=0;ye<4;ye++)Gt(ye);return Ft},Lt.prototype.setCurrentType=function(xt,Ft){var Gt=this;this.currentType=xt,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings!==void 0?Gt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(et),Cn=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.arrowType="end",kt.arrowBaseHeight=10,kt.arrowBaseWidth=10,kt.getArrowPoints=kt.getArrowPoints.bind(kt),kt.setArrowType=kt.setArrowType.bind(kt),kt.arrowTypePanel=new Ke("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.arrow1&&xt!==this.arrow2)},Lt.prototype.getArrowPoints=function(xt,Ft){var Gt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return xt-Gt/2+","+(Ft+kt/2)+" "+xt+","+(Ft-kt/2)+" "+(xt+Gt/2)+","+(Ft+kt/2)},Lt.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Dt.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var xt=0;Math.abs(this.x1-this.x2)>.1&&(xt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ft=this.arrow1.transform.baseVal.getItem(0);Ft.setRotate(xt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ft,0);var Gt=this.arrow2.transform.baseVal.getItem(0);Gt.setRotate(xt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Gt,0)}},Lt.prototype.setArrowType=function(xt){this.arrowType=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({arrowType:this.arrowType},Dt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt);var Ft=xt;this.arrowType=Ft.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='',Lt}(Se),ln=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.fillColor=Gt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new nt("Color",Gt.defaultColorSet,Gt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return de(Lt,Dt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Dt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='',Lt}(Nt),dn=function(Dt){function Lt(xt,Ft,Gt,kt){var ye=Dt.call(this,xt,kt||'')||this;return ye.opacities=[],ye.opacityBoxes=[],ye.opacities=Ft,ye.currentOpacity=Gt,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return de(Lt,Dt),Lt.prototype.getUi=function(){var xt=this,Ft=document.createElement("div");return Ft.style.display="flex",Ft.style.overflow="hidden",Ft.style.flexGrow="2",Ft.style.justifyContent="space-between",this.opacities.forEach(function(Gt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="center",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Gt===xt.currentOpacity?xt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){xt.setCurrentOpacity(Gt,kt)}),Ft.appendChild(kt);var ye=document.createElement("div");ye.innerText=100*Gt+"%",kt.appendChild(ye),xt.opacityBoxes.push(kt)}),Ft},Lt.prototype.setCurrentOpacity=function(xt,Ft){var Gt=this;this.currentOpacity=xt,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Ft?Gt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(et),Hn=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Gt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Gt.defaultHighlightOpacity,kt.fillPanel=new nt("Color",Gt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new dn("Opacity",Gt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return de(Lt,Dt),Lt.prototype.setOpacity=function(xt){this.opacity=xt,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Dt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.icon='',Lt}(ln),ae='',Ut='',hn=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.bgColor="transparent",kt.tipPosition={x:0,y:0},kt.tipBase1Position={x:0,y:0},kt.tipBase2Position={x:0,y:0},kt.tipMoving=!1,kt.color=Gt.defaultStrokeColor,kt.bgColor=Gt.defaultFillColor,kt.fontFamily=Gt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setBgColor=kt.setBgColor.bind(kt),kt.getTipPoints=kt.getTipPoints.bind(kt),kt.positionTip=kt.positionTip.bind(kt),kt.setTipPoints=kt.setTipPoints.bind(kt),kt.colorPanel=new nt("Text color",Gt.defaultColorSet,kt.color,ae),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new nt("Fill color",Gt.defaultColorSet,kt.bgColor,Ut),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new pt,kt.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return Dt.prototype.ownsTarget.call(this,xt)||this.tipGrip.ownsTarget(xt)||this.tip===xt},Lt.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(xt,Ft){this.state==="new"&&Dt.prototype.pointerDown.call(this,xt,Ft),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ft)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Dt.prototype.pointerDown.call(this,xt,Ft)},Lt.prototype.pointerUp=function(xt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Dt.prototype.pointerUp.call(this,xt);else{var Ft=this.state==="creating";Dt.prototype.pointerUp.call(this,xt),this.setTipPoints(Ft),this.positionTip()}},Lt.prototype.manipulate=function(xt){if(this.tipMoving){var Ft=this.unrotatePoint(xt);this.tipPosition={x:Ft.x-this.manipulationStartLeft,y:Ft.y-this.manipulationStartTop},this.positionTip()}else Dt.prototype.manipulate.call(this,xt)},Lt.prototype.setBgColor=function(xt){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",xt]]),ue.setAttributes(this.tip,[["fill",xt]])),this.bgColor=xt,this.fillColorChanged(xt)},Lt.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},Lt.prototype.setTipPoints=function(xt){xt===void 0&&(xt=!1);var Ft=Math.min(this.height/2,15),Gt=this.height/5;xt&&(this.tipPosition={x:Ft+Gt/2,y:this.height+20});var kt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?kt.1)){var xt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ft=this.tip1.transform.baseVal.getItem(0);Ft.setRotate(xt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ft,0);var Gt=this.tip2.transform.baseVal.getItem(0);Gt.setRotate(xt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Gt,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Dt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.icon='',Lt}(Se),Oe=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.strokePanel.colors=Gt.defaultColorSet,kt.fillColor="transparent",kt}return de(Lt,Dt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Dt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.icon='',Lt}(Qn),en=function(){function Dt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Dt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Dt.prototype.addUndoStep=function(Lt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Lt)||(this.undoStack.push(Lt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Lt)&&this.redoStack.splice(0,this.redoStack.length))},Dt.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},Dt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Dt.prototype.undo=function(){if(this.undoStack.length>1){var Lt=this.undoStack.pop();return Lt!==void 0&&this.redoStack.push(Lt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Dt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Dt}(),mn=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.curveX=0,kt.curveY=0,kt.manipulationStartCurveX=0,kt.manipulationStartCurveY=0,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.positionGrips=kt.positionGrips.bind(kt),kt.addControlGrips=kt.addControlGrips.bind(kt),kt.adjustVisual=kt.adjustVisual.bind(kt),kt.setupControlBox=kt.setupControlBox.bind(kt),kt.resize=kt.resize.bind(kt),kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Gt.defaultColorSet,Gt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new bt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorCurve&&xt!==this.visibleCurve&&!this.curveGrip.ownsTarget(xt))},Lt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Lt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=xt.x,this.curveY=xt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ft)&&(this.activeGrip=this.curveGrip,this._state="resize")},Lt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Dt.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},Lt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Dt.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){Dt.prototype.positionGrips.call(this);var xt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-xt/2,this.curveY-xt/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()))},Lt.prototype.manipulate=function(xt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+xt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+xt.y-this.manipulationStartY),Dt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){this.activeGrip===this.curveGrip&&(this.curveX=xt.x,this.curveY=xt.y),Dt.prototype.resize.call(this,xt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual()},Lt.prototype.scale=function(xt,Ft){this.curveX=this.curveX*xt,this.curveY=this.curveY*Ft,Dt.prototype.scale.call(this,xt,Ft)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Dt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){Dt.prototype.restoreState.call(this,xt);var Ft=xt;this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.curveX=Ft.curveX,this.curveY=Ft.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.icon='',Lt}(qt),Yn=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,Ft,Gt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.textColor="transparent",kt.fontSize="1rem",kt.isMoved=!1,kt.captionText="Caption",kt.PADDING=5,kt.captionBoxWidth=0,kt.captionBoxHeight=0,kt.strokeColor=Gt.defaultColor,kt.strokeWidth=Gt.defaultStrokeWidth,kt.strokeDasharray=Gt.defaultStrokeDasharray,kt.fillColor=Gt.defaultFillColor,kt.textColor=Gt.defaultStrokeColor,kt.fontFamily=Gt.defaultFontFamily,kt.fontSize=Gt.defaultCaptionFontSize,kt.captionText=Gt.defaultCaptionText,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.sizeCaption=kt.sizeCaption.bind(kt),kt.setCaptionText=kt.setCaptionText.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.finishTextEditing=kt.finishTextEditing.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.setTextColor=kt.setTextColor.bind(kt),kt.strokePanel=new nt("Line color",Jt(Gt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",Jt(Gt.defaultColorSet,["transparent"]),kt.fillColor,Ut),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new bt("Line width",Gt.defaultStrokeWidths,Gt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",Gt.defaultStrokeDasharrays,Gt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new he("Font",Gt.defaultFontFamilies,Gt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new nt("Text color",Gt.defaultColorSet,kt.textColor,ae),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return de(Lt,Dt),Lt.prototype.ownsTarget=function(xt){return!(!Dt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.frame&&xt!==this.captionBg&&xt!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=ue.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ue.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ue.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=ue.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()},Lt.prototype.setCaptionText=function(xt){this.captionText=xt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(xt,Ft){Dt.prototype.pointerDown.call(this,xt,Ft),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.manipulate=function(xt){Dt.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(xt){Dt.prototype.resize.call(this,xt),this.setSize()},Lt.prototype.sizeCaption=function(){var xt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=xt.width+2*this.PADDING,this.captionBoxHeight=xt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ue.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')"]]),ue.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')"]])},Lt.prototype.showTextEditor=function(){var xt=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(Ft){Ft.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ft){Ft.key==="Enter"&&xt.finishTextEditing(xt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ft){Ft.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Lt.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"))},Lt.prototype.finishTextEditing=function(xt){this.setCaptionText(xt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(xt){this.captionElement&&ue.setAttributes(this.captionElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(xt){this.captionElement&&ue.setAttributes(this.captionElement,[["fill",xt]]),this.textColor=xt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Dt.prototype.setSize.call(this),ue.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(xt){Dt.prototype.pointerUp.call(this,xt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(xt,Ft){Dt.prototype.dblClick.call(this,xt,Ft),this.showTextEditor()},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.frame&&ue.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},Lt.prototype.setFillColor=function(xt){this.fillColor=xt,this.captionBg&&ue.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(xt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.frame&&ue.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.frame&&ue.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=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},Dt.prototype.getState.call(this));return xt.typeName=this.typeName,xt},Lt.prototype.restoreState=function(xt){var Ft=xt;this.fillColor=Ft.fillColor,this.strokeColor=Ft.strokeColor,this.strokeWidth=Ft.strokeWidth,this.strokeDasharray=Ft.strokeDasharray,this.textColor=Ft.textColor,this.fontFamily=Ft.fontFamily,this.captionText=Ft.captionText,this.fontSize=Ft.fontSize,this.createVisual(),Dt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Ft){Dt.prototype.scale.call(this,xt,Ft),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.icon='',Lt}(wt),Pn=function(){function Dt(Lt,xt){xt===void 0&&(xt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=xt}return Object.defineProperty(Dt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Dt.prototype.preventDefault=function(){this._defaultPrevented=!0},Dt}(),Un=function(Dt){function Lt(xt,Ft,Gt){var kt=Dt.call(this,xt,!1)||this;return kt.dataUrl=Ft,kt.state=Gt,kt}return de(Lt,Dt),Lt}(Pn),le=function(Dt){function Lt(xt,Ft,Gt){Gt===void 0&&(Gt=!1);var kt=Dt.call(this,xt,Gt)||this;return kt.marker=Ft,kt}return de(Lt,Dt),Lt}(Pn),jn=function(){function Dt(){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 Dt.prototype.addEventListener=function(Lt,xt){this[Lt].push(xt)},Dt.prototype.removeEventListener=function(Lt,xt){var Ft=this[Lt].indexOf(xt);Ft>-1&&this[Lt].splice(Ft,1)},Dt}(),pi=function(){function Dt(Lt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Qt,this._isOpen=!1,this.undoRedoManager=new en,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 jn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Dt.instanceCounter++,this.styles=new ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Lt,this.targetRoot=document.body,this.width=Lt.clientWidth,this.height=Lt.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(Dt.prototype,"ALL_MARKER_TYPES",{get:function(){return[_t,pe,Cn,Re,Oe,Qn,Hn,hn,ti,ln,Se,mn,Yn]},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[_t,pe,Cn,Re,Qn,Hn,hn]},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[_t,pe,Cn,Re,Hn]},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var xt=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Ft){if(typeof Ft=="string"){var Gt=xt.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Ft});Gt!==void 0&&xt._availableMarkerTypes.push(Gt)}else xt._availableMarkerTypes.push(Ft)})},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Dt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Lt){this._zoomLevel=Lt,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(Dt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Dt.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},Dt.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&Pe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Pe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(xt){return xt(new Pn(Lt))})},Dt.prototype.render=function(){return se(this,void 0,void 0,function(){var Lt;return je(this,function(xt){switch(xt.label){case 0:return this.setCurrentMarker(),(Lt=new Ve).naturalSize=this.renderAtNaturalSize,Lt.imageType=this.renderImageType,Lt.imageQuality=this.renderImageQuality,Lt.markersOnly=this.renderMarkersOnly,Lt.width=this.renderWidth,Lt.height=this.renderHeight,[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return xt.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,xt.sent()]}})})},Dt.prototype.close=function(Lt){var xt=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Ft=!1;Lt||this.eventListeners.beforeclose.forEach(function(Gt){var kt=new Pn(xt,!0);Gt(kt),kt.defaultPrevented&&(Ft=!0)}),Ft||(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(Gt){return Gt(new Pn(xt))}),this.detachEvents(),this._isOpen=!1)}},Dt.prototype.addMarkersToToolbar=function(){for(var Lt,xt=[],Ft=0;Ftthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Ft=xt',Lt.title="Powered by marker.js",Lt.style.display="grid",Lt.style.alignItems="center",Lt.style.justifyItems="center",Lt.style.padding="3px",Lt.style.width="20px",Lt.style.height="20px",this.logoUI.appendChild(Lt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Dt.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")},Dt.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"},Dt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Dt.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 Lt=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=Lt+"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 an(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-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},Dt.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())},Dt.prototype.toolbarButtonClicked=function(Lt,xt){if(Lt==="marker"&&xt!==void 0)this.createNewMarker(xt);else if(Lt==="action")switch(xt){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()}},Dt.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var xt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Gt){var kt=new le(Lt,Lt._currentMarker,!0);Gt(kt),kt.defaultPrevented&&(xt=!0)}),!xt){var Ft=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(Gt){return Gt(new le(Lt,Ft))})}}},Dt.prototype.clear=function(){var Lt=this,xt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var Le=new le(Lt,void 0,!0);ye(Le),Le.defaultPrevented&&(xt=!0)}),!xt)){this.setCurrentMarker();for(var Ft=function(ye){var Le=Gt.markers[ye];Gt.setCurrentMarker(Gt.markers[ye]),Gt._currentMarker.dispose(),Gt.markerImage.removeChild(Gt._currentMarker.container),Gt.markers.splice(Gt.markers.indexOf(Gt._currentMarker),1),Gt.eventListeners.markerdelete.forEach(function(xn){return xn(new le(Lt,Le))})},Gt=this,kt=this.markers.length-1;kt>=0;kt--)Ft(kt);this.addUndoStep()}},Object.defineProperty(Dt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Dt.prototype.showNotesEditor=function(){var Lt;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=(Lt=this._currentMarker.notes)!==null&&Lt!==void 0?Lt:"",this.overlayContainer.appendChild(this.notesArea))},Dt.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)},Dt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Dt.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var xt=this.getState(),Ft=this.undoRedoManager.getLastUndoStep();if(!Ft||Ft.width===xt.width&&Ft.height===xt.height){var Gt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(xt),Gt1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Dt.prototype.onPointerUp=function(Lt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)),this.isDragging=!1,this.addUndoStep()},Dt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Dt.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Dt.prototype.clientToLocalCoordinates=function(Lt,xt){var Ft=this.markerImage.getBoundingClientRect();return{x:(Lt-Ft.left)/this.zoomLevel,y:(xt-Ft.top)/this.zoomLevel}},Dt.prototype.onWindowResize=function(){this.positionUI()},Dt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Lt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"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()},Dt.prototype.addLicenseKey=function(Lt){ie.addKey(Lt)},Dt.prototype.addEventListener=function(Lt,xt){this.eventListeners.addEventListener(Lt,xt)},Dt.prototype.removeEventListener=function(Lt,xt){this.eventListeners.removeEventListener(Lt,xt)},Dt.prototype.renderState=function(Lt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Lt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Dt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Dt.prototype.focus=function(){var Lt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(xt){return xt(new Pn(Lt))}))},Dt.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(xt){return xt(new Pn(Lt))}))},Dt.instanceCounter=0,Dt}()},17115:function(Ln,En,Ot){"use strict";Ot.d(En,{ZP:function(){return ie}});var Tt=Ot(72071),de=Ot(59301),se=Ot(47273),je=0,Jt=(0,se.Z)();function ue(){var Ve;return Jt?(Ve=je,je+=1):Ve="TEST_OR_SSR",Ve}function ie(Ve){var Pe=de.useState(),ne=(0,Tt.Z)(Pe,2),Xe=ne[0],me=ne[1];return de.useEffect(function(){me("rc_select_".concat(ue()))},[]),Ve||Xe}},77861:function(Ln,En,Ot){"use strict";Ot.d(En,{Ac:function(){return rn},Xo:function(){return bi},Wx:function(){return no},ZP:function(){return on},lk:function(){return wt}});var Tt=Ot(96663),de=Ot(19127),se=Ot(90493),je=Ot(44127),Jt=Ot(72071),ue=Ot(6620),ie=Ot(20135),Ve=Ot(18929),Pe=Ot(48736),ne=Ot(59301),Xe=Ot(92310),me=Ot.n(Xe),an=Ot(34280),At=Ot(49658),et=Ot(10228),nt=Ot(8654),ft=function(Yt){var Fe=Yt.className,Je=Yt.customizeIcon,In=Yt.customizeIconProps,bn=Yt.onMouseDown,$t=Yt.onClick,_e=Yt.children,Mn;return typeof Je=="function"?Mn=Je(In):Mn=Je,ne.createElement("span",{className:Fe,onMouseDown:function(ve){ve.preventDefault(),bn&&bn(ve)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$t,"aria-hidden":!0},Mn!==void 0?Mn:ne.createElement("span",{className:me()(Fe.split(/\s+/).map(function(ei){return"".concat(ei,"-icon")}))},_e))},lt=ft;function pt(re,Yt,Fe,Je,In){var bn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$t=arguments.length>6?arguments[6]:void 0,_e=arguments.length>7?arguments[7]:void 0,Mn=ne.useMemo(function(){if((0,ie.Z)(Je)==="object")return Je.clearIcon;if(In)return In},[Je,In]),ei=ne.useMemo(function(){return!!(!bn&&Je&&(Fe.length||$t)&&!(_e==="combobox"&&$t===""))},[Je,bn,Fe.length,$t,_e]);return{allowClear:ei,clearIcon:ne.createElement(lt,{className:"".concat(re,"-clear"),onMouseDown:Yt,customizeIcon:Mn},"\xD7")}}var vt=ne.createContext(null);function wt(){return ne.useContext(vt)}function Nt(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Yt=ne.useState(!1),Fe=(0,Jt.Z)(Yt,2),Je=Fe[0],In=Fe[1],bn=ne.useRef(null),$t=function(){window.clearTimeout(bn.current)};ne.useEffect(function(){return $t},[]);var _e=function(ei,ve){$t(),bn.current=window.setTimeout(function(){In(ei),ve&&ve()},re)};return[Je,_e,$t]}function bt(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Yt=ne.useRef(null),Fe=ne.useRef(null);ne.useEffect(function(){return function(){window.clearTimeout(Fe.current)}},[]);function Je(In){(In||Yt.current===null)&&(Yt.current=In),window.clearTimeout(Fe.current),Fe.current=window.setTimeout(function(){Yt.current=null},re)}return[function(){return Yt.current},Je]}function Ht(re,Yt,Fe,Je){var In=ne.useRef(null);In.current={open:Yt,triggerOpen:Fe,customizedTrigger:Je},ne.useEffect(function(){function bn($t){var _e;if(!((_e=In.current)!==null&&_e!==void 0&&_e.customizedTrigger)){var Mn=$t.target;Mn.shadowRoot&&$t.composed&&(Mn=$t.composedPath()[0]||Mn),In.current.open&&re().filter(function(ei){return ei}).every(function(ei){return!ei.contains(Mn)&&ei!==Mn})&&In.current.triggerOpen(!1)}}return window.addEventListener("mousedown",bn),function(){return window.removeEventListener("mousedown",bn)}},[])}var _t=Ot(26112),Qt=Ot(11780),qt=function(Yt,Fe){var Je,In,bn=Yt.prefixCls,$t=Yt.id,_e=Yt.inputElement,Mn=Yt.disabled,ei=Yt.tabIndex,ve=Yt.autoFocus,Be=Yt.autoComplete,ge=Yt.editable,Ne=Yt.activeDescendantId,De=Yt.value,Te=Yt.maxLength,Ze=Yt.onKeyDown,He=Yt.onMouseDown,nn=Yt.onChange,sn=Yt.onPaste,Xn=Yt.onCompositionStart,xe=Yt.onCompositionEnd,ni=Yt.open,vi=Yt.attrs,ii=_e||ne.createElement("input",null),Ce=ii,Sn=Ce.ref,An=Ce.props,$n=An.onKeyDown,Gn=An.onChange,di=An.onMouseDown,Pi=An.onCompositionStart,si=An.onCompositionEnd,Vn=An.style;return(0,Pe.Kp)(!("maxLength"in ii.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ii=ne.cloneElement(ii,(0,je.Z)((0,je.Z)((0,je.Z)({type:"search"},An),{},{id:$t,ref:(0,nt.sQ)(Fe,Sn),disabled:Mn,tabIndex:ei,autoComplete:Be||"off",autoFocus:ve,className:me()("".concat(bn,"-selection-search-input"),(Je=ii)===null||Je===void 0||(In=Je.props)===null||In===void 0?void 0:In.className),role:"combobox","aria-label":"Search","aria-expanded":ni||!1,"aria-haspopup":"listbox","aria-owns":"".concat($t,"_list"),"aria-autocomplete":"list","aria-controls":"".concat($t,"_list"),"aria-activedescendant":ni?Ne:void 0},vi),{},{value:ge?De:"",maxLength:Te,readOnly:!ge,unselectable:ge?null:"on",style:(0,je.Z)((0,je.Z)({},Vn),{},{opacity:ge?null:0}),onKeyDown:function(Ie){Ze(Ie),$n&&$n(Ie)},onMouseDown:function(Ie){He(Ie),di&&di(Ie)},onChange:function(Ie){nn(Ie),Gn&&Gn(Ie)},onCompositionStart:function(Ie){Xn(Ie),Pi&&Pi(Ie)},onCompositionEnd:function(Ie){xe(Ie),si&&si(Ie)},onPaste:sn})),ii},Se=ne.forwardRef(qt);Se.displayName="Input";var he=Se;function Re(re){return Array.isArray(re)?re:re!==void 0?[re]:[]}var pe=typeof window!="undefined"&&window.document&&window.document.documentElement,Ke=pe;function Cn(re){return re!=null}function ln(re){return!re&&re!==0}function dn(re){return["string","number"].includes((0,ie.Z)(re))}function Hn(re){var Yt=void 0;return re&&(dn(re.title)?Yt=re.title.toString():dn(re.label)&&(Yt=re.label.toString())),Yt}function ae(re,Yt){Ke?ne.useLayoutEffect(re,Yt):ne.useEffect(re,Yt)}function Ut(re){var Yt;return(Yt=re.key)!==null&&Yt!==void 0?Yt:re.value}var hn=function(Yt){Yt.preventDefault(),Yt.stopPropagation()},Qn=function(Yt){var Fe=Yt.id,Je=Yt.prefixCls,In=Yt.values,bn=Yt.open,$t=Yt.searchValue,_e=Yt.autoClearSearchValue,Mn=Yt.inputRef,ei=Yt.placeholder,ve=Yt.disabled,Be=Yt.mode,ge=Yt.showSearch,Ne=Yt.autoFocus,De=Yt.autoComplete,Te=Yt.activeDescendantId,Ze=Yt.tabIndex,He=Yt.removeIcon,nn=Yt.maxTagCount,sn=Yt.maxTagTextLength,Xn=Yt.maxTagPlaceholder,xe=Xn===void 0?function(Wi){return"+ ".concat(Wi.length," ...")}:Xn,ni=Yt.tagRender,vi=Yt.onToggleOpen,ii=Yt.onRemove,Ce=Yt.onInputChange,Sn=Yt.onInputPaste,An=Yt.onInputKeyDown,$n=Yt.onInputMouseDown,Gn=Yt.onInputCompositionStart,di=Yt.onInputCompositionEnd,Pi=ne.useRef(null),si=(0,ne.useState)(0),Vn=(0,Jt.Z)(si,2),yi=Vn[0],Ie=Vn[1],Yi=(0,ne.useState)(!1),Ge=(0,Jt.Z)(Yi,2),Ti=Ge[0],bo=Ge[1],Xi="".concat(Je,"-selection"),Ro=bn||Be==="multiple"&&_e===!1||Be==="tags"?$t:"",vo=Be==="tags"||Be==="multiple"&&_e===!1||ge&&(bn||Ti);ae(function(){Ie(Pi.current.scrollWidth)},[Ro]);function ui(Wi,Mo,ji,mo,Wo){return ne.createElement("span",{className:me()("".concat(Xi,"-item"),(0,se.Z)({},"".concat(Xi,"-item-disabled"),ji)),title:Hn(Wi)},ne.createElement("span",{className:"".concat(Xi,"-item-content")},Mo),mo&&ne.createElement(lt,{className:"".concat(Xi,"-item-remove"),onMouseDown:hn,onClick:Wo,customizeIcon:He},"\xD7"))}function oi(Wi,Mo,ji,mo,Wo){var wi=function(Hi){hn(Hi),vi(!bn)};return ne.createElement("span",{onMouseDown:wi},ni({label:Mo,value:Wi,disabled:ji,closable:mo,onClose:Wo}))}function Ri(Wi){var Mo=Wi.disabled,ji=Wi.label,mo=Wi.value,Wo=!ve&&!Mo,wi=ji;if(typeof sn=="number"&&(typeof ji=="string"||typeof ji=="number")){var Ci=String(wi);Ci.length>sn&&(wi="".concat(Ci.slice(0,sn),"..."))}var Hi=function(po){po&&po.stopPropagation(),ii(Wi)};return typeof ni=="function"?oi(mo,wi,Mo,Wo,Hi):ui(Wi,wi,Mo,Wo,Hi)}function Ji(Wi){var Mo=typeof xe=="function"?xe(Wi):xe;return ui({title:Mo},Mo,!1)}var On=ne.createElement("div",{className:"".concat(Xi,"-search"),style:{width:yi},onFocus:function(){bo(!0)},onBlur:function(){bo(!1)}},ne.createElement(he,{ref:Mn,open:bn,prefixCls:Je,id:Fe,inputElement:null,disabled:ve,autoFocus:Ne,autoComplete:De,editable:vo,activeDescendantId:Te,value:Ro,onKeyDown:An,onMouseDown:$n,onChange:Ce,onPaste:Sn,onCompositionStart:Gn,onCompositionEnd:di,tabIndex:Ze,attrs:(0,_t.Z)(Yt,!0)}),ne.createElement("span",{ref:Pi,className:"".concat(Xi,"-search-mirror"),"aria-hidden":!0},Ro,"\xA0")),It=ne.createElement(Qt.Z,{prefixCls:"".concat(Xi,"-overflow"),data:In,renderItem:Ri,renderRest:Ji,suffix:On,itemKey:Ut,maxCount:nn});return ne.createElement(ne.Fragment,null,It,!In.length&&!Ro&&ne.createElement("span",{className:"".concat(Xi,"-placeholder")},ei))},ti=Qn,Oe=function(Yt){var Fe=Yt.inputElement,Je=Yt.prefixCls,In=Yt.id,bn=Yt.inputRef,$t=Yt.disabled,_e=Yt.autoFocus,Mn=Yt.autoComplete,ei=Yt.activeDescendantId,ve=Yt.mode,Be=Yt.open,ge=Yt.values,Ne=Yt.placeholder,De=Yt.tabIndex,Te=Yt.showSearch,Ze=Yt.searchValue,He=Yt.activeValue,nn=Yt.maxLength,sn=Yt.onInputKeyDown,Xn=Yt.onInputMouseDown,xe=Yt.onInputChange,ni=Yt.onInputPaste,vi=Yt.onInputCompositionStart,ii=Yt.onInputCompositionEnd,Ce=Yt.title,Sn=ne.useState(!1),An=(0,Jt.Z)(Sn,2),$n=An[0],Gn=An[1],di=ve==="combobox",Pi=di||Te,si=ge[0],Vn=Ze||"";di&&He&&!$n&&(Vn=He),ne.useEffect(function(){di&&Gn(!1)},[di,He]);var yi=ve!=="combobox"&&!Be&&!Te?!1:!!Vn,Ie=Ce===void 0?Hn(si):Ce,Yi=function(){if(si)return null;var Ti=yi?{visibility:"hidden"}:void 0;return ne.createElement("span",{className:"".concat(Je,"-selection-placeholder"),style:Ti},Ne)};return ne.createElement(ne.Fragment,null,ne.createElement("span",{className:"".concat(Je,"-selection-search")},ne.createElement(he,{ref:bn,prefixCls:Je,id:In,open:Be,inputElement:Fe,disabled:$t,autoFocus:_e,autoComplete:Mn,editable:Pi,activeDescendantId:ei,value:Vn,onKeyDown:sn,onMouseDown:Xn,onChange:function(Ti){Gn(!0),xe(Ti)},onPaste:ni,onCompositionStart:vi,onCompositionEnd:ii,tabIndex:De,attrs:(0,_t.Z)(Yt,!0),maxLength:di?nn:void 0})),!di&&si?ne.createElement("span",{className:"".concat(Je,"-selection-item"),title:Ie,style:yi?{visibility:"hidden"}:void 0},si.label):null,Yi())},en=Oe;function mn(re){return![et.Z.ESC,et.Z.SHIFT,et.Z.BACKSPACE,et.Z.TAB,et.Z.WIN_KEY,et.Z.ALT,et.Z.META,et.Z.WIN_KEY_RIGHT,et.Z.CTRL,et.Z.SEMICOLON,et.Z.EQUALS,et.Z.CAPS_LOCK,et.Z.CONTEXT_MENU,et.Z.F1,et.Z.F2,et.Z.F3,et.Z.F4,et.Z.F5,et.Z.F6,et.Z.F7,et.Z.F8,et.Z.F9,et.Z.F10,et.Z.F11,et.Z.F12].includes(re)}var Yn=function(Yt,Fe){var Je=(0,ne.useRef)(null),In=(0,ne.useRef)(!1),bn=Yt.prefixCls,$t=Yt.open,_e=Yt.mode,Mn=Yt.showSearch,ei=Yt.tokenWithEnter,ve=Yt.autoClearSearchValue,Be=Yt.onSearch,ge=Yt.onSearchSubmit,Ne=Yt.onToggleOpen,De=Yt.onInputKeyDown,Te=Yt.domRef;ne.useImperativeHandle(Fe,function(){return{focus:function(){Je.current.focus()},blur:function(){Je.current.blur()}}});var Ze=bt(0),He=(0,Jt.Z)(Ze,2),nn=He[0],sn=He[1],Xn=function(Vn){var yi=Vn.which;(yi===et.Z.UP||yi===et.Z.DOWN)&&Vn.preventDefault(),De&&De(Vn),yi===et.Z.ENTER&&_e==="tags"&&!In.current&&!$t&&(ge==null||ge(Vn.target.value)),mn(yi)&&Ne(!0)},xe=function(){sn(!0)},ni=(0,ne.useRef)(null),vi=function(Vn){Be(Vn,!0,In.current)!==!1&&Ne(!0)},ii=function(){In.current=!0},Ce=function(Vn){In.current=!1,_e!=="combobox"&&vi(Vn.target.value)},Sn=function(Vn){var yi=Vn.target.value;if(ei&&ni.current&&/[\r\n]/.test(ni.current)){var Ie=ni.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");yi=yi.replace(Ie,ni.current)}ni.current=null,vi(yi)},An=function(Vn){var yi=Vn.clipboardData,Ie=yi.getData("text");ni.current=Ie},$n=function(Vn){var yi=Vn.target;if(yi!==Je.current){var Ie=document.body.style.msTouchAction!==void 0;Ie?setTimeout(function(){Je.current.focus()}):Je.current.focus()}},Gn=function(Vn){var yi=nn();Vn.target!==Je.current&&!yi&&_e!=="combobox"&&Vn.preventDefault(),(_e!=="combobox"&&(!Mn||!yi)||!$t)&&($t&&ve!==!1&&Be("",!0,!1),Ne())},di={inputRef:Je,onInputKeyDown:Xn,onInputMouseDown:xe,onInputChange:Sn,onInputPaste:An,onInputCompositionStart:ii,onInputCompositionEnd:Ce},Pi=_e==="multiple"||_e==="tags"?ne.createElement(ti,(0,Tt.Z)({},Yt,di)):ne.createElement(en,(0,Tt.Z)({},Yt,di));return ne.createElement("div",{ref:Te,className:"".concat(bn,"-selector"),onClick:$n,onMouseDown:Gn},Pi)},Pn=ne.forwardRef(Yn);Pn.displayName="Selector";var Un=Pn,le=Ot(35593),jn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],pi=function(Yt){var Fe=Yt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Fe,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Fe,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Fe,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Fe,adjustY:1},htmlRegion:"scroll"}}},Dt=function(Yt,Fe){var Je=Yt.prefixCls,In=Yt.disabled,bn=Yt.visible,$t=Yt.children,_e=Yt.popupElement,Mn=Yt.animation,ei=Yt.transitionName,ve=Yt.dropdownStyle,Be=Yt.dropdownClassName,ge=Yt.direction,Ne=ge===void 0?"ltr":ge,De=Yt.placement,Te=Yt.builtinPlacements,Ze=Yt.dropdownMatchSelectWidth,He=Yt.dropdownRender,nn=Yt.dropdownAlign,sn=Yt.getPopupContainer,Xn=Yt.empty,xe=Yt.getTriggerDOMNode,ni=Yt.onPopupVisibleChange,vi=Yt.onPopupMouseEnter,ii=(0,ue.Z)(Yt,jn),Ce="".concat(Je,"-dropdown"),Sn=_e;He&&(Sn=He(_e));var An=ne.useMemo(function(){return Te||pi(Ze)},[Te,Ze]),$n=Mn?"".concat(Ce,"-").concat(Mn):ei,Gn=typeof Ze=="number",di=ne.useMemo(function(){return Gn?null:Ze===!1?"minWidth":"width"},[Ze,Gn]),Pi=ve;Gn&&(Pi=(0,je.Z)((0,je.Z)({},Pi),{},{width:Ze}));var si=ne.useRef(null);return ne.useImperativeHandle(Fe,function(){return{getPopupElement:function(){return si.current}}}),ne.createElement(le.Z,(0,Tt.Z)({},ii,{showAction:ni?["click"]:[],hideAction:ni?["click"]:[],popupPlacement:De||(Ne==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:An,prefixCls:Ce,popupTransitionName:$n,popup:ne.createElement("div",{ref:si,onMouseEnter:vi},Sn),stretch:di,popupAlign:nn,popupVisible:bn,getPopupContainer:sn,popupClassName:me()(Be,(0,se.Z)({},"".concat(Ce,"-empty"),Xn)),popupStyle:Pi,getTriggerDOMNode:xe,onPopupVisibleChange:ni}),$t)},Lt=ne.forwardRef(Dt);Lt.displayName="SelectTrigger";var xt=Lt,Ft=Ot(4537);function Gt(re,Yt){var Fe=re.key,Je;return"value"in re&&(Je=re.value),Fe!=null?Fe:Je!==void 0?Je:"rc-index-key-".concat(Yt)}function kt(re,Yt){var Fe=re||{},Je=Fe.label,In=Fe.value,bn=Fe.options,$t=Fe.groupLabel,_e=Je||(Yt?"children":"label");return{label:_e,value:In||"value",options:bn||"options",groupLabel:$t||_e}}function ye(re){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=Yt.fieldNames,Je=Yt.childrenAsData,In=[],bn=kt(Fe,!1),$t=bn.label,_e=bn.value,Mn=bn.options,ei=bn.groupLabel;function ve(Be,ge){Be.forEach(function(Ne){if(ge||!(Mn in Ne)){var De=Ne[_e];In.push({key:Gt(Ne,In.length),groupOption:ge,data:Ne,label:Ne[$t],value:De})}else{var Te=Ne[ei];Te===void 0&&Je&&(Te=Ne.label),In.push({key:Gt(Ne,In.length),group:!0,data:Ne,label:Te}),ve(Ne[Mn],!0)}})}return ve(re,!1),In}function Le(re){var Yt=(0,je.Z)({},re);return"props"in Yt||Object.defineProperty(Yt,"props",{get:function(){return(0,Pe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Yt}}),Yt}function xn(re,Yt){if(!Yt||!Yt.length)return null;var Fe=!1;function Je(bn,$t){var _e=(0,Ft.Z)($t),Mn=_e[0],ei=_e.slice(1);if(!Mn)return[bn];var ve=bn.split(Mn);return Fe=Fe||ve.length>1,ve.reduce(function(Be,ge){return[].concat((0,de.Z)(Be),(0,de.Z)(Je(ge,ei)))},[]).filter(function(Be){return Be})}var In=Je(re,Yt);return Fe?In:null}var cn=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Ee=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function tn(re){return re==="tags"||re==="multiple"}var fn=ne.forwardRef(function(re,Yt){var Fe,Je,In=re.id,bn=re.prefixCls,$t=re.className,_e=re.showSearch,Mn=re.tagRender,ei=re.direction,ve=re.omitDomProps,Be=re.displayValues,ge=re.onDisplayValuesChange,Ne=re.emptyOptions,De=re.notFoundContent,Te=De===void 0?"Not Found":De,Ze=re.onClear,He=re.mode,nn=re.disabled,sn=re.loading,Xn=re.getInputElement,xe=re.getRawInputElement,ni=re.open,vi=re.defaultOpen,ii=re.onDropdownVisibleChange,Ce=re.activeValue,Sn=re.onActiveValueChange,An=re.activeDescendantId,$n=re.searchValue,Gn=re.autoClearSearchValue,di=re.onSearch,Pi=re.onSearchSplit,si=re.tokenSeparators,Vn=re.allowClear,yi=re.suffixIcon,Ie=re.clearIcon,Yi=re.OptionList,Ge=re.animation,Ti=re.transitionName,bo=re.dropdownStyle,Xi=re.dropdownClassName,Ro=re.dropdownMatchSelectWidth,vo=re.dropdownRender,ui=re.dropdownAlign,oi=re.placement,Ri=re.builtinPlacements,Ji=re.getPopupContainer,On=re.showAction,It=On===void 0?[]:On,Wi=re.onFocus,Mo=re.onBlur,ji=re.onKeyUp,mo=re.onKeyDown,Wo=re.onMouseDown,wi=(0,ue.Z)(re,cn),Ci=tn(He),Hi=(_e!==void 0?_e:Ci)||He==="combobox",Oi=(0,je.Z)({},wi);Ee.forEach(function(ao){delete Oi[ao]}),ve==null||ve.forEach(function(ao){delete Oi[ao]});var po=ne.useState(!1),Fo=(0,Jt.Z)(po,2),ai=Fo[0],li=Fo[1];ne.useEffect(function(){li((0,At.Z)())},[]);var pn=ne.useRef(null),Si=ne.useRef(null),oo=ne.useRef(null),Zo=ne.useRef(null),Vo=ne.useRef(null),$o=Nt(),yr=(0,Jt.Z)($o,3),Sr=yr[0],gs=yr[1],Ur=yr[2];ne.useImperativeHandle(Yt,function(){var ao,Go;return{focus:(ao=Zo.current)===null||ao===void 0?void 0:ao.focus,blur:(Go=Zo.current)===null||Go===void 0?void 0:Go.blur,scrollTo:function(ys){var jr;return(jr=Vo.current)===null||jr===void 0?void 0:jr.scrollTo(ys)}}});var es=ne.useMemo(function(){var ao;if(He!=="combobox")return $n;var Go=(ao=Be[0])===null||ao===void 0?void 0:ao.value;return typeof Go=="string"||typeof Go=="number"?String(Go):""},[$n,He,Be]),ke=He==="combobox"&&typeof Xn=="function"&&Xn()||null,Mr=typeof xe=="function"&&xe(),eu=(0,nt.x1)(Si,Mr==null||(Fe=Mr.props)===null||Fe===void 0?void 0:Fe.ref),_s=ne.useState(!1),yo=(0,Jt.Z)(_s,2),to=yo[0],fr=yo[1];(0,an.Z)(function(){fr(!0)},[]);var jo=(0,Ve.Z)(!1,{defaultValue:vi,value:ni}),eo=(0,Jt.Z)(jo,2),Ko=eo[0],ps=eo[1],Fi=to?Ko:!1,ho=!Te&&Ne;(nn||ho&&Fi&&He==="combobox")&&(Fi=!1);var ro=ho?!1:Fi,Kn=ne.useCallback(function(ao){var Go=ao!==void 0?ao:!Fi;nn||(ps(Go),Fi!==Go&&(ii==null||ii(Go)))},[nn,Fi,ps,ii]),kr=ne.useMemo(function(){return(si||[]).some(function(ao){return[` `,`\r `].includes(ao)})},[si]),br=function(Go,vs,ys){var jr=!0,xr=Go;Sn==null||Sn(null);var Nr=ys?null:xn(Go,si);return He!=="combobox"&&Nr&&(xr="",Pi==null||Pi(Nr),Kn(!1),jr=!1),di&&es!==xr&&di(xr,{source:vs?"typing":"effect"}),jr},ms=function(Go){!Go||!Go.trim()||di(Go,{source:"submit"})};ne.useEffect(function(){!Fi&&!Ci&&He!=="combobox"&&br("",!1,!1)},[Fi]),ne.useEffect(function(){Ko&&nn&&ps(!1),nn&&gs(!1)},[nn]);var Ba=bt(),ul=(0,Jt.Z)(Ba,2),Rn=ul[0],ir=ul[1],Tr=function(Go){var vs=Rn(),ys=Go.which;if(ys===et.Z.ENTER&&(He!=="combobox"&&Go.preventDefault(),Fi||Kn(!0)),ir(!!es),ys===et.Z.BACKSPACE&&!vs&&Ci&&!es&&Be.length){for(var jr=(0,de.Z)(Be),xr=null,Nr=jr.length-1;Nr>=0;Nr-=1){var Gr=jr[Nr];if(!Gr.disabled){jr.splice(Nr,1),xr=Gr;break}}xr&&ge(jr,{type:"remove",values:[xr]})}for(var Dr=arguments.length,Pl=new Array(Dr>1?Dr-1:0),Ra=1;Ra1?vs-1:0),jr=1;jr1?Nr-1:0),Dr=1;Dr1&&arguments[1]!==void 0?arguments[1]:!1;return(0,hi.Z)(re).map(function(Fe,Je){if(!ne.isValidElement(Fe)||!Fe.type)return null;var In=Fe,bn=In.type.isSelectOptGroup,$t=In.key,_e=In.props,Mn=_e.children,ei=(0,ue.Z)(_e,gn);return Yt||!bn?Nn(Fe):(0,je.Z)((0,je.Z)({key:"__RC_SELECT_GRP__".concat($t===null?Je:$t,"__"),label:$t},ei),{},{options:_n(Mn)})}).filter(function(Fe){return Fe})}function Jn(re,Yt,Fe,Je,In){return ne.useMemo(function(){var bn=re,$t=!re;$t&&(bn=_n(Yt));var _e=new Map,Mn=new Map,ei=function(ge,Ne,De){De&&typeof De=="string"&&ge.set(Ne[De],Ne)};function ve(Be){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=0;Ne1&&arguments[1]!==void 0?arguments[1]:1,Ji=Sn.length,On=0;On1&&arguments[1]!==void 0?arguments[1]:!1;yi(oi);var Ji={source:Ri?"keyboard":"mouse"},On=Sn[oi];if(!On){Te(null,-1,Ji);return}Te(On.value,oi,Ji)};(0,ne.useEffect)(function(){Ie(Ze!==!1?di(0):-1)},[Sn.length,ei]);var Yi=ne.useCallback(function(ui){return sn.has(ui)&&Mn!=="combobox"},[Mn,(0,de.Z)(sn).toString(),sn.size]);(0,ne.useEffect)(function(){var ui=setTimeout(function(){if(!_e&&$t&&sn.size===1){var Ri=Array.from(sn)[0],Ji=Sn.findIndex(function(On){var It=On.data;return It.value===Ri});Ji!==-1&&(Ie(Ji),Gn(Ji))}});if($t){var oi;(oi=An.current)===null||oi===void 0||oi.scrollTo(void 0)}return function(){return clearTimeout(ui)}},[$t,ei,De.length]);var Ge=function(oi){oi!==void 0&&He(oi,{selected:!sn.has(oi)}),_e||ve(!1)};if(ne.useImperativeHandle(Fe,function(){return{onKeyDown:function(oi){var Ri=oi.which,Ji=oi.ctrlKey;switch(Ri){case et.Z.N:case et.Z.P:case et.Z.UP:case et.Z.DOWN:{var On=0;if(Ri===et.Z.UP?On=-1:Ri===et.Z.DOWN?On=1:fo()&&Ji&&(Ri===et.Z.N?On=1:Ri===et.Z.P&&(On=-1)),On!==0){var It=di(Vn+On,On);Gn(It),Ie(It,!0)}break}case et.Z.ENTER:{var Wi=Sn[Vn];Wi&&!Wi.data.disabled?Ge(Wi.value):Ge(void 0),$t&&oi.preventDefault();break}case et.Z.ESC:ve(!1),$t&&oi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oi){Gn(oi)}}}),Sn.length===0)return ne.createElement("div",{role:"listbox",id:"".concat(bn,"_list"),className:"".concat(Ce,"-empty"),onMouseDown:$n},Be);var Ti=Object.keys(Xn).map(function(ui){return Xn[ui]}),bo=function(oi){return oi.label};function Xi(ui,oi){var Ri=ui.group;return{role:Ri?"presentation":"option",id:"".concat(bn,"_list_").concat(oi)}}var Ro=function(oi){var Ri=Sn[oi];if(!Ri)return null;var Ji=Ri.data||{},On=Ji.value,It=Ri.group,Wi=(0,_t.Z)(Ji,!0),Mo=bo(Ri);return Ri?ne.createElement("div",(0,Tt.Z)({"aria-label":typeof Mo=="string"&&!It?Mo:null},Wi,{key:oi},Xi(Ri,oi),{"aria-selected":Yi(On)}),On):null},vo={role:"listbox",id:"".concat(bn,"_list")};return ne.createElement(ne.Fragment,null,xe&&ne.createElement("div",(0,Tt.Z)({},vo,{style:{height:0,width:0,overflow:"hidden"}}),Ro(Vn-1),Ro(Vn),Ro(Vn+1)),ne.createElement(Ao.Z,{itemKey:"key",ref:An,data:Sn,height:vi,itemHeight:ii,fullHeight:!1,onMouseDown:$n,onScroll:ge,virtual:xe,direction:ni,innerProps:xe?null:vo},function(ui,oi){var Ri,Ji=ui.group,On=ui.groupOption,It=ui.data,Wi=ui.label,Mo=ui.value,ji=It.key;if(Ji){var mo,Wo=(mo=It.title)!==null&&mo!==void 0?mo:Ct(Wi)?Wi.toString():void 0;return ne.createElement("div",{className:me()(Ce,"".concat(Ce,"-group")),title:Wo},Wi!==void 0?Wi:ji)}var wi=It.disabled,Ci=It.title,Hi=It.children,Oi=It.style,po=It.className,Fo=(0,ue.Z)(It,Li),ai=(0,io.Z)(Fo,Ti),li=Yi(Mo),pn="".concat(Ce,"-option"),Si=me()(Ce,pn,po,(Ri={},(0,se.Z)(Ri,"".concat(pn,"-grouped"),On),(0,se.Z)(Ri,"".concat(pn,"-active"),Vn===oi&&!wi),(0,se.Z)(Ri,"".concat(pn,"-disabled"),wi),(0,se.Z)(Ri,"".concat(pn,"-selected"),li),Ri)),oo=bo(ui),Zo=!nn||typeof nn=="function"||li,Vo=typeof oo=="number"?oo:oo||Mo,$o=Ct(Vo)?Vo.toString():void 0;return Ci!==void 0&&($o=Ci),ne.createElement("div",(0,Tt.Z)({},(0,_t.Z)(ai),xe?{}:Xi(ui,oi),{"aria-selected":li,className:Si,title:$o,onMouseMove:function(){Vn===oi||wi||Ie(oi)},onClick:function(){wi||Ge(Mo)},style:Oi}),ne.createElement("div",{className:"".concat(pn,"-content")},Vo),ne.isValidElement(nn)||li,Zo&&ne.createElement(lt,{className:"".concat(Ce,"-option-state"),customizeIcon:nn,customizeIconProps:{isSelected:li}},li?"\u2713":null))}))},$i=ne.forwardRef(Co);$i.displayName="OptionList";var Qi=$i;function Jo(re){var Yt=re.mode,Fe=re.options,Je=re.children,In=re.backfill,bn=re.allowClear,$t=re.placeholder,_e=re.getInputElement,Mn=re.showSearch,ei=re.onSearch,ve=re.defaultOpen,Be=re.autoFocus,ge=re.labelInValue,Ne=re.value,De=re.inputValue,Te=re.optionLabelProp,Ze=isMultiple(Yt),He=Mn!==void 0?Mn:Ze||Yt==="combobox",nn=Fe||convertChildrenToData(Je);if(warning(Yt!=="tags"||nn.every(function(ni){return!ni.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Yt==="tags"||Yt==="combobox"){var sn=nn.some(function(ni){return ni.options?ni.options.some(function(vi){return typeof("value"in vi?vi.value:vi.key)=="number"}):typeof("value"in ni?ni.value:ni.key)=="number"});warning(!sn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Yt!=="combobox"||!Te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Yt==="combobox"||!In,"`backfill` only works with `combobox` mode."),warning(Yt==="combobox"||!_e,"`getInputElement` only work with `combobox` mode."),noteOnce(Yt!=="combobox"||!_e||!bn||!$t,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ei&&!He&&Yt!=="combobox"&&Yt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ve||Be,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ne!=null){var Xn=toArray(Ne);warning(!ge||Xn.every(function(ni){return _typeof(ni)==="object"&&("key"in ni||"value"in ni)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ze||Array.isArray(Ne),"`value` should be array when `mode` is `multiple` or `tags`")}if(Je){var xe=null;toNodeArray(Je).some(function(ni){if(!React.isValidElement(ni)||!ni.type)return!1;var vi=ni,ii=vi.type;if(ii.isSelectOption)return!1;if(ii.isSelectOptGroup){var Ce=toNodeArray(ni.props.children).every(function(Sn){return!React.isValidElement(Sn)||!ni.type||Sn.type.isSelectOption?!0:(xe=Sn.type,!1)});return!Ce}return xe=ii,!0}),xe&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),warning(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Qo(re,Yt){if(re){var Fe=function Je(In){for(var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$t=0;$t2&&arguments[2]!==void 0?arguments[2]:{},Kn=ro.source,kr=Kn===void 0?"keyboard":Kn;eu(ho),$t&&Je==="combobox"&&Fi!==null&&kr==="keyboard"&&Ur(String(Fi))},[$t,Je]),to=function(ho,ro,Kn){var kr=function(){var Da,Vi=po(ho);return[Vn?{label:Vi==null?void 0:Vi[Xi.label],value:ho,key:(Da=Vi==null?void 0:Vi.key)!==null&&Da!==void 0?Da:ho}:ho,Le(Vi)]};if(ro&&Ne){var br=kr(),ms=(0,Jt.Z)(br,2),Ba=ms[0],ul=ms[1];Ne(Ba,ul)}else if(!ro&&De&&Kn!=="clear"){var Rn=kr(),ir=(0,Jt.Z)(Rn,2),Tr=ir[0],Sa=ir[1];De(Tr,Sa)}},fr=xi(function(Fi,ho){var ro,Kn=Ge?ho.selected:!0;Kn?ro=Ge?[].concat((0,de.Z)(Oi),[Fi]):[Fi]:ro=Oi.filter(function(kr){return kr.value!==Fi}),$o(ro),to(Fi,Kn),Je==="combobox"?Ur(""):(!tn||ge)&&(oi(""),Ur(""))}),jo=function(ho,ro){$o(ho);var Kn=ro.type,kr=ro.values;(Kn==="remove"||Kn==="clear")&&kr.forEach(function(br){to(br.value,!1,Kn)})},eo=function(ho,ro){if(oi(ho),Ur(null),ro.source==="submit"){var Kn=(ho||"").trim();if(Kn){var kr=Array.from(new Set([].concat((0,de.Z)(ai),[Kn])));$o(kr),to(Kn,!0),oi("")}return}ro.source!=="blur"&&(Je==="combobox"&&$o(ho),ve==null||ve(ho))},Ko=function(ho){var ro=ho;Je!=="tags"&&(ro=ho.map(function(kr){var br=On.get(kr);return br==null?void 0:br.value}).filter(function(kr){return kr!==void 0}));var Kn=Array.from(new Set([].concat((0,de.Z)(ai),(0,de.Z)(ro))));$o(Kn),Kn.forEach(function(kr){to(kr,!0)})},ps=ne.useMemo(function(){var Fi=Ce!==!1&&Ze!==!1;return(0,je.Z)((0,je.Z)({},Ri),{},{flattenOptions:Vo,onActiveValue:yo,defaultActiveFirstOption:_s,onSelect:fr,menuItemSelectedIcon:ii,rawValues:ai,fieldNames:Xi,virtual:Fi,direction:Sn,listHeight:$n,listItemHeight:di,childrenAsData:Ti})},[Ri,Vo,yo,_s,fr,ii,ai,Xi,Ce,Ze,$n,di,Ti]);return ne.createElement(Do.Provider,{value:ps},ne.createElement(rn,(0,Tt.Z)({},Ie,{id:Yi,prefixCls:bn,ref:Yt,omitDomProps:Io,mode:Je,displayValues:Fo,onDisplayValuesChange:jo,direction:Sn,searchValue:ui,onSearch:eo,autoClearSearchValue:ge,onSearchSplit:Ko,dropdownMatchSelectWidth:Ze,OptionList:Qi,emptyOptions:!Vo.length,activeValue:gs,activeDescendantId:"".concat(Yi,"_list_").concat(Mr)})))}),Wt=Me;Wt.Option=no,Wt.OptGroup=bi;var Ae=Wt,on=Ae},9296:function(Ln,En,Ot){"use strict";Ot.r(En),Ot.d(En,{ResizableTextArea:function(){return Se},default:function(){return ln}});var Tt=Ot(96663),de=Ot(44127),se=Ot(90493),je=Ot(20135),Jt=Ot(72071),ue=Ot(6620),ie=Ot(19127),Ve=Ot(92310),Pe=Ot.n(Ve),ne=Ot(93681),Xe=Ot(5643),me=Ot(18929),an=Ot(59301),At=Ot(29301),et=Ot(34280),nt=Ot(16089),ft=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,lt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],pt={},vt;function wt(dn){var Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=dn.getAttribute("id")||dn.getAttribute("data-reactid")||dn.getAttribute("name");if(Hn&&pt[ae])return pt[ae];var Ut=window.getComputedStyle(dn),hn=Ut.getPropertyValue("box-sizing")||Ut.getPropertyValue("-moz-box-sizing")||Ut.getPropertyValue("-webkit-box-sizing"),Qn=parseFloat(Ut.getPropertyValue("padding-bottom"))+parseFloat(Ut.getPropertyValue("padding-top")),ti=parseFloat(Ut.getPropertyValue("border-bottom-width"))+parseFloat(Ut.getPropertyValue("border-top-width")),Oe=lt.map(function(mn){return"".concat(mn,":").concat(Ut.getPropertyValue(mn))}).join(";"),en={sizingStyle:Oe,paddingSize:Qn,borderSize:ti,boxSizing:hn};return Hn&&ae&&(pt[ae]=en),en}function Nt(dn){var Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;vt||(vt=document.createElement("textarea"),vt.setAttribute("tab-index","-1"),vt.setAttribute("aria-hidden","true"),document.body.appendChild(vt)),dn.getAttribute("wrap")?vt.setAttribute("wrap",dn.getAttribute("wrap")):vt.removeAttribute("wrap");var hn=wt(dn,Hn),Qn=hn.paddingSize,ti=hn.borderSize,Oe=hn.boxSizing,en=hn.sizingStyle;vt.setAttribute("style","".concat(en,";").concat(ft)),vt.value=dn.value||dn.placeholder||"";var mn=void 0,Yn=void 0,Pn,Un=vt.scrollHeight;if(Oe==="border-box"?Un+=ti:Oe==="content-box"&&(Un-=Qn),ae!==null||Ut!==null){vt.value=" ";var le=vt.scrollHeight-Qn;ae!==null&&(mn=le*ae,Oe==="border-box"&&(mn=mn+Qn+ti),Un=Math.max(mn,Un)),Ut!==null&&(Yn=le*Ut,Oe==="border-box"&&(Yn=Yn+Qn+ti),Pn=Un>Yn?"":"hidden",Un=Math.min(Yn,Un))}var jn={height:Un,overflowY:Pn,resize:"none"};return mn&&(jn.minHeight=mn),Yn&&(jn.maxHeight=Yn),jn}var bt=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ht=0,_t=1,Qt=2,qt=an.forwardRef(function(dn,Hn){var ae=dn,Ut=ae.prefixCls,hn=ae.onPressEnter,Qn=ae.defaultValue,ti=ae.value,Oe=ae.autoSize,en=ae.onResize,mn=ae.className,Yn=ae.style,Pn=ae.disabled,Un=ae.onChange,le=ae.onInternalAutoSize,jn=(0,ue.Z)(ae,bt),pi=(0,me.Z)(Qn,{value:ti,postState:function(bi){return bi!=null?bi:""}}),Dt=(0,Jt.Z)(pi,2),Lt=Dt[0],xt=Dt[1],Ft=function(bi){xt(bi.target.value),Un==null||Un(bi)},Gt=an.useRef();an.useImperativeHandle(Hn,function(){return{textArea:Gt.current}});var kt=an.useMemo(function(){return Oe&&(0,je.Z)(Oe)==="object"?[Oe.minRows,Oe.maxRows]:[]},[Oe]),ye=(0,Jt.Z)(kt,2),Le=ye[0],xn=ye[1],cn=!!Oe,Ee=function(){try{if(document.activeElement===Gt.current){var bi=Gt.current,Ii=bi.selectionStart,no=bi.selectionEnd,qi=bi.scrollTop;Gt.current.setSelectionRange(Ii,no),Gt.current.scrollTop=qi}}catch(io){}},tn=an.useState(Qt),fn=(0,Jt.Z)(tn,2),rn=fn[0],Dn=fn[1],Zn=an.useState(),yn=(0,Jt.Z)(Zn,2),Ei=yn[0],hi=yn[1],We=function(){Dn(Ht)};(0,et.Z)(function(){cn&&We()},[ti,Le,xn,cn]),(0,et.Z)(function(){if(rn===Ht)Dn(_t);else if(rn===_t){var Di=Nt(Gt.current,!1,Le,xn);Dn(Qt),hi(Di)}else Ee()},[rn]);var gn=an.useRef(),Nn=function(){nt.Z.cancel(gn.current)},_n=function(bi){rn===Qt&&(en==null||en(bi),Oe&&(Nn(),gn.current=(0,nt.Z)(function(){We()})))};an.useEffect(function(){return Nn},[]);var Jn=cn?Ei:null,xi=(0,de.Z)((0,de.Z)({},Yn),Jn);return(rn===Ht||rn===_t)&&(xi.overflowY="hidden",xi.overflowX="hidden"),an.createElement(At.Z,{onResize:_n,disabled:!(Oe||en)},an.createElement("textarea",(0,Tt.Z)({},jn,{ref:Gt,style:xi,className:Pe()(Ut,mn,(0,se.Z)({},"".concat(Ut,"-disabled"),Pn)),disabled:Pn,value:Lt,onChange:Ft})))}),Se=qt,he=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Re(dn,Hn){return(0,ie.Z)(dn||"").slice(0,Hn).join("")}function pe(dn,Hn,ae,Ut){var hn=ae;return dn?hn=Re(ae,Ut):(0,ie.Z)(Hn||"").lengthUt&&(hn=Hn),hn}var Ke=an.forwardRef(function(dn,Hn){var ae,Ut=dn.defaultValue,hn=dn.value,Qn=dn.onFocus,ti=dn.onBlur,Oe=dn.onChange,en=dn.allowClear,mn=dn.maxLength,Yn=dn.onCompositionStart,Pn=dn.onCompositionEnd,Un=dn.suffix,le=dn.prefixCls,jn=le===void 0?"rc-textarea":le,pi=dn.classes,Dt=dn.showCount,Lt=dn.className,xt=dn.style,Ft=dn.disabled,Gt=dn.hidden,kt=dn.classNames,ye=dn.styles,Le=dn.onResize,xn=(0,ue.Z)(dn,he),cn=(0,me.Z)(Ut,{value:hn,defaultValue:Ut}),Ee=(0,Jt.Z)(cn,2),tn=Ee[0],fn=Ee[1],rn=(0,an.useRef)(null),Dn=an.useState(!1),Zn=(0,Jt.Z)(Dn,2),yn=Zn[0],Ei=Zn[1],hi=an.useState(!1),We=(0,Jt.Z)(hi,2),gn=We[0],Nn=We[1],_n=an.useRef(),Jn=an.useRef(0),xi=an.useState(null),Di=(0,Jt.Z)(xi,2),bi=Di[0],Ii=Di[1],no=function(){var be;(be=rn.current)===null||be===void 0||be.textArea.focus()};(0,an.useImperativeHandle)(Hn,function(){return{resizableTextArea:rn.current,focus:no,blur:function(){var be;(be=rn.current)===null||be===void 0||be.textArea.blur()}}}),(0,an.useEffect)(function(){Ei(function(Io){return!Ft&&Io})},[Ft]);var qi=Number(mn)>0,io=function(be){Nn(!0),_n.current=tn,Jn.current=be.currentTarget.selectionStart,Yn==null||Yn(be)},Ao=function(be){Nn(!1);var Me=be.currentTarget.value;if(qi){var Wt,Ae=Jn.current>=mn+1||Jn.current===((Wt=_n.current)===null||Wt===void 0?void 0:Wt.length);Me=pe(Ae,_n.current,Me,mn)}Me!==tn&&(fn(Me),(0,Xe.rJ)(be.currentTarget,be,Oe,Me)),Pn==null||Pn(be)},wo=function(be){var Me=be.target.value;if(!gn&&qi){var Wt=be.target.selectionStart>=mn+1||be.target.selectionStart===Me.length||!be.target.selectionStart;Me=pe(Wt,tn,Me,mn)}fn(Me),(0,Xe.rJ)(be.currentTarget,be,Oe,Me)},Do=function(be){var Me=xn.onPressEnter,Wt=xn.onKeyDown;be.key==="Enter"&&Me&&Me(be),Wt==null||Wt(be)},fo=function(be){Ei(!0),Qn==null||Qn(be)},Li=function(be){Ei(!1),ti==null||ti(be)},Ct=function(be){var Me;fn(""),no(),(0,Xe.rJ)((Me=rn.current)===null||Me===void 0?void 0:Me.textArea,be,Oe)},Co=(0,Xe.D7)(tn);!gn&&qi&&hn==null&&(Co=Re(Co,mn));var $i=Un,Qi;if(Dt){var Jo=(0,ie.Z)(Co).length;(0,je.Z)(Dt)==="object"?Qi=Dt.formatter({value:Co,count:Jo,maxLength:mn}):Qi="".concat(Jo).concat(qi?" / ".concat(mn):""),$i=an.createElement(an.Fragment,null,$i,an.createElement("span",{className:Pe()("".concat(jn,"-data-count"),kt==null?void 0:kt.count),style:ye==null?void 0:ye.count},Qi))}var Qo=function(be){var Me;Le==null||Le(be),(Me=rn.current)!==null&&Me!==void 0&&Me.textArea.style.height&&Ii(!0)},cr=!xn.autoSize&&!Dt&&!en,Lo=an.createElement(ne.BaseInput,{value:Co,allowClear:en,handleReset:Ct,suffix:$i,prefixCls:jn,classes:{affixWrapper:Pe()(pi==null?void 0:pi.affixWrapper,(ae={},(0,se.Z)(ae,"".concat(jn,"-show-count"),Dt),(0,se.Z)(ae,"".concat(jn,"-textarea-allow-clear"),en),ae))},disabled:Ft,focused:yn,className:Lt,style:(0,de.Z)((0,de.Z)({},xt),bi&&!cr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qi=="string"?Qi:void 0}},hidden:Gt,inputElement:an.createElement(Se,(0,Tt.Z)({},xn,{onKeyDown:Do,onChange:wo,onFocus:fo,onBlur:Li,onCompositionStart:io,onCompositionEnd:Ao,className:kt==null?void 0:kt.textarea,style:(0,de.Z)((0,de.Z)({},ye==null?void 0:ye.textarea),{},{resize:xt==null?void 0:xt.resize}),disabled:Ft,prefixCls:jn,onResize:Qo,ref:rn}))});return Lo}),Cn=Ke,ln=Cn},24916:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return pi}});var Tt=Ot(96663),de=Ot(20135),se=Ot(44127),je=Ot(90493),Jt=Ot(72071),ue=Ot(6620),ie=Ot(92310),Ve=Ot.n(ie),Pe=Ot(29301),ne=Ot(70425),Xe=Ot(34280),me=Ot(59301),an=Ot(4676),At=me.forwardRef(function(Dt,Lt){var xt=Dt.height,Ft=Dt.offsetY,Gt=Dt.offsetX,kt=Dt.children,ye=Dt.prefixCls,Le=Dt.onInnerResize,xn=Dt.innerProps,cn=Dt.rtl,Ee=Dt.extra,tn={},fn={display:"flex",flexDirection:"column"};return Ft!==void 0&&(tn={height:xt,position:"relative",overflow:"hidden"},fn=(0,se.Z)((0,se.Z)({},fn),{},(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({transform:"translateY(".concat(Ft,"px)")},cn?"marginRight":"marginLeft",-Gt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:tn},me.createElement(Pe.Z,{onResize:function(Dn){var Zn=Dn.offsetHeight;Zn&&Le&&Le()}},me.createElement("div",(0,Tt.Z)({style:fn,className:Ve()((0,je.Z)({},"".concat(ye,"-holder-inner"),ye)),ref:Lt},xn),kt,Ee)))});At.displayName="Filler";var et=At;function nt(Dt){var Lt=Dt.children,xt=Dt.setRef,Ft=me.useCallback(function(Gt){xt(Gt)},[]);return me.cloneElement(Lt,{ref:Ft})}function ft(Dt,Lt,xt,Ft,Gt,kt,ye,Le){var xn=Le.getKey;return Dt.slice(Lt,xt+1).map(function(cn,Ee){var tn=Lt+Ee,fn=ye(cn,tn,{style:{width:Ft},offsetX:Gt}),rn=xn(cn);return me.createElement(nt,{key:rn,setRef:function(Zn){return kt(cn,Zn)}},fn)})}function lt(Dt,Lt,xt,Ft){var Gt=xt-Dt,kt=Lt-xt,ye=Math.min(Gt,kt)*2;if(Ft<=ye){var Le=Math.floor(Ft/2);return Ft%2?xt+Le+1:xt-Le}return Gt>kt?xt-(Ft-kt):xt+(Ft-Gt)}function pt(Dt,Lt,xt){var Ft=Dt.length,Gt=Lt.length,kt,ye;if(Ft===0&&Gt===0)return null;Ft2&&arguments[2]!==void 0?arguments[2]:!1,tn=xn?cn<0&&Le.current.left||cn>0&&Le.current.right:cn<0&&Le.current.top||cn>0&&Le.current.bottom;return Ee&&tn?(clearTimeout(kt.current),Gt.current=!1):(!tn||Gt.current)&&ye(),!Gt.current&&tn}};function _t(Dt,Lt,xt,Ft,Gt,kt,ye){var Le=(0,me.useRef)(0),xn=(0,me.useRef)(null),cn=(0,me.useRef)(null),Ee=(0,me.useRef)(!1),tn=Ht(Lt,xt,Ft,Gt);function fn(hi,We){if(wt.Z.cancel(xn.current),!tn(!1,We)){var gn=hi;if(!gn._virtualHandled)gn._virtualHandled=!0;else return;Le.current+=We,cn.current=We,bt||gn.preventDefault(),xn.current=(0,wt.Z)(function(){var Nn=Ee.current?10:1;ye(Le.current*Nn,!1),Le.current=0})}}function rn(hi,We){ye(We,!0),bt||hi.preventDefault()}var Dn=(0,me.useRef)(null),Zn=(0,me.useRef)(null);function yn(hi){if(Dt){wt.Z.cancel(Zn.current),Zn.current=(0,wt.Z)(function(){Dn.current=null},2);var We=hi.deltaX,gn=hi.deltaY,Nn=hi.shiftKey,_n=We,Jn=gn;(Dn.current==="sx"||!Dn.current&&Nn&&gn&&!We)&&(_n=gn,Jn=0,Dn.current="sx");var xi=Math.abs(_n),Di=Math.abs(Jn);Dn.current===null&&(Dn.current=kt&&xi>Di?"x":"y"),Dn.current==="y"?fn(hi,Jn):rn(hi,_n)}}function Ei(hi){Dt&&(Ee.current=hi.detail===cn.current)}return[yn,Ei]}function Qt(Dt,Lt,xt,Ft){var Gt=me.useMemo(function(){return[new Map,[]]},[Dt,xt.id,Ft]),kt=(0,Jt.Z)(Gt,2),ye=kt[0],Le=kt[1],xn=function(Ee){var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ee,fn=ye.get(Ee),rn=ye.get(tn);if(fn===void 0||rn===void 0)for(var Dn=Dt.length,Zn=Le.length;Zn0&&arguments[0]!==void 0?arguments[0]:!1;Ee();var Dn=function(){var Ei=!1;Le.current.forEach(function(hi,We){if(hi&&hi.offsetParent){var gn=hi.offsetHeight,Nn=getComputedStyle(hi),_n=Nn.marginTop,Jn=Nn.marginBottom,xi=pe(_n),Di=pe(Jn),bi=gn+xi+Di;xn.current.get(We)!==bi&&(xn.current.set(We,bi),Ei=!0)}}),Ei&&ye(function(hi){return hi+1})};if(rn)Dn();else{cn.current+=1;var Zn=cn.current;Promise.resolve().then(function(){Zn===cn.current&&Dn()})}}function fn(rn,Dn){var Zn=Dt(rn),yn=Le.current.get(Zn);Dn?(Le.current.set(Zn,Dn),tn()):Le.current.delete(Zn),!yn!=!Dn&&(Dn?Lt==null||Lt(rn):xt==null||xt(rn))}return(0,me.useEffect)(function(){return Ee},[]),[fn,tn,xn.current,kt]}var Cn=14/15;function ln(Dt,Lt,xt){var Ft=(0,me.useRef)(!1),Gt=(0,me.useRef)(0),kt=(0,me.useRef)(0),ye=(0,me.useRef)(null),Le=(0,me.useRef)(null),xn,cn=function(rn){if(Ft.current){var Dn=Math.ceil(rn.touches[0].pageX),Zn=Math.ceil(rn.touches[0].pageY),yn=Gt.current-Dn,Ei=kt.current-Zn,hi=Math.abs(yn)>Math.abs(Ei);hi?Gt.current=Dn:kt.current=Zn;var We=xt(hi,hi?yn:Ei,!1,rn);We&&rn.preventDefault(),clearInterval(Le.current),We&&(Le.current=setInterval(function(){hi?yn*=Cn:Ei*=Cn;var gn=Math.floor(hi?yn:Ei);(!xt(hi,gn,!0)||Math.abs(gn)<=.1)&&clearInterval(Le.current)},16))}},Ee=function(){Ft.current=!1,xn()},tn=function(rn){xn(),rn.touches.length===1&&!Ft.current&&(Ft.current=!0,Gt.current=Math.ceil(rn.touches[0].pageX),kt.current=Math.ceil(rn.touches[0].pageY),ye.current=rn.target,ye.current.addEventListener("touchmove",cn,{passive:!1}),ye.current.addEventListener("touchend",Ee,{passive:!0}))};xn=function(){ye.current&&(ye.current.removeEventListener("touchmove",cn),ye.current.removeEventListener("touchend",Ee))},(0,Xe.Z)(function(){return Dt&&Lt.current.addEventListener("touchstart",tn,{passive:!0}),function(){var fn;(fn=Lt.current)===null||fn===void 0||fn.removeEventListener("touchstart",tn),xn(),clearInterval(Le.current)}},[Dt])}function dn(Dt){return Math.floor(Math.pow(Dt,.5))}function Hn(Dt,Lt){var xt="touches"in Dt?Dt.touches[0]:Dt;return xt[Lt?"pageX":"pageY"]-window[Lt?"scrollX":"scrollY"]}function ae(Dt,Lt,xt){me.useEffect(function(){var Ft=Lt.current;if(Dt&&Ft){var Gt=!1,kt,ye,Le=function(){wt.Z.cancel(kt)},xn=function fn(){Le(),kt=(0,wt.Z)(function(){xt(ye),fn()})},cn=function(rn){if(!rn.target.draggable){var Dn=rn;Dn._virtualHandled||(Dn._virtualHandled=!0,Gt=!0)}},Ee=function(){Gt=!1,Le()},tn=function(rn){if(Gt){var Dn=Hn(rn,!1),Zn=Ft.getBoundingClientRect(),yn=Zn.top,Ei=Zn.bottom;if(Dn<=yn){var hi=yn-Dn;ye=-dn(hi),xn()}else if(Dn>=Ei){var We=Dn-Ei;ye=dn(We),xn()}else Le()}};return Ft.addEventListener("mousedown",cn),Ft.ownerDocument.addEventListener("mouseup",Ee),Ft.ownerDocument.addEventListener("mousemove",tn),function(){Ft.removeEventListener("mousedown",cn),Ft.ownerDocument.removeEventListener("mouseup",Ee),Ft.ownerDocument.removeEventListener("mousemove",tn),Le()}}},[Dt])}var Ut=10;function hn(Dt,Lt,xt,Ft,Gt,kt,ye,Le){var xn=me.useRef(),cn=me.useState(null),Ee=(0,Jt.Z)(cn,2),tn=Ee[0],fn=Ee[1];return(0,Xe.Z)(function(){if(tn&&tn.times=0;io-=1){var Ao=Gt(Lt[io]),wo=xt.get(Ao);if(wo===void 0){hi=!0;break}if(qi-=wo,qi<=0)break}switch(Nn){case"top":gn=Jn-yn;break;case"bottom":gn=xi-Ei+yn;break;default:{var Do=Dt.current.scrollTop,fo=Do+Ei;Jnfo&&(We="bottom")}}gn!==null&&ye(gn),gn!==tn.lastTop&&(hi=!0)}hi&&fn((0,se.Z)((0,se.Z)({},tn),{},{times:tn.times+1,targetAlign:We,lastTop:gn}))}},[tn,Dt.current]),function(rn){if(rn==null){Le();return}if(wt.Z.cancel(xn.current),typeof rn=="number")ye(rn);else if(rn&&(0,de.Z)(rn)==="object"){var Dn,Zn=rn.align;"index"in rn?Dn=rn.index:Dn=Lt.findIndex(function(hi){return Gt(hi)===rn.key});var yn=rn.offset,Ei=yn===void 0?0:yn;fn({times:0,index:Dn,offset:Ei,originAlign:Zn})}}}var Qn=me.forwardRef(function(Dt,Lt){var xt=Dt.prefixCls,Ft=Dt.rtl,Gt=Dt.scrollOffset,kt=Dt.scrollRange,ye=Dt.onStartMove,Le=Dt.onStopMove,xn=Dt.onScroll,cn=Dt.horizontal,Ee=Dt.spinSize,tn=Dt.containerSize,fn=Dt.style,rn=Dt.thumbStyle,Dn=Dt.showScrollBar,Zn=me.useState(!1),yn=(0,Jt.Z)(Zn,2),Ei=yn[0],hi=yn[1],We=me.useState(null),gn=(0,Jt.Z)(We,2),Nn=gn[0],_n=gn[1],Jn=me.useState(null),xi=(0,Jt.Z)(Jn,2),Di=xi[0],bi=xi[1],Ii=!Ft,no=me.useRef(),qi=me.useRef(),io=me.useState(Dn),Ao=(0,Jt.Z)(io,2),wo=Ao[0],Do=Ao[1],fo=me.useRef(),Li=function(){Dn===!0||Dn===!1||(clearTimeout(fo.current),Do(!0),fo.current=setTimeout(function(){Do(!1)},3e3))},Ct=kt-tn||0,Co=tn-Ee||0,$i=me.useMemo(function(){if(Gt===0||Ct===0)return 0;var Wt=Gt/Ct;return Wt*Co},[Gt,Ct,Co]),Qi=function(Ae){Ae.stopPropagation(),Ae.preventDefault()},Jo=me.useRef({top:$i,dragging:Ei,pageY:Nn,startTop:Di});Jo.current={top:$i,dragging:Ei,pageY:Nn,startTop:Di};var Qo=function(Ae){hi(!0),_n(Hn(Ae,cn)),bi(Jo.current.top),ye(),Ae.stopPropagation(),Ae.preventDefault()};me.useEffect(function(){var Wt=function(Yt){Yt.preventDefault()},Ae=no.current,on=qi.current;return Ae.addEventListener("touchstart",Wt,{passive:!1}),on.addEventListener("touchstart",Qo,{passive:!1}),function(){Ae.removeEventListener("touchstart",Wt),on.removeEventListener("touchstart",Qo)}},[]);var cr=me.useRef();cr.current=Ct;var Lo=me.useRef();Lo.current=Co,me.useEffect(function(){if(Ei){var Wt,Ae=function(Yt){var Fe=Jo.current,Je=Fe.dragging,In=Fe.pageY,bn=Fe.startTop;wt.Z.cancel(Wt);var $t=no.current.getBoundingClientRect(),_e=tn/(cn?$t.width:$t.height);if(Je){var Mn=(Hn(Yt,cn)-In)*_e,ei=bn;!Ii&&cn?ei-=Mn:ei+=Mn;var ve=cr.current,Be=Lo.current,ge=Be?ei/Be:0,Ne=Math.ceil(ge*ve);Ne=Math.max(Ne,0),Ne=Math.min(Ne,ve),Wt=(0,wt.Z)(function(){xn(Ne,cn)})}},on=function(){hi(!1),Le()};return window.addEventListener("mousemove",Ae,{passive:!0}),window.addEventListener("touchmove",Ae,{passive:!0}),window.addEventListener("mouseup",on,{passive:!0}),window.addEventListener("touchend",on,{passive:!0}),function(){window.removeEventListener("mousemove",Ae),window.removeEventListener("touchmove",Ae),window.removeEventListener("mouseup",on),window.removeEventListener("touchend",on),wt.Z.cancel(Wt)}}},[Ei]),me.useEffect(function(){return Li(),function(){clearTimeout(fo.current)}},[Gt]),me.useImperativeHandle(Lt,function(){return{delayHidden:Li}});var Io="".concat(xt,"-scrollbar"),be={position:"absolute",visibility:wo?null:"hidden"},Me={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return cn?(be.height=8,be.left=0,be.right=0,be.bottom=0,Me.height="100%",Me.width=Ee,Ii?Me.left=$i:Me.right=$i):(be.width=8,be.top=0,be.bottom=0,Ii?be.right=0:be.left=0,Me.width="100%",Me.height=Ee,Me.top=$i),me.createElement("div",{ref:no,className:Ve()(Io,(0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Io,"-horizontal"),cn),"".concat(Io,"-vertical"),!cn),"".concat(Io,"-visible"),wo)),style:(0,se.Z)((0,se.Z)({},be),fn),onMouseDown:Qi,onMouseMove:Li},me.createElement("div",{ref:qi,className:Ve()("".concat(Io,"-thumb"),(0,je.Z)({},"".concat(Io,"-thumb-moving"),Ei)),style:(0,se.Z)((0,se.Z)({},Me),rn),onMouseDown:Qo}))}),ti=Qn,Oe=20;function en(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xt=Dt/Lt*Dt;return isNaN(xt)&&(xt=0),xt=Math.max(xt,Oe),Math.floor(xt)}var mn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Yn=[],Pn={overflowY:"auto",overflowAnchor:"none"};function Un(Dt,Lt){var xt=Dt.prefixCls,Ft=xt===void 0?"rc-virtual-list":xt,Gt=Dt.className,kt=Dt.height,ye=Dt.itemHeight,Le=Dt.fullHeight,xn=Le===void 0?!0:Le,cn=Dt.style,Ee=Dt.data,tn=Dt.children,fn=Dt.itemKey,rn=Dt.virtual,Dn=Dt.direction,Zn=Dt.scrollWidth,yn=Dt.component,Ei=yn===void 0?"div":yn,hi=Dt.onScroll,We=Dt.onVirtualScroll,gn=Dt.onVisibleChange,Nn=Dt.innerProps,_n=Dt.extraRender,Jn=Dt.styles,xi=Dt.showScrollBar,Di=xi===void 0?"optional":xi,bi=(0,ue.Z)(Dt,mn),Ii=me.useCallback(function(wi){return typeof fn=="function"?fn(wi):wi==null?void 0:wi[fn]},[fn]),no=Ke(Ii,null,null),qi=(0,Jt.Z)(no,4),io=qi[0],Ao=qi[1],wo=qi[2],Do=qi[3],fo=!!(rn!==!1&&kt&&ye),Li=me.useMemo(function(){return Object.values(wo.maps).reduce(function(wi,Ci){return wi+Ci},0)},[wo.id,wo.maps]),Ct=fo&&Ee&&(Math.max(ye*Ee.length,Li)>kt||!!Zn),Co=Dn==="rtl",$i=Ve()(Ft,(0,je.Z)({},"".concat(Ft,"-rtl"),Co),Gt),Qi=Ee||Yn,Jo=(0,me.useRef)(),Qo=(0,me.useRef)(),cr=(0,me.useRef)(),Lo=(0,me.useState)(0),Io=(0,Jt.Z)(Lo,2),be=Io[0],Me=Io[1],Wt=(0,me.useState)(0),Ae=(0,Jt.Z)(Wt,2),on=Ae[0],re=Ae[1],Yt=(0,me.useState)(!1),Fe=(0,Jt.Z)(Yt,2),Je=Fe[0],In=Fe[1],bn=function(){In(!0)},$t=function(){In(!1)},_e={getKey:Ii};function Mn(wi){Me(function(Ci){var Hi;typeof wi=="function"?Hi=wi(Ci):Hi=wi;var Oi=di(Hi);return Jo.current.scrollTop=Oi,Oi})}var ei=(0,me.useRef)({start:0,end:Qi.length}),ve=(0,me.useRef)(),Be=vt(Qi,Ii),ge=(0,Jt.Z)(Be,1),Ne=ge[0];ve.current=Ne;var De=me.useMemo(function(){if(!fo)return{scrollHeight:void 0,start:0,end:Qi.length-1,offset:void 0};if(!Ct){var wi;return{scrollHeight:((wi=Qo.current)===null||wi===void 0?void 0:wi.offsetHeight)||0,start:0,end:Qi.length-1,offset:void 0}}for(var Ci=0,Hi,Oi,po,Fo=Qi.length,ai=0;ai=be&&Hi===void 0&&(Hi=ai,Oi=Ci),oo>be+kt&&po===void 0&&(po=ai),Ci=oo}return Hi===void 0&&(Hi=0,Oi=0,po=Math.ceil(kt/ye)),po===void 0&&(po=Qi.length-1),po=Math.min(po+1,Qi.length-1),{scrollHeight:Ci,start:Hi,end:po,offset:Oi}},[Ct,fo,be,Qi,Do,kt]),Te=De.scrollHeight,Ze=De.start,He=De.end,nn=De.offset;ei.current.start=Ze,ei.current.end=He,me.useLayoutEffect(function(){var wi=wo.getRecord();if(wi.size===1){var Ci=Array.from(wi)[0],Hi=Qi[Ze];if(Hi){var Oi=Ii(Hi);if(Oi===Ci){var po=wo.get(Ci),Fo=po-ye;Mn(function(ai){return ai+Fo})}}}wo.resetRecord()},[Te]);var sn=me.useState({width:0,height:kt}),Xn=(0,Jt.Z)(sn,2),xe=Xn[0],ni=Xn[1],vi=function(Ci){ni({width:Ci.offsetWidth,height:Ci.offsetHeight})},ii=(0,me.useRef)(),Ce=(0,me.useRef)(),Sn=me.useMemo(function(){return en(xe.width,Zn)},[xe.width,Zn]),An=me.useMemo(function(){return en(xe.height,Te)},[xe.height,Te]),$n=Te-kt,Gn=(0,me.useRef)($n);Gn.current=$n;function di(wi){var Ci=wi;return Number.isNaN(Gn.current)||(Ci=Math.min(Ci,Gn.current)),Ci=Math.max(Ci,0),Ci}var Pi=be<=0,si=be>=$n,Vn=on<=0,yi=on>=Zn,Ie=Ht(Pi,si,Vn,yi),Yi=function(){return{x:Co?-on:on,y:be}},Ge=(0,me.useRef)(Yi()),Ti=(0,ne.useEvent)(function(wi){if(We){var Ci=(0,se.Z)((0,se.Z)({},Yi()),wi);(Ge.current.x!==Ci.x||Ge.current.y!==Ci.y)&&(We(Ci),Ge.current=Ci)}});function bo(wi,Ci){var Hi=wi;Ci?((0,an.flushSync)(function(){re(Hi)}),Ti()):Mn(Hi)}function Xi(wi){var Ci=wi.currentTarget.scrollTop;Ci!==be&&Mn(Ci),hi==null||hi(wi),Ti()}var Ro=function(Ci){var Hi=Ci,Oi=Zn?Zn-xe.width:0;return Hi=Math.max(Hi,0),Hi=Math.min(Hi,Oi),Hi},vo=(0,ne.useEvent)(function(wi,Ci){Ci?((0,an.flushSync)(function(){re(function(Hi){var Oi=Hi+(Co?-wi:wi);return Ro(Oi)})}),Ti()):Mn(function(Hi){var Oi=Hi+wi;return Oi})}),ui=_t(fo,Pi,si,Vn,yi,!!Zn,vo),oi=(0,Jt.Z)(ui,2),Ri=oi[0],Ji=oi[1];ln(fo,Jo,function(wi,Ci,Hi,Oi){var po=Oi;return Ie(wi,Ci,Hi)?!1:!po||!po._virtualHandled?(po&&(po._virtualHandled=!0),Ri({preventDefault:function(){},deltaX:wi?Ci:0,deltaY:wi?0:Ci}),!0):!1}),ae(Ct,Jo,function(wi){Mn(function(Ci){return Ci+wi})}),(0,Xe.Z)(function(){function wi(Hi){var Oi=Pi&&Hi.detail<0,po=si&&Hi.detail>0;fo&&!Oi&&!po&&Hi.preventDefault()}var Ci=Jo.current;return Ci.addEventListener("wheel",Ri,{passive:!1}),Ci.addEventListener("DOMMouseScroll",Ji,{passive:!0}),Ci.addEventListener("MozMousePixelScroll",wi,{passive:!1}),function(){Ci.removeEventListener("wheel",Ri),Ci.removeEventListener("DOMMouseScroll",Ji),Ci.removeEventListener("MozMousePixelScroll",wi)}},[fo,Pi,si]),(0,Xe.Z)(function(){if(Zn){var wi=Ro(on);re(wi),Ti({x:wi})}},[xe.width,Zn]);var On=function(){var Ci,Hi;(Ci=ii.current)===null||Ci===void 0||Ci.delayHidden(),(Hi=Ce.current)===null||Hi===void 0||Hi.delayHidden()},It=hn(Jo,Qi,wo,ye,Ii,function(){return Ao(!0)},Mn,On);me.useImperativeHandle(Lt,function(){return{nativeElement:cr.current,getScrollInfo:Yi,scrollTo:function(Ci){function Hi(Oi){return Oi&&(0,de.Z)(Oi)==="object"&&("left"in Oi||"top"in Oi)}Hi(Ci)?(Ci.left!==void 0&&re(Ro(Ci.left)),It(Ci.top)):It(Ci)}}}),(0,Xe.Z)(function(){if(gn){var wi=Qi.slice(Ze,He+1);gn(wi,Qi)}},[Ze,He,Qi]);var Wi=Qt(Qi,Ii,wo,ye),Mo=_n==null?void 0:_n({start:Ze,end:He,virtual:Ct,offsetX:on,offsetY:nn,rtl:Co,getSize:Wi}),ji=ft(Qi,Ze,He,Zn,on,io,tn,_e),mo=null;kt&&(mo=(0,se.Z)((0,je.Z)({},xn?"height":"maxHeight",kt),Pn),fo&&(mo.overflowY="hidden",Zn&&(mo.overflowX="hidden"),Je&&(mo.pointerEvents="none")));var Wo={};return Co&&(Wo.dir="rtl"),me.createElement("div",(0,Tt.Z)({ref:cr,style:(0,se.Z)((0,se.Z)({},cn),{},{position:"relative"}),className:$i},Wo,bi),me.createElement(Pe.Z,{onResize:vi},me.createElement(Ei,{className:"".concat(Ft,"-holder"),style:mo,ref:Jo,onScroll:Xi,onMouseEnter:On},me.createElement(et,{prefixCls:Ft,height:Te,offsetX:on,offsetY:nn,scrollWidth:Zn,onInnerResize:Ao,ref:Qo,innerProps:Nn,rtl:Co,extra:Mo},ji))),Ct&&Te>kt&&me.createElement(ti,{ref:ii,prefixCls:Ft,scrollOffset:be,scrollRange:Te,rtl:Co,onScroll:bo,onStartMove:bn,onStopMove:$t,spinSize:An,containerSize:xe.height,style:Jn==null?void 0:Jn.verticalScrollBar,thumbStyle:Jn==null?void 0:Jn.verticalScrollBarThumb,showScrollBar:Di}),Ct&&Zn>xe.width&&me.createElement(ti,{ref:Ce,prefixCls:Ft,scrollOffset:on,scrollRange:Zn,rtl:Co,onScroll:bo,onStartMove:bn,onStopMove:$t,spinSize:Sn,containerSize:xe.width,horizontal:!0,style:Jn==null?void 0:Jn.horizontalScrollBar,thumbStyle:Jn==null?void 0:Jn.horizontalScrollBarThumb,showScrollBar:Di}))}var le=me.forwardRef(Un);le.displayName="List";var jn=le,pi=jn},93314:function(Ln){"use strict";Ln.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(Ln,En,Ot){"use strict";Ot.d(En,{Z:function(){return Ve}});const Tt=Pe=>typeof Pe=="object"&&Pe!=null&&Pe.nodeType===1,de=(Pe,ne)=>(!ne||Pe!=="hidden")&&Pe!=="visible"&&Pe!=="clip",se=(Pe,ne)=>{if(Pe.clientHeight{const an=(At=>{if(!At.ownerDocument||!At.ownerDocument.defaultView)return null;try{return At.ownerDocument.defaultView.frameElement}catch(et){return null}})(me);return!!an&&(an.clientHeightAtne||At>Pe&&et=ne&&nt>=Xe?At-Pe-me:et>ne&&ntXe?et-ne+an:0,Jt=Pe=>{const ne=Pe.parentElement;return ne==null?Pe.getRootNode().host||null:ne},ue=(Pe,ne)=>{var Xe,me,an,At;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ft,boundary:lt,skipOverflowHiddenElements:pt}=ne,vt=typeof lt=="function"?lt:ti=>ti!==lt;if(!Tt(Pe))throw new TypeError("Invalid target");const wt=document.scrollingElement||document.documentElement,Nt=[];let bt=Pe;for(;Tt(bt)&&vt(bt);){if(bt=Jt(bt),bt===wt){Nt.push(bt);break}bt!=null&&bt===document.body&&se(bt)&&!se(document.documentElement)||bt!=null&&se(bt,pt)&&Nt.push(bt)}const Ht=(me=(Xe=window.visualViewport)==null?void 0:Xe.width)!=null?me:innerWidth,_t=(At=(an=window.visualViewport)==null?void 0:an.height)!=null?At:innerHeight,{scrollX:Qt,scrollY:qt}=window,{height:Se,width:he,top:Re,right:pe,bottom:Ke,left:Cn}=Pe.getBoundingClientRect(),{top:ln,right:dn,bottom:Hn,left:ae}=(ti=>{const Oe=window.getComputedStyle(ti);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(Pe);let Ut=nt==="start"||nt==="nearest"?Re-ln:nt==="end"?Ke+Hn:Re+Se/2-ln+Hn,hn=ft==="center"?Cn+he/2-ae+dn:ft==="end"?pe+dn:Cn-ae;const Qn=[];for(let ti=0;ti=0&&Cn>=0&&Ke<=_t&&pe<=Ht&&(Oe===wt&&!se(Oe)||Re>=Yn&&Ke<=Un&&Cn>=le&&pe<=Pn))return Qn;const jn=getComputedStyle(Oe),pi=parseInt(jn.borderLeftWidth,10),Dt=parseInt(jn.borderTopWidth,10),Lt=parseInt(jn.borderRightWidth,10),xt=parseInt(jn.borderBottomWidth,10);let Ft=0,Gt=0;const kt="offsetWidth"in Oe?Oe.offsetWidth-Oe.clientWidth-pi-Lt:0,ye="offsetHeight"in Oe?Oe.offsetHeight-Oe.clientHeight-Dt-xt:0,Le="offsetWidth"in Oe?Oe.offsetWidth===0?0:mn/Oe.offsetWidth:0,xn="offsetHeight"in Oe?Oe.offsetHeight===0?0:en/Oe.offsetHeight:0;if(wt===Oe)Ft=nt==="start"?Ut:nt==="end"?Ut-_t:nt==="nearest"?je(qt,qt+_t,_t,Dt,xt,qt+Ut,qt+Ut+Se,Se):Ut-_t/2,Gt=ft==="start"?hn:ft==="center"?hn-Ht/2:ft==="end"?hn-Ht:je(Qt,Qt+Ht,Ht,pi,Lt,Qt+hn,Qt+hn+he,he),Ft=Math.max(0,Ft+qt),Gt=Math.max(0,Gt+Qt);else{Ft=nt==="start"?Ut-Yn-Dt:nt==="end"?Ut-Un+xt+ye:nt==="nearest"?je(Yn,Un,en,Dt,xt+ye,Ut,Ut+Se,Se):Ut-(Yn+en/2)+ye/2,Gt=ft==="start"?hn-le-pi:ft==="center"?hn-(le+mn/2)+kt/2:ft==="end"?hn-Pn+Lt+kt:je(le,Pn,mn,pi,Lt+kt,hn,hn+he,he);const{scrollLeft:cn,scrollTop:Ee}=Oe;Ft=xn===0?0:Math.max(0,Math.min(Ee+Ft/xn,Oe.scrollHeight-en/xn+ye)),Gt=Le===0?0:Math.max(0,Math.min(cn+Gt/Le,Oe.scrollWidth-mn/Le+kt)),Ut+=Ee-Ft,hn+=cn-Gt}Qn.push({el:Oe,top:Ft,left:Gt})}return Qn},ie=Pe=>Pe===!1?{block:"end",inline:"nearest"}:(ne=>ne===Object(ne)&&Object.keys(ne).length!==0)(Pe)?Pe:{block:"start",inline:"nearest"};function Ve(Pe,ne){if(!Pe.isConnected||!(an=>{let At=an;for(;At&&At.parentNode;){if(At.parentNode===document)return!0;At=At.parentNode instanceof ShadowRoot?At.parentNode.host:At.parentNode}return!1})(Pe))return;const Xe=(an=>{const At=window.getComputedStyle(an);return{top:parseFloat(At.scrollMarginTop)||0,right:parseFloat(At.scrollMarginRight)||0,bottom:parseFloat(At.scrollMarginBottom)||0,left:parseFloat(At.scrollMarginLeft)||0}})(Pe);if((an=>typeof an=="object"&&typeof an.behavior=="function")(ne))return ne.behavior(ue(Pe,ne));const me=typeof ne=="boolean"||ne==null?void 0:ne.behavior;for(const{el:an,top:At,left:et}of ue(Pe,ie(ne))){const nt=At-Xe.top+Xe.bottom,ft=et-Xe.left+Xe.right;an.scroll({top:nt,left:ft,behavior:me})}}}}]);